This commit was manufactured by cvs2svn to create branch 'unlabeled-1.1.1'.
authortomo <tomo>
Mon, 17 May 1999 09:41:45 +0000 (09:41 +0000)
committertomo <tomo>
Mon, 17 May 1999 09:41:45 +0000 (09:41 +0000)
536 files changed:
BUGS [new file with mode: 0644]
CHANGES-beta [new file with mode: 0644]
COPYING [new file with mode: 0644]
ChangeLog [new file with mode: 0644]
GETTING.GNU.SOFTWARE [new file with mode: 0644]
INSTALL [new file with mode: 0644]
Makefile.in.in [new file with mode: 0644]
PROBLEMS [new file with mode: 0644]
README [new file with mode: 0644]
README.packages [new file with mode: 0644]
aclocal.m4 [new file with mode: 0644]
config.guess [new file with mode: 0755]
config.sub [new file with mode: 0755]
configure [new file with mode: 0755]
configure.in [new file with mode: 0644]
configure.usage [new file with mode: 0644]
dynodump/Makefile.in.in [new file with mode: 0644]
dynodump/README [new file with mode: 0644]
dynodump/_dynodump.h [new file with mode: 0644]
dynodump/dynodump.c [new file with mode: 0644]
dynodump/i386/_relocate.c [new file with mode: 0644]
dynodump/i386/machdep.h [new file with mode: 0644]
dynodump/i386/uninit.c [new file with mode: 0644]
dynodump/ppc/_relocate.c [new file with mode: 0644]
dynodump/ppc/machdep.h [new file with mode: 0644]
dynodump/ppc/uninit.c [new file with mode: 0644]
dynodump/sparc/_relocate.c [new file with mode: 0644]
dynodump/sparc/machdep.h [new file with mode: 0644]
dynodump/sparc/uninit.c [new file with mode: 0644]
dynodump/syms.c [new file with mode: 0644]
etc/BETA [new file with mode: 0644]
etc/CHARSETS [new file with mode: 0644]
etc/CODING-STANDARDS [new file with mode: 0644]
etc/CODINGS [new file with mode: 0644]
etc/COPYING [new file with mode: 0644]
etc/COPYING.LIB [new file with mode: 0644]
etc/DEBUG [new file with mode: 0644]
etc/DISTRIB [new file with mode: 0644]
etc/Emacs.ad [new file with mode: 0644]
etc/FTP [new file with mode: 0644]
etc/GNU [new file with mode: 0644]
etc/HELLO [new file with mode: 0644]
etc/InstallGuide [new file with mode: 0644]
etc/LPF [new file with mode: 0644]
etc/MACHINES [new file with mode: 0644]
etc/MAILINGLISTS [new file with mode: 0644]
etc/MORE.STUFF [new file with mode: 0644]
etc/MOTIVATION [new file with mode: 0644]
etc/NEWS [new file with mode: 0644]
etc/OONEWS [new file with mode: 0644]
etc/ORDERS [new file with mode: 0644]
etc/ORDERS.EUROPE [new file with mode: 0644]
etc/ORDERS.JAPAN [new file with mode: 0644]
etc/PACKAGES [new file with mode: 0644]
etc/README [new file with mode: 0644]
etc/README.HYPERBOLE [new file with mode: 0644]
etc/README.OO-BROWSER [new file with mode: 0644]
etc/SERVICE [new file with mode: 0644]
etc/TERMS [new file with mode: 0644]
etc/TUTORIAL [new file with mode: 0644]
etc/TUTORIAL.de [new file with mode: 0644]
etc/TUTORIAL.fr [new file with mode: 0644]
etc/TUTORIAL.hr [new file with mode: 0644]
etc/TUTORIAL.ja [new file with mode: 0644]
etc/TUTORIAL.ko [new file with mode: 0644]
etc/TUTORIAL.no [new file with mode: 0644]
etc/TUTORIAL.pl [new file with mode: 0644]
etc/TUTORIAL.ro [new file with mode: 0644]
etc/TUTORIAL.ru [new file with mode: 0644]
etc/TUTORIAL.th [new file with mode: 0644]
etc/XKeysymDB [new file with mode: 0644]
etc/aliases.ksh [new file with mode: 0755]
etc/cbx.png [new file with mode: 0644]
etc/check_cygwin_setup.sh [new file with mode: 0644]
etc/chr.png [new file with mode: 0644]
etc/chrm.png [new file with mode: 0644]
etc/ctags.1 [new file with mode: 0644]
etc/custom/check0.xpm [new file with mode: 0644]
etc/custom/check1.xpm [new file with mode: 0644]
etc/custom/choose-down.png [new file with mode: 0644]
etc/custom/choose-up.png [new file with mode: 0644]
etc/custom/done-down.png [new file with mode: 0644]
etc/custom/done-up.png [new file with mode: 0644]
etc/custom/down-pushed.xpm [new file with mode: 0644]
etc/custom/down.xpm [new file with mode: 0644]
etc/custom/face.xpm [new file with mode: 0644]
etc/custom/folder.xpm [new file with mode: 0644]
etc/custom/open-down.png [new file with mode: 0644]
etc/custom/open-up.png [new file with mode: 0644]
etc/custom/option.xpm [new file with mode: 0644]
etc/custom/radio0.xpm [new file with mode: 0644]
etc/custom/radio1.xpm [new file with mode: 0644]
etc/custom/reset-down.png [new file with mode: 0644]
etc/custom/reset-up.png [new file with mode: 0644]
etc/custom/right-pushed.xpm [new file with mode: 0644]
etc/custom/right.xpm [new file with mode: 0644]
etc/custom/save-down.png [new file with mode: 0644]
etc/custom/save-up.png [new file with mode: 0644]
etc/custom/set-down.png [new file with mode: 0644]
etc/custom/set-up.png [new file with mode: 0644]
etc/custom/state-down.png [new file with mode: 0644]
etc/custom/state-up.png [new file with mode: 0644]
etc/custom/toggle-off-down.png [new file with mode: 0644]
etc/custom/toggle-off-up.png [new file with mode: 0644]
etc/custom/toggle-on-down.png [new file with mode: 0644]
etc/custom/toggle-on-up.png [new file with mode: 0644]
etc/editclient.sh [new file with mode: 0644]
etc/emacskeys.sco [new file with mode: 0644]
etc/emacsstrs.sco [new file with mode: 0644]
etc/eos/eos-build.xbm [new file with mode: 0644]
etc/eos/eos-clear-at.xbm [new file with mode: 0644]
etc/eos/eos-cont.xbm [new file with mode: 0644]
etc/eos/eos-dismiss.xbm [new file with mode: 0644]
etc/eos/eos-down.xbm [new file with mode: 0644]
etc/eos/eos-evaluate-star.xbm [new file with mode: 0644]
etc/eos/eos-evaluate.xbm [new file with mode: 0644]
etc/eos/eos-fix.xbm [new file with mode: 0644]
etc/eos/eos-intro.xbm [new file with mode: 0644]
etc/eos/eos-introB.xbm [new file with mode: 0644]
etc/eos/eos-introD.xbm [new file with mode: 0644]
etc/eos/eos-introDB.xbm [new file with mode: 0644]
etc/eos/eos-run.xbm [new file with mode: 0644]
etc/eos/eos-run2.xbm [new file with mode: 0644]
etc/eos/eos-step-into.xbm [new file with mode: 0644]
etc/eos/eos-step-over.xbm [new file with mode: 0644]
etc/eos/eos-stop-in.xbm [new file with mode: 0644]
etc/eos/eos-stop.xbm [new file with mode: 0644]
etc/eos/eos-type.xbm [new file with mode: 0644]
etc/eos/eos-up.xbm [new file with mode: 0644]
etc/etags.1 [new file with mode: 0644]
etc/gnu.xbm [new file with mode: 0644]
etc/gnu.xpm [new file with mode: 0644]
etc/gnuattach.1 [new file with mode: 0644]
etc/gnuclient.1 [new file with mode: 0644]
etc/gnudoit.1 [new file with mode: 0644]
etc/gnuserv.1 [new file with mode: 0644]
etc/gnuserv.README [new file with mode: 0644]
etc/gray1.xbm [new file with mode: 0644]
etc/idd/drop [new file with mode: 0644]
etc/idd/dropmsk [new file with mode: 0644]
etc/ms-kermit [new file with mode: 0644]
etc/ms-kermit-7bit [new file with mode: 0644]
etc/package-index.LATEST.pgp [new file with mode: 0644]
etc/photos/ajc.png [new file with mode: 0644]
etc/photos/ajcm.png [new file with mode: 0644]
etc/photos/baw.png [new file with mode: 0644]
etc/photos/bawm.png [new file with mode: 0644]
etc/photos/bw.png [new file with mode: 0644]
etc/photos/bwm.png [new file with mode: 0644]
etc/photos/cthomp.png [new file with mode: 0644]
etc/photos/cthompm.png [new file with mode: 0644]
etc/photos/dkindred.png [new file with mode: 0644]
etc/photos/dkindredm.png [new file with mode: 0644]
etc/photos/dmoore.png [new file with mode: 0644]
etc/photos/dmoorem.png [new file with mode: 0644]
etc/photos/dv.png [new file with mode: 0644]
etc/photos/dvm.png [new file with mode: 0644]
etc/photos/hniksic.png [new file with mode: 0644]
etc/photos/hniksicm.png [new file with mode: 0644]
etc/photos/jareth.png [new file with mode: 0644]
etc/photos/jarethm.png [new file with mode: 0644]
etc/photos/jens.png [new file with mode: 0644]
etc/photos/jensm.png [new file with mode: 0644]
etc/photos/jmiller.png [new file with mode: 0644]
etc/photos/jmillerm.png [new file with mode: 0644]
etc/photos/jwz.png [new file with mode: 0644]
etc/photos/jwzm.png [new file with mode: 0644]
etc/photos/kazz.png [new file with mode: 0644]
etc/photos/kazzm.png [new file with mode: 0644]
etc/photos/kyle.png [new file with mode: 0644]
etc/photos/kylem.png [new file with mode: 0644]
etc/photos/larsi.png [new file with mode: 0644]
etc/photos/larsim.png [new file with mode: 0644]
etc/photos/martin.png [new file with mode: 0644]
etc/photos/martinm.png [new file with mode: 0644]
etc/photos/mcook.png [new file with mode: 0644]
etc/photos/mcookm.png [new file with mode: 0644]
etc/photos/mly.png [new file with mode: 0644]
etc/photos/mlym.png [new file with mode: 0644]
etc/photos/morioka.png [new file with mode: 0644]
etc/photos/moriokam.png [new file with mode: 0644]
etc/photos/ograf.png [new file with mode: 0644]
etc/photos/ografm.png [new file with mode: 0644]
etc/photos/pez.png [new file with mode: 0644]
etc/photos/pezm.png [new file with mode: 0644]
etc/photos/piper.png [new file with mode: 0644]
etc/photos/piperm.png [new file with mode: 0644]
etc/photos/rickc.png [new file with mode: 0644]
etc/photos/rickcm.png [new file with mode: 0644]
etc/photos/slb.png [new file with mode: 0644]
etc/photos/slbm.png [new file with mode: 0644]
etc/photos/sperber.png [new file with mode: 0644]
etc/photos/sperberm.png [new file with mode: 0644]
etc/photos/stig.png [new file with mode: 0644]
etc/photos/stigb.png [new file with mode: 0644]
etc/photos/stigbm.png [new file with mode: 0644]
etc/photos/stigm.png [new file with mode: 0644]
etc/photos/thiessel.png [new file with mode: 0644]
etc/photos/thiesselm.png [new file with mode: 0644]
etc/photos/vin.png [new file with mode: 0644]
etc/photos/vinm.png [new file with mode: 0644]
etc/photos/vladimir.png [new file with mode: 0644]
etc/photos/vladimirm.png [new file with mode: 0644]
etc/photos/wmperry.png [new file with mode: 0644]
etc/photos/wmperrym.png [new file with mode: 0644]
etc/recycle.xpm [new file with mode: 0644]
etc/recycle2.xpm [new file with mode: 0644]
etc/refcard.ps.gz [new file with mode: 0644]
etc/refcard.tex [new file with mode: 0644]
etc/sample.Xdefaults [new file with mode: 0644]
etc/sample.emacs [new file with mode: 0644]
etc/sink.xbm [new file with mode: 0644]
etc/sparcworks/SW.Editor.xpm [new file with mode: 0644]
etc/sparcworks/sunpro-mailcap [new file with mode: 0644]
etc/tests/external-widget/Makefile [new file with mode: 0644]
etc/tests/external-widget/test-ew-motif.c [new file with mode: 0644]
etc/tests/external-widget/test-ew-xlib.c [new file with mode: 0644]
etc/toolbar/compile-cap-up.xpm [new file with mode: 0644]
etc/toolbar/compile-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/compile-dn.xbm [new file with mode: 0644]
etc/toolbar/compile-up.xbm [new file with mode: 0644]
etc/toolbar/compile-up.xpm [new file with mode: 0644]
etc/toolbar/compile-xx.xbm [new file with mode: 0644]
etc/toolbar/compile-xx.xpm [new file with mode: 0644]
etc/toolbar/copy-cap-up.xpm [new file with mode: 0644]
etc/toolbar/copy-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/copy-dn.xbm [new file with mode: 0644]
etc/toolbar/copy-up.xbm [new file with mode: 0644]
etc/toolbar/copy-up.xpm [new file with mode: 0644]
etc/toolbar/copy-xx.xbm [new file with mode: 0644]
etc/toolbar/copy-xx.xpm [new file with mode: 0644]
etc/toolbar/cut-cap-up.xpm [new file with mode: 0644]
etc/toolbar/cut-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/cut-dn.xbm [new file with mode: 0644]
etc/toolbar/cut-up.xbm [new file with mode: 0644]
etc/toolbar/cut-up.xpm [new file with mode: 0644]
etc/toolbar/cut-xx.xbm [new file with mode: 0644]
etc/toolbar/cut-xx.xpm [new file with mode: 0644]
etc/toolbar/debug-cap-up.xpm [new file with mode: 0644]
etc/toolbar/debug-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/debug-dn.xbm [new file with mode: 0644]
etc/toolbar/debug-up.xbm [new file with mode: 0644]
etc/toolbar/debug-up.xpm [new file with mode: 0644]
etc/toolbar/debug-xx.xbm [new file with mode: 0644]
etc/toolbar/debug-xx.xpm [new file with mode: 0644]
etc/toolbar/disk-cap-up.xpm [new file with mode: 0644]
etc/toolbar/disk-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/disk-dn.xbm [new file with mode: 0644]
etc/toolbar/disk-up.xbm [new file with mode: 0644]
etc/toolbar/disk-up.xpm [new file with mode: 0644]
etc/toolbar/disk-xx.xbm [new file with mode: 0644]
etc/toolbar/disk-xx.xpm [new file with mode: 0644]
etc/toolbar/file-cap-up.xpm [new file with mode: 0644]
etc/toolbar/file-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/file-dn.xbm [new file with mode: 0644]
etc/toolbar/file-up.xbm [new file with mode: 0644]
etc/toolbar/file-up.xpm [new file with mode: 0644]
etc/toolbar/file-xx.xbm [new file with mode: 0644]
etc/toolbar/file-xx.xpm [new file with mode: 0644]
etc/toolbar/folder-cap-up.xpm [new file with mode: 0644]
etc/toolbar/folder-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/folder-dn.xbm [new file with mode: 0644]
etc/toolbar/folder-up.xbm [new file with mode: 0644]
etc/toolbar/folder-up.xpm [new file with mode: 0644]
etc/toolbar/folder-xx.xbm [new file with mode: 0644]
etc/toolbar/folder-xx.xpm [new file with mode: 0644]
etc/toolbar/info-def-cap-up.xpm [new file with mode: 0644]
etc/toolbar/info-def-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/info-def-dn.xbm [new file with mode: 0644]
etc/toolbar/info-def-up.xbm [new file with mode: 0644]
etc/toolbar/info-def-up.xpm [new file with mode: 0644]
etc/toolbar/info-def-xx.xbm [new file with mode: 0644]
etc/toolbar/info-def-xx.xpm [new file with mode: 0644]
etc/toolbar/info-exit-cap-up.xpm [new file with mode: 0644]
etc/toolbar/info-exit-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/info-exit-dn.xbm [new file with mode: 0644]
etc/toolbar/info-exit-up.xbm [new file with mode: 0644]
etc/toolbar/info-exit-up.xpm [new file with mode: 0644]
etc/toolbar/info-exit-xx.xbm [new file with mode: 0644]
etc/toolbar/info-exit-xx.xpm [new file with mode: 0644]
etc/toolbar/info-exit.xbm [new file with mode: 0644]
etc/toolbar/info-exit.xpm [new file with mode: 0644]
etc/toolbar/info-next-cap-up.xpm [new file with mode: 0644]
etc/toolbar/info-next-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/info-next-dn.xbm [new file with mode: 0644]
etc/toolbar/info-next-up.xbm [new file with mode: 0644]
etc/toolbar/info-next-up.xpm [new file with mode: 0644]
etc/toolbar/info-next-xx.xbm [new file with mode: 0644]
etc/toolbar/info-next-xx.xpm [new file with mode: 0644]
etc/toolbar/info-next.xbm [new file with mode: 0644]
etc/toolbar/info-next.xpm [new file with mode: 0644]
etc/toolbar/info-prev-cap-up.xpm [new file with mode: 0644]
etc/toolbar/info-prev-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/info-prev-dn.xbm [new file with mode: 0644]
etc/toolbar/info-prev-up.xbm [new file with mode: 0644]
etc/toolbar/info-prev-up.xpm [new file with mode: 0644]
etc/toolbar/info-prev-xx.xbm [new file with mode: 0644]
etc/toolbar/info-prev-xx.xpm [new file with mode: 0644]
etc/toolbar/info-prev.xbm [new file with mode: 0644]
etc/toolbar/info-prev.xpm [new file with mode: 0644]
etc/toolbar/info-up-cap-up.xpm [new file with mode: 0644]
etc/toolbar/info-up-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/info-up-dn.xbm [new file with mode: 0644]
etc/toolbar/info-up-up.xbm [new file with mode: 0644]
etc/toolbar/info-up-up.xpm [new file with mode: 0644]
etc/toolbar/info-up-xx.xbm [new file with mode: 0644]
etc/toolbar/info-up-xx.xpm [new file with mode: 0644]
etc/toolbar/info-up.xbm [new file with mode: 0644]
etc/toolbar/info-up.xpm [new file with mode: 0644]
etc/toolbar/last-win-cap-up.xpm [new file with mode: 0644]
etc/toolbar/last-win-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/last-win-dn.xbm [new file with mode: 0644]
etc/toolbar/last-win-up.xbm [new file with mode: 0644]
etc/toolbar/last-win-up.xpm [new file with mode: 0644]
etc/toolbar/last-win-xx.xbm [new file with mode: 0644]
etc/toolbar/last-win-xx.xpm [new file with mode: 0644]
etc/toolbar/mail-cap-up.xpm [new file with mode: 0644]
etc/toolbar/mail-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/mail-dn.xbm [new file with mode: 0644]
etc/toolbar/mail-up.xbm [new file with mode: 0644]
etc/toolbar/mail-up.xpm [new file with mode: 0644]
etc/toolbar/mail-xx.xbm [new file with mode: 0644]
etc/toolbar/mail-xx.xpm [new file with mode: 0644]
etc/toolbar/news-cap-up.xpm [new file with mode: 0644]
etc/toolbar/news-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/news-dn.xbm [new file with mode: 0644]
etc/toolbar/news-up.xbm [new file with mode: 0644]
etc/toolbar/news-up.xpm [new file with mode: 0644]
etc/toolbar/news-xx.xbm [new file with mode: 0644]
etc/toolbar/news-xx.xpm [new file with mode: 0644]
etc/toolbar/next-win-cap-up.xpm [new file with mode: 0644]
etc/toolbar/next-win-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/next-win-dn.xbm [new file with mode: 0644]
etc/toolbar/next-win-up.xbm [new file with mode: 0644]
etc/toolbar/next-win-up.xpm [new file with mode: 0644]
etc/toolbar/next-win-xx.xbm [new file with mode: 0644]
etc/toolbar/next-win-xx.xpm [new file with mode: 0644]
etc/toolbar/paste-cap-up.xpm [new file with mode: 0644]
etc/toolbar/paste-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/paste-dn.xbm [new file with mode: 0644]
etc/toolbar/paste-up.xbm [new file with mode: 0644]
etc/toolbar/paste-up.xpm [new file with mode: 0644]
etc/toolbar/paste-xx.xbm [new file with mode: 0644]
etc/toolbar/paste-xx.xpm [new file with mode: 0644]
etc/toolbar/printer-cap-up.xpm [new file with mode: 0644]
etc/toolbar/printer-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/printer-dn.xbm [new file with mode: 0644]
etc/toolbar/printer-up.xbm [new file with mode: 0644]
etc/toolbar/printer-up.xpm [new file with mode: 0644]
etc/toolbar/printer-xx.xbm [new file with mode: 0644]
etc/toolbar/printer-xx.xpm [new file with mode: 0644]
etc/toolbar/replace-cap-up.xpm [new file with mode: 0644]
etc/toolbar/replace-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/replace-dn.xbm [new file with mode: 0644]
etc/toolbar/replace-up.xbm [new file with mode: 0644]
etc/toolbar/replace-up.xpm [new file with mode: 0644]
etc/toolbar/replace-xx.xbm [new file with mode: 0644]
etc/toolbar/replace-xx.xpm [new file with mode: 0644]
etc/toolbar/spell-cap-up.xpm [new file with mode: 0644]
etc/toolbar/spell-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/spell-dn.xbm [new file with mode: 0644]
etc/toolbar/spell-up.xbm [new file with mode: 0644]
etc/toolbar/spell-up.xpm [new file with mode: 0644]
etc/toolbar/spell-xx.xbm [new file with mode: 0644]
etc/toolbar/spell-xx.xpm [new file with mode: 0644]
etc/toolbar/undo-cap-up.xpm [new file with mode: 0644]
etc/toolbar/undo-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/undo-dn.xbm [new file with mode: 0644]
etc/toolbar/undo-up.xbm [new file with mode: 0644]
etc/toolbar/undo-up.xpm [new file with mode: 0644]
etc/toolbar/undo-xx.xbm [new file with mode: 0644]
etc/toolbar/undo-xx.xpm [new file with mode: 0644]
etc/toolbar/workshop-cap-up.xpm [new file with mode: 0644]
etc/toolbar/workshop-cap-xx.xpm [new file with mode: 0644]
etc/toolbar/workshop-up.xpm [new file with mode: 0644]
etc/toolbar/workshop-xx.xpm [new file with mode: 0644]
etc/trash.xpm [new file with mode: 0644]
etc/xemacs-beta.xpm [new file with mode: 0644]
etc/xemacs-enhanced.png [new file with mode: 0644]
etc/xemacs-fe.sh [new file with mode: 0755]
etc/xemacs-icon.xpm [new file with mode: 0644]
etc/xemacs-icon2.xbm [new file with mode: 0644]
etc/xemacs-icon2.xpm [new file with mode: 0644]
etc/xemacs-icon3.xpm [new file with mode: 0644]
etc/xemacs-ja.1 [new file with mode: 0644]
etc/xemacs.1 [new file with mode: 0644]
etc/xemacs.xbm [new file with mode: 0644]
etc/xemacs.xpm [new file with mode: 0644]
info/dir [new file with mode: 0644]
install.sh [new file with mode: 0755]
lib-src/ChangeLog [new file with mode: 0644]
lib-src/Makefile.in.in [new file with mode: 0644]
lib-src/README [new file with mode: 0644]
lib-src/ad2c [new file with mode: 0755]
lib-src/add-big-package.sh [new file with mode: 0755]
lib-src/b2m.c [new file with mode: 0644]
lib-src/config.values.in [new file with mode: 0644]
lib-src/config.values.sh [new file with mode: 0644]
lib-src/cvtmail.c [new file with mode: 0644]
lib-src/digest-doc.c [new file with mode: 0644]
lib-src/ellcc.c [new file with mode: 0644]
lib-src/ellcc.h.in [new file with mode: 0644]
lib-src/emacs.csh [new file with mode: 0644]
lib-src/etags.c [new file with mode: 0644]
lib-src/fakemail.c [new file with mode: 0644]
lib-src/getopt.c [new file with mode: 0644]
lib-src/getopt.h [new file with mode: 0644]
lib-src/getopt1.c [new file with mode: 0644]
lib-src/gnuattach [new file with mode: 0755]
lib-src/gnuclient.c [new file with mode: 0644]
lib-src/gnudepend.pl [new file with mode: 0755]
lib-src/gnudoit [new file with mode: 0755]
lib-src/gnuserv.c [new file with mode: 0644]
lib-src/gnuserv.h [new file with mode: 0644]
lib-src/gnuslib.c [new file with mode: 0644]
lib-src/gzip-el.sh [new file with mode: 0755]
lib-src/hexl.c [new file with mode: 0644]
lib-src/installexe.sh [new file with mode: 0644]
lib-src/leditcfns.c [new file with mode: 0644]
lib-src/make-docfile.c [new file with mode: 0644]
lib-src/make-msgfile.c [new file with mode: 0644]
lib-src/make-msgfile.lex [new file with mode: 0644]
lib-src/make-path.c [new file with mode: 0644]
lib-src/make-po.c [new file with mode: 0644]
lib-src/mmencode.c [new file with mode: 0644]
lib-src/movemail.c [new file with mode: 0644]
lib-src/ootags.c [new file with mode: 0644]
lib-src/pop.c [new file with mode: 0644]
lib-src/pop.h [new file with mode: 0644]
lib-src/profile.c [new file with mode: 0644]
lib-src/pstogif [new file with mode: 0755]
lib-src/qsort.c [new file with mode: 0644]
lib-src/rcs-checkin [new file with mode: 0755]
lib-src/rcs2log [new file with mode: 0755]
lib-src/run.c [new file with mode: 0644]
lib-src/sorted-doc.c [new file with mode: 0644]
lib-src/srcdir-symlink.stamp [new file with mode: 0644]
lib-src/tcp.c [new file with mode: 0644]
lib-src/update-autoloads.sh [new file with mode: 0644]
lib-src/update-custom.sh [new file with mode: 0755]
lib-src/update-elc.sh [new file with mode: 0644]
lib-src/vcdiff [new file with mode: 0755]
lib-src/wakeup.c [new file with mode: 0644]
lib-src/yow.c [new file with mode: 0644]
lisp/ChangeLog [new file with mode: 0644]
lisp/ChangeLog.1 [new file with mode: 0644]
lisp/README [new file with mode: 0644]
lisp/abbrev.el [new file with mode: 0644]
lisp/about.el [new file with mode: 0644]
lisp/alist.el [new file with mode: 0644]
lisp/apropos.el [new file with mode: 0644]
lisp/auto-autoloads.el [new file with mode: 0644]
lisp/auto-save.el [new file with mode: 0644]
lisp/auto-show.el [new file with mode: 0644]
lisp/autoload.el [new file with mode: 0644]
lisp/backquote.el [new file with mode: 0644]
lisp/blessmail.el [new file with mode: 0644]
lisp/buff-menu.el [new file with mode: 0644]
lisp/buffer.el [new file with mode: 0644]
lisp/build-report.el [new file with mode: 0644]
lisp/byte-optimize.el [new file with mode: 0644]
lisp/bytecomp-runtime.el [new file with mode: 0644]
lisp/bytecomp.el [new file with mode: 0644]
lisp/callers-of-rpt.el [new file with mode: 0644]
lisp/check-features.el [new file with mode: 0644]
lisp/cl-compat.el [new file with mode: 0644]
lisp/cl-extra.el [new file with mode: 0644]
lisp/cl-macs.el [new file with mode: 0644]
lisp/cl-seq.el [new file with mode: 0644]
lisp/cl.el [new file with mode: 0644]
lisp/cmdloop.el [new file with mode: 0644]
lisp/code-files.el [new file with mode: 0644]
lisp/code-process.el [new file with mode: 0644]
lisp/coding.el [new file with mode: 0644]
lisp/config.el [new file with mode: 0644]
lisp/console.el [new file with mode: 0644]
lisp/cus-dep.el [new file with mode: 0644]
lisp/cus-edit.el [new file with mode: 0644]
lisp/cus-face.el [new file with mode: 0644]
lisp/cus-load.el [new file with mode: 0644]
lisp/cus-start.el [new file with mode: 0644]
lisp/custom-load.el [new file with mode: 0644]
lisp/custom.el [new file with mode: 0644]
lisp/derived.el [new file with mode: 0644]
lisp/device.el [new file with mode: 0644]
lisp/dialog.el [new file with mode: 0644]
lisp/disass.el [new file with mode: 0644]
lisp/disp-table.el [new file with mode: 0644]
lisp/dragdrop.el [new file with mode: 0644]
lisp/dump-paths.el [new file with mode: 0644]
lisp/dumped-lisp.el [new file with mode: 0644]
lisp/easymenu.el [new file with mode: 0644]
lisp/etags.el [new file with mode: 0644]
lisp/events.el [new file with mode: 0644]
lisp/extents.el [new file with mode: 0644]
lisp/faces.el [new file with mode: 0644]
lisp/files-nomule.el [new file with mode: 0644]
lisp/files.el [new file with mode: 0644]
lisp/fill.el [new file with mode: 0644]
lisp/find-paths.el [new file with mode: 0644]
lisp/finder.el [new file with mode: 0644]
lisp/float-sup.el [new file with mode: 0644]
lisp/font-lock.el [new file with mode: 0644]
lisp/font.el [new file with mode: 0644]
lisp/fontl-hooks.el [new file with mode: 0644]
lisp/format.el [new file with mode: 0644]
lisp/frame.el [new file with mode: 0644]
lisp/glyphs.el [new file with mode: 0644]
lisp/gnuserv.el [new file with mode: 0644]
lisp/gui.el [new file with mode: 0644]
lisp/help-macro.el [new file with mode: 0644]
lisp/help-nomule.el [new file with mode: 0644]
lisp/help.el [new file with mode: 0644]
lisp/hyper-apropos.el [new file with mode: 0644]
lisp/indent.el [new file with mode: 0644]
lisp/info.el [new file with mode: 0644]
lisp/isearch-mode.el [new file with mode: 0644]
lisp/itimer-autosave.el [new file with mode: 0644]
lisp/itimer.el [new file with mode: 0644]
lisp/keydefs.el [new file with mode: 0644]
lisp/keymap.el [new file with mode: 0644]
lisp/ldap.el [new file with mode: 0644]
lisp/lib-complete.el [new file with mode: 0644]
lisp/lisp-mnt.el [new file with mode: 0644]
lisp/lisp-mode.el [new file with mode: 0644]
lisp/lisp.el [new file with mode: 0644]
lisp/list-mode.el [new file with mode: 0644]
lisp/loaddefs.el [new file with mode: 0644]
lisp/loadhist.el [new file with mode: 0644]
lisp/loadup-el.el [new file with mode: 0644]
lisp/loadup.el [new file with mode: 0644]
lisp/make-docfile.el [new file with mode: 0644]
lisp/map-ynp.el [new file with mode: 0644]
lisp/menubar.el [new file with mode: 0644]
move-if-change [new file with mode: 0755]
version.sh [new file with mode: 0644]

diff --git a/BUGS b/BUGS
new file mode 100644 (file)
index 0000000..5ec5508
--- /dev/null
+++ b/BUGS
@@ -0,0 +1,25 @@
+If you think you may have found a bug in XEmacs, please
+read the Bugs section of the XEmacs manual for advice on
+(1) how to tell when to report a bug, and
+(2) how to write a useful bug report and what information
+it needs to have.
+
+There are three ways to read the Bugs section.
+
+(1) In a printed copy of the XEmacs manual.
+
+(2) With Info.  Start XEmacs, do C-h i to enter Info,
+then m XEmacs RET to get to the Emacs manual, then m Bugs RET
+to get to the section on bugs.  Or use standalone Info in
+a like manner.  (Standalone Info is part of the Texinfo distribution,
+not part of the XEmacs distribution.)
+
+(3) By hand.  Do
+    cat info/xemacs* | more "+/^File: xemacs.info,  Node: Bugs,"
+
+
+Part II of the XEmacs FAQ, available in a manner similar to the above,
+or via the world wide web, contains extensive information on how to
+track down and report bugs.
+
+       http://www.xemacs.org/faq/
diff --git a/CHANGES-beta b/CHANGES-beta
new file mode 100644 (file)
index 0000000..530bc55
--- /dev/null
@@ -0,0 +1,7 @@
+                                                       -*- indented-text -*-
+to 21.2 beta1 "Aeolus"
+-- Synch with 21.0-pre6
+-- Removal of ancient obsolete symbols courtesy of Altrasoft
+-- Fix version numbers
+
+Fork at 21.0 pre5 "Zhong Wei"
diff --git a/COPYING b/COPYING
new file mode 100644 (file)
index 0000000..1942c43
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,341 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                          59 Temple Place - Suite 330
+                          Boston, MA 02111-1307, USA.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+\f
+           How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) 19yy  <name of author>
+
+    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 2 of the License, 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; see the file COPYING.  If not, write to
+    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+    Boston, MA 02111-1307, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) 19yy name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644 (file)
index 0000000..2671250
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,3098 @@
+1998-07-19  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 21.2-beta1 is released.
+
+1998-07-18  SL Baur  <steve@altair.xemacs.org>
+
+       * config.guess: Synched with latest FSF version.
+
+1998-07-12  Björn Torkelsson  <torkel@hpc2n.umu.se>
+
+       * Makefile.in: added LDFLAGS. 
+
+1998-07-12  SL Baur  <steve@altair.xemacs.org>
+
+       * etc/GOATS: Removed.
+
+       * README: Bump version numbers.
+       * info/dir: Ditto.
+       * etc/README: Ditto.
+       * etc/NEWS: Ditto and purge pre-21.0 stuff.
+       * version.sh: Ditto.
+
+       * XEmacs 21.0-pre5 is released.
+
+1998-07-10  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (with_offix): Default --with-offix to off.
+
+1998-07-09  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in: Handle multiple database libraries.
+       From Gregory Neil Shapiro <gshapiro@sendmail.org>
+
+       * XEmacs 21.0-pre4 is released.
+
+       * configure.in: Fix test for InfoDock sources.
+
+       * etc/BETA (writing): Update patch creation instructions.
+
+       * etc/FTP: Update FTP mirror list.
+
+       * etc/DISTRIB: Remove duplicated FTP mirror list.
+       * etc/xemacs.1 (ftp): Ditto.
+
+1998-07-09  Oliver Graf <ograf@fga.de>
+
+       * configure.usage: added warning to --with-offix
+
+1998-06-29  SL Baur  <steve@altair.xemacs.org>
+
+       * etc/gnuserv.1 (this): Email address for Ben Wing is ben@xemacs.org.
+       * etc/gnuserv.README (README): Ditto.
+       * etc/xemacs-ja.1: Ditto.
+
+1998-06-28  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in: Berkeley DB autodetection fixes
+       From Martin Buchholz <martin@xemacs.org>
+
+       * etc/BABYL: Moved to rmail package
+
+       * etc/enriched.doc: Moved to xemacs-base package
+
+       * etc/MSDOS:
+       * etc/GNUS-NEWS: deleted
+
+1998-06-21  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * etc/NEWS: Added references to documentation about packages and
+       path setup.
+
+       * etc/README: Synched.
+
+1998-06-19  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 21.0-pre3 is released.
+
+1998-06-20  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * etc/PACKAGES: 
+       * etc/BETA: Moved some package stuff into Texinfo docs.  Other nitpicks
+
+1998-06-20  Kazuyuki IENAGA <ienaga@jsys.co.jp>
+
+       * configure.in: Added check if the berkdb has db_open or not.
+       (With fixes from Martin Buchholz)
+
+1998-06-19  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 21.0-pre2 is released.
+
+1998-06-18  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * configure.in: Added -lC for static linking under AIX 4.2.
+
+1998-06-14  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 21.0-pre1 is released.
+
+1998-06-14  Oscar Figueiredo  <Oscar.Figueiredo@di.epfl.ch>
+
+       * etc/NEWS: Updated information about customization of the
+       automatic info dir file generation using
+       `Info-auto-generate-directory' and `Info-save-auto-generated-dir'
+
+1998-06-11  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 21.0-beta43 is released.
+
+1998-06-04  Oliver Graf <ograf@fga.de>
+
+       * tests/Dnd/README: a step-by-step test run
+       * tests/Dnd/droptest.el: some clarifications
+       * tests/Dnd/droptest.sh: created, creates test files
+
+1998-06-01  Oliver Graf <ograf@fga.de>
+
+       * configure.in (summary): added experimental to dragndrop option
+       * configure.usage: added experimental note to --with-dragndrop
+       * tests/Dnd/droptest.el: extra start-drag-region function
+       changed the experimental- stuff
+
+1998-06-02  Andy Piper  <andyp@parallax.co.uk>
+
+       * etc/check_cygwin_setup.sh: set more intelligent defaults for
+       windows 95.
+
+1998-06-07  SL Baur  <steve@altair.xemacs.org>
+
+       * lwlib/xlwmenu.c: Add room for the 0 byte sentinel.
+
+1998-06-05  Colin Rafferty   <colin@xemacs.org>
+
+       * lwlib/xlwmenu.c: Made newchars be as large as it needs to be.
+
+1998-06-01  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 21.0-beta42 is released.
+
+       * etc/sounds: Removed, now in the sounds-au package.
+
+1998-05-29  Andy Piper  <andyp@parallax.co.uk>
+
+       * configure.in: don't use -O3 for cygwin.
+
+       * etc/check_cygwin_setup.sh: new file to check that cygwin is setup
+       correctly for XEmacs operation.
+
+1998-05-28  P. E. Jareth Hein  <jareth@camelot-soft.com>
+
+       * configure.in: Switch from giflib to gifreader for
+       our GIF image support (no other mods needed)
+
+1998-05-28  Oliver Graf  <ograf@fga.de>
+
+       * configure.in: only one DnD protocol, CDE has priority over OffiX
+
+       * tests/Dnd/README: some changes reflecting recent modifications
+       * tests/Dnd/dragtest.el: removed
+       * tests/Dnd/droptest.el: cosmetics and comments
+
+1998-05-26  Oliver Graf  <ograf@fga.de>
+
+       * tests/Dnd/droptest.el: adapted to CDE extensions
+
+1998-05-25  Hans Guenter Weigand  <hgweigand@wiesbaden.netsurf.de>
+
+       * configure.in:
+       * config.sub: add initial OpenBSD support
+
+1998-05-21  Andy Piper  <andyp@parallax.co.uk>
+
+       * configure.in: check for msw dialogs.
+
+1998-05-23  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 21.0-beta41 is released.
+
+1998-05-17  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (CPP): Change -O2 to -O3.
+       Suggested by Martin Buchholz <martin@xemacs.org>
+
+1998-05-15  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 21.0-beta40 is released.
+
+1998-05-13  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (ZSH_VERSION): zsh-3.1.2 (and zsh-3.0.4) drops core
+       on the `unset CDPATH' if running as sh.
+
+1998-05-12  Oliver Graf <ograf@fga.de>
+
+       * tests/Dnd/droptest.el: some CDE adaptions (untested)
+
+1998-05-11  Martin Buchholz  <martin@xemacs.org>
+
+       * configure.in:
+       Add some more comments.
+       If using bash, use Posix mode and unset CDPATH.
+       Be more careful checking feature dependencies.
+       Introduce XE_CHECK_FEATURE_DEPENDENCY.
+       Undo the gross hack of multiple `echo >> $tempcname'
+       by using here documents instead.  (Might break mswindows, tho...)
+       Be more careful autodetecting tooltalk.
+
+       * PROBLEMS:
+       Document problems with Solaris 2.6 + XSUNTRANSPORT
+
+       * Makefile.in: 
+       * lwlib/Makefile.in.in:
+       * modules/Makefile.in:
+       - Adjust for luser's CDPATH being set to something weird.
+       - Take into account bash 2.02's tendency to print the cwd when
+         using CDPATH.  Always use `cd ./foo' instead of `cd foo'.
+       - fix the run-temacs target to use $(DUMPENV)
+       - fix the run-puremacs target to use $(DUMPENV)
+       - fix the `depend' target to properly $(RM) the right files
+       - Generate a better TAGS file for XEmacs' lisp code using
+         hand-crafted regexps.
+       - Use standard coding conventions for modules/Makefile.in
+
+1998-05-12  Kazuyuki IENAGA <ienaga@jsys.co.jp>
+
+       * configure.in: some people claimed that they can't stop
+       linking wnn6 library if they set --with-wnn6=no.
+
+1998-05-11  Oliver Graf <ograf@fga.de>
+
+       * tests/Dnd/droptest.el: adapted to new calling conventions
+       also showing the new possibilities
+       * tests/Dnd/README: changed to new protocol
+
+1998-05-11  SAKIYAMA Nobuo <nobuo@db3.so-net.or.jp>
+
+       * Fix for HAVE_MULTICAST check.
+
+1998-05-09  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 21.0-beta39 is released.
+
+1998-05-06  Oliver Graf <ograf@fga.de>
+
+       * configure.in: added autodetection for the Drag'n'Drop API
+       if some DnD protocol is found, HAVE_DRAGNDROP will be defined
+       and dragdrop.o is added to extra_objs
+       * configure.usage: added with-dragndrop, added (*) to with-offix
+       * tests/Dnd/droptest.el: complete overhaul, no it's a real test
+
+1998-05-04  Oliver Graf <ograf@fga.de>
+
+       * tests/Dnd/droptest.el: changed to test new protocol
+       * tests/Dnd/README.OffiX: removed
+       * tests/Dnd/README: created, info about new protocol
+       * tests/Dnd/dragtest.el: comment change
+
+1998-05-07  SL Baur  <steve@altair.xemacs.org>
+
+       * etc/altrasoft-logo.xpm: Removed.
+
+1998-05-02  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 21.0-beta38 is released.
+
+1998-04-29  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in: Use `PROGNAME' for all generated paths.
+
+       * Makefile.in: Change `progname' to `PROGNAME' for consistency.
+
+1998-04-27  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (progname): Parameterize program name on `progname' 
+       and add --with-infodock.
+
+1998-04-26  SL Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in: Religiously use ${progname} instead of hardcoded
+       `xemacs'.
+       CPPFLAGS was being set correctly in ${subdir}/Makefiles and
+       overridden by the empty one set in the toplevel Makefile.
+
+1998-04-26  Jason R Mastaler  <jason@4b.org>
+
+       * etc/BETA: Replaced SmartList references in favor of
+       Majordomo.
+
+1998-04-25  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs-21.0-beta37 is released.
+
+1998-04-25  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * configure.in: Sychronized ..._USER_DEFINED variables with
+       datadir setting.
+
+       * Makefile.in (mkdir): No longer create sitelispdir.
+
+Sat Apr 24 1998  Andy Piper  <andyp@parallax.co.uk>
+
+       * configure.in: make graphic libraries tests be dependant on a
+       window system not X11 only.
+
+Fri Apr 24 19:38:19 1998  Andy Piper  <andyp@parallax.co.uk>
+
+       * configure.in: check for our special select in msw.
+
+1998-04-22  Marcus Thiessel  <marcus_thiessel@hp.com>
+
+       * PROBLEMS: add answers to some FAQ concerning hpux.
+
+Wed Apr 22 12:59:35 1998  Andy Piper  <andyp@parallax.co.uk>
+
+       * configure.in: enable checking for special mswindows select()
+
+1998-04-21  Martin Buchholz  <martin@xemacs.org>
+
+       * configure.in: Isolate incomprehensible cma_open/pthreads checking
+       to decosf*
+
+1998-04-21  Marcus Thiessel  <marcus_thiessel@hp.com>
+
+       * configure.in: /usr/{include,lib}/Motif2.1 added to search path for X11
+       libs and includes.
+
+1998-04-22  Itay Ben-Yaacov  <pezz@www-mail.huji.ac.il>
+
+       * configure.in: check for xpm does not depend anymore on having X.
+       if libXpm exists, and is of the FOR_MSW flavor, define FOR_MSW.
+
+1998-04-19  Oscar Figueiredo  <Oscar.Figueiredo@di.epfl.ch>
+
+       * etc/NEWS: Documented info dir rebuilding and LDAP support.
+
+       * info/dir: Fixed the explanatory notes for
+       `Info-default-directory-list' removal and the new automatic dir
+       rebuilding facility.  Reindented the menu.  Added an entry for
+       term.info 
+
+1998-04-20  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (LISPDIR): Removed configuration option for
+       site-lisp.
+
+1998-04-19  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (version): snarf InfoDock version number.
+
+1998-04-18  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs-21.0-beta36 is released.
+
+Fri Apr 17 12:59:35 1998  Andy Piper  <andyp@parallax.co.uk>
+
+       * configure.in: enable install pre-processing for mswindows
+
+Fri Apr 17 12:59:35 1998  Andy Piper  <andyp@parallax.co.uk>
+       
+       * Makefile.in.in: add install_pp to install incantation.
+
+       * installexe.sh: new file. Add .exe to install targets if the
+       result is executable.
+
+Fri Apr 17 12:59:35 1998  Andy Piper  <andyp@parallax.co.uk>
+       
+       * Makefile.in: add install_pp to install incantation.
+
+1998-04-14  Itay Ben-Yaacov <pezz@www-mail.huji.ac.il>
+
+       * configure.in: Large echo split into a few smaller ones,
+       so the cygnus sh.exe does not crash.
+
+Thu Apr 16 12:59:35 1998  Andy Piper  <andyp@parallax.co.uk>
+
+       * configure.in: enable toolbar checking for mswindows build
+
+1998-04-06  Martin Buchholz  <martin@xemacs.org>
+
+       * config.h.in: Add _SVID_SOURCE to list of xmkmf #defines.  
+       Used (at least) by RedHat 4.2.
+
+1998-04-11  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * etc/xemacs.1: -no-packages -> -no-early-packages.
+
+       * etc/NEWS: Clarified site-lisp status.
+
+       * configure.in: Re-instated src/paths.h generation from
+       src/paths.h.in.
+
+       * Makefile.in (top_distclean): Remove site-lisp on `make
+       distclean'.
+
+1998-04-10  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 21.0-beta35 is released.
+
+1998-04-10  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * etc/NEWS: Documented that Info-default-directory-list and
+       site-directory are gone.
+
+       * configure.usage: Clarified --package-path documentation.
+
+1998-04-07  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * configure.in: Now generates src/paths.h from src/paths.h.in.in.
+       Removed defaults for infopath and package-path.
+
+       * Makefile.in (src/paths.h): ... is now generated from
+       src/paths.h.in.in.  Moved generation of paths.h to configure.
+
+       * paths.h.in: Removed.
+
+       * paths.h.in.in: Created.
+
+1998-04-06  Martin Buchholz  <martin@xemacs.org>
+
+       * configure.in: png was still being used if png_version < 0.96
+
+       * configure.in: Fixed magic to handle AIX, X11R6, and gcc.
+
+1998-04-05  Amir J. Katz  <amir@ndsoft.com>
+
+       * INSTALL (Rationale): Offix support comment is wrong. To disable,
+       one must use --with-offix=no and not --without-offix
+
+1998-04-05  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (CPP): ppc.ldscript sits in $srcdir/src not $srcdir.
+
+1998-04-04  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 21.0-beta34 is released.
+
+1998-04-03  Martin Buchholz  <martin@xemacs.org>
+
+       * configure.in:
+       checking whether gettimeofday accepts one or two arguments... two
+
+1998-04-03  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * configure.in: Fixed magic to handle AIX and MIT X11R6.
+
+1998-04-02  Martin Buchholz  <martin@xemacs.org>
+
+       * configure.in: Add magic -T $srcdir/ppc.ldscript on Linux powerpc
+
+1998-04-01  Martin Buchholz  <martin@xemacs.org>
+
+       * tests/database.el (test-database): Temporary files (the databases
+       that were created) should be deleted.
+
+       * Makefile.in (testdir): Remove gnumake-specific syntax.
+       (src/Makefile): src/Makefile depends on src/depend.
+
+1998-03-29  Martin Buchholz  <martin@xemacs.org>
+
+       * configure.in: Check for -lz, -lgz unconditionally.  Too many
+       system linkers don't properly die when there are cascaded link
+       dependencies, so we can't rely on the linker for that.  The only
+       downside is that we might link with an extra unneeded library.  If 
+       you really really care about this, you can go fix it.
+
+       * configure.in: Enhance PANIC msg to make it clear that
+       --with-FEATURE is going to die if FEATURE is not installed.
+
+1998-03-27  Martin Buchholz  <martin@xemacs.org>
+
+       * configure.in: $debug was not properly dependent on $beta
+       
+       * configure.in: Move offix configuration out of src/Makefile.in.in 
+       into configure.in.
+
+       * configure.in: Reorganize xpm detection code.
+
+       * configure.in: XIM default to ON if Motif which is not Lesstif is 
+       found.
+
+       * configure.in: Keep auto-generated makefile dependencies out of
+       src/Makefile.in.in by using AC_OUTPUT file concatenation support.
+
+1998-03-26  Martin Buchholz  <martin@xemacs.org>
+
+       * configure.in: Fix up cflags handling.  Specifically, configure
+       --cflags='' would fail to be recognized.
+
+       * configure.in: Fix up png detection.  Link with png_read_image to
+       make sure -lz is required.  Test for png >- 0.96 via header file.
+
+1998-03-21  Martin Buchholz  <martin@xemacs.org>
+
+       * configure.in (XE_GCC_WRAP_LDFLAGS)
+       Rename to XE_PROTECT_LINKER_FLAGS.  Rewrite.
+
+       * configure.in: Make sure BSD always links in libz.a
+       BSD's stupid linker can't detect cascaded lib dependencies
+
+       * configure.in: Autodetect lesstif.  define have_lesstif.
+       Don't use motif-xim with lesstif, at least by default.
+
+1998-03-30  SL Baur  <steve@altair.xemacs.org>
+
+       * version.sh: Add InfoDock version number variables.
+
+1998-03-30  Amir J. Katz  <amir@ndsoft.com>
+
+       * info/dir: Replaced string '20.5' with '21.0'
+
+1998-03-24  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 21.0-beta33 is released.
+
+1998-03-26  Didier Verna <verna@inf.enst.fr>
+
+       * configure.in, Makefile.in: Removed infopath_user_defined---we
+       always want to propagate it.
+
+       * configure.usage: Synched with configure.in.
+
+1998-03-25  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * configure.usage, INSTALL: Synched with the new path layout.
+
+       * Makefile.in (src/paths.h): Replaced packagepath with
+       package_path to make configure happy.
+
+       * configure.in: Made default setting for packagepath conform to
+       what packages.el builds at run-time: XEmacs-version-specific paths
+       before site-specific ones.
+       Added default setting for pkgdir.
+       Changed --packagepath back to --package-path.
+
+1998-03-24  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 21.0-beta32 is released.
+
+1998-03-23  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * configure.in: Extended package path by version-specific
+       hierarchies.  Changed allow-site-lisp to inhibit-site-lisp.
+
+1998-03-22  SL Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in (distclean): Remove packages and mule-packages if they
+       have been linked into place.
+
+1998-03-22  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * <Today>: The Big Path Searching Overhaul.
+
+       * Makefile.in, configure.in: Now pass all configure-specified paths
+       into the binary in a uniform way.
+
+1998-03-20  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (have_libmcheck): Add test for glibc's malloc
+       checker.
+       - Fix HP/UX dynamic linking flag.
+
+1998-03-19  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (quoted_arguments): Fix unquoted variable in
+       error-checking test.
+       - fix bogus substitution.
+       
+1998-03-17  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in: In -lpng test, look for png_set_strip_alpha.
+       Suggested by William M. Perry <wmperry@aventail.com>
+
+1998-03-16  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 21.0 beta31 is released.
+
+1998-03-16  P. E. Jareth Hein  <jareth@camelot-soft.com>
+
+       * configure.usage (Usage): Correct information about gif, tiff
+       and WNN entries
+
+1998-03-13  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in: typo fix in sed command.
+       From P. E. Jareth Hein <jareth@camelot-soft.com>
+
+       * configure.in (all_widgets): Check for snprintf().
+
+1998-03-11  P. E. Jareth Hein  <jareth@camelot-soft.com>
+
+       * configure.in: New gif support
+
+1998-03-10  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (have_glibc): Don't define _GNU_SOURCE for glibc.
+
+Mon Mar 09 13:00:55 1998  Andy Piper  <andyp@parallax.co.uk>
+
+       * configure.in: don't add libc to link list for dlopen ordinary
+       link takes care of this. check for dlfcn.h
+
+1998-03-10  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in: Examine each directory of X11 include path for
+       inclusion into BITMAPDIR.
+
+1998-03-09  SL Baur  <steve@altair.xemacs.org>
+
+       * aclocal.m4: Add legalese.
+
+Mon Mar 09 13:00:55 1998  Andy Piper  <andyp@parallax.co.uk>
+
+       * configure.in: make sure we have ndbm.h as well as libgdbm.a for
+       database support.
+
+       * configure.in: move msw checking after x checking so that
+       auto-detection works.
+
+1998-03-09  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in: New DLL support.
+       * aclocal.m4: New file.
+       From William M. Perry <wmperry@aventail.com>
+
+1998-03-08  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (xemacs_betaname): Align messages for minimal
+       tagbits and indexed lrecords.
+       Suggested by Andreas Jaeger <aj@arthur.rhein-neckar.de>
+
+1998-03-09  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * etc/Emacs.ad: Example using leading dot resources to
+         initalize faces changes to use Emacs.foo since the
+         leading dot syntax doesn't work.  Initialization of
+         text-cursor face moved to faces.el.
+
+1998-03-07  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta30 is released.
+
+1998-03-05  SL Baur  <steve@altair.xemacs.org>
+
+       * PROBLEMS: Update wording of x86 GCC 2.7 problems.
+
+Wed Mar 04 08:55:12 1998  Andy Piper  <andyp@parallax.co.uk>
+
+       * configure.in: add a --with-msw option. Make X and msw work
+       together if the user asks.
+
+1998-03-02  SL Baur  <steve@altair.xemacs.org>
+
+       * PROBLEMS: Update documentation of gcc bugs that impact XEmacs.
+
+1998-03-01  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in: Add substitutable variable ld_dynamic_link_flags
+       for special required linker flags for building DLL capable
+       binaries.
+
+       * etc/Emacs.ad: Remove explicit `Emacs' application resource
+       name.
+
+1998-02-28  SL Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in (top_distclean): Remove Installation.el.
+       (xemacs): New target.  Formerly it was `all:'.
+       (all): New default, dist: is now superfluous.
+
+1998-02-27  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (GNU_MALLOC): add --with-dlmalloc to allow
+       selective use of Doug Lea malloc in Linux C Library and GNU C Library.
+       (Installation): Add XEmacs version and generate `Installation.el'.
+
+1998-02-26  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (with_ldap: Fix -lldap autodection.
+       Suggested by Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
+       (Installation): Only keep the last configuration.
+
+1998-02-25  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta28 is released.
+
+       * configure.in (with_session): Fix reporting of the setting.
+       (with_database_gnudbm): Correctly report setting.
+
+1998-02-24  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.usage: Restore documentation of graphics library
+       flags.
+       From Karl M. Hegbloom <karlheg@bittersweet.inetarena.com>
+
+1998-02-19  Karl M. Hegbloom  <karlheg@bittersweet.inetarena.com>
+
+       * PROBLEMS: Tell of the `gpm' SIGTSTP bug and `C-z' on the Linux
+       console.
+
+1998-02-23  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.4 is released to the beta testers.
+
+1998-02-21  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (after_morecore_hook_exists): Modify dlmalloc tests 
+       to also test for Linux libc5.
+
+1998-02-19  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta27 is released.
+       * XEmacs-20.4-pre4 is released.
+
+       * configure.in (doug_lea_malloc): Requires USE_MINIMAL_TAGBITS.
+       (--with-gung): Implement it.
+
+       * configure.usage (--with-gung): Document.  Turns on
+       USE_MINIMAL_TAGBITS and USE_INDEXED_LRECORD_IMPLEMENTATION.
+       (--with-term): Remove.
+       
+       * XEmacs-20.5-beta26 is released.
+
+1998-02-18  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs-20.4-pre3 is released.
+
+       * Makefile.in: use better feedback while rebuilding finder database.
+       Suggested by Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
+
+1998-02-15  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (doug_lea_malloc): Add checking for Doug Lea
+       Malloc.
+
+1998-02-14  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (OFFIX_O): Don't use OffiX if no real Xmu support.
+       Suggested by Pekka Marjola <pema@iki.fi>
+
+       * XEmacs-20.4-pre2 is released.
+       * XEmacs-20.5-beta25 is released.
+
+1998-02-13  SL Baur  <steve@altair.xemacs.org>
+
+       * INSTALL: Update for Cygwin and Microsoft Windows.
+
+       * README: Update for Microsoft Windows.
+
+1998-02-09  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.4-pre1 is released.
+       * XEmacs 20.5-beta24 is released.
+
+Wed Jan 28 13:41:22 1998  Andy Piper  <andyp@parallax.co.uk>
+
+       * configure.in: add mule-coding target which defines MULE_CODING,
+       nothing uses it as yet. add gif objects to msw support. define
+       const_is_losing=no for msw. make msw not selected if tty selected.
+       add -lshell32 for dnd support. check for a.out.h rather than
+       coff.h
+
+       * lib-src/make-docfile.c: add cygwin support and generalise the
+       remaining open calls. IMHO this should really include sysfile.h.
+
+1998-02-03  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta23 is released.
+
+1998-02-01  SL Baur  <steve@altair.xemacs.org>
+
+       * etc/aliases.ksh: igrep from the shell command line.
+       From Karl M. Hegbloom <karlheg@bittersweet.inetarena.com>
+
+1998-01-31  SL Baur  <steve@altair.xemacs.org>
+
+       * etc/aliases.ksh: Add `mak' function to create beta.err for
+       build-report.
+       From Adrian Aichner <aichner@ecf.teradyne.com>
+       Suggested by Karl M. Hegbloom <karlheg@bittersweet.inetarena.com>
+
+1998-01-27  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta22 is released.
+
+1998-01-26  SL Baur  <steve@altair.xemacs.org>
+
+       * etc/aliases.ksh: New file.  Start tracking useful Maintainer
+       XEmacs commands.
+
+1998-01-25  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta21 is released.
+
+Wed Jan 21 10:49:47 1998  Andy Piper  <andyp@parallax.co.uk>
+
+       * configure.in: check for coff.h
+
+1998-01-21  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * configure.in: Added support for `--with-shlib'.
+
+1998-01-18  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta20 is released.
+
+1998-01-13  Martin Buchholz  <martin@xemacs.org>
+
+       * configure.usage:  
+       * etc/NEWS:  
+       Remove doc for configure-time INFOPATH, no longer used.
+
+       * etc/BETA: Update ftp addresses.
+       * etc/INSTALL: Update ftp addresses.
+       * etc/MAILINGLISTS: Sync with Emacs 20.2. Update ftp addresses.
+
+       * configure.in:
+       * src/config.h.in:
+       Define HAVE_INVERSE_HYPERBOLIC using 1 configure test, not 3.
+
+       * lwlib/lwlib.h: 
+       * lwlib/lwlib.c: 
+       * lwlib/lwlib-config.c: 
+       * lwlib/lwlib-Xm.c: 
+       * lwlib/lwlib-Xaw.c: 
+       * lwlib/lwlib-Xlw.c: 
+       * lwlib/config.h.in: 
+       * src/menubar-x.c:
+       Prepend LWLIB_ to (SCROLLBARS|MENUBARS|DIALOGS)_(MOTIF|LUCID|ATHENA).
+       Maintain only one set of variables.
+
+       * etc/xemacs.1: Update author list.
+
+       * Makefile.in (install-arch-dep): Simplify.
+       Replace construct  `test -d $dir && foo'  with  
+       `if test -d $dir; then foo; fi'
+
+       * lwlib/xlwmenu.c: 
+       * lwlib/xlwscrollbar.c: 
+       * lwlib/lwlib-Xlw.c: 
+       * lwlib/lwlib-Xm.c: 
+       Always assume presence of limits.h (ANSI).
+
+1998-01-12  SL Baur  <steve@altair.xemacs.org>
+
+       * INSTALL: Updated for recent Mule/package changes.
+
+       * XEmacs 20.5-beta19 is released.
+
+1998-01-12  Damon Lipparelli  <lipp@primus.com>
+
+       * Makefile.in: Yow!  Fixed paths to install dirs when --prefix !=
+       --exec-prefix.
+
+1998-01-10  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta18 is released.
+
+       * etc/FTP: Update address of what was formerly ftp.ibp.fr.
+
+1998-01-08  Didier Verna  <verna@inf.enst.fr>
+
+       * configure.in: Get rid of INFOPATH for configure time.
+       * configure.usage (Usage): Ditto.
+
+1998-01-09  SL Baur  <steve@altair.xemacs.org>
+
+       * Makefine.in: Correct reported amount of disk savings from
+       compression.
+       From Markus Linnala <maage@cs.tut.fi>
+
+Thu Jan 08 09:42:36 1998    <andyp@parallax.co.uk>
+
+       * configure.in: detect and set scrollbars and menubars with
+       MS-Windows more appropriately. Check for sys/un.h to use in
+       gnuserv.
+
+1998-01-07  SL Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in (progname): Cleanly parameterize XEmacs-specific
+       naming.
+
+1998-01-05  Glynn Clements  <glynn@sensei.co.uk>
+
+       * lwlib/xlwmenu.c (push_button_draw): use inactive_gc instead of
+       inactive_button_gc for menu entries.
+       (remap_menubar): ignore the enabled status
+
+1998-01-04  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta17 is released.
+
+       * Makefile.in (finder): Use -vanilla.
+       (lisp/finder-inf.el): Ditto.
+       (check-features): New target.  Do a sanity check prior to
+       installation.
+
+1997-01-03  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta16 is released.
+
+1997-12-30  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta15 is released.
+
+1997-12-29  SL Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in (${SUBDIR}): Remove bogus .RECURSIVE dependency.
+
+1997-12-27  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta14 is released.
+
+1997-12-23  Andy Piper <andyp@parallax.co.uk>
+
+       * configure.in: support for *-pc-cygwin32 config
+
+1997-12-25  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta13 is released.
+
+1997-12-21  SL Baur  <steve@altair.xemacs.org>
+
+       * etc/BETA (Prerequisite): Add cookbook procedures for maintaining 
+       package lisp directories.
+
+1997-12-20  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta 12 is released.
+
+1997-12-19  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (bitmapdir): Reenable --with-session by default for 
+       testing.
+
+1997-12-18  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * etc/Emacs.ad: Don't specify a default toolbar specific
+         background color.
+
+1997-12-18  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * etc/toolbar: Added support for foregroundToolBarColor
+         symbol to most icons. 
+
+1997-12-17  SL Baur  <steve@altair.xemacs.org>
+
+       * info/dir (File): Skk and Gnats are packaged.
+
+       * PROBLEMS (Note): Update version numbers.
+
+       * etc/BETA: Update version numbers.
+
+       * etc/NEWS: Update version number.
+
+       * info/dir (File): Update version number.
+
+1997-12-16  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta11 is released.
+
+1997-12-14  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in: Don't bypass graphics library detection
+       if the `--with-imagick' option is given to configure.
+       : Print autodetected graphics libraries to be linked with Imagick.
+
+       * Makefile.in (lisp/finder-inf.el): Reverse previous change.
+
+1997-12-14  Olivier Galibert  <olivier.galibert@mines.u-nancy.fr>
+
+       * Makefile.in (install-arch-indep): Build info files if needed.
+
+1997-12-13  SL Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in (lisp/finder-inf.el): Add dependency on src/.
+
+       * XEmacs 20.5-beta10 is released.
+
+1997-12-12  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (CPP): Don't add special CFLAGS for ix86/Linux.
+
+1997-12-10  Karl M. Hegbloom  <karlheg@bittersweet.inetarena.com>
+
+       * configure.in (autodetect ImageMagick): also look for
+       "X11/magick/magick.h", and if present, define
+       MAGICK_HEADERS_ARE_UNDER_X11
+
+1997-12-11  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (imagick_libs): Add autodetection for freetype
+       -lttf library.
+
+1997-12-09  SL Baur <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta9 is released.
+
+1997-12-06  SL Baur <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta8 is released.
+
+       * info/dir: update for further packaging.
+       * configure.in: remove `tree-x' from XEmacs build.
+
+1997-11-29  Jeff Miller <jmiller@smart.net>
+
+       * configure.in:  motif menubars need xlwmenu.o
+
+       * updated files in src/ to allow an XEmacs configured for
+         motif menubars to at least compile.  Motif menubars are still
+         very broken.
+
+1997-12-05  Aki Vehtari  <Aki.Vehtari@hut.fi>
+
+       * etc/refcard.tex: Updated for 20.3
+
+1997-12-02  P E Jareth Hein  <jareth@camelot-soft.com>
+
+       * lwlib/xlwscrollbar.c: fixed colormap/visual handling to work
+       properly with the information in the core.
+
+       * lwlib/xlwmenu.c: fixed colormap/visual handling to work properly with
+       the information in the core, and fixed a potental problem with
+       parentage.
+
+1997-12-02  SL Baur  <steve@altair.xemacs.org>
+
+       * etc/skk/SKK.tut.E (Hint): Fix typos.
+
+1997-12-01  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (with_session): Properly display flag in configure
+       status report.
+
+1997-11-29  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.usage: Remove documentation of obsolete option
+       --with-gif.
+
+1997-11-27  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta7 is released.
+
+       * configure.in: When testing for -ltiff, fall back on the extra
+       libraries -ljpeg, and -lz since some -ltiff's need them.
+
+1997-11-26  SL Baur  <steve@altair.xemacs.org>
+
+       * lwlib/xlwmenu.c (display_menu): Defer incremental menus properly.
+       From Glynn Clements <glynn@sensei.co.uk>
+
+1997-11-25  Kazuyuki IENAGA <ienaga@jsys.co.jp>
+
+       * configure.in: Improve auto detect of libraries ImageMagick rely
+       on.
+
+1997-11-23  Jeff Miller <jmiller@smart.net>
+
+       * Energize is dead.  Removed ENERGIZE ifdef's from code in lwlib
+         and src.  Configure.in modified.  --with-energize is no longer a
+         valid configure option.
+
+       * lwlib/Makefile.in.in  removed energize support
+       * lwlib/lwlib-Xm.c      removed energize support
+       * lwlib/lwlib-config.c  removed energize support
+
+       * lwlib/energize/*      removed
+
+1997-11-23  SL Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in: Change references of lisp/utils/finder-inf.el to
+       lisp/finder-inf.el.
+
+1997-11-20  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta6 is released.
+
+1997-11-21  Stephen Turnbull  <turnbull@sk.tsukuba.ac.jp>
+
+       * configure.usage: Use `--' convention in "usage:" line.
+
+1997-11-20  Stephen Turnbull <turnbull@sk.tsukuba.ac.jp>
+
+       * configure.in: added `with_xfs' to list of boolean features.
+
+1997-11-20  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3 is released for binary kit building.
+
+1997-11-19  Tor Arntsen <tor@spacetec.no>
+
+       * PROBLEMS: Removed IRIX entry about xemacs core dumps when using
+       xemacs dumped on one machine on another. Problem was fixed by 20.3.
+
+1997-11-19  SL Baur  <steve@altair.xemacs.org>
+
+       * etc/xemacs.1: Document -no-packages, -vanilla.
+       Document -h.
+
+1997-11-18  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.usage: New file.
+
+       * configure.in: Use it instead of monster 10k shell variable.
+
+1997-11-17  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-pre4 is released.
+
+1997-11-17  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * configure.in (infopath): List "/usr/local/" dirs before "/usr/"
+       dirs.
+
+1997-11-17  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in: Initialize infodir off of datadir.
+
+       * Makefile.in: Force LANG = C for building.
+
+1997-11-15  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-pre3 is released.
+       * XEmacs 20.5-beta5 is released.
+
+1997-11-13  Marc Paquette <marcpa@cam.org>
+
+       * nt/Todo: added a task for support of lisp packages through
+       the registry.
+
+1997-11-13  Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+       * Renamed files *w32* to *msw*
+
+       * Changed 'w32' and 'win32' to 'mswindows', and HAVE_W32GUI to
+         HAVE_MS_WINDOWS. Changed files:
+         cus-edit.el, device.el, faces.el, frame.el, msw-faces.el,
+         msw.init.el, igrep.el, dumped-lisp.el, font.el, hippie-exp.el,
+         sysdep.el, console-msw.c, console-msw.h, console.c,
+         device-msw.c, emacs.c, event-msw.c, event-msw.h, event-stream.c,
+         events.c, events.h, faces.c, frame-msw.c, frame.c, general.c,
+         msw-proc.c, objects-msw.c, objects-msw.h, redisplay-msw.c,
+         redisplay.c, symsinit.h, 
+
+       * Didn't change 'win32' in nt.c, nt.h, ntproc.c
+
+       * Deleted w32 build directory since nt build directory now handles
+         X and native mswindows builds.
+
+1997-11-11  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta4 is released.
+
+1997-11-10  SL Baur  <steve@altair.xemacs.org>
+
+       * info/dir: remove packaged entries.
+       From Glynn Clements <glynn@sensei.co.uk>
+
+       * configure.in: Puke and die if NAS sound is selected without X.
+
+1997-11-08  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta3 is released.
+       * XEmacs 20.3-pre2 is released.
+
+Wed November 05 23:40:00 1997 <jhar@tardis.ed.ac.uk>
+
+       * w32/xemacs.mak: moved building the DOC file to after the .elcs.
+
+Sun November 01 12:00:00 1997 <jhar@tardis.ed.ac.uk>
+
+       * Files split from nt to new w32 directory:
+         ChangeLog, README, Todo, paths.h, config.h, inc/*, runemacs.c,
+         xemacs.mak.
+
+1997-11-05  Didier Verna  <verna@inf.enst.fr>
+
+       * configure.in: Added the --site-prefixes options for the configure
+       script. You give a colon or space separated list of prefixes, and 
+       subdirectories include/ and lib/ will be added with -I and -L.
+
+1997-11-05  Martin Buchholz  <Martin Buchholz <martin@xemacs.org>>
+
+       * configure.in: AIX + gcc fixes.
+         - Don't wrap -B. aixflags changed to start_flags.
+
+1997-11-04  SL Baur  <steve@altair.xemacs.org>
+
+       * lwlib/lwlib-Xm.c(update_one_menu_entry): Add missing variable.
+       From Skip Montanaro <skip@calendar.com>
+
+1997-11-04  Adrian Aichner  <aichner@ecf.teradyne.com>
+
+       * etc/TUTORIAL.de:
+       Updated copyright information. Translated most of the COPYING
+       section. Translated the <<.*>> didactic line.
+
+1997-10-22  Adrian Aichner  <aichner@ecf.teradyne.com>
+
+       * etc/TUTORIAL.de: Fixed two issues reported by
+       Achim Oppelt <aoppelt@theorie3.physik.uni-erlangen.de>
+
+       * etc/TUTORIAL.de:
+       Manually applied rejected patch hunks from Marc Aurel's patch.
+       Some more fixes.
+
+       * etc/TUTORIAL.de:
+       Applied patches supplied by Marc Aurel <4-tea-2@bong.saar.de>.
+       They fix yet more typos and quite a few awkward sentences.
+
+1997-10-21  Adrian Aichner  <aichner@ecf.teradyne.com>
+
+       * etc/TUTORIAL.de: Manually merged a few more corrections by
+       Carsten Leonhardt <leo@arioch.oche.de>
+
+1997-10-20  Adrian Aichner  <aichner@ecf.teradyne.com>
+
+       * etc/TUTORIAL.de:
+       Applied patches from Andreas Jaeger <aj@arthur.rhein-neckar.de> to 1.2,
+       then merged them with 1.3 via ediff-buffers.
+       Andreas found some quite nasty typos still and added many missing commas.
+
+       * etc/TUTORIAL.de: Re-fill-ed paragraphs after patching.
+
+       * etc/TUTORIAL.de: Applied the excellent patches courtesy of
+       Carsten Leonhardt <leo@arioch.oche.de>.
+
+1997-11-03  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * Delete etc/TUTORIAL.th because Thai is not supported yet.
+
+1997-11-02  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * etc/TUTORIAL.ko: Renamed from etc/TUTORIAL.kr to fit with ISO
+       639 (two letter language code).
+
+       * etc/TUTORIAL.ja: Renamed from etc/TUTORIAL.jp to fit with ISO
+       639 (two letter language code).
+
+1997-11-02  SL Baur  <steve@altair.xemacs.org>
+
+       * etc/CHARSETS:  New file imported from Emacs 20.1.
+
+1997-11-02  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * lwlib/lwlib-Xaw.c (xaw_pop_instance): Don't use parent
+         window's coordinates and dimensions to center the
+         dialog box unless its mapped_when_managed property is
+         true.  This should avoid the top level widget that the
+         HAVE_SESSION code creates, which is unmapped and
+         useless for this purpose.
+
+1997-11-01  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-pre1 is released.
+
+1997-10-31  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 19.16 is released.
+
+1997-10-31  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta2 is released.
+
+1997-10-30  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (xetest): Eliminate tests for PNG, JPEG,
+       TIFF(broken) and replace with test for ImageMagick.
+
+1997-10-30  Kyle Jones  <kyle_jones@wonderworks.com>
+       
+       * etc/Emacs.ad: Added *XlwMenu*highlightForeground entry.
+         Added *XlwMenu*titleForeground entry.
+
+       * lwlib/xlwmenu.h: Added string macro declarations for
+         titleForeground and highlightForeground properties.
+
+       * lwlib/xlwmenuP.h: Added struct fields for title and
+         highlight colors.
+
+       * lwlib/xlwmenu.c: Added initialization and usage code
+         for the new titleForeground and highlightForeground
+         properties.
+
+1997-10-29  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * etc/HELLO: Add Czech.
+
+       * etc/HELLO: Delete Amharic, Thai and Tigrigna.
+
+1997-10-28  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta94 is released.
+
+1997-10-28  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+       * configure.in: Correct last patch for berkdb.
+
+1997-10-28  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta93 is released.
+
+1997-10-27  Martin Buchholz  <mrb@eng.sun.com>
+
+       * lib-src/make-path.c:
+       * lib-src/digest-doc.c:
+       * lib-src/gnuslib.c: Always include config.h before system headers
+       * configure.in: Improve AIX configure support
+         - NON_GNU_CC defaults to `xlc'
+         - CFLAGS defaults to "-O3 -qstrict  -qlibansi -qinfo -qro 
+           -qmaxmem=20000"
+         - check for sin instead of sqrt in -lm to avoid xlc internal error
+         - Detect -li18n for use with Motif
+         - Move weird AIX static linking flags from s&m files to configure.in
+         - use #pragma instead of -ma flag to avoid compiler warnings
+
+1997-10-25  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * lwlib/xlwmenu.c: Use XtRDimension in place of
+         XmRHorizontalDimension in shadowThickness resource
+         declaration.
+
+       * lwlib/xlwmenu.c (label_button_draw): Use the button_gc
+         color as the foreground for selected entries.
+
+       * lwlib/xlwmenu.c (push_button_draw): Use the button_gc
+         color as the foreground for selected entries.
+
+       * lwlib/xlwmenu.c (toggle_decoration_height): Force
+         height to be minimum of 2x the shadow thickness.
+
+1997-10-24  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+       * configure.in: Don't choke on Berkeley DB 2.x.
+
+1997-10-24  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta92 is released.
+
+1997-10-21  SL Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in (lisp/utils/finder-inf.el): Don't force rebuild if
+       it already exists (use `make finder' to force rebuild).
+
+1997-10-18  SL Baur  <steve@altair.xemacs.org>
+
+        * XEmacs 20.3-beta91 is released. 
+
+1997-10-16  Hrvoje Niksic <hniksic@srce.hr>
+
+       * etc/NEWS:  document changed package load semantics.
+
+1997-10-15  Olivier Galibert  <olivier.galibert@mines.u-nancy.fr>
+
+       * configure.in: Removed -Olimit=2000 from cc for IRIX.
+
+1997-10-12  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * configure.in (null_string): Added AC_SUBST(infodir_user_defined)
+       and removed backquoted echo statement from the infopath report line.
+
+1997-10-15  Olivier Galibert  <olivier.galibert@mines.u-nancy.fr>
+
+       * configure.in: Added detection of the declaration of the timezone
+       variable in system files. Defines HAVE_TIMEZONE_DECL if yes.
+
+
+1997-10-15  Olivier Galibert  <olivier.galibert@mines.u-nancy.fr>
+
+       * config.h.in: Add HAVE_TIMEZONE_DECL for detection of declaration
+       of the timezone variable in system headers.
+
+       * systime.h: Use HAVE_TIMEZONE_DECL.
+
+1997-10-14  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in (all_widgets): Don't allow configuration of
+       --with-mule if Mule lisp hasn't been installed.
+
+1997-10-13  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in: Remove `site-lisp' from list of directories to
+       make symbolic links for.
+
+       * XEmacs 20.3-beta90 is released.
+
+1997-10-12  Glynn Clements  <glynn@sensei.co.uk>
+
+       * info/dir: Cosmetic changes to info/dir
+
+1997-10-13  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * etc/NEWS: Updates
+
+1997-10-12  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.5-beta1 is released.
+
+       * XEmacs 19.16-pre9 is released.
+
+       * XEmacs 19.16-pre8 is released.
+
+1997-10-11  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta28 is released.
+
+       * Makefile.in (src/paths.h): Update PATH_INFOPATH
+       (infopath): New shell variable.
+       (infopath_user_defined): Ditto.
+
+       * configure.in (infodir_user_defined): Spelling fixes.
+
+1997-10-10  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * configure.in: added options and option help docs for infopath
+       and lockdir
+       * '' added a line to the report for infopath and lockdir
+
+       * etc/NEWS: Draft entry for the info changes.
+
+1997-10-10  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * Makefile.in.in (INFOPATH): Added variable and put it into
+       DUMPENV.
+
+1997-10-11  SL Baur  <steve@altair.xemacs.org>
+
+       * packages/info/localdir: New directory and file.
+
+       * packages/README: New directory & file.
+
+1997-10-10  Martin Buchholz  <mrb@eng.sun.com>
+
+       * Makefile.in: Add `make configure' target
+
+       * etc/BETA: 
+         - remove Chuck as contact name
+         - random small improvements
+         - remove I/me references - the message should be that XEmacs
+           maintenance is an inclusive community effort.
+
+1997-10-10  SL Baur  <steve@altair.xemacs.org>
+
+       * etc/BETA (Prerequisite): Add further documentation for
+       package installation.
+
+1997-10-07  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 19.16-pre7 is released.
+
+1997-10-05  Damon Lipparelli  <lipp@aa.net>
+
+       * Makefile.in (install-arch-dep, install-arch-indep): Move the
+       commands for symlink'ing the system-independent bits into the
+       system-dependent directory structure from "install-arch-indep" to
+       "install-arch-dep".
+
+1997-10-06  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * Makefile.in (blddir): variable from "configure".
+       (finder): use it.
+
+1997-10-05  SL Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in (GENERATED_LISP): New variable.
+       (all): Force dependency on finder-inf.el.
+       (lisp/utils/finder-inf.el): new rule.
+
+1997-10-04  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 19.16-pre6 is released.
+
+1997-10-04  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta27 is released.
+
+1997-10-03  Damon Lipparelli  <lipp@primus.com>
+
+       * Makefile.in (install-arch-indep): When --prefix !=
+       --exec-prefix, symlink the system-independent bits into the
+       system-dependent directory structure (rather than the other way
+       around).
+
+1997-10-03  Martin Buchholz  <mrb@eng.sun.com>
+
+       * lib-src/etags.c:  etags 12.28 + prototypization
+       * INSTALL:  Better document --site-runtime-libraries 
+       * src/scrollbar-x.c (x_update_scrollbar_instance_status): 
+         FIX: M-x scroll-left; horizontal scrollbar appears; drag it
+         left; scrollbar disappears; keyboard inoperative.
+       * configure.in:  Remove left-over references to *_switch_x_*
+         - NAS libaudio is part of $libs_x, not $LIBS
+
+1997-10-02  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta26 is released.
+
+1997-09-30  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta25 is released.
+
+       * Makefile.in (install-arch-dep): Install the `Installation' for
+       future reference.
+
+       * etc/BETA: Document existence of `Installation' file.
+       - Document requirement of rebuilding finder-inf.el when building
+       from the full tarball.
+       
+       * Makefile.in (top_distclean): Remove finder-inf.el*.
+
+       * configure.in (use_union_type): Default to "yes".
+
+1997-09-29  Martin Buchholz  <mrb@eng.sun.com>
+
+       * configure.in:  Add tiff autodetection
+
+1997-09-29  SL Baur  <steve@altair.xemacs.org>
+
+       * lwlib/xlwmenu.c: Add bounds checking.
+       Check error return on XmStringGetLtoR.
+
+1997-09-27  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta24 is released.
+
+1997-09-27  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * Makefile.in (custom-loads): New target.
+
+1997-09-24  SL Baur  <steve@altair.xemacs.org>
+
+       * etc/BETA (XEmacs 20.3 packages): Added explanation of package
+       hierarchy.
+
+1997-09-23  SL Baur  <steve@altair.xemacs.org>
+
+       * lwlib/xlwmenu.c: Fix compilation problem with USE_XFONTSET.
+       From Kazuyuki IENAGA <ienaga@jsys.co.jp>
+
+1997-09-22  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 19.16-pre4 is released.
+
+1997-09-20  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta23 is released.
+
+1997-09-19  SL Baur <steve@altair.xemacs.org>
+
+       * XEmacs 19.16-pre3 is released.
+
+1997-09-18  Colin Rafferty  <craffert@ml.com>
+
+       * etc/NEWS: Various spelling corrections and some grammar
+                 corrections (which/that).
+
+1997-09-19  Martin Buchholz  <mrb@eng.sun.com>
+
+       * src/redisplay-tty.c: Fix crashes with non-7bit tty escape
+       sequences (needs more testing).
+       * */Makefile*: 
+       - Cleanup man/*/Makefile for consistency.
+       - use $(MAKEFINFO), $(TEXI2DVI), etc...
+       - Make combination --with-srcdir + Sun make work properly.
+       - Change construct: test -d $${dir} || mkdir $${dir} 
+          --> if test ! -d $${dir}; then mkdir $${dir}; fi
+       * lisp/x11/x-win-sun.el: Fix remaining glitches with
+       re-mappings of Sun function keys.
+       * configure.in: Detect libXaw AFTER libXpm to support libXawXpm.
+       * man/internals/internals.texi:  Fix makeinfo compilation error.
+
+1997-09-17  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta22 is released.
+
+1997-09-16  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta21 is released.
+
+       * XEmacs 19.16-pre2 is released.
+
+1997-09-13  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta20 is released.
+
+1997-09-11  Martin Buchholz  <mrb@eng.sun.com>
+
+       * configure.in: Use `PATH' for options that take multiple dirs.
+       - Fix test for $PWD == `pwd`
+       - Prefer autodetected X11R6 to X11 so that broken HP and Linux
+       systems can work.  (untested)
+
+       * lisp/cl/cl.el:  Fix `loop' indentation to be same as `defun'.
+       * lisp/prim/dumped-lisp.el:  cl-extra and cl-seq always end up
+       being autoloaded - let's make them part of the core.
+
+       * lisp/x11/x-compose.el:
+       * lisp/x11/x-init.el:
+       * lisp/x11/x-win-sun.el:
+       * lisp/x11/x-winxfree86.el:
+       * src/device-x.c:
+       * src/event-Xt.c:
+       - Yet another rewrite of key handling (not the last, though)
+       - x-keysym-on-keyboard-p is much faster.
+       - x-keysym-on-keyboard-sans-modifiers-p introduced.
+       - x-keysym-hashtable introduced.
+       - allow X11R4 libs to guess keysyms on X11R5 servers.
+       - A better workaround for the bug that some Xlibs generate 
+         Multi_key a adiaeresis when pressing Multi_key a "
+       
+       * src/dgif_lib.c: Make sure size_t is defined before using it.
+
+1997-09-12  SL Baur  <steve@altair.xemacs.org>
+
+       XEmacs 19.16-pre1 "Queens" is released.
+
+1997-09-08  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in: Reverse package-path.
+       From Colin Rafferty <craffert@ml.com>
+
+1997-09-02  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta19 is released.
+
+       * Makefile.in (finder): New target.
+
+1997-08-29  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 19.16-beta91 is released.
+
+1997-08-25  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * lisp/apel/emu-x20.el (mime-charset-coding-system-alist):
+       iso-2022-jp-2 is defined as coding-system.
+
+       * lisp/mule/mule-coding.el: Rename `iso-2022-ss2-{7|8}' ->
+       `iso-2022-{7|8}bit-ss2' to sync with Emacs 20.0.96.
+
+       (iso-2022-jp-2): New coding system.
+
+1997-08-23  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * lisp/prim/about.el (about-maintainer-glyph): Fix problem with
+       jka-compr.el.
+
+1997-08-20  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 19.16-beta90 is released.
+
+1997-08-16  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta18 is released.
+
+1997-08-11  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * etc/NEWS: add a section telling about the Info changes.
+
+1997-08-09  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta17 is released.
+
+1997-08-07  Jan Vroonhof  <vroonhof@math.ethz.ch>
+
+       * etc/gnuserv.1: Described Hrvoje's mods in manpage
+
+1997-08-09  Martin Buchholz  <mrb@eng.sun.com>
+
+       * configure.in:
+       - use-system-malloc renamed to with-system-malloc.
+       - config.el reimplemented for improved accuracy.
+       - new variable `blddir' introduced for informational purposes.
+       * lib-src/config.values.in: new config.el implementation
+       * lib-src/config.values.sh: new config.el implementation
+       * lisp/modes/pascal.el: Sync with GNU Emacs, fix infloop problem 
+       (thanks to Espen Skoglund, pascal.el maintainer)
+       * src/chartab.c: maintainability improvements.
+       * src/mule-coding.c: FIX for: editing DOS files with ISO2022*
+       coding systems results in extra CR's inserted into file on saving.
+
+1997-08-06  SL Baur  <steve@altair.xemacs.org>
+
+       * configure.in: Crash & burn if db-2 is detected.
+       From Soren Dayton <csdayton@cs.uchicago.edu>
+
+1997-07-31  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta16 is released.
+
+1997-07-31  Martin Buchholz  <mrb@eng.sun.com>
+
+       * configure.in: --with-x11=no --> --with-xface=no
+       * lisp/efs/dired-xemacs.el: Rationalize mouse file functions
+       * src/input-method-xlib.c: Allow xemacs to connect to kinput2
+       * event-Xt.c: Fix crashes when no input context available.
+       * src/mule-coding.c: Use enum eol_type instead of int consistently
+       * regex.c:  Use (void *) 0 instead of NULL in varargs function calls
+       * src/s/freebsd.h: Wrap #include X11/Xlocale.h inside #ifndef
+       NOT_C_CODE
+
+1997-07-27  SL Baur  <steve@altair.xemacs.org>
+
+       * etc/BETA: Update patching instructions.
+
+1997-07-26  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta15 is released.
+
+1997-07-25  SL Baur  <steve@altair.xemacs.org>
+
+       * lwlib/xlwscrollbar.c: Add debug malloc support.
+       * lwlib/xlwmenu.c: Ditto.
+       * lwlib/lwlib-utils.h: Ditto.
+
+       * configure.in (null_string): Add --use-debug-malloc option.
+
+1997-07-21  SL Baur  <steve@altair.xemacs.org>
+
+       * info/dir (Packages): Remove AUCTeX, Gnus and Message manuals.
+
+1997-07-20  SL Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in (install-arch-indep): Create required links when
+       prefixdir != execdir.
+
+1997-07-19  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta14 is released.
+
+1997-07-19  Martin Buchholz  <mrb@eng.sun.com>
+
+       * src/fns.c (require): Print messages when loading a file as a
+       result of require.
+       
+       * configure.in:
+       * lisp/utils/config.el:
+       * lib-src/config.values: 
+       - new file created and installed by building.
+       - Allow configuration time values to be queried by the lisp code.
+
+       * configure.in:
+       - check for alloca in libPW on hpux.
+       - Redo --with-clash-detection
+       - need to check for termios and friends even if with-tty=no.
+       - Always define SIGNALS_VIA_CHARACTERS if HAVE_TERMIOS
+       - better quoting for AIX_SMT_EXP (untested)
+       - gcc flags now default to "-g -O2 -Wall -Wno-switch"
+
+       * *.[ch]: more warning elimination
+
+       * src/input-method*.c:
+       * src/s/freebsd.h:
+       - remove freebsd ifdefs from C code.
+
+       * src/specifier.c:
+       - fix Fdisplay-table-specifier-p
+
+1997-07-13  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta13 is released.
+
+       * info/dir (Packages): Integrate texinfo manual for PH.
+
+1997-07-10  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * extents.c (print_extent): Print correctly.
+       
+1997-07-13  Steven L Baur  <steve@altair.xemacs.org>
+
+       * configure.in (CPP): Add -Wall to default gcc CFLAGS.
+
+1997-07-11  Martin Buchholz  <mrb@eng.sun.com>
+
+       * *Makefile*: More cleanup.
+       - MAKE CFLAGS=-foo now works with recursive invocations on old makes
+       - Nuke ld_call_shared from s&m files
+       - Nuke src/s/*-static.h
+       - Nuke Solaris and DEC OSF static build support.
+       - Nuke SHORTNAMES
+       - Nuke libmld
+       - CLASH_DETECTION configurable, off by default.
+
+       * *.[ch]: Warning elimination, code cleanup, some 64-bit
+       safeguarding.
+
+       * sol2.h: More bullet-proofing for Sun bugs in header files.
+
+       * lib-src/etags.c: etags version 12.19.
+
+       * lisp/x11/x-select.el:
+       * src/xselect.c: Try STRING if selection owner couldn't convert
+       COMPOUND_TEXT. 
+
+       * src/*.c: Change defalt to default_, and in general allow
+       doc-snarfing functions to recognize and ignore trailing `_'
+
+       * src/*.[ch]: Introduce XVECTOR_DATA and XVECTOR_LENGTH macros and 
+       convert source code to use them consistently.
+
+1997-07-08  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta12 is released.
+
+1997-07-08  Martin Buchholz  <mrb@eng.sun.com>
+
+       * configure.in: Set options differently, depending on beta-ness of 
+       build tree.
+       * *Makefile*: Clean up *clean: targets, esp. Steven's beloved
+       distclean.
+
+1997-07-08  Steven L Baur  <steve@altair.xemacs.org>
+
+       * pkg-src/tree-x/Makefile.in.in (xoobr): Pass CFLAGS to the
+       linker.
+       From Olivier Galibert <Olivier.Galibert@mines.u-nancy.fr>
+
+1997-07-07  Steven L Baur  <steve@altair.xemacs.org>
+
+       * pkg-src/tree-x/Makefile.in.in (distclean): Add target.
+
+1997-07-06  Steven L Baur  <steve@altair.xemacs.org>
+
+       * lwlib/lwlib-Xm.c (xm_update_one_value): Hand application of mrb
+       fix.  Restoration of lossage from beta10->beta11 upgrade.
+
+       * XEmacs 20.3-beta11 is released.
+
+1997-07-08  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * lisp/language/english.el: Add quail-british for British.
+
+       * lisp/language/european.el: Register input-method for various non
+       quail-latin-1 methods.
+
+1997-07-05  Martin Buchholz  <mrb@eng.sun.com>
+
+       * lib-src/getopt*.c: Don't redefine const - let configure do that.
+
+       * configure.in: Better behavior for `configure --with-gcc=no'
+       - Autodetect ulimit.h
+       - Remove broken SunOS4 kludge for libXmu
+       - Autodetect usleep
+
+       * src/s/sol2.h: Support gcc on various Solaris releases.
+       
+       * lib-src/*.c: Ansify prototypes.
+
+       * lisp/prim/files.el: Optimize auto-mode-alist.
+
+       * pkg-src/tree-x/Makefile.in.in: `make distclean' now works
+       - `make install' now works.
+       - dependencies updated.
+
+       * pkg-src/tree-x/*.[ch]: Fix compile warnings.
+       - Replace uses of XtVa* with non-varargs variants.
+
+1997-07-01  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * lisp/modes/image-mode.el: Add `image-maybe-restore' to
+       `change-major-mode-hook'.
+
+       * lisp/modes/image-mode.el (image-maybe-restore): New function.
+
+       * src/glyphs.c (make_string_from_file): must protect from
+       `format-alist'.
+
+1997-06-30  Steven L Baur  <steve@altair.xemacs.org>
+
+       * pkg-src/tree-x/Makefile.in.in (INSTALL): Add configure written
+       variable.
+
+1997-06-29  Steven L Baur  <steve@altair.xemacs.org>
+
+       * configure.in (CPP): Correct typo `print-lib-gcc-file-name'
+       should be `print-libgcc-file-name'
+       From Katsumi Yamaoka <yamaoka@ga.sony.co.jp>
+       
+       * XEmacs 20.3-beta10 is released.
+
+1997-06-29  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * lisp/language/chinese.el: Add chinese-isoir165 (CCITT Extended
+       GB).
+
+       * lisp/language/chinese.el: Modify charset DOC-strings for CNS
+       11643 to be more detailed.
+
+       * lisp/language/arabic.el: Rename `arabic-0', `arabic-1' and
+       `arabic-2' to `arabic-digit', `arabic-1-column' and
+       `arabic-2-column' to sync with Emacs/mule-19.34.94-zeta.
+
+       * src/mule-charset.c: Modify charset DOC-strings to be more
+       detailed.
+
+       Use BOX DRAWINGS characters of JIS X0208.
+
+1997-06-28  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * lisp/apel/richtext.el: Add autoload comments for
+       `richtext-encode' and `richtext-decode'.
+
+       * lisp/prim/format.el (format-alist): Add `text/richtext'.
+
+       * lisp/tl/chartblxmas.el: New file.
+
+       * lisp/x11/x-menubar.el (default-menubar): Add "Show character
+       table" for MULE menu.
+
+       * lisp/apel/emu.el: Check richtext.el is bundled.
+
+       * lisp/tl/char-table.el (view-charset): New command.
+
+       * lisp/tl/char-table.el: Rename some functions.
+
+       * lisp/packages/hexl.el (hexl-mode-exit): Run
+       `hexl-mode-exit-hook'.
+
+       * lisp/x11/x-menubar.el (default-menubar): Fix "Describe language
+       support" and "Set language environment" of mule menu.
+
+       * lisp/apel/file-detect.el: Add autoload comments for function
+       `add-path', `add-latest-path', `get-latest-path',
+       `file-installed-p', `exec-installed-p', `module-installed-p' and
+       variable `exec-suffix-list'.
+
+       * lisp/prim/format.el (format-alist): Add image/jpeg, image/gif,
+       image/png and image/x-xpm.
+
+       * lisp/modes/image-mode.el: New file.
+
+1997-06-27  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * lisp/tm/tm-ew-e.el (tm-eword::encode-string-1): avoid infinite
+       loop caused by long non-encoded-word element. (cf. [tm-en:1356])
+
+       (mime/field-encoding-method-alist): Add "Message-ID" as ignored.
+
+1997-06-25  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta9 is released.
+
+       * Makefile.in (dist): Make `make dist' work for me.
+
+1997-06-25  Martin Buchholz  <mrb@eng.sun.com>
+
+       * configure.in:
+       - Change "t" to tabs in sed commands
+       - Add /g to sed substitition commands when appropriate
+       - Change XtVa[SG]etValue to Xt[SG]etValue
+       - Make version variables into Lisp_Objects.
+
+1997-06-19  Martin Buchholz  <mrb@eng.sun.com>
+
+       * src/config.h.in:
+       * configure.in:
+       - Autodetect X defines using xmkmf.
+       - Compute rpath on *bsd* systems as well.
+       - rewrite PRINT_VAR m4 macro.
+       - detect sizes of void* and long long for future use by unex*.c
+       * regex.c: _GNU_SOURCE may be defined by config.h; don't redefine.
+
+1997-06-24  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * lisp/language/arabic.el: moved from lisp/mule/arabic-hooks.el.
+
+       * lisp/mh-e/mh-e.el (mh-get-new-mail): Decode output as
+       `mh-folder-coding-system'.
+
+1997-06-24  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * lisp/language/ethio-util.el: imported from
+       Emacs/mule-19.34.94-zeta.
+
+       * lisp/language/arabic-util.el: moved from lisp/mule/arabic.el;
+       repair Arabic characters.
+
+1997-06-24  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * lib-src/update-autoloads.sh: Search lisp/mule/.
+
+       * etc/HELLO: final byte for ethiopic was changed to sync with
+       Emacs/mule-19.34.94-zeta.
+
+       * lisp/x11/x-menubar.el: Fix "Describe language support" and "Set
+       language environment" of Mule menu.
+
+       * lisp/language/visual-mode.el: moved from mule/.
+
+       * lisp/language/ethiopic.el: Modify for XEmacs.
+
+       * lisp/language/cyrillic.el: Modify DOC-string of koi8-r; Fixed
+       problem of setting for `language-info-alist' about koi8-r.
+
+       * lisp/mule/auto-autoloads.el: Enable auto-autoloads.el for mule/.
+
+       * lisp/mule/mule-util.el: New file (imported from
+       Emacs/mule-19.34.94-zeta).
+
+       * lisp/mule/mule-misc.el: Function `truncate-string-to-width' was
+       moved to mule-util.el.
+
+       * lisp/prim/dumped-lisp.el, lisp/mule/mule-load.el:
+       lisp/mule/arabic-hooks.el was moved to lisp/language/arabic.el;
+       lisp/mule/arabic.el was moved to lisp/language/arabic-util.el; Use
+       lisp/language/ethiopic.el instead of lisp/mule/ethiopic-hooks.el;
+       Use lisp/language/ethio-util.el instead of lisp/mule/ethiopic.el.
+
+       * lisp/mule/mule-coding.el (coding-system-docstring): New alias to
+       emulate Emacs/mule-19.34.94-zeta function.
+
+       * lisp/mule/mule-cmds.el: modified to sync with
+       Emacs/mule-19.34.94-zeta (mule-prefix was changed to "C-x C-m")
+
+       (set-language-info): Add to "Describe Language Support" and "Set
+       Language Environment" menu.
+
+       * lisp/mule/mule-charset.el: Function `compose-region' and
+       `decompose-region' were moved to mule-util.el.
+
+       * lisp/leim/quail.el: modify to sync with latest quail.el of
+       Emacs/mule in ETL.
+
+       (quail-toggle-mode-temporarily): check `quail-conv-overlay'.
+
+       (quail-map-p): Use `characterp' instead of `integerp'.
+
+1997-06-23  Steven L Baur  <steve@altair.xemacs.org>
+
+       * etc/NEWS (Commands): Various updates by Hrvoje Niksic.
+
+1997-06-21  Steven L Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in: Missing FRC.info.
+       (install-arch-dep): Add missing backslash.
+       From Glynn Clements <glynn@sensei.co.uk>
+
+       * XEmacs 20.3-beta8 is released.
+
+1997-06-20  Olivier Galibert <Olivier.Galibert@mines.u-nancy.fr>
+
+       * lwlib/lwlib-Xaw.c, lwlib/lwlib-Xlw.c, lwlib/lwlib-Xm.c,
+       lwlib/lwlib.c:  Make 64 bit clean.
+       
+1997-06-20  Steven L Baur  <steve@altair.xemacs.org>
+
+       * etc/gnuserv.1: Updates and cleanup.
+       From Hrvoje Niksic <hniksic@srce.hr>
+
+1997-06-19  Martin Buchholz  <mrb@eng.sun.com>
+
+       * configure.in:
+       - Autodetect X defines using xmkmf.
+       - Compute rpath on *bsd* systems as well.
+       - rewrite PRINT_VAR m4 macro.
+       - detect sizes of void* and long long for future use by unex*.c
+
+1997-06-18  Martin Buchholz  <mrb@eng.sun.com>
+
+       * */Makefile.in.in: Another rewrite
+       Make makefiles immune from being mangled by various cpp
+       implementations by quoting non-preprocessor directive lines. 
+       - random cleanup
+       - Use $(RM) and $(pwd) macros consistently
+       - Add dependencies for balloon-help source files
+       - Use getcwd by default instead of getwd.
+       * lwlib/config.h:  Now includes src/config.h
+       * lwlib/*.c: Use config.h, but DON'T use Xos.h
+       * lib-src/*.c: Fix compiler warnings
+       * lisp/version.el:
+       - Put version information in version.sh instead of version.el
+
+Wed Jun 18 16:41:43 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * configure.in (CPP): Remove hardcoding of -L/usr/local/lib
+       -I/usr/local/include.
+
+1997-06-14  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta7 is released.
+
+1997-06-12  Steven L Baur  <steve@altair.xemacs.org>
+
+       * etc/TUTORIAL (things): Synched by Hrvoje Niksic with previous
+       XEmacs version.
+
+1997-06-13  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * lisp/gnus/smiley.el (smiley-deformed-regexp-alist): Modify
+       regexp for horizontal smiley faces.
+       (smiley-nosey-regexp-alist): Add horizontal smiley faces.
+
+       * lisp/leim/quail.el (quail-get-translation): Don't use
+       `string-to-vector' for XEmacs.
+
+1997-06-13  Gary D. Foster  <Gary.Foster@corp.Sun.COM>
+
+       * lisp/modes/*.el: Removed all "\177" bindings that were
+         previously commented out and normalized everything vis a vis
+         'backspace and 'delete keysyms.
+       * lisp/packages/*.el: Normalized all the "\177" bindings
+       * lisp/modes/cperl-mode.el: Created cperl-electric-delete function 
+         which is a "smart" version of the cperl-electric-backspace
+         function (it honors the desired delete direction).  Bound it to
+         'delete and the electric-backspace to 'backspace.
+       * lisp/packages/pending-del.el: Added cperl-electric-backspace and 
+         cperl-electric-delete to the 'supersede list.
+
+1997-06-11  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-b6 is released.
+
+       * configure.in (GNU_MALLOC): Check for (-l)PW instead of (-l)-lPW.
+       Suggested by Martin Buchholz  <mrb@eng.sun.com>
+
+1997-06-11  Martin Buchholz  <mrb@eng.sun.com>
+
+       * src/Makefile.in: 
+       * lwlib/Makefile.in: 
+       * lib-src/Makefile.in: 
+       * Makefile.in: More Makefile cleanup
+       - add .PHONY targets where necessary
+       - remove most builtin rules using .SUFFIXES
+       - -lXau only gets used for linking gnuserv binaries
+       - No VPATH for root Makefile
+       - remove gcc v1 support
+       * configure.in: 
+       - A new test to autodetect need to define NARROWPROTO,
+         needed by XFree86
+       - Consistently use idiom foo=`echo '' $foo | sed -s 's:^ ::' -e ...`
+       - Immediately exit if SIZEOF_* tests fail.
+       - Check for libPW
+       - Use more sophisticated Xpm test that confirms xpm.h and libXpm
+         are in sync.
+       * src/s/linux.h: 
+       * src/m/intel386.h: Yet another attempt to clean up linux defines.
+
+1997-06-10  Steven L Baur  <steve@altair.xemacs.org>
+
+       * lib-src/pop.c: Correct incantation for pop.h.
+       From Martin Buchholz <mrb@Eng.Sun.COM>
+
+Tue Jun 10 15:11:16 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * configure.in (beta): Correct test looking for Beta number.
+
+1997-06-11  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * src/Makefile.in.in, mule/language/misc-lang.el,
+       mule/mule-load.el, mule/ipa-hooks.el: Use
+       lisp/mule/language/misc-lang.el instead of lisp/mule/ipa-hooks.el;
+       mule/ipa-hooks.el was deleted.
+
+1997-06-10  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * Use lisp/mule/language/thai-util.el instead of
+       lisp/mule/thai.el.
+
+       * lisp/custom/wid-edit.el: Add widget `coding-system' for mule.
+
+       * lisp/mule/thai-hooks.el, lisp/mule/mule-load.el: Use
+       lisp/mule/language/thai.el instead of lisp/mule/thai-hooks.el.
+
+       * lisp/mule/language/thai.el: modified for XEmacs.
+
+1997-06-09  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * lisp/mule/mule-load.el, src/Makefile.in.in: Use
+       lisp/mule/language/chinese.el, lisp/mule/language/cyrillic.el,
+       lisp/mule/language/european.el, lisp/mule/language/greek.el,
+       lisp/mule/language/japanese.el and lisp/mule/language/korean.el
+       instead of lisp/mule/chinese-hooks.el,
+       lisp/mule/cyrillic-hooks.el, lisp/mule/european-hooks.el,
+       lisp/mule/greek-hooks.el, lisp/mule/japanese-hooks.el and
+       lisp/mule/korean-hooks.el.
+
+       * lisp/mule/language/*.el was imported from
+       Emacs/mule-19.34.94-zeta.
+
+       * Use lisp/mule/language/china-util.el instead of
+       lisp/mule/chinese.el.
+
+1997-06-08  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * lisp/apel/emu-x20.el (mime-charset-coding-system-alist):
+       iso-8859-1, hz-gb-2312, cn-gb-2312, gb2312, cn-big5 and koi8-r
+       were defined as coding-system.
+
+1997-06-08  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * etc/smilies/Face_smile.xbm, etc/smilies/Face_weep.xbm,
+       etc/smilies/Face_ase2.xbm, etc/smilies/Face_ase3.xbm,
+       etc/smilies/Face_ase.xbm: Add Japanese smiley faces.
+
+1997-06-07  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * lisp/gnus/smiley.el (smiley-deformed-regexp-alist): Add Japanese
+       smiley faces.
+
+1997-06-10  Gary D. Foster  <Gary.Foster@corp.sun.com>
+       
+       * lisp/modes/view-less.el: Changed \177 bindings to 'delete
+       * lisp/modes/help.el: Changed \177 bindings to 'delete
+
+1997-06-10  Gary D. Foster  <Gary.Foster@corp.sun.com>
+
+       * lisp/prim/keydefs.el: Changed all 'delete key bindings to point to
+         the `backward-or-forward-foo' functions.
+       * lisp/prim/simple.el:
+       - Renamed `delete-erases-forward' to `delete-key-deletes-forward'.
+       - Removed `backspace-or-delete-hook'
+       - Renamed `backspace-or-delete' to `backward-or-forward-delete-char'
+       - Added functions: `backward-or-forward-kill-word'
+        `backward-or-forward-kill-sentence'
+        `backward-or-forward-kill-sexp'
+       - Removed the zmacs hacks from all the `b-or-f-foo' functions and
+         began playing nicely with pending-del.
+       * lisp/modes/cc-mode.el:
+       * lisp/modes/cperl-mode.el: Fixed references to delete functions
+         to use the new names.
+       
+1997-06-09  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-b5 is released.
+
+1997-06-08  Steven L Baur  <steve@altair.xemacs.org>
+
+       * etc/NEWS: Updates for early beta20.3 stuffs.
+       From Hrvoje Niksic <hniksic@srce.hr>
+
+1997-06-05  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-b4 is released.
+
+1997-06-04  Martin Buchholz  <mrb@eng.sun.com>
+
+       * src/*/*.h: Remove definitions of HAVE_UNION_WAIT, in accordance
+       with new Autoconf 2 mechanisms.
+       * src/syswait.h:
+       * src/sysdep.c:
+       * src/process.c: Use only Posix.1 sys/wait.h-defined symbols
+
+       * src/s/netbsd.h: complete rewrite, use ORDINARY_LINK, #ifdef out
+       old cruft that can be obtained from system header files.
+       * lib-src/getopt*: Synch with FSF, remove compiler warnings.
+       
+       * lib-src/b2m.c: 
+       * src/gifalloc.c: 
+       * lib-src/gnuslib.c: 
+       * lib-src/profile.c: 
+       * lib-src/movemail.c: Fix compiler warnings
+       
+       * lib-src/Makefile.in.in: Remove unused -DCONFIG_BROKETS flag
+       - Fix up compile flags for new etags version
+
+       * etc/NEWS: 
+       * etc/etags.1: 
+       * man/xemacs/programs.texi: 
+       * lib-src/etags.c:  Upgraded to etags 12.11
+
+       * src/config.h.in: Fix inline keyword support
+       
+       * configure.in: Use a different mechanism for removing extra white 
+       space.  Avoid using foo=`echo $bar`, which loses with various echos.
+       - new M4 macro XE_SPACE(var, words...)
+       - Use autoconf 2's AC_HEADER_SYS_WAIT
+       - Check for Xpm-XpmFree instead of Xpm-XpmReadFileToData to avoid
+       linking with losing Xpm implementations
+       - Check for correct wnn4 lib symbols
+       - Only link with inline.o when using gcc
+       - Support inline keywords inline, __inline, __inline__
+       - Ultrix now implies have_mmap=no
+       - Sun sound in non-standard dirs now works
+       - --native-sound-lib no longer ignored on HP & SGI
+       - gpm configure tests moved after curses configure tests
+
+1997-06-04  Gary D. Foster  <Gary.Foster@corp.sun.com>
+
+       * lisp/modes/cc-mode.el: Modified `c-electric-delete' to honor the 
+         desired delete direction in both normal and "hungry" modes.
+       * lisp/modes/cperl-mode.el: Modified `cperl-electric-backspace' to 
+         honor the desired delete direction.
+       
+1997-05-30  Martin Buchholz  <mrb@eng.sun.com>
+
+       * configure.in: Automagically compute -R path for gcc
+
+1997-05-30  Gary D. Foster  <Gary.Foster@corp.sun.com>
+
+       * lisp/vm/vm-vars.el: Fixed delete key binding to call
+         `vm-scroll-down'
+       
+Thu May 29 15:35:07 1997  Martin Buchholz  <mrb@eng.sun.com>
+
+       * configure.in: Add support for Solaris2.6 -z ignore linker flags
+
+1997-05-29  Martin Buchholz  <mrb@eng.sun.com>
+
+       * configure.in: Replace standard Autoconf MMAP test with Neal
+       Becker's replacement, hacked somewhat.
+
+1997-05-16  Gary D. Foster  <Gary.Foster@corp.sun.com>
+
+       * lisp/prim/simple.el: Created `backspace-or-delete' function and
+         `backspace-or-delete-hook'
+       * lisp/prim/keydefs.el: Changed \177 bindings to point to new
+         delete function.
+       * lisp/modes/*.el: Removed conflicting \177 bindings.
+       * lisp/modes/cc-mode.el: Modified `c-electric-delete' to use new
+         delete bindings.
+       * lisp/modes/cperl-mode.el: Modified `cperl-electric-backspace' to 
+         use new delete bindings.
+       
+1997-06-03  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * lisp/x11/x-menubar.el (default-menubar): Add menu for Mule.
+
+       * lisp/mule/mule-cmds.el: Menu for XEmacs were moved to
+       x11/x-menubar.el.
+
+1997-06-03  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * lisp/leim/quail.el: to avoid compiling warnings about
+       overlay.el.
+
+1997-06-03  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * lisp/leim/quail.el: to sync with quail.el of
+       Emacs-19.34.94-zeta.
+
+       * lisp/leim/quail/ziranma.el, lisp/leim/quail/tonepy.el,
+       lisp/leim/quail/py.el, lisp/leim/quail/qj.el,
+       lisp/leim/quail/sw.el, lisp/leim/quail/ccdospy.el,
+       lisp/leim/quail/punct.el, lisp/leim/quail/4corner.el,
+       lisp/leim/quail/symbol-ksc.el, lisp/leim/quail/ethiopic.el,
+       lisp/leim/quail/hanja.el, lisp/leim/quail/quick-cns.el,
+       lisp/leim/quail/tsangchi-cns.el, lisp/leim/quail/lrt.el,
+       lisp/leim/quail/tsangchi-b5.el, lisp/leim/quail/devanagari.el,
+       lisp/leim/quail/japanese.el, lisp/leim/quail/quick-b5.el,
+       lisp/leim/quail/punct-b5.el, lisp/leim/quail/qj-b5.el,
+       lisp/leim/quail/py-b5.el, lisp/leim/quail/ctlau.el,
+       lisp/leim/quail/ctlaub.el, lisp/leim/quail/ecdict.el,
+       lisp/leim/quail/array30.el, lisp/leim/quail/hangul3.el,
+       lisp/leim/quail/hanja-jis.el, lisp/leim/quail/cyrillic.el,
+       lisp/leim/quail/etzy.el, lisp/leim/quail/greek.el,
+       lisp/leim/quail/ipa.el, lisp/leim/quail/lao.el,
+       lisp/leim/quail/zozy.el, lisp/leim/quail/viqr.el,
+       lisp/leim/quail/latin.el, lisp/leim/quail/thai.el,
+       lisp/leim/quail/hangul.el: quail of LEIM for Emacs-19.34.94-zeta.
+
+1997-06-02  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * mule/korean.el was abolished because it seems not to be used.
+
+       * mule/japanese.el was abolished because it seems not to be used.
+
+1997-06-01  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * lisp/tm/gnus-mime-old.el was abolished because XEmacs 20.3 has
+       Gnus 5.4.
+
+       * lisp/tm/tm-edit.el: updated to 7.108.
+
+       * lisp/tm/tm-view.el: updated to 7.83.
+
+       * lisp/leim/quail.el: modified for XEmacs.
+
+       * lisp/mule/mule-load.el, lisp/mule/mule-process.el: delete
+       mule-process.el because it is not used.
+
+       * lisp/mule/european.el was abolished because it seems not to be
+       used.
+
+       * lisp/mule/mule-load.el: must load mule-cmds before setting for
+       language-environment.
+
+       * lisp/mule/european-hooks.el: Modified for LEIM.
+
+       * lisp/mule/mule-cmds.el: Uncomment key definition for
+       `toggle-input-method'.
+
+       * lisp/mule/mule-init.el: Comment out about `mule-keymap' (moved
+       to mule-cmds.el).
+
+       * lisp/mule/mule-cmds.el: Uncomment about `mule-keymap' (moved
+       from mule-init.el).
+
+       * lisp/tl/tl-atype.el: Don't require tl-str.
+
+       * lisp/tl/tl-atype.el: Use atype.el of APEL.
+
+       * lisp/tl/tl-list.el: Use alist.el of APEL.
+
+1997-05-31  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * lisp/tl/richtext.el, lisp/tl/emu-x20.el, lisp/tl/emu-xemacs.el,
+       lisp/tl/emu.el, lisp/tl/emu-e19.el: moved to apel/.
+
+       * lisp/tl/file-detect.el, lisp/tl/filename.el: replaced by APEL's.
+
+       * lisp/mu/std11-parse.el, lisp/mu/std11.el: moved to apel/.
+
+       * lisp/leim/quail.el: Add new quail.el (imported from Emacs
+       19.34.94-epsilon).
+
+       * lisp/leim/skk/skkdic.el: delete skkdic.el temporary because
+       XEmacs can not compile it.
+
+       * lisp/leim/skk/skkdic.el, lisp/leim/quail/zozy.el,
+       lisp/leim/quail/ziranma.el, lisp/leim/quail/viqr.el,
+       lisp/leim/quail/tsangchi-cns.el, lisp/leim/quail/tsangchi-b5.el,
+       lisp/leim/quail/symbol-ksc.el, lisp/leim/quail/thai.el,
+       lisp/leim/quail/tonepy.el, lisp/leim/quail/quick-cns.el,
+       lisp/leim/quail/sw.el, lisp/leim/quail/qj-b5.el,
+       lisp/leim/quail/qj.el, lisp/leim/quail/quick-b5.el,
+       lisp/leim/quail/py-b5.el, lisp/leim/quail/py.el,
+       lisp/leim/quail/lao.el, lisp/leim/quail/latin.el,
+       lisp/leim/quail/lrt.el, lisp/leim/quail/punct-b5.el,
+       lisp/leim/quail/punct.el, lisp/leim/quail/hanja-jis.el,
+       lisp/leim/quail/hanja.el, lisp/leim/quail/ipa.el,
+       lisp/leim/quail/japanese.el, lisp/leim/quail/hangul3.el,
+       lisp/leim/quail/etzy.el, lisp/leim/quail/greek.el,
+       lisp/leim/quail/hangul.el, lisp/leim/quail/ethiopic.el,
+       lisp/leim/quail/devanagari.el, lisp/leim/quail/ecdict.el,
+       lisp/leim/quail/ctlau.el, lisp/leim/quail/ctlaub.el,
+       lisp/leim/quail/cyrillic.el, lisp/leim/quail/array30.el,
+       lisp/leim/quail/ccdospy.el, lisp/leim/quail/4corner.el: Add LEIM
+       elisp files; old lisp/quail was abolished.
+
+       * src/Makefile.in.in: Add mule-cmds.elc.
+
+       * lisp/mule/mule-load.el, lisp/mule/mule-cmds.el: Add mule-cmds.el
+       (imported from Emacs-19.34.94-epsilon and comment out a lot to
+       avoid conflict with mule-init.el or other XEmacs/mule files).
+
+       * lisp/prim/simple.el (assoc-ignore-case): New function; imported
+       from Emacs-19.34.94-epsilon.
+
+1997-05-29  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta3 is released.
+
+       * INSTALL: Delete documentation of mocklisp support.
+
+       * configure.in: Delete mocklisp support.
+
+       * etc/FTP: Update mirror info.
+
+       * etc/DISTRIB: Update mirror info.
+
+1997-05-29  Martin Buchholz  <mrb@eng.sun.com>
+
+       * configure.in: Replace standard Autoconf MMAP test with Neal
+       Becker's replacement, hacked somewhat.
+
+1997-05-28  Martin Buchholz  <mrb@eng.sun.com>
+
+       * lisp/prim/files.el (auto-mode-alist): Reorg auto-mode-alist again.
+
+       * lib-src/etags.c: Version 12.7 from Francesco.
+
+       * configure.in: Juggle link order of X libraries.
+       Add support for using zsh to run configure.
+       Document --with-tty=no.
+       Fix -no-recursion option.
+       Recognize and ignore --cache-file option.
+       Recognize null values for preprocessor symbols converted to shell
+       variables.  This maybe fixes the "-ltermcap" problem.
+       Remove spurious blanks from various SUBST-ituted variables.
+       Fix conditional creation of gdbinit.
+       Conditionally create .sbinit for Sunpro C.
+
+1997-05-26  Steven L Baur  <steve@altair.xemacs.org>
+
+       * etc/FTP: Correct typo in ftp.cenatls.cena.dgac.fr.
+
+       * etc/DISTRIB: Ditto.
+
+1997-05-22  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-beta2 is released.
+
+Thu May 22 04:19:09 1997  Martin Buchholz  <mrb@eng.sun.com>
+
+       * configure.in: Try to fix all reported bugs with 20.3-b1.
+       Change HAVE_WNN6 to WNN6.  WNN6 correctly autodetected.
+       extra-verbose now default on beta builds.
+       extra-verbose now much more verbose.
+       Don't set libs_termcap to " ".
+       Detect -lXm AFTER detecting -lXpm.
+       Use runtime paths before running tests, since AC_TRY_RUN may
+       depend on it.
+       with-xim=motif only default on Solaris.
+       realpath moved from s&m to configure.in.
+       xemacs-version.h removed.  main_1 now contains $canonical as well, 
+       for even more useful backtraces.
+       termcap handling rewritten.
+       Create .sbinit for Sun's source browser.
+       Warn user if no XPM support present.
+       Warn user if compiling in error checking.
+
+       * Makefile.in: use MAKE_SUBDIR consistently.  Remove references to 
+       dynodump.  Remove core when cleaning.  Remove config.log.
+       make distclean now functional.
+
+Tue Jun  4 10:15:54 1996  Per Bothner  <bothner@deneb.cygnus.com>
+
+       * etc/e/eterm.ti:  Add kcub1, kcuf1, kcuu1, kcud1 capabilities.
+
+Sun May 18 13:03:20 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * lwlib/Makefile.in.in (distclean): Clean up config.h.
+
+       * Makefile.in (distclean): Remve config.log.
+       remove broken dynodump stuffs.
+
+Sat May 17 20:30:54 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.3-b1 is released.
+
+Fri May 16 20:38:19 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * info/dir (Packages): Update minor version number.
+
+       * etc/README: Update minor version number.
+
+       * README: Update minor version number.
+
+Tue May 13 20:35:52 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs-20.2 is released.
+
+Sat May 10 16:14:30 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.2-b6 is released.
+
+Thu May  8 20:22:34 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.2-b5 is released.
+
+Fri May  2 16:50:02 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.2-b4 is released.
+
+Thu May  1 18:13:38 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * configure.in (--with-xim): Don't default it to Motif since it
+       causes crashes at startup on some systems.
+
+Sun Apr 27 12:25:55 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.2-b3 is released.
+
+Wed Apr 23 10:33:58 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.2-b2 is released.
+
+       * configure.in (beta): OPENWINHOME misspelled.
+
+Mon Apr 21 14:48:29 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * etc/BETA (writing): Update with information about how to create
+       patches.
+
+Sat Apr 19 16:13:16 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.2-b1 is released.
+
+Thu Apr 17 21:33:59 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * configure.in (beta): SONY NEWS-OS has /etc/osversion and not
+       uname.
+
+Wed Apr 16 17:44:05 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.1 is re-released.
+
+Tue Apr 15 21:03:22 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.1 is released.
+
+Sat Apr 12 20:11:08 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.1-b15 is released.
+
+Sat Apr 12 09:01:32 1997  Hrvoje Niksic <hniksic@srce.hr>
+       * PROBLEMS: I have cleaned up a bit the PROBLEMS file, by:
+       1) changing it into sections -- there is now a section for building,
+          running and compatibility problems
+
+       2) removing some obviously obsolete entries -- e.g. those pertaining
+          to Emacs 18, etc. --> size is off by 20K
+
+       3) Rearranging the entries by relevance.  I have tried to put the most
+          relevant entries in front.
+       
+Thu Apr 10 19:07:26 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.1-b14 is released.  (Beta 13 was skipped).
+
+Wed Apr  9 22:52:06 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.1-b12 is released.
+
+Sun Apr  6 22:31:00 1997  Tatsuya Ichikawa  <ichikawa@hv.epson.co.jp>
+
+       * configure.in: Cosmetic change to summary print of POP/Kerberos/
+       Hesiod options.
+
+Sat Apr  5 09:11:36 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.1-b11 is released.
+
+Wed Apr  2 15:27:35 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in (install-only): New target.  Functionality suggested 
+       by Larry Schwimmer, correct way of doing it suggested by Chuck
+       Thompson.
+
+       * configure.in: Default to "-Olimit 2000" as suggested by Jamie
+       Zawinski for SGI cc and Irix 6.
+
+Tue Apr  1 12:23:13 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * configure.in: Add configuration parameters for Emacs 19.34
+       movemail.c (--with-pop, --with-kerberos, --with-hesiod).
+
+Fri Mar 28 19:58:41 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * configure.in: Remove garbage if [ ... ] constructs and a
+       mispatch.
+
+Thu Mar 27 18:24:19 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.1-b10 is released.
+
+Wed Mar 26 22:31:10 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * Remove vms top-level directory.
+       
+       * XEmacs 19.15 final released to beta testers.
+
+Tue Mar 25 19:13:27 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 19.15 prefinal released to beta testers.
+
+Mon Mar 24 12:28:17 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * configure.in (--debug): Correct documentation.
+
+Sun Mar 23 17:24:38 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 19.15-b104 is released.
+
+Sat Mar 22 19:56:36 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * etc/sgml/CATALOG: Default to html-3.2final.
+
+Sat Mar 22 17:55:15 1997  Darrell Kindred  <dkindred@cmu.edu>
+
+       * configure.in (beta): Add configure support for the -rpath flag
+       for IRIX analogous to the Solaris "-R".
+
+Sat Mar 22 16:47:08 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * info/dir (Packages): Add HM-HTML-Mode to menu.
+
+Sat Mar 22 21:27:41 1997  Tomasz J. Cholewo  <t.cholewo@ieee.org>
+
+        * configure.in: Echo only current configuration using 'tee -a'.
+
+Fri Mar 21 21:26:01 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs-19.15-b103 is released.
+       * XEmacs-20.0-b9 is released.
+
+       * Makefile.in (top_distclean): Add `Installation' to distclean
+       rule.
+
+Fri Mar 21 20:05:29 1997  Darrell Kindred  <dkindred@cmu.edu>
+
+       * Makefile.in (autoloads): Pass $(MAKE) to update-elc.sh and
+       update-autoloads.sh.
+
+Thu Mar 20 20:14:16 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs-19.15-b102 is released.
+
+Tue Mar 18 21:52:36 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs-19.15-b101 is released.
+
+Mon Mar 17 19:09:29 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs-20.1-b8 is released.
+       * XEmacs-19.15-b100 is released.
+
+Sat Mar 15 17:15:18 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs-20.1-b7 is released.
+       * XEmacs-19.15-b99 is released.
+
+       * etc/sgml/CATALOG: Added IE3 DTDs and htmlpro DTD.
+
+Thu Mar 13 10:40:11 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * configure.in: Add sunos4-1-4 header files.
+
+Wed Mar 12 18:53:08 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * configure.in: Use new file bsdos3.h with BSDI 3.0.
+
+Sat Mar  8 15:19:33 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs-20.1-b6 is released.
+       * XEmacs-19.15-b98 is released.
+
+Wed Mar  5 18:55:36 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in (install-arch-indep): Offer to compress lisp sources.
+       (gzip-el): New targe for compressed installed lisp sources.
+
+Tue Mar  4 23:28:37 1997  Martin Buchholz  <mrb@eng.sun.com>
+
+       * lib-src/update-elc.sh: VM is compiled after the byte-compiler,
+       but before anything else.  More flexible about finding an xemacs
+       to use for byte-compilation (default src/xemacs).  Other minor fixes.
+
+Mon Mar  3 23:57:56 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.1-b5 is released.
+
+Mon Mar  3 18:09:17 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.1-b4 is released.
+
+Sat Mar  1 15:38:30 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in (distclean): Correct typos.
+
+       * XEmacs 19.15-b96 is released.
+
+       * configure.in: Symlink site-lisp when using --srcdir.
+       Add special handling of lisp directory to allow for multiple
+       site-packages files.
+
+Fri Feb 28 20:38:46 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in (distclean): Create lock and site-lisp directories
+       when they don't exist (after being pruned by CVS).
+
+Tue Mar  4 00:41:38 1997  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * etc/sample.Xdefaults: Added customization of foreground and
+       background colors for the `default' face.
+
+Wed Feb 26 22:12:12 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in (top_distclean): Reset src/PURESIZE.h for
+       distribution.
+
+       * XEmacs 20.1-b3 is released.
+
+Sun Feb 23 17:10:09 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.1-b2 is released.
+
+Sat Feb 22 14:29:44 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 19-15-b'95 is released.
+
+Fri Feb 21 22:29:51 1997  Martin Buchholz  <mrb@eng.sun.com>
+
+       * etc/toolbar/workshop-cap-up.xpm:  Moved caption up one pixel.
+
+       * lwlib/xlwscrollbar.c : Fix many scrollbar bugs:
+       - "knob" renamed to "slider"
+       - leftmost pixel wasn't sensitive to button clicks, while righmost
+         pixel was.
+       - many glitches fixed if Emacs*XlwScrollBar.ArrowPosition:same:
+         - goobers on top of up-arrow removed.
+         - up-arrow would not always be redrawn when necessary
+         - slider drag would be `off' by size of up-arrow
+       - horizontal and vertical scrollbars didn't use exactly the same
+         dimensions.
+       - slider was never drawn if XlwScrollBar.shadowThickness was 0.
+       - Now up- and down-arrows actually work near beginning/end of buffer!
+
+Thu Feb 20 12:40:57 1997  Jan Vroonhof <vroonhof@math.ethz.ch>
+
+       * configure.in (with_xauth): Attempted correction of test for
+       libXmu on SunOS.
+
+Sat Feb 15 14:11:03 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.1-b1 is released.
+       * XEmacs 19.15-b94 is released.
+
+Fri Feb 14 23:23:03 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * README: ``This directory tree holds version 19.13 ...'' ???
+
+Sun Feb  9 16:15:55 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 19.15-b93 is released.
+       XEmacs 20.0 is released to the 'net.
+
+Fri Feb  7 19:21:34 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.0try3 is released.
+
+Wed Feb  5 18:03:06 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.0try2 is released.
+
+Mon Feb  3 19:39:08 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 19.15-b92 is released.
+
+Sat Feb  1 18:17:38 1997  Steven L Baur <steve@altair.xemacs.org>
+
+       * XEmacs 20.0try1 is released.
+       * XEmacs 19.15-b91 AKA XEmacs '97 NOT! is released.
+
+Sat Feb  1 00:00:48 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * PROBLEMS:  Updated from beta test bug reports.
+       Put in outline-mode/outl-mouse-minor-mode by default.
+
+Wed Jan 29 19:59:41 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * CHANGES-beta: XEmacs 20.0-b93 is released.
+
+Sat Jan 25 15:43:59 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * CHANGES-beta: XEmacs 20.0-b92 is released.
+
+Fri Jan 24 09:54:01 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * lwlib/xlwmenu.c (massage_resource_name): Changed comparison of
+       char and pointer.
+
+Thu Jan 23 10:39:34 1997  Martin Buchholz  <mrb@eng.sun.com>
+
+       * lib-src/update-elc.sh (ignore_dirs): Quoting portability.
+
+Wed Jan 22 21:07:17 1997  Steven L Baur  <steve@altair.xemacs.org>
+       * XEmacs 20.0-b91 (prerelease 2) is released.
+
+       * configure.in (--with-scrollbars): Add Athena3d as a toolkit
+       type.
+
+       * lwlib/lwlib-Xaw.c (xaw_update_one_widget): Let Athena 3d have 0
+       borderwidth.
+       (xaw_scrollbar_scroll): Use SCROLLBAR_LINE_UP and
+       SCROLLBAR_LINE_DOWN since that's current the only to get to the
+       bottom of the buffer. :-(
+
+Tue Jan 21 20:01:19 1997  Steven L. Baur  <steve@altair.xemacs.org>
+
+       * configure.in (beta): Add LWLIB_USES_ATHENA for odd
+       configurations that use both Motif and Athena.
+
+       * etc/sgml/HTML32.dtd: html-3.2 final dtd added.
+
+Wed Jan 15 12:55:19 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * info/dir (Gnus): Updated spelling and info.
+
+Mon Jan 13 13:37:27 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * configure.in: Remove assignment of NON_GNU_CPP for irix-6.0.
+
+Mon Jan 13 00:36:01 1997  Martin Buchholz  <mrb@eng.sun.com>
+
+       * lib-src/make-docfile.c (scan_lisp_file): eliminate doc-string
+       warnings for ccl-read-*
+
+Sat Jan 11 12:05:31 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * etc/sample.emacs: Remove code snippet that wipes out the cycle
+       buffer modeline feature.
+
+       * XEmacs 20.0 beta90 (prerelease 1) is released.
+       * XEmacs 19.15 beta90 (prerelease 1) is released.
+       
+Tue Jan  7 08:45:16 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * configure.in (LIBS): Revise test for XFree86 (look for XF86Config).
+
+Sat Jan  4 14:52:57 1997  Steven L Baur  <steve@altair.xemacs.org>
+       * XEmacs 20.0 beta 34 is released.
+       * XEmacs 19.15 beta 7 is released.
+
+Fri Jan  3 15:18:59 1997  Jeff Miller  <jmiller@smart.net>
+
+       * lwlib/Makefile.in.in: lwlib is required if X11 is used.
+
+Wed Jan  1 08:30:48 1997  Martin Buchholz  <mrb@eng.sun.com>
+
+       * src/emacs.c: Make sure 
+       `./temacs -batch -l loadup.el run-temacs <emacs-args>' 
+       works properly
+
+       * src/Makefile.in.in (rtcmacs): Add support for RTC, Sun's
+         competitor to Purify.
+
+       * man/lispref/symbols.texi: Fix up bit vector documentation
+       * man/lispref/sequences.texi: Fix up bit vector documentation
+
+       * lisp/sunpro/sunpro-load.el: Only preload mime-setup for Sun.
+
+       * lisp/prim/update-elc.el: Don't rely on autoloads.
+
+Tue Dec 31 09:46:13 1996  Martin Buchholz  <mrb@eng.sun.com>
+
+       * lisp/prim/auto-autoloads.el: New, completely program-generated, file
+       * lib-src/update-autoloads.sh: Rewritten to use auto-autoloads.el.
+       * lisp/utils/autoload.el: Reorganization of autoload mechanism:
+       Errors during autoload generation are just that - errors.
+       
+       Generated autoloads are now in a separate file of their own.
+       
+       Reliability of autoload generation greatly increased.
+       
+       Distribution smaller by about 100k.
+       
+       `make autoloads' is still the preferred mechanism for update.
+       
+       Autoloads are always regenerated completely from scratch.  This
+       avoids errors with obsolete or corrupted autoload entries.
+
+       Caching of autoload entries using timestamps has been eliminated.
+       
+       Files that have no autoloads no longer have a comment placed into
+       the generated autoloads file.
+
+       There was a bug where autoload entries would sometimes end up
+       being inserted into the *middle* of other autoload entries,
+       thereby corrupting them.
+
+       * src/event-Xt.c: Remove SUNOS_GCC_L0_BUG kludge.
+
+Sun Dec 29 05:37:43 1996  Martin Buchholz  <mrb@eng.sun.com>
+
+       * lib-src/update-autoloads.sh: Make sure that `make autoloads'
+         doesn't use the autoload facility to load `autoload';
+         load it explicity instead.
+
+       * lib-src/update-elc.sh (ignore_dirs): ignore SCCS, CVS, RCS dirs
+
+       * man/Makefile: Reinstate hyperbole & oo-browser manuals
+
+       * lisp/modes/mail-abbrevs.el: Apply patch originated from Noah Friedman
+
+       * src/mule-charset.c: Use lower case for charset registry, to
+         match XLFD.
+
+       * Makefile.in: replace list of info files with *.info* - one less
+         maintenance headache
+
+       * etc/sample.emacs: Add sample code to highlight continuation glyph
+
+       * man/oo-browser.texi: Fix TeXability
+
+       * man/hyperbole.texi: Fix TeXability
+
+       * man/vhdl-mode.texi: Fix TeXability
+
+       * lisp/prim/loaddefs.el: Wholesale housecleaning
+         `make autoloads' should finally work.
+
+       * lib-src/emacsclient.c (main): ANSIfication, compiler warning removal
+
+       * lisp/mule/mule-files.el: Add support for multi-lingual info files.
+
+       * lib-src/update-elc.sh: `make all-elc' was updating files in
+         `special' directories without using the Makefiles
+         designed for that purpose.
+         - make sure ilisp isn't remade every time through `make all-elc'.
+
+       * info/dir (Packages): Add Japanese TM info files
+
+       * src/inline.c:  Allow compilation with `gcc -g'
+
+       * src/syntax.c (word_constituent_p): Allow compilation with `gcc -g'
+
+       * src/lread.c: Don't put `...' immediately after a filename, so
+         that various tools can recognize the filename as such.
+
+       * src/event-Xt.c (x_to_emacs_keysym): Fix crash when
+         --with-xim=xlib and key event on window frame.  
+         Change return foo to return (foo) when return is a macro.
+
+       * src/editfns.c (Ffollowing_char): docstring fixes.
+
+       * man/tm/Makefile: Add support for Japanese TM info (but not dvi) files.
+         This Makefile is no longer officially broken.
+
+       * info/dir: Add Japanese tm documents.
+
+       * man/tm/tm-vm-en.texi: Make document TeX-friendly.
+
+       * lib-src/update-autoloads.sh (EMACS): Don't rely on non-portable
+         xargs -i flag.
+
+       * lisp/mule/mule-files.el (file-coding-system-alist): Make sure
+         the `binary' coding system is used for .gz and .Z extensions.
+
+       * man/viper.texi: Viper version 2.90
+
+       * man/ediff.texi: Ediff Version 2.62
+
+       * lisp/packages/ispell.el (ispell-word): Avoid using strings with
+         define-key, for compatibility with loaddefs.el
+
+       * lisp/modes/eiffel3.el: Make compatible with update-autoloads.
+
+       * lisp/ilisp/Makefile (elc): Add target to avoid re-compilation.
+
+       * lib-src/update-elc.sh: XEmacs sometimes re-byte-compiled elisp
+         files in dirs that have their own Makefiles.
+
+
+
+Sun Dec 29 17:02:49 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in (install-arch-indep): Force compression with `gzip -f'.
+
+       * lib-src/update-elc.sh (NUMTOCOMPILE): Ignore CVS directories.
+
+       * Makefile.in (install-arch-indep): Catch .info-[0-9]* files for
+       installation.
+
+Sat Dec 28 15:33:27 1996 Steven L Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 20.0 beta 33 is released.
+       * XEmacs 19.15 beta 6 is released.
+
+Fri Dec 27 20:34:58 1996  Richard Mlynarik  <mly@adoc.xerox.com>
+
+       * etc/yow.lines: 20k of new zippy quotes.
+
+Fri Dec 27 01:02:41 1996  Martin Buchholz  <mrb@eng.sun.com>
+
+       * Makefile.in (install-arch-indep): Simplify installation of info
+       pages.
+
+Sat Dec 21 15:20:20 1996  Steven L Baur  <steve@altair.xemacs.org>
+       * XEmacs 20.0-b32 released.
+
+       * XEmacs 19.15-b5 released.
+
+Wed Dec 18 20:22:08 1996  Martin Buchholz  <mrb@eng.sun.com>
+
+       * configure.in: Reformat.  Fix shared include file rename
+       problem.
+
+       * configure: Reformat.  Fix shared include file rename problem.
+
+       * dynodump/dynodump.c (__EXTENSIONS__): Define it.
+
+Thu Dec 12 13:19:00 1996  Joseph J Nuspl  <nuspl@nvwls.cc.purdue.edu>
+
+       * Makefile.in (install-arch-indep): Install infofiles gzipped by
+       default.
+
+Tue Dec 10 19:25:25 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * CHANGES-beta: XEmacs 20.0-b31 is released.
+
+Tue Dec 10 18:33:19 1996  Rod Whitby  <rwhitby@asc.sps.mot.com>
+
+       * info/vhdl-mode.info: New file.
+
+       * info/dir (Packages): Add vhdl-mode documentation.
+
+Tue Dec 10 18:27:02 1996  Martin Buchholz  <mrb@Eng.Sun.COM>
+
+       * configure: Make shared/dynamic flags work much more logically.
+
+Tue Dec 10 09:17:22 1996  David Worenklein  <dcw@gcm.com>
+
+       * configure.in (machine): Patch to make newly renamed shared
+       link include files work.
+
+Sat Dec  7 16:28:10 1996  Martin Buchholz  <mrb@Eng.Sun.COM>
+
+       * configure.in: Configure for POSIX getcwd if available.
+
+Thu Dec  5 20:42:35 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * etc/edt-user.doc (File): New file from Emacs 19.34.
+
+Thu Dec  5 11:56:05 1996  Joseph J Nuspl <nuspl@nvwls.cc.purdue.edu>
+
+       * configure.in (LIBS): Fix typo in dialog box test.
+
+
diff --git a/GETTING.GNU.SOFTWARE b/GETTING.GNU.SOFTWARE
new file mode 100644 (file)
index 0000000..27b5ca3
--- /dev/null
@@ -0,0 +1,120 @@
+-*- text -*-
+
+For information on getting XEmacs, see the files DISTRIB and
+MAILINGLISTS in the .../etc/ directory of the XEmacs distribution.
+
+
+                 Getting GNU Software, 14 May 94
+Copyright (C) 1986, 1987, 1988, 1989, 1990, 1992, 1993, 1994 Free Software Foundation, Inc.
+
+
+       Permission is granted to anyone to make or distribute verbatim
+       copies of this document provided that the copyright notice and
+       this permission notice are preserved, and that the distributor
+       grants the recipient permission for further redistribution as
+       permitted by this notice.
+
+
+* GNU and the Free Software Foundation
+
+Project GNU is organized as part of the Free Software Foundation, Inc.
+The Free Software Foundation has the following goals: 1) to create GNU
+as a full development/operating system.  2) to distribute GNU and
+other useful software with source code and permission to copy and
+redistribute.
+
+Further information on the rationale for GNU is in file
+`/pub/gnu/GNUinfo/GNU' (all files referred to are on the Internet host
+prep.ai.mit.edu).
+
+Information on GNU Internet mailing lists and gnUSENET newsgroups can
+be found in `/pub/gnu/GNUinfo/MAILINGLISTS'.
+
+* How To Get The Software
+
+The easiest way to get a copy of the distribution is from someone else
+who has it.  You need not ask for permission to do so, or tell any one
+else; just copy it.  The second easiest is to ftp it over the
+Internet.  The third easiest way is to uucp it.  Ftp and uucp
+information is in `/pub/gnu/GNUinfo/FTP'.
+
+If you cannot get a copy any of these ways, or if you would feel more
+confident getting copies straight from us, or if you would like to get
+some funds to us to help in our efforts, you can order one from the
+Free Software Foundation.  See `/pub/gnu/GNUinfo/DISTRIB' and
+`/pub/gnu/GNUinfo/ORDERS'.
+
+* What format are the *.gz files in?
+
+Because the unix `compress' utility is patented (by two separate
+patents, in fact), we cannot use it; it's not free software.
+
+Therefore, the GNU Project has chosen a new compression utility,
+`gzip', which is free of any known software patents and which tends to
+compress better anyway.  As of March 1993, all compressed files in the
+GNU anonymous FTP area, `prep.ai.mit.edu:/pub/gnu', have been
+converted to the new format.  Files compressed with this new
+compression program end in `.gz' (as opposed to `compress'-compressed
+files, which end in `.Z').
+
+Gzip can uncompress `compress'-compressed files and `pack'-compressed
+files (which end in `.z').  This is possible because the various
+decompression algorithms are not patented---only compression is.
+
+The gzip program is available from any GNU mirror site (see
+`/pub/gnu/GNUinfo/FTP' for a list of mirror sites) in shar, tar, or
+gzipped tar format (for those who already have a prior version of gzip
+and want faster data transmission).  It works on virtually every unix
+system, MSDOS, OS/2, and VMS.
+
+* Available Software
+
+** GNU Emacs
+
+The GNU Emacs distribution includes:   
+       - manual source in TeX format.
+       - an enhanced regex (regular expression) library.
+
+See files `/pub/gnu/GNUinfo/MACHINES*' for the status of porting Emacs
+to various machines and operating systems.
+
+** C Scheme - a block structured dialect of LISP.
+
+The Free Software Foundation distributes C Scheme for the MIT Scheme
+Project on its Scheme tapes.  The full ftp distribution can be gotten
+via anonymous FTP from altdorf.ai.mit.edu in directory /archive.
+
+Problems with the C Scheme distribution and its ftp distribution
+should be referred to: <bug-cscheme@martigny.ai.mit.edu>.  There are
+two general mailing lists: <info-cscheme@martigny.ai.mit.edu>and
+<scheme@mc.lcs.mit.edu>.  Send requests to join either list to:
+<info-cscheme-request@martigny.ai.mit.edu> or
+<scheme-request@mc.lcs.mit.edu>.
+
+** Other GNU Software
+
+A full list of available software are in `/pub/gnu/GNUinfo/ORDERS' and
+`/pub/gnu/DESCRIPTIONS'.
+
+* No Warranties
+
+We distribute software in the hope that it will be useful, but without
+any warranty.  No author or distributor of this software accepts
+responsibility to anyone for the consequences of using it or for
+whether it serves any particular purpose or works at all, unless he
+says so in writing.
+
+* If You Like The Software
+
+If you like the software developed and distributed by the Free
+Software Foundation, please express your satisfaction with a donation.
+Your donations will help to support the foundation and make our future
+efforts successful, including a complete development and operating
+system, called GNU (Gnu's Not Un*x), which will run Un*x user
+programs.  Please note that donations and funds raised by selling
+tapes, CD-ROMs, and floppy diskettes are the major source of funding
+for our work.
+
+For more information on GNU and the Foundation, contact us at Internet
+address <gnu@prep.ai.mit.edu> or the foundation's US Mail address
+found in file `/pub/gnu/GNUinfo/ORDERS'.
diff --git a/INSTALL b/INSTALL
new file mode 100644 (file)
index 0000000..50fba0b
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,766 @@
+XEmacs Installation Guide
+Copyright (c) 1994, 1995, 1996 Board of Trustees, University of Illinois
+Copyright (c) 1994 Free Software Foundation, Inc.
+
+Synched up with: FSF 19.30.
+
+   Permission is granted to anyone to make or distribute verbatim copies
+   of this document as received, in any medium, provided that the
+   copyright notice and permission notice are preserved,
+   and that the distributor grants the recipient permission
+   for further redistribution as permitted by this notice.
+
+   Permission is granted to distribute modified versions
+   of this document, or of portions of it,
+   under the above conditions, provided also that they
+   carry prominent notices stating who last changed them,
+   and that any new or changed statements about the activities
+   of the Free Software Foundation are approved by the Foundation.
+
+
+BUILDING AND INSTALLATION (Unix and Cygwin, see the file nt/README
+for instructions on building under Microsoft Windows):
+
+1) Make sure your system has enough swapping space allocated to handle
+   a program whose pure code is 900k bytes and whose data area is at
+   least 400k and can reach 8Mb or more.  If the swapping space is
+   insufficient, you will get an error in the command `temacs -batch
+   -l loadup dump', found in `./src/Makefile.in.in', or possibly when
+   running the final dumped XEmacs.
+
+Building XEmacs requires about 41 Mb of disk space (including the
+XEmacs sources).  Once installed, XEmacs occupies about 16 Mb in the
+file system where it is installed; this includes the executable files,
+Lisp libraries, miscellaneous data files, and on-line documentation.
+The amount of storage of the Lisp directories may be reduced by
+compressing the .el files. If the building and installation take place
+in different directories, then the installation procedure temporarily
+requires 41+16 Mb.  Adjust this value upwards depending upon what
+additional Lisp support is installed.
+
+XEmacs requires an ANSI C compiler, such as GCC.  If you wish to build
+the documentation yourself, you will need at least version 1.68 of
+makeinfo (GNU texinfo-3.11).
+
+
+2) Decide on what other software packages you would like to use with
+XEmacs, but are not yet available on your system.  On some systems,
+Motif and CDE are optional additions.  On Solaris, the SUNWaudmo
+package enables native sound support.  There are also a number of free
+software packages that XEmacs can use.  If these are not yet available
+on your system, obtain, build and install those external packages
+before building XEmacs.  The packages XEmacs can use are:
+
+   Xaw3d, XPM, JPEG, compface, PNG, zlib, GNU DBM, Berkeley DB, socks,
+   term, NAS, Canna, Kinput2, SJ3, Wnn.
+
+You can get (most of) them from the XEmacs ftp site at
+ftp://ftp.xemacs.org/pub/xemacs/aux
+
+If you want users on other systems to be able to use the XEmacs you
+have built, try to build those packages so that the generated
+libraries are statically linked.
+
+Use the --site-includes and --site-libraries options when building
+XEmacs to allow configure to find the external software packages.
+If you link with dynamic (``.so'') external package libraries, which
+is not recommended, you will also need to add the library directories
+to the --site-runtime-libraries option.
+
+
+3) Decide what Initial Lisp you need with XEmacs.  XEmacs is
+distributed separately from most of its runtime environment.  This is
+done to make it easier for administrators to tune an installation for
+what the local users need.  See the file etc/PACKAGES for an overview
+of what is available and which packages need to be installed prior to
+building XEmacs.  At this point you only need a minimum to get started
+at which point you may install what you wish without further changes
+to the XEmacs binary.  A sample minimum configuration for a Linux
+system using Mule and Wnn6 from OMRON corporation would be the
+packages `mule-base' and `egg-its'.  By default, packages will be
+searched for in the path
+
+~/.xemacs::$prefix/lib/xemacs-${version}/mule-packages:$prefix/lib/xemacs/mule-packages:$prefix/lib/xemacs-${version}/packages:$prefix/lib/xemacs/packages
+
+This may be changed by specifying a different value with the
+--package-path configuration option.
+
+4) In the top level directory of the XEmacs distribution, run the
+   program `configure' as follows:
+
+    ./configure [CONFIGURATION-NAME] [--OPTION[=VALUE]] ...
+
+Almost always, you should let `configure' (actually the shell script
+`config.guess') guess your host type, by omitting the
+CONFIGURATION-NAME argument.  If you like to experiment, specify a
+configuration name in the form MACHINE-VENDOR-OPSYS, for example:
+
+sparc-sun-solaris2.6
+
+See config.guess and configure.in for valid values for MACHINE,
+VENDOR, and OPSYS.  Also check `./etc/MACHINES' for advice on building
+on particular machines.
+
+If you don't want X support, specify `--without-x'.  If you omit this
+option, `configure' will try to autodetect whether your system has X,
+and arrange to use it if present.
+
+The `--x-includes=DIR' and `--x-libraries=DIR' options tell the build
+process where the compiler should look for the include files and
+object libraries used with the X Window System.  Normally, `configure'
+is able to find them; these options are necessary if you have your X
+Window System files installed in unusual places.
+
+The `--site-includes=DIR' and `--site-libraries=DIR' options allow you
+to specify additional places the compiler should look for include
+files and object libraries.  You may specify multiple DIR's by
+enclosing the list in quotes.  All the external packages you want to
+use with XEmacs (e.g. xpm, wnn, ...) described later should have their
+include and library directories defined using these options.
+
+The `--site-runtime-libraries=DIR' option specifies directories to
+search for shared libraries at run time.  This may be necessary if you
+link with dynamic libraries that are installed in non-standard
+directories, or if you expect some of the libraries used to build
+XEmacs to be in a different directory at run time than at build time.
+Usually this will add a `-R' to each directory specified and use that
+when linking XEmacs.  If you use this option, you must specify ALL of
+the directories containing shared libraries at run time, including
+system directories.
+
+Rationale: Some people think that directories in --site-libraries
+should be automatically used to update --site-runtime-libraries.
+Here's a real-life scenario that explains why this is not done: You
+build binaries for your company using static libs in
+/net/toy/hack/lib.  XEmacs adds /net/toy/hack/lib to the runpath of
+the executable you've built.  Since there are only static libs there,
+the system runtime loader will look in this dir, and ignore it,
+causing only a .01 second delay in starting XEmacs.  You leave the
+company for a job at a small Silicon Valley startup.  Time passes.
+The next guy who inherits your machine objects to working on a machine
+named `toy', and gets the sysadmin to rename the machine `godzilla'.
+The SA forgets to remove the old entry for `toy' from the hosts file.
+Now the system loader will still try to access /net/toy/, and the
+automounter will hang trying to access /net/toy.  XEmacs suddenly
+takes 30 seconds longer to start up, no one can figure out why, and
+everyone at your old company curses your name, thinking that you've
+put a time bomb into XEmacs.  And they're right!
+
+The `--with-gcc' option specifies that the build process should
+compile XEmacs using GCC.  The `--compiler' option allows you to
+specify some other compiler to be used to compile XEmacs.  If neither
+option is specified, the environment variable CC is used instead.
+Otherwise the compiler will then default to 'cc'.
+
+The `--cflags' option specifies the CFLAGS the build process should
+use when compiling XEmacs.  Otherwise the value of the environment
+variable CFLAGS is consulted.  If that is also undefined, CFLAGS
+defaults to "-g -O" for gcc and "-g" for all other compilers.
+
+The `--with-gnu-make' option specifies that Makefiles should be
+written to take advantage of special features of GNU Make.  GNU Make
+works fine on Makefiles even without this option.  This flag just
+allows for simultaneous in-place and --srcdir building.
+
+The `--dynamic' option specifies that configure should try to link
+emacs dynamically rather than statically.
+
+The `--const-is-losing' option is for use if you have trouble
+compiling due to the `const' storage class in C.  This is defined by
+default.  Most users should have no need to change this.
+
+You can build XEmacs for several different machine types from a single
+source directory.  To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'.  Make separate
+build directories for the different configuration types, and in each
+one, run the XEmacs `configure' script.  `configure' looks for the
+Emacs source code in the directory that `configure' is in.
+
+The `--prefix=PREFIXDIR' option specifies where the installation process
+should put XEmacs and its data files.  This defaults to `/usr/local'.
+- XEmacs (and the other utilities users run) go in PREFIXDIR/bin
+  (unless the `--exec-prefix' option says otherwise).
+- The architecture-independent files go in PREFIXDIR/lib/xemacs-VERSION
+  (where VERSION is the version number of XEmacs, like `21.0').
+- The architecture-dependent files go in
+  PREFIXDIR/lib/xemacs-VERSION/CONFIGURATION-NAME
+  (where CONFIGURATION-NAME is the host type, like mips-dec-ultrix4.2),
+  unless the `--exec-prefix' option says otherwise.
+
+The `--exec-prefix=EXECDIR' option allows you to specify a separate
+portion of the directory tree for installing architecture-specific
+files, like executables and utility programs.  If specified,
+- XEmacs (and the other utilities users run) go in EXECDIR/bin, and
+- The architecture-dependent files go in
+  EXECDIR/lib/xemacs-VERSION/CONFIGURATION-NAME.
+EXECDIR/bin should be a directory that is normally in users' PATHs.
+
+For example, the command
+
+    ./configure mips-dec-ultrix --with-x11=yes
+
+configures XEmacs to build for a DECstation running Ultrix, with
+support for the X11 window system.
+
+The `--with-menubars=TYPE' option allows you to specify which X
+toolkit you wish to use for the menubar.  The valid options are
+`lucid', `motif' and `no'.  The default is `lucid' which is a
+Motif-lookalike menubar.  We highly recommend its usage over the real
+Motif menubar. (In fact, the Motif menubar is currently broken.)  If
+`no' is specified then support for menubars will not be compiled in.
+
+The `--with-scrollbars=TYPE' option allows you to specify which X
+toolkit you wish to use for the scrollbars.  The valid options are
+`lucid', `motif', `athena', `athena3d', and `no'.  The default is
+`lucid' which is a Motif-lookalike scrollbar.  If `no' is specified
+then support for scrollbars will not be compiled in.
+
+The `--with-dialogs=TYPE' option allows you to specify which X toolkit
+you wish to use for the dialog boxes.  The valid options are `athena',
+`athena3d', `motif, and `no.  The `lucid' option is accepted and will
+result in the `athena' toolkit being used.  If the Motif toolkit can be
+found the default is `motif'.  Otherwise, the default is `athena'.  If
+`no' is specified then support for dialog boxes will not be compiled
+in.
+
+The `--with-toolbars' option allows you to enable or disable toolbar
+support.  The default is `yes' as long as support for a windowing
+system is included.
+
+The `--with-xpm' option specifies that XEmacs should support X11
+Pixmaps.  `configure' will attempt to detect if you have the Xpm
+libraries and define `--with-xpm' for you.
+
+The `--with-xface' option specifies that XEmacs should support
+X-Faces.  `configure' will attempt to detect if you have the compface
+library and define `--with-xface' for you.
+
+The `--with-database' option specifies that XEmacs should be built
+with additional database support.  The valid options are `no' or a
+comma-separated list of one or more of `dbm', `gnudbm' or `berkdb'.
+`configure' will attempt to detect the necessary libraries and header
+files and define `--with-database' for you.
+
+The `--with-socks' option specifies that XEmacs should be built with
+SOCKS support.  This requires the libsocks library.
+
+The `--with-tooltalk' option specifies that XEmacs should be built
+with ToolTalk support for interconnecting with other applications.
+ToolTalk is not yet supported on all architectures.  If you use this
+option, you should have the tooltalk package (see etc/PACKAGES)
+installed prior to building XEmacs.
+
+The `--with-sparcworks' option specifies that XEmacs should be built
+with support for Sun Sparcworks 3.0.1 and up (including Sun WorkShop).
+This functionality is only of use on SunOS 4.1.x and Solaris 2.x
+systems.  If you use this option, you should have the Sun package (see
+etc/PACKAGES) installed prior to building XEmacs.
+
+The `--with-cde' option allows you to enable or disable CDE drag and
+drop support.  `configure' will attempt to detect this option and
+define `--with-cde' for you.
+
+The `--with-offix' option allows you to enable or disable OffiX drag
+and drop support.  This requires no external library support, so if
+X11 support is available, then this option defaults to `yes'.  OffiX
+support can be explicitly disabled via the `--with-offix=no' option.
+
+The `--external-widget' option specifies that XEmacs should be built
+with support for being used as a widget by other X11 applications.
+This functionality should be considered beta.
+
+The `--without-xmu' option can be used if your vendor doesn't ship
+the Xmu library.
+
+The `--puresize' option can be used to change the amount of purespace
+allocated for the dumped XEmacs.  As of XEmacs 20.1 usage of this
+parameter is deprecated and will be ignored.
+
+The `--with-sound=TYPE' option specifies that XEmacs should be built
+with sound support.  Native (`--with-sound=native') sound support is
+currently available only on Sun SparcStations, SGI's, HP9000s, and
+systems (such as Linux) with soundcard.h.  Network Audio Support (NAS)
+(`--with-sound=nas' or `--with-sound=both') is an extension to X that
+you may or may not have for your system.  For NAS, you will probably
+need to provide the paths to the nas include and library directories
+to configure.  If `--with-sound' is not specified, `configure' will
+attempt to determine if your configuration supports native sound and
+define --with-sound for you.  If your native sound library is not in a
+standard location you can specify it with the `--native-sound-lib=LIB'
+flag.  For Linux, `/dev/audio' is required for SunAudio files and
+`/dev/dsp' is required for raw data and WAVE format files.
+
+The `--rel-alloc' option can be used to either enable or disable use
+of the relocating allocator.  Turning on --rel-alloc will allow XEmacs
+to return unused memory to the operating system, thereby reducing its
+memory footprint.  However, it may make XEmacs runs more slowly,
+especially if your system's `mmap' implemntation is missing or
+inefficient.  Generally, it's best to go with the default
+configuration for your system.  You can tweak this based on how you
+use XEmacs, and the memory and cpu resources available on your system.
+
+The `--use-system-malloc' option can be use to either enable or
+disable use of the system malloc.  Generally, it's best to go with the
+default configuration for your system.  Note that on many systems
+using the system malloc disables the use of the relocating allocator.
+
+The `--use-debug-malloc' option can be used to link a special debugging
+version of malloc.  Debug Malloc is not included with XEmacs, is
+intended for use only by the developers and may be obtained from
+<URL:http://www.letters.com/dmalloc/>.
+
+The `--debug' and `--error-checking' options are intended for use only
+by the developers.  `--debug' adds code to be compiled in for
+performing various tests.  `--error-checking' adds additional tests to
+many of the commonly used macros.
+
+The `--verbose' and `--extra-verbose' options are intended for use
+only by the developers.  `--verbose' causes the results of all
+configure tests to be displayed.  `--extra-verbose' displays
+additional information, useful for debugging.  Another help for
+determining configure failures is the file `config.log', which
+contains the results of the compile and link tests used by configure.
+
+The `--with-mule' option enables (MUlti-Lingual Emacs) support, needed
+to suport non-Latin-1 (including Asian) languages.  The Mule support
+is not yet as stable or efficient as the `Latin1' support.   Enabling
+Mule support requires the mule-base package installed prior to
+building XEmacs.  The following options require Mule support:
+
+The `--with-xim' option enables use of the X11 XIM mechanism to allow
+an input method to input text into XEmacs.  The input method is shared
+among all the X applications sharing an X display and using the same
+language.  The XIM support comes in two flavors: `motif' and `xlib'.
+The Motif support (the XmIm* functions) is preferred when available.
+The xlib XIM support works reasonably well so long as the X11 libraries
+are recent enough.  It has been fairly well tested on Linux with glibc
+2.0.5 and 2.0.6 and Kinput2 as an XIM server.  In this configuration
+X11 must be recompiled with X_LOCALE defined because glibc is lacking
+localization for Japanese.  The XIM support defaults to `no' except
+when Motif is detected where it is stable with OSF libraries.  The XIM
+support in Lesstif (a Free Motif replacement) does not work as of
+v0.82.  If you enable this option, you will probably wish to install
+the `locale' package which contains localized Splash screens and
+Menubars.
+
+The `--with-xfs' option enables use of a multilingual Menubar.  At the
+present time, only Japanese and French locales are supported.  In
+order to use a multilingual Menubar you must have the `locale' package
+installed.  The `locale' package does not have to be installed when
+building XEmacs.
+
+The `--with-canna' option enables the use of the Canna Japanese input
+method.  This is stable code and fairly well tested.  In order to use
+it, you will have to have the Canna server installed and running.
+Canna versions 3.2pl2 and 3.5b2 are known to work.  Version 3.2pl2 is
+considered most stable than version 3.5b2.  If Canna is already
+installed, configure will autodetect it, so you never need to
+explicitly use this option unless your Canna libraries are somewhere
+strange.  Canna run time support is currently bundled with the
+`mule-base' package so there is nothing additional to install in order
+to use it.
+
+The `--with-wnn' and `--with-wnn6' options are for compiling with the Wnn
+multi-language input method.  `--with-wnn' is for compiling with Wnn-4.2,
+the Free version of WNN.  `--with-wnn6' is for compiling against WNN6,
+the commercial version of WNN available from OMRON Corporation.  This is
+stable code and fairly well tested.  In order to build with this
+option, you will need to have the `egg-its' lisp package already
+installed.
+
+Please note that it is safe to build with as many of the options
+`--with-xim', `--with-canna' and `--with-wnn' as your system
+supports.
+
+`configure' doesn't do any compilation or installation itself.  It
+just creates the files that influence those things: `./src/config.h',
+and all the Makefile's in the build tree.
+
+The `--with-pop', `--with-hesiod', and `--with-kerberos' options are used
+in conjunction with movemail.  As of XEmacs 20.1, movemail is identical
+to the one used in Emacs.
+
+When it is done, `configure' prints a description of what it did and
+creates a shell script `config.status' which, when run, recreates the
+same configuration.  If `configure' exits with an error after
+disturbing the status quo, it removes `config.status'.
+
+4) Look at `./lisp/paths.el'; if some of those values are not right
+for your system, set up the file `./lisp/site-init.el' with XEmacs
+Lisp code to override them; it is not a good idea to edit paths.el
+itself.  YOU MUST USE THE LISP FUNCTION `setq' TO ASSIGN VALUES,
+rather than `defvar', as used by `./lisp/paths.el'.  For example,
+
+     (setq news-inews-program "/usr/bin/inews")
+
+is how you would override the default value of the variable
+news-inews-program (which is "/usr/local/inews").
+
+Before you override a variable this way, *look at the value* that the
+variable gets by default!  Make sure you know what kind of value the
+variable should have.  If you don't pay attention to what you are
+doing, you'll make a mistake.
+
+Things may malfunction if the variable `directory-abbrev-alist' is not set
+up to translate "temporary" automounter mount points into the canonical
+form.  The default value of this variable contains the translation
+
+       ("^/tmp_mnt/" . "/")
+
+meaning translate "/tmp_mnt/net/FOO" into "/net/FOO", which is appropriate
+for the default configuration of the Sun automounter, but which may be
+inappropriate for different vendor's automounters, or if you have customized
+your mount-point names.
+
+5) Put into `./lisp/site-init.el' or `./lisp/site-load.el' any Emacs
+Lisp code you want XEmacs to load before it is dumped out.  Use
+site-load.el for additional libraries if you arrange for their
+documentation strings to be in the lib-src/DOC file (see
+src/Makefile.in.in if you wish to figure out how to do that).  For all
+else, use site-init.el.
+
+If you set load-path to a different value in site-init.el or
+site-load.el, XEmacs will use *precisely* that value when it starts up
+again.  If you do this, you are on your own!
+
+Note that, on some systems, the code you place in site-init.el must
+not use expand-file-name or any other function which may look
+something up in the system's password and user information database.
+See `./PROBLEMS' for more details on which systems this affects.
+
+The `site-*.el' files are nonexistent in the distribution.  You do not
+need to create them if you have nothing to put in them.
+
+6) Refer to the file `./etc/TERMS' for information on fields you may
+wish to add to various termcap entries.  The files `./etc/termcap.ucb'
+and `./etc/termcap.dat' may already contain appropriately-modified
+entries.
+
+7) Run `make' in the top directory of the XEmacs distribution to finish
+building XEmacs in the standard way.  The final executable file is
+named `src/emacs'.  You can execute this file "in place" without
+copying it, if you wish; then it automatically uses the sibling
+directories ../lisp, ../lib-src, ../info.
+
+Or you can "install" the executable and the other XEmacs into their
+installed locations, with `make install'.  By default, XEmacs's files
+are installed in the following directories:
+
+By default, XEmacs installs its files in the following directories:
+
+`/usr/local/bin' holds the executable programs users normally run -
+               `xemacs', `etags', `ctags', `b2m', `emacsclient',
+               `gnuclient', `gnudoit', `gnuattach', and `rcs-checkin'.
+
+`/usr/local/lib/xemacs-VERSION/lisp' holds the Emacs Lisp libraries;
+               `VERSION' stands for the number of the XEmacs version
+               you are installing, like `18.59' or `19.14'.  Since
+               the lisp libraries change from one version of XEmacs to
+               another, including the version number in the path
+               allows you to have several versions of XEmacs installed
+               at the same time; this means that you don't have to
+               make XEmacs unavailable while installing a new version.
+
+               XEmacs searches for its lisp files in these
+               directories, and then in
+               `/usr/local/lib/xemacs/site-lisp/*'.
+
+`/usr/local/lib/xemacs-VERSION/etc' holds the XEmacs tutorial, the
+               `yow' database, and other architecture-independent
+               files XEmacs might need while running.  VERSION is as
+               specified for `.../lisp'.
+
+`/usr/local/lib/xemacs/lock' contains files indicating who is
+               editing what, so XEmacs can detect editing clashes
+               between users.
+
+`/usr/local/lib/xemacs-VERSION/CONFIGURATION-NAME' contains executable
+               programs used by XEmacs that users are not expected to
+               run themselves, and the DOC file. `VERSION' is the
+               number of the XEmacs version you are installing, and
+               `CONFIGURATION-NAME' is the host type of your system.
+               Since these files are specific to the version of
+               XEmacs, operating system, and architecture in use,
+               including the configuration name in the path allows
+               you to have several versions of XEmacs for any mix of
+               machines and operating systems installed at the same
+               time; this is useful for sites at which different
+               kinds of machines share the file system XEmacs is
+               installed on.
+
+`/usr/local/lib/xemacs-VERSION/info' holds the on-line documentation
+               for XEmacs, known as "info files".
+
+`/usr/local/man/man1' holds the man pages for the programs installed
+               in `/usr/local/bin'.
+
+If these directories are not what you want, you can specify where to
+install XEmacs's libraries and data files or where XEmacs should search
+for its lisp files by giving values for `make' variables as part of
+the command.  See the section below called `MAKE VARIABLES' for more
+information on this.
+
+8) If your system uses lock files to interlock access to mailer inbox files,
+then you might need to make the movemail program setuid or setgid
+to enable it to write the lock files.  We believe this is safe.
+The setuid/setgid bits need not be set on any other XEmacs-related
+executables.
+
+9) You are done with the hard part!  You can remove executables and
+object files from the build directory by typing `make clean'.  To also
+remove the files that `configure' created (so you can compile XEmacs
+for a different configuration), type `make distclean'.
+
+10) You should now go to the XEmacs web page at http://www.xemacs.org/
+and decide what additional Lisp support you wish to have.
+
+MAKE VARIABLES
+
+You can change where the build process installs XEmacs and its data
+files by specifying values for `make' variables as part of the `make'
+command line.  For example, if you type
+
+    make install bindir=/usr/local/gnubin
+
+the `bindir=/usr/local/gnubin' argument indicates that the XEmacs
+executable files should go in `/usr/local/gnubin', not
+`/usr/local/bin'.
+
+Here is a complete list of the variables you may want to set.
+
+`bindir' indicates where to put executable programs that users can
+       run.  This defaults to /usr/local/bin.
+
+`datadir' indicates where to put the architecture-independent
+       read-only data files that XEmacs refers to while it runs; it
+       defaults to /usr/local/lib.  We create the following
+       subdirectories under `datadir':
+       - `xemacs-VERSION/lisp', containing the XEmacs lisp libraries, and
+
+       - `xemacs-VERSION/etc', containing the XEmacs tutorial and the
+               `yow' database.
+       `VERSION' is the number of the XEmacs version you are installing,
+       like `18.59' or `19.14'.  Since these files vary from one version
+       of XEmacs to another, including the version number in the path
+       allows you to have several versions of XEmacs installed at the
+       same time; this means that you don't have to make XEmacs
+       unavailable while installing a new version.
+
+`statedir' indicates where to put architecture-independent data files
+       that XEmacs modifies while it runs; it defaults to
+       /usr/local/lib as well.  We create the following
+       subdirectories under `statedir':
+       - `xemacs/lock', containing files indicating who is editing
+               what, so XEmacs can detect editing clashes between
+               users.
+
+`libdir' indicates where to put architecture-specific data files that
+       XEmacs refers to as it runs; it too defaults to `/usr/local/lib'.
+       We create the following subdirectories under `libdir':
+       - `xemacs-VERSION/CONFIGURATION-NAME', containing executable
+               programs used by XEmacs that users are not expected to run
+               themselves and the DOC file.
+       `VERSION' is the number of the XEmacs version you are installing,
+       and `CONFIGURATION-NAME' is the host type of your system.
+       Since these files are specific to the version of XEmacs,
+       operating system, and architecture in use, including the
+       configuration name in the path allows you to have several
+       versions of XEmacs for any mix of machines and operating
+       systems installed at the same time; this is useful for sites
+       at which different kinds of machines share the file system
+       XEmacs is installed on.
+
+`infodir' indicates where to put the info files distributed with
+       XEmacs; it defaults to `/usr/local/lib/xemacs-VERSION/info'.
+
+`mandir' indicates where to put the man pages for XEmacs and its
+       utilities (like `etags'); it defaults to
+       `/usr/local/man/man1'.
+
+`prefix' doesn't give a path for any specific part of XEmacs; instead,
+       its value is used to determine the defaults for all the
+       architecture-independent path variables - `datadir',
+       `statedir', `infodir', and `mandir'.  Its default value is
+       `/usr/local'; the other variables add on `lib' or `man' to it
+       by default.
+
+       For example, suppose your site generally places GNU software
+       under `/usr/users/software/gnusoft' instead of `/usr/local'.
+       By including
+           `prefix=/usr/users/software/gnusoft'
+       in the arguments to `make', you can instruct the build process
+       to place all of the XEmacs data files in the appropriate
+       directories under that path.
+
+`exec_prefix' serves the same purpose as `prefix', but instead
+       determines the default values for the architecture-dependent
+       path variables - `bindir' and `libdir'.
+
+The above variables serve analogous purposes in the makefiles for all
+GNU software; here are some variables specific to XEmacs.
+
+`lispdir' indicates where XEmacs installs and expects its lisp
+       libraries.  Its default value, based on `datadir' (see above),
+       is `/usr/local/lib/xemacs-VERSION/lisp' (where `VERSION' is as
+       described above).
+
+`sitelispdir' indicates where XEmacs should search for lisp libraries
+       specific to your site. XEmacs checks them in order before
+       checking `lispdir'.  Its default value, based on `datadir'
+       (see above), is `/usr/local/lib/xemacs/site-lisp'.
+
+`etcdir' indicates where XEmacs should install and expect the rest of
+       its architecture-independent data, like the tutorial and yow
+       database.  Its default value, based on `datadir'
+       (see above), is `/usr/local/lib/xemacs-VERSION/etc' (where
+       `VERSION' is as described above).
+
+`lockdir' indicates the directory where XEmacs keeps track of its
+       locking information.  Its default value, based on `statedir'
+       (see above), is `/usr/local/lib/xemacs/lock'.
+
+`archlibdir' indicates where XEmacs installs and expects the
+       executable files and other architecture-dependent data it uses
+       while running.  Its default value, based on `libdir' (see
+       above), is `/usr/local/lib/xemacs-VERSION/CONFIGURATION-NAME'
+       (where VERSION and CONFIGURATION-NAME are as described above).
+
+Remember that you must specify any variable values you need each time
+you run `make' in the top directory.  If you run `make' once to build
+xemacs, test it, and then run `make' again to install the files, you
+must provide the same variable settings each time.  To make the
+settings persist, you can edit them into the `Makefile' in the top
+directory, but be aware that running the `configure' program erases
+`Makefile' and rebuilds it from `Makefile.in'.
+
+The top-level Makefile stores the variable settings it used in the
+Makefiles for the subdirectories, so you don't have to specify them
+when running make in the subdirectories.
+
+
+CONFIGURATION BY HAND
+
+Instead of running the `configure' program, you have to perform the
+following steps.
+
+1) Copy `./src/config.h.in' to `./src/config.h'.
+
+2) Consult `./etc/MACHINES' to see what configuration name you should
+use for your system.  Look at the code of the `configure' script to
+see which operating system and architecture description files from
+`src/s' and `src/m' should be used for that configuration name.  Edit
+`src/config.h', and change the two `#include' directives to include
+the appropriate system and architecture description files.
+
+2) Edit `./src/config.h' to set the right options for your system.  If
+you need to override any of the definitions in the s/*.h and m/*.h
+files for your system and machine, do so by editing config.h, not by
+changing the s/*.h and m/*.h files.  Occasionally you may need to
+redefine parameters used in `./lib-src/movemail.c'.
+
+3) If you're going to use the make utility to build XEmacs, you will
+still need to run `configure' first, giving the appropriate values for
+the variables in the sections entitled "Things `configure' Might Edit"
+and "Where To Install Things."  Note that you may only need to change
+the variables `prefix' and `exec_prefix', since the rest of the
+variables have reasonable defaults based on them.  For each Makefile
+variable of this type, there is a corresponding configure option; for
+example, to change the location of the lock directory, you might use
+
+        ./configure --lockdir=/nfs/xemacslock
+
+The `configure' script is built from `configure.in' by the `autoconf'
+program.  However, since XEmacs has configuration requirements that
+autoconf can't meet, `configure.in' uses a marriage of custom-baked
+configuration code and autoconf macros.  New versions of autoconf
+could very well break this arrangement, so it may be wise to avoid
+rebuilding `configure' from `configure.in' when possible.
+
+
+BUILDING XEMACS BY HAND
+
+Once XEmacs is configured, running `make' in the top directory performs
+the following steps.
+
+1) Run `make src/paths.h' in the top directory.  This produces
+`./src/paths.h' from the template file `./src/paths.h.in', changing
+the paths to the values specified in `./Makefile'.
+
+2) Cd to `./lib-src' and run `make'.  This creates executables named
+`ctags' and `etags' and `wakeup' and `make-docfile' and `digest-doc'
+and `test-distrib'.  And others.
+
+3) Cd to `./src' and Run `make'.  This refers to files in the `./lisp'
+and `./lib-src' subdirectories using names `../lisp' and
+`../lib-src'.
+
+This creates a file `./src/xemacs' which is the runnable XEmacs,
+assigning it a new build version number by incrementing the build
+version stored in `./lisp/version.el'.
+
+It also creates a file in `./lib-src' whose name is `DOC' followed by
+the current XEmacs version.  This file contains documentation strings
+for all the functions in XEmacs.  Each time you run make to make a new
+xemacs, a new DOC file with a new name is made.  You must keep the DOC
+file for an XEmacs version as long as you keep using that XEmacs
+version.
+
+
+INSTALLATION BY HAND
+
+The steps below are done by running `make install' in the main
+directory of the XEmacs distribution.
+
+1) Copy `./lisp' and its subdirectories, `./etc', and the executables
+in `./lib-src' to their final destinations, as selected in `./src/paths.h'.
+
+Strictly speaking, not all of the executables in `./lib-src' need be copied.
+- The programs `cvtmail', `emacsserver', `env', `fakemail', `hexl',
+    `movemail', `timer', `vcdiff', `wakeup', and `yow' are used by
+    XEmacs; they do need to be copied.
+- The programs `etags', `ctags', `emacsclient', `b2m', `rcs2log',
+    `gnuclient', `gnudoit', and `gnuattach' are intended to be run
+    by users; they are handled below.
+- The programs `make-docfile' and `test-distrib' were
+    used in building XEmacs, and are not needed any more.
+- The programs `digest-doc' and `sorted-doc' convert a `DOC' file into
+    a file for users to read.  There is no important reason to move them.
+
+2) Copy the files in `./info' to the place specified in
+`./lisp/site-init.el' or `./lisp/paths.el'.  Note that if the
+destination directory already contains a file named `dir', you
+probably don't want to replace it with the `dir' file in the XEmacs
+distribution.  Instead, you should make sure that the existing `dir'
+file contains an appropriate menu entry for the XEmacs info.
+
+3) Create a directory for XEmacs to use for clash detection, named as
+indicated by the PATH_LOCK macro in `./src/paths.h'.
+
+4) Copy `./src/xemacs' to `/usr/local/bin', or to some other directory
+in users' search paths.  `./src/xemacs' has an alternate name
+`./src/emacs-EMACSVERSION'; you may wish to make a symbolic link named
+`/usr/local/bin/xemacs' pointing to that alternate name, as an easy way
+of installing different versions.
+
+You can delete `./src/temacs'.
+
+5) Copy the programs `b2m', `emacsclient', `ctags', `etags', `rcs2log',
+`gnuclient', `gnudoit', and `gnuattach' from `./lib-src' to
+`/usr/local/bin'.  These programs are intended for users to run.
+
+6) Copy the man pages in `./etc' for xemacs, ctags, etags, and gnuserv
+into the appropriate man directories.
+
+7) The files in the `./src' subdirectory, except for `xemacs', are not
+used by XEmacs once it is built.  The source would be handy for
+debugging.
+
+
+PROBLEMS
+
+See the file PROBLEMS in this directory for a list of various
+problems sometimes encountered, and what to do about them.
+
+
+If all else fails, please see etc/InstallGuide courtesy
+of Jonathan Seth Hayward.
diff --git a/Makefile.in.in b/Makefile.in.in
new file mode 100644 (file)
index 0000000..5d6f4f2
--- /dev/null
@@ -0,0 +1,632 @@
+## DIST: This is the distribution Makefile for XEmacs.  configure can
+## DIST: make most of the changes to this file you might want, so try
+## DIST: that first.
+
+## 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; see the file COPYING.  If not, write to
+## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+## Boston, MA 02111-1307, USA.
+
+## make all    to compile and build XEmacs.
+## make install        to build and install it.
+## make install-only   to install after a previous complete build
+## make TAGS   to update tags tables.
+
+## make clean  or  make mostlyclean
+##      Delete all files from the current directory that are normally
+##      created by building the program.        Don't delete the files that
+##      record the configuration.  Also preserve files that could be made
+##      by building, but normally aren't because the distribution comes
+##      with them.
+
+##      Delete `.dvi' files here if they are not part of the distribution.
+
+## make distclean
+##      Delete all files from the current directory that are created by
+##      configuring or building the program.  If you have unpacked the
+##      source and built the program without creating any other files,
+##      `make distclean' should leave only the files that were in the
+##      distribution.
+
+## make realclean
+##      Delete everything from the current directory that can be
+##      reconstructed with this Makefile.  This typically includes
+##      everything deleted by distclean, plus more: C source files
+##      produced by Bison, tags tables, info files, and so on.
+
+## make extraclean
+##      Still more severe - delete backup and autosave files, too.
+
+#ifdef USE_GNU_MAKE
+RECURSIVE_MAKE=$(MAKE)
+#else
+@SET_MAKE@
+RECURSIVE_MAKE=@RECURSIVE_MAKE@
+#endif
+
+SHELL = /bin/sh
+LANG = C
+RM = rm -f
+pwd = /bin/pwd
+
+## ==================== Things `configure' Might Edit ====================
+
+CC=@CC@
+CPP=@CPP@
+LN_S=@LN_S@
+CFLAGS=@CFLAGS@
+CPPFLAGS=@CPPFLAGS@
+
+## These help us choose version- and architecture-specific directories
+## to install files in.
+
+## This should be the number of the XEmacs version we're building,
+## like `19.12' or `19.13'.
+version=@version@
+
+## This should be the name of the configuration we're building XEmacs
+## for, like `mips-dec-ultrix' or `sparc-sun-sunos'.
+configuration=@configuration@
+
+## This will be the name of the generated binary and is set automatically
+## by configure.
+PROGNAME=@PROGNAME@
+
+## ==================== Where To Install Things ====================
+
+## The default location for installation.  Everything is placed in
+## subdirectories of this directory.  The default values for many of
+## the variables below are expressed in terms of this one, so you may
+## not need to change them.  This defaults to /usr/local.
+prefix=@prefix@
+
+## Like `prefix', but used for architecture-specific files.
+exec_prefix=@exec_prefix@
+
+## Where to install XEmacs and other binaries that people will want to
+## run directly (like etags).
+bindir=@bindir@
+
+## Where to install architecture-independent data files.
+## ${lispdir} and ${etcdir} are subdirectories of this.
+datadir=@datadir@
+
+## Where to find XEmacs packages.
+pkgdir=@pkgdir@
+
+## Where to install and expect the files that XEmacs modifies as it runs.
+## These files are all architecture-independent. Right now, the
+## only such data is the locking directory;
+## ${lockdir} is a subdirectory of this.
+statedir=@statedir@
+
+## Where to install and expect executable files to be run by XEmacs
+## rather than directly by users, and other architecture-dependent data
+## ${archlibdir} is a subdirectory of this.
+libdir=@libdir@
+
+## Where to install XEmacs's man pages, and what extension they should have.
+mandir=@mandir@
+manext=.1
+
+## Where to install and expect the info files describing XEmacs.  In the
+## past, this defaulted to a subdirectory of ${prefix}/lib/xemacs, but
+## since there are now many packages documented with the texinfo
+## system, it is inappropriate to imply that it is part of XEmacs.
+infodir=@infodir@
+
+## Document me.
+## See callproc.c for code which references this.
+infopath=@infopath@
+
+## Where to find the source code.  The source code for XEmacs's C kernel is
+## expected to be in ${srcdir}/src, and the source code for XEmacs's
+## utility programs is expected to be in ${srcdir}/lib-src.  This is
+## set by the configure script's `--srcdir' option.
+srcdir=@srcdir@
+
+## Where the build is done.
+blddir=@blddir@
+
+## ==================== XEmacs-specific directories ====================
+
+## These variables hold the values XEmacs will actually use.  They are
+## based on the values of the standard Make variables above.
+
+## Where to install the lisp files distributed with
+## XEmacs.  This includes the XEmacs version, so that the
+## lisp files for different versions of XEmacs will install
+## themselves in separate directories.
+lispdir=@lispdir@
+
+## Directory XEmacs should search for lisp files specific
+## to this site (i.e. customizations), before consulting
+## ${lispdir}.
+sitelispdir=@sitelispdir@
+
+## Where XEmacs will search for its lisp files while
+## building.  This is only used during the process of
+## compiling XEmacs, to help XEmacs find its lisp files
+## before they've been installed in their final location.
+## It's usually identical to lispdir, except that the
+## entry for the directory containing the installed lisp
+## files has been replaced with ../lisp.  This should be a
+## colon-separated list of directories.
+buildlispdir=${srcdir}/lisp
+
+## Where to install the other architecture-independent
+## data files distributed with XEmacs (like the tutorial,
+## the cookie recipes and the Zippy database). This path
+## usually contains the XEmacs version number, so the data
+## files for multiple versions of XEmacs may be installed
+## at once.
+etcdir=@etcdir@
+
+## Where to create and expect the locking directory, where
+## the XEmacs locking code keeps track of which files are
+## currently being edited.
+lockdir=@lockdir@
+
+## Where to put executables to be run by XEmacs rather than
+## the user.  This path usually includes the XEmacs version
+## and configuration name, so that multiple configurations
+## for multiple versions of XEmacs may be installed at
+## once.
+archlibdir=@archlibdir@
+
+## ==================== Utility Programs for the Build ====================
+
+## Allow the user to specify the install program.
+INSTALL = @install_pp@ @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+## ============================= Targets ==============================
+
+## Subdirectories to make recursively.  `lisp' is not included
+## because the compiled lisp files are part of the distribution
+## and you cannot remake them without installing XEmacs first.
+MAKE_SUBDIR = @MAKE_SUBDIR@
+
+## Subdirectories that can be made recursively.
+SUBDIR = ${MAKE_SUBDIR} man
+
+## The makefiles of the directories in ${MAKE_SUBDIR}.
+SUBDIR_MAKEFILES = @SUBDIR_MAKEFILES@
+
+## Subdirectories to `make install-arch-dep' recursively
+INSTALL_ARCH_DEP_SUBDIR = @INSTALL_ARCH_DEP_SUBDIR@
+
+## Subdirectories to install, and where they'll go.
+## lib-src's makefile knows how to install it, so we don't do that here.
+## When installing the info files, we need to do special things to
+## avoid nuking an existing dir file, so we don't do that here;
+## instead, we have written out explicit code in the `install' targets.
+COPYDIR = ${srcdir}/etc ${srcdir}/lisp
+COPYDESTS = ${etcdir} ${lispdir}
+GENERATED_HEADERS = src/paths.h src/Emacs.ad.h src/puresize-adjust.h src/config.h lwlib/config.h src/sheap-adjust.h
+GENERATED_LISP = lisp/finder-inf.el
+
+all: ${PROGNAME} all-elc info
+
+${PROGNAME}:   ${GENERATED_HEADERS} ${MAKE_SUBDIR} ${GENERATED_LISP}
+
+## For performance and consistency, no built-in rules
+.SUFFIXES:
+
+.NO_PARALLEL:  ${GENERATED_HEADERS} ${MAKE_SUBDIR} dump-elcs
+.PHONY: ${SUBDIR} all beta all-elc all-elcs dump-elc dump-elcs autoloads finder
+
+## Convenience target for XEmacs beta testers
+beta: clean all-elc finder
+
+## Convenience target for XEmacs maintainers
+## This would run `make-xemacsdist' if I were really confident that everything
+## was turnkey.
+dist: all-elc info
+
+## Convenience target for XEmacs maintainers
+## Updates some rarely generated files:
+## - configure from configure.in
+## - config.values.in from configure
+## - src/depend from src/*.[ch]
+.PHONY: config configure depend
+config: configure depend
+configure: ${srcdir}/configure
+${srcdir}/configure: ${srcdir}/configure.in
+       cd ${srcdir} && autoconf
+       cd ${srcdir} && /bin/sh lib-src/config.values.sh
+
+depend ${srcdir}/src/depend:
+       cd ${srcdir}/src && \
+               perl ./make-src-depend > depend.tmp && \
+               $(RM) depend && mv depend.tmp depend
+
+## Build XEmacs and recompile out-of-date and missing .elc files along
+## the way.
+all-elc all-elcs: lib-src lwlib dump-elcs src
+       MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' sh ${srcdir}/lib-src/update-elc.sh
+
+## Sub-target for all-elc.
+dump-elc dump-elcs: ${GENERATED_HEADERS} FRC.dump-elcs
+       cd ./src && $(RECURSIVE_MAKE) dump-elcs
+
+autoloads: src
+       MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' sh ${srcdir}/lib-src/update-autoloads.sh
+
+custom-loads:
+       MAKE='$(MAKE)' EMACS='./src/$(PROGNAME)' sh ${srcdir}/lib-src/update-custom.sh
+
+finder: src
+       @echo "Building finder database ..."
+       @(cd ./lisp; \
+               ${blddir}/src/${PROGNAME} -batch -vanilla \
+               -eval '(setq finder-compile-keywords-quiet t)' \
+               -l finder -f finder-compile-keywords )
+       @echo "Building finder database ...(done)"
+
+lisp/finder-inf.el:
+       @echo "Building finder database ..."
+       @(cd ./lisp; \
+               ${blddir}/src/${PROGNAME} -batch -vanilla \
+               -eval '(setq finder-compile-keywords-quiet t)' \
+               -l finder -f finder-compile-keywords )
+       @echo "Building finder database ...(done)"
+
+## We have to force the building of Emacs.ad.h as well in order to get it
+## updated correctly when VPATH is being used.  Since we use move-if-change,
+## it will only actually change if the user modified ${etcdir}/Emacs.ad.
+src/Emacs.ad.h: ${srcdir}/etc/Emacs.ad
+       @echo "Producing \`src/Emacs.ad.h' from \`etc/Emacs.ad'."
+       @$(RM) src/Emacs.ad.h
+       @(echo "/*      Do not edit this file!" ; \
+         echo "        Automatically generated from ${srcdir}/etc/Emacs.ad" ; \
+         echo " */" ; \
+         /bin/sh ${srcdir}/lib-src/ad2c ${srcdir}/etc/Emacs.ad ) > \
+         src/Emacs.ad.h
+
+src/puresize-adjust.h: ${srcdir}/src/puresize.h
+       @echo "Resetting \`src/puresize-adjust.h'."; \
+       (echo "/*       Do not edit this file!" ; \
+        echo "         Automatically generated by XEmacs */" ; \
+        echo "#define PURESIZE_ADJUSTMENT 0") > $@
+
+src/sheap-adjust.h:
+       @echo "Resetting \`src/sheap-adjust.h'."; \
+       (echo "/*       Do not edit this file!" ; \
+        echo "         Automatically generated by XEmacs */" ; \
+        echo "#define SHEAP_ADJUSTMENT 0") > $@
+
+src: @SRC_SUBDIR_DEPS@ FRC.src
+pkg-src/tree-x: pkg-src/FRC.tree-x
+lib-src: FRC.lib-src
+lwlib: FRC.lwlib
+dynodump: FRC.dynodump
+FRC.src FRC.lib-src FRC.lwlib FRC.dynodump pkg-src/FRC.tree-x:
+FRC.lisp.finder-inf.el:
+
+${SUBDIR}: ${SUBDIR_MAKEFILES} ${GENERATED_HEADERS} FRC
+       cd ./$@ && $(RECURSIVE_MAKE) all
+
+Makefile: ${srcdir}/Makefile.in config.status
+       ./config.status
+
+src/Makefile: ${srcdir}/src/Makefile.in.in ${srcdir}/src/depend config.status
+       ./config.status
+
+lib-src/Makefile: ${srcdir}/lib-src/Makefile.in.in config.status
+       ./config.status
+
+lwlib/Makefile: ${srcdir}/lwlib/Makefile.in.in config.status
+       ./config.status
+
+pkg-src/tree-x/Makefile: ${srcdir}/pkg-src/tree-x/Makefile.in.in config.status
+       ./config.status
+
+src/config.h: ${srcdir}/src/config.h.in
+       ./config.status && touch $@
+
+src/paths.h: ${srcdir}/src/paths.h.in
+       ./config.status && touch $@
+
+lwlib/config.h: ${srcdir}/lwlib/config.h.in
+       ./config.status && touch $@
+
+## ==================== Installation ====================
+
+## If we let lib-src do its own installation, that means we
+## don't have to duplicate the list of utilities to install in
+## this Makefile as well.
+
+## On AIX, use tar xBf.
+## On Xenix, use tar xpf.
+
+.PHONY: install-only install install-arch-dep install-arch-indep gzip.el mkdir
+.PHONY: check-features
+
+## We delete each directory in ${COPYDESTS} before we copy into it;
+## that way, we can reinstall over directories that have been put in
+## place with their files read-only (perhaps because they are checked
+## into RCS).  In order to make this safe, we make sure that the
+## source exists and is distinct from the destination.
+
+## FSF doesn't depend on `all', but rather on ${MAKE_SUBDIR}, so that
+## they "won't ever modify src/paths.h".  But that means you can't do
+## 'make install' right off the bat because src/paths.h won't exist.
+## And, in XEmacs case, src/Emacs.ad.h won't exist either.  I also
+## don't see the point in avoiding modifying paths.h.  It creates an
+## inconsistency in the build process.  So we go ahead and depend on
+## all.  --cet
+
+check-features: all
+       ${blddir}/src/${PROGNAME} -batch -l check-features.el
+
+install-only: ${MAKE_SUBDIR} check-features install-arch-dep install-arch-indep
+
+install: all check-features install-arch-dep install-arch-indep
+
+install-arch-dep: mkdir
+       for subdir in ${INSTALL_ARCH_DEP_SUBDIR}; do \
+       (cd ./$${subdir} && $(RECURSIVE_MAKE) install prefix=${prefix} \
+           exec_prefix=${exec_prefix} bindir=${bindir} libdir=${libdir} \
+           archlibdir=${archlibdir}) ; done
+       if test "`(cd ${archlibdir} && $(pwd))`" != \
+               "`(cd ./lib-src && $(pwd))`"; then \
+          if test -f ../Installation; then \
+               ${INSTALL_DATA} ../Installation ${archlibdir}/Installation; \
+          fi; \
+          for f in DOC config.values; do \
+               ${INSTALL_DATA} lib-src/$${f} ${archlibdir}/$${f}; \
+          done ; \
+          for subdir in `find ${archlibdir} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; \
+            do (cd $${subdir} && $(RM) -r RCS CVS SCCS \#* *~) ; done ; \
+       else true; fi
+       ${INSTALL_PROGRAM} src/${PROGNAME} ${bindir}/${PROGNAME}-${version}
+       -chmod 0755 ${bindir}/${PROGNAME}-${version}
+       cd ${bindir} && $(RM) ./${PROGNAME} && ${LN_S} ${PROGNAME}-${version} ./${PROGNAME}
+       if test "${prefix}" != "${exec_prefix}"; then \
+         for dir in \
+               lib/${PROGNAME} \
+               lib/${PROGNAME}-${version}/etc \
+               lib/${PROGNAME}-${version}/info \
+               lib/${PROGNAME}-${version}/lisp; do \
+           if test ! -d ${exec_prefix}/$${dir}; then \
+             $(LN_S) ${prefix}/$${dir} ${exec_prefix}/$${dir}; fi; \
+         done; \
+       fi
+
+install-arch-indep: mkdir info
+       -@set ${COPYDESTS} ; \
+        for dir in ${COPYDIR} ; do \
+          if test "`(cd $$1 && $(pwd))`" != \
+                  "`(cd $${dir} && $(pwd))`"; then \
+            : do nothing - echo "rm -rf $$1" ; \
+          fi ; \
+          shift ; \
+        done
+       -set ${COPYDESTS} ; \
+        for dir in ${COPYDESTS} ; do \
+          if test ! -d $${dir} ; then mkdir $${dir} ; fi ; \
+        done ; \
+        for dir in ${COPYDIR} ; do \
+          dest=$$1 ; shift ; \
+          test -d $${dir} \
+            -a "`(cd $${dir} && $(pwd))`" != \
+               "`(cd $${dest} && $(pwd))`" \
+          && (echo "Copying $${dir}..." ; \
+              (cd $${dir} && tar -cf - . ) | \
+               (cd $${dest} && umask 022 && tar -xf - );\
+              chmod 0755 $${dest}; \
+              for subdir in `find $${dest} -type d ! -name RCS ! -name SCCS ! -name CVS -print` ; do \
+                (cd $${subdir} && $(RM) -r RCS CVS SCCS \#* *~) ; \
+              done) ; \
+        done
+       if test "`(cd ${srcdir}/info && $(pwd))`" != \
+               "`(cd ${infodir} && $(pwd))`" && cd ${srcdir}/info; then \
+         if test ! -f ${infodir}/dir -a -f dir ; then \
+           ${INSTALL_DATA} ${srcdir}/info/dir ${infodir}/dir ; \
+         fi ; \
+         for file in *.info* ; do \
+           ${INSTALL_DATA} $${file} ${infodir}/$${file} ; \
+           chmod 0644 ${infodir}/$${file}; \
+         done ; \
+       fi
+       ## Note it's `xemacs' not ${PROGNAME}
+       cd ${srcdir}/etc && \
+         for page in xemacs etags ctags gnuserv gnuclient gnuattach gnudoit; do \
+           ${INSTALL_DATA} ${srcdir}/etc/$${page}.1 ${mandir}/$${page}${manext} ; \
+           chmod 0644 ${mandir}/$${page}${manext} ; \
+         done
+       @echo "If you would like to save approximately 2M of disk space, do"
+       @echo "make gzip-el"
+       @echo "or you may run "
+       @echo ${srcdir}/lib-src/gzip-el.sh lispdir " from the command line."
+       @echo "Where lispdir is where the lisp files were installed, i.e.,"
+       @echo "${lispdir}"
+
+gzip-el:
+       ${srcdir}/lib-src/gzip-el.sh ${lispdir}
+
+MAKEPATH=./lib-src/make-path
+## Build all the directories to install XEmacs in.
+## Since we may be creating several layers of directories,
+## (e.g. /usr/local/lib/${PROGNAME}-20.5/sparc-sun-solaris2.6), we use
+## make-path instead of mkdir.  Not all mkdirs have the `-p' flag.
+mkdir: FRC.mkdir
+       ${MAKEPATH} ${COPYDESTS} ${lockdir} ${infodir} ${archlibdir} \
+         ${mandir} ${bindir} ${datadir} ${libdir} ${pkgdir}
+       -chmod 0777 ${lockdir}
+
+## Delete all the installed files that the `install' target would
+## create (but not the noninstalled files such as `make all' would
+## create).
+
+#### Don't delete the lisp and etc directories if they're in the source tree.
+#### This target has not been updated in sometime and until it is it
+#### would be extremely dangerous for anyone to use it.
+##uninstall:
+##     (cd ./lib-src;                                  \
+##      $(RECURSIVE_MAKE) uninstall                    \
+##         prefix=${prefix} exec_prefix=${exec_prefix} \
+##         bindir=${bindir} libdir=${libdir} archlibdir=${archlibdir})
+##     for dir in ${lispdir} ${etcdir} ; do            \
+##       case `(cd $${dir} ; $(pwd))` in                       \
+##         `(cd ${srcdir} ; $(pwd))`* ) ;;             \
+##         * ) $(RM) $${dir} ;;                        \
+##       esac ;                                        \
+##       case $${dir} in                               \
+##         ${datadir}/${PROGNAME}/${version}/* )               \
+##           $(RM) -r ${datadir}/${PROGNAME}/${version}        \
+##         ;;                                          \
+##       esac ;                                        \
+##     done
+##     cd ${infodir} && $(RM) cl* ${PROGNAME}* forms* info* vip*
+##     cd ${mandir} && $(RM) xemacs.1 etags.1 ctags.1 gnuserv.1
+##     cd ${bindir} && $(RM) ${PROGNAME}-${version} ${PROGNAME}
+
+
+## Some makes seem to remember that they've built something called FRC,
+## so you can only use a given FRC once per makefile.
+FRC FRC.src.paths.h FRC.mkdir FRC.dump-elcs FRC.info:
+FRC.mostlyclean FRC.clean FRC.distclean FRC.realclean FRC.tags:
+
+## ==================== Cleaning up and miscellanea ====================
+
+.PHONY: mostlyclean clean distclean realclean extraclean
+
+## `mostlyclean'
+##      Like `clean', but may refrain from deleting a few files that people
+##      normally don't want to recompile.  For example, the `mostlyclean'
+##      target for GCC does not delete `libgcc.a', because recompiling it
+##      is rarely necessary and takes a lot of time.
+mostlyclean: FRC.mostlyclean
+       for d in $(SUBDIR); do (cd ./$$d && $(RECURSIVE_MAKE) $@); done
+
+## `clean'
+##      Delete all files from the current directory that are normally
+##      created by building the program.  Don't delete the files that
+##      record the configuration.  Also preserve files that could be made
+##      by building, but normally aren't because the distribution comes
+##      with them.
+
+##      Delete `.dvi' files here if they are not part of the distribution.
+clean: FRC.clean
+       for d in $(SUBDIR); do (cd ./$$d && $(RECURSIVE_MAKE) $@); done
+       $(RM) core
+
+## `distclean'
+##      Delete all files from the current directory that are created by
+##      configuring or building the program.  If you have unpacked the
+##      source and built the program without creating any other files,
+##      `make distclean' should leave only the files that were in the
+##      distribution.
+top_distclean=\
+       $(RM) config.status config.log config-tmp-* build-install Installation ; \
+       for d in src lib-src lwlib dynodump ; do \
+         $(RM) $$d/Makefile $$d/Makefile.in ; \
+       done ; \
+       $(RM) core .sbinit Makefile Makefile.in lock/*; \
+       $(RM) lisp/finder-inf.el* Installation.el Installation.elc; \
+       $(RM) packages mule-packages site-lisp
+
+distclean: FRC.distclean
+       for d in $(SUBDIR); do (cd ./$$d && $(RECURSIVE_MAKE) $@); done
+       -${top_distclean}
+
+## `realclean'
+##      Delete everything from the current directory that can be
+##      reconstructed with this Makefile.  This typically includes
+##      everything deleted by distclean, plus more: C source files
+##      produced by Bison, tags tables, info files, and so on.
+
+##      One exception, however: `make realclean' should not delete
+##      `configure' even if `configure' can be remade using a rule in the
+##      Makefile.  More generally, `make realclean' should not delete
+##      anything that needs to exist in order to run `configure' and then
+##      begin to build the program.
+realclean: FRC.realclean
+       for d in $(SUBDIR); do (cd ./$$d && $(RECURSIVE_MAKE) $@); done
+       -${top_distclean}
+       $(RM) TAGS
+
+## This doesn't actually appear in the coding standards, but Karl
+## says GCC supports it, and that's where the configuration part of
+## the coding standards seem to come from.  It's like distclean, but
+## it deletes backup and autosave files too.
+extraclean:
+       for d in $(SUBDIR); do (cd ./$$d && $(RECURSIVE_MAKE) $@); done
+       $(RM) *~ \#*
+       -${top_distclean}
+
+## Unlocking and relocking.  The idea of these productions is to reduce
+## hassles when installing an incremental tar of XEmacs.  Do `make unlock'
+## before unlocking the file to take the write locks off all sources so
+## that tar xvof will overwrite them without fuss.  Then do `make relock'
+## afterward so that VC mode will know which files should be checked in
+## if you want to mung them.
+
+## Note: it's no disaster if these productions miss a file or two; tar
+## and VC will swiftly let you know if this happens, and it is easily
+## corrected.
+SOURCES = ChangeLog GETTING.GNU.SOFTWARE INSTALL Makefile.in PROBLEMS \
+       README build-install.in configure make-dist move-if-change
+
+.PHONY: unlock relock TAGS tags check dist info dvi mcs
+
+unlock:
+       chmod u+w $(SOURCES) cpp/*
+       -cd ./elisp && chmod u+w Makefile README *.texi
+       for d in src etc lib-src lisp; do (cd ./$$d && $(RECURSIVE_MAKE) $@); done
+       cd ./lisp/term && chmod u+w README *.el
+       cd ./man && chmod u+w *texi* ChangeLog split-man
+       cd ./lwlib && chmod u+w *.[ch] Makefile.in.in
+
+relock:
+       chmod u-w $(SOURCES) cpp/*
+       -cd ./elisp && chmod u-w Makefile README *.texi
+       for d in src etc lib-src lisp; do (cd ./$$d && $(RECURSIVE_MAKE) $@); done
+       cd ./lisp/term && chmod u+w README *.el
+       cd ./man && chmod u+w *texi* ChangeLog split-man
+       cd ./lwlib && chmod u+w *.[ch] Makefile.in.in
+
+PRUNE_VC = -name SCCS -prune -o -name RCS -prune -o -name CVS -prune -o
+tagslisp = lisp
+TAGS tags: FRC.tags
+       @echo "If you don't have a copy of etags around, then do 'make lib-src' first."
+       $(RM) ${srcdir}/TAGS
+       @PATH=`$(pwd)`/lib-src:$$PATH HOME=/-=-; export PATH HOME; \
+         echo "Using etags from `which etags`."
+       PATH=`$(pwd)`/lib-src:$$PATH ; export PATH; cd ${srcdir} && \
+       find src lwlib lib-src ${PRUNE_VC} -name '*.[ch]' -print | \
+         xargs etags -a -r '/[         ]*DEF\(VAR\|INE\)_[A-Z_]+[      ]*([    ]*"\([^"]+\)"/\2/'; \
+       find ${tagslisp} ${PRUNE_VC} -name '*.el' ! -name 'auto-autoloads.el' -print | \
+         xargs etags -a -l none -r "/^(def\\(var\\|un\\|alias\\|const\\|macro\\|subst\\|struct\\|face\\|group\\|custom\\|ine-\\(function\\|compiler-macro\\|[a-z-]+alias\\)\\)[        ]+'?\\([^       ]+\\)/\\3/"
+
+check:
+       cd ./src && $(RECURSIVE_MAKE) $@
+
+info: FRC.info
+       cd ${srcdir}/man && $(RECURSIVE_MAKE) $@
+
+dvi:
+       cd ${srcdir}/man && $(RECURSIVE_MAKE) $@
+
+## Fix up version information in executables (Solaris-only)
+mcs:
+       date=`LANG=C LC_ALL=C date -u '+%e %b %Y'`; \
+       ident="@(#)RELEASE VERSION XEmacs ${version} $${date}"; \
+       for f in `file lib-src/* src/${PROGNAME} | grep ELF | sed -e 's/:.*//'`; do \
+         mcs -da "$${ident} `echo $${f} | sed 's/.*\///'`" $${f}; \
+       done
diff --git a/PROBLEMS b/PROBLEMS
new file mode 100644 (file)
index 0000000..072fc72
--- /dev/null
+++ b/PROBLEMS
@@ -0,0 +1,1475 @@
+                                                  -*- mode:outline -*-
+
+This file describes various problems that have been encountered
+in compiling, installing and running XEmacs.  It has been updated for
+XEmacs 21.2.
+
+This file is rather large, but we have tried to sort the entries by
+their respective relevance for XEmacs, but may have not succeeded
+completely in that task.  The file is divided into four parts:
+
+ - Problems with building XEmacs
+ - Problems with running XEmacs
+ - Compatibility problems
+ - Mule issues
+
+Use `C-c C-f' to move to the next equal level of outline, and
+`C-c C-b' to move to previous equal level.  `C-h m' will give more
+info about the Outline mode.
+
+Also, Try finding the things you need using one of the search commands
+XEmacs provides (e.g. `C-s').
+
+A general advice:
+    WATCH OUT for .emacs file!  ~/.emacs is your Emacs init file.  If
+    you observe strange problems, invoke XEmacs with the `-q' option
+    and see if you can repeat the problem.
+
+
+* Problems with building XEmacs
+===============================
+
+** Don't use -O2 with gcc 2.7.2 under Intel/XXX without also using
+`-fno-strength-reduce'.
+
+gcc will generate incorrect code otherwise.  This bug is present in at
+least 2.6.x and 2.7.[0-2].  This bug has been fixed in GCC 2.7.2.1 and
+later.  This bug is O/S independent, but is limited to x86 architectures.
+
+This problem is known to be fixed in egcs (or pgcc) 1.0 or later.
+
+** Don't use -O2 with gcc 2.7.2 under Intel architectures without also
+using `-fno-caller-saves'.
+
+gcc will generate incorrect code otherwise.  This bug is still
+present in gcc 2.7.2.3.  There have been no reports to indicate the
+bug is present in egcs 1.0 (or pgcc 1.0) or later.  This bug is O/S
+independent, but limited to x86 architectures.
+
+This problem is known to be fixed in egcs (or pgcc) 1.0 or later.
+
+** Excessive optimization with pgcc can break XEmacs
+
+It has been reported on some systems that compiling with -O6 can lead
+to XEmacs failures.  The workaround is to use a lower optimization
+level.  -O2 and -O4 have been tested extensively.
+
+All of this depends heavily on the version of pgcc and the version
+of libc.  Snapshots near the release of pgcc-1.0 have been tested
+extensively and no sign of breakage has been seen on systems using
+glibc-2.
+
+** `compress' and `uncompress' not found and XFree86
+
+XFree86 installs a very old version of libz.a by default ahead of where
+more modern version of libz might be installed.  This will cause problems
+when attempting to link against libMagick.  The fix is to remove the old
+libz.a in the X11 binary directory.
+
+** Excessive optimization on AIX 4.2 can lead to compiler failure.
+
+Valdis.Kletnieks@vt.edu writes:
+  At least at the b34 level, and the latest-and-greatest IBM xlc
+  (3.1.4.4), there are problems with -O3.  I haven't investigated
+  further.
+
+** Sed problems on Solaris 2.5
+
+There have been reports of Sun sed truncating very lines in the
+Makefile during configuration.  The workaround is to use GNU sed or,
+even better, think of a better way to generate Makefile, and send us a 
+patch. :-)
+
+** test-distrib says that the distribution has been clobbered
+or, temacs prints "Command key out of range 0-127"
+or, temacs runs and dumps xemacs, but xemacs totally fails to work.
+or, temacs gets errors dumping xemacs
+
+This can be because the .elc files have been garbled.  Do not be
+fooled by the fact that most of a .elc file is text: these are binary
+files and can contain all 256 byte values.
+
+In particular `shar' cannot be used for transmitting GNU Emacs.  It
+typically truncates "lines".  (this does not apply to GNU shar, which
+uses uuencode to encode binary files.)
+
+If you have a copy of Emacs that has been damaged in its nonprinting
+characters, you can fix them by running:
+
+ make all-elc
+
+This will rebuild all the needed .elc files.
+
+** `Error: No ExtNode to pop!' on Linux systems with Lesstif.
+
+This error message has been observed with lesstif-0.75a.  It does not
+appear to cause any harm.
+
+** Linking with -rpath on IRIX.
+
+Darrell Kindred <dkindred@cmu.edu> writes:
+There are a couple of problems [with use of -rpath with Irix ld], though:
+
+  1. The ld in IRIX 5.3 ignores all but the last -rpath
+     spec, so the patched configure spits out a warning
+     if --x-libraries or --site-runtime-libraries are
+     specified under irix 5.x, and it only adds -rpath 
+     entries for the --site-runtime-libraries.  This bug was
+     fixed sometime between 5.3 and 6.2.
+
+  2. IRIX gcc 2.7.2 doesn't accept -rpath directly, so
+     it would have to be prefixed by -Xlinker or "-Wl,".
+     This would be fine, except that configure compiles with
+        ${CC-cc} $CFLAGS $LDFLAGS ...
+     rather than quoting $LDFLAGS with prefix-args, like
+     src/Makefile does.  So if you specify --x-libraries
+     or --site-runtime-libraries, you must use --use-gcc=no,
+     or configure will fail.
+
+** On Irix 6.3, the SGI ld quits with segmentation fault when linking temacs
+
+This occurs if you use the SGI linker version 7.1.  Installing the
+patch SG0001872 fixes this problem.
+
+** xemacs: can't resolve symbol '__malloc_hook'
+
+This is a Linux problem where you've compiled the XEmacs binary on a libc
+5.4 with version higher than 5.4.19 and attempted to run the binary against
+an earlier version.  The solution is to upgrade your old library.
+
+** Compilation errors on VMS.
+
+Sorry, XEmacs does not work under VMS.  You might consider working on
+the port if you really want to have XEmacs work under VMS.
+
+** On Solaris 2 I get undefined symbols from libcurses.a.
+
+You probably have /usr/ucblib/ on your LD_LIBRARY_PATH.  Do the link with
+LD_LIBRARY_PATH unset.  Generally, avoid using any ucb* stuff when
+building XEmacs.
+
+** On Solaris 2 I cannot make alloc.o, glyphs.o or process.o.
+
+The SparcWorks C compiler may have difficulty building those modules
+with optimization level -xO4.  Try using only "-fast" optimization
+for just those modules.  (Or use gcc).
+
+** On Digital UNIX, the DEC C compiler might have a problem compiling
+some files.
+
+In particular, src/extents.c and src/faces.c might cause the DEC C
+compiler to abort.  When this happens: cd src, compile the files by
+hand, cd .., and redo the "make" command.  When recompiling the files by
+hand, use the old C compiler for the following versions of Digital UNIX:
+  - V3.n: Remove "-migrate" from the compile command.
+  - V4.n: Add "-oldc" to the compile command.
+
+A related compiler bug has been fixed by the DEC compiler team.  The
+new versions of the compiler should run fine.
+
+** On HPUX, the HP C compiler might have a problem compiling some files
+with optimization.
+
+Richard Cognot <cognot@ensg.u-nancy.fr> writes:
+
+  Had to drop once again to level 2 optimization, at least to
+  compile lstream.c. Otherwise, I get a "variable is void: \if"
+  problem while dumping (this is a problem I already reported
+  with vanilla hpux 10.01 and 9.07, which went away after
+  applying patches for the C compiler). Trouble is I still
+  haven't found the same patch for hpux 10.10, and I don't
+  remember the patch numbers. I think potential XEmacs builders
+  on HP should be warned about this.
+
+** I don't have `xmkmf' and `imake' on my HP.
+
+  You can get these standard X tools by anonymous FTP to
+  hpcvaaz.cv.hp.com.  Essentially all X programs need these.
+
+** On HP-UX, problems with make
+
+Marcus Thiessel <marcus_thiessel@hp.com>
+
+  Some releases of XEmacs (e.g. 20.4) require GNU make to build
+  successfully. You don't need GNU make when building 21.x.
+
+** On HP-UX 9.05 XEmacs won't compile or coredump during the build.
+
+Marcus Thiessel <marcus_thiessel@hp.com>
+
+  This might be a sed problem. For your own safety make sure to use
+  GNU sed while dumping XEmacs.
+
+** On HP-UX 11.0 XEmacs causes excessive X11 errors when running.
+
+Marcus Thiessel <marcus_thiessel@hp.com>
+
+  Unfortunately, XEmacs releases don't work with Motif2.1. It
+  will compile but you will get excessive X11 errors like
+
+  xemacs: X Error of failed request:  BadGC (invalid GC parameter)
+
+  and finally XEmacs gets killed. A workaround is to use the
+  Motif1.2_R6 libraries. You can the following line to your call to
+  configure:
+
+     --x-libraries="/usr/lib/Motif1.2_R6 -L/usr/lib/X11R6"
+  Make sure /usr/lib/Motif1.2_R6/libXm.sl is a link to
+  /usr/lib/Motif1.2_R6/libXm.3.
+
+** Solaris 2.3 /bin/sh coredumps during configuration.
+
+This only occurs if you have LANG != C.  This is a known bug with
+/bin/sh fixed by installing Patch-ID# 101613-01.  Or, you can use
+bash, as a workaround.
+
+** On Irix 6.0, make tries (and fails) to build a program named unexelfsgi
+
+A compiler bug inserts spaces into the string "unexelfsgi . o"
+in src/Makefile.  Edit src/Makefile, after configure is run,
+find that string, and take out the spaces.
+
+Compiler fixes in Irix 6.0.1 should eliminate this problem.
+
+** Coredumping in Irix 6.2
+
+Pete Forman <gsez020@compo.bedford.waii.com> writes:
+A problem noted by myself and others (I've lost the references) was
+that XEmacs coredumped when the cut or copy toolbar buttons were
+pressed.  This has been fixed by loading the SGI patchset (Feb 98)
+without having to recompile XEmacs.
+
+My versions are XEmacs 20.3 (problem first noted in 19.15) and IRIX
+6.2, compiled using -n32.  I'd guess that the relevant individual
+patch was "SG0002580: multiple fixes for X libraries".  SGI recommends
+that the complete patch set be installed rather than parts of it.
+
+** Native cc on SCO OpenServer 5 is now OK.  Icc may still throw you
+a curve.  Here is what Robert Lipe <robertl@arnet.com> says:
+
+Unlike XEmacs 19.13, building with the native cc on SCO OpenServer 5 
+now produces a functional binary.   I will typically build this
+configuration for COFF with:
+
+       /path_to_xemacs_source/configure --with-gcc=no \
+         --site-includes=/usr/local/include --site-libraries=/usr/local/lib \
+         --with-xpm --with-xface --with-sound=nas
+
+This version now supports ELF builds.  I highly recommend this to 
+reduce the in-core footprint of XEmacs.  This is now how I compile 
+all my test releases.  Build it like this:
+
+       /path_to_XEmacs_source/configure --with-gcc=no \
+         --site-includes=/usr/local/include --site-libraries=/usr/local/lib \
+         --with-xpm --with-xface --with-sound=nas --dynamic
+
+The compiler known as icc [ supplied with the OpenServer 5 Development 
+System ] generates a working binary, but it takes forever to generate
+XEmacs.  ICC also whines more about the code than /bin/cc does.  I do
+believe all its whining is legitimate, however.    Note that you do
+have to 'cd src ; make  LD=icc' to avoid linker errors.
+
+The way I handle the build procedure is:
+
+       /path_to_XEmacs_source/configure --with-gcc=no \
+         --site-includes=/usr/local/include --site-libraries=/usr/local/lib \
+         --with-xpm --with-xface --with-sound=nas --dynamic --compiler="icc"
+
+NOTE I have the xpm, xface, and audio libraries and includes in 
+       /usr/local/lib, /usr/local/include.  If you don't have these,
+       don't include the "--with-*" arguments in any of my examples.
+
+In previous versions of XEmacs, you had to override the defaults while 
+compiling font-lock.o and extents.o when building with icc.  This seems
+to no longer be true, but I'm including this old information in case it
+resurfaces.  The process I used was:
+
+       make -k    
+       [ procure pizza, beer, repeat ] 
+       cd src
+       make CC="icc -W0,-mP1COPT_max_tree_size=3000" font-lock.o extents.o
+       make LD=icc
+
+If you want sound support, get the tls566 supplement from 
+ftp.sco.com:/TLS or any of its mirrors.  It works just groovy 
+with XEmacs.
+
+The M-x manual-entry is known not to work.  If you know Lisp and would
+like help in making it work, e-mail me at <robertl@dgii.com>.
+(UNCHECKED for 19.15 -- it might work).
+
+In earlier releases, gnuserv/gnuclient/gnudoit would open a frame 
+just fine, but the client would lock up and the server would
+terminate when you used C-x # to close the frame.   This is now 
+fixed in XEmacs.
+
+In etc/ there are two files of note. emacskeys.sco and emacsstrs.sco.
+The comments at the top of emacskeys.sco describe its function, and
+the emacstrs.sco is a suitable candidate for /usr/lib/keyboard/strings
+to take advantage of the keyboard map in emacskeys.sco.
+
+Note: Much of the above entry is probably not valid for XEmacs 21.2
+and later.
+
+** Under some versions of OSF XEmacs runs fine if built without
+optimization but will crash randomly if built with optimization.
+
+Using 'cc -g' is not sufficient to eliminate all optimization.  Try
+'cc -g -O0' instead.
+
+** On SunOS, you get linker errors
+    ld: Undefined symbol 
+       _get_wmShellWidgetClass
+       _get_applicationShellWidgetClass
+
+The fix to this is to install patch 100573 for OpenWindows 3.0
+or link libXmu statically.
+
+** On Sunos 4, you get the error ld: Undefined symbol __lib_version.
+
+This is the result of using cc or gcc with the shared library meant
+for acc (the Sunpro compiler).  Check your LD_LIBRARY_PATH and delete
+/usr/lang/SC2.0.1 or some similar directory.
+
+** On AIX 4.1.2, linker error messages such as
+   ld: 0711-212 SEVERE ERROR: Symbol .__quous, found in the global symbol table
+        of archive /usr/lib/libIM.a, was not defined in archive member shr.o.
+
+This is a problem in libIM.a.  You can work around it by executing
+these shell commands in the src subdirectory of the directory where
+you build Emacs:
+
+    cp /usr/lib/libIM.a .
+    chmod 664 libIM.a
+    ranlib libIM.a
+
+Then change -lIM to ./libIM.a in the command to link temacs (in
+Makefile).
+
+** On Irix 5.2, unexelfsgi.c can't find cmplrs/stsupport.h.
+
+The file cmplrs/stsupport.h was included in the wrong file set in the
+Irix 5.2 distribution.  You can find it in the optional fileset
+compiler_dev, or copy it from some other Irix 5.2 system.  A kludgy
+workaround is to change unexelfsgi.c to include sym.h instead of
+syms.h.
+
+** Link failure when using acc on a Sun.
+
+To use acc, you need additional options just before the libraries, such as
+
+   /usr/lang/SC2.0.1/values-Xt.o -L/usr/lang/SC2.0.1/cg87 -L/usr/lang/SC2.0.1
+
+and you need to add -lansi just before -lc.
+
+The precise file names depend on the compiler version, so we
+cannot easily arrange to supply them.
+
+** Link failure on IBM AIX 1.3 ptf 0013.
+
+There is a real duplicate definition of the function `_slibc_free' in
+the library /lib/libc_s.a (just do nm on it to verify).  The
+workaround/fix is:
+
+    cd /lib
+    ar xv libc_s.a NLtmtime.o
+    ar dv libc_s.a NLtmtime.o
+
+** Undefined symbols when linking on Sunos 4.1.
+
+If you get the undefined symbols _atowc _wcslen, _iswprint, _iswspace,
+_iswcntrl, _wcscpy, and _wcsncpy, then you need to add -lXwchar after
+-lXaw in the command that links temacs.
+
+This problem seems to arise only when the international language
+extensions to X11R5 are installed.
+
+** src/Makefile and lib-src/Makefile are truncated--most of the file missing.
+
+This can happen if configure uses GNU sed version 2.03.  That version
+had a bug.  GNU sed version 2.05 works properly.
+
+** On AIX, you get this compiler error message:
+
+    Processing include file ./XMenuInt.h
+        1501-106: (S) Include file X11/Xlib.h not found.
+
+This means your system was installed with only the X11 runtime i.d
+libraries.  You have to find your sipo (bootable tape) and install
+X11Dev... with smit.
+
+** C-z just refreshes the screen instead of suspending Emacs.
+
+You are probably using a shell that doesn't support job control, even
+though the system itself is capable of it.  Try using a different
+shell.
+
+** On a Sun running SunOS 4.1.1, you get this error message from GNU ld:
+
+    /lib/libc.a(_Q_sub.o): Undefined symbol __Q_get_rp_rd referenced from text segment 
+
+The problem is in the Sun shared C library, not in GNU ld.
+
+The solution is to install Patch-ID# 100267-03 from Sun.
+
+** SunOS 4.1.2: undefined symbol _get_wmShellWidgetClass
+
+  Apparently the version of libXmu.so.a that Sun ships is hosed: it's missing
+  some stuff that is in libXmu.a (the static version).  Sun has a patch for 
+  this, but a workaround is to use the static version of libXmu, by changing
+  the link command from "-lXmu" to "-Bstatic -lXmu -Bdynamic".  If you have
+  OpenWindows 3.0, ask Sun for these patches:
+    100512-02       4.1.x OpenWindows 3.0 libXt Jumbo patch
+    100573-03       4.1.x OpenWindows 3.0 undefined symbols with shared libXmu
+
+** Random other SunOS 4.1.[12] link errors.
+
+  The X headers and libraries that Sun ships in /usr/{include,lib}/X11 are
+  broken.  Use the ones in /usr/openwin/{include,lib} instead.
+
+** When using gcc, you get the error message "undefined symbol __fixunsdfsi".
+When using gcc, you get the error message "undefined symbol __main".
+
+This means that you need to link with the gcc library.  It may be called
+"gcc-gnulib" or "libgcc.a"; figure out where it is, and define LIB_GCC in
+config.h to point to it.
+
+It may also work to use the GCC version of `ld' instead of the standard one.
+
+** When compiling with X11, you get "undefined symbol _XtStrings".
+
+This means that you are trying to link emacs against the X11r4 version of
+libXt.a, but you have compiled either Emacs or the code in the lwlib
+subdirectory with the X11r5 header files.  That doesn't work.
+
+Remember, you can't compile lwlib for r4 and emacs for r5, or vice versa.
+They must be in sync.
+
+** Problems finding X11 libraries on Solaris with Openwindows
+
+Some users have reported problems in this area.  The reported solution
+is to define the environment variable OPENWINHOME, even if you must set
+it to `/usr/openwin'.
+
+** Under Linux, you get "too many arguments to function `getpgrp'".
+
+You have probably installed LessTiff under `/usr/local' and `libXm.so'
+could not be found when linking `getpgrp()' test program, making XEmacs
+think that `getpgrp()' takes an argument. Try adding `/usr/local/lib'
+in `/etc/ld.so.conf' and run `ldconfig'. Then run XEmacs's `configure'
+again.  As with all problems of this type, reading the config.log file
+generated from configure and seeing the log of how the test failed can
+prove enlightening.
+
+
+* Problems with running XEmacs
+==============================
+** On Solaris 2.6, XEmacs dumps core when exiting.
+
+This happens if you're XEmacs is running on the same machine as the X
+server, and the optimized memory transport has been turned on by
+setting the environment variable XSUNTRANSPORT.  The crash occurs
+during the call to XCloseDisplay.
+
+If this describes your situation, you need to undefine the
+XSUNTRANSPORT environment variable.
+
+** `C-z', or `M-x suspend-emacs' hangs instead of suspending.
+
+If you build with `gpm' support on Linux, you cannot suspend XEmacs
+because gpm installs a buggy SIGTSTP handler.  Either compile with
+`--with-gpm=no', or don't suspend XEmacs on the Linux console until
+this bug is fixed.
+
+** You type Control-H (Backspace) expecting to delete characters.
+
+Emacs has traditionally used Control-H for help; unfortunately this
+interferes with its use as Backspace on TTY's.  One way to solve this
+problem is to put this in your .emacs:
+
+  (when (eq tty-erase-char ?\C-h)
+    (keyboard-translate ?\C-h ?\C-?)
+    (global-set-key "\M-?" 'help-command))
+
+This checks whether the TTY erase char is C-h, and if it is, makes
+Control-H (Backspace) work sensibly, and moves help to Meta-? (ESC ?).
+
+Note that you can probably also access help using F1.
+
+** Mail agents (VM, Gnus, rmail) cannot get new mail
+
+rmail and VM get new mail from /usr/spool/mail/$USER using a program
+called `movemail'.  This program interlocks with /bin/mail using the
+protocol defined by /bin/mail.
+
+There are two different protocols in general use.  One of them uses
+the `flock' system call.  The other involves creating a lock file;
+`movemail' must be able to write in /usr/spool/mail in order to do
+this.  You control which one is used by defining, or not defining, the
+macro MAIL_USE_FLOCK in config.h or the m- or s- file it includes.  IF
+YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR SYSTEM,
+YOU CAN LOSE MAIL!
+
+If your system uses the lock file protocol, and fascist restrictions
+prevent ordinary users from writing the lock files in /usr/spool/mail,
+you may need to make `movemail' setgid to a suitable group such as
+`mail'.  To do this, use the following commands (as root) after doing
+the make install.
+
+       chgrp mail movemail
+       chmod 2755 movemail
+
+Installation normally copies movemail from the build directory to an
+installation directory which is usually under /usr/local/lib.  The
+installed copy of movemail is usually in the directory
+/usr/local/lib/emacs/VERSION/TARGET.  You must change the group and
+mode of the installed copy; changing the group and mode of the build
+directory copy is ineffective.
+
+** XEmacs crashes on Digital Unix within font-lock, or when dealing
+with large compilation buffers.
+
+The default stack size under Digital Unix is rather small (2M as
+opposed to Solaris 8M), hosing the regexp code, which uses alloca()
+extensively, overflowing the stack when complex regexps are used.
+Workarounds:
+
+1) Increase your stack size, using `ulimit -s 8192' or a (t)csh
+   equivalent;
+
+2) Recompile regex.c with REGEX_MALLOC defined.
+
+** On Solaris, C-x doesn't get through to Emacs when you use the console.
+
+This is a Solaris feature (at least on Intel x86 cpus).  Type C-r
+C-r C-t, to toggle whether C-x gets through to Emacs.
+
+** VM appears to hang in large folders.
+
+This is normal (trust us) when upgrading to VM-6.22 from earlier
+versions.  Let VM finish what it is doing and all will be well.
+
+** Changes made to .el files do not take effect.
+
+You may have forgotten to recompile them into .elc files.  Then the
+old .elc files will be loaded, and your changes will not be seen.  To
+fix this, do `M-x byte-recompile-directory' and specify the directory
+that contains the Lisp files.
+
+Note that you will get a warning when loading a .elc file that is
+older than the corresponding .el file.
+
+** Things which should be bold or italic (such as the initial
+copyright notice) are not.
+
+The fonts of the "bold" and "italic" faces are generated from the font
+of the "default" face; in this way, your bold and italic fonts will
+have the appropriate size and family.  However, emacs can only be
+clever in this way if you have specified the default font using the
+XLFD (X Logical Font Description) format, which looks like
+
+       *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
+
+if you use any of the other, less strict font name formats, some of
+which look like:
+
+               lucidasanstypewriter-12
+and            fixed
+and            9x13
+
+then emacs won't be able to guess the names of the "bold" and "italic"
+versions.  All X fonts can be referred to via XLFD-style names, so you
+should use those forms.  See the man pages for X(1), xlsfonts(1), and
+xfontsel(1).
+
+** The dumped Emacs crashes when run, trying to write pure data.
+
+Two causes have been seen for such problems.
+
+1) On a system where getpagesize is not a system call, it is defined
+as a macro.  If the definition (in both unexec.c and malloc.c) is wrong,
+it can cause problems like this.  You might be able to find the correct
+value in the man page for a.out (5).
+
+2) Some systems allocate variables declared static among the
+initialized variables.  Emacs makes all initialized variables in most
+of its files pure after dumping, but the variables declared static and
+not initialized are not supposed to be pure.  On these systems you
+may need to add "#define static" to the m- or the s- file.
+
+** Reading and writing files is very very slow.
+
+Try evaluating the form (setq lock-directory nil) and see if that helps.
+There is a problem with file-locking on some systems (possibly related
+to NFS) that I don't understand.  Please send mail to the address 
+xemacs@xemacs.org if you figure this one out.
+
+** The Emacs window disappears when you type M-q.
+
+Some versions of the Open Look window manager interpret M-q as a quit
+command for whatever window you are typing at.  If you want to use
+Emacs with that window manager, you should try to configure the window
+manager to use some other command.   You can disable the
+shortcut keys entirely by adding this line to ~/.OWdefaults:
+
+    OpenWindows.WindowMenuAccelerators: False
+
+** The `Alt' key doesn't behave as `Meta' when running DECwindows.
+
+The default DEC keyboard mapping has the Alt keys set up to generate the
+keysym `Multi_key', which has a meaning to xemacs which is distinct from that
+of the `Meta_L' and `Meta-R' keysyms.  A second problem is that certain keys
+have the Mod2 modifier attached to them for no adequately explored reason.
+The correct fix is to pass this file to xmodmap upon starting X:
+
+       clear mod2
+       keysym Multi_key = Alt_L
+       add mod1 = Alt_L
+       add mod1 = Alt_R
+
+** The Compose key on a DEC keyboard does not work as Meta key.
+
+This shell command should fix it:
+
+  xmodmap -e 'keycode 0xb1 = Meta_L'
+
+** When emacs starts up, I get lots of warnings about unknown keysyms.
+
+If you are running the prebuilt binaries, the Motif library expects to find
+certain thing in the XKeysymDB file.  This file is normally in /usr/lib/X11/
+or in /usr/openwin/lib/.  If you keep yours in a different place, set the
+environment variable $XKEYSYMDB to point to it before starting emacs.  If 
+you still have the problem after doing that, perhaps your version of X is 
+too old.  There is a copy of the MIT X11R5 XKeysymDB file in the emacs `etc'
+directory.  Try using that one.
+
+** My X resources used to work, and now some of them are being ignored.
+
+Check the resources in .../etc/Emacs.ad (which is the same as the file
+sample.Xdefaults).  Perhaps some of the default resources built in to 
+emacs are now overriding your existing resources.  Copy and edit the
+resources in Emacs.ad as necessary.
+
+** I get complaints about the mapping of my HP keyboard at startup,
+but I haven't changed anything.
+
+The default HP keymap is set up to have Mod1 assigned to two different keys:
+Meta_L and Mode_switch (even though there is not actually a Mode_switch key on
+the keyboard -- it uses an "imaginary" keycode.)  There actually is a reason
+for this, but it's not a good one.  The correct fix is to execute this command
+upon starting X:
+
+       xmodmap -e 'remove mod1 = Mode_switch'
+
+** I have focus problems when I use `M-o' to switch to another screen
+without using the mouse.
+
+The focus issues with a program like XEmacs, which has multiple
+homogeneous top-level windows, are very complicated, and as a result,
+most window managers don't implement them correctly.
+
+The R4/R5 version of twm (and all of its descendants) had buggy focus
+handling.  Sufficiently recent versions of tvtwm have been fixed.  In
+addition, if you're using twm, make sure you have not specified
+"NoTitleFocus" in your .tvtwmrc file.  The very nature of this option
+makes twm do some illegal focus tricks, even with the patch.
+
+It is known that olwm and olvwm are buggy, and in different ways.  If
+you're using click-to-type mode, try using point-to-type, or vice
+versa.
+
+In older versions of NCDwm, one could not even type at XEmacs windows.
+This has been fixed in newer versions (2.4.3, and possibly earlier).
+
+(Many people suggest that XEmacs should warp the mouse when focusing
+on another screen in point-to-type mode.  This is not ICCCM-compliant
+behavior.  Implementing such policy is the responsibility of the
+window manager itself, it is not legal for a client to do this.)
+
+** Emacs spontaneously displays "I-search: " at the bottom of the screen.
+
+This means that Control-S/Control-Q (XON/XOFF) "flow control" is being
+used.  C-s/C-q flow control is bad for Emacs editors because it takes
+away C-s and C-q as user commands.  Since editors do not output long
+streams of text without user commands, there is no need for a
+user-issuable "stop output" command in an editor; therefore, a
+properly designed flow control mechanism would transmit all possible
+input characters without interference.  Designing such a mechanism is
+easy, for a person with at least half a brain.
+
+There are three possible reasons why flow control could be taking place:
+
+  1) Terminal has not been told to disable flow control
+  2) Insufficient padding for the terminal in use
+  3) Some sort of terminal concentrator or line switch is responsible
+
+First of all, many terminals have a set-up mode which controls whether
+they generate XON/XOFF flow control characters.  This must be set to
+"no XON/XOFF" in order for Emacs to work.  Sometimes there is an
+escape sequence that the computer can send to turn flow control off
+and on.  If so, perhaps the termcap `ti' string should turn flow
+control off, and the `te' string should turn it on.
+
+Once the terminal has been told "no flow control", you may find it
+needs more padding.  The amount of padding Emacs sends is controlled
+by the termcap entry for the terminal in use, and by the output baud
+rate as known by the kernel.  The shell command `stty' will print
+your output baud rate; `stty' with suitable arguments will set it if
+it is wrong.  Setting to a higher speed causes increased padding.  If
+the results are wrong for the correct speed, there is probably a
+problem in the termcap entry.  You must speak to a local Unix wizard
+to fix this.  Perhaps you are just using the wrong terminal type.
+
+For terminals that lack a "no flow control" mode, sometimes just
+giving lots of padding will prevent actual generation of flow control
+codes.  You might as well try it.
+
+If you are really unlucky, your terminal is connected to the computer
+through a concentrator which sends XON/XOFF flow control to the
+computer, or it insists on sending flow control itself no matter how
+much padding you give it.  Unless you can figure out how to turn flow
+control off on this concentrator (again, refer to your local wizard),
+you are screwed!  You should have the terminal or concentrator
+replaced with a properly designed one.  In the mean time, some drastic
+measures can make Emacs semi-work.
+
+You can make Emacs ignore C-s and C-q and let the operating system
+handle them.  To do this on a per-session basis, just type M-x
+enable-flow-control RET.  You will see a message that C-\ and C-^ are
+now translated to C-s and C-q.  (Use the same command M-x
+enable-flow-control to turn *off* this special mode.  It toggles flow
+control handling.)
+
+If C-\ and C-^ are inconvenient for you (for example, if one of them
+is the escape character of your terminal concentrator), you can choose
+other characters by setting the variables flow-control-c-s-replacement
+and flow-control-c-q-replacement.  But choose carefully, since all
+other control characters are already used by emacs.
+
+IMPORTANT: if you type C-s by accident while flow control is enabled,
+Emacs output will freeze, and you will have to remember to type C-q in
+order to continue.
+
+If you work in an environment where a majority of terminals of a
+certain type are flow control hobbled, you can use the function
+`enable-flow-control-on' to turn on this flow control avoidance scheme
+automatically.  Here is an example:
+
+(enable-flow-control-on "vt200" "vt300" "vt101" "vt131")
+
+If this isn't quite correct (e.g. you have a mixture of flow-control hobbled
+and good vt200 terminals), you can still run enable-flow-control
+manually.
+
+I have no intention of ever redesigning the Emacs command set for the
+assumption that terminals use C-s/C-q flow control.  XON/XOFF flow
+control technique is a bad design, and terminals that need it are bad
+merchandise and should not be purchased.  Now that X is becoming
+widespread, XON/XOFF seems to be on the way out.  If you can get some
+use out of GNU Emacs on inferior terminals, more power to you, but I
+will not make Emacs worse for properly designed systems for the sake
+of inferior systems.
+
+** Control-S and Control-Q commands are ignored completely.
+
+For some reason, your system is using brain-damaged C-s/C-q flow
+control despite Emacs's attempts to turn it off.  Perhaps your
+terminal is connected to the computer through a concentrator
+that wants to use flow control.
+
+You should first try to tell the concentrator not to use flow control.
+If you succeed in this, try making the terminal work without
+flow control, as described in the preceding section.
+
+If that line of approach is not successful, map some other characters
+into C-s and C-q using keyboard-translate-table.  The example above
+shows how to do this with C-^ and C-\.
+
+** Control-S and Control-Q commands are ignored completely on a net
+connection.
+
+Some versions of rlogin (and possibly telnet) do not pass flow
+control characters to the remote system to which they connect.
+On such systems, emacs on the remote system cannot disable flow
+control on the local system.
+
+One way to cure this is to disable flow control on the local host
+(the one running rlogin, not the one running rlogind) using the
+stty command, before starting the rlogin process.  On many systems,
+`stty start u stop u' will do this.
+
+Some versions of tcsh will prevent even this from working.  One way
+around this is to start another shell before starting rlogin, and
+issue the stty command to disable flow control from that shell.
+
+If none of these methods work, the best solution is to type
+`M-x enable-flow-control' at the beginning of your emacs session, or
+if you expect the problem to continue, add a line such as the
+following to your .emacs (on the host running rlogind):
+
+(enable-flow-control-on "vt200" "vt300" "vt101" "vt131")
+
+See the entry about spontaneous display of I-search (above) for more
+info.
+
+** TTY redisplay is slow.
+
+XEmacs has fairly new TTY redisplay support (beginning from 19.12),
+which doesn't include some basic TTY optimizations -- like using
+scrolling regions to move around blocks of text.  This is why
+redisplay on the traditional terminals, or over slow lines can be very 
+slow.
+
+If you are interested in fixing this, please let us know at
+<xemacs@xemacs.org>.
+
+** Screen is updated wrong, but only on one kind of terminal.
+
+This could mean that the termcap entry you are using for that terminal
+is wrong, or it could mean that Emacs has a bug handing the
+combination of features specified for that terminal.
+
+The first step in tracking this down is to record what characters
+Emacs is sending to the terminal.  Execute the Lisp expression
+(open-termscript "./emacs-script") to make Emacs write all terminal
+output into the file ~/emacs-script as well; then do what makes the
+screen update wrong, and look at the file and decode the characters
+using the manual for the terminal.  There are several possibilities:
+
+1) The characters sent are correct, according to the terminal manual.
+
+In this case, there is no obvious bug in Emacs, and most likely you
+need more padding, or possibly the terminal manual is wrong.
+
+2) The characters sent are incorrect, due to an obscure aspect of the
+   terminal behavior not described in an obvious way by termcap.
+
+This case is hard.  It will be necessary to think of a way for Emacs
+to distinguish between terminals with this kind of behavior and other
+terminals that behave subtly differently but are classified the same
+by termcap; or else find an algorithm for Emacs to use that avoids the
+difference.  Such changes must be tested on many kinds of terminals.
+
+3) The termcap entry is wrong.
+
+See the file etc/TERMS for information on changes that are known to be
+needed in commonly used termcap entries for certain terminals.
+
+4) The characters sent are incorrect, and clearly cannot be right for
+   any terminal with the termcap entry you were using.
+
+This is unambiguously an Emacs bug, and can probably be fixed in
+termcap.c, terminfo.c, tparam.c, cm.c, redisplay-tty.c,
+redisplay-output.c, or redisplay.c.
+
+** Your Delete key sends a Backspace to the terminal, using an AIXterm.
+
+The solution is to include in your .Xdefaults the lines:
+
+   *aixterm.Translations: #override <Key>BackSpace: string(0x7f)
+   aixterm*ttyModes: erase ^?
+
+This makes your Backspace key send DEL (ASCII 127).
+
+** With certain fonts, when the cursor appears on a character, the
+character doesn't appear--you get a solid box instead.
+
+One user on a Linux system reported that this problem went away with
+installation of a new X server.  The failing server was XFree86 3.1.1.
+XFree86 3.1.2 works.
+
+** On SunOS 4.1.3, Emacs unpredictably crashes in _yp_dobind_soft.
+
+This happens if you configure Emacs specifying just `sparc-sun-sunos4'
+on a system that is version 4.1.3.  You must specify the precise
+version number (or let configure figure out the configuration, which
+it can do perfectly well for SunOS).
+
+** On Irix, I don't see the toolbar icons and I'm getting lots of
+entries in the warnings buffer.
+
+SGI ships a really old Xpm library in /usr/lib which does not work at
+all well with XEmacs.  The solution is to install your own copy of the
+latest version of Xpm somewhere and then use the --site-includes and
+--site-libraries flags to tell configure where to find it.
+
+** On HPUX, you get "poll: Interrupted system call" message in the
+window where XEmacs was launched.
+
+Richard Cognot <cognot@ensg.u-nancy.fr> writes:
+
+  I get a very strange problem when linking libc.a dynamically: every
+  event (mouse, keyboard, expose...) results in a "poll: Interrupted
+  system call" message in the window where XEmacs was
+  launched. Forcing a static link of libc.a alone by adding
+  /usr/lib/libc.a at the end of the link line solves this. Note that
+  my 9.07 build of 19.14b17 and my (old) build of 19.13 both exhibit
+  the same behaviour. I've tried various hpux patches to no avail. If
+  this problem cannot be solved before the release date, binary kits
+  for HP *must* be linked statically against libc, otherwise this
+  problem will show up. (This is directed at whoever will volunteer
+  for this kit, as I won't be available to do it, unless 19.14 gets
+  delayed until mid-june ;-). I think this problem will be an FAQ soon
+  after the release otherwise.
+
+Note: The above entry is probably not valid for XEmacs 21.2 and
+later.
+
+** When Emacs tries to ring the bell, you get an error like
+
+       audio: sst_open: SETQSIZE" Invalid argument
+       audio: sst_close: SETREG MMR2, Invalid argument
+
+you have probably compiled using an ANSI C compiler, but with non-ANSI
+include files.  In particular, on Suns, the file
+/usr/include/sun/audioio.h uses the _IOW macro to define the constant
+AUDIOSETQSIZE.  _IOW in turn uses a K&R preprocessor feature that is
+now explicitly forbidden in ANSI preprocessors, namely substitution
+inside character constants.  All ANSI C compilers must provide a
+workaround for this problem.  Lucid's C compiler is shipped with a new
+set of system include files.  If you are using GCC, there is a script
+called fixincludes that creates new versions of some system include
+files that use this obsolete feature.
+
+** My buffers are full of \000 characters or otherwise corrupt.
+
+Some compilers have trouble with gmalloc.c and ralloc.c; try recompiling
+without optimization.  If that doesn't work, try recompiling with
+SYSTEM_MALLOC defined, and/or with REL_ALLOC undefined.
+
+** On AIX 4, some programs fail when run in a Shell buffer
+with an error message like No terminfo entry for "unknown".
+
+On AIX, many terminal type definitions are not installed by default.
+`unknown' is one of them.  Install the "Special Generic Terminal
+Definitions" to make them defined.
+
+** Emacs exits with "X protocol error" when run with an X server for
+Windows.
+
+A certain X server for Windows had a bug which caused this.
+Supposedly the newer 32-bit version of this server doesn't have the
+problem.
+
+** A position you specified in .Xdefaults is ignored, using twm.
+
+twm normally ignores "program-specified" positions.
+You can tell it to obey them with this command in your `.twmrc' file:
+
+  UsePPosition "on"            #allow clents to request a position
+
+** The right Alt key works wrong on German HP keyboards (and perhaps
+   other non-English HP keyboards too).
+
+This is because HPUX defines the modifiers wrong in X.  Here is a
+shell script to fix the problem; be sure that it is run after VUE
+configures the X server.
+
+    xmodmap 2> /dev/null - << EOF
+    keysym Alt_L = Meta_L
+    keysym Alt_R = Meta_R
+    EOF
+
+    xmodmap - << EOF
+    clear mod1
+    keysym Mode_switch = NoSymbol
+    add mod1 = Meta_L
+    keysym Meta_R = Mode_switch
+    add mod2 = Mode_switch
+    EOF
+
+** Trouble using ptys on IRIX, or running out of ptys.
+
+The program mkpts (which may be in `/usr/adm' or `/usr/sbin') needs to
+be set-UID to root, or non-root programs like Emacs will not be able
+to allocate ptys reliably.
+
+** Motif dialog boxes lose on Irix.
+
+Larry Auton <lda@control.att.com> writes:
+Beware of not specifying
+
+       --with-dialogs=athena
+
+if it builds with the motif dialogs [boom!] you're a dead man.
+
+** Beware of the default image & graphics library on Irix
+
+Richard Cognot <cognot@ensg.u-nancy.fr> writes:
+You *have* to compile your own jpeg lib. The one delivered with SGI
+systems is a C++ lib, which apparently XEmacs cannot cope with.
+
+** Slow startup on Linux.
+
+People using systems based on the Linux kernel sometimes report that
+startup takes 10 to 15 seconds longer than `usual'.
+
+This is because Emacs looks up the host name when it starts.
+Normally, this takes negligible time; the extra delay is due to
+improper system configuration.  This problem can occur for both
+networked and non-networked machines.
+
+Here is how to fix the configuration.  It requires being root.
+
+*** Networked Case
+
+First, make sure the files `/etc/hosts' and `/etc/host.conf' both
+exist.  The first line in the `/etc/hosts' file should look like this
+(replace HOSTNAME with your host name):
+
+    127.0.0.1      localhost HOSTNAME
+
+Also make sure that the `/etc/host.conf' files contains the following
+lines:
+
+    order hosts, bind 
+    multi on
+
+Any changes, permanent and temporary, to the host name should be
+indicated in the `/etc/hosts' file, since it acts a limited local
+database of addresses and names (e.g., some SLIP connections
+dynamically allocate ip addresses).
+
+*** Non-Networked Case
+
+The solution described in the networked case applies here as well.
+However, if you never intend to network your machine, you can use a
+simpler solution: create an empty `/etc/host.conf' file.  The command
+`touch /etc/host.conf' suffices to create the file.  The `/etc/hosts'
+file is not necessary with this approach.
+
+** On Solaris 2.4, Dired hangs and C-g does not work.  Or Emacs hangs
+forever waiting for termination of a subprocess that is a zombie.
+
+casper@fwi.uva.nl says the problem is in X11R6.  Rebuild libX11.so
+after changing the file xc/config/cf/sunLib.tmpl.  Change the lines
+
+    #if ThreadedX
+    #define SharedX11Reqs -lthread
+    #endif
+
+to:
+
+    #if OSMinorVersion < 4
+    #if ThreadedX
+    #define SharedX11Reqs -lthread
+    #endif
+    #endif
+
+Be sure also to edit x/config/cf/sun.cf so that OSMinorVersion is 4
+(as it should be for Solaris 2.4).  The file has three definitions for
+OSMinorVersion: the first is for x86, the second for SPARC under
+Solaris, and the third for SunOS 4.  Make sure to update the
+definition for your type of machine and system.
+
+Then do `make Everything' in the top directory of X11R6, to rebuild
+the makefiles and rebuild X.  The X built this way work only on
+Solaris 2.4, not on 2.3.
+
+For multithreaded X to work it necessary to install patch
+101925-02 to fix problems in header files [2.4].  You need
+to reinstall gcc or re-run just-fixinc after installing that
+patch.
+
+However, Frank Rust <frust@iti.cs.tu-bs.de> used a simpler solution:
+he changed
+    #define ThreadedX          YES
+to
+    #define ThreadedX          NO
+in sun.cf and did `make World' to rebuild X11R6.  Removing all
+`-DXTHREAD*' flags and `-lthread' entries from lib/X11/Makefile and
+typing 'make install' in that directory also seemed to work.
+
+** With M-x enable-flow-control, you need to type C-\ twice to do
+incremental search--a single C-\ gets no response.
+
+This has been traced to communicating with your machine via kermit,
+with C-\ as the kermit escape character.  One solution is to use
+another escape character in kermit.  One user did
+
+   set escape-character 17
+
+in his .kermrc file, to make C-q the kermit escape character.
+
+** The Motif version of Emacs paints the screen a solid color.
+
+This has been observed to result from the following X resource:
+
+   Emacs*default.attributeFont:        -*-courier-medium-r-*-*-*-140-*-*-*-*-iso8859-*
+
+That the resource has this effect indicates a bug in something, but we
+do not yet know what.  If it is an Emacs bug, we hope someone can
+explain what the bug is so we can fix it.  In the mean time, removing
+the resource prevents the problem.
+
+** Regular expressions matching bugs on SCO systems.
+
+On SCO, there are problems in regexp matching when Emacs is compiled
+with the system compiler.  The compiler version is "Microsoft C
+version 6", SCO 4.2.0h Dev Sys Maintenance Supplement 01/06/93; Quick
+C Compiler Version 1.00.46 (Beta).  The solution is to compile with
+GCC.
+
+** In Shell mode, you get a ^M at the end of every line.
+
+This happens to people who use tcsh, because it is trying to be too
+smart.  It sees that the Shell uses terminal type `unknown' and turns
+on the flag to output ^M at the end of each line.  You can fix the
+problem by adding this to your .cshrc file:
+
+    if ($?EMACS) then
+        if ($EMACS == "t") then
+            unset edit 
+            stty  -icrnl -onlcr -echo susp ^Z
+        endif
+    endif
+
+** An error message such as `X protocol error: BadMatch (invalid
+parameter attributes) on protocol request 93'.
+
+This comes from having an invalid X resource, such as
+   emacs*Cursor:   black
+(which is invalid because it specifies a color name for something
+that isn't a color.)
+
+The fix is to correct your X resources.
+
+** Mail is lost when sent to local aliases.
+
+Many emacs mail user agents (VM and rmail, for instance) use the
+sendmail.el library.  This library can arrange for mail to be
+delivered by passing messages to the /usr/lib/sendmail (usually)
+program .  In doing so, it passes the '-t' flag to sendmail, which
+means that the name of the recipient of the message is not on the
+command line and, therefore, that sendmail must parse the message to
+obtain the destination address.
+
+There is a bug in the SunOS4.1.1 and SunOS4.1.3 versions of sendmail.
+In short, when given the -t flag, the SunOS sendmail won't recognize
+non-local (i.e. NIS) aliases.  It has been reported that the Solaris
+2.x versions of sendmail do not have this bug.  For those using SunOS
+4.1, the best fix is to install sendmail V8 or IDA sendmail (which
+have other advantages over the regular sendmail as well).  At the time
+of this writing, these official versions are available:
+
+ Sendmail V8 on ftp.cs.berkeley.edu in /ucb/sendmail:
+   sendmail.8.6.9.base.tar.Z (the base system source & documentation)
+   sendmail.8.6.9.cf.tar.Z   (configuration files)
+   sendmail.8.6.9.misc.tar.Z (miscellaneous support programs)
+   sendmail.8.6.9.xdoc.tar.Z (extended documentation, with postscript)
+
+ IDA sendmail on vixen.cso.uiuc.edu in /pub:
+   sendmail-5.67b+IDA-1.5.tar.gz
+
+** On AIX, you get this message when running Emacs:
+
+    Could not load program emacs
+    Symbol smtcheckinit in csh is undefined
+    Error was: Exec format error
+
+or this one:
+
+    Could not load program .emacs
+    Symbol _system_con in csh is undefined
+    Symbol _fp_trapsta in csh is undefined
+    Error was: Exec format error
+
+These can happen when you try to run on AIX 3.2.5 a program that was
+compiled with 3.2.4.  The fix is to recompile.
+
+** After running emacs once, subsequent invocations crash.
+
+Some versions of SVR4 have a serious bug in the implementation of the
+mmap () system call in the kernel; this causes emacs to run correctly
+the first time, and then crash when run a second time.
+
+Contact your vendor and ask for the mmap bug fix; in the mean time,
+you may be able to work around the problem by adding a line to your
+operating system description file (whose name is reported by the
+configure script) that reads:
+#define SYSTEM_MALLOC
+This makes Emacs use memory less efficiently, but seems to work around
+the kernel bug.
+
+** Inability to send an Alt-modified key, when Emacs is communicating
+directly with an X server.
+
+If you have tried to bind an Alt-modified key as a command, and it
+does not work to type the command, the first thing you should check is
+whether the key is getting through to Emacs.  To do this, type C-h c
+followed by the Alt-modified key.  C-h c should say what kind of event
+it read.  If it says it read an Alt-modified key, then make sure you
+have made the key binding correctly.
+
+If C-h c reports an event that doesn't have the Alt modifier, it may
+be because your X server has no key for the Alt modifier.  The X
+server that comes from MIT does not set up the Alt modifier by
+default.
+
+If your keyboard has keys named Alt, you can enable them as follows:
+
+    xmodmap -e 'add mod2 = Alt_L'
+    xmodmap -e 'add mod2 = Alt_R'
+
+If the keyboard has just one key named Alt, then only one of those
+commands is needed.  The modifier `mod2' is a reasonable choice if you
+are using an unmodified MIT version of X.  Otherwise, choose any
+modifier bit not otherwise used.
+
+If your keyboard does not have keys named Alt, you can use some other
+keys.  Use the keysym command in xmodmap to turn a function key (or
+some other 'spare' key) into Alt_L or into Alt_R, and then use the
+commands show above to make them modifier keys.
+
+Note that if you have Alt keys but no Meta keys, Emacs translates Alt
+into Meta.  This is because of the great importance of Meta in Emacs.
+
+** `Pid xxx killed due to text modification or page I/O error'
+
+On HP/UX, you can get that error when the Emacs executable is on an NFS
+file system.  HP/UX responds this way if it tries to swap in a page and
+does not get a response from the server within a timeout whose default
+value is just ten seconds.
+
+If this happens to you, extend the timeout period.
+
+** `expand-file-name' fails to work on any but the machine you dumped
+Emacs on.
+
+On Ultrix, if you use any of the functions which look up information
+in the passwd database before dumping Emacs (say, by using
+expand-file-name in site-init.el), then those functions will not work
+in the dumped Emacs on any host but the one Emacs was dumped on.
+
+The solution?  Don't use expand-file-name in site-init.el, or in
+anything it loads.  Yuck - some solution.
+
+I'm not sure why this happens; if you can find out exactly what is
+going on, and perhaps find a fix or a workaround, please let us know.
+Perhaps the YP functions cache some information, the cache is included
+in the dumped Emacs, and is then inaccurate on any other host.
+
+** Emacs fails to understand most Internet host names, even though
+the names work properly with other programs on the same system.
+  Emacs won't work with X-windows if the value of DISPLAY is HOSTNAME:0.
+  Gnus can't make contact with the specified host for nntp.
+
+This typically happens on Suns and other systems that use shared
+libraries.  The cause is that the site has installed a version of the
+shared library which uses a name server--but has not installed a
+similar version of the unshared library which Emacs uses.
+
+The result is that most programs, using the shared library, work with
+the nameserver, but Emacs does not.
+
+The fix is to install an unshared library that corresponds to what you
+installed in the shared library, and then relink Emacs.
+
+On SunOS 4.1, simply define HAVE_RES_INIT.
+
+If you have already installed the name resolver in the file libresolv.a,
+then you need to compile Emacs to use that library.  The easiest way to
+do this is to add to config.h a definition of LIBS_SYSTEM, LIBS_MACHINE
+or LIB_STANDARD which uses -lresolv.  Watch out!  If you redefine a macro
+that is already in use in your configuration to supply some other libraries,
+be careful not to lose the others.
+
+Thus, you could start by adding this to config.h:
+
+#define LIBS_SYSTEM -lresolv
+
+Then if this gives you an error for redefining a macro, and you see that
+the s- file defines LIBS_SYSTEM as -lfoo -lbar, you could change config.h
+again to say this:
+
+#define LIBS_SYSTEM -lresolv -lfoo -lbar
+
+** Trouble using ptys on AIX.
+
+People often install the pty devices on AIX incorrectly.
+Use `smit pty' to reinstall them properly.
+
+** Shell mode on HP/UX gives the message, "`tty`: Ambiguous".
+
+christos@theory.tn.cornell.edu says:
+
+The problem is that in your .cshrc you have something that tries to
+execute `tty`. If you are not running the shell on a real tty then tty
+will print "not a tty". Csh expects one word in some places, but tty
+is giving it back 3.
+
+The solution is to add a pair of quotes around `tty` to make it a
+single word:
+
+if (`tty` == "/dev/console") 
+
+should be changed to:
+
+if ("`tty`" == "/dev/console") 
+
+Even better, move things that set up terminal sections out of .cshrc
+and into .login.
+
+** With process-connection-type set to t, each line of subprocess
+output is terminated with a ^M, making ange-ftp and GNUS not work.
+
+On SunOS systems, this problem has been seen to be a result of an
+incomplete installation of gcc 2.2 which allowed some non-ANSI
+compatible include files into the compilation.  In particular this
+affected virtually all ioctl() calls.
+
+** Once you pull down a menu from the menubar, it won't go away.
+
+It has been claimed that this is caused by a bug in certain very old
+(1990?)  versions of the twm window manager.  It doesn't happen with
+recent vintages, or with other window managers.
+
+** Emacs ignores the "help" key when running OLWM.
+
+OLWM grabs the help key, and retransmits it to the appropriate client
+using XSendEvent.  Allowing emacs to react to synthetic events is a
+security hole, so this is turned off by default.  You can enable it by
+setting the variable x-allow-sendevents to t.  You can also cause fix
+this by telling OLWM to not grab the help key, with the null binding
+"OpenWindows.KeyboardCommand.Help:".
+
+** Programs running under terminal emulator do not recognize `emacs'
+terminal type.
+
+The cause of this is a shell startup file that sets the TERMCAP
+environment variable.  The terminal emulator uses that variable to
+provide the information on the special terminal type that Emacs
+emulates.
+
+Rewrite your shell startup file so that it does not change TERMCAP
+in such a case.  You could use the following conditional which sets
+it only if it is undefined.
+
+    if ( ! ${?TERMCAP} ) setenv TERMCAP ~/my-termcap-file
+
+Or you could set TERMCAP only when you set TERM--which should not
+happen in a non-login shell.
+
+
+* Compatibility problems (with Emacs 18, GNU Emacs, or previous XEmacs/lemacs)
+==============================================================================
+
+** "Symbol's value as variable is void: unread-command-char".
+ "Wrong type argument: arrayp, #<keymap 143 entries>"
+ "Wrong type argument: stringp, [#<keypress-event return>]"
+
+There are a few incompatible changes in XEmacs, and these are the
+symptoms.  Some of the emacs-lisp code you are running needs to be
+updated to be compatible with XEmacs.
+
+The code should not treat keymaps as arrays (use `define-key', etc.),
+should not use obsolete variables like `unread-command-char' (use
+`unread-command-events').  Many (most) of the new ways of doing things
+are compatible in GNU Emacs and XEmacs.
+
+Modern Emacs packages (Gnus, VM, W3, efs, etc) are written to support
+GNU Emacs and XEmacs.  We have provided modified versions of several
+popular emacs packages (dired, etc) which are compatible with this
+version of emacs.  Check to make sure you have not set your load-path
+so that your private copies of these packages are being found before
+the versions in the lisp directory.
+
+Make sure that your load-path and your $EMACSLOADPATH environment
+variable are not pointing at an Emacs18 lisp directory.  This will
+cripple emacs.
+
+** Some packages that worked before now cause the error
+Wrong type argument: arrayp, #<face ... >
+
+Code which uses the `face' accessor functions must be recompiled with
+xemacs 19.9 or later.  The functions whose callers must be recompiled
+are: face-font, face-foreground, face-background,
+face-background-pixmap, and face-underline-p.  The .elc files
+generated by version 19.9 will work in 19.6 and 19.8, but older .elc
+files which contain calls to these functions will not work in 19.9.
+
+** Signaling: (error "Byte code stack underflow (byte compiler bug), pc 38")
+
+This error is given when XEmacs 20 is compiled without MULE support
+but is attempting to load a .elc which requires MULE support.  The fix
+is to rebytecompile the offending file.
+
+** Signaling: (wrong-type-argument ...) when loading mail-abbrevs
+
+The is seen when installing the Insidious Big Brother Data Base (bbdb)
+which includes an outdated copy of mail-abbrevs.el.  Remove the copy
+that comes with bbdb and use the one that comes with XEmacs.
+
+
+* MULE issues
+=============
+
+** A reminder: XEmacs/Mule work does not currently receive *any*
+funding, and all work is done by volunteers.  If you think you can
+help, please contact the XEmacs maintainers.
+
+** XEmacs/Mule doesn't support TTY's satisfactorily.
+
+This is a major problem, which we plan to address in a future release
+of XEmacs.  Basically, XEmacs should have primitives to be told
+whether the terminal can handle international output, and which
+locale.  Also, it should be able to do approximations of characters to
+the nearest supported by the locale.
+
+** Internationalized (Asian) Isearch doesn't work.
+
+Currently, Isearch doesn't directly support any of the input methods
+that are not XIM based (like egg, canna and quail) (and there are
+potential problems with XIM version too...).  If you're using egg
+there is a workaround.  Hitting <RET> right after C-s to invoke
+Isearch will put Isearch in string mode, where a complete string can
+be typed into the minibuffer and then processed by Isearch afterwards.
+Since egg is now supported in the minibuffer using string mode you can
+now use egg to input your Japanese, Korean or Chinese string, then hit
+return to send that to Isearch and then use standard Isearch commands
+from there.
+
+** Using egg and mousing around while in 'fence' mode screws up my
+buffer.
+
+Don't do this. The fence modes of egg and canna are currently very
+modal, and messing with where they expect point to be and what they
+think is the current buffer is just asking for trouble. If you're
+lucky they will realize that something is awry, and simply delete the
+fence, but worst case can trash other buffers too. We've tried to
+protect against this where we can, but there still are many ways to
+shoot yourself in the foot. So just finish what you are typing into
+the fence before reaching for the mouse.
+
+** Not all languages in Quail are supported like Devanagari and Indian
+languages, Lao and Tibetan.
+
+Quail requires more work and testing.  Although it has been ported to
+XEmacs, it works really well for Japanese and for the European
+languages.
+
+** Right-to-left mode is not yet implemented, so languages like
+Arabic, Hebrew and Thai don't work.
+
+Getting this right requires more work.  It may be implemented in a
+future XEmacs version, but don't hold your breath.  If you know
+someone who is ready to implement this, please let us know.
+
+** We need more developers and native language testers.  It's extremely
+difficult (and not particularly productive) to address languages that
+nobody is using and testing.
+
+** The kWnn and cWnn support for Chinese and Korean needs developers
+and testers.  It probably doesn't work.
+
+** There are no `native XEmacs' TUTORIALs for any Asian languages,
+including Japanese.  FSF Emacs and XEmacs tutorials are quite similar, 
+so it should be sufficient to skim through the differences and apply
+them to the Japanese version.
+
+** We only have localized menus translated for Japanese, and the
+Japanese menus are developing bitrot (the Mule menu appears in
+English).
+
+** XIM is untested for any language other than Japanese.
diff --git a/README b/README
new file mode 100644 (file)
index 0000000..3715e1c
--- /dev/null
+++ b/README
@@ -0,0 +1,63 @@
+This directory tree holds version 21.2 of XEmacs, the extensible,
+customizable, self-documenting real-time display editor.  This version
+of XEmacs also runs on various Microsoft Windows platforms including
+MS Windows '95 and MS Windows NT and Cygwin.
+
+See the file `etc/NEWS' for information on new features and other
+user-visible changes since the last version of XEmacs.
+
+The file `INSTALL' in this directory says how to bring up XEmacs on
+Unix and Cygwin, once you have loaded the entire subtree of this
+directory.
+
+The file `PROBLEMS' contains information on many common problems that
+occur in building, installing and running XEmacs.
+
+See the file `nt/README' for instructions on building XEmacs for
+Microsoft Windows.
+
+Reports of bugs in XEmacs should be posted to the newsgroup
+comp.emacs.xemacs or sent to the mailing list xemacs@xemacs.org.  See
+the "Bugs" section of the XEmacs manual for more information on how to
+report bugs.  (The file `BUGS' in this directory explains how you can
+find and read that section using the Info files that come with
+XEmacs.)  See `etc/MAILINGLISTS' for more information on mailing lists
+relating to XEmacs and other GNU products.
+
+The file `configure' is a shell script to acclimate XEmacs to the
+oddities of your processor and operating system.  It will create a
+file named `Makefile' (a script for the `make' program), which helps
+automate the process of building and installing emacs.  See INSTALL
+for more detailed information.
+
+The file `configure.in' is the input used by the autoconf program to
+construct the `configure' script.  Since XEmacs has configuration
+requirements that autoconf can't meet, `configure.in' uses an unholy
+marriage of custom-baked configuration code and autoconf macros; it
+may be wise to avoid rebuilding `configure' from `configure.in' when
+possible.
+
+The file `Makefile.in' is a template used by `configure' to create
+`Makefile'.
+
+There are several subdirectories:
+
+`src' holds the C code for Emacs (the XEmacs Lisp interpreter and its
+    primitives, the redisplay code, and some basic editing functions).
+`lisp' holds the Emacs Lisp code for XEmacs (most everything else).
+`lib-src' holds the source code for some utility programs for use by
+    or with XEmacs, like movemail and etags.
+`etc' holds miscellaneous architecture-independent data files
+    XEmacs uses, like the tutorial text and the Zippy the Pinhead quote
+    database.  The contents of the `lisp', `info' and `man'
+    subdirectories are architecture-independent too.
+`lwlib' holds the C code for the toolkit objects used by XEmacs.
+
+`info' holds the Info documentation tree for XEmacs.
+`man' holds the source code for the XEmacs info documentation tree.
+
+`msdos' holds configuration files for compiling XEmacs under MSDOG.
+    See the file etc/MSDOS for more information.
+
+`nt' holds configuration files for compiling XEmacs under Microsoft Windows
+    NT.  The support for NT is very tentative right now.
diff --git a/README.packages b/README.packages
new file mode 100644 (file)
index 0000000..2d3f904
--- /dev/null
@@ -0,0 +1,227 @@
+The XEmacs Packages Quick Start Guide
+-------------------------------------
+
+This text is intended to help you get started installing a new XEmacs
+and its packages from start.  For details see the 'Startup Paths' and
+'Packages' sections of the XEmacs info manual.
+
+Real Real Quickstart FAQ
+------------------------
+
+Q. Do I need to have the packages to compile XEmacs?
+A. If you want to compile with MULE, you need the mule-base package installed.
+   Otherwise, no package is required before compilation.
+
+Q. I really liked the old way that packages were bundled and do not
+   want to mess with packages at all.
+A. You can grab all the packages at once like you used to with old
+   XEmacs versions, skip to the 'Sumo Tarball' section below.
+
+A note of caution
+-----------------
+
+The XEmacs package system is still in its infancy. Please expect a few 
+minor hurdles on the way. Also neither the interface nor the structure is 
+set in stone. The XEmacs maintainers reserve the right to sacrifice
+backwards compatibility as quirks are worked out over the coming
+releases. 
+
+Some Package Theory
+-------------------
+
+In order to reduce the size and increase the maintainability of XEmacs,
+the majority of the Elisp packages that came with previous releases
+have been unbundled. They have been replaced by the package system.
+Each elisp add-on (or groups of them when they are small) now comes
+in its own tarball that contains a small search hierarchy.
+
+You select just the ones you need. Install them by untarring them into 
+the right place. On startup XEmacs will find them, set up the load
+path correctly, install autoloads, etc, etc.
+
+Package hierarchies
+-------------------
+
+On Startup XEmacs looks for packages in so called package hierarchies.
+These can be specified by the 'package-path' parameter to the
+'configure' script. However by default there are three system wide
+hierarchies.
+
+$prefix/lib/xemacs/site-packages
+     Local and 3rd party packages go here.
+
+$prefix/lib/xemacs/mule-packages
+     Only searched by MULE-enabled XEmacsen.
+
+$prefix/lib/xemacs/xemacs-packages
+     Normal packages go here.
+
+Where to get the packages
+-------------------------
+
+Packages are available from ftp://ftp.xemacs.org/pub/xemacs/packages
+and its mirror.
+
+How to install the packages
+---------------------------
+
+1. All at once, using the 'Sumo Tarball'.
+2. By hand.
+3. Automatically, using the package tools from XEmacs.
+
+The Sumo Tarball
+----------------
+
+Those with little time, cheap connections and plenty of disk space can
+install all packages at once using the sumo tarballs.
+Download the files
+
+xemacs-sumo-<date>.tar.gz if you have a latin-1 XEmacs.
+
+or
+
+xemacs-mule-sumo-<date>.tar.gz if you have a MULE XEmacs.
+
+N.B. There are called 'Sumo Tarballs' for good reason. They are
+currently 15MB and 23MB (gzipped) respectively.
+
+Install them by
+
+cd $prefix/lib/xemacs ; gunzip -c <tarballname> | tar xf -
+
+As the Sumo tarballs are not regenerated as often as the individual
+packages, it is recommended that you use the automatic package tools
+afterwards to pick up any recent updates.
+
+Installing by Hand
+------------------
+
+Fetch the packages from the ftp site, CDROM whatever. The filenames
+have the form name-<version>-pkg.tar.gz and are gzipped tar files. For
+a fresh install it is sufficient to untar the file at the top of the
+package hierarchy. For example if we are installing the 'xemacs-base'
+package in version 1.27:
+
+mkdir $prefix/lib/xemacs/xemacs-packages # if it does not exist yet
+cd $prefix/lib/xemacs/xemacs-packages
+gunzip -c ...../xemacs-base-1.27-pkg.tar.gz | tar xf -
+
+For MULE related packages, it is best to untar in the mule-packages
+hierarchy, i.e. for the mule-base package, version 1.25
+
+mkdir $prefix/lib/xemacs/mule-packages # if it does not exist yet
+cd $prefix/lib/xemacs/mule-packages
+gunzip -c ...../mule-base-1.25-pkg.tar.gz | tar xf -
+
+Installing automatically
+------------------------
+
+XEmacs comes with some tools to make the periodic updating and
+installing easier. It will notice if new packages or versions are
+available and will fetch them from the ftp site.
+
+Unfortunately this requires that a few packages are alreadyin place. 
+You will have to install them by hand as above or use a SUMO tarball. 
+This requirement will hopefully go away in the future. The packages
+you need are:
+
+   efs          - To fetch the files from the ftp site or mirrors.
+   xemacs-base  - Needed by efs.
+
+and optionally:
+
+   mailcrypt    - If you have PGP installed and want to verify the
+                  signature of the index file.
+   mule-base    - Needed if you want to compile XEmacs with MULE.
+
+After installing these by hand, you can start XEmacs. (It is a good
+idea to use 'xemacs -vanilla' here as your startup files might need
+things now moved to packages.)
+
+ - First you need to specify an FTP site to use.
+      Use Options->Manage Packages->Add Download Site
+       or M-x customize-variable RET package-get-remote RET
+
+   Alternatively, if you already have the packages on a local disk
+   then you can specify this directly using 'M-x
+   pui-add-install-directory'. Please make sure you also have a
+   corresponding copy of the package index there.
+
+ - Invoke Options->Manage Packages->List & Install
+      or M-x pui-list-packages RET
+   XEmacs will now first try to fetch a new version of the package
+   index from the FTP site. Depending on whether you are using
+   'mailcrypt/PGP', you will get some question about keys to fetch or
+   whether to use the index without verifying the signature. If the
+   new index was different from the one already on disk, XEmacs will
+   offer you to overwrite the old index.
+
+-  XEmacs will show you a buffer named "*Packages*" with an overview
+   of available and installed packages, including a short description.
+   In this buffer you can select which packages you want using the
+   mouse or using RET.
+
+-  When you are finished choosing packages, invoke
+   'Packages->Install/Remove Select' from the menu or type 'x' to
+   begin installing packages.
+    
+After Installation
+------------------
+
+New packages can only be used by XEmacs after a restart.
+
+Note to MULE users
+------------------
+
+Unlike all other packages the mule-base package is used at build/dump 
+time. This means that you need this available before compiling XEmacs
+with MULE. Also it is a good idea to keep packages that are
+MULE-only separate by putting them in the mule-packages hierarchy.
+
+Which Packages to install?
+--------------------------
+
+This is difficult to say. When in doubt install a package. If you
+administrate a big site it might be a good idea to just install
+everything. A good minimal set of packages for XEmacs-latin1 would be
+
+xemacs-base, xemacs-devel, c-support, cc-mode, debug, dired, efs,
+edit-utils, fsf-compat, mail-lib, net-utils, os-utils, prog-modes,
+text-modes, time
+
+Unfortunately the package system currently provides neither
+dependencies nor conflicts. This will be a future enhancement. The
+above set includes most packages that are used by others.
+
+See also '.../etc/PACKAGES' for further descriptions of the individual
+packages (currently outdated).
+
+Upgrading/Removing Packages
+---------------------------
+
+As the exact files and their locations contained in a package may
+change it is recommend to remove a package first before installing a
+new version. In order to facilitate removal each package contains an
+pgkinfo/MANIFEST.pkgname file which list all the files belong to the
+package. M-x package-admin-delete-binary-package RET can be used to
+remove a package using this file.
+
+Note that the interactive package tools included with XEmacs already do
+this for you.
+
+User Package directories
+------------------------
+
+In addition to the system wide packages, each user can have his own
+packages installed in "./xemacs" (Note that this will most likely
+change to "./xemacs/packages" in the near future). If you want to
+install packages there using the interactive tools, you need to set
+'pui-package-install-dest-dir' to "/xemacs"
+
+Site lisp/Site start
+--------------------
+
+The site-packages hierarchy replaces the old 'site-lisp' directory.
+XEmacs no longer looks into a 'site-lisp' directly by default.
+A good place to put 'site-start.el' would be in
+$prefix/lib/xemacs/site-packages/lisp/
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644 (file)
index 0000000..c84a38b
--- /dev/null
@@ -0,0 +1,99 @@
+dnl aclocal.m4 --- Dynamically linked library support for XEmacs
+dnl Copyright (C) 1998 Free Software Foundation, Inc.
+dnl Author: William Perry <wmperry@aventail.com>
+dnl This file is part of XEmacs
+
+AC_DEFUN(XE_MAKE_SHAREDLIB, [
+dll_ld="ld"
+dll_lflags="-shared"
+dll_cflags="-r"
+dll_oflags="-o "
+
+AC_MSG_CHECKING(how to build a shared library)
+case `uname -rs` in
+       UNIX_SV*|UNIX_System_V*)
+               dll_lflags="-G"
+               dll_cflags=-Kpic
+               dll_ld="ld"
+               ;;
+       BSD/OS*)
+               dll_cflags=
+               dll_lflags="-r"
+               dll_ld="shlicc2"
+               ;;
+       FreeBSD*2*)
+               dll_lflags="-Bshareable"
+               dll_cflags="-fPIC -DPIC"
+               dll_ld=ld
+               ;;
+       SunOS*4.*)
+               dll_cflags="-P"
+               dll_lflags="-dp -assert pure-text -assert nodefinitions"
+               ;;
+       SunOS*5.*)
+               dll_ld="cc"
+               dll_cflags="-KPIC"
+               dll_lflags="-G"
+               dll_oflags="-W0,-y-o -W0,-y"
+               ;;      
+       IRIX*5.*|IRIX*6.*)
+               dll_cflags="-KPIC"
+               ;;
+       OSF1*)
+               ;;
+       HP-UX*)
+               dll_ld="ld"
+               dll_lflags="-b"
+               dll_cflags="+z"
+               ;;
+       SCO_SV*)
+               dll_ld="ld"
+               dll_lflags="-G"
+               dll_cflags="-Kpic"
+               ;;
+       AIX*)
+               dll_lflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:\${@:.ell=.exp} -b noentry -lc"
+               dll_ld="ld"
+               ;;
+       *)
+               ;;
+       esac
+
+       if test "$GCC" = "yes" ; then
+               dll_cflags="-fPIC"
+               case `uname -rs` in
+               SunOS*5.*)
+                       dll_ld="ld"
+                       dll_oflags="-o "
+                       dll_lflags="-G"
+                       ;;
+               SCO_SV*)
+                       dll_ld="ld"
+                       dll_lflags="-G"
+                       dll_cflags="-b elf"
+                       ;;
+               FreeBSD*)
+                       dll_cflags="-DDLSYM_NEEDS_UNDERSCORE -DPIC -fPIC"
+                       dll_lflags="-Bshareable"
+                       dll_ld=ld
+                       ;;
+               BSD/OS*)
+                       dll_cflags=
+                       dll_lflags="-r"
+                       dll_ld="shlicc2"
+                       ;;
+               UNIX_SV*)
+                       dll_cflags="-fPIC"
+                       ;;
+               *)
+                       dll_ld="$CC"
+                       dll_lflags="-shared"
+               esac
+       fi
+
+       AC_MSG_RESULT("lflags: $dll_lflags cflags: $dll_cflags")
+AC_SUBST(dll_ld)
+AC_SUBST(dll_cflags)
+AC_SUBST(dll_oflags)
+AC_SUBST(dll_lflags)
+])dnl
diff --git a/config.guess b/config.guess
new file mode 100755 (executable)
index 0000000..ed660fb
--- /dev/null
@@ -0,0 +1,893 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
+#
+# 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 of the License, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Written by Per Bothner <bothner@cygnus.com>.
+# The master version of this file is at the FSF in /home/gd/gnu/lib.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit system type (host/target name).
+#
+# Only a few systems have been added to this list; please add others
+# (but try to keep the structure clean).
+#
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 8/24/94.)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+       PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    alpha:OSF1:*:*)
+       if test $UNAME_RELEASE = "V4.0"; then
+               UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+       fi
+       # A Vn.n version is a released version.
+       # A Tn.n version is a released field test version.
+       # A Xn.n version is an unreleased experimental baselevel.
+       # 1.2 uses "1.2" for uname -r.
+       cat <<EOF >dummy.s
+       .globl main
+       .ent main
+main:
+       .frame \$30,0,\$26,0
+       .prologue 0
+       .long 0x47e03d80 # implver $0
+       lda \$2,259
+       .long 0x47e20c21 # amask $2,$1
+       srl \$1,8,\$2
+       sll \$2,2,\$2
+       sll \$0,3,\$0
+       addl \$1,\$0,\$0
+       addl \$2,\$0,\$0
+       ret \$31,(\$26),1
+       .end main
+EOF
+       ${CC-cc} dummy.s -o dummy 2>/dev/null
+       if test "$?" = 0 ; then
+               ./dummy
+               case "$?" in
+                       7)
+                               UNAME_MACHINE="alpha"
+                               ;;
+                       15)
+                               UNAME_MACHINE="alphaev5"
+                               ;;
+                       14)
+                               UNAME_MACHINE="alphaev56"
+                               ;;
+                       10)
+                               UNAME_MACHINE="alphapca56"
+                               ;;
+                       16)
+                               UNAME_MACHINE="alphaev6"
+                               ;;
+               esac
+       fi
+       rm -f dummy.s dummy
+       echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr [[A-Z]] [[a-z]]`
+       exit 0 ;;
+    21064:Windows_NT:50:3)
+       echo alpha-dec-winnt3.5
+       exit 0 ;;
+    Amiga*:UNIX_System_V:4.0:*)
+       echo m68k-cbm-sysv4
+       exit 0;;
+    amiga:NetBSD:*:*)
+      echo m68k-cbm-netbsd${UNAME_RELEASE}
+      exit 0 ;;
+    amiga:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    arc64:OpenBSD:*:*)
+       echo mips64el-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    arc:OpenBSD:*:*)
+       echo mipsel-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    hkmips:OpenBSD:*:*)
+       echo mips-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    pmax:OpenBSD:*:*)
+       echo mipsel-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    sgi:OpenBSD:*:*)
+       echo mips-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    wgrisc:OpenBSD:*:*)
+       echo mipsel-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+       echo arm-acorn-riscix${UNAME_RELEASE}
+       exit 0;;
+    arm32:NetBSD:*:*)
+       echo arm-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+       exit 0 ;;
+    SR2?01:HI-UX/MPP:*:*)
+       echo hppa1.1-hitachi-hiuxmpp
+       exit 0;;
+    Pyramid*:OSx*:*:*|MIS*:OSx*:*:*)
+       # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+       if test "`(/bin/universe) 2>/dev/null`" = att ; then
+               echo pyramid-pyramid-sysv3
+       else
+               echo pyramid-pyramid-bsd
+       fi
+       exit 0 ;;
+    NILE:*:*:dcosx)
+       echo pyramid-pyramid-svr4
+       exit 0 ;;
+    sun4H:SunOS:5.*:*)
+       echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+       echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
+    i86pc:SunOS:5.*:*)
+       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
+    sun4*:SunOS:6*:*)
+       # According to config.sub, this is the proper way to canonicalize
+       # SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+       # it's likely to be more like Solaris than SunOS4.
+       echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
+    sun4*:SunOS:*:*)
+       case "`/usr/bin/arch -k`" in
+           Series*|S4*)
+               UNAME_RELEASE=`uname -v`
+               ;;
+       esac
+       # Japanese Language versions have a version number like `4.1.3-JL'.
+       echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+       exit 0 ;;
+    sun3*:SunOS:*:*)
+       echo m68k-sun-sunos${UNAME_RELEASE}
+       exit 0 ;;
+    sun*:*:4.2BSD:*)
+       UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+       test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+       case "`/bin/arch`" in
+           sun3)
+               echo m68k-sun-sunos${UNAME_RELEASE}
+               ;;
+           sun4)
+               echo sparc-sun-sunos${UNAME_RELEASE}
+               ;;
+       esac
+       exit 0 ;;
+    aushp:SunOS:*:*)
+       echo sparc-auspex-sunos${UNAME_RELEASE}
+       exit 0 ;;
+    atari*:NetBSD:*:*)
+       echo m68k-atari-netbsd${UNAME_RELEASE}
+       exit 0 ;;
+    atari*:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    sun3*:NetBSD:*:*)
+       echo m68k-sun-netbsd${UNAME_RELEASE}
+       exit 0 ;;
+    sun3*:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    mac68k:NetBSD:*:*)
+       echo m68k-apple-netbsd${UNAME_RELEASE}
+       exit 0 ;;
+    mac68k:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    mvme68k:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    mvme88k:OpenBSD:*:*)
+       echo m88k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    powerpc:machten:*:*)
+       echo powerpc-apple-machten${UNAME_RELEASE}
+       exit 0 ;;
+    RISC*:Mach:*:*)
+       echo mips-dec-mach_bsd4.3
+       exit 0 ;;
+    RISC*:ULTRIX:*:*)
+       echo mips-dec-ultrix${UNAME_RELEASE}
+       exit 0 ;;
+    VAX*:ULTRIX*:*:*)
+       echo vax-dec-ultrix${UNAME_RELEASE}
+       exit 0 ;;
+    2020:CLIX:*:*)
+       echo clipper-intergraph-clix${UNAME_RELEASE}
+       exit 0 ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+       sed 's/^        //' << EOF >dummy.c
+       int main (argc, argv) int argc; char **argv; {
+       #if defined (host_mips) && defined (MIPSEB)
+       #if defined (SYSTYPE_SYSV)
+         printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_SVR4)
+         printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+       #endif
+       #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+         printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+       #endif
+       #endif
+         exit (-1);
+       }
+EOF
+       ${CC-cc} dummy.c -o dummy \
+         && ./dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+         && rm dummy.c dummy && exit 0
+       rm -f dummy.c dummy
+       echo mips-mips-riscos${UNAME_RELEASE}
+       exit 0 ;;
+    Night_Hawk:Power_UNIX:*:*)
+       echo powerpc-harris-powerunix
+       exit 0 ;;
+    m88k:CX/UX:7*:*)
+       echo m88k-harris-cxux7
+       exit 0 ;;
+    m88k:*:4*:R4*)
+       echo m88k-motorola-sysv4
+       exit 0 ;;
+    m88k:*:3*:R3*)
+       echo m88k-motorola-sysv3
+       exit 0 ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+        if [ $UNAME_PROCESSOR = mc88100 -o $UNAME_PROCESSOR = mc88110 ] ; then
+       if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
+            -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
+               echo m88k-dg-dgux${UNAME_RELEASE}
+       else
+               echo m88k-dg-dguxbcs${UNAME_RELEASE}
+       fi
+        else echo i586-dg-dgux${UNAME_RELEASE}
+        fi
+       exit 0 ;;
+    M88*:DolphinOS:*:*)        # DolphinOS (SVR3)
+       echo m88k-dolphin-sysv3
+       exit 0 ;;
+    M88*:*:R3*:*)
+       # Delta 88k system running SVR3
+       echo m88k-motorola-sysv3
+       exit 0 ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+       echo m88k-tektronix-sysv3
+       exit 0 ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+       echo m68k-tektronix-bsd
+       exit 0 ;;
+    *:IRIX*:*:*)
+       echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+       exit 0 ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+       echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
+       exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+    i?86:AIX:*:*)
+       echo i386-ibm-aix
+       exit 0 ;;
+    *:AIX:2:3)
+       if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+               sed 's/^                //' << EOF >dummy.c
+               #include <sys/systemcfg.h>
+
+               main()
+                       {
+                       if (!__power_pc())
+                               exit(1);
+                       puts("powerpc-ibm-aix3.2.5");
+                       exit(0);
+                       }
+EOF
+               ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
+               rm -f dummy.c dummy
+               echo rs6000-ibm-aix3.2.5
+       elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+               echo rs6000-ibm-aix3.2.4
+       else
+               echo rs6000-ibm-aix3.2
+       fi
+       exit 0 ;;
+    *:AIX:*:4)
+       if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
+               IBM_ARCH=rs6000
+       else
+               IBM_ARCH=powerpc
+       fi
+       if [ -x /usr/bin/oslevel ] ; then
+               IBM_REV=`/usr/bin/oslevel`
+       else
+               IBM_REV=4.${UNAME_RELEASE}
+       fi
+       echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+       exit 0 ;;
+    *:AIX:*:*)
+       echo rs6000-ibm-aix
+       exit 0 ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+       echo romp-ibm-bsd4.4
+       exit 0 ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC NetBSD and
+       echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+       exit 0 ;;                           # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+       echo rs6000-bull-bosx
+       exit 0 ;;
+    DPX/2?00:B.O.S.:*:*)
+       echo m68k-bull-sysv3
+       exit 0 ;;
+    9000/[34]??:4.3bsd:1.*:*)
+       echo m68k-hp-bsd
+       exit 0 ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+       echo m68k-hp-bsd4.4
+       exit 0 ;;
+    9000/[3478]??:HP-UX:*:*)
+       case "${UNAME_MACHINE}" in
+           9000/31? )            HP_ARCH=m68000 ;;
+           9000/[34]?? )         HP_ARCH=m68k ;;
+           9000/7?? | 9000/8?[1679] ) HP_ARCH=hppa1.1 ;;
+           9000/8?? )            HP_ARCH=hppa1.0 ;;
+       esac
+       HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+       echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+       exit 0 ;;
+    3050*:HI-UX:*:*)
+       sed 's/^        //' << EOF >dummy.c
+       #include <unistd.h>
+       int
+       main ()
+       {
+         long cpu = sysconf (_SC_CPU_VERSION);
+         /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+            true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+            results, however.  */
+         if (CPU_IS_PA_RISC (cpu))
+           {
+             switch (cpu)
+               {
+                 case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+                 case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+                 default: puts ("hppa-hitachi-hiuxwe2"); break;
+               }
+           }
+         else if (CPU_IS_HP_MC68K (cpu))
+           puts ("m68k-hitachi-hiuxwe2");
+         else puts ("unknown-hitachi-hiuxwe2");
+         exit (0);
+       }
+EOF
+       ${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
+       rm -f dummy.c dummy
+       echo unknown-hitachi-hiuxwe2
+       exit 0 ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+       echo hppa1.1-hp-bsd
+       exit 0 ;;
+    9000/8??:4.3bsd:*:*)
+       echo hppa1.0-hp-bsd
+       exit 0 ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+       echo hppa1.1-hp-osf
+       exit 0 ;;
+    hp8??:OSF1:*:*)
+       echo hppa1.0-hp-osf
+       exit 0 ;;
+    i?86:OSF1:*:*)
+       if [ -x /usr/sbin/sysversion ] ; then
+           echo ${UNAME_MACHINE}-unknown-osf1mk
+       else
+           echo ${UNAME_MACHINE}-unknown-osf1
+       fi
+       exit 0 ;;
+    parisc*:Lites*:*:*)
+       echo hppa1.1-hp-lites
+       exit 0 ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+       echo c1-convex-bsd
+        exit 0 ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+        exit 0 ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+       echo c34-convex-bsd
+        exit 0 ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+       echo c38-convex-bsd
+        exit 0 ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+       echo c4-convex-bsd
+        exit 0 ;;
+    CRAY*X-MP:*:*:*)
+       echo xmp-cray-unicos
+        exit 0 ;;
+    CRAY*Y-MP:*:*:*)
+       echo ymp-cray-unicos${UNAME_RELEASE}
+       exit 0 ;;
+    CRAY*[A-Z]90:*:*:*)
+       echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+       | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+             -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
+       exit 0 ;;
+    CRAY*TS:*:*:*)
+       echo t90-cray-unicos${UNAME_RELEASE}
+       exit 0 ;;
+    CRAY-2:*:*:*)
+       echo cray2-cray-unicos
+        exit 0 ;;
+    F300:UNIX_System_V:*:*)
+        FUJITSU_SYS=`uname -p | tr [A-Z] [a-z] | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "f300-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit 0 ;;
+    F301:UNIX_System_V:*:*)
+       echo f301-fujitsu-uxpv`echo $UNAME_RELEASE | sed 's/ .*//'`
+       exit 0 ;;
+    hp3[0-9][05]:NetBSD:*:*)
+       echo m68k-hp-netbsd${UNAME_RELEASE}
+       exit 0 ;;
+    hp300:OpenBSD:*:*)
+       echo m68k-unknown-openbsd${UNAME_RELEASE}
+       exit 0 ;;
+    i?86:BSD/386:*:* | *:BSD/OS:*:*)
+       echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+       exit 0 ;;
+    *:FreeBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+       exit 0 ;;
+    *:NetBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+       exit 0 ;;
+    *:OpenBSD:*:*)
+       echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+       exit 0 ;;
+    i*:CYGWIN*:*)
+       echo ${UNAME_MACHINE}-pc-cygwin32
+       exit 0 ;;
+    i*:MINGW*:*)
+       echo ${UNAME_MACHINE}-pc-mingw32
+       exit 0 ;;
+    p*:CYGWIN*:*)
+       echo powerpcle-unknown-cygwin32
+       exit 0 ;;
+    prep*:SunOS:5.*:*)
+       echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       exit 0 ;;
+    *:GNU:*:*)
+       echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+       exit 0 ;;
+    *:Linux:*:*)
+       # uname on the ARM produces all sorts of strangeness, and we need to
+       # filter it out.
+       case "$UNAME_MACHINE" in
+         arm* | sa110*)              UNAME_MACHINE="arm" ;;
+       esac
+
+       # The BFD linker knows what the default object file format is, so
+       # first see if it will tell us.
+       ld_help_string=`ld --help 2>&1`
+       ld_supported_emulations=`echo $ld_help_string \
+                        | sed -ne '/supported emulations:/!d
+                                   s/[         ][      ]*/ /g
+                                   s/.*supported emulations: *//
+                                   s/ .*//
+                                   p'`
+        case "$ld_supported_emulations" in
+         i?86linux)  echo "${UNAME_MACHINE}-pc-linux-gnuaout"      ; exit 0 ;;
+         i?86coff)   echo "${UNAME_MACHINE}-pc-linux-gnucoff"      ; exit 0 ;;
+         sparclinux) echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+         armlinux)   echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+         m68klinux)  echo "${UNAME_MACHINE}-unknown-linux-gnuaout" ; exit 0 ;;
+         elf32ppc)   echo "powerpc-unknown-linux-gnu"              ; exit 0 ;;
+       esac
+
+       if test "${UNAME_MACHINE}" = "alpha" ; then
+               sed 's/^        //'  <<EOF >dummy.s
+               .globl main
+               .ent main
+       main:
+               .frame \$30,0,\$26,0
+               .prologue 0
+               .long 0x47e03d80 # implver $0
+               lda \$2,259
+               .long 0x47e20c21 # amask $2,$1
+               srl \$1,8,\$2
+               sll \$2,2,\$2
+               sll \$0,3,\$0
+               addl \$1,\$0,\$0
+               addl \$2,\$0,\$0
+               ret \$31,(\$26),1
+               .end main
+EOF
+               LIBC=""
+               ${CC-cc} dummy.s -o dummy 2>/dev/null
+               if test "$?" = 0 ; then
+                       ./dummy
+                       case "$?" in
+                       7)
+                               UNAME_MACHINE="alpha"
+                               ;;
+                       15)
+                               UNAME_MACHINE="alphaev5"
+                               ;;
+                       14)
+                               UNAME_MACHINE="alphaev56"
+                               ;;
+                       10)
+                               UNAME_MACHINE="alphapca56"
+                               ;;
+                       16)
+                               UNAME_MACHINE="alphaev6"
+                               ;;
+                       esac    
+
+                       objdump --private-headers dummy | \
+                         grep ld.so.1 > /dev/null
+                       if test "$?" = 0 ; then
+                               LIBC="libc1"
+                       fi
+               fi      
+               rm -f dummy.s dummy
+               echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} ; exit 0
+       elif test "${UNAME_MACHINE}" = "mips" ; then
+         cat >dummy.c <<EOF
+main(argc, argv)
+     int argc;
+     char *argv[];
+{
+#ifdef __MIPSEB__
+  printf ("%s-unknown-linux-gnu\n", argv[1]);
+#endif
+#ifdef __MIPSEL__
+  printf ("%sel-unknown-linux-gnu\n", argv[1]);
+#endif
+  return 0;
+}
+EOF
+         ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
+         rm -f dummy.c dummy
+       else
+         # Either a pre-BFD a.out linker (linux-gnuoldld)
+         # or one that does not give us useful --help.
+         # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
+         # If ld does not provide *any* "supported emulations:"
+         # that means it is gnuoldld.
+         echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
+         test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+
+         case "${UNAME_MACHINE}" in
+         i?86)
+           VENDOR=pc;
+           ;;
+         *)
+           VENDOR=unknown;
+           ;;
+         esac
+         # Determine whether the default compiler is a.out or elf
+         cat >dummy.c <<EOF
+#include <features.h>
+main(argc, argv)
+     int argc;
+     char *argv[];
+{
+#ifdef __ELF__
+# ifdef __GLIBC__
+#  if __GLIBC__ >= 2
+    printf ("%s-${VENDOR}-linux-gnu\n", argv[1]);
+#  else
+    printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+#  endif
+# else
+   printf ("%s-${VENDOR}-linux-gnulibc1\n", argv[1]);
+# endif
+#else
+  printf ("%s-${VENDOR}-linux-gnuaout\n", argv[1]);
+#endif
+  return 0;
+}
+EOF
+         ${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy "${UNAME_MACHINE}" && rm dummy.c dummy && exit 0
+         rm -f dummy.c dummy
+       fi ;;
+# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
+# are messed up and put the nodename in both sysname and nodename.
+    i?86:DYNIX/ptx:4*:*)
+       echo i386-sequent-sysv4
+       exit 0 ;;
+    i?86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+       # I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+       echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+       exit 0 ;;
+    i?86:*:4.*:* | i?86:SYSTEM_V:4.*:*)
+       if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+               echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
+       else
+               echo ${UNAME_MACHINE}-pc-sysv${UNAME_RELEASE}
+       fi
+       exit 0 ;;
+    i?86:*:3.2:*)
+       if test -f /usr/options/cb.name; then
+               UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+               echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+       elif /bin/uname -X 2>/dev/null >/dev/null ; then
+               UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
+               (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
+               (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
+                       && UNAME_MACHINE=i586
+               echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+       else
+               echo ${UNAME_MACHINE}-pc-sysv32
+       fi
+       exit 0 ;;
+    pc:*:*:*)
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+       echo i386-pc-msdosdjgpp
+        exit 0 ;;
+    Intel:Mach:3*:*)
+       echo i386-pc-mach3
+       exit 0 ;;
+    paragon:*:*:*)
+       echo i860-intel-osf1
+       exit 0 ;;
+    i860:*:4.*:*) # i860-SVR4
+       if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+         echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+       else # Add other i860-SVR4 vendors below as they are discovered.
+         echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+       fi
+       exit 0 ;;
+    mini*:CTIX:SYS*5:*)
+       # "miniframe"
+       echo m68010-convergent-sysv
+       exit 0 ;;
+    M68*:*:R3V[567]*:*)
+       test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+       OS_REL=''
+       test -r /etc/.relid \
+       && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+         && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+         && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && echo i486-ncr-sysv4 && exit 0 ;;
+    m68*:LynxOS:2.*:*)
+       echo m68k-unknown-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    mc68030:UNIX_System_V:4.*:*)
+       echo m68k-atari-sysv4
+       exit 0 ;;
+    i?86:LynxOS:2.*:*)
+       echo i386-unknown-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    TSUNAMI:LynxOS:2.*:*)
+       echo sparc-unknown-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    rs6000:LynxOS:2.*:* | PowerPC:LynxOS:2.*:*)
+       echo rs6000-unknown-lynxos${UNAME_RELEASE}
+       exit 0 ;;
+    SM[BE]S:UNIX_SV:*:*)
+       echo mips-dde-sysv${UNAME_RELEASE}
+       exit 0 ;;
+    RM*:SINIX-*:*:*)
+       echo mips-sni-sysv4
+       exit 0 ;;
+    *:SINIX-*:*:*)
+       if uname -p 2>/dev/null >/dev/null ; then
+               UNAME_MACHINE=`(uname -p) 2>/dev/null`
+               echo ${UNAME_MACHINE}-sni-sysv4
+       else
+               echo ns32k-sni-sysv
+       fi
+       exit 0 ;;
+    PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                           # says <Richard.M.Bartel@ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit 0 ;;
+    *:UNIX_System_V:4*:FTX*)
+       # From Gerald Hewes <hewes@openmarket.com>.
+       # How about differentiating between stratus architectures? -djm
+       echo hppa1.1-stratus-sysv4
+       exit 0 ;;
+    *:*:*:FTX*)
+       # From seanf@swdc.stratus.com.
+       echo i860-stratus-sysv4
+       exit 0 ;;
+    mc68*:A/UX:*:*)
+       echo m68k-apple-aux${UNAME_RELEASE}
+       exit 0 ;;
+    news*:NEWS-OS:*:6*)
+       echo mips-sony-newsos6
+       exit 0 ;;
+    R3000:*System_V*:*:* | R4000:UNIX_SYSV:*:*)
+       if [ -d /usr/nec ]; then
+               echo mips-nec-sysv${UNAME_RELEASE}
+       else
+               echo mips-unknown-sysv${UNAME_RELEASE}
+       fi
+        exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+cat >dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+         ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+       printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+       printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+#if !defined (ultrix)
+  printf ("vax-dec-bsd\n"); exit (0);
+#else
+  printf ("vax-dec-ultrix\n"); exit (0);
+#endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
+rm -f dummy.c dummy
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+       echo c1-convex-bsd
+       exit 0 ;;
+    c2*)
+       if getsysinfo -f scalar_acc
+       then echo c32-convex-bsd
+       else echo c2-convex-bsd
+       fi
+       exit 0 ;;
+    c34*)
+       echo c34-convex-bsd
+       exit 0 ;;
+    c38*)
+       echo c38-convex-bsd
+       exit 0 ;;
+    c4*)
+       echo c4-convex-bsd
+       exit 0 ;;
+    esac
+fi
+
+#echo '(Unable to guess system type)' 1>&2
+
+exit 1
diff --git a/config.sub b/config.sub
new file mode 100755 (executable)
index 0000000..8fef96a
--- /dev/null
@@ -0,0 +1,915 @@
+#! /bin/sh
+# Configuration validation subroutine script, version 1.1.
+#   Copyright (C) 1991, 92, 93, 94, 95, 1996 Free Software Foundation, Inc.
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# 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 of the License, 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., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Synched up with: FSF 19.31.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#      CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+if [ x$1 = x ]
+then
+       echo Configuration name missing. 1>&2
+       echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
+       echo "or     $0 ALIAS" 1>&2
+       echo where ALIAS is a recognized configuration type. 1>&2
+       exit 1
+fi
+
+# First pass through any local machine types.
+case $1 in
+       *local*)
+               echo $1
+               exit 0
+               ;;
+       *)
+       ;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS (if any).
+basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+if [ $basic_machine != $1 ]
+then os=`echo $1 | sed 's/.*-/-/'`
+else os=; fi
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+       -sun*os*)
+               # Prevent following clause from handling this invalid input.
+               ;;
+       -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+       -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+       -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+       -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+       -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+       -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+       -apple)
+               os=
+               basic_machine=$1
+               ;;
+       -hiux*)
+               os=-hiuxwe2
+               ;;
+       -sco5)
+               os=sco3.2v5
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
+               ;;
+       -sco4)
+               os=-sco3.2v4
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
+               ;;
+       -sco3.2.[4-9]*)
+               os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
+               ;;
+       -sco3.2v[4-9]*)
+               # Don't forget version if it is 3.2v4 or newer.
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
+               ;;
+       -sco*)
+               os=-sco3.2v2
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
+               ;;
+       -isc)
+               os=-isc2.2
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
+               ;;
+       -clix*)
+               basic_machine=clipper-intergraph
+               ;;
+       -isc*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
+               ;;
+       -lynx*)
+               os=-lynxos
+               ;;
+       -ptx*)
+               basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+               ;;
+       -windowsnt*)
+               os=`echo $os | sed -e 's/windowsnt/winnt/'`
+               ;;
+       -psos*)
+               os=-psos
+               ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+       # Recognize the basic CPU types without company name.
+       # Some are omitted here because they have special meanings below.
+       tahoe | i[3-9]86 | i860 | m68k | m68000 | m88k | ns32k | arm \
+               | arme[lb] | pyramid \
+               | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \
+               | alpha | we32k | mab | ns16k | clipper | i370 | sh \
+               | powerpc | powerpcle | 1750a | dsp16xx | mips64 | mipsel \
+               | pdp11 | mips64el | mips64orion | mips64orionel \
+               | sparc | sparclet | sparclite | sparc64)
+               basic_machine=$basic_machine-unknown
+               ;;
+       # Object if more than one company name word.
+       *-*-*)
+               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               exit 1
+               ;;
+       # Recognize the basic CPU types with company name.
+       vax-* | tahoe-* | i[3-9]86-* | i860-* | m68k-* | m68000-* | m88k-* \
+             | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
+             | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* | power-* \
+             | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
+             | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
+             | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
+             | pdp11-* | sh-* | powerpc-* | powerpcle-* | sparc64-* | mips64-* | mipsel-* \
+             | mips64el-* | mips64orion-* | mips64orionel-* | mab-*)
+               ;;
+       # Recognize names of some NetBSD ports.
+       amiga-* | hp300-* | mac68k-* | sun3-* | pmax-*)
+               ;;
+       # Recognize the various machine names and aliases which stand
+       # for a CPU type and a company and sometimes even an OS.
+       3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+               basic_machine=m68000-att
+               ;;
+       3b*)
+               basic_machine=we32k-att
+               ;;
+       alliant | fx80)
+               basic_machine=fx80-alliant
+               ;;
+       altos | altos3068)
+               basic_machine=m68k-altos
+               ;;
+       am29k)
+               basic_machine=a29k-none
+               os=-bsd
+               ;;
+       amdahl)
+               basic_machine=580-amdahl
+               os=-sysv
+               ;;
+       amiga | amiga-*)
+               basic_machine=m68k-cbm
+               ;;
+       amigados)
+               basic_machine=m68k-cbm
+               os=-amigados
+               ;;
+       amigaunix | amix)
+               basic_machine=m68k-cbm
+               os=-sysv4
+               ;;
+       apollo68)
+               basic_machine=m68k-apollo
+               os=-sysv
+               ;;
+       aux)
+               basic_machine=m68k-apple
+               os=-aux
+               ;;
+       aux)
+               basic_machine=m68k-apple
+               os=-aux
+               ;;
+       balance)
+               basic_machine=ns32k-sequent
+               os=-dynix
+               ;;
+       convex-c1)
+               basic_machine=c1-convex
+               os=-bsd
+               ;;
+       convex-c2)
+               basic_machine=c2-convex
+               os=-bsd
+               ;;
+       convex-c32)
+               basic_machine=c32-convex
+               os=-bsd
+               ;;
+       convex-c34)
+               basic_machine=c34-convex
+               os=-bsd
+               ;;
+       convex-c38)
+               basic_machine=c38-convex
+               os=-bsd
+               ;;
+       cray | ymp)
+               basic_machine=ymp-cray
+               os=-unicos
+               ;;
+       cray2)
+               basic_machine=cray2-cray
+               os=-unicos
+               ;;
+       [ctj]90-cray)
+               basic_machine=c90-cray
+               os=-unicos
+               ;;
+       crds | unos)
+               basic_machine=m68k-crds
+               ;;
+       da30 | da30-*)
+               basic_machine=m68k-da30
+               ;;
+       decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+               basic_machine=mips-dec
+               ;;
+       delta | 3300 | motorola-3300 | motorola-delta \
+             | 3300-motorola | delta-motorola)
+               basic_machine=m68k-motorola
+               ;;
+       delta88)
+               basic_machine=m88k-motorola
+               os=-sysv3
+               ;;
+       dpx20 | dpx20-*)
+               basic_machine=rs6000-bull
+               os=-bosx
+               ;;
+       dpx2* | dpx2*-bull)
+               basic_machine=m68k-bull
+               os=-sysv3
+               ;;
+       ebmon29k)
+               basic_machine=a29k-amd
+               os=-ebmon
+               ;;
+       elxsi)
+               basic_machine=elxsi-elxsi
+               os=-bsd
+               ;;
+       encore | umax | mmax)
+               basic_machine=ns32k-encore
+               ;;
+       fx2800)
+               basic_machine=i860-alliant
+               ;;
+       genix)
+               basic_machine=ns32k-ns
+               ;;
+       gmicro)
+               basic_machine=tron-gmicro
+               os=-sysv
+               ;;
+       h3050r* | hiux*)
+               basic_machine=hppa1.1-hitachi
+               os=-hiuxwe2
+               ;;
+       h8300hms)
+               basic_machine=h8300-hitachi
+               os=-hms
+               ;;
+       harris)
+               basic_machine=m88k-harris
+               os=-sysv3
+               ;;
+       hp300-*)
+               basic_machine=m68k-hp
+               ;;
+       hp300bsd)
+               basic_machine=m68k-hp
+               os=-bsd
+               ;;
+       hp300hpux)
+               basic_machine=m68k-hp
+               os=-hpux
+               ;;
+       hp9k2[0-9][0-9] | hp9k31[0-9])
+               basic_machine=m68000-hp
+               ;;
+       hp9k3[2-9][0-9])
+               basic_machine=m68k-hp
+               ;;
+       hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
+               basic_machine=hppa1.1-hp
+               ;;
+       hp9k8[0-9][0-9] | hp8[0-9][0-9])
+               basic_machine=hppa1.0-hp
+               ;;
+       i370-ibm* | ibm*)
+               basic_machine=i370-ibm
+               os=-mvs
+               ;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+       i[3-9]86v32)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
+               os=-sysv32
+               ;;
+       i[3-9]86v4*)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
+               os=-sysv4
+               ;;
+       i[3-9]86v)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
+               os=-sysv
+               ;;
+       i[3-9]86sol2)
+               basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
+               os=-solaris2
+               ;;
+       iris | iris4d)
+               basic_machine=mips-sgi
+               case $os in
+                   -irix*)
+                       ;;
+                   *)
+                       os=-irix4
+                       ;;
+               esac
+               ;;
+       isi68 | isi)
+               basic_machine=m68k-isi
+               os=-sysv
+               ;;
+       m88k-omron*)
+               basic_machine=m88k-omron
+               ;;
+       magnum | m3230)
+               basic_machine=mips-mips
+               os=-sysv
+               ;;
+       merlin)
+               basic_machine=ns32k-utek
+               os=-sysv
+               ;;
+       miniframe)
+               basic_machine=m68000-convergent
+               ;;
+       mips3*-*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+               ;;
+       mips3*)
+               basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+               ;;
+       ncr3000)
+               basic_machine=i486-ncr
+               os=-sysv4
+               ;;
+       news | news700 | news800 | news900)
+               basic_machine=m68k-sony
+               os=-newsos
+               ;;
+       news1000)
+               basic_machine=m68030-sony
+               os=-newsos
+               ;;
+       news-3600 | risc-news)
+               basic_machine=mips-sony
+               os=-newsos
+               ;;
+       next | m*-next )
+               basic_machine=m68k-next
+               case $os in
+                   -nextstep* )
+                       ;;
+                   -ns2*)
+                     os=-nextstep2
+                       ;;
+                   *)
+                     os=-nextstep3
+                       ;;
+               esac
+               ;;
+       nh3000)
+               basic_machine=m68k-harris
+               os=-cxux
+               ;;
+       nh[45]000)
+               basic_machine=m88k-harris
+               os=-cxux
+               ;;
+       nindy960)
+               basic_machine=i960-intel
+               os=-nindy
+               ;;
+       np1)
+               basic_machine=np1-gould
+               ;;
+       pa-hitachi)
+               basic_machine=hppa1.1-hitachi
+               os=-hiuxwe2
+               ;;
+       paragon)
+               basic_machine=i860-intel
+               os=-osf
+               ;;
+       pbd)
+               basic_machine=sparc-tti
+               ;;
+       pbb)
+               basic_machine=m68k-tti
+               ;;
+        pc532 | pc532-*)
+               case $os in
+                   -netbsd*)
+                       basic_machine=pc532-unknown
+                       ;;
+                   *)
+                       basic_machine=ns32k-pc532
+                       ;;
+               esac
+               ;;
+       pentium | p5)
+               basic_machine=i586-intel
+               ;;
+       pentiumpro | p6)
+               basic_machine=i686-intel
+               ;;
+       pentium-* | p5-*)
+               basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       pentiumpro-* | p6-*)
+               basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       k5)
+               # We don't have specific support for AMD's K5 yet, so just call it a Pentium
+               basic_machine=i586-amd
+               ;;
+       nexen)
+               # We don't have specific support for Nexgen yet, so just call it a Pentium
+               basic_machine=i586-nexgen
+               ;;
+       pn)
+               basic_machine=pn-gould
+               ;;
+       power)  basic_machine=rs6000-ibm
+               ;;
+       ppc)    basic_machine=powerpc-unknown
+               ;;
+       ppc-*)  basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ppcle | powerpclittle | ppc-le | powerpc-little)
+               basic_machine=powerpcle-unknown
+               ;;
+       ppcle-* | powerpclittle-*)
+               basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       ps2)
+               basic_machine=i386-ibm
+               ;;
+       rm[46]00)
+               basic_machine=mips-siemens
+               ;;
+       rtpc | rtpc-*)
+               basic_machine=romp-ibm
+               ;;
+       sequent)
+               basic_machine=i386-sequent
+               ;;
+       sh)
+               basic_machine=sh-hitachi
+               os=-hms
+               ;;
+       sps7)
+               basic_machine=m68k-bull
+               os=-sysv2
+               ;;
+       spur)
+               basic_machine=spur-unknown
+               ;;
+       sun2)
+               basic_machine=m68000-sun
+               ;;
+       sun2os3)
+               basic_machine=m68000-sun
+               os=-sunos3
+               ;;
+       sun2os4)
+               basic_machine=m68000-sun
+               os=-sunos4
+               ;;
+       sun3os3)
+               basic_machine=m68k-sun
+               os=-sunos3
+               ;;
+       sun3os4)
+               basic_machine=m68k-sun
+               os=-sunos4
+               ;;
+       sun4os3)
+               basic_machine=sparc-sun
+               os=-sunos3
+               ;;
+       sun4os4)
+               basic_machine=sparc-sun
+               os=-sunos4
+               ;;
+       sun4sol2)
+               basic_machine=sparc-sun
+               os=-solaris2
+               ;;
+       sun3 | sun3-*)
+               basic_machine=m68k-sun
+               ;;
+       sun4)
+               basic_machine=sparc-sun
+               ;;
+       sun386 | sun386i | roadrunner)
+               basic_machine=i386-sun
+               ;;
+       symmetry)
+               basic_machine=i386-sequent
+               os=-dynix
+               ;;
+       tower | tower-32)
+               basic_machine=m68k-ncr
+               ;;
+       udi29k)
+               basic_machine=a29k-amd
+               os=-udi
+               ;;
+       ultra3)
+               basic_machine=a29k-nyu
+               os=-sym1
+               ;;
+       vaxv)
+               basic_machine=vax-dec
+               os=-sysv
+               ;;
+       vms)
+               basic_machine=vax-dec
+               os=-vms
+               ;;
+       vxworks960)
+               basic_machine=i960-wrs
+               os=-vxworks
+               ;;
+       vxworks68)
+               basic_machine=m68k-wrs
+               os=-vxworks
+               ;;
+       vxworks29k)
+               basic_machine=a29k-wrs
+               os=-vxworks
+               ;;
+       xmp)
+               basic_machine=xmp-cray
+               os=-unicos
+               ;;
+        xps | xps100)
+               basic_machine=xps100-honeywell
+               ;;
+       none)
+               basic_machine=none-none
+               os=-none
+               ;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+       mips)
+               basic_machine=mips-mips
+               ;;
+       romp)
+               basic_machine=romp-ibm
+               ;;
+       rs6000)
+               basic_machine=rs6000-ibm
+               ;;
+       vax)
+               basic_machine=vax-dec
+               ;;
+       pdp11)
+               basic_machine=pdp11-dec
+               ;;
+       we32k)
+               basic_machine=we32k-att
+               ;;
+       sparc)
+               basic_machine=sparc-sun
+               ;;
+        cydra)
+               basic_machine=cydra-cydrome
+               ;;
+       orion)
+               basic_machine=orion-highlevel
+               ;;
+       orion105)
+               basic_machine=clipper-highlevel
+               ;;
+       *)
+               echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+       *-digital*)
+               basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+               ;;
+       *-commodore*)
+               basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+               ;;
+       *)
+               ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+       # -solaris* is a basic system type, with this one exception.
+       -solaris1 | -solaris1.*)
+               os=`echo $os | sed -e 's|solaris1|sunos4|'`
+               ;;
+       -solaris)
+               os=-solaris2
+               ;;
+       -unixware* | svr4*)
+               os=-sysv4
+               ;;
+       -gnu/linux*)
+               os=`echo $os | sed -e 's|gnu/linux|linux|'`
+               ;;
+       # First accept the basic system types.
+       # The portable systems comes first.
+       # Each alternative MUST END IN A *, to match a version number.
+       # -sysv* is not here because it comes later, after sysvr4.
+       -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+             | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[345]* \
+             | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+             | -amigados* | -msdos* | -newsos* | -unicos* | -aof* | -aos* \
+             | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
+             | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
+             | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \
+             | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
+             | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+             | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+             | -cygwin32* | -pe* | -psos* | -moss* | -openbsd* )
+       # Remember, each alternative MUST END IN *, to match a version number.
+               ;;
+       -sunos5*)
+               os=`echo $os | sed -e 's|sunos5|solaris2|'`
+               ;;
+       -sunos6*)
+               os=`echo $os | sed -e 's|sunos6|solaris3|'`
+               ;;
+       -osfrose*)
+               os=-osfrose
+               ;;
+       -osf*)
+               os=-osf
+               ;;
+       -utek*)
+               os=-bsd
+               ;;
+       -dynix*)
+               os=-bsd
+               ;;
+       -acis*)
+               os=-aos
+               ;;
+       -ctix* | -uts*)
+               os=-sysv
+               ;;
+       -ns2 )
+               os=-nextstep2
+               ;;
+       # Preserve the version number of sinix5.
+       -sinix5.*)
+               os=`echo $os | sed -e 's|sinix|sysv|'`
+               ;;
+       -sinix*)
+               os=-sysv4
+               ;;
+       -triton*)
+               os=-sysv3
+               ;;
+       -oss*)
+               os=-sysv3
+               ;;
+       -svr4)
+               os=-sysv4
+               ;;
+       -svr3)
+               os=-sysv3
+               ;;
+       -sysvr4)
+               os=-sysv4
+               ;;
+       # This must come after -sysvr4.
+       -sysv*)
+               ;;
+       -xenix)
+               os=-xenix
+               ;;
+       -none)
+               ;;
+       *)
+               # Get rid of the `-' at the beginning of $os.
+               os=`echo $os | sed 's/[^-]*-//'`
+               echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+               exit 1
+               ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+       *-acorn)
+               os=-riscix1.2
+               ;;
+       arm*-semi)
+               os=-aout
+               ;;
+        pdp11-*)
+               os=-none
+               ;;
+       *-dec | vax-*)
+               os=-ultrix4.2
+               ;;
+       m68*-apollo)
+               os=-domain
+               ;;
+       i386-sun)
+               os=-sunos4.0.2
+               ;;
+       m68000-sun)
+               os=-sunos3
+               # This also exists in the configure program, but was not the
+               # default.
+               # os=-sunos4
+               ;;
+       *-tti)  # must be before sparc entry or we get the wrong os.
+               os=-sysv3
+               ;;
+       sparc-* | *-sun)
+               os=-sunos4.1.1
+               ;;
+       *-ibm)
+               os=-aix
+               ;;
+       *-hp)
+               os=-hpux
+               ;;
+       *-hitachi)
+               os=-hiux
+               ;;
+       i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+               os=-sysv
+               ;;
+       *-cbm)
+               os=-amigados
+               ;;
+       *-dg)
+               os=-dgux
+               ;;
+       *-dolphin)
+               os=-sysv3
+               ;;
+       m68k-ccur)
+               os=-rtu
+               ;;
+       m88k-omron*)
+               os=-luna
+               ;;
+       *-next )
+               os=-nextstep
+               ;;
+       *-sequent)
+               os=-ptx
+               ;;
+       *-crds)
+               os=-unos
+               ;;
+       *-ns)
+               os=-genix
+               ;;
+       i370-*)
+               os=-mvs
+               ;;
+       *-next)
+               os=-nextstep3
+               ;;
+        *-gould)
+               os=-sysv
+               ;;
+        *-highlevel)
+               os=-bsd
+               ;;
+       *-encore)
+               os=-bsd
+               ;;
+        *-sgi)
+               os=-irix
+               ;;
+        *-siemens)
+               os=-sysv4
+               ;;
+       *-masscomp)
+               os=-rtu
+               ;;
+       *)
+               os=-none
+               ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+       *-unknown)
+               case $os in
+                       -riscix*)
+                               vendor=acorn
+                               ;;
+                       -sunos*)
+                               vendor=sun
+                               ;;
+                       -lynxos*)
+                               vendor=lynx
+                               ;;
+                       -aix*)
+                               vendor=ibm
+                               ;;
+                       -hpux*)
+                               vendor=hp
+                               ;;
+                       -hiux*)
+                               vendor=hitachi
+                               ;;
+                       -unos*)
+                               vendor=crds
+                               ;;
+                       -dgux*)
+                               vendor=dg
+                               ;;
+                       -luna*)
+                               vendor=omron
+                               ;;
+                       -genix*)
+                               vendor=ns
+                               ;;
+                       -mvs*)
+                               vendor=ibm
+                               ;;
+                       -ptx*)
+                               vendor=sequent
+                               ;;
+                       -vxworks*)
+                               vendor=wrs
+                               ;;
+                       -aux*)
+                               vendor=apple
+                               ;;
+                       -aux*)
+                               vendor=apple
+               esac
+               basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+               ;;
+esac
+
+echo $basic_machine$os
diff --git a/configure b/configure
new file mode 100755 (executable)
index 0000000..0beba52
--- /dev/null
+++ b/configure
@@ -0,0 +1,12575 @@
+#! /bin/sh
+
+#### Configuration script for XEmacs.  Largely divergent from FSF.
+#### Guess values for system-dependent variables and create Makefiles.
+#### Generated automatically using autoconf version 2.12 
+#### Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
+#### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
+#### Copyright (C) 1995, 1996 Ben Wing.
+
+### Don't edit this script!
+### This script was automatically generated by the `autoconf' program
+### from the file `./configure.in'.
+### To rebuild it, execute the command
+###    autoconf
+### in the this directory.  You must have autoconf version 2.12 or later.
+
+### 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; see the file COPYING.  If not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+### 02111-1307, USA.
+
+### For usage, run `./configure --help'
+### For more detailed information on building and installing XEmacs,
+### read the file `INSTALL'.
+###
+### If configure succeeds, it leaves its status in config.status.
+### A log of configuration tests can be found in config.log.
+### If configure fails after disturbing the status quo,
+###    config.status is removed.
+
+ac_help="$ac_help
+  --with-x                use the X Window System"
+
+
+
+if test -n "$ZSH_VERSION"; then
+    setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
+  setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
+  setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
+  setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
+      if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
+elif test -n "$BASH_VERSION"; then
+    set -o posix
+  unset CDPATH
+else
+  if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
+fi
+
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${{exec_prefix}}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+subdirs=
+MFLAGS= MAKEFLAGS=
+ac_max_here_lines=12
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+  exec 6>/dev/null
+else
+  exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+  case "$ac_arg" in
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c) ;;
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+  *" "*|*"     "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+  esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=src/lisp.h
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_prog=$0
+  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+  else
+    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+  fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    echo "loading site script $ac_site_file"
+    . "$ac_site_file"
+  fi
+done
+
+
+ac_ext=c
+xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
+xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
+xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
+ac_cpp='$CPP '"$xe_cppflags"
+ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
+cross_compiling=no
+
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+    ac_n= ac_c='
+' ac_t='       '
+  else
+    ac_n=-n ac_c= ac_t=
+  fi
+else
+  ac_n= ac_c='\c' ac_t=
+fi
+
+
+progname="`echo $0 | sed 's:^\./\./:\./:'`"
+
+
+MAKE_SUBDIR="$MAKE_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$MAKE_SUBDIR"; fi
+INSTALL_ARCH_DEP_SUBDIR="$INSTALL_ARCH_DEP_SUBDIR lib-src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lib-src\" to \$INSTALL_ARCH_DEP_SUBDIR"; fi
+
+prefix='/usr/local'
+exec_prefix='${prefix}'
+bindir='${exec_prefix}/bin'
+datadir='${prefix}/lib'
+statedir='${prefix}/lib'
+libdir='${exec_prefix}/lib'
+mandir='${prefix}/man/man1'
+infodir='${datadir}/${PROGNAME}-${version}/info'
+infopath=''
+install_pp=''
+lispdir='${datadir}/${PROGNAME}-${version}/lisp'
+pkgdir='${datadir}/${PROGNAME}-${version}/lisp'
+package_path=''
+etcdir='${datadir}/${PROGNAME}-${version}/etc'
+lockdir='${statedir}/${PROGNAME}/lock'
+archlibdir='${libdir}/${PROGNAME}-${version}/${configuration}'
+with_site_lisp='no'
+with_menubars=''
+with_scrollbars=''
+with_dialogs=''
+with_file_coding=''
+puresize=''
+cpp='' cppflags='' libs='' ldflags=''
+dynamic=''
+with_x11=''
+with_msw=''
+rel_alloc='default'
+with_system_malloc='default'
+with_dlmalloc='default'
+native_sound_lib=''
+use_assertions="yes"
+with_toolbars=""
+with_tty=""
+use_union_type="no"
+with_dnet=""
+
+
+
+
+arguments="$@"
+
+quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
+quoted_arguments=
+for i in "$@"; do
+   case "$i" in
+   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+   | --no-cr | --no-c) ;;
+   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+   *)
+   quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
+   quoted_arguments="$quoted_arguments '$quoted_i'" ;;
+   esac
+done
+
+while test $# != 0; do
+  arg="$1"; shift
+  case "$arg" in
+    --no-create|--no-recursion) ;;
+        -* )
+            case "$arg" in
+        -*=*)
+         opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([^=]*\)=.*$:\1:'`
+         val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[^=]*=\(.*\)$:\1:'`
+         valomitted=no
+       ;;
+                                                                          -*)
+                                         opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
+          val="yes" valomitted=yes
+        ;;
+      esac
+
+            optname="$opt"
+      opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
+
+            case "${valomitted}-${opt}" in yes-without_* )
+       opt=`echo $opt | sed 's/without/with/'`
+       valomitted="no" val="no" ;;
+      esac
+
+            case "$opt" in
+
+       run_in_place    | \
+        with_site_lisp  | \
+       with_x          | \
+       with_x11        | \
+       with_msw        | \
+       with_gcc        | \
+       with_gnu_make   | \
+       dynamic         | \
+       with_ncurses    | \
+       with_dnet       | \
+       with_socks      | \
+       with_dragndrop  | \
+       with_cde        | \
+       with_offix      | \
+       with_gpm        | \
+       with_xpm        | \
+       with_xface      | \
+       with_gif        | \
+       with_jpeg       | \
+       with_png        | \
+       with_tiff       | \
+       with_session    | \
+       with_xmu        | \
+       with_quantify   | \
+       with_toolbars   | \
+       with_tty        | \
+       with_xfs        | \
+       with_i18n3      | \
+       with_mule       | \
+       with_file_coding        | \
+       with_canna      | \
+       with_wnn        | \
+       with_wnn6       | \
+       with_workshop   | \
+       with_sparcworks | \
+       with_tooltalk   | \
+       with_ldap       | \
+       with_pop        | \
+       with_kerberos   | \
+       with_hesiod     | \
+       with_dnet       | \
+       with_infodock   | \
+       external_widget | \
+       verbose         | \
+       extra_verbose   | \
+       const_is_losing | \
+       usage_tracking  | \
+       use_union_type  | \
+       debug           | \
+       use_assertions  | \
+       use_minimal_tagbits                     | \
+       use_indexed_lrecord_implementation      | \
+       gung_ho         | \
+       use_assertions  | \
+       memory_usage_stats | \
+       with_clash_detection | \
+       with_shlib | \
+       no_doc_file )
+                 case "$val" in
+           y | ye | yes )      val=yes ;;
+           n | no )            val=no  ;;
+           * ) (echo "$progname: Usage error:"
+echo " " "The \`--$optname' option requires a boolean value: \`yes' or \`no'."
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
+         esac
+          eval "$opt=\"$val\"" ;;
+
+
+                       srcdir          | \
+       compiler        | \
+       cflags          | \
+       cpp             | \
+       cppflags        | \
+       libs            | \
+       ldflags         | \
+       puresize        | \
+       cache_file      | \
+       native_sound_lib | \
+       site_lisp       | \
+       x_includes      | \
+       x_libraries     | \
+       site_includes   | \
+       site_libraries  | \
+       site_prefixes   | \
+       site_runtime_libraries )
+                 if test "$valomitted" = "yes" ; then
+                   if test "$#" = 0 ; then
+             (echo "$progname: Usage error:"
+echo " " "The \`--$optname' option requires a value."
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
+           fi
+           val="$1"; shift
+         fi
+          eval "$opt=\"$val\""
+       ;;
+
+               rel_alloc | \
+       with_dlmalloc | \
+       with_debug_malloc  | use_debug_malloc | \
+       with_system_malloc | use_system_malloc )
+         case "$val" in
+           y | ye | yes )      val=yes ;;
+           n | no )            val=no  ;;
+           d | de | def | defa | defau | defaul | default ) val=default ;;
+           * ) (echo "$progname: Usage error:"
+echo " " "The \`--$optname' option requires one of these values:
+  \`yes', \`no', or \`default'."
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
+         esac
+         case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
+          eval "$opt=\"$val\""
+        ;;
+
+                "with_database" )
+         with_database_berkdb=no
+         with_database_dbm=no
+         with_database_gnudbm=no
+         for x in `echo "$val" | sed -e 's/,/ /g'` ; do
+           case "$x" in
+               no ) ;;
+               b | be | ber | berk | berkd | berkdb )  with_database_berkdb=yes ;;
+               d | db | dbm )                          with_database_dbm=yes    ;;
+               g | gn | gnu | gnud | gnudb | gnudbm )  with_database_gnudbm=yes ;;
+               * ) (echo "$progname: Usage error:"
+echo " " "The \`--$optname' option value
+  must be either \`no' or a comma-separated list
+  of one or more of \`berkdb', \`dbm', or \`gnudbm'."
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
+            esac
+         done
+         if test "$with_database_dbm"    = "yes" -a \
+                 "$with_database_gnudbm" = "yes"; then
+         (echo "$progname: Usage error:"
+echo " " "Only one of \`dbm' and \`gnudbm' may be specified
+  with the \`--$optname' option."
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
+         fi
+        ;;
+
+               "with_sound" )
+                         case "$val" in
+           y | ye | yes )                      val=native ;;
+           n | no | non | none )               val=no;;
+           na | nat | nati | nativ | native )  val=native  ;;
+           ne | net | neta | netau | netaud | netaudi | netaudio | nas ) val=nas  ;;
+           b | bo | bot | both )               val=both;;
+           * ) (echo "$progname: Usage error:"
+echo " " "The \`--$optname' option must have one of these values:
+  \`native', \`nas', \`both', or \`none'."
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
+         esac
+          eval "$opt=\"$val\""
+        ;;
+
+               "with_xim" )
+         case "$val" in
+           y | ye | yes )                val=yes   ;;
+           n | no | non | none )         val=no    ;;
+           x | xl | xli | xlib )         val=xlib  ;;
+           m | mo | mot | moti | motif ) val=motif ;;
+           * ) (echo "$progname: Usage error:"
+echo " " "The \`--$optname' option must have one of these values:
+  \`motif', \`xlib', \`yes', or \`no'."
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
+         esac
+          eval "$opt=\"$val\""
+        ;;
+
+               "with_xfs" )
+         case "$val" in
+         y | ye | yes )                val=yes ;;
+         n | no | non | none )         val=no  ;;
+         * ) (echo "$progname: Usage error:"
+echo " " "The \`--$optname' option must have one of these values:
+ \`yes', or \`no'."
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
+         esac
+         eval "$opt=\"$val\""
+       ;;
+
+               "mail_locking" )
+         case "$val" in
+           lockf )     val=lockf ;;
+           flock )     val=flock ;;
+           file )      val=file  ;;
+           * ) (echo "$progname: Usage error:"
+echo " " "The \`--$optname' option must have one of these values:
+  \`lockf', \`flock', or \`file'."
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
+         esac
+          eval "$opt=\"$val\""
+        ;;
+
+               "error_checking" )
+                         
+         for x in `echo "$val" | sed -e 's/,/ /g'` ; do
+           case "$x" in
+                     n | no | non | none ) new_default=no ;;
+             a | al | all )        new_default=yes ;;
+
+             extents )       error_check_extents=yes ;;
+             noextents )     error_check_extents=no ;;
+
+             typecheck )     error_check_typecheck=yes ;;
+             notypecheck )   error_check_typecheck=no ;;
+
+             bufpos )        error_check_bufpos=yes ;;
+             nobufpos )      error_check_bufpos=no ;;
+
+             gc )            error_check_gc=yes ;;
+             nogc )          error_check_gc=no ;;
+
+             malloc )        error_check_malloc=yes ;;
+             nomalloc )      error_check_malloc=no ;;
+
+             * ) bogus_error_check=yes ;;
+           esac
+           if test "$bogus_error_check" -o \
+                \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
+               if test "$error_check_default" = yes ; then
+                 types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', and \`nomalloc'."
+               else
+                 types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', and \`malloc'."
+               fi
+               (echo "$progname: Usage error:"
+echo " " "Valid types for the \`--$optname' option are:
+  $types."
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
+           elif test -n "$new_default" ; then
+               error_check_extents=$new_default
+               error_check_typecheck=$new_default
+               error_check_bufpos=$new_default
+               error_check_gc=$new_default
+               error_check_malloc=$new_default
+               new_default=    # reset this
+           fi
+           echeck_notfirst=true
+         done
+       ;;
+
+                               
+               prefix | exec_prefix | bindir | datadir | statedir | libdir | \
+       mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
+       archlibdir | docdir | package_path )    
+                  if test "$valomitted" = "yes"; then
+            if test "$#" = 0; then
+                (echo "$progname: Usage error:"
+echo " " "The \`--$optname' option requires a value."
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1;
+            fi
+            val="$1"; shift
+          fi
+          eval "$opt=\"$val\""
+
+                          case "$opt" in
+             lispdir ) { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining LISPDIR_USER_DEFINED
+EOF
+cat >> confdefs.h <<\EOF
+#define LISPDIR_USER_DEFINED 1
+EOF
+}
+ ;;
+             etcdir  )  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining ETCDIR_USER_DEFINED
+EOF
+cat >> confdefs.h <<\EOF
+#define ETCDIR_USER_DEFINED 1
+EOF
+}
+ ;;
+             infodir ) { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining INFODIR_USER_DEFINED
+EOF
+cat >> confdefs.h <<\EOF
+#define INFODIR_USER_DEFINED 1
+EOF
+}
+ ;;
+             infopath ) { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining INFOPATH_USER_DEFINED
+EOF
+cat >> confdefs.h <<\EOF
+#define INFOPATH_USER_DEFINED 1
+EOF
+}
+ ;;
+             package_path ) { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining PACKAGE_PATH_USER_DEFINED
+EOF
+cat >> confdefs.h <<\EOF
+#define PACKAGE_PATH_USER_DEFINED 1
+EOF
+}
+ ;;
+             datadir )
+               { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining INFODIR_USER_DEFINED
+EOF
+cat >> confdefs.h <<\EOF
+#define INFODIR_USER_DEFINED 1
+EOF
+}
+
+               { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining LISPDIR_USER_DEFINED
+EOF
+cat >> confdefs.h <<\EOF
+#define LISPDIR_USER_DEFINED 1
+EOF
+}
+
+               { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining ETCDIR_USER_DEFINED
+EOF
+cat >> confdefs.h <<\EOF
+#define ETCDIR_USER_DEFINED 1
+EOF
+}
+ ;;
+             statedir | lockdir ) { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining LOCKDIR_USER_DEFINED
+EOF
+cat >> confdefs.h <<\EOF
+#define LOCKDIR_USER_DEFINED 1
+EOF
+}
+ ;;
+             exec_prefix | libdir | archlibdir ) { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining ARCHLIBDIR_USER_DEFINED
+EOF
+cat >> confdefs.h <<\EOF
+#define ARCHLIBDIR_USER_DEFINED 1
+EOF
+}
+ ;;
+           esac
+       ;;
+
+               "no_create" ) ;;
+
+               "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
+
+                       "with_menubars" | "with_scrollbars" | "with_dialogs" )
+         case "$val" in
+           l | lu | luc | luci | lucid )               val=lucid  ;;
+           m | mo | mot | moti | motif )               val=motif  ;;
+           athena3d | athena-3d )                      val=athena3d ;;
+           a | at | ath | athe | athen | athena )      val=athena ;;
+           n | no | non | none )                       val=no ;;
+           * ) (echo "$progname: Usage error:"
+echo " " "The \`--$optname' option must have one of these values:
+  \`lucid', \`motif', \`athena', \`athena3d', or \`no'."
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
+         esac
+         eval "$opt=\"$val\""
+       ;;
+
+               * ) (echo "$progname: Usage error:"
+echo " " "Unrecognized option: $arg"
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
+
+      esac
+    ;;
+
+        *-*-*) configuration="$arg" ;;
+
+        *) (echo "$progname: Usage error:"
+echo " " "Unrecognized argument: $arg"
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1 ;;
+
+  esac
+done
+
+
+test -n "$cpp"      && CPP="$cpp"
+test -n "$cppflags" && CPPFLAGS="$cppflags"
+test -n "$libs"     && LIBS="$libs"
+test -n "$ldflags"  && LDFLAGS="$ldflags"
+
+eval set x "$quoted_arguments"; shift
+
+test "$extra_verbose" = "yes" && verbose=yes
+
+case "$site_includes" in *:* ) site_includes="`echo '' $site_includes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
+case "$site_libraries" in *:* ) site_libraries="`echo '' $site_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
+case "$site_prefixes" in *:* ) site_prefixes="`echo '' $site_prefixes | sed -e 's/^ //' -e 's/:/ /g'`";; esac
+case "$site_runtime_libraries" in *:* ) site_runtime_libraries="`echo '' $site_runtime_libraries | sed -e 's/^ //' -e 's/:/ /g'`";; esac
+
+test -n "$with_x" && with_x11="$with_x"
+
+
+if test -n "$gung_ho"; then
+  test -z "$use_minimal_tagbits" && use_minimal_tagbits="$gung_ho"
+  test -z "$use_indexed_lrecord_implementation" && \
+    use_indexed_lrecord_implementation="$gung_ho"
+fi
+if test "$use_minimal_tagbits" = "no"; then
+  test "$with_dlmalloc" = "yes" && \
+    (echo "$progname: Usage error:"
+echo " " "--with-dlmalloc requires --use-minimal-tagbits"
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
+  with_dlmalloc=no
+fi
+
+
+
+if test "$with_cde $with_tooltalk" = "yes no"; then
+  (echo "$progname: Usage error:"
+echo " " "--with-cde requires --with-tooltalk"
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
+elif test "$with_tooltalk" = "no" ; then with_cde=no
+elif test "$with_cde" = "yes"; then with_tooltalk=yes
+fi
+
+
+if test "$run_in_place" = "yes"; then
+  echo "configure: warning: "The --run-in-place option is ignored because it is unnecessary."" 1>&2
+fi
+
+case "$srcdir" in
+
+    "" )
+    for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[^/]*$||'`" "." ".." ; do
+      if test -f "$dir/src/lisp.h" -a \
+             -f "$dir/lisp/version.el" ; then
+        srcdir="$dir"
+        break
+      fi
+    done
+    if test -z "$srcdir" ; then
+      (echo "$progname: Usage error:"
+echo " " "Neither the current directory nor its parent seem to
+  contain the XEmacs sources.  If you do not want to build XEmacs in its
+  source tree, you should run \`$progname' in the directory in which
+  you wish to build XEmacs, using the \`--srcdir' option to say where the
+  sources may be found."
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
+    fi
+  ;;
+
+    * )
+    if test ! -f "$srcdir/src/lisp.h" -o \
+           ! -f "$srcdir/lisp/version.el" ; then
+      (echo "$progname: Usage error:"
+echo " " "The directory specified with the \`--srcdir' option,
+  \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
+  either run the \`$progname' script at the top of the XEmacs source
+  tree, or use the \`--srcdir' option to specify the XEmacs source directory."
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
+    fi
+  ;;
+esac
+
+if test -z "$configuration"; then
+  echo $ac_n "checking "host system type"""... $ac_c" 1>&6
+echo "configure:759: checking "host system type"" >&5
+    if configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess | \
+    sed 's/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/'` ; then
+    echo "$ac_t""$configuration" 1>&6
+  else
+    echo "$ac_t""unknown" 1>&6
+    (echo "$progname: Usage error:"
+echo " " "XEmacs has not been ported to this host type.
+Try explicitly specifying the CONFIGURATION when rerunning configure."
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
+  fi
+fi
+
+echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:773: checking whether ln -s works" >&5
+
+rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+  rm -f conftestdata
+  ac_cv_prog_LN_S="ln -s"
+else
+  ac_cv_prog_LN_S=ln
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+  echo "$ac_t""yes" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+for dir in lisp etc man info; do
+  if test ! -d "$dir" ; then
+    echo Making symbolic link to "$srcdir/$dir"
+    ${LN_S} "$srcdir/$dir" "$dir"
+  fi
+done
+
+absolute_pwd="`pwd`";
+if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
+then blddir="$PWD"
+else blddir="$absolute_pwd"
+fi
+
+
+case "$srcdir" in
+  /* ) ;;
+  .  ) srcdir="$blddir" ;;
+  *  ) srcdir="`cd $srcdir && pwd`" ;;
+esac
+
+if test `pwd` != `sh -c cd $srcdir && pwd`  \
+   && test -f "$srcdir/src/config.h"; then
+  (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
+   echo "   as a build directory right now; it has been configured in its own"
+   echo "   right.  To configure in another directory as well, you MUST"
+   echo "   use GNU make.  If you do not have GNU make, then you must"
+   echo "   now do \`make distclean' in $srcdir,"
+   echo "   and then run $progname again.") >&2
+  extrasub='/^VPATH[    ]*=/c\
+vpath %.c $(srcdir)\
+vpath %.h $(srcdir)\
+vpath %.y $(srcdir)\
+vpath %.l $(srcdir)\
+vpath %.s $(srcdir)\
+vpath %.in $(srcdir)'
+fi
+
+. "$srcdir/version.sh" || exit 1;
+if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi
+: "${extra_verbose=$beta}"
+version="${emacs_major_version}.${emacs_minor_version}"
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining EMACS_MAJOR_VERSION = $emacs_major_version
+EOF
+cat >> confdefs.h <<EOF
+#define EMACS_MAJOR_VERSION $emacs_major_version
+EOF
+}
+
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining EMACS_MINOR_VERSION = $emacs_minor_version
+EOF
+cat >> confdefs.h <<EOF
+#define EMACS_MINOR_VERSION $emacs_minor_version
+EOF
+}
+
+if test -n "$emacs_beta_version"; then
+  version="${version}-b${emacs_beta_version}"
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining EMACS_BETA_VERSION = $emacs_beta_version
+EOF
+cat >> confdefs.h <<EOF
+#define EMACS_BETA_VERSION $emacs_beta_version
+EOF
+}
+
+fi
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining XEMACS_CODENAME = "$xemacs_codename"
+EOF
+cat >> confdefs.h <<EOF
+#define XEMACS_CODENAME "$xemacs_codename"
+EOF
+}
+
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining EMACS_VERSION = "$version"
+EOF
+cat >> confdefs.h <<EOF
+#define EMACS_VERSION "$version"
+EOF
+}
+
+
+if test "$with_infodock" = "yes"; then
+  if test ! -f ../ID-INSTALL; then
+    echo "Cannot build InfoDock without InfoDock sources"
+    with_infodock=no
+  fi
+fi
+
+if test "$with_infodock" = "yes"; then
+      { test "$extra_verbose" = "yes" && cat << EOF
+    Defining INFODOCK_MAJOR_VERSION = $infodock_major_version
+EOF
+cat >> confdefs.h <<EOF
+#define INFODOCK_MAJOR_VERSION $infodock_major_version
+EOF
+}
+
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining INFODOCK_MINOR_VERSION = $infodock_minor_version
+EOF
+cat >> confdefs.h <<EOF
+#define INFODOCK_MINOR_VERSION $infodock_minor_version
+EOF
+}
+
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining INFODOCK_BUILD_VERSION = $infodock_build_version
+EOF
+cat >> confdefs.h <<EOF
+#define INFODOCK_BUILD_VERSION $infodock_build_version
+EOF
+}
+
+  version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
+  PROGNAME=infodock
+  CPPFLAGS="$CPPFLAGS -DINFODOCK"
+else
+  PROGNAME=xemacs
+fi
+
+if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi
+test "${error_check_extents=$beta}"   = yes && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining ERROR_CHECK_EXTENTS
+EOF
+cat >> confdefs.h <<\EOF
+#define ERROR_CHECK_EXTENTS 1
+EOF
+}
+
+test "${error_check_typecheck=$beta}" = yes && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining ERROR_CHECK_TYPECHECK
+EOF
+cat >> confdefs.h <<\EOF
+#define ERROR_CHECK_TYPECHECK 1
+EOF
+}
+
+test "${error_check_bufpos=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining ERROR_CHECK_BUFPOS
+EOF
+cat >> confdefs.h <<\EOF
+#define ERROR_CHECK_BUFPOS 1
+EOF
+}
+
+test "${error_check_gc=$beta}"        = yes && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining ERROR_CHECK_GC
+EOF
+cat >> confdefs.h <<\EOF
+#define ERROR_CHECK_GC 1
+EOF
+}
+
+test "${error_check_malloc=$beta}"    = yes && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining ERROR_CHECK_MALLOC
+EOF
+cat >> confdefs.h <<\EOF
+#define ERROR_CHECK_MALLOC 1
+EOF
+}
+
+if test "${debug:=$beta}" = "yes"; then
+  use_assertions=yes memory_usage_stats=yes
+  extra_objs="$extra_objs debug.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"debug.o\""
+ fi
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining DEBUG_XEMACS
+EOF
+cat >> confdefs.h <<\EOF
+#define DEBUG_XEMACS 1
+EOF
+}
+
+fi
+test "$use_assertions"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining USE_ASSERTIONS
+EOF
+cat >> confdefs.h <<\EOF
+#define USE_ASSERTIONS 1
+EOF
+}
+
+test "$memory_usage_stats" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining MEMORY_USAGE_STATS
+EOF
+cat >> confdefs.h <<\EOF
+#define MEMORY_USAGE_STATS 1
+EOF
+}
+
+
+
+echo "checking "the configuration name"" 1>&6
+echo "configure:989: checking "the configuration name"" >&5
+internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
+if canonical=`$srcdir/config.sub "$internal_configuration"` ; then : ; else
+  exit $?
+fi
+
+
+
+
+
+machine='' opsys=''
+
+case "$canonical" in
+  sparc-*-*        ) machine=sparc ;;
+  alpha-*-*        ) machine=alpha ;;
+  vax-*-*          ) machine=vax ;;
+  mips-dec-*       ) machine=pmax ;;
+  mips-sgi-*       ) machine=iris4d ;;
+  romp-ibm-*       ) machine=ibmrt ;;
+  rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
+  powerpc-ibm-aix* ) machine=ibmrs6000 ;;
+  powerpc*-*       ) machine=powerpc ;;
+  hppa-*-*         ) machine=hp800 ;;
+  m88k-dg-*        ) machine=aviion ;;
+  m68*-sony-*      ) machine=news ;;
+  mips-sony-*      ) machine=news-risc ;;
+  clipper-*        ) machine=clipper ;;
+esac
+
+case "$canonical" in
+  *-*-linux*    ) opsys=linux ;;
+  *-*-netbsd*   ) opsys=netbsd ;;
+  *-*-openbsd* ) opsys=openbsd ;;
+  *-*-nextstep* ) opsys=nextstep ;;
+  *-*-vms       ) opsys=vms ;;
+
+    *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
+  *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
+  *-dec-osf3.[2-9]         ) opsys=decosf3-2 ;;
+  *-dec-osf3*                ) opsys=decosf3-1 ;;
+  *-dec-osf4*                ) opsys=decosf4-0 ;;
+
+    *-*-ultrix[0-3].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
+  *-*-ultrix4.[12]* ) opsys=bsd4-3 ;;
+  *-*-ultrix* )         opsys=ultrix4-3 ;;
+
+    *-*-aix3.1*  ) opsys=aix3-1        ;;
+  *-*-aix3.2.5 ) opsys=aix3-2-5        ;;
+  *-*-aix3*    ) opsys=aix3-2  ;;
+  *-*-aix4.2*  ) opsys=aix4-2  ;;
+  *-*-aix4.1*  ) opsys=aix4-1  ;;
+  *-*-aix4*    ) opsys=aix4    ;;
+
+    *-gnu* )                   opsys=gnu    ;;
+  *-*-bsd4.[01] )              opsys=bsd4-1 ;;
+  *-*-bsd4.2 )                 opsys=bsd4-2 ;;
+  *-*-bsd4.3 )                 opsys=bsd4-3 ;;
+  *-*-aos4.2 )                 opsys=bsd4-2 ;;
+  *-*-aos*   )                 opsys=bsd4-3 ;;
+  *-*-sysv0    | *-*-sysvr0 )  opsys=usg5-0 ;;
+  *-*-sysv2    | *-*-sysvr2 )  opsys=usg5-2 ;;
+  *-*-sysv2.2  | *-*-sysvr2.2 )        opsys=usg5-2-2 ;;
+  *-*-sysv3*   | *-*-sysvr3* ) opsys=usg5-3 ;;
+  *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
+  *-*-sysv4.[2-9]* | *-sysvr4.[2-9]* )
+       if test -z "$NON_GNU_CPP" ; then
+         for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
+           if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
+         done
+       fi
+       opsys=usg5-4-2 ;;
+    *-sysv4* | *-sysvr4* )     opsys=usg5-4 ;;
+    *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
+esac
+
+case "$canonical" in
+
+    *-*-netbsd* )
+    case "$canonical" in
+      i[3-9]86-*-netbsd*) machine=intel386 ;;
+      hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
+                                            machine=hp9000s300 ;;
+      pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
+      pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
+    esac
+  ;;
+
+    *-*-openbsd* )
+    case "${canonical}" in
+      alpha*-*-openbsd*)       machine=alpha ;;
+      i386-*-openbsd*)         machine=intel386 ;;
+      m68k-*-openbsd*)         machine=hp9000s300 ;;
+      mipsel-*-openbsd*)       machine=pmax ;;
+      ns32k-*-openbsd*)                machine=ns32000 ;;
+      sparc-*-openbsd*)                machine=sparc ;;
+      vax-*-openbsd*)          machine=vax ;;
+     esac
+   ;;
+
+    arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
+  arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
+
+    fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
+  i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
+
+    m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
+
+    580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
+
+    m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
+
+    we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
+
+    m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
+
+    rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
+  m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
+  m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
+
+  
+    celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
+
+    *-convex-bsd* | *-convex-convexos* )
+    machine=convex opsys=bsd4-3
+    NON_GNU_CPP="cc -E -P"
+  ;;
+
+    i[3-9]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
+
+    i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
+  m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
+  m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
+  m88k-dg-dgux*                          ) opsys=dgux     ;;
+
+    m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
+  m88k-motorola-sysv4* )
+                    machine=delta88k opsys=usg5-4-2
+  ;;
+  m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
+
+    m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
+  m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
+
+    ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
+
+    pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
+  pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
+  np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
+
+      m88k-harris-cxux* )
+        case "`uname -r`" in
+       [56].[0-9] ) machine=nh4000 opsys=cxux  ;;
+       [7].[0-9]  ) machine=nh4000 opsys=cxux7 ;;
+    esac
+    NON_GNU_CPP="/lib/cpp"
+  ;;
+    m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
+    powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
+
+    xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
+
+    m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
+
+    *-hp-hpux* )
+        case "$canonical" in
+      m68*  ) machine=hp9000s300 ;;
+      hppa* ) machine=hp800      ;;
+    esac
+
+    case "$canonical" in
+      *-hp-hpux7*  )  opsys=hpux   ;;
+      *-hp-hpux8*  )  opsys=hpux8  ;;
+      *-hp-hpux9*  )  opsys=hpux9  ;;
+      *-hp-hpux10* )  opsys=hpux10 ;;
+      *-hp-hpux11* )  opsys=hpux11 ;;
+      *            )  opsys=hpux   ;;
+    esac
+
+        case "$opsys" in hpux9 | hpux10 ) extra_objs="$extra_objs strcat.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"strcat.o\""
+ fi ;; esac
+
+    if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
+       ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
+    NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
+
+    case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
+  ;;
+
+    orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
+  clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
+
+    i[3-9]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
+  i[3-9]86-ibm-aix1.[23]* | i[3-9]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
+  i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
+  romp-ibm-aos*    ) opsys=bsd4-3 ;;
+  romp-ibm-bsd*    ) opsys=bsd4-3 ;;
+  romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
+
+    m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
+  m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
+
+    i[3-9]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
+
+    i[3-9]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
+
+    i[3-9]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
+
+    i[3-9]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
+
+      i[3-9]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
+
+    i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
+
+    i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
+
+    m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
+
+    m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
+
+        mips-mips-usg* ) machine=mips4 ;;
+  mips-mips-riscos4 )
+    machine=mips4
+    NON_GNU_CC="cc -systype bsd43"
+    NON_GNU_CPP="cc -systype bsd43 -E"
+    case "$canonical" in
+      mips-mips-riscos4* ) opsys=bsd4-3  ;;
+      mips-mips-riscos5* ) opsys=riscos5 ;;
+    esac
+  ;;
+  mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
+  mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
+
+    m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
+
+    ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
+
+    m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
+  m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
+
+    m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
+
+    m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
+
+    m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
+
+    pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
+
+    ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
+  ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
+
+    mips-siemens-sysv* | mips-sni-sysv*)
+    machine=mips-siemens opsys=usg5-4
+    NON_GNU_CC=/usr/ccs/bin/cc
+    NON_GNU_CPP=/usr/ccs/lib/cpp
+  ;;
+
+      m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
+  m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
+    mips-sgi-irix3.*    ) opsys=irix3-3 ;;
+  mips-sgi-irix4.*    ) opsys=irix4-0 ;;
+  mips-sgi-irix6*     ) opsys=irix6-0 ;;
+  mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
+  mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
+  mips-sgi-irix5.*    ) opsys=irix5-3 ;;
+  mips-sgi-irix*      ) opsys=irix5-0 ;;
+
+    *-sony-newsos[34]* | *-sony-news[34]* ) opsys=bsd4-3 ;;
+  *-sony-news* ) opsys=newsos5 ;;
+
+    m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
+
+    *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
+        case "$canonical" in
+      m68*-sunos1* )            machine=sun1     ;;
+      m68*-sunos2* )            machine=sun2     ;;
+      m68* )                    machine=sun3     ;;
+      i*86*-sun-sunos[34]* )   machine=sun386   ;;
+      i*86-*-* )                machine=intel386 ;;
+      rs6000* )                  machine=rs6000   ;;
+    esac
+
+        case "$canonical" in *-sunos5*)
+      canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
+    esac
+
+                    case "$canonical" in
+      *-sunos4* )
+       #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
+       : ;;
+      *-solaris2* )
+       #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
+       RANLIB=':' ;;
+    esac
+
+    case "$canonical" in
+      *-solaris*         )
+       opsys=sol2
+       os_release=`uname -r | sed -e 's/^\([0-9]\)\.\([0-9]\).*/\1\2/'`
+       { test "$extra_verbose" = "yes" && cat << EOF
+    Defining OS_RELEASE = $os_release
+EOF
+cat >> confdefs.h <<EOF
+#define OS_RELEASE $os_release
+EOF
+}
+ ;;
+
+            i*86-*-sunos4*      ) opsys=sunos4-0       ;;
+      *-sunos4.0*        ) opsys=sunos4-0      ;;
+      *-sunos4.1.2*      ) opsys=sunos4-1-2    ;;
+      *-sunos4.1.3*      ) opsys=sunos4-1-3    ;;
+      *-sunos4.1.[4-9]* ) opsys=sunos4-1-4     ;;
+      *-sunos4* | *-sunos ) opsys=sunos4-1     ;;
+      *-mach*            ) opsys=mach-bsd4-3   ;;
+      *                          ) opsys=bsd4-2        ;;
+    esac
+
+    case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
+
+        test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
+  ;;
+
+    m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
+
+    tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
+  tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
+
+    mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
+
+    m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
+
+    ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
+      m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
+
+    titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
+
+    m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
+
+    vax-dec-* )
+    case "$canonical" in
+      *-sysv[01]* | *-sysvr[01]* )     opsys=usg5-0 ;;
+      *-sysv2* | *-sysvr2* )           opsys=usg5-2 ;;
+      *-mach* )                                opsys=mach-bsd4-3 ;;
+    esac
+  ;;
+
+    ns16k-whitechapel-* ) machine=mg1 ;;
+
+    m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
+
+    i[3-9]86-*-* )
+    machine=intel386
+    case "$canonical" in
+      *-isc1.* | *-isc2.[01]* ) opsys=386-ix ;;
+      *-isc2.2* )              opsys=isc2-2 ;;
+      *-isc4.0* )              opsys=isc4-0 ;;
+      *-isc4.* )               opsys=isc4-1
+                               GCC_TEST_OPTIONS=-posix
+                               NON_GCC_TEST_OPTIONS=-Xp
+                               ;;
+      *-isc* )                 opsys=isc3-0 ;;
+      *-esix5* )               opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
+      *-esix* )                        opsys=esix ;;
+      *-mach* )                        opsys=mach-bsd4-3 ;;
+      *-xenix* )               opsys=xenix ;;
+      *-sco3.2v4* )            opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
+      *-bsd386* | *-bsdi1* )   opsys=bsd386 ;;
+      *-bsdi3* )               opsys=bsdos3 ;;
+      *-bsdi2.1* )             opsys=bsdos2-1 ;;
+      *-bsdi2* )               opsys=bsdos2 ;;
+      *-sco3.2v5* )            opsys=sco5 ;
+                                                       if test "$dynamic" = "yes" ; then
+               NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
+       else
+               NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
+       fi ;;
+      *-386bsd* )              opsys=386bsd ;;
+      *-freebsd* )             opsys=freebsd ;;
+      *-nextstep* )            opsys=nextstep ;;
+      *-pc-cygwin32 )          opsys=cygwin32 ;;
+          esac
+  ;;
+
+    m68k-*-linux* ) machine=m68k opsys=linux ;;
+
+esac
+
+if test -z "$machine" -o -z "$opsys"; then
+  (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
+   echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
+  ) >&2
+  exit 1
+fi
+
+if test -z "$dynamic"; then
+  case "$opsys" in
+    hpux* | sunos4* | sco5 ) dynamic=no ;;
+    *) dynamic=yes ;;
+  esac
+fi
+if test "$dynamic" = "yes"; then
+  case "$opsys" in
+    hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
+    decosf* ) ld_call_shared="-call_shared" ;;
+  esac
+else   case "$opsys" in
+    sol2 )
+      echo "Static linking is not supported on Solaris 2."
+      echo "Rerun configure without specifying --dynamic=no."
+      exit 1 ;;
+    linux   ) ld_call_shared="-Bstatic" ;;
+    decosf* ) ld_call_shared="-non_shared" ;;
+  esac
+fi
+
+case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
+
+stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining STACK_TRACE_EYE_CATCHER = $stack_trace_eye_catcher
+EOF
+cat >> confdefs.h <<EOF
+#define STACK_TRACE_EYE_CATCHER $stack_trace_eye_catcher
+EOF
+}
+
+
+machfile="m/${machine}.h"
+opsysfile="s/${opsys}.h"
+
+
+test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
+if test "$with_workshop $with_tooltalk" = "yes no"; then
+  (echo "$progname: Usage error:"
+echo " " "--with-workshop requires --with-tooltalk"
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
+elif test "$with_tooltalk" = "no" ; then with_workshop=no
+elif test "$with_workshop" = "yes"; then with_tooltalk=yes
+fi
+
+if test "$with_workshop" = "yes"; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining SUNPRO
+EOF
+cat >> confdefs.h <<\EOF
+#define SUNPRO 1
+EOF
+}
+
+  extra_objs="$extra_objs sunpro.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"sunpro.o\""
+ fi
+fi
+
+if test "$with_clash_detection" = "yes"; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining CLASH_DETECTION
+EOF
+cat >> confdefs.h <<\EOF
+#define CLASH_DETECTION 1
+EOF
+}
+
+  extra_objs="$extra_objs filelock.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"filelock.o\""
+ fi
+fi
+
+test -n "$compiler" && CC="$compiler"
+if test "$with_gcc" = "no"; then   case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
+fi
+
+test "${cflags-unset}" != unset && CFLAGS="$cflags"
+if test "${CFLAGS-unset}" != unset
+  then cflags_specified=yes;
+  else cflags_specified=no;
+fi
+
+xe_save_CFLAGS="$CFLAGS"
+
+# Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1473: checking for $ac_word" >&5
+
+if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="gcc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1499: checking for $ac_word" >&5
+
+if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  ac_prog_rejected=no
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+        ac_prog_rejected=yes
+       continue
+      fi
+      ac_cv_prog_CC="cc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# -gt 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    set dummy "$ac_dir/$ac_word" "$@"
+    shift
+    ac_cv_prog_CC="$@"
+  fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1544: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
+xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
+xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
+ac_cpp='$CPP '"$xe_cppflags"
+ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
+cross_compiling=no
+
+cat > conftest.$ac_ext <<EOF
+#line 1556 "configure"
+#include "confdefs.h"
+main(){return(0);}
+EOF
+if { (eval echo configure:1560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  ac_cv_prog_cc_works=yes
+  # If we can't run a trivial program, we are probably using a cross compiler.
+  if (./conftest; exit) 2>/dev/null; then
+    ac_cv_prog_cc_cross=no
+  else
+    ac_cv_prog_cc_cross=yes
+  fi
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1580: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:1585: checking whether we are using GNU C" >&5
+
+cat > conftest.c <<EOF
+#ifdef __GNUC__
+  yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+  ac_cv_prog_gcc=yes
+else
+  ac_cv_prog_gcc=no
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
+  ac_test_CFLAGS="${CFLAGS+set}"
+  ac_save_CFLAGS="$CFLAGS"
+  CFLAGS=
+  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1606: checking whether ${CC-cc} accepts -g" >&5
+
+echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+  ac_cv_prog_cc_g=yes
+else
+  ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+  if test "$ac_test_CFLAGS" = set; then
+    CFLAGS="$ac_save_CFLAGS"
+  elif test $ac_cv_prog_cc_g = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-O2"
+  fi
+else
+  GCC=
+  test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
+  CC=${NON_GNU_CC-cc}
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1635: checking for $ac_word" >&5
+
+if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="gcc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1661: checking for $ac_word" >&5
+
+if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  ac_prog_rejected=no
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+        ac_prog_rejected=yes
+       continue
+      fi
+      ac_cv_prog_CC="cc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# -gt 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    set dummy "$ac_dir/$ac_word" "$@"
+    shift
+    ac_cv_prog_CC="$@"
+  fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1706: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
+xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
+xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
+ac_cpp='$CPP '"$xe_cppflags"
+ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
+cross_compiling=no
+
+cat > conftest.$ac_ext <<EOF
+#line 1718 "configure"
+#include "confdefs.h"
+main(){return(0);}
+EOF
+if { (eval echo configure:1722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  ac_cv_prog_cc_works=yes
+  # If we can't run a trivial program, we are probably using a cross compiler.
+  if (./conftest; exit) 2>/dev/null; then
+    ac_cv_prog_cc_cross=no
+  else
+    ac_cv_prog_cc_cross=yes
+  fi
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1742: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:1747: checking whether we are using GNU C" >&5
+
+cat > conftest.c <<EOF
+#ifdef __GNUC__
+  yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1754: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+  ac_cv_prog_gcc=yes
+else
+  ac_cv_prog_gcc=no
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
+  ac_test_CFLAGS="${CFLAGS+set}"
+  ac_save_CFLAGS="$CFLAGS"
+  CFLAGS=
+  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1768: checking whether ${CC-cc} accepts -g" >&5
+
+echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+  ac_cv_prog_cc_g=yes
+else
+  ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+  if test "$ac_test_CFLAGS" = set; then
+    CFLAGS="$ac_save_CFLAGS"
+  elif test $ac_cv_prog_cc_g = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-O2"
+  fi
+else
+  GCC=
+  test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
+  CC=gcc
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1797: checking for $ac_word" >&5
+
+if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="gcc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1823: checking for $ac_word" >&5
+
+if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  ac_prog_rejected=no
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+        ac_prog_rejected=yes
+       continue
+      fi
+      ac_cv_prog_CC="cc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# -gt 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    set dummy "$ac_dir/$ac_word" "$@"
+    shift
+    ac_cv_prog_CC="$@"
+  fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
+echo "configure:1868: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+
+ac_ext=c
+xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
+xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
+xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
+ac_cpp='$CPP '"$xe_cppflags"
+ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&5'
+cross_compiling=no
+
+cat > conftest.$ac_ext <<EOF
+#line 1880 "configure"
+#include "confdefs.h"
+main(){return(0);}
+EOF
+if { (eval echo configure:1884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  ac_cv_prog_cc_works=yes
+  # If we can't run a trivial program, we are probably using a cross compiler.
+  if (./conftest; exit) 2>/dev/null; then
+    ac_cv_prog_cc_cross=no
+  else
+    ac_cv_prog_cc_cross=yes
+  fi
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  ac_cv_prog_cc_works=no
+fi
+rm -fr conftest*
+
+echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
+if test $ac_cv_prog_cc_works = no; then
+  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
+fi
+echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
+echo "configure:1904: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
+cross_compiling=$ac_cv_prog_cc_cross
+
+echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:1909: checking whether we are using GNU C" >&5
+
+cat > conftest.c <<EOF
+#ifdef __GNUC__
+  yes;
+#endif
+EOF
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1916: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+  ac_cv_prog_gcc=yes
+else
+  ac_cv_prog_gcc=no
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+if test $ac_cv_prog_gcc = yes; then
+  GCC=yes
+  ac_test_CFLAGS="${CFLAGS+set}"
+  ac_save_CFLAGS="$CFLAGS"
+  CFLAGS=
+  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1930: checking whether ${CC-cc} accepts -g" >&5
+
+echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+  ac_cv_prog_cc_g=yes
+else
+  ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+  if test "$ac_test_CFLAGS" = set; then
+    CFLAGS="$ac_save_CFLAGS"
+  elif test $ac_cv_prog_cc_g = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-O2"
+  fi
+else
+  GCC=
+  test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+
+fi
+CFLAGS="$xe_save_CFLAGS"
+
+
+test -n "$CPP" -a -d "$CPP" && CPP=
+
+test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:1963: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+
+  # This must be in double quotes, not single quotes, because CPP may get
+  # substituted into the Makefile and "${CC-cc}" will confuse make.
+  CPP="${CC-cc} -E"
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp.
+  cat > conftest.$ac_ext <<EOF
+#line 1976 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1982: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -E -traditional-cpp"
+  cat > conftest.$ac_ext <<EOF
+#line 1993 "configure"
+#include "confdefs.h"
+#include <assert.h>
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1999: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+  ac_cv_prog_CPP="$CPP"
+  CPP="$ac_cv_prog_CPP"
+else
+  ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+
+echo $ac_n "checking for AIX""... $ac_c" 1>&6
+echo "configure:2022: checking for AIX" >&5
+cat > conftest.$ac_ext <<EOF
+#line 2024 "configure"
+#include "confdefs.h"
+#ifdef _AIX
+  yes
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "yes" >/dev/null 2>&1; then
+  rm -rf conftest*
+  echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining _ALL_SOURCE
+EOF
+cat >> confdefs.h <<\EOF
+#define _ALL_SOURCE 1
+EOF
+}
+
+else
+  rm -rf conftest*
+  echo "$ac_t""no" 1>&6
+fi
+rm -f conftest*
+
+
+
+echo $ac_n "checking for GNU libc""... $ac_c" 1>&6
+echo "configure:2051: checking for GNU libc" >&5
+cat > conftest.$ac_ext <<EOF
+#line 2053 "configure"
+#include "confdefs.h"
+#include <features.h>
+int main() {
+
+#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
+#error Not a GNU libc system :-(
+******* ======= ******** &&&&&&&&
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  have_glibc=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  have_glibc=no
+fi
+rm -f conftest*
+echo "$ac_t""$have_glibc" 1>&6
+test "$have_glibc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining _GNU_SOURCE
+EOF
+cat >> confdefs.h <<\EOF
+#define _GNU_SOURCE 1
+EOF
+}
+
+
+echo $ac_n "checking whether we are using SunPro C""... $ac_c" 1>&6
+echo "configure:2086: checking whether we are using SunPro C" >&5
+cat > conftest.$ac_ext <<EOF
+#line 2088 "configure"
+#include "confdefs.h"
+
+int main() {
+#ifndef __SUNPRO_C
+#error Not a  SunPro compiler :-(
+******* ======= ******** &&&&&&&&
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  __sunpro_c=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  __sunpro_c=no
+fi
+rm -f conftest*
+echo "$ac_t""$__sunpro_c" 1>&6
+
+
+
+echo "Extracting information from the machine- and system-dependent headers..."
+
+tempcname="conftest.c"
+
+
+
+cat > $tempcname <<EOF
+#define NOT_C_CODE
+#define C_SWITCH_SITE
+#define C_SWITCH_X_SITE
+#define LD_SWITCH_SITE
+#define LD_SWITCH_X_SITE
+#define LD_SWITCH_X_SITE_AUX
+#define OS_RELEASE $os_release
+#include "$srcdir/src/$opsysfile"
+#include "$srcdir/src/$machfile"
+
+#ifndef LIBS_MACHINE
+#define LIBS_MACHINE
+#endif
+configure___ libs_machine=LIBS_MACHINE
+
+#ifndef LIBS_SYSTEM
+#define LIBS_SYSTEM
+#endif
+configure___ libs_system=LIBS_SYSTEM
+
+#ifndef LIBS_TERMCAP
+#define LIBS_TERMCAP
+#endif
+configure___ libs_termcap=LIBS_TERMCAP
+
+#ifndef LIB_STANDARD
+#define LIB_STANDARD
+#endif
+configure___ libs_standard=LIB_STANDARD
+
+
+#ifndef OBJECTS_MACHINE
+#define OBJECTS_MACHINE
+#endif
+configure___ objects_machine=OBJECTS_MACHINE
+
+#ifndef OBJECTS_SYSTEM
+#define OBJECTS_SYSTEM
+#endif
+configure___ objects_system=OBJECTS_SYSTEM
+
+
+#ifndef C_SWITCH_MACHINE
+#define C_SWITCH_MACHINE
+#endif
+configure___ c_switch_machine=C_SWITCH_MACHINE
+
+#ifndef C_SWITCH_SYSTEM
+#define C_SWITCH_SYSTEM
+#endif
+configure___ c_switch_system=C_SWITCH_SYSTEM
+
+
+#ifndef LD_SWITCH_MACHINE
+#define LD_SWITCH_MACHINE
+#endif
+configure___ ld_switch_machine=LD_SWITCH_MACHINE
+
+#ifndef LD_SWITCH_SYSTEM
+#define LD_SWITCH_SYSTEM
+#endif
+configure___ ld_switch_system=LD_SWITCH_SYSTEM
+
+
+#ifndef UNEXEC
+#define UNEXEC "unexec.o"
+#endif
+configure___ unexec=UNEXEC
+
+
+#ifndef LD_SWITCH_SHARED
+#define LD_SWITCH_SHARED "-c"
+#endif
+configure___ ld_switch_shared=LD_SWITCH_SHARED
+
+
+#ifdef ORDINARY_LINK
+#define LD "\$(CC) \$(CFLAGS)"
+#else /* no ORDINARY LINK */
+#ifdef COFF_ENCAPSULATE
+#define LD "\$(CC) -nostdlib"
+#else /* not COFF_ENCAPSULATE */
+#ifdef LINKER
+#define LD LINKER
+#else /* ! defined (LINKER) */
+#define LD "ld"
+#endif /* ! defined (LINKER) */
+#endif /* ! defined (COFF_ENCAPSULATE) */
+#endif /* not ORDINARY_LINK */
+configure___ ld=LD
+
+#ifndef LIB_GCC
+#define LIB_GCC
+#endif
+configure___ lib_gcc=LIB_GCC
+
+#ifndef LD_TEXT_START_ADDR
+#define LD_TEXT_START_ADDR
+#endif
+configure___ ld_text_start_addr=LD_TEXT_START_ADDR
+
+
+#if ! defined (ORDINARY_LINK) && !defined (START_FILES)
+#ifdef NO_REMAP
+#ifdef COFF_ENCAPSULATE
+#define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
+#else /* ! defined (COFF_ENCAPSULATE) */
+#define START_FILES "pre-crt0.o /lib/crt0.o"
+#endif /* ! defined (COFF_ENCAPSULATE) */
+#else /* ! defined (NO_REMAP) */
+#define START_FILES "ecrt0.o"
+#endif /* ! defined (NO_REMAP) */
+#endif /* no ORDINARY_LINK */
+#ifndef START_FILES
+#define START_FILES
+#endif
+configure___ start_files=START_FILES
+
+#ifdef ORDINARY_LINK
+configure___ ordinary_link=yes
+#else
+configure___ ordinary_link=no
+#endif
+
+#ifdef SYSTEM_MALLOC
+configure___ system_malloc=yes
+#else
+configure___ system_malloc=no
+#endif
+
+#ifdef TERMINFO
+configure___ have_terminfo=yes
+#else
+configure___ have_terminfo=no
+#endif
+
+#ifdef MAIL_USE_FLOCK
+configure___ mail_use_flock=yes
+#else
+configure___ mail_use_flock=no
+#endif
+
+#ifdef MAIL_USE_LOCKF
+configure___ mail_use_lockf=yes
+#else
+configure___ mail_use_lockf=no
+#endif
+
+EOF
+
+CPP=`eval "echo $CPP"`
+eval `$CPP -Isrc $tempcname \
+       | sed -n -e "s/[        ]*=[    \"]*/='/" -e "s/[       \"]*\$/'/" -e "s/^configure___//p"`
+
+rm $tempcname
+
+test "$extra_verbose" = "yes" && \
+  for var in libs_machine libs_system libs_termcap libs_standard   objects_machine objects_system c_switch_machine c_switch_system   ld_switch_machine ld_switch_system unexec ld_switch_shared   ld lib_gcc ld_text_start_addr start_files ordinary_link   have_terminfo mail_use_flock mail_use_lockf; do eval "echo \"$var = '\$$var'\""; done && echo ""
+
+test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
+
+if test "$cflags_specified" = "no"; then
+      if   test "$GCC" = "yes"; then
+    CFLAGS="-g -O3 -Wall -Wno-switch"
+                    test "$opsys $machine" = "cygwin32 intel386" && \
+      CFLAGS="-g -O2 -Wall -Wno-switch"
+  elif test "$__sunpro_c" = "yes"; then
+    case "$opsys" in
+      sol2    ) CFLAGS="-v -xO4" ;;
+      sunos4* ) CFLAGS="-xO2";;
+    esac
+  elif test "$CC" = "xlc"; then
+    CFLAGS="-O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
+  else
+        CFLAGS="-O" ;  fi
+fi
+
+
+if test "$GCC" = "yes"; then
+  set x $ld_switch_system; shift; ld_switch_system=""
+  while test -n "$1"; do
+    case $1 in
+      -L  | -l  | -u         ) ld_switch_system="$ld_switch_system $1 $2"; shift ;;
+      -L* | -l* | -u* | -Wl* ) ld_switch_system="$ld_switch_system $1" ;;
+      -Xlinker* ) ;;
+      * ) ld_switch_system="$ld_switch_system -Xlinker $1" ;;
+    esac
+    shift
+  done
+fi
+
+if test "$GCC" = "yes"; then
+  set x $ld_switch_machine; shift; ld_switch_machine=""
+  while test -n "$1"; do
+    case $1 in
+      -L  | -l  | -u         ) ld_switch_machine="$ld_switch_machine $1 $2"; shift ;;
+      -L* | -l* | -u* | -Wl* ) ld_switch_machine="$ld_switch_machine $1" ;;
+      -Xlinker* ) ;;
+      * ) ld_switch_machine="$ld_switch_machine -Xlinker $1" ;;
+    esac
+    shift
+  done
+fi
+
+if test "$GCC" = "yes"; then
+  set x $LDFLAGS; shift; LDFLAGS=""
+  while test -n "$1"; do
+    case $1 in
+      -L  | -l  | -u         ) LDFLAGS="$LDFLAGS $1 $2"; shift ;;
+      -L* | -l* | -u* | -Wl* ) LDFLAGS="$LDFLAGS $1" ;;
+      -Xlinker* ) ;;
+      * ) LDFLAGS="$LDFLAGS -Xlinker $1" ;;
+    esac
+    shift
+  done
+fi
+
+if test "$GCC" = "yes"; then
+  set x $ld_call_shared; shift; ld_call_shared=""
+  while test -n "$1"; do
+    case $1 in
+      -L  | -l  | -u         ) ld_call_shared="$ld_call_shared $1 $2"; shift ;;
+      -L* | -l* | -u* | -Wl* ) ld_call_shared="$ld_call_shared $1" ;;
+      -Xlinker* ) ;;
+      * ) ld_call_shared="$ld_call_shared -Xlinker $1" ;;
+    esac
+    shift
+  done
+fi
+
+test -n "$objects_machine" && extra_objs="$extra_objs $objects_machine" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"$objects_machine\""
+ fi
+test -n "$objects_system"  && extra_objs="$extra_objs $objects_system" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"$objects_system\""
+ fi
+test -n "$unexec"          && extra_objs="$extra_objs $unexec" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"$unexec\""
+ fi
+
+echo $ac_n "checking for dynodump""... $ac_c" 1>&6
+echo "configure:2361: checking for dynodump" >&5
+if test "$unexec" != "unexsol2.o"; then
+  echo "$ac_t""no" 1>&6
+else
+  echo "$ac_t""yes" 1>&6
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining DYNODUMP
+EOF
+cat >> confdefs.h <<\EOF
+#define DYNODUMP 1
+EOF
+}
+
+  MAKE_SUBDIR="$MAKE_SUBDIR dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$MAKE_SUBDIR"; fi
+  SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS dynodump" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dynodump\" to \$SRC_SUBDIR_DEPS"; fi
+  case "$machine" in
+    sparc   ) dynodump_arch=sparc ;;
+    *86*    ) dynodump_arch=i386  ;;
+    powerpc ) dynodump_arch=ppc   ;;
+  esac
+    test "$GCC" = "yes" && ld_switch_site="$ld_switch_site -fno-gnu-linker" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-fno-gnu-linker\" to \$ld_switch_site"; fi
+fi
+
+
+test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
+
+if test "$unexec" = "unexaix.o"; then
+  if   test "$dynamic" = "no"; then
+  start_flags="-Wl,-bnso,-bnodelcsect"
+  test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
+  for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
+    if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
+  done
+  for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
+    if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
+  done
+  
+echo $ac_n "checking for terminateAndUnload in -lC""... $ac_c" 1>&6
+echo "configure:2399: checking for terminateAndUnload in -lC" >&5
+ac_lib_var=`echo C'_'terminateAndUnload | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lC "
+cat > conftest.$ac_ext <<EOF
+#line 2404 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char terminateAndUnload();
+
+int main() {
+terminateAndUnload()
+; return 0; }
+EOF
+if { (eval echo configure:2415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  libs_system="$libs_system -lC" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lC\" to \$libs_system"; fi
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+  fi
+elif test -n "$ld_text_start_addr"; then
+  start_flags="-T $ld_text_start_addr -e __start"
+fi
+
+
+
+
+if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
+ test -z "$linker" &&  linker='$(CC) -nostdlib'
+ test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
+fi
+test "$GCC" != "yes" && lib_gcc=
+
+
+
+
+
+if test -n "$site_prefixes"; then
+  for arg in $site_prefixes; do
+    case "$arg" in
+       -* ) ;;
+       * ) argi="-I${arg}/include" ; argl="-L${arg}/lib" ;;
+    esac
+    c_switch_site="$c_switch_site $argi" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$argi\" to \$c_switch_site"; fi
+    ld_switch_site="$ld_switch_site $argl" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$argl\" to \$ld_switch_site"; fi
+  done
+fi
+
+if test -n "$site_libraries"; then
+  for arg in $site_libraries; do
+    case "$arg" in -* ) ;; * ) arg="-L${arg}" ;; esac
+    ld_switch_site="$ld_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$ld_switch_site"; fi
+  done
+fi
+
+if test -n "$site_includes"; then
+  for arg in $site_includes; do
+    case "$arg" in -* ) ;; * ) arg="-I${arg}" ;; esac
+    c_switch_site="$c_switch_site $arg" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"$arg\" to \$c_switch_site"; fi
+  done
+fi
+
+
+for dir in "/usr/ccs/lib"; do
+  test -d "$dir" && ld_switch_site="$ld_switch_site -L${dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${dir}\" to \$ld_switch_site"; fi
+done
+
+if test -n "$site_runtime_libraries"; then
+  LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
+  export LD_RUN_PATH
+fi
+
+
+if   test "$dynamic" = "no"; then add_runtime_path=no
+elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
+else case "$opsys" in
+       sol2 | irix* | *bsd* ) add_runtime_path=yes ;;
+       * ) add_runtime_path=no ;;
+     esac
+fi
+
+if test "$add_runtime_path" = "yes"; then
+      echo $ac_n "checking "for runtime libraries flag"""... $ac_c" 1>&6
+echo "configure:2499: checking "for runtime libraries flag"" >&5
+  dash_r=""
+  for try_dash_r in "-R" "-R " "-rpath "; do
+    xe_check_libs="${try_dash_r}/no/such/file-or-directory"
+    
+if test "$GCC" = "yes"; then
+  set x $xe_check_libs; shift; xe_check_libs=""
+  while test -n "$1"; do
+    case $1 in
+      -L  | -l  | -u         ) xe_check_libs="$xe_check_libs $1 $2"; shift ;;
+      -L* | -l* | -u* | -Wl* ) xe_check_libs="$xe_check_libs $1" ;;
+      -Xlinker* ) ;;
+      * ) xe_check_libs="$xe_check_libs -Xlinker $1" ;;
+    esac
+    shift
+  done
+fi
+    cat > conftest.$ac_ext <<EOF
+#line 2517 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:2524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  dash_r="$try_dash_r"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+    xe_check_libs=""
+    test -n "$dash_r" && break
+  done
+  if test -n "$dash_r";
+    then echo "$ac_t"""\"${dash_r}\""" 1>&6
+    else echo "$ac_t""NONE" 1>&6
+  fi
+fi
+
+xe_add_unique_runpath_dir='
+  xe_add_p=yes
+  for xe_dir in $runpath_dirs; do       test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
+  done
+  if test "$xe_add_p" = "yes"; then
+    test -n "$runpath" && runpath="${runpath}:"
+    runpath="${runpath}${xe_runpath_dir}"
+    runpath_dirs="$runpath_dirs $xe_runpath_dir"
+  fi'
+
+
+
+
+if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
+    ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
+  ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
+  
+        runpath="" runpath_dirs=""
+  if test -n "$LD_RUN_PATH"; then
+    runpath="$LD_RUN_PATH"
+  elif test "$GCC" = "yes"; then
+        ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
+    echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
+    xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
+    for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
+      case "$arg" in P,* | -L* | -R* )
+        for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
+          {
+xe_runpath_dir="$dir"
+  test "$xe_runpath_dir" != "/lib"     -a \
+       "$xe_runpath_dir" != "/usr/lib" -a \
+       -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
+  eval "$xe_add_unique_runpath_dir"
+}
+        done ;;
+      esac
+    done
+    ld_switch_run="$ld_switch_run_save"
+    rm -f conftest*
+  else
+        for arg in $ld_switch_site $ld_switch_x_site; do
+      case "$arg" in -L*) {
+xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
+  test "$xe_runpath_dir" != "/lib"     -a \
+       "$xe_runpath_dir" != "/usr/lib" -a \
+       -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
+  eval "$xe_add_unique_runpath_dir"
+};; esac
+    done
+        if test "$opsys $need_motif" = "sol2 yes"; then
+      xe_runpath_dir="/opt/SUNWdt/lib";
+      eval "$xe_add_unique_runpath_dir";
+    fi
+  fi 
+  if test -n "$runpath"; then
+    ld_switch_run="${dash_r}${runpath}"
+    
+if test "$GCC" = "yes"; then
+  set x $ld_switch_run; shift; ld_switch_run=""
+  while test -n "$1"; do
+    case $1 in
+      -L  | -l  | -u         ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
+      -L* | -l* | -u* | -Wl* ) ld_switch_run="$ld_switch_run $1" ;;
+      -Xlinker* ) ;;
+      * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
+    esac
+    shift
+  done
+fi
+    test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
+  fi
+fi
+
+
+
+GNU_MALLOC=yes
+if test "$with_dlmalloc" != "no"; then
+       doug_lea_malloc=yes
+else
+       doug_lea_malloc=no
+fi
+after_morecore_hook_exists=yes
+echo $ac_n "checking for malloc_get_state""... $ac_c" 1>&6
+echo "configure:2624: checking for malloc_get_state" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2627 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char malloc_get_state(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char malloc_get_state();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_malloc_get_state) || defined (__stub___malloc_get_state)
+choke me
+#else
+malloc_get_state();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_malloc_get_state=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_malloc_get_state=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'malloc_get_state`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+doug_lea_malloc=no
+fi
+
+echo $ac_n "checking for malloc_set_state""... $ac_c" 1>&6
+echo "configure:2670: checking for malloc_set_state" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2673 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char malloc_set_state(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char malloc_set_state();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_malloc_set_state) || defined (__stub___malloc_set_state)
+choke me
+#else
+malloc_set_state();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:2696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_malloc_set_state=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_malloc_set_state=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'malloc_set_state`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+doug_lea_malloc=no
+fi
+
+echo $ac_n "checking whether __after_morecore_hook exists""... $ac_c" 1>&6
+echo "configure:2716: checking whether __after_morecore_hook exists" >&5
+cat > conftest.$ac_ext <<EOF
+#line 2718 "configure"
+#include "confdefs.h"
+extern void (* __after_morecore_hook)();
+int main() {
+__after_morecore_hook = 0
+; return 0; }
+EOF
+if { (eval echo configure:2725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  echo "$ac_t""yes" 1>&6
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  echo "$ac_t""no" 1>&6
+   after_morecore_hook_exists=no
+fi
+rm -f conftest*
+if test "$system_malloc" = "yes" ; then
+  GNU_MALLOC=no
+  GNU_MALLOC_reason="
+  (The GNU allocators don't work with this system configuration)."
+elif test "$with_system_malloc" = "yes" ; then
+  GNU_MALLOC=no
+  GNU_MALLOC_reason="
+  (User chose not to use GNU allocators)."
+elif test "$with_debug_malloc" = "yes" ; then
+  GNU_MALLOC=no
+  GNU_MALLOC_reason="
+  (User chose to use Debugging Malloc)."
+fi
+
+if test "$doug_lea_malloc" = "yes" ; then
+  if test "$GNU_MALLOC" = yes ; then
+    GNU_MALLOC_reason="
+  (Using Doug Lea's new malloc from the GNU C Library.)"
+  fi
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining DOUG_LEA_MALLOC
+EOF
+cat >> confdefs.h <<\EOF
+#define DOUG_LEA_MALLOC 1
+EOF
+}
+
+  if test "$after_morecore_hook_exists" = "no" ; then
+    GNU_MALLOC_reason="
+  (Using Doug Lea's new malloc from the Linux C Library.)"
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining _NO_MALLOC_WARNING_
+EOF
+cat >> confdefs.h <<\EOF
+#define _NO_MALLOC_WARNING_ 1
+EOF
+}
+
+  fi
+  use_minimal_tagbits=yes
+fi
+
+
+
+
+# Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2784: checking for $ac_word" >&5
+
+if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_RANLIB="ranlib"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+  echo "$ac_t""$RANLIB" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:2837: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+
+  IFS="${IFS=  }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    # Account for people who put trailing slashes in PATH elements.
+    case "$ac_dir/" in
+    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+    *)
+      # OSF1 and SCO ODT 3.0 have their own names for install.
+      for ac_prog in ginstall installbsd scoinst install; do
+        if test -f $ac_dir/$ac_prog; then
+         if test $ac_prog = install &&
+            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+           # AIX install.  It has an incompatible calling convention.
+           # OSF/1 installbsd also uses dspmsg, but is usable.
+           :
+         else
+           ac_cv_path_install="$ac_dir/$ac_prog -c"
+           break 2
+         fi
+       fi
+      done
+      ;;
+    esac
+  done
+  IFS="$ac_save_IFS"
+
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL="$ac_cv_path_install"
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL="$ac_install_sh"
+  fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+for ac_prog in 'bison -y' byacc
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2888: checking for $ac_word" >&5
+
+if test -n "$YACC"; then
+  ac_cv_prog_YACC="$YACC" # Let the user override the test.
+else
+  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_YACC="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+YACC="$ac_cv_prog_YACC"
+if test -n "$YACC"; then
+  echo "$ac_t""$YACC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
+
+
+for ac_hdr in mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2919: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2922 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2927: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $ac_tr_hdr
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+}
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in utime.h locale.h libgen.h fcntl.h ulimit.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:2960: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 2963 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $ac_tr_hdr
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+}
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+for ac_hdr in linux/version.h kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:3001: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3004 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $ac_tr_hdr
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+}
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
+echo "configure:3039: checking for sys/wait.h that is POSIX.1 compatible" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3042 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifndef WEXITSTATUS
+#define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
+#endif
+#ifndef WIFEXITED
+#define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif
+int main() {
+int s;
+wait (&s);
+s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+; return 0; }
+EOF
+if { (eval echo configure:3058: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_header_sys_wait_h=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_sys_wait_h=no
+fi
+rm -f conftest*
+
+echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
+if test $ac_cv_header_sys_wait_h = yes; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_SYS_WAIT_H
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_SYS_WAIT_H 1
+EOF
+}
+
+fi
+
+echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
+echo "configure:3082: checking for ANSI C header files" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3085 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:3093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  ac_cv_header_stdc=yes
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 3110 "configure"
+#include "confdefs.h"
+#include <string.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "memchr" >/dev/null 2>&1; then
+  :
+else
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+cat > conftest.$ac_ext <<EOF
+#line 3128 "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "free" >/dev/null 2>&1; then
+  :
+else
+  rm -rf conftest*
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+cat > conftest.$ac_ext <<EOF
+#line 3146 "configure"
+#include "confdefs.h"
+#include <ctype.h>
+#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int main () { int i; for (i = 0; i < 256; i++)
+if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
+exit (0); }
+
+EOF
+if { (eval echo configure:3157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_header_stdc=no
+fi
+rm -fr conftest*
+fi
+
+echo "$ac_t""$ac_cv_header_stdc" 1>&6
+if test $ac_cv_header_stdc = yes; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining STDC_HEADERS
+EOF
+cat >> confdefs.h <<\EOF
+#define STDC_HEADERS 1
+EOF
+}
+
+fi
+
+echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
+echo "configure:3182: checking whether time.h and sys/time.h may both be included" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3185 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+int main() {
+struct tm *tp;
+; return 0; }
+EOF
+if { (eval echo configure:3194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_header_time=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_time=no
+fi
+rm -f conftest*
+
+echo "$ac_t""$ac_cv_header_time" 1>&6
+if test $ac_cv_header_time = yes; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining TIME_WITH_SYS_TIME
+EOF
+cat >> confdefs.h <<\EOF
+#define TIME_WITH_SYS_TIME 1
+EOF
+}
+
+fi
+
+echo $ac_n "checking for sys_siglist declaration in signal.h or unistd.h""... $ac_c" 1>&6
+echo "configure:3218: checking for sys_siglist declaration in signal.h or unistd.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3221 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <signal.h>
+/* NetBSD declares sys_siglist in unistd.h.  */
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+int main() {
+char *msg = *(sys_siglist + 1);
+; return 0; }
+EOF
+if { (eval echo configure:3233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_decl_sys_siglist=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_decl_sys_siglist=no
+fi
+rm -f conftest*
+
+echo "$ac_t""$ac_cv_decl_sys_siglist" 1>&6
+if test $ac_cv_decl_sys_siglist = yes; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining SYS_SIGLIST_DECLARED
+EOF
+cat >> confdefs.h <<\EOF
+#define SYS_SIGLIST_DECLARED 1
+EOF
+}
+
+fi
+
+
+echo $ac_n "checking for struct utimbuf""... $ac_c" 1>&6
+echo "configure:3258: checking for struct utimbuf" >&5
+cat > conftest.$ac_ext <<EOF
+#line 3260 "configure"
+#include "confdefs.h"
+#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
+#ifdef HAVE_UTIME_H
+#include <utime.h>
+#endif
+int main() {
+static struct utimbuf x; x.actime = x.modtime;
+; return 0; }
+EOF
+if { (eval echo configure:3279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  echo "$ac_t""yes" 1>&6
+   { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_STRUCT_UTIMBUF
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_STRUCT_UTIMBUF 1
+EOF
+}
+
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  echo "$ac_t""no" 1>&6
+fi
+rm -f conftest*
+
+echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
+echo "configure:3299: checking return type of signal handlers" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3302 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+#undef signal
+#endif
+#ifdef __cplusplus
+extern "C" void (*signal (int, void (*)(int)))(int);
+#else
+void (*signal ()) ();
+#endif
+
+int main() {
+int i;
+; return 0; }
+EOF
+if { (eval echo configure:3319: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_type_signal=void
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_type_signal=int
+fi
+rm -f conftest*
+
+echo "$ac_t""$ac_cv_type_signal" 1>&6
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining RETSIGTYPE = $ac_cv_type_signal
+EOF
+cat >> confdefs.h <<EOF
+#define RETSIGTYPE $ac_cv_type_signal
+EOF
+}
+
+
+echo $ac_n "checking for size_t""... $ac_c" 1>&6
+echo "configure:3341: checking for size_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3344 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_size_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_size_t=no
+fi
+rm -f conftest*
+
+echo "$ac_t""$ac_cv_type_size_t" 1>&6
+if test $ac_cv_type_size_t = no; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining size_t = unsigned
+EOF
+cat >> confdefs.h <<\EOF
+#define size_t unsigned
+EOF
+}
+
+fi
+
+echo $ac_n "checking for pid_t""... $ac_c" 1>&6
+echo "configure:3375: checking for pid_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3378 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_pid_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_pid_t=no
+fi
+rm -f conftest*
+
+echo "$ac_t""$ac_cv_type_pid_t" 1>&6
+if test $ac_cv_type_pid_t = no; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining pid_t = int
+EOF
+cat >> confdefs.h <<\EOF
+#define pid_t int
+EOF
+}
+
+fi
+
+echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
+echo "configure:3409: checking for uid_t in sys/types.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3412 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "uid_t" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_uid_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_uid_t=no
+fi
+rm -f conftest*
+
+
+echo "$ac_t""$ac_cv_type_uid_t" 1>&6
+if test $ac_cv_type_uid_t = no; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining uid_t = int
+EOF
+cat >> confdefs.h <<\EOF
+#define uid_t int
+EOF
+}
+
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining gid_t = int
+EOF
+cat >> confdefs.h <<\EOF
+#define gid_t int
+EOF
+}
+
+fi
+
+echo $ac_n "checking for mode_t""... $ac_c" 1>&6
+echo "configure:3448: checking for mode_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3451 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_mode_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_mode_t=no
+fi
+rm -f conftest*
+
+echo "$ac_t""$ac_cv_type_mode_t" 1>&6
+if test $ac_cv_type_mode_t = no; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining mode_t = int
+EOF
+cat >> confdefs.h <<\EOF
+#define mode_t int
+EOF
+}
+
+fi
+
+echo $ac_n "checking for off_t""... $ac_c" 1>&6
+echo "configure:3482: checking for off_t" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3485 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_type_off_t=yes
+else
+  rm -rf conftest*
+  ac_cv_type_off_t=no
+fi
+rm -f conftest*
+
+echo "$ac_t""$ac_cv_type_off_t" 1>&6
+if test $ac_cv_type_off_t = no; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining off_t = long
+EOF
+cat >> confdefs.h <<\EOF
+#define off_t long
+EOF
+}
+
+fi
+
+
+echo $ac_n "checking for struct timeval""... $ac_c" 1>&6
+echo "configure:3517: checking for struct timeval" >&5
+cat > conftest.$ac_ext <<EOF
+#line 3519 "configure"
+#include "confdefs.h"
+#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
+int main() {
+static struct timeval x; x.tv_sec = x.tv_usec;
+; return 0; }
+EOF
+if { (eval echo configure:3535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  echo "$ac_t""yes" 1>&6
+  HAVE_TIMEVAL=yes
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_TIMEVAL
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_TIMEVAL 1
+EOF
+}
+
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  echo "$ac_t""no" 1>&6
+   HAVE_TIMEVAL=no
+fi
+rm -f conftest*
+
+echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
+echo "configure:3557: checking whether struct tm is in sys/time.h or time.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3560 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <time.h>
+int main() {
+struct tm *tp; tp->tm_sec;
+; return 0; }
+EOF
+if { (eval echo configure:3568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_struct_tm=time.h
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_struct_tm=sys/time.h
+fi
+rm -f conftest*
+
+echo "$ac_t""$ac_cv_struct_tm" 1>&6
+if test $ac_cv_struct_tm = sys/time.h; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining TM_IN_SYS_TIME
+EOF
+cat >> confdefs.h <<\EOF
+#define TM_IN_SYS_TIME 1
+EOF
+}
+
+fi
+
+echo $ac_n "checking for tm_zone in struct tm""... $ac_c" 1>&6
+echo "configure:3592: checking for tm_zone in struct tm" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3595 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+int main() {
+struct tm tm; tm.tm_zone;
+; return 0; }
+EOF
+if { (eval echo configure:3603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_struct_tm_zone=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_struct_tm_zone=no
+fi
+rm -f conftest*
+
+echo "$ac_t""$ac_cv_struct_tm_zone" 1>&6
+if test "$ac_cv_struct_tm_zone" = yes; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_TM_ZONE
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_TM_ZONE 1
+EOF
+}
+
+else
+  echo $ac_n "checking for tzname""... $ac_c" 1>&6
+echo "configure:3626: checking for tzname" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3629 "configure"
+#include "confdefs.h"
+#include <time.h>
+#ifndef tzname /* For SGI.  */
+extern char *tzname[]; /* RS6000 and others reject char **tzname.  */
+#endif
+int main() {
+atoi(*tzname);
+; return 0; }
+EOF
+if { (eval echo configure:3639: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  ac_cv_var_tzname=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_var_tzname=no
+fi
+rm -f conftest*
+
+echo "$ac_t""$ac_cv_var_tzname" 1>&6
+  if test $ac_cv_var_tzname = yes; then
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_TZNAME
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_TZNAME 1
+EOF
+}
+
+  fi
+fi
+
+
+echo $ac_n "checking for working const""... $ac_c" 1>&6
+echo "configure:3665: checking for working const" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3668 "configure"
+#include "confdefs.h"
+
+int main() {
+
+/* Ultrix mips cc rejects this.  */
+typedef int charset[2]; const charset x;
+/* SunOS 4.1.1 cc rejects this.  */
+char const *const *ccp;
+char **p;
+/* NEC SVR4.0.2 mips cc rejects this.  */
+struct point {int x, y;};
+static struct point const zero = {0,0};
+/* AIX XL C 1.02.0.0 rejects this.
+   It does not let you subtract one const X* pointer from another in an arm
+   of an if-expression whose if-part is not a constant expression */
+const char *g = "string";
+ccp = &g + (g ? g-g : 0);
+/* HPUX 7.0 cc rejects these. */
+++ccp;
+p = (char**) ccp;
+ccp = (char const *const *) p;
+{ /* SCO 3.2v4 cc rejects this.  */
+  char *t;
+  char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+  *t++ = 0;
+}
+{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
+  int x[] = {25, 17};
+  const int *foo = &x[0];
+  ++foo;
+}
+{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+  typedef const int *iptr;
+  iptr p = 0;
+  ++p;
+}
+{ /* AIX XL C 1.02.0.0 rejects this saying
+     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+  struct s { int j; const int *ap[3]; };
+  struct s *b; b->j = 5;
+}
+{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+  const int foo = 10;
+}
+
+; return 0; }
+EOF
+if { (eval echo configure:3717: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_const=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_const=no
+fi
+rm -f conftest*
+
+echo "$ac_t""$ac_cv_c_const" 1>&6
+if test $ac_cv_c_const = no; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining const = 
+EOF
+cat >> confdefs.h <<\EOF
+#define const 
+EOF
+}
+
+fi
+
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:3742: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+
+cat > conftestmake <<\EOF
+all:
+       @echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  SET_MAKE=
+else
+  echo "$ac_t""no" 1>&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
+echo "configure:3767: checking whether byte ordering is bigendian" >&5
+
+ac_cv_c_bigendian=unknown
+# See if sys/param.h defines the BYTE_ORDER macro.
+cat > conftest.$ac_ext <<EOF
+#line 3772 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/param.h>
+int main() {
+
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:3783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+cat > conftest.$ac_ext <<EOF
+#line 3787 "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+#include <sys/param.h>
+int main() {
+
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+; return 0; }
+EOF
+if { (eval echo configure:3798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_bigendian=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_c_bigendian=no
+fi
+rm -f conftest*
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+if test $ac_cv_c_bigendian = unknown; then
+cat > conftest.$ac_ext <<EOF
+#line 3815 "configure"
+#include "confdefs.h"
+main () {
+  /* Are we little or big endian?  From Harbison&Steele.  */
+  union
+  {
+    long l;
+    char c[sizeof (long)];
+  } u;
+  u.l = 1;
+  exit (u.c[sizeof (long) - 1] == 1);
+}
+EOF
+if { (eval echo configure:3828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+then
+  ac_cv_c_bigendian=no
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_c_bigendian=yes
+fi
+rm -fr conftest*
+fi
+
+echo "$ac_t""$ac_cv_c_bigendian" 1>&6
+if test $ac_cv_c_bigendian = yes; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining WORDS_BIGENDIAN
+EOF
+cat >> confdefs.h <<\EOF
+#define WORDS_BIGENDIAN 1
+EOF
+}
+
+fi
+
+
+echo $ac_n "checking size of short""... $ac_c" 1>&6
+echo "configure:3854: checking size of short" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3857 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(short));
+  exit(0);
+}
+EOF
+if { (eval echo configure:3868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+then
+  ac_cv_sizeof_short=`cat conftestval`
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_short=0
+fi
+rm -fr conftest*
+echo "$ac_t""$ac_cv_sizeof_short" 1>&6
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining SIZEOF_SHORT = $ac_cv_sizeof_short
+EOF
+cat >> confdefs.h <<EOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+EOF
+}
+
+
+if test "$ac_cv_sizeof_short" = 0; then
+  echo ""
+  echo "*** PANIC *** Configure tests are not working - compiler is broken."
+  echo "*** PANIC *** Please examine config.log for compilation errors."
+  exit 1
+fi
+echo $ac_n "checking size of int""... $ac_c" 1>&6
+echo "configure:3895: checking size of int" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3898 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(int));
+  exit(0);
+}
+EOF
+if { (eval echo configure:3909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+then
+  ac_cv_sizeof_int=`cat conftestval`
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_int=0
+fi
+rm -fr conftest*
+echo "$ac_t""$ac_cv_sizeof_int" 1>&6
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining SIZEOF_INT = $ac_cv_sizeof_int
+EOF
+cat >> confdefs.h <<EOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+EOF
+}
+
+
+echo $ac_n "checking size of long""... $ac_c" 1>&6
+echo "configure:3930: checking size of long" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3933 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(long));
+  exit(0);
+}
+EOF
+if { (eval echo configure:3944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+then
+  ac_cv_sizeof_long=`cat conftestval`
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_long=0
+fi
+rm -fr conftest*
+echo "$ac_t""$ac_cv_sizeof_long" 1>&6
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining SIZEOF_LONG = $ac_cv_sizeof_long
+EOF
+cat >> confdefs.h <<EOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+EOF
+}
+
+
+echo $ac_n "checking size of long long""... $ac_c" 1>&6
+echo "configure:3965: checking size of long long" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 3968 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(long long));
+  exit(0);
+}
+EOF
+if { (eval echo configure:3979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+then
+  ac_cv_sizeof_long_long=`cat conftestval`
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_long_long=0
+fi
+rm -fr conftest*
+echo "$ac_t""$ac_cv_sizeof_long_long" 1>&6
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining SIZEOF_LONG_LONG = $ac_cv_sizeof_long_long
+EOF
+cat >> confdefs.h <<EOF
+#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
+EOF
+}
+
+
+echo $ac_n "checking size of void *""... $ac_c" 1>&6
+echo "configure:4000: checking size of void *" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4003 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+main()
+{
+  FILE *f=fopen("conftestval", "w");
+  if (!f) exit(1);
+  fprintf(f, "%d\n", sizeof(void *));
+  exit(0);
+}
+EOF
+if { (eval echo configure:4014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+then
+  ac_cv_sizeof_void_p=`cat conftestval`
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_sizeof_void_p=0
+fi
+rm -fr conftest*
+echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining SIZEOF_VOID_P = $ac_cv_sizeof_void_p
+EOF
+cat >> confdefs.h <<EOF
+#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
+EOF
+}
+
+
+
+echo $ac_n "checking for long file names""... $ac_c" 1>&6
+echo "configure:4036: checking for long file names" >&5
+
+ac_cv_sys_long_file_names=yes
+# Test for long file names in all the places we know might matter:
+#      .               the current directory, where building will happen
+#      $prefix/lib     where we will be installing things
+#      $exec_prefix/lib        likewise
+# eval it to expand exec_prefix.
+#      $TMPDIR         if set, where it might want to write temporary files
+# if $TMPDIR is not set:
+#      /tmp            where it might want to write temporary files
+#      /var/tmp                likewise
+#      /usr/tmp                likewise
+if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
+  ac_tmpdirs="$TMPDIR"
+else
+  ac_tmpdirs='/tmp /var/tmp /usr/tmp'
+fi
+for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
+  test -d $ac_dir || continue
+  test -w $ac_dir || continue # It is less confusing to not echo anything here.
+  (echo 1 > $ac_dir/conftest9012345) 2>/dev/null
+  (echo 2 > $ac_dir/conftest9012346) 2>/dev/null
+  val=`cat $ac_dir/conftest9012345 2>/dev/null`
+  if test ! -f $ac_dir/conftest9012345 || test "$val" != 1; then
+    ac_cv_sys_long_file_names=no
+    rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
+    break
+  fi
+  rm -f $ac_dir/conftest9012345 $ac_dir/conftest9012346 2>/dev/null
+done
+
+echo "$ac_t""$ac_cv_sys_long_file_names" 1>&6
+if test $ac_cv_sys_long_file_names = yes; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_LONG_FILE_NAMES
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_LONG_FILE_NAMES 1
+EOF
+}
+
+fi
+
+
+
+echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
+echo "configure:4083: checking for sin in -lm" >&5
+ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lm "
+cat > conftest.$ac_ext <<EOF
+#line 4088 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char sin();
+
+int main() {
+sin()
+; return 0; }
+EOF
+if { (eval echo configure:4099: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $ac_tr_lib
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+}
+
+  LIBS="-lm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lm\" to \$LIBS"; fi
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+
+{ test "$extra_verbose" = "yes" && cat << \EOF
+    Defining LISP_FLOAT_TYPE
+EOF
+cat >> confdefs.h <<\EOF
+#define LISP_FLOAT_TYPE 1
+EOF
+}
+
+
+cat > conftest.$ac_ext <<EOF
+#line 4141 "configure"
+#include "confdefs.h"
+#include <math.h>
+int main() {
+return atanh(1.0) + asinh(1.0) + acosh(1.0); 
+; return 0; }
+EOF
+if { (eval echo configure:4148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_INVERSE_HYPERBOLIC
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_INVERSE_HYPERBOLIC 1
+EOF
+}
+
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+
+echo "checking type of mail spool file locking" 1>&6
+echo "configure:4165: checking type of mail spool file locking" >&5
+test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
+test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
+if   test "$mail_locking" = "lockf"; then { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining REAL_MAIL_USE_LOCKF
+EOF
+cat >> confdefs.h <<\EOF
+#define REAL_MAIL_USE_LOCKF 1
+EOF
+}
+
+elif test "$mail_locking" = "flock"; then { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining REAL_MAIL_USE_FLOCK
+EOF
+cat >> confdefs.h <<\EOF
+#define REAL_MAIL_USE_FLOCK 1
+EOF
+}
+
+else mail_locking="dot-locking"
+fi
+
+
+echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6
+echo "configure:4189: checking for kstat_open in -lkstat" >&5
+ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lkstat "
+cat > conftest.$ac_ext <<EOF
+#line 4194 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char kstat_open();
+
+int main() {
+kstat_open()
+; return 0; }
+EOF
+if { (eval echo configure:4205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo kstat | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $ac_tr_lib
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+}
+
+  LIBS="-lkstat $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkstat\" to \$LIBS"; fi
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+
+
+echo $ac_n "checking for kvm_read in -lkvm""... $ac_c" 1>&6
+echo "configure:4239: checking for kvm_read in -lkvm" >&5
+ac_lib_var=`echo kvm'_'kvm_read | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lkvm "
+cat > conftest.$ac_ext <<EOF
+#line 4244 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char kvm_read();
+
+int main() {
+kvm_read()
+; return 0; }
+EOF
+if { (eval echo configure:4255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo kvm | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $ac_tr_lib
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+}
+
+  LIBS="-lkvm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lkvm\" to \$LIBS"; fi
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+
+case "$opsys" in decosf*)
+  
+echo $ac_n "checking for cma_open in -lpthreads""... $ac_c" 1>&6
+echo "configure:4290: checking for cma_open in -lpthreads" >&5
+ac_lib_var=`echo pthreads'_'cma_open | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lpthreads "
+cat > conftest.$ac_ext <<EOF
+#line 4295 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char cma_open();
+
+int main() {
+cma_open()
+; return 0; }
+EOF
+if { (eval echo configure:4306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo pthreads | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $ac_tr_lib
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+}
+
+  LIBS="-lpthreads $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpthreads\" to \$LIBS"; fi
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+  test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
+    c_switch_site="$c_switch_site -threads" ;;
+esac
+
+echo $ac_n "checking whether the -xildoff compiler flag is required""... $ac_c" 1>&6
+echo "configure:4342: checking whether the -xildoff compiler flag is required" >&5
+if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
+  if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
+    then echo "$ac_t""no" 1>&6;
+    else echo "$ac_t""yes" 1>&6; ld_switch_site="$ld_switch_site -xildoff" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-xildoff\" to \$ld_switch_site"; fi
+  fi
+  else echo "$ac_t""no" 1>&6
+fi
+
+if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
+  echo $ac_n "checking for \"-z ignore\" linker flag""... $ac_c" 1>&6
+echo "configure:4353: checking for \"-z ignore\" linker flag" >&5
+  case "`ld -h 2>&1`" in
+    *-z\ ignore\|record* ) echo "$ac_t""yes" 1>&6
+      ld_switch_site="-z ignore $ld_switch_site" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-z ignore\" to \$ld_switch_site"; fi ;;
+    *) echo "$ac_t""no" 1>&6 ;;
+  esac
+fi
+
+
+echo "checking "for specified window system"" 1>&6
+echo "configure:4363: checking "for specified window system"" >&5
+
+if test "$with_x11" != "no"; then
+    test "$x_includes $x_libraries" != "NONE NONE" && \
+   window_system=x11 with_x11=yes
+
+        
+      if test "$x_includes $x_libraries" = "NONE NONE" \
+    -a -n "$OPENWINHOME" \
+    -a "$OPENWINHOME" != "/usr/openwin" \
+    -a -d "$OPENWINHOME"; then
+      test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
+      test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
+      test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
+  fi
+
+  if test "$x_includes" = "NONE"; then
+                    for dir in "/usr/X11" "/usr/X11R6"; do
+      if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
+    done
+  fi
+
+  if test "$x_libraries" = "NONE"; then
+    for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
+      if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
+    done
+  fi
+
+  # If we find X, set shell vars x_includes and x_libraries to the
+# paths, otherwise set no_x=yes.
+# Uses ac_ vars as temps to allow command line to override cache and checks.
+# --without-x overrides everything else, but does not touch the cache.
+echo $ac_n "checking for X""... $ac_c" 1>&6
+echo "configure:4396: checking for X" >&5
+
+# Check whether --with-x or --without-x was given.
+if test "${with_x+set}" = set; then
+  withval="$with_x"
+  :
+fi
+
+# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+if test "x$with_x" = xno; then
+  # The user explicitly disabled X.
+  have_x=disabled
+else
+  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
+    # Both variables are already set.
+    have_x=yes
+  else
+
+# One or both of the vars are not set, and there is no cached value.
+ac_x_includes=NO ac_x_libraries=NO
+rm -fr conftestdir
+if mkdir conftestdir; then
+  cd conftestdir
+  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
+  cat > Imakefile <<'EOF'
+acfindx:
+       @echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
+EOF
+  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
+    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
+    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+    for ac_extension in a so sl; do
+      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
+        test -f $ac_im_libdir/libX11.$ac_extension; then
+        ac_im_usrlibdir=$ac_im_libdir; break
+      fi
+    done
+    # Screen out bogus values from the imake configuration.  They are
+    # bogus both because they are the default anyway, and because
+    # using them would break gcc on systems where it needs fixed includes.
+    case "$ac_im_incroot" in
+       /usr/include) ;;
+       *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes="$ac_im_incroot" ;;
+    esac
+    case "$ac_im_usrlibdir" in
+       /usr/lib | /lib) ;;
+       *) test -d "$ac_im_usrlibdir" && ac_x_libraries="$ac_im_usrlibdir" ;;
+    esac
+  fi
+  cd ..
+  rm -fr conftestdir
+fi
+
+if test "$ac_x_includes" = NO; then
+  # Guess where to find include files, by looking for this one X11 .h file.
+  test -z "$x_direct_test_include" && x_direct_test_include=X11/Intrinsic.h
+
+  # First, try using that file with no special directory specified.
+cat > conftest.$ac_ext <<EOF
+#line 4456 "configure"
+#include "confdefs.h"
+#include <$x_direct_test_include>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  # Look for the header file in a standard set of common directories.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+  for ac_dir in               \
+    /usr/X11/include          \
+    /usr/X11R6/include        \
+    /usr/X11R5/include        \
+    /usr/X11R4/include        \
+                              \
+    /usr/include/X11          \
+    /usr/include/X11R6        \
+    /usr/include/X11R5        \
+    /usr/include/X11R4        \
+                              \
+    /usr/local/X11/include    \
+    /usr/local/X11R6/include  \
+    /usr/local/X11R5/include  \
+    /usr/local/X11R4/include  \
+                              \
+    /usr/local/include/X11    \
+    /usr/local/include/X11R6  \
+    /usr/local/include/X11R5  \
+    /usr/local/include/X11R4  \
+                              \
+    /usr/X386/include         \
+    /usr/x386/include         \
+    /usr/XFree86/include/X11  \
+                              \
+    /usr/include              \
+    /usr/local/include        \
+    /usr/unsupported/include  \
+    /usr/athena/include       \
+    /usr/local/x11r5/include  \
+    /usr/lpp/Xamples/include  \
+                              \
+    /usr/openwin/include      \
+    /usr/openwin/share/include \
+    ; \
+  do
+    if test -r "$ac_dir/$x_direct_test_include"; then
+      ac_x_includes=$ac_dir
+      break
+    fi
+  done
+fi
+rm -f conftest*
+fi # $ac_x_includes = NO
+
+if test "$ac_x_libraries" = NO; then
+  # Check for the libraries.
+
+  test -z "$x_direct_test_library" && x_direct_test_library=Xt
+  test -z "$x_direct_test_function" && x_direct_test_function=XtMalloc
+
+  # See if we find them without any special options.
+  # Don't add to $LIBS permanently.
+  ac_save_LIBS="$LIBS"
+  LIBS="-l$x_direct_test_library $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4530 "configure"
+#include "confdefs.h"
+
+int main() {
+${x_direct_test_function}()
+; return 0; }
+EOF
+if { (eval echo configure:4537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  LIBS="$ac_save_LIBS"
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  LIBS="$ac_save_LIBS"
+# First see if replacing the include by lib works.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+for ac_dir in `echo "$ac_x_includes" | sed s/include/lib/` \
+    /usr/X11/lib          \
+    /usr/X11R6/lib        \
+    /usr/X11R5/lib        \
+    /usr/X11R4/lib        \
+                          \
+    /usr/lib/X11          \
+    /usr/lib/X11R6        \
+    /usr/lib/X11R5        \
+    /usr/lib/X11R4        \
+                          \
+    /usr/local/X11/lib    \
+    /usr/local/X11R6/lib  \
+    /usr/local/X11R5/lib  \
+    /usr/local/X11R4/lib  \
+                          \
+    /usr/local/lib/X11    \
+    /usr/local/lib/X11R6  \
+    /usr/local/lib/X11R5  \
+    /usr/local/lib/X11R4  \
+                          \
+    /usr/X386/lib         \
+    /usr/x386/lib         \
+    /usr/XFree86/lib/X11  \
+                          \
+    /usr/lib              \
+    /usr/local/lib        \
+    /usr/unsupported/lib  \
+    /usr/athena/lib       \
+    /usr/local/x11r5/lib  \
+    /usr/lpp/Xamples/lib  \
+    /lib/usr/lib/X11     \
+                          \
+    /usr/openwin/lib      \
+    /usr/openwin/share/lib \
+    ; \
+do
+  for ac_extension in a so sl; do
+    if test -r $ac_dir/lib${x_direct_test_library}.$ac_extension; then
+      ac_x_libraries=$ac_dir
+      break 2
+    fi
+  done
+done
+fi
+rm -f conftest*
+fi # $ac_x_libraries = NO
+
+if test "$ac_x_includes" = NO || test "$ac_x_libraries" = NO; then
+  # Didn't find X anywhere.  Cache the known absence of X.
+  ac_cv_have_x="have_x=no"
+else
+  # Record where we found X for the cache.
+  ac_cv_have_x="have_x=yes \
+               ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
+fi
+  fi
+  eval "$ac_cv_have_x"
+fi # $with_x != no
+
+if test "$have_x" != yes; then
+  echo "$ac_t""$have_x" 1>&6
+  no_x=yes
+else
+  # If each of the values was on the command line, it overrides each guess.
+  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+  # Update the cache value to reflect the command line values.
+  ac_cv_have_x="have_x=yes \
+               ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
+  echo "$ac_t""libraries $x_libraries, headers $x_includes" 1>&6
+fi
+
+if test "$no_x" = yes; then
+  # Not all programs may use this symbol, but it does not hurt to define it.
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining X_DISPLAY_MISSING
+EOF
+cat >> confdefs.h <<\EOF
+#define X_DISPLAY_MISSING 1
+EOF
+}
+
+  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
+else
+  if test -n "$x_includes"; then
+    X_CFLAGS="$X_CFLAGS -I$x_includes"
+  fi
+
+  # It would also be nice to do this for all -L options, not just this one.
+  if test -n "$x_libraries"; then
+    X_LIBS="$X_LIBS -L$x_libraries"
+    # For Solaris; some versions of Sun CC require a space after -R and
+    # others require no space.  Words are not sufficient . . . .
+    case "`(uname -sr) 2>/dev/null`" in
+    "SunOS 5"*)
+      echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6
+echo "configure:4646: checking whether -R must be followed by a space" >&5
+      ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries"
+      cat > conftest.$ac_ext <<EOF
+#line 4649 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:4656: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  ac_R_nospace=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_R_nospace=no
+fi
+rm -f conftest*
+      if test $ac_R_nospace = yes; then
+       echo "$ac_t""no" 1>&6
+       X_LIBS="$X_LIBS -R$x_libraries"
+      else
+       LIBS="$ac_xsave_LIBS -R $x_libraries"
+       cat > conftest.$ac_ext <<EOF
+#line 4672 "configure"
+#include "confdefs.h"
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:4679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  ac_R_space=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_R_space=no
+fi
+rm -f conftest*
+       if test $ac_R_space = yes; then
+         echo "$ac_t""yes" 1>&6
+         X_LIBS="$X_LIBS -R $x_libraries"
+       else
+         echo "$ac_t""neither works" 1>&6
+       fi
+      fi
+      LIBS="$ac_xsave_LIBS"
+    esac
+  fi
+
+  # Check for system-dependent libraries X programs must link with.
+  # Do this before checking for the system-independent R6 libraries
+  # (-lICE), since we may need -lsocket or whatever for X linking.
+
+  if test "$ISC" = yes; then
+    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
+  else
+    # Martyn.Johnson@cl.cam.ac.uk says this is needed for Ultrix, if the X
+    # libraries were built with DECnet support.  And karl@cs.umb.edu says
+    # the Alpha needs dnet_stub (dnet does not exist).
+    if test "$with_dnet" = "no" ; then
+ac_cv_lib_dnet_dnet_ntoa=no
+else
+
+echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6
+echo "configure:4715: checking for dnet_ntoa in -ldnet" >&5
+ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -ldnet "
+cat > conftest.$ac_ext <<EOF
+#line 4720 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char dnet_ntoa();
+
+int main() {
+dnet_ntoa()
+; return 0; }
+EOF
+if { (eval echo configure:4731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+      
+echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6
+echo "configure:4755: checking for dnet_ntoa in -ldnet_stub" >&5
+ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -ldnet_stub "
+cat > conftest.$ac_ext <<EOF
+#line 4760 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char dnet_ntoa();
+
+int main() {
+dnet_ntoa()
+; return 0; }
+EOF
+if { (eval echo configure:4771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+    fi
+
+    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
+    # to get the SysV transport functions.
+    # chad@anasazi.com says the Pyramis MIS-ES running DC/OSx (SVR4)
+    # needs -lnsl.
+    # The nsl library prevents programs from opening the X display
+    # on Irix 5.2, according to dickey@clark.net.
+    echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6
+echo "configure:4800: checking for gethostbyname" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4803 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char gethostbyname(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char gethostbyname();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
+choke me
+#else
+gethostbyname();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_gethostbyname=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_gethostbyname=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'gethostbyname`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    if test $ac_cv_func_gethostbyname = no; then
+      
+echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6
+echo "configure:4847: checking for gethostbyname in -lnsl" >&5
+ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lnsl "
+cat > conftest.$ac_ext <<EOF
+#line 4852 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char gethostbyname();
+
+int main() {
+gethostbyname()
+; return 0; }
+EOF
+if { (eval echo configure:4863: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+    fi
+
+    # lieder@skyler.mavd.honeywell.com says without -lsocket,
+    # socket/setsockopt and other routines are undefined under SCO ODT
+    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
+    # on later versions), says simon@lia.di.epfl.ch: it contains
+    # gethostby* variants that don't use the nameserver (or something).
+    # -lsocket must be given before -lnsl if both are needed.
+    # We assume that if connect needs -lnsl, so does gethostbyname.
+    echo $ac_n "checking for connect""... $ac_c" 1>&6
+echo "configure:4893: checking for connect" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4896 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char connect(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char connect();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_connect) || defined (__stub___connect)
+choke me
+#else
+connect();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_connect=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_connect=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'connect`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    if test $ac_cv_func_connect = no; then
+      
+xe_msg_checking="for connect in -lsocket"
+test -n "$X_EXTRA_LIBS" && xe_msg_checking="$xe_msg_checking using extra libs $X_EXTRA_LIBS"
+echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
+echo "configure:4942: checking "$xe_msg_checking"" >&5
+ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lsocket $X_EXTRA_LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 4947 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char connect();
+
+int main() {
+connect()
+; return 0; }
+EOF
+if { (eval echo configure:4958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+    fi
+
+    # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX.
+    echo $ac_n "checking for remove""... $ac_c" 1>&6
+echo "configure:4982: checking for remove" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 4985 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char remove(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char remove();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_remove) || defined (__stub___remove)
+choke me
+#else
+remove();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:5008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_remove=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_remove=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'remove`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    if test $ac_cv_func_remove = no; then
+      
+echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6
+echo "configure:5029: checking for remove in -lposix" >&5
+ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lposix "
+cat > conftest.$ac_ext <<EOF
+#line 5034 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char remove();
+
+int main() {
+remove()
+; return 0; }
+EOF
+if { (eval echo configure:5045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+    fi
+
+    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+    echo $ac_n "checking for shmat""... $ac_c" 1>&6
+echo "configure:5069: checking for shmat" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5072 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char shmat(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char shmat();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_shmat) || defined (__stub___shmat)
+choke me
+#else
+shmat();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:5095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_shmat=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_shmat=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'shmat`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    if test $ac_cv_func_shmat = no; then
+      
+echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6
+echo "configure:5116: checking for shmat in -lipc" >&5
+ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lipc "
+cat > conftest.$ac_ext <<EOF
+#line 5121 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char shmat();
+
+int main() {
+shmat()
+; return 0; }
+EOF
+if { (eval echo configure:5132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+    fi
+  fi
+
+  # Check for libraries that X11R6 Xt/Xaw programs need.
+  ac_save_LDFLAGS="$LDFLAGS"
+  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
+  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+  # check for ICE first), but we must link in the order -lSM -lICE or
+  # we get undefined symbols.  So assume we have SM if we have ICE.
+  # These have to be linked with before -lX11, unlike the other
+  # libraries we check for below, so use a different variable.
+  #  --interran@uluru.Stanford.EDU, kb@cs.umb.edu.
+  
+echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6
+echo "configure:5166: checking for IceConnectionNumber in -lICE" >&5
+ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lICE "
+cat > conftest.$ac_ext <<EOF
+#line 5171 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char IceConnectionNumber();
+
+int main() {
+IceConnectionNumber()
+; return 0; }
+EOF
+if { (eval echo configure:5182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+  LDFLAGS="$ac_save_LDFLAGS"
+
+fi
+ # Autoconf claims to find X library and include dirs for us.
+  if test "$no_x" = "yes"
+  then with_x11=no  window_system=none HAVE_X_WINDOWS=no
+  else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
+  fi
+fi
+
+case "$with_x11" in
+  yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
+  no  ) window_system=none HAVE_X_WINDOWS=no  ;;
+esac
+
+if test "$with_x11" = "yes"; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_X_WINDOWS
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_X_WINDOWS 1
+EOF
+}
+
+  MAKE_SUBDIR="$MAKE_SUBDIR lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$MAKE_SUBDIR"; fi
+  SRC_SUBDIR_DEPS="$SRC_SUBDIR_DEPS lwlib" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib\" to \$SRC_SUBDIR_DEPS"; fi
+
+      for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
+    inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
+    if test -d "$lib_dir" -a -d "$inc_dir"; then
+      case "$x_libraries" in *"$lib_dir"* ) ;; *)
+        x_libraries="$lib_dir $x_libraries"
+        X_LIBS="-L${lib_dir} $X_LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-L${lib_dir}\" to \$X_LIBS"; fi ;;
+      esac
+      case "$x_includes" in "$inc_dir"* ) ;; *)
+        x_includes="$inc_dir $x_includes"
+        X_CFLAGS="-I${inc_dir} $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-I${inc_dir}\" to \$X_CFLAGS"; fi ;;
+      esac
+      break;       fi
+  done
+
+    for rel in "X11R6" "X11R5" "X11R4"; do
+    lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
+    if test -d "$lib_dir" -a -d "$inc_dir"; then
+      case "$x_libraries" in *"$lib_dir"* ) ;; *)
+        x_libraries="$x_libraries $lib_dir"
+       X_LIBS="$X_LIBS -L${lib_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-L${lib_dir}\" to \$X_LIBS"; fi
+      esac
+      case "$x_includes" in "$inc_dir"* ) ;; *)
+        x_includes="$x_includes $inc_dir"
+        X_CFLAGS="$X_CFLAGS -I${inc_dir}" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-I${inc_dir}\" to \$X_CFLAGS"; fi
+      esac
+      break;     fi
+  done
+
+  ld_switch_x_site="$X_LIBS"
+
+  
+if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
+    ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
+  ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
+  
+        runpath="" runpath_dirs=""
+  if test -n "$LD_RUN_PATH"; then
+    runpath="$LD_RUN_PATH"
+  elif test "$GCC" = "yes"; then
+        ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
+    echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
+    xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
+    for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
+      case "$arg" in P,* | -L* | -R* )
+        for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
+          {
+xe_runpath_dir="$dir"
+  test "$xe_runpath_dir" != "/lib"     -a \
+       "$xe_runpath_dir" != "/usr/lib" -a \
+       -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
+  eval "$xe_add_unique_runpath_dir"
+}
+        done ;;
+      esac
+    done
+    ld_switch_run="$ld_switch_run_save"
+    rm -f conftest*
+  else
+        for arg in $ld_switch_site $ld_switch_x_site; do
+      case "$arg" in -L*) {
+xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
+  test "$xe_runpath_dir" != "/lib"     -a \
+       "$xe_runpath_dir" != "/usr/lib" -a \
+       -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
+  eval "$xe_add_unique_runpath_dir"
+};; esac
+    done
+        if test "$opsys $need_motif" = "sol2 yes"; then
+      xe_runpath_dir="/opt/SUNWdt/lib";
+      eval "$xe_add_unique_runpath_dir";
+    fi
+  fi 
+  if test -n "$runpath"; then
+    ld_switch_run="${dash_r}${runpath}"
+    
+if test "$GCC" = "yes"; then
+  set x $ld_switch_run; shift; ld_switch_run=""
+  while test -n "$1"; do
+    case $1 in
+      -L  | -l  | -u         ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
+      -L* | -l* | -u* | -Wl* ) ld_switch_run="$ld_switch_run $1" ;;
+      -Xlinker* ) ;;
+      * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
+    esac
+    shift
+  done
+fi
+    test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
+  fi
+fi
+
+
+  if test "$extra_verbose" = "yes"; then
+    echo; echo "X11 compilation variables:"
+    for var in x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS; do eval "echo \"$var = '\$$var'\""; done
+    echo
+  fi
+
+            bitmapdirs=
+  if test "$x_includes" != NONE; then
+    for i in $x_includes; do
+      if test -d "$i/bitmaps"; then
+       bitmapdirs="$i/bitmaps:$bitmapdirs"
+      fi
+      if test -d "$i/X11/bitmaps"; then
+       bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
+      fi
+    done
+    bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
+  fi
+  test ! -z "$bitmapdirs" && { test "$extra_verbose" = "yes" && cat << EOF
+    Defining BITMAPDIR = "$bitmapdirs"
+EOF
+cat >> confdefs.h <<EOF
+#define BITMAPDIR "$bitmapdirs"
+EOF
+}
+
+
+    echo "checking for X defines extracted by xmkmf" 1>&6
+echo "configure:5349: checking for X defines extracted by xmkmf" >&5
+  rm -fr conftestdir
+  if mkdir conftestdir; then
+    cd conftestdir
+    cat > Imakefile <<'EOF'
+xetest:
+       @echo ${PROTO_DEFINES} ${STD_DEFINES}
+EOF
+    if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
+      # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+      xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
+    fi
+    cd ..
+    rm -fr conftestdir
+    for word in $xmkmf_defines; do
+      case "$word" in
+       -D*=* ) ;;
+       -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
+             { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $word
+EOF
+cat >> confdefs.h <<EOF
+#define $word 1
+EOF
+}
+ ;;
+      esac
+    done
+  fi
+
+    ac_safe=`echo "X11/Intrinsic.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for X11/Intrinsic.h""... $ac_c" 1>&6
+echo "configure:5381: checking for X11/Intrinsic.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5384 "configure"
+#include "confdefs.h"
+#include <X11/Intrinsic.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5389: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: "Unable to find X11 header files."" 1>&2; exit 1; }
+fi
+
+
+      
+echo $ac_n "checking for XOpenDisplay in -lX11""... $ac_c" 1>&6
+echo "configure:5413: checking for XOpenDisplay in -lX11" >&5
+ac_lib_var=`echo X11'_'XOpenDisplay | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lX11 "
+cat > conftest.$ac_ext <<EOF
+#line 5418 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char XOpenDisplay();
+
+int main() {
+XOpenDisplay()
+; return 0; }
+EOF
+if { (eval echo configure:5429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  have_lib_x11=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+  if test "$have_lib_x11" != "yes"; then
+    
+xe_msg_checking="for XGetFontProperty in -lX11"
+test -n "-b i486-linuxaout" && xe_msg_checking="$xe_msg_checking using extra libs -b i486-linuxaout"
+echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
+echo "configure:5454: checking "$xe_msg_checking"" >&5
+ac_lib_var=`echo X11'_'XGetFontProperty | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lX11 -b i486-linuxaout"
+cat > conftest.$ac_ext <<EOF
+#line 5459 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char XGetFontProperty();
+
+int main() {
+XGetFontProperty()
+; return 0; }
+EOF
+if { (eval echo configure:5470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site"
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
+fi
+
+
+  fi
+  libs_x="-lX11"
+  test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
+
+    
+echo $ac_n "checking for XShapeSelectInput in -lXext""... $ac_c" 1>&6
+echo "configure:5497: checking for XShapeSelectInput in -lXext" >&5
+ac_lib_var=`echo Xext'_'XShapeSelectInput | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lXext "
+cat > conftest.$ac_ext <<EOF
+#line 5502 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char XShapeSelectInput();
+
+int main() {
+XShapeSelectInput()
+; return 0; }
+EOF
+if { (eval echo configure:5513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  libs_x="-lXext $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXext\" to \$libs_x"; fi
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+
+    
+echo $ac_n "checking for XtOpenDisplay in -lXt""... $ac_c" 1>&6
+echo "configure:5536: checking for XtOpenDisplay in -lXt" >&5
+ac_lib_var=`echo Xt'_'XtOpenDisplay | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lXt "
+cat > conftest.$ac_ext <<EOF
+#line 5541 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char XtOpenDisplay();
+
+int main() {
+XtOpenDisplay()
+; return 0; }
+EOF
+if { (eval echo configure:5552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  libs_x="-lXt $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXt\" to \$libs_x"; fi
+else
+  echo "$ac_t""no" 1>&6
+{ echo "configure: error: "Unable to find X11 libraries."" 1>&2; exit 1; }
+fi
+
+
+
+  echo $ac_n "checking the version of X11 being used""... $ac_c" 1>&6
+echo "configure:5575: checking the version of X11 being used" >&5
+  cat > conftest.$ac_ext <<EOF
+#line 5577 "configure"
+#include "confdefs.h"
+#include <X11/Intrinsic.h>
+    int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }
+EOF
+if { (eval echo configure:5582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+then
+  ./conftest foobar; x11_release=$?
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  x11_release=4
+fi
+rm -fr conftest*
+  echo "$ac_t""R${x11_release}" 1>&6
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining THIS_IS_X11R${x11_release}
+EOF
+cat >> confdefs.h <<EOF
+#define THIS_IS_X11R${x11_release} 1
+EOF
+}
+
+
+  for ac_hdr in X11/Xlocale.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:5606: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5609 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $ac_tr_hdr
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+}
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+
+    echo $ac_n "checking for XFree86""... $ac_c" 1>&6
+echo "configure:5645: checking for XFree86" >&5
+  if test -d "/usr/X386/include" -o \
+          -f "/etc/XF86Config"    -o \
+         -f "/etc/X11/XF86Config" -o \
+         -f "/usr/X11R6/lib/X11/XF86Config"; then
+    echo "$ac_t""yes" 1>&6
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_XFREE386
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_XFREE386 1
+EOF
+}
+
+  else
+    echo "$ac_t""no" 1>&6
+  fi
+
+    test -z "$with_xmu" && { 
+echo $ac_n "checking for XmuReadBitmapDataFromFile in -lXmu""... $ac_c" 1>&6
+echo "configure:5665: checking for XmuReadBitmapDataFromFile in -lXmu" >&5
+ac_lib_var=`echo Xmu'_'XmuReadBitmapDataFromFile | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lXmu "
+cat > conftest.$ac_ext <<EOF
+#line 5670 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char XmuReadBitmapDataFromFile();
+
+int main() {
+XmuReadBitmapDataFromFile()
+; return 0; }
+EOF
+if { (eval echo configure:5681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  with_xmu=yes
+else
+  echo "$ac_t""no" 1>&6
+with_xmu=no
+fi
+
+ }
+  if test "$with_xmu" = "no"; then
+    extra_objs="$extra_objs xmu.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"xmu.o\""
+ fi
+  else
+    libs_x="-lXmu $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXmu\" to \$libs_x"; fi
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_XMU
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_XMU 1
+EOF
+}
+
+  fi
+
+      
+echo $ac_n "checking for main in -lXbsd""... $ac_c" 1>&6
+echo "configure:5720: checking for main in -lXbsd" >&5
+ac_lib_var=`echo Xbsd'_'main | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lXbsd "
+cat > conftest.$ac_ext <<EOF
+#line 5725 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:5732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  libs_x="-lXbsd $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXbsd\" to \$libs_x"; fi
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+
+    if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
+        if test "$GCC" = "yes"; then
+      X_CFLAGS="-mthreads $X_CFLAGS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$X_CFLAGS"; fi
+      libs_x="-mthreads $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-mthreads\" to \$libs_x"; fi
+    else
+      case "$CC" in
+        "xlc" ) CC="xlc_r" ;;
+        "xlC" ) CC="xlC_r" ;;
+        "cc"  ) CC="cc_r" ;;
+      esac
+    fi
+  fi
+
+fi 
+if test "$with_msw" != "no"; then
+  echo "checking for MS-Windows" 1>&6
+echo "configure:5769: checking for MS-Windows" >&5
+  
+echo $ac_n "checking for main in -lgdi32""... $ac_c" 1>&6
+echo "configure:5772: checking for main in -lgdi32" >&5
+ac_lib_var=`echo gdi32'_'main | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lgdi32 "
+cat > conftest.$ac_ext <<EOF
+#line 5777 "configure"
+#include "confdefs.h"
+
+int main() {
+main()
+; return 0; }
+EOF
+if { (eval echo configure:5784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  with_msw=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+  if test "$with_msw" = "yes"; then
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_MS_WINDOWS
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_MS_WINDOWS 1
+EOF
+}
+
+    install_pp="$blddir/lib-src/installexe.sh"
+    libs_system="$libs_system -lshell32 -lgdi32 -luser32 -lcomctl32" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"-lshell32 -lgdi32 -luser32 -lcomctl32\" to \$libs_system"; fi
+    if test "$window_system" != x11; then
+       window_system=msw
+       test "$with_scrollbars" != "no" && with_scrollbars=msw \
+           && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"scrollbar-msw.o\""
+ fi
+       test "$with_menubars"   != "no" && with_menubars=msw \
+           && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"menubar-msw.o\""
+ fi
+       test "$with_toolbars"   != "no" && with_toolbars=msw \
+           && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"toolbar-msw.o\""
+ fi
+       test "$with_dialogs"   != "no" && with_dialogs=msw \
+           && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"dialog-msw.o\""
+ fi
+    else
+       test "$with_scrollbars"   != "no" && extra_objs="$extra_objs scrollbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"scrollbar-msw.o\""
+ fi
+       test "$with_menubars"   != "no" && extra_objs="$extra_objs menubar-msw.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"menubar-msw.o\""
+ fi
+       test "$with_toolbars"   != "no" && extra_objs="$extra_objs toolbar-msw.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"toolbar-msw.o\""
+ fi
+       test "$with_dialogs"   != "no" && extra_objs="$extra_objs dialog-msw.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"dialog-msw.o\""
+ fi
+    fi
+        cat > conftest.$ac_ext <<EOF
+#line 5848 "configure"
+#include "confdefs.h"
+#include <fcntl.h>
+    int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }
+EOF
+if { (eval echo configure:5853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_MSG_SELECT
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_MSG_SELECT 1
+EOF
+}
+
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -fr conftest*
+    const_is_losing=no
+    with_file_coding=yes
+    use_minimal_tagbits=yes
+    use_indexed_lrecord_implementation=yes
+    extra_objs="$extra_objs console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o\""
+ fi
+  fi
+fi
+
+
+
+test -z "$window_system" && window_system="none"
+
+if test "$window_system" = "none"; then
+  for feature in menubars scrollbars toolbars dialogs dragndrop
+  do
+    if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
+       echo "configure: warning: --with-$feature ignored:  Not valid without window system support" 1>&2
+    fi
+    eval "with_${feature}=no"
+  done
+else
+  test -z "$with_toolbars" && with_toolbars=yes
+fi
+
+if test "$with_msw" != "yes"; then
+  for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
+  do
+    if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
+       echo "configure: warning: --with-$feature ignored:  Not valid without MS-Windows support" 1>&2
+    fi
+    eval "with_${feature}=no"
+  done
+else
+  :
+fi
+
+if test "$with_x11" != "yes"; then
+            for feature in tooltalk cde offix session xim xmu \
+                 xface
+  do
+    if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
+       echo "configure: warning: --with-$feature ignored:  Not valid without X support" 1>&2
+    fi
+    eval "with_${feature}=no"
+  done
+fi
+
+bitmapdir=
+
+case "$window_system" in
+  x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
+  msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
+  none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
+esac
+
+case "$x_libraries" in *X11R4* )
+  test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
+  test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
+esac
+
+echo "checking for session-management option" 1>&6
+echo "configure:5931: checking for session-management option" >&5;
+if test "$with_session" != "no"; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_SESSION
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_SESSION 1
+EOF
+}
+
+fi
+
+test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
+test -z "$with_xauth" && { ac_safe=`echo "X11/Xauth.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for X11/Xauth.h""... $ac_c" 1>&6
+echo "configure:5946: checking for X11/Xauth.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 5949 "configure"
+#include "confdefs.h"
+#include <X11/Xauth.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+with_xauth=no
+fi
+ }
+test -z "$with_xauth" && { 
+echo $ac_n "checking for XauGetAuthByAddr in -lXau""... $ac_c" 1>&6
+echo "configure:5977: checking for XauGetAuthByAddr in -lXau" >&5
+ac_lib_var=`echo Xau'_'XauGetAuthByAddr | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lXau "
+cat > conftest.$ac_ext <<EOF
+#line 5982 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char XauGetAuthByAddr();
+
+int main() {
+XauGetAuthByAddr()
+; return 0; }
+EOF
+if { (eval echo configure:5993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+with_xauth=no
+fi
+
+ }
+test -z "$with_xauth" && with_xauth=yes
+if test "$with_xauth" = "yes"; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_XAUTH
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_XAUTH 1
+EOF
+}
+
+  
+T=""
+for W in $X_EXTRA_LIBS -lXau $libs_x $X_PRE_LIBS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
+libs_xauth="$T"
+
+fi
+
+
+
+
+if test "$with_tooltalk" != "no" ; then
+      for dir in "" "Tt/" "desktop/" ; do
+    ac_safe=`echo "${dir}tt_c.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for ${dir}tt_c.h""... $ac_c" 1>&6
+echo "configure:6038: checking for ${dir}tt_c.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6041 "configure"
+#include "confdefs.h"
+#include <${dir}tt_c.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6046: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  tt_c_h_path="${dir}tt_c.h"; break
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  done
+  if test -z "$tt_c_h_path"; then
+    if test "$with_tooltalk" = "yes"; then
+      (echo "$progname: Usage error:"
+echo " " "Unable to find required tooltalk header files."
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
+    fi
+    with_tooltalk=no
+  fi
+fi
+if test "$with_tooltalk" != "no" ; then
+  for extra_libs in "" "-lI18N -lce" "-lcxx"; do
+    
+xe_msg_checking="for tt_message_create in -ltt"
+test -n "$extra_libs" && xe_msg_checking="$xe_msg_checking using extra libs $extra_libs"
+echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
+echo "configure:6082: checking "$xe_msg_checking"" >&5
+ac_lib_var=`echo tt'_'tt_message_create | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -ltt $extra_libs"
+cat > conftest.$ac_ext <<EOF
+#line 6087 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char tt_message_create();
+
+int main() {
+tt_message_create()
+; return 0; }
+EOF
+if { (eval echo configure:6098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  tt_libs="-ltt $extra_libs"; break
+else
+  echo "$ac_t""no" 1>&6
+:
+fi
+
+
+  done
+  if test -z "$tt_libs"; then
+    if test "$with_tooltalk" = "yes"; then
+      (echo "$progname: Usage error:"
+echo " " "Unable to find required tooltalk libraries."
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1
+    fi
+    with_tooltalk=no
+  fi
+fi
+test -z "$with_tooltalk" && with_tooltalk=yes
+if test "$with_tooltalk" = "yes"; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining TOOLTALK
+EOF
+cat >> confdefs.h <<\EOF
+#define TOOLTALK 1
+EOF
+}
+
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining TT_C_H_PATH = "$tt_c_h_path"
+EOF
+cat >> confdefs.h <<EOF
+#define TT_C_H_PATH "$tt_c_h_path"
+EOF
+}
+
+  libs_x="$tt_libs $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$tt_libs\" to \$libs_x"; fi
+  extra_objs="$extra_objs tooltalk.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"tooltalk.o\""
+ fi
+fi
+
+test -z "$with_cde" && { ac_safe=`echo "Dt/Dt.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for Dt/Dt.h""... $ac_c" 1>&6
+echo "configure:6155: checking for Dt/Dt.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6158 "configure"
+#include "confdefs.h"
+#include <Dt/Dt.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+with_cde=no
+fi
+ }
+test -z "$with_cde" && { 
+echo $ac_n "checking for DtDndDragStart in -lDtSvc""... $ac_c" 1>&6
+echo "configure:6186: checking for DtDndDragStart in -lDtSvc" >&5
+ac_lib_var=`echo DtSvc'_'DtDndDragStart | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lDtSvc "
+cat > conftest.$ac_ext <<EOF
+#line 6191 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char DtDndDragStart();
+
+int main() {
+DtDndDragStart()
+; return 0; }
+EOF
+if { (eval echo configure:6202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+with_cde=no
+fi
+
+ }
+test -z "$with_cde" && with_cde=yes
+if test "$with_dragndrop" = no; then
+  echo "configure: warning: No CDE without generic Drag'n'Drop support" 1>&2
+  with_cde=no
+fi
+if test "$with_cde" = "yes" ; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_CDE
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_CDE 1
+EOF
+}
+
+  libs_x="-lDtSvc $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lDtSvc\" to \$libs_x"; fi
+  dragndrop_proto="$dragndrop_proto CDE" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"CDE\" to \$dragndrop_proto"; fi
+  with_tooltalk=yes # CDE requires Tooltalk
+  need_motif=yes    # CDE requires Motif
+fi
+
+test "$window_system" != "x11" && with_offix=no
+if test "$with_xmu" != yes -a "$with_x11" = yes; then
+  echo "configure: warning: No OffiX without real Xmu support" 1>&2
+  with_offix=no
+fi
+if test "$with_dragndrop" = no; then
+  echo "configure: warning: No OffiX without generic Drag'n'Drop support" 1>&2
+  with_offix=no
+fi
+if test "$with_cde" = yes; then
+  echo "configure: warning: CDE already found, disabling OffiX support" 1>&2
+  with_offix=no
+fi
+test -z "$with_offix" && with_offix=no
+if test "$with_offix" = "yes"; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_OFFIX_DND
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_OFFIX_DND 1
+EOF
+}
+
+  dnd_objs="$dnd_objs offix.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"offix.o\" to \$dnd_objs"; fi
+  dragndrop_proto="$dragndrop_proto OffiX" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"OffiX\" to \$dragndrop_proto"; fi
+fi
+
+echo $ac_n "checking if drag and drop API is needed""... $ac_c" 1>&6
+echo "configure:6271: checking if drag and drop API is needed" >&5
+if test "$with_dragndrop" != "no" ; then
+  if test -n "$dragndrop_proto" ; then
+    with_dragndrop=yes
+    echo "$ac_t""yes (${dragndrop_proto} )" 1>&6
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_DRAGNDROP
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_DRAGNDROP 1
+EOF
+}
+
+    extra_objs="$extra_objs dragdrop.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"dragdrop.o\" to \$extra_objs"; fi
+  else
+    with_dragndrop=no
+    echo "$ac_t""no" 1>&6
+  fi
+fi
+
+echo "checking for LDAP" 1>&6
+echo "configure:6292: checking for LDAP" >&5
+test -z "$with_ldap" && { ac_safe=`echo "ldap.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for ldap.h""... $ac_c" 1>&6
+echo "configure:6295: checking for ldap.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6298 "configure"
+#include "confdefs.h"
+#include <ldap.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+with_ldap=no
+fi
+ }
+test -z "$with_ldap" && { ac_safe=`echo "lber.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for lber.h""... $ac_c" 1>&6
+echo "configure:6326: checking for lber.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6329 "configure"
+#include "confdefs.h"
+#include <lber.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6334: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+with_ldap=no
+fi
+ }
+if test "$with_ldap" != "no"; then
+  test -z "$with_umich_ldap" && { 
+xe_msg_checking="for ldap_open in -lldap"
+test -n "-llber" && xe_msg_checking="$xe_msg_checking using extra libs -llber"
+echo $ac_n "checking "$xe_msg_checking"""... $ac_c" 1>&6
+echo "configure:6360: checking "$xe_msg_checking"" >&5
+ac_lib_var=`echo ldap'_'ldap_open | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lldap -llber"
+cat > conftest.$ac_ext <<EOF
+#line 6365 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char ldap_open();
+
+int main() {
+ldap_open()
+; return 0; }
+EOF
+if { (eval echo configure:6376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  with_umich_ldap=yes
+else
+  echo "$ac_t""no" 1>&6
+with_umich_ldap=no
+fi
+
+ }
+  test "$with_umich_ldap" = "no" && { 
+echo $ac_n "checking for ldap_set_option in -lldap10""... $ac_c" 1>&6
+echo "configure:6399: checking for ldap_set_option in -lldap10" >&5
+ac_lib_var=`echo ldap10'_'ldap_set_option | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lldap10 "
+cat > conftest.$ac_ext <<EOF
+#line 6404 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char ldap_set_option();
+
+int main() {
+ldap_set_option()
+; return 0; }
+EOF
+if { (eval echo configure:6415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  with_ns_ldap=yes
+else
+  echo "$ac_t""no" 1>&6
+with_ns_ldap=no
+fi
+
+ }
+  test -z "$with_ldap" -a \( "$with_umich_ldap" = "yes" -o "$with_ns_ldap" = "yes" \) && with_ldap=yes
+fi
+if test "$with_ldap" = "yes"; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_LDAP
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_LDAP 1
+EOF
+}
+
+  extra_objs="$extra_objs eldap.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"eldap.o\""
+ fi
+  if test "$with_umich_ldap" = "yes" ; then
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_UMICH_LDAP
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_UMICH_LDAP 1
+EOF
+}
+
+    LIBS="-llber $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-llber\" to \$LIBS"; fi
+    LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
+  elif test "$with_ldap" = "yes" -a "$with_ns_ldap" = "yes" ; then
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_NS_LDAP
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_NS_LDAP 1
+EOF
+}
+
+    LIBS="-lldap10 $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap10\" to \$LIBS"; fi
+  elif test "$with_ldap" = "yes" ; then
+    LIBS="-lldap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lldap\" to \$LIBS"; fi
+  fi
+fi
+
+
+if test "$window_system" != "none"; then
+  echo "checking for graphics libraries" 1>&6
+echo "configure:6479: checking for graphics libraries" >&5
+
+    if test -z "$with_xpm"; then
+    echo $ac_n "checking for Xpm - no older than 3.4f""... $ac_c" 1>&6
+echo "configure:6483: checking for Xpm - no older than 3.4f" >&5
+    xe_check_libs=-lXpm
+    cat > conftest.$ac_ext <<EOF
+#line 6486 "configure"
+#include "confdefs.h"
+#include <X11/xpm.h>
+    int main(int c, char **v) {
+    return c == 1 ? 0 :
+      XpmIncludeVersion != XpmLibraryVersion() ? 1 :
+      XpmIncludeVersion < 30406 ? 2 : 0 ;}
+EOF
+if { (eval echo configure:6494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+then
+  ./conftest dummy_arg; xpm_status=$?;
+      if test "$?" = "0"; then
+        with_xpm=yes;
+      else
+        with_xpm=no;
+        if test "$?" = "1"; then
+          xpm_problem="Xpm library version and header file version don't match!"
+        elif test "$?" = "2"; then
+          xpm_problem="Xpm library version is too old!"
+        else
+          xpm_problem="Internal xpm detection logic error!"
+        fi
+        echo "
+*** WARNING *** $problem
+  I'm not touching that with a 10-foot pole!
+  If you really want to use the installed version of Xpm, rerun
+  configure --with-xpm=yes, but don't blame me if XEmacs crashes!"
+    fi
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  with_xpm=no
+fi
+rm -fr conftest*
+    xe_check_libs=
+    echo "$ac_t""$with_xpm" 1>&6
+  fi
+  if test "$with_xpm" = "yes"; then
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_XPM
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_XPM 1
+EOF
+}
+
+    libs_x="-lXpm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXpm\" to \$libs_x"; fi
+    echo $ac_n "checking for \"FOR_MSW\" xpm""... $ac_c" 1>&6
+echo "configure:6535: checking for \"FOR_MSW\" xpm" >&5
+    xe_check_libs=-lXpm
+    cat > conftest.$ac_ext <<EOF
+#line 6538 "configure"
+#include "confdefs.h"
+
+int main() {
+XpmCreatePixmapFromData()
+; return 0; }
+EOF
+if { (eval echo configure:6545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  xpm_for_msw=no
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  xpm_for_msw=yes
+fi
+rm -f conftest*
+    xe_check_libs=
+    echo "$ac_t""$xpm_for_msw" 1>&6
+    if test "$xpm_for_msw" = "yes"; then
+      { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining FOR_MSW
+EOF
+cat >> confdefs.h <<\EOF
+#define FOR_MSW 1
+EOF
+}
+
+    fi
+  fi
+
+      if test "$with_png $with_tiff" != "no no"; then
+    
+echo $ac_n "checking for inflate in -lc""... $ac_c" 1>&6
+echo "configure:6572: checking for inflate in -lc" >&5
+ac_lib_var=`echo c'_'inflate | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lc "
+cat > conftest.$ac_ext <<EOF
+#line 6577 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char inflate();
+
+int main() {
+inflate()
+; return 0; }
+EOF
+if { (eval echo configure:6588: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+
+echo $ac_n "checking for inflate in -lz""... $ac_c" 1>&6
+echo "configure:6607: checking for inflate in -lz" >&5
+ac_lib_var=`echo z'_'inflate | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lz "
+cat > conftest.$ac_ext <<EOF
+#line 6612 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char inflate();
+
+int main() {
+inflate()
+; return 0; }
+EOF
+if { (eval echo configure:6623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  libs_x="-lz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lz\" to \$libs_x"; fi
+else
+  echo "$ac_t""no" 1>&6
+
+echo $ac_n "checking for inflate in -lgz""... $ac_c" 1>&6
+echo "configure:6642: checking for inflate in -lgz" >&5
+ac_lib_var=`echo gz'_'inflate | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lgz "
+cat > conftest.$ac_ext <<EOF
+#line 6647 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char inflate();
+
+int main() {
+inflate()
+; return 0; }
+EOF
+if { (eval echo configure:6658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  libs_x="-lgz $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgz\" to \$libs_x"; fi
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+fi
+
+
+fi
+
+
+  fi
+
+    echo $ac_n "checking for gifreader""... $ac_c" 1>&6
+echo "configure:6687: checking for gifreader" >&5
+  test -z "$with_gif" && { ac_safe=`echo "gifrlib.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for gifrlib.h""... $ac_c" 1>&6
+echo "configure:6690: checking for gifrlib.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6693 "configure"
+#include "confdefs.h"
+#include <gifrlib.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6698: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+with_gif=no
+fi
+ }
+  test -z "$with_gif" && { 
+echo $ac_n "checking for GetGifError in -lgifreader""... $ac_c" 1>&6
+echo "configure:6721: checking for GetGifError in -lgifreader" >&5
+ac_lib_var=`echo gifreader'_'GetGifError | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lgifreader "
+cat > conftest.$ac_ext <<EOF
+#line 6726 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char GetGifError();
+
+int main() {
+GetGifError()
+; return 0; }
+EOF
+if { (eval echo configure:6737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  : 
+else
+  echo "$ac_t""no" 1>&6
+with_gif=no
+fi
+
+ }
+  test -z "$with_gif" && with_gif=yes
+  if test "$with_gif" = "yes"; then
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_GIF
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_GIF 1
+EOF
+}
+
+    libs_x="-lgifreader $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgifreader\" to \$libs_x"; fi
+  fi
+
+    test -z "$with_jpeg" && { ac_safe=`echo "jpeglib.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for jpeglib.h""... $ac_c" 1>&6
+echo "configure:6773: checking for jpeglib.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6776 "configure"
+#include "confdefs.h"
+#include <jpeglib.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6781: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+with_jpeg=no
+fi
+ }
+  test -z "$with_jpeg" && { 
+echo $ac_n "checking for jpeg_destroy_decompress in -ljpeg""... $ac_c" 1>&6
+echo "configure:6804: checking for jpeg_destroy_decompress in -ljpeg" >&5
+ac_lib_var=`echo jpeg'_'jpeg_destroy_decompress | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -ljpeg "
+cat > conftest.$ac_ext <<EOF
+#line 6809 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char jpeg_destroy_decompress();
+
+int main() {
+jpeg_destroy_decompress()
+; return 0; }
+EOF
+if { (eval echo configure:6820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+with_jpeg=no
+fi
+
+ }
+  test -z "$with_jpeg" && with_jpeg=yes
+  if test "$with_jpeg" = "yes"; then
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_JPEG
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_JPEG 1
+EOF
+}
+
+    libs_x="-ljpeg $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ljpeg\" to \$libs_x"; fi
+  fi
+
+    if test -z "$with_png"; then
+    echo $ac_n "checking for png.h - no older than 0.96""... $ac_c" 1>&6
+echo "configure:6856: checking for png.h - no older than 0.96" >&5
+    cat > conftest.$ac_ext <<EOF
+#line 6858 "configure"
+#include "confdefs.h"
+#include <png.h>
+#if PNG_LIBPNG_VER >= 96
+yes
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "yes" >/dev/null 2>&1; then
+  rm -rf conftest*
+  echo "$ac_t""yes" 1>&6
+else
+  rm -rf conftest*
+  echo "$ac_t""no" 1>&6; with_png=no
+fi
+rm -f conftest*
+
+  fi
+  test -z "$with_png" && { echo $ac_n "checking for pow""... $ac_c" 1>&6
+echo "configure:6878: checking for pow" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6881 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char pow(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char pow();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_pow) || defined (__stub___pow)
+choke me
+#else
+pow();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_pow=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_pow=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'pow`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+with_png=no
+fi
+ }
+  test -z "$with_png" && { 
+echo $ac_n "checking for png_read_image in -lpng""... $ac_c" 1>&6
+echo "configure:6925: checking for png_read_image in -lpng" >&5
+ac_lib_var=`echo png'_'png_read_image | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lpng "
+cat > conftest.$ac_ext <<EOF
+#line 6930 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char png_read_image();
+
+int main() {
+png_read_image()
+; return 0; }
+EOF
+if { (eval echo configure:6941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+with_png=no
+fi
+
+ }
+  test -z "$with_png" && with_png=yes
+  if test "$with_png" = "yes"; then
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_PNG
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_PNG 1
+EOF
+}
+
+    libs_x="-lpng $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lpng\" to \$libs_x"; fi
+  fi
+
+    test -z "$with_tiff" && { ac_safe=`echo "tiffio.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for tiffio.h""... $ac_c" 1>&6
+echo "configure:6977: checking for tiffio.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 6980 "configure"
+#include "confdefs.h"
+#include <tiffio.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+with_tiff=no
+fi
+ }
+  test -z "$with_tiff" && { 
+echo $ac_n "checking for TIFFClientOpen in -ltiff""... $ac_c" 1>&6
+echo "configure:7008: checking for TIFFClientOpen in -ltiff" >&5
+ac_lib_var=`echo tiff'_'TIFFClientOpen | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -ltiff "
+cat > conftest.$ac_ext <<EOF
+#line 7013 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char TIFFClientOpen();
+
+int main() {
+TIFFClientOpen()
+; return 0; }
+EOF
+if { (eval echo configure:7024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+with_tiff=no
+fi
+
+ }
+  test -z "$with_tiff" && with_tiff=yes
+  if test "$with_tiff" = "yes"; then
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_TIFF
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_TIFF 1
+EOF
+}
+
+    libs_x="-ltiff $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltiff\" to \$libs_x"; fi
+  fi
+fi
+
+
+if test "$with_x11" = "yes"; then
+
+  echo "checking for X11 graphics libraries" 1>&6
+echo "configure:7063: checking for X11 graphics libraries" >&5
+
+    test -z "$with_xface" && { ac_safe=`echo "compface.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for compface.h""... $ac_c" 1>&6
+echo "configure:7067: checking for compface.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7070 "configure"
+#include "confdefs.h"
+#include <compface.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+with_xface=no
+fi
+ }
+  test -z "$with_xface" && { 
+echo $ac_n "checking for UnGenFace in -lcompface""... $ac_c" 1>&6
+echo "configure:7098: checking for UnGenFace in -lcompface" >&5
+ac_lib_var=`echo compface'_'UnGenFace | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lcompface "
+cat > conftest.$ac_ext <<EOF
+#line 7103 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char UnGenFace();
+
+int main() {
+UnGenFace()
+; return 0; }
+EOF
+if { (eval echo configure:7114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  : 
+else
+  echo "$ac_t""no" 1>&6
+with_xface=no
+fi
+
+ }
+  test -z "$with_xface" && with_xface=yes
+  if test "$with_xface" = "yes"; then
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_XFACE
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_XFACE 1
+EOF
+}
+
+    libs_x="-lcompface $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcompface\" to \$libs_x"; fi
+  fi
+
+    
+echo $ac_n "checking for XawScrollbarSetThumb in -lXaw""... $ac_c" 1>&6
+echo "configure:7150: checking for XawScrollbarSetThumb in -lXaw" >&5
+ac_lib_var=`echo Xaw'_'XawScrollbarSetThumb | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lXaw "
+cat > conftest.$ac_ext <<EOF
+#line 7155 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char XawScrollbarSetThumb();
+
+int main() {
+XawScrollbarSetThumb()
+; return 0; }
+EOF
+if { (eval echo configure:7166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  have_xaw=yes
+else
+  echo "$ac_t""no" 1>&6
+have_xaw=no
+fi
+
+
+                    
+    ac_safe=`echo "Xm/Xm.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for Xm/Xm.h""... $ac_c" 1>&6
+echo "configure:7190: checking for Xm/Xm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7193 "configure"
+#include "confdefs.h"
+#include <Xm/Xm.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7198: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+echo $ac_n "checking for XmStringFree in -lXm""... $ac_c" 1>&6
+echo "configure:7215: checking for XmStringFree in -lXm" >&5
+ac_lib_var=`echo Xm'_'XmStringFree | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lXm "
+cat > conftest.$ac_ext <<EOF
+#line 7220 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char XmStringFree();
+
+int main() {
+XmStringFree()
+; return 0; }
+EOF
+if { (eval echo configure:7231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  have_motif=yes
+else
+  echo "$ac_t""no" 1>&6
+have_motif=no
+fi
+
+
+else
+  echo "$ac_t""no" 1>&6
+have_motif=no
+fi
+
+
+  if test "$have_motif" = "yes"; then
+        echo $ac_n "checking for Lesstif""... $ac_c" 1>&6
+echo "configure:7260: checking for Lesstif" >&5
+    cat > conftest.$ac_ext <<EOF
+#line 7262 "configure"
+#include "confdefs.h"
+#include <Xm/Xm.h>
+#ifdef LESSTIF_VERSION
+yes
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "yes" >/dev/null 2>&1; then
+  rm -rf conftest*
+  have_lesstif=yes
+else
+  rm -rf conftest*
+  have_lesstif=no
+fi
+rm -f conftest*
+
+  echo "$ac_t""$have_lesstif" 1>&6
+  fi
+
+fi 
+
+case "$with_menubars" in "" | "yes" | "athena" | "athena3d" )
+  with_menubars="lucid" ;;
+esac
+case "$with_dialogs" in "" | "yes" | "lucid" )
+  if   test "$have_motif" = "yes"; then with_dialogs="motif"
+  elif test "$have_xaw"   = "yes"; then with_dialogs="athena"
+  else with_dialogs=no
+  fi ;;
+esac
+case "$with_scrollbars" in "" | "yes" )
+  with_scrollbars="lucid" ;;
+esac
+
+all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars"
+
+case "$all_widgets" in *athena* )
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining LWLIB_USES_ATHENA
+EOF
+cat >> confdefs.h <<\EOF
+#define LWLIB_USES_ATHENA 1
+EOF
+}
+
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining NEED_ATHENA
+EOF
+cat >> confdefs.h <<\EOF
+#define NEED_ATHENA 1
+EOF
+}
+
+  lwlib_objs="$lwlib_objs lwlib-Xaw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xaw.o\" to \$lwlib_objs"; fi
+  libs_x="-lXaw $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXaw\" to \$libs_x"; fi ;;
+esac
+
+case "$all_widgets" in *motif* )
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining LWLIB_USES_MOTIF
+EOF
+cat >> confdefs.h <<\EOF
+#define LWLIB_USES_MOTIF 1
+EOF
+}
+
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining NEED_MOTIF
+EOF
+cat >> confdefs.h <<\EOF
+#define NEED_MOTIF 1
+EOF
+}
+
+  lwlib_objs="$lwlib_objs lwlib-Xm.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xm.o\" to \$lwlib_objs"; fi
+  need_motif=yes ;;
+esac
+
+test "$with_menubars"   = "lucid" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
+test "$with_menubars"   = "motif" && lwlib_objs="$lwlib_objs xlwmenu.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwmenu.o\" to \$lwlib_objs"; fi
+test "$with_scrollbars" = "lucid" && lwlib_objs="$lwlib_objs xlwscrollbar.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"xlwscrollbar.o\" to \$lwlib_objs"; fi
+case "$all_widgets" in *lucid* )
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining NEED_LUCID
+EOF
+cat >> confdefs.h <<\EOF
+#define NEED_LUCID 1
+EOF
+}
+
+  lwlib_objs="$lwlib_objs lwlib-Xlw.o" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"lwlib-Xlw.o\" to \$lwlib_objs"; fi ;;
+esac
+
+
+
+case "$with_scrollbars" in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining LWLIB_SCROLLBARS_ATHENA
+EOF
+cat >> confdefs.h <<\EOF
+#define LWLIB_SCROLLBARS_ATHENA 1
+EOF
+}
+;; esac
+case "$with_dialogs"    in athena* ) { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining LWLIB_DIALOGS_ATHENA
+EOF
+cat >> confdefs.h <<\EOF
+#define LWLIB_DIALOGS_ATHENA 1
+EOF
+}
+   ;; esac
+test "$with_scrollbars" = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining LWLIB_SCROLLBARS_ATHENA3D
+EOF
+cat >> confdefs.h <<\EOF
+#define LWLIB_SCROLLBARS_ATHENA3D 1
+EOF
+}
+
+test "$with_dialogs"    = "athena3d" && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining LWLIB_DIALOGS_ATHENA3D
+EOF
+cat >> confdefs.h <<\EOF
+#define LWLIB_DIALOGS_ATHENA3D 1
+EOF
+}
+
+
+test "$with_menubars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_MENUBARS
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_MENUBARS 1
+EOF
+}
+
+test "$with_scrollbars" != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_SCROLLBARS
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_SCROLLBARS 1
+EOF
+}
+
+test "$with_dialogs"    != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_DIALOGS
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_DIALOGS 1
+EOF
+}
+
+test "$with_toolbars"   != "no"    && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_TOOLBARS
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_TOOLBARS 1
+EOF
+}
+
+
+test "$with_menubars"   = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining LWLIB_MENUBARS_LUCID
+EOF
+cat >> confdefs.h <<\EOF
+#define LWLIB_MENUBARS_LUCID 1
+EOF
+}
+
+test "$with_scrollbars" = "lucid"  && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining LWLIB_SCROLLBARS_LUCID
+EOF
+cat >> confdefs.h <<\EOF
+#define LWLIB_SCROLLBARS_LUCID 1
+EOF
+}
+
+
+test "$with_menubars"   = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining LWLIB_MENUBARS_MOTIF
+EOF
+cat >> confdefs.h <<\EOF
+#define LWLIB_MENUBARS_MOTIF 1
+EOF
+}
+
+test "$with_scrollbars" = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining LWLIB_SCROLLBARS_MOTIF
+EOF
+cat >> confdefs.h <<\EOF
+#define LWLIB_SCROLLBARS_MOTIF 1
+EOF
+}
+
+test "$with_dialogs"    = "motif"  && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining LWLIB_DIALOGS_MOTIF
+EOF
+cat >> confdefs.h <<\EOF
+#define LWLIB_DIALOGS_MOTIF 1
+EOF
+}
+
+
+test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"menubar.o\""
+ fi
+test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"scrollbar.o\""
+ fi
+test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"dialog.o\""
+ fi
+test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"toolbar.o\""
+ fi
+test "$all_widgets" != "no no no no" && extra_objs="$extra_objs gui.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"gui.o\""
+ fi
+
+if test "$with_x11" = "yes"; then
+  test "$with_menubars"   != "no"      && extra_objs="$extra_objs menubar-x.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"menubar-x.o\""
+ fi
+  test "$with_scrollbars" != "no"      && extra_objs="$extra_objs scrollbar-x.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"scrollbar-x.o\""
+ fi
+  test "$with_dialogs"    != "no"      && extra_objs="$extra_objs dialog-x.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"dialog-x.o\""
+ fi
+  test "$with_toolbars"   != "no"      && extra_objs="$extra_objs toolbar-x.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"toolbar-x.o\""
+ fi
+  test "$all_widgets" != "no no no no" && extra_objs="$extra_objs gui-x.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"gui-x.o\""
+ fi
+else
+  if test \( "$with_sound" = "nas" \) -o \( "$with_sound" = "both" \); then
+    echo "Attempt to Build NAS sound without X"
+    echo "Please remove NAS configuration or build with X"
+    exit 1
+  fi
+fi
+
+test "$use_minimal_tagbits" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining USE_MINIMAL_TAGBITS
+EOF
+cat >> confdefs.h <<\EOF
+#define USE_MINIMAL_TAGBITS 1
+EOF
+}
+
+test "$use_indexed_lrecord_implementation" = "yes" && \
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining USE_INDEXED_LRECORD_IMPLEMENTATION
+EOF
+cat >> confdefs.h <<\EOF
+#define USE_INDEXED_LRECORD_IMPLEMENTATION 1
+EOF
+}
+
+
+
+test -z "$with_mule" && with_mule=no
+test -z "$with_file_coding" && with_file_coding=no
+
+
+if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining FILE_CODING
+EOF
+cat >> confdefs.h <<\EOF
+#define FILE_CODING 1
+EOF
+}
+
+  extra_objs="$extra_objs file-coding.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"file-coding.o\""
+ fi
+fi
+
+if test "$with_mule" = "yes" ; then
+  echo "checking for Mule-related features" 1>&6
+echo "configure:7546: checking for Mule-related features" >&5
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining MULE
+EOF
+cat >> confdefs.h <<\EOF
+#define MULE 1
+EOF
+}
+
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining FILE_CODING
+EOF
+cat >> confdefs.h <<\EOF
+#define FILE_CODING 1
+EOF
+}
+
+  extra_objs="$extra_objs mule.o mule-ccl.o mule-charset.o mule-coding.o file-coding.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"mule.o mule-ccl.o mule-charset.o mule-coding.o file-coding.o\""
+ fi
+
+    for ac_hdr in libintl.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:7571: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7574 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7579: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $ac_tr_hdr
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+}
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+  
+echo $ac_n "checking for strerror in -lintl""... $ac_c" 1>&6
+echo "configure:7610: checking for strerror in -lintl" >&5
+ac_lib_var=`echo intl'_'strerror | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lintl "
+cat > conftest.$ac_ext <<EOF
+#line 7615 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char strerror();
+
+int main() {
+strerror()
+; return 0; }
+EOF
+if { (eval echo configure:7626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $ac_tr_lib
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+}
+
+  LIBS="-lintl $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lintl\" to \$LIBS"; fi
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+
+  echo "checking for Mule input methods" 1>&6
+echo "configure:7659: checking for Mule input methods" >&5
+        case "$with_xim" in "" | "yes" )
+    echo "checking for XIM" 1>&6
+echo "configure:7662: checking for XIM" >&5
+        if test "$have_lesstif" = "yes"; then with_xim=xlib
+    else 
+echo $ac_n "checking for XmImMbLookupString in -lXm""... $ac_c" 1>&6
+echo "configure:7666: checking for XmImMbLookupString in -lXm" >&5
+ac_lib_var=`echo Xm'_'XmImMbLookupString | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lXm "
+cat > conftest.$ac_ext <<EOF
+#line 7671 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char XmImMbLookupString();
+
+int main() {
+XmImMbLookupString()
+; return 0; }
+EOF
+if { (eval echo configure:7682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  with_xim=motif
+else
+  echo "$ac_t""no" 1>&6
+with_xim=xlib
+fi
+
+
+    fi
+  esac
+  if test "$with_xim" != "no"; then
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_XIM
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_XIM 1
+EOF
+}
+
+    if test "$with_xim" = "xlib"; then
+      { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining XIM_XLIB
+EOF
+cat >> confdefs.h <<\EOF
+#define XIM_XLIB 1
+EOF
+}
+
+      extra_objs="$extra_objs input-method-xlib.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"input-method-xlib.o\""
+ fi
+    fi
+    if test "$with_xim" = "motif"; then
+      { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining XIM_MOTIF
+EOF
+cat >> confdefs.h <<\EOF
+#define XIM_MOTIF 1
+EOF
+}
+
+      need_motif=yes
+      extra_objs="$extra_objs input-method-motif.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"input-method-motif.o\""
+ fi
+    fi
+    if test "$with_xim" = "motif"; then
+      with_xfs=no
+    fi
+  fi
+
+    if test "$with_xfs" = "yes" ; then
+    echo "checking for XFontSet" 1>&6
+echo "configure:7748: checking for XFontSet" >&5
+    
+echo $ac_n "checking for XmbDrawString in -lX11""... $ac_c" 1>&6
+echo "configure:7751: checking for XmbDrawString in -lX11" >&5
+ac_lib_var=`echo X11'_'XmbDrawString | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lX11 "
+cat > conftest.$ac_ext <<EOF
+#line 7756 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char XmbDrawString();
+
+int main() {
+XmbDrawString()
+; return 0; }
+EOF
+if { (eval echo configure:7767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+with_xfs=no
+fi
+
+
+    if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
+      { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining USE_XFONTSET
+EOF
+cat >> confdefs.h <<\EOF
+#define USE_XFONTSET 1
+EOF
+}
+
+      if test "$with_xim" = "no" ; then
+        extra_objs="$extra_objs input-method-xfs.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"input-method-xfs.o\""
+ fi
+      fi
+    fi
+  fi 
+    test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
+  test -z "$with_wnn" && { ac_safe=`echo "wnn/jllib.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for wnn/jllib.h""... $ac_c" 1>&6
+echo "configure:7807: checking for wnn/jllib.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7810 "configure"
+#include "confdefs.h"
+#include <wnn/jllib.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+with_wnn=no
+fi
+ }
+    if test "$with_wnn" != "no"; then
+    for ac_func in crypt
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:7840: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 7843 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:7866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $ac_tr_func
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+}
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+    test "$ac_cv_func_crypt" != "yes" && { 
+echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
+echo "configure:7895: checking for crypt in -lcrypt" >&5
+ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lcrypt "
+cat > conftest.$ac_ext <<EOF
+#line 7900 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char crypt();
+
+int main() {
+crypt()
+; return 0; }
+EOF
+if { (eval echo configure:7911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $ac_tr_lib
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+}
+
+  LIBS="-lcrypt $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcrypt\" to \$LIBS"; fi
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+ }
+  fi
+    test -z "$with_wnn" && { 
+echo $ac_n "checking for jl_dic_list_e in -lwnn""... $ac_c" 1>&6
+echo "configure:7945: checking for jl_dic_list_e in -lwnn" >&5
+ac_lib_var=`echo wnn'_'jl_dic_list_e | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lwnn "
+cat > conftest.$ac_ext <<EOF
+#line 7950 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char jl_dic_list_e();
+
+int main() {
+jl_dic_list_e()
+; return 0; }
+EOF
+if { (eval echo configure:7961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+with_wnn=no
+fi
+
+ }
+  test -z "$with_wnn" && with_wnn=yes
+  if test "$with_wnn" = "yes"; then
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_WNN
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_WNN 1
+EOF
+}
+
+    libs_x="-lwnn $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lwnn\" to \$libs_x"; fi
+    extra_objs="$extra_objs mule-wnnfns.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"mule-wnnfns.o\""
+ fi
+    if test "$with_wnn6" != "no"; then
+      
+echo $ac_n "checking for jl_fi_dic_list in -lwnn""... $ac_c" 1>&6
+echo "configure:7999: checking for jl_fi_dic_list in -lwnn" >&5
+ac_lib_var=`echo wnn'_'jl_fi_dic_list | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lwnn "
+cat > conftest.$ac_ext <<EOF
+#line 8004 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char jl_fi_dic_list();
+
+int main() {
+jl_fi_dic_list()
+; return 0; }
+EOF
+if { (eval echo configure:8015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  with_wnn6=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+      test "$with_wnn6" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining WNN6
+EOF
+cat >> confdefs.h <<\EOF
+#define WNN6 1
+EOF
+}
+
+    fi
+  fi
+
+    canna_includes_found=no
+  if test "$with_canna" != "no"; then
+    ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
+echo "configure:8050: checking for canna/jrkanji.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8053 "configure"
+#include "confdefs.h"
+#include <canna/jrkanji.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:8058: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  canna_includes_found=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  fi
+  if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
+      -d "/usr/local/canna/include"; then
+    save_c_switch_site="$c_switch_site"
+    c_switch_site="$c_switch_site -I/usr/local/canna/include"
+    ac_safe=`echo "canna/jrkanji.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for canna/jrkanji.h""... $ac_c" 1>&6
+echo "configure:8085: checking for canna/jrkanji.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8088 "configure"
+#include "confdefs.h"
+#include <canna/jrkanji.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:8093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  canna_includes_found=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    if test "$canna_includes_found" != "yes"; then
+      c_switch_site="$save_c_switch_site"
+      with_canna="no"
+    fi
+  fi
+
+  test -z "$with_canna" && { ac_safe=`echo "canna/RK.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for canna/RK.h""... $ac_c" 1>&6
+echo "configure:8121: checking for canna/RK.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8124 "configure"
+#include "confdefs.h"
+#include <canna/RK.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:8129: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+with_canna=no
+fi
+ }
+  test -z "$with_canna" && { 
+echo $ac_n "checking for RkBgnBun in -lRKC""... $ac_c" 1>&6
+echo "configure:8152: checking for RkBgnBun in -lRKC" >&5
+ac_lib_var=`echo RKC'_'RkBgnBun | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lRKC "
+cat > conftest.$ac_ext <<EOF
+#line 8157 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char RkBgnBun();
+
+int main() {
+RkBgnBun()
+; return 0; }
+EOF
+if { (eval echo configure:8168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+with_canna=no
+fi
+
+ }
+  test -z "$with_canna" && { 
+echo $ac_n "checking for jrKanjiControl in -lcanna""... $ac_c" 1>&6
+echo "configure:8191: checking for jrKanjiControl in -lcanna" >&5
+ac_lib_var=`echo canna'_'jrKanjiControl | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lcanna "
+cat > conftest.$ac_ext <<EOF
+#line 8196 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char jrKanjiControl();
+
+int main() {
+jrKanjiControl()
+; return 0; }
+EOF
+if { (eval echo configure:8207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+with_canna=no
+fi
+
+ }
+  test -z "$with_canna" && with_canna=yes
+  if test "$with_canna" = "yes"; then
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_CANNA
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_CANNA 1
+EOF
+}
+
+    libs_x="-lcanna -lRKC $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcanna -lRKC\" to \$libs_x"; fi
+    extra_objs="$extra_objs mule-canna.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"mule-canna.o\""
+ fi
+  fi
+
+else   for feature in xim canna wnn; do
+    if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
+      echo "configure: warning: "--with-${feature} ignored:  Not valid without Mule support"" 1>&2
+    fi
+    eval "with_${feature}=no"
+  done
+fi 
+
+if test "$need_motif" = "yes" ; then
+  libs_x="-lXm $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lXm\" to \$libs_x"; fi
+    
+echo $ac_n "checking for layout_object_getvalue in -li18n""... $ac_c" 1>&6
+echo "configure:8256: checking for layout_object_getvalue in -li18n" >&5
+ac_lib_var=`echo i18n'_'layout_object_getvalue | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -li18n "
+cat > conftest.$ac_ext <<EOF
+#line 8261 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char layout_object_getvalue();
+
+int main() {
+layout_object_getvalue()
+; return 0; }
+EOF
+if { (eval echo configure:8272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  libs_x="-li18n $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-li18n\" to \$libs_x"; fi
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+  
+if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
+    ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
+  ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[^ ]*//g"`
+  
+        runpath="" runpath_dirs=""
+  if test -n "$LD_RUN_PATH"; then
+    runpath="$LD_RUN_PATH"
+  elif test "$GCC" = "yes"; then
+        ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
+    echo "int main(int argc, char *argv[]) {return 0;}" > conftest.c
+    xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
+    for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
+      case "$arg" in P,* | -L* | -R* )
+        for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
+          {
+xe_runpath_dir="$dir"
+  test "$xe_runpath_dir" != "/lib"     -a \
+       "$xe_runpath_dir" != "/usr/lib" -a \
+       -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
+  eval "$xe_add_unique_runpath_dir"
+}
+        done ;;
+      esac
+    done
+    ld_switch_run="$ld_switch_run_save"
+    rm -f conftest*
+  else
+        for arg in $ld_switch_site $ld_switch_x_site; do
+      case "$arg" in -L*) {
+xe_runpath_dir=`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`
+  test "$xe_runpath_dir" != "/lib"     -a \
+       "$xe_runpath_dir" != "/usr/lib" -a \
+       -n "`ls ${xe_runpath_dir}/*.s[ol] 2>/dev/null`" && \
+  eval "$xe_add_unique_runpath_dir"
+};; esac
+    done
+        if test "$opsys $need_motif" = "sol2 yes"; then
+      xe_runpath_dir="/opt/SUNWdt/lib";
+      eval "$xe_add_unique_runpath_dir";
+    fi
+  fi 
+  if test -n "$runpath"; then
+    ld_switch_run="${dash_r}${runpath}"
+    
+if test "$GCC" = "yes"; then
+  set x $ld_switch_run; shift; ld_switch_run=""
+  while test -n "$1"; do
+    case $1 in
+      -L  | -l  | -u         ) ld_switch_run="$ld_switch_run $1 $2"; shift ;;
+      -L* | -l* | -u* | -Wl* ) ld_switch_run="$ld_switch_run $1" ;;
+      -Xlinker* ) ;;
+      * ) ld_switch_run="$ld_switch_run -Xlinker $1" ;;
+    esac
+    shift
+  done
+fi
+    test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
+  fi
+fi
+
+fi
+
+for ac_func in cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:8358: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8361 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:8384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $ac_tr_func
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+}
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+
+
+case "$opsys" in
+  linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"realpath.o\""
+ fi ;;
+  * )
+    for ac_func in realpath
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:8421: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8424 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:8447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $ac_tr_func
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+}
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+    test "$ac_cv_func_realpath" != "yes" && extra_objs="$extra_objs realpath.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"realpath.o\""
+ fi ;;
+esac
+
+echo $ac_n "checking whether netdb declares h_errno""... $ac_c" 1>&6
+echo "configure:8480: checking whether netdb declares h_errno" >&5
+cat > conftest.$ac_ext <<EOF
+#line 8482 "configure"
+#include "confdefs.h"
+#include <netdb.h>
+int main() {
+return h_errno;
+; return 0; }
+EOF
+if { (eval echo configure:8489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  echo "$ac_t""yes" 1>&6
+   { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_H_ERRNO
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_H_ERRNO 1
+EOF
+}
+
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  echo "$ac_t""no" 1>&6
+fi
+rm -f conftest*
+
+echo $ac_n "checking for sigsetjmp""... $ac_c" 1>&6
+echo "configure:8509: checking for sigsetjmp" >&5
+cat > conftest.$ac_ext <<EOF
+#line 8511 "configure"
+#include "confdefs.h"
+#include <setjmp.h>
+int main() {
+sigjmp_buf bar; sigsetjmp (bar, 0);
+; return 0; }
+EOF
+if { (eval echo configure:8518: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  echo "$ac_t""yes" 1>&6
+   { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_SIGSETJMP
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_SIGSETJMP 1
+EOF
+}
+
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  echo "$ac_t""no" 1>&6
+fi
+rm -f conftest*
+
+echo $ac_n "checking whether localtime caches TZ""... $ac_c" 1>&6
+echo "configure:8538: checking whether localtime caches TZ" >&5
+
+if test "$ac_cv_func_tzset" = "yes"; then
+cat > conftest.$ac_ext <<EOF
+#line 8542 "configure"
+#include "confdefs.h"
+#include <time.h>
+#if STDC_HEADERS
+# include <stdlib.h>
+#endif
+extern char **environ;
+unset_TZ ()
+{
+  char **from, **to;
+  for (to = from = environ; (*to = *from); from++)
+    if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
+      to++;
+}
+char TZ_GMT0[] = "TZ=GMT0";
+char TZ_PST8[] = "TZ=PST8";
+main()
+{
+  time_t now = time ((time_t *) 0);
+  int hour_GMT0, hour_unset;
+  if (putenv (TZ_GMT0) != 0)
+    exit (1);
+  hour_GMT0 = localtime (&now)->tm_hour;
+  unset_TZ ();
+  hour_unset = localtime (&now)->tm_hour;
+  if (putenv (TZ_PST8) != 0)
+    exit (1);
+  if (localtime (&now)->tm_hour == hour_GMT0)
+    exit (1);
+  unset_TZ ();
+  if (localtime (&now)->tm_hour != hour_unset)
+    exit (1);
+  exit (0);
+}
+EOF
+if { (eval echo configure:8577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+then
+  emacs_cv_localtime_cache=no
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  emacs_cv_localtime_cache=yes
+fi
+rm -fr conftest*
+else
+       # If we lack tzset, report that localtime does not cache TZ,
+       # since we can't invalidate the cache if we don't have tzset.
+       emacs_cv_localtime_cache=no
+fi
+echo "$ac_t""$emacs_cv_localtime_cache" 1>&6
+if test $emacs_cv_localtime_cache = yes; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining LOCALTIME_CACHE
+EOF
+cat >> confdefs.h <<\EOF
+#define LOCALTIME_CACHE 1
+EOF
+}
+
+fi
+
+if test "$HAVE_TIMEVAL" = "yes"; then
+echo $ac_n "checking whether gettimeofday accepts one or two arguments""... $ac_c" 1>&6
+echo "configure:8606: checking whether gettimeofday accepts one or two arguments" >&5
+cat > conftest.$ac_ext <<EOF
+#line 8608 "configure"
+#include "confdefs.h"
+
+#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
+  
+int main() {
+
+  struct timeval time;
+  struct timezone dummy;
+  gettimeofday (&time, &dummy);
+
+; return 0; }
+EOF
+if { (eval echo configure:8630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  echo "$ac_t""two" 1>&6
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  echo "$ac_t""one" 1>&6
+   { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining GETTIMEOFDAY_ONE_ARGUMENT
+EOF
+cat >> confdefs.h <<\EOF
+#define GETTIMEOFDAY_ONE_ARGUMENT 1
+EOF
+}
+
+fi
+rm -f conftest*
+fi
+
+
+echo $ac_n "checking for inline""... $ac_c" 1>&6
+echo "configure:8652: checking for inline" >&5
+
+ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+  cat > conftest.$ac_ext <<EOF
+#line 8657 "configure"
+#include "confdefs.h"
+
+int main() {
+} $ac_kw foo() {
+; return 0; }
+EOF
+if { (eval echo configure:8664: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_c_inline=$ac_kw; break
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+done
+
+
+echo "$ac_t""$ac_cv_c_inline" 1>&6
+case "$ac_cv_c_inline" in
+  inline | yes) ;;
+  no) { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining inline = 
+EOF
+cat >> confdefs.h <<\EOF
+#define inline 
+EOF
+}
+ ;;
+  *)  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining inline = $ac_cv_c_inline
+EOF
+cat >> confdefs.h <<EOF
+#define inline $ac_cv_c_inline
+EOF
+}
+ ;;
+esac
+
+if test "$ac_cv_c_inline" != "no"; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_INLINE
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_INLINE 1
+EOF
+}
+
+  test "$GCC" = "yes" && extra_objs="$extra_objs inline.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"inline.o\""
+ fi
+fi
+
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments.  Useless!
+echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
+echo "configure:8714: checking for working alloca.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8717 "configure"
+#include "confdefs.h"
+#include <alloca.h>
+int main() {
+char *p = alloca(2 * sizeof(int));
+; return 0; }
+EOF
+if { (eval echo configure:8724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  ac_cv_header_alloca_h=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_header_alloca_h=no
+fi
+rm -f conftest*
+
+echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
+if test $ac_cv_header_alloca_h = yes; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_ALLOCA_H
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA_H 1
+EOF
+}
+
+fi
+
+echo $ac_n "checking for alloca""... $ac_c" 1>&6
+echo "configure:8748: checking for alloca" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8751 "configure"
+#include "confdefs.h"
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# if HAVE_ALLOCA_H
+#  include <alloca.h>
+# else
+#  ifdef _AIX
+ #pragma alloca
+#  else
+#   ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+#   endif
+#  endif
+# endif
+#endif
+
+int main() {
+char *p = (char *) alloca(1);
+; return 0; }
+EOF
+if { (eval echo configure:8774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  ac_cv_func_alloca_works=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_func_alloca_works=no
+fi
+rm -f conftest*
+
+echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
+if test $ac_cv_func_alloca_works = yes; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_ALLOCA
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_ALLOCA 1
+EOF
+}
+
+fi
+
+if test $ac_cv_func_alloca_works = no; then
+  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+  # that cause trouble.  Some versions do not even contain alloca or
+  # contain a buggy version.  If you still want to use their alloca,
+  # use ar to extract alloca.o from them instead of compiling alloca.c.
+  ALLOCA=alloca.o
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining C_ALLOCA
+EOF
+cat >> confdefs.h <<\EOF
+#define C_ALLOCA 1
+EOF
+}
+
+
+echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
+echo "configure:8813: checking whether alloca needs Cray hooks" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8816 "configure"
+#include "confdefs.h"
+#if defined(CRAY) && ! defined(CRAY2)
+webecray
+#else
+wenotbecray
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "webecray" >/dev/null 2>&1; then
+  rm -rf conftest*
+  ac_cv_os_cray=yes
+else
+  rm -rf conftest*
+  ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+
+echo "$ac_t""$ac_cv_os_cray" 1>&6
+if test $ac_cv_os_cray = yes; then
+for ac_func in _getb67 GETB67 getb67; do
+  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:8840: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8843 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:8866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining CRAY_STACKSEG_END = $ac_func
+EOF
+cat >> confdefs.h <<EOF
+#define CRAY_STACKSEG_END $ac_func
+EOF
+}
+
+  break
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+done
+fi
+
+echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
+echo "configure:8896: checking stack direction for C alloca" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8899 "configure"
+#include "confdefs.h"
+find_stack_direction ()
+{
+  static char *addr = 0;
+  auto char dummy;
+  if (addr == 0)
+    {
+      addr = &dummy;
+      return find_stack_direction ();
+    }
+  else
+    return (&dummy > addr) ? 1 : -1;
+}
+main ()
+{
+  exit (find_stack_direction() < 0);
+}
+EOF
+if { (eval echo configure:8918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+then
+  ac_cv_c_stack_direction=1
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_c_stack_direction=-1
+fi
+rm -fr conftest*
+
+echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining STACK_DIRECTION = $ac_cv_c_stack_direction
+EOF
+cat >> confdefs.h <<EOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+EOF
+}
+
+fi
+
+test -n "$ALLOCA" && extra_objs="$extra_objs $ALLOCA" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"$ALLOCA\""
+ fi
+
+ac_safe=`echo "vfork.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for vfork.h""... $ac_c" 1>&6
+echo "configure:8946: checking for vfork.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8949 "configure"
+#include "confdefs.h"
+#include <vfork.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:8954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_VFORK_H
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_VFORK_H 1
+EOF
+}
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+echo $ac_n "checking for working vfork""... $ac_c" 1>&6
+echo "configure:8982: checking for working vfork" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 8985 "configure"
+#include "confdefs.h"
+/* Thanks to Paul Eggert for this test.  */
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef HAVE_VFORK_H
+#include <vfork.h>
+#endif
+/* On some sparc systems, changes by the child to local and incoming
+   argument registers are propagated back to the parent.
+   The compiler is told about this with #include <vfork.h>,
+   but some compilers (e.g. gcc -O) don't grok <vfork.h>.
+   Test for this by using a static variable whose address
+   is put into a register that is clobbered by the vfork.  */
+static
+#ifdef __cplusplus
+sparc_address_test (int arg)
+#else
+sparc_address_test (arg) int arg;
+#endif
+{
+  static pid_t child;
+  if (!child) {
+    child = vfork ();
+    if (child < 0) {
+      perror ("vfork");
+      _exit(2);
+    }
+    if (!child) {
+      arg = getpid();
+      write(-1, "", 0);
+      _exit (arg);
+    }
+  }
+}
+main() {
+  pid_t parent = getpid ();
+  pid_t child;
+
+  sparc_address_test ();
+
+  child = vfork ();
+
+  if (child == 0) {
+    /* Here is another test for sparc vfork register problems.
+       This test uses lots of local variables, at least
+       as many local variables as main has allocated so far
+       including compiler temporaries.  4 locals are enough for
+       gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe.
+       A buggy compiler should reuse the register of parent
+       for one of the local variables, since it will think that
+       parent can't possibly be used any more in this routine.
+       Assigning to the local variable will thus munge parent
+       in the parent process.  */
+    pid_t
+      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
+      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
+    /* Convince the compiler that p..p7 are live; otherwise, it might
+       use the same hardware register for all 8 local variables.  */
+    if (p != p1 || p != p2 || p != p3 || p != p4
+       || p != p5 || p != p6 || p != p7)
+      _exit(1);
+
+    /* On some systems (e.g. IRIX 3.3),
+       vfork doesn't separate parent from child file descriptors.
+       If the child closes a descriptor before it execs or exits,
+       this munges the parent's descriptor as well.
+       Test for this by closing stdout in the child.  */
+    _exit(close(fileno(stdout)) != 0);
+  } else {
+    int status;
+    struct stat st;
+
+    while (wait(&status) != child)
+      ;
+    exit(
+        /* Was there some problem with vforking?  */
+        child < 0
+
+        /* Did the child fail?  (This shouldn't happen.)  */
+        || status
+
+        /* Did the vfork/compiler bug occur?  */
+        || parent != getpid()
+
+        /* Did the file descriptor bug occur?  */
+        || fstat(fileno(stdout), &st) != 0
+        );
+  }
+}
+EOF
+if { (eval echo configure:9080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+then
+  ac_cv_func_vfork_works=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_func_vfork_works=no
+fi
+rm -fr conftest*
+
+echo "$ac_t""$ac_cv_func_vfork_works" 1>&6
+if test $ac_cv_func_vfork_works = no; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining vfork = fork
+EOF
+cat >> confdefs.h <<\EOF
+#define vfork fork
+EOF
+}
+
+fi
+
+
+echo $ac_n "checking for working strcoll""... $ac_c" 1>&6
+echo "configure:9105: checking for working strcoll" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9108 "configure"
+#include "confdefs.h"
+#include <string.h>
+main ()
+{
+  exit (strcoll ("abc", "def") >= 0 ||
+       strcoll ("ABC", "DEF") >= 0 ||
+       strcoll ("123", "456") >= 0);
+}
+EOF
+if { (eval echo configure:9118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+then
+  ac_cv_func_strcoll_works=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_func_strcoll_works=no
+fi
+rm -fr conftest*
+
+echo "$ac_t""$ac_cv_func_strcoll_works" 1>&6
+if test $ac_cv_func_strcoll_works = yes; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_STRCOLL
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_STRCOLL 1
+EOF
+}
+
+fi
+
+
+for ac_func in getpgrp
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:9145: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9148 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:9171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $ac_tr_func
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+}
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+echo $ac_n "checking whether getpgrp takes no argument""... $ac_c" 1>&6
+echo "configure:9199: checking whether getpgrp takes no argument" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9202 "configure"
+#include "confdefs.h"
+
+/*
+ * If this system has a BSD-style getpgrp(),
+ * which takes a pid argument, exit unsuccessfully.
+ *
+ * Snarfed from Chet Ramey's bash pgrp.c test program
+ */
+#include <stdio.h>
+#include <sys/types.h>
+
+int     pid;
+int     pg1, pg2, pg3, pg4;
+int     ng, np, s, child;
+
+main()
+{
+        pid = getpid();
+        pg1 = getpgrp(0);
+        pg2 = getpgrp();
+        pg3 = getpgrp(pid);
+        pg4 = getpgrp(1);
+
+        /*
+         * If all of these values are the same, it's pretty sure that
+         * we're on a system that ignores getpgrp's first argument.
+         */
+        if (pg2 == pg4 && pg1 == pg3 && pg2 == pg3)
+                exit(0);
+
+        child = fork();
+        if (child < 0)
+                exit(1);
+        else if (child == 0) {
+                np = getpid();
+                /*
+                 * If this is Sys V, this will not work; pgrp will be
+                 * set to np because setpgrp just changes a pgrp to be
+                 * the same as the pid.
+                 */
+                setpgrp(np, pg1);
+                ng = getpgrp(0);        /* Same result for Sys V and BSD */
+                if (ng == pg1) {
+                        exit(1);
+                } else {
+                        exit(0);
+                }
+        } else {
+                wait(&s);
+                exit(s>>8);
+        }
+}
+
+EOF
+if { (eval echo configure:9257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+then
+  ac_cv_func_getpgrp_void=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_func_getpgrp_void=no
+fi
+rm -fr conftest*
+
+
+echo "$ac_t""$ac_cv_func_getpgrp_void" 1>&6
+if test $ac_cv_func_getpgrp_void = yes; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining GETPGRP_VOID
+EOF
+cat >> confdefs.h <<\EOF
+#define GETPGRP_VOID 1
+EOF
+}
+
+fi
+
+
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:9283: checking for working mmap" >&5
+case "$opsys" in ultrix* ) have_mmap=no ;; *)
+cat > conftest.$ac_ext <<EOF
+#line 9286 "configure"
+#include "confdefs.h"
+#include <stdio.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+#ifndef MAP_VARIABLE
+#define MAP_VARIABLE 0
+#endif
+
+#ifndef MAP_FAILED
+#define MAP_FAILED -1
+#endif
+
+int main (int argc, char *argv[])
+{
+  int fd = -1;
+  caddr_t p;
+#ifndef MAP_ANONYMOUS
+  fd = open ("/dev/zero", O_RDWR);
+  if (fd < 0)
+    return 1;
+#define MAP_ANONYMOUS 0
+#endif
+  if (mmap(0, 1024, PROT_READ | PROT_WRITE,
+          MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
+          fd, 0) != (void *) MAP_FAILED)
+    return 0;
+  perror ("conftest: mmap failed");
+  return 1;
+}
+EOF
+if { (eval echo configure:9319: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+then
+  have_mmap=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  have_mmap=no
+fi
+rm -fr conftest* ;;
+esac
+echo "$ac_t""$have_mmap" 1>&6
+test "$have_mmap" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_MMAP
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+}
+
+
+test "$GNU_MALLOC" != "yes"   -a "$have_mmap" != "yes" && rel_alloc=no
+test "$rel_alloc" = "default" -a "$have_mmap"  = "yes" && rel_alloc=yes
+test "$rel_alloc" = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining REL_ALLOC
+EOF
+cat >> confdefs.h <<\EOF
+#define REL_ALLOC 1
+EOF
+}
+
+
+ac_safe=`echo "termios.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for termios.h""... $ac_c" 1>&6
+echo "configure:9353: checking for termios.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9356 "configure"
+#include "confdefs.h"
+#include <termios.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:9361: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_TERMIOS
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_TERMIOS 1
+EOF
+}
+
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining SIGNALS_VIA_CHARACTERS
+EOF
+cat >> confdefs.h <<\EOF
+#define SIGNALS_VIA_CHARACTERS 1
+EOF
+}
+
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining NO_TERMIO
+EOF
+cat >> confdefs.h <<\EOF
+#define NO_TERMIO 1
+EOF
+}
+
+else
+  echo "$ac_t""no" 1>&6
+ac_safe=`echo "termio.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for termio.h""... $ac_c" 1>&6
+echo "configure:9404: checking for termio.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9407 "configure"
+#include "confdefs.h"
+#include <termio.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:9412: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_TERMIO
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_TERMIO 1
+EOF
+}
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+fi
+
+
+
+echo $ac_n "checking for socket""... $ac_c" 1>&6
+echo "configure:9444: checking for socket" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9447 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char socket(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char socket();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_socket) || defined (__stub___socket)
+choke me
+#else
+socket();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:9470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_socket=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_socket=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ac_safe=`echo "netinet/in.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for netinet/in.h""... $ac_c" 1>&6
+echo "configure:9485: checking for netinet/in.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9488 "configure"
+#include "confdefs.h"
+#include <netinet/in.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:9493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ac_safe=`echo "arpa/inet.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for arpa/inet.h""... $ac_c" 1>&6
+echo "configure:9510: checking for arpa/inet.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9513 "configure"
+#include "confdefs.h"
+#include <arpa/inet.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:9518: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_SOCKETS
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_SOCKETS 1
+EOF
+}
+
+      echo $ac_n "checking "for sun_len member in struct sockaddr_un"""... $ac_c" 1>&6
+echo "configure:9543: checking "for sun_len member in struct sockaddr_un"" >&5
+      cat > conftest.$ac_ext <<EOF
+#line 9545 "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+      
+int main() {
+static struct sockaddr_un x; x.sun_len = 1;
+; return 0; }
+EOF
+if { (eval echo configure:9556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_SOCKADDR_SUN_LEN
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_SOCKADDR_SUN_LEN 1
+EOF
+}
+
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  echo "$ac_t""no" 1>&6
+fi
+rm -f conftest*
+      echo $ac_n "checking "for ip_mreq struct in netinet/in.h"""... $ac_c" 1>&6
+echo "configure:9574: checking "for ip_mreq struct in netinet/in.h"" >&5
+      cat > conftest.$ac_ext <<EOF
+#line 9576 "configure"
+#include "confdefs.h"
+
+#include <sys/types.h>
+#include <netinet/in.h>
+      
+int main() {
+static struct ip_mreq x;
+; return 0; }
+EOF
+if { (eval echo configure:9586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  echo "$ac_t""yes" 1>&6; { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_MULTICAST
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_MULTICAST 1
+EOF
+}
+
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  echo "$ac_t""no" 1>&6
+fi
+rm -f conftest*
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+echo $ac_n "checking for msgget""... $ac_c" 1>&6
+echo "configure:9617: checking for msgget" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9620 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char msgget(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char msgget();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_msgget) || defined (__stub___msgget)
+choke me
+#else
+msgget();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:9643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_msgget=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_msgget=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'msgget`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ac_safe=`echo "sys/ipc.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for sys/ipc.h""... $ac_c" 1>&6
+echo "configure:9658: checking for sys/ipc.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9661 "configure"
+#include "confdefs.h"
+#include <sys/ipc.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:9666: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ac_safe=`echo "sys/msg.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for sys/msg.h""... $ac_c" 1>&6
+echo "configure:9683: checking for sys/msg.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9686 "configure"
+#include "confdefs.h"
+#include <sys/msg.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:9691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_SYSVIPC
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_SYSVIPC 1
+EOF
+}
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+ac_safe=`echo "dirent.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for dirent.h""... $ac_c" 1>&6
+echo "configure:9729: checking for dirent.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9732 "configure"
+#include "confdefs.h"
+#include <dirent.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:9737: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining SYSV_SYSTEM_DIR
+EOF
+cat >> confdefs.h <<\EOF
+#define SYSV_SYSTEM_DIR 1
+EOF
+}
+
+else
+  echo "$ac_t""no" 1>&6
+ac_safe=`echo "sys/dir.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for sys/dir.h""... $ac_c" 1>&6
+echo "configure:9764: checking for sys/dir.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9767 "configure"
+#include "confdefs.h"
+#include <sys/dir.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:9772: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+{ test "$extra_verbose" = "yes" && cat << \EOF
+    Defining NONSYSTEM_DIR_LIBRARY
+EOF
+cat >> confdefs.h <<\EOF
+#define NONSYSTEM_DIR_LIBRARY 1
+EOF
+}
+
+fi
+
+fi
+
+
+ac_safe=`echo "nlist.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for nlist.h""... $ac_c" 1>&6
+echo "configure:9805: checking for nlist.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9808 "configure"
+#include "confdefs.h"
+#include <nlist.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:9813: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining NLIST_STRUCT
+EOF
+cat >> confdefs.h <<\EOF
+#define NLIST_STRUCT 1
+EOF
+}
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+
+echo "checking "for sound support"" 1>&6
+echo "configure:9843: checking "for sound support"" >&5
+case "$with_sound" in
+  native | both ) with_native_sound=yes;;
+  nas    | no   ) with_native_sound=no;;
+esac
+test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
+
+if test "$with_native_sound" != "no"; then
+    if test -n "$native_sound_lib"; then
+    ac_safe=`echo "multimedia/audio_device.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for multimedia/audio_device.h""... $ac_c" 1>&6
+echo "configure:9854: checking for multimedia/audio_device.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 9857 "configure"
+#include "confdefs.h"
+#include <multimedia/audio_device.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:9862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  sound_found=yes sound_cflags=""
+      extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"sunplay.o\""
+ fi
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  fi
+
+    if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
+    sound_found=yes
+    extra_objs="$extra_objs sunplay.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"sunplay.o\""
+ fi
+    if test -d "/usr/demo/SOUND/include"
+      then sound_cflags="-I/usr/demo/SOUND/include"
+      else sound_cflags="-I/usr/demo/SOUND"
+    fi
+    if test -z "$native_sound_lib" ; then
+      if test -r "/usr/demo/SOUND/lib/libaudio.a"
+        then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
+        else native_sound_lib="/usr/demo/SOUND/libaudio.a"
+      fi
+    fi
+  fi
+
+    if test -z "$sound_found"; then
+    case "$canonical" in
+    *-sgi-* )
+      if test -z "$native_sound_lib"; then
+        
+echo $ac_n "checking for ALopenport in -laudio""... $ac_c" 1>&6
+echo "configure:9910: checking for ALopenport in -laudio" >&5
+ac_lib_var=`echo audio'_'ALopenport | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -laudio "
+cat > conftest.$ac_ext <<EOF
+#line 9915 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char ALopenport();
+
+int main() {
+ALopenport()
+; return 0; }
+EOF
+if { (eval echo configure:9926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  native_sound_lib="-laudio"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+      fi
+      if test -n "$native_sound_lib"; then
+        sound_found=yes sound_cflags=""
+        extra_objs="$extra_objs sgiplay.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"sgiplay.o\""
+ fi
+      fi ;;
+    hppa*-hp-hpux* )
+      if test -z "$native_sound_lib"; then
+       
+echo $ac_n "checking for AOpenAudio in -lAlib""... $ac_c" 1>&6
+echo "configure:9957: checking for AOpenAudio in -lAlib" >&5
+ac_lib_var=`echo Alib'_'AOpenAudio | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lAlib "
+cat > conftest.$ac_ext <<EOF
+#line 9962 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char AOpenAudio();
+
+int main() {
+AOpenAudio()
+; return 0; }
+EOF
+if { (eval echo configure:9973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  native_sound_lib="-lAlib"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+      fi
+      if test -n "$native_sound_lib"; then
+        sound_found=yes
+        extra_objs="$extra_objs hpplay.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"hpplay.o\""
+ fi
+        if test "$GCC" = "yes" # Kludge city
+          then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
+          else sound_cflags="+e -I/usr/audio/examples"
+        fi
+      fi ;;
+    esac
+  fi
+
+    if test -z "$sound_found"; then
+    for dir in "machine" "sys" "linux"; do
+      ac_safe=`echo "${dir}/soundcard.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for ${dir}/soundcard.h""... $ac_c" 1>&6
+echo "configure:10011: checking for ${dir}/soundcard.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10014 "configure"
+#include "confdefs.h"
+#include <${dir}/soundcard.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:10019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  sound_found=yes
+        extra_objs="$extra_objs linuxplay.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"linuxplay.o\""
+ fi
+        { test "$extra_verbose" = "yes" && cat << EOF
+    Defining SOUNDCARD_H_PATH = "${dir}/soundcard.h"
+EOF
+cat >> confdefs.h <<EOF
+#define SOUNDCARD_H_PATH "${dir}/soundcard.h"
+EOF
+}
+
+        break
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    done
+  fi
+
+  test "$sound_found" = "yes" && with_native_sound=yes
+fi
+
+if test -z "$with_sound"; then
+  if test "$with_native_sound" = "yes" -o -n "$native_sound_lib"; then
+    with_sound=native
+  fi
+fi
+
+if test "$with_native_sound" = "yes"; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_NATIVE_SOUND
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_NATIVE_SOUND 1
+EOF
+}
+
+  test -n "$native_sound_lib" && LIBS="$native_sound_lib $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$native_sound_lib\" to \$LIBS"; fi
+fi
+
+case "$with_sound" in both | nas )
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_NAS_SOUND
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_NAS_SOUND 1
+EOF
+}
+
+  extra_objs="$extra_objs nas.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"nas.o\""
+ fi
+  libs_x="-laudio $libs_x" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-laudio\" to \$libs_x"; fi
+      cat > conftest.$ac_ext <<EOF
+#line 10089 "configure"
+#include "confdefs.h"
+#include <audio/Xtutil.h>
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "AuXtErrorJump" >/dev/null 2>&1; then
+  :
+else
+  rm -rf conftest*
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining NAS_NO_ERROR_JUMP
+EOF
+cat >> confdefs.h <<\EOF
+#define NAS_NO_ERROR_JUMP 1
+EOF
+}
+
+fi
+rm -f conftest*
+
+esac
+
+
+test -z "$with_tty" && with_tty=yes
+
+if test "$with_tty" = "yes"  ; then
+  echo "checking for TTY-related features" 1>&6
+echo "configure:10116: checking for TTY-related features" >&5
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_TTY
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_TTY 1
+EOF
+}
+
+  extra_objs="$extra_objs console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o redisplay-tty.o cm.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o redisplay-tty.o cm.o\""
+ fi
+
+    if test -z "$with_ncurses"; then
+    
+echo $ac_n "checking for tgetent in -lncurses""... $ac_c" 1>&6
+echo "configure:10132: checking for tgetent in -lncurses" >&5
+ac_lib_var=`echo ncurses'_'tgetent | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lncurses "
+cat > conftest.$ac_ext <<EOF
+#line 10137 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char tgetent();
+
+int main() {
+tgetent()
+; return 0; }
+EOF
+if { (eval echo configure:10148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  with_ncurses=yes
+else
+  echo "$ac_t""no" 1>&6
+with_ncurses=no
+fi
+
+
+  fi
+  if test "$with_ncurses" = "yes"; then
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_NCURSES
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_NCURSES 1
+EOF
+}
+
+    ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
+echo "configure:10181: checking for ncurses/curses.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10184 "configure"
+#include "confdefs.h"
+#include <ncurses/curses.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:10189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  curses_h_path=ncurses/curses.h
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    ac_safe=`echo "ncurses/term.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for ncurses/term.h""... $ac_c" 1>&6
+echo "configure:10211: checking for ncurses/term.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10214 "configure"
+#include "confdefs.h"
+#include <ncurses/term.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:10219: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  term_h_path=ncurses/term.h
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"terminfo.o\""
+ fi
+    LIBS="-lncurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lncurses\" to \$LIBS"; fi
+
+    if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
+                        save_c_switch_site="$c_switch_site"
+      c_switch_site="$c_switch_site -I/usr/include/ncurses"
+      ac_safe=`echo "ncurses/curses.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for ncurses/curses.h""... $ac_c" 1>&6
+echo "configure:10249: checking for ncurses/curses.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10252 "configure"
+#include "confdefs.h"
+#include <ncurses/curses.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:10257: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  curses_h_path=ncurses/curses.h
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+      if test "$ac_cv_header_ncurses_curses_h" = "yes"
+        then echo "configure: warning: "Your system has the bogus ncurses include bug."" 1>&2
+        else c_switch_site="$save_c_switch_site"
+      fi
+    fi
+  else         if test "$have_terminfo" = "yes"; then
+      extra_objs="$extra_objs terminfo.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"terminfo.o\""
+ fi
+      if test -n "$libs_termcap"; then
+       LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
+      else
+       for lib in curses termlib termcap; do
+         
+echo $ac_n "checking for tgetent in -l$lib""... $ac_c" 1>&6
+echo "configure:10292: checking for tgetent in -l$lib" >&5
+ac_lib_var=`echo $lib'_'tgetent | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -l$lib "
+cat > conftest.$ac_ext <<EOF
+#line 10297 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char tgetent();
+
+int main() {
+tgetent()
+; return 0; }
+EOF
+if { (eval echo configure:10308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  LIBS="-l${lib} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${lib}\" to \$LIBS"; fi; break
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+       done
+      fi
+    else       extra_objs="$extra_objs tparam.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"tparam.o\""
+ fi
+                        case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
+      if test -n "$libs_termcap"; then
+       LIBS="$libs_termcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"$libs_termcap\" to \$LIBS"; fi
+      else
+       
+echo $ac_n "checking for tgetent in -lcurses""... $ac_c" 1>&6
+echo "configure:10339: checking for tgetent in -lcurses" >&5
+ac_lib_var=`echo curses'_'tgetent | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lcurses "
+cat > conftest.$ac_ext <<EOF
+#line 10344 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char tgetent();
+
+int main() {
+tgetent()
+; return 0; }
+EOF
+if { (eval echo configure:10355: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  LIBS="-lcurses $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lcurses\" to \$LIBS"; fi
+else
+  echo "$ac_t""no" 1>&6
+echo $ac_n "checking for tgetent in -ltermcap""... $ac_c" 1>&6
+echo "configure:10373: checking for tgetent in -ltermcap" >&5
+ac_lib_var=`echo termcap'_'tgetent | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -ltermcap "
+cat > conftest.$ac_ext <<EOF
+#line 10378 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char tgetent();
+
+int main() {
+tgetent()
+; return 0; }
+EOF
+if { (eval echo configure:10389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  LIBS="-ltermcap $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ltermcap\" to \$LIBS"; fi
+else
+  echo "$ac_t""no" 1>&6
+extra_objs="$extra_objs termcap.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"termcap.o\""
+ fi
+fi
+
+
+fi
+
+
+      fi
+    fi
+  fi
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining CURSES_H_PATH = "${curses_h_path-curses.h}"
+EOF
+cat >> confdefs.h <<EOF
+#define CURSES_H_PATH "${curses_h_path-curses.h}"
+EOF
+}
+
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining TERM_H_PATH = "${term_h_path-term.h}"
+EOF
+cat >> confdefs.h <<EOF
+#define TERM_H_PATH "${term_h_path-term.h}"
+EOF
+}
+
+
+    test -z "$with_gpm" && { ac_safe=`echo "gpm.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for gpm.h""... $ac_c" 1>&6
+echo "configure:10437: checking for gpm.h" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10440 "configure"
+#include "confdefs.h"
+#include <gpm.h>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:10445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  :
+else
+  echo "$ac_t""no" 1>&6
+with_gpm=no
+fi
+ }
+  test -z "$with_gpm" && { 
+echo $ac_n "checking for Gpm_Open in -lgpm""... $ac_c" 1>&6
+echo "configure:10468: checking for Gpm_Open in -lgpm" >&5
+ac_lib_var=`echo gpm'_'Gpm_Open | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lgpm "
+cat > conftest.$ac_ext <<EOF
+#line 10473 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char Gpm_Open();
+
+int main() {
+Gpm_Open()
+; return 0; }
+EOF
+if { (eval echo configure:10484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  with_gpm=yes
+else
+  echo "$ac_t""no" 1>&6
+with_gpm=no
+fi
+
+ }
+  if test "$with_gpm" = "yes"; then
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_GPM
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_GPM 1
+EOF
+}
+
+    extra_objs="$extra_objs gpmevent.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"gpmevent.o\""
+ fi
+    LIBS="-lgpm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgpm\" to \$LIBS"; fi
+  fi
+
+else   for feature in ncurses gpm; do
+    if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
+      echo "configure: warning: "--with-${feature} ignored:  Not valid without TTY support"" 1>&2
+    fi
+    eval "with_${feature}=no"
+  done
+fi 
+test "$with_x11" = "yes" -o "$with_tty" = "yes" && extra_objs="$extra_objs event-unixoid.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"event-unixoid.o\""
+ fi
+
+
+echo "checking for database support" 1>&6
+echo "configure:10533: checking for database support" >&5
+
+if test "$with_database_gnudbm" != "no"; then
+  for ac_hdr in ndbm.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:10540: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10543 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:10548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $ac_tr_hdr
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+}
+ have_ndbm_h=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+  if test "$have_ndbm_h" = "yes"; then
+    
+echo $ac_n "checking for dbm_open in -lgdbm""... $ac_c" 1>&6
+echo "configure:10580: checking for dbm_open in -lgdbm" >&5
+ac_lib_var=`echo gdbm'_'dbm_open | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lgdbm "
+cat > conftest.$ac_ext <<EOF
+#line 10585 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char dbm_open();
+
+int main() {
+dbm_open()
+; return 0; }
+EOF
+if { (eval echo configure:10596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  with_database_gnudbm=yes have_libgdbm=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+  fi
+  if test "$with_database_gnudbm" != "yes"; then
+    echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
+echo "configure:10619: checking for dbm_open" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10622 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dbm_open(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char dbm_open();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_dbm_open) || defined (__stub___dbm_open)
+choke me
+#else
+dbm_open();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:10645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_dbm_open=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_dbm_open=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  with_database_gnudbm=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+      fi
+  if test "$with_database_gnudbm" = "yes"; then
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_DBM
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_DBM 1
+EOF
+}
+
+    test "$have_libgdbm" = "yes" && LIBS="-lgdbm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lgdbm\" to \$LIBS"; fi
+    with_database_dbm=no
+  else with_database_gnudbm=no
+  fi
+fi
+
+if test "$with_database_dbm" != "no"; then
+  echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
+echo "configure:10681: checking for dbm_open" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10684 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char dbm_open(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char dbm_open();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_dbm_open) || defined (__stub___dbm_open)
+choke me
+#else
+dbm_open();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:10707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_dbm_open=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_dbm_open=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  with_database_dbm=yes need_libdbm=no
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  if test "$need_libdbm" != "no"; then
+    
+echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
+echo "configure:10728: checking for dbm_open in -ldbm" >&5
+ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -ldbm "
+cat > conftest.$ac_ext <<EOF
+#line 10733 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char dbm_open();
+
+int main() {
+dbm_open()
+; return 0; }
+EOF
+if { (eval echo configure:10744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  with_database_dbm=yes need_libdbm=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+  fi
+  if test "$with_database_dbm" = "yes"; then
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_DBM
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_DBM 1
+EOF
+}
+
+    test "$need_libdbm" = "yes" && LIBS="-ldbm $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldbm\" to \$LIBS"; fi
+  else with_database_dbm=no
+  fi
+fi
+
+if test "$with_database_berkdb" != "no"; then
+  echo $ac_n "checking for Berkeley db.h""... $ac_c" 1>&6
+echo "configure:10781: checking for Berkeley db.h" >&5
+  for path in "db/db.h" "db.h"; do
+    cat > conftest.$ac_ext <<EOF
+#line 10784 "configure"
+#include "confdefs.h"
+#ifdef HAVE_INTTYPES_H
+#define __BIT_TYPES_DEFINED__
+#include <inttypes.h>
+typedef uint8_t  u_int8_t;
+typedef uint16_t u_int16_t;
+typedef uint32_t u_int32_t;
+#ifdef WE_DONT_NEED_QUADS
+typedef uint64_t u_int64_t;
+#endif
+#endif
+#include <$path>
+
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:10802: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  db_h_path="$path"; break
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+  done
+  if test -z "$db_h_path" 
+  then echo "$ac_t""no" 1>&6; with_database_berkdb=no
+  else echo "$ac_t""$db_h_path" 1>&6
+  fi
+
+  if test "$with_database_berkdb" != "no"; then
+    echo $ac_n "checking for Berkeley DB version""... $ac_c" 1>&6
+echo "configure:10818: checking for Berkeley DB version" >&5
+    cat > conftest.$ac_ext <<EOF
+#line 10820 "configure"
+#include "confdefs.h"
+#include <$db_h_path>
+#if DB_VERSION_MAJOR > 1
+yes
+#endif
+
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "yes" >/dev/null 2>&1; then
+  rm -rf conftest*
+  echo "$ac_t""2" 1>&6; dbfunc=db_open
+else
+  rm -rf conftest*
+  echo "$ac_t""1" 1>&6; dbfunc=dbopen
+fi
+rm -f conftest*
+
+    echo $ac_n "checking for $dbfunc""... $ac_c" 1>&6
+echo "configure:10839: checking for $dbfunc" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 10842 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $dbfunc(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $dbfunc();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$dbfunc) || defined (__stub___$dbfunc)
+choke me
+#else
+$dbfunc();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:10865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_$dbfunc=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$dbfunc=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'$dbfunc`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  with_database_berkdb=yes need_libdb=no
+else
+  echo "$ac_t""no" 1>&6
+
+    
+echo $ac_n "checking for $dbfunc in -ldb""... $ac_c" 1>&6
+echo "configure:10884: checking for $dbfunc in -ldb" >&5
+ac_lib_var=`echo db'_'$dbfunc | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -ldb "
+cat > conftest.$ac_ext <<EOF
+#line 10889 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $dbfunc();
+
+int main() {
+$dbfunc()
+; return 0; }
+EOF
+if { (eval echo configure:10900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  with_database_berkdb=yes need_libdb=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+fi
+
+  fi
+
+  if test "$with_database_berkdb" = "yes"; then
+    { test "$extra_verbose" = "yes" && cat << EOF
+    Defining DB_H_PATH = "$db_h_path"
+EOF
+cat >> confdefs.h <<EOF
+#define DB_H_PATH "$db_h_path"
+EOF
+}
+
+    { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_BERKELEY_DB
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_BERKELEY_DB 1
+EOF
+}
+
+    test "$need_libdb" = "yes" && LIBS="-ldb $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-ldb\" to \$LIBS"; fi
+  else with_database_berkdb=no
+  fi
+fi
+
+if test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \
+     != "no no no"; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_DATABASE
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_DATABASE 1
+EOF
+}
+
+  extra_objs="$extra_objs database.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"database.o\""
+ fi
+fi
+
+if test "$with_socks" = "yes"; then
+  
+echo $ac_n "checking for SOCKSinit in -lsocks""... $ac_c" 1>&6
+echo "configure:10964: checking for SOCKSinit in -lsocks" >&5
+ac_lib_var=`echo socks'_'SOCKSinit | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lsocks "
+cat > conftest.$ac_ext <<EOF
+#line 10969 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char SOCKSinit();
+
+int main() {
+SOCKSinit()
+; return 0; }
+EOF
+if { (eval echo configure:10980: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo socks | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $ac_tr_lib
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+}
+
+  LIBS="-lsocks $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-lsocks\" to \$LIBS"; fi
+
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+  test -n "$ac_cv_lib_socks_SOCKSinit" && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_SOCKS
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_SOCKS 1
+EOF
+}
+
+fi
+
+if test "$usage_tracking" = "yes"; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining USAGE_TRACKING
+EOF
+cat >> confdefs.h <<\EOF
+#define USAGE_TRACKING 1
+EOF
+}
+
+  LIBS="-Bstatic -lut -Bdynamic $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-Bstatic -lut -Bdynamic\" to \$LIBS"; fi
+fi
+
+for ac_hdr in dlfcn.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:11037: checking for $ac_hdr" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 11040 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:11045: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $ac_tr_hdr
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_hdr 1
+EOF
+}
+ have_dlfcn=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
+echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
+echo "configure:11076: checking for dlopen in -ldl" >&5
+ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -ldl "
+cat > conftest.$ac_ext <<EOF
+#line 11081 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char dlopen();
+
+int main() {
+dlopen()
+; return 0; }
+EOF
+if { (eval echo configure:11092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_DLOPEN
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_DLOPEN 1
+EOF
+}
+ DLL_LIB=dl;  with_shlib=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+ }
+test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
+echo $ac_n "checking for _dlopen in -lc""... $ac_c" 1>&6
+echo "configure:11121: checking for _dlopen in -lc" >&5
+ac_lib_var=`echo c'_'_dlopen | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lc "
+cat > conftest.$ac_ext <<EOF
+#line 11126 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char _dlopen();
+
+int main() {
+_dlopen()
+; return 0; }
+EOF
+if { (eval echo configure:11137: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_DLOPEN
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_DLOPEN 1
+EOF
+}
+ DLL_LIB=;   with_shlib=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+ }
+test -z "$with_shlib" && test ! -z "$have_dlfcn" && { 
+echo $ac_n "checking for dlopen in -lc""... $ac_c" 1>&6
+echo "configure:11166: checking for dlopen in -lc" >&5
+ac_lib_var=`echo c'_'dlopen | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -lc "
+cat > conftest.$ac_ext <<EOF
+#line 11171 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char dlopen();
+
+int main() {
+dlopen()
+; return 0; }
+EOF
+if { (eval echo configure:11182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_DLOPEN
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_DLOPEN 1
+EOF
+}
+ DLL_LIB=;   with_shlib=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+ }
+test -z "$with_shlib" && { 
+echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
+echo "configure:11211: checking for shl_load in -ldld" >&5
+ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -ldld "
+cat > conftest.$ac_ext <<EOF
+#line 11216 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char shl_load();
+
+int main() {
+shl_load()
+; return 0; }
+EOF
+if { (eval echo configure:11227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_SHL_LOAD
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_SHL_LOAD 1
+EOF
+}
+ DLL_LIB=dld; with_shlib=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+ }
+test -z "$with_shlib" && { 
+echo $ac_n "checking for dld_init in -ldld""... $ac_c" 1>&6
+echo "configure:11256: checking for dld_init in -ldld" >&5
+ac_lib_var=`echo dld'_'dld_init | sed 'y%./+-%__p_%'`
+
+xe_check_libs=" -ldld "
+cat > conftest.$ac_ext <<EOF
+#line 11261 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char dld_init();
+
+int main() {
+dld_init()
+; return 0; }
+EOF
+if { (eval echo configure:11272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+xe_check_libs=""
+
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  echo "$ac_t""yes" 1>&6
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_DLD_INIT
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_DLD_INIT 1
+EOF
+}
+ DLL_LIB=dld; with_shlib=yes
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+ }
+if test "$with_shlib" = "yes"; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_SHLIB
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_SHLIB 1
+EOF
+}
+
+  extra_objs="$extra_objs sysdll.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"sysdll.o\""
+ fi
+  extra_objs="$extra_objs dll.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"dll.o\""
+ fi
+  test ! -z "$DLL_LIB" && LIBS="-l${DLL_LIB} $LIBS" &&  if test "$extra_verbose" = "yes"; then echo "    Prepending \"-l${DLL_LIB}\" to \$LIBS"; fi
+  
+dll_ld="ld"
+dll_lflags="-shared"
+dll_cflags="-r"
+dll_oflags="-o "
+
+echo $ac_n "checking how to build a shared library""... $ac_c" 1>&6
+echo "configure:11322: checking how to build a shared library" >&5
+case `uname -rs` in
+       UNIX_SV*|UNIX_System_V*)
+               dll_lflags="-G"
+               dll_cflags=-Kpic
+               dll_ld="ld"
+               ;;
+       BSD/OS*)
+               dll_cflags=
+               dll_lflags="-r"
+               dll_ld="shlicc2"
+               ;;
+       FreeBSD*2*)
+               dll_lflags="-Bshareable"
+               dll_cflags="-fPIC -DPIC"
+               dll_ld=ld
+               ;;
+       SunOS*4.*)
+               dll_cflags="-P"
+               dll_lflags="-dp -assert pure-text -assert nodefinitions"
+               ;;
+       SunOS*5.*)
+               dll_ld="cc"
+               dll_cflags="-KPIC"
+               dll_lflags="-G"
+               dll_oflags="-W0,-y-o -W0,-y"
+               ;;      
+       IRIX*5.*|IRIX*6.*)
+               dll_cflags="-KPIC"
+               ;;
+       OSF1*)
+               ;;
+       HP-UX*)
+               dll_ld="ld"
+               dll_lflags="-b"
+               dll_cflags="+z"
+               ;;
+       SCO_SV*)
+               dll_ld="ld"
+               dll_lflags="-G"
+               dll_cflags="-Kpic"
+               ;;
+       AIX*)
+               dll_lflags="-H512 -T512 -bhalt:4 -bM:SRE -bE:\${@:.ell=.exp} -b noentry -lc"
+               dll_ld="ld"
+               ;;
+       *)
+               ;;
+       esac
+
+       if test "$GCC" = "yes" ; then
+               dll_cflags="-fPIC"
+               case `uname -rs` in
+               SunOS*5.*)
+                       dll_ld="ld"
+                       dll_oflags="-o "
+                       dll_lflags="-G"
+                       ;;
+               SCO_SV*)
+                       dll_ld="ld"
+                       dll_lflags="-G"
+                       dll_cflags="-b elf"
+                       ;;
+               FreeBSD*)
+                       dll_cflags="-DDLSYM_NEEDS_UNDERSCORE -DPIC -fPIC"
+                       dll_lflags="-Bshareable"
+                       dll_ld=ld
+                       ;;
+               BSD/OS*)
+                       dll_cflags=
+                       dll_lflags="-r"
+                       dll_ld="shlicc2"
+                       ;;
+               UNIX_SV*)
+                       dll_cflags="-fPIC"
+                       ;;
+               *)
+                       dll_ld="$CC"
+                       dll_lflags="-shared"
+               esac
+       fi
+
+       echo "$ac_t"""lflags: $dll_lflags cflags: $dll_cflags"" 1>&6
+
+
+
+
+
+  for ac_func in dlerror
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:11413: checking for $ac_func" >&5
+
+cat > conftest.$ac_ext <<EOF
+#line 11416 "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $ac_func(); below.  */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:11439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  { test "$extra_verbose" = "yes" && cat << EOF
+    Defining $ac_tr_func
+EOF
+cat >> confdefs.h <<EOF
+#define $ac_tr_func 1
+EOF
+}
+else
+  echo "$ac_t""no" 1>&6
+fi
+done
+
+  ld_dynamic_link_flags=
+    case "$opsys" in
+  hpux*)  ld_dynamic_link_flags="-Wl,-E" ;;
+  linux*) ld_dynamic_link_flags="-rdynamic" ;;
+  *) ;;
+  esac
+fi
+
+cat > conftest.$ac_ext <<EOF
+#line 11475 "configure"
+#include "confdefs.h"
+int main(int c,char *v[]){return 0;}
+EOF
+if { (eval echo configure:11479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>&5
+then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  
+  echo ""
+  echo "*** PANIC *** The C compiler can no longer build working executables."
+  echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
+  echo "*** PANIC *** The most likely reason for this problem is that configure"
+  echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
+  echo "*** PANIC *** found at run time."
+  echo "*** PANIC ***"
+  echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
+  echo "*** PANIC *** On other systems, try telling configure where to find the"
+  echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
+  echo "*** PANIC ***"
+  echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
+  echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
+  echo "*** PANIC *** on your system.  Don't do that."
+  exit 1
+fi
+rm -fr conftest*
+
+
+{ test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HAVE_UNIX_PROCESSES
+EOF
+cat >> confdefs.h <<\EOF
+#define HAVE_UNIX_PROCESSES 1
+EOF
+}
+
+extra_objs="$extra_objs process-unix.o" &&  if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"process-unix.o\""
+ fi
+
+
+
+T=""
+for W in $CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
+CFLAGS="$T"
+
+
+T=""
+for W in $extra_objs; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
+extra_objs="$T"
+
+
+T=""
+for W in -DHAVE_CONFIG_H $c_switch_site $c_switch_machine $c_switch_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
+c_switch_general="$T"
+
+
+T=""
+for W in $c_switch_x_site $X_CFLAGS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
+c_switch_window_system="$T"
+
+
+T=""
+for W in $c_switch_general $c_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
+c_switch_all="$T"
+
+
+T=""
+for W in $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_run; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
+ld_switch_general="$T"
+
+
+T=""
+for W in $ld_switch_x_site; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
+ld_switch_window_system="$T"
+
+
+T=""
+for W in $ld_switch_general $ld_switch_window_system; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
+ld_switch_all="$T"
+
+
+T=""
+for W in $LIBS $libs_machine $libs_system $libs_standard; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
+ld_libs_general="$T"
+
+
+T=""
+for W in $X_EXTRA_LIBS $libs_x $X_PRE_LIBS; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
+ld_libs_window_system="$T"
+
+
+T=""
+for W in $ld_libs_window_system $ld_libs_general; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
+ld_libs_all="$T"
+
+
+
+MAKE_SUBDIR="$MAKE_SUBDIR src" &&  if test "$extra_verbose" = "yes"; then echo "    Appending \"src\" to \$MAKE_SUBDIR"; fi
+internal_makefile_list="Makefile"
+SUBDIR_MAKEFILES=''
+test -d lock || mkdir lock
+for dir in $MAKE_SUBDIR; do
+  case "$dir" in */* )     ( for d in `echo $dir | sed 's:/: :g'` ; do
+        test -d "$d" || mkdir "$d"; cd "$d"
+      done ) ;;
+   * ) test -d "$dir" || mkdir "$dir" ;;
+  esac
+  
+T=""
+for W in $SUBDIR_MAKEFILES $dir/Makefile; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
+SUBDIR_MAKEFILES="$T"
+
+  
+T=""
+for W in $internal_makefile_list $dir/Makefile.in; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
+internal_makefile_list="$T"
+
+done
+
+
+
+
+for dir in src/s src/m; do
+  if test ! -d "$dir" ; then
+    echo Making symbolic link to "$srcdir/$dir"
+    ${LN_S} "$srcdir/$dir" "$dir"
+  fi
+done
+
+if test "$extra_verbose" = "yes"; then
+  echo ""
+  for var in extra_objs    c_switch_general  c_switch_window_system  c_switch_all   ld_switch_general ld_switch_window_system ld_switch_all     ld_libs_general   ld_libs_window_system   ld_libs_all; do eval "echo \"$var = '\$$var'\""; done
+  echo ""
+fi
+
+if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then
+  echo "creating src/gdbinit"; echo ""
+  echo "source $srcdir/src/gdbinit" > src/gdbinit
+fi
+
+if test "$__sunpro_c" = "yes"; then
+  echo "creating .sbinit"; echo ""
+  ( echo "# For use with Sun WorkShop's Source browser."
+    echo "# See sbquery(1) and sbinit(4) for more information"
+    for dir in $MAKE_SUBDIR; do echo "import $dir"; done
+  ) > .sbinit
+fi
+
+rm -f core
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+PREFIX=$prefix
+while true; do
+  case "$PREFIX" in
+    *\$* ) eval "PREFIX=$PREFIX" ;;
+    *) break ;;
+  esac
+done
+
+
+
+EXEC_PREFIX=$exec_prefix
+while true; do
+  case "$EXEC_PREFIX" in
+    *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
+    *) break ;;
+  esac
+done
+
+
+
+
+INFODIR=$infodir
+while true; do
+  case "$INFODIR" in
+    *\$* ) eval "INFODIR=$INFODIR" ;;
+    *) break ;;
+  esac
+done
+
+
+
+
+INFOPATH=$infopath
+while true; do
+  case "$INFOPATH" in
+    *\$* ) eval "INFOPATH=$INFOPATH" ;;
+    *) break ;;
+  esac
+done
+
+
+
+
+PACKAGE_PATH=$package_path
+while true; do
+  case "$PACKAGE_PATH" in
+    *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
+    *) break ;;
+  esac
+done
+
+
+
+
+LISPDIR=$lispdir
+while true; do
+  case "$LISPDIR" in
+    *\$* ) eval "LISPDIR=$LISPDIR" ;;
+    *) break ;;
+  esac
+done
+
+
+
+
+
+ETCDIR=$etcdir
+while true; do
+  case "$ETCDIR" in
+    *\$* ) eval "ETCDIR=$ETCDIR" ;;
+    *) break ;;
+  esac
+done
+
+
+
+
+LOCKDIR=$lockdir
+while true; do
+  case "$LOCKDIR" in
+    *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
+    *) break ;;
+  esac
+done
+
+
+
+
+ARCHLIBDIR=$archlibdir
+while true; do
+  case "$ARCHLIBDIR" in
+    *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
+    *) break ;;
+  esac
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
+
+
+
+
+
+
+
+# The default is yes
+if test "$with_site_lisp" = "no"; then
+  { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining INHIBIT_SITE_LISP
+EOF
+cat >> confdefs.h <<\EOF
+#define INHIBIT_SITE_LISP 1
+EOF
+}
+
+fi
+
+
+T=""
+for W in $ac_configure_args; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
+ac_configure_args="$T"
+
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining EMACS_CONFIGURATION = "$canonical"
+EOF
+cat >> confdefs.h <<EOF
+#define EMACS_CONFIGURATION "$canonical"
+EOF
+}
+
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining EMACS_CONFIG_OPTIONS = "$ac_configure_args"
+EOF
+cat >> confdefs.h <<EOF
+#define EMACS_CONFIG_OPTIONS "$ac_configure_args"
+EOF
+}
+
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining config_machfile = "$machfile"
+EOF
+cat >> confdefs.h <<EOF
+#define config_machfile "$machfile"
+EOF
+}
+
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining config_opsysfile = "$opsysfile"
+EOF
+cat >> confdefs.h <<EOF
+#define config_opsysfile "$opsysfile"
+EOF
+}
+
+
+
+null_string=""
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining LD_SWITCH_X_SITE = $null_string
+EOF
+cat >> confdefs.h <<EOF
+#define LD_SWITCH_X_SITE $null_string
+EOF
+}
+
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining LD_SWITCH_X_SITE_AUX = $null_string
+EOF
+cat >> confdefs.h <<EOF
+#define LD_SWITCH_X_SITE_AUX $null_string
+EOF
+}
+
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining C_SWITCH_X_SITE = $null_string
+EOF
+cat >> confdefs.h <<EOF
+#define C_SWITCH_X_SITE $null_string
+EOF
+}
+
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining LD_SWITCH_SITE = $null_string
+EOF
+cat >> confdefs.h <<EOF
+#define LD_SWITCH_SITE $null_string
+EOF
+}
+
+{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining C_SWITCH_SITE = $null_string
+EOF
+cat >> confdefs.h <<EOF
+#define C_SWITCH_SITE $null_string
+EOF
+}
+
+
+
+test -n "$puresize" && { test "$extra_verbose" = "yes" && cat << EOF
+    Defining RAW_PURESIZE = $puresize
+EOF
+cat >> confdefs.h <<EOF
+#define RAW_PURESIZE $puresize
+EOF
+}
+
+
+if   test "$GNU_MALLOC"         = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining GNU_MALLOC
+EOF
+cat >> confdefs.h <<\EOF
+#define GNU_MALLOC 1
+EOF
+}
+
+elif test "$with_system_malloc" = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining USE_SYSTEM_MALLOC
+EOF
+cat >> confdefs.h <<\EOF
+#define USE_SYSTEM_MALLOC 1
+EOF
+}
+
+elif test "$with_debug_malloc"  = "yes"; then { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining USE_DEBUG_MALLOC
+EOF
+cat >> confdefs.h <<\EOF
+#define USE_DEBUG_MALLOC 1
+EOF
+}
+
+                                             { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining USE_SYSTEM_MALLOC
+EOF
+cat >> confdefs.h <<\EOF
+#define USE_SYSTEM_MALLOC 1
+EOF
+}
+
+fi
+test "$with_i18n3"         = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining I18N3
+EOF
+cat >> confdefs.h <<\EOF
+#define I18N3 1
+EOF
+}
+
+test "$GCC"                = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining USE_GCC
+EOF
+cat >> confdefs.h <<\EOF
+#define USE_GCC 1
+EOF
+}
+
+test "$external_widget"    = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining EXTERNAL_WIDGET
+EOF
+cat >> confdefs.h <<\EOF
+#define EXTERNAL_WIDGET 1
+EOF
+}
+
+test "$with_gnu_make"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining USE_GNU_MAKE
+EOF
+cat >> confdefs.h <<\EOF
+#define USE_GNU_MAKE 1
+EOF
+}
+
+test "$no_doc_file"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining NO_DOC_FILE
+EOF
+cat >> confdefs.h <<\EOF
+#define NO_DOC_FILE 1
+EOF
+}
+
+test "$with_quantify"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining QUANTIFY
+EOF
+cat >> confdefs.h <<\EOF
+#define QUANTIFY 1
+EOF
+}
+
+test "$with_pop"           = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining MAIL_USE_POP
+EOF
+cat >> confdefs.h <<\EOF
+#define MAIL_USE_POP 1
+EOF
+}
+
+test "$with_kerberos"      = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining KERBEROS
+EOF
+cat >> confdefs.h <<\EOF
+#define KERBEROS 1
+EOF
+}
+
+test "$with_hesiod"        = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining HESIOD
+EOF
+cat >> confdefs.h <<\EOF
+#define HESIOD 1
+EOF
+}
+
+test "$use_union_type"     = "yes" && { test "$extra_verbose" = "yes" && cat << \EOF
+    Defining USE_UNION_TYPE
+EOF
+cat >> confdefs.h <<\EOF
+#define USE_UNION_TYPE 1
+EOF
+}
+
+
+
+(
+if test -f /etc/osversion; then   echo "osversion: `cat /etc/osversion`"
+else
+  echo "uname -a: `uname -a`"
+fi
+echo ""
+echo "$0 $quoted_arguments"
+) > Installation
+
+xemacs_betaname=""
+test ! -z "${emacs_beta_version}" && xemacs_betaname="-b${emacs_beta_version}"
+
+(
+echo "
+
+XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
+
+  Where should the build process find the source code?    $srcdir
+  What installation prefix should install use?           $prefix
+  What operating system and machine description files should XEmacs use?
+        \`$opsysfile' and \`$machfile'
+  What compiler should XEmacs be built with?              $CC $CFLAGS
+  Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
+  Should XEmacs use the relocating allocator for buffers? $rel_alloc
+  What window system should XEmacs use?                   ${window_system}"
+if test "$with_x11" = "yes"; then
+  echo "  Where do we find X Windows header files?                $x_includes"
+  echo "  Where do we find X Windows libraries?                   $x_libraries"
+fi
+if test -n "$site_includes"; then
+  echo "  Additional header files:                                $site_includes"
+fi
+if test -n "$site_libraries"; then
+  echo "  Additional libraries:                                   $site_libraries"
+fi
+if test -n "$site_prefixes"; then
+  echo "  Additional prefixes:                                    $site_prefixes"
+fi
+if test -n "$runpath"; then
+  echo "  Runtime library search path:                            $runpath"
+fi
+test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
+test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
+test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
+if test "$with_xmu" != yes -a "$with_x11" = yes; then
+  echo "  No Xmu; substituting equivalent routines."
+fi
+
+if test "$with_xpm" = yes; then
+  echo "  Compiling in support for XPM images."
+elif test "$with_x11" = yes; then
+  echo "  --------------------------------------------------------------------"
+  echo "  WARNING: Compiling without XPM support."
+  echo "  WARNING: You should strongly considering installing XPM."
+  echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
+  echo "  --------------------------------------------------------------------"
+fi
+test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
+test "$with_gif"   = yes && echo "  Compiling in support for GIF image conversion."
+test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image conversion."
+test "$with_png"   = yes && echo "  Compiling in support for PNG image conversion."
+test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image conversion."
+case "$with_sound" in
+  nas    ) echo "  Compiling in network sound (NAS) support." ;;
+  native ) echo "  Compiling in native sound support." ;;
+  both   ) echo "  Compiling in both network and native sound support." ;;
+esac
+test "$old_nas" = yes && echo "        nas library lacks error trapping, will play synchronously"
+
+test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
+test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
+test "$with_database_gnudbm" = yes && echo "  Compiling in support for GNU DBM."
+
+test "$with_umich_ldap"             = yes && echo "  Compiling in support for LDAP (UMich libs)."
+test "$with_ns_ldap"        = yes && echo "  Compiling in support for LDAP (Netscape SDK)."
+test "$with_ldap" = yes -a "$with_umich_ldap" = no -a "$with_ns_ldap" = no && echo "  Compiling in support for LDAP (Generic)."
+
+test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
+test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
+
+test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
+test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
+test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
+test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
+test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
+test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
+test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
+if test "$with_wnn" = yes; then
+  echo "  Compiling in support for the WNN input method on Mule."
+  test "$with_wnn6" = yes && echo "    Using WNN version 6."
+fi
+test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
+
+test "$with_cde"      = yes && echo "  Compiling in support for CDE."
+test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
+test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
+test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
+test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
+test "$with_session"  != no && echo "  Compiling in support for proper session-management."
+case "$with_menubars" in
+  lucid ) echo "  Using Lucid menubars." ;;
+  motif ) echo "  Using Motif menubars."
+          echo "  *WARNING*  The Motif menubar implementation is currently buggy."
+          echo "             We recommend using the Lucid menubar instead."
+          echo "             Re-run configure with --with-menubars='lucid'." ;;
+esac
+case "$with_scrollbars" in
+  lucid    ) echo "  Using Lucid scrollbars."     ;;
+  motif    ) echo "  Using Motif scrollbars."     ;;
+  athena   ) echo "  Using Athena scrollbars."    ;;
+  athena3d ) echo "  Using Athena-3d scrollbars." ;;
+esac
+case "$with_dialogs" in
+  motif    ) echo "  Using Motif dialog boxes."     ;;
+  athena   ) echo "  Using Athena dialog boxes."    ;;
+  athena3d ) echo "  Using Athena-3d dialog boxes." ;;
+esac
+test "$with_shlib" = "yes" && echo "  Compiling in DLL support."
+test "$with_clash_detection" = yes && \
+  echo "  Clash detection will use \"$lockdir\" for locking files."
+echo "  movemail will use \"$mail_locking\" for locking mail spool files."
+test "$with_pop"       = yes && echo "  Using POP for mail access"
+test "$with_kerberos"  = yes && echo "  Using Kerberos for POP authentication"
+test "$with_hesiod"    = yes && echo "  Using Hesiod to get POP server host"
+test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
+test "$use_minimal_tagbits" = yes && echo "  Using Lisp_Objects with minimal tagbits."
+test "$use_indexed_lrecord_implementation" = yes && echo "  Using indexed lrecord implementation."
+test "$debug"              = yes && echo "  Compiling in extra code for debugging."
+test "$memory_usage_stats" = yes && echo "  Compiling in code for checking XEmacs memory usage."
+test "$usage_tracking"     = yes && echo "  Compiling with usage tracking active (Sun internal)."
+if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
+  != "no no no no no"; then
+  echo "  WARNING: ---------------------------------------------------------"
+  echo "  WARNING: Compiling in support for runtime error checking."
+  echo "  WARNING: XEmacs will run noticeably more slowly as a result."
+  echo "  WARNING: Error checking is on by default for XEmacs beta releases."
+  echo "  WARNING: ---------------------------------------------------------"
+fi
+echo ""
+) | tee -a Installation
+echo ""
+
+echo '(setq Installation-string "' > Installation.el
+sed 's/"/\\"/g' Installation >> Installation.el
+echo '")' >> Installation.el
+
+
+
+# Remove any trailing slashes in these variables.
+test -n "$prefix" &&
+  prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
+test -n "$exec_prefix" &&
+  exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([^/]\)/*$,\1,'`
+
+
+for file in $internal_makefile_list; do
+  test "$file" = src/Makefile.in && \
+    file="src/Makefile.in:src/Makefile.in.in:src/depend"
+  ac_output_files="${ac_output_files+$ac_output_files }$file"
+done
+ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
+
+trap '' 1 2 15
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[        ]*VPATH[        ]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+DEFS=-DHAVE_CONFIG_H
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS <<EOF
+#! /bin/sh
+# Generated automatically by configure.
+# Run this file to recreate the current configuration.
+# This directory was configured as follows,
+# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+  case "\$ac_option" in
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+    echo "$CONFIG_STATUS generated by autoconf version 2.12"
+    exit 0 ;;
+  -help | --help | --hel | --he | --h)
+    echo "\$ac_cs_usage"; exit 0 ;;
+  *) echo "\$ac_cs_usage"; exit 1 ;;
+  esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "$ac_output_files src/config.h lwlib/config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS <<EOF
+
+# Protect against being on the right side of a sed subst in config.status.
+sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
+ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@LN_S@%$LN_S%g
+s%@blddir@%$blddir%g
+s%@CC@%$CC%g
+s%@CPP@%$CPP%g
+s%@start_flags@%$start_flags%g
+s%@ld_switch_shared@%$ld_switch_shared%g
+s%@start_files@%$start_files%g
+s%@ld@%$ld%g
+s%@lib_gcc@%$lib_gcc%g
+s%@RANLIB@%$RANLIB%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@YACC@%$YACC%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@X_CFLAGS@%$X_CFLAGS%g
+s%@X_PRE_LIBS@%$X_PRE_LIBS%g
+s%@X_LIBS@%$X_LIBS%g
+s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g
+s%@install_pp@%$install_pp%g
+s%@libs_xauth@%$libs_xauth%g
+s%@dnd_objs@%$dnd_objs%g
+s%@lwlib_objs@%$lwlib_objs%g
+s%@ALLOCA@%$ALLOCA%g
+s%@dll_ld@%$dll_ld%g
+s%@dll_cflags@%$dll_cflags%g
+s%@dll_oflags@%$dll_oflags%g
+s%@dll_lflags@%$dll_lflags%g
+s%@SRC_SUBDIR_DEPS@%$SRC_SUBDIR_DEPS%g
+s%@INSTALL_ARCH_DEP_SUBDIR@%$INSTALL_ARCH_DEP_SUBDIR%g
+s%@MAKE_SUBDIR@%$MAKE_SUBDIR%g
+s%@SUBDIR_MAKEFILES@%$SUBDIR_MAKEFILES%g
+s%@PROGNAME@%$PROGNAME%g
+s%@version@%$version%g
+s%@configuration@%$configuration%g
+s%@canonical@%$canonical%g
+s%@srcdir@%$srcdir%g
+s%@pkgdir@%$pkgdir%g
+s%@statedir@%$statedir%g
+s%@PREFIX@%$PREFIX%g
+s%@EXEC_PREFIX@%$EXEC_PREFIX%g
+s%@INFODIR_USER_DEFINED@%$INFODIR_USER_DEFINED%g
+s%@INFODIR@%$INFODIR%g
+s%@infopath@%$infopath%g
+s%@INFOPATH_USER_DEFINED@%$INFOPATH_USER_DEFINED%g
+s%@INFOPATH@%$INFOPATH%g
+s%@package_path@%$package_path%g
+s%@PACKAGE_PATH_USER_DEFINED@%$PACKAGE_PATH_USER_DEFINED%g
+s%@PACKAGE_PATH@%$PACKAGE_PATH%g
+s%@lispdir@%$lispdir%g
+s%@LISPDIR_USER_DEFINED@%$LISPDIR_USER_DEFINED%g
+s%@LISPDIR@%$LISPDIR%g
+s%@etcdir@%$etcdir%g
+s%@ETCDIR_USER_DEFINED@%$ETCDIR_USER_DEFINED%g
+s%@ETCDIR@%$ETCDIR%g
+s%@lockdir@%$lockdir%g
+s%@LOCKDIR_USER_DEFINED@%$LOCKDIR_USER_DEFINED%g
+s%@LOCKDIR@%$LOCKDIR%g
+s%@archlibdir@%$archlibdir%g
+s%@ARCHLIBDIR_USER_DEFINED@%$ARCHLIBDIR_USER_DEFINED%g
+s%@ARCHLIBDIR@%$ARCHLIBDIR%g
+s%@docdir@%$docdir%g
+s%@bitmapdir@%$bitmapdir%g
+s%@extra_objs@%$extra_objs%g
+s%@ld_dynamic_link_flags@%$ld_dynamic_link_flags%g
+s%@machfile@%$machfile%g
+s%@opsysfile@%$opsysfile%g
+s%@c_switch_general@%$c_switch_general%g
+s%@c_switch_window_system@%$c_switch_window_system%g
+s%@c_switch_all@%$c_switch_all%g
+s%@ld_switch_general@%$ld_switch_general%g
+s%@ld_switch_window_system@%$ld_switch_window_system%g
+s%@ld_switch_all@%$ld_switch_all%g
+s%@ld_libs_general@%$ld_libs_general%g
+s%@ld_libs_window_system@%$ld_libs_window_system%g
+s%@ld_libs_all@%$ld_libs_all%g
+s%@RECURSIVE_MAKE@%$RECURSIVE_MAKE%g
+s%@native_sound_lib@%$native_sound_lib%g
+s%@sound_cflags@%$sound_cflags%g
+s%@dynodump_arch@%$dynodump_arch%g
+s%@internal_makefile_list@%$internal_makefile_list%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+  if test $ac_beg -gt 1; then
+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+  else
+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+  fi
+  if test ! -s conftest.s$ac_file; then
+    ac_more_lines=false
+    rm -f conftest.s$ac_file
+  else
+    if test -z "$ac_sed_cmds"; then
+      ac_sed_cmds="sed -f conftest.s$ac_file"
+    else
+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+    fi
+    ac_file=`expr $ac_file + 1`
+    ac_beg=$ac_end
+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+  fi
+done
+if test -z "$ac_sed_cmds"; then
+  ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <<EOF
+
+CONFIG_FILES=\${CONFIG_FILES-"$ac_output_files"}
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    # The file is in a subdirectory.
+    test ! -d "$ac_dir" && mkdir "$ac_dir"
+    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
+
+  case "$ac_given_srcdir" in
+  .)  srcdir=.
+      if test -z "$ac_dots"; then top_srcdir=.
+      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+  *) # Relative path.
+    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+  case "$ac_given_INSTALL" in
+  [/$]*) INSTALL="$ac_given_INSTALL" ;;
+  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+  esac
+
+  echo creating "$ac_file"
+  rm -f "$ac_file"
+  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+  case "$ac_file" in
+  *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+  *) ac_comsub= ;;
+  esac
+
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s%^\([  ]*\)#\([        ]*define[       ][      ]*\)'
+ac_dB='\([     ][      ]*\)[^  ]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([  ]*\)#\([        ]*\)undef\([    ][      ]*\)'
+ac_uB='\([     ]\)%\1#\2define\3'
+ac_uC=' '
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([  ]*\)#\([        ]*\)undef\([    ][      ]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <<EOF
+  CONFIG_HEADERS="src/config.h lwlib/config.h"
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  echo creating $ac_file
+
+  rm -f conftest.frag conftest.in conftest.out
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  cat $ac_file_inputs > conftest.in
+
+EOF
+
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h.  And first:
+# Protect against being on the right side of a sed subst in config.status.
+# Protect against being in an unquoted here document in config.status.
+rm -f conftest.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >> conftest.vals <<\EOF
+s%^[   ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+EOF
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+while :
+do
+  ac_lines=`grep -c . conftest.vals`
+  # grep -c gives empty output for an empty file on some AIX systems.
+  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+  # Write a limited-size here document to conftest.frag.
+  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+  echo 'CEOF
+  sed -f conftest.frag conftest.in > conftest.out
+  rm -f conftest.in
+  mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+  rm -f conftest.vals
+  mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+cat >> $CONFIG_STATUS <<\EOF
+  rm -f conftest.frag conftest.h
+  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
+  cat conftest.in >> conftest.h
+  rm -f conftest.in
+  if cmp -s $ac_file conftest.h 2>/dev/null; then
+    echo "$ac_file is unchanged"
+    rm -f conftest.h
+  else
+    # Remove last slash and all that follows it.  Not all systems have dirname.
+      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+      # The file is in a subdirectory.
+      test ! -d "$ac_dir" && mkdir "$ac_dir"
+    fi
+    rm -f $ac_file
+    mv conftest.h $ac_file
+  fi
+fi; done
+
+EOF
+cat >> $CONFIG_STATUS <<EOF
+CPP="$CPP"
+ CPPFLAGS="$CPPFLAGS"
+ top_srcdir="$srcdir"
+ MAKE_SUBDIR="$MAKE_SUBDIR"
+
+EOF
+cat >> $CONFIG_STATUS <<\EOF
+for dir in $MAKE_SUBDIR; do
+  echo creating $dir/Makefile
+  (
+    cd $dir
+    rm -f junk.c
+    < Makefile.in \
+      sed -e '/^# Generated/d' \
+          -e 's%/\*\*/#.*%%' \
+          -e 's/^ *# */#/' \
+          -e '/^##/d' \
+          -e '/^#/ {
+p
+d
+}'        -e '/./ {
+s/\([\"]\)/\\\1/g
+s/^/"/
+s/$/"/
+}'  > junk.c;
+    $CPP -I. -I${top_srcdir}/src $CPPFLAGS junk.c > junk.cpp;
+    < junk.cpp                         \
+      sed -e 's/^#.*//'                        \
+       -e 's/^[        ][      ]*$//'  \
+       -e 's/^ /       /'                      \
+       | sed -n -e '/^..*$/p'          \
+       | sed '/^"/ {
+s/\\\([\"]\)/\1/g
+s/^[   ]*"//
+s/"[   ]*$//
+}'     > Makefile.new
+    chmod 444 Makefile.new
+    mv -f Makefile.new Makefile
+    rm -f junk.c junk.cpp
+)
+done
+
+sed < config.status >> lib-src/config.values \
+  -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
+  -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
+  -e 's/^\([^ ]*\) $/\1 ""/' \
+  -e 's/ 1$/ t/'
+
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
diff --git a/configure.in b/configure.in
new file mode 100644 (file)
index 0000000..3044365
--- /dev/null
@@ -0,0 +1,4070 @@
+dnl Define our own header notice with own copyright
+define([AC_INIT_NOTICE],
+[#### Configuration script for XEmacs.  Largely divergent from FSF.
+#### Guess values for system-dependent variables and create Makefiles.
+#### Generated automatically using autoconf version] AC_ACVERSION [
+#### Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#### Copyright (C) 1993-1995 Board of Trustees, University of Illinois.
+#### Copyright (C) 1996, 1997 Sun Microsystems, Inc.
+#### Copyright (C) 1995, 1996 Ben Wing.
+
+### Don't edit this script!
+### This script was automatically generated by the `autoconf' program
+### from the file `./configure.in'.
+### To rebuild it, execute the command
+###    autoconf
+### in the this directory.  You must have autoconf version 2.12 or later.
+
+### 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; see the file COPYING.  If not, write to the Free
+### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+### 02111-1307, USA.
+
+### For usage, run `./configure --help'
+### For more detailed information on building and installing XEmacs,
+### read the file `INSTALL'.
+###
+### If configure succeeds, it leaves its status in config.status.
+### A log of configuration tests can be found in config.log.
+### If configure fails after disturbing the status quo,
+###    config.status is removed.
+])
+
+dnl Since XEmacs has configuration requirements that autoconf cannot
+dnl meet, this file is an unholy marriage of custom-baked
+dnl configuration code and autoconf macros.
+
+dnl We use the m4 quoting characters [ ] (as established by the
+dnl autoconf system), so quote them like this: [[foo]]
+
+AC_PREREQ(2.12)dnl
+dnl Redefine some standard autoconf macros
+dnl here is how XEmacs is different:
+dnl - no cache file
+dnl - non-standard options
+dnl - suport for extra-verbosity
+dnl - ordinary libs are handled separately from X libs (might be a mistake)
+dnl - various random kludges (e.g. -with-dnet=no
+
+dnl PRINT_VAR(var var ...)  prints values of shell variables
+define([PRINT_VAR],[for var in patsubst([$1],[[
+]+],[ ]); do eval "echo \"$var = '\$$var'\""; done])
+
+dnl Disable cache files:
+dnl This is controversial, but I am convinced this is the right way to go,
+dnl at least by default.  Otherwise there are too many surprises.
+define([AC_CACHE_LOAD], )dnl
+define([AC_CACHE_SAVE], )dnl
+define([AC_CACHE_VAL], [
+$2
+])dnl
+
+dnl Redefine AC_TRY_RUN_NATIVE to not throw away stderr while running
+dnl AC_TRY_RUN_NATIVE(PROGRAM, [ACTION-IF-TRUE [, ACTION-IF-FALSE]])
+define([AC_TRY_RUN_NATIVE],
+[cat > conftest.$ac_ext <<EOF
+[#]line __oline__ "configure"
+#include "confdefs.h"
+[$1]
+EOF
+if AC_TRY_EVAL(ac_link) && test -s conftest && (./conftest; exit) 2>&AC_FD_CC
+then
+dnl Do not remove the temporary files here, so they can be examined.
+  ifelse([$2], , :, [$2])
+else
+  echo "configure: failed program was:" >&AC_FD_CC
+  cat conftest.$ac_ext >&AC_FD_CC
+ifelse([$3], , , [  rm -fr conftest*
+  $3
+])dnl
+fi
+rm -fr conftest*])dnl AC_TRY_RUN_NATIVE
+
+
+dnl Avoid spurious cross-compiling warnings from AC_TRY_RUN
+dnl XEmacs is unlikely to ever cross-compile
+define([AC_TRY_RUN],[AC_TRY_RUN_NATIVE([$1], [$2], [$3])])dnl
+
+dnl Redefine AC_DEFINE* to provide more output if extra_verbose
+dnl Set VARIABLE to VALUE, verbatim, or 1.
+dnl AC_DEFINE(VARIABLE [, VALUE])
+define([AC_DEFINE],
+[{ test "$extra_verbose" = "yes" && cat << \EOF
+    Defining $1[]ifelse($#, 2, [ = $2],)
+EOF
+cat >> confdefs.h <<\EOF
+[#define] $1 ifelse($#, 2, [$2], 1)
+EOF
+}
+])dnl AC_DEFINE
+
+define([AC_DEFINE_UNQUOTED],
+[{ test "$extra_verbose" = "yes" && cat << EOF
+    Defining $1[]ifelse($#, 2, [ = $2],)
+EOF
+cat >> confdefs.h <<EOF
+[#define] $1 ifelse($#, 2, [$2], 1)
+EOF
+}
+])dnl AC_DEFINE_UNQUOTED
+
+dnl redefine AC_CHECK_LIB in accordance with our own value of ac_link
+dnl Add in extra kludgy check to support with_dnet=no
+dnl Add in extra LDFLAGS arg, which PRECEDE libs
+dnl Support --with-dnet=no
+
+dnl AC_CHECK_LIB(LIBRARY, FUNCTION [, ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND
+dnl             [, OTHER-LIBRARIES] [, LDFLAGS]]]])
+define([AC_CHECK_LIB],
+[ifelse([$1],dnet, [if test "$with_dnet" = "no" ; then
+ac_cv_lib_dnet_dnet_ntoa=no
+ifelse([$4], , , [$4]
+)dnl
+else
+])]
+AC_CHECK_LIB_ORIG_HACKED([$1],[$2],[$3],[$4],[$5], [$6])
+[ifelse([$1],dnet,[fi
+])]dnl
+)dnl AC_CHECK_LIB
+
+define([AC_CHECK_LIB_ORIG_HACKED],
+[ifelse([$5],,AC_MSG_CHECKING([for $2 in -l$1]),
+xe_msg_checking="for [$2] in -l[$1]"
+test -n "[$5]" && xe_msg_checking="$xe_msg_checking using extra libs [$5]"
+AC_MSG_CHECKING("$xe_msg_checking"))
+dnl Use a cache variable name containing both the library and function name,
+dnl because the test really is for library $1 defining function $2, not
+dnl just for library $1.  Separate tests with the same $1 and different $2s
+dnl may have different results.
+ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'`
+AC_CACHE_VAL(ac_cv_lib_$ac_lib_var,
+[xe_check_libs="$6 -l$1 $5"
+AC_TRY_LINK(dnl
+ifelse([$2], [main], , dnl Avoid conflicting decl of main.
+[/* Override any gcc2 internal prototype to avoid an error.  */
+]ifelse(AC_LANG, CPLUSPLUS, [#ifdef __cplusplus
+extern "C"
+#endif
+])dnl
+[/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $2();
+]),
+           [$2()],
+           eval "ac_cv_lib_$ac_lib_var=yes",
+           eval "ac_cv_lib_$ac_lib_var=no")
+xe_check_libs=""
+])dnl
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes" ; then
+  AC_MSG_RESULT(yes)
+  ifelse([$3], ,
+[changequote(, )dnl
+  ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+changequote([, ])dnl
+  AC_DEFINE_UNQUOTED($ac_tr_lib)
+  XE_PREPEND([-l$1], LIBS)
+], [$3])
+else
+  AC_MSG_RESULT(no)
+ifelse([$4], , , [$4
+])dnl
+fi
+])dnl AC_CHECK_LIB_ORIG_HACKED
+
+
+dnl AC_LANG_C()
+define([AC_LANG_C],
+[define([AC_LANG], [C])dnl
+ac_ext=c
+dnl CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+dnl ac_cpp='$CPP $CPPFLAGS'
+dnl ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC'
+dnl ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&AC_FD_CC'
+xe_cppflags='$CPPFLAGS $c_switch_site $c_switch_machine $c_switch_system $c_switch_x_site $X_CFLAGS'
+xe_ldflags='$LDFLAGS $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_x_site $ld_switch_run'
+xe_libs='$ld_call_shared $xe_check_libs $X_EXTRA_LIBS $libs_x $X_PRE_LIBS $LIBS $libs_machine $libs_system $libs_standard'
+ac_cpp='$CPP '"$xe_cppflags"
+ac_compile='${CC-cc} -c $CFLAGS '"$xe_cppflags"' conftest.$ac_ext 1>&AC_FD_CC'
+ac_link='${CC-cc} -o conftest $CFLAGS '"$xe_cppflags $xe_ldflags"' conftest.$ac_ext '"$xe_libs"' 1>&AC_FD_CC'
+cross_compiling=no
+]) dnl AC_LANG_C
+
+dnl The construct foo=`echo $w1 $w2 $w3` fails on some systems if $w1 = -e or -n
+dnl So we use the following instead.
+dnl XE_SPACE(var, words)
+define([XE_SPACE],[
+T=""
+for W in $2; do if test -z "$T"; then T="$W"; else T="$T $W"; fi; done
+$1="$T"
+])dnl XE_SPACE
+
+dnl XE_ADD_OBJS(foo.o ...)
+define([XE_ADD_OBJS],
+[extra_objs="$extra_objs [$1]" && dnl
+ if test "$extra_verbose" = "yes"; then
+   echo "    xemacs will be linked with \"[$1]\""
+ fi])dnl XE_ADD_OBJS
+
+dnl XE_APPEND(value, varname)
+define([XE_APPEND],
+[[$2]="$[$2] [$1]" && dnl
+ if test "$extra_verbose" = "yes"; then echo "    Appending \"[$1]\" to \$[$2]"; fi])
+
+dnl XE_PREPEND(value, varname)
+define([XE_PREPEND],
+[[$2]="[$1] $[$2]" && dnl
+ if test "$extra_verbose" = "yes"; then echo "    Prepending \"[$1]\" to \$[$2]"; fi])
+
+
+dnl Initialize some variables set by options.
+dnl The variables have the same names as the options, with
+dnl dashes changed to underlines.
+
+define([AC_INIT_PARSE_ARGS],[
+
+dnl Get sane consistent behavior from various shells
+dnl Avoid losing with weird user CDPATHs
+
+if test -n "$ZSH_VERSION"; then
+  dnl zsh's Bourne shell emulation options
+  setopt NO_BAD_PATTERN NO_BANG_HIST NO_BG_NICE NO_EQUALS NO_FUNCTION_ARGZERO
+  setopt GLOB_SUBST NO_HUP INTERACTIVE_COMMENTS KSH_ARRAYS NO_MULTIOS NO_NOMATCH
+  setopt RM_STAR_SILENT POSIX_BUILTINS SH_FILE_EXPANSION SH_GLOB SH_OPTION_LETTERS
+  setopt SH_WORD_SPLIT BSD_ECHO IGNORE_BRACES
+  dnl zsh-3.1-beta drops core on the following
+  dnl unset CDPATH
+  if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
+elif test -n "$BASH_VERSION"; then
+  dnl Use Posix mode with bash
+  set -o posix
+  unset CDPATH
+else
+  if test -n "$CDPATH"; then CDPATH="."; export CDPATH; fi
+fi
+
+dnl Initialize some variables set by options.
+dnl The variables have the same names as the options, with
+dnl dashes changed to underlines.
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+dnl Installation directory options.
+dnl These are left unexpanded so users can "make install exec_prefix=/foo"
+dnl and all the variables that are supposed to be based on exec_prefix
+dnl by default will actually change.
+dnl Use braces instead of parens because sh, perl, etc. also accept them.
+dnl If you change these, you need to synchronize with the settings of the
+dnl various ..._USER_DEFINED variables further down.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${{exec_prefix}}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+dnl Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+dnl Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+])dnl AC_INIT_PARSE_ARGS
+
+AC_INIT(src/lisp.h)dnl
+AC_CONFIG_HEADER(src/config.h lwlib/config.h)
+dnl Remove any more than one leading "." element from the path name.
+dnl If we do not remove them, then another "./" will be prepended to
+dnl the file name each time we use config.status, and the program name
+dnl will get larger and larger.  This would not be a problem, except
+dnl that since progname gets recorded in all the Makefiles this script
+dnl produces, move-if-change thinks they're different when they're
+dnl not.
+dnl
+dnl It would be nice if we could put the ./ in a \( \) group and then
+dnl apply the * operator to that, so we remove as many leading './././'s
+dnl as are present, but some seds (like Ultrix's sed) don't allow you to
+dnl apply * to a \( \) group.  Bleah.
+progname="`echo $0 | sed 's:^\./\./:\./:'`"
+
+dnl -----------------------------
+dnl Establish some default values
+dnl -----------------------------
+
+XE_APPEND(lib-src, MAKE_SUBDIR)
+XE_APPEND(lib-src, INSTALL_ARCH_DEP_SUBDIR)
+
+dnl run_in_place='no'
+prefix='/usr/local'
+exec_prefix='${prefix}'
+bindir='${exec_prefix}/bin'
+dnl FSF 19.29 changes to:
+dnl datadir='${prefix}/share'
+dnl sharedstatedir='${prefix}/com'
+dnl libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/lib'
+statedir='${prefix}/lib'
+libdir='${exec_prefix}/lib'
+mandir='${prefix}/man/man1'
+infodir='${datadir}/${PROGNAME}-${version}/info'
+infopath=''
+install_pp=''
+lispdir='${datadir}/${PROGNAME}-${version}/lisp'
+dnl sitelispdir='${datadir}/xemacs/site-lisp'
+pkgdir='${datadir}/${PROGNAME}-${version}/lisp'
+package_path=''
+etcdir='${datadir}/${PROGNAME}-${version}/etc'
+lockdir='${statedir}/${PROGNAME}/lock'
+archlibdir='${libdir}/${PROGNAME}-${version}/${configuration}'
+with_site_lisp='no'
+with_menubars=''
+with_scrollbars=''
+with_dialogs=''
+with_file_coding=''
+dnl const_is_losing is removed - we rely on AC_C_CONST instead.
+dnl We accept (and ignore) the --const-is-losing option for compatibility.
+dnl const_is_losing='yes'
+puresize=''
+cpp='' cppflags='' libs='' ldflags=''
+dynamic=''
+with_x11=''
+with_msw=''
+rel_alloc='default'
+with_system_malloc='default'
+with_dlmalloc='default'
+native_sound_lib=''
+dnl use_assertions should be 'yes' by default.  Too many people in this
+dnl world have core dumps turned off by default or \"cannot find where the
+dnl core file went\".  At least we should get some useful output ...
+use_assertions="yes"
+dnl the following is set to yes or no later.
+with_toolbars=""
+with_tty=""
+use_union_type="no"
+with_dnet=""
+
+dnl ------------------
+dnl Options Processing
+dnl ------------------
+
+define([USAGE_ERROR],
+[(echo "$progname: Usage error:"
+echo " " $1
+echo "  Use \`$progname --help' to show usage.") >&2 && exit 1])
+
+dnl Record all the arguments, so we can save them in config.status.
+arguments="$@"
+
+dnl Shell Magic: Quote the quoted arguments in ARGUMENTS.  At a later date,
+dnl in order to get the arguments back in $@, we have to do an
+dnl 'eval set x "$quoted_arguments"; shift'
+dnl # We use sed to turn embedded ' into '"'"'.  I truly hate sh quoting.
+quoted_sed_magic=s/"'"/"'"'"'"'"'"'"'"/g
+quoted_arguments=
+for i in "$@"; do
+   case "$i" in
+   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+   | --no-cr | --no-c) ;;
+   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+   *)
+   quoted_i="`echo '' $i | sed -e 's:^ ::' -e $quoted_sed_magic`"
+   quoted_arguments="$quoted_arguments '$quoted_i'" ;;
+   esac
+done
+
+dnl Do not use shift -- that destroys the argument list, which autoconf needs
+dnl to produce config.status.  It turns out that "set - $arguments" does not
+dnl work portably.
+dnl However, it also turns out that many shells cannot expand ${10} at all.
+dnl So using an index variable does not work either.  It is possible to use
+dnl some shell magic to make 'set x "$arguments"; shift' work portably.
+while test $# != 0; do
+  arg="$1"; shift
+  case "$arg" in
+    --no-create|--no-recursion) ;;
+    dnl Anything starting with a hyphen we assume is an option.
+    -* )
+      dnl Separate the switch name from the value it is being given.
+      case "$arg" in
+        -*=*)
+         opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\([[^=]]*\)=.*$:\1:'`
+         val=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*[[^=]]*=\(.*\)$:\1:'`
+         valomitted=no
+       ;;
+           dnl special case these strings since echo may silently eat them:
+           dnl --help ) opt=help val=yes valomitted=yes ;;
+           dnl --version ) opt=version val=yes valomitted=yes ;;
+           dnl -e ) opt=e val=yes valomitted=yes ;;
+           dnl -E ) opt=E val=yes valomitted=yes ;;
+           dnl -n ) opt=n val=yes valomitted=yes ;;
+        -*)
+           dnl If FOO is a boolean argument, --FOO is equivalent to
+           dnl --FOO=yes.  Otherwise, the value comes from the next
+           dnl argument - see below.
+         opt=`echo '' $arg | sed -e 's:^ ::' -e 's:^-*\(.*\)$:\1:'`
+          val="yes" valomitted=yes
+        ;;
+      esac
+
+      dnl translate "-" in option string to "_"
+      optname="$opt"
+      opt="`echo '' $opt | sed -e 's:^ ::' | tr - _`"
+
+      dnl Support --without-FOO as a synonym for --with-FOO=no
+      case "${valomitted}-${opt}" in yes-without_* )
+       opt=`echo $opt | sed 's/without/with/'`
+       valomitted="no" val="no" ;;
+      esac
+
+      dnl Process the option.
+      case "$opt" in
+
+      dnl Process (many) boolean options
+       run_in_place    | \
+        with_site_lisp  | \
+       with_x          | \
+       with_x11        | \
+       with_msw        | \
+       with_gcc        | \
+       with_gnu_make   | \
+       dynamic         | \
+       with_ncurses    | \
+       with_dnet       | \
+       with_socks      | \
+       with_dragndrop  | \
+       with_cde        | \
+       with_offix      | \
+       with_gpm        | \
+       with_xpm        | \
+       with_xface      | \
+       with_gif        | \
+       with_jpeg       | \
+       with_png        | \
+       with_tiff       | \
+       with_session    | \
+       with_xmu        | \
+       with_quantify   | \
+       with_toolbars   | \
+       with_tty        | \
+       with_xfs        | \
+       with_i18n3      | \
+       with_mule       | \
+       with_file_coding        | \
+       with_canna      | \
+       with_wnn        | \
+       with_wnn6       | \
+       with_workshop   | \
+       with_sparcworks | \
+       with_tooltalk   | \
+       with_ldap       | \
+       with_pop        | \
+       with_kerberos   | \
+       with_hesiod     | \
+       with_dnet       | \
+       with_infodock   | \
+       external_widget | \
+       verbose         | \
+       extra_verbose   | \
+       const_is_losing | \
+       usage_tracking  | \
+       use_union_type  | \
+       debug           | \
+       use_assertions  | \
+       use_minimal_tagbits                     | \
+       use_indexed_lrecord_implementation      | \
+       gung_ho         | \
+       use_assertions  | \
+       memory_usage_stats | \
+       with_clash_detection | \
+       with_shlib | \
+       no_doc_file )
+         dnl Make sure the value given was either "yes" or "no".
+         case "$val" in
+           y | ye | yes )      val=yes ;;
+           n | no )            val=no  ;;
+           * ) USAGE_ERROR("The \`--$optname' option requires a boolean value: \`yes' or \`no'.") ;;
+         esac
+          eval "$opt=\"$val\"" ;;
+
+
+       dnl Options that take a user-supplied value, as in --puresize=8000000
+       dnl The cache-file option is ignored (for compatibility with other configures)
+       srcdir          | \
+       compiler        | \
+       cflags          | \
+       cpp             | \
+       cppflags        | \
+       libs            | \
+       ldflags         | \
+       puresize        | \
+       cache_file      | \
+       native_sound_lib | \
+       site_lisp       | \
+       x_includes      | \
+       x_libraries     | \
+       site_includes   | \
+       site_libraries  | \
+       site_prefixes   | \
+       site_runtime_libraries )
+         dnl If the value was omitted, get it from the next argument.
+         if test "$valomitted" = "yes" ; then
+           dnl Get the next argument from the argument list, if there is one.
+           if test "$#" = 0 ; then
+             USAGE_ERROR("The \`--$optname' option requires a value.");
+           fi
+           val="$1"; shift
+         fi
+          eval "$opt=\"$val\""
+       ;;
+
+       dnl Options that take "yes", "no", or "default" values
+       rel_alloc | \
+       with_dlmalloc | \
+       with_debug_malloc  | use_debug_malloc | \
+       with_system_malloc | use_system_malloc )
+         case "$val" in
+           y | ye | yes )      val=yes ;;
+           n | no )            val=no  ;;
+           d | de | def | defa | defau | defaul | default ) val=default ;;
+           * ) USAGE_ERROR(["The \`--$optname' option requires one of these values:
+  \`yes', \`no', or \`default'."]) ;;
+         esac
+         case "$opt" in use_* ) opt="`echo $opt | sed s/use/with/`" ;; esac
+          eval "$opt=\"$val\""
+        ;;
+
+        dnl Has the user requested database support?
+        "with_database" )
+         with_database_berkdb=no
+         with_database_dbm=no
+         with_database_gnudbm=no
+         for x in `echo "$val" | sed -e 's/,/ /g'` ; do
+           case "$x" in
+               no ) ;;
+               b | be | ber | berk | berkd | berkdb )  with_database_berkdb=yes ;;
+               d | db | dbm )                          with_database_dbm=yes    ;;
+               g | gn | gnu | gnud | gnudb | gnudbm )  with_database_gnudbm=yes ;;
+               * ) USAGE_ERROR(["The \`--$optname' option value
+  must be either \`no' or a comma-separated list
+  of one or more of \`berkdb', \`dbm', or \`gnudbm'."]) ;;
+            esac
+         done
+         if test "$with_database_dbm"    = "yes" -a \
+                 "$with_database_gnudbm" = "yes"; then
+         USAGE_ERROR("Only one of \`dbm' and \`gnudbm' may be specified
+  with the \`--$optname' option.")
+         fi
+        ;;
+
+        dnl Has the user requested sound support?
+       "with_sound" )
+         dnl value can be native, nas or both. yes is allowed
+         dnl as a backwards compatible synonym for native
+         case "$val" in
+           y | ye | yes )                      val=native ;;
+           n | no | non | none )               val=no;;
+           na | nat | nati | nativ | native )  val=native  ;;
+           ne | net | neta | netau | netaud | netaudi | netaudio | nas ) val=nas  ;;
+           b | bo | bot | both )               val=both;;
+           * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
+  \`native', \`nas', \`both', or \`none'."]) ;;
+         esac
+          eval "$opt=\"$val\""
+        ;;
+
+        dnl Has the user requested XIM support?
+       "with_xim" )
+         case "$val" in
+           y | ye | yes )                val=yes   ;;
+           n | no | non | none )         val=no    ;;
+           x | xl | xli | xlib )         val=xlib  ;;
+           m | mo | mot | moti | motif ) val=motif ;;
+           * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
+  \`motif', \`xlib', \`yes', or \`no'."]) ;;
+         esac
+          eval "$opt=\"$val\""
+        ;;
+
+        dnl XFontSet support?
+       "with_xfs" )
+         case "$val" in
+         y | ye | yes )                val=yes ;;
+         n | no | non | none )         val=no  ;;
+         * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
+ \`yes', or \`no'."]) ;;
+         esac
+         eval "$opt=\"$val\""
+       ;;
+
+        dnl Mail locking specification
+       "mail_locking" )
+         case "$val" in
+           lockf )     val=lockf ;;
+           flock )     val=flock ;;
+           file )      val=file  ;;
+           * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
+  \`lockf', \`flock', or \`file'."]) ;;
+         esac
+          eval "$opt=\"$val\""
+        ;;
+
+        dnl Has the user requested error-checking?
+       "error_checking" )
+         dnl value can be all, none, and/or a list of categories to check.
+         dnl Example: --error-checking=all,noextents,nobufpos
+         dnl Example: --error-checking=none,malloc,gc
+
+         for x in `echo "$val" | sed -e 's/,/ /g'` ; do
+           case "$x" in
+             dnl all and none are only permitted as the first in the list.
+             n | no | non | none ) new_default=no ;;
+             a | al | all )        new_default=yes ;;
+
+             extents )       error_check_extents=yes ;;
+             noextents )     error_check_extents=no ;;
+
+             typecheck )     error_check_typecheck=yes ;;
+             notypecheck )   error_check_typecheck=no ;;
+
+             bufpos )        error_check_bufpos=yes ;;
+             nobufpos )      error_check_bufpos=no ;;
+
+             gc )            error_check_gc=yes ;;
+             nogc )          error_check_gc=no ;;
+
+             malloc )        error_check_malloc=yes ;;
+             nomalloc )      error_check_malloc=no ;;
+
+             * ) bogus_error_check=yes ;;
+           esac
+           if test "$bogus_error_check" -o \
+                \( -n "$new_default" -a -n "$echeck_notfirst" \) ; then
+               if test "$error_check_default" = yes ; then
+                 types="\`all' (default), \`none', \`noextents', \`notypecheck', \`nobufpos', \`nogc', and \`nomalloc'."
+               else
+                 types="\`all', \`none' (default), \`extents', \`typecheck', \`bufpos', \`gc', and \`malloc'."
+               fi
+               USAGE_ERROR(["Valid types for the \`--$optname' option are:
+  $types."])
+           elif test -n "$new_default" ; then
+               error_check_extents=$new_default
+               error_check_typecheck=$new_default
+               error_check_bufpos=$new_default
+               error_check_gc=$new_default
+               error_check_malloc=$new_default
+               new_default=    # reset this
+           fi
+           echeck_notfirst=true
+         done
+       ;;
+
+       dnl Has the user tried to tell us where the X files are?
+       dnl I think these are dopey, but no less than three alpha
+       dnl testers, at large sites, have said they have their X files
+       dnl installed in odd places.
+
+       dnl Has the user specified one of the path options?
+       prefix | exec_prefix | bindir | datadir | statedir | libdir | \
+       mandir | infodir | infopath | lispdir | etcdir | lockdir | pkgdir | \
+       archlibdir | docdir | package_path )    
+          dnl If the value was omitted, get it from the next argument.
+          if test "$valomitted" = "yes"; then
+            if test "$#" = 0; then
+                USAGE_ERROR("The \`--$optname' option requires a value.");
+            fi
+            val="$1"; shift
+          fi
+          eval "$opt=\"$val\""
+
+           dnl You need to synchronize this with the way the
+           dnl default values are built.
+          case "$opt" in
+             lispdir ) AC_DEFINE(LISPDIR_USER_DEFINED) ;;
+dnl             sitelispdir ) AC_DEFINE(SITELISPDIR_USER_DEFINED) ;;
+             etcdir  )  AC_DEFINE(ETCDIR_USER_DEFINED) ;;
+             infodir ) AC_DEFINE(INFODIR_USER_DEFINED) ;;
+             infopath ) AC_DEFINE(INFOPATH_USER_DEFINED) ;;
+             package_path ) AC_DEFINE(PACKAGE_PATH_USER_DEFINED) ;;
+             datadir )
+               AC_DEFINE(INFODIR_USER_DEFINED)
+               AC_DEFINE(LISPDIR_USER_DEFINED)
+               AC_DEFINE(ETCDIR_USER_DEFINED) ;;
+             statedir | lockdir ) AC_DEFINE(LOCKDIR_USER_DEFINED) ;;
+             exec_prefix | libdir | archlibdir ) AC_DEFINE(ARCHLIBDIR_USER_DEFINED) ;;
+           esac
+       ;;
+
+       dnl --no-create added by autoconf for use by config.status
+       "no_create" ) ;;
+
+       dnl Has the user asked for some help?
+       "usage" | "help" ) ${PAGER-more} ${srcdir}/configure.usage; exit 0 ;;
+
+       dnl Has the user specified what toolkit to use for the menubars,
+       dnl scrollbar or dialogs?
+       "with_menubars" | "with_scrollbars" | "with_dialogs" )
+         case "$val" in
+           l | lu | luc | luci | lucid )               val=lucid  ;;
+           m | mo | mot | moti | motif )               val=motif  ;;
+           athena3d | athena-3d )                      val=athena3d ;;
+           a | at | ath | athe | athen | athena )      val=athena ;;
+           n | no | non | none )                       val=no ;;
+           * ) USAGE_ERROR(["The \`--$optname' option must have one of these values:
+  \`lucid', \`motif', \`athena', \`athena3d', or \`no'."]) ;;
+         esac
+         eval "$opt=\"$val\""
+       ;;
+
+        dnl Fail on unrecognized arguments.
+       * ) USAGE_ERROR("Unrecognized option: $arg") ;;
+
+      esac
+    ;;
+
+    dnl Assume anything with multiple hyphens is a configuration name.
+    *-*-*) configuration="$arg" ;;
+
+    dnl Anything else is an error
+    *) USAGE_ERROR("Unrecognized argument: $arg") ;;
+
+  esac
+done
+
+dnl -------------------------
+dnl Finish options processing
+dnl -------------------------
+
+dnl Several options are equivalent to, and override, environment variables.
+test -n "$cpp"      && CPP="$cpp"
+test -n "$cppflags" && CPPFLAGS="$cppflags"
+test -n "$libs"     && LIBS="$libs"
+test -n "$ldflags"  && LDFLAGS="$ldflags"
+
+dnl Get the arguments back.  See the diatribe on Shell Magic above.
+eval set x "$quoted_arguments"; shift
+
+dnl --extra-verbose implies --verbose
+test "$extra_verbose" = "yes" && verbose=yes
+
+dnl Allow use of either ":" or spaces for lists of directories
+define(COLON_TO_SPACE,
+  [case "$[$1]" in *:* [)] [$1]="`echo '' $[$1] | sed -e 's/^ //' -e 's/:/ /g'`";; esac])dnl
+COLON_TO_SPACE(site_includes)
+COLON_TO_SPACE(site_libraries)
+COLON_TO_SPACE(site_prefixes)
+COLON_TO_SPACE(site_runtime_libraries)
+
+dnl with_x is an obsolete synonym for with_x11
+test -n "$with_x" && with_x11="$with_x"
+
+dnl --gung-ho=val is a synonym for
+dnl --use-minimal-tagbits=val --use-indexed-lrecord-implementation=val
+
+if test -n "$gung_ho"; then
+  test -z "$use_minimal_tagbits" && use_minimal_tagbits="$gung_ho"
+  test -z "$use_indexed_lrecord_implementation" && \
+    use_indexed_lrecord_implementation="$gung_ho"
+fi
+if test "$use_minimal_tagbits" = "no"; then
+  test "$with_dlmalloc" = "yes" && \
+    USAGE_ERROR("--with-dlmalloc requires --use-minimal-tagbits")
+  with_dlmalloc=no
+fi
+
+dnl XE_CHECK_FEATURE_DEPENDENCY(feature1, feature2)
+define([XE_CHECK_FEATURE_DEPENDENCY],
+[if test "$with_$1 $with_$2" = "yes no"; then
+  USAGE_ERROR("--with-$1 requires --with-$2")
+elif test "$with_$2" = "no" ; then with_$1=no
+elif test "$with_$1" = "yes"; then with_$2=yes
+fi
+])
+
+dnl CDE requires tooltalk
+XE_CHECK_FEATURE_DEPENDENCY(cde, tooltalk)
+
+dnl Ignore useless run-in-place flag
+if test "$run_in_place" = "yes"; then
+  AC_MSG_WARN("The --run-in-place option is ignored because it is unnecessary.")
+fi
+
+dnl Find the source directory.
+case "$srcdir" in
+
+  dnl If srcdir is not specified, see if  "." or ".." might work.
+  "" )
+    for dir in "`echo $0 | sed 's|//|/|' | sed 's|/[[^/]]*$||'`" "." ".." ; do
+      if test -f "$dir/src/lisp.h" -a \
+             -f "$dir/lisp/version.el" ; then
+        srcdir="$dir"
+        break
+      fi
+    done
+    if test -z "$srcdir" ; then
+      USAGE_ERROR(["Neither the current directory nor its parent seem to
+  contain the XEmacs sources.  If you do not want to build XEmacs in its
+  source tree, you should run \`$progname' in the directory in which
+  you wish to build XEmacs, using the \`--srcdir' option to say where the
+  sources may be found."])
+    fi
+  ;;
+
+  dnl Otherwise, check if the directory they specified is okay.
+  * )
+    if test ! -f "$srcdir/src/lisp.h" -o \
+           ! -f "$srcdir/lisp/version.el" ; then
+      USAGE_ERROR(["The directory specified with the \`--srcdir' option,
+  \`$srcdir', doesn't seem to contain the XEmacs sources.  You should
+  either run the \`$progname' script at the top of the XEmacs source
+  tree, or use the \`--srcdir' option to specify the XEmacs source directory."])
+    fi
+  ;;
+esac
+
+dnl ###########################################################################
+if test -z "$configuration"; then
+  AC_MSG_CHECKING("host system type")
+  dnl Guess the configuration and remove 4th name component, if present.
+  if configuration=`${CONFIG_SHELL-/bin/sh} $srcdir/config.guess | \
+    sed '[s/^\([^-][^-]*-[^-][^-]*-[^-][^-]*\)-.*$/\1/]'` ; then
+    AC_MSG_RESULT($configuration)
+  else
+    AC_MSG_RESULT(unknown)
+    USAGE_ERROR(["XEmacs has not been ported to this host type.
+Try explicitly specifying the CONFIGURATION when rerunning configure."])
+  fi
+fi
+
+AC_PROG_LN_S
+
+dnl Make symlinks for etc, lisp, and info directories while the path
+dnl is still relative.  We do not symlink lock because someone may
+dnl have stuck the source on a read-only partition.  Instead we
+dnl create it as an actual directory later on if it does not already
+dnl exist.
+for dir in lisp etc man info; do
+  if test ! -d "$dir" ; then
+    echo Making symbolic link to "$srcdir/$dir"
+    ${LN_S} "$srcdir/$dir" "$dir"
+  fi
+done
+
+dnl Calculate canonical name for blddir (i.e. current directory).
+dnl PWD may already be the preferable absolute name for ".",
+dnl but we can't trust it - it is sometimes inaccurate.
+absolute_pwd="`pwd`";
+if test -n "$PWD" -a "`cd $PWD && pwd`" = "$absolute_pwd"
+then blddir="$PWD"
+else blddir="$absolute_pwd"
+fi
+AC_SUBST(blddir)
+
+dnl Make srcdir absolute, if not already.  It is important to
+dnl avoid running the path through pwd unnecessary, since pwd can
+dnl give you automounter prefixes, which can go away.
+case "$srcdir" in
+  /* ) ;;
+  .  ) srcdir="$blddir" ;;
+  *  ) srcdir="`cd $srcdir && pwd`" ;;
+esac
+
+dnl Check if the source directory already has a configured system in it.
+if test `pwd` != `sh -c cd $srcdir && pwd`  \
+   && test -f "$srcdir/src/config.h"; then
+  (echo "$progname: WARNING: The directory tree \`$srcdir' is being used"
+   echo "   as a build directory right now; it has been configured in its own"
+   echo "   right.  To configure in another directory as well, you MUST"
+   echo "   use GNU make.  If you do not have GNU make, then you must"
+   echo "   now do \`make distclean' in $srcdir,"
+   echo "   and then run $progname again.") >&2
+  extrasub='/^VPATH[[   ]]*=/c\
+vpath %.c $(srcdir)\
+vpath %.h $(srcdir)\
+vpath %.y $(srcdir)\
+vpath %.l $(srcdir)\
+vpath %.s $(srcdir)\
+vpath %.in $(srcdir)'
+fi
+
+dnl ----------------------------------------
+dnl Find out which version of XEmacs this is
+dnl ----------------------------------------
+. "$srcdir/version.sh" || exit 1;
+dnl Must do the following first to determine verbosity for AC_DEFINE
+if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi
+: "${extra_verbose=$beta}"
+version="${emacs_major_version}.${emacs_minor_version}"
+AC_DEFINE_UNQUOTED(EMACS_MAJOR_VERSION, $emacs_major_version)
+AC_DEFINE_UNQUOTED(EMACS_MINOR_VERSION, $emacs_minor_version)
+if test -n "$emacs_beta_version"; then
+  version="${version}-b${emacs_beta_version}"
+  AC_DEFINE_UNQUOTED(EMACS_BETA_VERSION, $emacs_beta_version)
+fi
+AC_DEFINE_UNQUOTED(XEMACS_CODENAME, "$xemacs_codename")
+AC_DEFINE_UNQUOTED(EMACS_VERSION, "$version")
+
+if test "$with_infodock" = "yes"; then
+  if test ! -f ../ID-INSTALL; then
+    echo "Cannot build InfoDock without InfoDock sources"
+    with_infodock=no
+  fi
+fi
+
+if test "$with_infodock" = "yes"; then
+  dnl InfoDock version numbers.  XEmacs will use the same style of numbering
+  dnl after the release of XEmacs 21.0.
+  AC_DEFINE_UNQUOTED(INFODOCK_MAJOR_VERSION, $infodock_major_version)
+  AC_DEFINE_UNQUOTED(INFODOCK_MINOR_VERSION, $infodock_minor_version)
+  AC_DEFINE_UNQUOTED(INFODOCK_BUILD_VERSION, $infodock_build_version)
+  version=${infodock_major_version}.${infodock_minor_version}.${infodock_build_version}
+  PROGNAME=infodock
+  CPPFLAGS="$CPPFLAGS -DINFODOCK"
+else
+  PROGNAME=xemacs
+fi
+
+dnl ----------------------------------
+dnl Error checking and debugging flags
+dnl ----------------------------------
+dnl Error checking default to "yes" in beta versions, to "no" in releases.
+dnl Same goes for --debug and --extra-verbosity.
+if test -n "$emacs_beta_version"; then beta=yes; else beta=no; fi
+test "${error_check_extents=$beta}"   = yes && AC_DEFINE(ERROR_CHECK_EXTENTS)
+test "${error_check_typecheck=$beta}" = yes && AC_DEFINE(ERROR_CHECK_TYPECHECK)
+test "${error_check_bufpos=$beta}"    = yes && AC_DEFINE(ERROR_CHECK_BUFPOS)
+test "${error_check_gc=$beta}"        = yes && AC_DEFINE(ERROR_CHECK_GC)
+test "${error_check_malloc=$beta}"    = yes && AC_DEFINE(ERROR_CHECK_MALLOC)
+dnl debug=yes must be set when error checking is present.  This should be
+dnl fixed up.
+dnl debug implies other options
+if test "${debug:=$beta}" = "yes"; then
+  use_assertions=yes memory_usage_stats=yes
+  XE_ADD_OBJS(debug.o)
+  AC_DEFINE(DEBUG_XEMACS)
+fi
+test "$use_assertions"     = "yes" && AC_DEFINE(USE_ASSERTIONS)
+test "$memory_usage_stats" = "yes" && AC_DEFINE(MEMORY_USAGE_STATS)
+
+dnl ------------------------------
+dnl Determine the s&m files to use
+dnl ------------------------------
+dnl Given the configuration name, set machfile and opsysfile to the
+dnl names of the m/*.h and s/*.h files we should use.
+
+dnl Canonicalize the configuration name.
+AC_CHECKING("the configuration name")
+dnl allow -workshop suffix on configuration name
+internal_configuration=`echo $configuration | sed 's/-\(workshop\)//'`
+if canonical=`$srcdir/config.sub "$internal_configuration"` ; then : ; else
+  exit $?
+fi
+
+dnl If you add support for a new configuration, add code to this
+dnl switch statement to recognize your configuration name and select
+dnl the appropriate operating system and machine description files.
+
+dnl You would hope that you could choose an m/*.h file pretty much
+dnl based on the machine portion of the configuration name, and an s-
+dnl file based on the operating system portion.  However, it turns out
+dnl that each m/*.h file is pretty manufacturer-specific - for
+dnl example, apollo.h, hp9000s300.h, mega68k, news.h, and tad68k are
+dnl all 68000 machines; mips.h, pmax.h, and news-risc are all MIPS
+dnl machines.  So we basically have to have a special case for each
+dnl configuration name.
+
+dnl As far as handling version numbers on operating systems is
+dnl concerned, make sure things will fail in a fixable way.  If
+dnl /etc/MACHINES says nothing about version numbers, be
+dnl prepared to handle anything reasonably.  If version numbers
+dnl matter, be sure /etc/MACHINES says something about it.
+
+dnl Eric Raymond says we should accept strings like "sysvr4" to mean
+dnl "System V Release 4"; he writes, "The old convention encouraged"
+dnl "confusion between `system' and `release' levels'."
+
+machine='' opsys=''
+
+dnl Straightforward machine determination
+case "$canonical" in
+  sparc-*-*        ) machine=sparc ;;
+  alpha-*-*        ) machine=alpha ;;
+  vax-*-*          ) machine=vax ;;
+  mips-dec-*       ) machine=pmax ;;
+  mips-sgi-*       ) machine=iris4d ;;
+  romp-ibm-*       ) machine=ibmrt ;;
+  rs6000-ibm-aix*  ) machine=ibmrs6000 ;;
+  powerpc-ibm-aix* ) machine=ibmrs6000 ;;
+  powerpc*-*       ) machine=powerpc ;;
+  hppa-*-*         ) machine=hp800 ;;
+  m88k-dg-*        ) machine=aviion ;;
+  m68*-sony-*      ) machine=news ;;
+  mips-sony-*      ) machine=news-risc ;;
+  clipper-*        ) machine=clipper ;;
+esac
+
+dnl Straightforward OS determination
+case "$canonical" in
+  *-*-linux*    ) opsys=linux ;;
+  *-*-netbsd*   ) opsys=netbsd ;;
+  *-*-openbsd* ) opsys=openbsd ;;
+  *-*-nextstep* ) opsys=nextstep ;;
+  *-*-vms       ) opsys=vms ;;
+
+  dnl DEC OSF
+  *-dec-osf1.3 | *-dec-osf2* ) opsys=decosf1-3 ;;
+  *-dec-osf1.2 | *-dec-osf1* ) opsys=decosf1-2 ;;
+  *-dec-osf3.[[2-9]]         ) opsys=decosf3-2 ;;
+  *-dec-osf3*                ) opsys=decosf3-1 ;;
+  *-dec-osf4*                ) opsys=decosf4-0 ;;
+
+  dnl DEC Ultrix
+  *-*-ultrix[[0-3]].* | *-*-ultrix4.0* ) opsys=bsd4-2 ;;
+  *-*-ultrix4.[[12]]* ) opsys=bsd4-3 ;;
+  *-*-ultrix* )         opsys=ultrix4-3 ;;
+
+  dnl AIX
+  *-*-aix3.1*  ) opsys=aix3-1  ;;
+  *-*-aix3.2.5 ) opsys=aix3-2-5        ;;
+  *-*-aix3*    ) opsys=aix3-2  ;;
+  *-*-aix4.2*  ) opsys=aix4-2  ;;
+  *-*-aix4.1*  ) opsys=aix4-1  ;;
+  *-*-aix4*    ) opsys=aix4    ;;
+
+  dnl Other generic OSes
+  *-gnu* )                     opsys=gnu    ;;
+  *-*-bsd4.[[01]] )            opsys=bsd4-1 ;;
+  *-*-bsd4.2 )                 opsys=bsd4-2 ;;
+  *-*-bsd4.3 )                 opsys=bsd4-3 ;;
+  *-*-aos4.2 )                 opsys=bsd4-2 ;;
+  *-*-aos*   )                 opsys=bsd4-3 ;;
+  *-*-sysv0    | *-*-sysvr0 )  opsys=usg5-0 ;;
+  *-*-sysv2    | *-*-sysvr2 )  opsys=usg5-2 ;;
+  *-*-sysv2.2  | *-*-sysvr2.2 )        opsys=usg5-2-2 ;;
+  *-*-sysv3*   | *-*-sysvr3* ) opsys=usg5-3 ;;
+  *-*-sysv4.1* | *-*-sysvr4.1* )opsys=usg5-4 NON_GNU_CPP=/usr/lib/cpp ;;
+  *-*-sysv4.[[2-9]]* | *-sysvr4.[[2-9]]* )
+       if test -z "$NON_GNU_CPP" ; then
+         for prog in "/usr/ccs/lib/cpp" "/lib/cpp"; do
+           if test -f "$prog"; then NON_GNU_CPP="$prog"; break; fi
+         done
+       fi
+       opsys=usg5-4-2 ;;
+    *-sysv4* | *-sysvr4* )     opsys=usg5-4 ;;
+    *-*-mach_bsd4.3* )          opsys=mach-bsd4-3 ;;
+esac
+
+case "$canonical" in
+
+  dnl NetBSD ports
+  *-*-netbsd* )
+    case "$canonical" in
+      i[[3-9]]86-*-netbsd*) machine=intel386 ;;
+      hp300-*-netbsd* | amiga-*-netbsd* | sun3-*-netbsd* | mac68k-*-netbsd* | da30-*-netbsd* | m68k-*-netbsd* )
+                      dnl Yes, this is somewhat bogus.
+                      machine=hp9000s300 ;;
+      pc532-*-netbsd* | ns32k-*-netbsd* )  machine=ns32000 ;;
+      pmax-*-netbsd*  | mips-*-netbsd*  )  machine=pmax ;;
+    esac
+  ;;
+
+  dnl OpenBSD ports
+  *-*-openbsd* )
+    case "${canonical}" in
+      alpha*-*-openbsd*)       machine=alpha ;;
+      i386-*-openbsd*)         machine=intel386 ;;
+      m68k-*-openbsd*)         machine=hp9000s300 ;;
+      mipsel-*-openbsd*)       machine=pmax ;;
+      ns32k-*-openbsd*)                machine=ns32000 ;;
+      sparc-*-openbsd*)                machine=sparc ;;
+      vax-*-openbsd*)          machine=vax ;;
+     esac
+   ;;
+
+  dnl Acorn RISCiX:
+  arm-acorn-riscix1.1* ) machine=acorn opsys=riscix1-1 ;;
+  arm-acorn-riscix1.2* | arm-acorn-riscix ) machine=acorn opsys=riscix1-2 ;;
+
+  dnl Alliant machines
+  fx80-alliant-* ) machine=alliant4     opsys=bsd4-2 ;;
+  i860-alliant-* ) machine=alliant-2800 opsys=bsd4-3 ;;
+
+  dnl Altos 3068
+  m68*-altos-sysv* ) machine=altos opsys=usg5-2 ;;
+
+  dnl Amdahl UTS
+  580-amdahl-sysv* ) machine=amdahl opsys=usg5-2-2 ;;
+
+  dnl Apollo, Domain/OS
+  m68*-apollo-* ) machine=apollo opsys=bsd4-3 ;;
+
+  dnl AT&T 3b2, 3b5, 3b15, 3b20
+  we32k-att-sysv* ) machine=att3b opsys=usg5-2-2 ;;
+
+  dnl AT&T 3b1 - The Mighty Unix PC!
+  m68*-att-sysv* ) machine=7300 opsys=usg5-2-2 ;;
+
+  dnl Bull machines
+  rs6000-bull-bosx* ) machine=ibmrs6000 opsys=aix3-2 ;; # dpx20
+  m68*-bull-sysv3*  ) machine=dpx2      opsys=usg5-3 ;; # dpx2
+  m68*-bull-sysv2*  ) machine=sps7      opsys=usg5-2 ;; # sps7
+
+  dnl CCI 5/32, 6/32 -- see "Tahoe".
+
+  dnl Celerity
+  celerity-celerity-bsd* ) machine=celerity opsys=bsd4-2 ;;
+
+  dnl Convex
+  *-convex-bsd* | *-convex-convexos* )
+    machine=convex opsys=bsd4-3
+    NON_GNU_CPP="cc -E -P"
+  ;;
+
+  dnl Cubix QBx/386
+  i[[3-9]]86-cubix-sysv* ) machine=intel386 opsys=usg5-3 ;;
+
+  dnl Data General AViiON Machines
+  i586-dg-dgux*R4*   | i586-dg-dgux5.4.4* ) machine=aviion opsys=dgux5-4r4 ;;
+  m88k-dg-dgux5.4R3* | m88k-dg-dgux5.4.3* ) opsys=dgux5-4r3 ;;
+  m88k-dg-dgux5.4R2* | m88k-dg-dgux5.4.2* ) opsys=dgux5-4r2 ;;
+  m88k-dg-dgux*                          ) opsys=dgux     ;;
+
+  dnl Motorola Delta machines
+  m68k-motorola-sysv* | m68000-motorola-sysv* ) machine=delta opsys=usg5-3 ;;
+  m88k-motorola-sysv4* )
+    dnl jbotte@bnr.ca says that UNIX_System_V <hostName> 4.0 R40V4.3 m88k mc88110
+    dnl needs POSIX_SIGNALS and therefore needs usg5-4-2.
+    dnl I hope there are not other 4.0 versions for this machine
+    dnl which really need usg5-4 instead.
+    machine=delta88k opsys=usg5-4-2
+  ;;
+  m88k-motorola-sysv* | m88k-motorola-m88kbcs* ) machine=delta88k opsys=usg5-3 ;;
+
+  dnl Dual machines
+  m68*-dual-sysv*    ) machine=dual opsys=usg5-2   ;;
+  m68*-dual-uniplus* ) machine=dual opsys=unipl5-2 ;;
+
+  dnl Encore machines
+  ns16k-encore-bsd* ) machine=ns16000 opsys=umax ;;
+
+  dnl Gould Power Node and NP1
+  pn-gould-bsd4.2* ) machine=gould     opsys=bsd4-2 ;;
+  pn-gould-bsd4.3* ) machine=gould     opsys=bsd4-3 ;;
+  np1-gould-bsd* )   machine=gould-np1 opsys=bsd4-3 ;;
+
+  dnl Harris Night Hawk machines running CX/UX (a 5000 looks just like a 4000
+  dnl as far as XEmacs is concerned).
+  m88k-harris-cxux* )
+    dnl Build needs to be different on 7.0 and later releases
+    case "`uname -r`" in
+       [[56]].[[0-9]] ) machine=nh4000 opsys=cxux  ;;
+       [[7]].[[0-9]]  ) machine=nh4000 opsys=cxux7 ;;
+    esac
+    NON_GNU_CPP="/lib/cpp"
+  ;;
+  dnl Harris ecx or gcx running CX/UX (Series 1200, Series 3000)
+  m68k-harris-cxux* ) machine=nh3000 opsys=cxux ;;
+  dnl Harris power pc NightHawk running Power UNIX (Series 6000)
+  powerpc-harris-powerunix ) machine=nh6000 opsys=powerunix NON_GNU_CPP="cc -Xo -E -P" ;;
+
+  dnl Honeywell XPS100
+  xps*-honeywell-sysv* ) machine=xps100 opsys=usg5-2 ;;
+
+  dnl HP 9000 series 200 or 300
+  m68*-hp-bsd* ) machine=hp9000s300 opsys=bsd4-3 ;;
+
+  dnl HP-UX
+  *-hp-hpux* )
+    dnl Figure out machine and opsys orthogonally
+    case "$canonical" in
+      m68*  ) machine=hp9000s300 ;;
+      hppa* ) machine=hp800      ;;
+    esac
+
+    case "$canonical" in
+      *-hp-hpux7*  )  opsys=hpux   ;;
+      *-hp-hpux8*  )  opsys=hpux8  ;;
+      *-hp-hpux9*  )  opsys=hpux9  ;;
+      *-hp-hpux10* )  opsys=hpux10 ;;
+      *-hp-hpux11* )  opsys=hpux11 ;;
+      *            )  opsys=hpux   ;;
+    esac
+
+    dnl HP has a broken "strcat"
+    case "$opsys" in hpux9 | hpux10 ) XE_ADD_OBJS(strcat.o) ;; esac
+
+    if test "$opsys" = "hpux10" -o "$opsys" = "hpux11"; then \
+       ansi_flag="-Ae"; else ansi_flag="-Aa"; fi
+    NON_GNU_CC="cc $ansi_flag" NON_GNU_CPP="cc $ansi_flag -E"
+
+    case "$canonical" in *-hp-hpux*shr* ) opsys="${opsys}-shr" ;; esac
+  ;;
+
+  dnl Orion machines
+  orion-orion-bsd*   ) machine=orion    opsys=bsd4-2 ;;
+  clipper-orion-bsd* ) machine=orion105 opsys=bsd4-2 ;;
+
+  dnl IBM machines
+  i[[3-9]]86-ibm-aix1.1* ) machine=ibmps2-aix opsys=usg5-2-2 ;;
+  i[[3-9]]86-ibm-aix1.[[23]]* | i[[3-9]]86-ibm-aix* ) machine=ibmps2-aix opsys=usg5-3 ;;
+  i370-ibm-aix*) machine=ibm370aix opsys=usg5-3 ;;
+  romp-ibm-aos*    ) opsys=bsd4-3 ;;
+  romp-ibm-bsd*    ) opsys=bsd4-3 ;;
+  romp-ibm-mach*   ) opsys=mach-bsd4-3 ;;
+
+  dnl Integrated Solutions "Optimum V"
+  m68*-isi-bsd4.2* ) machine=isi-ov opsys=bsd4-2 ;;
+  m68*-isi-bsd4.3* ) machine=isi-ov opsys=bsd4-3 ;;
+
+  dnl Intel 386 machines where we do care about the manufacturer
+  i[[3-9]]86-intsys-sysv* ) machine=is386 opsys=usg5-2-2 ;;
+
+  dnl Prime EXL
+  i[[3-9]]86-prime-sysv* ) machine=i386 opsys=usg5-3 ;;
+
+  dnl Sequent Symmetry running Dynix
+  i[[3-9]]86-sequent-bsd* ) machine=symmetry opsys=bsd4-3 ;;
+
+  dnl Sequent Symmetry running DYNIX/ptx
+  i[[3-9]]86-sequent-ptx* ) machine=sequent-ptx opsys=ptx NON_GNU_CPP="/lib/cpp" ;;
+
+  dnl Unspecified sysv on an ncr machine defaults to svr4.2.
+  dnl (Plain usg5-4 does not turn on POSIX signals, which we need.)
+  i[[3-9]]86-ncr-sysv* ) machine=ncr386 opsys=usg5-4-2 ;;
+
+  dnl Intel Paragon OSF/1
+  i860-intel-osf1* ) machine=paragon opsys=osf1 NON_GNU_CPP=/usr/mach/lib/cpp ;;
+
+  dnl Intel 860
+  i860-*-sysv4* ) machine=i860 opsys=usg5-4 NON_GNU_CC="/bin/cc" NON_GNU_CPP="/usr/ccs/lib/cpp" ;;
+
+  dnl Masscomp machines
+  m68*-masscomp-rtu* ) machine=masscomp opsys=rtu ;;
+
+  dnl Megatest machines
+  m68*-megatest-bsd* ) machine=mega68 opsys=bsd4-2 ;;
+
+  dnl Workstations sold by MIPS
+  dnl This is not necessarily all workstations using the MIPS processor -
+  dnl Irises are produced by SGI, and DECstations by DEC.
+  mips-mips-usg* ) machine=mips4 ;;
+  mips-mips-riscos4 )
+    machine=mips4
+    NON_GNU_CC="cc -systype bsd43"
+    NON_GNU_CPP="cc -systype bsd43 -E"
+    case "$canonical" in
+      mips-mips-riscos4* ) opsys=bsd4-3  ;;
+      mips-mips-riscos5* ) opsys=riscos5 ;;
+    esac
+  ;;
+  mips-mips-bsd* ) machine=mips opsys=bsd4-3 ;;
+  mips-mips-*    ) machine=mips opsys=usg5-2-2 ;;
+
+  dnl NeXT
+  m68*-next-* | m68k-*-nextstep* ) machine=m68k opsys=nextstep ;;
+
+  dnl The complete machine from National Semiconductor
+  ns32k-ns-genix* ) machine=ns32000 opsys=usg5-2 ;;
+
+  dnl NCR machines
+  m68*-ncr-sysv2* | m68*-ncr-sysvr2* ) machine=tower32   opsys=usg5-2-2 ;;
+  m68*-ncr-sysv3* | m68*-ncr-sysvr3* ) machine=tower32v3 opsys=usg5-3 ;;
+
+  dnl Nixdorf Targon 31
+  m68*-nixdorf-sysv* ) machine=targon31 opsys=usg5-2-2 ;;
+
+  dnl Nu (TI or LMI)
+  m68*-nu-sysv* ) machine=nu opsys=usg5-2 ;;
+
+  dnl Plexus
+  m68*-plexus-sysv* ) machine=plexus opsys=usg5-2 ;;
+
+  dnl Pyramid machines
+  pyramid-pyramid-bsd* ) machine=pyramid opsys=bsd4-2 ;;
+
+  dnl Sequent Balance
+  ns32k-sequent-bsd4.2* ) machine=sequent opsys=bsd4-2 ;;
+  ns32k-sequent-bsd4.3* ) machine=sequent opsys=bsd4-3 ;;
+
+  dnl Siemens Nixdorf
+  mips-siemens-sysv* | mips-sni-sysv*)
+    machine=mips-siemens opsys=usg5-4
+    NON_GNU_CC=/usr/ccs/bin/cc
+    NON_GNU_CPP=/usr/ccs/lib/cpp
+  ;;
+
+  dnl Silicon Graphics machines
+  dnl Iris 2500 and Iris 2500 Turbo (aka the Iris 3030)
+  m68*-sgi-iris3.5* ) machine=irist opsys=iris3-5 ;;
+  m68*-sgi-iris3.6* | m68*-sgi-iris*) machine=irist opsys=iris3-6 ;;
+  dnl Iris 4D
+  mips-sgi-irix3.*    ) opsys=irix3-3 ;;
+  mips-sgi-irix4.*    ) opsys=irix4-0 ;;
+  mips-sgi-irix6*     ) opsys=irix6-0 ;;
+  mips-sgi-irix5.1*   ) opsys=irix5-1 ;;
+  mips-sgi-irix5.2*   ) opsys=irix5-2 ;;
+  mips-sgi-irix5.*    ) opsys=irix5-3 ;;
+  mips-sgi-irix*      ) opsys=irix5-0 ;;
+
+  dnl SONY machines
+  *-sony-newsos[[34]]* | *-sony-news[[34]]* ) opsys=bsd4-3 ;;
+  *-sony-news* ) opsys=newsos5 ;;
+
+  dnl Stride
+  m68*-stride-sysv* ) machine=stride opsys=usg5-2 ;;
+
+  dnl Suns
+  *-*-solaris* | *-*-sunos* | *-sun-mach* | *-sun-bsd* )
+    dnl Hardware type
+    case "$canonical" in
+      m68*-sunos1* )            machine=sun1     ;;
+      m68*-sunos2* )            machine=sun2     ;;
+      m68* )                    machine=sun3     ;;
+      i*86*-sun-sunos[[34]]* )   machine=sun386   ;;
+      i*86-*-* )                machine=intel386 ;;
+      rs6000* )                  machine=rs6000   ;;
+    esac
+
+    dnl Make $canonical even more so.
+    case "$canonical" in *-sunos5*)
+      canonical=`echo $canonical | sed -e s/sunos5/solaris2/`;;
+    esac
+
+    dnl On SunOS 4, use /usr/lib/cpp, sans dynodump, /bin/ranlib
+    dnl On SunOS 5, use cc -E,        need dynodump, RANLIB not needed
+    dnl But, SunOS 5.6 no longer needs dynodump because it has a similar
+    dnl function integrated.
+    case "$canonical" in
+      *-sunos4* )
+       #test -f /usr/lib/cpp     && NON_GNU_CPP=/usr/lib/cpp ;;
+       : ;;
+      *-solaris2* )
+       #test -f /usr/ccs/lib/cpp && NON_GNU_CPP=/usr/ccs/lib/cpp
+       RANLIB=':' ;;
+    esac
+
+    case "$canonical" in
+      *-solaris*         )
+       opsys=sol2
+       os_release=`uname -r | sed -e 's/^\([[0-9]]\)\.\([[0-9]]\).*/\1\2/'`
+       AC_DEFINE_UNQUOTED(OS_RELEASE, $os_release) ;;
+
+      dnl The last Sun386 ran 4.0.
+      i*86-*-sunos4*      ) opsys=sunos4-0     ;;
+      *-sunos4.0*        ) opsys=sunos4-0      ;;
+      *-sunos4.1.2*      ) opsys=sunos4-1-2    ;;
+      *-sunos4.1.3*      ) opsys=sunos4-1-3    ;;
+      *-sunos4.1.[[4-9]]* ) opsys=sunos4-1-4   ;;
+      *-sunos4* | *-sunos ) opsys=sunos4-1     ;;
+      *-mach*            ) opsys=mach-bsd4-3   ;;
+      *                          ) opsys=bsd4-2        ;;
+    esac
+
+    case "$canonical" in *-sunos4*shr* ) opsys="${opsys}-shr" ;; esac
+
+    dnl Watch out for a compiler guaranteed not to work.
+    test "$opsys $CC" = "sol2 /usr/ucb/cc" && CC=""
+  ;;
+
+  dnl Tadpole 68k
+  m68*-tadpole-sysv* ) machine=tad68k opsys=usg5-3 ;;
+
+  dnl Tahoe machines
+  tahoe-tahoe-bsd4.2* ) machine=tahoe opsys=bsd4-2 ;;
+  tahoe-tahoe-bsd4.3* ) machine=tahoe opsys=bsd4-3 ;;
+
+  dnl Tandem Integrity S2
+  mips-tandem-sysv* ) machine=tandem-s2 opsys=usg5-3 ;;
+
+  dnl Tektronix XD88
+  m88k-tektronix-sysv3* ) machine=tekxd88 opsys=usg5-3 ;;
+
+  dnl Tektronix 16000 box (6130?)
+  ns16k-tektronix-bsd* ) machine=ns16000 opsys=bsd4-2 ;;
+  dnl Tektronix 4300
+  dnl src/m/tek4300.h hints that this is a m68k machine.
+  m68*-tektronix-bsd* ) machine=tek4300 opsys=bsd4-3 ;;
+
+  dnl Titan P2 or P3
+  titan-titan-sysv* ) machine=titan opsys=usg5-3 ;;
+
+  dnl Ustation E30 (SS5E)
+  m68*-unisys-uniplus* ) machine=ustation opsystem=unipl5-2 ;;
+
+  dnl Vaxen.
+  vax-dec-* )
+    case "$canonical" in
+      *-sysv[[01]]* | *-sysvr[[01]]* )         opsys=usg5-0 ;;
+      *-sysv2* | *-sysvr2* )           opsys=usg5-2 ;;
+      *-mach* )                                opsys=mach-bsd4-3 ;;
+    esac
+  ;;
+
+  dnl Whitechapel MG1
+  ns16k-whitechapel-* ) machine=mg1 ;;
+
+  dnl Wicat
+  m68*-wicat-sysv* ) machine=wicat opsys=usg5-2 ;;
+
+  dnl Intel 386 machines where we do not care about the manufacturer
+  i[[3-9]]86-*-* )
+    machine=intel386
+    case "$canonical" in
+      *-isc1.* | *-isc2.[[01]]* ) opsys=386-ix ;;
+      *-isc2.2* )              opsys=isc2-2 ;;
+      *-isc4.0* )              opsys=isc4-0 ;;
+      *-isc4.* )               opsys=isc4-1
+                               GCC_TEST_OPTIONS=-posix
+                               NON_GCC_TEST_OPTIONS=-Xp
+                               ;;
+      *-isc* )                 opsys=isc3-0 ;;
+      *-esix5* )               opsys=esix5r4 NON_GNU_CPP=/usr/lib/cpp ;;
+      *-esix* )                        opsys=esix ;;
+      *-mach* )                        opsys=mach-bsd4-3 ;;
+      *-xenix* )               opsys=xenix ;;
+      *-sco3.2v4* )            opsys=sco4 NON_GNU_CPP=/lib/cpp  ;;
+      *-bsd386* | *-bsdi1* )   opsys=bsd386 ;;
+      *-bsdi3* )               opsys=bsdos3 ;;
+      *-bsdi2.1* )             opsys=bsdos2-1 ;;
+      *-bsdi2* )               opsys=bsdos2 ;;
+      *-sco3.2v5* )            opsys=sco5 ;
+       dnl This is a pain.  Like the current USL cc, SCO cc -E
+       dnl tokenizes as it preprocesses, making configure very
+       dnl unhappy.  Unfortunately, /lib/cpp does not understand
+       dnl flags like "-b elf", so we have to cheat in order to
+       dnl pick up the right defines for UNEXEC from the s-file.
+       dnl 01/05/95 robertl@dgii.com
+       if test "$dynamic" = "yes" ; then
+               NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE -D_SCO_ELF"  ;
+       else
+               NON_GNU_CPP="/lib/cpp -D_XOPEN_SOURCE"  ;
+       fi ;;
+      *-386bsd* )              opsys=386bsd ;;
+      *-freebsd* )             opsys=freebsd ;;
+      *-nextstep* )            opsys=nextstep ;;
+      *-pc-cygwin32 )          opsys=cygwin32 ;;
+      dnl Otherwise, we fall through to the generic opsys code at the bottom.
+    esac
+  ;;
+
+  dnl Linux/68k
+  m68k-*-linux* ) machine=m68k opsys=linux ;;
+
+esac
+
+if test -z "$machine" -o -z "$opsys"; then
+  (echo "$progname: XEmacs hasn't been ported to \`$canonical' systems."
+   echo "$progname: Check \`etc/MACHINES' for recognized configuration names."
+  ) >&2
+  exit 1
+fi
+
+if test -z "$dynamic"; then
+  case "$opsys" in
+    hpux* | sunos4* | sco5 ) dynamic=no ;;
+    *) dynamic=yes ;;
+  esac
+fi
+if test "$dynamic" = "yes"; then
+  case "$opsys" in
+    hpux* | sunos4* | sco5 ) opsys="${opsys}-shr" ;;
+    decosf* ) ld_call_shared="-call_shared" ;;
+  esac
+else dnl "$dynamic" = "no"
+  case "$opsys" in
+    sol2 )
+      echo "Static linking is not supported on Solaris 2."
+      echo "Rerun configure without specifying --dynamic=no."
+      exit 1 ;;
+    linux   ) ld_call_shared="-Bstatic" ;;
+    decosf* ) ld_call_shared="-non_shared" ;;
+  esac
+fi
+
+dnl Use xlc by default on AIX
+case "$opsys" in aix*) NON_GNU_CC=xlc ;; esac
+
+stack_trace_eye_catcher=`echo ${PROGNAME}_${version}_${canonical} | sed 'y/.-/__/'`
+AC_DEFINE_UNQUOTED(STACK_TRACE_EYE_CATCHER, $stack_trace_eye_catcher)
+
+machfile="m/${machine}.h"
+opsysfile="s/${opsys}.h"
+
+dnl --------------------------------------------------
+dnl Determine the compiler, set up for feature testing
+dnl --------------------------------------------------
+
+dnl Sun Development environment support
+test "$with_sparcworks" = "yes" && with_workshop=yes # compatibility alias
+XE_CHECK_FEATURE_DEPENDENCY(workshop, tooltalk)
+if test "$with_workshop" = "yes"; then
+  AC_DEFINE(SUNPRO)
+  XE_ADD_OBJS(sunpro.o)
+fi
+
+if test "$with_clash_detection" = "yes"; then
+  AC_DEFINE(CLASH_DETECTION)
+  XE_ADD_OBJS(filelock.o)
+fi
+
+dnl Choose a compiler from (in order)
+dnl --compiler, env var CC, with_gcc=no && ${NON_GNU_CC:-cc}, AC_PROG_CC
+test -n "$compiler" && CC="$compiler"
+if test "$with_gcc" = "no"; then dnl Try to find a non-gcc compiler
+  case "$CC" in "" | *gcc* ) CC="${NON_GNU_CC-cc}" ;; esac
+fi
+
+dnl If we don't set CFLAGS here, AC_PROG_CC will set it.
+dnl But we know better what's good for us, so we do our own
+dnl computation of real CFLAGS later.
+dnl --cflags overrides environment variable CFLAGS
+test "${cflags-unset}" != unset && CFLAGS="$cflags"
+if test "${CFLAGS-unset}" != unset
+  then cflags_specified=yes;
+  else cflags_specified=no;
+fi
+
+xe_save_CFLAGS="$CFLAGS"
+
+AC_PROG_CC dnl Autoconf has its own magic for compiler autodetection
+
+dnl Retry using random guesswork if AC_PROG_CC got it wrong...
+if   test "$with_gcc" = "no"  -a "$GCC" = "yes"; then
+  CC=${NON_GNU_CC-cc}
+  AC_PROG_CC
+elif test "$with_gcc" = "yes" -a "$GCC" != "yes" ; then
+  CC=gcc
+  AC_PROG_CC
+fi
+CFLAGS="$xe_save_CFLAGS"
+
+dnl Figure out what C preprocessor to use.
+
+dnl On Sun systems, people sometimes set up the variable CPP
+dnl with a value that is a directory, not an executable at all.
+dnl Detect that case, and ignore that value.
+test -n "$CPP" -a -d "$CPP" && CPP=
+
+test -n "$NON_GNU_CPP" -a "$GCC" != "yes" -a -z "$CPP" && CPP="$NON_GNU_CPP"
+
+AC_PROG_CPP
+
+AC_AIX
+
+AC_MSG_CHECKING(for GNU libc)
+AC_TRY_COMPILE([#include <features.h>],[
+#if ! (defined __GLIBC__ || defined __GNU_LIBRARY__)
+#error Not a GNU libc system :-(
+******* ======= ******** &&&&&&&&
+#endif
+], have_glibc=yes, have_glibc=no)
+AC_MSG_RESULT($have_glibc)
+dnl I'm tired of pop being broken with GLIBC -slb
+dnl Well. then why not fix fucking pop?
+test "$have_glibc" = "yes" && AC_DEFINE(_GNU_SOURCE)
+
+AC_MSG_CHECKING(whether we are using SunPro C)
+AC_TRY_COMPILE([],[#ifndef __SUNPRO_C
+#error Not a  SunPro compiler :-(
+******* ======= ******** &&&&&&&&
+#endif
+], __sunpro_c=yes, __sunpro_c=no)
+AC_MSG_RESULT($__sunpro_c)
+
+dnl case "$canonical" in
+dnl   *-sun-sunos* ) test "$CPP" = "acc -E" && CPP="acc -E -Xs" ;;
+dnl esac
+
+dnl --------------------------------------------------------------------
+dnl Extract some information from the operating system and machine files
+dnl --------------------------------------------------------------------
+
+echo "Extracting information from the machine- and system-dependent headers..."
+
+dnl It is not important that this name contain the PID; you cannot run
+dnl two configures in the same directory and have anything work
+dnl anyway.
+tempcname="conftest.c"
+
+dnl CPP_to_sh(CPP_SYMBOL, SH_VAR, DEFAULT_VALUE)
+define([CPP_to_sh],
+[[#]ifndef [$1]
+[#]define [$1]ifelse([$3],,, [ "$3"])
+[#]endif
+configure___ [$2]=[$1]
+])dnl CPP_to_sh
+
+dnl CPP_boolean_to_sh(CPP_SYMBOL, SH_VAR)
+define([CPP_boolean_to_sh],
+[[#]ifdef [$1]
+configure___ [$2]=yes
+[#]else
+configure___ [$2]=no
+[#]endif
+])dnl CPP_boolean_to_sh
+
+cat > $tempcname <<EOF
+#define NOT_C_CODE
+#define C_SWITCH_SITE
+#define C_SWITCH_X_SITE
+#define LD_SWITCH_SITE
+#define LD_SWITCH_X_SITE
+#define LD_SWITCH_X_SITE_AUX
+#define OS_RELEASE $os_release
+#include "$srcdir/src/$opsysfile"
+#include "$srcdir/src/$machfile"
+
+CPP_to_sh(LIBS_MACHINE, libs_machine)
+CPP_to_sh(LIBS_SYSTEM,  libs_system)
+CPP_to_sh(LIBS_TERMCAP, libs_termcap)
+CPP_to_sh(LIB_STANDARD, libs_standard)
+
+CPP_to_sh(OBJECTS_MACHINE, objects_machine)
+CPP_to_sh(OBJECTS_SYSTEM,  objects_system)
+
+CPP_to_sh(C_SWITCH_MACHINE,   c_switch_machine)
+CPP_to_sh(C_SWITCH_SYSTEM,    c_switch_system)
+
+CPP_to_sh(LD_SWITCH_MACHINE,  ld_switch_machine)
+CPP_to_sh(LD_SWITCH_SYSTEM,   ld_switch_system)
+
+CPP_to_sh(UNEXEC, unexec, unexec.o)
+
+CPP_to_sh(LD_SWITCH_SHARED, ld_switch_shared, -c)
+
+#ifdef ORDINARY_LINK
+#define LD "\$(CC) \$(CFLAGS)"
+#else /* no ORDINARY LINK */
+#ifdef COFF_ENCAPSULATE
+#define LD "\$(CC) -nostdlib"
+#else /* not COFF_ENCAPSULATE */
+#ifdef LINKER
+#define LD LINKER
+#else /* ! defined (LINKER) */
+#define LD "ld"
+#endif /* ! defined (LINKER) */
+#endif /* ! defined (COFF_ENCAPSULATE) */
+#endif /* not ORDINARY_LINK */
+configure___ ld=LD
+
+CPP_to_sh(LIB_GCC, lib_gcc)
+CPP_to_sh(LD_TEXT_START_ADDR, ld_text_start_addr)
+
+#if ! defined (ORDINARY_LINK) && !defined (START_FILES)
+#ifdef NO_REMAP
+#ifdef COFF_ENCAPSULATE
+#define START_FILES "pre-crt0.o /usr/local/lib/gcc-crt0.o"
+#else /* ! defined (COFF_ENCAPSULATE) */
+#define START_FILES "pre-crt0.o /lib/crt0.o"
+#endif /* ! defined (COFF_ENCAPSULATE) */
+#else /* ! defined (NO_REMAP) */
+#define START_FILES "ecrt0.o"
+#endif /* ! defined (NO_REMAP) */
+#endif /* no ORDINARY_LINK */
+#ifndef START_FILES
+#define START_FILES
+#endif
+configure___ start_files=START_FILES
+
+CPP_boolean_to_sh(ORDINARY_LINK, ordinary_link)
+CPP_boolean_to_sh(SYSTEM_MALLOC, system_malloc)
+CPP_boolean_to_sh(TERMINFO, have_terminfo)
+CPP_boolean_to_sh(MAIL_USE_FLOCK, mail_use_flock)
+CPP_boolean_to_sh(MAIL_USE_LOCKF, mail_use_lockf)
+EOF
+
+dnl The value of CPP is a quoted variable reference, so we need to do this
+dnl to get its actual value...
+CPP=`eval "echo $CPP"`
+define(TAB, [  ])dnl
+changequote(, )dnl
+eval `$CPP -Isrc $tempcname \
+       | sed -n -e "s/[ TAB]*=[ TAB\"]*/='/" -e "s/[ TAB\"]*\$/'/" -e "s/^configure___//p"`
+changequote([, ])dnl
+
+rm $tempcname
+
+dnl For debugging...
+test "$extra_verbose" = "yes" && \
+  PRINT_VAR(libs_machine libs_system libs_termcap libs_standard
+  objects_machine objects_system c_switch_machine c_switch_system
+  ld_switch_machine ld_switch_system unexec ld_switch_shared
+  ld lib_gcc ld_text_start_addr start_files ordinary_link
+  have_terminfo mail_use_flock mail_use_lockf) && echo ""
+
+dnl Non-ordinary link usually requires -lc
+test "$ordinary_link" = "no" -a -z "$libs_standard" && libs_standard="-lc"
+
+dnl Calculalate value of CFLAGS:
+dnl Use either command line flag, environment var, or autodetection
+if test "$cflags_specified" = "no"; then
+  dnl Following values of CFLAGS are known to work well.
+  dnl Should we take debugging options into consideration?
+  if   test "$GCC" = "yes"; then
+    CFLAGS="-g -O3 -Wall -Wno-switch"
+    dnl I'm not convinced this is a good idea any more. -sb
+    dnl test "$opsys $machine" = "linux intel386" && \
+    dnl CFLAGS="$CFLAGS -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2"
+    dnl cygwin can't cope with -O3
+    test "$opsys $machine" = "cygwin32 intel386" && \
+      CFLAGS="-g -O2 -Wall -Wno-switch"
+  elif test "$__sunpro_c" = "yes"; then
+    case "$opsys" in
+      sol2    ) CFLAGS="-v -xO4" ;;
+      sunos4* ) CFLAGS="-xO2";;
+    esac
+  elif test "$CC" = "xlc"; then
+    CFLAGS="-O3 -qstrict -qnoansialias -qlibansi -qinfo -qro -qmaxmem=20000"
+  else
+    dnl ### Add tests for other compilers here...
+    CFLAGS="-O" ;dnl The only POSIX-approved flag
+  fi
+fi
+
+dnl Inform compiler that certain flags are meant for the linker
+dnl XE_PROTECT_LINKER_FLAGS(shell_var)
+define([XE_PROTECT_LINKER_FLAGS], [
+if test "$GCC" = "yes"; then
+  set x $[$1]; shift; [$1]=""
+  while test -n "[$]1"; do
+    case [$]1 in
+      -L  | -l  | -u         ) [$1]="$[$1] [$]1 [$]2"; shift ;;
+      -L* | -l* | -u* | -Wl* ) [$1]="$[$1] [$]1" ;;
+      -Xlinker* ) ;;
+      * ) [$1]="$[$1] -Xlinker [$]1" ;;
+    esac
+    shift
+  done
+fi])dnl
+XE_PROTECT_LINKER_FLAGS(ld_switch_system)
+XE_PROTECT_LINKER_FLAGS(ld_switch_machine)
+XE_PROTECT_LINKER_FLAGS(LDFLAGS)
+XE_PROTECT_LINKER_FLAGS(ld_call_shared)
+
+dnl Add s&m-determined objects (including unexec) to link line
+test -n "$objects_machine" && XE_ADD_OBJS($objects_machine)
+test -n "$objects_system"  && XE_ADD_OBJS($objects_system)
+test -n "$unexec"          && XE_ADD_OBJS($unexec)
+
+dnl Dynodump (Solaris 2.x, x<6)
+AC_MSG_CHECKING(for dynodump)
+if test "$unexec" != "unexsol2.o"; then
+  AC_MSG_RESULT(no)
+else
+  AC_MSG_RESULT(yes)
+  AC_DEFINE(DYNODUMP)
+  XE_APPEND(dynodump, MAKE_SUBDIR)
+  XE_APPEND(dynodump, SRC_SUBDIR_DEPS)
+  case "$machine" in
+    sparc   ) dynodump_arch=sparc ;;
+    *86*    ) dynodump_arch=i386  ;;
+    powerpc ) dynodump_arch=ppc   ;;
+  esac
+  dnl Dynodump requires the system linker
+  test "$GCC" = "yes" && XE_APPEND(-fno-gnu-linker, ld_switch_site)
+fi
+
+dnl Feed s&m crud to src/Makefile
+
+dnl Linux/powerpc needs the following magic for some reason
+test "$machine$opsys" = "powerpclinux" && start_flags="-T $srcdir/src/ppc.ldscript"
+
+if test "$unexec" = "unexaix.o"; then
+dnl AIX needs various hacks to make static linking work.
+  if   test "$dynamic" = "no"; then
+  start_flags="-Wl,-bnso,-bnodelcsect"
+  test "$GCC" = "yes" && start_flags="-B/bin/ ${start_flags}"
+  for f in "/lib/syscalls.exp" "/lib/threads.exp"; do
+    if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; fi
+  done
+  for f in "/usr/lpp/X11/bin/smt.exp" "/usr/bin/X11/smt.exp"; do
+    if test -r "$f"; then start_flags="${start_flags},-bI:${f}"; break; fi
+  done
+  AC_CHECK_LIB(C, terminateAndUnload, XE_APPEND(-lC, libs_system))
+  fi
+elif test -n "$ld_text_start_addr"; then
+  start_flags="-T $ld_text_start_addr -e __start"
+fi
+AC_SUBST(start_flags)
+
+AC_SUBST(ld_switch_shared)
+AC_SUBST(start_files)
+if test "$ordinary_link" = "no" -a "$GCC" = "yes"; then
+ test -z "$linker" &&  linker='$(CC) -nostdlib'
+ test -z "$lib_gcc" && lib_gcc='`$(CC) -print-libgcc-file-name`'
+fi
+test "$GCC" != "yes" && lib_gcc=
+AC_SUBST(ld)
+AC_SUBST(lib_gcc)
+
+dnl ---------------------------------------------------------------
+dnl Add site and system specific flags to compile and link commands
+dnl ---------------------------------------------------------------
+
+dnl All dirs present in site-prefixes will be searched for include/ and lib/
+dnl subdirs. This can avoid specifying both site-includes and site-libraries.
+dnl Those dirs will take precedence over the standard places, but not over
+dnl site-includes and site-libraries.
+
+dnl --site-prefixes (multiple dirs)
+if test -n "$site_prefixes"; then
+  for arg in $site_prefixes; do
+    case "$arg" in
+       -* ) ;;
+       * ) argi="-I${arg}/include" ; argl="-L${arg}/lib" ;;
+    esac
+    XE_APPEND($argi, c_switch_site)
+    XE_APPEND($argl, ld_switch_site)
+  done
+fi
+
+dnl --site-libraries (multiple dirs)
+if test -n "$site_libraries"; then
+  for arg in $site_libraries; do
+    case "$arg" in -* ) ;; * ) arg="-L${arg}" ;; esac
+    XE_APPEND($arg, ld_switch_site)
+  done
+fi
+
+dnl --site-includes (multiple dirs)
+if test -n "$site_includes"; then
+  for arg in $site_includes; do
+    case "$arg" in -* ) ;; * ) arg="-I${arg}" ;; esac
+    XE_APPEND($arg, c_switch_site)
+  done
+fi
+
+dnl GNU software installs by default into /usr/local/{include,lib}
+dnl if test -d "/usr/local/include" -a -d "/usr/local/lib"; then
+dnl   XE_APPEND("-L/usr/local/lib",    ld_switch_site)
+dnl   XE_APPEND("-I/usr/local/include", c_switch_site)
+dnl fi
+
+dnl Extra system-specific library directories - please add to list
+for dir in "/usr/ccs/lib"; do
+  test -d "$dir" && XE_APPEND(-L${dir}, ld_switch_site)
+done
+
+dnl --site-runtime-libraries (multiple dirs)
+if test -n "$site_runtime_libraries"; then
+  LD_RUN_PATH="`echo $site_runtime_libraries | sed -e 's/  */:/g'`"
+  export LD_RUN_PATH
+fi
+
+dnl -------------------------------------
+dnl Compute runtime library path
+dnl -------------------------------------
+
+if   test "$dynamic" = "no"; then add_runtime_path=no
+elif test -n "$LD_RUN_PATH"; then add_runtime_path=yes
+else case "$opsys" in
+       sol2 | irix* | *bsd* ) add_runtime_path=yes ;;
+       * ) add_runtime_path=no ;;
+     esac
+fi
+
+if test "$add_runtime_path" = "yes"; then
+  dnl Try to autodetect runtime library flag (usually -R),
+  dnl and whether it works (or at least does no harm)
+  AC_MSG_CHECKING("for runtime libraries flag")
+  dash_r=""
+  for try_dash_r in "-R" "-R " "-rpath "; do
+    xe_check_libs="${try_dash_r}/no/such/file-or-directory"
+    XE_PROTECT_LINKER_FLAGS(xe_check_libs)
+    AC_TRY_LINK(, , dash_r="$try_dash_r")
+    xe_check_libs=""
+    test -n "$dash_r" && break
+  done
+  if test -n "$dash_r";
+    then AC_MSG_RESULT("\"${dash_r}\"")
+    else AC_MSG_RESULT(NONE)
+  fi
+fi
+
+xe_add_unique_runpath_dir='
+  xe_add_p=yes
+  for xe_dir in $runpath_dirs; do   dnl Uniquify
+    test "$xe_dir" = "$xe_runpath_dir" && xe_add_p=no
+  done
+  if test "$xe_add_p" = "yes"; then
+    test -n "$runpath" && runpath="${runpath}:"
+    runpath="${runpath}${xe_runpath_dir}"
+    runpath_dirs="$runpath_dirs $xe_runpath_dir"
+  fi'
+
+
+dnl XE_ADD_RUNPATH_DIR(directory)
+define([XE_ADD_RUNPATH_DIR],[{
+xe_runpath_dir=$1
+dnl PRINT_VAR(ld_switch_site ld_switch_x_site runpath xe_runpath_dir LD_RUN_PATH xe_ldflags)
+  test "$xe_runpath_dir" != "/lib"     -a \
+       "$xe_runpath_dir" != "/usr/lib" -a \
+       -n "`ls ${xe_runpath_dir}/*.s[[ol]] 2>/dev/null`" && \
+  eval "$xe_add_unique_runpath_dir"
+}])dnl
+
+dnl XE_COMPUTE_RUNPATH()
+define([XE_COMPUTE_RUNPATH],[
+if test "$add_runtime_path" = "yes" -a -n "$dash_r"; then
+  dnl Remove runtime paths from current ld switches
+  ld_switch_site=`echo   '' $ld_switch_site   | sed -e 's:^ ::' -e "s/$dash_r[[^ ]]*//g"`
+  ld_switch_x_site=`echo '' $ld_switch_x_site | sed -e 's:^ ::' -e "s/$dash_r[[^ ]]*//g"`
+  dnl PRINT_VAR(ld_switch_site ld_switch_x_site)
+
+  dnl Fix up Runtime path
+  dnl If LD_RUN_PATH is set in environment, use that.
+  dnl In this case, assume user has set the right value.
+  runpath="" runpath_dirs=""
+  if test -n "$LD_RUN_PATH"; then
+    runpath="$LD_RUN_PATH"
+  elif test "$GCC" = "yes"; then
+    dnl Compute runpath from gcc's -v output
+    ld_switch_run_save="$ld_switch_run"; ld_switch_run=""
+    echo "int main(int argc, char *argv[[]]) {return 0;}" > conftest.c
+    xe_runpath_link='${CC-cc} -o conftest -v $CFLAGS '"$xe_ldflags"' conftest.$ac_ext 2>&1 1>/dev/null'
+    for arg in `eval "$xe_runpath_link" | grep ' -L'`; do
+      case "$arg" in P,* | -L* | -R* )
+        for dir in `echo '' "$arg" | sed -e 's:^ ::' -e 's/^..//' -e 'y/:/ /'`; do
+          XE_ADD_RUNPATH_DIR("$dir")
+        done ;;
+      esac
+    done
+    ld_switch_run="$ld_switch_run_save"
+    rm -f conftest*
+  else
+    dnl Add all directories with .so files to runpath
+    for arg in $ld_switch_site $ld_switch_x_site; do
+      case "$arg" in -L*) XE_ADD_RUNPATH_DIR(`echo '' "$arg" | sed -e 's:^ ::' -e 's/^-L//'`);; esac
+    done
+    dnl Sometimes /opt/SUNWdt/lib is the only installed Motif available
+    if test "$opsys $need_motif" = "sol2 yes"; then
+      xe_runpath_dir="/opt/SUNWdt/lib";
+      eval "$xe_add_unique_runpath_dir";
+    fi
+  fi dnl Compute $runpath
+
+  if test -n "$runpath"; then
+    ld_switch_run="${dash_r}${runpath}"
+    XE_PROTECT_LINKER_FLAGS(ld_switch_run)
+    test "$extra_verbose" = "yes" && echo "Setting runpath to $runpath"
+  fi
+fi
+])dnl
+XE_COMPUTE_RUNPATH()
+
+dnl -----------------------------------
+dnl Do some misc autoconf-special tests
+dnl -----------------------------------
+
+dnl Do the opsystem or machine files prohibit the use of the GNU malloc?
+dnl Assume not, until told otherwise.
+GNU_MALLOC=yes
+if test "$with_dlmalloc" != "no"; then
+       doug_lea_malloc=yes
+else
+       doug_lea_malloc=no
+fi
+after_morecore_hook_exists=yes
+AC_CHECK_FUNC(malloc_get_state, ,doug_lea_malloc=no)
+AC_CHECK_FUNC(malloc_set_state, ,doug_lea_malloc=no)
+AC_MSG_CHECKING(whether __after_morecore_hook exists)
+AC_TRY_LINK([extern void (* __after_morecore_hook)();],[__after_morecore_hook = 0],
+  [AC_MSG_RESULT(yes)],
+  [AC_MSG_RESULT(no)
+   after_morecore_hook_exists=no])
+if test "$system_malloc" = "yes" ; then
+  GNU_MALLOC=no
+  GNU_MALLOC_reason="
+  (The GNU allocators don't work with this system configuration)."
+elif test "$with_system_malloc" = "yes" ; then
+  GNU_MALLOC=no
+  GNU_MALLOC_reason="
+  (User chose not to use GNU allocators)."
+elif test "$with_debug_malloc" = "yes" ; then
+  GNU_MALLOC=no
+  GNU_MALLOC_reason="
+  (User chose to use Debugging Malloc)."
+fi
+
+if test "$doug_lea_malloc" = "yes" ; then
+  if test "$GNU_MALLOC" = yes ; then
+    GNU_MALLOC_reason="
+  (Using Doug Lea's new malloc from the GNU C Library.)"
+  fi
+  AC_DEFINE(DOUG_LEA_MALLOC)
+  if test "$after_morecore_hook_exists" = "no" ; then
+    GNU_MALLOC_reason="
+  (Using Doug Lea's new malloc from the Linux C Library.)"
+    AC_DEFINE(_NO_MALLOC_WARNING_)
+  fi
+  use_minimal_tagbits=yes
+fi
+
+dnl #### mcheck is broken in all versions of Linux libc and glibc.
+dnl Try this again when 2.1 hits the streets.
+dnl Avoid using free-hook.c if support exists for malloc debugging in libc
+dnl have_libmcheck=no
+dnl if test "$error_check_malloc" = "yes" -a \
+dnl    "$have_glibc" = "yes" -a \
+dnl    "$doug_lea_malloc" = "yes"; then
+dnl   AC_CHECK_HEADERS(mcheck.h)
+dnl   AC_CHECK_LIB(mcheck, mcheck, have_libmcheck=yes, have_libmcheck=no)
+dnl fi
+
+dnl if test "$have_libmcheck" = "yes"; then
+dnl   AC_DEFINE(HAVE_LIBMCHECK)
+dnl   libmcheck=-lmcheck
+dnl   AC_SUBST(libmcheck)
+dnl fi
+
+dnl Some other nice autoconf tests.  If you add a test here which
+dnl should make an entry in src/config.h, do not forget to add an
+dnl #undef clause to src/config.h.in for autoconf to modify.
+
+AC_PROG_RANLIB
+AC_PROG_INSTALL
+AC_PROG_YACC
+
+dnl checks for header files
+AC_CHECK_HEADERS(mach/mach.h sys/stropts.h sys/timeb.h sys/time.h unistd.h)
+AC_CHECK_HEADERS(utime.h locale.h libgen.h fcntl.h ulimit.h)
+AC_CHECK_HEADERS(linux/version.h kstat.h sys/pstat.h inttypes.h sys/un.h a.out.h)
+AC_HEADER_SYS_WAIT
+AC_HEADER_STDC
+AC_HEADER_TIME
+AC_DECL_SYS_SIGLIST
+
+dnl Some systems have utime.h but do not declare the struct anyplace.
+AC_MSG_CHECKING(for struct utimbuf)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
+#ifdef HAVE_UTIME_H
+#include <utime.h>
+#endif], [static struct utimbuf x; x.actime = x.modtime;],
+  [AC_MSG_RESULT(yes)
+   AC_DEFINE(HAVE_STRUCT_UTIMBUF)],
+  AC_MSG_RESULT(no))
+
+dnl checks for typedefs
+AC_TYPE_SIGNAL
+AC_TYPE_SIZE_T
+AC_TYPE_PID_T
+AC_TYPE_UID_T
+AC_TYPE_MODE_T
+AC_TYPE_OFF_T
+
+AC_MSG_CHECKING(for struct timeval)
+AC_TRY_COMPILE([#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif], [static struct timeval x; x.tv_sec = x.tv_usec;],
+  [AC_MSG_RESULT(yes)
+  HAVE_TIMEVAL=yes
+  AC_DEFINE(HAVE_TIMEVAL)],
+  [AC_MSG_RESULT(no)
+   HAVE_TIMEVAL=no])
+
+dnl checks for structure members
+AC_STRUCT_TM
+AC_STRUCT_TIMEZONE
+
+dnl checks for compiler characteristics
+AC_C_CONST
+
+dnl check for Make feature
+AC_PROG_MAKE_SET
+
+dnl check byte order
+AC_C_BIGENDIAN
+
+dnl define SIZEOF_TYPE
+AC_CHECK_SIZEOF(short)
+if test "$ac_cv_sizeof_short" = 0; then
+  echo ""
+  echo "*** PANIC *** Configure tests are not working - compiler is broken."
+  echo "*** PANIC *** Please examine config.log for compilation errors."
+  exit 1
+fi
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(long)
+AC_CHECK_SIZEOF(long long)
+AC_CHECK_SIZEOF(void *)
+
+dnl check for long file names
+AC_SYS_LONG_FILE_NAMES
+
+dnl -lm is required by LISP_FLOAT_TYPE, among other things
+AC_CHECK_LIB(m, sin)
+
+dnl Floating operation support is now unconditional
+AC_DEFINE(LISP_FLOAT_TYPE)
+
+AC_TRY_LINK([#include <math.h>],
+  [return atanh(1.0) + asinh(1.0) + acosh(1.0); ],
+  AC_DEFINE(HAVE_INVERSE_HYPERBOLIC))
+
+dnl Determine type of mail locking from configure args and s&m headers
+AC_CHECKING(type of mail spool file locking)
+test -z "$mail_locking" -a "$mail_use_flock" = "yes" && mail_locking=flock
+test -z "$mail_locking" -a "$mail_use_lockf" = "yes" && mail_locking=lockf
+if   test "$mail_locking" = "lockf"; then AC_DEFINE(REAL_MAIL_USE_LOCKF)
+elif test "$mail_locking" = "flock"; then AC_DEFINE(REAL_MAIL_USE_FLOCK)
+else mail_locking="dot-locking"
+fi
+
+dnl Used by getloadavg() - does not require root priveleges
+AC_CHECK_LIB(kstat, kstat_open)
+
+dnl Another way to get the load average
+AC_CHECK_LIB(kvm, kvm_read)
+
+case "$opsys" in decosf*)
+  AC_CHECK_LIB(pthreads, cma_open)
+  test "$ac_cv_lib_pthreads_cma_open" = "yes" && \
+    c_switch_site="$c_switch_site -threads" ;;
+esac
+
+AC_MSG_CHECKING(whether the -xildoff compiler flag is required)
+if   ${CC-cc} '-###' -xildon  no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ; then
+  if ${CC-cc} '-###' -xildoff no_such_file.c 2>&1 | grep '^[^ ]*/ild ' > /dev/null ;
+    then AC_MSG_RESULT(no);
+    else AC_MSG_RESULT(yes); XE_APPEND(-xildoff, ld_switch_site)
+  fi
+  else AC_MSG_RESULT(no)
+fi
+
+dnl Link with "-z ignore" on Solaris if supported
+if test "$opsys" = "sol2" && test "$OS_RELEASE" -ge 56; then
+  AC_MSG_CHECKING(for \"-z ignore\" linker flag)
+  case "`ld -h 2>&1`" in
+    *-z\ ignore\|record* ) AC_MSG_RESULT(yes)
+      XE_PREPEND(-z ignore, ld_switch_site) ;;
+    *) AC_MSG_RESULT(no) ;;
+  esac
+fi
+
+dnl ----------------------
+dnl Choose a window system
+dnl ----------------------
+
+AC_CHECKING("for specified window system")
+
+if test "$with_x11" != "no"; then
+  dnl User-specified --x-includes or --x-libraries implies --with-x11.
+  test "$x_includes $x_libraries" != "NONE NONE" && \
+   window_system=x11 with_x11=yes
+
+  dnl Autodetection of X11 libraries and includes
+  dnl -------------------------------------------
+  dnl AC_PATH_XTRA thinks it can find our X headers and includes, but
+  dnl it often gets it wrong, so we only use it as a last resort.
+
+  dnl $OPENWINHOME implies --x-includes and --x-libraries
+  dnl Not (yet) handled by autoconf2
+  if test "$x_includes $x_libraries" = "NONE NONE" \
+    -a -n "$OPENWINHOME" \
+    -a "$OPENWINHOME" != "/usr/openwin" \
+    -a -d "$OPENWINHOME"; then
+      test -d "$OPENWINHOME/lib"           && x_libraries="$OPENWINHOME/lib"
+      test -d "$OPENWINHOME/include"       && x_includes="$OPENWINHOME/include"
+      test -d "$OPENWINHOME/share/include" && x_includes="$OPENWINHOME/share/include"
+  fi
+
+  if test "$x_includes" = "NONE"; then
+    dnl AC_PATH_XTRA often guesses /usr/include, when some other
+    dnl include directory is a MUCH better guess (Linux, HP-UX 10.20).
+    dnl This is a workaround for idiot (esp. HP) system vendors, who
+    dnl provide a /usr/include/X11, but DON'T FULLY POPULATE IT.
+    for dir in "/usr/X11" "/usr/X11R6"; do
+      if test -d "$dir/include/X11"; then x_includes="$dir/include"; break; fi
+    done
+  fi
+
+  if test "$x_libraries" = "NONE"; then
+    for dir in "/usr/X11/lib" "/usr/X11R6/lib" "/usr/lib/X11R6"; do
+      if test -r "$dir/libX11.a"; then x_libraries="$dir"; break; fi
+    done
+  fi
+
+  AC_PATH_XTRA # Autoconf claims to find X library and include dirs for us.
+  if test "$no_x" = "yes"
+  then with_x11=no  window_system=none HAVE_X_WINDOWS=no
+  else with_x11=yes window_system=x11  HAVE_X_WINDOWS=yes
+  fi
+fi
+
+case "$with_x11" in
+  yes ) window_system=x11  HAVE_X_WINDOWS=yes ;;
+  no  ) window_system=none HAVE_X_WINDOWS=no  ;;
+esac
+
+if test "$with_x11" = "yes"; then
+  AC_DEFINE(HAVE_X_WINDOWS)
+  XE_APPEND(lwlib, MAKE_SUBDIR)
+  XE_APPEND(lwlib, SRC_SUBDIR_DEPS)
+
+  dnl Try to find Motif/CDE/Tooltalk dirs
+  dnl These take precedence over other X libs/includes, so PRE-pend
+  for lib_dir in "/usr/dt/lib" "/usr/lib/Motif2.1" "/usr/lib/Motif1.2" "/usr/lib/Motif1.1"; do
+    inc_dir=`echo $lib_dir | sed -e 's/lib/include/'`
+    if test -d "$lib_dir" -a -d "$inc_dir"; then
+      case "$x_libraries" in *"$lib_dir"* ) ;; *)
+        x_libraries="$lib_dir $x_libraries"
+        XE_PREPEND(-L${lib_dir}, X_LIBS) ;;
+      esac
+      case "$x_includes" in "$inc_dir"* ) ;; *)
+        x_includes="$inc_dir $x_includes"
+        XE_PREPEND(-I${inc_dir}, X_CFLAGS) ;;
+      esac
+      break; dnl only need ONE Motif implementation!
+      fi
+  done
+
+  dnl Contrib X libs/includes do NOT take precedence, so AP-pend
+  for rel in "X11R6" "X11R5" "X11R4"; do
+    lib_dir="/usr/contrib/$rel/lib" inc_dir="/usr/contrib/$rel/include"
+    if test -d "$lib_dir" -a -d "$inc_dir"; then
+      case "$x_libraries" in *"$lib_dir"* ) ;; *)
+        x_libraries="$x_libraries $lib_dir"
+       XE_APPEND(-L${lib_dir}, X_LIBS)
+      esac
+      case "$x_includes" in "$inc_dir"* ) ;; *)
+        x_includes="$x_includes $inc_dir"
+        XE_APPEND(-I${inc_dir}, X_CFLAGS)
+      esac
+      break; dnl Only need ONE X11 implementation !
+    fi
+  done
+
+  ld_switch_x_site="$X_LIBS"
+
+  XE_COMPUTE_RUNPATH()
+
+  if test "$extra_verbose" = "yes"; then
+    echo; echo "X11 compilation variables:"
+    PRINT_VAR(x_libraries x_includes X_CFLAGS X_LIBS X_PRE_LIBS X_EXTRA_LIBS)
+    echo
+  fi
+
+  dnl Set up bitmaps search path.
+  dnl The original suggestion was to unconditionally to append X11/bitmaps
+  dnl to each element of $x_includes, I'm pretty sure this is the wrong
+  dnl thing to do.  We test for bitmaps and X11/bitmaps directories on each
+  dnl element and add them to BITMAPDIR if they exist.
+  bitmapdirs=
+  if test "$x_includes" != NONE; then
+    for i in $x_includes; do
+      if test -d "$i/bitmaps"; then
+       bitmapdirs="$i/bitmaps:$bitmapdirs"
+      fi
+      if test -d "$i/X11/bitmaps"; then
+       bitmapdirs="$i/X11/bitmaps:$bitmapdirs"
+      fi
+    done
+    bitmapdirs=`echo "$bitmapdirs" | sed s/.$//`
+  fi
+  test ! -z "$bitmapdirs" && AC_DEFINE_UNQUOTED(BITMAPDIR, "$bitmapdirs")
+
+  dnl Autodetect defines extracted from X config by xmkmf, e.g. NARROWPROTO
+  AC_CHECKING(for X defines extracted by xmkmf)
+  rm -fr conftestdir
+  if mkdir conftestdir; then
+    cd conftestdir
+    cat > Imakefile <<'EOF'
+xetest:
+       @echo ${PROTO_DEFINES} ${STD_DEFINES}
+EOF
+    if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
+      # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+      xmkmf_defines=`${MAKE-make} xetest 2>/dev/null | grep -v make`
+    fi
+    cd ..
+    rm -fr conftestdir
+    for word in $xmkmf_defines; do
+      case "$word" in
+       -D*=* ) ;;
+       -D* ) word=`echo '' $word | sed -e 's:^ *-D::'`
+             AC_DEFINE_UNQUOTED($word) ;;
+      esac
+    done
+  fi
+
+  dnl make sure we can find Intrinsic.h
+  AC_CHECK_HEADER(X11/Intrinsic.h, ,
+   [AC_MSG_ERROR("Unable to find X11 header files.")])
+
+  dnl -lXt and -lX11 are required
+  dnl Some broken systems require the magic "-b i486-linuxaout" flag
+  AC_CHECK_LIB(X11, XOpenDisplay, have_lib_x11=yes)
+  if test "$have_lib_x11" != "yes"; then
+    AC_CHECK_LIB(X11, XGetFontProperty,
+      ld_switch_x_site="-b i486-linuxaout $ld_switch_x_site",
+      [AC_MSG_ERROR("Unable to find X11 libraries.")],
+      -b i486-linuxaout)
+  fi
+  libs_x="-lX11"
+  test "$extra_verbose" = "yes" && echo "    Setting libs_x to \"-lX11\""
+
+  dnl Autodetect -lXext
+  AC_CHECK_LIB(Xext, XShapeSelectInput, XE_PREPEND(-lXext, libs_x))
+
+  dnl Require -lXt
+  AC_CHECK_LIB(Xt, XtOpenDisplay, XE_PREPEND(-lXt, libs_x),
+    AC_MSG_ERROR("Unable to find X11 libraries."))
+
+  AC_MSG_CHECKING(the version of X11 being used)
+  AC_TRY_RUN([#include <X11/Intrinsic.h>
+    int main(int c, char *v[]) { return c>1 ? XlibSpecificationRelease : 0; }],
+    [./conftest foobar; x11_release=$?],[x11_release=4],[x11_release=4])
+  AC_MSG_RESULT(R${x11_release})
+  AC_DEFINE_UNQUOTED(THIS_IS_X11R${x11_release})
+
+  AC_CHECK_HEADERS(X11/Xlocale.h)
+
+  dnl remove this - we should avoid checking for specific OS
+  AC_MSG_CHECKING(for XFree86)
+  if test -d "/usr/X386/include" -o \
+          -f "/etc/XF86Config"    -o \
+         -f "/etc/X11/XF86Config" -o \
+         -f "/usr/X11R6/lib/X11/XF86Config"; then
+    AC_MSG_RESULT(yes)
+    AC_DEFINE(HAVE_XFREE386)
+  else
+    AC_MSG_RESULT(no)
+  fi
+
+  dnl autodetect -lXmu
+  test -z "$with_xmu" && { AC_CHECK_LIB(Xmu, XmuReadBitmapDataFromFile,
+                           with_xmu=yes, with_xmu=no) }
+  if test "$with_xmu" = "no"; then
+    XE_ADD_OBJS(xmu.o)
+  else
+    XE_PREPEND(-lXmu, libs_x)
+    AC_DEFINE(HAVE_XMU)
+  fi
+
+  dnl Autodetect -lXbsd
+  dnl #### Someone, please add a better function than main
+  AC_CHECK_LIB(Xbsd, main, XE_PREPEND(-lXbsd, libs_x))
+
+  dnl Problem with the MIT distribution of X on AIX
+  if test "$unexec" = "unexaix.o" -a "$x11_release" = "6"; then
+    dnl X11R6 requires thread-safe code on AIX for some reason
+    if test "$GCC" = "yes"; then
+      XE_PREPEND(-mthreads, X_CFLAGS)
+      XE_PREPEND(-mthreads, libs_x)
+    else
+      case "$CC" in
+        "xlc" ) CC="xlc_r" ;;
+        "xlC" ) CC="xlC_r" ;;
+        "cc"  ) CC="cc_r" ;;
+      esac
+    fi
+  fi
+
+fi dnl $with_x11 = yes
+
+if test "$with_msw" != "no"; then
+  AC_CHECKING(for MS-Windows)
+  AC_CHECK_LIB(gdi32,main,with_msw=yes)
+  if test "$with_msw" = "yes"; then
+    AC_DEFINE(HAVE_MS_WINDOWS)
+    install_pp="$blddir/lib-src/installexe.sh"
+    XE_APPEND(-lshell32 -lgdi32 -luser32 -lcomctl32, libs_system)
+    if test "$window_system" != x11; then
+       window_system=msw
+       test "$with_scrollbars" != "no" && with_scrollbars=msw \
+           && XE_ADD_OBJS(scrollbar-msw.o)
+       test "$with_menubars"   != "no" && with_menubars=msw \
+           && XE_ADD_OBJS(menubar-msw.o)
+       test "$with_toolbars"   != "no" && with_toolbars=msw \
+           && XE_ADD_OBJS(toolbar-msw.o)
+       test "$with_dialogs"   != "no" && with_dialogs=msw \
+           && XE_ADD_OBJS(dialog-msw.o)
+    else
+       test "$with_scrollbars"   != "no" && XE_ADD_OBJS(scrollbar-msw.o)
+       test "$with_menubars"   != "no" && XE_ADD_OBJS(menubar-msw.o)
+       test "$with_toolbars"   != "no" && XE_ADD_OBJS(toolbar-msw.o)
+       test "$with_dialogs"   != "no" && XE_ADD_OBJS(dialog-msw.o)
+    fi
+    dnl check for our special version of select        
+    AC_TRY_RUN([#include <fcntl.h>
+    int main() { return (open("/dev/windows", O_RDONLY, 0) > 0)? 0 : 1; }],
+    [AC_DEFINE(HAVE_MSG_SELECT)])
+    const_is_losing=no
+    with_file_coding=yes
+    use_minimal_tagbits=yes
+    use_indexed_lrecord_implementation=yes
+    XE_ADD_OBJS(console-msw.o device-msw.o event-msw.o frame-msw.o objects-msw.o select-msw.o redisplay-msw.o glyphs-msw.o)
+  fi
+fi
+
+AC_SUBST(install_pp)
+
+test -z "$window_system" && window_system="none"
+
+dnl Test for features that require a window system - ANY window system
+if test "$window_system" = "none"; then
+  for feature in menubars scrollbars toolbars dialogs dragndrop
+  do
+    if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
+       AC_MSG_WARN([--with-$feature ignored:  Not valid without window system support])
+    fi
+    eval "with_${feature}=no"
+  done
+else
+  test -z "$with_toolbars" && with_toolbars=yes
+fi
+
+dnl ### Test for features that require mswindows support - currently none
+dnl ### MS-Windows folks: add code here..... (martin)
+if test "$with_msw" != "yes"; then
+  for feature in   MARTIN_IS_CLUELESS_ABOUT_MSW_FEATURES
+  do
+    if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
+       AC_MSG_WARN([--with-$feature ignored:  Not valid without MS-Windows support])
+    fi
+    eval "with_${feature}=no"
+  done
+else
+  :
+fi
+
+dnl Test for features that require X11 support
+if test "$with_x11" != "yes"; then
+  dnl It ought to be reasonable to have no output device at all, and only use
+  dnl XEmacs in --batch mode.
+  dnl if test "$with_tty" = "no" ; then
+  dnl   AC_MSG_ERROR([No window system support and no TTY support - Unable to proceed.])
+  dnl fi
+  for feature in tooltalk cde offix session xim xmu \
+                 xface
+  do
+    if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
+       AC_MSG_WARN([--with-$feature ignored:  Not valid without X support])
+    fi
+    eval "with_${feature}=no"
+  done
+fi
+
+dnl FSF 19.29 has some bitmapdir stuff here.
+bitmapdir=
+
+case "$window_system" in
+  x11  ) HAVE_X_WINDOWS=yes; echo "  Using X11." ;;
+  msw  ) HAVE_X_WINDOWS=no ; echo "  Using MS-Windows." ;;
+  none ) HAVE_X_WINDOWS=no ; echo "  Using no window system." ;;
+esac
+
+case "$x_libraries" in *X11R4* )
+  test "$opsys" = "hpux9"     && opsysfile="s/hpux9-x11r4.h"
+  test "$opsys" = "hpux9-shr" && opsysfile="s/hpux9shxr4.h"
+esac
+
+dnl Enable or disable proper session-management
+AC_CHECKING(for session-management option);
+dnl if test "$with_session" = "yes"; then
+if test "$with_session" != "no"; then
+  AC_DEFINE(HAVE_SESSION)
+fi
+
+dnl Autodetect Xauth
+dnl -lXau is only used by gnuclient, so use a special variable for Xauth X libs
+test -z "$with_xauth" && test "$window_system" = "none" && with_xauth=no
+test -z "$with_xauth" && { AC_CHECK_HEADER(X11/Xauth.h,          ,with_xauth=no) }
+test -z "$with_xauth" && { AC_CHECK_LIB(Xau, XauGetAuthByAddr,[:],with_xauth=no) }
+test -z "$with_xauth" && with_xauth=yes
+if test "$with_xauth" = "yes"; then
+  AC_DEFINE(HAVE_XAUTH)
+  XE_SPACE(libs_xauth, $X_EXTRA_LIBS -lXau $libs_x $X_PRE_LIBS)
+fi
+AC_SUBST(libs_xauth)
+
+dnl This one is for the static initializeds variables in
+dnl offix.c, so that the thing is dumped after lastfile.o
+AC_SUBST(dnd_objs)
+
+dnl Autodetect tooltalk
+if test "$with_tooltalk" != "no" ; then
+  dnl autodetect the location of tt_c.h
+  dnl tt_c.h might be in Tt or desktop include directories
+  for dir in "" "Tt/" "desktop/" ; do
+    AC_CHECK_HEADER(${dir}tt_c.h, tt_c_h_path="${dir}tt_c.h"; break)
+  done
+  if test -z "$tt_c_h_path"; then
+    if test "$with_tooltalk" = "yes"; then
+      USAGE_ERROR("Unable to find required tooltalk header files.")
+    fi
+    with_tooltalk=no
+  fi
+fi
+if test "$with_tooltalk" != "no" ; then
+  for extra_libs in "" "-lI18N -lce" "-lcxx"; do
+    AC_CHECK_LIB(tt, tt_message_create,
+      tt_libs="-ltt $extra_libs"; break, [:],$extra_libs)
+  done
+  if test -z "$tt_libs"; then
+    if test "$with_tooltalk" = "yes"; then
+      USAGE_ERROR("Unable to find required tooltalk libraries.")
+    fi
+    with_tooltalk=no
+  fi
+fi
+test -z "$with_tooltalk" && with_tooltalk=yes
+if test "$with_tooltalk" = "yes"; then
+  AC_DEFINE(TOOLTALK)
+  AC_DEFINE_UNQUOTED(TT_C_H_PATH, "$tt_c_h_path")
+  XE_PREPEND($tt_libs, libs_x)
+  XE_ADD_OBJS(tooltalk.o)
+fi
+
+dnl Autodetect CDE
+test -z "$with_cde" && { AC_CHECK_HEADER(Dt/Dt.h,               , with_cde=no) }
+test -z "$with_cde" && { AC_CHECK_LIB(DtSvc, DtDndDragStart, [:], with_cde=no) }
+test -z "$with_cde" && with_cde=yes
+if test "$with_dragndrop" = no; then
+  AC_MSG_WARN([No CDE without generic Drag'n'Drop support])
+  with_cde=no
+fi
+if test "$with_cde" = "yes" ; then
+  AC_DEFINE(HAVE_CDE)
+  XE_PREPEND(-lDtSvc, libs_x)
+  XE_APPEND(CDE, dragndrop_proto)
+  with_tooltalk=yes # CDE requires Tooltalk
+  need_motif=yes    # CDE requires Motif
+fi
+
+dnl Always compile OffiX unless --without-offix is given, no
+dnl X11 support is compiled in, no standard Xmu is avaiable,
+dnl or dragndrop support is disabled
+dnl Because OffiX support currently loses when more than one display
+dnl is in use, we now disable it by default -slb 07/10/1998.
+test "$window_system" != "x11" && with_offix=no
+if test "$with_xmu" != yes -a "$with_x11" = yes; then
+  AC_MSG_WARN([No OffiX without real Xmu support])
+  with_offix=no
+fi
+if test "$with_dragndrop" = no; then
+  AC_MSG_WARN([No OffiX without generic Drag'n'Drop support])
+  with_offix=no
+fi
+if test "$with_cde" = yes; then
+  AC_MSG_WARN([CDE already found, disabling OffiX support])
+  with_offix=no
+fi
+test -z "$with_offix" && with_offix=no
+if test "$with_offix" = "yes"; then
+  AC_DEFINE(HAVE_OFFIX_DND)
+  XE_APPEND(offix.o, dnd_objs)
+  XE_APPEND(OffiX, dragndrop_proto)
+fi
+
+dnl Autodetect Drag'n'Drop support
+dnl always included if CDE, Offix, or MSWindows are defined
+AC_MSG_CHECKING(if drag and drop API is needed)
+if test "$with_dragndrop" != "no" ; then
+  if test -n "$dragndrop_proto" ; then
+    with_dragndrop=yes
+    AC_MSG_RESULT([yes (${dragndrop_proto} )])
+    AC_DEFINE(HAVE_DRAGNDROP)
+    XE_APPEND(dragdrop.o, extra_objs)
+  else
+    with_dragndrop=no
+    AC_MSG_RESULT(no)
+  fi
+fi
+
+dnl Autodetect LDAP
+AC_CHECKING(for LDAP)
+test -z "$with_ldap" && { AC_CHECK_HEADER(ldap.h, ,with_ldap=no) }
+test -z "$with_ldap" && { AC_CHECK_HEADER(lber.h, ,with_ldap=no) }
+if test "$with_ldap" != "no"; then
+  test -z "$with_umich_ldap" && { AC_CHECK_LIB(ldap, ldap_open, with_umich_ldap=yes, with_umich_ldap=no, -llber) }
+  test "$with_umich_ldap" = "no" && { AC_CHECK_LIB(ldap10, ldap_set_option, with_ns_ldap=yes, with_ns_ldap=no) }
+  test -z "$with_ldap" -a \( "$with_umich_ldap" = "yes" -o "$with_ns_ldap" = "yes" \) && with_ldap=yes
+fi
+if test "$with_ldap" = "yes"; then
+  AC_DEFINE(HAVE_LDAP)
+  XE_ADD_OBJS(eldap.o)
+  if test "$with_umich_ldap" = "yes" ; then
+    AC_DEFINE(HAVE_UMICH_LDAP)
+    XE_PREPEND(-llber, LIBS)
+    XE_PREPEND(-lldap, LIBS)
+  elif test "$with_ldap" = "yes" -a "$with_ns_ldap" = "yes" ; then
+    AC_DEFINE(HAVE_NS_LDAP)
+    XE_PREPEND(-lldap10, LIBS)
+  elif test "$with_ldap" = "yes" ; then
+    XE_PREPEND(-lldap, LIBS)
+  fi
+fi
+
+dnl ----------------------
+dnl Graphics libraries
+dnl ----------------------
+
+if test "$window_system" != "none"; then
+  AC_CHECKING(for graphics libraries)
+
+  dnl Autodetect Xpm
+  if test -z "$with_xpm"; then
+    AC_MSG_CHECKING(for Xpm - no older than 3.4f)
+    xe_check_libs=-lXpm
+    AC_TRY_RUN([#include <X11/xpm.h>
+    int main(int c, char **v) {
+    return c == 1 ? 0 :
+      XpmIncludeVersion != XpmLibraryVersion() ? 1 :
+      XpmIncludeVersion < 30406 ? 2 : 0 ;}],
+    [./conftest dummy_arg; xpm_status=$?;
+      if test "$?" = "0"; then
+        with_xpm=yes;
+      else
+        with_xpm=no;
+        if test "$?" = "1"; then
+          xpm_problem="Xpm library version and header file version don't match!"
+        elif test "$?" = "2"; then
+          xpm_problem="Xpm library version is too old!"
+        else
+          xpm_problem="Internal xpm detection logic error!"
+        fi
+        echo "
+*** WARNING *** $problem
+  I'm not touching that with a 10-foot pole!
+  If you really want to use the installed version of Xpm, rerun
+  configure --with-xpm=yes, but don't blame me if XEmacs crashes!"
+    fi],
+    [with_xpm=no])
+    xe_check_libs=
+    AC_MSG_RESULT($with_xpm)
+  fi
+  if test "$with_xpm" = "yes"; then
+    AC_DEFINE(HAVE_XPM)
+    XE_PREPEND(-lXpm, libs_x)
+    AC_MSG_CHECKING(for \"FOR_MSW\" xpm)
+    xe_check_libs=-lXpm
+    AC_TRY_LINK(, [XpmCreatePixmapFromData()],
+    [xpm_for_msw=no],
+    [xpm_for_msw=yes])
+    xe_check_libs=
+    AC_MSG_RESULT($xpm_for_msw)
+    if test "$xpm_for_msw" = "yes"; then
+      AC_DEFINE(FOR_MSW)
+    fi
+  fi
+
+  dnl Too many stupid linkers can't detect cascaded lib dependencies until runtime
+  dnl So we always search for libz compression support.
+  if test "$with_png $with_tiff" != "no no"; then
+    AC_CHECK_LIB(c,  inflate, [:], [
+    AC_CHECK_LIB(z,  inflate, [XE_PREPEND(-lz,  libs_x)],[
+    AC_CHECK_LIB(gz, inflate, [XE_PREPEND(-lgz, libs_x)])])])
+  fi
+
+  dnl Autodetect GIFlib
+  AC_MSG_CHECKING(for gifreader)
+  test -z "$with_gif" && { AC_CHECK_HEADER(gifrlib.h,        ,with_gif=no) }
+  test -z "$with_gif" && { AC_CHECK_LIB(gifreader, GetGifError,[:] ,with_gif=no) }
+  test -z "$with_gif" && with_gif=yes
+  if test "$with_gif" = "yes"; then
+    AC_DEFINE(HAVE_GIF)
+    XE_PREPEND(-lgifreader, libs_x)
+  fi
+
+  dnl autodetect JPEG
+  test -z "$with_jpeg" && { AC_CHECK_HEADER(jpeglib.h,                    ,with_jpeg=no) }
+  test -z "$with_jpeg" && { AC_CHECK_LIB(jpeg, jpeg_destroy_decompress,[:],with_jpeg=no) }
+  test -z "$with_jpeg" && with_jpeg=yes
+  if test "$with_jpeg" = "yes"; then
+    AC_DEFINE(HAVE_JPEG)
+    XE_PREPEND(-ljpeg, libs_x)
+  fi
+
+  dnl autodetect PNG
+  if test -z "$with_png"; then
+    AC_MSG_CHECKING(for png.h - no older than 0.96)
+    AC_EGREP_CPP(yes,
+[#include <png.h>
+#if PNG_LIBPNG_VER >= 96
+yes
+#endif
+], [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no); with_png=no])
+  fi
+  test -z "$with_png" && { AC_CHECK_FUNC(pow,                  ,with_png=no) }
+  test -z "$with_png" && { AC_CHECK_LIB(png, png_read_image,[:],with_png=no) }
+  test -z "$with_png" && with_png=yes
+  if test "$with_png" = "yes"; then
+    AC_DEFINE(HAVE_PNG)
+    XE_PREPEND(-lpng, libs_x)
+  fi
+
+  dnl autodetect TIFF
+  test -z "$with_tiff" && { AC_CHECK_HEADER(tiffio.h,            ,with_tiff=no) }
+  test -z "$with_tiff" && { AC_CHECK_LIB(tiff, TIFFClientOpen,[:],with_tiff=no) }
+  test -z "$with_tiff" && with_tiff=yes
+  if test "$with_tiff" = "yes"; then
+    AC_DEFINE(HAVE_TIFF)
+    XE_PREPEND(-ltiff, libs_x)
+  fi
+fi
+
+dnl ----------------------
+dnl Graphics libraries
+dnl ----------------------
+
+if test "$with_x11" = "yes"; then
+
+  AC_CHECKING(for X11 graphics libraries)
+
+  dnl Autodetect XFACE
+  test -z "$with_xface" && { AC_CHECK_HEADER(compface.h,          ,with_xface=no) }
+  test -z "$with_xface" && { AC_CHECK_LIB(compface, UnGenFace,[:] ,with_xface=no) }
+  test -z "$with_xface" && with_xface=yes
+  if test "$with_xface" = "yes"; then
+    AC_DEFINE(HAVE_XFACE)
+    XE_PREPEND(-lcompface, libs_x)
+  fi
+
+  dnl Autodetect -lXaw
+  AC_CHECK_LIB(Xaw, XawScrollbarSetThumb, have_xaw=yes, have_xaw=no)
+  dnl if test "$have_xaw" = "yes"; then
+    dnl AC_CHECK_HEADER(X11/Xaw/Reports.h, [
+      dnl XE_APPEND(pkg-src/tree-x, MAKE_SUBDIR)
+      dnl XE_APPEND(pkg-src/tree-x, INSTALL_ARCH_DEP_SUBDIR)])
+  dnl fi
+
+  dnl autodetect Motif - but only add to libs_x later (if necessary)
+  AC_CHECK_HEADER(Xm/Xm.h,
+   [AC_CHECK_LIB(Xm, XmStringFree, have_motif=yes, have_motif=no)],
+   have_motif=no)
+
+  if test "$have_motif" = "yes"; then
+    dnl autodetect lesstif
+    AC_MSG_CHECKING(for Lesstif)
+    AC_EGREP_CPP(yes,
+[#include <Xm/Xm.h>
+#ifdef LESSTIF_VERSION
+yes
+#endif
+], have_lesstif=yes, have_lesstif=no)
+  AC_MSG_RESULT($have_lesstif)
+  fi
+
+fi dnl "$with_x11" = "yes"
+
+dnl Finish ensuring that we have values for the various toolkit items.
+dnl Not all toolkits support all widgets
+dnl if Motif is available we use it for the dialog boxes.
+
+case "$with_menubars" in "" | "yes" | "athena" | "athena3d" )
+  with_menubars="lucid" ;;
+esac
+case "$with_dialogs" in "" | "yes" | "lucid" )
+  if   test "$have_motif" = "yes"; then with_dialogs="motif"
+  elif test "$have_xaw"   = "yes"; then with_dialogs="athena"
+  else with_dialogs=no
+  fi ;;
+esac
+case "$with_scrollbars" in "" | "yes" )
+  with_scrollbars="lucid" ;;
+esac
+
+all_widgets="$with_menubars $with_scrollbars $with_dialogs $with_toolbars"
+
+case "$all_widgets" in *athena* )
+  AC_DEFINE(LWLIB_USES_ATHENA)
+  AC_DEFINE(NEED_ATHENA)
+  XE_APPEND(lwlib-Xaw.o, lwlib_objs)
+  XE_PREPEND(-lXaw, libs_x) ;;
+esac
+
+case "$all_widgets" in *motif* )
+  AC_DEFINE(LWLIB_USES_MOTIF)
+  AC_DEFINE(NEED_MOTIF)
+  XE_APPEND(lwlib-Xm.o, lwlib_objs)
+  need_motif=yes ;;
+esac
+
+test "$with_menubars"   = "lucid" && XE_APPEND(xlwmenu.o, lwlib_objs)
+test "$with_menubars"   = "motif" && XE_APPEND(xlwmenu.o, lwlib_objs)
+test "$with_scrollbars" = "lucid" && XE_APPEND(xlwscrollbar.o, lwlib_objs)
+case "$all_widgets" in *lucid* )
+  AC_DEFINE(NEED_LUCID)
+  XE_APPEND(lwlib-Xlw.o, lwlib_objs) ;;
+esac
+
+AC_SUBST(lwlib_objs)
+
+case "$with_scrollbars" in athena* ) AC_DEFINE(LWLIB_SCROLLBARS_ATHENA);; esac
+case "$with_dialogs"    in athena* ) AC_DEFINE(LWLIB_DIALOGS_ATHENA)   ;; esac
+test "$with_scrollbars" = "athena3d" && AC_DEFINE(LWLIB_SCROLLBARS_ATHENA3D)
+test "$with_dialogs"    = "athena3d" && AC_DEFINE(LWLIB_DIALOGS_ATHENA3D)
+
+test "$with_menubars"   != "no"    && AC_DEFINE(HAVE_MENUBARS)
+test "$with_scrollbars" != "no"    && AC_DEFINE(HAVE_SCROLLBARS)
+test "$with_dialogs"    != "no"    && AC_DEFINE(HAVE_DIALOGS)
+test "$with_toolbars"   != "no"    && AC_DEFINE(HAVE_TOOLBARS)
+
+test "$with_menubars"   = "lucid"  && AC_DEFINE(LWLIB_MENUBARS_LUCID)
+test "$with_scrollbars" = "lucid"  && AC_DEFINE(LWLIB_SCROLLBARS_LUCID)
+
+test "$with_menubars"   = "motif"  && AC_DEFINE(LWLIB_MENUBARS_MOTIF)
+test "$with_scrollbars" = "motif"  && AC_DEFINE(LWLIB_SCROLLBARS_MOTIF)
+test "$with_dialogs"    = "motif"  && AC_DEFINE(LWLIB_DIALOGS_MOTIF)
+
+test "$with_menubars"   != "no"      && XE_ADD_OBJS(menubar.o)
+test "$with_scrollbars" != "no"      && XE_ADD_OBJS(scrollbar.o)
+test "$with_dialogs"    != "no"      && XE_ADD_OBJS(dialog.o)
+test "$with_toolbars"   != "no"      && XE_ADD_OBJS(toolbar.o)
+test "$all_widgets" != "no no no no" && XE_ADD_OBJS(gui.o)
+
+if test "$with_x11" = "yes"; then
+  test "$with_menubars"   != "no"      && XE_ADD_OBJS(menubar-x.o)
+  test "$with_scrollbars" != "no"      && XE_ADD_OBJS(scrollbar-x.o)
+  test "$with_dialogs"    != "no"      && XE_ADD_OBJS(dialog-x.o)
+  test "$with_toolbars"   != "no"      && XE_ADD_OBJS(toolbar-x.o)
+  test "$all_widgets" != "no no no no" && XE_ADD_OBJS(gui-x.o)
+else
+  if test \( "$with_sound" = "nas" \) -o \( "$with_sound" = "both" \); then
+    echo "Attempt to Build NAS sound without X"
+    echo "Please remove NAS configuration or build with X"
+    exit 1
+  fi
+fi
+
+test "$use_minimal_tagbits" = "yes" && AC_DEFINE(USE_MINIMAL_TAGBITS)
+test "$use_indexed_lrecord_implementation" = "yes" && \
+  AC_DEFINE(USE_INDEXED_LRECORD_IMPLEMENTATION)
+
+dnl ----------------------
+dnl Mule-dependent options
+dnl ----------------------
+
+test -z "$with_mule" && with_mule=no
+test -z "$with_file_coding" && with_file_coding=no
+
+dnl if test "$with_mule" = "yes" && test ! -d "$srcdir/lisp/mule"; then
+dnl    echo "Attempt to Build with Mule without Mule/Lisp"
+dnl    echo "Please install the XEmacs/Mule tarball or"
+dnl    echo "rerun configure with --with-mule=no"
+dnl    exit 1
+dnl fi
+
+if test "$with_file_coding" = "yes" && test "$with_mule" = "no"; then
+  AC_DEFINE(FILE_CODING)
+  XE_ADD_OBJS(file-coding.o)
+fi
+
+if test "$with_mule" = "yes" ; then
+  AC_CHECKING(for Mule-related features)
+  AC_DEFINE(MULE)
+  AC_DEFINE(FILE_CODING)
+  XE_ADD_OBJS(mule.o mule-ccl.o mule-charset.o mule-coding.o file-coding.o)
+
+  dnl Use -lintl to get internationalized strerror for Mule
+  AC_CHECK_HEADERS(libintl.h)
+  AC_CHECK_LIB(intl, strerror)
+
+  AC_CHECKING(for Mule input methods)
+  dnl Do we have the XmIm* routines?  And if so, do we want to use them?
+  dnl XIM seems to be flaky except on Solaris...
+  dnl test -z "$with_xim" -a "$opsys" != "sol2" && with_xim=no
+  case "$with_xim" in "" | "yes" )
+    AC_CHECKING(for XIM)
+    dnl XIM + Lesstif is not (yet?) usable
+    if test "$have_lesstif" = "yes"; then with_xim=xlib
+    else AC_CHECK_LIB(Xm, XmImMbLookupString, with_xim=motif, with_xim=xlib)
+    fi
+  esac
+  if test "$with_xim" != "no"; then
+    AC_DEFINE(HAVE_XIM)
+    if test "$with_xim" = "xlib"; then
+      AC_DEFINE(XIM_XLIB)
+      XE_ADD_OBJS(input-method-xlib.o)
+    fi
+    if test "$with_xim" = "motif"; then
+      AC_DEFINE(XIM_MOTIF)
+      need_motif=yes
+      XE_ADD_OBJS(input-method-motif.o)
+    fi
+    if test "$with_xim" = "motif"; then
+      with_xfs=no
+    fi
+  fi
+
+  dnl "with_xim" = "yes"
+  if test "$with_xfs" = "yes" ; then
+    AC_CHECKING(for XFontSet)
+    AC_CHECK_LIB(X11, XmbDrawString, [:], with_xfs=no)
+    if test "$with_xfs" = "yes" && test "$with_menubars" = "lucid"; then
+      AC_DEFINE(USE_XFONTSET)
+      if test "$with_xim" = "no" ; then
+        XE_ADD_OBJS(input-method-xfs.o)
+      fi
+    fi
+  fi dnl with_xim
+
+  dnl Autodetect WNN
+  test "$with_wnn6" = "yes" && with_wnn=yes # wnn6 implies wnn support
+  test -z "$with_wnn" && { AC_CHECK_HEADER(wnn/jllib.h, ,with_wnn=no) }
+  dnl Detour to find crypt
+  if test "$with_wnn" != "no"; then
+    AC_CHECK_FUNCS(crypt)
+    test "$ac_cv_func_crypt" != "yes" && { AC_CHECK_LIB(crypt, crypt) }
+  fi
+  dnl Back to our regularly scheduled wnn hunting
+  test -z "$with_wnn" && { AC_CHECK_LIB(wnn,jl_dic_list_e,[:],with_wnn=no) }
+  test -z "$with_wnn" && with_wnn=yes
+  if test "$with_wnn" = "yes"; then
+    AC_DEFINE(HAVE_WNN)
+    XE_PREPEND(-lwnn, libs_x)
+    XE_ADD_OBJS(mule-wnnfns.o)
+    if test "$with_wnn6" != "no"; then
+      AC_CHECK_LIB(wnn, jl_fi_dic_list, with_wnn6=yes)
+      test "$with_wnn6" = "yes" && AC_DEFINE(WNN6)
+    fi
+  fi
+
+  dnl Autodetect canna
+  canna_includes_found=no
+  if test "$with_canna" != "no"; then
+    AC_CHECK_HEADER(canna/jrkanji.h,canna_includes_found=yes)
+  fi
+  if test "$canna_includes_found" = "no" -a "$with_canna" != "no" -a \
+      -d "/usr/local/canna/include"; then
+    save_c_switch_site="$c_switch_site"
+    c_switch_site="$c_switch_site -I/usr/local/canna/include"
+    AC_CHECK_HEADER(canna/jrkanji.h,canna_includes_found=yes)
+    if test "$canna_includes_found" != "yes"; then
+      c_switch_site="$save_c_switch_site"
+      with_canna="no"
+    fi
+  fi
+
+  test -z "$with_canna" && { AC_CHECK_HEADER(canna/RK.h,         , with_canna=no) }
+  test -z "$with_canna" && { AC_CHECK_LIB(RKC, RkBgnBun,       [:],with_canna=no) }
+  test -z "$with_canna" && { AC_CHECK_LIB(canna,jrKanjiControl,[:],with_canna=no) }
+  test -z "$with_canna" && with_canna=yes
+  if test "$with_canna" = "yes"; then
+    AC_DEFINE(HAVE_CANNA)
+    XE_PREPEND(-lcanna -lRKC, libs_x)
+    XE_ADD_OBJS(mule-canna.o)
+  fi
+
+else dnl "$with_mule" = "no"
+  for feature in xim canna wnn; do
+    if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
+      AC_MSG_WARN("--with-${feature} ignored:  Not valid without Mule support")
+    fi
+    eval "with_${feature}=no"
+  done
+fi dnl with_mule
+
+
+dnl At this point, we know whether we need the motif lib or not.
+if test "$need_motif" = "yes" ; then
+  XE_PREPEND(-lXm, libs_x)
+  dnl AIX needs the following library for use with Motif
+  AC_CHECK_LIB(i18n, layout_object_getvalue, [XE_PREPEND(-li18n, libs_x)])
+  XE_COMPUTE_RUNPATH()
+fi
+
+AC_CHECK_FUNCS(cbrt closedir dup2 eaccess fmod fpathconf frexp ftime gethostname getpagesize gettimeofday getcwd getwd logb lrand48 matherr mkdir mktime perror poll random rename res_init rint rmdir select setitimer setpgid setlocale setsid sigblock sighold sigprocmask snprintf strcasecmp strerror tzset ulimit usleep utimes waitpid vsnprintf)
+
+dnl realpath is buggy on linux, decosf and aix4
+
+dnl The realpath() in linux libc (4.6.27) sometimes fails with ELOOP.
+dnl The realpath in ELF linux libc's is O.K.
+dnl For example, call realpath on a file thirty-five or so directories deep
+dnl and you get ELOOP even if no symlinks at all are involved.
+dnl Reports as of 11/1997 indicate BSDi has problems too.
+case "$opsys" in
+  linuxaout* | bsdos3* | freebsd* | decosf4-0* | aix4* ) XE_ADD_OBJS(realpath.o) ;;
+  * )
+    AC_CHECK_FUNCS(realpath)
+    test "$ac_cv_func_realpath" != "yes" && XE_ADD_OBJS(realpath.o) ;;
+esac
+
+dnl If netdb.h does not declare h_errno, we must declare it by hand.
+AC_MSG_CHECKING(whether netdb declares h_errno)
+AC_TRY_LINK([#include <netdb.h>],
+  [return h_errno;],
+  [AC_MSG_RESULT(yes)
+   AC_DEFINE(HAVE_H_ERRNO)],
+  [AC_MSG_RESULT(no)])
+
+AC_MSG_CHECKING(for sigsetjmp)
+AC_TRY_COMPILE([#include <setjmp.h>],
+       [sigjmp_buf bar; sigsetjmp (bar, 0);],
+  [AC_MSG_RESULT(yes)
+   AC_DEFINE(HAVE_SIGSETJMP)],
+  [AC_MSG_RESULT(no)])
+
+AC_MSG_CHECKING(whether localtime caches TZ)
+AC_CACHE_VAL(emacs_cv_localtime_cache,
+[if test "$ac_cv_func_tzset" = "yes"; then
+AC_TRY_RUN([#include <time.h>
+#if STDC_HEADERS
+# include <stdlib.h>
+#endif
+extern char **environ;
+unset_TZ ()
+{
+  char **from, **to;
+  for (to = from = environ; (*to = *from); from++)
+    if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
+      to++;
+}
+char TZ_GMT0[] = "TZ=GMT0";
+char TZ_PST8[] = "TZ=PST8";
+main()
+{
+  time_t now = time ((time_t *) 0);
+  int hour_GMT0, hour_unset;
+  if (putenv (TZ_GMT0) != 0)
+    exit (1);
+  hour_GMT0 = localtime (&now)->tm_hour;
+  unset_TZ ();
+  hour_unset = localtime (&now)->tm_hour;
+  if (putenv (TZ_PST8) != 0)
+    exit (1);
+  if (localtime (&now)->tm_hour == hour_GMT0)
+    exit (1);
+  unset_TZ ();
+  if (localtime (&now)->tm_hour != hour_unset)
+    exit (1);
+  exit (0);
+}], emacs_cv_localtime_cache=no, emacs_cv_localtime_cache=yes,
+[# If we have tzset, assume the worst when cross-compiling.
+emacs_cv_localtime_cache=yes])
+else
+       # If we lack tzset, report that localtime does not cache TZ,
+       # since we can't invalidate the cache if we don't have tzset.
+       emacs_cv_localtime_cache=no
+fi],[:])dnl
+AC_MSG_RESULT($emacs_cv_localtime_cache)
+if test $emacs_cv_localtime_cache = yes; then
+  AC_DEFINE(LOCALTIME_CACHE)
+fi
+
+if test "$HAVE_TIMEVAL" = "yes"; then
+AC_MSG_CHECKING(whether gettimeofday accepts one or two arguments)
+AC_TRY_LINK([
+#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
+  ],
+  [
+  struct timeval time;
+  struct timezone dummy;
+  gettimeofday (&time, &dummy);
+],
+  [AC_MSG_RESULT(two)],
+  [AC_MSG_RESULT(one)
+   AC_DEFINE(GETTIMEOFDAY_ONE_ARGUMENT)])
+fi
+
+
+AC_C_INLINE
+if test "$ac_cv_c_inline" != "no"; then
+  AC_DEFINE(HAVE_INLINE)
+  test "$GCC" = "yes" && XE_ADD_OBJS(inline.o)
+fi
+
+dnl HP-UX has a working alloca in libPW.
+dnl case "${GCC}${opsys}" in hpux* )
+dnl  AC_CHECK_FUNC(alloca, [:], [AC_CHECK_LIB(PW, alloca)])
+dnl esac
+
+AC_FUNC_ALLOCA
+test -n "$ALLOCA" && XE_ADD_OBJS($ALLOCA)
+
+dnl Check whether vfork exists and works correctly. (This does more
+dnl than just check for its existence.) If so, it defines HAVE_VFORK_H.
+dnl If not, it defines vfork to be fork.
+AC_FUNC_VFORK
+
+dnl Check whether strcoll exists and works correctly. (This does more
+dnl than just check for its existence.) If so, it defines HAVE_STRCOLL.
+AC_FUNC_STRCOLL
+
+dnl If `getpgrp' takes no argument (the POSIX.1 version), define
+dnl `GETPGRP_VOID'.  Otherwise, it is the BSD version, which takes a
+dnl process ID as an argument.
+AC_CHECK_FUNCS(getpgrp)
+AC_FUNC_GETPGRP
+
+dnl We used to call AC_FUNC_MMAP here
+dnl Instead we now use following, suggested by Neal Becker
+AC_MSG_CHECKING(for working mmap)
+case "$opsys" in ultrix* ) have_mmap=no ;; *)
+AC_TRY_RUN([#include <stdio.h>
+#include <unistd.h>
+#include <fcntl.h>
+#include <sys/mman.h>
+
+#ifndef MAP_VARIABLE
+#define MAP_VARIABLE 0
+#endif
+
+#ifndef MAP_FAILED
+#define MAP_FAILED -1
+#endif
+
+int main (int argc, char *argv[])
+{
+  int fd = -1;
+  caddr_t p;
+#ifndef MAP_ANONYMOUS
+  fd = open ("/dev/zero", O_RDWR);
+  if (fd < 0)
+    return 1;
+#define MAP_ANONYMOUS 0
+#endif
+  if (mmap(0, 1024, PROT_READ | PROT_WRITE,
+          MAP_PRIVATE | MAP_VARIABLE | MAP_ANONYMOUS,
+          fd, 0) != (void *) MAP_FAILED)
+    return 0;
+  perror ("conftest: mmap failed");
+  return 1;
+}], have_mmap=yes, have_mmap=no) ;;
+esac
+AC_MSG_RESULT($have_mmap)
+test "$have_mmap" = "yes" && AC_DEFINE(HAVE_MMAP)
+
+dnl rel_alloc requires either GNU malloc or system malloc with mmap
+dnl We only turn rel_alloc on by default if mmap is available.
+test "$GNU_MALLOC" != "yes"   -a "$have_mmap" != "yes" && rel_alloc=no
+test "$rel_alloc" = "default" -a "$have_mmap"  = "yes" && rel_alloc=yes
+test "$rel_alloc" = "yes" && AC_DEFINE(REL_ALLOC)
+
+dnl Check for terminal I/O variants
+dnl TERMIOS systems may have termio.h, but not vice-versa, I think.
+AC_CHECK_HEADER(termios.h,
+  AC_DEFINE(HAVE_TERMIOS)
+  AC_DEFINE(SIGNALS_VIA_CHARACTERS)
+  AC_DEFINE(NO_TERMIO),
+  [AC_CHECK_HEADER(termio.h, [AC_DEFINE(HAVE_TERMIO)])])
+
+
+dnl Check for Internet sockets.
+AC_CHECK_FUNC(socket,
+ [AC_CHECK_HEADER(netinet/in.h,
+   [AC_CHECK_HEADER(arpa/inet.h, [
+  AC_DEFINE(HAVE_SOCKETS)
+      AC_MSG_CHECKING("for sun_len member in struct sockaddr_un")
+      AC_TRY_LINK([
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/un.h>
+      ],
+      [static struct sockaddr_un x; x.sun_len = 1;],
+      [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_SOCKADDR_SUN_LEN)],
+      [AC_MSG_RESULT(no)])
+      AC_MSG_CHECKING("for ip_mreq struct in netinet/in.h")
+      AC_TRY_LINK([
+#include <sys/types.h>
+#include <netinet/in.h>
+      ],
+      [static struct ip_mreq x;],
+      [AC_MSG_RESULT(yes); AC_DEFINE(HAVE_MULTICAST)],
+      [AC_MSG_RESULT(no)])])])])
+
+dnl Check for SYS V IPC. (Inferior to sockets.)
+AC_CHECK_FUNC(msgget,
+  [AC_CHECK_HEADER(sys/ipc.h,
+    [AC_CHECK_HEADER(sys/msg.h,
+      [AC_DEFINE(HAVE_SYSVIPC)])])])
+
+dnl Check for directory variants
+AC_CHECK_HEADER(dirent.h, [AC_DEFINE(SYSV_SYSTEM_DIR)],
+  [AC_CHECK_HEADER(sys/dir.h, , [AC_DEFINE(NONSYSTEM_DIR_LIBRARY)])])
+
+dnl Check for nlist.h
+AC_CHECK_HEADER(nlist.h, AC_DEFINE(NLIST_STRUCT), )
+
+dnl Check for sound of various sorts.
+
+dnl Autodetect native sound
+AC_CHECKING("for sound support")
+case "$with_sound" in
+  native | both ) with_native_sound=yes;;
+  nas    | no   ) with_native_sound=no;;
+esac
+test -z "$with_native_sound" -a -n "$native_sound_lib" && with_native_sound=yes
+
+if test "$with_native_sound" != "no"; then
+  dnl Maybe sound is already on include path...
+  if test -n "$native_sound_lib"; then
+    AC_CHECK_HEADER(multimedia/audio_device.h,
+      [sound_found=yes sound_cflags=""
+      XE_ADD_OBJS(sunplay.o)])
+  fi
+
+  dnl Autodetect Sun native sound from SUNWaudmo package
+  if test -z "$sound_found" -a -d "/usr/demo/SOUND"; then
+    sound_found=yes
+    XE_ADD_OBJS(sunplay.o)
+    if test -d "/usr/demo/SOUND/include"
+      then sound_cflags="-I/usr/demo/SOUND/include"
+      else sound_cflags="-I/usr/demo/SOUND"
+    fi
+    if test -z "$native_sound_lib" ; then
+      if test -r "/usr/demo/SOUND/lib/libaudio.a"
+        then native_sound_lib="/usr/demo/SOUND/lib/libaudio.a"
+        else native_sound_lib="/usr/demo/SOUND/libaudio.a"
+      fi
+    fi
+  fi
+
+  dnl Check for SGI and HP native sound libs
+  if test -z "$sound_found"; then
+    case "$canonical" in
+    *-sgi-* )
+      if test -z "$native_sound_lib"; then
+        AC_CHECK_LIB(audio, ALopenport, native_sound_lib="-laudio")
+      fi
+      if test -n "$native_sound_lib"; then
+        sound_found=yes sound_cflags=""
+        XE_ADD_OBJS(sgiplay.o)
+      fi ;;
+    hppa*-hp-hpux* )
+      if test -z "$native_sound_lib"; then
+       AC_CHECK_LIB(Alib, AOpenAudio, native_sound_lib="-lAlib")
+      fi
+      if test -n "$native_sound_lib"; then
+        sound_found=yes
+        XE_ADD_OBJS(hpplay.o)
+        if test "$GCC" = "yes" # Kludge city
+          then sound_cflags="-Dconst= -Dvolatile= -I/usr/audio/examples"
+          else sound_cflags="+e -I/usr/audio/examples"
+        fi
+      fi ;;
+    esac
+  fi
+
+  dnl Check for Linux/BSD native sound
+  if test -z "$sound_found"; then
+    for dir in "machine" "sys" "linux"; do
+      AC_CHECK_HEADER(${dir}/soundcard.h,
+        sound_found=yes
+        XE_ADD_OBJS(linuxplay.o)
+        [AC_DEFINE_UNQUOTED(SOUNDCARD_H_PATH, "${dir}/soundcard.h")]
+        break)
+    done
+  fi
+
+  test "$sound_found" = "yes" && with_native_sound=yes
+fi
+
+if test -z "$with_sound"; then
+  if test "$with_native_sound" = "yes" -o -n "$native_sound_lib"; then
+    with_sound=native
+  fi
+fi
+
+if test "$with_native_sound" = "yes"; then
+  AC_DEFINE(HAVE_NATIVE_SOUND)
+  test -n "$native_sound_lib" && XE_PREPEND($native_sound_lib, LIBS)
+fi
+
+case "$with_sound" in both | nas )
+  AC_DEFINE(HAVE_NAS_SOUND)
+  XE_ADD_OBJS(nas.o)
+  XE_PREPEND(-laudio, libs_x)
+  dnl If the nas library does not contain the error jump point,
+  dnl then we force safer behaviour.
+  AC_EGREP_HEADER(AuXtErrorJump,audio/Xtutil.h,,[AC_DEFINE(NAS_NO_ERROR_JUMP)])
+esac
+
+dnl ---------------------
+dnl TTY-dependent options
+dnl ---------------------
+
+test -z "$with_tty" && with_tty=yes
+
+if test "$with_tty" = "yes"  ; then
+  AC_CHECKING(for TTY-related features)
+  AC_DEFINE(HAVE_TTY)
+  XE_ADD_OBJS(console-tty.o device-tty.o event-tty.o frame-tty.o objects-tty.o redisplay-tty.o cm.o)
+
+  dnl Autodetect ncurses.
+  if test -z "$with_ncurses"; then
+    AC_CHECK_LIB(ncurses, tgetent, with_ncurses=yes, with_ncurses=no)
+  fi
+  if test "$with_ncurses" = "yes"; then
+    AC_DEFINE(HAVE_NCURSES)
+    AC_CHECK_HEADER(ncurses/curses.h, curses_h_path=ncurses/curses.h)
+    AC_CHECK_HEADER(ncurses/term.h, term_h_path=ncurses/term.h)
+    XE_ADD_OBJS(terminfo.o)
+    XE_PREPEND(-lncurses, LIBS)
+
+    if test "$ac_cv_header_ncurses_curses_h" != "yes" ; then
+      dnl Try again, and check for the bogus ncurses/ include bug.
+      dnl (i.e. ncurses/curses.h bogusly includes <unctrl.h> instead of
+      dnl <ncurses/unctrl.h>)
+      save_c_switch_site="$c_switch_site"
+      c_switch_site="$c_switch_site -I/usr/include/ncurses"
+      AC_CHECK_HEADER(ncurses/curses.h, curses_h_path=ncurses/curses.h)
+      if test "$ac_cv_header_ncurses_curses_h" = "yes"
+        then AC_MSG_WARN("Your system has the bogus ncurses include bug.")
+        else c_switch_site="$save_c_switch_site"
+      fi
+    fi
+  else dnl "$with_ncurses" = "no"
+    dnl Autodetect terminfo/-lcurses/-ltermlib/-ltermcap
+    if test "$have_terminfo" = "yes"; then
+      XE_ADD_OBJS(terminfo.o)
+      if test -n "$libs_termcap"; then
+       XE_PREPEND($libs_termcap, LIBS)
+      else
+       for lib in curses termlib termcap; do
+         AC_CHECK_LIB($lib, tgetent, XE_PREPEND(-l${lib}, LIBS); break)
+       done
+      fi
+    else dnl "$have_terminfo" = "no" && "with_ncurses" = "no"
+      XE_ADD_OBJS(tparam.o)
+      dnl The HP-UX curses library seems to have a badly broken version of select(2)
+      dnl that makes "poll: interrupted system call" messages to appear and
+      dnl Emacs suprocesses to hang (e.g. TeX compilation w/ AUCTeX) */
+      case "$opsys" in *-hp-hpux* ) libs_termcap="-ltermcap" ;; esac
+      if test -n "$libs_termcap"; then
+       XE_PREPEND($libs_termcap, LIBS)
+      else
+       AC_CHECK_LIB(curses, tgetent, XE_PREPEND(-lcurses, LIBS),
+         AC_CHECK_LIB(termcap, tgetent, XE_PREPEND(-ltermcap, LIBS),
+            XE_ADD_OBJS(termcap.o)))
+      fi
+    fi
+  fi
+  AC_DEFINE_UNQUOTED(CURSES_H_PATH, "${curses_h_path-curses.h}")
+  AC_DEFINE_UNQUOTED(TERM_H_PATH, "${term_h_path-term.h}")
+
+  dnl Autodetect gpm
+  test -z "$with_gpm" && { AC_CHECK_HEADER(gpm.h, , with_gpm=no) }
+  test -z "$with_gpm" && { AC_CHECK_LIB(gpm, Gpm_Open, with_gpm=yes, with_gpm=no) }
+  if test "$with_gpm" = "yes"; then
+    AC_DEFINE(HAVE_GPM)
+    XE_ADD_OBJS(gpmevent.o)
+    XE_PREPEND(-lgpm, LIBS)
+  fi
+
+else dnl "$with_tty" = "no"
+  for feature in ncurses gpm; do
+    if eval "test -n \"\$with_${feature}\" -a \"\$with_${feature}\" != no" ; then
+      AC_MSG_WARN("--with-${feature} ignored:  Not valid without TTY support")
+    fi
+    eval "with_${feature}=no"
+  done
+fi dnl with_tty
+
+dnl Do we need event-unixoid.o ?
+test "$with_x11" = "yes" -o "$with_tty" = "yes" && XE_ADD_OBJS(event-unixoid.o)
+
+dnl Database support
+dnl <mdiers@logware.de>
+dnl We do not necessarily have to have libdb/lib(g)dbm for DB/(G)DBM support.
+dnl On FreeBSD, both DB and DBM are part of libc.
+dnl Note that unless support for DB/(G)DBM is explicitly disabled, we always
+dnl want to check for libdb/lib(g)dbm. Also note that libc will not be
+dnl checked if we have the libraries.
+dnl If support for DB/(G)DBM is requested, but we neither have libdb/lib(g)dbm,
+dnl nor does libc implement it, we are a bit lost :)
+
+AC_CHECKING(for database support)
+
+if test "$with_database_gnudbm" != "no"; then
+  AC_CHECK_HEADERS(ndbm.h, have_ndbm_h=yes)
+  if test "$have_ndbm_h" = "yes"; then
+    AC_CHECK_LIB(gdbm, dbm_open, with_database_gnudbm=yes have_libgdbm=yes)
+  fi
+  if test "$with_database_gnudbm" != "yes"; then
+    AC_CHECK_FUNC(dbm_open, with_database_gnudbm=yes)
+      fi
+  if test "$with_database_gnudbm" = "yes"; then
+    AC_DEFINE(HAVE_DBM)
+    test "$have_libgdbm" = "yes" && XE_PREPEND(-lgdbm, LIBS)
+    with_database_dbm=no
+  else with_database_gnudbm=no
+  fi
+fi
+
+if test "$with_database_dbm" != "no"; then
+  AC_CHECK_FUNC(dbm_open, with_database_dbm=yes need_libdbm=no)
+  if test "$need_libdbm" != "no"; then
+    AC_CHECK_LIB(dbm, dbm_open, with_database_dbm=yes need_libdbm=yes)
+  fi
+  if test "$with_database_dbm" = "yes"; then
+    AC_DEFINE(HAVE_DBM)
+    test "$need_libdbm" = "yes" && XE_PREPEND(-ldbm, LIBS)
+  else with_database_dbm=no
+  fi
+fi
+
+if test "$with_database_berkdb" != "no"; then
+  AC_MSG_CHECKING(for Berkeley db.h)
+  for path in "db/db.h" "db.h"; do
+    AC_TRY_COMPILE([#ifdef HAVE_INTTYPES_H
+#define __BIT_TYPES_DEFINED__
+#include <inttypes.h>
+typedef uint8_t  u_int8_t;
+typedef uint16_t u_int16_t;
+typedef uint32_t u_int32_t;
+#ifdef WE_DONT_NEED_QUADS
+typedef uint64_t u_int64_t;
+#endif
+#endif
+#include <$path>
+],[], db_h_path="$path"; break)
+  done
+  if test -z "$db_h_path" 
+  then AC_MSG_RESULT(no); with_database_berkdb=no
+  else AC_MSG_RESULT($db_h_path)
+  fi
+
+  if test "$with_database_berkdb" != "no"; then
+    AC_MSG_CHECKING(for Berkeley DB version)
+    AC_EGREP_CPP(yes,
+[#include <$db_h_path>
+#if DB_VERSION_MAJOR > 1
+yes
+#endif
+], [AC_MSG_RESULT(2); dbfunc=db_open], [AC_MSG_RESULT(1); dbfunc=dbopen])
+    AC_CHECK_FUNC($dbfunc,     with_database_berkdb=yes need_libdb=no, [
+    AC_CHECK_LIB(db, $dbfunc,  with_database_berkdb=yes need_libdb=yes)])
+  fi
+
+  if test "$with_database_berkdb" = "yes"; then
+    AC_DEFINE_UNQUOTED(DB_H_PATH, "$db_h_path")
+    AC_DEFINE(HAVE_BERKELEY_DB)
+    test "$need_libdb" = "yes" && XE_PREPEND(-ldb, LIBS)
+  else with_database_berkdb=no
+  fi
+fi
+
+if test "$with_database_gnudbm $with_database_dbm $with_database_berkdb" \
+     != "no no no"; then
+  AC_DEFINE(HAVE_DATABASE)
+  XE_ADD_OBJS(database.o)
+fi
+
+dnl Socks support
+if test "$with_socks" = "yes"; then
+  AC_CHECK_LIB(socks, SOCKSinit)
+  test -n "$ac_cv_lib_socks_SOCKSinit" && AC_DEFINE(HAVE_SOCKS)
+fi
+
+dnl Usage tracking (undocumented and likely unused option)
+if test "$usage_tracking" = "yes"; then
+  AC_DEFINE(USAGE_TRACKING)
+  XE_PREPEND(-Bstatic -lut -Bdynamic, LIBS)
+fi
+
+dnl autodetect dll support
+AC_CHECK_HEADERS(dlfcn.h, have_dlfcn=yes)
+test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(dl,  dlopen,   [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=dl;  with_shlib=yes]) }
+test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(c,   _dlopen,  [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=;   with_shlib=yes]) }
+test -z "$with_shlib" && test ! -z "$have_dlfcn" && { AC_CHECK_LIB(c,   dlopen,   [ AC_DEFINE(HAVE_DLOPEN) DLL_LIB=;   with_shlib=yes]) }
+test -z "$with_shlib" && { AC_CHECK_LIB(dld, shl_load, [ AC_DEFINE(HAVE_SHL_LOAD) DLL_LIB=dld; with_shlib=yes]) }
+test -z "$with_shlib" && { AC_CHECK_LIB(dld, dld_init, [ AC_DEFINE(HAVE_DLD_INIT) DLL_LIB=dld; with_shlib=yes]) }
+if test "$with_shlib" = "yes"; then
+  AC_DEFINE(HAVE_SHLIB)
+  XE_ADD_OBJS(sysdll.o)
+  XE_ADD_OBJS(dll.o)
+  test ! -z "$DLL_LIB" && XE_PREPEND(-l${DLL_LIB}, LIBS)
+  XE_MAKE_SHAREDLIB
+  AC_CHECK_FUNCS(dlerror)
+  ld_dynamic_link_flags=
+  dnl Fill this in with other values as this gets more testing
+  case "$opsys" in
+  hpux*)  ld_dynamic_link_flags="-Wl,-E" ;;
+  linux*) ld_dynamic_link_flags="-rdynamic" ;;
+  *) ;;
+  esac
+fi
+
+dnl Unfortunately, just because we can link doesn't mean we can run.
+dnl One of the above link tests may have succeeded but caused resulting
+dnl executables to fail to run.  Also any tests using AC_TRY_RUN will
+dnl have reported incorrect results.
+AC_TRY_RUN([int main(int c,char *v[]){return 0;}],[:],[
+  echo ""
+  echo "*** PANIC *** The C compiler can no longer build working executables."
+  echo "*** PANIC *** Please examine the tail of config.log for runtime errors."
+  echo "*** PANIC *** The most likely reason for this problem is that configure"
+  echo "*** PANIC *** links with shared libraries, but those libraries cannot be"
+  echo "*** PANIC *** found at run time."
+  echo "*** PANIC ***"
+  echo "*** PANIC *** On a Linux system, edit /etc/ld.so.conf and re-run ldconfig."
+  echo "*** PANIC *** On other systems, try telling configure where to find the"
+  echo "*** PANIC *** shared libraries using the --site-runtime-libraries option"
+  echo "*** PANIC ***"
+  echo "*** PANIC *** Another way to shoot yourself in the foot is to specify"
+  echo "*** PANIC *** --with-FEATURE when FEATURE is not actually installed"
+  echo "*** PANIC *** on your system.  Don't do that."
+  exit 1])
+
+dnl Process support (hardcoded)
+dnl every system that supports this runs configure, the others don't
+
+dnl We're not ready for this yet.
+AC_DEFINE(HAVE_UNIX_PROCESSES)
+XE_ADD_OBJS(process-unix.o)
+
+dnl --------------------------------
+dnl Compute SUBST-itutable variables
+dnl --------------------------------
+
+dnl We ignore (C|LD)_SWITCH_X_(MACHINE|SYSTEM)
+dnl Use XE_SPACE instead of plain assignment statements to remove extraneous blanks
+XE_SPACE(CFLAGS, $CFLAGS)
+XE_SPACE(extra_objs, $extra_objs)
+XE_SPACE(c_switch_general, -DHAVE_CONFIG_H $c_switch_site $c_switch_machine $c_switch_system)
+XE_SPACE(c_switch_window_system, $c_switch_x_site $X_CFLAGS)
+XE_SPACE(c_switch_all, $c_switch_general $c_switch_window_system)
+XE_SPACE(ld_switch_general, $ld_switch_site $ld_switch_machine $ld_switch_system $ld_switch_run)
+XE_SPACE(ld_switch_window_system, $ld_switch_x_site)
+XE_SPACE(ld_switch_all, $ld_switch_general $ld_switch_window_system)
+XE_SPACE(ld_libs_general, $LIBS $libs_machine $libs_system $libs_standard)
+XE_SPACE(ld_libs_window_system, $X_EXTRA_LIBS $libs_x $X_PRE_LIBS)
+XE_SPACE(ld_libs_all, $ld_libs_window_system $ld_libs_general)
+
+dnl Compute lists of Makefiles and subdirs
+AC_SUBST(SRC_SUBDIR_DEPS)
+XE_APPEND(src, MAKE_SUBDIR)
+internal_makefile_list="Makefile"
+SUBDIR_MAKEFILES=''
+test -d lock || mkdir lock
+for dir in $MAKE_SUBDIR; do
+  case "$dir" in */* ) dnl Implement mkdir -p
+    ( for d in `echo $dir | sed 's:/: :g'` ; do
+        test -d "$d" || mkdir "$d"; cd "$d"
+      done ) ;;
+   * ) test -d "$dir" || mkdir "$dir" ;;
+  esac
+  XE_SPACE(SUBDIR_MAKEFILES, $SUBDIR_MAKEFILES $dir/Makefile)
+  XE_SPACE(internal_makefile_list, $internal_makefile_list $dir/Makefile.in)
+done
+AC_SUBST(INSTALL_ARCH_DEP_SUBDIR)
+AC_SUBST(MAKE_SUBDIR)
+AC_SUBST(SUBDIR_MAKEFILES)
+
+dnl Make s&m symlinks in the src directory, for config.h
+for dir in src/s src/m; do
+  if test ! -d "$dir" ; then
+    echo Making symbolic link to "$srcdir/$dir"
+    ${LN_S} "$srcdir/$dir" "$dir"
+  fi
+done
+
+if test "$extra_verbose" = "yes"; then
+  echo ""
+  PRINT_VAR(extra_objs
+   c_switch_general  c_switch_window_system  c_switch_all
+  ld_switch_general ld_switch_window_system ld_switch_all
+    ld_libs_general   ld_libs_window_system   ld_libs_all)
+  echo ""
+fi
+
+dnl Create some auxiliary files
+if test -f $srcdir/src/gdbinit -a ! -f src/gdbinit ; then
+  echo "creating src/gdbinit"; echo ""
+  echo "source $srcdir/src/gdbinit" > src/gdbinit
+fi
+
+dnl Create top level .sbinit for Sun compilers
+if test "$__sunpro_c" = "yes"; then
+  echo "creating .sbinit"; echo ""
+  ( echo "# For use with Sun WorkShop's Source browser."
+    echo "# See sbquery(1) and sbinit(4) for more information"
+    for dir in $MAKE_SUBDIR; do echo "import $dir"; done
+  ) > .sbinit
+fi
+
+dnl There are no more compile tests; remove the core they created.
+rm -f core
+
+dnl ----------------------------------------------
+dnl Substitute into Makefile, config.h and paths.h
+dnl ----------------------------------------------
+
+dnl what sort of things to edit into Makefile, config.h and paths.h
+dnl configuration here uncanonicalized to avoid exceeding size limits.
+
+AC_SUBST(PROGNAME)
+AC_SUBST(version)
+AC_SUBST(configuration)
+AC_SUBST(canonical)
+AC_SUBST(srcdir)
+AC_SUBST(bindir)
+AC_SUBST(datadir)
+AC_SUBST(pkgdir)
+AC_SUBST(statedir)
+AC_SUBST(libdir)
+AC_SUBST(mandir)
+
+AC_SUBST(prefix)
+dnl Yo, Stephen Bourne!  I want to marry you!
+PREFIX=$prefix
+while true; do
+  case "$PREFIX" in
+    *\$* ) eval "PREFIX=$PREFIX" ;;
+    *) break ;;
+  esac
+done
+AC_SUBST(PREFIX)
+
+AC_SUBST(exec_prefix)
+EXEC_PREFIX=$exec_prefix
+while true; do
+  case "$EXEC_PREFIX" in
+    *\$* ) eval "EXEC_PREFIX=$EXEC_PREFIX" ;;
+    *) break ;;
+  esac
+done
+AC_SUBST(EXEC_PREFIX)
+
+AC_SUBST(infodir)
+AC_SUBST(INFODIR_USER_DEFINED)
+INFODIR=$infodir
+while true; do
+  case "$INFODIR" in
+    *\$* ) eval "INFODIR=$INFODIR" ;;
+    *) break ;;
+  esac
+done
+AC_SUBST(INFODIR)
+
+AC_SUBST(infopath)
+AC_SUBST(INFOPATH_USER_DEFINED)
+INFOPATH=$infopath
+while true; do
+  case "$INFOPATH" in
+    *\$* ) eval "INFOPATH=$INFOPATH" ;;
+    *) break ;;
+  esac
+done
+AC_SUBST(INFOPATH)
+
+AC_SUBST(package_path)
+AC_SUBST(PACKAGE_PATH_USER_DEFINED)
+PACKAGE_PATH=$package_path
+while true; do
+  case "$PACKAGE_PATH" in
+    *\$* ) eval "PACKAGE_PATH=$PACKAGE_PATH" ;;
+    *) break ;;
+  esac
+done
+AC_SUBST(PACKAGE_PATH)
+
+AC_SUBST(lispdir)
+AC_SUBST(LISPDIR_USER_DEFINED)
+LISPDIR=$lispdir
+while true; do
+  case "$LISPDIR" in
+    *\$* ) eval "LISPDIR=$LISPDIR" ;;
+    *) break ;;
+  esac
+done
+AC_SUBST(LISPDIR)
+
+dnl AC_SUBST(sitelispdir)
+dnl AC_SUBST(SITELISPDIR_USER_DEFINED)
+dnl SITELISPDIR=$sitelispdir
+dnl while true; do
+dnl   case "$SITELISPDIR" in
+dnl     *\$* ) eval "SITELISPDIR=$SITELISPDIR" ;;
+dnl     *) break ;;
+dnl   esac
+dnl done
+dnl AC_SUBST(SITELISPDIR)
+
+AC_SUBST(etcdir)
+AC_SUBST(ETCDIR_USER_DEFINED)
+ETCDIR=$etcdir
+while true; do
+  case "$ETCDIR" in
+    *\$* ) eval "ETCDIR=$ETCDIR" ;;
+    *) break ;;
+  esac
+done
+AC_SUBST(ETCDIR)
+
+AC_SUBST(lockdir)
+AC_SUBST(LOCKDIR_USER_DEFINED)
+LOCKDIR=$lockdir
+while true; do
+  case "$LOCKDIR" in
+    *\$* ) eval "LOCKDIR=$LOCKDIR" ;;
+    *) break ;;
+  esac
+done
+AC_SUBST(LOCKDIR)
+
+AC_SUBST(archlibdir)
+AC_SUBST(ARCHLIBDIR_USER_DEFINED)
+ARCHLIBDIR=$archlibdir
+while true; do
+  case "$ARCHLIBDIR" in
+    *\$* ) eval "ARCHLIBDIR=$ARCHLIBDIR" ;;
+    *) break ;;
+  esac
+done
+AC_SUBST(ARCHLIBDIR)
+
+AC_SUBST(docdir)
+AC_SUBST(bitmapdir)
+AC_SUBST(extra_objs)
+AC_SUBST(ld_dynamic_link_flags)
+
+dnl The following flags combine all the information from:
+dnl - command line options (user always gets priority)
+dnl - user environment variables
+dnl - determined by configure
+dnl - the s&m header files (deprecated)
+AC_SUBST(machfile)
+AC_SUBST(opsysfile)
+AC_SUBST(c_switch_general)
+AC_SUBST(c_switch_window_system)
+AC_SUBST(c_switch_all)
+AC_SUBST(ld_switch_general)
+AC_SUBST(ld_switch_window_system)
+AC_SUBST(ld_switch_all)
+AC_SUBST(ld_libs_general)
+AC_SUBST(ld_libs_window_system)
+AC_SUBST(ld_libs_all)
+AC_SUBST(CFLAGS)
+AC_SUBST(CPPFLAGS)
+AC_SUBST(LDFLAGS)
+RECURSIVE_MAKE="\$(MAKE) \$(MFLAGS) CC='\$(CC)' CFLAGS='\$(CFLAGS)' LDFLAGS='\$(LDFLAGS)' CPPFLAGS='\$(CPPFLAGS)'"
+AC_SUBST(RECURSIVE_MAKE)
+
+AC_SUBST(native_sound_lib)
+AC_SUBST(sound_cflags)
+AC_SUBST(RANLIB)
+AC_SUBST(dynodump_arch)
+
+# The default is yes
+if test "$with_site_lisp" = "no"; then
+  AC_DEFINE(INHIBIT_SITE_LISP)
+fi
+
+XE_SPACE(ac_configure_args, $ac_configure_args)
+AC_DEFINE_UNQUOTED(EMACS_CONFIGURATION, "$canonical")
+AC_DEFINE_UNQUOTED(EMACS_CONFIG_OPTIONS, "$ac_configure_args")
+AC_DEFINE_UNQUOTED(config_machfile,  "$machfile")
+AC_DEFINE_UNQUOTED(config_opsysfile, "$opsysfile")
+
+dnl Following are deprecated
+
+null_string=""
+AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE,     $null_string)
+AC_DEFINE_UNQUOTED(LD_SWITCH_X_SITE_AUX, $null_string)
+AC_DEFINE_UNQUOTED(C_SWITCH_X_SITE,      $null_string)
+AC_DEFINE_UNQUOTED(LD_SWITCH_SITE,       $null_string)
+AC_DEFINE_UNQUOTED(C_SWITCH_SITE,        $null_string)
+
+dnl Note: as a general rule, *only* define things here that are not
+dnl autodetected.  For things that are autodetected, define them
+dnl at the point where the autodetection occurs or would occur,
+dnl so that the user gets immediate feedback on the results of the
+dnl autodetection.
+
+test -n "$puresize" && AC_DEFINE_UNQUOTED(RAW_PURESIZE, $puresize)
+
+if   test "$GNU_MALLOC"         = "yes"; then AC_DEFINE(GNU_MALLOC)
+elif test "$with_system_malloc" = "yes"; then AC_DEFINE(USE_SYSTEM_MALLOC)
+elif test "$with_debug_malloc"  = "yes"; then AC_DEFINE(USE_DEBUG_MALLOC)
+                                             AC_DEFINE(USE_SYSTEM_MALLOC)
+fi
+test "$with_i18n3"         = "yes" && AC_DEFINE(I18N3)
+test "$GCC"                = "yes" && AC_DEFINE(USE_GCC)
+test "$external_widget"    = "yes" && AC_DEFINE(EXTERNAL_WIDGET)
+test "$with_gnu_make"      = "yes" && AC_DEFINE(USE_GNU_MAKE)
+test "$no_doc_file"        = "yes" && AC_DEFINE(NO_DOC_FILE)
+dnl test "$const_is_losing"    = "yes" && AC_DEFINE(CONST_IS_LOSING)
+test "$with_quantify"      = "yes" && AC_DEFINE(QUANTIFY)
+test "$with_pop"           = "yes" && AC_DEFINE(MAIL_USE_POP)
+test "$with_kerberos"      = "yes" && AC_DEFINE(KERBEROS)
+test "$with_hesiod"        = "yes" && AC_DEFINE(HESIOD)
+test "$use_union_type"     = "yes" && AC_DEFINE(USE_UNION_TYPE)
+
+dnl -------------------------------
+dnl Report on what we decided to do
+dnl -------------------------------
+
+(
+dnl /etc/osversion is on SONY NEWS-OS
+if test -f /etc/osversion; then dnl SONY NEWS-OS
+  echo "osversion: `cat /etc/osversion`"
+else
+  echo "uname -a: `uname -a`"
+fi
+echo ""
+echo "$0 $quoted_arguments"
+) > Installation
+
+xemacs_betaname=""
+test ! -z "${emacs_beta_version}" && xemacs_betaname="-b${emacs_beta_version}"
+
+dnl Start stdout redirection to '| tee -a Installation'
+(
+echo "
+
+XEmacs ${emacs_major_version}.${emacs_minor_version}${xemacs_betaname} \"$xemacs_codename\" configured for \`$canonical'.
+
+  Where should the build process find the source code?    $srcdir
+  What installation prefix should install use?           $prefix
+  What operating system and machine description files should XEmacs use?
+        \`$opsysfile' and \`$machfile'
+  What compiler should XEmacs be built with?              $CC $CFLAGS
+  Should XEmacs use the GNU version of malloc?            ${GNU_MALLOC}${GNU_MALLOC_reason}
+  Should XEmacs use the relocating allocator for buffers? $rel_alloc
+  What window system should XEmacs use?                   ${window_system}"
+if test "$with_x11" = "yes"; then
+  echo "  Where do we find X Windows header files?                $x_includes"
+  echo "  Where do we find X Windows libraries?                   $x_libraries"
+fi
+if test -n "$site_includes"; then
+  echo "  Additional header files:                                $site_includes"
+fi
+if test -n "$site_libraries"; then
+  echo "  Additional libraries:                                   $site_libraries"
+fi
+if test -n "$site_prefixes"; then
+  echo "  Additional prefixes:                                    $site_prefixes"
+fi
+if test -n "$runpath"; then
+  echo "  Runtime library search path:                            $runpath"
+fi
+test "$with_dnet"  = yes && echo "  Compiling in support for DNET."
+test "$with_socks" = yes && echo "  Compiling in support for SOCKS."
+test "$with_xauth" = yes && echo "  Compiling in support for XAUTH."
+if test "$with_xmu" != yes -a "$with_x11" = yes; then
+  echo "  No Xmu; substituting equivalent routines."
+fi
+
+if test "$with_xpm" = yes; then
+  echo "  Compiling in support for XPM images."
+elif test "$with_x11" = yes; then
+  echo "  --------------------------------------------------------------------"
+  echo "  WARNING: Compiling without XPM support."
+  echo "  WARNING: You should strongly considering installing XPM."
+  echo "  WARNING: Otherwise toolbars and other graphics will look suboptimal."
+  echo "  --------------------------------------------------------------------"
+fi
+test "$with_xface" = yes && echo "  Compiling in support for X-Face message headers."
+test "$with_gif"   = yes && echo "  Compiling in support for GIF image conversion."
+test "$with_jpeg"  = yes && echo "  Compiling in support for JPEG image conversion."
+test "$with_png"   = yes && echo "  Compiling in support for PNG image conversion."
+test "$with_tiff"  = yes && echo "  Compiling in support for TIFF image conversion."
+case "$with_sound" in
+  nas    ) echo "  Compiling in network sound (NAS) support." ;;
+  native ) echo "  Compiling in native sound support." ;;
+  both   ) echo "  Compiling in both network and native sound support." ;;
+esac
+test "$old_nas" = yes && echo "        nas library lacks error trapping, will play synchronously"
+
+test "$with_database_berkdb" = yes && echo "  Compiling in support for Berkeley DB."
+test "$with_database_dbm"    = yes && echo "  Compiling in support for DBM."
+test "$with_database_gnudbm" = yes && echo "  Compiling in support for GNU DBM."
+
+test "$with_umich_ldap"             = yes && echo "  Compiling in support for LDAP (UMich libs)."
+test "$with_ns_ldap"        = yes && echo "  Compiling in support for LDAP (Netscape SDK)."
+test "$with_ldap" = yes -a "$with_umich_ldap" = no -a "$with_ns_ldap" = no && echo "  Compiling in support for LDAP (Generic)."
+
+test "$with_ncurses"  = yes && echo "  Compiling in support for ncurses."
+test "$with_gpm"      = yes && echo "  Compiling in support for GPM (General Purpose Mouse)."
+
+test "$with_mule"     = yes && echo "  Compiling in Mule (multi-lingual) support."
+test "$with_file_coding"     = yes && echo "  Compiling in File coding support."
+test "$with_xim"      != no && echo "  Compiling in XIM (X11R5+ I18N input method) support."
+test "$with_xim" = motif    && echo "    Using Motif to provide XIM support."
+test "$with_xim" = xlib     && echo "    Using raw Xlib to provide XIM support."
+test "$with_xfs" = yes      && echo "    Using XFontSet to provide bilingual menubar."
+test "$with_canna"    = yes && echo "  Compiling in support for Canna on Mule."
+if test "$with_wnn" = yes; then
+  echo "  Compiling in support for the WNN input method on Mule."
+  test "$with_wnn6" = yes && echo "    Using WNN version 6."
+fi
+test "$with_i18n3"    = yes && echo "  Compiling in I18N support, level 3 (doesn't currently work)."
+
+test "$with_cde"      = yes && echo "  Compiling in support for CDE."
+test "$with_tooltalk" = yes && echo "  Compiling in support for ToolTalk."
+test "$with_offix"    = yes && echo "  Compiling in support for OffiX."
+test "$with_dragndrop" = yes && echo "  Compiling in EXPERIMENTAL support for Drag'n'Drop ($dragndrop_proto )."
+test "$with_workshop" = yes && echo "  Compiling in support for Sun WorkShop."
+test "$with_session"  != no && echo "  Compiling in support for proper session-management."
+case "$with_menubars" in
+  lucid ) echo "  Using Lucid menubars." ;;
+  motif ) echo "  Using Motif menubars."
+          echo "  *WARNING*  The Motif menubar implementation is currently buggy."
+          echo "             We recommend using the Lucid menubar instead."
+          echo "             Re-run configure with --with-menubars='lucid'." ;;
+esac
+case "$with_scrollbars" in
+  lucid    ) echo "  Using Lucid scrollbars."     ;;
+  motif    ) echo "  Using Motif scrollbars."     ;;
+  athena   ) echo "  Using Athena scrollbars."    ;;
+  athena3d ) echo "  Using Athena-3d scrollbars." ;;
+esac
+case "$with_dialogs" in
+  motif    ) echo "  Using Motif dialog boxes."     ;;
+  athena   ) echo "  Using Athena dialog boxes."    ;;
+  athena3d ) echo "  Using Athena-3d dialog boxes." ;;
+esac
+test "$with_shlib" = "yes" && echo "  Compiling in DLL support."
+test "$with_clash_detection" = yes && \
+  echo "  Clash detection will use \"$lockdir\" for locking files."
+echo "  movemail will use \"$mail_locking\" for locking mail spool files."
+test "$with_pop"       = yes && echo "  Using POP for mail access"
+test "$with_kerberos"  = yes && echo "  Using Kerberos for POP authentication"
+test "$with_hesiod"    = yes && echo "  Using Hesiod to get POP server host"
+test "$use_union_type"  = yes && echo "  Using the union type for Lisp_Objects."
+test "$use_minimal_tagbits" = yes && echo "  Using Lisp_Objects with minimal tagbits."
+test "$use_indexed_lrecord_implementation" = yes && echo "  Using indexed lrecord implementation."
+test "$debug"              = yes && echo "  Compiling in extra code for debugging."
+test "$memory_usage_stats" = yes && echo "  Compiling in code for checking XEmacs memory usage."
+test "$usage_tracking"     = yes && echo "  Compiling with usage tracking active (Sun internal)."
+if test "$error_check_extents $error_check_typecheck $error_check_bufpos $error_check_gc $error_check_malloc" \
+  != "no no no no no"; then
+  echo "  WARNING: ---------------------------------------------------------"
+  echo "  WARNING: Compiling in support for runtime error checking."
+  echo "  WARNING: XEmacs will run noticeably more slowly as a result."
+  echo "  WARNING: Error checking is on by default for XEmacs beta releases."
+  echo "  WARNING: ---------------------------------------------------------"
+fi
+echo ""
+) | tee -a Installation
+dnl echo "The above configure report is appended to \"Installation\" file."
+echo ""
+
+dnl Generate Installation.el
+echo '(setq Installation-string "' > Installation.el
+sed 's/"/\\"/g' Installation >> Installation.el
+echo '")' >> Installation.el
+
+dnl -----------------------------------
+dnl Now generate config.h and Makefiles
+dnl -----------------------------------
+
+dnl This has to be called in order for this variable to get into config.status
+AC_SUBST(internal_makefile_list)
+# Remove any trailing slashes in these variables.
+test -n "$prefix" &&
+  prefix=`echo '' "$prefix" | sed -e 's:^ ::' -e 's,\([[^/]]\)/*$,\1,'`
+test -n "$exec_prefix" &&
+  exec_prefix=`echo '' "$exec_prefix" | sed -e 's:^ ::' -e 's,\([[^/]]\)/*$,\1,'`
+
+dnl Build Makefile.in's from Makefile.in.in's
+dnl except ./Makefile from $srcdir/Makefile.in
+
+for file in $internal_makefile_list; do
+  test "$file" = src/Makefile.in && \
+    file="src/Makefile.in:src/Makefile.in.in:src/depend"
+  ac_output_files="${ac_output_files+$ac_output_files }$file"
+done
+ac_output_files="$ac_output_files src/paths.h lib-src/config.values"
+
+AC_OUTPUT($ac_output_files,
+[for dir in $MAKE_SUBDIR; do
+  echo creating $dir/Makefile
+  (
+changequote(<<, >>)dnl
+    cd $dir
+    rm -f junk.c
+    < Makefile.in \
+      sed -e '/^# Generated/d' \
+          -e 's%/\*\*/#.*%%' \
+          -e 's/^ *# */#/' \
+          -e '/^##/d' \
+          -e '/^#/ {
+p
+d
+}'        -e '/./ {
+s/\([\"]\)/\\\1/g
+s/^/"/
+s/$/"/
+}'  > junk.c;
+    $CPP -I. -I${top_srcdir}/src $CPPFLAGS junk.c > junk.cpp;
+    < junk.cpp                         \
+      sed -e 's/^#.*//'                        \
+       -e 's/^[ TAB][ TAB]*$//'        \
+       -e 's/^ /TAB/'                  \
+       | sed -n -e '/^..*$/p'          \
+       | sed '/^"/ {
+s/\\\([\"]\)/\1/g
+s/^[ TAB]*"//
+s/"[ TAB]*$//
+}'     > Makefile.new
+    chmod 444 Makefile.new
+    mv -f Makefile.new Makefile
+    rm -f junk.c junk.cpp
+changequote([, ])dnl
+)
+done
+
+dnl Append AC_DEFINE information to lib-src/config.values
+dnl (AC_SUBST information is already there (see config.values.sh).
+sed < config.status >> lib-src/config.values \
+  -e '/{ac_dA}.*{ac_dB}.*{ac_dC}.*{ac_dD}$/!d' \
+  -e 's/\${ac_dA}\(.*\)\${ac_dB}.*\${ac_dC}\(.*\)\${ac_dD}/\1 \2/' \
+  -e 's/^\([[^ ]]*\) $/\1 ""/' \
+  -e 's/ 1$/ t/'
+
+],
+[CPP="$CPP"
+ CPPFLAGS="$CPPFLAGS"
+ top_srcdir="$srcdir"
+ MAKE_SUBDIR="$MAKE_SUBDIR"
+])
diff --git a/configure.usage b/configure.usage
new file mode 100644 (file)
index 0000000..bcab03e
--- /dev/null
@@ -0,0 +1,249 @@
+Usage: configure [--OPTION[=VALUE] ...] [CONFIGURATION]
+
+Set compilation and installation parameters for XEmacs, and report.
+
+Note that for most of the following options, you can explicitly enable
+them using `--OPTION=yes' and explicitly disable them using `--OPTION=no'.  
+This is especially useful for auto-detected options.
+The option `--without-FEATURE' is a synonym for `--with-FEATURE=no'.
+
+Options marked with a (*) are auto-detected.
+
+Use colons (or quoted spaces) to separate directory names in option
+values which are PATHs (i.e. lists of directories).
+
+General options:
+
+--help                 Issue this usage message.
+--verbose              Display the results of configure tests.
+--extra-verbose                Display even more information, useful for debugging.
+
+
+Compilation options:
+
+--compiler=prog                C compiler to use.
+--with-gcc (*)         Use GCC to compile XEmacs.
+--without-gcc          Don't use GCC to compile XEmacs.
+--with-gnu-make                Write the Makefiles to take advantage of
+                       special features of GNU Make. (GNU Make
+                       works fine on the Makefiles even without this
+                       option.  This just allows for simultaneous
+                       in-place and --srcdir building.)
+--cflags=FLAGS         Compiler flags (such as -O)
+--cpp=prog             C preprocessor to use (e.g. /usr/ccs/lib/cpp or cc -E)
+--cppflags=FLAGS       C preprocessor flags (e.g. -I/foo or -Dfoo=bar)
+--libs=LIBS            Additional libraries (e.g. -lfoo)
+--ldflags=FLAGS                Additional linker flags (e.g. -L/foo)
+--site-includes=PATH   List of directories to search first for header files.
+--site-libraries=PATH  List of directories to search first for libraries.
+--site-prefixes=PATH    List of directories to search for include/ and lib/
+                        subdirectories, just after 'site-includes' and
+                        'site-libraries'.
+--site-runtime-libraries=PATH
+                       List of ALL directories to search for dynamically
+                       linked libraries at run time.
+--dynamic=yes          Link dynamically if supported by system.
+--dynamic=no           Force static linking on systems where dynamic
+                       linking is the default.
+--srcdir=DIR           Look for the XEmacs source files in DIR.
+                       See also --with-gnu-make.
+--use-indexed-lrecord-implementation
+--use-minimal-tagbits
+--gung-ho              Build with new-style Lisp_Objects.
+                       Equivalent to both of the 2 previous options combined.
+
+
+Installation options:
+
+--prefix=DIR           Install files below DIR.  Defaults to `/usr/local'.
+
+
+Window-system options:
+
+--with-x11 (*)         Support the X Window System.
+--without-x11          Don't support X.
+--x-includes=DIR       Search for X header files in DIR.
+--x-libraries=DIR      Search for X libraries in DIR.
+--without-toolbars     Don't compile with any toolbar support.
+--without-session      Compile without realized leader window which will
+                       keep the WM_COMMAND property. Required for proper
+                       session-management.
+--with-menubars=TYPE   Use TYPE menubars (lucid, motif, or no).  The Lucid
+                       widgets emulate Motif (mostly) but are faster.
+                       *WARNING*  The Motif menubar is currently broken.
+--with-scrollbars=TYPE Use TYPE scrollbars
+                       (lucid, motif, athena, athena3d, or no).
+--with-dialogs=TYPE    Use TYPE dialog boxes (motif, athena, athena3d, or no).
+                       Lucid menubars and scrollbars are the default.
+                       Motif dialog boxes will be used if Motif can be found.
+--with-dragndrop (*)   Compile in the generic drag and drop API. This is
+                       automatically added if one of the drag and drop
+                       protocols is found (currently CDE, OffiX, MSWindows).
+                       *WARNING*  The Drag'n'drop support is under development
+                                  and is considered experimental.
+--with-cde (*)         Compile in support for CDE drag and drop.
+--with-offix (*)       Compile in support for OffiX drag and drop.
+                       *WARNING*  If you compile in OffiX, you may not be
+                                  able to use multiple X displays success-
+                                  fully.  If the two servers are from
+                                  different vendors, the results may be
+                                  unpredictable.
+--without-xmu (*)      For those unfortunates whose vendors don't ship Xmu.
+--external-widget      Compile with external widget support.
+--with-xpm (*)         Compile with support for XPM files.
+                       It is highly recommended that you obtain XPM
+                       (version 3.4h or better) if you don't already
+                       have it.  Get it from the XEmacs FTP site.
+--with-xface (*)       Compile with support for X-Face mail header
+                       conversion.  Requires the compface library.
+                       Get it from the XEmacs FTP site.
+--with-gif (*)         Compile with support for GIF image conversion.
+                       Requires GifLib 3.1 or greater.  Get it from
+                       the XEmacs FTP site.
+--with-jpeg (*)                Compile with support for JPEG image conversion.
+                       Requires libjpeg from the Independent JPEG Group.
+                       Get it from the XEmacs FTP site.
+--with-png (*)         Compile with support for PNG image conversion.
+                       Requires libpng.  Get it from the XEmacs FTP site.
+--with-tiff (*)                Compile with support for TIFF image conversion.
+                       Requires Sam Lefflier's libtiff library.
+                       Get if from the XEmacs FTP site.
+
+
+TTY options:
+
+--without-tty          Don't support TTY-s.
+--with-ncurses (*)     Use the ncurses library for tty support.
+--with-gpm (*)                 Compile in support for General Purpose Mouse.
+
+
+Additional features:
+
+--with-tooltalk (*)    Support the ToolTalk IPC protocol.
+--with-workshop                Support the Sun WorkShop (formerly Sparcworks)
+                       development environment.
+--with-socks           Compile with support for SOCKS (an Internet proxy).
+--with-database=TYPE (*) Compile with database support.  Valid types are
+                       `no' or a comma-separated list of one or more
+                       of `dbm', `gnudbm', or `berkdb'.
+--with-sound=native (*)        Compile with native sound support.
+--with-sound=nas       Compile with network sound support.
+--with-sound=both      Compile with native and network sound support.
+--native-sound-lib=LIB Native sound support library.  Needed on Suns
+                       with --with-sound=both because both sound libraries
+                       are called libaudio.
+--with-pop             support POP for mail retrieval
+--with-kerberos                support Kerberos-authenticated POP
+--with-hesiod          support Hesiod to get the POP server host
+--with-dnet (*)                Compile with support for DECnet.
+--with-ldap (*)         Compile with support for the LDAP protocol (requires
+                        installed LDAP libraries on the system).
+--mail-locking=TYPE (*)        Specify the locking to be used by movemail to prevent
+                       concurrent updates of mail spool files. Valid types
+                       are `lockf', `flock', and `file'.
+--with-site-lisp        Allow for a site-lisp directory in the XEmacs hierarchy 
+                       searched before the installation packages.
+--package-path=PATH     Directories to search for packages to dump with xemacs.
+                        PATH splits into three parts separated
+                        by double colons (::), an early, a late, and a last part,
+                        corresponding to their position in the various
+                        system paths:  The early part is always first, 
+                        the late part somewhere in the middle, and the 
+                        last part at the very back.
+                        Only the late part gets seen at dump time.
+                        If PATH has only one component, that component 
+                        is late.
+                        If PATH has two components, the first is
+                        early, the second is late.
+--infodir=DIR          Directory to install the XEmacs Info manuals and dir in.
+--infopath=PATH                Directories to search for Info documents, info dir
+                       and localdir files in case run-time searching
+                        for them fails.
+
+Internationalization options:
+
+--with-mule            Compile with Mule (MUlti-Lingual Emacs) support,
+                       needed to support non-Latin-1 (including Asian) languages.
+--with-xim=xlib                Compile with support for X input methods,
+--with-xim=motif (*)   Used in conjunction with Mule support.
+                       Use either raw Xlib to provide XIM support, or
+                       the Motif XmIm* routines (when available).
+                       NOTE:  On some systems bugs in X11's XIM support
+                       will cause XEmacs to crash, so by default,
+                       no XIM support is compiled in, unless running
+                       on Solaris and the XmIm* routines are detected.
+--with-canna (*)       Compile with support for Canna (a Japanese input method
+                       used in conjunction with Mule support).
+--with-wnn (*)         Compile with support for WNN (a multi-language input method
+                       used in conjunction with Mule support).
+--with-wnn6 (*)                Compile with support for the comercial package WNN version 6
+--with-i18n3           Compile with I18N level 3 (support for message
+                       translation).  This doesn't currently work.
+--with-xfs             Compile with XFontSet support for bilingual menubar.
+                       Can't use this option with --with-xim=motif or xlib.
+                       And should have --with-menubars=lucid.
+
+
+Debugging options:
+
+--debug                        Compile with support for debugging XEmacs.
+                       (Causes code-size increase and little loss of speed.)
+--error-checking=TYPE[,TYPE]...
+                       Compile with internal error-checking added.
+                       Causes noticeable loss of speed.  Valid types
+                       are extents, bufpos, malloc, gc, typecheck.
+--error-checking=none  Disable all internal error-checking (the default).
+--error-checking=all   Enable all internal error-checking.
+--memory-usage-stats   Compile with additional code to allow you to
+                       determine what XEmacs's memory is being used
+                       for.  Causes a small code increase but no loss
+                       of speed.  Normally enabled when --debug is given.
+--no-doc-file          Don't rebuild the DOC file unless it's explicitly
+                       deleted.  Only use during development. (It speeds
+                       up the compile-run-test cycle.)
+--use-union-type       Enable or disable use of a union, instead of an
+                       int, for the fundamental Lisp_Object type; this
+                       provides stricter type-checking.  Only works with
+                       some systems and compilers.
+
+
+Other options:
+
+--puresize=VALUE       Override default amount of space for pure Lisp code.
+--rel-alloc            Use the relocating allocator (default for this option
+                       is system-dependent).
+--with-dlmalloc                Control usage of Doug Lea malloc on systems that have
+                       it in the standard C library (default is to use it if
+                       it is available).
+--with-clash-detection Use lock files to detect multiple edits of the same file.
+                       The default is to not do clash detection.
+--lockdir=DIR          The directory to put clash detection files in, such as
+                       `/var/lock/emacs'.
+    Defaults to `${statedir}/xemacs/lock'.
+--with-system-malloc   Force use of the system malloc, rather than GNU malloc.
+--with-debug-malloc    Use the debugging malloc package.
+
+You may also specify any of the `path' variables found in Makefile.in,
+including --bindir, --libdir, --lispdir, --sitelispdir, --datadir,
+--infodir, --mandir and so on.  Note that we recommend against
+explicitly setting any of these variables.  See the INSTALL file for a
+complete list plus the reasons we advise not changing them.
+
+If successful, configure leaves its status in config.status.  If
+unsuccessful after disturbing the status quo, it removes config.status.
+
+The configure script also recognizes some environment variables, each
+of which is equivalent to a corresponding configure flag.  A specified
+configure flag always overrides the environment variable.
+
+envvar      configure flag
+-----       --------------
+CC          --compiler
+CPP         --cpp
+CFLAGS      --cflags
+CPPFLAGS    --cppflags
+LDFLAGS     --ldflags
+LIBS        --libs
+LD_RUN_PATH --site-runtime-libraries
+
+For more details on the install process, consult the INSTALL file.
diff --git a/dynodump/Makefile.in.in b/dynodump/Makefile.in.in
new file mode 100644 (file)
index 0000000..b98e2a9
--- /dev/null
@@ -0,0 +1,86 @@
+##   Makefile for dynodump subdirectory in XEmacs
+##   Copyright (C) 1995 Board of Trustees, University of Illinois
+##   Copyright (C) 1996, 1997 Sun Microsystems, Inc.
+
+## 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; see the file COPYING.  If not, write to
+## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+## Boston, MA 02111-1307, USA.
+
+## Synched up with: Not synched with FSF.
+
+## For performance and consistency, no built-in rules.
+.SUFFIXES:
+.SUFFIXES: .c .o .i .h
+
+@SET_MAKE@
+SHELL = /bin/sh
+RM = rm -f
+
+## ==================== Things "configure" will edit ====================
+
+CC=@CC@
+CFLAGS=@CFLAGS@
+ARCH=@dynodump_arch@
+
+srcdir=@srcdir@
+
+## ========================= start of cpp stuff =========================
+
+#define NO_SHORTNAMES
+#define NOT_C_CODE
+#include "../src/config.h"
+
+#ifdef USE_GNU_MAKE
+vpath %.c @srcdir@
+vpath %.h @srcdir@
+#else
+VPATH=@srcdir@
+#endif
+
+#ifdef USE_GCC
+pic_arg = -fpic
+#else
+pic_arg = -K pic
+#endif
+
+INCLUDES = -I${srcdir} -I${srcdir}/$(ARCH)
+ALL_CFLAGS = ${CFLAGS} ${pic_arg} ${INCLUDES}
+OBJS = _relocate.o dynodump.o syms.o uninit.o
+
+%.o : %.c
+       $(CC) -c $(ALL_CFLAGS) $<
+
+all:: dynodump.so
+
+dynodump.so: ${srcdir}/_dynodump.h $(OBJS)
+       PATH=/usr/ccs/bin:/bin:$$PATH ld -o dynodump.so -G $(OBJS) -lelf -lmapmalloc
+
+_relocate.o: ${srcdir}/$(ARCH)/_relocate.c
+       $(CC) -c $(ALL_CFLAGS) ${srcdir}/$(ARCH)/_relocate.c
+
+uninit.o: ${srcdir}/$(ARCH)/uninit.c
+       $(CC) -c $(ALL_CFLAGS) ${srcdir}/$(ARCH)/uninit.c
+
+.PHONY: mostlyclean clean distclean realclean extraclean
+mostlyclean:
+       $(RM) *.o *.i core
+clean: mostlyclean
+       $(RM) *.so *.so.1
+distclean: clean
+       $(RM) Makefile Makefile.in TAGS
+realclean: distclean
+extraclean: realclean
+       $(RM) *~ \#*
diff --git a/dynodump/README b/dynodump/README
new file mode 100644 (file)
index 0000000..f25d6f0
--- /dev/null
@@ -0,0 +1,101 @@
+               DYNODUMP
+               --------
+
+Dynodump, not to be confused with DinoTurd (as seen in Jurassic Park),
+is a shared object that provides one function:
+
+       int dynodump(char *new_file);
+
+dynodump(), called from a running program will write a new executable
+in new_file a la unexec() in GNU Emacs.  The difference lies in the
+relocations.
+
+dynodump() will create an image with any relocations (which were
+performed by the run-time dynamic linker) undone.  This allows the new
+image to be run in a different environment.  There is, however, one
+potentially major caveat.  If a symbol reference gets updated during
+the running of the calling program, its updated value will be lost.
+An example (with additional blank lines for legibility):
+
+       $ cat lib.c
+       char _foo[] = "hello";
+       char _bar[] = "world";
+
+       $ cc -G -o lib.so lib.c
+
+       $ cat prog.c
+       extern char _foo, _bar;
+       int beenhere = 0;
+       char * foo = &_foo;
+       char * bar = &_bar;
+       int
+       main(void)
+       {
+           (void) printf("%d: foo = %x\n", beenhere, foo);
+           (void) printf("%d: bar = %x, ", beenhere, bar);
+           if (!beenhere) {
+               beenhere = 1;
+               bar++;
+               dynodump("newfile");
+           }
+           (void) printf("%x\n", bar);
+       }
+
+       $ cc -o prog prog.c -R. lib.so dynodump.so
+
+       $ ./prog
+       0: foo = ef7503cc
+       0: bar = ef7503d2, ef7503d3
+
+       $ ./newfile
+       1: foo = ef7503cc
+       1: bar = ef7503d2, ef7503d2
+
+Notice that in the run of newfile, bar points at "world" instead of
+the perhaps expected "orld".
+
+Dynodump supports sparc, intel, and power pc architectures.
+
+Dynodump is buildable with GNU make and gcc.  If it works for you
+with these tools, let me know.
+
+unexec()
+--------
+
+Also supplied is an unexsol2.c which belongs in the XEmacs src
+directory with the other unex*.c files.  The src/s/sol2.h should be
+have the following added to it:
+
+       #ifdef UNEXEC
+       #undef UNEXEC
+       #endif
+       #define UNEXEC unexsol2.o
+
+This unexec() will attempt to dlopen() the dynodump.so to find the
+dynodump function.  The default is "../dynodump/dynodump.so" which
+should be appropriate for the typical XEmacs build (unless you used
+configure to set up separate build and source trees).  You may change
+it by setting the DYNODUMP environment variable to the full path of
+the dynodump shared object.
+
+Other notes:
+
+If you're using the 4.0 C compiler from Sun, you should arrange to
+shut off the incremental linker.  This is done with the -xildoff
+option to the compiler.  The common.mk and testsuite/Makefile files
+have commentary and ready made lines for uncommenting for this
+purpose.
+
+If you're interested in playing with the UltraSPARC specific options
+to the aforementioned compiler, then the same makefiles have some
+commentary and flags settings to point you in that direction.
+
+Questions:
+
+dynodump() was developed by Rod.Evans@Eng.Sun.COM and
+Georg.Nikodym@Canada.Sun.COM.  If you have questions, feel free to ask
+them but be aware that Rod, "don't know jack about emacs."
+
diff --git a/dynodump/_dynodump.h b/dynodump/_dynodump.h
new file mode 100644 (file)
index 0000000..847c4eb
--- /dev/null
@@ -0,0 +1,65 @@
+/*
+ *     Copyright (c) 1995 by Sun Microsystems, Inc.
+ *     All rights reserved.
+ *
+ * This source code is a product of Sun Microsystems, Inc. and is provided
+ * for unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify this source code without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * THIS PROGRAM CONTAINS SOURCE CODE COPYRIGHTED BY SUN MICROSYSTEMS, INC.
+ * SUN MICROSYSTEMS, INC., MAKES NO REPRESENTATIONS ABOUT THE SUITABLITY
+ * OF SUCH SOURCE CODE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT
+ * EXPRESS OR IMPLIED WARRANTY OF ANY KIND.  SUN MICROSYSTEMS, INC. DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO SUCH SOURCE CODE, INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN
+ * NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT,
+ * INCIDENTAL, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM USE OF SUCH SOURCE CODE, REGARDLESS OF THE THEORY OF LIABILITY.
+ * 
+ * This source code is provided with no support and without any obligation on
+ * the part of Sun Microsystems, Inc. to assist in its use, correction, 
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS
+ * SOURCE CODE OR ANY PART THEREOF.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+
+#pragma ident  "@(#) $Id: _dynodump.h,v 1.3 1997/05/29 04:22:29 steve Exp $ - SMI"
+
+#ifndef        _DYNODUMP_DOT_H
+#define        _DYNODUMP_DOT_H
+
+#include       <libelf.h>
+#include       "machdep.h"
+
+/* General rounding macro */
+#define        S_ROUND(x, a)   (((int)(x) + (((int)(a) ? (int)(a) : 1) - 1)) & \
+                        ~(((int)(a) ? (int)(a) : 1) - 1))
+
+/*
+ * Define a cache structure that is used to retain all elf section information.
+ */
+typedef struct cache {
+    Elf_Scn *c_scn;
+    Shdr *c_shdr;
+    Elf_Data *c_data;
+    char *c_name;
+} Cache;
+
+/*
+ * Define any local prototypes.
+ */
+extern void update_dynamic(Cache *);
+extern void update_reloc(Cache *, Cache *, Cache *, Cache *, Half shnum);
+extern void update_sym(Cache *, Cache *, Addr);
+extern void dynodump_uninit(void);
+
+#endif
diff --git a/dynodump/dynodump.c b/dynodump/dynodump.c
new file mode 100644 (file)
index 0000000..ff4477d
--- /dev/null
@@ -0,0 +1,560 @@
+/*
+ *     Copyright (c) 1995 by Sun Microsystems, Inc.
+ *     All rights reserved.
+ *
+ * This source code is a product of Sun Microsystems, Inc. and is provided
+ * for unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify this source code without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * THIS PROGRAM CONTAINS SOURCE CODE COPYRIGHTED BY SUN MICROSYSTEMS, INC.
+ * SUN MICROSYSTEMS, INC., MAKES NO REPRESENTATIONS ABOUT THE SUITABLITY
+ * OF SUCH SOURCE CODE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT
+ * EXPRESS OR IMPLIED WARRANTY OF ANY KIND.  SUN MICROSYSTEMS, INC. DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO SUCH SOURCE CODE, INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN
+ * NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT,
+ * INCIDENTAL, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM USE OF SUCH SOURCE CODE, REGARDLESS OF THE THEORY OF LIABILITY.
+ *
+ * This source code is provided with no support and without any obligation on
+ * the part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS
+ * SOURCE CODE OR ANY PART THEREOF.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+
+/*
+ * dynodump(3x) dumps a running executable into a specified ELF file.  The new
+ * file consists of the memory contents of the original file together with any
+ * heap.  This heap is assigned to a new `.heap' section within the new file.
+ *
+ * The new file may be re-executed, and will contain any data modifications
+ * made to the original image up until the time dynodump(3x) was called.
+ *
+ * The original image may have undergone relocations (performed by ld.so.1)
+ * prior to control being transferred to the image.  These relocations will
+ * reside as the data copied from the image.  To prevent subsequent executions
+ * of the new image from undergoing the same relocations, any relocation entries
+ * (besides copy or jump slot relocations) are nulled out.  Note that copy
+ * relocations such as required for __iob must be reinitialized each time the
+ * process starts, so it is not sufficient to simply null out the .dynamic
+ * sections relocation information.  The effect of this is that if the new
+ * image was bound to definitions in any shared object dependencies, then these
+ * dependencies *must* reside in the same location as when dynodump(3x) was
+ * called.  Any changes to the shared object dependencies of the new image, or
+ * uses of such things as LD_PRELOAD, may result in the bindings encoded in the
+ * image becoming invalid.
+ *
+ * The following flags modify the data of the image created:
+ *
+ *  RTLD_SAVREL        save the original relocation data.  Under this option any
+ *             relocation offset is reset to contain the same data as was
+ *             found in the images original file.
+ *
+ *             This option allows relocation information to be retained in the
+ *             new image so that it may be re-executed when the new image is
+ *             run.  This allows far greater flexibility as the new image can
+ *             now take advantage of new shared objects.
+ *
+ *             Note. under this mechanism, any data item that undergoes
+ *             relocation and is then further modified during the execution of
+ *             the image before dynodump(3x) is called will lose the
+ *             modification that occured during the applications execution.
+ *
+ * N.B. The above commentary is not quite correct in the flags have been hardwired
+ *      to RTLD_SAVREL.
+ */
+#pragma ident  "@(#) $Id: dynodump.c,v 1.6 1998/03/31 20:10:55 steve Exp $ - SMI"
+
+#define __EXTENSIONS__ 1
+
+#include       <sys/param.h>
+#include       <sys/procfs.h>
+#include       <fcntl.h>
+#include       <stdio.h>
+#include       <libelf.h>
+#include       <link.h>
+#include       <stdlib.h>
+#include       <string.h>
+#include       <unistd.h>
+#include       <errno.h>
+#include       <malloc.h>
+#include       "machdep.h"
+#include       "_dynodump.h"
+
+/*
+ * Generic elf error message generator
+ */
+static int
+elferr(const char * str)
+{
+    fprintf(stderr, "%s: %s\n", str, elf_errmsg(elf_errno()));
+    return (1);
+}
+
+int dynodump (const char * file);
+int
+dynodump(const char * file)
+{
+    Elf                *ielf, *oelf;
+    Ehdr       *iehdr, *oehdr;
+    Phdr       *iphdr, *ophdr, *data_phdr = 0;
+    Cache      *icache, *ocache, *_icache, *_ocache;
+    Cache      *data_cache = 0, *shstr_cache = 0;
+    Cache      *heap_cache = 0;
+    Word       heap_sz = 0;
+    Elf_Scn    *scn;
+    Shdr       *shdr;
+    Elf_Data   *data, rundata;
+    Half       ndx, _ndx;
+    int                fd, _fd;
+    Addr       edata, _addr;
+    char       *istrs, *ostrs, *_ostrs, proc[16];
+    const char         heap[] = ".heap";
+    prstatus_t pstat;
+
+    /* make a call to the processor specific un-init stuff */
+    dynodump_uninit();
+
+    /*
+     * Obtain a file descriptor for this process,
+     * for the executable and get a prstatus_t
+     * structure.
+     */
+    sprintf(proc, "/proc/%ld", getpid());
+    if (((_fd = open(proc, O_RDONLY, 0)) == -1) ||
+       ((fd = ioctl(_fd, PIOCOPENM, (void *)0)) == -1) ||
+       (ioctl(_fd, PIOCSTATUS, &pstat) == -1)) {
+       fprintf(stderr, "/proc: initialization error: %s\n",
+               strerror(errno));
+       close(_fd);
+       return (1);
+    }
+    close(_fd);
+
+    /*
+     * Initialize with the ELF library and make sure this is an executable
+     * ELF file we're dealing with.
+     */
+    elf_version(EV_CURRENT);
+    if ((ielf = elf_begin(fd, ELF_C_READ, NULL)) == NULL) {
+       close(fd);
+       return (elferr("elf_begin"));
+    }
+    close(fd);
+
+    if ((elf_kind(ielf) != ELF_K_ELF) ||
+       ((iehdr = elf_getehdr(ielf)) == NULL) ||
+       (iehdr->e_type != ET_EXEC)) {
+       fprintf(stderr, "image is not an ELF executable\n");
+       elf_end(ielf);
+       return (1);
+    }
+    /*
+     * Elf_elf_header(iehdr);
+     */
+
+    /*
+     * Create the new output file.
+     */
+    if ((fd = open(file, O_RDWR | O_CREAT | O_TRUNC, 0777)) == -1) {
+       fprintf(stderr, "%s: open failed: %s\n", file,
+                      strerror(errno));
+       elf_end(ielf);
+       return (1);
+    }
+    if ((oelf = elf_begin(fd, ELF_C_WRITE, NULL)) == NULL) {
+       elf_end(ielf);
+       close(fd);
+       return (elferr("elf_begin"));
+    }
+
+    /*
+     * Obtain the input program headers.  Remember the data segments
+     * program header entry as this will be updated later to reflect the
+     * new .heap sections size.
+     */
+    if ((iphdr = elf_getphdr(ielf)) == NULL)
+       return (elferr("elf_getphdr"));
+
+    for (ndx = 0, ophdr = iphdr; ndx != iehdr->e_phnum; ndx++, ophdr++) {
+       /*
+        * Save the program header that contains the NOBITS section, or
+        * the last loadable program header if no NOBITS exists.
+        * A NOBITS section translates to a memory size requirement that
+        * is greater than the file data it is mapped from.
+        */
+       if (ophdr->p_type == PT_LOAD) {
+           if (ophdr->p_filesz != ophdr->p_memsz)
+               data_phdr = ophdr;
+           else if (data_phdr) {
+               if (data_phdr->p_vaddr < ophdr->p_vaddr)
+                   data_phdr = ophdr;
+           } else
+               data_phdr = ophdr;
+       }
+    }
+    if (data_phdr == 0) {
+       fprintf(stderr, "no data segment found!\n");
+       return (0);
+    }
+
+    /*
+     * Obtain the input files section header string table.
+     */
+    if ((scn = elf_getscn(ielf, iehdr->e_shstrndx)) == NULL)
+       return (elferr("elf_getscn"));
+    if ((data = elf_getdata(scn, NULL)) == NULL)
+       return (elferr("elf_getdata"));
+    istrs = (char *) data->d_buf;
+
+    /*
+     * Construct a cache to maintain the input files section information.
+     */
+    if ((icache = (Cache *) malloc(iehdr->e_shnum * sizeof (Cache))) == 0) {
+       fprintf(stderr, "malloc failed: %s\n", strerror(errno));
+       return (1);
+    }
+    _icache = icache;
+    _icache++;
+
+    /*
+     * Traverse each section from the input file.
+     */
+    for (ndx = 1, scn = 0;
+        (_icache->c_scn = elf_nextscn(ielf, scn));
+        ndx++, scn = _icache->c_scn, _icache++) {
+
+       if ((_icache->c_shdr = shdr = elf_getshdr(_icache->c_scn)) == NULL)
+           return (elferr("elf_getshdr"));
+
+       if ((_icache->c_data = elf_getdata(_icache->c_scn, NULL)) == NULL)
+           return (elferr("elf_getdata"));
+
+       _icache->c_name = istrs + (size_t)(shdr->sh_name);
+
+       /*
+        * For each section that has a virtual address reestablish the
+        * data buffer to point to the memory image.
+        *
+        * if (shdr->sh_addr)
+        *     _icache->c_data->d_buf = (void *)shdr->sh_addr;
+        */
+
+       /*
+        * Remember the last section of the data segment, the new .heap
+        * section will be added after this section.
+        * If we already have one, then set data_cache to the previous
+        * section and set heap_cache to this one.
+        */
+       if ((shdr->sh_addr + shdr->sh_size)
+           == (data_phdr->p_vaddr + data_phdr->p_memsz)) {
+           if (strcmp(_icache->c_name, heap) == 0) {
+#ifdef DEBUG
+               printf("Found a previous .heap section\n");
+#endif
+               data_cache = _icache - 1;
+               heap_cache = _icache;
+               heap_sz = shdr->sh_size;
+           } else {
+               data_cache = _icache;
+           }
+       }
+
+       /*
+        * Remember the section header string table as this will be
+        * rewritten with the new .heap name.
+        */
+       if ((shdr->sh_type == SHT_STRTAB) &&
+           ((strcmp(_icache->c_name, ".shstrtab")) == 0))
+           shstr_cache = _icache;
+    }
+    if (data_cache == 0) {
+       fprintf(stderr, "final data section not found!\n");
+       return (0);
+    }
+
+    /*
+     * Determine the new .heap section to create.
+     */
+    rundata.d_buf = (void *)(data_cache->c_shdr->sh_addr +
+                            data_cache->c_shdr->sh_size);
+    rundata.d_size = (int)sbrk(0) - (int)rundata.d_buf;
+    rundata.d_type = ELF_T_BYTE;
+    rundata.d_off = 0;
+    rundata.d_align = 1;
+    rundata.d_version = EV_CURRENT;
+
+    /*
+     * From the new data buffer determine the new value for _end and _edata.
+     * This will also be used to update the data segment program header.
+     *
+     * If we had a .heap section, then its size is part of the program
+     * headers notion of data size.  Because we're only going to output one
+     * heap section (ignoring the one in the running binary) we need to
+     * subract the size of that which we're ignoring.
+     */
+    if (heap_cache) {
+       edata = S_ROUND((data_phdr->p_vaddr
+                        + data_phdr->p_memsz
+                        - heap_sz), rundata.d_align) + rundata.d_size;
+    } else {
+       edata = S_ROUND((data_phdr->p_vaddr + data_phdr->p_memsz),
+                       rundata.d_align) + rundata.d_size;
+    }
+
+    /*
+     * We're now ready to construct the new elf image.
+     *
+     * Obtain a new elf header and initialize it with any basic information
+     * that isn't calculated as part of elf_update().  Bump the section
+     * header string table index to account for the .heap section we'll be
+     * adding.
+     */
+    if ((oehdr = elf_newehdr(oelf)) == NULL)
+       return (elferr("elf_newehdr"));
+
+    oehdr->e_entry = iehdr->e_entry;
+    oehdr->e_machine = iehdr->e_machine;
+    oehdr->e_type = iehdr->e_type;
+    oehdr->e_flags = iehdr->e_flags;
+    /*
+     * If we already have a heap section, we don't need any adjustment
+     */
+    if (heap_cache)
+       oehdr->e_shstrndx = iehdr->e_shstrndx;
+    else
+       oehdr->e_shstrndx = iehdr->e_shstrndx + 1;
+
+#ifdef DEBUG
+    printf("iehdr->e_flags   = %x\n", iehdr->e_flags);
+    printf("iehdr->e_entry   = %x\n", iehdr->e_entry);
+    printf("iehdr->e_shstrndx= %d\n", iehdr->e_shstrndx);
+    printf("iehdr->e_machine = %d\n", iehdr->e_machine);
+    printf("iehdr->e_type    = 0x%x\n", iehdr->e_type);
+    printf("oehdr->e_machine = %d\n", oehdr->e_machine);
+    printf("oehdr->e_type    = 0x%x\n", oehdr->e_type);
+#endif
+
+    /*
+     * Obtain a new set of program headers.  Initialize these with the same
+     * information as the input program headers and update the data segment
+     * to reflect the new .heap section.
+     */
+    if ((ophdr = elf_newphdr(oelf, iehdr->e_phnum)) == NULL)
+       return (elferr("elf_newphdr"));
+
+    for (ndx = 0; ndx != iehdr->e_phnum; ndx++, iphdr++, ophdr++) {
+       *ophdr = *iphdr;
+       if (data_phdr == iphdr)
+           ophdr->p_filesz = ophdr->p_memsz = edata - ophdr->p_vaddr;
+    }
+
+    /*
+     * Obtain a new set of sections.
+     */
+    _icache = icache;
+    _icache++;
+    for (ndx = 1; ndx != iehdr->e_shnum; ndx++, _icache++) {
+       /*
+        * Skip the heap section of the running executable
+        */
+       if (_icache == heap_cache)
+           continue;
+       /*
+        * Create a matching section header in the output file.
+        */
+       if ((scn = elf_newscn(oelf)) == NULL)
+           return (elferr("elf_newscn"));
+       if ((shdr = elf_getshdr(scn)) == NULL)
+           return (elferr("elf_getshdr"));
+       *shdr = *_icache->c_shdr;
+
+       /*
+        * Create a matching data buffer for this section.
+        */
+       if ((data = elf_newdata(scn)) == NULL)
+           return (elferr("elf_newdata"));
+       *data = *_icache->c_data;
+
+       /*
+        * For each section that has a virtual address reestablish the
+        * data buffer to point to the memory image.  Note, we skip
+        * the plt section.
+        */
+       if ((shdr->sh_addr) && (!((shdr->sh_type == SHT_PROGBITS)
+                                 && (strcmp(_icache->c_name, ".plt") == 0))))
+           data->d_buf = (void *)shdr->sh_addr;
+
+       /*
+        * Update any NOBITS section to indicate that it now contains
+        * data.
+        */
+       if (shdr->sh_type == SHT_NOBITS)
+           shdr->sh_type = SHT_PROGBITS;
+
+       /*
+        * Add the new .heap section after the last section of the
+        * present data segment.  If we had a heap section, then
+        * this is the section preceding it.
+        */
+       if (data_cache == _icache) {
+           if ((scn = elf_newscn(oelf)) == NULL)
+               return (elferr("elf_newscn"));
+           if ((shdr = elf_getshdr(scn)) == NULL)
+               return (elferr("elf_getshdr"));
+           shdr->sh_type = SHT_PROGBITS;
+           shdr->sh_flags = SHF_ALLOC | SHF_WRITE;
+
+           if ((data = elf_newdata(scn)) == NULL)
+               return (elferr("elf_newdata"));
+           *data = rundata;
+       }
+
+       /*
+        * Update the section header string table size to reflect the
+        * new section name (only if we didn't already have a heap).
+        */
+       if (!heap_cache) {
+           if (shstr_cache && (shstr_cache == _icache)) {
+               data->d_size += sizeof (heap);
+           }
+       }
+    }
+
+    /*
+     * Write out the new image, and obtain a new elf descriptor that will
+     * allow us to write to the new image.
+     */
+    if (elf_update(oelf, ELF_C_WRITE) == -1)
+       return (elferr("elf_update"));
+    elf_end(oelf);
+    if ((oelf = elf_begin(fd, ELF_C_RDWR, NULL)) == NULL)
+       return (elferr("elf_begin"));
+    if ((oehdr = elf_getehdr(oelf)) == NULL)
+       return (elferr("elf_getehdr"));
+
+    /*
+     * Obtain the output files section header string table.
+     */
+    if ((scn = elf_getscn(oelf, oehdr->e_shstrndx)) == NULL)
+       return (elferr("elf_getscn"));
+    if ((data = elf_getdata(scn, NULL)) == NULL)
+       return (elferr("elf_getdata"));
+    ostrs = _ostrs = (char *) data->d_buf;
+    *_ostrs++ = '\0';
+
+    /*
+     * Construct a cache to maintain the output files section information.
+     */
+    if ((ocache = (Cache *)malloc(oehdr->e_shnum * sizeof (Cache))) == 0) {
+       fprintf(stderr, "malloc failed: %s\n", strerror(errno));
+       return (1);
+    }
+    _ocache = ocache;
+    _ocache++;
+    _icache = icache;
+    _icache++;
+
+    /*
+     * Traverse each section from the input file rebuilding the section
+     * header string table as we go.
+     */
+    _ndx = _addr = 0;
+    for (ndx = 1, scn = 0;
+        (_ocache->c_scn = elf_nextscn(oelf, scn));
+        ndx++, scn = _ocache->c_scn, _ocache++, _icache++) {
+
+       const char *strs;
+
+       if (_icache == heap_cache) {
+#ifdef DEBUG
+           printf("ignoring .heap section in input\n");
+#endif
+           _icache++;
+       }
+
+       if ((_ocache->c_shdr = shdr =
+            elf_getshdr(_ocache->c_scn)) == NULL)
+           return (elferr("elf_getshdr"));
+       if ((_ocache->c_data =
+            elf_getdata(_ocache->c_scn, NULL)) == NULL)
+           return (elferr("elf_getdata"));
+
+       /*
+        * If were inserting the new .heap section, insert the new
+        * section name and initialize its virtual address.
+        */
+       if (_addr) {
+           strs = heap;
+           shdr->sh_addr = S_ROUND(_addr, shdr->sh_addralign);
+           _addr = 0;
+       } else {
+           strs = istrs + (size_t)(_icache->c_shdr->sh_name);
+       }
+
+       strcpy(_ostrs, strs);
+       shdr->sh_name = _ostrs - ostrs;
+       _ocache->c_name = _ostrs;
+       _ostrs += strlen(strs) + 1;
+
+       /*
+        * If we've inserted a new section any later section may need
+        * their sh_link fields updated.
+        * If we already had a heap section, then this is not required.
+        */
+       if (!heap_cache) {
+           if (_ndx) {
+               if (_ocache->c_shdr->sh_link >= _ndx)
+                   _ocache->c_shdr->sh_link++;
+           }
+       }
+
+       /*
+        * If this is the last section of the original data segment
+        * determine sufficient information to initialize the new .heap
+        * section which will be obtained next.
+        */
+       if (data_cache == _icache) {
+           _ndx = ndx + 1;
+           _addr = shdr->sh_addr + shdr->sh_size;
+           _icache--;
+           data_cache = 0;
+       }
+    }
+
+    /*
+     * Now that we have a complete description of the new image update any
+     * sections that are required.
+     *
+     *  o      update the value of _edata and _end.
+     *
+     *  o      reset any relocation entries if necessary.
+     */
+    _ocache = &ocache[1];
+    _icache = &icache[1];
+    for (ndx = 1; ndx < oehdr->e_shnum; ndx++, _ocache++, _icache++) {
+       if ((_ocache->c_shdr->sh_type == SHT_SYMTAB) ||
+           (_ocache->c_shdr->sh_type == SHT_DYNSYM))
+           update_sym(ocache, _ocache, edata);
+
+       if (_ocache->c_shdr->sh_type == M_REL_SHT_TYPE)
+           update_reloc(ocache, _ocache, icache, _icache, oehdr->e_shnum);
+    }
+
+    if (elf_update(oelf, ELF_C_WRITE) == -1)
+       return (elferr("elf_update"));
+
+    elf_end(oelf);
+    elf_end(ielf);
+    return (0);
+}
diff --git a/dynodump/i386/_relocate.c b/dynodump/i386/_relocate.c
new file mode 100644 (file)
index 0000000..f97dd1b
--- /dev/null
@@ -0,0 +1,118 @@
+/*
+ *     Copyright (c) 1995 by Sun Microsystems, Inc.
+ *     All rights reserved.
+ *
+ * This source code is a product of Sun Microsystems, Inc. and is provided
+ * for unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify this source code without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * THIS PROGRAM CONTAINS SOURCE CODE COPYRIGHTED BY SUN MICROSYSTEMS, INC.
+ * SUN MICROSYSTEMS, INC., MAKES NO REPRESENTATIONS ABOUT THE SUITABLITY
+ * OF SUCH SOURCE CODE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT
+ * EXPRESS OR IMPLIED WARRANTY OF ANY KIND.  SUN MICROSYSTEMS, INC. DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO SUCH SOURCE CODE, INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN
+ * NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT,
+ * INCIDENTAL, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM USE OF SUCH SOURCE CODE, REGARDLESS OF THE THEORY OF LIABILITY.
+ * 
+ * This source code is provided with no support and without any obligation on
+ * the part of Sun Microsystems, Inc. to assist in its use, correction, 
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS
+ * SOURCE CODE OR ANY PART THEREOF.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+
+#pragma ident  "@(#) $Id: _relocate.c,v 1.3 1997/05/29 04:23:02 steve Exp $ - SMI"
+
+/* LINTLIBRARY */
+
+#include       <libelf.h>
+#include       <string.h>
+#include       <machdep.h>
+#include       "_dynodump.h"
+
+void
+update_reloc(Cache *ocache, Cache *_ocache,
+            Cache *icache, Cache *_icache,
+            Half shnum)
+{
+    Shdr *shdr;
+    Rel *rels;
+    int reln, cnt;
+    Cache *orcache, *ircache;
+
+    /*
+     * Set up to readh the output relocation table.
+     */
+    shdr = _ocache->c_shdr;
+    rels = (Rel *) _ocache->c_data->d_buf;
+    reln = shdr->sh_size / shdr->sh_entsize;
+
+    /*
+     * Determine the section that is being relocated.
+     */
+    orcache = &ocache[shdr->sh_info];
+    shdr = _icache->c_shdr;
+    ircache = &icache[shdr->sh_info];
+
+    /*
+     * Determine the section that is being relocated.  Note that for this
+     * stupid architecture the .rel.plt actually contains offsets into the
+     * .got.
+     */
+    if (strcmp(_ocache->c_name, ".rel.plt")) {
+       orcache = &ocache[shdr->sh_info];
+       shdr = _icache->c_shdr;
+       ircache = &icache[shdr->sh_info];
+    } else {
+       Half    ndx;
+       Cache * __ocache = ocache;
+
+       for (__ocache++, ndx = 1; ndx != shnum; ndx++, __ocache++) {
+           if (strcmp(__ocache->c_name, ".got") == 0) {
+               orcache = __ocache;
+               ircache = &icache[ndx];
+               break;
+           }
+       }
+    }
+
+    /*
+     * Loop through the relocation table.
+     */
+    for (cnt = 0; cnt < reln; cnt++, rels++) {
+       unsigned char *iaddr, *oaddr;
+       Addr off;
+       unsigned char type = ELF_R_TYPE(rels->r_info);
+
+       /*
+        * Ignore some relocations as these can be safely carried out
+        * twice (they simply override any existing data).  In fact,
+        * some relocations like __iob's copy relocation must be carried
+        * out each time the process restarts, otherwise stdio blows up.
+        */
+       if ((type == R_386_COPY) || (type == R_386_NONE))
+           continue;
+
+       /*
+        * If we are required to restore the relocation location
+        * to its value prior to relocation, then read the
+        * location's original contents from the input image and
+        * copy it to the output image.
+        */
+       off = rels->r_offset - ircache->c_shdr->sh_addr;
+       iaddr = (unsigned char *) ircache->c_data->d_buf + off;
+       oaddr = (unsigned char *) orcache->c_data->d_buf + off;
+       *(unsigned long *) oaddr = *(unsigned long *) iaddr;
+    }
+}
diff --git a/dynodump/i386/machdep.h b/dynodump/i386/machdep.h
new file mode 100644 (file)
index 0000000..4dc66fe
--- /dev/null
@@ -0,0 +1,93 @@
+/*
+ *     Copyright (c) 1995 by Sun Microsystems, Inc.
+ *     All rights reserved.
+ *
+ * This source code is a product of Sun Microsystems, Inc. and is provided
+ * for unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify this source code without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * THIS PROGRAM CONTAINS SOURCE CODE COPYRIGHTED BY SUN MICROSYSTEMS, INC.
+ * SUN MICROSYSTEMS, INC., MAKES NO REPRESENTATIONS ABOUT THE SUITABLITY
+ * OF SUCH SOURCE CODE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT
+ * EXPRESS OR IMPLIED WARRANTY OF ANY KIND.  SUN MICROSYSTEMS, INC. DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO SUCH SOURCE CODE, INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN
+ * NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT,
+ * INCIDENTAL, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM USE OF SUCH SOURCE CODE, REGARDLESS OF THE THEORY OF LIABILITY.
+ * 
+ * This source code is provided with no support and without any obligation on
+ * the part of Sun Microsystems, Inc. to assist in its use, correction, 
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS
+ * SOURCE CODE OR ANY PART THEREOF.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+
+#pragma ident  "@(#) $Id: machdep.h,v 1.3 1997/05/29 04:23:02 steve Exp $ - SMI"
+
+/*
+ * Global include file for all sgs Intel machine dependent macros, constants
+ * and declarations.
+ */
+#ifndef        MACHDEP_DOT_H
+#define        MACHDEP_DOT_H
+
+#include       <link.h>
+#include       <sys/elf_386.h>
+
+/*
+ * Make machine class dependent data types transparent to the common code
+ */
+#define        Word            Elf32_Word
+#define        Sword           Elf32_Sword
+#define        Half            Elf32_Half
+#define        Addr            Elf32_Addr
+#define        Off             Elf32_Off
+#define        Byte            unsigned char
+
+#define        Ehdr            Elf32_Ehdr
+#define        Shdr            Elf32_Shdr
+#define        Sym             Elf32_Sym
+#define        Rel             Elf32_Rel
+#define        Phdr            Elf32_Phdr
+#define        Dyn             Elf32_Dyn
+#define        Boot            Elf32_Boot
+#define        Verdef          Elf32_Verdef
+#define        Verdaux         Elf32_Verdaux
+#define        Verneed         Elf32_Verneed
+#define        Vernaux         Elf32_Vernaux
+#define        Versym          Elf32_Versym
+
+/*
+ * Make machine class dependent functions transparent to the common code
+ */
+#define        ELF_R_TYPE      ELF32_R_TYPE
+#define        ELF_R_INFO      ELF32_R_INFO
+#define        ELF_R_SYM       ELF32_R_SYM
+#define        ELF_ST_BIND     ELF32_ST_BIND
+#define        ELF_ST_TYPE     ELF32_ST_TYPE
+#define        ELF_ST_INFO     ELF32_ST_INFO
+#define        elf_fsize       elf32_fsize
+#define        elf_getehdr     elf32_getehdr
+#define        elf_getphdr     elf32_getphdr
+#define        elf_newehdr     elf32_newehdr
+#define        elf_newphdr     elf32_newphdr
+#define        elf_getshdr     elf32_getshdr
+#define        elf_xlatetof    elf32_xlatetof
+#define        elf_xlatetom    elf32_xlatetom
+
+/*
+ * Make relocation types transparent to the common code
+ */
+#define        M_REL_SHT_TYPE  SHT_REL         /* section header type */
+
+#endif
diff --git a/dynodump/i386/uninit.c b/dynodump/i386/uninit.c
new file mode 100644 (file)
index 0000000..ad80ba3
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ *     Copyright (c) 1995 by Sun Microsystems, Inc.
+ *     All rights reserved.
+ *
+ * This source code is a product of Sun Microsystems, Inc. and is provided
+ * for unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify this source code without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * THIS PROGRAM CONTAINS SOURCE CODE COPYRIGHTED BY SUN MICROSYSTEMS, INC.
+ * SUN MICROSYSTEMS, INC., MAKES NO REPRESENTATIONS ABOUT THE SUITABLITY
+ * OF SUCH SOURCE CODE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT
+ * EXPRESS OR IMPLIED WARRANTY OF ANY KIND.  SUN MICROSYSTEMS, INC. DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO SUCH SOURCE CODE, INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN
+ * NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT,
+ * INCIDENTAL, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM USE OF SUCH SOURCE CODE, REGARDLESS OF THE THEORY OF LIABILITY.
+ * 
+ * This source code is provided with no support and without any obligation on
+ * the part of Sun Microsystems, Inc. to assist in its use, correction, 
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS
+ * SOURCE CODE OR ANY PART THEREOF.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+
+/*
+ * This is where you put processor specific un-initialization things
+ * to deal with "initialization idempotency issues".
+ */
+
+void
+dynodump_uninit(void)
+{
+    return;
+}
diff --git a/dynodump/ppc/_relocate.c b/dynodump/ppc/_relocate.c
new file mode 100644 (file)
index 0000000..754b417
--- /dev/null
@@ -0,0 +1,269 @@
+/*
+ *     Copyright (c) 1995 by Sun Microsystems, Inc.
+ *     All rights reserved.
+ *
+ * This source code is a product of Sun Microsystems, Inc. and is provided
+ * for unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify this source code without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * THIS PROGRAM CONTAINS SOURCE CODE COPYRIGHTED BY SUN MICROSYSTEMS, INC.
+ * SUN MICROSYSTEMS, INC., MAKES NO REPRESENTATIONS ABOUT THE SUITABLITY
+ * OF SUCH SOURCE CODE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT
+ * EXPRESS OR IMPLIED WARRANTY OF ANY KIND.  SUN MICROSYSTEMS, INC. DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO SUCH SOURCE CODE, INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN
+ * NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT,
+ * INCIDENTAL, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM USE OF SUCH SOURCE CODE, REGARDLESS OF THE THEORY OF LIABILITY.
+ *
+ * This source code is provided with no support and without any obligation on
+ * the part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS
+ * SOURCE CODE OR ANY PART THEREOF.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+
+#pragma ident "@(#) $Id: _relocate.c,v 1.4 1998/03/31 20:10:55 steve Exp $ - SMI"
+
+/* LINTLIBRARY */
+
+#include       <string.h>
+#include       <sys/elf_ppc.h>
+#include       "_dynodump.h"
+
+
+/*
+ *     NOTE: These macros will work reliably only on 32-bit 2's
+ *     complement machines. The type of P in all cases should
+ *     by unsigned char *
+ */
+#if defined(_BIG_ENDIAN)
+
+#define        GET4(P) ((long)(((unsigned long)(P)[0] << 24) | \
+                       ((unsigned long)(P)[1] << 16) | \
+                       ((unsigned long)(P)[2] << 8) | \
+                       (unsigned long)(P)[3]))
+#define        PUT4(V, P)      { \
+                               (P)[0] = (unsigned char)((V) >> 24); \
+                               (P)[1] = (unsigned char)((V) >> 16); \
+                               (P)[2] = (unsigned char)((V) >> 8); \
+                               (P)[3] = (unsigned char)(V); \
+                       }
+#define        GEThalf(P)      ((long) (((unsigned long) (P)[0] << 8) | \
+                               ((unsigned long) (P)[1])))
+#define        GETword(P)      GET4(P)
+#define        PUThalf(V, P)   { \
+                               (P)[0] = ((V) >> 8); \
+                               (P)[1] = ((V)); \
+                       }
+#define        PUTword(V, P)   PUT4(V, P)
+
+#elif defined(_LITTLE_ENDIAN)
+
+#define        GET4(P) ((long)(((unsigned long)(P)[0]) | \
+                       ((unsigned long)(P)[1] << 8) | \
+                       ((unsigned long)(P)[2] << 16) | \
+                       ((unsigned long)(P)[3]) << 24))
+#define        PUT4(V, P)      { \
+                               (P)[0] = (unsigned char)(V); \
+                               (P)[1] = (unsigned char)((V) >> 8); \
+                               (P)[2] = (unsigned char)((V) >> 16); \
+                               (P)[3] = (unsigned char)((V) >> 24); \
+                       }
+#define        GEThalf(P)      ((long) (((unsigned long) (P)[0]) | \
+                               ((unsigned long) (P)[1] << 8)))
+#define        GETword(P)      GET4(P)
+#define        PUThalf(V, P)   { \
+                               (P)[0] = (V); \
+                               (P)[1] = ((V) >> 8); \
+                       }
+#define        PUTword(V, P)   PUT4(V, P)
+
+#endif /* defined(_LITTLE_ENDIAN) */
+
+/*
+ * NAME                        VALUE   FIELD           CALCULATION
+ *
+ * R_PPC_NONE                  0       none            none
+ * R_PPC_ADDR32                        1       word32          S + A
+ * R_PPC_ADDR24                        2       low24           (S + A) >> 2
+ * R_PPC_ADDR16                        3       half16          S + A
+ * R_PPC_ADDR16_LO             4       half16          #lo(S + A)
+ * R_PPC_ADDR16_HI             5       half16          #hi(S + A)
+ * R_PPC_ADDR16_HA             6       half16          #ha(S + A)
+ * R_PPC_ADDR14                        7       low14           (S + A) >> 2
+ * R_PPC_ADDR14_BRTAKEN                8       low14           (S + A) >> 2
+ * R_PPC_ADDR14_BRNTAKEN       9       low14           (S + A) >> 2
+ * R_PPC_REL24                 10      low24           (S + A - P) >> 2
+ * R_PPC_REL14                 11      low14           (S + A - P) >> 2
+ * R_PPC_REL14_BRTAKEN         12      low14           (S + A - P) >> 2
+ * R_PPC_REL14_BRNTAKEN                13      low14           (S + A - P) >> 2
+ * R_PPC_GOT16                 14      half16          G + A
+ * R_PPC_GOT16_LO              15      half16          #lo(G + A)
+ * R_PPC_GOT16_HI              16      half16          #hi(G + A)
+ * R_PPC_GOT16_HA              17      half16          #ha(G + A)
+ * R_PPC_PLT24                 18      low24           (L + A - P) >> 2
+ * R_PPC_COPY                  19      none            none
+ * R_PPC_GLOB_DAT              20      word32          S + A
+ * R_PPC_JMP_SLOT              21      none            see below
+ * R_PPC_RELATIVE              22      word32          B + A
+ * R_PPC_LOCAL24PC             23      low24           see below
+ * R_PPC_UADDR32               24      word32          S + A
+ * R_PPC_UADDR16               25      half16          S + A
+ *
+ *     This is Figure 4-3: Relocation Types from the Draft Copy of
+ * the ABI, Printed on 7/25/94.
+ *
+ *     The field column specifies how much of the data
+ * at the reference address is to be used. The data are assumed to be
+ * right-justified with the least significant bit at the right.
+ *     In the case of plt24 addresses, the reference address is
+ * assumed to be that of a 6-word PLT entry. The address is the right-
+ * most 24 bits of the third word.
+ */
+static void
+move_reloc(unsigned char *iaddr, unsigned char *oaddr, unsigned char type)
+{
+    switch(type) {
+    case R_PPC_NONE:
+       break;
+
+    case R_PPC_ADDR32:
+    case R_PPC_UADDR32:
+       PUTword(GETword(iaddr), oaddr);
+       break;
+
+    case R_PPC_ADDR24:
+    case R_PPC_REL24:
+    case R_PPC_PLT24:
+    case R_PPC_LOCAL24PC:
+       /* XXX - big assumption here that the original contents were masked
+        * properly.  If this assumption proves correct, then these 24bit
+        * cases can be folded into the above 32bit cases.
+        */
+       PUTword(GETword(iaddr), oaddr);
+       break;
+
+    case R_PPC_ADDR16:
+    case R_PPC_UADDR16:
+    case R_PPC_GOT16:
+       PUThalf(GEThalf(iaddr), oaddr);
+       break;
+
+    case R_PPC_ADDR16_LO:
+    case R_PPC_GOT16_LO:
+       /* XXX - more assumptions which if proved correct, we can
+        * do some folding with above cases
+        */
+       PUThalf(GEThalf(iaddr), oaddr);
+       break;
+
+    case R_PPC_ADDR16_HI:
+    case R_PPC_GOT16_HI:
+       /* XXX - more assumptions which if proved correct, we can
+        * do some folding with above cases
+        */
+       PUThalf(GEThalf(iaddr), oaddr);
+       break;
+
+    case R_PPC_ADDR16_HA:
+    case R_PPC_GOT16_HA:
+       /* XXX - more assumptions which if proved correct, we can
+        * do some folding with above cases
+        */
+       PUThalf(GEThalf(iaddr), oaddr);
+       break;
+
+    case R_PPC_ADDR14:
+    case R_PPC_ADDR14_BRTAKEN:
+    case R_PPC_ADDR14_BRNTAKEN:
+    case R_PPC_REL14:
+    case R_PPC_REL14_BRTAKEN:
+    case R_PPC_REL14_BRNTAKEN:
+       /* XXX - big assumption here that the original contents were masked
+        * properly.  If this assumption proves correct, then these 14bit
+        * cases can be folded into the above 32bit cases.
+        */
+       PUTword(GETword(iaddr), oaddr);
+       break;
+
+    case R_PPC_COPY:
+       break;
+
+    case R_PPC_GLOB_DAT:
+    case R_PPC_RELATIVE:
+       PUTword(GETword(iaddr), oaddr);
+       break;
+
+    case R_PPC_JMP_SLOT:
+       break;
+
+    default:
+       break;
+    }
+}
+
+void
+update_reloc(Cache *ocache, Cache *_ocache, Cache *icache, Cache *_icache, Half shnum)
+{
+    Shdr *shdr;
+    Rel *rels;
+    int        reln, cnt;
+    Cache *orcache, * ircache;
+
+    /*
+     * Set up to read the output relocation table.
+     */
+    shdr = _ocache->c_shdr;
+    rels = (Rel *)_ocache->c_data->d_buf;
+    reln = shdr->sh_size / shdr->sh_entsize;
+
+    /*
+     * Determine the section that is being relocated.
+     */
+    orcache = &ocache[shdr->sh_info];
+    shdr = _icache->c_shdr;
+    ircache = &icache[shdr->sh_info];
+
+    /*
+     * Loop through the relocation table.
+     */
+    for (cnt = 0; cnt < reln; cnt++, rels++) {
+       unsigned char   type = ELF_R_TYPE(rels->r_info);
+
+       /*
+        * Ignore some relocations as these can safely be carried out
+        * twice (they simply override any existing data).  In fact,
+        * some relocations like __iob's copy relocation must be carried
+        * out each time the process restarts otherwise stdio blows up.
+        */
+       if ((type == R_PPC_COPY) || (type == R_PPC_JMP_SLOT) ||
+           (type == R_PPC_NONE))
+           continue;
+
+       {
+           unsigned char *iaddr, *oaddr;
+           Addr off;
+
+           /*
+            * If we are required to restore the relocation location
+            * to its value prior to relocation, then read the
+            * locations original contents from the input image and
+            * copy it to the output image.
+            */
+           off = rels->r_offset - ircache->c_shdr->sh_addr;
+           iaddr = (unsigned char *)ircache->c_data->d_buf + off;
+           oaddr = (unsigned char *)orcache->c_data->d_buf + off;
+           move_reloc(iaddr, oaddr, type);
+       }
+    }
+}
diff --git a/dynodump/ppc/machdep.h b/dynodump/ppc/machdep.h
new file mode 100644 (file)
index 0000000..a649a9c
--- /dev/null
@@ -0,0 +1,88 @@
+/*
+ *     Copyright (c) 1995 by Sun Microsystems, Inc.
+ *     All rights reserved.
+ *
+ * This source code is a product of Sun Microsystems, Inc. and is provided
+ * for unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify this source code without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * THIS PROGRAM CONTAINS SOURCE CODE COPYRIGHTED BY SUN MICROSYSTEMS, INC.
+ * SUN MICROSYSTEMS, INC., MAKES NO REPRESENTATIONS ABOUT THE SUITABLITY
+ * OF SUCH SOURCE CODE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT
+ * EXPRESS OR IMPLIED WARRANTY OF ANY KIND.  SUN MICROSYSTEMS, INC. DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO SUCH SOURCE CODE, INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN
+ * NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT,
+ * INCIDENTAL, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM USE OF SUCH SOURCE CODE, REGARDLESS OF THE THEORY OF LIABILITY.
+ * 
+ * This source code is provided with no support and without any obligation on
+ * the part of Sun Microsystems, Inc. to assist in its use, correction, 
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS
+ * SOURCE CODE OR ANY PART THEREOF.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+
+#pragma ident "@(#) $Id: machdep.h,v 1.3 1997/05/29 04:23:20 steve Exp $ - SMI"
+
+/*
+ * Global include file for all sgs PowerPC machine dependent macros, constants
+ * and declarations.
+ */
+#ifndef        MACHDEP_DOT_H
+#define        MACHDEP_DOT_H
+
+#include       <link.h>
+#include       <sys/elf_ppc.h>
+
+/*
+ * Make machine class dependent data types transparent to the common code
+ */
+#define        Word            Elf32_Word
+#define        Sword           Elf32_Sword
+#define        Half            Elf32_Half
+#define        Addr            Elf32_Addr
+#define        Off             Elf32_Off
+#define        Byte            unsigned char
+
+#define        Ehdr            Elf32_Ehdr
+#define        Shdr            Elf32_Shdr
+#define        Sym             Elf32_Sym
+#define        Rel             Elf32_Rela
+#define        Phdr            Elf32_Phdr
+#define        Dyn             Elf32_Dyn
+#define        Boot            Elf32_Boot
+#define        Verdef          Elf32_Verdef
+#define        Verdaux         Elf32_Verdaux
+#define        Verneed         Elf32_Verneed
+#define        Vernaux         Elf32_Vernaux
+#define        Versym          Elf32_Versym
+
+/*
+ * Make machine class dependent functions transparent to the common code
+ */
+#define        ELF_R_TYPE      ELF32_R_TYPE
+#define        ELF_R_INFO      ELF32_R_INFO
+#define        ELF_R_SYM       ELF32_R_SYM
+#define        ELF_ST_BIND     ELF32_ST_BIND
+#define        ELF_ST_TYPE     ELF32_ST_TYPE
+#define        ELF_ST_INFO     ELF32_ST_INFO
+#define        elf_fsize       elf32_fsize
+#define        elf_getehdr     elf32_getehdr
+#define        elf_getphdr     elf32_getphdr
+#define        elf_newehdr     elf32_newehdr
+#define        elf_newphdr     elf32_newphdr
+#define        elf_getshdr     elf32_getshdr
+
+#define        M_REL_SHT_TYPE  SHT_RELA        /* section header type */
+
+#endif
diff --git a/dynodump/ppc/uninit.c b/dynodump/ppc/uninit.c
new file mode 100644 (file)
index 0000000..0119d48
--- /dev/null
@@ -0,0 +1,55 @@
+/*
+ *     Copyright (c) 1995 by Sun Microsystems, Inc.
+ *     All rights reserved.
+ *
+ * This source code is a product of Sun Microsystems, Inc. and is provided
+ * for unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify this source code without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * THIS PROGRAM CONTAINS SOURCE CODE COPYRIGHTED BY SUN MICROSYSTEMS, INC.
+ * SUN MICROSYSTEMS, INC., MAKES NO REPRESENTATIONS ABOUT THE SUITABLITY
+ * OF SUCH SOURCE CODE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT
+ * EXPRESS OR IMPLIED WARRANTY OF ANY KIND.  SUN MICROSYSTEMS, INC. DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO SUCH SOURCE CODE, INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN
+ * NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT,
+ * INCIDENTAL, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM USE OF SUCH SOURCE CODE, REGARDLESS OF THE THEORY OF LIABILITY.
+ * 
+ * This source code is provided with no support and without any obligation on
+ * the part of Sun Microsystems, Inc. to assist in its use, correction, 
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS
+ * SOURCE CODE OR ANY PART THEREOF.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+
+/*
+ * This is where you put processor specific un-initialization things
+ * to deal with "initialization idempotency issues".
+ */
+
+extern void __delete_all_module_tags(void);
+extern void __exithandle(void);
+
+void
+dynodump_uninit(void)
+{
+  /* There are 2 possible ways to do this.  It is not clear which way
+     will be blessed by the Sun Gods.  Both appear to work. */
+
+  /* _exithandle has recently been blessed. */
+  
+  /* __delete_all_module_tags(); */
+  _exithandle();
+
+  return;
+}
diff --git a/dynodump/sparc/_relocate.c b/dynodump/sparc/_relocate.c
new file mode 100644 (file)
index 0000000..14466f0
--- /dev/null
@@ -0,0 +1,294 @@
+/*
+ *     Copyright (c) 1995 by Sun Microsystems, Inc.
+ *     All rights reserved.
+ *
+ * This source code is a product of Sun Microsystems, Inc. and is provided
+ * for unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify this source code without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * THIS PROGRAM CONTAINS SOURCE CODE COPYRIGHTED BY SUN MICROSYSTEMS, INC.
+ * SUN MICROSYSTEMS, INC., MAKES NO REPRESENTATIONS ABOUT THE SUITABLITY
+ * OF SUCH SOURCE CODE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT
+ * EXPRESS OR IMPLIED WARRANTY OF ANY KIND.  SUN MICROSYSTEMS, INC. DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO SUCH SOURCE CODE, INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN
+ * NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT,
+ * INCIDENTAL, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM USE OF SUCH SOURCE CODE, REGARDLESS OF THE THEORY OF LIABILITY.
+ *
+ * This source code is provided with no support and without any obligation on
+ * the part of Sun Microsystems, Inc. to assist in its use, correction,
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS
+ * SOURCE CODE OR ANY PART THEREOF.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+
+/*
+ * Update the value of the `_edata' and `_end' symbols.
+ */
+#pragma ident  "@(#) $Id: _relocate.c,v 1.4 1998/03/31 20:10:55 steve Exp $ - SMI"
+
+#include       <libelf.h>
+#include       <string.h>
+#include       "machdep.h"
+#include       "_dynodump.h"
+
+
+#define        GETbyte(P)      ((long)((unsigned long)(P)[0]))
+#define        GEThalf(P)      ((long)(((unsigned long)(P)[0] << 8) | \
+                           ((unsigned long)(P)[1])))
+#define        GETword(P)      ((long)(((unsigned long)(P)[0] << 24) | \
+                           ((unsigned long)(P)[1] << 16) | \
+                           ((unsigned long)(P)[2] << 8) | \
+                           (unsigned long)(P)[3]))
+#define        GETdisp30(P)    (GETword(P) & 0x3fffffff)
+#define        GETdisp22(P)    (GETword(P) & 0x3fffff)
+#define        GETdisp16(P)    (((GETword(P) & 0x300000) >> 6) | \
+                           (GETword(P) & 0x3fff))
+#define        GETdisp19(P)    (GETword(P) & 0x7ffff)
+#define        GETimm22(P)     (GETword(P) & 0x3fffff)
+#define        GETimm5(P)      (GEThalf((P)+2) & 0x1f)
+#define        GETimm6(P)      (GEThalf((P)+2) & 0x2f)
+#define        GETimm7(P)      (GEThalf((P)+2) & 0x3f)
+#define        GETsimm13(P)    (GEThalf((P)+2) & 0x1fff)
+#define        GETsimm10(P)    (GEThalf((P)+2) & 0x3ff)
+#define        GETsimm11(P)    (GEThalf((P)+2) & 0x7ff)
+#define        GETplt22(P)     (GETword((P)+8) & 0x3fffff)
+
+#define        PUTbyte(V, P)   (P)[0] = (V)
+#define        PUThalf(V, P)   (P)[0] = ((V) >> 8); \
+                       (P)[1] = ((V))
+#define        PUTword(V, P)   (P)[0] = (unsigned char)((V) >> 24); \
+                       (P)[1] = (unsigned char)((V) >> 16); \
+                       (P)[2] = (unsigned char)((V) >> 8); \
+                       (P)[3] = (unsigned char)(V)
+#define        PUTdisp30(V, P) { \
+                       unsigned long int temp; \
+                       temp = GETword(P) & ~0x3fffffff; \
+                       temp |= ((V) & 0x3fffffff); \
+                       PUTword(temp, P); \
+                       }
+#define        PUTdisp22(V, P) { \
+                       unsigned long int temp; \
+                       temp = GETword(P) & ~0x3fffff; \
+                       temp |= ((V) & 0x3fffff); \
+                       PUTword(temp, P); \
+                       }
+#define        PUTimm22(V, P)  { \
+                       unsigned long int temp; \
+                       temp = GETword(P) & ~0x3fffff; \
+                       temp |= ((V) & 0x3fffff); \
+                       PUTword(temp, P); \
+                       }
+#define        PUTimm5(V, P)   { \
+                       unsigned long int temp; \
+                       temp = GEThalf(P+2) & ~0x1f; \
+                       temp |= ((V) & 0x1f); \
+                       PUThalf(temp, (P+2)); \
+                       }
+#define        PUTimm6(V, P)   { \
+                       unsigned long int temp; \
+                       temp = GEThalf(P+2) & ~0x2f; \
+                       temp |= ((V) & 0x2f); \
+                       PUThalf(temp, (P+2)); \
+                       }
+#define        PUTimm7(V, P)   { \
+                       unsigned long int temp; \
+                       temp = GEThalf(P+2) & ~0x3f; \
+                       temp |= ((V) & 0x3f); \
+                       PUThalf(temp, (P+2)); \
+                       }
+#define        PUTsimm13(V, P) { \
+                       unsigned long int temp; \
+                       temp = GEThalf(P+2) & ~0x1fff; \
+                       temp |= ((V) & 0x1fff); \
+                       PUThalf(temp, (P+2)); \
+                       }
+#define        PUTplt22(V, P)  { \
+                       unsigned long int temp; \
+                       temp = GETword((P)+8) & ~0x3fffff; \
+                       temp |= ((V) & 0x3fffff); \
+                       PUTword(temp, ((P)+8)); \
+                       }
+#define        PUTsimm10(V, P) { \
+                       unsigned long int temp; \
+                       temp = GEThalf(P+2) & ~0x3ff; \
+                       temp |= ((V) & 0x3ff); \
+                       PUThalf(temp, (P+2)); \
+                       }
+#define        PUTsimm11(V, P) { \
+                       unsigned long int temp; \
+                       temp = GEThalf(P+2) & ~0x7ff; \
+                       temp |= ((V) & 0x7ff); \
+                       PUThalf(temp, (P+2)); \
+                       }
+#define        PUTdisp16(V, P) { \
+                       unsigned long int temp; \
+                       temp = GETword(P) & ~0x303fff; \
+                       temp |= ((V) & 0xc000) << 6; \
+                       temp |= ((V) & 0x3fff); \
+                       PUTword(temp, P); \
+                       }
+#define        PUTdisp19(V, P) { \
+                       unsigned long int temp; \
+                       temp = GETword(P) & ~0x7ffff; \
+                       temp |= ((V) & 0x7ffff); \
+                       PUTword(temp, P); \
+                       }
+
+static void
+move_reloc(unsigned char * iaddr, unsigned char * oaddr, unsigned char type)
+{
+    switch (type) {
+    case R_SPARC_8:
+    case R_SPARC_DISP8:
+       PUTbyte(GETbyte(iaddr), oaddr);
+       break;
+
+    case R_SPARC_16:
+    case R_SPARC_DISP16:
+       PUThalf(GEThalf(iaddr), oaddr);
+       break;
+
+    case R_SPARC_32:
+    case R_SPARC_DISP32:
+    case R_SPARC_GLOB_DAT:
+    case R_SPARC_RELATIVE:
+    case R_SPARC_UA32:
+       PUTword(GETword(iaddr), oaddr);
+       break;
+
+    case R_SPARC_WDISP30:
+    case R_SPARC_WPLT30:
+       PUTdisp30(GETdisp30(iaddr), oaddr);
+       break;
+
+    case R_SPARC_WDISP22:
+    case R_SPARC_PC22:
+       PUTdisp22(GETdisp22(iaddr), oaddr);
+       break;
+
+    case R_SPARC_HI22:
+    case R_SPARC_GOT22:
+    case R_SPARC_22:
+       PUTimm22(GETimm22(iaddr), oaddr);
+       break;
+
+    case R_SPARC_13:
+    case R_SPARC_GOT13:
+       PUTsimm13(GETsimm13(iaddr), oaddr);
+       break;
+
+    case R_SPARC_LO10:
+    case R_SPARC_GOT10:
+    case R_SPARC_PC10:
+#ifdef R_SPARC_10
+    case R_SPARC_10:
+#endif
+       PUTsimm10(GETsimm10(iaddr), oaddr);
+       break;
+
+#ifdef R_SPARC_11
+    case R_SPARC_11:
+       PUTsimm11(GETsimm11(iaddr), oaddr);
+       break;
+#endif
+
+#ifdef R_SPARC_WDISP16
+    case R_SPARC_WDISP16:
+       PUTdisp16(GETdisp16(iaddr), oaddr);
+       break;
+#endif
+
+#ifdef R_SPARC_WDISP19
+    case R_SPARC_WDISP19:
+       PUTdisp19(GETdisp19(iaddr), oaddr);
+       break;
+#endif
+
+#ifdef R_SPARC_5
+    case R_SPARC_5:
+       PUTimm5(GETimm5(iaddr), oaddr);
+       break;
+#endif
+
+#ifdef R_SPARC_6
+    case R_SPARC_6:
+       PUTimm6(GETimm6(iaddr), oaddr);
+       break;
+#endif
+
+#ifdef R_SPARC_7
+    case R_SPARC_7:
+       PUTimm7(GETimm7(iaddr), oaddr);
+       break;
+#endif
+
+    default:
+       break;
+    }
+}
+
+void
+update_reloc(Cache *ocache, Cache *_ocache,
+            Cache *icache, Cache *_icache,
+            Half shnum)
+{
+    Shdr *shdr;
+    Rel *rels;
+    int        reln, cnt;
+    Cache *orcache, *ircache;
+
+    /*
+     * Set up to read the output relocation table.
+     */
+    shdr = _ocache->c_shdr;
+    rels = (Rel *)_ocache->c_data->d_buf;
+    reln = shdr->sh_size / shdr->sh_entsize;
+
+    /*
+     * Determine the section that is being relocated.
+     */
+    orcache = &ocache[shdr->sh_info];
+    shdr = _icache->c_shdr;
+    ircache = &icache[shdr->sh_info];
+
+    /*
+     * Loop through the relocation table.
+     */
+    for (cnt = 0; cnt < reln; cnt++, rels++) {
+       unsigned char *iaddr, *oaddr;
+       Addr off;
+       unsigned char type = ELF_R_TYPE(rels->r_info);
+
+       /*
+        * Ignore some relocations as these can safely be carried out
+        * twice (they simply override any existing data).  In fact,
+        * some relocations like __iob's copy relocation must be carried
+        * out each time the process restarts otherwise stdio blows up.
+        */
+       if ((type == R_SPARC_COPY) || (type == R_SPARC_JMP_SLOT) ||
+           (type == R_SPARC_NONE))
+           continue;
+
+       /*
+        * If we are required to restore the relocation location
+        * to its value prior to relocation, then read the
+        * locations original contents from the input image and
+        * copy it to the output image.
+        */
+       off = rels->r_offset - ircache->c_shdr->sh_addr;
+       iaddr = (unsigned char *)ircache->c_data->d_buf + off;
+       oaddr = (unsigned char *)orcache->c_data->d_buf + off;
+       move_reloc(iaddr, oaddr, type);
+    }
+}
diff --git a/dynodump/sparc/machdep.h b/dynodump/sparc/machdep.h
new file mode 100644 (file)
index 0000000..b4b76d8
--- /dev/null
@@ -0,0 +1,91 @@
+/*
+ *     Copyright (c) 1995 by Sun Microsystems, Inc.
+ *     All rights reserved.
+ *
+ * This source code is a product of Sun Microsystems, Inc. and is provided
+ * for unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify this source code without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * THIS PROGRAM CONTAINS SOURCE CODE COPYRIGHTED BY SUN MICROSYSTEMS, INC.
+ * SUN MICROSYSTEMS, INC., MAKES NO REPRESENTATIONS ABOUT THE SUITABLITY
+ * OF SUCH SOURCE CODE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT
+ * EXPRESS OR IMPLIED WARRANTY OF ANY KIND.  SUN MICROSYSTEMS, INC. DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO SUCH SOURCE CODE, INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN
+ * NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT,
+ * INCIDENTAL, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM USE OF SUCH SOURCE CODE, REGARDLESS OF THE THEORY OF LIABILITY.
+ * 
+ * This source code is provided with no support and without any obligation on
+ * the part of Sun Microsystems, Inc. to assist in its use, correction, 
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS
+ * SOURCE CODE OR ANY PART THEREOF.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+
+#pragma ident  "@(#) $Id: machdep.h,v 1.3 1997/05/29 04:23:26 steve Exp $ - SMI"
+
+/*
+ * Global include file for all sgs SPARC machine dependent macros, constants
+ * and declarations.
+ */
+#ifndef        MACHDEP_DOT_H
+#define        MACHDEP_DOT_H
+
+#include       <link.h>
+#include       <sys/elf_SPARC.h>
+
+/*
+ * Make machine class dependent data types transparent to the common code
+ */
+#define        Word            Elf32_Word
+#define        Sword           Elf32_Sword
+#define        Half            Elf32_Half
+#define        Addr            Elf32_Addr
+#define        Off             Elf32_Off
+#define        Byte            unsigned char
+
+#define        Ehdr            Elf32_Ehdr
+#define        Shdr            Elf32_Shdr
+#define        Sym             Elf32_Sym
+#define        Rel             Elf32_Rela
+#define        Phdr            Elf32_Phdr
+#define        Dyn             Elf32_Dyn
+#define        Boot            Elf32_Boot
+#define        Verdef          Elf32_Verdef
+#define        Verdaux         Elf32_Verdaux
+#define        Verneed         Elf32_Verneed
+#define        Vernaux         Elf32_Vernaux
+#define        Versym          Elf32_Versym
+
+/*
+ * Make machine class dependent functions transparent to the common code
+ */
+#define        ELF_R_TYPE      ELF32_R_TYPE
+#define        ELF_R_INFO      ELF32_R_INFO
+#define        ELF_R_SYM       ELF32_R_SYM
+#define        ELF_ST_BIND     ELF32_ST_BIND
+#define        ELF_ST_TYPE     ELF32_ST_TYPE
+#define        ELF_ST_INFO     ELF32_ST_INFO
+#define        elf_fsize       elf32_fsize
+#define        elf_getehdr     elf32_getehdr
+#define        elf_getphdr     elf32_getphdr
+#define        elf_newehdr     elf32_newehdr
+#define        elf_newphdr     elf32_newphdr
+#define        elf_getshdr     elf32_getshdr
+
+/*
+ * Make relocation types transparent to the common code
+ */
+#define        M_REL_SHT_TYPE  SHT_RELA        /* section header type */
+
+#endif
diff --git a/dynodump/sparc/uninit.c b/dynodump/sparc/uninit.c
new file mode 100644 (file)
index 0000000..d023877
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ *     Copyright (c) 1995 by Sun Microsystems, Inc.
+ *     All rights reserved.
+ *
+ * This source code is a product of Sun Microsystems, Inc. and is provided
+ * for unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify this source code without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * THIS PROGRAM CONTAINS SOURCE CODE COPYRIGHTED BY SUN MICROSYSTEMS, INC.
+ * SUN MICROSYSTEMS, INC., MAKES NO REPRESENTATIONS ABOUT THE SUITABLITY
+ * OF SUCH SOURCE CODE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT
+ * EXPRESS OR IMPLIED WARRANTY OF ANY KIND.  SUN MICROSYSTEMS, INC. DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO SUCH SOURCE CODE, INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN
+ * NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT,
+ * INCIDENTAL, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM USE OF SUCH SOURCE CODE, REGARDLESS OF THE THEORY OF LIABILITY.
+ * 
+ * This source code is provided with no support and without any obligation on
+ * the part of Sun Microsystems, Inc. to assist in its use, correction, 
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS
+ * SOURCE CODE OR ANY PART THEREOF.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+
+/*
+ * This is where you put processor specific un-initialization things
+ * to deal with "initialization idempotency issues".
+ */
+
+void dynodump_uninit(void);
+void
+dynodump_uninit(void)
+{
+    return;
+}
diff --git a/dynodump/syms.c b/dynodump/syms.c
new file mode 100644 (file)
index 0000000..0ac5cb8
--- /dev/null
@@ -0,0 +1,73 @@
+/*
+ *     Copyright (c) 1995 by Sun Microsystems, Inc.
+ *     All rights reserved.
+ *
+ * This source code is a product of Sun Microsystems, Inc. and is provided
+ * for unrestricted use provided that this legend is included on all tape
+ * media and as a part of the software program in whole or part.  Users
+ * may copy or modify this source code without charge, but are not authorized
+ * to license or distribute it to anyone else except as part of a product or
+ * program developed by the user.
+ *
+ * THIS PROGRAM CONTAINS SOURCE CODE COPYRIGHTED BY SUN MICROSYSTEMS, INC.
+ * SUN MICROSYSTEMS, INC., MAKES NO REPRESENTATIONS ABOUT THE SUITABLITY
+ * OF SUCH SOURCE CODE FOR ANY PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT
+ * EXPRESS OR IMPLIED WARRANTY OF ANY KIND.  SUN MICROSYSTEMS, INC. DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO SUCH SOURCE CODE, INCLUDING ALL IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  IN
+ * NO EVENT SHALL SUN MICROSYSTEMS, INC. BE LIABLE FOR ANY SPECIAL, INDIRECT,
+ * INCIDENTAL, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM USE OF SUCH SOURCE CODE, REGARDLESS OF THE THEORY OF LIABILITY.
+ * 
+ * This source code is provided with no support and without any obligation on
+ * the part of Sun Microsystems, Inc. to assist in its use, correction, 
+ * modification or enhancement.
+ *
+ * SUN MICROSYSTEMS, INC. SHALL HAVE NO LIABILITY WITH RESPECT TO THE
+ * INFRINGEMENT OF COPYRIGHTS, TRADE SECRETS OR ANY PATENTS BY THIS
+ * SOURCE CODE OR ANY PART THEREOF.
+ *
+ * Sun Microsystems, Inc.
+ * 2550 Garcia Avenue
+ * Mountain View, California 94043
+ */
+
+/*
+ * Update the value of the `_edata' and `_end' symbols.
+ */
+#pragma ident  "@(#) $Id: syms.c,v 1.3 1997/05/29 04:22:30 steve Exp $ - SMI"
+
+#include       <libelf.h>
+#include       <string.h>
+#include       "machdep.h"
+#include       "_dynodump.h"
+
+void
+update_sym(Cache * cache, Cache * _cache, Addr edata)
+{
+    char *strs;
+    Sym *syms;
+    Shdr *shdr;
+    int        symn, cnt;
+
+    /*
+     * Set up to read the symbol table and its associated string table.
+     */
+    shdr = _cache->c_shdr;
+    syms = (Sym *) _cache->c_data->d_buf;
+    symn = shdr->sh_size / shdr->sh_entsize;
+
+    strs = (char *) cache[shdr->sh_link].c_data->d_buf;
+
+    /*
+     * Loop through the symbol table looking for `_end' and `_edata'.
+     */
+    for (cnt = 0; cnt < symn; cnt++, syms++) {
+       char *name = strs + syms->st_name;
+
+       if (strcmp(name, "_end") && strcmp(name, "_edata"))
+           continue;
+
+       syms->st_value = edata;
+    }
+}
diff --git a/etc/BETA b/etc/BETA
new file mode 100644 (file)
index 0000000..0e619ee
--- /dev/null
+++ b/etc/BETA
@@ -0,0 +1,366 @@
+                               -*- mode:outline -*-
+
+* Introduction
+==============
+
+You are running an experimental version of XEmacs.  Please do not
+report problems with Beta XEmacs to comp.emacs.xemacs.  Report them to
+xemacs-beta@xemacs.org.
+
+** XEmacs Beta Mailing List
+===========================
+
+*** Subscribing
+---------------
+
+If you are not subscribed to the XEmacs beta list you should be.  Send
+an email message to xemacs-beta-request@xemacs.org with `subscribe'
+(without the quotes) as the BODY of the message.
+
+*** Unsubscribing
+-----------------
+
+To unsubscribe from the list send an email message to
+xemacs-beta-request@xemacs.org with `unsubscribe' (without the quotes)
+as the BODY of the message.
+
+*** Administrivia
+-----------------
+
+The XEmacs beta list is managed by the Majordomo mailing list package,
+and the usual Majordomo commands work.  Do not send mailing list
+requests to the main address (xemacs-beta@xemacs.org), always send
+them to xemacs-beta-request@xemacs.org.  If you have problems with the
+list itself, they should be brought to the attention of the XEmacs
+Mailing List manager Jason Mastaler <list-manager@xemacs.org>.
+
+
+** Beta Release Schedule
+========================
+
+The URL ftp://ftp.xemacs.org/pub/xemacs/beta/README always contains
+the best estimate of when the next beta XEmacs will be released.  For
+weekend betas the release time is generally in the vicinity of 2PM to
+5PM US Pacific Time (Universal Time minus 8 hours).  For weekday
+betas, the release time is generally in the vicinity of 8PM to
+Midnight US Pacific Time on the listed day.
+
+Betas are nominally a week apart, scheduled on every Saturday.
+Midweek releases are made when a serious enough problem warrants it.
+
+
+** Reporting Problems
+=====================
+
+The best way to get problems fixed in XEmacs is to submit good problem
+reports.  Since this is beta software, problems are certain to exist.
+Please read through all of part II of the XEmacs FAQ for an overview
+of problem reporting.  Other items which are most important are:
+
+1.  Do not submit C stack backtraces without line numbers.  Since it
+    is possible to compile optimized with debug information with GCC
+    it is never a good idea to compile XEmacs without the -g flag.
+    XEmacs runs on a variety of platforms, and often it is not
+    possible to recreate problems which afflict a specific platform.
+    The line numbers in the C stack backtrace help isolate where the
+    problem is actually occurring.
+2.  Attempt to recreate the problem starting with an invocation of
+    XEmacs with `xemacs -q -no-site-file'.  Quite often, problems are
+    due to package interdependencies, and the like.  An actual bug in
+    XEmacs should be reproducible in a default configuration without
+    loading any special packages (or the one or two specific packages
+    that cause the bug to appear).
+
+3.  A picture can be worth a thousand words.  When reporting an
+    unusual display, it is generally best to capture the problem in a
+    screen dump and include that with the problem report.  The easiest
+    way to get a screen dump is to use the xv program and its grab
+    function.  Save the image as a GIF to keep bandwidth requirements
+    down without loss of information.  MIME is the preferred method
+    for making the image attachments.
+
+** Getting the Source
+=====================
+
+In addition to the normal tar distribution, XEmacs source is now
+available via CVS.  Please see the URL: <URL:http://cvs.xemacs.org/~xemacs/>.
+
+* Compiling Beta XEmacs
+=======================
+
+** Building an XEmacs from patches
+==================================
+
+All beta releases of XEmacs are included with patches from the
+previous version in an attempt to keep bandwidth requirements down.
+Patches should be applied with the GNU patch program in something like
+the following.  Let's say you're upgrading XEmacs 20.15-beta10 to
+XEmacs 20.15-beta11 and you have a full unmodified XEmacs 20.15-beta10
+source tree to work with.  Cd to the top level directory and issue the
+shell command:
+
+$ gunzip -c /tmp/xemacs-20.15-b10-20.15-b11.patch.gz | patch -p1
+
+After patching, check to see that no patches were missed by doing
+$ find . -name \*.rej -print
+
+Any rejections should be treated as serious problems to be resolved
+before building XEmacs.
+
+After seeing that there were no rejections, issue the commands
+
+$ ./config.status --recheck
+$ make beta
+
+and go play minesweep for a while on an older XEmacs while the binary
+is rebuilt.
+
+** Building XEmacs from a full distribution
+==============================================
+
+Locate a convenient place where you have at least 100MB of free space
+and issue the command
+
+$ gunzip -c /tmp/xemacs-20.15-b11.tar.gz | tar xvf -
+
+(or simply `tar zxvf /tmp/xemacs-20.15-b11.tar.gz' if you use GNU tar).
+
+cd to the top level directory and issue an appropriate configure
+command.  One maintainer uses the following at the time of this
+writing:
+
+./configure \
+       --cflags="-mpentium -march=pentium -O6 -g -fno-peep-spills" \
+       --error-checking=all --debug=yes \
+       --with-scrollbars=athena3d --with-dialogs=athena3d \
+       --with-mule --with-xfs --with-xim=xlib
+
+Part of the configure output is a summary that looks something like:
+
+uname -a: Linux altair.xemacs.org 2.0.32 #2 Sun Nov 16 18:52:14 PST 1997 i586
+
+./configure  '--cflags=-mpentium -march=pentium -O6 -g -fno-peep-spills' '--error-checking=all' '--debug=yes' '--with-scrollbars=athena3d' '--with-dialogs=athena3d' '--with-mule' '--with-xfs' '--with-xim=xlib'
+
+
+XEmacs 21.0-b34 "Oberhasli-pre2" configured for `i586-pc-linux'.
+
+  Where should the build process find the source code?    /home/xemacs/xemacs-20.0
+  What installation prefix should install use?           /usr/local
+  What operating system and machine description files should XEmacs use?
+        `s/linux.h' and `m/intel386.h'
+  What compiler should XEmacs be built with?              gcc -mpentium -march=pentium -O6 -g -fno-peep-spills
+  Should XEmacs use the GNU version of malloc?            yes
+  (Using Doug Lea's new malloc from the GNU C Library.)
+  Should XEmacs use the relocating allocator for buffers? yes
+  What window system should XEmacs use?                   x11
+  Where do we find X Windows header files?                /usr/X11/include
+  Where do we find X Windows libraries?                   /usr/X11/lib
+  Compiling in support for XAUTH.
+  Compiling in support for XPM images.
+  Compiling in support for X-Face message headers.
+  Compiling in support for GIF image conversion.
+  Compiling in support for JPEG image conversion.
+  Compiling in support for PNG image conversion.
+  Compiling in support for TIFF image conversion.
+  Compiling in native sound support.
+  Compiling in support for Berkeley DB.
+  Compiling in support for GNU DBM.
+  Compiling in support for ncurses.
+  Compiling in support for GPM (General Purpose Mouse).
+  Compiling in Mule (multi-lingual) support.
+  Compiling in XIM (X11R5+ I18N input method) support.
+    Using raw Xlib to provide XIM support.
+    Using XFontSet to provide bilingual menubar.
+  Compiling in support for Canna on Mule.
+  Compiling in support for the WNN input method on Mule.
+    Using WNN version 6.
+  Compiling in support for OffiX.
+  Compiling in support for proper session-management.
+  Using Lucid menubars.
+  Using Athena-3d scrollbars.
+  Using Athena-3d dialog boxes.
+  Compiling in DLL support.
+  movemail will use "dot-locking" for locking mail spool files.
+  Using Lisp_Objects with minimal tagbits.
+  Compiling in extra code for debugging.
+  Compiling in code for checking XEmacs memory usage.
+  WARNING: ---------------------------------------------------------
+  WARNING: Compiling in support for runtime error checking.
+  WARNING: XEmacs will run noticeably more slowly as a result.
+  WARNING: Error checking is on by default for XEmacs beta releases.
+  WARNING: ---------------------------------------------------------
+
+
+
+Then type `make' and you should have a working XEmacs.
+
+After you have verified that you have a functional editor, fire up
+your favorite mail program and send a build report to
+xemacs-beta@xemacs.org.  The build report should include
+
+1. Your hardware configuration (OS version, etc.)
+
+2. Version numbers of software in use (X11 version, system library
+   versions if appropriate, graphics library versions if appropriate).
+   If you're on a system like Linux, include all the version numbers
+   you can because chances are it makes a difference.
+
+3. The options given to configure
+
+4. The configuration report illustrated above
+
+   For convenience all of the above items are placed in a file called
+   `Installation' in the top level build directory.  They are also
+   available by performing M-x describe-installation inside XEmacs.
+
+5. Any other unusual items you feel should be brought to the attention
+   of the developers.
+
+** Creating patches for submission
+==================================
+
+Patches to XEmacs should be mailed to <xemacs-patches@xemacs.org>.
+Each patch will be reviewed by the patches review board, and will be
+acked and added to the distribution, or rejected with an explanation.
+
+Emailed patches should preferably be sent in MIME format and quoted
+printable encoding (if necessary).
+
+When making patches, please use the `-u' option, or if your diff
+doesn't support it, `-c'.  Using ordinary (context-free) diffs are
+notoriously prone to error, since line numbers tend to change when
+others make changes to the same source file.
+
+An example of the `diff' usage:
+
+$ diff -u OLDFILE NEWFILE
+
+-or-
+
+$ diff -c OLDFILE NEWFILE
+
+Also, it is helpful if you create the patch in the top level of the
+XEmacs source directory:
+
+$ cp -p lwlib/xlwmenu.c lwlib/xlwmenu.c.orig
+  hack, hack, hack....
+$ diff -u lwlib/xlwmenu.c.orig lwlib/xlwmenu.c
+
+Each patch should be accompanied by an update to the appropriate
+ChangeLog file.  Please don't mail patches to ChangeLog because they
+have an extremely high rate of failure; just mail us the new part of
+the ChangeLog you added.
+
+Also note that if you cut & paste from an xterm to an XEmacs mail buffer
+you will probably lose due to tab expansion.  The best thing to do is
+to use an XEmacs shell buffer to run the diff commands, or ...
+M-x cd to the appropriate directory, and issue the command `C-u M-!' from
+within XEmacs.
+
+Guidelines for writing ChangeLog entries is governed by the GNU coding 
+standards.  Please see
+       http://www.gnu.org/prep/standards_toc.html   [Change Logs section]
+for details.
+
+Patches should be as single-minded as possible.  Mammoth patches can
+be very difficult to place into the right slot.  They are much easier
+to deal with when broken down into functional or conceptual chunks.
+The patches submitted by Kyle Jones and Hrvoje Niksic are stellar
+examples of how to Do The Right Thing.
+
+** Packages directory on the FTP Site
+=====================================
+
+The packages directory
+       ftp://ftp.xemacs.org/pub/xemacs/beta/xemacs-21.0/packages/
+
+is divided into subdirectory by the major type of package.
+
+drwxr-xr-x   2 beta-f   beta-f      1024 Oct 10 00:43 binary-packages
+drwxr-xr-x   2 beta-f   beta-f       512 Oct 10 00:44 package-sources
+drwxr-xr-x   2 beta-f   beta-f       512 Oct 10 00:44 utils
+
+** Support Utilities (utils)
+============================
+
+The utils directory contains tools to deal with current Lisp sources that
+have not had yet gotten XEmacs package integration.  The script `xpackage.sh'
+is used with Quassia Gnus.  Edit the appropriate variables at the top of
+the script to reflect the local configuration and run it in the top level
+directory of a Quassia Gnus source tree to install an update to Quassia Gnus.
+
+** Binary package installation (binary-packages)
+================================================
+
+Prerequisite:  XEmacs 21.0-b1.
+
+Binary packages are complete entities that can be untarred at the top
+level of an XEmacs package hierarchy and work at runtime.  To install files
+in this directory, run the command `M-x package-admin-add-binary-package'
+and fill in appropriate values to the prompts.
+
+** Manual procedures for package management
+===========================================
+
+Prerequisite: XEmacs 21.0
+
+When adding and deleting files from a lisp directory the
+auto-autoloads.el (global symbols) and custom-load.el (Customization
+groups) must be kept in synch.  Assuming one is manipulating a
+directory called `lisp-utils', the command to rebuild the
+auto-autoloads.el file is:
+
+xemacs-21.0 -vanilla -batch -l autoload -f batch-update-directory lisp-utils
+
+The command to rebuild the custom-load.el file is:
+
+xemacs-21.0 -vanilla -batch -l cus-dep \
+       -f Custom-make-dependencies lisp-utils
+
+To bytecompile both of these files the command is:
+
+xemacs-21.0 -vanilla -batch -f batch-byte-compile \
+       lisp-utils/auto-autoloads.el lisp-utils/custom-laod.el
+
+** Building XEmacs and XEmacs packages from scratch
+===================================================
+
+To build everything completely from scratch (not a high priority as a
+design goal), the following procedure should work.  (I don't recommend
+building this way).
+
+*** Phase 1 -- Get a minimal XEmacs binary with mule to build the package
+    lisp with.
+
+**** Grab a mule-base tarball and install it into a newly created package
+     directory.
+
+**** Configure XEmacs with mule and a package-path including the
+     directory created above.
+
+**** Do a `make dist' to build an XEmacs binary.
+
+*** Phase 2 -- Build and install the package lisp.
+
+**** Modify XEmacs.rules for local paths and the XEmacs binary created in 
+     Phase 1.
+
+**** Do a make from the top level package lisp source directory.[1]
+
+**** Do `make bindist's on all the packages you wish to install and
+     remove the byproduct .tar.gz's.
+
+*** Phase 3 -- If necessary, redump XEmacs
+    with the packages that require dump-time support and install it.
+
+**** Reconfigure without Mule if you don't wish a Mule-ish XEmacs, and
+     rebuild XEmacs.
+
+- or -
+
+**** rm lib-src/DOC src/xemacs; make
+
+**** Install or run in-place.
+
+Note that this is in essence what `make all-elc' has always done.
diff --git a/etc/CHARSETS b/etc/CHARSETS
new file mode 100644 (file)
index 0000000..dd2d083
--- /dev/null
@@ -0,0 +1,57 @@
+#########################
+## LIST OF CHARSETS
+## Each line corresponds to one charset.
+## The following attributes are listed in this order
+## separated by a colon `:' in one line.
+##     CHARSET-SYMBOL-NAME,
+##     CHARSET-ID,
+##     DIMENSION (1 or 2)
+##     CHARS (94 or 96)
+##     BYTES (of multibyte form: 1, 2, 3, or 4),
+##     WIDTH (occupied column numbers: 1 or 2),
+##     DIRECTION (0:left-to-right, 1:right-to-left),
+##     ISO-FINAL-CHAR (character code of ISO-2022's final character)
+##     ISO-GRAPHIC-PLANE (ISO-2022's graphic plane, 0:GL, 1:GR)
+##     DESCRIPTION (describing string of the charset)
+tibetan-1-column:241:2:94:4:1:0:56:0:Tibetan 1 column glyph
+tibetan:252:2:94:4:2:0:55:0:Tibetan characters
+lao:167:1:94:3:1:0:49:0:Lao characters (ISO10646 0E80..0EDF)
+indian-1-column:240:2:94:4:1:0:54:0:Indian charset for 2-column width glypps
+indian-2-column:251:2:94:4:2:0:53:0:Indian charset for 2-column width glyphs
+indian-is13194:225:1:94:3:2:0:53:1:Generic Indian charset for data exchange with IS 13194
+ascii-right-to-left:166:1:94:3:1:1:66:0:ASCII (left half of ISO8859-1) with right-to-left direction
+chinese-cns11643-7:250:2:94:4:2:0:77:0:CNS11643 Plane 7 Chinese Traditional
+chinese-cns11643-6:249:2:94:4:2:0:76:0:CNS11643 Plane 6 Chinese Traditional
+chinese-cns11643-5:248:2:94:4:2:0:75:0:CNS11643 Plane 5 Chinese Traditional
+chinese-cns11643-4:247:2:94:4:2:0:74:0:CNS11643 Plane 4 Chinese Traditional
+chinese-cns11643-3:246:2:94:4:2:0:73:0:CNS11643 Plane 3 Chinese Traditional
+ethiopic:245:2:94:4:2:0:51:0:Ethiopic characters
+arabic-2-column:224:1:94:3:2:1:52:0:Arabic 2-column
+arabic-1-column:165:1:94:3:1:1:51:0:Arabic 1-column
+arabic-digit:164:1:94:3:1:0:50:0:Arabic digit
+vietnamese-viscii-upper:163:1:96:3:1:0:50:1:VISCII1.1 upper-case
+vietnamese-viscii-lower:162:1:96:3:1:0:49:1:VISCII1.1 lower-case
+ipa:161:1:96:3:1:0:48:1:IPA (International Phonetic Association)
+chinese-sisheng:160:1:94:3:1:0:48:0:SiSheng characters for PinYin/ZhuYin
+chinese-big5-2:153:2:94:3:2:0:49:0:Big5 Level-2 Chinese traditional
+chinese-big5-1:152:2:94:3:2:0:48:0:Big5 Level-1 Chinese traditional
+chinese-cns11643-2:150:2:94:3:2:0:72:0:CNS11643 Plane 2 Chinese traditional
+chinese-cns11643-1:149:2:94:3:2:0:71:0:CNS11643 Plane 1 Chinese traditional
+japanese-jisx0212:148:2:94:3:2:0:68:0:JISX0212 Japanese supplement
+korean-ksc5601:147:2:94:3:2:0:67:0:KSC5601 Korean Hangul and Hanja
+japanese-jisx0208:146:2:94:3:2:0:66:0:JISX0208.1983/1990 Japanese Kanji
+chinese-gb2312:145:2:94:3:2:0:65:0:GB2312 Chinese simplified
+japanese-jisx0208-1978:144:2:94:3:2:0:64:0:JISX0208.1978 Japanese Kanji (so called "old JIS")
+latin-iso8859-9:141:1:96:2:1:0:77:1:ISO8859-9 (Latin-5)
+cyrillic-iso8859-5:140:1:96:2:1:0:76:1:ISO8859-5 (Cyrillic)
+latin-jisx0201:138:1:94:2:1:0:74:0:JISX0201.1976 Japanese Roman
+katakana-jisx0201:137:1:94:2:1:0:73:1:JISX0201.1976 Japanese Kana
+hebrew-iso8859-8:136:1:96:2:1:1:72:1:ISO8859-8 (Hebrew)
+arabic-iso8859-6:135:1:96:2:1:1:71:1:ISO8859-6 (Arabic)
+greek-iso8859-7:134:1:96:2:1:0:70:1:ISO8859-7 (Greek)
+thai-tis620:133:1:96:2:1:0:84:1:TIS620.2529 (Thai)
+latin-iso8859-4:132:1:96:2:1:0:68:1:ISO8859-4 (Latin-4)
+latin-iso8859-3:131:1:96:2:1:0:67:1:ISO8859-3 (Latin-3)
+latin-iso8859-2:130:1:96:2:1:0:66:1:ISO8859-2 (Latin-2)
+latin-iso8859-1:129:1:96:2:1:0:65:1:ISO8859-1 (Latin-1)
+ascii:000:1:94:1:1:0:66:0:ASCII (ISO646 IRV)
diff --git a/etc/CODING-STANDARDS b/etc/CODING-STANDARDS
new file mode 100644 (file)
index 0000000..d58b771
--- /dev/null
@@ -0,0 +1,81 @@
+                       XEMACS CODING STANDARDS
+                                  
+                                 by
+
+                              Ben Wing
+
+
+Copyright (c) 1996 Ben Wing.
+
+
+This file documents the coding standards used in the XEmacs source
+code.  Note that XEmacs follows the GNU coding standards, which are
+documented separately in ../man/standards.texi.  This file only
+documents standards that are not included in that document; typically
+this consists of standards that are specifically relevant to the
+XEmacs code itself.
+
+First, a recap of the GNU standards:
+
+-- Put a space after every comma.
+-- Put a space before the parenthesis that begins a function call,
+   macro call, function declaration or definition, or control
+   statement (if, while, switch, for). (DO NOT do this for macro
+   definitions; this is invalid preprocessor syntax.)
+-- The brace that begins a control statement (if, while, for, switch,
+   do) or a function definition should go on a line by itself.
+-- In function definitions, put the return type and all other
+   qualifiers on a line before the function name.  Thus, the function
+   name is always at the beginning of a line.
+-- Indentation level is two spaces.  (However, the first and following
+   statements of a while/for/if/etc. block are indented four spaces
+   from the while/for/if keyword.  The opening and closing braces are
+   indented two spaces.)
+-- Variable and function names should be all lowercase, with underscores
+   separating words, except for a prefixing tag, which may be in
+   uppercase.  Do not use the mixed-case convention (e.g.
+   SetVariableToValue ()) and *especially* do not use Microsoft
+   Hungarian notation (char **rgszRedundantTag).
+-- preprocessor and enum constants should be all uppercase, and should
+   be prefixed with a tag that groups related constants together.
+
+
+Now, the XEmacs coding standards:
+
+**** Specially-prefixed functions/variables:
+
+-- All global C variables whose value is constant and is a symbol begin
+   with a capital Q, e.g. Qkey_press_event. (The type will always be
+   Lisp_Object.)
+-- All other global C variables whose value is a Lisp_Object (this
+   includes variables that forward into Lisp variables plus others like
+   Vselected_console) begin with a capital V.
+-- No C variables whose value is other than a Lisp_Object should begin
+   with a capital V. (This includes C variables that forward into
+   integer or boolean Lisp variables.)
+-- All global C variables whose value is a struct Lisp_Subr begin with a
+   capital S. (This only occurs in connection with DEFUN ()).
+-- All C functions that are Lisp primitives begin with a capital F,
+   and no others should begin this way.
+
+**** Functions for manipulating Lisp types:
+
+-- Any function that creates an empty or mostly empty Lisp object
+   should begin allocate_(). (*Not* make_().) (Except, of course,
+   for Lisp primitives, which usually begin Fmake_()).
+-- Any function that converts a pointer into an equivalent Lisp_Object
+   should begin make_().
+-- Any function that converts a Lisp_Object into its equivalent pointer
+   and checks the type and validity of the object (e.g. making sure
+   it's not dead) should begin decode_().
+-- Any function that looks up a Lisp object (e.g. buffer, face) given
+   a symbol or string should begin get_(). (Except, of course, for
+   Lisp primitives, which usually begin Fget_()).
+
+**** Other:
+
+-- Any header-file declarations of the sort
+
+   struct foobar;
+
+   go into the "types" section of lisp.h.
diff --git a/etc/CODINGS b/etc/CODINGS
new file mode 100644 (file)
index 0000000..81611fc
--- /dev/null
@@ -0,0 +1,74 @@
+#########################
+## LIST OF CODING SYSTEMS
+## Each line corresponds to one coding system
+## Format of a line is:
+##   NAME:TYPE:MNEMONIC:EOL:FLAGS:DOCSTRING,
+## where
+##  TYPE = nil (no conversion), t (auto conversion),
+##         0 (Mule internal), 1 (SJIS), 2 (ISO2022), 3 (BIG5), or 4 (CCL)
+##  EOL = 0 (LF), 1 (CRLF), 2 (CR), or 3 (Automatic detection)
+##  FLAGS =
+##    if TYPE = 2 then
+##      comma (`,') separated data of the followings:
+##        G0, G1, G2, G3, SHORT-FORM, ASCII-EOL, ASCII-CNTL, SEVEN,
+##        LOCKING-SHIFT, SINGLE-SHIFT, USE-ROMAN, USE-OLDJIS, NO-ISO6429
+##    else if TYPE = 4 then
+##      comma (`,') separated CCL programs for read and write
+##    else
+##      0
+##
+no-conversion:nil:=:0:0:Do no conversion
+undecided:t:+:3:0:Detect coding-system automatically
+hz:0:z:3:0:Codins-system of Hz/ZW used for Chinese (GB).
+emacs-mule:0:=:3:0:Internal coding system used in a buffer.
+shift_jis:1:S:3:0:Coding-system of Shift-JIS used in Japan.
+sjis:1:S:3:0:Coding-system of Shift-JIS used in Japan.
+euc-japan-1990:2:E:3:ascii,japanese-jisx0208,katakana-jisx0201,japanese-jisx0212,1,1,1,0,0,1,0,0,0:Coding-system of Japanese EUC (Extended Unix Code).
+iso-2022-lock:2:i:3:(ascii,t),-2,-1,-1,0,1,1,1,0,0,0,0,0:ISO-2022 coding system using Locking-Shift for 96-charset.
+iso-2022-ss2-7:2:I:3:(ascii,t),-1,-2,-1,1,1,1,1,0,1,0,0,0:ISO-2022 coding system using SS2 for 96-charset in 7-bit code.
+iso-2022-ss2-8:2:I:3:(ascii,t),-1,-2,-1,0,1,1,0,0,1,0,0,0:ISO-2022 coding system using SS2 for 96-charset in 8-bit code.
+iso-2022-cjk:2:I:3:(ascii,t),(nil,korean-ksc5601,chinese-gb2312,chinese-cns11643-1,t),(nil,chinese-cns11643-2),(nil,chinese-cns11643-3,chinese-cns11643-4,chinese-cns11643-5,chinese-cns11643-6,chinese-cns11643-7),1,1,1,1,1,1,0,0,0:Mixture of ISO-2022-JP, ISO-2022-KR, and ISO-2022-CN
+cn-gb-2312:2:C:3:(ascii,t),chinese-gb2312,chinese-sisheng,-1,0,1,1,0,0,1,0,0,0:Coding-system of Chinese EUC (so called GB Encoding).
+lao:2:T:3:(ascii,t),(lao,t),-1,-1,0,1,0,0,0,0,0,0,0:Coding-system used for ASCII(MSB=0) & LAO(MSB=1).
+iso-2022-jp-1978-irv:2:J:3:(ascii,t),-1,-1,-1,1,1,1,1,0,0,1,1,0:Coding-system used for old jis terminal.
+junet:2:J:3:(ascii,t),-1,-1,-1,1,1,1,1,0,0,0,0,0:Coding system based on ISO2022 7-bit encoding.
+tis620:2:T:3:(ascii,t),(thai-tis620,t),-1,-1,0,1,0,0,0,0,0,0,0:Coding-system used for ASCII(MSB=0) & TIS620(MSB=1).
+euc-japan:2:E:3:ascii,japanese-jisx0208,katakana-jisx0201,japanese-jisx0212,1,1,1,0,0,1,0,0,0:Coding-system of Japanese EUC (Extended Unix Code).
+iso-2022-int-1:2:I:3:(ascii,t),(korean-ksc5601,t),-1,-1,1,1,1,1,1,0,0,0,0:ISO-2022-INT-1
+euc-china:2:C:3:(ascii,t),chinese-gb2312,chinese-sisheng,-1,0,1,1,0,0,1,0,0,0:Coding-system of Chinese EUC (so called GB Encoding).
+old-jis:2:J:3:(ascii,t),-1,-1,-1,1,1,1,1,0,0,1,1,0:Coding-system used for old jis terminal.
+iso-2022-7:2:J:3:(ascii,t),-1,-1,-1,1,1,1,1,0,0,0,0,0:Coding system based on ISO2022 7-bit encoding.
+iso-2022-cn:2:C:3:ascii,(nil,chinese-gb2312,chinese-cns11643-1),(nil,chinese-cns11643-2),(nil,chinese-cns11643-3,chinese-cns11643-4,chinese-cns11643-5,chinese-cns11643-6,chinese-cns11643-7),0,1,1,1,1,1,0,0,0:Coding system ISO-2022-CN for Chinese (GB and CNS character sets).
+ctext:2:X:3:(ascii,t),(latin-iso8859-1,t),-1,-1,0,1,1,0,0,0,0,0,0:MIME ISO-8859-1 Compound Text Encoding.
+iso-2022-jp:2:J:3:(ascii,t),-1,-1,-1,1,1,1,1,0,0,0,0,0:Coding system based on ISO2022 7-bit encoding.
+iso-2022-kr:2:k:3:ascii,(nil,korean-ksc5601),-1,-1,0,1,1,1,1,0,0,0,0:MIME ISO-2022-KR
+iso-2022-cn-ext:2:C:3:ascii,(nil,chinese-gb2312,chinese-cns11643-1),(nil,chinese-cns11643-2),(nil,chinese-cns11643-3,chinese-cns11643-4,chinese-cns11643-5,chinese-cns11643-6,chinese-cns11643-7),0,1,1,1,1,1,0,0,0:Coding system ISO-2022-CN for Chinese (GB and CNS character sets).
+iso-8859-1:2:X:3:(ascii,t),(latin-iso8859-1,t),-1,-1,0,1,1,0,0,0,0,0,0:MIME ISO-8859-1 Compound Text Encoding.
+iso-8859-2:2:2:3:(ascii,t),(latin-iso8859-2,t),-1,-1,0,1,1,0,0,0,0,0,0:MIME ISO-8859-2
+iso-8859-3:2:3:3:(ascii,t),(latin-iso8859-3,t),-1,-1,0,1,1,0,0,0,0,0,0:MIME ISO-8859-3
+iso-8859-4:2:4:3:(ascii,t),(latin-iso8859-4,t),-1,-1,0,1,1,0,0,0,0,0,0:MIME ISO-8859-4
+iso-8859-5:2:5:3:(ascii,t),(cyrillic-iso8859-5,t),-1,-1,0,1,1,0,0,0,0,0,0:MIME ISO-8859-5
+iso-8859-7:2:7:3:(ascii,t),(greek-iso8859-7,t),-1,-1,0,1,1,0,0,0,0,0,0:MIME ISO-8859-7
+iso-8859-8:2:8:3:(ascii,t),(hebrew-iso8859-8,t),-1,-1,0,1,1,0,0,0,0,0,1:MIME ISO-8859-8
+iso-8859-9:2:9:3:(ascii,t),(latin-iso8859-9,t),-1,-1,0,1,1,0,0,0,0,0,0:MIME ISO-8859-9
+euc-kr:2:K:3:(ascii,t),korean-ksc5601,-1,-1,0,1,1,0,0,0,0,0,0:Coding-system of Korean EUC (Extended Unix Code).
+euc-korea:2:K:3:(ascii,t),korean-ksc5601,-1,-1,0,1,1,0,0,0,0,0,0:Coding-system of Korean EUC (Extended Unix Code).
+cn-big5:3:B:3:0:Coding-system of BIG5.
+big5:3:B:3:0:Coding-system of BIG5.
+viscii:4:V:3: 3 106 e ffffff0b 100 0 1 19c6 3 4 19c7 19e7 7 8 9 a b c d e f 10 11 12 13 19d6 15 16 17 18 19db 1a 1b 1c 1d 19dc 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f 19d5 19a1 19a2 19a3 19a4 19a5 19a6 19a7 19a8 19a9 19aa 19ab 19ac 19ad 19ae 19af 19b0 19b1 19b2 19b5 19fe 19be 19b6 19b7 19b8 19f6 19f7 19ef 19fc 19fb 19f8 19cf 19f5 1921 1922 1923 1924 1925 1926 1927 1928 1929 192a 192b 192c 192d 192e 192f 1930 1931 1932 19de 19bd 1935 1936 1937 1938 19f1 19d1 19d7 19d8 193d 193e 19df 19e0 19e1 19e2 19e3 19e4 19e5 1946 1947 19e8 19e9 19ea 19eb 19ec 19ed 19ee 194f 19f0 1951 19f2 19f3 19f4 1955 1956 1957 1958 19f9 19fa 195b 195c 19fd 195e 195f 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 196a 196b 196c 196d 196e 196f 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 197a 197b 197c 197d 197e 19e6 fffefd0c 16, 1 121 e 41b 10 80 fffffc07 fffffb0c 41b 15 9a fffff707 fffff60c 881d 12 a2 e 4017 80 ffffef0b 80 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac ad ae af b0 b1 b2 0 0 b5 b6 b7 b8 0 0 0 0 bd be 0 0 0 0 0 0 0 c6 c7 0 0 0 0 0 0 0 cf 0 d1 0 0 0 d5 d6 d7 d8 0 0 db dc 0 de df e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea eb ec ed ee ef f0 f1 f2 f3 f4 f5 f6 f7 f8 f9 fa fb fc fd fe 0 ffff6d0c 881b 12 a3 e 4017 80 ffff660b 80 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f 90 91 92 0 0 93 96 97 98 0 0 0 0 b4 95 0 0 0 0 0 0 0 2 5 0 0 0 0 0 0 0 9f 0 ba 0 0 0 80 14 bb bc 0 0 19 1e 0 b3 bf c0 c1 c2 c3 c4 c5 ff 6 c8 c9 ca cb cc cd ce 9b d0 b9 d2 d3 d4 a0 99 9a 9e d9 da 9d 9c dd 94 0 fffee40c fffee307 fffee20c 16:Coding-system used for VISCII 1.1.
+koi8:4:K:3: 3 106 e ffffff0b 100 0 1 2 3 4 5 6 7 8 9 a b c d e f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f 80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f 90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f 20 20 20 e71 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 e21 20 20 20 20 20 20 20 20 20 20 20 20 e6e e50 e51 e66 e54 e55 e64 e53 e65 e58 e59 e5a e5b e5c e5d e5e e5f e6f e60 e61 e62 e63 e56 e52 e6c e6b e57 e68 e6d e69 e67 e6a e4e e30 e31 e46 e34 e35 e44 e33 e45 e38 e39 e3a e3b e3c e3d e3e e3f e4f e40 e41 e42 e43 e36 e32 e4c e4b e37 e48 e4d e49 e47 e4a fffefd0c 16, 1 6e e 41b 15 8c fffffc07 fffffb0c e 4017 a0 fffff70b 60 20 b3 20 20 20 20 20 20 20 20 20 20 20 20 20 20 e1 e2 f7 e7 e4 e5 f6 fa e9 ea eb ec ed ee ef f0 f2 f3 f4 f5 e6 e8 e3 fe fb fd ff f9 f8 fc e0 f1 c1 c2 d7 c7 c4 c5 d6 da c9 ca cb cc cd ce cf d0 d2 d3 d4 d5 c6 c8 c3 de db dd df d9 d8 dc c0 d1 20 a3 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ffff950c 16:Coding-system used for KOI8.
+koi8-r:4:K:3: 3 106 e ffffff0b 100 0 1 2 3 4 5 6 7 8 9 a b c d e f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f 80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f 90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f 20 20 20 e71 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 e21 20 20 20 20 20 20 20 20 20 20 20 20 e6e e50 e51 e66 e54 e55 e64 e53 e65 e58 e59 e5a e5b e5c e5d e5e e5f e6f e60 e61 e62 e63 e56 e52 e6c e6b e57 e68 e6d e69 e67 e6a e4e e30 e31 e46 e34 e35 e44 e33 e45 e38 e39 e3a e3b e3c e3d e3e e3f e4f e40 e41 e42 e43 e36 e32 e4c e4b e37 e48 e4d e49 e47 e4a fffefd0c 16, 1 6e e 41b 15 8c fffffc07 fffffb0c e 4017 a0 fffff70b 60 20 b3 20 20 20 20 20 20 20 20 20 20 20 20 20 20 e1 e2 f7 e7 e4 e5 f6 fa e9 ea eb ec ed ee ef f0 f2 f3 f4 f5 e6 e8 e3 fe fb fd ff f9 f8 fc e0 f1 c1 c2 d7 c7 c4 c5 d6 da c9 ca cb cc cd ce cf d0 d2 d3 d4 d5 c6 c8 c3 de db dd df d9 d8 dc c0 d1 20 a3 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ffff950c 16:Coding-system used for KOI8.
+alternativnyj:4:A:3: 3 106 e ffffff0b 100 0 1 2 3 4 5 6 7 8 9 a b c d e f 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f e30 e31 e32 e33 e34 e35 e36 e37 e38 e39 e3a e3b e3c e3d e3e e3f e40 e41 e42 e43 e44 e45 e46 e47 e48 e49 e4a e4b e4c e4d e4e e4f e50 e51 e52 e53 e54 e55 e56 e57 e58 e59 e5a e5b e5c e5d e5e e5f 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 e60 e61 e62 e63 e64 e65 e66 e67 e68 e69 e6a e6b e6c e6d e6e e6f e21 e71 20 20 20 20 20 20 20 20 20 20 20 20 20 e70 fffefd0c 16, 1 6e e 41b 15 8c fffffc07 fffffb0c e 4017 a0 fffff70b 60 20 f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 80 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f 90 91 92 93 94 95 96 97 98 99 9a 9b 9c 9d 9e 9f a0 a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab ac ad ae af e0 e1 e2 e3 e4 e5 e6 e7 e8 e9 ea eb ec ed ee ef ff f1 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ffff950c 16:Coding-system used for Alternativnyj
+vscii:4:V:3: 3 106 e ffffff0b 100 0 19fa 19f8 3 19d7 19d8 19e6 7 8 9 a b c d e f 10 19d1 19df 19cf 19d6 19db 19fd 19dc 18 19 1a 1b 1c 1d 1e 1f 20 21 22 23 24 25 26 27 28 29 2a 2b 2c 2d 2e 2f 30 31 32 33 34 35 36 37 38 39 3a 3b 3c 3d 3e 3f 40 41 42 43 44 45 46 47 48 49 4a 4b 4c 4d 4e 4f 50 51 52 53 54 55 56 57 58 59 5a 5b 5c 5d 5e 5f 60 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 77 78 79 7a 7b 7c 7d 7e 7f 19e0 19e4 19e3 19e1 19d5 19a3 19a7 19e8 19eb 19a8 19e9 19a9 19ae 19ec 19ef 19ee 19ed 19b8 19f2 19f6 19f5 19f3 19f7 19b5 19b6 19b7 19de 19be 19fe 19f9 19fc 19fb a0 19e5 19e2 19ea 19f4 19bd 19df 19f0 1965 1962 196a 1974 193e 1979 1970 19a2 c0 c1 c2 c3 c4 1960 1964 1963 1961 1955 19c6 1922 1946 1947 1921 19c7 19a1 19a5 19a6 19e7 19a5 19ab 1923 1925 1926 1967 1924 1927 1968 19ac 196b 1928 1969 1929 192b 192c 192d 192a 192e 196c 196f 19ad 19aa 19b0 196e 196d 1938 1972 19b1 1976 1975 1973 1977 1930 1931 1932 192f 1935 1936 1937 195e 193e 197e 1979 19b2 197c 197b 197a 1978 1957 1958 1966 1951 1971 194f 1956 195b 197d 195c 19af fffefd0c 16, 1 121 e 41b 10 80 fffffc07 fffffb0c 41b 15 9a fffff707 fffff60c 881d 12 a2 e 4017 80 ffffef0b 80 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 be bb c6 ca c7 c8 cb cf d1 d5 d2 d3 d4 d6 e8 e5 e6 e7 0 0 e9 ea eb de 0 0 0 0 0 ed 0 0 0 0 0 0 0 bc bd 0 0 0 0 0 0 0 fa 0 f8 0 0 0 b9 fb f5 f6 0 0 fc fe 0 ec 0 b5 b8 a9 b7 b6 a8 f7 c9 cc d0 aa ce d7 dd dc d8 ae f9 df e3 ab e2 e1 e4 f4 ef f3 f2 f1 fd ee 0 ffff6d0c 881b 12 a3 e 4017 80 ffff660b 80 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 81 82 83 84 85 86 87 88 89 8a 8b 8c 8d 8e 8f 90 91 92 0 0 93 96 97 98 0 0 0 0 b4 95 0 0 0 0 0 0 0 2 5 0 0 0 0 0 0 0 9f 0 ba 0 0 0 80 14 bb bc 0 0 19 1e 0 b3 bf c0 c1 c2 c3 c4 c5 ff 6 c8 c9 ca cb cc cd ce 9b d0 b9 d2 d3 d4 a0 99 9a 9e d9 da 9d 9c dd 94 0 fffee40c fffee307 fffee20c 16:Coding-system used for VSCII-1.
+############################
+## LIST OF CODING CATEGORIES (ordered by priority)
+## CATEGORY:CODING-SYSTEM
+##
+coding-category-iso-7:iso-2022-7
+coding-category-iso-8-1:iso-8859-1
+coding-category-iso-8-2:iso-8859-1
+coding-category-iso-else:iso-2022-lock
+coding-category-emacs-mule:emacs-mule
+coding-category-sjis:sjis
+coding-category-big5:big5
+coding-category-binary:no-conversion
diff --git a/etc/COPYING b/etc/COPYING
new file mode 100644 (file)
index 0000000..1942c43
--- /dev/null
@@ -0,0 +1,341 @@
+                   GNU GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                          59 Temple Place - Suite 330
+                          Boston, MA 02111-1307, USA.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+\f
+                   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+\f
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+\f
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+\f
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                           NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+\f
+           How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) 19yy  <name of author>
+
+    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 2 of the License, 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; see the file COPYING.  If not, write to
+    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+    Boston, MA 02111-1307, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) 19yy name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/etc/COPYING.LIB b/etc/COPYING.LIB
new file mode 100644 (file)
index 0000000..07960d8
--- /dev/null
@@ -0,0 +1,483 @@
+                 GNU LIBRARY GENERAL PUBLIC LICENSE
+                      Version 2, June 1991
+
+ Copyright (C) 1991 Free Software Foundation, Inc.
+                    59 Temple Place - Suite 330
+                    Boston, MA 02111-1307, USA.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the library GPL.  It is
+ numbered 2 because it goes with version 2 of the ordinary GPL.]
+
+                           Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+  This license, the Library General Public License, applies to some
+specially designated Free Software Foundation software, and to any
+other libraries whose authors decide to use it.  You can use it for
+your libraries, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if
+you distribute copies of the library, or if you modify it.
+
+  For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you.  You must make sure that they, too, receive or can get the source
+code.  If you link a program with the library, you must provide
+complete object files to the recipients so that they can relink them
+with the library, after making changes to the library and recompiling
+it.  And you must show them these terms so they know their rights.
+
+  Our method of protecting your rights has two steps: (1) copyright
+the library, and (2) offer you this license which gives you legal
+permission to copy, distribute and/or modify the library.
+
+  Also, for each distributor's protection, we want to make certain
+that everyone understands that there is no warranty for this free
+library.  If the library is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original
+version, so that any problems introduced by others will not reflect on
+the original authors' reputations.
+\f
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that companies distributing free
+software will individually obtain patent licenses, thus in effect
+transforming the program into proprietary software.  To prevent this,
+we have made it clear that any patent must be licensed for everyone's
+free use or not licensed at all.
+
+  Most GNU software, including some libraries, is covered by the ordinary
+GNU General Public License, which was designed for utility programs.  This
+license, the GNU Library General Public License, applies to certain
+designated libraries.  This license is quite different from the ordinary
+one; be sure to read it in full, and don't assume that anything in it is
+the same as in the ordinary license.
+
+  The reason we have a separate public license for some libraries is that
+they blur the distinction we usually make between modifying or adding to a
+program and simply using it.  Linking a program with a library, without
+changing the library, is in some sense simply using the library, and is
+analogous to running a utility program or application program.  However, in
+a textual and legal sense, the linked executable is a combined work, a
+derivative of the original library, and the ordinary General Public License
+treats it as such.
+
+  Because of this blurred distinction, using the ordinary General
+Public License for libraries did not effectively promote software
+sharing, because most developers did not use the libraries.  We
+concluded that weaker conditions might promote sharing better.
+
+  However, unrestricted linking of non-free programs would deprive the
+users of those programs of all benefit from the free status of the
+libraries themselves.  This Library General Public License is intended to
+permit developers of non-free programs to use free libraries, while
+preserving your freedom as a user of such programs to change the free
+libraries that are incorporated in them.  (We have not seen how to achieve
+this as regards changes in header files, but we have achieved it as regards
+changes in the actual functions of the Library.)  The hope is that this
+will lead to faster development of free libraries.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.  Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library".  The
+former contains code derived from the library, while the latter only
+works together with the library.
+
+  Note that it is possible for a library to be covered by the ordinary
+General Public License rather than by this special one.
+\f
+                 GNU LIBRARY GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License Agreement applies to any software library which
+contains a notice placed by the copyright holder or other authorized
+party saying it may be distributed under the terms of this Library
+General Public License (also called "this License").  Each licensee is
+addressed as "you".
+
+  A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+  The "Library", below, refers to any such software library or work
+which has been distributed under these terms.  A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language.  (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+  "Source code" for a work means the preferred form of the work for
+making modifications to it.  For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+  Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it).  Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+  
+  1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+  You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+\f
+  2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) The modified work must itself be a software library.
+
+    b) You must cause the files modified to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    c) You must cause the whole of the work to be licensed at no
+    charge to all third parties under the terms of this License.
+
+    d) If a facility in the modified Library refers to a function or a
+    table of data to be supplied by an application program that uses
+    the facility, other than as an argument passed when the facility
+    is invoked, then you must make a good faith effort to ensure that,
+    in the event an application does not supply such function or
+    table, the facility still operates, and performs whatever part of
+    its purpose remains meaningful.
+
+    (For example, a function in a library to compute square roots has
+    a purpose that is entirely well-defined independent of the
+    application.  Therefore, Subsection 2d requires that any
+    application-supplied function or table used by this function must
+    be optional: if the application does not supply it, the square
+    root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library.  To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License.  (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.)  Do not make any other change in
+these notices.
+\f
+  Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+  This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+  4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+  If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library".  Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+  However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library".  The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+  When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library.  The
+threshold for this to be true is not precisely defined by law.
+
+  If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work.  (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+  Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+\f
+  6. As an exception to the Sections above, you may also compile or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+  You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License.  You must supply a copy of this License.  If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License.  Also, you must do one
+of these things:
+
+    a) Accompany the work with the complete corresponding
+    machine-readable source code for the Library including whatever
+    changes were used in the work (which must be distributed under
+    Sections 1 and 2 above); and, if the work is an executable linked
+    with the Library, with the complete machine-readable "work that
+    uses the Library", as object code and/or source code, so that the
+    user can modify the Library and then relink to produce a modified
+    executable containing the modified Library.  (It is understood
+    that the user who changes the contents of definitions files in the
+    Library will not necessarily be able to recompile the application
+    to use the modified definitions.)
+
+    b) Accompany the work with a written offer, valid for at
+    least three years, to give the same user the materials
+    specified in Subsection 6a, above, for a charge no more
+    than the cost of performing this distribution.
+
+    c) If distribution of the work is made by offering access to copy
+    from a designated place, offer equivalent access to copy the above
+    specified materials from the same place.
+
+    d) Verify that the user has already received a copy of these
+    materials or that you have already sent this user a copy.
+
+  For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it.  However, as a special exception,
+the source code distributed need not include anything that is normally
+distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+  It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system.  Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+\f
+  7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+    a) Accompany the combined library with a copy of the same work
+    based on the Library, uncombined with any other library
+    facilities.  This must be distributed under the terms of the
+    Sections above.
+
+    b) Give prominent notice with the combined library of the fact
+    that part of it is a work based on the Library, and explaining
+    where to find the accompanying uncombined form of the same work.
+
+  8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License.  Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License.  However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+  9. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Library or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+  10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+\f
+  11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded.  In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+  13. The Free Software Foundation may publish revised and/or new
+versions of the Library General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+\f
+  14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission.  For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this.  Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+                           NO WARRANTY
+
+  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+                    END OF TERMS AND CONDITIONS
+\f
+     Appendix: How to Apply These Terms to Your New Libraries
+
+  If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change.  You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+  To apply these terms, attach the following notices to the library.  It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the library's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This library is free software; you can redistribute it and/or
+    modify it under the terms of the GNU Library General Public
+    License as published by the Free Software Foundation; either
+    version 2 of the License, or (at your option) any later version.
+
+    This library 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
+    Library General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this library; see the file COPYING.  If not, write to
+    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+    Boston, MA 02111-1307, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the
+  library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+  <signature of Ty Coon>, 1 April 1990
+  Ty Coon, President of Vice
+
+That's all there is to it!
diff --git a/etc/DEBUG b/etc/DEBUG
new file mode 100644 (file)
index 0000000..045444d
--- /dev/null
+++ b/etc/DEBUG
@@ -0,0 +1,143 @@
+Debugging GNU Emacs
+Copyright (c) 1985 Richard M. Stallman.
+
+   Permission is granted to anyone to make or distribute verbatim copies
+   of this document as received, in any medium, provided that the
+   copyright notice and permission notice are preserved,
+   and that the distributor grants the recipient permission
+   for further redistribution as permitted by this notice.
+
+   Permission is granted to distribute modified versions
+   of this document, or of portions of it,
+   under the above conditions, provided also that they
+   carry prominent notices stating who last changed them.
+
+On 4.2 you will probably find that dbx does not work for
+debugging GNU Emacs.  For one thing, dbx does not keep the
+inferior process's terminal modes separate from its own.
+For another, dbx does not put the inferior in a separate
+process group, which makes trouble when an inferior uses
+interrupt input, which GNU Emacs must do on 4.2.
+
+dbx has also been observed to have other problems,
+such as getting incorrect values for register variables
+in stack frames other than the innermost one.
+
+The Emacs distribution now contains GDB, the new source-level
+debugger for the GNU system.  GDB works for debugging Emacs.
+GDB currently runs on vaxes under 4.2 and on Sun 2 and Sun 3
+systems.
+
+
+** Some useful techniques
+
+`Fsignal' is a very useful place to stop in.
+All Lisp errors go through there.
+
+It is useful, when debugging, to have a guaranteed way
+to return to the debugger at any time.  If you are using
+interrupt-driven input, which is the default, then Emacs is using
+RAW mode and the only way you can do it is to store
+the code for some character into the variable stop_character:
+
+    set stop_character = 29
+
+makes Control-] (decimal code 29) the stop character.
+Typing Control-] will cause immediate stop.  You cannot
+use the set command until the inferior process has been started.
+Put a breakpoint early in `main', or suspend the Emacs,
+to get an opportunity to do the set command.
+
+If you are using cbreak input (see the Lisp function set-input-mode),
+then typing Control-g will cause a SIGINT, which will return control
+to the debugger immediately unless you have done
+
+    ignore 3  (in dbx)
+or  handle 3 nostop noprint  (in gdb)
+
+You will note that most of GNU Emacs is written to avoid
+declaring a local variable in an inner block, even in
+cases where using one would be the cleanest thing to do.
+This is because dbx cannot access any of the variables
+in a function which has even one variable defined in an
+inner block.  A few functions in GNU Emacs do have variables
+in inner blocks, only because I wrote them before realizing
+that dbx had this problem and never rewrote them to avoid it.
+
+I believe that GDB does not have such a problem.
+
+
+** Examining Lisp object values.
+
+When you have a live process to debug, and it has not encountered a
+fatal error, you can use the GDB command `pr'.  First print the value
+in the ordinary way, with the `p' command.  Then type `pr' with no
+arguments.  This calls a subroutine which uses the Lisp printer.
+
+If you can't use this command, either because the process can't run
+a subroutine or because the data is invalid, you can fall back on
+lower-level commands.
+
+Use the `xtype' command to print out the data type of the last data
+value.  Once you know the data type, use the command that corresponds
+to that type.  Here are these commands:
+
+    xint xptr xwindow xmarker xoverlay xmiscfree xintfwd xboolfwd xobjfwd
+    xbufobjfwd xkbobjfwd xbuflocal xbuffer xsymbol xstring xvector xframe
+    xwinconfig xcompiled xcons xcar xcdr xsubr xprocess xfloat xscrollbar
+
+Each one of them applies to a certain type or class of types.
+(Some of these types are not visible in Lisp, because they exist only
+internally.)
+
+Each x... command prints some information about the value, and
+produces a GDB value (subsequently available in $) through which you
+can get at the rest of the contents.
+
+In general, most of the rest of the contents will be addition Lisp
+objects which you can examine in turn with the x... commands.
+
+** If GDB does not run and your debuggers can't load Emacs.
+
+On some systems, no debugger can load Emacs with a symbol table,
+perhaps because they all have fixed limits on the number of symbols
+and Emacs exceeds the limits.  Here is a method that can be used
+in such an extremity.  Do
+
+    nm -n temacs > nmout
+    strip temacs
+    adb temacs
+    0xd:i
+    0xe:i
+    14:i
+    17:i
+    :r -l loadup   (or whatever)
+
+It is necessary to refer to the file `nmout' to convert
+numeric addresses into symbols and vice versa.
+
+It is useful to be running under a window system.
+Then, if Emacs becomes hopelessly wedged, you can create
+another window to do kill -9 in.  kill -ILL is often
+useful too, since that may make Emacs dump core or return
+to adb.
+
+
+** Debugging incorrect screen updating.
+
+To debug Emacs problems that update the screen wrong, it is useful
+to have a record of what input you typed and what Emacs sent to the
+screen.  To make these records, do
+
+(open-dribble-file "~/.dribble")
+(open-termscript "~/.termscript")
+
+The dribble file contains all characters read by Emacs from the
+terminal, and the termscript file contains all characters it sent to
+the terminal.  The use of the directory `~/' prevents interference
+with any other user.
+
+If you have irreproducible display problems, put those two expressions
+in your ~/.emacs file.  When the problem happens, exit the Emacs that
+you were running, kill it, and rename the two files.  Then you can start
+another Emacs without clobbering those files, and use it to examine them.
diff --git a/etc/DISTRIB b/etc/DISTRIB
new file mode 100644 (file)
index 0000000..3dd537c
--- /dev/null
@@ -0,0 +1,136 @@
+                                                               -*- text -*-
+
+          XEmacs availability information.  Last Modified: 17-Apr-97.
+
+XEmacs is available via anonymous FTP from ftp.xemacs.org (128.174.252.16)
+in the directory /pub/xemacs/.
+
+ftp.xemacs.org is the primary distribution point, but you may find
+copies of it at other sites as well.  Please see the file FTP for mirrors.
+
+The most up-to-date list of distribution sites can always be found on
+the XEmacs WWW page, http://www.xemacs.org/.  Try to pick a site
+that is networkologically close to you.  If you know of other mirrors
+of the XEmacs archives, please send us mail and we will list them here
+as well.
+
+There are mailing lists and newsgroups specifically for discussing and
+reporting bugs in XEmacs; see the file MAILINGLISTS in this directory.
+
+The FTP and ordering information in the remainder of this file applies
+to the versions of GNU Emacs distributed by the Free Software
+Foundation, not to XEmacs.
+
+-----------------------------------------------------------------------
+
+For an order form for all Emacs and FSF distributions deliverable from
+the USA, see the file `ORDERS' in this directory (etc/ in the GNU
+Emacs distribution or /pub/gnu/GNUinfo on prep.ai.mit.edu).  For a
+European order form, see `ORDERS.EUROPE'.  For a Japan order form,
+see `ORDERS.JAPAN'.
+\f
+          GNU Emacs availability information, June 1995
+Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1995 Free Software Foundation, Inc.
+
+       Permission is granted to anyone to make or distribute
+       verbatim copies of this document provided that the
+       copyright notice and this permission notice are preserved.
+
+GNU Emacs is legally owned by the Free Software Foundation, but we
+regard the foundation more as its custodian on behalf of the public.
+
+In the GNU project, when we speak of "free software", this refers to
+liberty, not price.  Specifically, it refers to the users' freedom to
+study, copy, change and improve the software.  Sometimes users pay
+money for copies of GNU software, and sometimes they get copies at no
+charge.  But regardless of how they got the software, or whether it
+was modified by anyone else along the way, they have the freedom to
+copy and change it--those freedoms are what "free software" means.
+
+The precise conditions for copying and modification are stated in the
+document "GNU General Public License," a copy of which is required to
+be distributed with every copy of GNU Emacs.  It is usually in a file
+named `COPYING' in the same directory as this file.  These conditions
+are designed to make sure that everyone who has a copy of GNU Emacs
+(including modified versions) has the freedom to redistribute and
+change it.
+
+If you do not know anyone to get a copy of GNU Emacs from, you can
+order a tape, cd-rom, or floppy diskette from the Free Software
+Foundation.  We distribute Emacs version 18 and 19 in different
+formats for many machines.  We also distribute nicely typeset copies
+of the Emacs user manual, Emacs Lisp Reference Manual, the Emacs
+reference card, etc.  See file `ORDERS'.
+
+If you have Internet access, you can copy the latest Emacs
+distribution from hosts, such as prep.ai.mit.edu.  There are several
+ways to do this; see the file `FTP' for more information.  Even
+better, get the latest version of the file from `/pub/gnu/GNUinfo/FTP'
+on prep.ai.mit.edu for the most current arrangements.  It may also be
+possible to copy Emacs via uucp; the file `FTP' contains information
+on that too.
+
+Emacs has been run on both Berkeley Unix and System V Unix, on a
+variety of types of cpu.  It also works on VMS and on Apollo
+computers, though with some deficiencies that reflect problems in
+these operating systems.  See the file `MACHINES' in this directory
+(see above) for a full list of machines that GNU Emacs has been tested
+on, with machine-specific installation notes and warnings.  There is
+also Demacs that works on newer MS-DOS machines (see file `ORDERS').
+
+Note that there is significant variation between Unix systems
+supposedly running the same version of Unix; it is possible that what
+works in GNU Emacs for me does not work on your system due to such an
+incompatibility.  Since I must avoid reading Unix source code, I
+cannot even guess what such problems may exist.
+
+GNU Emacs is distributed with no warranty (see the General Public
+License for full details, in the file `COPYING' in this directory (see
+above)), and neither I nor the Free Software Foundation promises any
+kind of support or assistance to users.  The foundation keeps a list
+of people who are willing to offer support and assistance for hire.
+See the file `SERVICE'.  You can get the latest version from
+prep.ai.mit.edu in file `/pub/gnu/GNUinfo/SERVICE'.
+
+However, we plan to continue to improve GNU Emacs and keep it
+reliable, so please send me any complaints and suggestions you have.
+I will probably fix anything that I consider a malfunction.  I may
+make improvements that are suggested, but I may choose not to.
+Improving Emacs is not my highest priority now.
+
+If you are on the Internet, report bugs to
+bug-gnu-emacs@prep.ai.mit.edu; on UUCP, use the address
+...!uunet!prep.ai.mit.edu!bug-gnu-emacs.  Otherwise, phone or write the
+foundation at:
+       Free Software Foundation
+       59 Temple Place - Suite 330
+       Boston, MA  02111-1307
+       Voice:  +1-617-542-5942
+       Fax:    +1-617-542-2652
+
+General questions about the GNU Project can be asked of
+gnu@prep.ai.mit.edu.
+
+If you are a computer manufacturer, I encourage you to ship a copy of
+GNU Emacs with every computer you deliver.  The same copying
+permission terms apply to computer manufacturers as to everyone else.
+You should consider making a donation to help support the GNU project;
+if you estimate what it would cost to distribute some commercial
+product and divide it by five, that is a good amount.
+
+If you like GNU Emacs, please express your satisfaction with a
+donation: send me or the Foundation what you feel Emacs has been worth
+to you.  If you are glad that I developed GNU Emacs and distribute it
+as freeware, rather than following the obstructive and antisocial
+practices typical of software developers, reward me.  If you would
+like the Foundation to develop more free software, contribute.
+
+Your donations will help to support the development of more useful
+software to be distributed on the same basis as GNU Emacs.  Eventually
+we will have a complete imitation of the Unix operating system, called
+GNU (Gnu's Not Unix), which will run Unix user programs.  For more
+information on GNU, see the file `GNU' in this directory (see above).
+
+                       Richard M Stallman
+                       Chief GNUisance,
+                       President of the Free Software Foundation
diff --git a/etc/Emacs.ad b/etc/Emacs.ad
new file mode 100644 (file)
index 0000000..4754a7f
--- /dev/null
@@ -0,0 +1,284 @@
+! This is the app-defaults file for XEmacs.
+!
+! This used to be identical to sample.Xdefaults, but the resources
+! below have been rewritten to be as general as possible to avoid
+! overriding user resources.  Other than the form rewriting, both
+! files should be kept in sync. 
+! 
+! The resources below are loaded into the XEmacs executable at compile-time:
+! changes to .../etc/Emacs.ad made after XEmacs has been built will have no
+! effect.
+! 
+! However, you may copy .../etc/Emacs.ad to /usr/lib/X11/app-defaults/Emacs
+! (or whatever the standard app-defaults directory is at your site) to cause
+! it to be consulted at run-time.  (Do this only for site-wide customizations:
+! personal customizations should be put into ~/.Xdefaults instead.)
+! Note that the file must be named Emacs, not XEmacs.
+! 
+! See the NEWS file (C-h n) or XEmacs manual (C-h i) for a description of
+! the various resources and the syntax for setting them.
+! 
+! Energize users: note that this is not the same app-defaults file that is
+! used with the Energize-specific version of XEmacs.
+
+
+! Colors and backgrounds.
+! ======================
+! The contrasts of these colors will cause them to map to the appropriate
+! one of "black" or "white" on monochrome systems.
+! 
+! The valid color names on your system can be found by looking in the file
+! `rgb.txt', usually found in /usr/lib/X11/ or /usr/openwin/lib/X11/.
+
+! Set the modeline colors.
+!Emacs.modeline*attributeForeground:   Black
+!Emacs.modeline*attributeBackground:   Gray75
+
+! Set the color of the text cursor.
+!Emacs.text-cursor*attributeBackground:        Red3
+
+! If you want to set the color of the mouse pointer, do this:
+! Emacs.pointer*attributeForeground:   Black
+! If you want to set the background of the mouse pointer, do this:
+! Emacs.pointer*attributeBackground:   White
+! Note that by default, the pointer foreground and background are the same
+! as the default face.
+
+! Set the menubar colors.  This overrides the default foreground and
+! background colors specified above.
+*menubar*Foreground:                   Gray30
+*menubar*Background:                   Gray80
+! This is for buttons in the menubar.  
+! Yellow would be better, but that would map to white on monochrome.
+*menubar*buttonForeground:             Blue
+*XlwMenu*highlightForeground:          Red
+*XlwMenu*titleForeground:              Maroon
+*XlwMenu*selectColor:                  ForestGreen
+*XmToggleButton*selectColor:           ForestGreen
+
+! Specify the colors of popup menus.
+*popup*Foreground:                     Black
+*popup*Background:                     Gray80
+
+! Specify the colors of the various sub-widgets of the dialog boxes.
+*dialog*Foreground:                    Black
+! #A5C0C1 is a shade of blue
+*dialog*Background:                    #A5C0C1
+! The following three are for Motif dialog boxes ...
+*dialog*XmTextField*Background:                WhiteSmoke
+*dialog*XmText*Background:             WhiteSmoke
+*dialog*XmList*Background:             WhiteSmoke
+! While this one is for Athena dialog boxes.
+*dialog*Command*Background:            WhiteSmoke
+
+! Xlw Scrollbar colors
+*XlwScrollBar*Foreground:              Gray30
+*XlwScrollBar*Background:              Gray80
+*XmScrollBar*Foreground:               Gray30
+*XmScrollBar*Background:               Gray80
+
+!
+! The Lucid Scrollbar supports two added resources, SliderStyle is either
+! "plain" (default) or "dimple".  Dimple puts a small dimple in the middle
+! of the slider that depresses when the slider is clicked on.  ArrowPosition is
+! either "opposite" (default) or "same".  Opposite puts the arrows at opposite
+! of the scrollbar, same puts both arrows at the same end, like the Amiga.
+!
+! Emacs*XlwScrollBar.SliderStyle:    dimple
+! Emacs*XlwScrollBar.ArrowPosition:  opposite
+
+
+!
+! If you want to turn off a toolbar, set its height or width to 0.
+! The correct size value is not really arbitrary.  We only control it
+! this way in order to avoid excess frame resizing when turning the
+! toolbars on and off.
+!
+! To change the heights and widths of the toolbars:
+!
+! Emacs.topToolBarHeight:              37
+! Emacs.bottomToolBarHeight:           0
+! Emacs.leftToolBarWidth:              0
+! Emacs.rightToolBarWidth:             0
+
+!*topToolBarShadowColor:                       Gray90
+!*bottomToolBarShadowColor:            Gray40
+!*backgroundToolBarColor:              Gray80
+*toolBarShadowThickness:               2
+
+
+! If you want to turn off vertical scrollbars, or change the default
+! pixel width of the vertical scrollbars, do it like this (0 width
+! means no vertical scrollbars):
+! 
+! Emacs.scrollBarWidth: 0
+! 
+! To change it for a particular frame, do this:
+! 
+! Emacs*FRAME-NAME.scrollBarWidth: 0
+
+
+! If you want to turn off horizontal scrollbars, or change the default
+! pixel height of the horizontal scrollbars, do it like this (0 height
+! means no horizontal scrollbars):
+! 
+! Emacs.scrollBarHeight: 0
+! 
+! To change it for a particular frame, do this:
+! 
+! Emacs*FRAME-NAME.scrollBarHeight: 0
+
+
+! To dynamically change the labels used for menubar buttons...
+! 
+! Emacs*XlwMenu.resourceLabels: True
+! Emacs*XlwMenu.newFrame.labelString: Open Another Window
+
+! To have the Motif scrollbars on the left instead of the right, do this:
+! 
+! Emacs*scrollBarPlacement: BOTTOM_LEFT
+!
+! To have the Athena scrollbars on the right, use `BOTTOM_RIGHT' instead
+
+! To have Motif scrollbars act more like Xt scrollbars...
+!
+! Emacs*XmScrollBar.translations: #override \n\
+!     <Btn1Down>:     PageDownOrRight(0)    \n\
+!     <Btn3Down>:     PageUpOrLeft(0)
+
+! Fonts.
+! ======
+! XEmacs requires the use of XLFD (X Logical Font Description) format font
+! names, which look like
+! 
+!      *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
+! 
+! if you use any of the other, less strict font name formats, some of which
+! look like
+!              lucidasanstypewriter-12
+! and          fixed
+! and          9x13
+! 
+! then XEmacs won't be able to guess the names of the bold and italic versions.
+! All X fonts can be referred to via XLFD-style names, so you should use those
+! forms.  See the man pages for X(1), xlsfonts(1), and xfontsel(1).
+
+
+! The default font for the text area of XEmacs is chosen at run-time
+! by lisp code which tries a number of different possibilities in order
+! of preference.  If you wish to override it, use this:
+! 
+! Emacs.default.attributeFont:  -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*
+
+! If you choose a font which does not have an italic version, you can specify
+! some other font to use for it here:
+! 
+! Emacs.italic.attributeFont:  -*-courier-medium-o-*-*-*-120-*-*-*-*-iso8859-*
+!
+! And here is how you would set the background color of the `highlight' face,
+! but only on the screen named `debugger':
+! 
+! Emacs*debugger.highlight.attributeBackground:                PaleTurquoise
+! 
+! See the NEWS file (C-h n) for a more complete description of the resource
+! syntax of faces.
+
+
+! Font of the modeline, menubar and pop-up menus.
+! Note that the menubar resources do not use the `face' syntax, since they
+! are X toolkit widgets and thus outside the domain of XEmacs proper.
+! 
+*menubar*Font:                         -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*
+*popup*Font:                   -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*
+
+! Font in the Motif dialog boxes.
+! (Motif uses `fontList' while most other things use `font' - if you don't
+! know why you probably don't want to.)
+! 
+*XmDialogShell*FontList:       -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*
+*XmTextField*FontList:         -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*
+*XmText*FontList:              -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*
+*XmList*FontList:              -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*
+
+! Font in the Athena dialog boxes.
+! I think 14-point looks nicer than 12-point.
+! Some people use 12-point anyway because you get more text, but
+! there's no purpose at all in doing this for dialog boxes.
+
+*Dialog*Font:                  -*-helvetica-bold-r-*-*-*-140-*-*-*-*-iso8859-*
+
+! Dialog box translations.
+! =======================
+
+! This accelerator binds <return> in a dialog box to <activate> on button1
+*dialog*button1.accelerators:#override\
+<KeyPress>Return: ArmAndActivate()\n\
+<KeyPress>KP_Enter: ArmAndActivate()\n\
+Ctrl<KeyPress>m: ArmAndActivate()\n
+
+! Translations to make the TextField widget behave more like XEmacs
+*XmTextField*translations: #override\n\
+       !<Key>osfBackSpace:     delete-previous-character()\n\
+       !<Key>osfDelete:        delete-previous-character()\n\
+       !Ctrl<Key>h:            delete-previous-character()\n\
+       !Ctrl<Key>d:            delete-next-character()\n\
+       !Meta<Key>osfDelete:    delete-previous-word()\n\
+       !Meta<Key>osfBackSpace: delete-previous-word()\n\
+       !Meta<Key>d:            delete-next-word()\n\
+       !Ctrl<Key>k:            delete-to-end-of-line()\n\
+       !Ctrl<Key>g:            process-cancel()\n\
+       !Ctrl<Key>b:            backward-character()\n\
+       !<Key>osfLeft:          backward-character()\n\
+       !Ctrl<Key>f:            forward-character()\n\
+       !<Key>osfRight:         forward-character()\n\
+       !Meta<Key>b:            backward-word()\n\
+       !Meta<Key>osfLeft:      backward-word()\n\
+       !Meta<Key>f:            forward-word()\n\
+       !Meta<Key>osfRight:     forward-word()\n\
+       !Ctrl<Key>e:            end-of-line()\n\
+       !Ctrl<Key>a:            beginning-of-line()\n\
+       !Ctrl<Key>w:            cut-clipboard()\n\
+       !Meta<Key>w:            copy-clipboard()\n\
+       <Btn2Up>:               copy-primary()\n
+
+! With the XEmacs typeahead it's better to not have space be bound to
+! ArmAndActivate() for buttons that appear in dialog boxes.  This is
+! not 100% Motif compliant but the benefits far outweight the
+! compliancy problem.  
+*dialog*XmPushButton*translations:#override\n\
+    <Btn1Down>:         Arm()\n\
+    <Btn1Down>,<Btn1Up>: Activate()\
+                       Disarm()\n\
+    <Btn1Down>(2+):     MultiArm()\n\
+    <Btn1Up>(2+):       MultiActivate()\n\
+    <Btn1Up>:           Activate()\
+                       Disarm()\n\
+    <Key>osfSelect:    ArmAndActivate()\n\
+    <Key>osfActivate:   ArmAndActivate()\n\
+    <Key>osfHelp:      Help()\n\
+    ~Shift ~Meta ~Alt <Key>Return:     ArmAndActivate()\n\
+    <EnterWindow>:      Enter()\n\
+    <LeaveWindow>:      Leave()\n
+
+! XIM input method style 
+! ======================= 
+
+! ximStyles is a (whitespace or comma-separated) list of XIMStyles in
+! order of user's preference.  
+! Choose a subset of the following styles or reorder to taste
+*ximStyles: XIMPreeditPosition|XIMStatusArea\
+            XIMPreeditPosition|XIMStatusNothing\
+            XIMPreeditPosition|XIMStatusNone\
+            XIMPreeditNothing|XIMStatusArea\
+            XIMPreeditNothing|XIMStatusNothing\
+            XIMPreeditNothing|XIMStatusNone\
+            XIMPreeditNone|XIMStatusArea\
+            XIMPreeditNone|XIMStatusNothing\
+            XIMPreeditNone|XIMStatusNone
+
+! XIM Preedit and Status foreground and background
+*EmacsFrame.ximForeground: black
+*EmacsFrame.ximBackground: white
+
+! XIM fontset (defaults to system fontset default)
+! *EmacsFrame.FontSet: -dt-interface user-medium-r-normal-s*-*-*-*-*-*-*-*-*
diff --git a/etc/FTP b/etc/FTP
new file mode 100644 (file)
index 0000000..965f0b9
--- /dev/null
+++ b/etc/FTP
@@ -0,0 +1,282 @@
+                                                               -*- text -*-
+
+          XEmacs availability information.  Last Modified: 9-Jul-1998.
+
+XEmacs is available via anonymous FTP from ftp.xemacs.org (207.96.122.8)
+in the directory /pub/xemacs/.
+
+ftp.xemacs.org is the primary distribution point, but you may find
+copies of it at other sites as well.  Some sites to try include:
+
+       ftp://ftp.jaist.ac.jp/pub/GNU/xemacs/
+       ftp://ring.aist.go.jp/pub/text/xemacs/
+       ftp://ring.asahi-net.or.jp/pub/text/xemacs/
+       ftp://ftp.uu.net/systems/gnu/xemacs/
+       ftp://ftp.sunet.se/pub/gnu/xemacs/
+       ftp://ftp.cenatls.cena.dgac.fr/pub/Emacs/xemacs/
+       ftp://ftp.th-darmstadt.de/pub/editors/xemacs/
+       ftp://sunsite.doc.ic.ac.uk/gnu/xemacs/
+       ftp://ftp.lip6.fr/pub/emacs/xemacs/
+       ftp://uiarchive.cso.uiuc.edu/pub/packages/xemacs/
+       ftp://ftp.technion.ac.il/pub/unsupported/gnu/xemacs/
+       ftp://ftp.linux.hr/pub/xemacs/
+       ftp://sunsite.cnlab-switch.ch/mirror/xemacs/
+       ftp://ftp.unicamp.br/pub/xemacs/
+       ftp://ftp.usyd.edu.au/pub/Xemacs/
+       ftp://ftp.lab.kdd.co.jp/xemacs/
+       ftp://SunSITE.sut.ac.jp/pub/archives/xemacs/
+       ftp://sunsite.icm.edu.pl/pub/unix/xemacs
+
+
+The most up-to-date list of distribution sites can always be found on
+the XEmacs WWW page, http://www.xemacs.org/.  Try to pick a site
+that is networkologically close to you.  If you know of other mirrors
+of the XEmacs archives, please send us mail and we will list them here
+as well.
+
+There are mailing lists and newsgroups specifically for discussing and
+reporting bugs in XEmacs; see the file MAILINGLISTS in this directory.
+
+The FTP and ordering information in the remainder of this file applies
+to the versions of GNU Emacs distributed by the Free Software Foundation,
+not to XEmacs.
+
+-----------------------------------------------------------------------
+How to get GNU Software by Internet FTP or by UUCP.  Last updated 11 June 95.
+
+* Please send improvements to this file to gnu@prep.ai.mit.edu.
+
+* No Warranties
+
+We distribute software in the hope that it will be useful, but without
+any warranty.  No author or distributor of this software accepts
+responsibility to anyone for the consequences of using it or for
+whether it serves any particular purpose or works at all, unless he
+says so in writing.
+
+* Updates
+
+If you find this file in the Emacs distribution, there is a chance it
+is out of date.  If you plan to FTP files from a GNU FTP host, you
+might as well start by FTPing the current version of this file, which
+is `/pub/gnu/GNUinfo/FTP'.
+
+* How to FTP
+
+Use the ftp program on your system (ask locally if you can't find it)
+to connect to the host you are ftping from.  Unless indicated
+otherwise, login in as user "anonymous", with password: "your e-mail
+address" and set "binary" mode (to transfer all eight bits in each
+byte).
+
+* FTPing GNU Software
+
+** How to FTP GNU Emacs
+
+If you are on the Internet (see also "** Alternative Internet FTP
+Sources" below), you can at present copy the latest distribution
+version of GNU Emacs from the file /pub/gnu/emacs-M.N.tar on host
+prep.ai.mit.edu (or the file /pub/gnu/emacs-M.N.tar.gz which has been
+run through gzip after tar).  M and N stand for version numbers; look
+at a listing of the directory through ftp to see what version is
+available.  These files are about 11 and 4 megabytes long,
+respectively.  After you unpack the distribution, be sure to look at
+the files README and INSTALL.
+
+Because of difficulties in transferring large files, sometimes a split
+version of the tar file is created.  This would be in a directory
+named /pub/gnu/emacs-M.N.tar-split or perhaps
+/pub/gnu/emacs-M.N.tar.gz-split, containing files of 100000 characters
+each.  There is generally no trouble in ftping files of this size.
+They can be combined with cat to make a tar file or compressed tar
+file.  If you can't find such files on prep.ai.mit.edu, have a look at
+archive.cis.ohio-state.edu.
+
+ALWAYS USE BINARY/IMAGE MODE TO TRANSFER THESE FILES!
+Text mode does not work for tar files or compressed files.
+
+Some ftp'ers have found it necessary for successful file transfer:
+   - to explicitly use prep.ai.mit.edu internet address:
+18.159.0.42    (as of 18 June 95)
+
+Files of differences from previous widely distributed GNU Emacs
+versions to the present version are also available on prep.ai.mit.edu
+under names of the form emacs.diff-OO.OO-NN.NN in directory /pub/gnu.
+These are made with diff -rc2.  Sometimes there are versions
+compressed with gzip of these difference files as well; their names
+have .gz appended.
+
+The Emacs manual in source form is included in the distribution.  The
+dvi file produced by TeX is not included, but a copy may be available
+for ftp under the name /pub/gnu/emacs.dvi.
+
+The Emacs Lisp Reference Manual is in a separate file:
+       /pub/gnu/elisp-manual-NN.tar.gz
+
+** VMS FTP sites with GNU Software
+You can anonymously ftp a VMS version of GNU emacs from:
+       - ftp.stacken.kth.se:[.GNU-VMS] - GNU Emacs and some other VMS
+ports (and some VMS binaries) of GNU software
+       - mango.rsmas.miami.edu has a VMS version of the GCC/G++ compiler.
+Contact angel@flipper.miami.edu (angel li) for details.
+       - addvax.llnl.gov - GNU Emacs
+       - VMSD.OAC.UCI.EDU - GNU Emacs 
+       - RIGEL.EFD.LTH.SE [130.235.48.3] - GNU Emacs 
+       - ctrsci.cc.utah.edu - GNU Emacs - The 00readme.txt file gives details
+       - cc.utah.edu [128.110.8.24] - misc. GNU software - user
+anonymous, pass guest.  The 00README.txt file gives details.
+
+** Other GNU Software and How To FTP It
+
+Other GNU software is available on prep.ai.mit.edu under directory
+/pub/gnu.  diff files to convert between versions (like those used for
+GNU Emacs), exist for some of these programs.  Some programs have misc
+support files as well.  Have a look on prep to see which ones.
+Compressed versions of the tar or diff files are often available
+(indicated by a .gz suffix and made with the `gzip' program).  Some of
+this software is in beta test (probably still buggy), and is being
+made available for use by hackers who like to test software.
+
+The file /pub/gnu/DESCRIPTIONS has a list of the packages distributed
+on prep.ai.mit.edu with a brief description explaining what
+each one can be used for.
+
+More information about these programs can typically be found in the
+GNU Bulletin.  To receive a copy, write to gnu@prep.ai.mit.edu.
+
+** Scheme and How to FTP It
+
+The latest distribution version of C Scheme is available via anonymous FTP
+from altdorf.ai.mit.edu in /archive/scheme-X.XX/ (where X.XX is some version
+number).
+
+Read the files INSTALL and README in the top level C Scheme directory.
+
+** TeX and How to Obtain It
+
+We don't distribute TeX now, but it is free software.
+
+TeX is a document formatter that is used, among other things, by the FSF
+for all its documentation.  You will need it if you want to make printed
+manuals.
+
+TeX is freely redistributable.  You can get it by ftp, tape, or CD/ROM.
+
+*** For FTP instructions, retrieve the file
+ftp.cs.umb.edu:pub/tex/unixtex.ftp. (We don't include it here because it
+changes relatively frequently.  Sorry.)
+
+*** For TeX on a single tape (4mm DAT or QIC-24), ordering information is
+available from unixtex@u.washington.edu.  A distribution fee in the area
+of US$210.00 covers administrative costs.  Tapes will be available at
+least through summer of 1994.
+
+*** The FSF hopes soon to distribute tapes of TeX itself, after the
+University of Washington distribution service goes away.
+
+*** A minimal TeX collection (enough to process Texinfo files, anyway)
+is included on the GNU source CD/ROM.  See the file ORDERS in this
+directory for more information.
+
+** Alternative Internet FTP Sources
+
+Please do NOT use a site outside your country, until you have checked
+all sites inside your country, and then your continent.  Trans-ocean
+TCP/IP links are very expensive and usually very low speed.
+
+The administrators of louie.udel.edu maintains copies of GNU Emacs.
+The files are available via anonymous ftp under directory ~ftp/gnu.
+
+Emacs and other GNU programs may be available via anonymous ftp from
+these US sites: ftp.kpc.com:/pub/mirror/gnu (Silicon Valley, CA)
+ftp.hawaii.edu:/mirrors/gnu, f.ms.uky.edu:/pub3/gnu,
+ftp.digex.net:/pub/gnu (Internet address 164.109.10.23, nightly full
+mirror, ran by mcguire@digex.net), wuarchive.wustl.edu:/systems/gnu,
+col.hp.com:/mirrors/gnu, ftp.cs.columbia.edu:/archives/gnu/prep,
+uiarchive.cso.uiuc.edu:/pub/gnu (Internet address 128.174.5.14,
+nightly full mirror, ran by ftpadmin@uiuc.edu),
+jaguar.utah.edu:/gnustuff, gatekeeper.dec.com:/pub/GNU,
+labrea.stanford.edu, archive.cis.ohio-state.edu, and
+ftp.uu.net:/archive/systems/gnu.
+
+And these foreign sites: ftp.cs.ubc.ca:/mirror2/gnu (Western Canada,
+daily full mirror, ran by ftp-admin@cs.ubc.ca),
+ftp.inf.utfsm.cl:/pub/gnu (Chile 146.83.198.3 nightly full mirror, ran
+by ftp@inf.utfsm.cl), ftp.unicamp.br:/pub/gnu (Brazil manual mirror,
+ran by oliva@dcc.unicamp.br), archie.au:/gnu (Australia (archie.oz or
+archie.oz.au for ACSnet)), ftp.technion.ac.il:/pub/unsupported/gnu
+(Israel, daily full mirror, ran by ftp-admin), ftp.sun.ac.za:/pub/gnu
+(South Africa), ftp.etsimo.uniovi.es:/pub/gnu (Spain),
+ftp.mcc.ac.uk:/pub/gnu (130.88.203.12 daily full mirror, ran by
+root@ftp.mcc.ac.uk), unix.hensa.ac.uk:/mirrors/uunet/systems/gnu,
+ftp.warwick.ac.uk (137.205.192.14 daily full mirror, ran by
+unixhelp@warwick.ac.uk), ftp.informatik.tu-muenchen.de,
+ftp.informatik.rwth-aachen.de, or germany.eu.net (mirror ran by
+archive-admin@germany.eu.net) (Germany), isy.liu.se (Sweden),
+ftp.stacken.kth.se or ftp.luth.se:/pub/unix/gnu (Sweden),
+ftp.sunet.se:/pub/gnu (Sweden 130.238.127.3 daily mirror, ran by
+archive@ftp.sunet.se (also mirrors the Mailing List Archives)
+ftp.nl.net (Netherlands), ftp.win.tue.nl:/pub/gnu (Netherlands
+131.155.70.100 daily mirror, ran by ftp@win.tue.nl),
+ftp.funet.fi:/pub/gnu (Finland 128.214.6.100, ran by gnu-adm),
+ftp.denet.dk (Denmark), ugle.unit.no (Norway 129.241.1.97),
+ftp.eunet.ch or nic.switch.ch:/mirror/gnu (Switzerland),
+irisa.irisa.fr:/pub/gnu or ftp.univ-lyon1.fr:pub/gnu (ran by
+ftpmaint@ftp.univ-lyon1.fr) (France), ftp.ieunet.ie:pub/gnu (Ireland
+192.111.39.1 weekly mirror, ran by archive@ieunet.ie), archive.eu.net
+(Europe 192.16.202.1), cair-archive.kaist.ac.kr:/pub/gnu (Korea
+143.248.11.171, ran by ftpkeeper@cair-archive.kaist.ac.kr),
+ftp.nectec.or.th:/pub/mirrors/gnu (Thailand 192.150.251.32 daily
+mirror, ran by ftp@nwg.nectec.or.th),
+utsun.s.u-tokyo.ac.jp:/ftpsync/prep or ftp.cs.titech.ac.jp (Japan,
+nemacs, the japanese port of GNU Emacs, is under ~ftp/JAPAN).
+
+* Getting GNU software in Great Britain
+
+jpo@cs.nott.ac.uk is willing to distribute those GNU sources he has
+available.  The smaller items are available from the info-server (send
+to info-server@cs.nott.ac.uk) the larger items by negotiation.  Due to
+communication costs this service is only available within the UK.
+
+BattenIG@computer-science.birmingham.ac.uk (aka
+I.G.Batten@fulcrum.bt.co.uk) is also willing to distribute those GNU
+sources he has.  He can also write tapes in qic-21 and qic-24 formats.
+
+lmjm@doc.ic.ac.uk is willing to distribute those GNU sources he has
+along with comp.sources.unix, comp.sources.x, X windows et al.  The
+archive, on src.doc.ic.ac.uk in directory /gnu, is available via ftp
+over the Internet (on 146.169.3.7), ftam over IXI, HTTP, FSP, Gopher,
+ftpmail, NFS, Lanmanger over IP, telnet, and uucp.  Due to
+communication costs this service is only available within the UK.
+Mail to info-server@doc.ic.ac.uk for details.  He can also write sun
+cartridge or exabyte tapes.
+
+UK sites with just anonymous FTP access are in the above list.
+
+* Getting GNU software via UUCP
+
+OSU is distributing via UUCP: most GNU software, MIT C Scheme,
+Compress, News, RN, NNTP, Patch, some Appletalk stuff, some of the
+Internet Requests For Comment (RFC) et al..  See their periodic
+postings on the Usenet newsgroup comp.sources.d for informational
+updates.  Current details from <staff@cis.ohio-state.edu> or
+<...!osu-cis!staff>.
+
+Information on how to uucp some GNU programs is available via
+electronic mail from: uunet!hutch!barber, hqda-ai!merlin, acornrc!bob,
+hao!scicom!qetzal!upba!ugn!nepa!denny, ncar!noao!asuvax!hrc!dan,
+bigtex!james (aka james@bigtex.cactus.org), oli-stl!root,
+src@contrib.de (Germany), toku@dit.co.jp (Japan) and info@ftp.uu.net.
+
+* If You Like The Software
+
+If you like the software developed and distributed by the Free
+Software Foundation, please express your satisfaction with a donation.
+Your donations will help to support the Foundation and make our future
+efforts successful, including a complete development and operating
+system, called GNU (Gnu's Not Un*x), which will run Un*x user
+programs.  For more information on GNU and the Foundation, contact us
+at the above address.
+
+Ordering a distribution tape from the Foundation is often a good
+way to bring your company or university to make a donation.
diff --git a/etc/GNU b/etc/GNU
new file mode 100644 (file)
index 0000000..e535000
--- /dev/null
+++ b/etc/GNU
@@ -0,0 +1,532 @@
+Copyright (C) 1985, 1993 Free Software Foundation, Inc.
+
+   Permission is granted to anyone to make or distribute verbatim copies
+of this document, in any medium, provided that the copyright notice and
+permission notice are preserved, and that the distributor grants the
+recipient permission for further redistribution as permitted by this
+notice.
+
+   Modified versions may not be made.
+
+The GNU Manifesto
+*****************
+
+     The GNU Manifesto which appears below was written by Richard
+     Stallman at the beginning of the GNU project, to ask for
+     participation and support.  For the first few years, it was
+     updated in minor ways to account for developments, but now it
+     seems best to leave it unchanged as most people have seen it.
+
+     Since that time, we have learned about certain common
+     misunderstandings that different wording could help avoid.
+     Footnotes added in 1993 help clarify these points.
+
+     For up-to-date information about the available GNU software,
+     please see the latest issue of the GNU's Bulletin.  The list is
+     much too long to include here.
+
+What's GNU?  Gnu's Not Unix!
+============================
+
+   GNU, which stands for Gnu's Not Unix, is the name for the complete
+Unix-compatible software system which I am writing so that I can give it
+away free to everyone who can use it.(1) Several other volunteers are
+helping me.  Contributions of time, money, programs and equipment are
+greatly needed.
+
+   So far we have an Emacs text editor with Lisp for writing editor
+commands, a source level debugger, a yacc-compatible parser generator,
+a linker, and around 35 utilities.  A shell (command interpreter) is
+nearly completed.  A new portable optimizing C compiler has compiled
+itself and may be released this year.  An initial kernel exists but
+many more features are needed to emulate Unix.  When the kernel and
+compiler are finished, it will be possible to distribute a GNU system
+suitable for program development.  We will use TeX as our text
+formatter, but an nroff is being worked on.  We will use the free,
+portable X window system as well.  After this we will add a portable
+Common Lisp, an Empire game, a spreadsheet, and hundreds of other
+things, plus on-line documentation.  We hope to supply, eventually,
+everything useful that normally comes with a Unix system, and more.
+
+   GNU will be able to run Unix programs, but will not be identical to
+Unix.  We will make all improvements that are convenient, based on our
+experience with other operating systems.  In particular, we plan to
+have longer file names, file version numbers, a crashproof file system,
+file name completion perhaps, terminal-independent display support, and
+perhaps eventually a Lisp-based window system through which several
+Lisp programs and ordinary Unix programs can share a screen.  Both C
+and Lisp will be available as system programming languages.  We will
+try to support UUCP, MIT Chaosnet, and Internet protocols for
+communication.
+
+   GNU is aimed initially at machines in the 68000/16000 class with
+virtual memory, because they are the easiest machines to make it run
+on.  The extra effort to make it run on smaller machines will be left
+to someone who wants to use it on them.
+
+   To avoid horrible confusion, please pronounce the `G' in the word
+`GNU' when it is the name of this project.
+
+Why I Must Write GNU
+====================
+
+   I consider that the golden rule requires that if I like a program I
+must share it with other people who like it.  Software sellers want to
+divide the users and conquer them, making each user agree not to share
+with others.  I refuse to break solidarity with other users in this
+way.  I cannot in good conscience sign a nondisclosure agreement or a
+software license agreement.  For years I worked within the Artificial
+Intelligence Lab to resist such tendencies and other inhospitalities,
+but eventually they had gone too far: I could not remain in an
+institution where such things are done for me against my will.
+
+   So that I can continue to use computers without dishonor, I have
+decided to put together a sufficient body of free software so that I
+will be able to get along without any software that is not free.  I
+have resigned from the AI lab to deny MIT any legal excuse to prevent
+me from giving GNU away.
+
+Why GNU Will Be Compatible with Unix
+====================================
+
+   Unix is not my ideal system, but it is not too bad.  The essential
+features of Unix seem to be good ones, and I think I can fill in what
+Unix lacks without spoiling them.  And a system compatible with Unix
+would be convenient for many other people to adopt.
+
+How GNU Will Be Available
+=========================
+
+   GNU is not in the public domain.  Everyone will be permitted to
+modify and redistribute GNU, but no distributor will be allowed to
+restrict its further redistribution.  That is to say, proprietary
+modifications will not be allowed.  I want to make sure that all
+versions of GNU remain free.
+
+Why Many Other Programmers Want to Help
+=======================================
+
+   I have found many other programmers who are excited about GNU and
+want to help.
+
+   Many programmers are unhappy about the commercialization of system
+software.  It may enable them to make more money, but it requires them
+to feel in conflict with other programmers in general rather than feel
+as comrades.  The fundamental act of friendship among programmers is the
+sharing of programs; marketing arrangements now typically used
+essentially forbid programmers to treat others as friends.  The
+purchaser of software must choose between friendship and obeying the
+law.  Naturally, many decide that friendship is more important.  But
+those who believe in law often do not feel at ease with either choice.
+They become cynical and think that programming is just a way of making
+money.
+
+   By working on and using GNU rather than proprietary programs, we can
+be hospitable to everyone and obey the law.  In addition, GNU serves as
+an example to inspire and a banner to rally others to join us in
+sharing.  This can give us a feeling of harmony which is impossible if
+we use software that is not free.  For about half the programmers I
+talk to, this is an important happiness that money cannot replace.
+
+How You Can Contribute
+======================
+
+   I am asking computer manufacturers for donations of machines and
+money.  I'm asking individuals for donations of programs and work.
+
+   One consequence you can expect if you donate machines is that GNU
+will run on them at an early date.  The machines should be complete,
+ready to use systems, approved for use in a residential area, and not
+in need of sophisticated cooling or power.
+
+   I have found very many programmers eager to contribute part-time
+work for GNU.  For most projects, such part-time distributed work would
+be very hard to coordinate; the independently-written parts would not
+work together.  But for the particular task of replacing Unix, this
+problem is absent.  A complete Unix system contains hundreds of utility
+programs, each of which is documented separately.  Most interface
+specifications are fixed by Unix compatibility.  If each contributor
+can write a compatible replacement for a single Unix utility, and make
+it work properly in place of the original on a Unix system, then these
+utilities will work right when put together.  Even allowing for Murphy
+to create a few unexpected problems, assembling these components will
+be a feasible task.  (The kernel will require closer communication and
+will be worked on by a small, tight group.)
+
+   If I get donations of money, I may be able to hire a few people full
+or part time.  The salary won't be high by programmers' standards, but
+I'm looking for people for whom building community spirit is as
+important as making money.  I view this as a way of enabling dedicated
+people to devote their full energies to working on GNU by sparing them
+the need to make a living in another way.
+
+Why All Computer Users Will Benefit
+===================================
+
+   Once GNU is written, everyone will be able to obtain good system
+software free, just like air.(2)
+
+   This means much more than just saving everyone the price of a Unix
+license.  It means that much wasteful duplication of system programming
+effort will be avoided.  This effort can go instead into advancing the
+state of the art.
+
+   Complete system sources will be available to everyone.  As a result,
+a user who needs changes in the system will always be free to make them
+himself, or hire any available programmer or company to make them for
+him.  Users will no longer be at the mercy of one programmer or company
+which owns the sources and is in sole position to make changes.
+
+   Schools will be able to provide a much more educational environment
+by encouraging all students to study and improve the system code.
+Harvard's computer lab used to have the policy that no program could be
+installed on the system if its sources were not on public display, and
+upheld it by actually refusing to install certain programs.  I was very
+much inspired by this.
+
+   Finally, the overhead of considering who owns the system software
+and what one is or is not entitled to do with it will be lifted.
+
+   Arrangements to make people pay for using a program, including
+licensing of copies, always incur a tremendous cost to society through
+the cumbersome mechanisms necessary to figure out how much (that is,
+which programs) a person must pay for.  And only a police state can
+force everyone to obey them.  Consider a space station where air must
+be manufactured at great cost: charging each breather per liter of air
+may be fair, but wearing the metered gas mask all day and all night is
+intolerable even if everyone can afford to pay the air bill.  And the
+TV cameras everywhere to see if you ever take the mask off are
+outrageous.  It's better to support the air plant with a head tax and
+chuck the masks.
+
+   Copying all or parts of a program is as natural to a programmer as
+breathing, and as productive.  It ought to be as free.
+
+Some Easily Rebutted Objections to GNU's Goals
+==============================================
+
+     "Nobody will use it if it is free, because that means they can't
+     rely on any support."
+
+     "You have to charge for the program to pay for providing the
+     support."
+
+   If people would rather pay for GNU plus service than get GNU free
+without service, a company to provide just service to people who have
+obtained GNU free ought to be profitable.(3)
+
+   We must distinguish between support in the form of real programming
+work and mere handholding.  The former is something one cannot rely on
+from a software vendor.  If your problem is not shared by enough
+people, the vendor will tell you to get lost.
+
+   If your business needs to be able to rely on support, the only way
+is to have all the necessary sources and tools.  Then you can hire any
+available person to fix your problem; you are not at the mercy of any
+individual.  With Unix, the price of sources puts this out of
+consideration for most businesses.  With GNU this will be easy.  It is
+still possible for there to be no available competent person, but this
+problem cannot be blamed on distribution arrangements.  GNU does not
+eliminate all the world's problems, only some of them.
+
+   Meanwhile, the users who know nothing about computers need
+handholding: doing things for them which they could easily do
+themselves but don't know how.
+
+   Such services could be provided by companies that sell just
+hand-holding and repair service.  If it is true that users would rather
+spend money and get a product with service, they will also be willing
+to buy the service having got the product free.  The service companies
+will compete in quality and price; users will not be tied to any
+particular one.  Meanwhile, those of us who don't need the service
+should be able to use the program without paying for the service.
+
+     "You cannot reach many people without advertising, and you must
+     charge for the program to support that."
+
+     "It's no use advertising a program people can get free."
+
+   There are various forms of free or very cheap publicity that can be
+used to inform numbers of computer users about something like GNU.  But
+it may be true that one can reach more microcomputer users with
+advertising.  If this is really so, a business which advertises the
+service of copying and mailing GNU for a fee ought to be successful
+enough to pay for its advertising and more.  This way, only the users
+who benefit from the advertising pay for it.
+
+   On the other hand, if many people get GNU from their friends, and
+such companies don't succeed, this will show that advertising was not
+really necessary to spread GNU.  Why is it that free market advocates
+don't want to let the free market decide this?(4)
+
+     "My company needs a proprietary operating system to get a
+     competitive edge."
+
+   GNU will remove operating system software from the realm of
+competition.  You will not be able to get an edge in this area, but
+neither will your competitors be able to get an edge over you.  You and
+they will compete in other areas, while benefiting mutually in this
+one.  If your business is selling an operating system, you will not
+like GNU, but that's tough on you.  If your business is something else,
+GNU can save you from being pushed into the expensive business of
+selling operating systems.
+
+   I would like to see GNU development supported by gifts from many
+manufacturers and users, reducing the cost to each.(5)
+
+     "Don't programmers deserve a reward for their creativity?"
+
+   If anything deserves a reward, it is social contribution.
+Creativity can be a social contribution, but only in so far as society
+is free to use the results.  If programmers deserve to be rewarded for
+creating innovative programs, by the same token they deserve to be
+punished if they restrict the use of these programs.
+
+     "Shouldn't a programmer be able to ask for a reward for his
+     creativity?"
+
+   There is nothing wrong with wanting pay for work, or seeking to
+maximize one's income, as long as one does not use means that are
+destructive.  But the means customary in the field of software today
+are based on destruction.
+
+   Extracting money from users of a program by restricting their use of
+it is destructive because the restrictions reduce the amount and the
+ways that the program can be used.  This reduces the amount of wealth
+that humanity derives from the program.  When there is a deliberate
+choice to restrict, the harmful consequences are deliberate destruction.
+
+   The reason a good citizen does not use such destructive means to
+become wealthier is that, if everyone did so, we would all become
+poorer from the mutual destructiveness.  This is Kantian ethics; or,
+the Golden Rule.  Since I do not like the consequences that result if
+everyone hoards information, I am required to consider it wrong for one
+to do so.  Specifically, the desire to be rewarded for one's creativity
+does not justify depriving the world in general of all or part of that
+creativity.
+
+     "Won't programmers starve?"
+
+   I could answer that nobody is forced to be a programmer.  Most of us
+cannot manage to get any money for standing on the street and making
+faces.  But we are not, as a result, condemned to spend our lives
+standing on the street making faces, and starving.  We do something
+else.
+
+   But that is the wrong answer because it accepts the questioner's
+implicit assumption: that without ownership of software, programmers
+cannot possibly be paid a cent.  Supposedly it is all or nothing.
+
+   The real reason programmers will not starve is that it will still be
+possible for them to get paid for programming; just not paid as much as
+now.
+
+   Restricting copying is not the only basis for business in software.
+It is the most common basis because it brings in the most money.  If it
+were prohibited, or rejected by the customer, software business would
+move to other bases of organization which are now used less often.
+There are always numerous ways to organize any kind of business.
+
+   Probably programming will not be as lucrative on the new basis as it
+is now.  But that is not an argument against the change.  It is not
+considered an injustice that sales clerks make the salaries that they
+now do.  If programmers made the same, that would not be an injustice
+either.  (In practice they would still make considerably more than
+that.)
+
+     "Don't people have a right to control how their creativity is
+     used?"
+
+   "Control over the use of one's ideas" really constitutes control over
+other people's lives; and it is usually used to make their lives more
+difficult.
+
+   People who have studied the issue of intellectual property rights
+carefully (such as lawyers) say that there is no intrinsic right to
+intellectual property.  The kinds of supposed intellectual property
+rights that the government recognizes were created by specific acts of
+legislation for specific purposes.
+
+   For example, the patent system was established to encourage
+inventors to disclose the details of their inventions.  Its purpose was
+to help society rather than to help inventors.  At the time, the life
+span of 17 years for a patent was short compared with the rate of
+advance of the state of the art.  Since patents are an issue only among
+manufacturers, for whom the cost and effort of a license agreement are
+small compared with setting up production, the patents often do not do
+much harm.  They do not obstruct most individuals who use patented
+products.
+
+   The idea of copyright did not exist in ancient times, when authors
+frequently copied other authors at length in works of non-fiction.  This
+practice was useful, and is the only way many authors' works have
+survived even in part.  The copyright system was created expressly for
+the purpose of encouraging authorship.  In the domain for which it was
+invented--books, which could be copied economically only on a printing
+press--it did little harm, and did not obstruct most of the individuals
+who read the books.
+
+   All intellectual property rights are just licenses granted by society
+because it was thought, rightly or wrongly, that society as a whole
+would benefit by granting them.  But in any particular situation, we
+have to ask: are we really better off granting such license?  What kind
+of act are we licensing a person to do?
+
+   The case of programs today is very different from that of books a
+hundred years ago.  The fact that the easiest way to copy a program is
+from one neighbor to another, the fact that a program has both source
+code and object code which are distinct, and the fact that a program is
+used rather than read and enjoyed, combine to create a situation in
+which a person who enforces a copyright is harming society as a whole
+both materially and spiritually; in which a person should not do so
+regardless of whether the law enables him to.
+
+     "Competition makes things get done better."
+
+   The paradigm of competition is a race: by rewarding the winner, we
+encourage everyone to run faster.  When capitalism really works this
+way, it does a good job; but its defenders are wrong in assuming it
+always works this way.  If the runners forget why the reward is offered
+and become intent on winning, no matter how, they may find other
+strategies--such as, attacking other runners.  If the runners get into
+a fist fight, they will all finish late.
+
+   Proprietary and secret software is the moral equivalent of runners
+in a fist fight.  Sad to say, the only referee we've got does not seem
+to object to fights; he just regulates them ("For every ten yards you
+run, you can fire one shot").  He really ought to break them up, and
+penalize runners for even trying to fight.
+
+     "Won't everyone stop programming without a monetary incentive?"
+
+   Actually, many people will program with absolutely no monetary
+incentive.  Programming has an irresistible fascination for some
+people, usually the people who are best at it.  There is no shortage of
+professional musicians who keep at it even though they have no hope of
+making a living that way.
+
+   But really this question, though commonly asked, is not appropriate
+to the situation.  Pay for programmers will not disappear, only become
+less.  So the right question is, will anyone program with a reduced
+monetary incentive?  My experience shows that they will.
+
+   For more than ten years, many of the world's best programmers worked
+at the Artificial Intelligence Lab for far less money than they could
+have had anywhere else.  They got many kinds of non-monetary rewards:
+fame and appreciation, for example.  And creativity is also fun, a
+reward in itself.
+
+   Then most of them left when offered a chance to do the same
+interesting work for a lot of money.
+
+   What the facts show is that people will program for reasons other
+than riches; but if given a chance to make a lot of money as well, they
+will come to expect and demand it.  Low-paying organizations do poorly
+in competition with high-paying ones, but they do not have to do badly
+if the high-paying ones are banned.
+
+     "We need the programmers desperately.  If they demand that we stop
+     helping our neighbors, we have to obey."
+
+   You're never so desperate that you have to obey this sort of demand.
+Remember: millions for defense, but not a cent for tribute!
+
+     "Programmers need to make a living somehow."
+
+   In the short run, this is true.  However, there are plenty of ways
+that programmers could make a living without selling the right to use a
+program.  This way is customary now because it brings programmers and
+businessmen the most money, not because it is the only way to make a
+living.  It is easy to find other ways if you want to find them.  Here
+are a number of examples.
+
+   A manufacturer introducing a new computer will pay for the porting of
+operating systems onto the new hardware.
+
+   The sale of teaching, hand-holding and maintenance services could
+also employ programmers.
+
+   People with new ideas could distribute programs as freeware, asking
+for donations from satisfied users, or selling hand-holding services.
+I have met people who are already working this way successfully.
+
+   Users with related needs can form users' groups, and pay dues.  A
+group would contract with programming companies to write programs that
+the group's members would like to use.
+
+   All sorts of development can be funded with a Software Tax:
+
+     Suppose everyone who buys a computer has to pay x percent of the
+     price as a software tax.  The government gives this to an agency
+     like the NSF to spend on software development.
+
+     But if the computer buyer makes a donation to software development
+     himself, he can take a credit against the tax.  He can donate to
+     the project of his own choosing--often, chosen because he hopes to
+     use the results when it is done.  He can take a credit for any
+     amount of donation up to the total tax he had to pay.
+
+     The total tax rate could be decided by a vote of the payers of the
+     tax, weighted according to the amount they will be taxed on.
+
+     The consequences:
+
+        * The computer-using community supports software development.
+
+        * This community decides what level of support is needed.
+
+        * Users who care which projects their share is spent on can
+          choose this for themselves.
+
+   In the long run, making programs free is a step toward the
+post-scarcity world, where nobody will have to work very hard just to
+make a living.  People will be free to devote themselves to activities
+that are fun, such as programming, after spending the necessary ten
+hours a week on required tasks such as legislation, family counseling,
+robot repair and asteroid prospecting.  There will be no need to be
+able to make a living from programming.
+
+   We have already greatly reduced the amount of work that the whole
+society must do for its actual productivity, but only a little of this
+has translated itself into leisure for workers because much
+nonproductive activity is required to accompany productive activity.
+The main causes of this are bureaucracy and isometric struggles against
+competition.  Free software will greatly reduce these drains in the
+area of software production.  We must do this, in order for technical
+gains in productivity to translate into less work for us.
+
+   ---------- Footnotes ----------
+
+   (1)  The wording here was careless.  The intention was that nobody
+would have to pay for *permission* to use the GNU system.  But the
+words don't make this clear, and people often interpret them as saying
+that copies of GNU should always be distributed at little or no charge.
+That was never the intent; later on, the manifesto mentions the
+possibility of companies providing the service of distribution for a
+profit.  Subsequently I have learned to distinguish carefully between
+"free" in the sense of freedom and "free" in the sense of price.  Free
+software is software that users have the freedom to distribute and
+change.  Some users may obtain copies at no charge, while others pay to
+obtain copies--and if the funds help support improving the software, so
+much the better.  The important thing is that everyone who has a copy
+has the freedom to cooperate with others in using it.
+
+   (2)  This is another place I failed to distinguish carefully between
+the two different meanings of "free".  The statement as it stands is
+not false--you can get copies of GNU software at no charge, from your
+friends or over the net.  But it does suggest the wrong idea.
+
+   (3)  Several such companies now exist.
+
+   (4)  The Free Software Foundation raises most of its funds from a
+distribution service, although it is a charity rather than a company.
+If *no one* chooses to obtain copies by ordering the from the FSF, it
+will be unable to do its work.  But this does not mean that proprietary
+restrictions are justified to force every user to pay.  If a small
+fraction of all the users order copies from the FSF, that is sufficient
+to keep the FSF afloat.  So we ask users to choose to support us in
+this way.  Have you done your part?
+
+   (5)  A group of computer companies recently pooled funds to support
+maintenance of the GNU C Compiler.
+
diff --git a/etc/HELLO b/etc/HELLO
new file mode 100644 (file)
index 0000000..ea86d00
--- /dev/null
+++ b/etc/HELLO
@@ -0,0 +1,38 @@
+You need many fonts to read all.
+Please correct this incomplete list and add more!
+
+---------------------------------------------------------
+Arabic                 \e[2]\e(38R\e(47d\e(3T!JSa\e(4W\e(3W\e[0]\e(B
+Croatian (Hrvatski)    Bog (Bok), Dobar dan
+Czech (\e,Bh\e(Besky)            Dobr\e,B}\e(B den
+Danish (Dansk)         Hej, Goddag
+English                        Hello
+Esperanto              Saluton
+Estonian               Tere, Tervist
+FORTRAN                        PROGRAM
+Finnish (Suomi)                Hei
+French (Fran\e,Ag\e(Bais)        Bonjour, Salut
+German (Deutsch Nord)  Guten Tag
+German (Deutsch S\e,A|\e(Bd)     Gr\e,A|_\e(B Gott
+Greek (\e,FGkk]mija\e(B) \e,FCei\\e(B \e,Fsar\e(B
+Hebrew                 \e[2]\e,Hylem\e[0]\e(B
+Italiano               Ciao, Buon giorno
+Maltese                        Ciao
+Nederlands, Vlaams     Hallo, Hoi, Goedendag
+Norwegian (Norsk)      Hei, God dag
+Polish                 Cze\e,B6f\e(B!
+Russian (\e,L@caaZXY\e(B)        \e,L7T`PRabRcYbU\e(B!
+Spanish (Espa\e,Aq\e(Bol)        \e,A!\e(BHola!
+Swedish (Svenska)      Hej, Goddag
+Vietnamese (Ti\e,1*\e(Bng Vi\e,1.\e(Bt)    Ch\e,1`\e(Bo b\e,1U\e(Bn
+
+Japanese (\e$BF|K\8l\e(B)                \e$B$3$s$K$A$O\e(B, \e(I:]FAJ\e(B, \e$BqV\e$(DiQ\e(B
+Chinese (\e$AVPND\e(B,\e$AFUM(;0\e(B,\e$A::So\e(B)   \e$ADc:C\e(B
+Cantonese (\e$(0GnM$\e(B,\e$(0N]0*Hd\e(B)          \e$(0*/=(\e(B, \e$(0+$)p\e(B
+Hangul (\e$(CGQ1[\e(B)                   \e$(C>H3gGO<<?d\e(B, \e$(C>H3gGO=J4O1n\e(B
+
+Difference among chinese characters in GB, JIS, KSC, BIG5:
+       GB   -- \e$AT*Fx\e(B  \e$A?*7"\e(B  
+       JIS  -- \e$B855$\e(B  \e$B3+H/\e(B
+       KSC  -- \e$(Cj*Q(\e(B  \e$(CKR[!\e(B
+       BIG5 -- \e$(0&x86\e(B  \e$(0DeBv\e(B
diff --git a/etc/InstallGuide b/etc/InstallGuide
new file mode 100644 (file)
index 0000000..e0fe148
--- /dev/null
@@ -0,0 +1,112 @@
+Introduction
+
+Thank you for downloading XEmacs.  We of the XEmacs development team
+believe user satisfaction is our number one priority, and we hope that
+you will be pleased with the power of our editor.  Please follow all
+of the instructions in order to enjoy a quick and easy installation.
+
+
+Getting Started
+
+In this guide, information which you will need to supply will be enclosed in
+angle brackets, <like this>.  Commands which you will have to enter will be
+indented,
+
+       like this.
+
+You will need to provide a loading directory, in which to load the
+material from tape (/tmp/xemacs is recommended), and a permanent
+installation directory (/usr/local/xemacs is recommended).
+
+
+Loading From Tape
+
+First create and change directory to the loading directory:
+
+       mkdir <working directory>
+       cd <working directory>
+
+Now you are ready to load the software from tape.
+
+The specific device name needed to load the tape varies with hardware vendors,
+and may be found in Appendix A, "Vendors and Device Names".
+
+Load the software from tape:
+
+       tar xvf /dev/<device name>
+
+You have now loaded all of the software from tape, and are ready to compile and
+install the XEmacs Text Editor.
+
+
+Compiling and Installing the XEmacs Editor
+
+Compiling and installing the libraries is handled by a user-friendly shell
+script.  You will need to provide some information to the script, such as your
+organization name and registration number.  To run the script, type
+
+       /bin/sh xemacs/xemacs.install -d <installation directory>
+
+Follow the script's directions, and provide the information which it prompts
+for.
+
+When the script prompts you for the directory in which the distribution files
+are located, you will find that you are unable to provide it with any directory
+which the script will deem satisfactory.  That is because it is necessary to
+order the following additional parts which are necessary to continue with the
+installation:
+
+       Part Number     Qty     Name                            Price
+
+       GM-96-3026      1       Goat, male                       1000.00
+       CB-13-2395      1       Candle, black                      50.00
+       CG-63-6376      1       Chalk dust container               10.00
+       IB-89-3335      5       Incense sticks                      5.00
+       DE-44-8846      1       Dagger, ebon, curved              500.00
+       AS-87-2319      1       Altar, silver                   10000.00
+
+Wait until the additional parts arrive; you will be ready to continue the
+installation the next Friday the 13th at midnight.
+
+
+Ritual for Successfully Completing Installation
+
+Stand in front of the computer.  Pour out the chalk dust in an inscribed
+pentagram around you; be sure that it is without breaks.  Set an incense stick
+at each of the five corners, the altar in front of the computer, and the candle
+in front of the altar.
+
+Light each of the incense sticks and the candles, chanting in a low voice:
+
+       Daemons and spirits of the netherworld
+       Forces of all that is chaotic and mysterious
+       Essence of Netscape and MicroSoft
+
+       I am coming here to appease you
+       I offer you this goat
+       That my software may work
+
+       I bind you here
+       Do not make my system crash
+       Let the software install as advertised
+
+Place the goat on the altar, and slaughter it with the dagger.
+
+       May this goat feed you
+       Sate your lust for blood
+       Into it may your mischief fly
+       Not my computer
+       Make the software work
+       For this is the only way
+
+Then spit into the computer's ventilation slots.  This will complete different
+circuits inside the computer, causing its motherboard and cards to function in
+ways that the engineers never intended, thereby making your system compatible
+with our libraries.
+
+Reboot your computer.  The installation is now complete.
+
+[This has undergone a minor rewrite for XEmacs.  It originally
+appeared on rec.humor.funny courtesy of jonathan seth hayward
+<jhayward@students.uiuc.edu>, and is included by permission of the
+author].
diff --git a/etc/LPF b/etc/LPF
new file mode 100644 (file)
index 0000000..93226e6
--- /dev/null
+++ b/etc/LPF
@@ -0,0 +1,122 @@
+          Protect Your Freedom to Write Programs
+          Join the League for Programming Freedom
+              (Version of February 3, 1994)
+
+Ten years ago, programmers were allowed to write programs using all
+the techniques they knew, and providing whatever features they felt
+were useful.  This is no longer the case.  New monopolies, known as
+software patents and interface copyrights, have taken away our freedom
+of expression and our ability to do a good job.
+
+"Look and feel" lawsuits attempt to monopolize well-known command
+languages; some have succeeded.  Copyrights on command languages
+enforce gratuitous incompatibility, close opportunities for
+competition, and stifle incremental improvements.
+
+Software patents are even more dangerous; they make every design
+decision in the development of a program carry a risk of a lawsuit,
+with draconian pretrial seizure.  It is difficult and expensive to
+find out whether the techniques you consider using are patented; it is
+impossible to find out whether they will be patented in the future.
+
+The League for Programming Freedom is a grass-roots organization of
+professors, students, businessmen, programmers and users dedicated to
+bringing back the freedom to write programs.  The League is not
+opposed to the legal system that Congress expressly established for
+software--copyright on individual programs.  Our aim is to reverse the
+recent changes that prevent programmers from doing their work.
+
+The League works to abolish the new monopolies by publishing articles,
+talking with public officials, denouncing egregious offenders, and
+filing amicus curiae briefs, most notably against Lotus in its suit
+against Borland.  We testified twice at the recent Patent Office
+hearings on software patents.  We welcome suggestions for other
+activities, as well as help in carrying them out.
+
+Membership dues in the League are $42 per year for programmers,
+managers and professionals; $10.50 for students; $21 for others.
+Please give more if you can.  The League's funds will be used for
+filing briefs; for printing handouts, buttons and signs; whatever will
+persuade the courts, the legislators, and the people.  You may not get
+anything personally for your dues--except for the freedom to write
+programs.  The League is a non-profit corporation, but not considered
+a tax-exempt charity.  However, for those self-employed in software,
+the dues can be a business expense.
+
+The League needs both activist members and members who only pay their
+dues.  We also greatly need additional corporate members; contact us
+for information.
+
+If you have any questions, please write to the League, phone
++1 617 621 7084, or send Internet mail to lpf@uunet.uu.net.
+
+                      Chris Hofstader, President
+                      Dean Anderson, Secretary
+                      Aubrey Jaffer, Treasurer
+
+Chris Hofstader can be reached at (617) 492-0023; FAX (617) 497-1632.
+\fTo join, please send a check and the following information to:
+
+    League for Programming Freedom
+    1 Kendall Square #143
+    P.O.Box 9171
+    Cambridge, Massachusetts 02139
+
+(Outside the US, please send a check in US dollars on a bank 
+having a US correspondent bank, to save us check cashing fees.)
+
+Your name:
+
+
+The address for League mailings, a few each year; please indicate
+whether it is your home address or your work address:
+
+
+
+The company you work for, and your position:
+
+
+Your phone numbers (home, work or both):
+
+
+Your email address, so we can contact you for demonstrations or for
+writing letters.  (If you don't want us to contact you for these
+things, please say so, but please give us your email address anyway
+so we can save paper and postage by sending you the newsletter by email.)
+
+
+Is there anything about you which would enable your endorsement of the
+LPF to impress the public?  For example, if you are or have been a
+professor or an executive, or have written software that has a good
+reputation, please tell us.
+
+
+
+Would you like to help with LPF activities?
+
+
+
+
+The corporate charter of the League for Programming Freedom states:
+
+    The purpose of the corporation is to engage in the following
+    activities:
+
+    1. To determine the existence of, and warn the public about
+    restrictions and monopolies on classes of computer programs where such
+    monopolies prevent or restrict the right to develop certain types of
+    computer programs.
+
+    2. To develop countermeasures and initiatives, in the public interest,
+    effective to block or otherwise prevent or restrain such monopolistic
+    activities including education, research, publications, public
+    assembly, legislative testimony, and intervention in court proceedings
+    involving public interest issues (as a friend of the court).
+
+    3. To engage in any business or other activity in service of and
+    related to the foregoing paragraphs that lawfully may be carried on
+    by a corporation organized under Chapter 180 of the Massachusetts
+    General Laws.
+
+The officers and directors of the League will be elected annually by
+the members.
diff --git a/etc/MACHINES b/etc/MACHINES
new file mode 100644 (file)
index 0000000..0d3bbf3
--- /dev/null
@@ -0,0 +1,1261 @@
+This is a list of the status of GNU Emacs on various machines and systems.
+
+For each system and machine, we give the configuration name you should
+pass to the `configure' script to prepare to build Emacs for that
+system/machine.
+
+The `configure' script uses the configuration name to decide which
+machine and operating system description files `src/config.h' should
+include.  The machine description files are all in `src/m', and have
+names similar to, but not identical to, the machine names used in
+configuration names.  The operating system files are all in `src/s',
+and are named similarly.  See the `configure' script if you need to
+know which configuration names use which machine and operating system
+description files.
+
+If you add support for a new configuration, add a section to this
+file, and then edit the `configure' script to tell it which
+configuration name(s) should select your new machine description and
+system description files.
+
+\f
+Here are the configurations Emacs is intended to work with, with the
+corresponding configuration names.  You can postpend version numbers
+to operating system names (i.e. sunos4.1) or architecture names (i.e.
+hppa1.1).  If you leave out the version number, the `configure' script
+will configure Emacs for the latest version it knows about.
+
+*************************************************************************
+*                                                                      *
+*   NOTE: this file is kept in sync with the FSF version, though we    *
+*   expect the information here to be mostly accurate for XEmacs.      *
+*   Bear in mind that the version numbers mentioned in the text below  *
+*   are the FSF numbers, not the Lucid numbers.  For comparison,       *
+*   FSFmacs 19.26 roughly corresponds to XEmacs 19.11.                 *
+*                                                                      *
+*************************************************************************
+
+Acorn RISCiX (arm-acorn-riscix1.2)
+
+  Emacs 19.29 has changes that ought to support RISCiX 1.2.
+
+  Due to a bug in the RISCiX C compiler (3.4.5), emacs must
+  be built with gcc (versions 2.5.8 onwards).
+
+  In addition, you will need GNU sed and GNU make, as the RISCiX release
+  versions of these utilities cannot cope with building emacs-19!
+
+    GNU sed should be configured with:
+
+    env 'DEFS=-Dgetopt=gnu_getopt -Dopterr=gnu_opterr -Doptind=gnu_optind \
+            -Doptarg=gnu_optarg' ./configure
+
+    GNU make (3.72+) should be configured with:
+
+    env 'CFLAGS=-Dgetopt=gnu_getopt -Dopterr=gnu_opterr -Doptind=gnu_optind \
+              -Doptarg=gnu_optarg' ./configure
+
+  Emacs may be configured to use the X toolkit, by adding --with-x-toolkit
+  to the configure command.  If you do this, you will need to edit the line
+  in src/Makefile which defines LIBW (about line 59) to read:
+
+  LIBW= -lXaw_n
+
+  This ensures that the non-shared widget library is used.
+
+  It is unlikely that this version of emacs will work with RISCiX 1.1.
+
+Alliant (fx80-alliant-bsd):
+
+  18.52 worked on system version 4.  Previous Emacs versions were
+  known to work on previous system versions.
+
+  If you are using older versions of their operating system, you may
+  need to edit `src/config.h' to use `m/alliant1.h' (on version 1) or
+  `m/alliant.h' (on versions 2 and 3).
+
+Alliant FX/2800 (i860-alliant-bsd)
+
+  Known to work with 19.26 and OS version 2.2, compiler version 1.3.
+
+Alpha (DEC) running OSF/1 (alpha-dec-osf1)
+
+  Worked as of Lucid Emacs 19.8.
+
+Altos 3068 (m68k-altos-sysv)
+
+  18.52 was said to work, provided you don't compile unexec.c with -O.
+
+Amdahl UTS (580-amdahl-sysv)
+
+  Small changes for 18.38 were merged in 18.39.  It is mostly
+  working, but at last report a bug sometimes causes Emacs to
+  grab very large amounts of memory.  No fix or explanation
+  has yet been reported.  It may be possible to find this bug
+  if you find which Emacs command it happens within and then
+  run that command with a breakpoint set at malloc.
+
+  The 5.2u370 compiler is so brain damaged that it is not
+  even worth trying to use it.  Success was obtained with the
+  uts native C compiler on uts version 5.2.5.
+
+Apollo running Domain (m68k-apollo-domain)
+
+  19.29 has a few patches that ought to make things work.
+
+  There are reports of bugs in cc -O on this system.
+
+  In `lib-src/Makefile', don't expect emacsclient and emacsserver to
+  compile.  You might want to remove them from your makefile.
+
+  The Apollo has a bizarre operating system which does not permit
+  Emacs to be dumped with preloaded pure Lisp code.  Therefore, each
+  time you start Emacs on this system, the standard Lisp code is loaded
+  into it.  Expect it to take a long time.  You can prevent loading of
+  the standard Lisp code by specifying the -nl switch.  It must
+  come at the beginning of the command line; only the -t and -batch
+  switches may come before it.
+
+
+  Here is a design for a method of dumping and reloading the relevant
+  necessary impure areas of Emacs.
+
+  On dumping, you need to dump only the array `pure' plus the
+  locations that contain values of forwarded Lisp variables or that are
+  protected for garbage collection.  The former can be found by a
+  garbage- collection-like technique, and the latter are in the
+  staticprolist vector (see alloc.c for both things).
+
+  Reloading would work in an Emacs that has just been started; except
+  when a switch is specified to inhibit this, it would read the dump
+  file and set all the appropriate locations.  The data loaded must be
+  relocated, but that's not hard.  Those locations that are of type
+  Lisp_Object can be found by a technique like garbage-collection, and
+  those of them that point to storage can be relocated.  The other data
+  read from the file will not need to be relocated.
+
+  The switch to inhibit loading the data base would be used when it
+  is time to dump a new data base.
+
+  This would take a few seconds, which is much faster than loading
+  the Lisp code of Emacs from scratch.
+
+AT&T 3b2, 3b5, 3b15, 3b20 (we32k-att-sysv)
+
+  Emacs will probably not work with certain kernel constants too small. 
+
+  In param.h CDLIMIT should be at least (1L << 12) in order to allow 
+  processes to write up to 2 Mbyte files.  This parameter is configurable
+  by normal means in /etc/master.d/kernel; examine that file for the
+  symbol CDLIMIT or ULIMIT, and raise it by several powers of 2.  Then
+  do normal kernel rebuild things via "cd /boot; mkboot -k KERNEL" and so
+  forth.
+
+  In seg.h NSEGP and STACKSEG should be at least 16 and 4 respectively
+  to allow processes with total size of up to 2Mbytes.
+  However, I'm told it is unlikely this would fail to be true.
+
+  The MAXMEM may also prevent Emacs from running.  The file
+  3B-MAXMEM in this directory explains how to increase MAXMEM.
+
+  On some of these machines, you may need to define IN_SCCS_ID
+  in config.h to make Emacs work.  Supposedly you can tell whether
+  this is necessary by checking something in /usr/include/sys/time.h;
+  we do not know precisely what.
+
+AT&T 7300 or 3b1 (m68k-att-sysv)
+
+  18.52 worked.  If you have strange troubles with dumping
+  Emacs, delete the last few lines from `src/m/7300.h' and recompile.
+  These lines are supposed to produce a sharable executable.
+
+  `src/m/7300.h' defines SHORTNAMES because operating system versions
+  older than 3.5 did not support long symbol names.  Version 3.5 does
+  support them, so you can remove the #define SHORTNAMES in that
+  version.
+
+Bull DPX/2 models 2nn or 3nn (m68k-bull-sysv3)
+
+  Minor fixes merged into 19.19, which should work with CC or GCC.
+
+  You should compile with all the POSIX stuff: undef _SYSV and define
+  _POSIX_SOURCE, _XOPEN_SOURCE and _BULL_SOURCE.
+
+  On bos2.00.45 there is a bug that makes the F_SETOWN fcntl
+  call enters in an infinite loop. F_SETOWN_BUG has been defined to avoid 
+  calling it.
+
+Bull DPX/20 (rs6000-bull-bosx)
+
+  Version 19 works.
+
+Bull sps7 (m68k-bull-sysv2)
+
+  Changes partially merged in version 19, but some fixes are probably required.
+
+CCI 5/32, 6/32
+
+  See "Tahoe".
+
+Celerity (celerity-celerity-bsd4.2)
+
+  Version 18.49 worked.  This configuration name is a hack, because we
+  don't know the processor used by Celerities.  If someone
+  who uses a Celerity could get in touch with us, we can teach
+  config.sub a better name for the configuration.
+
+Clipper (clipper-???)
+
+  Version 19 has support for some brand of clipper system.  If you
+  have successfully built Emacs 19 on some sort of clipper system, let
+  us know so we can flesh out this entry.
+
+  Note that the Orion 105 is also a clipper, but some system-related
+  parameters are different.
+
+Convex (c1-convex-bsd, c2-convex-bsd, c32-convex-bsd, c34-convex-bsd,
+        c38-convex-bsd)
+
+  Support updated and residual bugs fixed in 19.26.
+
+Cubix QBx/386 (i386-cubix-sysv)
+
+  Changes merged in 19.1.  Systems before 2/A/0 may fail to compile etags.c
+  due to a compiler bug.
+
+Cydra 5 (cydra-cydrome-sysv)
+
+  18.51 worked in one version of their operating system but stopped
+  working in a newer version.  This has not been fixed.
+
+Data General Aviion (m88k-dg-dgux)
+
+  19.23 works; however, the GCC provided with DGUX 5.4R3.00 fails to
+  compile src/emacs.c.  GCC 2.5.8 does work.
+  The 19.26 pretest was reported to work; no word on which compiler.
+
+  System versions other than DGUX 5.4R3.00 have not been tested.
+
+DECstation (mips-dec-ultrix or mips-dec-osf)
+
+  This machine is the older Mips-based DECstation.
+  Emacs should now work on the Alpha CPU.
+
+  19.25 works on Ultrix 4.2.  The 19.26 pretest was reported to work
+  on Ultrix 4.2a and on 4.4.
+
+  One user reported 19.25 did not work at all with --with-x-toolkit
+  using X11R5 patch level 10, but worked ok with X11R5 pl26.
+
+  See under Ultrix for problems using X windows on Ultrix.
+  Note that this is a MIPS machine.
+
+  For Ultrix versions 4.1 or earlier, you may need to define
+  SYSTEM_MALLOC in `src/m/pmax.h', because XvmsAlloc.o in libX11.a seems
+  to insist on defining malloc itself.
+
+  For Ultrix versions prior to 4.0, you may need to delete
+  the definition of START_FILES from `src/m/pmax.h'.
+
+Motorola Delta 147 (m68k-motorola-sysv)
+
+  The EMacs 19.26 pretest was reported to work.
+
+  Motorola Delta boxes running System V/68 release 3.
+  Tested on 147 board with SVR3V7, no X and gcc.
+  Tested on 167 board with SVR3V7, no X, cc, gnucc and gcc.
+  Reports say it works with X too.
+
+  The installation script chooses the compiler itself.  gnucc is
+  preferred.
+
+Motorola Delta 187 (m88k-motorola-sysv,
+                   m88k-motorola-sysvr4, or
+                   m88k-motorola-m88kbcs)
+
+  The 19.26 pretest was reported to run on SVR3.  However, if you
+  use --with-x-toolkit on svr3, you will have problems compiling some
+  files because time.h and sys/time.h get included twice.
+  One fix is to edit those files to protect against multiple inclusion.
+
+  As of version 19.13, Emacs was reported to run under SYSVr3 and SYSVr4.
+Dual running System V (m68k-dual-sysv)
+
+  As of 17.46, this worked except for a few changes
+  needed in unexec.c.
+
+Dual running Uniplus (m68k-dual-uniplus)
+
+  Worked, as of 17.51.
+
+Elxsi 6400 (elxsi-elxsi-sysv)
+
+  Changes for 12.0 release are in 19.1.
+  Dumping should work now.
+
+Encore machine (ns16k-encore-bsd)
+
+  This machine bizarrely uses 4.2BSD modified to use the COFF format
+  for object files.  Works (as of 18.40).  For the APC processor you
+  must enable two lines at the end of `src/s/umax.h', which are commented
+  out in the file as distributed.
+
+  WARNING: If you compile Emacs with the "-O" compiler switch, you
+  must also use the "-q enter_exits" switch so that all functions have
+  stack frames.  Otherwise routines that call `alloca' all lose.
+
+  A kernel bug in some system versions causes input characters to be lost
+  occasionally.
+
+GEC 63 (local-gec63-usg5.2)
+
+  Changes are partially merged in version 18, but certainly require
+  more work.  Let us know if you get this working, and we'll give it a
+  real configuration name.
+
+Gould Power Node (pn-gould-bsd4.2 or pn-gould-bsd4.3)
+
+  18.36 worked on versions 1.2 and 2.0 of the operating system.
+
+  On UTX/32 2.0, use pn-gould-bsd4.3.
+
+  On UTX/32 1.2 and UTX/32S 1.0, use pn-gould-bsd4.2 and note that
+  compiling `lib-src/sorted-doc' tickles a compiler bug: remove the -g
+  flag to cc in the makefile.
+
+  UTX/32 1.3 has a bug in the bcopy library routine.  Fix it by 
+  #undef BSTRING in `src/m/gould.h'.
+
+  Version 19 incorporates support for releases 2.1 and later of UTX/32.
+  A site running a pre-release of 2.1 should #define RELEASE2_1 in config.h.
+
+Gould NP1 (np1-gould-bsd)
+
+  Version 19 supposedly works.
+
+Harris Night Hawk (m68k-harris-cxux or m88k-harris-cxux)
+
+  This port was added in 19.23.  The configuration actually tested was
+  a Night Hawk 4800 running CX/UX 7.0.
+
+  If you have GCC ported and want to build with it, you probably need to
+  change things (like compiler switches) defined in the s/cxux.h file.
+
+  With CX/UX 7.0 and later releases, you need to build after setting the
+  SDE_TARGET environment variable to COFF (a port using ELF and shared
+  libraries has not yet been done).
+
+Honeywell XPS100 (xps100-honeywell-sysv)
+
+  Config file added in version 19.
+
+Hewlett-Packard 9000 series 200 or 300 (m68k-hp-bsd or m68k-hp-hpux7.)
+
+  Version 19 works under BSD.  The 19.26 pretest was reported
+  to work on HPUX 9.
+
+  These machines are 68000-series CPUs running HP/UX
+  (a derivative of sysV with some BSD features) or BSD 4.3 ported by Utah.
+  The operating system suffix determines which system Emacs is built for.
+
+  Series 200 HPUX runs Emacs only if it has the "HP/UX upgrade".
+
+  If you are running HP/UX release 8.0 or later, you need the optional
+  "C/ANSI C" software in order to build Emacs (older releases of HP/UX
+  do not require any special software).  If the file "/etc/filesets/C"
+  exists on your machine, you have this software, otherwise you do not.
+
+  Note that HP has used two incompatible assembler syntaxes,
+  and has recently changed the format of C function frames.
+  `src/crt0.c' and `src/alloca.s' have been conditionalised for the new
+  assembler and new function-entry sequence.  You may need to define
+  OLD_HP_ASSEMBLER if you are using an older hpux version.  If you
+  have an official (bought from HP) series 300 machine you have
+  the new assembler.  Kernels that are 5.+ or later have new
+  assembler.  A Series 200 that has been upgraded to a 68010
+  processor and a 5.+ kernel has the new compiler.
+
+  Define C_SWITCH_MACHINE to be +X to make a version of Emacs that
+  runs on both 68010 and 68020 based HP/UX's.
+
+  Define HPUX_68010 if you are using the new assembler, for
+  a system that has a 68010 without a 68881.  This is to say,
+  a s200 (upgraded) or s310.
+
+  Define the symbol HPUX_NET if you have the optional network features
+  that include the `netunam' system call.  This is referred to as
+  Network Services (NS/9000) in HP literature.
+
+HP 9000 series 500: not supported.
+
+  The series 500 has a seriously incompatible memory architecture
+  which relocates data in memory during execution of a program,
+  and support for it would be difficult to implement.
+
+HP 9000 series 700 or 800 (Spectrum) (hppa1.0-hp-hpux or hppa1.1-hp-hpux
+                                     or ...hpux9shr)
+
+  19.26 is believed to work on HPUX 9 provided you compile with GCC.
+  As of version 19.16, Emacs was reported to build (using GCC) and run
+  on HP 9000/700 series machines running HP/UX versions 8.07 and 9.01.
+
+  Use hppa1.1 for the 700 series and hppa1.0 for the 800
+  series machines.  (Emacs may not actually care which one you use.)
+
+  Use hppa1.1-hp-hpux9shr to use shared libraries on HPUX version 9.
+  You may need to create the X libraries libXaw.a and libXmu.a from
+  the MIT X distribute, and you may need to edit src/Makefile's
+  definition of LIBXT to look like this:
+
+     LIBXT= $(LIBW) -lXmu -lXt $(LIBXTR6) -lXext
+
+  Some people report trouble using the GNU memory allocator under
+  HP/UX version 9.  The problems often manifest as lots of ^@'s in the
+  buffer.
+  
+  We are told that these problems go away if you obtain the latest
+  patches for the HP/UX C compiler.  James J Dempsey
+  <jjd@spserv.bbn.com> says that this set of versions works for him:
+    /bin/cc:
+           HP92453-01 A.09.28 HP C Compiler
+    /lib/ccom:
+           HP92453-01 A.09.28 HP C Compiler
+            HP-UX SLLIC/OPTIMIZER  HP-UX.09.00.23  02/18/93
+            Ucode Code Generator - HP-UX.09.00.23.5 (patch)  2/18/93
+
+  For 700 series machines, the HP-UX patch needed is known as
+  PHSS_2653.  (Perhaps for 800 series machines as well; we don't
+  know.)  If you are on the Internet, you should be able to obtain
+  this patch by using telnet to access the machine
+  support.mayfield.hp.com and logging in as "hpslreg" and following
+  the instructions there.  Do not ask FSF for further support on
+  this.  If you have any trouble obtaining the patch, contact HP
+  Software Support.
+
+  If your buffer fills up with nulls (^@) at some point, it could well
+  be that problem.  That problem does not happen when people use GCC
+  to compile Emacs.  On the other hand, the HP compiler version 9.34
+  was reported to work for the 19.26 pretest.  9.65 was also reported to work.
+
+  If you turn on the DSUSP character (delayed suspend),
+  Emacs 19.26 does not know how to turn it off on HPUX.
+  You need to turn it off manually.
+
+  If you are running HP/UX release 8.0 or later, you need the optional
+  "C/ANSI C" software in order to build Emacs (older releases of HP/UX
+  do not require any special software).  If the file "/etc/filesets/C"
+  exists on your machine, you have this software, otherwise you do not.
+
+High Level Hardware Orion (orion-highlevel-bsd)
+
+  This is the original microprogrammed hardware.
+  Machine description file ought to work.
+
+High Level Hardware Orion 1/05 (clipper-highlevel-bsd)
+
+  Changes merged in 18.52.  This is the one with the Clipper cpu.
+  Note that systems which lack NFS need LOAD_AVE_TYPE changed to `double'.
+
+  C compiler has a bug; it loops compiling eval.c.
+  Compile it by hand without optimization.
+
+IBM PS/2 (i386-ibm-aix1.1 or i386-ibm-aix1.2)
+
+  Changes merged in version 19.  You may need to copy
+  /usr/lib/samples/hft/hftctl.c to the Emacs src directory.
+
+  i386-ibm-aix1.1 may not work with certain new X window managers, and
+  may be suboptimal.
+
+IBM RS/6000 (rs6000-ibm-aix)
+
+  Emacs 19.26 is believed to work; its pretest was tested.
+
+  At last report, Emacs didn't run well on terminals.  Informed
+  persons say that the tty VMIN and VTIME settings have been
+  corrupted; if you have a fix, please send it to us.
+
+  Compiling with -O using the IBM compiler has been known
+  to make Emacs work incorrectly.  It's reported that on
+  AIX 3.2.5 with an IBM compiler earlier than 1.03.00.14,
+  cc -O fails for some files.  You need to install any
+  PTF containing APAR #IX42810 to bring the compiler to
+  the 1.03.00.14 level to allow optimized compiles.
+  Alternatively, recompiling just emacs.c and extents.c
+  without optimization seems to do the trick as well.
+
+  There are reports that IBM compiler versions earlier than 1.03.00.02
+  fail even without -O.
+
+  As of 19.11, if you strip the Emacs executable, it ceases to work.
+
+  If you are using AIX 3.2.3, you may get a core dump when loading
+  ange-ftp.  You may be able to fix the problem by defining LIBS_TERMCAP
+  as -ltermcap -lcurses.  Please tell us if this fails to work.
+
+  If anyone can fix the above problems, or confirm that they don't happen
+  with certain versions of various programs, we would appreciate it.
+
+IBM RT/PC (romp-ibm-bsd or romp-ibm-aix)
+
+  Use romp-ibm-bsd for the 4.2-like system and romp-ibm-aix for AIX.
+  19.22 is reported to work under bsd.  We don't know about AIX.
+
+  On BSD, if you have trouble, try compiling with a different compiler.
+
+  On AIX, the file /usr/lib/samples/hft/hftctl.c must be compiled into
+  hftctl.o, with this result left in the src directory (hftctl.c is
+  part of the standard AIX distribution).
+
+  window.c must not be compiled with -O on AIX.
+
+Integrated Solutions `Optimum V' (m68k-isi-bsd4.2 or -bsd4.3)
+
+  18.52 said to work on some sort of ISI machine.
+  Version 18.45 worked (running on a Optimum V (VME bus, 68020)
+  BSD 4.2 (3.05e) system).  18.42 is reported to work on
+  a Qbus 68010 system.  Has not been tried on `WorkStation' `Cluster
+  Compute Node' `Cluster WorkStation' or `Server Node'  (Love the
+  StudLYCaps) 
+
+  Compilation with -O is rumored to break something.
+
+  On recent system versions, you may need to undefine the macro UMAX
+  in `lib-src/loadst.c' and `src/getpagesize.h'.  They stupidly defined this
+  in a system header file, which confuses Emacs (which thinks that UMAX
+  indicates the Umax operating system).
+
+Intel 386 (i386-*-isc,                 i386-*-esix,
+          i386-*-xenix,        i386-*-linux,    i386-*-freebsd,
+          i386-intsys-sysv,    i386-*-sysv3,
+          i386-*-sysv4,        i386-*-sysv4.2,
+          i386-*-sysv5.3,      i386-*-bsd4.2,
+          i386-*-sco3.2v4,     i386-*-bsd386,   i386-*-386bsd
+          or i486... or i586...)
+
+  In the above configurations, * means that the manufacturer's name
+  you specify does not matter, and you can use any name you like
+  (but it should not contain any dashes or stars).
+
+  When using the ISC configurations, be sure to specify the isc
+       version number - for example, if you're running ISC 3.0, use
+       i386-unknown-isc3.0 as your configuration name.
+  Use i386-*-esix for Esix; Emacs runs as of version 19.6.
+  Use i386-*-linux for GNU/Linux systems; Emacs runs as of version 19.26.
+  Use i386-intsys-sysv for Integrated Solutions 386 machines.
+  It may also be correct for Microport systems.
+  Use i386-*-sco3.2v4 for SCO 3.2v4; Emacs runs as of version 19.26.
+
+  On GNU/Linux systems, Emacs 19.23 was said to work properly with libc
+  version 4.5.21, but not with 4.5.19.  If your system uses QMAGIC
+  for the executable format, you must edit config.h to define LINUX_QMAGIC.
+
+  On GNU/Linux, configure may fail to put these definitions in config.h:
+
+    #define HAVE_GETTIMEOFDAY
+    #define HAVE_MKDIR
+    #define HAVE_RMDIR
+
+  To work around the problem, add those definitions by hand.
+  It is possible that this problem happens only with X11R6
+  or that newer system versions have fixed it.
+
+  The 19.26 pretest was reported to work on SVR4.3 and on Freebsd.
+
+  Use i386-*-bsd386 for BSDI BSD/386; Emacs runs as of version 19.23.
+  Make on that system is broken; use GNU make instead.
+  Shell bugs in version 1.0 of BSD/386 cause configure
+  to do the wrong thing with --with-x-toolkit; the workaround is to edit
+  configure to run another shell such as bash.
+
+  For System V release 3, use i386-*-sysv3.
+  For System V release 4, use i386-*-sysv4.
+  For System V release 4.2, use i386-*-sysv4.2.
+
+  If you are using Xenix, see notes at end under Xenix.
+  If you are using Esix, see notes at end under Esix.
+  If you are using SCO Unix, see notes at end under SCO.
+
+  On 386bsd, netbsd and freebsd, you should use GNU make, not the
+  system's make.  Assuming it's installed as gmake, do `gmake install
+  MAKE=gmake'.
+
+  If you are using System V release 4.2, you may find that `cc -E'
+  puts spurious spaces in `src/xmakefile'.  If that happens,
+  specify CPP=/lib/cpp as an option when you run make.
+  There is no problem if you compile with GCC.
+    
+  Note that use of Linux with GCC 2.4 and the DLL 4.4 libraries
+  requires the experimental "net 2" network patches (no relation to
+  Berkeley Net 2).  There is a report that (some version of) Linux
+  requires including `/usr/src/linux/include/linux' in buffer.c
+  but no coherent explanation of why that might be so.  If it is so,
+  in current versions of Linux, something else should probably be changed.
+
+  Some sysV.3 systems seem to have bugs in `opendir';
+  for them, alter `config.h' to define NONSYSTEM_DIR_LIBRARY
+  and undefine SYSV_SYSTEM_DIR.
+
+  If you use optimization on V.3, you may need the option -W2,'-y 0'
+  to prevent certain faulty optimization.
+
+  On 386/ix, to link with shared libraries, add #define USG_SHARED_LIBRARIES
+  to config.h.
+
+  On SCO, there are problems in regexp matching when Emacs is compiled
+  with the system compiler.  The compiler version is "Microsoft C
+  version 6", SCO 4.2.0h Dev Sys Maintenance Supplement 01/06/93;
+  Quick C Compiler Version 1.00.46 (Beta).  The solution is to compile
+  with GCC.
+
+  On ISC systems (2.02 and more recent), don't try to use the versions
+  of X that come with the system; use XFree86 instead.
+
+  There is no consistency in the handling of certain system header files
+  on V.3.
+
+  Some versions have sys/sioctl.h, and require it in sysdep.c.
+  But some versions do not have sys/sioctl.h.
+  For a given version of the system, this may depend on whether you have
+  X Windows or TCP/IP.  Define or undefine NO_SIOCTL_H in config.h
+  according to whether you have the file.
+
+  Likewise, some versions have been known to need sys/ttold.h, sys/stream.h,
+  and sys/ptem.h included in sysdep.c.  If your system has these files,
+  try defining NEED_PTEM_H in config.h if you have trouble without it.
+
+  You may find that adding -I/usr/X/include or -I/usr/netinclude or both
+  to CFLAGS avoids compilation errors on certain systems.
+
+  Some versions convince sysdep.c to try to use `struct tchars'
+  but define `struct tc' instead; add `#define tchars tc'
+  to config.h to solve this problem.
+
+Iris 2500 and Iris 2500 Turbo (m68k-sgi-iris3.5 or m68k-sgi-iris3.6)
+
+  Version 18 was said to work; use m68k-sgi-iris3.5 for system version 2.5
+  and m68k-sgi-iris3.6 for system version 3.6.
+  Note that the 3030 is the same as the Iris 2500 Turbo.
+
+Iris 4D (mips-sgi-irix[456].*)
+
+  The 19.26 pretest was reported to work on IRIX 4.0.5 and 5.2.
+  19.23 was reported to work on IRIX 5.2, but you may need to install
+  the "compiler_dev.hdr.internal" subsystem in order to compile unexelfsgi.c.
+  19.22 was known to work on all Silicon Graphics machines running
+  IRIX 4.0.5 or IRIX 5.1.
+
+  Compiling with -O using IRIX compilers prior to 3.10.1 may not work.
+  Don't use -O or use GCC instead.
+
+  Most IRIX 3.3 systems do not have an ANSI C compiler, but a few do.
+  Compile Emacs 18 with the -cckr switch on these machines.
+
+  There is a bug in IRIX 3.3 that can sometimes leave ptys owned by root
+  with a permission of 622.  This causes malfunctions in use of
+  subprocesses of Emacs.  Irix versions 4.0 and later with GNU Emacs
+  versions 18.59 and later fix this bug.
+
+Masscomp (m68k-masscomp-rtu)
+
+  18.36 worked on a 5500DP running RTU v3.1a and compiler version 3.2
+  with minor fixes that are included in 18.37.  However, bizarre behavior
+  was reported for 18.36 on a Masscomp (model and version unknown but probably
+  a 68020 system).  The report sounds like a compiler bug.
+
+  A compiler bug affecting statements like 
+    unsigned char k; unsigned char *p;... x = p[k];
+  has been reported for "C version 1.2 under RTU 3.1".  We do not wish
+  to take the time to install the numerous workarounds required to
+  compensate for this bug.
+
+  For RTU version 3.1, define FIRST_PTY_LETTER to be 'p' in `src/s/rtu.h'
+  (or #undef and redefine it in config.h) so that ptys will be used.
+
+  GNU Emacs is said to have no chance of compiling on RTU versions
+  prior to v3.0.
+
+Megatest (m68k-megatest-bsd)
+
+  Emacs 15 worked; do not have any reports about Emacs 16 or 17
+  but any new bugs are probably not difficult.
+
+Mips (mips-mips-riscos, mips-mips-riscos4.0, or mips-mips-bsd)
+
+  The C compiler on Riscos 4.51 dumps core trying to optimize
+  parts of Emacs.  Try without optimization or try GCC.
+
+  Meanwhile, the linker on that system returns success even if
+  there are undefined symbols; as a result, configure gets the
+  wrong answers to various questions.  No work-around is known
+  except to edit src/config.h by hand to indicate which functions
+  don't exist.
+
+  Use mips-mips-riscos4.0 for RISCOS version 4.
+  Use mips-mips-bsd with the BSD world.
+
+  Note that the proper configuration names for DECstations are
+  mips-dec-ultrix and mips-dec-osf.
+
+  If you are compiling with GCC, then you must run fixincludes;
+  the alternative of using -traditional won't work because
+  the definition of SIGN_EXTEND_CHAR uses the keyword `signed'.
+
+  If the SYSV world is the default, then you probably need the following
+  line in etc/Makefile:
+
+    CFLAGS= -g -systype bsd43
+
+  Some operating systems on MIPS machines give SIGTRAP for division by
+  zero instead of the usual signals.  The only real solution is to fix
+  the system to give a proper signal.
+
+  In the meantime, you can change init_data in data.c if you wish.
+  Change it to handle SIGTRAP as well as SIGFPE.  But this will have a
+  great disadvantage: you will not be able to run Emacs under a
+  debugger.  I think crashing on division by zero is a lesser problem.
+
+  dsg@mitre.org reported needing to use --x-libraries=/bsd43/usr/lib
+  on a riscos4bsd site.  But it is not clear whether this is needed in
+  general or only because of quirks on a particular site.
+
+National Semiconductor 32000 (ns32k-ns-genix)
+
+  This is for a complete machine from National Semiconductor,
+  running Genix.  Changes merged in version 19.
+
+NCR Tower 32 (m68k-ncr-sysv2 or m68k-ncr-sysv3)
+
+  If you are running System V release 2, use m68k-ncr-sysv2.
+  If you are running System V release 3, use m68k-ncr-sysv3.
+
+  These both worked as of 18.56.  If you change `src/ymakefile' so that
+  CFLAGS includes C_OPTIMIZE_SWITCH rather than C_DEBUG_SWITCH, check
+  out the comments in `src/m/tower32.h' (for System V release 2) or
+  `src/m/tower32v3.h' (for System V release 3) about this.
+
+  There is a report that compilation with -O did not work with 18.54
+  under System V release 2.
+
+NCR Intel system (i386-ncr-sysv4.2)
+
+  This system works in 19.31, but if you don't link it with GNU ld,
+  you may need to set LD_RUN_PATH at link time to specify where
+  to find the X libraries.
+
+NeXT (m68k-next-nextstep)
+
+  Emacs 19 has not been tested extensively yet, but it seems to work
+  in a NeXTStep 3.0 terminal window, and under the X server called
+  co-Xist.  You may need to specify -traditional when src/Makefile
+  builds xmakefile.
+
+  NeXT users might want to implement direct operation with NeXTStep,
+  but from the point of view of the GNU project, that is a
+  distraction.
+
+  Thanks to Thorsten Ohl for working on the NeXT port of Emacs 19.
+
+Nixdorf Targon 31 (m68k-nixdorf-sysv)
+
+  Machine description file for version 17 is included in 18
+  but whether it works is not known.
+  `src/unexec.c' bombs if compiled with -O.
+  Note that the "Targon 35" is really a Pyramid.
+
+Nu (TI or LMI) (m68k-nu-sysv)
+
+  Version 18 is believed to work.
+
+Paragon OSF/1 (i860-intel-osf1)
+
+  Changes merged in 19.29.
+
+  There is a bug in OSF/1 make which claims there is a syntax error
+  in the src/xmakefile.  You can successfully build emacs with:
+
+        pmake MAKE=pmake
+
+Plexus (m68k-plexus-sysv)
+
+  Worked as of 17.56.
+
+Pmax (DEC Mips)  (mips-dec-ultrix or mips-dec-osf1)
+
+  See under DECstation, above.
+
+Prime EXL (i386-prime-sysv)
+
+  Minor changes merged in 19.1.
+
+Pyramid (pyramid-pyramid-bsd)
+
+  The 19.26 pretest was observed to work on OSx 5.0, but it is necessary
+  to edit gmalloc.c.  You must add #include <sys/types.h> at the top,
+  and delete the #define for size_t.
+
+  You need to build Emacs in the Berkeley universe with
+  the `ucb' command, as in `ucb make' or `ucb build-install'.
+  
+  In OSx 4.0, it seems necessary to add the following two lines
+  to `src/m/pyramid.h':
+     #define _longjmp longjmp
+     #define _setjmp setjmp
+
+  In Pyramid system 2.5 there has been a compiler bug making
+  Emacs crash just after screen-splitting with Qnil containing 0.
+  A compiler that fixes this is Pyramid customer number 8494,
+  internal number 1923.
+
+  Some versions of the pyramid compiler get fatal
+  errors when the -gx compiler switch is used; if this
+  happens to you, change `src/m/pyramid.h' to define
+  C_DEBUG_SWITCH with an empty definition.
+
+  Some old system versions may require you to define PYRAMID_OLD
+  in when alloca.s is preprocessed, in order to define _longjmp and _setjmp.
+
+Sequent Balance (ns32k-sequent-bsd4.2 or ns32k-sequent-bsd4.3)
+
+  Emacs 18.51 worked on system version 3.0.  18.52 is said to work.
+  Delete some lines at the end of `src/m/sequent.h' for earlier system
+  versions.
+
+Sequent Symmetry (i386-sequent-bsd, i386-sequent-ptx)
+
+  Emacs 19 should work on Dynix (BSD).  However, if you compile with
+  the Sequent compiler, you may find Emacs does not restore the
+  terminal settings on exit.  If this happens, compile with GCC.
+
+  Emacs 19.27 contains patches that should support
+  DYNIX/ptx 1.4 and 2.1 with the native cc compiler.
+
+  Gcc can't compile src/process.c due to a non-standard Sequent asm
+  keyword extension supported by cc and used for the network byte/word
+  swapping functions in the PTX /usr/include/netinet/in.h file.  Gcc
+  2.5.8 includes the file <sys/byteorder.h> which can be included into
+  netinet/in.h to perform these byte/word swapping functions in the
+  same manner.  Patches have been submitted to the FSF against gcc
+  2.6.0 to fix this problem and allow Emacs to be built with gcc.
+
+  If your machine does not have TCP/IP installed, you will have to edit the
+  src/s/ptx.h file and comment out #define TCPIP_INSTALLED.
+
+Siemens Nixdorf RM600 and RM400 (mips-siemens-sysv4)
+
+  Changes merged in 19.29.  This configuration should also work for
+  Pyramid MIS Server running DC-OSX 1.x.  The version configured with
+  `--with-x' works without any modifications, but `--with-x-toolkit'
+  works only if the Athena library and the Toolkit library are linked
+  statically.  For this, edit `src/Makefile' after the `configure' run
+  and modify the lines with `-lXaw' and `-lXt' as follows:
+
+    LIBW= /usr/lib/libXaw.a
+    LIBXT= $(LIBW) -lXmu /usr/lib/libXt.a $(LIBXTR6) -lXext
+
+SONY News (m68k-sony-bsd4.2 or m68k-sony-bsd4.3)
+
+  18.52 worked.  Use m68k-sony-bsd4.3 for system release 3.
+
+SONY News 3000 series (RISC NEWS) (mips-sony-bsd)
+
+  The 19.26 pretest is reported to work.
+
+  Some versions of the operating system give SIGTRAP for division by zero
+  instead of the usual signals.  This causes division by zero
+  to make Emacs crash.  The system should be fixed to give the proper signal.
+  Changing Emacs is not a proper solution, because it would prevent
+  Emacs from working under any debugger.  But you can change init_data
+  in data.c if you wish.
+
+Stardent i860 (i860-stardent-sysv4.0)
+
+  19.26 pretest reported to work.
+
+Stardent 1500 or 3000
+
+  See Titan.
+
+Stride (m68k-stride-sysv)
+
+  Works (most recent news for 18.30) on their release 2.0.
+  For release 2.2, see the end of `src/m/stride.h'.
+  It may be possible to run on their V.1 system but changes
+  in the s- file would be needed.
+
+Sun 3, Sun 4 (sparc), Sun 386 (m68k-sun-sunos, sparc-sun-sunos, i386-sun-sunos,
+                              sparc-sun-sunos4shr, sparc-sun-solaris2.*,
+                              i386-sun-solaris2.*)
+
+  19.26 is believed to work on Sparcs and Sun 3's.  Some people report
+  that Emacs crashes immediately on startup when used with a non-X
+  terminal, but we think this is due to compiling with GCC and failing
+  to use GCC's "fixed" system header files.
+
+  Some Sun versions of X windows use the clipboard, not the selections,
+  for transferring text between clients.  The Cut, Paste and Copy items
+  in the menu bar Edit menu work with the clipboard.
+
+  It's important to include the SunOS version number in the
+  configuration name.  For example, for SunOS release 4.0 on a Sun 3,
+  use `m68k-sun-sunos4.0'; for SunOS release 4.1 on a Sparc, use
+  `sparc-sun-sunos4.1'.  For SunOS release 4.1.3 on a Sparc, use
+  `sparc-sun-sunos4.1.3'.  Use sunos4shr to link with shared libraries
+  on Sunos 4.1.
+
+  (FSF MACHINES file says use of shared libraries does not work with
+  X11R5 or X11R6 on Sunos 4 as of 19.26, but I think this does not
+  apply to XEmacs.)
+
+  Use `m68k' for the 68000-based Sun boxes, `sparc' for Sparcstations,
+  and `i386' for Sun Roadrunners.  i386 calls for Sunos4.0.
+
+  Do not define the environment variable 'KEEP_STATE' while running
+  `configure'.
+
+  FSF MACHINES file says the following: (may not apply to XEmacs)
+
+  If you compile with Sun's ANSI compiler acc, you need additional options
+  when linking temacs, such as
+     /usr/lang/SC2.0.1/values-Xt.o -L/usr/lang/SC2.0.1/cg87 -L/usr/lang/SC2.0.1
+  (those should be added just before the libraries) and you need to
+  add -lansi just before -lc.  The precise file names depend on the
+  compiler version, so we cannot easily arrange to supply them.
+
+  On SunOS 4.1.1, do not use /usr/5bin/cc.  You can use gcc or/usr/bin/cc.
+  Make sure the environment variable LD_LIBRARY_PATH is not defined.
+
+  Some people report crashes on SunOS 4.1.3 if SYSTEM_MALLOC is defined.
+  Others have reported that Emacs works if SYSTEM_MALLOC is defined, and not
+  if it is undefined.  So far we do not know why results vary in this way.
+  The sources are set up so that SYSTEM_MALLOC is defined; if that crashes,
+  or if you want the benefit of the relocating memory allocator, you can
+  try enabling the #undef SYSTEM_MALLOC in src/s/sunos4-1-3.h.
+
+  On Solaris 2, you need to install patch 100947-02 to fix a system bug.
+  Presumably this patch comes from Sun.  You must alter the definition of
+  LD_SWITCH_SYSTEM if your X11 libraries are not in /usr/openwin/lib.
+  You must make sure that /usr/ucblib is not in your LD_LIBRARY_PATH.
+
+  On Solaris 2.2, with a multiprocessor SparcCenter 1000, Emacs 19.17 is
+  reported to hang sometimes if it exits while it has one or more
+  subprocesses (e.g. the `wakeup' subprocess used by `display-time').
+  Emacs and its subprocesses become zombies, and in their zombie state
+  slow down their host and disable rlogin and telnet.  This is most
+  likely due to a bug in Solaris 2.2's multiprocessor support,
+  rather than an Emacs bug.
+
+  On Solaris, do not use /usr/ucb/cc.  Use /opt/SUNWspro/bin/cc.  Make
+  sure that /usr/ccs/bin and /opt/SUNWspro/bin are in your PATH before
+  /usr/ucb.  (Most free software packages have the same requirement on
+  Solaris.)
+
+  If you have trouble using open-network-stream, get the distribution
+  of `bind' (the BSD name-server), build libresolv.a, and link Emacs
+  with -lresolv, by copying the #definition of LIBS_SYSTEM in
+  src/s/sunos4-1.h to src/config.h.  This problem is due to obsolete
+  software in the nonshared standard library.
+
+  If you want to use SunWindows, define HAVE_SUN_WINDOWS
+  in config.h to enable a special interface called `emacstool'.
+  The definition must *precede* the #include "machine.h".
+  System version 3.2 is required for this facility to work.
+
+  We recommend that you instead use the X window system, which
+  has technical advantages, is an industry standard, and is also
+  free software.  The FSF does not support the SunWindows code;
+  we installed it only on the understanding we would not let it
+  divert our efforts from what we think is important.
+
+  If you are compiling for X windows, and the X window library was
+  compiled to use the 68881, then you must edit config.h according
+  the comments at the end of `src/m/sun3.h'.
+
+  Note that Emacs on a Sun is not really as big as it looks.
+  As dumped, it includes around 200k of zeros between the
+  original text section and the original data section
+  (now remapped as part of the text).  These are never
+  swapped in.
+
+  To build a single Emacs that will run on Sun 2 and Sun 3
+  HARDWARE, just build it on the Sun 2.
+
+  On Sunos 4.1.3, the word is that Emacs can loop infinitely
+  on startup with X due perhaps to a bug in Sunos.  Installing all of
+  these Sun patches fixes the problem.  We don't know which of them
+  are really relevant.
+
+    100075-11 100224-06 100347-03 100482-05 100557-02 100623-03 100804-03
+    101080-01 100103-12 100249-09 100496-02 100564-07 100630-02 100891-10
+    101134-01 100170-09 100296-04 100377-09 100507-04 100567-04 100650-02
+    101070-01 101145-01 100173-10 100305-15 100383-06 100513-04 100570-05
+    100689-01 101071-03 101200-02 100178-09 100338-05 100421-03 100536-02
+    100584-05 100784-01 101072-01 101207-01
+
+Tadpole 68K (m68k-tadpole-sysv)
+
+  Changes merged in 19.1.
+
+  You may need to edit Makefile to change the variables LIBDIR and
+  BINDIR from /usr/local to /usr/contrib.
+
+  To give movemail access to /usr/mail, you may need to execute
+
+    chmod 2755 etc/movemail; chgrp mail etc/movemail
+
+Tahoe (tahoe-tahoe-bsd4.2 or tahoe-tahoe-bsd4.3)
+
+  18.52 was known to work on some Tahoes, but a compiler bug intervenes
+  on others.  Some Emacs versions have worked in Unisys 1r4
+  (not in 1r3) and CCI I.21.
+
+  If you have trouble compiling `lib-src/loadst.c', turn off the definition
+  of DKSTAT_HEADER_FILE in `src/m/tahoe.h'.
+
+Tandem Integrity S2 (mips-tandem-sysv)
+
+  Changes merged in 18.56 but subprocess support is turned off.
+  You will probably want to see if you can make subprocesses work.
+
+  You must edit `lib-src/Makefile' to define LOADLIBES = -mld.
+
+Tektronix XD88 (m88k-tektronix-sysv3*)
+
+  The 19.26 pretest was reported to work.
+  Minor changes merged in 19.19.
+
+Tektronix 16000 box (6130?) (ns16k-tektronix-bsd)
+
+  Emacs 17.61 worked.
+
+Tektronix 4300 (m68k-tektronix-bsd)
+
+  Emacs 19.26 pretest reported to work.
+
+Titan P2 or P3 (titan-titan-sysv)
+
+  Changes probably merged in version 19.
+
+Ustation E30 (SS5E) (m68k-unisys-unipl)
+
+  Changes merged in 18.52; don't know whether they work.
+
+Vaxen running Berkeley Unix (vax-dec-bsd4.1, vax-dec-bsd4.2, vax-dec-bsd4.3),
+             Ultrix (vax-dec-ultrix),
+              System V (vax-dec-sysv0, vax-dec-sysv2), or
+              VMS (vax-dec-vms)
+
+  Works.
+
+  See under Ultrix for problems using X windows on Ultrix (vax-dec-ultrix).
+
+  18.27 worked on System V rel 2 (vax-dec-sysv2).
+
+  18.36 worked on System V rel 0 (vax-dec-sysv0).
+
+  Richard Levitte <levitte@e.kth.se> distributes a set of patches to
+  Emacs 18.59 to make it work nicely under VMS.  Emacs 19 probably
+  won't work very well, or even compile.  Levitte is working on a
+  port, so these problems should be fixed in the near future.
+
+Whitechapel MG1 (ns16k-whitechapel-?)
+
+  May work.  Supposedly no changes were needed except in `src/m/mg1.h'
+  file.  I do not know what Unix version runs on them.
+
+Wicat (m68k-wicat-sysv)
+
+  Changes merged as of 18.6; whether they work is unknown.
+  See comments in `src/m/wicat.h' for things you should change
+  depending on the system and compiler version you have.
+\f
+Here are notes about some of the systems supported:
+
+Berkeley 4.1 (bsd4.1)
+
+  Works on vaxes.
+
+Berkeley 4.2 (bsd4.2)
+
+  Works on several machines.
+
+Berkeley 4.3 (bsd4.3)
+
+  Works, on Vaxes at least.
+
+Esix
+
+  The following was written for Emacs 18.59 and has been
+  slightly adapted for Emacs 19.  It may need more change to be correct.
+
+  Use s/usg5-4.h for Esix System V 4.0.[34] systems if you also have
+  XFree86.  If you insist on using the Esix X Window libraries, good
+  luck.  s/esix5r4.h provides a starting point, but doesn't seem to
+  work consistently.  The basic problems involve the need to load
+  -lX11 *last* in the link command, and even then some things break.
+  You get best results by installing XFree86 and forgetting about the
+  Esix stuff unless you want to run IXI xdt3, which really only needs
+  the Esix X11 shared libraries.
+
+  To compile with XFree86, make sure that your LD_LIBRARY_PATH
+  contains /usr/X386/lib.  Be careful if you also have the Esix X
+  Window libraries that /usr/X386/lib appears *first* in the
+  LD_LIBRARY_PATH.  Then define C_SWITCH_X_SYSTEM -I/usr/X386/include.
+
+Microport
+
+  See under "Intel 386".
+
+SCO Unix
+  If you have TCP but not X, you need to edit src/s/sco4.h
+  to define HAVE_SOCKETS.
+
+  If you are using MMDF instead of sendmail, you need to remove
+  /usr/lib/sendmail or modify lisp/paths.el before compiling.
+  lisp/paths.el (which is loaded during the build) will attempt to use
+  sendmail if it exists.
+
+  If you are using SMAIL, you need to define the macro
+  SMAIL in config.h.
+
+System V rel 0 (usg5.0)
+
+  Works, on Vaxes and 3bxxx's.
+  There are some problems in 18.37 due to shortnames/cccp problems:
+  use the emacs 17 cpp if you have it.
+
+System V rel 2 (usg5.2)
+
+  Works on various machines.
+  On some (maybe all) machines the library -lPW exists and contains
+  a version of `alloca'.  On these machines, to use it, put
+     #define HAVE_ALLOCA
+     #define LIB_STANDARD -lPW -lc
+  in the `src/m/MACHINENAME.h' file for the machine.
+
+  If you find that the character Meta-DEL makes Emacs crash,
+  find where function init_sys_modes in sysdep.c sets sg.c_cc[VQUIT]
+  and make it store 7 there.  I have as yet no evidence of whether
+  this problem, known in HP/UX, exists in other system V versions.
+
+System V rel 2.2 (usg5.2.2)
+
+  In 5.2.2 AT&T undid, incompatibly, their previous incompatible
+  change to the way the nlist library is called.  A different s- file
+  is used to enable the other interface.
+
+  They call themselves the right choice--can't they choose?
+
+  Emacs version 18 unexec is currently not working properly
+  on 5.2.2.  Nobody knows why yet.  A workaround is to define
+  NO_REMAP.  It is not yet known whether this applies to all
+  machines running 5.2.2.
+
+System V rel 3 (usg5.3)
+
+  Some versions of this system support ptys and BSD-style sockets.
+  On such systems, you should define HAVE_PTYS and HAVE_SOCKETS in config.h.
+
+  If you want to link Emacs with shared libraries, define
+  USG_SHARED_LIBRARIES.
+
+  You may have to add ANSI idempotence #-lines to your sys/types.h
+  file to get Emacs to compile correctly.  This may be necessary on
+  other pre-ANSI systems as well.
+
+  On an AT&T 6386WGS using System V Release 3.2 and X11R3, the X support
+  cannot be made to work.  Whether or not the GNU relocating malloc is
+  used, the symptom is that the first call Emacs makes to sbrk(0) returns
+  (char *)-1.  Sorry, you're stuck with character-only mode.  Try
+  installing Xfree86 to fix this.
+
+System V rel 4.0.3 and 4.0.4 (usg5.4)
+
+  Supported, including shared libraries for ELF, but ptys do not work
+  because TIOCGPGRP fails to work on ptys (but Dell 2.2 seems to have
+  fixed this).  This failure is probably due to a misunderstanding of
+  the consequences of the POSIX spec: many system designers mistakenly
+  think that POSIX requires this feature to fail.  This is untrue;
+  ptys are an extension, and POSIX says that extensions *when used*
+  may change the action of standard facilities in any fashion.
+
+  If you get compilation errors about wrong number of
+  arguments to getpgrp, define GETPGRP_NO_ARG.
+
+  The standard C preprocessor may generate xmakefile incorrectly.  However,
+  /lib/cpp will work, so use `make CPP=/lib/cpp'.  Standard cpp
+  seems to work OK under Dell 2.2.
+
+  Some versions 3 and earlier of V.4, on the Intel 386 and 860, had
+  problems in the X11 libraries.  These prevent Emacs from working
+  with X.  You can use Emacs with X provided your copy of X is based
+  on X11 release 4 or newer, or is Dell's 2.2 (which is a 4.0.3).
+  Unfortunately, the only way you can tell whether your X11 library is
+  new enough is to try compiling Emacs to use X.  If emacs runs, your
+  X11 library is new enough.
+
+  In this context, GSV4 and GSV4i are alternate names for X11R4.
+  OL2.* is X11R3 based.  OL3 is in between X11R3 and X11R4, and may or
+  may not work, depending on who made the Unix system.  If the library
+  libXol is part of the X distribution, then you have X11R3 and Emacs
+  won't work with X.
+
+  Most versions of V.4 support sockets.  If `/usr/lib/libsocket.so'
+  exists, your system supports them.  If yours does not, you must add
+  #undef HAVE_SOCKETS in config.h, after the inclusion of s-usg5-4.h.
+  (Any system that supports Internet should implement sockets.)
+
+Ultrix (bsd4.3)
+
+  Recent versions of Ultrix appear to support the features of Berkeley 4.3.
+  Ultrix was at the BSD 4.2 level for a long time after BSD 4.3 came out.
+
+  Ultrix 3.0 has incompatibilities in its X library if you have the
+  Ultrix version of X (UWS version 2.0).  To solve them, you need to
+  prevent XvmsAlloc.o in Xlib from being used.  Israel Pinkas says:
+
+    I added the following lines to config.h after the X defines:
+
+    #if defined(ultrix) && defined(X11)
+    #define OBJECTS_SYSTEM calloc.o
+    #endif
+
+    Then I ran the following:
+
+    ar x /usr/lib/libc.a calloc.o
+
+  The problem is said to be gone in UWS version 2.1.
+
+Uniplus 5.2 (unipl5.2)
+
+  Works, on Dual machines at least.
+
+VMS (vmsM.N)
+
+  Richard Levitte <levitte@e.kth.se> distributes a set of patches to
+  Emacs 18.59 to make it work nicely under VMS.  Emacs 19 probably
+  won't work very well, or even compile.  Levitte is working on a
+  port, so these problems should be fixed in the near future.
+
+  Note that Emacs for VMS is usually distributed in a special VMS
+  distribution.  See the file ../vms/VMSINSTALL for info on moving
+  Unix distributions to VMS, and other VMS-related topics.
+
+Xenix (xenix)
+
+  Should work in 18.50, but you will need to edit the files
+  `lib-src/Makefile' and `src/ymakefile'
+  (see the comments that mention "Xenix" for what to change.)
+  Compiling Emacs with -O is said not to work.
+
+  If you want Emacs to work with Smail (installed as /usr/bin/smail)
+  then add the line   #define SMAIL  to config.h.
+
+  The file etc/XENIX suggests some useful things to do to Xenix
+  to make the Emacs meta key work.
+\f
+Local variables:
+mode: indented-text
+fill-prefix: "  "
+End:
diff --git a/etc/MAILINGLISTS b/etc/MAILINGLISTS
new file mode 100644 (file)
index 0000000..2bab54a
--- /dev/null
@@ -0,0 +1,1206 @@
+
+          XEmacs Electronic Mailing Lists.  Last Modified: 1997-01-13
+
+XEmacs has its own mailing list and newsgroup which are distinct from
+the FSF GNU Emacs mailing lists and newsgroups.  The mailing list is:
+
+   xemacs@xemacs.org   For reporting all bugs in XEmacs, including bugs
+                       in the compilation and installation procedures.
+                       Also for all random questions and conversation
+                       about XEmacs.
+
+This mailing list is bidirectionally gatewayed into the USENET newsgroup
+comp.emacs.xemacs.
+
+To be added or removed from this mailing list, send mail to
+xemacs-request@xemacs.org (If it is possible for you to read the
+messages via the newsgroup, we would prefer that; the fewer people there
+are on the mailing list, the less trouble it is to maintain.)
+
+Please do NOT send messages about problems with XEmacs to the FSF GNU
+Emacs newsgroups and mailing lists (listed below) unless you are sure
+that the problem you are reporting is a problem with both versions of
+GNU Emacs.  People who aren't subscribed to the XEmacs mailing list most
+likely are not interested in hearing about problems with it.
+
+The XEmacs mailing list is archived at ftp://ftp.xemacs.org/pub/xemacs/mlists/.
+
+See the file etc/BETA for more information about mailing lists for use
+by beta testers and XEmacs developers.
+
+IMPORTANT IMPORTANT IMPORTANT:
+
+Aside from the names of the mailing lists and newsgroups corresponding
+to this version of Emacs, the guidelines enumerated below still apply.
+Please read them before sending a message.
+
+-----------------------------------------------------------------------
+      GNU Project Electronic Mailing Lists and gnUSENET Newsgroups
+                        Last Updated 1 July 97
+
+          Please report improvements to: gnu@prep.ai.mit.edu
+
+* GNU mailing lists are also distributed as USENET news groups
+
+The mailing lists are gated both ways with the gnu.all newsgroups at
+ohio-state.edu.  The one-to-one correspondence is indicated below.  If
+you don't know if your site is on USENET, ask your system administrator.
+If you are a USENET site and don't get the gnu.all newsgroups, please
+ask your USENET administrator to get them.  If he has your feeds ask
+their feeds, you should win.  And everyone else wins: newsgroups make
+better use of the limited bandwidth of the computer networks and your
+home machine than mailing list traffic; and staying off the mailing
+lists make better use of the people who maintain the lists and the
+machines that the GNU people working with rms use (i.e. we have more
+time to produce code!!).  Thanx.
+
+* Getting the mailing lists directly
+
+If several users at your site or local network want to read a list and
+you aren't a USENET site, Project GNU would prefer that you would set up
+one address that redistributes locally.  This reduces overhead on our
+people and machines, your gateway machine, and the network(s) used to
+transport the mail from us to you.
+
+* How to subscribe to and report bugs in mailing lists
+
+Send messages ABOUT these lists, such as reports of mail problems, or
+requests to be added or removed, to help-gnu-emacs-request (or
+info-gnu-request, bug-gdb-request, etc.), NOT to info-gnu-emacs (or
+info-gnu, etc.).  These <LIST_NAME>-request addresses go only to the
+people who can do something about your requests or problems, and thus
+avoids disturbing everyone else.
+
+Note that all GNU mailing lists are maintained by volunteers.  They get
+behind occasionally.  Wait at least 3 or 4 days before asking again.
+Thanks!
+
+Many of the GNU mailing lists are very large and are received by many
+people.  Please don't send them anything that is not seriously important
+to all their readers.  All GNU mailing lists are unmoderated, mail
+reflectors, except info-gnu, info-gnu-emacs, info-gcc, info-g++,
+info-gnu-fortran.
+
+All addresses below are in internet format.  Consult the mail guru for
+your computer to figure out address syntaxes from other networks.  From
+UUCP machines:
+       ..!ucbvax!prep.ai.mit.edu!ADDRESS
+       ..!uunet!prep.ai.mit.edu!ADDRESS
+
+If a message you mail to a list is returned from a MAILER-DAEMON (often
+with the line:
+      ----- Transcript of session follows -----
+ don't resend the message to the list.  All this return means is that
+your original message failed to reach a few addresses on the list.  Such
+messages are NEVER a reason to resend a piece of mail a 2nd time.  This
+just bothers all (less the few delivery failures (which will probably
+just fail again!)) of the readers of the list with a message they have
+already seen.  It also wastes computer and network resources.
+
+It is appropriate to send these to the -request address for a list, and
+ask them to check the problem out.
+
+* Send Specific Requests for Information to: gnu@prep.ai.mit.edu
+
+Specific requests for information about obtaining GNU software, or GNU
+activities in Cambridge and elsewhere can be directed to:
+       gnu@prep.ai.mit.edu
+
+* General Information about all lists
+
+Please keep each message under 25,000 characters.  Some mailers bounce
+messages that are longer than this.  If your message is long, it is
+generally better to send a message offering to make the large file
+available to only those people who want it (e.g. mailing it to people
+who ask, or putting it up for FTP).  In the case of gnu.emacs.sources,
+somewhat larger postings (up to 10 parts of no more than 25,000
+characters each) are acceptable (assuming they are likely to be of
+interest to a reasonable number of people); if it is larger than that
+have it added to archive.cis.ohio-state.edu (the GNU Emacs Lisp ftp and
+uucp archive on and announce) its location there.  Good bug reports are
+short.  See section '* General Information about bug-* lists and ...'
+for further details.
+
+Most of the time, when you reply to a message sent to a list, the reply
+should not go to the list.  But most mail reading programs supply, by
+default, all the recipients of the original as recipients of the reply.
+Make a point of deleting the list address from the header when it does
+not belong.  This prevents bothering all readers of a list, and reduces
+network congestion.
+
+The GNU mailing lists and newsgroups, like the GNU project itself, exist
+to promote the freedom to share software.  So don't use these lists to
+promote or recommend non-free software.  (Using them to post ordering
+information is the ultimate faux pas.)  If there is no free program to
+do a certain task, then somebody should write one!
+
+* General Information about info-* lists
+
+These lists and their newsgroups are meant for important announcements.
+Since the GNU project uses software development as a means for social
+change, the announcements may be technical or political.
+
+Most GNU projects info-* lists (and their corresponding gnu.*.announce
+newsgroups) are moderated to keep their content significant and
+relevant.  If you have a bug to report, send it to the bug-* list.  If
+you need help on something else and the help-* list exists, ask it.
+
+See section '* General Information about all lists'.
+
+* General Information about help-* lists
+
+These lists (and their newsgroups) exist for anyone to ask questions
+about the GNU software that the list deals with.  The lists are read by
+people who are willing to take the time to help other users.
+
+When you answer the questions that people ask on the help-* lists, keep
+in mind that you shouldn't answer by promoting a proprietary program as
+a solution.  The only real solutions are the ones all the readers can
+share.
+
+If a program crashes, or if you build it following the standard
+procedure on a system on which it is supposed to work and it does not
+work at all, or if an command does not behave as it is documented to
+behave, this is a bug.  Don't send bug reports to a help-* list; mail
+them to the bug-* list instead.
+
+See section '* General Information about all lists'.
+
+* General Information about bug-* lists and reporting program bugs
+
+If you think something is a bug in a program, it might be one; or, it
+might be a misunderstanding or even a feature.  Before beginning to
+report bugs, please read the section ``Reporting Emacs Bugs'' toward the
+end of the GNU Emacs reference manual (or node Emacs/Bugs in Emacs's
+built-in Info system) for a discussion of how and when to send in bug
+reports.  For GNU programs other than GNU Emacs, also consult their
+documentation for their bug reporting procedures.  Always include the
+version number of the GNU program, as well as the operating system and
+machine the program was ran on (if the program doesn't have a version
+number, send the date of the latest entry in the file ChangeLog).  For
+GNU Emacs bugs, type "M-x emacs-version".  A debugger backtrace of any
+core dump, can also be useful.  Be careful to separate out hypothesis
+from fact!  For bugs in GNU Emacs lisp, set variable debug-on-error to
+t, and re-enter the command(s) that cause the error message; Emacs will
+pop up a debug buffer if something is wrong; please include a copy of
+the buffer in your bug report.  Please also try to make your bug report
+as short as possible; distill the problem to as few lines of code and/or
+input as possible.  GNU maintainers give priority to the shortest, high
+quality bug reports.
+
+Please don't send in a patch without a test case to illustrate the
+problem the patch is supposed to fix.  Sometimes the patches aren't
+correct or aren't the best way to do the job, and without a test case
+there is no way to debug an alternate fix.
+
+The purpose of reporting a bug is to enable the bug to be fixed for the
+sake of the whole community of users.  You may or may not receive a
+response; the maintainers will send one if that helps them find or
+verify a fix.  Most GNU maintainers are volunteers and all are
+overworked; they don't have time to help individuals and still fix the
+bugs and make the improvements that everyone wants.  If you want help
+for yourself in particular, you may have to hire someone.  The GNU
+project maintains a list of people providing such services.  It is
+distributed with GNU Emacs in file etc/SERVICE, and can be requested
+from gnu@prep.ai.mit.edu.
+
+Anything addressed to the implementors and maintainers of a GNU program
+via a bug-* list, should NOT be sent to the corresponding info-* or
+help-* list.
+
+Please DON'T post your bug reports on the gnu.*.bug newsgroups!  Mail
+them to bug-*@prep instead!  At first sight, it seems to make no
+difference: anything sent to one will be propagated to the other; but:
+       - if you post on the newsgroup, the information about how to
+reach you is lost in the message that goes on the mailing list.  It
+can be very important to know how to reach you, if there is anything
+in the bug report that we don't understand;
+       - bug reports reach the GNU maintainers quickest when they are
+sent to the bug-* mailing list submittal address;
+       - mail is much more reliable then netnews; and
+       - if the internet mailers can't get your bug report delivered,
+they almost always send you an error message, so you can find another
+way to get the bug report in.  When netnews fails to get your message
+delivered to the maintainers, you'll never know about it and the
+maintainers will never see the bug report.
+
+And please DON'T post your GNU bug reports to comp.* or other gnu.*
+newsgroups, they never make it to the GNU maintainers at all.  Please
+mail them to bug-*@prep instead!
+
+See section '* General Information about all lists'.
+
+* info-gnu-request@prep.ai.mit.edu to subscribe to info-gnu
+** gnUSENET newsgroup: gnu.announce
+** Send announcements to: info-gnu@prep.ai.mit.edu
+
+This list distributes progress reports on the GNU Project.  It is also
+used by the GNU Project to ask people for various kinds of help.  It is
+NOT for general discussion.
+
+The list is filtered to remove items meant for info-gnu-request, that
+can be answered by the moderator without bothering the list, or should
+have been sent to another list.
+
+See section '* General Information about info-* lists'.
+
+* gnu-misc-discuss-request@prep.ai.mit.edu to subscribe to gnu-misc-discuss
+** gnUSENET newsgroup: gnu.misc.discuss
+** Send contributions to: gnu-misc-discuss@prep.ai.mit.edu
+
+This list is for serious discussion of freed software, the GNU Project,
+the GNU Manifesto, and their implications.  It's THE place for
+discussion that is not appropriate in the other GNU mailing lists and
+gnUSENET newsgroups.
+
+Flaming is out of place.  Tit-for-tat is not welcome.  Repetition
+should not occur.
+
+Good READING and writing are expected.  Before posting, wait a while,
+cool off, and think.
+
+Don't use this group for complaints and bug reports about GNU software!
+The maintainers don't read this group; they won't see your complaint.
+Use the appropriate bug-reporting mailing list instead, so that people
+who can do something about the problem will see it.
+
+Don't trust pronouncements made on gnu-misc-discuss about what GNU is,
+what FSF position is, what the GNU General Public License is, etc.,
+unless they are made by someone you know is well connected with GNU and
+are sure the message is not forged.
+
+USENET and gnUSENET readers are expected to have read ALL the articles
+in news.announce.newusers before posting.  If news.announce.newusers is
+empty at your site, wait (the articles are posted monthly), your posting
+isn't that urgent!  Readers on the Internet can anonymous FTP these
+articles from host ftp.uu.net under directory ??
+
+Someone from the Free Software Foundation will attempt to follow this
+group as time and volume permits.
+
+Remember, "GNUs Not Unix" and "gnUSENET is Not USENET".  We have
+higher standards!
+
+Note that sending technical questions about specific GNU software to
+gnu-misc-discuss is likely to be less useful than sending them to the
+appropriate mailing list or gnUSENET newsgroup, since more technical
+people read those.
+
+* bug-gnu-sql-request@prep.ai.mit.edu to subscribe to bug-gnu-sql
+** gnUSENET newsgroup: NONE PLANNED
+** GNU-SQL BUG reports to: bug-gnu-sql@prep.ai.mit.edu
+
+This list distributes, to the active maintainers of GNU's SQL (GNU's SQL
+full scale database server), bug reports and fixes for, and suggestions
+for improvements to GNU's SQL.  User discussion of GNU's SQL also occurs
+here.
+
+There are no other GNU mailing lists or gnUSENET newsgroups for GNU's SQL.
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* bug-guile-request@prep.ai.mit.edu to subscribe to bug-guile
+** gnUSENET newsgroup: NONE PLANNED
+** GUILE BUG reports to: bug-guile@prep.ai.mit.edu
+
+This list distributes, to the active maintainers of GUILE (GNU's
+Ubiquitous Extension Language), bug reports and fixes for, and suggestions for
+improvements to GUILE.  User discussion of GUILE also occurs here.
+
+There are no other GNU mailing lists or gnUSENET newsgroups for GUILE .
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* guile-sources-request@prep.ai.mit.edu to subscribe to guile-sources
+** gnUSENET newsgroup: NONE PLANNED
+** Guile source code to: guile-sources@prep.ai.mit.edu
+
+This list will be for the posting, by their authors, of GUILE, Scheme,
+and C sources and patches that improve Guile.  Its contents will be
+reviewed by the FSF for inclusion in future releases of GUILE.
+
+Please do NOT discuss or request source code here.  Use bug-guile for
+those purposes.  This allows the automatic archiving of sources posted
+to this list.
+
+Please do NOT post such sources to any other GNU mailing list (e.g
+bug-guile) or gnUSENET newsgroups.  It's up to each poster to decide
+whether to cross-post to any non-gnUSENET newsgroup.
+
+Please do NOT announce that you have posted source code to guile.sources
+to any other GNU mailing list (e.g. bug-guile) or gnUSENET newsgroups.
+People who want to keep up with sources will read this list.  It's up to
+each poster to decide whether to announce a guile.sources article in any
+non-gnUSENET newsgroup (e.g. comp.emacs or comp.sources.d).
+
+If source or patches that were previously posted or a simple fix is
+requested in bug-guile, please mail it to the requester.  Do NOT
+repost it.  If you also want something that is requested, send mail to
+the requester asking him to forward it to you.  This kind of traffic is
+best handled by e-mail, not by a broadcast medium that reaches millions
+of sites.
+
+If the requested source is very long (>10k bytes) send mail offering to
+send it.  This prevents the requester from getting many redundant copies
+and saves network bandwidth.
+
+* bug-gnustep-request@prep.ai.mit.edu to subscribe to bug-gnustep
+** gnUSENET newsgroup: gnu.gnustep.bug
+** Gnustep bug reports to: bug-gnustep@prep.ai.mit.edu
+** FAQ-URL: none known
+** FAQ-Archive-name: none known
+** FAQ-Posting-frequency: none known
+
+This list distributes bug reports for, fixes for bugs in, and
+suggestions for improvements in GNUstep to its active developers.
+
+Subscribers to bug-gnustep get all info-gnustep messages.
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* help-gnustep-request@prep.ai.mit.edu to subscribe to help-gnustep
+** gnUSENET newsgroup: gnu.gnustep.help        
+** Send contributions to: help-gnustep@prep.ai.mit.edu
+** FAQ-URL: none known
+** FAQ-Archive-name: none known
+** FAQ-Posting-frequency: none known
+
+This list is the place for users and installers of the GNUstep to ask
+for help.  Please send bug reports to bug-gnustep@prep.ai.mit.edu
+instead of posting them here.
+
+See section '* General Information about help-* lists'.
+
+* discuss-gnustep-request@prep.ai.mit.edu to subscribe to discuss-gnustep
+** gnUSENET newsgroup: gnu.gnustep.discuss     
+** Send contributions to: discuss-gnustep@prep.ai.mit.edu
+** FAQ-URL: none known
+** FAQ-Archive-name: none known
+** FAQ-Posting-frequency: none known
+
+This list is the place for GNUstep users and developers to discuss
+GNUstep.  Please send bug reports to bug-gnustep@prep.ai.mit.edu
+instead of posting them here.
+
+See section '* General Information about discuss-* lists'.
+
+* info-gnustep-request@prep.ai.mit.edu to subscribe to info-gnustep
+** gnUSENET newsgroup: gnu.gnustep.announce
+** Send announcements to: info-gnustep@prep.ai.mit.edu
+** FAQ-URL: none known
+** FAQ-Archive-name: none known
+** FAQ-Posting-frequency: none known
+
+This list distributes announcements and progress reports on GNUstep.
+It is NOT for general discussion; please use discuss-gnustep for that.
+
+The list is filtered to remove items meant for info-gnustep-request, that
+can be answered by the moderator without bothering the list, or should
+have been sent to another list.
+
+Do not report GNUstep bugs to info-gnustep, help-gnustep, or
+discuss-gnustep, mail them to bug-gnustep@prep.ai.mit.edu instead.
+
+See section '* General Information about info-* lists'.
+
+* bug-hurd-request@prep.ai.mit.edu to subscribe to bug-hurd
+** gnUSENET newsgroup: gnu.hurd.bug
+** Hurd bug reports to: bug-hurd@prep.ai.mit.edu
+
+This list distributes bug reports for, fixes for bugs in, and
+suggestions for improvements in the GNU Hurd to its active developers.
+
+No info-gnu-hurd list is planned.  Announcements about the GNU Hurd will
+be made to the list info-gnu@prep.ai.mit.edu (see above).
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* help-hurd-request@prep.ai.mit.edu to subscribe to help-hurd
+** gnUSENET newsgroup: gnu.hurd.help
+** Send contributions to: help-hurd@prep.ai.mit.edu
+
+This list is the place for users and installers of the GNU Hurd to ask
+for help.
+
+No info-gnu-hurd list is planned.  Announcements about the GNU Hurd will
+be made to the list info-gnu@prep.ai.mit.edu (see above).
+
+See section '* General Information about help-* lists'.
+
+* hurd-ann-request@prep.ai.mit.edu IS NOW DEFUNCT
+** gnUSENET newsgroup: NEVER EXISTED
+** DEAD address: hurd-ann@prep.ai.mit.edu
+
+This list is dead.  Announcements about the GNU Hurd will be made to the
+list info-gnu@prep.ai.mit.edu (see above).
+
+* bug-gnu-emacs-request@prep.ai.mit.edu to subscribe to bug-gnu-emacs
+** gnUSENET newsgroup: gnu.emacs.bug
+** Gnu Emacs bug reports to: bug-gnu-emacs@prep.ai.mit.edu
+
+This list distributes, to the active maintainers of GNU Emacs, bug
+reports and fixes for, and suggestions for improvements in GNU Emacs.
+
+Send bugs in the GNU Emacs Lisp reference manual to:
+       lisp-manual-bugs@prep.ai.mit.edu
+
+lisp-manual-bugs is neither a mailing list nor a gnUSENET newsgroup.
+It's just a bug-reporting address.
+
+Subscribers to bug-gnu-emacs get all info-gnu-emacs messages.
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* gnu-emacs-sources-request@prep.ai.mit.edu to subscribe to gnu-emacs-sources
+** gnUSENET newsgroup: gnu.emacs.sources
+** Gnu Emacs source code to: gnu-emacs-sources@prep.ai.mit.edu
+
+This list/newsgroup will be for the posting, by their authors, of Emacs
+Lisp and C sources and patches that improve GNU Emacs.  Its contents
+will be reviewed by the FSF for inclusion in future releases of GNU
+Emacs.
+
+Please do NOT discuss or request source code here.  Use
+help-gnu-emacs/gnu.emacs.help for those purposes.  This allows the
+automatic archiving of sources posted to this list/newsgroup.
+
+Please do NOT post such sources to any other GNU mailing list (e.g
+help-gnu-emacs) or gnUSENET newsgroups (e.g. gnu.emacs.help).  It's up
+to each poster to decide whether to cross-post to any non-gnUSENET
+newsgroup (e.g. comp.emacs or vmsnet.sources).
+
+Please do NOT announce that you have posted source code to
+gnu.emacs.sources to any other GNU mailing list (e.g. help-gnu-emacs) or
+gnUSENET newsgroups (e.g. gnu.emacs.help).  People who want to keep up
+with sources will read this list/newsgroup.  It's up to each poster to
+decide whether to announce a gnu.emacs.sources article in any
+non-gnUSENET newsgroup (e.g. comp.emacs or comp.sources.d).
+
+If source or patches that were previously posted or a simple fix is
+requested in help-gnu-emacs, please mail it to the requester.  Do NOT
+repost it.  If you also want something that is requested, send mail to
+the requester asking him to forward it to you.  This kind of traffic is
+best handled by e-mail, not by a broadcast medium that reaches millions
+of sites.
+
+If the requested source is very long (>10k bytes) send mail offering to
+send it.  This prevents the requester from getting many redundant copies
+and saves network bandwidth.
+
+* help-gnu-emacs-request@prep.ai.mit.edu to subscribe to help-gnu-emacs
+** gnUSENET newsgroup: gnu.emacs.help  (and one-way into comp.emacs)
+** Send contributions to: help-gnu-emacs@prep.ai.mit.edu
+
+This list is the place for users and installers of GNU Emacs to ask for
+help.  Please send bug reports to bug-gnu-emacs instead of posting them
+here.
+
+Since help-gnu-emacs is a very large list, send it only those items that
+are seriously important to many people.
+
+If source or patches that were previously posted or a simple fix is
+requested in help-gnu-emacs, please mail it to the requester.  Do NOT
+repost it.  If you also want something that is requested, send mail to
+the requester asking him to forward it to you.  This kind of traffic is
+best handled by e-mail, not a broadcast medium that reaches millions of
+sites.
+
+This list is also gated one way to USENET's newsgroup comp.emacs (once
+known as net.emacs).  This one-way gating is done for users whose sites
+get comp.emacs, but not gnu.emacs.help.  Users at non-USENET sites may
+receive all articles from comp.emacs by making their request to:
+unix-emacs-request@bbn.com
+
+If Emacs crashes, or if you build Emacs following the standard procedure
+on a system which Emacs is supposed to work on (see etc/MACHINES) and it
+does not work at all, or if an editing command does not behave as it is
+documented to behave, this is a bug.  Don't send bug reports to
+help-gnu-emacs (gnu.emacs.help) or post them to comp.emacs; mail them to
+bug-gnu-emacs@prep.ai.mit.edu instead.
+
+See section '* General Information about help-* lists'.
+
+* info-gnu-emacs-request@prep.ai.mit.edu to subscribe to info-gnu-emacs
+** gnUSENET newsgroup: gnu.emacs.announce      (and one-way into comp.emacs)
+** Send announcements to: info-gnu-emacs@prep.ai.mit.edu
+
+This list distributes announcements and progress reports on GNU Emacs.
+It is NOT for general discussion; please use help-gnu-emacs for that.
+
+The list is filtered to remove items meant for info-gnu-emacs-request,
+that can be answered by the moderator without bothering the list, or
+should have been sent to another list.
+
+info-gnu-emacs is also gated one way to USENET's newsgroup comp.emacs
+(once known as net.emacs).  This one-way gating is done for users whose
+sites get comp.emacs, but not gnu.emacs.announce.  Users at non-USENET
+sites may receive all articles from comp.emacs by making their request
+to: unix-emacs-request@bbn.com
+
+Do not report GNU Emacs bugs to info-gnu-emacs or comp.emacs, instead
+mail them to bug-gnu-emacs@prep.ai.mit.edu.
+
+See section '* General Information about info-* lists'.
+
+* vms-gnu-emacs-request@prep.ai.mit.edu to subscribe
+** gnUSENET newsgroup: gnu.emacs.vms
+** Send contributions to: vms-gnu-emacs@prep.ai.mit.edu
+
+This list was a working group who did the initial port of GNU Emacs to
+the VMS operating system.  It still discusses problems and solutions to
+the VMS port and the distribution of it.
+
+* bug-bash-request@prep.ai.mit.edu to subscribe to bug-bash
+** gnUSENET newsgroup: gnu.bash.bug
+** BASH bug reports to: bug-bash@prep.ai.mit.edu
+
+This list distributes, to the active maintainers of BASH (the Bourne
+Again SHell), bug reports and fixes for, and suggestions for
+improvements in BASH.  User discussion of BASH also occurs here.
+
+Always report the version number of the operating system, hardware, and
+bash (flag -version on startup or check the variable $BASH_VERSION in a
+running bash).
+
+There are no other GNU mailing lists or gnUSENET newsgroups for BASH.
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* bug-gdb-request@prep.ai.mit.edu to subscribe to bug-gdb
+** gnUSENET newsgroup: gnu.gdb.bug
+** GDB bug reports to: bug-gdb@prep.ai.mit.edu
+
+This list distributes, to the active maintainers of GDB (Gnu's
+DeBugger), bug reports and fixes for, and suggestions for improvements
+in GDB.
+
+There are no other GNU mailing lists or gnUSENET newsgroups for GDB.
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* bug-octave-request@che.utexas.edu to subscribe to bug-octave
+** gnUSENET newsgroup: NONE PLANNED
+** Octave bug reports to: bug-octave@che.utexas.edu
+
+This list distributes, to the active maintainers of Octave (a system
+for numerical computations), bug reports and fixes for, and
+suggestions for improvements to Octave.
+
+The help-octave mailing list is for user discussion of Octave.
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+
+* help-octave-request@che.utexas.edu to subscribe to help-octave
+** gnUSENET newsgroup: NONE PLANNED
+** Send contributions to: help-octave@che.utexas.edu
+
+This list is the place for users and installers of Octave to ask for
+help.  Please send bug reports to bug-octave instead of posting them
+here.
+
+If Octave crashes, or if you build Octave following the standard
+procedure on a system on which Octave is supposed to work on and it
+does not work at all, or if a command does not behave as it is
+documented to behave, this is a bug.  Don't send bug reports to
+help-octave; mail them to bug-octave@che.utexas.edu instead.
+
+See section '* General Information about help-* lists'.
+
+* bug-gcc-request@prep.ai.mit.edu to subscribe to bug-gcc
+** gnUSENET newsgroup: gnu.gcc.bug
+** GCC bug reports to: bug-gcc@prep.ai.mit.edu
+
+This list distributes bug reports for, fixes for bugs in, and
+suggestions for improvements in the GNU C Compiler to its active
+developers.
+
+Please don't send in a patch without a test case to illustrate the
+problem the patch is supposed to fix.  Sometimes the patches aren't
+correct or aren't the best way to do the job, and without a test case
+there is no way to debug an alternate fix.
+
+The most convenient form of test case is a piece of cpp output that can
+be passed directly to cc1.  Preferably written in C, not C++ or
+Objective C.
+
+Subscribers to bug-gcc get all info-gcc messages.
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* help-gcc-request@prep.ai.mit.edu to subscribe to help-gcc
+** gnUSENET newsgroup: gnu.gcc.help
+** Send contributions to: help-gcc@prep.ai.mit.edu
+
+This list is the place for users and installers of the GNU C Compiler to
+ask for help.
+
+If gcc crashes, or if you build gcc following the standard procedure on
+a system which gcc is supposed to work on (see config.sub) and it does
+not work at all, or if an command line option does not behave as it is
+documented to behave, this is a bug.  Don't send bug reports to help-gcc
+(gnu.gcc.help); mail them to bug-gcc@prep.ai.mit.edu instead.
+
+See section '* General Information about help-* lists'.
+
+* info-gcc-request@prep.ai.mit.edu to subscribe to info-gcc
+** gnUSENET newsgroup: gnu.gcc.announce
+** Send announcements to: info-gcc@prep.ai.mit.edu
+
+This list distributes announcements and progress reports on the GNU C
+Compiler.  It is NOT for general discussion; please use help-gcc for
+that.
+
+The list is filtered to remove items meant for info-gcc-request, that
+can be answered by the moderator without bothering the list, or should
+have been sent to another list.
+
+See section '* General Information about info-* lists'.
+
+* bug-gnu960-request@ichips.intel.com to subscribe to bug-gnu960
+** gnUSENET newsgroup: NONE PLANNED
+** Intel 960 Port bug reports to: bug-gnu960@ichips.intel.com
+
+This list distributes bug reports for, fixes for bugs in, and
+suggestions for improvements in Intel's port of GNU software to the
+Intel 960 microprocessor.
+
+You can also fax to: GNU/960 - 1-503-696-4930.
+
+There are no other GNU mailing lists or gnUSENET newsgroups for Intel's
+port of GNU software to the Intel 960 microprocessor.
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* bug-glibc-request@prep.ai.mit.edu to subscribe to bug-glibc
+** gnUSENET newsgroup: gnu.glibc.bug
+** GNU C Library bug reports to: bug-glibc@prep.ai.mit.edu
+
+This list distributes, to the active maintainers of glibc (GNU's C
+library), bug reports and fixes for, and suggestions for improvements in
+glibc.  User discussion of glibc also occurs here.
+
+Announcements of new releases of glibc are made on both info-gcc and
+bug-glibc.
+
+There are no other GNU mailing lists or gnUSENET newsgroups for the GNU
+C Library.
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* bug-g++-request@prep.ai.mit.edu to subscribe to bug-g++
+** gnUSENET newsgroup: gnu.g++.bug
+** G++ bug reports to: bug-g++@prep.ai.mit.edu
+
+This list distributes bug reports for, fixes for bugs in, and
+suggestions for improvements in the GNU C++ Compiler to its active
+developers.
+
+G++ uses the GNU C-Compiler back end.  Active developers may wish to
+subscribe to bug-gcc@prep.ai.mit.edu as well.
+
+Subscribers to bug-g++ get all info-g++ messages.
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* help-g++-request@prep.ai.mit.edu to subscribe to help-g++
+** gnUSENET newsgroup: gnu.g++.help    (and one-way into comp.lang.c++)
+** Send contributions to: help-g++@prep.ai.mit.edu
+
+This list is the place for users and installers of the GNU C++ Compiler
+to ask for help.  Please send bug reports to bug-g++@prep.ai.mit.edu
+instead of posting them here.
+
+help-g++ is also gated one way to USENET's newsgroup comp.lang.c++.
+This one-way gating is done for users whose sites get comp.lang.c++, but
+not gnu.g++.help.
+
+See section '* General Information about help-* lists'.
+
+* info-g++-request@prep.ai.mit.edu to subscribe to info-g++
+** gnUSENET newsgroup: gnu.g++.announce        (and one-way into comp.lang.c++)
+** Send announcements to: info-g++@prep.ai.mit.edu
+
+This list distributes announcements and progress reports on the GNU C++
+Compiler.  It is NOT for general discussion; please use help-g++ for
+that.
+
+The list is filtered to remove items meant for info-g++-request, that
+can be answered by the moderator without bothering the list, or should
+have been sent to another list.
+
+It is also gated one way to USENET's newsgroup comp.lang.c++.  This
+one-way gating is done for users whose sites get comp.lang.c++, but not
+gnu.g++.announce.
+
+Do not report g++ bugs to info-g++ or comp.lang.c++, mail them to
+bug-g++@prep.ai.mit.edu instead.
+
+See section '* General Information about info-* lists'.
+
+* bug-lib-g++-request@prep.ai.mit.edu to subscribe to bug-lib-g++
+** gnUSENET newsgroup: gnu.g++.lib.bug
+** lib-g++ bug reports to: bug-lib-g++@prep.ai.mit.edu
+
+This list distributes, to the active maintainers of libg++ (GNU's
+library for C++), bug reports and fixes for, and suggestions for
+improvements in lib-g++.  User discussion of libg++ also occurs here.
+
+Announcements of new releases of libg++ are made on both info-g++ and
+bug-lib-g++.
+
+There are no other GNU mailing lists or gnUSENET newsgroups for GNU's
+G++ Library.
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* info-gnu-fortran-request@prep.ai.mit.edu to subscribe to info-gnu-fortran
+** gnUSENET newsgroup: NONE YET
+** Send announcements to: info-gnu-fortran@prep.ai.mit.edu
+
+This list is for progress reports about the GNU Fortran compiler.  In
+the future it will also be used for release notices.
+
+The list is filtered to remove items meant for info-gnu-fortran-request,
+that can be answered by the moderator without bothering the list, or
+should have been sent to another list.
+
+People on the Internet can get a current status report by fingering the
+address fortran@gnu.ai.mit.edu.
+
+See section '* General Information about info-* lists'.
+
+There are no other GNU mailing lists or gnUSENET newsgroups for GNU
+Fortran (yet).
+
+* bug-oleo-request@prep.ai.mit.edu to subscribe to bug-oleo
+** gnUSENET newsgroup: NONE PLANNED
+** Oleo bug reports to: bug-oleo@prep.ai.mit.edu
+
+This list distributes, to the active maintainers of Oleo (the GNU
+spreadsheet), bug reports and fixes for, and suggestions for
+improvements to Oleo.  User discussion of Oleo also occurs here.
+
+There are no other GNU mailing lists or gnUSENET newsgroups for Oleo .
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* bug-gmp-request@prep.ai.mit.edu to subscribe to bug-gmp
+** gnUSENET newsgroup: NONE PLANNED
+** gmp bug reports to: bug-gmp@prep.ai.mit.edu
+
+This list distributes, to the active maintainers of gmp (the GNU
+Multiple Precision Library), bug reports and fixes for, and suggestions
+for improvements to gmp.  User discussion of gmp also occurs here.
+
+There are no other GNU mailing lists or gnUSENET newsgroups for gmp .
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* bug-pine-request@prep.ai.mit.edu to subscribe to bug-pine
+** gnUSENET newsgroup: NONE PLANNED
+** pine bug reports to: bug-pine@prep.ai.mit.edu
+
+This list distributes, to the active maintainers of pine (the GNU
+version of the pine mail reader), bug reports and fixes for, and suggestions
+for improvements to pine.  User discussion of pine also occurs here.
+
+There are no other GNU mailing lists or gnUSENET newsgroups for pine .
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* bug-cfengine-request@prep.ai.mit.edu to subscribe to bug-cfengine
+** gnUSENET newsgroup: gnu.cfengine.bug
+** cfengine bug reports to: bug-cfengine@prep.ai.mit.edu
+
+This list distributes, to the active maintainers of cfengine (configure
+BSD and System-5-like operating systems attached to a TCP/IP network),
+bug reports and fixes for, and suggestions for improvements to cfengine.
+User discussion of cfengine also occurs here.
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* help-cfengine-request@prep.ai.mit.edu to subscribe to help-cfengine
+** gnUSENET newsgroup: gnu.cfengine.help
+** Send contributions to: help-cfengine@prep.ai.mit.edu
+
+This list is the place for users and installers of cfengine to ask for
+help.  Please send bug reports to bug-cfengine instead of posting them
+here.
+
+This list is also used for announcements about cfengine and related
+programs, and small but important patches.  Announcements of cfengine
+releases are also made to info-gnu@prep.ai.mit.edu (see above)
+
+Since help-cfengine is a large list, send it only those items that
+are seriously important to many people.
+
+If source or patches that were previously posted or a simple fix is
+requested in help-cfengine, please mail it to the requester.  Do NOT
+repost it.  If you also want something that is requested, send mail to
+the requester asking him to forward it to you.  This kind of traffic is
+best handled by e-mail, not a broadcast medium that reaches millions of
+sites.
+
+See section '* General Information about help-* lists'.
+Also see section '* General Information about info-* lists'.
+
+* bug-gnu-smalltalk-request@prep.ai.mit.edu to subscribe to bug-gnu-smalltalk
+** gnUSENET newsgroup: gnu.smalltalk.bug
+** GNU Smalltalk bug reports to: bug-gnu-smalltalk@prep.ai.mit.edu
+
+GNU Smalltalk is the GNU project implementation of the Smalltalk language.
+
+This list distributes, to the active maintainers of GNU Smalltalk, bug
+reports and fixes for, and suggestions for improvements to GNU
+Smalltalk.  User discussion of GNU Smalltalk also occurs here.
+
+For now, new releases of GNU Smalltalk will also be announced on this list.
+
+There are no other GNU mailing lists or gnUSENET newsgroups for GNU
+Smalltalk.
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* st-next-request@laplace.eng.sun.com to subscribe to st-next
+** gnUSENET newsgroup: NONE PLANNED
+** Send contributions to: st-next@laplace.eng.sun.com
+
+For people interested in working on GNU Smalltalk on the NeXT.
+
+* bug-groff-request@prep.ai.mit.edu to subscribe to bug-groff
+** gnUSENET newsgroup: gnu.groff.bug
+** GNU groff bug reports to: bug-groff@prep.ai.mit.edu
+
+groff is the GNU project implementation, in C++, of the traditional Unix
+document formatting tools.
+
+This list distributes, to the active maintainers of groff, bug reports
+and fixes for, and suggestions for improvements to groff (and it
+component programs).  User discussion of groff also occurs here.
+
+For now, new releases of groff will also be announced on this list.
+
+There are no other GNU mailing lists or gnUSENET newsgroups for groff.
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* bug-ghostscript-request@prep.ai.mit.edu to subscribe to bug-ghostscript
+** gnUSENET newsgroup: gnu.ghostscript.bug
+** Ghostscript bug reports to: bug-ghostscript@prep.ai.mit.edu
+
+Ghostscript is the GNU project implementation of a language and graphics
+library with a remarkable similarity to PostScript.
+
+This list distributes, to the active maintainers of Ghostscript, bug
+reports and fixes for, and suggestions for improvements in Ghostscript.
+
+For now, new releases of Ghostscript will also be announced on this list.
+
+There are no other GNU mailing lists or gnUSENET newsgroups for
+Ghostscript.
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* bug-gnu-utils-request@prep.ai.mit.edu to subscribe to bug-gnu-utils
+** gnUSENET newsgroup: gnu.utils.bug
+** GNU Utilities bug reports to: bug-gnu-utils@prep.ai.mit.edu
+
+This list distributes, to the active maintainers of these programs, bug
+reports and fixes for, and suggestions for improvements in GNU programs
+not covered by other bug-* mailing lists/gnu.*.bug newsgroups.
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* help-gnu-utils-request@prep.ai.mit.edu to subscribe to help-gnu-utils
+** gnUSENET newsgroup: gnu.utils.help
+** Send contributions to: help-gnu-utils@prep.ai.mit.edu
+
+This list is the place for users and installers of GNU programs not
+covered by other GNU mailing lists/gnu.* newsgroups to ask for help.
+
+Don't send bug reports to help-gnu-utils (gnu.utils.help); mail them to
+bug-gnu-utils@prep.ai.mit.edu instead.
+
+See section '* General Information about help-* lists'.
+
+* info-gnu-utils-request@prep.ai.mit.edu IS NOW DEFUNCT
+** a gnUSENET newsgroup bever existed
+** DEAD address: info-gnu-utils@prep.ai.mit.edu
+
+This list is dead.  Announcements about GNU Utilities will be made to the
+list info-gnu@prep.ai.mit.edu (see above).
+
+* info-cvs-request@prep.ai.mit.edu to subscribe to info-cvs.
+** USENET newsgroup: (none)
+** CVS discussions/questions to: info-cvs@prep.ai.mit.edu
+
+This list is for discussion and dissemination of information about
+CVS.  Please check the FAQ before posting questions, however.
+
+* bug-cvs-request@prep.ai.mit.edu to subscribe to bug-cvs.
+** USENET newsgroup: (none)
+** CVS bug reports to: bug-cvs@prep.ai.mit.edu
+
+This list distributes bug reports, fixes, and suggestions for
+improvements to the maintainers of CVS.
+
+* bug-fortran-mode-request@erl.mit.edu to subscribe to bug-fortran-mode
+** USENET newsgroup: (none)
+** Fortran mode bug reports to: bug-fortran-mode@erl.mit.edu
+
+This list collects bug reports, fixes for bugs, and suggestions for
+improvements in GNU Emacs's Fortran mode (a major mode to support
+editing Fortran source code).
+
+It is the place to report Fortran mode bugs by all users of Fortran
+mode.
+
+Always report the version number Fortran mode reports on startup as well
+as the version of Emacs.
+
+There is no info-fortran-mode list.  There are no USENET gateways to
+bug-fortran-mode at this time.
+
+* info-gnus-request@flab.fujitsu.co.jp  to subscribe
+** gnUSENET newsgroup: NONE YET
+** Send contributions to: info-gnus@flab.fujitsu.co.jp
+
+The list is intended to exchange useful information about GNUS, such as
+bug reports, useful hooks, and extensions of GNUS.  GNUS is an NNTP-base
+network news reader for GNU Emacs (which also works with a news spool).
+English and Japanese are the official languages of the list.  GNUS is
+quite different than gnews.
+
+* info-gnus-english-request@prep.ai.mit.edu  to subscribe
+** gnUSENET newsgroup: gnu.emacs.gnus
+** Send contributions to: info-gnus-english@prep.ai.mit.edu
+
+The list has the same charter as info-gnus.  The difference is that
+English is the only official language of the list.
+
+info-gnus-english/gnu.emacs.gnus is forward to info-gnus, but NOT
+vice-versa.
+
+* info-gnews-request@ics.uci.edu to subscribe to info-gnews
+** gnUSENET newsgroup: gnu.emacs.gnews
+** Send contributions to: info-gnews@ics.uci.edu
+
+This newsgroup is intended to exchange useful information about gnews,
+such as bug reports, useful hooks, and extensions of gnews.  gnews is an
+NNTP-base network news reader for GNU Emacs (which also works a news
+spool).  It is quite different than GNUS.
+
+* gnu-emacs-ada-request@grebyn.com to subscribe to gnu-emacs-ada
+** gnUSENET newsgroup: NONE PLANNED
+** Gnu Emacs Ada support bug reports to: gnu-emacs-ada@grebyn.com
+
+This list distributes bug reports for, fixes for bugs in, and
+suggestions for improvements in GNU Emacs' editing support of the Ada
+programming language.
+
+There are no other GNU mailing lists or gnUSENET newsgroups for GNU
+Emacs' editing support of Ada.
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* bug-vm-request@uunet.uu.net to subscribe to bug-vm
+** gnUSENET newsgroup: gnu.emacs.vm.bug
+** VM mail reader bug reports to: bug-vm@uunet.uu.net
+
+This list discusses bugs in View Mail mode for GNU Emacs, with an
+emphasis on beta and prerelease versions.
+
+Always report the version number of VM you are using, as well as the
+version of Emacs you're running.  If you believe it is significant,
+report the operating system used and the hardware.
+
+Subscribers to bug-vm get all info-vm messages.
+
+* info-vm-request@uunet.uu.net to subscribe to info-vm
+** gnUSENET newsgroup: gnu.emacs.vm.info
+** Send contributions to: info-vm@uunet.uu.net
+
+This list discusses the View Mail mode for GNU Emacs, an alternative to
+rmail mode.
+
+* supercite-request@warsaw.nlm.nih.gov to subscribe to supercite
+** gnUSENET newsgroup: NONE PLANNED
+** Send articles to: supercite@warsaw.nlm.nih.gov
+*** UUCP: ..!uunet!warsaw.nlm.nih.gov!supercite-request
+
+The supercite mailing list covers issues related to the advanced
+mail/news citation package called Supercite for GNU Emacs.
+
+* auc-tex-request@iesd.auc.dk to subscribe
+** USENET newsgroup: NONE YET
+** Send contributions to: auc-tex@iesd.auc.dk
+
+The list is intended to exchange information about AUC TeX, such as
+bug reports, request for help, and information on current
+developments.  AUC TeX is a much enhanced LaTeX mode for GNU Emacs.
+
+The list is unmoderated.
+
+* bug-gnu-chess-request@prep.ai.mit.edu to subscribe to bug-gnu-chess
+** gnUSENET newsgroup: gnu.chess.bug
+** GNU Chess bug reports to: bug-gnu-chess@prep.ai.mit.edu
+
+This list directly accesses the GNU Chess developer's group.  If you
+have a *BUG* to report about the program, which can also include a
+feature enhancement request, please send it to this list.
+
+Subscribers to bug-gnu-chess get all info-gnu-chess messages.
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+* help-gnu-chess-request@prep.ai.mit.edu IS NOW DEFUNCT
+** gnUSENET newsgroup: NONE PLANNED
+** DEAD address: help-gnu-chess@prep.ai.mit.edu
+
+This list is dead.  Use info-gnu-chess@prep.ai.mit.edu/gnu.chess instead.
+
+* info-gnu-chess-request@prep.ai.mit.edu to subscribe to info-gnu-chess
+** gnUSENET newsgroup: gnu.chess
+** Send contributions to: info-gnu-chess@prep.ai.mit.edu
+** FAQ-URL: http://www.research.digital.com/SRC/personal/Tim_Mann/chess.html
+** FAQ-Archive-name: games/chess/gnu-faq
+** FAQ-Posting-frequency: monthly
+
+This list is the place for users and installers of GNU Chess to ask for
+help.  This list is also used for games played by people or other
+entities against the program, and other generalized non-bug,
+non-enhancement data.  Please send bug reports to bug-gnu-chess instead
+of posting them here.
+
+This list is also used for announcements about GNU Chess and related
+programs, and small but important patches.  Announcements of GNU Chess
+releases are also made to info-gnu@prep.ai.mit.edu (see above)
+
+Since info-gnu-chess is a large list, send it only those items that
+are seriously important to many people.
+
+If source or patches that were previously posted or a simple fix is
+requested in info-gnu-chess, please mail it to the requester.  Do NOT
+repost it.  If you also want something that is requested, send mail to
+the requester asking him to forward it to you.  This kind of traffic is
+best handled by e-mail, not a broadcast medium that reaches millions of
+sites.
+
+See section '* General Information about help-* lists'.
+Also see section '* General Information about info-* lists'.
+
+* bug-gnu-shogi-request@prep.ai.mit.edu to subscribe to bug-gnu-shogi
+** gnUSENET newsgroup: NONE PLANNED
+** GNU Shogi bug reports to: bug-gnu-shogi@prep.ai.mit.edu
+
+This list directly accesses the GNU Shogi developer's group.  If you
+have a *BUG* to report about the program, which can also include a
+feature enhancement request, please send it to this list.
+
+Subscribers to bug-gnu-shogi get all info-gnu-shogi messages.
+
+See section '* General Information about bug-* lists and reporting
+program bugs'.
+
+Shogi is a game something like chess.  There are several different types
+of pieces, a board that is 9 by 9 squares, and the modification that a
+captured piece can be reintroduced on the board by the capturing player
+(and used).  Due to this last difference from Western chess, a Shogi
+game never simplifies.
+
+* help-gnu-shogi-request@prep.ai.mit.edu IS NOW DEFUNCT
+** gnUSENET newsgroup: NONE PLANNED
+** DEAD address: help-gnu-shogi@prep.ai.mit.edu
+
+This list is dead.
+
+* info-gnu-shogi-request@prep.ai.mit.edu to subscribe to info-gnu-shogi
+** gnUSENET newsgroup: NONE PLANNED
+** Send contributions to: info-gnu-shogi@prep.ai.mit.edu
+
+This list is the place for users and installers of GNU Shogi to ask for
+help.  This list is also used for games played by people or other
+entities against the program, and other generalized non-bug,
+non-enhancement data.  Please send bug reports to bug-gnu-shogi instead
+of posting them here.
+
+This list is also used for announcements about GNU Shogi and related
+programs, and small but important patches.  Announcements of GNU Shogi
+releases are also made to info-gnu@prep.ai.mit.edu (see above)
+
+Since info-gnu-shogi is a large list, send it only those items that
+are seriously important to many people.
+
+If source or patches that were previously posted or a simple fix is
+requested in info-gnu-shogi, please mail it to the requester.  Do NOT
+repost it.  If you also want something that is requested, send mail to
+the requester asking him to forward it to you.  This kind of traffic is
+best handled by e-mail, not a broadcast medium that reaches millions of
+sites.
+
+See section '* General Information about help-* lists'.
+Also see section '* General Information about info-* lists'.
+
+* gnu-manual-request@a.cs.uiuc.edu IS NOW DEFUNCT
+** DEAD: Gnusenet newsgroup: gnu.emacs.lisp.manual
+** DEAD address: gnu-manual@a.cs.uiuc.edu
+*** DEAD UUCP address: ..!uunet!uiucdcs!gnu-manual-request
+
+This list and newsgroup is dead.  It was a working group whose
+volunteers wrote, proofread and commented on the developing GNU Emacs
+Lisp programmers manual.
+
+Send bugs in the GNU Emacs Lisp reference manual to:
+       lisp-manual-bugs@prep.ai.mit.edu
+
+lisp-manual-bugs is neither a mailing list nor a gnUSENET newsgroup.
+It's just a bug-reporting address.
+
+* no mailing list request
+** gnUSENET newsgroup: gnu.gnusenet.config
+** no mailing list
+
+This newsgroup has nothing to do with GNU software, especially its
+configuration.  It exists to distribute information about the
+administration and configuration of gnUSENET: the gnu.all alternative
+USENET hierarchy that carry the GNU mailing lists.
+
+Administrators of gnUSENET hosts receiving the gnu.all newsgroups are
+welcome to ask questions here or via e-mail of gnu@prep.ai.mit.edu.
+
+* no mailing list request
+** gnUSENET newsgroup: gnu.gnusenet.test
+** no mailing list
+
+This newsgroup has nothing to do with GNU software, especially its
+testing.  It exists to allow test messages to be made in gnUSENET: the
+gnu.all alternative USENET hierarchy that carry the GNU mailing lists.
+
+Local variables:
+mode: outline
+fill-column: 72
+End:
diff --git a/etc/MORE.STUFF b/etc/MORE.STUFF
new file mode 100644 (file)
index 0000000..be87615
--- /dev/null
@@ -0,0 +1,52 @@
+More Neat Stuff for your Emacs                 -*-Outline-*-
+
+This file describes GNU Emacs programs and resources that are maintained
+by other people.  Some of these may become part of the Emacs distribution
+in the future.
+
+* The LCD archive
+
+There is a large collection of Emacs Lisp code available for FTP at
+archive.cis.ohio-state.edu; it is actively maintained by Dave Brennan
+<brennan@hal.com> and Dave Sill <de5@ornl.gov>.
+
+To get started using this archive, do:
+
+       ftp archive.cis.ohio-state.edu
+
+Once you're in FTP, do
+
+       cd pub/gnu/emacs/elisp-archive
+       bin
+       get lispdir.el.Z
+       get LCD-datafile.Z
+
+and exit.  Then do:
+
+       compress -d *.Z
+
+The lispdir.el package will help you search for useful packages in the
+LCD-datafile, which is a list of the archive constants.  It will even
+fetch them for you on command.
+
+* Eric Ludlam's etalk system
+
+Eric Ludlam has written a C program and Emacs Lisp code to do Internet talk
+through an Emacs window.  The package also includes Emacs Lisp code which
+assists you in using talk to play a number of different interactive games.
+
+This system seems to be quite nicely put together and is well documented
+with a texinfo file that you can integrate into Emacs's own on-line help.
+It's too large and specialized to include in the Emacs distribution, though.
+
+Sources of this system are available for FTP at
+
+       nic.umass.edu           128.119.166.14
+
+Look under pub/contrib.  As of March 23 1993, there are two relevant files:
+
+       pub/contrib/etalk0.6B.tar.Z     --- sources of the talk system
+       pub/contrib/egames0.6B.tar.Z    --- more game-support files
+
+We don't know whether this can use the additional features in GNU talk.
+
diff --git a/etc/MOTIVATION b/etc/MOTIVATION
new file mode 100644 (file)
index 0000000..37ed36f
--- /dev/null
@@ -0,0 +1,176 @@
+STUDIES FIND REWARD OFTEN NO MOTIVATOR
+
+Creativity and intrinsic interest diminish if task is done for gain
+
+By Alfie Kohn
+Special to the Boston Globe
+[reprinted with permission of the author
+ from the Monday 19 January 1987 Boston Globe]
+
+In the laboratory, rats get Rice Krispies.  In the classroom the top
+students get A's, and in the factory or office the best workers get
+raises.  It's an article of faith for most of us that rewards promote
+better performance.
+
+But a growing body of research suggests that this law is not nearly as
+ironclad as was once thought.  Psychologists have been finding that
+rewards can lower performance levels, especially when the performance
+involves creativity.
+
+A related series of studies shows that intrinsic interest in a task -
+the sense that something is worth doing for its own sake - typically
+declines when someone is rewarded for doing it.
+
+If a reward - money, awards, praise, or winning a contest - comes to
+be seen as the reason one is engaging in an activity, that activity
+will be viewed as less enjoyable in its own right.
+
+With the exception of some behaviorists who doubt the very existence
+of intrinsic motivation, these conclusions are now widely accepted
+among psychologists.  Taken together, they suggest we may unwittingly
+be squelching interest and discouraging innovation among workers,
+students and artists.
+
+The recognition that rewards can have counter-productive effects is
+based on a variety of studies, which have come up with such findings
+as these: Young children who are rewarded for drawing are less likely
+to draw on their own that are children who draw just for the fun of
+it.  Teenagers offered rewards for playing word games enjoy the games
+less and do not do as well as those who play with no rewards.
+Employees who are praised for meeting a manager's expectations suffer
+a drop in motivation.
+
+Much of the research on creativity and motivation has been performed
+by Theresa Amabile, associate professor of psychology at Brandeis
+University.  In a paper published early last year on her most recent
+study, she reported on experiments involving elementary school and
+college students.  Both groups were asked to make "silly" collages.
+The young children were also asked to invent stories.
+
+The least-creative projects, as rated by several teachers, were done
+by those students who had contracted for rewards.  "It may be that
+commissioned work will, in general, be less creative than work that is
+done out of pure interest," Amabile said.
+
+In 1985, Amabile asked 72 creative writers at Brandeis and at Boston
+University to write poetry.  Some students then were given a list of
+extrinsic (external) reasons for writing, such as impressing teachers,
+making money and getting into graduate school, and were asked to think
+about their own writing with respect to these reasons.  Others were
+given a list of intrinsic reasons:  the enjoyment of playing with
+words, satisfaction from self-expression, and so forth.  A third group
+was not given any list.  All were then asked to do more writing.
+
+The results were clear.  Students given the extrinsic reasons not only
+wrote less creatively than the others, as judged by 12 independent
+poets, but the quality of their work dropped significantly.  Rewards,
+Amabile says, have this destructive effect primarily with creative
+tasks, including higher-level problem-solving.  "The more complex the
+activity, the more it's hurt by extrinsic reward," she said.
+
+But other research shows that artists are by no means the only ones
+affected.
+
+In one study, girls in the fifth and sixth grades tutored younger
+children much less effectively if they were promised free movie
+tickets for teaching well.  The study, by James Gabarino, now
+president of Chicago's Erikson Institute for Advanced Studies in Child
+Development, showed that tutors working for the reward took longer to
+communicate ideas, got frustrated more easily, and did a poorer job in
+the end than those who were not rewarded.
+
+Such findings call into question the widespread belief that money is
+an effective and even necessary way to motivate people.  They also
+challenge the behaviorist assumption that any activity is more likely
+to occur if it is rewarded.  Amabile says her research "definitely
+refutes the notion that creativity can be operantly conditioned."
+
+But Kenneth McGraw, associate professor of psychology at the
+University of Mississippi, cautions that this does not mean
+behaviorism itself has been invalidated.  "The basic principles of
+reinforcement and rewards certainly work, but in a restricted context"
+- restricted, that is, to tasks that are not especially interesting.
+
+Researchers offer several explanations for their surprising findings
+about rewards and performance.
+
+First, rewards encourage people to focus narrowly on a task, to do it
+as quickly as possible and to take few risks.  "If they feel that
+'this is something I hve to get through to get the prize,' the're
+going to be less creative," Amabile said.
+
+Second, people come to see themselves as being controlled by the
+reward.  They feel less autonomous, and this may interfere with
+performance.  "To the extent one's experience of being
+self-determined is limited," said Richard Ryan, associate psychology
+professor at the University of Rochester, "one's creativity will be
+reduced as well."
+
+Finally, extrinsic rewards can erode intrinsic interest.  People who
+see themselves as working for money, approval or competitive success
+find their tasks less pleasurable, and therefore do not do them as
+well.
+
+The last explanation reflects 15 years of work by Ryan's mentor at the
+University of Rochester, Edward Deci.  In 1971, Deci showed that
+"money may work to buy off one's intrinsic motivation for an activity"
+on a long-term basis.  Ten years later, Deci and his colleagues
+demonstrated that trying to best others has the same effect.  Students
+who competed to solve a puzzle quickly were less likely than those who
+were not competing to keep working at it once the experiment was over.
+
+Control plays role
+
+There is general agreement, however, that not all rewards have the
+same effect.  Offering a flat fee for participating in an experiment -
+similar to an hourly wage in the workplace - usually does not reduce
+intrinsic motivation.  It is only when the rewards are based on
+performing a given task or doing a good job at it - analogous to
+piece-rate payment and bonuses, respectively - that the problem
+develops.
+
+The key, then, lies in how a reward is experienced.  If we come to
+view ourselves as working to get something, we will no longer find
+that activity worth doing in its own right.
+
+There is an old joke that nicely illustrates the principle.  An
+elderly man, harassed by the taunts of neighborhood children, finally
+devises a scheme.  He offered to pay each child a dollar if they would
+all return Tuesday and yell their insults again.  They did so eagerly
+and received the money, but he told them he could only pay 25 cents on
+Wednesday.  When they returned, insulted him again and collected their
+quarters, he informed them that Thursday's rate would be just a penny.
+"Forget it," they said - and never taunted him again.
+
+Means to and end
+
+In a 1982 study, Stanford psychologist Mark L. Lepper showed that any
+task, no matter how enjoyable it once seemed, would be devalued if it
+were presented as a means rather than an end.  He told a group of
+preschoolers they could not engage in one activity they liked until
+they first took part in another.  Although they had enjoyed both
+activities equally, the children came to dislike the task that was a
+prerequisite for the other.
+
+It should not be surprising that when verbal feedback is experienced
+as controlling, the effect on motivation can be similar to that of
+payment.  In a study of corporate employees, Ryan found that those who
+were told, "Good, you're doing as you /should/" were "significantly
+less intrinsically motivated than those who received feedback
+informationally."
+
+There's a difference, Ryan says, between saying, "I'm giving you this
+reward because I recognize the value of your work" and "You're getting
+this reward because you've lived up to my standards."
+
+A different but related set of problems exists in the case of
+creativity.  Artists must make a living, of course, but Amabile
+emphasizes that "the negative impact on creativity of working for
+rewards can be minimized" by playing down the significance of these
+rewards and trying not to use them in a controlling way.  Creative
+work, the research suggests, cannot be forced, but only allowed to
+happen.
+
+/Alfie Kohn, a Cambridge, MA writer, is the author of "No Contest: The
+Case Against Competition," recently published by Houghton Mifflin Co.,
+Boston, MA.  ISBN 0-395-39387-6. /
diff --git a/etc/NEWS b/etc/NEWS
new file mode 100644 (file)
index 0000000..01711ba
--- /dev/null
+++ b/etc/NEWS
@@ -0,0 +1,506 @@
+-*- mode:outline -*-
+\f
+* Introduction
+==============
+
+This file presents some general information about XEmacs.  It is
+primarily about the changes in recent XEmacs versions and its release
+history.
+
+Use `C-c C-f' to move to the next equal level of outline, and
+`C-c C-b' to move to previous equal level.  `C-h m' will give more
+info about the Outline mode.  Many commands are also available through 
+the menubar.
+
+Users who would like to know which capabilities have been introduced
+in each release should look at the appropriate section of this file.
+Starting with version 20.0, XEmacs includes ChangeLogs, which can be
+consulted for a more detailed list of changes.
+
+Users interested in some of the details of how XEmacs differs from GNU
+Emacs should read the section "What's Different?" near the end of this
+file.
+
+    N.B.  The term "GNU Emacs" refers to any release of Emacs Version
+    19 from the Free Software Foundation's GNU Project.  (We do not
+    say just "Emacs" as Richard M. Stallman ["RMS"] prefers, because
+    it is clearly a more generic term.)  The term "XEmacs" refers to
+    this program or to its predecessors "Era" and "Lucid Emacs".  The
+    predecessor of all these program is called "Emacs 18".  When no
+    particular version is implied, "Emacs" will be used.
+
+\f
+* Changes in XEmacs 21.2
+========================
+None yet.
+
+* Changes in XEmacs 21.0
+========================
+
+** XEmacs has been unbundled into constituent installable packages.
+See the Info documentation under "Packages" for more information.
+See the file `etc/PACKAGES' in the distribution for a partial list of
+packages available at the time of the 21.0 release.
+
+** XEmacs is now supported under Microsoft Windows 95/98 and Windows
+NT operating systems.  For starters, look at the XEmacs on Windows FAQ
+at <URL:http://jagor.srce.hr/~hniksic/xemacs-on-windows-faq.txt>.  To
+discuss Windows-specific issues, subscribe to the mailing list at
+<xemacs-nt-request@xemacs.org>.
+
+** XEmacs will now use `XEmacs' as its application class if it finds
+any `XEmacs' resources in the resource database.  Otherwise, it will
+continue to use the `Emacs' class.
+
+** The options menu has been ported to Custom.
+This means that each entry in the options menu acts as if you had customized
+the corresponding variable by hand.  ### WARNING: there is currently no
+upgrading function to help you port your old options settings to the new
+format. Consequently, if you want to modify the options for XEmacs 21, you
+will have to set them all again through the menu, and remove the code loading
+.xemacs-options from your .emacs.
+
+** When the Zmacs region is active, `M-x query-replace' and the other
+replace commands now operate on the region contents only.
+
+** Using the new `-private' option, you can make XEmacs use a private
+colormap.
+
+** The `imenu' package has been ported to XEmacs and is available as a
+package.
+
+** `echo-keystrokes' can now be a floating-point number, so that you
+can set it to intervals shorter than one second.
+
+   (setq echo-keystrokes 0.1)
+
+** The new command `center-to-window-line' works like `recenter'
+(bound to `C-l'), only it does not redisplay the whole display area.
+
+** The M-. command will now first search through exact tags matches,
+and then through inexact matches, as one would expect.
+
+** The new variable `user-full-name' can be used to customize one's
+name when using the Emacs mail and news reading facilities.
+
+Normally, `user-full-name' is a function that returns the full name of 
+a user or UID, as specified by the system -- for instance,
+(user-full-name "root") returns something like "Super-User".  However, 
+when the function is called without arguments, it will return the
+value of the `user-full-name' variable.  The `user-full-name' variable 
+is initialized using the environment variable NAME and (failing that)
+the user's system name.
+
+The behaviour of the `user-full-name' function with an argument
+specified is unchanged.
+
+** The new command `M-x customize-changed-options' lets you customize
+all the options whose default values have changed in recent Emacs
+versions.  You specify a previous Emacs version number as argument,
+and the command creates a customization buffer showing all the
+customizable options whose default values were changed since that
+version.
+
+If you don't specify a particular version number argument, then the
+customization buffer shows all the customizable options for which
+Emacs versions of changes are recorded.
+
+** The new command `add-log-convert' can be used to convert the
+old-style (pre-20.3) ChangeLog buffers to new style, for
+consistency.  A reminder: if you wish to revert to old-style
+ChangeLogs instead, customize the value of `add-log-time-format'
+variable.
+
+** The new command `zap-up-to-char' is now available.  It is similar
+to `zap-to-char', except that it does not delete the searched-for
+character.  It is not bound to a key by default.
+
+** You can now store a number into a register with `C-u NUMBER C-x r n'
+REG, increment it by INC with `C-u INC C-x r + REG' (to increment by
+one, omit C-u INC), and insert it in the buffer with `C-x r g REG'.
+This is useful for writing keyboard macros.
+
+** The M-: command, when given a prefix argument, will now insert its
+result to the current buffer.
+
+** The `C-h c' command, when given a prefix argument, will now insert
+the message into the current buffer.
+
+** Horizontally split windows may now be dragged using the mouse.
+Because of this, the dividers between vertical windows are always
+visible.  To turn it off, set `vertical-divider-always-visible-p' to
+nil.
+
+** XEmacs/Mule (internationalization) changes.
+
+*** Mule support now works on TTY's.  Use `set-terminal-coding-system'
+and `set-keyboard-coding-system' to specify the coding system of your
+display and keyboard.
+
+*** Egg/SJ3 input method is now officially supported.  Quail and
+Egg/Skk have been available through the generalized Leim since 20.3.
+
+*** Localized Japanese menubars are available if XEmacs is built with
+XFONTSET and either the X11 libraries are built with X_LOCALE defined
+or the native C libraries support Japanese localization.  This has
+been available since 20.3, only it hasn't been announced before.
+
+** Jamie Zawinski's `gdb-highlight' extension is now distributed with
+the `debug' package.  gdb-highlight makes most objects printed in a
+gdb buffer be mouse-sensitive: as text shows up in the buffer, it is
+parsed, and objects which are recognized have context-sensitive
+commands attached to them.  To use it, add the following to `.emacs':
+
+  (add-hook 'gdb-mode-hook (lambda () (require 'gdb-highlight)))
+
+** The package popper.el is now included in the edit-utils package.
+It has been greatly enhanced with respect to the one once included
+with the ilisp package and should work well under XEmacs 21.0.
+
+** C mode changes
+
+*** Multiline macros are now handled, both as they affect indentation,
+and as recognized syntax.  New syntactic symbol cpp-macro-cont is
+assigned to second and subsequent lines of a multiline macro
+definition.
+
+*** A new style "user" which captures all non-hook-ified
+(i.e. top-level) .emacs file variable setings and customizations.
+Style "cc-mode" is an alias for "user" and is deprecated.  "gnu" style
+is still the default however.
+
+*** "java" style now conforms to Sun's JDK coding style.
+
+*** There are new commands c-beginning-of-defun, c-end-of-defun which
+are alternatives which you could bind to C-M-a and C-M-e if you prefer
+them.  They do not have key bindings by default.
+
+*** New and improved implementations of M-a (c-beginning-of-statement)
+and M-e (c-end-of-statement).
+
+*** C++ namespace blocks are supported, with new syntactic symbols
+namespace-open, namespace-close, and innamespace.
+
+*** File local variable settings of c-file-style and c-file-offsets
+makes the style variables local to that buffer only.
+
+*** New indentation functions c-lineup-close-paren,
+c-indent-one-line-block, c-lineup-dont-change.
+
+*** Improvements (hopefully!) to the way CC Mode is loaded.  You
+should now be able to do a (require 'cc-mode) to get the entire
+package loaded properly for customization in your .emacs file.  A new
+variable c-initialize-on-load controls this and is t by default.
+
+** In Text mode, now only blank lines separate paragraphs.
+This makes it possible to get the full benefit of Adaptive Fill mode
+in Text mode, and other modes derived from it (such as Mail mode).
+TAB in Text mode now runs the command indent-relative; this makes a
+practical difference only when you use indented paragraphs.
+
+As a result, the old Indented Text mode is now identical to Text mode,
+and is an alias for it.
+
+If you want spaces at the beginning of a line to start a paragraph,
+use the new mode, Paragraph Indent Text mode.
+
+** Changes to Gnus, the XEmacs newsreader.
+
+*** New functionality for using Gnus as an offline newsreader has been
+added.  A plethora of new commands and modes have been added.  See the
+Gnus manual for the full story.
+
+*** The nndraft backend has returned, but works differently than
+before.  All Message buffers are now also articles in the nndraft
+group, which is created automatically.
+
+*** `gnus-alter-header-function' can now be used to alter header
+values.
+
+*** `gnus-summary-goto-article' now accept Message-ID's.
+
+*** A new Message command for deleting text in the body of a message
+outside the region: `C-c C-v'.
+
+*** You can now post to component group in nnvirtual groups with
+`C-u C-c C-c'.
+
+*** `nntp-rlogin-program' -- new variable to ease customization.
+
+*** `C-u C-c C-c' in `gnus-article-edit-mode' will now inhibit
+re-highlighting of the article buffer.
+
+*** New element in `gnus-boring-article-headers' -- `long-to'.
+
+*** `M-i' symbolic prefix command.  See the section "Symbolic
+Prefixes" in the Gnus manual for details.
+
+*** `L' and `I' in the summary buffer now take the symbolic prefix
+`a' to add the score rule to the "all.SCORE" file.
+
+*** `gnus-simplify-subject-functions' variable to allow greater
+control over simplification.
+
+*** `A T' -- new command for fetching the current thread.
+
+*** `/ T' -- new command for including the current thread in the
+limit.
+
+*** `M-RET' is a new Message command for breaking cited text.
+
+*** \\1-expressions are now valid in `nnmail-split-methods'.
+
+*** The `custom-face-lookup' function has been removed.  
+If you used this function in your initialization files, you must
+rewrite them to use `face-spec-set' instead.
+
+*** Cancelling now uses the current select method.  Symbolic prefix
+`a' forces normal posting method.
+
+*** New command to translate M******** sm*rtq**t*s into proper text
+-- `W d'.
+
+*** For easier debugging of nntp, you can set `nntp-record-commands'
+to a non-nil value.
+
+*** nntp now uses ~/.authinfo, a .netrc-like file, for controlling
+where and how to send AUTHINFO to NNTP servers.
+
+*** A command for editing group parameters from the summary buffer
+has been added.
+
+*** A history of where mails have been split is available.
+
+*** A new article date command has been added -- `article-date-iso8601'.
+
+*** Subjects can be simplified when threading by setting
+`gnus-score-thread-simplify'.
+
+*** A new function for citing in Message has been added --
+`message-cite-original-without-signature'.
+
+*** `article-strip-all-blank-lines' -- new article command.
+
+*** A new Message command to kill to the end of the article has
+been added.
+
+*** A minimum adaptive score can be specified by using the
+`gnus-adaptive-word-minimum' variable.
+
+*** The "lapsed date" article header can be kept continually
+updated by the `gnus-start-date-timer' command.
+
+*** Web listserv archives can be read with the nnlistserv backend.
+
+*** Old dejanews archives can now be read by nnweb.
+
+*** Byte-compilation of user-specs now works under XEmacs.
+
+** The `dir' files are no longer essential for functioning of the Info
+subsystem.  If the `dir' file does not exist in an Info directory, the
+relevant information will be generated on-the-fly.
+
+This behaviour can be customized, look for `Info-auto-generate-directory'
+and `Info-save-auto-generated-dir' in the `info' customization group.
+
+\f
+* Lisp and internal changes in XEmacs 21.0
+==========================================
+
+** It is now possible to build XEmacs with support for 31-bit Lisp
+integers (normally, Lisp integers are only 28 bits wide on 32-bit
+machines.)  Configure with --use-minimal-tagbits to test.  With this
+change, the maximum buffer size on 32-bit machines is increased from
+128M to 1G.  This setting will be made default in a future XEmacs
+version.
+
+** Specifier changes.
+
+*** When instantiating a specifier, the window locale now has a higher
+precedence than the buffer locale.  This is because the window locale
+is more specific than the buffer locale.
+
+*** The new macro `let-specifier' can be used to temporarily add
+specifications to specifiers.  See the documentation for details.
+
+*** The new specifiers `vertical-scrollbar-visible-p' and
+`horizontal-scrollbar-visible-p' may be used to control scrollbar
+visibility.  Previously, the only way to remove a scrollbar was to set
+its size to 0.  This method is still supported for backward
+compatibility.
+
+*** The new specifiers `scrollbar-on-left-p' and `scrollbar-on-top-p'
+may be used to control the position of the vertical and horizontal
+toolbar.  Previously, their position could be changed only through the
+use of X resources.
+
+*** The new draggable vertical dividers between windows may be turned
+off using the `vertical-divider-always-visible-p' specifier.  When
+this is set to nil, the vertical dividers between windows are shown
+only when needed, and they are not draggable.
+
+Other properties of the vertical dividers may be controlled using
+`vertical-divider-shadow-thickness', `vertical-divider-line-width' and 
+`vertical-divider-spacing' specifiers, which see.
+
+** Frame focus management changes.
+
+*** When the variable focus-follows-mouse is non-nil, `select-frame'
+no longer permanently selects a different frame.  The frame selection
+is temporary and is reverted when the current command terminates, much
+like the buffer selected by `set-buffer'.  This is the same as in FSF
+Emacs.
+
+*** The new function `focus-frame' sets the window system focus to
+FRAME (and selects it), regardless of the value of
+`focus-follows-mouse'.  Doing this is not well behaved, so be
+absolutely sure that you want this.
+
+The code that uses `select-frame' only to get the window manager focus
+should be changed to use `set-frame-focus' instead, so that they keep
+working when `focus-follows-mouse' is non-nil.
+
+*** The special forms `save-selected-frame' and `with-selected-frame'
+can now be used to temporarily change selected frame.
+
+*** The behavior of `other-frame' command (`C-x 5 o') is unaffected by
+these changes.
+
+** The function `select-window' now has an optional second argument
+NORECORD which if non-nil inhibits the recording of a buffer change.
+
+** The function `vertical-motion' now correctly handles the second,
+optional WINDOW argument.  A new third argument PIXELS, if non-nil,
+indicates that the returned motion should be in pixels.
+
+** The new function `vertical-motion-pixels' is similar to
+vertical-motion but takes as input a vertical motion in pixels.
+
+** The new functions window-text-area-pixel-{width,height,edges} can
+be used to obtain information about the text-displaying area of a
+window.
+
+** The new functions `shrink-window-pixels' and `enlarge-window-pixels'
+can be used to adjust the size of a window by a pixel amount.
+
+** The new function `window-displayed-text-pixel-height' can be used
+to determine the height of the text actually displayed in a window.
+
+** The arithmetic comparison functions <, >, =, /= now accept a
+variable number of arguments.
+
+This means that if you want to test whether A < B < C, you can write
+it as (< A B C) instead of (and (< A B) (< B C)).  Likewise,
+(apply #'> LIST) now tests if LIST is monotonously increasing -- and
+so on.
+
+** The XEmacs hashtables now have a consistent read/print syntax.
+This means that a hashtable will be readably printed in a
+structure-like form:
+
+   #s(hashtable size 2 data (key1 value1 key2 value2))
+
+When XEmacs reads this form, it will create a new hashtable according
+to description.  This allows you to easily dump hashtables to files
+using `prin1', and read them back in using `read'.
+
+If `print-readably' is non-nil, a more relaxed syntax is used; for
+instance:
+
+   #<hashtable size 2/13 data (key1 value1 key2 value2) 0x874d>
+
+** It is now possible to build XEmacs with LDAP support.
+You will need to install a LDAP library first.  The following have
+been tested:
+  - LDAP 3.3 from the University of Michigan 
+    (get it from <URL:http://www.umich.edu/~dirsvcs/ldap/>)
+  - LDAP SDK 1.0 from Netscape Corp.
+    (get it from <URL:http://developer.netscape.com/>)
+
+** When profiling is in effect, a call-count of all recorded functions
+is now calculated.  This information is stored in
+`call-count-profile-table', and is utilized by `profile-results' as
+well as the new command `profile-call-count-results'.
+
+** It is now an error to change the value of a symbol whose name
+starts with a colon, if it is interned in the standard obarray.
+
+However, setting such a symbol to its proper value, which is that
+symbol itself, is not an error.  This is for the sake of programs that
+support pre-19.12 XEmacs and pre-20 GNU Emacs by explicitly setting
+these variables to themselves.
+
+** The `concat' function no longer accepts integer arguments.
+
+** The new function `string' concatenates all its argument characters
+and returns the resulting string.  This is consistent with other
+functions, like `list', `vector', etc.
+
+** The function `temp-directory' is now available to return the
+directory to store temporary files.  On Unix this will be obtained
+from TMPDIR, defaulting to `/tmp'.
+
+** The function load-average now accepts an optional argument
+USE-FLOATS.  If it is non-nil, the load average values are returned as
+floating point numbers, rather than as integers to be divided by 100.
+
+** The `make-event' function now supports the TYPE and PLIST
+arguments, which can be used to create various events from Lisp.  See
+the documentation for details.
+
+** `function-interactive' is a new function that returns the
+interactive specification of a funcallable object.
+
+** The new `lmessage' function allows printing of a formatted message
+with a particular label.
+
+   (lmessage 'progress "Processing... %d" counter)
+
+This function is more convenient than `display-message' because it
+automatically applies `format' to its arguments.
+
+** The new `lwarn' function, analogous to `lmessage', allows printing
+a formatted warning, with a non-default CLASS or LABEL.
+
+** The new function `split-path' can now be used to explode the
+components of a colon-separated search path into a list.
+
+   (split-path "foo:bar")
+     => ("foo" "bar")
+
+** Specifiers and symbols whose value is a specifier are now allowed
+as modeline specifications.
+
+** defcustom now accepts the keyword `:version'.  Use this to specify
+in which version of Emacs a certain variable's default value changed.
+For example,
+
+   (defcustom foo-max 34 "*Maximum number of foo's allowed."
+     :type 'integer
+     :group 'foo
+     :version "21.0")
+
+This information is used to control the customize-changed-options
+command.
+
+** The line number tracking in modeline is now efficient, even for
+very large buffers.  This is achieved by caching the line numbers of
+recent buffer positions, and reusing them.  This cache is used only in
+the buffers where `line-number-mode' is in effect.
+
+** When the new GNU Malloc aka Doug Lea Malloc is available, it will
+be used.  This should result in better performance on Linux systems
+with libc6.
+
+** The code XEmacs uses to assemble its various paths into the
+directory hierarchy has been rewritten to support the package system.
+Look under "Startup Paths" in the Info documentation for more
+information.
+
+*** site-lisp is now longer part of the load-path by default.
+Its use is deprecated, but you can specify --with-site-lisp=yes at the
+configure command line to get it back.
+
+*** `Info-default-directory-list' is now obsolete.  If you want to
+change the path which XEmacs uses to search for info files, set
+`Info-directory-list' instead.
diff --git a/etc/OONEWS b/etc/OONEWS
new file mode 100644 (file)
index 0000000..56e72d7
--- /dev/null
@@ -0,0 +1,5526 @@
+-*- mode:outline; minor-mode:outl-mouse -*-
+C-c TAB         This shows subheadings (if any) of current heading.
+C-c C-s         Show _all_ the text and headings under current heading
+
+
+* Introduction
+==============
+
+This file presents some general information about XEmacs.  It is primarily
+about the evolution of XEmacs and its release history.
+
+There are five sections.
+
+    Introduction................(this section) provides an introduction
+
+    Using Outline Mode..........briefly explains how to use outline mode
+
+    XEmacs Release Notes........detailed changes to this release
+
+    Future Plans for XEmacs.....what's next
+
+    The History of XEmacs.......some historical notes
+
+    A Long List of Packages.....all the stuff in XEmacs
+
+    What Changed................between versions and also FSF GNU Emacs
+
+New users should look at the next section on "Using Outline Mode".
+You will be more efficient when you can navigate quickly through this
+file.  Users who want to know which capabilities have been introduced
+in this release should look at the "XEmacs Release Notes."  Users
+interested in some of the details of how XEmacs differs from GNU Emacs
+should read the section "What Changed?".
+
+    N.B.  The term "FSF GNU Emacs" refers to any release of Emacs
+    Version 19 from the Free Software Foundation's GNU Project. (We do
+    not say just "GNU Emacs" because Richard M. Stallman ["RMS"]
+    thinks that this term is too generic; although we sometimes say
+    e.g. "GNU Emacs 19.30" to refer to a specific version of FSF GNU
+    Emacs.  The term "XEmacs" refers to this program or to its
+    predecessors "Era", "Epoch", and "Lucid Emacs".  The predecessor
+    of all these program is called "Emacs 18".  When no particular
+    version is implied, "Emacs" will be used.
+
+
+* Using Outline Mode
+====================
+
+This file is in outline mode, a major mode for viewing (or editing)
+outlines.  It allows you to make parts of the text temporarily invisible so
+that you can see just the overall structure of the outline.
+
+There are two ways of using outline mode:  with keys or with menus.  Using
+outline mode with menus is the simplest and is just as effective as using
+keystrokes.  There are menus for outline mode on the menubar as well as in
+popup menus activated by pressing mouse button 3.
+
+Try the following to help you read this file.
+
+C-c C-q         This hides everything but the very top level headings
+                You can then move to an interesting section
+C-c TAB         This shows subheadings (if any) of current heading.
+C-c C-s         Show _all_ the text and headings under current heading
+C-c C-d         Hide _all_ the text and headings under current heading
+
+It's then easy to navigate through the file alternating between
+showing, C-C C-s, and hiding, C-c C-d, the text.  Also, use the "Show"
+and "Hide" menus displayed to get access to the same commands.
+                
+You may at any time press `C-h m' to get a listing of the outline mode key
+bindings.
+
+* XEmacs Release Notes
+======================
+
+** Major Differences Between 19.15 and 19.16
+============================================
+
+Many bugs have been fixed.  XEmacs 19.16 is a bug-fix release only.  No
+new features have been added.
+
+-- shell-command did not respect its output-buffer argument.
+
+-- When using CVS in conjunction with frame-icon, an error
+   would occur when a frame was iconified.
+
+-- dired did not properly protect its data structures during
+   garbage collection.
+
+-- y-or-n-p-minibuf could crash XEmacs 19.15.
+
+-- overlay-lists did not always return a pair of lists.
+
+-- Starting with the -nw option did not prevent XEmacs 19.15 from
+   attempting to connect to a tooltalk server.
+
+-- XEmacs 19.15 could not be built on a DUNIX4.0 system.
+
+-- appt.el did not respect the user's hooks.
+
+-- outline-mode did not work in a tty-only XEmacs 19.15.
+
+-- MD5 checksum generation did not work on a 64-bit machine.
+
+-- XEmacs 19.15 ignored the user's mail path.
+
+-- The rcompile package checked for ange-ftp instead of efs.
+
+-- vc-directory did not work.
+
+-- Sometimes clicking on a modeline did not advance to the
+   next or previous buffer as it should have.
+
+-- The variable enable-local-variables was sometimes ignored.
+
+-- pending-del did not respect the user's hooks.
+
+-- CRiSP mode was synchronized with FSF emacs.
+
+-- The performance of font-lock was improved.
+
+-- There were numerous holes in the garbage collection.
+
+-- There were 2 minor bugs with using XEmacs 19.15 on a tty.
+
+-- XEmacs 19.15 ignored certain dead_key events.
+
+-- XEmacs 19.15 had minor fontification problems with java.
+
+-- mark-pop did not always restore the mark properly.
+
+-- smtpmail.el had a couple of minor bugs.
+
+-- telnet-mode did not always respond to the telnet prompt.
+
+-- gomoku was broken in XEmacs 19.15.
+
+-- recover-all files did not work in XEmacs 19.15.
+
+-- transient-mark-mode and skeleton.el did not work together.
+
+-- Footnotes were not properly formatted in info.
+
+--  Configuration of XEmacs 19.15 did not work on Sequent
+    computers, because they do not have a working version of alloca.
+
+-- In XEmacs 19.15 it was impossible to compile with Lucid
+   scrollbars without Motif.
+
+-- XEmacs 19.15 would erroneously report an internal error on
+   certain types of minibuffer input.
+
+-- When using virtual screens with your X server, sometimes
+   iconify-frame would cause XEmacs 19.15 to lose one of the frames.
+
+-- server-kill-buffer always returned nil.
+
+-- The :filter keyword on a menubar could crash XEmacs 19.15.
+
+-- psgml-mode did not respect the user's hooks.
+
+-- Many bugs in efs mode were fixed.
+
+-- sh-script.el could hang XEmacs.
+
+-- Options could not be saved after fonts were changed in
+   XEmacs 19.15.
+
+-- read-from-string could not read "1.".
+
+-- dired was confused about where chown lives on Linux.
+
+-- Edebug did not work on floating point numbers.
+
+-- first-change-hook saved the wrong buffer, so unwinding the
+   stack could result in the wrong buffer's being restored.
+
+-- pcl-cvs was incompatible with live-icon.
+
+-- save-buffer deactivated the zmacs region.
+
+-- When running a sub-process, if the standard error could
+   not be opened, the error was reported incorectly.
+
+-- shell-command-on-region had a bogus test for the active
+   region.
+
+-- get-frame-for-buffer ignored relevant properties.
+
+-- make-database did not correctly expand its filename
+   argument.
+
+-- A few minor improvements were made to the optimizer in the
+   byte-compiler.
+
+-- kill-region could get confused when the beginning of the
+   region was after the end of the region.
+
+-- movemail was upgraded to the same version which shipped
+   with XEmacs 20.2; this version understands Linux file locking.
+
+-- The regexp cache size was too small.
+
+-- The "save as" dialog was buggy.
+
+-- Minor bugs in sendmail mode.
+
+-- tm did not understand the png image format.
+
+-- set-text-properties only removed the first text property.
+
+-- add-log.el has been upgraded to the version supported by
+   FSF emacs 20.1.
+
+-- When tags-loop-continue was called inappropriately, the
+   wrong error message resulted.
+
+-- Frame creation was buggy, and could crash XEmacs.
+
+-- PNG support did not work on Linux.
+
+-- Asynchronous process output did not always work.
+
+-- x-compose.el did not support the degree sign or the
+   grave keysym.
+
+-- mh-invisible-headers did not work.
+
+-- Creating a tty frame could crash XEmacs 19.15.
+
+-- detach-extent could crash XEmacs.
+
+-- The minibuffer could get the read-only attribute.
+
+-- When the mouse was in the right side of the frame, its
+   position could be reported incorrectly.
+
+-- lib-complete didn't work with compressed files.
+
+-- getloadavg.c was brought into sync with the XEmacs 20.2
+   version.
+
+** Major Differences Between 19.14 and 19.15
+============================================
+
+Many bugs have been fixed.  An effort has been made to eradicate all
+XEmacs crashes, although we are not quite done yet.  The overall
+quality of XEmacs should be higher than any previous release.  XEmacs
+now compiles with nary a warning with some compilers.
+
+User visible changes:
+
+-- EFS replaces ange-ftp for remote file manipulation capability.
+
+-- TM (Tools for Mime) now comes with XEmacs.  This provides MIME
+   (Multi-purpose Internet Multi-media Extensions?) support for Mail
+   and News.  The primary author is Morioka Tomohiko.
+
+-- There is a new way to customize faces and (some) variables.
+   Try it with `M-x customize RET', or from the Options->Customize menu.
+   Documented in <URL:info:custom>.
+
+-- The AUC TeX environment for editing and running TeX is now bundled.
+   (Per Abrahamsen.)
+   Enable with (require 'tex-site) in your .emacs file.
+   Documented in <URL:info:auctex>.
+
+-- New user option `init-face-from-resources'.
+   If you don't set faces with X resources, you can speed up the
+   initialization of new faces by setting this to nil.
+
+-- `column.el' removed, use `column-number-mode' instead.
+
+-- Command line processing should work much better now - no more order
+   dependencies.
+
+-- html mode now defaults to using HTML-3.2
+
+-- VM now has a native MIME mode
+
+-- The traditional time.el package now has optional modeline graphics
+
+-- The XEmacs Logo has been changed courtesy of Jens Lautenbacher
+
+-- Default background changed to gray80
+
+-- The XEmacs build procedure has been changed to make it easier than
+   ever to include new packages to be dumped with the binary
+
+-- cc-mode is no longer auto-loaded.  (require 'cc-mode) is now needed
+   before you customize cc-mode in your .emacs.
+
+-- blink-cursor-mode is somewhat more useable now that the cursor
+   stops blinking during keyboard activity.
+
+-- Dired is now part of efs and went from version 6.X to 7.9.
+   Keybindings have been synced with FSF Emacs, there are more menus and
+   items in menus are sometimes grouped differently.  Any personnal
+   customization to dired will probably have to be checked.
+
+   If you are a 19.14 user and use its dired a lot, expect to get mad at
+   'c', 'r' and '^' keybindings."
+
+
+** New Packages
+------------
+
+Noteworthy new packages:
+        redo
+        igrep
+        uniquify
+        auctex
+
+
+-- Many new packages have been added:
+*** auctex (Per Abrahamsen)
+*** customize  (Per Abrahamsen))
+*** m4-mode 1.8 (Andrew Csillag)
+*** crisp.el - crisp/brief emulation (Gary D. Foster)
+     Minor mode emulation for Borland's Brief/Crisp editor
+*** Johan Vroman's iso-acc.el has been ported to XEmacs by Alexandre Oliva
+*** psgml-1.01 (Lennart Staflin, James Clark)
+*** python-mode.el 2.90 (Barry Warsaw)
+*** vrml-mode.el (Ben Wing)
+*** enriched.el, face-menu.el (Boris Goldowsky, Michael Sperber)
+*** sh-script.el (Daniel Pfeiffer)
+*** decipher.el (Christopher J. Madsen)
+*** mic-paren.el (Mikael Sjödin)
+*** xrdb-mode.el 1.21 (Barry Warsaw)
+*** redo.el 1.01 (Kyle Jones)
+*** edmacro.el (ported by Hrvoje Niksic)
+*** verilog-mode.el (Michael McNamara)
+*** webjump.el-1.4 (Neil W. Van Dyke)
+*** overlay.el (Joseph Nuspl support for Emacs overlay API)
+*** browse-cltl2.el 1.1 (Holger Schauer)
+*** mine.el 1.17 (Jacques Duthen)
+*** igrep.el 2.56 (Kevin Rodgers)
+*** speedbar.el (Eric Ludlam)
+*** frame-icon.el (Michael Lamoureux)
+*** winmgr-mode.el (David Konerding, Stefan Strobel & Barry Warsaw)
+*** whitespace-mode.el (Heiko Muenkel)
+*** detached-minibuf.el (Alvin Shelton)
+
+** Updated Packages
+------------
+
+Most packages have been updated to the latest available versions.
+(thanks go to countless maintainers):
+
+*** ediff 2.64 (Michael Kifer)
+*** Gnus Gnus 5.4.36 (Lars Magne Ingebrigtsen)
+
+**** nntp.el has been totally rewritten in an asynchronous fashion.
+
+**** Article prefetching functionality has been moved up into
+Gnus.
+
+**** Scoring can now be performed with logical operators like
+`and', `or', `not', and parent redirection.
+
+**** Article washing status can be displayed in the
+article mode line.
+
+**** gnus.el has been split into many smaller files.
+
+**** Suppression of duplicate articles based on Message-ID.
+
+(setq gnus-suppress-duplicates t)
+
+**** New variables for specifying what score and adapt files
+are to be considered home score and adapt files.  See
+`gnus-home-score-file' and `gnus-home-adapt-files'.
+
+**** Groups can inherit group parameters from parent topics.
+
+**** Article editing has been revamped and is now usable.
+
+**** Signatures can be recognized in more intelligent fashions.
+See `gnus-signature-separator' and `gnus-signature-limit'.
+
+**** Summary pick mode has been made to look more nn-like.
+Line numbers are displayed and the `.' command can be
+used to pick articles.
+
+**** Commands for moving the .newsrc.eld from one server to
+another have been added.
+
+    `M-x gnus-change-server'
+
+**** A way to specify that "uninteresting" fields be suppressed when
+generating lines in buffers.
+
+**** Several commands in the group buffer can be undone with
+`M-C-_'.
+
+**** Scoring can be done on words using the new score type `w'.
+
+**** Adaptive scoring can be done on a Subject word-by-word basis:
+
+    (setq gnus-use-adaptive-scoring '(word))
+
+**** Scores can be decayed.
+
+    (setq gnus-decay-scores t)
+
+**** Scoring can be performed using a regexp on the Date header.  The
+Date is normalized to compact ISO 8601 format first.
+
+**** A new command has been added to remove all data on articles from
+the native server.
+
+   `M-x gnus-group-clear-data-on-native-groups'
+
+**** A new command for reading collections of documents
+(nndoc with nnvirtual on top) has been added -- `M-C-d'.
+
+**** Process mark sets can be pushed and popped.
+
+**** A new mail-to-news backend makes it possible to post
+even when the NNTP server doesn't allow posting.
+
+**** A new backend for reading searches from Web search engines
+(DejaNews, Alta Vista, InReference) has been added.
+
+    Use the `G w' command in the group buffer to create such
+    a group.
+
+**** Groups inside topics can now be sorted using the standard
+sorting functions, and each topic can be sorted independently.
+
+    See the commands under the `T S' submap.
+
+**** Subsets of the groups can be sorted independently.
+
+    See the commands under the `G P' submap.
+
+**** Cached articles can be pulled into the groups.
+
+    Use the `Y c' command.
+
+**** Score files are now applied in a more reliable order.
+
+**** Reports on where mail messages end up can be generated.
+
+    `M-x nnmail-split-history'
+
+**** More hooks and functions have been added to remove junk
+from incoming mail before saving the mail.
+
+    See `nnmail-prepare-incoming-header-hook'.
+
+**** The nnml mail backend now understands compressed article files.
+*** w3 3.0.71  (Bill Perry)
+    - Major upgrade to Emacs/W3, including
+      - Much fuller stylesheet support
+      - Tables support
+      - Frames support
+      - better asynchronous downloads
+      - now uses the widget library for consistent look of form elements
+      - Much much much faster
+*** ilisp 5.8 (Chris McConnell, Ivan Vasquez, Marco Antoniotti, Rick
+     Campbell)
+*** VM 6.22     (Kyle Jones)
+*** etags 11.78 (Francesco Potorti`)
+*** ksh-mode.el 2.9
+*** vhdl-mode.el 2.73 (Rod Whitby)
+*** id-select.el 1.4.5 (Bob Weiner)
+*** EDT/TPU emulation modes should work now for the first time.
+*** viper 2.93 (Michael Kifer) is now the `official' vi emulator for XEmacs.
+*** big-menubar should work much better now.
+*** mode-motion+.el 3.16
+*** backup-dir 2.0 (Greg Klanderman)
+*** ps-print.el-3.05 (Jacques Duthen Prestataire)
+*** lazy-lock-1.16 (Simon Marshall)
+*** fast-lock.el 3.10.2 (Simon Marshall)
+*** reporter 3.3 (Barry Warsaw)
+*** hm--html-menus 5.4 (Heiko Muenkel)
+*** cc-mode 4.387 (Barry Warsaw)
+*** elp 2.37 (Barry Warsaw)
+*** itimer.el-1.05 (Kyle Jones)
+*** floating-toolbar.el-1.02 (Kyle Jones)
+*** balloon-help.el-1.05 (Kyle Jones)
+*** hyperbole-4.023 (Bob Weiner)
+*** cperl-mode-1.31+
+*** OO-Browser 2.10 (Bob Weiner)
+
+** Changes at Lisp level
+------------
+
+-- New `widget' library for inserting UI components in buffers.
+   Documented in <URL:info:widget>.
+
+-- New `custom' library for declaring user options and faces.
+   Documented in <URL:info:custom>.
+
+-- New function `make-empty-face'.
+   Like `make-face', but doesn't query the resource database.
+
+-- New function x-keysym-on-keyboard-p helps determine keyboard
+   characteristics for key rebinding:
+
+  x-keysym-on-keyboard-p: (KEYSYM &optional DEVICE)
+    -- a built-in function.
+  Return true if KEYSYM names a key on the keyboard of DEVICE.
+  More precisely, return true if pressing a physical key
+  on the keyboard of DEVICE without any modifier keys generates KEYSYM.
+  Valid keysyms are listed in the files /usr/include/X11/keysymdef.h and in
+  /usr/lib/X11/XKeysymDB, or whatever the equivalents are on your system.
+
+-- Usage of keysyms of the form kp_0 is deprecated and one should use
+   the Emacs compatible kp-0 instead.
+
+
+-- preceding-char and following-char have been obsoleted.  Use the
+   much safer and correct functions char-after and char-before instead.
+
+-- Many symbols present for compatibility with GNU Emacs no longer
+   generate bytecompiler warning messages
+
+-- Installed info files are now compressed (support courtesy of Joseph J Nuspl)
+
+-- (load-average) works on Solaris, even if you're not root. Thanks to
+   Hrvoje Niksic.
+
+-- OffiX drag-and-drop support added
+
+-- lots of syncing with 19.34 elisp files, most by Steven Baur
+
+-- M-: (eval-expression) is now enabled by default since it is much
+   more difficult to type.
+
+-- new variables:
+        signal-error-on-buffer-boundary
+
+
+* Future Plans for XEmacs
+==========================
+
+This is the end of the line for XEmacs v19.  No new development is planned
+on this source tree.  XEmacs 20.1 will contain the functionality in 19.15,
+and development will continue with XEmacs 20.2. The major new `feature'
+planned in 20.2 will be the introduction of separable packages and the
+capability to download and use an XEmacs lite distribution.
+
+* The History of XEmacs
+=======================
+
+This product is an extension of GNU Emacs, previously known to some as
+"Lucid Emacs" or "ERA".  It was initially based on an early version of Emacs
+Version 19 from the Free Software Foundation and has since been kept
+up-to-date with recent versions of that product.  It stems from a
+collaboration of Lucid, Inc. with SunSoft DevPro (a division of Sun
+Microsystems, Inc.; formerly called SunPro) and the University of Illinois.
+
+NOTE: Lucid, Inc. is currently out of business but development on XEmacs
+continues strong.  Recently, Amdahl Corporation and INS Engineering have
+both contributed significantly to the development of XEmacs.
+
+
+* A Long List of Packages
+=======================
+
+This section gives a detailed list of packages included with XEmacs.
+It's long!  Of particular interest are: games, gnus, modes, packages,
+and utils.
+
+** auctex       - Super TeX
+*** auctex/auc-old.el
+This file contains an alternative keymapping, compatible with
+older versions of AUC TeX.  You are strongly suggested to try the
+new keyboard layout, as we would like this file to go away
+eventually.
+*** auctex/bib-cite.el
+Commentary:
+
+This package is used in various TeX modes to display or edit references
+associated with \cite commands, or matching \ref and \label commands.
+*** auctex/font-latex.el
+Commentary:
+*** auctex/style/german.el
+Commentary:
+
+`german.sty' use `"' to give next character an umlaut.
+*** auctex/style/harvard.el
+Commentary:
+
+Harvard citation style is from Peter Williams available on the CTAN
+servers
+*** auctex/style/plfonts.el
+Commentary:
+
+`plfonts.sty' use `"' to make next character Polish.
+`plfonts.sty' <C> L. Holenderski, IIUW, lhol@mimuw.edu.pl
+*** auctex/style/plhb.el
+Commentary:
+
+`plhb.sty' use `"' to make next character Polish.
+`plhb.sty' <C> J. S. Bie\'n, IIUW, jsbien@mimuw.edu.pl
+
+
+** bytecomp     - Byte compile Emacs Lisp files
+*** bytecomp/byte-optimize.el
+Commentary:
+
+========================================================================
+"No matter how hard you try, you can't make a racehorse out of a pig.
+You can, however, make a faster pig."
+
+Or, to put it another way, the emacs byte compiler is a VW Bug.  This code
+makes it be a VW Bug with fuel injection and a turbocharger...  You're
+still not going to make it go faster than 70 mph, but it might be easier
+to get it there.
+
+*** bytecomp/bytecomp-runtime.el
+Commentary:
+
+interface to selectively inlining functions.
+This only happens when source-code optimization is turned on.
+*** bytecomp/bytecomp.el
+Commentary:
+
+The Emacs Lisp byte compiler.  This crunches lisp source into a sort
+of p-code which takes up less space and can be interpreted faster.
+The user entry points are byte-compile-file and byte-recompile-directory.
+*** bytecomp/disass.el
+Commentary:
+
+The single entry point, `disassemble', disassembles a code object generated
+by the Emacs Lisp byte-compiler.  This doesn't invert the compilation
+operation, not by a long shot, but it's useful for debugging.
+
+** calendar     - Calendars, diaries and appointments
+*** calendar/calendar.el
+Commentary:
+
+This collection of functions implements a calendar window.  It
+generates a calendar for the current month, together with the previous
+and coming months, or for any other three-month period.  The calendar
+can be scrolled forward and backward in the window to show months in
+the past or future; the cursor can move forward and backward by days,
+weeks, or months, making it possible, for instance, to jump to the
+date a specified number of days, weeks, or months from the date under
+the cursor.  The user can display a list of holidays and other notable
+days for the period shown; the notable days can be marked on the
+calendar, if desired.  The user can also specify that dates having
+corresponding diary entries (in a file that the user specifies) be
+marked; the diary entries for any date can be viewed in a separate
+window.  The diary and the notable days can be viewed independently of
+the calendar.  Dates can be translated from the (usual) Gregorian
+calendar to the day of the year/days remaining in year, to the ISO
+commercial calendar, to the Julian (old style) calendar, to the Hebrew
+calendar, to the Islamic calendar, to the French Revolutionary calendar,
+to the Mayan calendar, and to the astronomical (Julian) day number.
+When floating point is available, times of sunrise/sunset can be displayed,
+as can the phases of the moon.  Appointment notification for diary entries
+is available.
+*** calendar/cal-dst.el
+Commentary:
+
+This collection of functions implements the features of calendar.el and
+holiday.el that deal with daylight savings time.
+*** calendar/cal-french.el
+Commentary:
+
+This collection of functions implements the features of calendar.el and
+diary.el that deal with the French Revolutionary calendar.
+*** calendar/cal-mayan.el
+Commentary:
+
+This collection of functions implements the features of calendar.el and
+diary.el that deal with the Mayan calendar.  It was written jointly by
+*** calendar/cal-x.el
+Commentary:
+
+This collection of functions implements dedicated frames in x-windows for
+calendar.el.
+*** calendar/cal-xemacs.el
+Commentary:
+
+This collection of functions implements menu bar and popup menu support for
+calendar.el.
+*** calendar/diary-ins.el
+Commentary:
+
+This collection of functions implements the diary insertion features as
+described in calendar.el.
+*** calendar/solar.el
+Commentary:
+
+This collection of functions implements the features of calendar.el,
+diary.el, and holiday.el that deal with times of day, sunrise/sunset, and
+eqinoxes/solstices.
+
+** cl           - Common Lisp compatibility with Emacs Lisp
+*** cl/cl-compat.el
+Commentary:
+
+These are extensions to Emacs Lisp that provide a degree of
+Common Lisp compatibility, beyond what is already built-in
+in Emacs Lisp.
+
+** comint       - For running shells, telnet, rsh, gdb, dbx under Emacs
+*** comint/comint-xemacs.el
+Commentary:
+
+Declare customizable faces for comint outside the main code so it can
+be dumped with XEmacs.
+*** comint/comint.el
+Commentary:
+
+This file defines a general command-interpreter-in-a-buffer package
+(comint mode). The idea is that you can build specific process-in-a-buffer
+modes on top of comint mode -- e.g., lisp, shell, scheme, T, soar, ....
+This way, all these specific packages share a common base functionality,
+and a common set of bindings, which makes them easier to use (and
+saves code, implementation time, etc., etc.).
+
+Several packages are already defined using comint mode:
+- shell.el defines a shell-in-a-buffer mode.
+- cmulisp.el defines a simple lisp-in-a-buffer mode.
+
+- The file cmuscheme.el defines a scheme-in-a-buffer mode.
+- The file tea.el tunes scheme and inferior-scheme modes for T.
+- The file soar.el tunes lisp and inferior-lisp modes for Soar.
+- cmutex.el defines tex and latex modes that invoke tex, latex, bibtex,
+  previewers, and printers from within emacs.
+- background.el allows csh-like job control inside emacs.
+*** comint/gdb.el
+Commentary:
+
+A facility is provided for the simultaneous display of the source code
+in one window, while using gdb to step through a function in the
+other.  A small arrow in the source window, indicates the current
+line.
+*** comint/gud.el
+Commentary:
+*** comint/history.el
+Commentary:
+
+suggested generic history stuff  -- tale
+
+This is intended to provided easy access to a list of elements
+being kept as a history ring.
+*** comint/inf-lisp.el
+Commentary:
+
+This file defines a a lisp-in-a-buffer package (inferior-lisp
+mode) built on top of comint mode.  This version is more
+featureful, robust, and uniform than the Emacs 18 version.  The
+key bindings are also more compatible with the bindings of Hemlock
+and Zwei (the Lisp Machine emacs).
+*** comint/kermit.el
+Commentary:
+
+I'm not sure, but I think somebody asked about running kermit under shell
+mode a while ago.  Anyway, here is some code that I find useful.  The result
+is that I can log onto machines with primitive operating systems (VMS and
+ATT system V :-), and still have the features of shell-mode available for
+command history, etc.  It's also handy to be able to run a file transfer in
+an emacs window.  The transfer is in the "background", but you can also
+monitor or stop it easily.
+*** comint/rlogin.el
+Commentary:
+
+Support for remote logins using `rlogin'.
+This program is layered on top of shell.el; the code here only accounts
+for the variations needed to handle a remote process, e.g. directory
+tracking and the sending of some special characters.
+*** comint/shell.el
+Commentary:
+
+This file defines a a shell-in-a-buffer package (shell mode) built
+on top of comint mode.  This is actually cmushell with things
+renamed to replace its counterpart in Emacs 18.  cmushell is more
+featureful, robust, and uniform than the Emacs 18 version.
+*** comint/telnet.el
+Commentary:
+
+This mode is intended to be used for telnet or rsh to a remode host;
+`telnet' and `rsh' are the two entry points.  Multiple telnet or rsh
+sessions are supported.
+
+** custom       - Allow's user to customize Emacs
+*** custom/custom.el
+Commentary:
+
+This file only contain the code needed to declare and initialize
+user options.  The code to customize options is autoloaded from
+`cus-edit.el'.
+
+The code implementing face declarations is in `cus-face.el'
+
+** edebug       - Emacs Lisp debugger
+*** edebug/cl-read.el
+Commentary:
+
+Please send bugs and comments to the author.
+
+This package replaces the standard Emacs Lisp reader (implemented
+as a set of built-in Lisp function in C) by a flexible and
+customizable Common Lisp like one (implemented entirely in Emacs
+Lisp). During reading of Emacs Lisp source files, it is about 40%
+slower than the built-in reader, but there is no difference in
+loading byte compiled files - they dont contain any syntactic sugar
+and are loaded with the built in subroutine `load'.
+
+** ediff        - Compare and merge files with graphical difference display
+*** ediff/ediff.el
+Commentary:
+
+Never read that diff output again!
+Apply patch interactively!
+Merge with ease!
+
+This package provides a convenient way of simultaneous browsing through
+the differences between a pair (or a triple) of files or buffers.  The
+files being compared, file-A, file-B, and file-C (if applicable) are
+shown in separate windows (side by side, one above the another, or in
+separate frames), and the differences are highlighted as you step
+through them.  You can also copy difference regions from one buffer to
+another (and recover old differences if you change your mind).
+
+Ediff also supports merging operations on files and buffers, including
+merging using ancestor versions. Both comparison and merging operations can
+be performed on directories, i.e., by pairwise comparison of files in those
+directories.
+
+** efs          - Remote file access (replaces ange-ftp)
+See online manual.
+
+** electric     - The "electric" commands; these implement temporary
+windows for help, list-buffers, etc.
+
+*** electric/ehelp.el
+Commentary:
+
+This package provides a pre-packaged `Electric Help Mode' for
+browsing on-line help screens.  There is one entry point,
+`with-electric-help'; all you have to give it is a no-argument
+function that generates the actual text of the help into the current
+buffer.
+
+** emulators    - Various emulations: mocklisp, teco, TPU/EDT, WordStar
+*** emulators/mlconvert.el
+Commentary:
+
+This package converts Mocklisp code written under a Gosling or UniPress
+Emacs for use with GNU Emacs.  The translated code will require runtime
+support from the mlsupport.el equivalent.
+*** emulators/mlsupport.el
+Commentary:
+
+This package provides equivalents of certain primitives from Gosling
+Emacs (including the commercial UniPress versions).  These have an
+ml- prefix to distinguish them from native GNU Emacs functions with
+similar names.  The package mlconvert.el translates Mocklisp code
+to use these names.
+*** emulators/teco.el
+Commentary:
+
+This code has been tested some, but no doubt contains a zillion bugs.
+You have been warned.
+
+Written by Dale R. Worley based on a C implementation by Matt Fichtenbaum.
+Please send comments, bug fixes, enhancements, etc. to drw@math.mit.edu.
+*** emulators/tpu-edt.el
+Commentary:
+
+%% TPU-edt -- Emacs emulating TPU emulating EDT
+
+%% Introduction
+
+   TPU-edt emulates the popular DEC VMS editor EDT (actually, it emulates
+   DEC TPU's EDT emulation, hence the name TPU-edt).
+*** emulators/tpu-extras.el
+Commentary:
+
+ Use the functions defined here to customize TPU-edt to your tastes by
+ setting scroll margins and/or turning on free cursor mode.  Here's an
+ example for your .emacs file.
+*** emulators/ws-mode.el
+Commentary:
+
+This emulates WordStar, with a major mode.
+
+** energize     - Interface to now-defunct Lucid's C/C++ integrated
+environment XEmacs (nee Lucid Emacs) saw birth explicitly to serve
+Energize.
+
+** eos          - SPARCworks
+
+** eterm        - Full terminal emulation under Emacs
+*** eterm/term.el
+Commentary:
+
+This file defines a general command-interpreter-in-a-buffer package
+(term mode). The idea is that you can build specific process-in-a-buffer
+modes on top of term mode -- e.g., lisp, shell, scheme, T, soar, ....
+This way, all these specific packages share a common base functionality,
+and a common set of bindings, which makes them easier to use (and
+saves code, implementation time, etc., etc.).
+*** eterm/tgud.el
+Commentary:
+
+The ancestral gdb.el was by W. Schelter <wfs@rascal.ics.utexas.edu>
+It was later rewritten by rms.  Some ideas were due to Masanobu.
+Grand Unification (sdb/dbx support) by Eric S. Raymond <esr@thyrsus.com>
+The overloading code was then rewritten by Barry Warsaw <bwarsaw@cen.com>,
+who also hacked the mode to use comint.el.  Shane Hartman <shane@spr.com>
+added support for xdb (HPUX debugger).  Rick Sladkey <jrs@world.std.com>
+wrote the GDB command completion code.  Dave Love <d.love@dl.ac.uk>
+added the IRIX kluge and re-implemented the Mips-ish variant.
+Then hacked by Per Bothner <bothner@cygnus.com> to use term.el.
+*** eterm/tshell.el
+Commentary:
+
+This file defines a a shell-in-a-buffer package (shell mode) built
+on top of term mode.  This is actually cmushell with things
+renamed to replace its counterpart in Emacs 18.  cmushell is more
+featureful, robust, and uniform than the Emacs 18 version.
+
+** games        - blackbox, mines, decipher, doctor, ...
+*** games/blackbox.el
+Commentary:
+
+The object of the game is to find four hidden balls by shooting rays
+into the black box.  There are four possibilities: 1) the ray will
+pass thru the box undisturbed, 2) it will hit a ball and be absorbed,
+3) it will be deflected and exit the box, or 4) be deflected immediately,
+not even being allowed entry into the box.
+*** games/conx.el
+Commentary:
+
+conx.el: Yet Another Dissociator.
+
+Select a buffer with a lot of text in it.  Say M-x conx-buffer
+or M-x conx-region.  Repeat on as many other bodies of text as
+you like.
+
+M-x conx will use the word-frequency tree the above generated
+to produce random sentences in a popped-up buffer.  It will pause
+at the end of each paragraph for two seconds; type ^G to stop it.
+*** games/cookie1.el
+Commentary:
+
+Support for random cookie fetches from phrase files, used for such
+critical applications as emulating Zippy the Pinhead and confounding
+the NSA Trunk Trawler.
+*** games/decipher.el
+Commentary:
+
+This package is designed to help you crack simple substitution
+ciphers where one letter stands for another.  It works for ciphers
+with or without word divisions.  (You must set the variable
+decipher-ignore-spaces for ciphers without word divisions.)
+*** games/dissociate.el
+Commentary:
+
+The single entry point, `dissociated-press', applies a travesty
+generator to the current buffer.  The results can be quite amusing.
+*** games/doctor.el
+Commentary:
+
+The single entry point `doctor', simulates a Rogerian analyst using
+phrase-production techniques similar to the classic ELIZA demonstration
+of pseudo-AI.
+*** games/flame.el
+Commentary:
+
+"Flame" program.  This has a chequered past.
+*** games/gomoku.el
+Gomoku is a game played between two players on a rectangular board.     Each
+player, in turn, marks a free square of its choice. The winner is the first
+one to mark five contiguous squares in any direction (horizontally,
+vertically or diagonally).
+
+*** games/hanoi.el
+Commentary:
+
+Solves the Towers of Hanoi puzzle while-U-wait.
+
+The puzzle: Start with N rings, decreasing in sizes from bottom to
+top, stacked around a post.  There are two other posts.  Your mission,
+should you choose to accept it, is to shift the pile, stacked in its
+original order, to another post.
+*** games/life.el
+Commentary:
+
+A demonstrator for John Horton Conway's "Life" cellular automaton
+in Emacs Lisp.  Picks a random one of a set of interesting Life
+patterns and evolves it according to the familiar rules.
+*** games/mine.el
+Commentary:
+
+The object of this classical game is to locate the hidden mines.
+To do this, you hit the squares on the game board that do not
+contain mines, and you mark the squares that do contain mines.
+*** games/mpuz.el
+Commentary:
+
+When this package is loaded, `M-x mpuz' generates a random multiplication
+puzzle.  This is a multiplication example in which each digit has been
+consistently replaced with some letter.  Your job is to reconstruct
+the original digits.  Type `?' while the mode is active for detailed help.
+*** games/spook.el
+Commentary:
+
+ Just before sending mail, do M-x spook.
+ A number of phrases will be inserted into your buffer, to help
+ give your message that extra bit of attractiveness for automated
+ keyword scanners.
+*** games/studly.el
+Commentary:
+
+Functions to studlycapsify a region, word, or buffer.  Possibly the
+esoteric significance of studlycapsification escapes you; that is,
+you suffer from autostudlycapsifibogotification.  Too bad.
+*** games/yow.el
+Commentary:
+
+Important pinheadery for GNU Emacs.
+
+See cookie1.el for implementation.  Note --- the `n' argument of yow
+from the 18.xx implementation is no longer; we only support *random*
+random access now.
+
+** gnus         - The ultimate News and Mail reader
+See online manual
+*** gnus/gnus-audio.el
+Commentary:
+This file provides access to sound effects in Gnus.
+Prerelease:  This file is partially stripped to support earcons.el
+You can safely ignore most of it until Red Gnus.  **Evil Laugh**
+*** gnus/gnus-gl.el
+Commentary:
+*** gnus/gnus-undo.el
+Commentary:
+
+This package allows arbitrary undoing in Gnus buffers.  As all the
+Gnus buffers aren't very text-oriented (what is in the buffers is
+just some random representation of the actual data), normal Emacs
+undoing doesn't work at all for Gnus.
+*** gnus/mailheader.el
+Commentary:
+
+This package provides an abstraction to RFC822-style messages, used in
+mail news, and some other systems.  The simple syntactic rules for such
+headers, such as quoting and line folding, are routinely reimplemented
+in many individual packages.  This package removes the need for this
+redundancy by representing message headers as association lists,
+offering functions to extract the set of headers from a message, to
+parse individual headers, to merge sets of headers, and to format a set
+of headers.
+*** gnus/message.el
+Commentary:
+
+This mode provides mail-sending facilities from within Emacs.  It
+consists mainly of large chunks of code from the sendmail.el,
+gnus-msg.el and rnewspost.el files.
+*** gnus/nnheader.el
+Commentary:
+
+These macros may look very much like the ones in GNUS 4.1.  They
+are, in a way, but you should note that the indices they use have
+been changed from the internal GNUS format to the NOV format.  The
+makes it possible to read headers from XOVER much faster.
+
+** hm--html-menus - Menus and popups for writing/viewing html documents
+
+** hyperbole    - Personal database
+
+** ilisp        - A comint-based package for interacting with inferior
+lisp processes.
+
+
+** iso          - Implement various ISO character standards
+*** iso/iso-acc.el
+Commentary:
+
+Function `iso-accents-mode' activates a minor mode in which
+typewriter "dead keys" are emulated.  The purpose of this emulation
+is to provide a simple means for inserting accented characters
+according to the ISO-8859-1 character set.
+*** iso/iso-ascii.el
+Commentary:
+
+This code sets up to display ISO 8859/1 characters on plain
+ASCII terminals.  The display strings for the characters are
+more-or-less based on TeX.
+*** iso/iso-cvt.el
+Commentary:
+
+This lisp code serves two purposes, both of which involve
+the translation of various conventions for representing European
+character sets to ISO 8859-1.
+
+** mailcrypt    - Encrypting/decrypting of mail messages
+
+** mel          - MIME encoding library (see also TM)
+
+** mh-e         - Emacs interface to MH mail reader
+*** mh-e/mh-e.el
+Commentary:
+
+mh-e is an Emacs interface to the MH mail system.
+
+** modes        - How to edit files: Ada, asm, awk, bib, cperl, eiffel, ...
+*** modes/arc-mode.el
+Commentary:
+
+NAMING: "arc" is short for "archive" and does not refer specifically
+to files whose name end in ".arc"
+
+ARCHIVE TYPES: Currently only the archives below are handled, but the
+structure for handling just about anything is in place.
+
+                       Arc     Lzh     Zip     Zoo
+                       --------------------------------
+View listing           Intern  Intern  Intern  Intern
+Extract member         Y       Y       Y       Y
+Save changed member    Y       Y       Y       Y
+Add new member         N       N       N       N
+Delete member          Y       Y       Y       Y
+Rename member          Y       Y       N       N
+Chmod                  -       Y       Y       -
+Chown                  -       Y       -       -
+Chgrp                  -       Y       -       -
+*** modes/asm-mode.el
+Commentary:
+
+This minor mode is based on text mode.  It defines a private abbrev table
+that can be used to save abbrevs for assembler mnemonics.
+*** modes/auto-show.el
+Commentary:
+
+This file provides functions that
+automatically scroll the window horizontally when the point moves
+off the left or right side of the window.
+*** modes/awk-mode.el
+Commentary:
+
+Sets up C-mode with support for awk-style #-comments and a lightly
+hacked syntax table.
+*** modes/bib-mode.el
+Commentary:
+
+  GNU Emacs code to help maintain databases compatible with (troff)
+  refer and lookbib.  The file bib-file should be set to your
+  bibliography file.  Keys are automagically inserted as you type,
+  and appropriate keys are presented for various kinds of entries.
+*** modes/bibtex.el
+*** modes/cc-compat.el
+Commentary:
+
+Boring old c-mode.el (BOCM) is confusion and brain melt. cc-mode.el
+is clarity of thought and purity of chi. If you are still unwilling
+to accept enlightenment, this might help, or it may prolong your
+agony.
+*** modes/cc-guess.el
+Commentary:
+
+This file contains routines that help guess the cc-mode style in a
+particular region of C, C++, or Objective-C code.  It is provided
+for example and experimentation only.  It is not supported in
+anyway.  Some folks have asked for a style guesser and the best way
+to show my thoughts on the subject is with this sample code.  Feel
+free to improve upon it in anyway you'd like.  Please send me the
+results.  Note that style guessing is lossy!
+*** modes/cc-lobotomy.el
+Commentary:
+
+Every effort has been made to improve the performance of
+cc-mode. However, due to the nature of the C, C++, and Objective-C
+language definitions, a trade-off is often required between
+accuracy of construct recognition and speed. I believe it is always
+best to be correct, and that the mode is currently fast enough for
+most normal usage.  Others disagree.  I have no intention of
+including these hacks in the main distribution.  When cc-mode
+version 5 comes out, it will include a rewritten indentation engine
+so that performance will be greatly improved automatically.  This
+was not included in this release of version 4 so that Emacs 18
+could still be supported.  Note that this implies that cc-mode
+version 5 will *not* work on Emacs 18!
+*** modes/cc-mode.el
+Commentary:
+
+This package provides modes in GNU Emacs for editing C, C++,
+Objective-C, and Java code. It is intended to be a replacement for
+c-mode.el (a.k.a. BOCM -- Boring Old C-Mode), c++-mode.el,
+cplus-md.el, and cplus-md1.el, all of which are in some way
+ancestors of this file.  A number of important improvements have
+been made, briefly: complete K&R C, ANSI C, `ARM' C++, Objective-C,
+and Java support with consistent indentation across all modes, more
+intuitive indentation controlling variables, compatibility across
+all known Emacsen, nice new features, and tons of bug fixes.  This
+package is called "CC Mode" to distinguish it from its ancestors,
+but there is no cc-mode command.  Usage and programming details are
+contained in an accompanying texinfo manual.
+*** modes/cl-indent.el
+Commentary:
+
+This package supplies a single entry point, common-lisp-indent-function,
+which performs indentation in the preferred style for Common Lisp code.
+*** modes/cperl-mode.el Can't find any Commentary section
+*** modes/eiffel3.el    Can't find any Commentary section
+*** modes/enriched.el   Can't find any Commentary section
+*** modes/executable.el
+Commentary:
+
+executable.el is used by certain major modes to insert a suitable
+#! line at the beginning of the file, if the file does not already
+have one.
+
+*** modes/f90.el
+Commentary:
+
+Smart mode for editing F90 programs in FREE FORMAT.
+Knows about continuation lines, named structured statements, and other
+new features in F90 including HPF (High Performance Fortran) structures.
+The basic feature is to provide an accurate indentation of F90 programs.
+In addition, there are many more features like automatic matching of all
+end statements, an auto-fill function to break long lines, a join-lines
+function which joins continued lines etc etc.
+ To facilitate typing, a fairly complete list of abbreviations is provided.
+   For example, `i is short-hand for integer (if abbrev-mode is on).
+
+*** modes/follow.el
+Commentary:
+
+`Follow mode' is a minor mode for Emacs 19 and XEmacs which
+combines windows into one tall virtual window.
+
+The feeling of a "virtual window" has been accomplished by the use
+of two major techniques:
+
+ * The windows always displays adjacent sections of the buffer.
+  This means that whenever one window is moved, all the
+  others will follow.  (Hence the name Follow Mode.)
+
+ * Should the point (cursor) end up outside a window, another
+  window displaying that point is selected, if possible.  This
+  makes it possible to walk between windows using normal cursor
+  movement commands.
+*** modes/fortran.el
+Commentary:
+
+Fortran mode has been upgraded and is now maintained by Stephen A. Wood
+(saw@cebaf.gov).  It now will use either fixed format continuation line
+markers (character in 6th column), or tab format continuation line style
+(digit after a TAB character.)  A auto-fill mode has been added to
+automatically wrap fortran lines that get too long.
+
+We acknowledge many contributions and valuable suggestions by
+Lawrence R. Dodd, Ralf Fassel, Ralph Finch, Stephen Gildea,
+Dr. Anil Gokhale, Ulrich Mueller, Mark Neale, Eric Prestemon,
+Gary Sabot and Richard Stallman.
+*** modes/hideif.el
+Commentary:
+
+Hide-ifdef suppresses the display of code that the preprocessor wouldn't
+pass through.  The support of constant expressions in #if lines is
+limited to identifiers, parens, and the operators: &&, ||, !, and
+"defined".  Please extend this.
+*** modes/hideshow.el
+Commentary:
+
+This file provides `hs-minor-mode'.  When active, six commands:
+  hs-{hide,show}-{all,block}, hs-show-region and hs-minor-mode
+are available.  They implement block hiding and showing.  Blocks are
+defined in mode-specific way.  In c-mode or c++-mode, they are simply
+curly braces, while in lisp-ish modes they are parens.  Multi-line
+comments (c-mode) can also be hidden.  The command M-x hs-minor-mode
+toggles the minor mode or sets it (similar to outline minor mode).
+See documentation for each command for more info.
+*** modes/icon.el
+Commentary:
+
+A major mode for editing the Icon programming language.
+*** modes/ksh-mode.el
+
+
+Description:
+  sh, ksh, and bash script editing commands for emacs.
+
+  This major mode assists shell script writers with indentation
+  control and control structure construct matching in much the same
+  fashion as other programming language modes. Invoke describe-mode
+  for more information.
+*** modes/lisp-mnt.el
+Commentary:
+
+This minor mode adds some services to Emacs-Lisp editing mode.
+
+First, it knows about the header conventions for library packages.
+One entry point supports generating synopses from a library directory.
+Another can be used to check for missing headers in library files.
+*** modes/lisp-mode.el
+Commentary:
+
+The base major mode for editing Lisp code (used also for Emacs Lisp).
+This mode is documented in the Emacs manual
+*** modes/m4-mode.el
+Commentary:
+
+A smart editing mode for m4 macro definitions.  It seems to have most of the
+syntax right (sexp motion commands work, but function motion commands don't).
+It also sets the font-lock syntax stuff for colorization
+*** modes/mail-abbrevs.el       Can't find any Commentary section
+*** modes/make-mode.el
+Commentary:
+
+A major mode for editing makefiles.  The mode knows about Makefile
+syntax and defines M-n and M-p to move to next and previous productions.
+*** modes/modula2.el
+Commentary:
+
+A major mode for editing Modula-2 code.  It provides convenient abbrevs
+for Modula-2 keywords, knows about the standard layout rules, and supports
+a native compile command.
+*** modes/nroff-mode.el
+Commentary:
+
+This package is a major mode for editing nroff source code.  It knows
+about various nroff constructs, ms, mm, and me macros, and will fill
+and indent paragraphs properly in their presence.  It also includes
+a command to count text lines (excluding nroff constructs), a command
+to center a line, and movement commands that know how to skip macros.
+*** modes/old-c-mode.el
+Commentary:
+
+A smart editing mode for C code.  It knows a lot about C syntax and tries
+to position the cursor according to C layout conventions.  You can
+change the details of the layout style with option variables.  Load it
+and do M-x describe-mode for details.
+*** modes/outl-mouse.el Can't find any Commentary section
+*** modes/outline.el
+Commentary:
+
+This package is a major mode for editing outline-format documents.
+An outline can be `abstracted' to show headers at any given level,
+with all stuff below hidden.  See the Emacs manual for details.
+*** modes/pascal.el
+
+Emacs should enter Pascal mode when you find a Pascal source file.
+When you have entered Pascal mode, you may get more info by pressing
+C-h m. You may also get online help describing various functions by:
+C-h f <Name of function you want described>
+*** modes/perl-mode.el
+*** modes/picture.el
+Commentary:
+
+This code provides the picture-mode commands documented in the Emacs
+manual.  The screen is treated as a semi-infinite quarter-plane with
+support for rectangle operations and `etch-a-sketch' character
+insertion in any of eight directions.
+*** modes/postscript.el Can't find any Commentary section
+modes/prolog.el
+Commentary:
+
+This package provides a major mode for editing Prolog.  It knows
+about Prolog syntax and comments, and can send regions to an inferior
+Prolog interpreter process.
+*** modes/python-mode.el
+Commentary:
+
+This is a major mode for editing Python programs.  It was developed
+by Tim Peters after an original idea by Michael A. Guravage.  Tim
+subsequently left the net; in 1995, Barry Warsaw inherited the
+mode and is the current maintainer.
+*** modes/rexx-mode.el  Can't find any Commentary section
+*** modes/rsz-minibuf.el
+Commentary:
+
+This package allows the entire contents (or as much as possible) of the
+minibuffer to be visible at once when typing.  As the end of a line is
+reached, the minibuffer will resize itself.  When the user is done
+typing, the minibuffer will return to its original size.
+*** modes/scheme.el
+Commentary:
+
+Adapted from Lisp mode by Bill Rozas, jinx@prep.
+Initially a query replace of Lisp mode, except for the indentation
+of special forms.  Probably the code should be merged at some point
+so that there is sharing between both libraries.
+*** modes/scribe.el     Can't find any Commentary section
+*** modes/sendmail.el
+Commentary:
+
+This mode provides mail-sending facilities from within Emacs.  It is
+documented in the Emacs user's manual.
+*** modes/sh-script.el
+Commentary:
+
+Major mode for editing shell scripts.  Bourne, C and rc shells as well
+as various derivatives are supported and easily derived from.  Structured
+statements can be inserted with one command or abbrev.  Completion is
+available for filenames, variables known from the script, the shell and
+the environment as well as commands.
+*** modes/simula.el
+Commentary:
+
+A major mode for editing the Simula language.  It knows about Simula
+syntax and standard indentation commands.  It also provides convenient
+abbrevs for Simula keywords.
+*** modes/tcl.el
+Commentary:
+
+Major mode for editing Tcl
+*** modes/texinfo.el    Can't find any Commentary section
+*** modes/text-mode.el
+Commentary:
+
+This package provides the fundamental text mode documented in the
+Emacs user's manual.
+*** modes/two-column.el Can't find any Commentary section
+*** modes/verilog-mode.el
+Commentary:
+
+A major mode for editing Verilog HDL source code. When you have
+entered Verilog mode, you may get more info by pressing C-h m. You
+may also get online help describing various functions by: C-h f
+<Name of function you want described>
+*** modes/view-less.el
+Commentary:
+
+This mode is for browsing files without changing them.  Keybindings
+similar to those used by the less(1) program are used.
+*** modes/view.el
+Commentary:
+
+This package provides the `view' minor mode documented in the Emacs
+user's manual.
+
+XEmacs: We don't autoload this because we use `view-less' instead.
+*** modes/vrml-mode.el
+Commentary:
+
+Mostly bastardized from tcl.el.
+*** modes/whitespace-mode.el
+Commentary:
+
+        This is a minor mode, which highlights whitespaces (blanks and
+        tabs) with different faces, so that it is easier to
+        distinguish between them.
+        Toggle the mode with: M-x whitespace-mode
+        or with: M-x whitespace-incremental-mode
+        The second one should be used in big files.
+*** modes/winmgr-mode.el
+Commentary:
+
+This package is a major mode for editing window configuration files and
+also defines font-lock keywords for such files.
+*** modes/xpm-mode.el   Can't find any Commentary section
+modes/xrdb-mode.el      Can't find any Commentary section
+
+** mu           - Message Utilities library (part of the Tools for MIME).
+
+** ns           - NeXTstep
+
+** oobr         - Browser for Object Oriented languages
+*** oobr/br-c++-ft.el   Can't find any Commentary section
+
+** packages     - Lot's of stuff: array, baloon help, version control, ...
+*** packages/add-log.el
+Commentary:
+
+This facility is documented in the Emacs Manual.
+*** packages/apropos.el
+Commentary:
+
+The ideas for this package were derived from the C code in
+src/keymap.c and elsewhere.  The functions in this file should
+always be byte-compiled for speed.  Someone should rewrite this in
+C (as part of src/keymap.c) for speed.
+*** packages/array.el
+Commentary:
+
+Commands for editing a buffer interpreted as a rectangular array
+or matrix of whitespace-separated strings.  You specify the array
+dimensions and some other parameters at startup time.
+*** packages/auto-save.el       Can't find any Commentary section
+packages/autoinsert.el
+Commentary:
+
+ The following defines an association list for text to be
+ automatically inserted when a new file is created, and a function
+ which automatically inserts these files; the idea is to insert
+ default text much as the mode is automatically set using
+ auto-mode-alist.
+*** packages/avoid.el
+Commentary:
+
+For those who are annoyed by the mouse pointer obscuring text,
+this mode moves the mouse pointer - either just a little out of
+the way, or all the way to the corner of the frame.
+To use, load or evaluate this file and type M-x mouse-avoidance-mode .
+To set up permanently, put this file on your .emacs:
+*** packages/backup-dir.el      Can't find any Commentary section
+*** packages/balloon-help.el    Can't find any Commentary section
+*** packages/big-menubar.el     Can't find any Commentary section
+*** packages/blink-cursor.el
+*** packages/blink-paren.el     Can't find any Commentary section
+*** packages/bookmark.el        Can't find any Commentary section
+*** packages/buff-menu.el
+Commentary:
+
+Edit, delete, or change attributes of all currently active Emacs
+buffers from a list summarizing their state.  A good way to browse
+any special or scratch buffers you have loaded, since you can't find
+them by filename.  The single entry point is `Buffer-menu-mode',
+normally bound to C-x C-b.
+*** packages/chistory.el
+Commentary:
+
+This really has nothing to do with list-command-history per se, but
+its a nice alternative to C-x ESC ESC (repeat-complex-command) and
+functions as a lister if given no pattern.  It's not important
+enough to warrant a file of its own.
+*** packages/cmuscheme.el
+Commentary:
+
+   This is a customisation of comint-mode (see comint.el)
+*** packages/crypt.el
+Commentary:
+
+NOTE: Apparently not being maintained by the author, who now
+uses jka-compr.el. --ben (1/26/96)
+Included patch (1/26/96)
+
+Code for handling all sorts of compressed and encrypted files.|
+*** packages/cu-edit-faces.el   Can't find any Commentary section
+*** packages/dabbrev.el
+Commentary:
+
+The purpose with this package is to let you write just a few
+characters of words you've written earlier to be able to expand
+them.
+*** packages/desktop.el
+Commentary:
+
+Save the Desktop, i.e.,
+        - some global variables
+      - the list of buffers with associated files.  For each buffer also
+                - the major mode
+                - the default directory
+                - the point
+                - the mark & mark-active
+                - buffer-read-only
+                - some local variables
+*** packages/fast-lock.el
+Commentary:
+
+Lazy Lock mode is a Font Lock support mode.
+It makes visiting a file in Font Lock mode faster by restoring its face text
+properties from automatically saved associated Font Lock cache files.
+*** packages/font-lock.el
+Font-lock-mode is a minor mode that causes your comments to be
+displayed in one face, strings in another, reserved words in another,
+documentation strings in another, and so on.
+*** packages/func-menu.el       Can't find any Commentary section
+*** packages/generic-sc.el      Can't find any Commentary section
+*** packages/gnuserv.el Can't find any Commentary section
+*** packages/gopher.el
+Commentary:
+OPERATING INSTRUCTIONS
+
+To use, `M-x gopher'.  To specify a different root server, use
+`C-u M-x gopher'.  If you want to use bookmarks, set the variable
+gopher-support-bookmarks appropriately.
+*** packages/hexl.el
+Commentary:
+
+This package implements a major mode for editing binary files.  It uses
+a program called hexl, supplied with the GNU Emacs distribution, that
+can filter a binary into an editable format or from the format back into
+binary.  For full instructions, invoke `hexl-mode' on an empty buffer and
+do `M-x describe-mode'.
+*** packages/hyper-apropos.el
+Commentary:
+
+ Rather than run apropos and print all the documentation at once,
+ I find it easier to view a "table of contents" first, then
+ get the details for symbols as you need them.
+*** packages/icomplete.el
+Commentary:
+
+Loading this package implements a more fine-grained minibuffer
+completion feedback scheme.  Prospective completions are concisely
+indicated within the minibuffer itself, with each successive
+keystroke.
+*** packages/igrep.el   Can't find any Commentary section
+*** packages/info.el    Can't find any Commentary section
+*** packages/informat.el        Can't find any Commentary section
+*** packages/ispell.el
+Commentary:
+*** packages/jka-compr.el
+Commentary:
+
+This package implements low-level support for reading, writing,
+and loading compressed files.  It hooks into the low-level file
+I/O functions (including write-region and insert-file-contents) so
+that they automatically compress or uncompress a file if the file
+appears to need it (based on the extension of the file name).
+Packages like Rmail, VM, GNUS, and Info should be able to work
+with compressed files without modification.
+*** packages/lazy-lock.el
+Commentary:
+
+Purpose:
+
+To make visiting buffers in `font-lock-mode' faster by making fontification
+be demand-driven and stealthy.
+Fontification only occurs when, and where, necessary.
+*** packages/ledit.el
+Commentary:
+
+This is a major mode for editing Liszt.  See etc/LEDIT for details.
+*** packages/lispm-fonts.el     Can't find any Commentary section
+*** packages/lpr.el
+Commentary:
+
+Commands to send the region or a buffer your printer.  Entry points
+are `lpr-buffer', `print-buffer', lpr-region', or `print-region'; option
+variables include `lpr-switches' and `lpr-command'.
+*** packages/makeinfo.el
+Commentary:
+
+The Texinfo mode `makeinfo' related commands are:
+*** packages/makesum.el
+Commentary:
+
+Displays a nice human-readable summary of all keybindings in a
+two-column format.
+*** packages/man.el     Can't find any Commentary section
+*** packages/metamail.el
+Commentary:
+
+Note: Metamail does not have all options which is compatible with
+the environment variables.  For that reason, matamail.el have to
+hack the environment variables.  In addition, there is no way to
+display all header fields without extra informative body messages
+which are suppressed by "-q" option.
+
+The idea of using metamail to process MIME messages is from
+gnus-mime.el by Spike <Spike@world.std.com>.
+*** packages/mic-paren.el       Can't find any Commentary section
+*** packages/mime-compose.el    Can't find any Commentary section
+*** packages/mode-motion+.el    Can't find any Commentary section
+*** packages/netunam.el
+Commentary:
+
+Use the Remote File Access (RFA) facility of HP-UX from Emacs.
+*** packages/page-ext.el
+Commentary:
+
+You may use these commands to handle an address list or other
+small data base.
+*** packages/paren.el
+Commentary:
+
+Purpose of this package:
+
+  This package highlights matching parens (or whole sexps) for easier
+  editing of source code, particularly lisp source code.
+*** packages/pending-del.el     Can't find any Commentary section
+*** packages/ps-print.el
+Commentary:
+
+This package provides printing of Emacs buffers on PostScript
+printers; the buffer's bold and italic text attributes are
+preserved in the printer output.  Ps-print is intended for use with
+Emacs 19 or Lucid Emacs, together with a fontifying package such as
+font-lock or hilit.
+*** packages/rcompile.el
+Commentary:
+
+This package is for running a remote compilation and using emacs to parse
+the error messages. It works by rsh'ing the compilation to a remote host
+and parsing the output. If the file visited at the time remote-compile was
+called was loaded remotely (ange-ftp), the host and user name are obtained
+by the calling ange-ftp-ftp-name on the current directory. In this case the
+next-error command will also ange-ftp the files over. This is achieved
+automatically because the compilation-parse-errors function uses
+default-directory to build it's file names. If however the file visited was
+loaded locally, remote-compile prompts for a host and user and assumes the
+files mounted locally (otherwise, how was the visited file loaded).
+*** packages/recent-files.el    Can't find any Commentary section
+*** packages/refbib.el
+Commentary:
+
+Use: from a buffer containing the refer-style bibliography,
+  M-x r2b-convert-buffer
+Program will prompt for an output buffer name, and will log
+warnings during the conversion process in the buffer *Log*.
+*** packages/remote.el  Can't find any Commentary section
+*** packages/reportmail.el      Can't find any Commentary section
+*** packages/resume.el
+Commentary:
+
+The purpose of this library is to handle command line arguments
+when you resume an existing Emacs job.
+
+You can't get the benefit of this library by using the `emacs' command,
+since that always starts a new Emacs job.  Instead you must use a
+command called `edit' which knows how to resume an existing Emacs job
+if you have one, or start a new Emacs job if you don't have one.
+
+To define the `edit' command, run the script etc/emacs.csh (if you use CSH),
+or etc/emacs.bash if you use BASH.  You would normally do this in your
+login script.
+*** packages/saveconf.el        Can't find any Commentary section
+*** packages/saveplace.el
+Commentary:
+
+Automatically save place in files, so that visiting them later
+(even during a different Emacs session) automatically moves point
+to the saved position, when the file is first found.  Uses the
+value of buffer-local variable save-place to determine whether to
+save position or not.
+*** packages/sccs.el    Can't find any Commentary section
+*** packages/scroll-in-place.el Can't find any Commentary section
+*** packages/server.el
+Commentary:
+
+This Lisp code is run in Emacs when it is to operate as
+a server for other processes.
+
+*** packages/shell-font.el      Can't find any Commentary section
+*** packages/spell.el
+Commentary:
+
+This mode provides an Emacs interface to the UNIX spell(1) program.
+Entry points are `spell-buffer', `spell-word', `spell-region' and
+`spell-string'.  These facilities are documented in the Emacs user's
+manual.
+*** packages/supercite.el       Can't find any Commentary section
+*** packages/tar-mode.el        Can't find any Commentary section
+*** packages/terminal.el        Can't find any Commentary section
+*** packages/tex-latin1.el      Can't find any Commentary section
+*** packages/texinfmt.el        Can't find any Commentary section
+*** packages/texnfo-tex.el      Can't find any Commentary section
+*** packages/texnfo-upd.el
+Commentary:
+*** packages/time-stamp.el
+Commentary:
+
+If you put a time stamp template anywhere in the first 8 lines of a file,
+it can be updated every time you save the file.  See the top of
+time-stamp.el for a sample.  The template looks like one of the following:
+    Time-stamp: <>
+    Time-stamp: " "
+The time stamp is written between the brackets or quotes, resulting in
+    Time-stamp: <95/01/18 10:20:51 gildea>
+*** packages/time.el
+Commentary:
+
+Facilities to display current time/date and a new-mail indicator
+in the Emacs mode line.  The single entry point is `display-time'.
+*** packages/uncompress.el
+Commentary:
+
+This package can be used to arrange for automatic uncompress of
+files packed with the UNIX compress(1) utility when they are visited.
+All that's necessary is to load it.  This can conveniently be done from
+your .emacs file.
+*** packages/underline.el
+Commentary:
+
+This package deals with the primitive form of underlining
+consisting of prefixing each character with "_\^h".  The entry
+point `underline-region' performs such underlining on a region.
+The entry point `ununderline-region' removes it.
+*** packages/upd-copyr.el       Can't find any Commentary section
+*** packages/vc.el
+Commentary:
+
+This mode is fully documented in the Emacs user's manual.
+
+Supported version-control systems presently include SCCS, RCS, and CVS.
+The RCS lock-stealing code doesn't work right unless you use RCS 5.6.2
+or newer.  Currently (January 1994) that is only a beta test release.
+Even initial checkins will fail if your RCS version is so old that ci
+doesn't understand -t-; this has been known to happen to people running
+NExTSTEP 3.0.
+*** packages/webjump.el
+Change Log:
+*** packages/webster-ucb.el     Can't find any Commentary section
+*** packages/webster.el Can't find any Commentary section
+*** packages/xscheme.el Can't find any Commentary section
+
+
+** pcl-cvs      - Front end to CVS (see also vc -- version control)
+*** pcl-cvs/cookie.el
+Commentary:
+
+    Introduction
+    ============
+
+Cookie is a package that implements a connection between an
+dll (a doubly linked list) and the contents of a buffer.
+Possible uses are dired (have all files in a list, and show them),
+buffer-list, kom-prioritize (in the LysKOM elisp client) and
+others.  pcl-cvs.el uses cookie.el.
+*** pcl-cvs/dll-debug.el
+Commentary:
+
+This is a plug-in replacement for dll.el.  It is dreadfully
+slow, but it facilitates debugging.  Don't trust the comments in
+this file too much.
+(provide 'dll)
+
+*** pcl-cvs/dll.el
+Commentary:
+
+A doubly linked list consists of one cons cell which holds the tag
+'DL-LIST in the car cell and a pointer to a dummy node in the cdr
+cell. The doubly linked list is implemented as a circular list
+with the dummy node first and last. The dummy node is recognized
+by comparing it to the node which the cdr of the cons cell points
+to.
+
+*** pcl-cvs/elib-node.el
+Commentary:
+
+A node is implemented as an array with three elements, using
+(elt node 0) as the left pointer
+(elt node 1) as the right pointer
+(elt node 2) as the data
+*** pcl-cvs/pcl-cvs-startup.el  Can't find any Commentary section
+*** pcl-cvs/pcl-cvs-xemacs.el   Can't find any Commentary section
+*** pcl-cvs/pcl-cvs.el  Can't find any Commentary section
+*** pcl-cvs/string.el
+Commentary:
+
+
+This file is part of the elisp library Elib.
+It implements simple generic string functions for use in other
+elisp code: replace regexps in strings, split strings on regexps.
+
+** prim         - Lots of XEmacs primitives (see Emacs-Lisp manual).
+*** prim/about.el       Can't find any Commentary section
+*** prim/advocacy.el    Can't find any Commentary section
+*** prim/auto-autoloads.el      Can't find any Commentary section
+*** prim/backquote.el   Can't find any Commentary section
+*** prim/buffer.el      Can't find any Commentary section
+*** prim/case-table.el  Can't find any Commentary section
+*** prim/cleantree.el
+Commentary:
+
+This code is derived from Gnus based on a suggestion by
+ David Moore <dmoore@ucsd.edu>
+*** prim/cmdloop.el     Can't find any Commentary section
+*** prim/cmdloop1.el    Can't find any Commentary section
+*** prim/console.el     Can't find any Commentary section
+*** prim/custom-load.el Can't find any Commentary section
+*** prim/debug.el
+Commentary:
+
+This is a major mode documented in the Emacs manual.
+*** prim/device.el      Can't find any Commentary section
+*** prim/dialog.el      Can't find any Commentary section
+*** prim/disp-table.el  Can't find any Commentary section
+*** prim/env.el
+Commentary:
+
+UNIX processes inherit a list of name-to-string associations from their
+parents called their `environment'; these are commonly used to control
+program options.  This package permits you to set environment variables
+to be passed to any sub-process run under XEmacs.
+*** prim/events.el      Can't find any Commentary section
+*** prim/extents.el     Can't find any Commentary section
+*** prim/faces.el       Can't find any Commentary section
+*** prim/files.el
+Commentary:
+
+Defines most of XEmacs's file- and directory-handling functions,
+including basic file visiting, backup generation, link handling,
+ITS-id version control, load- and write-hook handling, and the like.
+*** prim/fill.el
+Commentary:
+
+All the commands for filling text.  These are documented in the XEmacs
+Reference Manual.
+*** prim/float-sup.el   Can't find any Commentary section
+*** prim/format.el
+Commentary:
+
+This file defines a unified mechanism for saving & loading files stored
+in different formats.  `format-alist' contains information that directs
+Emacs to call an encoding or decoding function when reading or writing
+files that match certain conditions.
+*** prim/frame.el       Can't find any Commentary section
+*** prim/glyphs.el      Can't find any Commentary section
+*** prim/gui.el Can't find any Commentary section
+*** prim/help.el
+Commentary:
+
+This code implements XEmacs's on-line help system, the one invoked by
+`M-x help-for-help'.
+*** prim/inc-vers.el    Can't find any Commentary section
+*** prim/indent.el
+Commentary:
+
+Commands for making and changing indentation in text.  These are
+described in the XEmacs Reference Manual.
+*** prim/isearch-mode.el        Can't find any Commentary section
+*** prim/itimer-autosave.el
+Commentary:
+
+itimer-driven auto-saves
+*** prim/itimer.el      Can't find any Commentary section
+*** prim/keydefs.el     Can't find any Commentary section
+*** prim/keymap.el      Can't find any Commentary section
+*** prim/lisp.el
+Commentary:
+
+Lisp editing commands to go with Lisp major mode.
+*** prim/loaddefs.el
+Commentary:
+
+You should never need to write autoloads by hand and put them here.
+
+It is no longer necessary.  Instead use autoload.el to maintain them
+for you.  Just insert ";;;###autoload" before defuns or defmacros you
+want to be autoloaded, or other forms you want copied into loaddefs.el
+(defvars, key definitions, etc.).
+*** prim/loadup-el.el   Can't find any Commentary section
+*** prim/loadup.el
+Commentary:
+
+This is loaded into a bare Emacs to make a dumpable one.
+*** prim/macros.el
+Commentary:
+
+Extension commands for keyboard macros.  These permit you to assign
+a name to the last-defined keyboard macro, expand and insert the
+lisp corresponding to a macro, query the user from within a macro,
+or apply a macro to each line in the reason.
+
+This file is largely superseded by edmacro.el as of XEmacs 20.1. -sb
+*** prim/menubar.el     Can't find any Commentary section
+*** prim/minibuf.el
+Commentary:
+
+Written by Richard Mlynarik 2-Oct-92
+*** prim/misc.el        Can't find any Commentary section
+*** prim/mode-motion.el Can't find any Commentary section
+*** prim/modeline.el    Can't find any Commentary section
+*** prim/mouse.el       Can't find any Commentary section
+*** prim/novice.el
+Commentary:
+
+This mode provides a hook which is, by default, attached to various
+putatively dangerous commands in a (probably futile) attempt to
+prevent lusers from shooting themselves in the feet.
+*** prim/objects.el     Can't find any Commentary section
+*** prim/obsolete.el    Can't find any Commentary section
+*** prim/options.el
+Commentary:
+
+This code provides functions to list and edit the values of all global
+option variables known to loaded Emacs Lisp code.  There are two entry
+points, `list-options' and `edit' options'.  The latter enters a major
+mode specifically for editing option values.  Do `M-x describe-mode' in
+that context for more details.
+*** prim/overlay.el     Can't find any Commentary section
+*** prim/page.el
+Commentary:
+
+This code provides the page-oriented movement and selection commands
+documented in the XEmacs Reference Manual.
+*** prim/paragraphs.el
+Commentary:
+
+This package provides the paragraph-oriented commands documented in the
+XEmacs Reference Manual.
+*** prim/process.el     Can't find any Commentary section
+*** prim/profile.el     Can't find any Commentary section
+*** prim/rect.el
+Commentary:
+
+This package provides the operations on rectangles that are ocumented
+in the XEmacs Reference Manual.
+*** prim/register.el
+Commentary:
+
+This package of functions emulates and somewhat extends the venerable
+TECO's `register' feature, which permits you to save various useful
+pieces of buffer state to named variables.  The entry points are
+documented in the XEmacs Reference Manual.
+*** prim/replace.el
+Commentary:
+
+This package supplies the string and regular-expression replace functions
+documented in the XEmacs Reference Manual.
+
+All the gettext calls are for XEmacs I18N3 message catalog support.
+*** prim/reposition.el
+Commentary:
+
+Reposition-window makes an entire function definition or comment visible,
+or, if it is already visible, places it at the top of the window;
+additional invocations toggle the visibility of comments preceding the
+code.  For the gory details, see the documentation for reposition-window;
+rather than reading that, you may just want to play with it.
+
+This tries pretty hard to do the recentering correctly; the precise
+action depends on what the buffer looks like.  If you find a situation
+where it doesn't behave well, let me know.  This function is modeled
+after one of the same name in ZMACS, but the code is all-new and the
+behavior in some situations differs.
+*** prim/scrollbar.el   Can't find any Commentary section
+*** prim/simple.el
+Commentary:
+
+A grab-bag of basic XEmacs commands not specifically related to some
+major mode or to file-handling.
+*** prim/sort.el
+Commentary:
+
+This package provides the sorting facilities documented in the XEmacs
+Reference Manual.
+*** prim/sound.el       Can't find any Commentary section
+*** prim/specifier.el   Can't find any Commentary section
+*** prim/startup.el     Can't find any Commentary section
+*** prim/subr.el
+Commentary:
+
+There's not a whole lot in common now with the FSF version,
+be wary when applying differences.  I've left in a number of lines
+of commentary just to give diff(1) something to synch itself with to
+provide useful context diffs. -sb
+*** prim/symbols.el
+Commentary:
+
+The idea behind magic variables is that you can specify arbitrary
+behavior to happen when setting or retrieving a variable's value.  The
+purpose of this is to make it possible to cleanly provide support for
+obsolete variables (e.g. unread-command-event, which is obsolete for
+unread-command-events) and variable compatibility
+(e.g. suggest-key-bindings, the FSF equivalent of
+teach-extended-commands-p and teach-extended-commands-timeout).
+*** prim/syntax.el      Can't find any Commentary section
+*** prim/tabify.el
+Commentary:
+
+Commands to optimize spaces to tabs or expand tabs to spaces in a region
+(`tabify' and `untabify').  The variable tab-width does the obvious.
+*** prim/toolbar.el     Can't find any Commentary section
+*** prim/undo-stack.el  Can't find any Commentary section
+*** prim/update-elc.el  Can't find any Commentary section
+*** prim/userlock.el
+Commentary:
+
+This file is autoloaded to handle certain conditions
+detected by the file-locking code within XEmacs.
+The two entry points are `ask-user-about-lock' and
+`ask-user-about-supersession-threat'.
+*** prim/window.el      Can't find any Commentary section
+
+** psgml        - SGML/HTML editing mode
+*** psgml/iso-sgml.el   Can't find any Commentary section
+*** psgml/psgml-api.el
+Commentary:
+
+Provides some extra functions for the API to PSGML.
+
+*** psgml/psgml-charent.el
+Commentary:
+
+ Functions to convert character entities into displayable characters
+ and displayable characters back into character entities.
+
+*** psgml/psgml-debug.el        Can't find any Commentary section
+*** psgml/psgml-dtd.el
+Commentary:
+
+Part of major mode for editing the SGML document-markup language.
+
+*** psgml/psgml-edit.el
+Commentary:
+
+Part of major mode for editing the SGML document-markup language.
+
+*** psgml/psgml-fs.el
+Commentary:
+
+The function `style-format' formats the SGML-file in the current
+buffer according to the style defined in the file `psgml-style.fs'
+(or the file given by the variable `fs-style').
+
+To try it load this file and open the test file example.sgml. Then
+run the emacs command `M-x style-format'.
+
+The style file should contain a single Lisp list. The elements of
+this list, are them self lists, describe the style for an element type.
+The sublists begin with the generic identifier for the element types and
+the rest of the list are characteristic/value pairs.
+
+E.g.  ("p"  block t  left 4  top 2)
+
+Defines the style for p-elements to be blocks with left margin 4 and
+at least to blank lines before the block.
+
+*** psgml/psgml-html.el
+Commentary:
+
+Parts were taken from html-helper-mode and from code by Alastair Burt.
+
+Feb 18 1997, Heiko Muenkel: Added the hook variable html-mode-hook.
+;       With that you can now use the hm--html-minor-mode together
+;       with this mode. For that you've to add the following line
+;       to your ~/.emacs:
+;               (add-hook 'html-mode-hook 'hm--html-minor-mode)
+*** psgml/psgml-info.el
+Commentary:
+
+This file is an addon to the PSGML package.
+
+This file contains some commands to print out information about the
+current DTD.
+*** psgml/psgml-other.el
+Commentary:
+
+Part of psgml.el. Code not compatible with XEmacs.
+
+*** psgml/psgml-parse.el
+Commentary:
+
+Part of major mode for editing the SGML document-markup language.
+
+*** psgml/psgml-xemacs.el
+Commentary:
+
+Part of psgml.el
+
+Menus for use with XEmacs
+
+*** psgml/psgml.el
+Commentary:
+
+Major mode for editing the SGML document-markup language.
+*** psgml/tempo.el
+Commentary:
+
+This file provides a simple way to define powerful templates, or
+macros, if you wish. It is mainly intended for, but not limited to,
+other programmers to be used for creating shortcuts for editing
+certain kind of documents. It was originally written to be used by
+a HTML editing mode written by Nelson Minar <nelson@santafe.edu>,
+and his html-helper-mode.el is probably the best example of how to
+use this program.
+
+** rmail        - Reading Mail (see also VM and GNUS)
+*** rmail/rmail-kill.el
+Commentary:
+*** rmail/rmail-xemacs.el
+Commentary:
+
+Right button pops up a menu of commands in Rmail and Rmail summary buffers.
+Middle button selects indicated mail message in Rmail summary buffer
+*** rmail/rmail.el      Can't find any Commentary section
+*** rmail/rmailedit.el  Can't find any Commentary section
+*** rmail/rmailkwd.el   Can't find any Commentary section
+*** rmail/rmailmsc.el   Can't find any Commentary section
+*** rmail/rmailout.el   Can't find any Commentary section
+*** rmail/rmailsort.el  Can't find any Commentary section
+*** rmail/rmailsum.el
+Commentary:
+
+  Provided all commands from rmail-mode in rmail-summary-mode and made key
+  bindings in both modes wholly compatible.
+*** rmail/undigest.el
+Commentary:
+
+See Internet RFC 934
+*** rmail/unrmail.el    Can't find any Commentary section
+
+** sunpro       - Additional code for interfacing with SunPro products.
+*** sunpro/sunpro-init.el       Can't find any Commentary section
+*** sunpro/sunpro-keys.el       Can't find any Commentary section
+*** sunpro/sunpro-load.el       Can't find any Commentary section
+*** sunpro/sunpro-menubar.el
+Commentary:
+ Creates the default SunPro menubars.
+*** sunpro/sunpro-sparcworks.el
+Commentary:
+
+Called from the SPARCworks Manager with the command:
+
+   xemacs -q -l sunpro-sparcworks $SUNPRO_SWM_TT_ARGS $SUNPRO_SWM_GUI_ARGS
+
+** term         - Terminal specific initialization: vt100, wyse, ...
+*** term/AT386.el
+Commentary:
+
+Uses the Emacs 19 terminal initialization features --- won't work with 18.
+*** term/apollo.el      Can't find any Commentary section
+*** term/bg-mouse.el    Can't find any Commentary section
+*** term/bobcat.el      Can't find any Commentary section
+*** term/internal.el    Can't find any Commentary section
+*** term/keyswap.el
+Commentary:
+
+This package is meant to be called by other terminal packages.
+*** term/linux.el       Can't find any Commentary section
+*** term/lk201.el       Can't find any Commentary section
+*** term/news.el
+Commentary:
+
+Uses the Emacs 19 terminal initialization features --- won't work with 18.
+*** term/pc-win.el      Can't find any Commentary section
+*** term/scoansi.el     Can't find any Commentary section
+*** term/sun-mouse.el
+Commentary:
+*** term/sun.el
+Commentary:
+
+The function key sequences for the console have been converted for
+use with function-key-map, but the *tool stuff hasn't been touched.
+*** term/sup-mouse.el   Can't find any Commentary section
+*** term/tty-init.el
+Commentary:
+*** term/tvi970.el
+Commentary:
+
+Uses the Emacs 19 terminal initialization features --- won't work with 18.
+*** term/vt-control.el
+Commentary:
+
+ The functions contained in this file send various VT control codes
+ to the terminal where emacs is running.  The following functions are
+ available.
+*** term/vt100-led.el   Can't find any Commentary section
+*** term/vt100.el
+Commentary:
+
+Uses the Emacs 19 terminal initialization features --- won't work with 18.
+
+Handles all VT100 clones, including the Apollo terminal.  Also handles
+the VT200 --- its PF- and arrow- keys are different, but all those
+are really set up by the terminal initialization code, which mines them
+out of termcap.  This package is here to define the keypad comma, dash
+and period (which aren't in termcap's repertoire) and the function for
+changing from 80 to 132 columns & vv.
+*** term/vt102.el       Can't find any Commentary section
+*** term/vt125.el       Can't find any Commentary section
+*** term/vt200.el       Can't find any Commentary section
+*** term/vt201.el       Can't find any Commentary section
+*** term/vt220.el       Can't find any Commentary section
+*** term/vt240.el       Can't find any Commentary section
+*** term/vt300.el       Can't find any Commentary section
+*** term/vt320.el       Can't find any Commentary section
+*** term/vt400.el       Can't find any Commentary section
+*** term/vt420.el       Can't find any Commentary section
+*** term/win32-win.el
+Commentary:
+
+win32-win.el:  this file is loaded from ../lisp/startup.el when it recognizes
+that win32 windows are to be used.  Command line switches are parsed and those
+pertaining to win32 are processed and removed from the command line.  The
+win32 display is opened and hooks are set for popping up the initial window.
+
+startup.el will then examine startup files, and eventually call the hooks
+which create the first window (s).
+*** term/wyse50.el
+Commentary:
+
+The Wyse50 is ergonomically wonderful, but its escape-sequence design sucks
+rocks.  The left-arrow key emits a backspace (!) and the down-arrow a line
+feed (!!).  Thus, you have to unbind some commonly-used Emacs keys to
+enable the arrows.
+*** term/xterm.el       Can't find any Commentary section
+
+** tl           - Tiny Library (Part of the Tools for MIME).
+*** tl/bitmap.el        Can't find any Commentary section
+*** tl/cless.el Can't find any Commentary section
+*** tl/emu-e19.el       Can't find any Commentary section
+*** tl/emu-orig.el      Can't find any Commentary section
+*** tl/emu-xemacs.el    Can't find any Commentary section
+*** tl/emu.el   Can't find any Commentary section
+*** tl/file-detect.el   Can't find any Commentary section
+*** tl/filename.el      Can't find any Commentary section
+*** tl/mu-cite.el
+Commentary:
+*** tl/mu-comment.el
+Commentary:
+
+     type `C-c C-q' at the beginning of S-expression you want to
+     comment out.
+*** tl/mu-replace.el
+Commentary:
+*** tl/range.el Can't find any Commentary section
+*** tl/richtext.el      Can't find any Commentary section
+*** tl/std11-parse.el   Can't find any Commentary section
+*** tl/std11.el Can't find any Commentary section
+*** tl/texi-util.el     Can't find any Commentary section
+*** tl/tinyrich.el      Can't find any Commentary section
+*** tl/tl-822.el        Can't find any Commentary section
+*** tl/tl-atype.el      Can't find any Commentary section
+*** tl/tl-list.el       Can't find any Commentary section
+*** tl/tl-misc.el       Can't find any Commentary section
+*** tl/tl-num.el        Can't find any Commentary section
+*** tl/tl-seq.el        Can't find any Commentary section
+*** tl/tl-str.el        Can't find any Commentary section
+*** tl/tu-comment.el
+Commentary:
+*** tl/tu-replace.el
+Commentary:
+
+** tm           - Tools for MIME -- integrates in VM, RMAIL, GNUS
+*** tm/gnus-art-mime.el Can't find any Commentary section
+*** tm/gnus-charset.el  Can't find any Commentary section
+*** tm/gnus-mime-old.el Can't find any Commentary section
+*** tm/gnus-mime.el     Can't find any Commentary section
+*** tm/gnus-msg-mime.el Can't find any Commentary section
+*** tm/gnus-sum-mime.el Can't find any Commentary section
+*** tm/message-mime.el  Can't find any Commentary section
+*** tm/mime-setup.el    Can't find any Commentary section
+*** tm/sc-setup.el      Can't find any Commentary section
+*** tm/signature.el     Can't find any Commentary section
+*** tm/tm-bbdb.el       Can't find any Commentary section
+*** tm/tm-def.el        Can't find any Commentary section
+*** tm/tm-edit-mc.el    Can't find any Commentary section
+*** tm/tm-edit.el
+Commentary:
+
+This is an Emacs minor mode for editing Internet multimedia
+messages formatted in MIME (RFC 2045, 2046, 2047, 2048 and 2049).
+All messages in this mode are composed in the tagged MIME format,
+that are described in the following examples.  The messages
+composed in the tagged MIME format are automatically translated
+into a MIME compliant message when exiting the mode.
+*** tm/tm-ew-d.el       Can't find any Commentary section
+*** tm/tm-ew-e.el       Can't find any Commentary section
+*** tm/tm-file.el       Can't find any Commentary section
+*** tm/tm-ftp.el        Can't find any Commentary section
+*** tm/tm-gd3.el        Can't find any Commentary section
+*** tm/tm-gnus.el       Can't find any Commentary section
+*** tm/tm-gnus4.el      Can't find any Commentary section
+*** tm/tm-gnus5.el      Can't find any Commentary section
+*** tm/tm-html.el       Can't find any Commentary section
+*** tm/tm-image.el
+Commentary:
+        If you use this program with MULE, please install
+        etl8x16-bitmap.bdf font included in tl package.
+*** tm/tm-latex.el      Can't find any Commentary section
+*** tm/tm-mail.el       Can't find any Commentary section
+*** tm/tm-mh-e.el       Can't find any Commentary section
+*** tm/tm-orig.el       Can't find any Commentary section
+*** tm/tm-parse.el      Can't find any Commentary section
+*** tm/tm-partial.el    Can't find any Commentary section
+*** tm/tm-pgp.el
+Commentary:
+
+   This module is based on 2 drafts about PGP MIME integration:
+*** tm/tm-play.el       Can't find any Commentary section
+*** tm/tm-rmail.el      Can't find any Commentary section
+*** tm/tm-setup.el      Can't find any Commentary section
+*** tm/tm-sgnus.el      Can't find any Commentary section
+*** tm/tm-tar.el        Can't find any Commentary section
+*** tm/tm-text.el       Can't find any Commentary section
+*** tm/tm-view.el       Can't find any Commentary section
+*** tm/tm-vm.el
+Commentary:
+
+     Plese insert `(require 'tm-vm)' in your ~/.vm file.
+*** tm/tmh-comp.el      Can't find any Commentary section
+
+** tooltalk     - Support for Tooltalk protocol
+*** tooltalk/tooltalk-init.el   Can't find any Commentary section
+*** tooltalk/tooltalk-load.el   Can't find any Commentary section
+*** tooltalk/tooltalk-macros.el Can't find any Commentary section
+*** tooltalk/tooltalk-util.el   Can't find any Commentary section
+
+** utils        - Lots of stuff
+*** utils/abbrevlist.el Can't find any Commentary section
+*** utils/advice.el
+Commentary:
+
+This package implements a full-fledged Lisp-style advice mechanism
+for Emacs Lisp. Advice is a clean and efficient way to modify the
+behavior of Emacs Lisp functions without having to keep  personal
+modified copies of such functions around. A great number of such
+modifications can be achieved by treating the original function as a
+black box and specifying a different execution environment for it
+with a piece of advice. Think of a piece of advice as a kind of fancy
+hook that you can attach to any function/macro/subr.
+*** utils/annotations.el        Can't find any Commentary section
+*** utils/assoc.el
+Commentary:
+
+Association list utilities providing insertion, deletion, sorting
+fetching off key-value pairs in association lists.
+*** utils/atomic-extents.el     Can't find any Commentary section
+*** utils/autoload.el
+Commentary:
+
+This code helps GNU Emacs maintainers keep the loaddefs.el file up to
+date.  It interprets magic cookies of the form ";;;###autoload" in
+lisp source files in various useful ways.  To learn more, read the
+source; if you're going to use this, you'd better be able to.
+*** utils/bench.el
+Commentary:
+
+Adapted from Shane Holder's bench.el by steve@altair.xemacs.org.
+
+To run
+Extract the shar file in /tmp, or modify bench-lisp-file to
+point to the gnus.el file.
+At the shell prompt emacs -q --no-site-file <= don't load users .emacs or site-
+file
+M-x byte-compile-file "/tmp/bench.el"
+M-x load-file "/tmp/bench.elc"
+In the scratch buffer (bench 1)
+
+
+All bench marks must be named bench-mark-<something>
+Results are put in bench-mark-<something-times which is a list of
+ times for the runs.
+If the bench mark is not simple then there needs to be a
+ corresponding bench-handler-<something>
+*** utils/blessmail.el
+Commentary:
+
+This is loaded into a bare Emacs to create the blessmail script,
+which (on systems that need it) is used during installation
+to give appropriate permissions to movemail.
+
+It has to be done from lisp in order to be sure of getting the
+correct value of rmail-spool-directory.
+*** utils/browse-cltl2.el       Can't find any Commentary section
+*** utils/browse-url.el
+Commentary:
+
+This package provides functions which read a URL (Uniform Resource
+Locator) from the minibuffer, defaulting to the URL around point,
+and ask a World-Wide Web browser to load it.  It can also load the
+URL associated with the current buffer.  Different browsers use
+different methods of remote control so there is one function for
+each supported browser.  If the chosen browser is not running, it
+is started.  Currently there is support for:
+
+*** utils/crontab.el    Can't find any Commentary section
+*** utils/delbackspace.el       Can't find any Commentary section
+*** utils/derived.el
+Commentary:
+
+GNU Emacs is already, in a sense, object oriented -- each object
+(buffer) belongs to a class (major mode), and that class defines
+the relationship between messages (input events) and methods
+(commands) by means of a keymap.
+
+In the mean time, this package offers most of the advantages of
+full inheritance with the existing major modes.  The macro
+`define-derived-mode' allows the user to make a variant of an existing
+major mode, with its own keymap.  The new mode will inherit the key
+bindings of its parent, and will, in fact, run its parent first
+every time it is called.  For example, the commands
+*** utils/detached-minibuf.el
+Commentary:
+
+WARNING. DANGER.  This file reportedly crashes 19.14, use it only with a
+recent XEmacs.
+
+Version: 1.1
+*** utils/docref.el
+Commentary:
+
+This package allows you to use a simple form of cross references in
+your Emacs Lisp documentation strings. Cross-references look like
+\\(type@[label@]data), where type defines a method for retrieving
+reference informatin, data is used by a method routine as an argument,
+and label "represents" the reference in text. If label is absent, data
+is used instead.
+*** utils/easymenu.el   Can't find any Commentary section
+*** utils/edmacro.el
+Commentary:
+
+Usage:
+
+The `C-x C-k' (`edit-kbd-macro') command edits a keyboard macro
+in a special buffer.  It prompts you to type a key sequence,
+which should be one of:
+*** utils/eldoc.el
+Commentary:
+
+This program was inspired by the behavior of the "mouse documentation
+window" on many Lisp Machine systems; as you type a function's symbol
+name as part of a sexp, it will print the argument list for that
+function.  Behavior is not identical; for example, you need not actually
+type the function name, you need only move point around in a sexp that
+calls it.  Also, if point is over a documented variable, it will print
+the one-line documentation for that variable instead, to remind you of
+that variable's meaning.
+*** utils/elp.el
+Commentary:
+
+If you want to profile a bunch of functions, set elp-function-list
+to the list of symbols, then do a M-x elp-instrument-list.  This
+hacks those functions so that profiling information is recorded
+whenever they are called.  To print out the current results, use
+M-x elp-results.  If you want output to go to standard-output
+instead of a separate buffer, setq elp-use-standard-output to
+non-nil.  With elp-reset-after-results set to non-nil, profiling
+information will be reset whenever the results are displayed.  You
+can also reset all profiling info at any time with M-x
+elp-reset-all.
+*** utils/facemenu.el
+Commentary:
+
+This file defines a menu of faces (bold, italic, etc) which allows you to
+set the face used for a region of the buffer.  Some faces also have
+keybindings, which are shown in the menu.  Faces with names beginning with
+"fg:" or "bg:", as in "fg:red", are treated specially.
+Such faces are assumed to consist only of a foreground (if "fg:") or
+background (if "bg:") color.  They are thus put into the color submenus
+rather than the general Face submenu.  These faces can also be
+automatically created by selecting the "Other..." menu items in the
+"Foreground" and "Background" submenus.
+*** utils/find-gc.el
+Commentary:
+
+Produce in unsafe-list the set of all functions that may invoke GC.
+This expects the Emacs sources to live in emacs-source-directory.
+It creates a temporary working directory /tmp/esrc.
+*** utils/finder.el
+Commentary:
+
+This mode uses the Keywords library header to provide code-finding
+services by keyword.
+*** utils/floating-toolbar.el
+Commentary:
+
+The command `floating-toolbar' pops up a small frame
+containing a toolbar.  The command should be bound to a
+button-press event.  If the mouse press happens over an
+extent that has a non-nil 'floating-toolbar property, the
+value of that property is the toolbar instantiator that will
+be displayed.  Otherwise the toolbar displayed is taken from
+the variable `floating-toolbar'.  This variable can be made
+buffer local to produce buffer local floating toolbars.
+*** utils/flow-ctrl.el
+Commentary:
+
+Terminals that use XON/XOFF flow control can cause problems with
+GNU Emacs users.  This file contains Emacs Lisp code that makes it
+easy for a user to deal with this problem, when using such a
+terminal.
+
+*** utils/foldout.el
+Commentary:
+
+This file provides folding editor extensions for outline-mode and
+outline-minor-mode buffers.  What's a "folding editor"?  Read on...
+
+Imagine you're in an outline-mode buffer and you've hidden all the text and
+subheadings under your level-1 headings.  You now want to look at the stuff
+hidden under one of these headings.  Normally you'd do C-c C-e (show-entry)
+to expose the body or C-c C-i to expose the child (level-2) headings.
+
+With foldout, you do C-c C-z (foldout-zoom-subtree).  This exposes the body
+and child subheadings and narrows the buffer so that only the level-1
+heading, the body and the level-2 headings are visible.  If you now want to
+look under one of the level-2 headings, position the cursor on it and do C-c
+C-z again.  This exposes the level-2 body and its level-3 child subheadings
+and narrows the buffer again.  You can keep on zooming in on successive
+subheadings as much as you like.  A string in the modeline tells you how
+deep you've gone.
+*** utils/forms-d2.el   Can't find any Commentary section
+*** utils/forms-pass.el Can't find any Commentary section
+*** utils/forms.el
+Commentary:
+
+Visit a file using a form.
+
+Forms mode means visiting a data file which is supposed to consist
+of records each containing a number of fields.  The records are
+separated by a newline, the fields are separated by a user-defined
+field separator (default: TAB).
+When shown, a record is transferred to an Emacs buffer and
+presented using a user-defined form.  One record is shown at a
+time.
+*** utils/frame-icon.el
+Commentary:
+*** utils/hide-copyleft.el      Can't find any Commentary section
+*** utils/highlight-headers.el  Can't find any Commentary section
+*** utils/id-select.el  Can't find any Commentary section
+*** utils/lib-complete.el       Can't find any Commentary section
+*** utils/live-icon.el  Can't find any Commentary section
+*** utils/loadhist.el
+Commentary:
+
+These functions exploit the load-history system variable.
+*** utils/mail-extr.el
+Commentary:
+
+   mail-extract-address-components: (address)
+
+   Given an RFC-822 ADDRESS, extract full name and canonical address.
+   Returns a list of the form (FULL-NAME CANONICAL-ADDRESS).
+   If no name can be extracted, FULL-NAME will be nil.
+   ADDRESS may be a string or a buffer.  If it is a buffer, the visible
+    (narrowed) portion of the buffer will be interpreted as the address.
+    (This feature exists so that the clever caller might be able to avoid
+    consing a string.)
+   If ADDRESS contains more than one RFC-822 address, only the first is
+    returned.
+
+*** utils/mail-utils.el
+Commentary:
+
+Utility functions for mail and netnews handling.  These handle fine
+points of header parsing.
+*** utils/mailpost.el
+Commentary:
+
+Yet another mail interface.  this for the rmail system to provide
+ the missing sendmail interface on systems without /usr/lib/sendmail,
+  but with /usr/uci/post.
+*** utils/map-ynp.el
+Commentary:
+
+map-y-or-n-p is a general-purpose question-asking function.
+It asks a series of y/n questions (a la y-or-n-p), and decides to
+applies an action to each element of a list based on the answer.
+The nice thing is that you also get some other possible answers
+to use, reminiscent of query-replace: ! to answer y to all remaining
+questions; ESC or q to answer n to all remaining questions; . to answer
+y once and then n for the remainder; and you can get help with C-h.
+*** utils/meese.el
+Commentary:
+This file is grossly misnamed.  It should be called reno.el.
+*** utils/passwd.el     Can't find any Commentary section
+*** utils/pp.el Can't find any Commentary section
+*** utils/pretty-print.el       Can't find any Commentary section
+*** utils/redo.el
+Commentary:
+
+Emacs' normal undo system allows you to undo an arbitrary
+number of buffer changes.  These undos are recorded as ordinary
+buffer changes themselves.  So when you break the chain of
+undos by issuing some other command, you can then undo all
+the undos.  The chain of recorded buffer modifications
+therefore grows without bound, truncated only at garbage
+collection time.
+
+*** utils/regi.el       Can't find any Commentary section
+*** utils/reporter.el
+Commentary:
+Lisp Package Authors
+====================
+Reporter was written primarily for Emacs Lisp package authors so
+that their users can easily report bugs.  When invoked,
+reporter-submit-bug-report will set up an outgoing mail buffer with
+the appropriate bug report address, including a lisp expression the
+maintainer of the package can eval to completely reproduce the
+environment in which the bug was observed (e.g. by using
+eval-last-sexp).  This package proved especially useful during my
+development of cc-mode, which is highly dependent on its
+configuration variables.
+*** utils/rfc822.el     Can't find any Commentary section
+*** utils/ring.el
+Commentary:
+
+This code defines a ring data structure. A ring is a
+    (hd-index length . vector)
+list. You can insert to, remove from, and rotate a ring. When the ring
+fills up, insertions cause the oldest elts to be quietly dropped.
+*** utils/shadowfile.el Can't find any Commentary section
+*** utils/skeleton.el
+Commentary:
+
+A very concise language extension for writing structured statement
+skeleton insertion commands for programming language modes.  This
+originated in shell-script mode and was applied to ada-mode's
+commands which shrunk to one third.  And these commands are now
+user configurable.
+*** utils/smtpmail.el
+Commentary:
+
+Send Mail to smtp host from smtpmail temp buffer.
+*** utils/soundex.el
+Commentary:
+
+The Soundex algorithm maps English words into representations of
+how they sound.  Words with vaguely similar sound map to the same string.
+*** utils/speedbar.el
+Commentary:
+
+  The speedbar provides a frame in which files, and locations in
+files are displayed.  These items can be clicked on with mouse-2
+in order to make the last active frame display that file location.
+*** utils/symbol-syntax.el      Can't find any Commentary section
+*** utils/sysdep.el     Can't find any Commentary section
+*** utils/text-props.el
+Commentary:
+
+This is a nearly complete implementation of the FSF19 text properties API.
+Please let me know if you notice any differences in behavior between
+this implementation and the FSF implementation.
+*** utils/thing.el      Can't find any Commentary section
+*** utils/timezone.el   Can't find any Commentary section
+*** utils/tq.el
+Commentary:
+
+manages receiving a stream asynchronously,
+parsing it into transactions, and then calling
+handler functions
+
+Our basic structure is the queue/process/buffer triple.  Each entry
+of the queue is a regexp/closure/function triple.  We buffer
+bytes from the process until we see the regexp at the head of the
+queue.  Then we call the function with the closure and the
+collected bytes.
+*** utils/trace.el
+Commentary:
+
+A simple trace package that utilizes advice.el. It generates trace
+information in a Lisp-style fashion and inserts it into a trace output
+buffer. Tracing can be done in the background (or silently) so that
+generation of trace output won't interfere with what you are currently
+doing.
+*** utils/tree-menu.el  Can't find any Commentary section
+*** utils/uniquify.el
+Commentary:
+
+Emacs's standard method for making buffer names unique adds <2>, <3>,
+etc. to the end of (all but one of) the buffers.  This file replaces
+that behavior, for buffers visiting files and dired buffers, with a
+uniquification that adds parts of the file name until the buffer names
+are unique.  For instance, buffers visiting /u/mernst/tmp/Makefile and
+/usr/projects/zaphod/Makefile would be named Makefile|tmp and
+Makefile|zaphod, respectively (instead of Makefile and Makefile<2>).
+Other buffer name styles are also available.
+*** utils/xbm-button.el Can't find any Commentary section
+*** utils/xpm-button.el Can't find any Commentary section
+
+** viper        - VI emulator
+*** viper/viper-ex.el   Can't find any Commentary section
+*** viper/viper-init.el Can't find any Commentary section
+*** viper/viper-keym.el Can't find any Commentary section
+*** viper/viper-macs.el Can't find any Commentary section
+*** viper/viper-mous.el Can't find any Commentary section
+*** viper/viper-util.el Can't find any Commentary section
+*** viper/viper.el      Can't find any Commentary section
+
+** vm           - Mail reader
+See the online documentation.
+
+** vms          - Stuff for Emacs under VMS
+vms/vms-patch.el        Can't find any Commentary section
+*** vms/vmsproc.el      Can't find any Commentary section
+*** vms/vmsx.el Can't find any Commentary section
+
+** w3           - World Wide Web browser under Emacs
+See the online documentation.
+
+** x11          - X11 specific stuff: compose keys, menubars, toolbar, ...
+*** x11/x-compose.el    Can't find any Commentary section
+*** x11/x-faces.el      Can't find any Commentary section
+*** x11/x-font-menu.el
+Commentary:
+
+Creates three menus, "Font", "Size", and "Weight", and puts them on the
+"Options" menu.  The contents of these menus are the superset of those
+properties available on any fonts, but only the intersection of the three
+sets is selectable at one time.
+*** x11/x-init.el
+Commentary:
+*** x11/x-iso8859-1.el  Can't find any Commentary section
+*** x11/x-menubar.el
+Commentary:
+*** x11/x-misc.el       Can't find any Commentary section
+*** x11/x-mouse.el      Can't find any Commentary section
+*** x11/x-scrollbar.el  Can't find any Commentary section
+*** x11/x-select.el     Can't find any Commentary section
+*** x11/x-toolbar.el    Can't find any Commentary section
+*** x11/x-win-sun.el
+Commentary:
+
+This file is loaded by x-win.el at run-time when we are sure that XEmacs
+is running on the display of a Sun.
+
+The Sun X server (both the MIT and OpenWindows varieties) have extremely
+stupid names for their keypad and function keys.  For example, the key
+labeled 3 / PgDn, with R15 written on the front, is actually called F35.
+*** x11/x-win-xfree86.el        Can't find any Commentary section
+
+
+* What Changed
+===================
+
+
+** Differences between XEmacs and GNU Emacs 19
+==================================================
+
+In XEmacs, events are first-class objects.  FSF 19 represents them as
+integers, which obscures the differences between a key gesture and the
+ancient ASCII code used to represent a particular overlapping subset of them.
+
+In XEmacs, keymaps are first-class opaque objects.  FSF 19 represents them as
+complicated combinations of association lists and vectors.  If you use the
+advertised functional interface to manipulation of keymaps, the same code
+will work in XEmacs, Emacs 18, and GNU Emacs 19; if your code depends
+on the underlying implementation of keymaps, it will not.
+
+XEmacs uses "extents" to represent all non-textual aspects of buffers;
+FSF 19 uses two distinct objects, "text properties" and "overlays",
+which divide up the functionality between them.  Extents are a
+superset of the functionality of the two FSF data types.  The full FSF
+19 interface to text properties is supported in XEmacs (with extents
+being the underlying representation).
+
+Extents can be made to be copied into strings, and thus restored by kill
+and yank.  Thus, one can specify this behavior on either "extents" or
+"text properties", whereas in FSF 19 text properties always have this
+behavior and overlays never do.
+
+Many more packages are provided standard with XEmacs than with FSF 19.
+
+Pixmaps of arbitrary size can be embedded in a buffer.
+
+Variable width fonts work.
+
+The height of a line is the height of the tallest font on that line, instead
+of all lines having the same height.
+
+XEmacs uses the MIT "Xt" toolkit instead of raw Xlib calls, which
+makes it be a more well-behaved X citizen (and also improves
+portability).  A result of this is that it is possible to include
+other Xt "Widgets" in the XEmacs window.  Also, XEmacs understands the
+standard Xt command-line arguments.
+
+XEmacs provides support for ToolTalk on systems that have it.
+
+XEmacs can ask questions using popup dialog boxes.  Any command executed from
+a menu will ask yes/no questions with dialog boxes, while commands executed
+via the keyboard will use the minibuffer.
+
+XEmacs has a built-in toolbar.  Four toolbars can actually be configured:
+top, bottom, left, and right toolbars.
+
+XEmacs has vertical and horizontal scrollbars.  Unlike in FSF 19 (which
+provides a primitive form of vertical scrollbar), these are true toolkit
+scrollbars.  A look-alike Motif scrollbar is provided for those who
+don't have Motif. (Even for those who do, the look-alike may be preferable
+as it is faster.)
+
+If you're running on a machine with audio hardware, you can specify sound
+files for XEmacs to play instead of the default X beep.  See the documentation
+of the function load-sound-file and the variable sound-alist.
+
+An XEmacs frame can be placed within an "external client widget" managed by
+another application.  This allows an application to use an XEmacs frame as its
+text pane rather than the standard Text widget that is provided with Motif or
+Athena.  XEmacs supports Motif applications, generic Xt (e.g. Athena)
+applications, and raw Xlib applications.
+
+Here are some more specifics about the XEmacs implementation:
+
+*** The Input Model
+-------------------
+
+The fundamental unit of input is an "event" instead of a character.  An
+event is a new data type that contains several pieces of information.
+There are several kinds of event, and corresponding accessor and utility
+functions.  We tried to abstract them so that they would apply equally
+well to a number of window systems.
+
+NOTE: All timestamps are measured as milliseconds since Emacs started.
+
+ key_press_event
+    event_channel       A token representing which keyboard generated it.
+                        For this kind of event, this is a frame object.
+                        (This is for eventual support of multiple displays.)
+    timestamp           When it happened
+    key                 What keysym this is; an integer or a symbol.
+                        If this is an integer, it will be in the printing
+                        ASCII range: >32 and <127.
+    modifiers           Bucky-bits on that key: control, meta, etc.
+                        For most keys, Shift is not a bit; that is implicit
+                        in the keyboard layout.
+
+ button_press_event
+ button_release_event
+    event_channel       A token representing which mouse generated it.
+                        For this kind of event, this is a frame object.
+    timestamp           When it happened
+    button              What button went down or up.
+    modifiers           Bucky-bits on that button: shift, control, meta, etc.
+    x, y                Where it was at the button-state-change (in pixels).
+
+ pointer_motion_event
+    event_channel       A token representing which mouse generated it.
+                        For this kind of event, this is a frame object.
+    timestamp           When it happened
+    x, y                Where it was after it moved (in pixels).
+    modifiers           Bucky-bits down when the motion was detected.
+                        (Possibly not all window systems will provide this?)
+
+ process_event
+    timestamp           When it happened
+    process             the emacs "process" object in question
+
+ timeout_event
+    timestamp           Now (really, when the timeout was signaled)
+    interval_id         The ID returned when the associated call to
+                        add_timeout_cb() was made
+        ------ the rest of the fields are filled in by Emacs -----
+    id_number           The Emacs timeout ID for this timeout (more
+                        than one timeout event can have the same value
+                        here, since Emacs timeouts, as opposed to
+                        add_timeout_cb() timeouts, can resignal
+                        themselves)
+    function            An elisp function to call when this timeout is
+                        processed.
+    object              The object passed to that function.
+
+ eval_event
+    timestamp           When it happened
+    function            An elisp function to call with this event object.
+    object              Anything.
+                        This kind of event is used internally; sometimes the
+                        window system interface would like to inform emacs of
+                        some user action (such as focusing on another frame)
+                        but needs that to happen synchronously with the other
+                        user input, like keypresses.  This is useful when
+                        events are reported through callbacks rather
+                        than in the standard event stream.
+
+ misc_user_event
+    timestamp           When it happened
+    function            An elisp function to call with this event object.
+    object              Anything.
+                        This is similar to an eval_event, except that it is
+                        generated by user actions: selections in the
+                        menubar or scrollbar actions.  It is a "command"
+                        event, like key and mouse presses (and unlike mouse
+                        motion, process output, and enter and leave window
+                        hooks).  In many ways, eval_events are not the same
+                        as keypresses or misc_user_events.
+
+ magic_event
+                        No user-serviceable parts within.  This is for things
+                        like KeymapNotify and ExposeRegion events and so on
+                        that emacs itself doesn't care about, but which it
+                        must do something with for proper interaction with
+                        the window system.
+
+                        Magic_events are handled somewhat asynchronously, just
+                        like subprocess filters.  However, occasionally a
+                        magic_event needs to be handled synchronously; in that
+                        case, the asynchronous handling of the magic_event will
+                        push an eval_event back onto the queue, which will be
+                        handled synchronously later.  This is one of the
+                        reasons why eval_events exist; I'm not entirely happy
+                        with this aspect of this event model.
+
+
+The function `next-event' blocks and returns one of the above-described
+event objects.  The function `dispatch-event' takes an event and processes
+it in the appropriate way.
+
+For a process-event, dispatch-event calls the process's handler; for a
+mouse-motion event, the mouse-motion-handler hook is called, and so on.
+For magic-events, dispatch-event does window-system-dependent things,
+including calling some non-window-system-dependent hooks: map-frame-hook,
+unmap-frame-hook, mouse-enter-frame-hook, and mouse-leave-frame-hook.
+
+The function `next-command-event' calls `next-event' until it gets a key or
+button from the user (that is, not a process, motion, timeout, or magic
+event).  If it gets an event that is not a key or button, it calls
+`dispatch-event' on it immediately and reads another one.  The
+next-command-event function could be implemented in Emacs Lisp, though it
+isn't.  Generally one should call `next-command-event' instead of
+`next-event'.
+
+read-char calls next-command-event; if it doesn't get an event that can be
+converted to an ASCII character, it signals an error.  Otherwise it returns
+an integer.
+
+The variable `last-command-char' always contains an integer, or nil (if the
+last read event has no ASCII equivalent, as when it is a mouse-click or a
+non-ASCII character chord.)
+
+The new variable `last-command-event' holds an event object, that could be
+a non-ASCII character, a button click, a menu selection, etc.
+
+The variable `unread-command-char' no longer exists, and has been replaced
+by `unread-command-events'.  With the new event model, it is incorrect for
+code to do (setq unread-command-char (read-char)), because all user-input
+can't be represented as ASCII characters.  *** This is an incompatible
+change.  Code which sets `unread-command-char' must be updated to use the
+combination of `next-command-event' and `unread-command-events' instead.
+
+The functions `this-command-keys' and `recent-keys' return a vector of
+event objects, instead of a string of ASCII characters.  *** This also
+is an incompatible change.
+
+Almost nothing happens at interrupt level; the SIGIO handler simply sets a
+flag, and later, the X event queue is scanned for KeyPress events which map
+to ^G.  All redisplay happens in the main thread of the process.
+
+
+*** Keymaps
+-----------
+
+Instead of keymaps being alists or obarrays, they are a new primary data
+type.  The only user access to the contents of a keymap is through the
+existing keymap-manipulation functions, and a new function, map-keymap.
+This means that existing code that manipulates keymaps may need to
+be changed.
+
+One of our goals with the new input and keymap code was to make more
+character combinations available for binding, besides just ASCII and
+function keys.  We want to be able bind different commands to Control-a
+and Control-Shift-a; we also want it to be possible for the keys Control-h
+and Backspace (and Control-M and Return, and Control-I and Tab, etc) to
+be distinct.
+
+One of the most common complaints that new Emacs users have is that backspace
+is help.  The answer is to play around with the keyboard-translate-table, or
+be lucky enough to have a system administrator who has done this for you
+already; but if it were possible to bind backspace and C-h to different
+things, then (under a window manager at least) both backspace and delete
+would delete a character, and ^H would be help.  There's no need to deal
+with xmodmap, kbd-translate-table, etc.
+
+Here are some more examples: suppose you want to bind one function to Tab,
+and another to Control-Tab.  This can't be done if Tab and Control-I are the
+same thing.  What about control keys that have no ASCII equivalent, like
+Control-< ?  One might want that to be bound to set-mark-at-point-min.  We
+want M-C-Backspace to be kill-backward-sexp.  But we want M-Backspace to be
+kill-backward-word.  Again, this can't be done if Backspace and C-h are
+indistinguishable.
+
+The user represents keys as a string of ASCII characters (when possible and
+convenient), or as a vector of event objects, or as a vector of "key
+description lists", that looks like (control a), or (control meta delete)
+or (shift f1).  The order of the modifier-names is not significant, so
+(meta control x) and (control meta x) are the same.
+
+`define-key' knows how to take any of the above representations and store them
+into a keymap.  When Emacs wants to return a key sequence (this-command-keys,
+recent-keys, keyboard-macros, and read-key-sequence, for example) it returns
+a vector of event objects.  Keyboard macros can also be represented as ASCII
+strings or as vectors of key description lists.
+
+This is an incompatible change: code which calls `this-command-keys',
+`recent-keys', `read-key-sequence', or manipulates keyboard-macros probably
+needs to be changed so that it no longer assumes that the returned value is a
+string.
+
+Control-Shift-a is specified as (control A), not (control shift a), since A
+is a two-case character.  But for keys that don't have an upper case
+version, like F1, Backspace, and Escape, you use the (shift backspace) syntax.
+
+See the doc string for our version of define-key, reproduced below in the
+`Changed Functions' section.  Note that when the KEYS argument is a string,
+it has the same semantics as the v18 define-key.
+
+
+*** Xt Integration
+------------------
+
+The heart of the event loop is implemented in terms of the Xt event functions
+(specifically XtAppProcessEvent), and uses Xt's concept of timeouts and
+file-descriptor callbacks, eliminating a large amount of system-dependent code
+(Xt does it for you.)
+
+If Emacs is compiled with support for X, it uses the Xt event loop even when
+Emacs is not running on an X display (the Xt event loop supports this).  This
+makes it possible to run Emacs on a dumb TTY, and later connect it to one or
+more X servers.  It should also be possible to later connect an existing Emacs
+process to additional TTY's, although this code is still experimental.  (Our
+intent at this point is not to have an Emacs that is being used by multiple
+people at the same time: it is to make it possible for someone to go home, log
+in on a dialup line, and connect to the same Emacs process that is running
+under X in their office without having to recreate their buffer state and so
+on.)
+
+If Emacs is not compiled with support for X, then it instead uses more general
+code, something like what v18 does; but this way of doing things is a lot more
+modular.
+
+(Linking Emacs with Xt seems to only add about 300k to the executable size,
+compared with an Emacs linked with Xlib only.)
+
+
+*** Region Highlighting
+-----------------------
+
+If the variable `zmacs-regions' is true, then the region between point and
+mark will be highlighted when "active".  Those commands which push a mark
+(such as C-SPC, and C-x C-x) make the region become "active" and thus
+highlighted.  Most commands (all non-motion commands, basically) cause it to
+become non-highlighted (non-"active").  Commands that operate on the region
+(such as C-w, C-x C-l, etc.) only work if the region is in the highlighted
+state.
+
+zmacs-activate-region-hook and zmacs-deactivate-region-hook are run at the
+appropriate times; under X, zmacs-activate-region-hook makes the X selection
+be the region between point and mark, thus doing two things at once: making
+the region and the X selection be the same; and making the region highlight
+in the same way as the X selection.
+
+If `zmacs-regions' is true, then the `mark-marker' command returns nil unless
+the region is currently in the active (highlighted) state.  With an argument
+of t, this returns the mark (if there is one) regardless of the active-region
+state.  You should *generally* not use the mark unless the region is active,
+if the user has expressed a preference for the active-region model.  Watch
+out!  Moving this marker changes the mark position.  If you set the marker not
+to point anywhere, the buffer will have no mark.
+
+In this way, the primary selection is a fairly transitory entity; but
+when something is copied to the kill ring, it is made the Clipboard
+selection.  It is also stored into CUT_BUFFER0, for compatibility with
+X applications that don't understand selections (like Emacs18).
+
+Compatibility note: if you have code which uses (mark) or (mark-marker),
+then you need to either: change those calls to (mark t) or (mark-marker t);
+or simply bind `zmacs-regions' to nil around the call to mark or mark-marker.
+This is probably the best solution, since it will work in Emacs 18 as well.
+
+
+*** Menubars and Dialog Boxes
+-----------------------------
+
+Here is an example of a menubar definition:
+
+(defvar default-menubar
+  '(("File"     ["Open File..."         find-file               t]
+                ["Save Buffer"          save-buffer             t]
+                ["Save Buffer As..."    write-file              t]
+                ["Revert Buffer"        revert-buffer           t]
+                "-----"
+                ["Print Buffer"         lpr-buffer              t]
+                "-----"
+                ["Delete Frame"         delete-frame            t]
+                ["Kill Buffer..."       kill-buffer             t]
+                ["Exit Emacs"           save-buffers-kill-emacs t]
+                )
+    ("Edit"     ["Undo"                 advertised-undo         t]
+                ["Cut"                  kill-primary-selection  t]
+                ["Copy"                 copy-primary-selection  t]
+                ["Paste"                yank-clipboard-selection t]
+                ["Clear"                delete-primary-selection t]
+                )
+    ...))
+
+The first element of each menu item is the string to print on the menu.
+
+The second element is the callback function; if it is a symbol, it is
+invoked with `call-interactively.'  If it is a list, it is invoked with
+`eval'.
+
+If the second element is a symbol, then the menu also displays the key that
+is bound to that command (if any).
+
+The third element of the menu items determines whether the item is selectable.
+It may be t, nil, or a form to evaluate.  Also, a hook is run just before a
+menu is exposed, which can be used to change the value of these slots.
+For example, there is a hook that makes the "undo" menu item be selectable
+only in the cases when `advertised-undo' would not signal an error.
+
+Menus may have other menus nested within them; they will cascade.
+
+There are utility functions for adding items to menus, deleting items,
+disabling them, etc.
+
+The function `popup-menu' takes a menu description and pops it up.
+
+The function `popup-dialog-box' takes a dialog-box description and pops
+it up.  Dialog box descriptions look a lot like menu descriptions.
+
+The menubar, menu, and dialog-box code is implemented as a library,
+with an interface which hides the toolkit that implements it.
+
+
+*** Isearch Changes
+-------------------
+
+Isearch has been reimplemented in a different way, adding some new features,
+and causing a few incompatible changes.
+
+ -  the old isearch-*-char variables are no longer supported.  In the old
+    system, one could make ^A mean "repeat the search" by doing something
+    like (setq search-repeat-char ?C-a).  In the new system, this is
+    accomplished with
+
+       (define-key isearch-mode-map "\C-a" 'isearch-repeat-forward)
+
+ -  The advantage of using the normal keymap mechanism for this is that you
+    can bind more than one key to an isearch command: for example, both C-a
+    and C-s could do the same thing inside isearch mode.  You can also bind
+    multi-key sequences inside of isearch mode, and bind non-ASCII keys.
+    For example, to use the F1 key to terminate a search:
+
+       (define-key isearch-mode-map 'f1 'isearch-exit)
+
+    or to make ``C-c C-c'' terminate a search:
+
+       (define-key isearch-mode-map "\C-c\C-c" 'isearch-exit)
+
+ -  If isearch is behaving case-insensitively (the default) and you type an
+    upper case character, then the search will become case-sensitive.  This
+    can be disabled by setting `search-caps-disable-folding' to nil.
+
+ -  There is a history ring of the strings previously searched for; typing
+    M-p or M-n while searching will cycle through this ring.  Typing M-TAB
+    will do completion across the set of items in the history ring.
+
+ -  The ESC key is no longer used to terminate an incremental search.  The
+    RET key should be used instead.  This change is necessary for it to be
+    possible to bind "meta" characters to isearch commands.
+
+
+*** Startup Code Changes
+------------------------
+
+The initial X frame is mapped before the user's .emacs file is executed.
+Without this, there is no way for the user to see any error messages
+generated by their .emacs file, any windows created by the .emacs file
+don't show up, and the copyleft notice isn't shown.
+
+The default values for load-path, exec-path, lock-directory, and
+Info-directory-list are not (necessarily) built into Emacs, but are
+computed at startup time.
+
+First, Emacs looks at the directory in which its executable file resides:
+
+  o  If that directory contains subdirectories named "lisp" and "lib-src",
+     then those directories are used as the lisp library and exec directory.
+
+  o  If the parent of the directory in which the emacs executable is located
+     contains "lisp" and "lib-src" subdirectories, then those are used.
+
+  o  If ../lib/xemacs-<version> (starting from the directory in which the
+     emacs executable is located) contains a "lisp" subdirectory and either
+     a "lib-src" subdirectory or a <configuration-name> subdirectory, then
+     those are used.
+
+  o  If the emacs executable that was run is a symbolic link, then the link
+     is chased, and the resultant directory is checked as above.
+
+(Actually, it doesn't just look for "lisp/", it looks for "lisp/prim/",
+which reduces the chances of a false positive.)
+
+If the lisp directory contains subdirectories, they are added to the default
+load-path as well.  If the site-lisp directory exists and contains
+subdirectories, they are then added.  Subdirectories whose names begin with
+a dot or a hyphen are not added to the load-path.
+
+These heuristics fail if the Emacs binary was copied from the main Emacs
+tree to some other directory, and links for the lisp directory were not put
+in.  This isn't much of a restriction: either make there be subdirectories
+(or symbolic links) of the directory of the emacs executable, or make the
+"installed" emacs executable be a symbolic link to an executable in a more
+appropriate directory structure.  For example, this setup works:
+
+    /usr/local/xemacs/xemacs*           ; The executable.
+    /usr/local/xemacs/lisp/             ; The associated directories.
+    /usr/local/xemacs/etc/              ; Any of the files in this list
+    /usr/local/xemacs/lock/             ; could be symbolic links as well.
+    /usr/local/xemacs/info/
+
+As does this:
+
+    /usr/local/bin/xemacs -> ../xemacs/src/xemacs-19.14 ; A link...
+    /usr/local/xemacs/src/xemacs-19.14*                 ; The executable,
+    /usr/local/xemacs/lisp/                             ; and the rest of
+    /usr/local/xemacs/etc/                              ; the source tree
+    /usr/local/xemacs/lock/
+    /usr/local/xemacs/info/
+
+This configuration might be used for a multi-architecture installation; assume
+that $LOCAL refers to a directory which contains only files specific to a
+particular architecture (i.e., executables) and $SHARED refers to those files
+which are not machine specific (i.e., lisp code and documentation.)
+
+    $LOCAL/bin/xemacs@ -> $LOCAL/xemacs-19.14/xemacs*
+    $LOCAL/xemacs-19.14/lisp@ -> $SHARED/xemacs-19.14/lisp/
+    $LOCAL/xemacs-19.14/etc@  -> $SHARED/xemacs-19.14/etc/
+    $LOCAL/xemacs-19.14/info@ -> $SHARED/xemacs-19.14/info/
+
+The following would also work, but the above is probably more attractive:
+
+    $LOCAL/bin/xemacs*
+    $LOCAL/bin/lisp@ -> $SHARED/xemacs-19.14/lisp/
+    $LOCAL/bin/etc@  -> $SHARED/xemacs-19.14/etc/
+    $LOCAL/bin/info@ -> $SHARED/xemacs-19.14/info/
+
+If Emacs can't find the requisite directories, it writes a message like this
+(or some appropriate subset of it) to stderr:
+
+  WARNING:
+  couldn't find an obvious default for load-path, exec-directory, and
+  lock-directory, and there were no defaults specified in paths.h when
+  Emacs was built.  Perhaps some directories don't exist, or the Emacs
+  executable, /cadillac-th/jwz/somewhere/xemacs is in a strange place?
+
+  Without both exec-directory and load-path, Emacs will be very broken.
+  Consider making a symbolic link from /cadillac-th/jwz/somewhere/etc
+  to wherever the appropriate Emacs etc/ directory is, and from
+  /cadillac-th/jwz/somewhere/lisp/ to wherever the appropriate Emacs
+  lisp library is.
+
+  Without lock-directory set, file locking won't work.  Consider
+  creating /cadillac-th/jwz/somewhere/lock as a directory or symbolic
+  link for use as the lock directory.
+
+The default installation tree is the following:
+
+    /usr/local/bin/b2m                          ;
+                   ctags                        ; executables that
+                   emacsclient                  ; should be in
+                   etags                        ; user's path
+                   xemacs -> xemacs-<version>   ;
+                   xemacs                       ;
+    /usr/local/lib/xemacs/site-lisp
+    /usr/local/lib/xemacs/lock
+    /usr/local/lib/xemacs-<version>/etc         ; architecture ind. files
+    /usr/local/lib/xemacs-<version>/info
+    /usr/local/lib/xemacs-<version>/lisp
+    /usr/local/lib/xemacs-<version>/<configuration>  ; binaries emacs may run
+
+
+*** X Resources
+---------------
+
+(Note: This section is copied verbatim from the XEmacs Reference Manual.)
+
+   The Emacs resources are generally set per-frame. Each Emacs frame
+can have its own name or the same name as another, depending on the
+name passed to the `make-frame' function.
+
+   You can specify resources for all frames with the syntax:
+
+     Emacs*parameter: value
+
+or
+
+     Emacs*EmacsFrame.parameter:value
+
+You can specify resources for a particular frame with the syntax:
+
+     Emacs*FRAME-NAME.parameter: value
+
+
+**** Geometry Resources
+-----------------------
+
+   To make the default size of all Emacs frames be 80 columns by 55
+lines, do this:
+
+     Emacs*EmacsFrame.geometry: 80x55
+
+To set the geometry of a particular frame named `fred', do this:
+
+     Emacs*fred.geometry: 80x55
+
+Important! Do not use the following syntax:
+
+     Emacs*geometry: 80x55
+
+You should never use `*geometry' with any X application. It does not
+say "make the geometry of Emacs be 80 columns by 55 lines."  It really
+says, "make Emacs and all subwindows thereof be 80x55 in whatever units
+they care to measure in."  In particular, that is both telling the
+Emacs text pane to be 80x55 in characters, and telling the menubar pane
+to be 80x55 pixels, which is surely not what you want.
+
+   As a special case, this geometry specification also works (and sets
+the default size of all Emacs frames to 80 columns by 55 lines):
+
+     Emacs.geometry: 80x55
+
+since that is the syntax used with most other applications (since most
+other applications have only one top-level window, unlike Emacs).  In
+general, however, the top-level shell (the unmapped ApplicationShell
+widget named `Emacs' that is the parent of the shell widgets that
+actually manage the individual frames) does not have any interesting
+resources on it, and you should set the resources on the frames instead.
+
+   The `-geometry' command-line argument sets only the geometry of the
+initial frame created by Emacs.
+
+   A more complete explanation of geometry-handling is
+
+   * The `-geometry' command-line option sets the `Emacs.geometry'
+     resource, that is, the geometry of the ApplicationShell.
+
+   * For the first frame created, the size of the frame is taken from
+     the ApplicationShell if it is specified, otherwise from the
+     geometry of the frame.
+
+   * For subsequent frames, the order is reversed: First the frame, and
+     then the ApplicationShell.
+
+   * For the first frame created, the position of the frame is taken
+     from the ApplicationShell (`Emacs.geometry') if it is specified,
+     otherwise from the geometry of the frame.
+
+   * For subsequent frames, the position is taken only from the frame,
+     and never from the ApplicationShell.
+
+   This is rather complicated, but it does seem to provide the most
+intuitive behavior with respect to the default sizes and positions of
+frames created in various ways.
+
+
+**** Iconic Resources
+---------------------
+
+   Analogous to `-geometry', the `-iconic' command-line option sets the
+iconic flag of the ApplicationShell (`Emacs.iconic') and always applies
+to the first frame created regardless of its name.  However, it is
+possible to set the iconic flag on particular frames (by name) by using
+the `Emacs*FRAME-NAME.iconic' resource.
+
+
+**** Resource List
+------------------
+
+   Emacs frames accept the following resources:
+
+`geometry' (class `Geometry'): string
+     Initial geometry for the frame.  *Note Geometry Resources:: for a
+     complete discussion of how this works.
+
+`iconic' (class `Iconic'): boolean
+     Whether this frame should appear in the iconified state.
+
+`internalBorderWidth' (class `InternalBorderWidth'): int
+     How many blank pixels to leave between the text and the edge of the
+     window.
+
+`interline' (class `Interline'): int
+     How many pixels to leave between each line (may not be
+     implemented).
+
+`menubar' (class `Menubar'): boolean
+     Whether newly-created frames should initially have a menubar.  Set
+     to true by default.
+
+`initiallyUnmapped' (class `InitiallyUnmapped'): boolean
+     Whether XEmacs should leave the initial frame unmapped when it
+     starts up.  This is useful if you are starting XEmacs as a server
+     (e.g. in conjunction with gnuserv or the external client widget).
+     You can also control this with the `-unmapped' command-line option.
+
+`barCursor' (class `BarColor'): boolean
+     Whether the cursor should be displayed as a bar, or the
+     traditional box.
+
+`textPointer' (class `Cursor'): cursor-name
+     The cursor to use when the mouse is over text.  This resource is
+     used to initialize the variable `x-pointer-shape'.
+
+`selectionPointer' (class `Cursor'): cursor-name
+     The cursor to use when the mouse is over a selectable text region
+     (an extent with the `highlight' property; for example, an Info
+     cross-reference).  This resource is used to initialize the variable
+     `x-selection-pointer-shape'.
+
+`spacePointer' (class `Cursor'): cursor-name
+     The cursor to use when the mouse is over a blank space in a buffer
+     (that is, after the end of a line or after the end-of-file).  This
+     resource is used to initialize the variable
+     `x-nontext-pointer-shape'.
+
+`modeLinePointer' (class `Cursor'): cursor-name
+     The cursor to use when the mouse is over a mode line.  This
+     resource is used to initialize the variable `x-mode-pointer-shape'.
+
+`gcPointer' (class `Cursor'): cursor-name
+     The cursor to display when a garbage-collection is in progress.
+     This resource is used to initialize the variable
+     `x-gc-pointer-shape'.
+
+`scrollbarPointer' (class `Cursor'): cursor-name
+     The cursor to use when the mouse is over the scrollbar.  This
+     resource is used to initialize the variable
+     `x-scrollbar-pointer-shape'.
+
+`pointerColor' (class `Foreground'): color-name
+`pointerBackground' (class `Background'): color-name
+     The foreground and background colors of the mouse cursor.  These
+     resources are used to initialize the variables
+     `x-pointer-foreground-color' and `x-pointer-background-color'.
+
+`scrollBarWidth' (class `ScrollBarWidth'): integer
+     How wide the vertical scrollbars should be, in pixels; 0 means no
+     vertical scrollbars.  You can also use a resource specification of
+     the form `*scrollbar.width', or the usual toolkit scrollbar
+     resources: `*XmScrollBar.width' (Motif), `*XlwScrollBar.width'
+     (Lucid), or `*Scrollbar.thickness' (Athena).  We don't recommend
+     that you use the toolkit resources, though, because they're
+     dependent on how exactly your particular build of XEmacs was
+     configured.
+
+`scrollBarHeight' (class `ScrollBarHeight'): integer
+     How high the horizontal scrollbars should be, in pixels; 0 means no
+     horizontal scrollbars.  You can also use a resource specification
+     of the form `*scrollbar.height', or the usual toolkit scrollbar
+     resources: `*XmScrollBar.height' (Motif), `*XlwScrollBar.height'
+     (Lucid), or `*Scrollbar.thickness' (Athena).  We don't recommend
+     that you use the toolkit resources, though, because they're
+     dependent on how exactly your particular build of XEmacs was
+     configured.
+
+`scrollBarPlacement' (class `ScrollBarPlacement'): string
+     Where the horizontal and vertical scrollbars should be positioned.
+     This should be one of the four strings `bottom-left',
+     `bottom-right', `top-left', and `top-right'.  Default is
+     `bottom-right' for the Motif and Lucid scrollbars and
+     `bottom-left' for the Athena scrollbars.
+
+`topToolBarHeight' (class `TopToolBarHeight'): integer
+`bottomToolBarHeight' (class `BottomToolBarHeight'): integer
+`leftToolBarWidth' (class `LeftToolBarWidth'): integer
+`rightToolBarWidth' (class `RightToolBarWidth'): integer
+     Height and width of the four possible toolbars.
+
+`topToolBarShadowColor' (class `TopToolBarShadowColor'): color-name
+`bottomToolBarShadowColor' (class `BottomToolBarShadowColor'): color-name
+     Color of the top and bottom shadows for the toolbars.  NOTE: These
+     resources do *not* have anything to do with the top and bottom
+     toolbars (i.e. the toolbars at the top and bottom of the frame)!
+     Rather, they affect the top and bottom shadows around the edges of
+     all four kinds of toolbars.
+
+`topToolBarShadowPixmap' (class `TopToolBarShadowPixmap'): pixmap-name
+`bottomToolBarShadowPixmap' (class `BottomToolBarShadowPixmap'): pixmap-name
+     Pixmap of the top and bottom shadows for the toolbars.  If set,
+     these resources override the corresponding color resources. NOTE:
+     These resources do *not* have anything to do with the top and
+     bottom toolbars (i.e. the toolbars at the top and bottom of the
+     frame)!  Rather, they affect the top and bottom shadows around the
+     edges of all four kinds of toolbars.
+
+`toolBarShadowThickness' (class `ToolBarShadowThickness'): integer
+     Thickness of the shadows around the toolbars, in pixels.
+
+`visualBell' (class `VisualBell'): boolean
+     Whether XEmacs should flash the screen rather than making an
+     audible beep.
+
+`bellVolume' (class `BellVolume'): integer
+     Volume of the audible beep.
+
+`useBackingStore' (class `UseBackingStore'): boolean
+     Whether XEmacs should set the backing-store attribute of the X
+     windows it creates.  This increases the memory usage of the X
+     server but decreases the amount of X traffic necessary to update
+     the screen, and is useful when the connection to the X server goes
+     over a low-bandwidth line such as a modem connection.
+
+
+**** Face Resources
+-------------------
+
+   The attributes of faces are also per-frame. They can be specified as:
+
+     Emacs.FACE_NAME.parameter: value
+
+     (*do not* use `Emacs*FACE_NAME...')
+
+or
+
+     Emacs*FRAME_NAME.FACE_NAME.parameter: value
+
+Faces accept the following resources:
+
+`attributeFont' (class `AttributeFont'): font-name
+     The font of this face.
+
+`attributeForeground' (class `AttributeForeground'): color-name
+`attributeBackground' (class `AttributeBackground'): color-name
+     The foreground and background colors of this face.
+
+`attributeBackgroundPixmap' (class `AttributeBackgroundPixmap'): file-name
+     The name of an XBM file (or XPM file, if your version of Emacs
+     supports XPM), to use as a background stipple.
+
+`attributeUnderline' (class `AttributeUnderline'): boolean
+     Whether text in this face should be underlined.
+
+   All text is displayed in some face, defaulting to the face named
+`default'.  To set the font of normal text, use
+`Emacs*default.attributeFont'. To set it in the frame named `fred', use
+`Emacs*fred.default.attributeFont'.
+
+   These are the names of the predefined faces:
+
+`default'
+     Everything inherits from this.
+
+`bold'
+     If this is not specified in the resource database, Emacs tries to
+     find a bold version of the font of the default face.
+
+`italic'
+     If this is not specified in the resource database, Emacs tries to
+     find an italic version of the font of the default face.
+
+`bold-italic'
+     If this is not specified in the resource database, Emacs tries to
+     find a bold-italic version of the font of the default face.
+
+`modeline'
+     This is the face that the modeline is displayed in.  If not
+     specified in the resource database, it is determined from the
+     default face by reversing the foreground and background colors.
+
+`highlight'
+     This is the face that highlighted extents (for example, Info
+     cross-references and possible completions, when the mouse passes
+     over them) are displayed in.
+
+`left-margin'
+`right-margin'
+     These are the faces that the left and right annotation margins are
+     displayed in.
+
+`zmacs-region'
+     This is the face that mouse selections are displayed in.
+
+`text-cursor'
+     This is the face that the cursor is displayed in.
+
+`isearch'
+     This is the face that the matched text being searched for is
+     displayed in.
+
+`info-node'
+     This is the face of info menu items.  If unspecified, it is copied
+     from `bold-italic'.
+
+`info-xref'
+     This is the face of info cross-references.  If unspecified, it is
+     copied from `bold'. (Note that, when the mouse passes over a
+     cross-reference, the cross-reference's face is determined from a
+     combination of the `info-xref' and `highlight' faces.)
+
+   Other packages might define their own faces; to see a list of all
+faces, use any of the interactive face-manipulation commands such as
+`set-face-font' and type `?' when you are prompted for the name of a
+face.
+
+   If the `bold', `italic', and `bold-italic' faces are not specified
+in the resource database, then XEmacs attempts to derive them from the
+font of the default face.  It can only succeed at this if you have
+specified the default font using the XLFD (X Logical Font Description)
+format, which looks like
+
+     *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
+
+If you use any of the other, less strict font name formats, some of
+which look like
+
+     lucidasanstypewriter-12
+     fixed
+     9x13
+
+   then XEmacs won't be able to guess the names of the bold and italic
+versions.  All X fonts can be referred to via XLFD-style names, so you
+should use those forms.  See the man pages for `X(1)', `xlsfonts(1)',
+and `xfontsel(1)'.
+
+
+**** Widgets
+------------
+
+   There are several structural widgets between the terminal EmacsFrame
+widget and the top level ApplicationShell; the exact names and types of
+these widgets change from release to release (for example, they changed
+in 19.9, 19.10, 19.12, and 19.13) and are subject to further change in
+the future, so you should avoid mentioning them in your resource database.
+The above-mentioned syntaxes should be forward-compatible.  As of 19.14,
+the exact widget hierarchy is as follows:
+
+    INVOCATION-NAME           "shell"              "container"     FRAME-NAME
+    x-emacs-application-class "TopLevelEmacsShell" "EmacsManager" "EmacsFrame"
+
+(for normal frames)
+
+or
+
+    INVOCATION-NAME           "shell"               "container"     FRAME-NAME
+    x-emacs-application-class "TransientEmacsShell" "EmacsManager" "EmacsFrame"
+
+(for popup/dialog-box frames)
+
+where INVOCATION-NAME is the terminal component of the name of the
+XEmacs executable (usually `xemacs'), and `x-emacs-application-class'
+is generally `Emacs'.
+
+
+**** Menubar Resources
+----------------------
+
+   As the menubar is implemented as a widget which is not a part of
+XEmacs proper, it does not use the face mechanism for specifying fonts
+and colors: It uses whatever resources are appropriate to the type of
+widget which is used to implement it.
+
+   If Emacs was compiled to use only the Motif-lookalike menu widgets,
+then one way to specify the font of the menubar would be
+
+     Emacs*menubar*font: *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
+
+   If the Motif library is being used, then one would have to use
+
+     Emacs*menubar*fontList: *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
+
+   because the Motif library uses the `fontList' resource name instead
+of `font', which has subtly different semantics.
+
+   The same is true of the scrollbars: They accept whichever resources
+are appropriate for the toolkit in use.
+
+
+*** Source Code Highlighting
+----------------------------
+
+It's possible to have your buffers "decorated" with fonts or colors
+indicating syntactic structures (such as strings, comments, function names,
+"reserved words", etc.).  In XEmacs, the preferred way to do this is with
+font-lock-mode; activate it by adding the following code to your .emacs file:
+
+        (add-hook 'emacs-lisp-mode-hook 'turn-on-font-lock)
+        (add-hook 'c-mode-hook          'turn-on-font-lock)
+        (add-hook 'c++-mode-hook        'turn-on-font-lock)
+        (add-hook 'dired-mode-hook      'turn-on-font-lock)
+        ...etc...
+
+To customize it, see the descriptions of the function `font-lock-mode' and
+the variables `font-lock-keywords', `c-font-lock-keywords', etc.
+
+There exist several other source code highlighting packages, but font-lock
+does one thing that most others don't do: highlights as you type new text;
+and one thing that no others do: bases part of its decoration on the
+syntax table of the major mode.  Font-lock has C-level support to do this
+efficiently, so it should also be significantly faster than the others.
+
+If there's something that another highlighting package does that you can't
+make font-lock do, let us know.  We would prefer to consolidate all of the
+desired functionality into one package rather than ship several different
+packages which do essentially the same thing in different ways.
+
+
+** Differences Between XEmacs and Emacs 18
+==========================================
+
+Auto-configure support has been added, so it should be fairly easy to compile
+XEmacs on different systems.  If you have any problems or feedback about
+compiling on your system, please let us know.
+
+We have reimplemented the basic input model in a more general way; instead of
+X input being a special-case of the normal ASCII input stream, XEmacs has a
+concept of "input events", and ASCII characters are a subset of that.  The
+events that XEmacs knows about are not X events, but are a generalization of
+them, so that XEmacs can eventually be ported to different window systems.
+
+We have reimplemented keymaps so that sequences of events can be stored into
+them instead of just ASCII codes; it is possible to, for example, bind
+different commands to each of the chords Control-h, Control-H, Backspace,
+Control-Backspace, and Super-Shift-Backspace.  Key bindings, function key
+bindings, and mouse bindings live in the same keymaps.
+
+Input and display of all ISO-8859-1 characters is supported.
+
+You can have multiple X windows ("frames" in XEmacs terminology).
+
+XEmacs has objects called "extents" and "faces", which are roughly
+analogous to Epoch's "buttons," "zones," and "styles."  An extent is a
+region of text (a start position and an end position) and a face is a
+collection of textual attributes like fonts and colors.  Every extent
+is displayed in some "face", so changing the properties of a face
+immediately updates the display of all associated extents.  Faces can
+be frame-local: you can have a region of text which displays with
+completely different attributes when its buffer is viewed from a
+different X window.
+
+The display attributes of faces may be specified either in lisp or through
+the X resource manager.
+
+Pixmaps of arbitrary size can be embedded in a buffer.
+
+Variable width fonts work.
+
+The height of a line is the height of the tallest font on that line, instead
+of all lines having the same height.
+
+XEmacs uses the MIT "Xt" toolkit instead of raw Xlib calls, which
+makes it be a more well-behaved X citizen (and also improves
+portability).  A result of this is that it is possible to include
+other Xt "Widgets" in the XEmacs window.  Also, XEmacs understands the
+standard Xt command-line arguments.
+
+XEmacs understands the X11 "Selection" mechanism; it's possible to define
+and customize selection converter functions and new selection types from
+Emacs Lisp, without having to recompile XEmacs.
+
+XEmacs provides support for ToolTalk on systems that have it.
+
+XEmacs supports the Zmacs/Lispm style of region highlighting, where the
+region between the point and mark is highlighted when in its "active" state.
+
+XEmacs has a menubar, whose contents are customizable from emacs-lisp.
+This menubar looks Motif-ish, but does not require Motif.  If you already
+own Motif, however, you can configure XEmacs to use a *real* Motif menubar
+instead.
+
+XEmacs can ask questions using popup dialog boxes.  Any command executed from
+a menu will ask yes/no questions with dialog boxes, while commands executed
+via the keyboard will use the minibuffer.
+
+XEmacs has vertical and horizontal scrollbars.
+
+The initial load-path is computed at run-time, instead of at compile-time.
+This means that if you move the XEmacs executable and associated directories
+to somewhere else, you don't have to recompile anything.
+
+You can specify what the title of the XEmacs windows and icons should be
+with the variables `frame-title-format' and `frame-icon-title-format',
+which have the same syntax as `mode-line-format'.
+
+XEmacs now supports floating-point numbers.
+
+XEmacs now knows about timers directly, instead of them being simulated by
+a subprocess.
+
+XEmacs understands truenames, and can be configured to notice when you are
+visiting two names of the same file.  See the variables find-file-use-truenames
+and find-file-compare-truenames.
+
+If you're running on a machine with audio hardware, you can specify sound
+files for XEmacs to play instead of the default X beep.  See the documentation
+of the function load-sound-file and the variable sound-alist.
+
+An XEmacs frame can be placed within an "external client widget" managed by
+another application.  This allows an application to use an XEmacs frame as its
+text pane rather than the standard Text widget that is provided with Motif or
+Athena.  XEmacs supports Motif applications, generic Xt (e.g. Athena)
+applications, and raw Xlib applications.
+
+Random changes to the emacs-lisp library: (some of this was not written by
+us, but is included because it's free software and we think it's good stuff)
+
+  - there is a new optimizing byte-compiler
+  - there is a new abbrev-based mail-alias mechanism
+  - the -*- line can contain local-variable settings
+  - there is a new TAGS package
+  - there is a new VI-emulation mode (viper)
+  - there is a new implementation of Dired
+  - there is a new implementation of Isearch
+  - the VM package for reading mail is provided
+  - the W3 package for browsing the World Wide Web hypertext information
+    system is provided
+  - the Hyperbole package, a programmable information management and
+    hypertext system
+  - the OO-Browser package, a multi-language object-oriented browser
+
+There are many more specifics in the "Miscellaneous Changes" section, below.
+
+The online Emacs Manual and Emacs-Lisp Manual are now both relatively
+up-to-date.
+
+** Major Differences Between 19.13 and 19.14
+============================================
+
+XEmacs has a new address!  The canonical ftp site is now
+ftp.xemacs.org:/pub/xemacs and the Web page is now at
+http://www.xemacs.org/.  All mailing lists now have @xemacs.org
+addresses.  For the time being the @cs.uiuc.edu addresses will
+continue to function.
+
+This is a major new release.  Many features have been added, as well
+as many bugs fixed.  The Motif menubar has still _NOT_ been fixed for
+19.14.  You should use the Lucid menubar instead.
+
+
+
+Major user-visible changes:
+---------------------------
+
+-- Color support in TTY mode is provided.  You have to have a TTY capable
+   of displaying them, such as color xterm or the console under Linux.
+   If your terminal type supports colors (e.g. `xterm-color'), XEmacs
+   will automatically notice this and start using color.
+
+-- blink-cursor-mode enables a blinking text cursor.  There is a
+   menubar option for this also.
+
+-- auto-show-mode is turned on by default; this means that XEmacs
+   will automatically scroll a window horizontally as necessary to
+   keep point in view.
+
+-- a file dialog box is provided and will be used whenever you
+   are prompted for a filename as a result of a menubar selection.
+
+-- XEmacs can be compiled with built-in GIF, JPEG, and PNG support.
+   The GIF libraries are supplied with XEmacs; for JPEG and PNG,
+   you have to obtain the appropriate libraries (this is well-
+   documented).  This makes image display much easier and faster under
+   W3 (the web browser) and TM (adds MIME support to VM and GNUS;
+   not yet included with XEmacs but will be in 19.15).
+
+-- XEmacs provides a really nice mode (PSGML with "Wing improvements")
+   for editing HTML and other SGML documents.  It parses the document,
+   and as a result it does proper indentation, can show you the context
+   you're in, the allowed tags at a particular position, etc.
+
+-- XEmacs comes standard with modes for editing Java and VRML code,
+   including font-lock support.
+
+-- GNUS 5.2 comes standard with XEmacs.
+
+-- You can now embed colors in the modeline, with different sections
+   of the modeline responding appropriately to various mouse gestures:
+   For example, clicking on the "read-only" indicator toggles the
+   read-only status of a buffer, and clicking on the buffer name
+   cycles to the next buffer.  Pressing button3 on these areas brings
+   up a popup menu of appropriate commands.
+
+-- There is a much nicer mode for completion lists and such.
+   At the minibuffer prompt, if you hit page-up or Meta-V, the completion
+   buffer will be displayed (if it wasn't already), you're moved into
+   it, and can move around and select filenames using the arrow keys
+   and the return key.  Rather than a cursor, a filename is highlighted,
+   and the arrow keys change which filename is highlighted.
+
+-- The edit-faces subsystem has also been much improved, in somewhat
+   similar ways to the completion list improvements.
+
+-- Many improvements were made to the multi-device support.
+   We now provide an auxiliary utility called "gnuattach" that
+   lets you connect to an existing XEmacs process and display
+   a TTY frame on the current TTY connection, and commands
+   `make-frame-on-display' (with a corresponding menubar entry)
+   and `make-frame-on-tty' for more easily creating frames on
+   new TTY or X connections.
+
+-- We have incorporated nearly all of the functionality of GNU Emacs
+   19.30 into XEmacs.  This includes support for lazy-loaded
+   byte code and documentation strings, improved paragraph filling,
+   better support for margins within documents, v19 regular expression
+   routines (including caching of compiled regexps), etc.
+
+-- In accordance with GNU Emacs 19.30, the following key binding
+   changes have been made:
+
+   C-x ESC -> C-x ESC ESC
+   ESC ESC -> ESC :
+   ESC ESC ESC is "abort anything" (keyboard-escape-quit).
+
+-- All major packages have been updated to their latest-released
+   versions.
+
+-- XEmacs now gracefully handles a full colormap (such as typically
+   results when running Netscape).  The nearest available color
+   is automatically substituted.
+
+-- Many bug fixes to the subprocess/PTY code, ps-print, menubar
+   functions, `set-text-properties', DEC Alpha support, toolbar
+   resizing (the "phantom VM toolbar" bug), and lots and lots
+   of other things were made.
+
+-- The ncurses library (a replacement for curses, found especially
+   under Linux) is supported, and will be automatically used
+   if it can be found.
+
+-- You can now undo in the minibuffer.
+
+-- Surrogate minibuffers now work.  These are also sometimes referred
+   to as "global" minibuffers.
+
+-- font-lock has been merged with GNU Emacs 19.30, improved defaults
+   have been added, and changes have been made to the way it is
+   configured.
+
+-- Many, many modes have menubar entries for them.
+
+-- `recover-session' lets you recover whatever files can be recovered
+   after your XEmacs process has died unexpectedly.
+
+-- C-h k followed by a toolbar button press correctly reports
+   the binding of the toolbar button.
+
+-- `function-key-map', `key-translation-map', and `keyboard-translate-table'
+   are now correctly implemented.
+
+-- `show-message-log' (and its menubar entry under Edit) have been
+   removed; instead use `view-lossage' (and its menubar entry under
+   Help).
+
+-- There is a standard menubar entry for specifying which browser
+   (Netscape, W3, Mosaic, etc.) to use when dispatching URL's
+   in mail, Usenet news, etc.
+
+-- Improved native sound support under Linux.
+
+-- Lots of other things we forgot to mention.
+
+
+
+Significant Lisp-level changes:
+-------------------------------
+
+-- Many improvements to the E-Lisp documentation have been made;
+   it should now be up-to-date and complete in nearly all cases.
+
+-- XEmacs has extensive documentation on its internals, for
+   would-be C hackers.
+
+-- Common-Lisp support (the CL package) is now dumped standard
+   into XEmacs.  No more need for (require 'cl) or anything
+   like that.
+
+-- Full support for extents and text properties over strings is
+   provided.
+
+-- The extent properties `start-open', `end-open', `start-closed',
+   and `end-closed' now work correctly w.r.t. text properties.
+
+-- The `face' property of extents and text properties can now
+   be a list.
+
+-- The `mouse-face' property from GNU Emacs is now supported.
+   It supersedes the `highlight' property.
+
+-- `enriched' and `facemenu' packages from GNU Emacs have been ported.
+
+-- New functions for easier creation of dialog boxes:
+   `get-dialog-box-response', `message-box', and `message-or-box'.
+
+-- `function-min-args' and `function-max-args' allow you to determine
+   the minimum and maximum allowed arguments for any type of
+   function (i.e. subr, lambda expression, byte-compiled function, etc.).
+
+-- Some C-level support for doing E-Lisp profiling is provided.
+   See `start-profiling', `stop-profiling', and
+   `pretty-print-profiling-info'.
+
+-- `current-process-time' reports the user, system, and real times
+   for the currently running XEmacs process.
+
+-- `next-window', `previous-window', `next-frame', `previous-frame',
+   `other-window', `get-lru-window', etc. have an extra device
+   argument that allows you to restrict which devices it includes
+   (normally all devices).  Some functions that incorrectly ignored
+   frames on different devices (e.g. C-x 0) are fixed.
+
+-- new functions `run-hook-with-args-until-success',
+   `run-hook-with-args-until-failure'.
+
+-- generalized facility for local vs. global hooks.  See `make-local-hook',
+   `add-hook'.
+
+-- New functions for querying the window tree: `frame-leftmost-window',
+   `frame-rightmost-window', `window-first-hchild', `window-first-vchild',
+   `window-next-child', `window-previous-child', and `window-parent'.
+
+-- Epoch support works.  This gets you direct access to some X events
+   and objects (e.g. properties and property-notify events).
+
+-- The multi-device support has been majorly revamped.  There is now
+   a new concept of "consoles" (devices grouped together under a
+   common keyboard/mouse), console-local variables, and a generalized
+   concept of device/console connection.
+
+-- `display-buffer' synched with GNU Emacs 19.30, giving you lots of
+   wondrous cruft such as
+     -- unsplittable frames
+     -- pop-up-frames, pop-up-frame-function
+     -- special-display-buffer-names, special-display-regexps,
+        special-display-function
+     -- same-window-buffer-names, same-window-regexps
+
+-- XEmacs has support for accessing DBM- and/or DB-format databases,
+   provided that you have the appropriate libraries on your system.
+
+-- There is a new font style: "strikethru" fonts.
+
+-- New data type "weak list", which is a list with special
+   garbage-collection properties, similar to weak hash tables.
+
+-- `set-face-parent' makes one face inherit all properties from another.
+
+-- The junky frame parameters mechanism has been revamped as
+   frame properties, which a standard property-list interface.
+
+-- Lots and lots of functions for working with property lists have
+   been added.
+
+-- New functions `push-window-configuration', `pop-window-configuration',
+   `unpop-window-configuration' for maintain a stack of window
+   configurations.
+
+-- Many fixups to the glyph code; icons and mouse pointers are now
+   properly merged into the glyph mechanism.
+
+-- `set-specifier' works more sensibly, like `set-face-property'.
+
+-- Many new specifiers for individually controlling toolbar height/width
+   and visibility and text cursor visibility.
+
+-- New face `text-cursor' controls the colors of the text cursor.
+
+-- Many new variables for turning on debug information about the
+   inner workings of XEmacs.
+
+-- Hash tables can now compare their keys using `equal' or `eql'
+   as well as `eq'.
+
+-- Other things too numerous to mention.
+
+
+
+Significant configuration/build changes:
+----------------------------------------
+
+-- You can disable TTY support, toolbar support, scrollbar support,
+   menubar support, and/or dialog box support at configure time
+   to save memory.
+
+-- New configure option `--extra-verbose' shows the diagnostic
+   output from feature testing; this should help track down
+   problems with incorrect feature detection.
+
+-- `dont-have-xmu' is now `with-xmu', with the reversed sense.
+   (It defaults to `yes'.)
+
+-- `with-mocklisp' lets you add Mocklisp support if you really
+   need this.
+
+-- `with-term' for adding TERM support for Linux users.
+
+
+
+** Major Differences Between 19.12 and 19.13
+============================================
+
+This is primarily a bug-fix release.  Lots of bugs have been fixed.
+Hopefully only a few have been introduced.  The most noteworthy bug
+fixes are:
+
+ -- There should be no more problems connecting XEmacs to an X
+    server over SLIP or other slow connections.
+ -- Periodic crashes when using the Buffers menu should be gone.
+ -- etags would sometimes erase the current buffer; it doesn't
+    any more.
+ -- XEmacs will correctly exit if the X server dies.
+ -- uniconified frames are displayed properly under TVTWM.
+ -- Breakage in `add-menu-item' / `add-menu-button' is fixed.
+
+The Motif menubar has _NOT_ been fixed for 19.13.  You should use the
+Lucid menubar instead.
+
+Multi-device support should now be working properly.  You can now open
+an X device after having started out on a TTY device.
+
+Background pixmaps now work.  See `set-face-background-pixmap'.
+
+Echo area messages are now saved to a buffer, " *Message Log*".  To
+see this buffer, use the command `show-message-log'.  It is possible
+to filter the message which are actually included by modifying the
+variables `log-message-ignore-regexps' and `log-message-ignore-labels'.
+
+You can now control which warnings you want to see.  See
+`display-warning-suppressed-classes' and friends.
+
+You can now set the default location of an "other window" from the
+Options menu.
+
+"Save Options" now saves the state of all faces.
+
+You can choose which file "Save Options" writes into; see
+`save-options-file'.
+
+XPM support is no longer required for the toolbar.
+
+The relocating allocator is now enabled by default whenever possible.
+This allows buffer memory to be returned to the system when no longer
+in use which helps keep XEmacs process size down.
+
+The ability to have captioned toolbars has been added.  Currently only
+the default toolbar actually has a captioned version provided.  A new
+specifier variable, `toolbar-buttons-captioned-p' controls whether the
+toolbar is captioned.
+
+A copy of the XEmacs FAQ is now included and is available through info.
+
+The on-line E-Lisp reference manual has been significantly updated.
+
+There is now audio support under Linux.
+
+Modifier keys can now be sticky.  This is controlled by the variable
+`modifier-keys-are-sticky'.
+
+manual-entry should now work correctly under Irix with the penalty of
+a longer startup time the first time it is invoked.  If you are having
+problems with this on another system try setting
+`Manual-use-subdirectory-list' to t.
+
+make-tty-device no longer automatically creates the first frame.
+
+Rectangular regions now work correctly.
+
+ediff no longer sets synchronize-minibuffers to t unless you first set
+ediff-synchronize-minibuffers
+
+keyboard-translate-table has been implemented.  This means that the
+`enable-flow-control' command for dealing with TTY connections that
+filter out ^S and ^Q now works.
+
+You can now create frames that are initially unmapped and frames that
+are "transient for another frame", meaning that they behave more like
+dialog-box frames.
+
+Other E-Lisp changes:
+
+-- Specifier `menubar-visible-p' for controlling menubar visibility
+-- Local command hooks should be set using `local-pre-command-hook'
+   and `local-post-command-hook' instead of making the global
+   equivalents be buffer-local.
+-- `quit-char', `help-char', `meta-prefix-char' can be any key specifier
+   instead of just an integer.
+-- new functions `add-async-timeout' and `disable-async-timeout'.
+   These let you create asynchronous timeouts, which are like
+   normal timeouts except that they're executed even during
+   running Lisp code.  Use this with care!
+-- `debug-on-error' and `stack-trace-on-error' now enter the debugger
+   only when an *unhandled* error occurs.  If you want the old
+   behavior, use `debug-on-signal' and `stack-trace-on-signal'.
+-- \U, \L, \u, \l, \E recognized specially in `replace-match'.
+   These are standard ex/perl commands for changing the case of
+   replaced text.
+-- New function event-matches-key-specifier-p.  This provides
+   a clean way of comparing keypress events with key specifiers
+   such as 65, (shift home), etc. without having to resort
+   to ugly `character-to-event' / `event-to-character' hacks.
+-- New function `add-to-list'
+-- New Common-Lisp functions `some', `every', `notevery', `notany',
+   `adjoin', `union', `intersection', `set-difference',
+   `set-exclusive-or', `subsetp'
+-- `remove-face-property' provides a clean way of removing a
+   face property.
+
+Many of the Emacs Lisp packages have been updated.  Some of the new
+Emacs Lisp packages ---
+
+ada-mode:  major mode for editing Ada source
+
+arc-mode:  simple editing of archives
+
+auto-show-mode:  automatically scrolls horizontally to keep point on-screen
+
+completion:  dynamic word completion mode
+
+dabbrev:  the dynamic abbrev package has been rewritten and is much
+          more powerful -- e.g. it searches in other buffers as well
+          as the current one
+
+easymenu:  menu support package
+
+live-icon:  makes frame icons represent the current frame contents
+
+mailcrypt 3.2:  mail encryption with PGP; included but v2.4 is still
+                the default
+
+two-column:  for editing two-column text
+
+
+** Major Differences Between 19.11 and 19.12
+============================================
+
+This is a huge new release.  Almost every aspect of XEmacs has been changed
+at least somewhat.  The highlights are:
+
+-- TTY support (includes face support)
+-- new redisplay engine; should be faster, less buggy, and more powerful
+-- terminology change from "screen" to "frame"
+-- built-in toolbar
+-- toolbar support added to many packages
+-- multiple device support (still in beta; improvements to come in
+   19.13)
+-- Purify used to ensure that there are no memory leaks or memory corruption
+   problems
+-- horizontal and vertical scrollbars in all windows
+-- new Lucid (i.e. look-alike Motif) scrollbar widget
+-- stay-up menus in the Lucid (look-alike Motif) menubar widget
+-- 3-d modeline
+-- new extents engine; should be faster, less buggy, and more powerful
+-- much more powerful control over faces
+-- expanded menubar
+-- more work on synching with GNU Emacs 19.28
+-- new packages: Hyperbole, OOBR (object browser), hm--html-menus, viper,
+   lazy-lock.el, ksh-mode.el, rsz-minibuf.el
+-- package updates for all major packages
+-- dynodump package for Solaris: provides proper undumping and portable
+   binaries across different OS versions and machine types
+-- Greatly expanded concept of "glyphs" (pixmaps etc. in a buffer)
+-- built-in support for displaying X-Faces, if the X-Face library is
+   available
+-- built-in support for SOCKS if the SOCKS library is available
+-- graceful behavior when the colormap is full (e.g. Netscape ate
+   all the colors)
+-- built-in MD5 (secure hashing function) support
+
+
+More specific information:
+
+*** TTY Support
+---------------
+
+The long-awaited TTY support is now available.  XEmacs will start up
+in TTY mode (using the tty you started XEmacs from) if the DISPLAY
+environment variable is not set or if you use the `-nw' option.
+
+Faces are available on TTY's.  For a demonstration, try editing a C
+file and turning on font-lock-mode.
+
+You can also connect to additional TTY's using `make-tty-device',
+whether your first frame was a TTY or an X window.  This ability is
+not yet completely finished.
+
+The full event-loop capabilities (processes, timeouts, etc.) are
+available on TTY's.
+
+
+
+*** New Redisplay Engine
+------------------------
+
+The redisplay engine has been rewritten to improve its efficiency and
+to increase its functionality.  It should also be significantly more
+bug-free than the previous redisplay engine.
+
+A line that is not big enough to display at the bottom of the window
+will normally be clipped (so that it is partially visible) rather than
+not displayed at all.  The variable `pixel-vertical-clip-threshold'
+can be used to control the minimum space that must be available for a
+line to be clipped rather than not displayed at all.
+
+Tabs are displayed in such a way that things line up fairly well even
+in the presence of variable-width fonts and/or lines with
+multiply-sized fonts.
+
+Display tables are implemented, through the specifier variable
+`current-display-table'.  They can be buffer-local, window-local,
+frame-local, or device-local.  See below for info about specifiers.
+
+
+
+*** Toolbar
+-----------
+
+There is now built-in support for a toolbar.  A sample toolbar is
+visible by default at the top of the frame.  Four separate toolbars
+can be configured (at the top, bottom, left, and right of the frame).
+The toolbar specification is similar to the menubar specification.
+The up, down, and disabled glyphs of a toolbar button can be
+separately controlled.  Explanatory text can be echoed in the echo
+area when the mouse passes over a toolbar button.  The size, contents,
+and visibility of the various toolbars can be controlled on a
+per-buffer, per-window, per-frame, and per-device basis through the
+use of specifiers.  See the chapter on toolbars in the Lisp Reference
+Manual (included with XEmacs) for more information.
+
+The toolbar color and shadow thicknesses are currently controlled only
+through `modify-frame-parameters' and through X resources.  We are
+planning on making these controllable through specifiers as well. (Our
+hope is to make `modify-frame-parameters' obsolete, as it is a clunky
+and not very powerful mechanism.)
+
+Info, GNUS, VM, W3, and various other packages include custom toolbars
+with them.
+
+
+
+*** Menubar
+-----------
+
+Stay-up menus are implemented in the look-alike Motif menubar.
+
+The default menubar has been expanded to include most commonly-used
+functions in XEmacs.
+
+The options menu has been greatly expanded to include many more
+options.
+
+The menubar specification format has been greatly expanded.  Per-menu
+activation hooks can be specified through the :filter keyword (thus
+obsoleting `activate-menubar-hook'); this allows for fast response
+time when you have a large and complex menu.  You can dynamically
+control whether menu items are present through the :included and
+:config keywords. (The latter keyword implements a simple menubar
+configuration scheme, in conjunction with the variable
+`menubar-configuration'.) Many different menu-item separators (single
+or double line; solid or dashed; flat, etched-in, or etched-out) are
+available.  See the chapter on menus in the Lisp Reference Manual for
+more information about all of this.
+
+New functions `add-submenu' and `add-menu-button' are available.
+These supersede the older `add-menu' and `add-menu-item' functions,
+and provide a more powerful and consistent interface.
+
+New convenience functions for popping up the part or all of the
+menubar in a pop-up menu are available: `popup-menubar-menu' and
+`popup-buffer-menu'.
+
+Menus are now incrementally constructed greatly improving menubar
+response time.
+
+
+
+*** Scrollbars
+--------------
+
+A look-alike Motif scrollbar is now included with XEmacs.  No longer
+will you have to suffer with ugly Athena scrollbars.
+
+Windows can now have horizontal scrollbars.  Normally they are visible
+when the window's buffer is set to truncate lines rather than wrap
+them (e.g. `(setq truncate-lines t)').
+
+All windows, not only the right-most ones, can have vertical
+scrollbars.
+
+The functions to change a scrollbar's width have been superseded by
+the specifier variables `scrollbar-width' and `scrollbar-height'.
+This allows their values to be controlled on a buffer-local,
+window-local, frame-local, and device-local basis.  See below.
+
+The scrollbars interact better with the event loop (for example, you
+can type `C-h k', do a scrollbar action, and see a description of this
+scrollbar action printed as if you had pressed a key sequence or
+selected a menu item).
+
+The scrollbar behavior can be reprogrammed, by advising the
+`scrollbar-*' functions.
+
+
+
+*** Key Bindings
+----------------
+
+The oft-used function `goto-line' now has its own binding: M-g.
+
+New bindings are available for scrolling the "other" window: M-next,
+M-prior, M-home, M-end. (On many keyboards, `next' and `prior'
+labelled `PgUp' and `PgDn'.)
+
+You can reactivate a deactivated Zmacs region, without having any
+other effects, with the binding M-C-z.
+
+The bindings `M-u', `M-l', and `M-c' now work on the region (if a
+region is active) or work on a word, as before.
+
+Shift-Control-G forces a "critical quit", which drops immediately into
+the debugger; see below.
+
+
+
+*** Modeline
+------------
+
+The modeline can now have a 3-d look; this is enabled by default.  The
+specifier variable `modeline-shadow-thickness' controls the size.
+
+The modeline can now be turned off on a per-buffer, per-window,
+per-frame, or per-device basis.  The specifier variable
+`has-modeline-p' controls whether the modeline is visible.  See below
+for details about the vastly powerful specifier mechanism.
+
+The modeline functions and variables have been renamed to be
+`*-modeline-*' rather than `*-mode-line-*'.  Aliases are provided for
+all the old names.
+
+Variable width fonts now work correctly when used in the modeline.
+
+
+
+*** Minibuffer, Echo Area
+-------------------------
+
+The minibuffer is no longer constrained to be one line high.  The
+package rsz-minibuf.el is included to automatically resize the
+minibuffer when its contents are too big; enable this with
+`resize-minibuffer-mode'.
+
+The echo area is now a true buffer, called " *Echo Area*".  This
+allows you to customize the echo area behavior through
+before-change-functions and after-change-functions.
+
+
+
+*** Specifiers
+--------------
+
+XEmacs has a new concept called "specifiers", used to configure most
+display options (toolbar size and contents, scrollbar size, face
+properties, modeline visibility and shadow-thickness, glyphs, display
+tables, etc.).  We are planning on converting all display
+characteristics to use specifiers, and obsoleting the clunky functions
+`frame-parameters' and `modify-frame-parameters'.  Specifically:
+
+-- You can specify values (called "instantiators") for particular
+   "locales" (i.e. buffers, windows, frames, devices, or a global value).
+   When determining what the actual value (or "instance") of a specifier
+   is, the specifications that are provided are searched from most
+   specific (i.e. buffer-local) to most general (i.e. global), looking
+   for a matching one.
+
+-- You can specify multiple instantiators for a particular locale.
+   For example, when specifying what the foreground color of a face
+   is in a particular buffer, you could specify two instantiators:
+   "dark sea green" and "green".  The color would then be dark sea
+   green on devices that recognize that color, and green on other
+   devices.  You have effectively provided a fallback value to make
+   sure you get reasonable behavior on all devices.
+
+-- You can add one or more tags to an instantiator, where a tag
+   is a symbol that has been previously registered with XEmacs.
+   This allows you to identify your instantiators for later
+   removal in a way that won't interfere with other applications
+   using the same specifier.  Furthermore, particular tags can
+   be restricted to match only particular sorts of devices.
+   Any tagged instantiator will be ignored if the device over which
+   it is being instanced does not match any of its tags.  This
+   allows you, for example, to restrict an instantiator to a
+   particular device type (X or TTY) and/or class (color, grayscale,
+   or mono). (You might want to specify, for example, that a
+   particular face is displayed in green on color devices and is
+   underlined on mono devices.)
+
+-- A full API is provided for manipulating specifiers, and full
+   documentation is provided in the Lisp Reference Manual.
+
+
+
+*** Basic Lisp Stuff
+--------------------
+
+Common-Lisp backquote syntax is recognized.  For example, the old
+expression
+
+(` (a b (, c)))
+
+can now be written
+
+`(a b ,c)
+
+The old backquote syntax is still accepted.
+
+The new function `type-of' returns a symbol describing the type of a
+Lisp object (`integer', `string', `symbol', etc.)
+
+Symbols beginning with a colon (called "keywords") are treated
+specially in that they are automatically made self-evaluating when
+they are interned into `obarray'.  The new function `keywordp' returns
+whether a symbol begins with a colon.
+
+`get', `put', and `remprop' have been generalized to allow you to set
+and retrieve properties on many different kinds of objects: symbols,
+strings, faces, glyphs, and extents (for extents, however, this is not
+yet implemented).  They are joined by a new function `object-props'
+that returns all of the properties that have been set on an object.
+
+New functions `plists-eq' and `plists-equal' are provided for
+comparing property lists (a property list is an alternating list
+of keys and values).
+
+The Common-Lisp functions `caar', `cadr', `cdar', `cddr', `caaar', etc.
+(up to four a's and/or d's), `first', `second', `third', etc. (up to
+`tenth'), `last', `rest', and `endp' have been added, for more
+convenient manipulation of lists.
+
+New function `mapvector' maps over a sequence and returns a vector
+of the results, analogous to `mapcar'.
+
+New functions `rassoc', `remassoc', `remassq', `remrassoc', and
+`remrassq' are provided for working with alists.
+
+New functions `defvaralias', `variable-alias' and `indirect-variable'
+are provided for creating variable aliases.
+
+Strings have a modified-tick that is bumped every time a string
+is modified in-place with `aset' or `fillarray'.  This is retrieved
+with the new function `string-modified-tick'.
+
+New macro `push' destructively adds an element to the beginning of a
+list.  New macro `pop' destructively removes and returns the first
+element of a list.
+
+
+
+*** Buffers
+-----------
+
+Most functions that operate on buffer text now take an optional BUFFER
+argument, specifying which buffer they operate on.  (Previously, they
+always operated on the current buffer.)
+
+The new function `transpose-regions' is provided, ported from GNU
+Emacs.
+
+The new function `save-current-buffer' works like `save-excursion'
+but only saves the current buffer, not the location of point in
+that buffer.
+
+
+
+*** Devices
+-----------
+
+XEmacs has a new concept of "device", which is represents a particular
+X display or TTY connection.  `make-frame' has a new, optional device
+parameter that allows you to specify which device the frame is to be
+created on.
+
+Multiple simultaneous TTY and/or X connections may be made.  The
+specifier mechanism provides reasonable behavior of glyphs, faces,
+etc. over heterogeneous device types and over devices whose individual
+capabilities may vary.
+
+There is also a device type called "stream" that represents a STDIO
+device that has no redisplay or cursor-motion capabilities, such as
+the "glass terminal" that XEmacs uses when it is run noninteractively.
+There is not all that much you can do with stream devices currently;
+please let us know if there are good uses you can think of for this
+capability. (For example, log files?)
+
+A new device API is provided.  Functions are provided such as
+`device-name' (the name of the device, which generally is based on the
+X display or TTY file name), `device-type' (X, TTY, or stream),
+`device-class' (color, grayscale, or mono), etc.  See the Lisp
+Reference Manual.
+
+Many functions have been extended to contain an additional, optional
+device argument, where such an extension makes sense.  In general, if
+the argument is omitted, it is equivalent to specifying
+`(selected-device)'.
+
+Many previous functions and variables are obsoleted in favor of the
+device API.  For example, `window-system' is obsoleted by
+`device-type', and `x-color-display-p' and friends are obsoleted by
+`device-class'.
+
+*** NOTE **: The obsolete variable `window-system' is going
+to be deleted soon, probably in 19.14.  Please correct all
+your code to use `device-type'.
+
+*** INCOMPATIBLE CHANGE **: The function `x-display-visual-class'
+returns different values from previous versions of XEmacs.
+
+
+
+*** Errors, Warnings, C-g
+-------------------------
+
+There is a new warnings system implemented.  Many warnings that were
+formerly displayed in various ad-hoc ways (e.g. warnings about screwy
+modifier mappings, messages about failures handling the mouse cursor
+and errors in a gc-hook) have been regularized through this system.
+The new function `warn' displays a warning before the next redisplay
+(the actually display of the warning messages is accomplished through
+`display-warning-buffer').  Both `warn' and `display-warning-buffer'
+are Lisp functions (the C code calls out to them as necessary), and
+thus you can customize the warning system.
+
+Under an X display, you can press Shift-Control-G to force a "critical
+quit".  This will immediately display a backtrace and pop you into the
+debugger, regardless of the settings of `inhibit-quit' and
+`debug-on-quit'.
+
+C-g now works properly even on systems that don't implement SIGIO or
+for which SIGIO is broken (e.g. IRIX 5.3 and older versions of Linux).
+In addition, the SIGIO support has been fixed for many systems on
+which it didn't always work properly before (e.g. HPUX and Solaris).
+
+
+
+*** Events
+----------
+
+*** INCOMPATIBLE CHANGE **: Many event functions have been changed to
+accept and return windows instead of frames.
+
+New function: `event-live-p', specifying whether `deallocate-event'
+has been called on an event.
+
+The "menu event" type has been renamed to "misc-user event", and
+encompasses scrollbar events as well as menu events.  We are planning
+on making it also encompass toolbar events in a future release.
+
+New functions are provided for determining whether an particular
+sections of a frame: `event-over-border-p', `event-over-glyph-p',
+`event-over-modeline-p', `event-over-text-area-p', and
+`event-over-toolbar-p'.  The old, kludgey methods of checking the
+window-height, the internal-border-width, etc. are unreliable and
+should not be used.
+
+New functions `event-window-x-pixel' and `event-window-y-pixel' are
+provided for determining where in a particular window an event
+happened.
+
+New functions `event-glyph-x-pixel' and `event-glyph-y-pixel' are
+provided for determining where in a particular glyph an event
+happened.
+
+New function `event-closest-point', which returns the closest buffer
+position to the event even if the event did not occur over any text.
+
+New variable `unread-command-events', superseding the older
+`unread-command-event'.
+
+Many event-loop bugs have been fixed.
+
+
+
+*** Extents
+-----------
+
+The extent code has been largely rewritten.  It should be faster and
+more reliable.
+
+The text-property implementation has been greatly improved.
+
+Some new extent primitives are provided to return the position of the
+next or previous property change in a buffer.
+
+Extents can now have a parent specified; then all of its properties
+(except for the buffer it's in and its position in that buffer) come
+from that extent.  Hierarchies of such extents can be created.
+
+Extents now have a `detachable' property that controls what happens
+(they either get detached or shrink down to zero-length) when their
+text is deleted.  Previously, such extents would always be detached.
+
+The `invisible' property on extents now works.
+
+`map-extents' has three additional parameters that provide more
+control over which extents are mapped.
+
+`map-extents' deals better with changes made to extents in the
+buffer being mapped over.
+
+A new function `mapcar-extents' (an alternative to `map-extents') has
+been provided and should be easier to use than `map-extents'.
+
+
+
+*** Faces
+---------
+
+Faces can now be buffer-local, window-local, and device-local as well
+as frame-local, and can be further restricted to a particular device
+type or class.  The way in which faces can be controlled is now based
+on the general and powerful specifier mechanism; see above.
+
+The new function `set-face-property' generalizes `set-face-font',
+`set-face-foreground', etc. and takes many new optional arguments, in
+accordance with the new specifier mechanism.
+
+The new functions `face-property' and `face-property-instance'
+generalize `face-font', `face-foreground', etc. and take many new
+optional arguments, in accordance with the new specifier mechanism.
+(`face-property' returns the value, if any, that was specified for a
+particular locale, and `face-property-instance' returns the actual
+value that will be used for display.  See the section on specifiers.)
+
+The functions `face-font', `face-foreground', `face-background',
+`set-face-font', `set-face-foreground', `set-face-background',
+etc. are now convenience functions, trivially implemented using
+`face-property' and `set-face-property' and take new optioanl
+arguments in accordance with those functions.  New convenience
+functions `face-font-instance', `face-foreground-instance',
+`face-background-instance', etc. are provided and are trivially
+implemented using `face-property-instance'.
+
+Inheritance of face properties can now be specified.  Each individual
+face property can inherit differently from other properties, or not
+inherit at all.
+
+You can set user-defined properties on faces using
+`set-face-property'.
+
+You can create "temporary" faces, which are faces that disappear
+when they are no longer in use.  This is as opposed to normal
+faces, which stay around forever.
+
+The function `make-face' takes a new optional argument specifying
+whether a face should be permanent or temporary, and returns the
+actual face object rather than the face symbol, as in previous
+versions of XEmacs.
+
+The function `face-list' takes a new optional argument specifying
+whether permanent, temporary, or both kinds of faces should be
+returned.
+
+Faces have new TTY-specific properties: `highlight', `reverse',
+`alternate', `blinking', and `dim'.
+
+Redisplay is smarter about dealing with face changes: changes to a
+particular face no longer cause all frames to be cleared and
+redisplayed.
+
+The Edit-Faces package is provided for interactively changing faces.
+A menu item on the options menu is provided for this.
+
+New functions are provided for retrieving the ascent, descent, height,
+and width of a character in a particular face.
+
+
+
+*** Fonts, Colors
+-----------------
+
+*** INCOMPATIBLE CHANGE **: The old "font" and "pixel" objects are gone.
+In place are new objects "font specifier", "font instance", "color
+specifier", and "color instance".  Functions `font-name', `pixel-name'
+(an obsolete alias for `color-name'), etc. are now convenience
+functions for working with font and color specifiers.  Old code that
+is not too sophisticated about working with font and pixel objects may
+still work, though.  (For example, the idiom `(font-name (face-font
+'default))' still works.)
+
+You can now extract the RGB components of a color-instance object
+(similar to the old pixel object) with the function
+`color-instance-rgb-components'.  There is also a convenience function
+`color-rgb-components' for working with color specifiers.
+
+If there are no more colors available in the colormap, the nearest
+existing color will be used when allocating a new color.
+
+
+
+*** Frames
+----------
+
+What used to be called "screens" are now called "frames", for clarity
+and consistency with GNU Emacs.  Aliases are provided for all the old
+screen functions and variables, to avoid introducing a huge E-Lisp
+incompatibility.
+
+The frame code has been merged with GNU Emacs 19.28, providing
+improved functionality for many functions.
+
+
+
+*** Glyphs, Images, and Pixmaps
+-------------------------------
+
+Glyphs (used in various places, i.e. as begin-glyphs and end-glyphs
+attached to extents and appearing in a buffer or in marginal
+annotations; as the truncator and continuor glyphs marking line wrap
+or truncation; as an overlay at the beginning of a line; as the
+displayable element in a toolbar button; etc.) can now be
+buffer-local, window-local, frame-local, and device-local, and can be
+further restricted to a particular device type or class.  The way in
+which faces can be controlled is now based on the general and powerful
+specifier mechanism; see above.
+
+*** INCOMPATIBLE CHANGE **: The glyph and pixmap API has been completely
+overhauled.  A new Lisp object "glyph" is provided and should be used
+where the old "pixmap" object would have been used.  The pixmap object
+exists no longer.  There are also new Lisp objects "image specifier"
+and "image instance" (an image-instance is the closest equivalent to
+what a pixmap object was).  More work on glyphs and images is slated
+for 19.13.  The glyph and image docs in the Lisp Reference Manual are
+incomplete and will be finished in 19.13.
+
+The new function `set-glyph-property' allows setting of all the
+glyph properties (`baseline', `contrib-p', etc.).  Convenience
+functions for particular properties are also provided, just like
+for faces.
+
+You can set user-defined properties on glyphs using the new function
+`set-glyph-property'.
+
+When displaying pixmaps, existing, closest-matching colors will be
+used if the colormap is full.
+
+If the compface library is compiled into XEmacs, there is built-in
+support for displaying X-Face bitmaps. (These are typically small
+pictures of people's faces, included in a mail message through the
+X-Face: header.) VM and highlight-headers will automatically use the
+built-in X-Face support if it is available.
+
+Annotations in the right margin (as well as the left margin) are now
+implemented.  The left and right margin width functions have been
+superseded by the specifier variables `left-margin-width' and
+`right-margin-width', allowing much more flexible control through the
+specifier mechanism.
+
+*** INCOMPATIBLE CHANGE **: The variable `use-left-overflow',
+for controlling annotations in the left margin, is now a specifier
+variable instead of a buffer-local variable.  (There is also a new
+variable `use-right-overflow', that is complementary.)
+
+
+
+*** Hashing
+-----------
+
+Two new types of weak hashtables can be created: key-weak and
+value-weak.  In a key-weak hashtable, an entry remains around
+if its key is referenced elsewhere, regardless of whether this
+is also the case for the value.  Value-weak hashtables are
+complementary. (This is as opposed to the traditional weak
+hashtables, where an entry remains around only if both the
+key and value are referenced elsewhere.) New functions
+`make-key-weak-hashtable' and `make-value-weak-hashtable'
+are provided for creating these hashtables.
+
+The new function `md5' is provided for performing an MD5
+hash of an object.  MD5 is a secure message digest algorithm
+developed by RSA, inc.
+
+
+
+*** Keymaps
+-----------
+
+The GNU Emacs concept of `function-key-map' is now partially
+implemented.  This allows conversion of function-key escape sequences
+such as `ESC [ 1 1 ~' into an equivalent human-readable keysym such as
+`F1'.  This work will be completed in 19.14.  The function-key map is
+device-local and controllable through the functions
+`device-function-key-map' and `set-device-function-key-map'.
+
+`where-is-internal' now correctly searches minor-mode keymaps,
+extent-local keymaps, etc.  As a side effect of this, menu items will
+now correctly show the keyboard equivalent for commands that are
+available through a minor-mode keymap, extent-local keymap, etc.
+
+*** INCOMPATIBLE CHANGE **: The modifier key "Symbol" has
+been renamed to "Alt", for compatibility with the rest of the world.
+Keep in mind that on many keyboards, the key labelled "Alt" actually
+generates the "Meta" modifier.  (On Sun keyboards, however, the key
+labelled "Alt" does indeed generate the "Alt" modifier, and the key
+labelled with a diamond generates the "Meta" modifier.)
+
+
+
+*** Mouse, Active Region
+------------------------
+
+The mouse internals in mouse.el have been rewritten.  Hooks have been
+provided for easier customization of mouse behavior.  For example, you
+can now easily specify an action to be invoked on single-click
+(i.e. down-up without appreciable motion), double-click, drag-up, etc.
+
+Some code from GNU Emacs has been ported over, generalizing some of
+the X-specific mouse stuff.
+
+*** INCOMPATIBLE CHANGE **: The function `set-mouse-position' accepts
+a window instead of a frame.
+
+New function `mouse-position' that obsoletes and is more powerful than
+`read-mouse-position'.
+
+New functions `mouse-pixel-positon' and `set-mouse-pixel-position' for
+working with pixels instead of characters.
+
+The active (Zmacs) region is now highlighted using the `zmacs-region-face'
+instead of the `primary-selection-face'; this generalizes what used
+to be X-specific.
+
+New functions `region-active-p', `region-exists-p', and `activate-region'
+provide a uniform API for dealing with the region irrespective of
+whether the variable `zmacs-regions' is set.
+
+XEmacs is now a better X citizen with respect to the primary selection:
+it does not stomp on the primary selection quite so much.  This makes
+things more manageable if you set `zmacs-regions' to nil.
+
+
+
+*** Processes
+-------------
+
+Various process race conditions and bugs have been fixed.  Problems
+with process termination not getting noticed until much later (if at
+all) should be gone now, as well as problems with zombie processes
+under some systems.
+
+SOCKS support is now included.  SOCKS is a package that allows hosts
+behind a firewall to gain full access to the Internet without
+requiring direct IP reachability.
+
+
+
+*** Windows
+-----------
+
+Windows 95 is still not out yet.
+
+*** INCOMPATIBLE CHANGE **: The functions `locate-window-from-coordinates'
+and `window-edges' have been eliminated.  It no longer makes sense to
+work with windows in terms of character positions, because windows can
+(and often do) have many differently-sized fonts in them, because the
+3-D modeline is not exactly one line high, etc.
+
+The new functions `window-pixel-edges', `window-highest-p',
+`window-lowest-p', `frame-highest-window', and `frame-lowest-window'
+are provided as substitutes for the above-mentioned, deleted
+functions.
+
+The function `window-end' now takes an optional GUARANTEE argument
+that will ensure that the value is actually correct as of the next
+redisplay.
+
+The window code has been merged with GNU Emacs 19.28, providing
+improved functionality for many functions.
+
+
+
+*** System-Specific Information
+-------------------------------
+
+Georg Nikodym's dynodump package is provided, for proper unexec()ing
+on Solaris systems.  Executables built on Solaris 2.3 can now run on
+Solaris 2.4 without crashing; similarly with executables built on one
+type of Sun machine and run on another.
+
+AIX 4.x is supported.
+
+The NeXTstep operating system is supported in TTY mode (this is still
+in beta).  There are plans to port XEmacs to the NeXTstep window
+system, but it may be awhile before this is complete.
+
+Problems with the `round' function causing arithmetic errors on HPUX 9
+have been fixed.
+
+You can now build XEmacs as an ELF executable on Linux systems that
+support ELF.
+
+Various other new system configurations are supported.
+
+
+
+
+** Major Differences Between 19.10 and 19.11
+============================================
+
+The name has changed from "Lucid Emacs" to "XEmacs".  Along with this is a
+new canonical ftp site: cs.uiuc.edu:/pub/xemacs.
+
+XEmacs now has its very own World Wide Web page!  It contains a
+complete list of the FTP distribution sites, the most recent FAQ,
+pointers to Emacs Lisp packages not included with the distribution, and
+other useful stuff.  Check it out at http://xemacs.cs.uiuc.edu/.
+
+A preliminary New Users Guide.
+
+cc-mode.el now provides the default C, C++ and Objective-C modes.
+
+The primary goal of this release is stability.  Very few new features have
+been introduced but lots of bugs have been fixed.  Many of the Emacs Lisp
+packages have been updated.
+
+Some of the new Emacs Lisp packages ---
+
+tcl-mode.el:  major mode for editing TCL code
+
+fast-lock.el: saves and restores font-lock highlighting, greatly
+            reducing the time necessary for loading a font-lock'ed
+            file
+
+ps-print.el: prints buffers to Postscript printers preserving the
+           buffer's bold and italic text attributes
+
+toolbar.el: provides a "fake" toolbar for use with XEmacs (an
+          integrated one will be included with 19.12)
+
+
+** Major Differences Between 19.9 and 19.10
+===========================================
+
+The GNU `configure' system is now used to build lemacs.
+
+The Emacs Manual and Emacs Lisp Reference Manual now document version 19.10.
+If you notice any errors, please let us know.
+
+When pixmaps are displayed in a buffer, they contribute to the line height -
+that is, if the glyph is taller than the rest of the text on the line, the
+line will be as tall as necessary to display the glyph.
+
+In addition to using arbitrary sound files as emacs beeps, one can control
+the pitch and duration of the standard X beep, on X servers which allow that
+(Note: most don't.)
+
+There is support for playing sounds on systems with NetAudio servers.
+
+Minor modes may have mode-specific key bindings; keymaps may have an arbitrary
+number of parent maps.
+
+Menus can have toggle and radio buttons in them.
+
+There is a font selection menu.
+
+Some default key bindings have changed to match FSF19; the new bindings are
+
+  Screen-related commands:
+        C-x 5 2                 make-screen
+        C-x 5 0                 delete-screen
+        C-x 5 b                 switch-to-buffer-other-screen
+        C-x 5 f                 find-file-other-screen
+        C-x 5 C-f               find-file-other-screen
+        C-x 5 m                 mail-other-screen
+        C-x 5 o                 other-screen
+        C-x 5 r                 find-file-read-only-other-screen
+  Abbrev-related commands:
+        C-x a l                 add-mode-abbrev
+        C-x a C-a               add-mode-abbrev
+        C-x a g                 add-global-abbrev
+        C-x a +                 add-mode-abbrev
+        C-x a i g               inverse-add-global-abbrev
+        C-x a i l               inverse-add-mode-abbrev
+        C-x a -                 inverse-add-global-abbrev
+        C-x a e                 expand-abbrev
+        C-x a '                 expand-abbrev
+  Register-related commands:
+        C-x r C-SPC             point-to-register
+        C-x r SPC               point-to-register
+        C-x r j                 jump-to-register
+        C-x r s                 copy-to-register
+        C-x r x                 copy-to-register
+        C-x r i                 insert-register
+        C-x r g                 insert-register
+        C-x r r                 copy-rectangle-to-register
+        C-x r c                 clear-rectangle
+        C-x r k                 kill-rectangle
+        C-x r y                 yank-rectangle
+        C-x r o                 open-rectangle
+        C-x r t                 string-rectangle
+        C-x r w                 window-configuration-to-register
+  Narrowing-related commands:
+        C-x n n                 narrow-to-region
+        C-x n w                 widen
+  Other changes:
+        C-x 3                   split-window-horizontally (was undefined)
+        C-x -                   shrink-window-if-larger-than-buffer
+        C-x +                   balance-windows
+
+The variable allow-deletion-of-last-visible-screen has been removed, since
+it was widely hated.  You can now always delete the last visible screen if
+there are other iconified screens in existence.
+
+ToolTalk support is provided.
+
+An Emacs screen can be placed within an "external client widget" managed
+by another application.  This allows an application to use an Emacs screen
+as its text pane rather than the standard Text widget that is provided
+with Motif or Athena.
+
+Additional compatibility with Epoch is provided (though this is not yet
+complete.)
+
+
+** Major Differences Between 19.8 and 19.9
+==========================================
+
+Scrollbars!  If you have Motif, these are real Motif scrollbars; otherwise,
+Athena scrollbars are used.  They obey all the usual resources of their
+respective toolkits.
+
+There is now an implementation of dialog boxes based on the Athena
+widgets, as well as the existing Motif implementation.
+
+This release works with Motif 1.2 as well as 1.1.  If you link with Motif,
+you do not also need to link with Athena.
+
+If you compile lwlib with both USE_MOTIF and USE_LUCID defined (which is the
+recommended configuration) then the Lucid menus will draw text using the Motif
+string-drawing library, instead of the Xlib one.  The reason for this is that
+one can take advantage of the XmString facilities for including non-Latin1
+characters in resource specifications.  However, this is a user-visible change
+in that, in this configuration, the menubar will use the "*fontList" resource
+in preference to the "*font" resource, if it is set.
+
+It's possible to make extents which are copied/pasted by kill and undo.
+There is an implementation of FSF19-style text properties based on this.
+
+There is a new variable, minibuffer-max-depth, which is intended to circumvent
+a common source of confusion among new Emacs users.  Since, under a window
+system, it's easy to jump out of the minibuffer (by doing M-x, then getting
+distracted, and clicking elsewhere) many, many novice users have had the
+problem of having multiple minibuffers build up, even to the point of
+exhausting the lisp stack.  So the default behavior is to disallow the
+minibuffer to ever be reinvoked while active; if you attempt to do so, you
+will be prompted about it.
+
+There is a new variable, teach-extended-commands-p, which if set, will cause
+`M-x' to remind you of any key bindings of the command you just invoked the
+"long way."
+
+There are menus in Dired, Tar, Comint, Compile, and Grep modes.
+
+There is a menu of window management commands on the right mouse button over
+the modelines.
+
+Popup menus now have titles at the top; this is controlled by the new
+variable `popup-menu-titles'.
+
+The `Find' key on Sun keyboards will search for the next (or previous)
+occurrence of the selected text, as in OpenWindows programs.
+
+The `timer' package has been renamed to `itimer' to avoid a conflict with
+a different package called `timer'.
+
+VM 5.40 is included.
+
+W3, the emacs interface to the World Wide Web, is included.
+
+Felix Lee's GNUS speedups have been installed, including his new version of
+nntp.el which makes GNUS efficiently utilize the NNTP XOVER command if
+available (which is much faster.)
+
+GNUS should also be much friendlier to new users: it starts up much faster,
+and doesn't (necessarily) subscribe you to every single newsgroup.
+
+The byte-compiler issues a new class of warnings: variables which are
+bound but not used.  This is merely an advisory, and does not mean the
+code is incorrect; you can disable these warnings in the usual way with
+the `byte-compiler-options' macro.
+
+the `start-open' and `end-open' extent properties, for specifying whether
+characters inserted exactly at a boundary of an extent should go into the
+extent or out of it, now work correctly.
+
+The `extent-data' slot has been generalized/replaced with a property list,
+so it's easier to attach arbitrary data to extent objects.
+
+The `event-modifiers' and `event-modifier-bits' functions work on motion
+events as well as other mouse and keyboard events.
+
+Forms-mode uses fonts and read-only regions.
+
+The behavior of the -geometry command line option should be correct now.
+
+The `iconic' screen parameter works when passed to x-create-screen.
+
+The user's manual now documents Lucid Emacs 19.9.
+
+The relocating buffer allocator is turned on by default; this means that when
+buffers are killed, their storage will be returned to the operating system,
+and the size of the emacs process will shrink.
+
+CAVEAT: code which contains calls to certain `face' accessor functions will
+need to be recompiled by version 19.9 before it will work.  The functions
+whose callers must be recompiled are: face-font, face-foreground,
+face-background, face-background-pixmap, and face-underline-p.  The symptom
+of this problem is the error "Wrong type argument, arrayp, #<face ... >".
+The .elc files generated by version 19.9 will work in 19.6 and 19.8, but
+older .elc files which contain calls to these functions will not work in 19.9.
+
+Work In Progress:
+
+ - We have been in the process of internationalizing Lucid Emacs.  This code is
+   ***not*** ready for general use yet.  However, the code is included (and
+   turned off by default) in this release.
+
+   - If you define I18N2 at compile-time, then sorting/collation will be done
+     according to the locale returned by setlocale().
+
+   - If you define I18N3 at compile-time, then all messages printed by lemacs
+     will be filtered through the gettext() library routine, to enable the use
+     of locale-specific translation catalogues.  The current implementation of
+     this is quite dependent on Solaris 2, and has a very large impact on
+     existing code, therefore we are going to be making major changes soon.
+     (You'll notice calls to `gettext' and `GETTEXT' scattered around much of
+     the lisp and C code; ignore it, this will be going away.)
+
+   - If you define I18N4 at compile-time, then lemacs will internally use a
+     wide representation of characters, enabling the use of large character
+     sets such as Kanji.  This code is very OS dependent: it requires X11R5,
+     and several OS-supplied library routines for reading and writing wide
+     characters (getwc(), putwc(), and a few others.)  Performance is also a
+     problem.  This code is also scheduled for a major overhaul, with the
+     intent of improving performance and portability.
+
+     Our eventual goal is to merge with MULE, or at least provide the same base
+     level of functionality.  If you would like to help out with this, let us
+     know.
+
+ - Other work-in-progress includes Motif drag-and-drop support, ToolTalk
+   support, and support for embedding an Emacs widget inside another
+   application (where it can function as that other application's text-entry
+   area).  This code has not been extensively tested, and may (or may not)
+   have portability problems, but it's there for the adventurous.  Comments,
+   suggestions, bug reports, and especially fixes are welcome.  But have no
+   expectations that this experimental code will work at all.
+
+
+** Major Differences Between 19.6 and 19.8
+==========================================
+
+There were almost no differences between versions 19.6 and 19.7; version 19.7
+was a bug-fix release that was distributed with Energize 2.1.
+
+Lucid Emacs 19.8 represents the first stage of the Lucid Emacs/Epoch merger.
+The redisplay engine now in lemacs is an improved descendant of the Epoch
+redisplay.  As a result, many bugs have been eliminated, and several disabled
+features have been re-enabled.  Notably:
+
+Selective display (and outline-mode) work.
+
+Horizontally split windows work.
+
+The height of a line is the height of the tallest font displayed on that line;
+it is possible for a screen to display lines of differing heights. (Previously,
+the height of all lines was the height of the tallest font loaded.)
+
+There is lisp code to scale fonts up and down, for example, to load the next-
+taller version of a font.
+
+There is a new internal representation for lisp objects, giving emacs-lisp 28
+bit integers and a 28 bit address space, up from the previous maximum of 26.
+We expect eventually to increase this to 30 bit integers and a 32 bit address
+space, eliminating the need for DATA_SEG_BITS on some architectures.  (On 64
+bit machines, add 32 to all of these numbers.)
+
+GC performance is improved.
+
+Various X objects (fonts, colors, cursors, pixmaps) are accessible as first-
+class lisp objects, with finalization.
+
+An alternate interface to embedding images in the text is provided, called
+"annotations."  You may create an "annotation margin" which is whitespace at
+the left side of the screen that contains only annotations, not buffer text.
+
+When using XPM files, one can specify the values of logical color names to be
+used when loading the files.
+
+It is possible to resize windows by dragging their modelines up and down.  More
+generally, it is possible to add bindings for mouse gestures on the modelines.
+
+There is support for playing sound files on HP machines.
+
+ILISP version 5.5 is included.
+
+The Common Lisp #' read syntax is supported (#' is to "function" as ' is to
+"quote".)
+
+The `active-p' slot of menu items is now evaluated, so one can put arbitrary
+lisp code in a menu to decide whether that item should be selectable, rather
+than doing this with an `activate-menubar-hook'.
+
+The X resource hierarchy has changed slightly, to be more consistent.  It used
+to be
+        argv[0]                 SCREEN-NAME     pane    screen
+        ApplicationShell        EmacsShell      Paned   EmacsFrame
+
+   now it is
+
+        argv[0]                 shell           pane    SCREEN-NAME
+        ApplicationShell        EmacsShell      Paned   EmacsFrame
+
+The Lucid Emacs sources have been largely merged with FSF version 19; this
+means that the lisp library contains the most recent releases of various
+packages, and many new features of FSF 19 have been incorporated.
+
+Because of this, the lemacs sources should also be substantially more portable.
+
+
+** Major Differences Between 19.4 and 19.6
+==========================================
+
+There were almost no differences between versions 19.4 and 19.5; we fixed
+a few minor bugs and repacked 19.4 as 19.5 for a CD-ROM that we gave away
+as a trade show promotion.
+
+The primary goal of the 19.6 release is stability, rather than improved
+functionality, so there aren't many user-visible changes.  The most notable
+changes are:
+
+ - The -geometry command-line option now correctly overrides geometry
+   specifications in the resource database.
+ - The `width' and `height' screen-parameters work.
+ - Font-lock-mode considers the comment start and end characters to be
+   a part of the comment.
+ - The lhilit package has been removed.  Use font-lock-mode instead.
+ - vm-isearch has been fixed to work with isearch-mode.
+ - new versions of ispell and calendar.
+ - sccs.el has menus.
+
+Lots of bugs were fixed, including the problem that lemacs occasionally
+grabbed the keyboard focus.
+
+Also, as of Lucid Emacs 19.6 and Energize 2.0 (shipping now) it is possible
+to compile the public release of Lucid Emacs with support for Energize; so
+now Energize users will be able to build their own Energize-aware versions
+of lemacs, and will be able to use newer versions of lemacs as they are
+released to the net.  (Of course, this is not behavior covered by your
+Energize support contract; you do it at your own risk.)
+
+I have not incorporated all portability patches that I have been sent since
+19.4; I will try to get to them soon.  However, if you need to make any
+changes to lemacs to get it to compile on your system, it would be quite
+helpful if you would send me context diffs (diff -c) against version 19.6.
+
+
+** Major Differences Between 19.3 and 19.4
+==========================================
+
+Prototypes have been added for all functions.  Emacs compiles in the strict
+ANSI modes of lcc and gcc, so portability should be vastly improved.
+
+Many many many many core leaks have been plugged, especially in screen
+creation and deletion.
+
+The float support reworked to be more portable and ANSI conformant.  This
+resulted in these new configuration parameters: HAVE_INVERSE_HYPERBOLIC,
+HAVE_CBRT, HAVE_RINT, FLOAT_CHECK_ERRNO, FLOAT_CATCH_SIGILL,
+FLOAT_CHECK_DOMAIN.  Let us know if you had to change the defaults on your
+architecture.
+
+The SunOS unexec has been rewritten, and now works with either static or
+dynamic libraries, depending on whether -Bstatic or -Bdynamic were specified
+at link-time.
+
+Small (character-sized) bitmaps can be mixed in with buffer text via the new
+functions set-extent-begin-glyph and set-extent-end-glyph.  (This is actually
+a piece of functionality that Energize has been using for a while, but we've
+just gotten around to making it possible to use it without Energize.  See how
+nice we are?  Go buy our product.)
+
+If compiled with Motif support, one can pop up dialog boxes from emacs lisp.
+We encourage someone to contribute Athena an version of this code; it
+shouldn't be much work.
+
+If dialog boxes are available, then y-or-n-p and yes-or-no-p use dialog boxes
+instead of the minibuffer if invoked as a result of a command that was
+executed from a menu instead of from the keyboard.
+
+Multiple screen support works better; check out doc of get-screen-for-buffer.
+
+The default binding of backspace is the same as delete.  (C-h is still help.)
+
+A middle click while the minibuffer is active does completion if you click on
+a highlighted completion, otherwise it executes the global binding of button2.
+
+New versions of Barry Warsaw's c++-mode and syntax.c.  Font-lock-mode works
+with C++ mode now.
+
+The semantics of activate-menubar-hook has changed; the functions are called
+with no arguments now.
+
+`truename' no longer hacks the automounter; use directory-abbrev-alist instead.
+
+Most minibuffer handling has been reimplemented in emacs-lisp.
+
+There is now a builtin minibuffer history mechanism which replaces gmhist.
+
+
+** Major Differences Between 19.2 and 19.3
+==========================================
+
+The ISO characters have correct case and syntax tables now, so the word-motion
+and case-converting commands work sensibly on them.
+
+If you set ctl-arrow to an integer, you can control exactly which characters
+are printable.  (There will be a less crufty way to do this eventually.)
+
+Menubars can now be buffer local; the function set-screen-menubar no longer
+exists.  Look at GNUS and VM for examples of how to do this, or read
+menubar.el.
+
+When emacs is reading from the minibuffer with completions, any completions
+which are visible on the screen will highlight when the mouse moves over them;
+clicking middle on a completion is the same as typing it at the minibuffer.
+Some implications of this:  The *Completions* buffer is always mousable.  If
+you're using the completion feature of find-tag, your source code will be
+mousable when you type M-.  Dired buffers will be mousable as soon as you
+type ^X^F.  And so on.
+
+The old isearch code has been replaced with a descendant of Dan LaLiberte's
+excellent isearch-mode; it is more customizable, and generally less bogus.
+You can search for "composed" characters.  There are new commands, too; see
+the doc for ^S, or the NEWS file.
+
+A patched GNUS 3.14 is included.
+
+The user's manual now documents Lucid Emacs 19.3.
+
+A few more modes have mouse and menu support.
+
+The startup code should be a little more robust, and give you more reasonable
+error messages when things aren't installed quite right (instead of the
+ubiquitous "cannot open DISPLAY"...)
+
+Subdirectories of the lisp directory whose names begin with a hyphen or dot
+are not automatically added to the load-path, so you can use this to avoid
+accidentally inflicting experimental software on your users.
+
+I've tried to incorporate all of the portability patches that were sent to
+me; I tried to solve some of the problems in different ways than the
+patches did, so let me know if I missed something.
+
+Some systems will need to define NEED_STRDUP, NEED_REALPATH, HAVE_DREM, or
+HAVE_REMAINDER in config.h.  Really this should be done in the appropriate
+s- or m- files, but I don't know which systems need these and which don't.
+If yours does, let me know which file it should be in.
+
+Check out these new packages:
+
+blink-paren.el: causes the matching parenthesis to flash on and off whenever
+                the cursor is sitting on a paren-syntax character.
+
+pending-del.el: Certain commands implicitly delete the highlighted region:
+                Typing a character when there is a highlighted region replaces
+                that region with the typed character.
+
+font-lock.el:   A code-highlighting package, driven off of syntax tables, so
+                that it understands block comments, strings, etc.  The
+                insertion hook is used to fontify text as you type it in.
+
+shell-font.el:  Displays your shell-buffer prompt in boldface.
+
diff --git a/etc/ORDERS b/etc/ORDERS
new file mode 100644 (file)
index 0000000..2f4b502
--- /dev/null
@@ -0,0 +1,4343 @@
+Note: this file describes how you order software from the Free Software
+Foundation directly.  Information on getting XEmacs can be found in
+the file DISTRIB.
+The actual order form follows the descriptions of media contents.
+
+Most of this file is excerpted from the January 1996 GNU's Bulletin.
+
+Please send suggestions for improvements to gnu@prep.ai.mit.edu or the postal
+address at the end of the order form.  Thank You.
+
+-----------------------------------------------------------------------------
+
+
+FSF Order Form with Descriptions                       January, 1996
+
+
+
+Free Software Foundation, Inc.         Telephone: +1-617-542-5942
+59 Temple Place - Suite 330            Fax: (including Japan) +1-617-542-2652
+Boston, MA   02111-1307          USA           Electronic mail: `gnu@prep.ai.mit.edu'
+
+
+-----------------------------------------------------------------------------
+
+
+
+There are some sections (e.g. ``Forthcoming GNUs'' and ``How to Get GNU
+Software'') which are not in this Order Form file.  If you wish to see them,
+ask gnu@prep.ai.mit.edu for the complete June, 1995 GNU's Bulletin.
+
+
+
+Table of Contents
+-----------------
+
+       Donations Translate Into Free Software
+       Cygnus Matches Donations!
+       Free Software Redistributors Donate
+       Help from Free Software Companies
+       Major Changes in GNU Software and Documentation
+       The Deluxe Distribution
+       GNU Documentation
+       GNU Software
+       Program/Package Cross Reference
+       Tapes
+          Languages Tape
+          Lisps and Emacs Tape
+          Utilities Tape
+          Scheme Tape
+          X11 Tapes
+          Berkeley 4.4BSD-Lite Tape
+          VMS Emacs and VMS Compiler Tapes
+       CD-ROMs
+          Pricing of the GNU CD-ROMs
+          December 1995 Compiler Tools Binaries CD-ROM
+          December 1994 Compiler Tools Binaries CD-ROM
+          December 1993 Compiler Tools Binaries CD-ROM
+          Source Code CD-ROMs
+             December 1995 Source Code CD-ROMs
+             June 1995 Source Code CD-ROM
+             May 1994 Source Code CD-ROM
+             November 1993 Source Code CD-ROM
+          MS-DOS Book with CD-ROM
+          Debian GNU/Linux Book with CD-ROM
+       MS-DOS Diskettes
+          DJGPP Diskettes
+          Emacs Diskettes
+          Selected Utilities Diskettes
+          Windows Diskette
+       Tape & CD-ROM Subscription Service
+       FSF T-shirt
+       Free Software Foundation Order Form
+
+
+-----------------------------------------------------------------------------
+
+
+
+Donations Translate Into Free Software
+**************************************
+
+If you appreciate Emacs, GNU CC, Ghostscript, and other free software, you
+may wish to help us make sure there is more in the future--remember,
+*donations translate into more free software!*
+
+Your donation to us is tax-deductible in the United States.  We gladly accept
+*any* currency, although the U.S. dollar is the most convenient.
+
+If your employer has a matching gifts program for charitable donations,
+please arrange to: add the FSF to the list of organizations for your
+employer's matching gifts program; and have your donation matched (note *Note
+Cygnus Matches Donations!::).  If you do not know, please ask your personnel
+department.
+
+Circle amount you are donating, cut out this form, and send it with your
+donation to:
+
+       Free Software Foundation, Inc.
+       59 Temple Place - Suite 330
+       Boston, MA  02111-1307
+       USA
+
+
+       $500     $250     $100     $50     Other $________
+
+       Other currency:________
+
+
+You can charge a donation to any of Carte Blanche, Diner's Club, JCB,
+MasterCard, Visa, or American Express. Charges may also be faxed to
++1-617-542-2652.
+
+       Card type: __________________  Expiration Date: _____________
+
+       Account Number: _____________________________________________
+
+       Cardholder's Signature: _____________________________________
+
+       Name: _______________________________________________________
+
+       Street Address: _____________________________________________
+
+       City/State/Province: ________________________________________
+
+       Zip Code/Postal Code/Country: _______________________________
+
+
+
+Cygnus Matches Donations!
+*************************
+
+To encourage cash donations to the Free Software Foundation, Cygnus Support
+will continue to contribute corporate funds to the FSF to accompany gifts by
+its employees, and by its customers and their employees.
+
+Donations payable to the Free Software Foundation should be sent by eligible
+persons to Cygnus Support, which will add its gifts and forward the total to
+the FSF each quarter.  The FSF will provide the contributor with a receipt to
+recognize the contribution (which is tax-deductible on U.S.  tax returns).
+For more information, please contact Cygnus:
+
+       Cygnus Support
+       1937 Landings Drive
+       Mountain View, CA   94043
+       USA
+
+       Telephone: 415-903-1400
+                  +1-800-Cygnus1 (-294-6871)
+       Fax:       415-903-0122
+       Electronic-Mail: `info@cygnus.com'
+       FTP: `ftp.cygnus.com'
+       WWW: `http://www.cygnus.com/'
+
+
+
+Free Software Redistributors Donate
+***********************************
+
+The SNOW 2.1 CD producers added the words "Includes $5 donation to the FSF"
+to the front of their CD.  Potential buyers will know just how much of the
+price is for the FSF & how much is for the redistributor.
+
+The Sun Users Group Deutschland & ASCII Corporation (Japan) have added
+donations to the FSF to the price of their next GNU software CD-ROMs.
+
+Austin Code Works, a free software redistributor, supports free software
+development by giving the FSF 20% of the selling price for the GNU software
+CDs they produce & sell.
+
+Walnut Creek CDROM & Info Magic, free software redistributors, are also
+giving us part of their selling price.
+
+TOHDO-SHA is donating 400 yen to the FSF for each copy of `The GNU Emacs Lisp
+Reference Manual, Japanese Edition' sold at bookstores in Japan.
+
+CQ Publishing made a large donation from the sales of their GAWK book in
+Japanese.
+
+In the long run, the success of free software depends on how much new free
+software people develop.  Free software distribution offers an opportunity to
+raise funds for such development in an ethical way.  These redistributors
+have made use of the opportunity.  Many others let it go to waste.
+
+You can help promote free software development by convincing for-a-fee
+redistributors to contribute--either by doing development themselves or by
+donating to development organizations (the FSF and others).
+
+The way to convince distributors to contribute is to demand and expect this
+of them.  This means choosing among distributors partly by how much they give
+to free software development.  Then you can show distributors they must
+compete to be the one who gives the most.
+
+To make this work, you must insist on numbers that you can compare, such as,
+"We will give ten dollars to the Foobar project for each disk sold." A vague
+commitment, such as "A portion of the profits is donated," doesn't give you a
+basis for comparison.  Even a precise fraction "of the profits from this
+disk" is not very meaningful, since creative accounting and unrelated
+business decisions can greatly alter what fraction of the sales price counts
+as profit.
+
+Also, press developers for firm information about what kind of development
+they do or support.  Some kinds make much more long-term difference than
+others.         For example, maintaining a separate version of a GNU program
+contributes very little; maintaining a program on behalf of the GNU Project
+contributes much.  Easy new ports contribute little, since someone else would
+surely do them; difficult ports such as adding a new CPU to the GNU compiler
+or Mach contribute more; major new features and programs contribute the most.
+
+By establishing the idea that supporting further development is "the proper
+thing to do" when distributing free software for a fee, we can assure a
+steady flow of resources for making more free software.
+
+
+
+Help from Free Software Companies
+*********************************
+
+When choosing a free software business, ask those you are considering how
+much they do to assist free software development, e.g., by contributing money
+to free software development or by writing free software improvements
+themselves for general use.  By basing your decision partially on this
+factor, you can help encourage those who profit from free software to
+contribute to its growth.
+
+Wingnut (SRA's special GNU support group) regularly donates a part of its
+income to the FSF to support the development of new GNU programs.  Listing
+them here is our way of thanking them. Wingnut has made a pledge to donate
+10% of their income to the FSF, and has purchased several Deluxe Distribution
+packages in Japan.  Also see *Note Cygnus Matches Donations!::.
+
+       Wingnut Project
+       Software Research Associates, Inc.
+       1-1-1 Hirakawa-cho, Chiyoda-ku
+       Tokyo 102, Japan
+
+       Phone:  (+81-3)3234-2611
+       Fax:    (+81-3)3942-5174
+       E-mail: `info-wingnut@sra.co.jp'
+       WWW: `http://www.sra.co.jp/public/sra/product/wingnut/'
+
+
+
+Major Changes in GNU Software and Documentation
+***********************************************
+
+   * A New FSF T-shirt!          (*Note FSF T-shirt::)
+
+     We have a new T-shirt.  This design was inspired by the cover of the
+     `GNU Emacs Lisp Reference Manual'.
+
+   * GNU Emacs 19.30   (*Note GNU Software::)
+
+     We have just released Emacs 19.30.         New features include support for menu
+     bars on text-only terminals, a total rewrite of GNUS, multiple frames on
+     Windows NT and Windows 95, & many others.
+
+   * New Programs on the Tapes  (*Note GNU Software::)
+
+     `gettext' is now on the *Note Languages Tape::.  Termutils & Midnight
+     Commander have been added to the *Note Utilities Tape::.  CLX has been
+     added to the *Note Lisps/Emacs Tape::.  Newer versions of many of our
+     programs & manuals have been placed on all the media we distribute.
+
+   * New Source Code CD!
+
+     We have just released the December 1995 Source Code CD-ROMs (Edition 7).
+     Due to increasing amounts of GNU Software, the Source Code CD is now a
+     two disc set--the price remains unchanged!         The new programs included
+     are: apache, CLX, Elisp archive, `ffcall', `gettext', GN, Gnans,
+     `gnuserv', Hyperbole, Midnight Commander, Oaklisp, SIPP, SNePS, Spinner,
+     W3, and `xgrabsc'.         *Note GNU Software::, for more information about
+     these packages.  Also on the CD-ROMs are full distributions of MIT X11R6
+     (both our Required & Optional distributions), MIT Scheme 7.3, Emacs
+     19.30, GCC 2.7.1, and current versions of all other GNU Software. For
+     more information, see *Note December 1995 Source Code CD-ROMs::.
+
+   * New Compiler Tools CD-ROM
+
+     We have a new edition of the Compiler Tools Binaries CD-ROM with updated
+     versions of much of its software. It contains executables of the GNU
+     compiler tools for some systems that don't normally come with a
+     compiler. This allows users of those systems to compile their own
+     software without having to buy a proprietary compiler.
+
+     We hope to include more systems with each update of this CD-ROM.  If you
+     can help build binaries for new systems or have one to suggest, please
+     contact us at either address on page 1.  For more information, see *Note
+     Compiler Tools Binaries CD-ROM::.
+
+   * New/Updated Manuals since Last Bulletin   (*Note Documentation::)
+
+     We have a new manual: `The GNU Emacs Lisp Reference Manual, Japanese
+     Edition' - the FSF would like to thank the team of over 30 Japanese who
+     did the translation.  These new editions include bug fixes and
+     additional information: `The GNU Emacs Lisp Reference Manual', `GNU
+     Make', `Bison', `Programming in Emacs Lisp: An Introduction', and `The
+     Termcap Manual'.
+
+   * Older FSF CD-ROMs Available at a Reduced Price
+
+     While supplies last, older versions of our CD-ROMs are available at a
+     reduced price.  Note that the newest version has bug fixes and
+     improvements that the older versions do not.  See the *note Free
+     Software Foundation Order Form::..
+
+   * GNU Software Works on MS-DOS   (Also *note GNU Software::.)
+
+     GNU Emacs 19 and many other GNU programs have been ported to MS-DOS for
+     i386/i486/Pentium machines.  We ship binaries & sources on the *Note
+     DJGPP Diskettes::; *Note Emacs Diskettes::; *Note Selected Utilities
+     Diskettes::; & the *Note Compiler Tools Binaries CD-ROM::.         We will ship
+     binaries & sources on the *Note MS-DOS Book with CD-ROM::, when it is
+     available.
+
+   * The FSF Takes Credit Cards
+
+     We take these credit cards: Carte Blanche, Diner's Club, MasterCard, JCB,
+     Visa, and American Express.  Please note that we are charged about 5% of
+     an order's total amount in credit card processing fees.  Please consider
+     paying by check instead or adding on a 5% donation to make up the
+     difference.
+
+
+
+The Deluxe Distribution
+***********************
+
+The Free Software Foundation has been asked repeatedly to create a package
+that provides executables for all of our software.  Normally we offer only
+sources.  In addition to providing binaries with the source code, the Deluxe
+Distribution includes a complete set of our printed manuals and reference
+cards.
+
+The FSF Deluxe Distribution contains the binaries and sources to hundreds of
+different programs including GNU Emacs, the GNU C Compiler, the GNU Debugger,
+the complete X Window System, and all the GNU utilities.
+
+We will make a Deluxe Distribution for most machines/operating systems.         We
+may be able to send someone to your office to do the compilation, if we can't
+find a suitable machine close to us.  However, we can only compile the
+programs that already support your chosen machine/system - porting is a
+separate matter (to commission a port, consult the GNU Service Directory;
+details in *Note Free Software Support::).  Compiling all these programs
+takes time; a Deluxe Distribution for an unusual machine will take longer to
+produce than one for a common machine. Please contact the FSF Office with
+any questions.
+
+We supply the software in one of these tape formats in Unix `tar' format:
+1600 or 6250bpi 1/2in reel, Sun DC300XLP 1/4in cartridge - QIC24, IBM RS/6000
+1/4in c.t. - QIC 150, Exabyte 8mm c.t., or DAT 4mm c.t.         If your computer
+cannot read any of these, please contact us to see if we can handle your
+format.
+
+The manuals included are one each of the `Bison', `Calc', `GAWK', `GNU C
+Compiler', `GNU C Library', `GDB', `Flex', `GNU Emacs Lisp Reference',
+`Programming in Emacs Lisp: An Introduction', `Make', `Texinfo', & `Termcap'
+manuals; six copies of the `GNU Emacs' manual; and a packet of ten reference
+cards each for Emacs, Bison, Calc, Flex, & GDB.
+
+Every Deluxe Distribution also has a copy of the latest editions of our
+CD-ROMs that have sources of our software & compiler tool binaries for some
+systems.  The MS-DOS CD is in ISO 9660 format. The other CDs are in ISO 9660
+format with Rock Ridge extensions.
+
+The price of the Deluxe Distribution is $5000 (shipping included).  These
+sales provide enormous financial assistance to help the FSF develop more free
+software.  To order, please fill out the "Deluxe Distribution" section on the
+*note Free Software Foundation Order Form::.  and send it to:
+
+       Free Software Foundation, Inc.
+       59 Temple Place - Suite 330
+       Boston, MA   02111-1307
+       USA
+
+       Telephone: +1-617-542-5942
+       Fax (including Japan): +1-617-542-2652
+       Electronic mail: gnu@prep.ai.mit.edu
+
+
+
+GNU Documentation
+*****************
+
+GNU is dedicated to having quality, easy-to-use online & printed
+documentation. GNU manuals are intended to explain underlying concepts,
+describe how to use all the features of each program, & give examples of
+command use.  GNU manuals are distributed as Texinfo source files, which
+yield both typeset hardcopy via the TeX document formatting system and online
+hypertext display via the menu-driven Info system.  Source for these manuals
+comes with our software; here are the manuals that we publish as printed
+books. See the *note Free Software Foundation Order Form::., to order them.
+
+Most GNU manuals are bound as soft cover books with "lay-flat" bindings.
+This allows you to open them so they lie flat on a table without creasing the
+binding.  They have an inner cloth spine and an outer cardboard cover that
+will not break or crease as an ordinary paperback will.         Currently, the
+`GDB', `Emacs', `Emacs Lisp Reference', `Programming in Emacs Lisp: An
+Introduction', `GAWK', `Make', `Bison', & `Texinfo' manuals have this
+binding.  The other GNU manuals also lie flat when opened, using a GBC or
+Wire-O binding.         All our manuals are 7in by 9.25in except the 8.5in by 11in
+`Calc' manual.
+
+The edition number of the manual and version number of the program listed
+after each manual's name were current at the time this Bulletin was published.
+
+`Debugging with GDB' (Edition 4.12 for Version 4.14) tells how to run your
+program under GNU Debugger control, examine and alter data, modify a
+program's flow of control, and use GDB through GNU Emacs.
+
+The `GNU Emacs Manual' (11th Edition for Version 19.29) describes editing with
+GNU Emacs.  It explains advanced features, including outline mode and regular
+expression search; how to use special programming modes to write languages
+like C++ and TeX; how to use the `tags' utility; how to compile and correct
+code; how to make your own keybindings; and other elementary customizations.
+
+`Programming in Emacs Lisp: An Introduction' (Edition 1.04) is for people who
+are not necessarily interested in programming, but who do want to customize
+or extend their computing environment. If you read it in Emacs under Info
+mode, you can run the sample programs directly.
+
+`The GNU Emacs Lisp Reference Manual' (Edition 2.4 for Version 19.29) and
+`The GNU Emacs Lisp Reference, Japanese Edition' (Japanese DRAFT Revision
+1.0, from English Edition 2.4 for Version 19.29) covers this programming
+language in depth, including data types, control structures, functions,
+macros, syntax tables, searching/matching, modes, windows, keymaps, byte
+compilation, and the operating system interface.
+
+`The GAWK Manual' (Edition 0.16 for Version 2.16) tells how to use the GNU
+implementation of `awk'.  It is written for those who have never used `awk'
+and describes the features of this powerful string and record manipulation
+language.
+
+The `Make Manual' (Edition 0.49 for Version 3.74) describes GNU `make', a
+program used to rebuild parts of other programs.  The manual tells how to
+write "makefiles", which specify how a program is to be compiled and how its
+files depend on each other.  Included are an introductory chapter for novice
+users and a section about automatically generated dependencies.
+
+The `Flex' manual (Edition 1.03 for Version 2.3.7) teaches you to write a
+lexical scanner definition for the `flex' program to create a C++ or C-coded
+scanner that recognizes the patterns defined.  You need no prior knowledge of
+scanners.
+
+The `Bison' manual (December 1993 Edition for Version 1.23) teaches you how
+to write context-free grammars for the Bison program that convert into
+C-coded parsers.  You need no prior knowledge of parser generators.
+
+`Using and Porting GNU CC' (September 1994 Edition for Version 2.6) tells how
+to run, install, and port the GNU C Compiler to new systems.  It lists new
+features and incompatibilities of GCC, but people not familiar with C will
+still need a good reference on the C programming language.  It also covers
+G++.  We are doing limited copier runs of this manual until it becomes more
+stable.
+
+The `Texinfo' manual (Edition 2.21 for Version 3) explains the markup
+language that produces our online Info documentation & typeset hardcopies.
+It tells you how to make tables, lists, chapters, nodes, indexes, cross
+references, & how to catch mistakes.  This second edition describes over 50
+new commands.
+
+`The Termcap Manual' (2nd Edition for Version 1.2), often described as "twice
+as much as you ever wanted to know about termcap," details the format of the
+termcap database, the definitions of terminal capabilities, and the process
+of interrogating a terminal description.  This manual is primarily for
+programmers.
+
+The `C Library Reference Manual' (Edition 0.06 for Version 1.09) describes
+the library's facilities, including both what Unix calls "library functions"
+& "system calls."  We are doing small copier runs of this manual until it
+becomes more stable.  Please send fixes to `bug-glibc-manual@prep.ai.mit.edu'.
+
+The `Emacs Calc Manual' (Edition 2.02 for Version 2.02) is both a tutorial
+and a reference manual.         It tells how to do ordinary arithmetic, how to use
+Calc for algebra, calculus, and other forms of mathematics, and how to extend
+Calc.
+
+
+
+GNU Software
+************
+
+All our software is available via FTP; see *Note How to Get GNU Software::.
+We also offer software on various media and printed documentation:
+
+   * *Note CD-ROMs::.
+
+   * *Note Tapes::.
+
+   * *Note MS-DOS Diskettes::.
+
+   * *Note Documentation::, which includes manuals and reference cards.
+
+In these articles describing the contents of each medium, the version number
+listed after each program name was current when we published this Bulletin.
+When you order a distribution tape, diskette, or newer CD-ROM, some of the
+programs may be newer and therefore the version number higher. See the *note
+Free Software Foundation Order Form::., for ordering information.
+
+Some of the contents of our tape and FTP distributions are compressed. We
+have software on our tapes and FTP sites to uncompress these files.  Due to
+patent troubles with `compress', we use another compression program, `gzip'.
+(Such prohibitions on software development are fought by the League for
+Programming Freedom; *note What Is the LPF::., for details.)
+
+GNU `make' is on several of our tapes because some system vendors supply no
+`make' utility at all and some native `make' programs lack the `VPATH'
+feature essential for using the GNU configure system to its full extent.  The
+GNU `make' sources have a shell script to build `make' itself on such systems.
+
+We welcome all bug reports and enhancements sent to the appropriate
+electronic mailing list (*note Free Software Support::.).
+
+
+
+Configuring GNU Software
+------------------------
+
+We are using, Autoconf, a uniform scheme for configuring GNU software
+packages in order to compile them (see "Autoconf" below, in this article).
+The goal is to have all GNU software support the same alternatives for naming
+machine and system types.
+
+Ultimately, it will be possible to configure and build the entire system all
+at once, eliminating the need to configure each individual package separately.
+
+You can also specify both the host and target system to build
+cross-compilation tools.  Most GNU programs now use Autoconf-generated
+configure scripts.
+
+
+
+GNU Software currently available
+--------------------------------
+
+For future programs and features, see *Note Forthcoming GNUs::.
+
+Key to cross reference:
+
+
+    BinCD
+         December 1994 Binaries CD-ROM
+
+    DjgpD
+         Djgpp Diskettes
+
+    DosBC
+         MS-DOS Book with CD-ROM
+
+    EmcsD
+         Emacs Diskettes
+
+    LangT
+         Languages Tape
+
+    LiteT
+         4.4BSD-Lite Tape
+
+    LspEmcT
+         Lisps/Emacs Tape
+
+    SchmT
+         Scheme Tape
+
+    SrcCD
+         December 1995 Source CD-ROMs
+
+    UtilD
+         Selected Utilities Diskettes
+
+    UtilT
+         Utilities Tape
+
+    VMSCmpT
+         VMS Compiler Tape
+
+    VMSEmcsT
+         VMS Emacs Tape
+
+    WdwsD
+         Windows Diskette
+
+    X11OptT
+         X11 Optional Tape
+
+    X11ReqT
+         X11 Required Tape
+
+[FSFman] shows that we sell a manual for that package. [FSFrc] shows we sell
+a reference card for that package.  To order them, see the *note Free
+Software Foundation Order Form::..  *Note Documentation::, for more
+information on the manuals.  Source code for each manual or reference card is
+included with each package.
+
+   * `acm'   (SrcCD, UtilT)
+
+     `acm' is a LAN-oriented, multiplayer aerial combat simulation that runs
+     under the X Window System.         Players engage in air to air combat against
+     one another using heat seeking missiles and cannons.  We are working on
+     a more accurate simulation of real airplane flight characteristics.
+
+   * apache   (SrcCD)
+
+     Apache is an HTTP server designed as a plug-in replacement for version
+     1.3 or 1.4 of the NCSA server.  It fixes numerous bugs in the NCSA
+     server and includes many frequently requested new features, and has an
+     API which allows it to be extended to meet users' needs more easily.
+
+   * Autoconf  (SrcCD, UtilT)
+
+     Autoconf produces shell scripts which automatically configure source code
+     packages. These scripts adapt the packages to many kinds of Unix-like
+     systems without manual user intervention. Autoconf creates a script for
+     a package from a template file which lists the operating system features
+     which the package can use, in the form of `m4' macro calls.  Autoconf
+     requires GNU `m4' to operate, but the resulting configure scripts it
+     generates do not.
+
+   * BASH   (SrcCD, UtilT)
+
+     GNU's shell, BASH (Bourne Again SHell), is compatible with the Unix `sh'
+     and offers many extensions found in `csh' and `ksh'.  BASH has job
+     control, `csh'-style command history, command-line editing (with Emacs
+     and `vi' modes built-in, and the ability to rebind keys) via the
+     `readline' library.  BASH conforms to the POSIX 1003.2-1992 standard.
+
+   * `bc'   (DosBC, SrcCD, UtilT)
+
+     `bc' is an interactive algebraic language with arbitrary precision
+     numbers.  GNU `bc' follows the POSIX 1003.2-1992 standard, with several
+     extensions including multi-character variable names, an `else'
+     statement, and full Boolean expressions.  The RPN calculator `dc' is now
+     distributed as part of the same package, but GNU `bc' is not implemented
+     as a `dc' preprocessor.
+
+   * BFD   (BinCD, DjgpD, DosBC, LangT, SrcCD)
+
+     The Binary File Descriptor library allows a program which operates on
+     object files (e.g., `ld' or GDB) to support many different formats in a
+     clean way.         BFD provides a portable interface, so that only BFD needs to
+     know the details of a particular format.  One result is that all
+     programs using BFD will support formats such as a.out, COFF, and ELF.
+     BFD comes with Texinfo source for a manual (not yet published on paper).
+
+     At present, BFD is not distributed separately; it is included with
+     packages that use it.
+
+   * Binutils  (BinCD, DjgpD, DosBC, LangT, SrcCD; `gas' only on VMSCmpT)
+
+     Binutils includes these programs: `ar', `c++filt', `demangle', `gas',
+     `gprof', `ld', `nlmconv', `nm', `objcopy', `objdump', `ranlib', `size',
+     `strings', & `strip'.
+
+     Binutils version 2 uses the BFD library.  The GNU assembler, `gas',
+     supports the a29k, Alpha, H8/300, H8/500, HP-PA, i386, i960, m68k, m88k,
+     MIPS, NS32K, SH, SPARC, Tahoe, Vax and Z8000 CPUs, and attempts to be
+     compatible with many other assemblers for UNIX and embedded systems.  It
+     can produce mixed C-and-assembly listings, and includes a macro facility
+     similar to that in some other assemblers. GNU's linker `ld' emits
+     source-line numbered error messages for multiply-defined symbols and
+     undefined references, and interprets a superset of AT&T's Linker Command
+     Language, which gives control over where segments are placed in memory.
+     `nlmconv' converts object files into Novell NetWare Loadable Modules.
+     `objdump' can disassemble code for most of the CPUs listed above, and
+     can display other data (e.g., symbols and relocations) from any file
+     format read by BFD.
+
+   * Bison   (BinCD,DjgpD,DosBC,LangT,SrcCD,VMSCmpT)[FSFman,FSFrc]
+
+     Bison is an upwardly compatible replacement for the parser generator
+     `yacc'.  Texinfo source for the `Bison Manual' and reference card are
+     included. *Note Documentation::.
+
+     A recent policy change allows non-free programs to use Bison-generated
+     parsers.  *Note Conditions for Using Bison::.
+
+   * C Library  (BinCD, LangT, SrcCD) [FSFman]
+
+     The GNU C library supports ANSI C-1989, POSIX 1003.1-1990 and most of the
+     functions in POSIX 1003.2-1992.  It is upwardly compatible with 4.4BSD
+     and includes many System V functions, plus GNU extensions.
+
+     The C Library performs many functions of the Unix system calls in the
+     GNU/Hurd. Mike Haertel has written a fast `malloc' which wastes less
+     memory than the old GNU version.  The GNU regular-expression functions
+     (`regex' and `rx') now nearly conform to the POSIX 1003.2 standard.
+
+     GNU `stdio' lets you define new kinds of streams, just by writing a few
+     C functions.  The `fmemopen' function uses this to open a stream on a
+     string, which can grow as necessary.  You can define your own `printf'
+     formats to use a C function you have written.  For example, you can
+     safely use format strings from user input to implement a `printf'-like
+     function for another programming language.         Extended `getopt' functions
+     are already used to parse options, including long options, in many GNU
+     utilities.
+
+     The C Library runs on Sun-3 (SunOS 4.1), Sun-4 (SunOS 4.1 or Solaris 2),
+     HP 9000/300 (4.3BSD), SONY News 800 (NewsOS 3 or 4), MIPS DECstation
+     (Ultrix 4), DEC Alpha (OSF/1), i386/i486/Pentium (System V, SVR4, BSD,
+     SCO 3.2, & SCO ODT 2.0), Sequent Symmetry i386 (Dynix 3), & SGI (Irix
+     4).  *Note Forthcoming GNUs::.  Texinfo source for the
+     `GNU C Library Reference Manual' is included (*note Documentation::..
+
+   * C++ Library   (BinCD, DjgpD, DosBC, LangT, SrcCD)
+
+     The GNU C++ library (libg++) contains an extensive collection of C++
+     "forest" classes, an IOStream library for input/output routines, and
+     support tools for use with G++.  Supported classes include: Obstacks,
+     multiple-precision Integers and Rationals, Complex numbers, arbitrary
+     length Strings, BitSets, and BitStrings.
+
+     The distribution also includes the libstdc++ library.  This implements
+     library facilities defined by the forthcoming ANSI/ISO C++ standard,
+     including a port of the Standard Template Library.
+
+   * Calc   (DosBC, LspEmcT, SrcCD) [FSFman, FSFrc]
+
+     Calc (written by Dave Gillespie in Emacs Lisp) is an extensible, advanced
+     desk calculator & mathematical tool that runs as part of GNU Emacs.  You
+     can use Calc just as a simple four-function calculator, but it has many
+     more features including: choice of algebraic or RPN (stack-based) entry;
+     logarithmic, trigonometric, & financial functions; arbitrary precision;
+     complex numbers; vectors; matrices; dates; times; infinities; sets;
+     algebraic simplification; differentiation & integration.  It outputs to
+     `gnuplot', & comes with source for a manual & reference card (*note
+     Documentation::.).
+
+   * `cfengine'          (SrcCD, UtilT)
+
+     `cfengine' is used for maintaining site-wide configuration of a
+     heterogeneous Unix network using a simple high level language.  Its
+     appearance is similar to `rdist', but also allows many more operations
+     to be performed automatically.  See Mark Burgess, "A Site Configuration
+     Engine", `Computing Systems', Vol. 8, No. 3 (ask `office@usenix.org' how
+     to get a copy).
+
+   * Chess   (SrcCD, UtilT, WdwsD)
+
+     GNU Chess enables most modern computers to play a full game of chess.  It
+     supports a plain terminal interface, a curses interface, and a spiffy X
+     Window interface via `xboard'.
+
+     Improvements this past year include fixes to the game analyzer, book, &
+     hash table; smartening up draw and mate; improved thinking on opponent's
+     time; Autoconf installation; a makefile for Windows NT compilation;
+     forward pruning; unlimited quiescence captures; improved evaluation;
+     improved null & time control logic; & repetition-detection.
+
+     GNU Chess was originated by Stuart Cracraft.  Improvements & rewrites are
+     from John Stanback, Cha Kong Sian, Mike McGann, and many others.
+
+     Send bugs to `bug-gnu-chess@prep.ai.mit.edu' & general comments to
+     `info-gnu-chess@prep.ai.mit.edu'.
+
+   * CLISP   (LspEmcT, SrcCD)
+
+     CLISP is a Common Lisp implementation by Bruno Haible and Michael Stoll.
+     It mostly supports the Lisp described by `Common LISP: The Language (2nd
+     edition)' and the ANSI Common Lisp standard.  CLISP includes an
+     interpreter, a byte-compiler, a large subset of CLOS, a foreign language
+     interface, and, for some machines, a screen editor.  The user interface
+     language (English, German, French) is choosable at run time.  Major
+     packages that run in CLISP include CLX & Garnet.  CLISP needs only 2 MB
+     of memory & runs on many microcomputers (including MS-DOS systems, OS/2,
+     Windows NT, Amiga 500-4000, Acorn RISC PC) & Unix-like systems
+     (GNU/Linux, Sun4, SVR4, SGI, HP-UX, DEC Alpha, NeXTStep, & others).
+
+   * Common Lisp   **Note Forthcoming GNUs::*  (LspEmcT, SrcCD)
+
+     GNU Common Lisp (GCL, formerly known as Kyoto Common Lisp) is a compiler
+     & interpreter for Common Lisp.  GCL is very portable & extremely
+     efficient on a wide class of applications, & compares favorably in
+     performance with commercial Lisps on several large theorem-prover &
+     symbolic algebra systems. GCL supports the CLtL1 specification but is
+     moving towards the proposed ANSI standard.
+
+     GCL compiles to C & then uses the native optimizing C compiler (e.g.,
+     GCC).  A function with a fixed number of args & one value turns into a C
+     function of the same number of args, returning one value--so GCL is
+     maximally efficient on such calls.         Its conservative garbage collector
+     gives great freedom to the C compiler to put Lisp values in registers.
+     It has a source level Lisp debugger for interpreted code & displays
+     source code in an Emacs window.  Its profiler (based on the C profiling
+     tools) counts function calls & the time spent in each function.
+
+     There is now a built-in interface to the Tk widget system.         It runs in a
+     separate process, so users may monitor progress on Lisp computations or
+     interact with running computations via a windowing interface.
+
+     There is also an Xlib interface via C (xgcl-2).   CLX runs with GCL, as
+     does PCL (see "PCL" later in this article).  *Note Forthcoming GNUs::,
+     for plans regarding GCL or for recent developments.
+
+     GCL version 2.2 is released under the GNU Library General Public License.
+
+   * CLX   (LspEmcT, SrcCD)
+
+     CLX is an X Window interface library for GCL.
+
+   * `cpio'   (DosBC, SrcCD, UtilD, UtilT)
+
+     `cpio' is an archive program with all the features of SVR4 `cpio',
+     including support for the final POSIX 1003.1 `ustar' standard.  `mt', a
+     program to position magnetic tapes, is included with `cpio'.
+
+   * CVS   (SrcCD, UtilT)
+
+     CVS, the Concurrent Version System, manages software revision & release
+     control at a multi-developer, multi-directory, multi-group site.  It
+     works best with RCS versions 4 and above, but will parse older RCS
+     formats, losing some of CVS's fancier features.  (See Berliner, Brian,
+     "CVS-II: Parallelizing Software Development," `Proceedings of the Winter
+     1990 USENIX Association Conference'; ask `office@usenix.org' how to get
+     a copy.)
+
+   * DejaGnu   (LangT, SrcCD)
+
+     DejaGnu is a framework to test programs with a single front end for all
+     tests.  The framework's flexibility & consistency makes it easy to write
+     tests.
+
+     DejaGnu comes with `expect', which runs scripts to conduct dialogs with
+     programs.
+
+   * Diffutils  (DjgpD, DosBC, SrcCD, UtilT)
+
+     GNU `diff' compares files showing line-by-line changes in several
+     flexible formats. It is much faster than traditional Unix versions.  The
+     Diffutils package contains `diff', `diff3', `sdiff', & `cmp'.  Recent
+     improvements include more consistent handling of character sets and a
+     new `diff' option to do all input/output in binary; this is useful on
+     some non-POSIX hosts.  Plans for the Diffutils package include support
+     for internationalization (e.g., error messages in Chinese) and for some
+     non-Unix PC environments.
+
+   * DJGPP   (BinCD, DjgpD, DosBC)
+
+     DJ Delorie has ported GCC/G++ (see "GCC" in this article) to i386s
+     running MS-DOS.  DJGPP has a 32-bit i386 DOS extender with a symbolic
+     debugger; development libraries; & ports of Bison, `flex', & Binutils.
+     Full source code is provided.  It needs at least 5MB of hard disk space
+     to install & 512K of RAM to use.  It supports SVGA (up to 1024x768), XMS
+     & VDISK memory allocation, `himem.sys', VCPI (e.g., QEMM, DESQview, &
+     386MAX), & DPMI (e.g., Windows 3.x, OS/2, QEMM, & QDPMI).
+
+     The FSF offers it on the *Note Compiler Tools Binaries CD-ROM::, and on
+     the *Note DJGPP Diskettes::.  FTP from `oak.oakland.edu' in
+     `/simtel/vendors/djgpp/' (or another SimTel mirror site).
+
+     To join a DJGPP users mailing list, ask
+     `djgpp-request@sun.soe.clarkson.edu'.
+
+   * `dld'   (LangT, SrcCD)
+
+     `dld' is a dynamic linker written by W. Wilson Ho.         Linking your program
+     with the `dld' library allows you to dynamically load object files into
+     the running binary.  Currently supported are VAX (Ultrix), Sun 3 (SunOS
+     3.4 & 4.0), SPARC (SunOS 4.0), Sequent Symmetry (Dynix), & Atari ST.
+
+   * `doschk'  (DosBC, SrcCD, UtilT)
+
+     This program is a utility to help software developers ensure that their
+     source file names are distinguishable on System V platforms with
+     14-character filenames and on MS-DOS systems with 8+3 character
+     filenames.
+
+   * `ecc'   (LangT, SrcCD)
+
+     `ecc' is a Reed-Solomon error correction checking program, which can
+     correct three byte errors in a block of 255 bytes and detect more severe
+     errors.  Contact `paulf@stanford.edu' for more information.
+
+   * `ed'   (SrcCD, UtilT)
+
+     `ed' is the standard text editor. It is line-oriented and can be used
+     interactively or in scripts.
+
+   * Elib   (DosBC, LspEmcT, SrcCD)
+
+     Elib is a small library of Emacs Lisp functions, including routines for
+     using AVL trees and doubly-linked lists.
+
+   * Elisp archive   (SrcCD)
+
+     This is a snapshot of Ohio State's GNU Emacs Lisp FTP Archive.  FTP it
+     from `archive.cis.ohio-state.edu' in `/pub/gnu/emacs/elisp-archive'.
+
+   * Emacs   **Note Forthcoming GNUs:: for future plans.*
+
+     In 1975, Richard Stallman developed the first Emacs, an extensible,
+     customizable real-time display editor & computing environment.  GNU Emacs
+     is his second implementation.  It offers true Lisp--smoothly integrated
+     into the editor--for writing extensions & provides an interface to the X
+     Window System.  It runs on Unix, MS-DOS, & Windows NT.  In addition to
+     its powerful native command set, Emacs has extensions which emulate the
+     editors vi & EDT (Digital's VMS editor).  Emacs has many other features
+     which make it a full computing support environment.  Source for the `GNU
+     Emacs Manual' & a reference card comes with the software. Sources for
+     the `GNU Emacs Lisp Reference Manual' & `Programming in Emacs Lisp: An
+     Introduction' are distributed in separate packages.  *Note
+     Documentation::.
+
+   * Emacs 18  (LspEmcT, SrcCD, VMSEmcsT) [FSFrc]
+
+     Emacs 18.59 is the last release of version 18 from the FSF.  We no longer
+     maintain it.  It supports these Unix systems that Emacs 19 doesn't
+     support (please help port Emacs 19 to these systems): Alliant FX/80,
+     Altos 3068, Amdahl (UTS), AT&T (3Bs & 7300 PC), CCI 5/32 & 6/32,
+     Celerity, Digital (VAX VMS), Dual, Encore (APC, DPC, & XPC), HLH Orion
+     (original & 1/05), ISI (Optimum V, 80386), Masscomp, NCR Tower 32 (SVR2
+     & SVR3), Nixdorf Targon 31, Nu (TI & LMI), pfa50, Plexus, Prime EXL,
+     Stride (system rel. 2), Tahoe, Tandem Integrity S2, Tektronix 16000,
+     Triton 88, Ustation E30 (SS5E), Whitechapel (MG1), & Wicat.
+
+   * Emacs 19  (DosBC, EmcsD, LspEmcT, SrcCD) [FSFman(s), FSFrc]
+
+     Emacs 19 works with character-only terminals & with the X Window System
+     (with or without an X toolkit).  New features in Emacs 19 include:
+     multiple X windows ("frames" to Emacs), with a separate X window for the
+     minibuffer or a minibuffer attached to each X window; property lists
+     associated with regions of text in a buffer; multiple fonts & colors
+     defined by those properties; simplified/improved processing of function
+     keys, mouse clicks, and mouse movement; X selection processing,
+     including clipboard selections; hooks to be run if the point or mouse
+     moves outside a certain range; menu bars and popup menus defined by
+     keymaps; scrollbars; before- and after-change hooks; a source-level
+     debugger for Emacs Lisp programs; floating point numbers; improved
+     buffer allocation, including returning storage to the system when a
+     buffer is killed; interfacing with the X resource manager; many updated
+     libraries; integrated support for version control systems (RCS, CVS, &
+     SCCS); Autoconf based configuration; and support for European character
+     sets.
+
+     Recent features include the ability to open frames on more than one X
+     display from a single Emacs job, operation on MS-DOS, MS Windows, and
+     Windows NT, displaying multiple views of an outline at the same time,
+     support for the Athena & Motif widgets, version control support for CVS
+     and for multiple branches, text properties for formatting text, commands
+     to edit text properties and save them in files, and GNU-standard
+     long-named command line options.
+
+     Emacs 19.30 works on: Acorn RISC (RISCiX); Alliant FX/2800 (BSD); Alpha
+     (OSF/1); Apollo (DomainOS); Bull DPX/2 2nn & 3nn (SysV.3) & sps7
+     (SysV.2); Clipper; Convex (BSD); Cubix QBx (SysV); Data General Aviion
+     (DGUX); DEC MIPS (Ultrix 4.2, OSF/1, not VMS); Elxsi 6400 (SysV); Gould
+     Power Node & NP1 (4.2 & 4.3BSD); Harris Night Hawk 1200, 3000, 4000 &
+     5000 (cxux); Honeywell XPS100 (SysV); HP 9000 series 200, 300, 700, 800
+     (but not 500) (4.3BSD; HP-UX 7, 8, 9); Intel i386/i486/Pentium
+     (GNU/Linux, 386BSD, AIX, BSDI/386, FreeBSD, Esix, ISC, MS-DOS (*note
+     MS-DOS Diskettes::., & *Note MS-DOS Book with CD-ROM::), NetBSD,
+     SCO3.2v4, Solaris, SysV, Xenix, WindowsNT); IBM RS/6000 (AIX 3.2) &
+     RT/PC (AIX, BSD); Motorola Delta 147 & 187 (SysV.3, SysV.4, m88kbcs);
+     National Semiconductor 32K (Genix); NeXT (BSD, Mach 2 w/ NeXTStep 3.0);
+     Paragon (OSF/1); Prime EXL (SysV); Pyramid (BSD); Sequent Symmetry (BSD,
+     ptx); Siemens RM400 & RM600 (SysV); SGI Iris 4D (Irix 4.x & 5.x); Sony
+     News/RISC (NewsOS); Stardent i860 (SysV); Sun 3 & 4, SPARC 1, 1+, 2, 10,
+     Classic (SunOS 4.0, 4.1, Solaris 2.0-2.3); Tadpole 68k (SysV); Tektronix
+     XD88 (SysV.3) & 4300 (BSD); & Titan P2 & P3 (SysV).
+
+     Other configurations supported by Emacs 18 should work with few changes
+     in Emacs 19; as users tell us more about their experiences with different
+     systems, we will augment the list.         Also see *Note Forthcoming GNUs::.
+
+   * `es'   (SrcCD, UtilT)
+
+     `es' is an extensible shell (based on `rc') with first class functions,
+     lexical scope, exceptions and rich return values (i.e., functions can
+     return values other than just numbers).  `es''s extensibility comes from
+     the ability to modify and extend the shell's built-in services, such as
+     path searching and redirection.  Like `rc', it is great for both
+     interactive use and scripting, particularly since its quoting rules are
+     much less baroque than the C and Bourne shells.
+
+   * `f2c'   (LangT, SrcCD)
+
+     `f2c' converts Fortran-77 source into C or C++, which can be compiled
+     with GCC or G++.  Get bug fixes by FTP from site `netlib.att.com' or by
+     email from `netlib@research.att.com'.  See the file
+     `/netlib/f2c/readme.Z' for a summary.  Also see the GNU Fortran item
+     later in this article, and in *Note Forthcoming GNUs::.
+
+   * `ffcall'  (SrcCD)
+
+     `ffcall' is a C library for implementing foreign function calls in
+     embedded interpreters by Bill Triggs and Bruno Haible.  It allows C
+     functions with arbitrary argument lists and return types to be called or
+     emulated (callbacks).
+
+   * Fileutils  (DosBC, SrcCD, UtilT)
+
+     The Fileutils work on files: `chgrp', `chmod', `chown', `cp', `dd', `df',
+     `dir', `du', `install', `ln', `ls', `mkdir', `mkfifo', `mknod', `mv',
+     `rm', `rmdir', `sync', `touch', & `vdir'.
+
+   * Findutils  (DosBC, SrcCD, UtilT)
+
+     `find' is frequently used both interactively and in shell scripts to
+     find files which match certain criteria and perform arbitrary operations
+     on them.  Also included are `locate', which scans a database for file
+     names that match a pattern, and `xargs', which applies a command to a
+     list of files.
+
+   * Finger   (SrcCD, UtilT)
+
+     GNU Finger has more features than other finger programs.  For sites with
+     many hosts, a single host may be designated as the finger "server" host
+     and other hosts at that site configured as finger "clients".  The server
+     host collects information about who is logged in on the clients.  To
+     finger a user at a GNU Finger site, a query to any of its client hosts
+     gets useful information.  GNU Finger supports many customization
+     features, including user output filters and site programmable output for
+     special target names.
+
+   * `flex'   (BinCD, DjgpD, DosBC, LangT, SrcCD, UtilD) [FSFman, FSFrc]
+
+     `flex' is a replacement for the `lex' scanner generator.  `flex' was
+     written by Vern Paxson of the Lawrence Berkeley Laboratory and generates
+     far more efficient scanners than `lex' does.  Sources for the `Flex
+     Manual' and reference card are included (*note Documentation::.).
+
+   * Fortran (`g77')   **Note Forthcoming GNUs::*   (LangT, SrcCD)
+
+     GNU Fortran (`g77'), developed by Craig Burley, is available for public
+     beta testing on the Internet.  For now, `g77' produces code that is
+     mostly object-compatible with `f2c' & uses the same run-time library
+     (`libf2c').
+
+   * Fontutils  (SrcCD, UtilT)
+
+     The Fontutils convert between font formats, create fonts for use with
+     Ghostscript or TeX (starting with a scanned type image & converting the
+     bitmaps to outlines), et al.  It includes: `bpltobzr', `bzrto',
+     `charspace', `fontconvert', `gsrenderfont', `imageto', `imgrotate',
+     `limn', & `xbfe'.
+
+   * GAWK   (DosBC, LangT, SrcCD) [FSFman]
+
+     GAWK is upwardly compatible with the latest POSIX specification of
+     `awk'.  It also provides several useful extensions not found in other
+     `awk' implementations.  Texinfo source for the `GAWK Manual' comes with
+     the software  (*note Documentation::.).
+
+   * GCC   (BinCD, DjgpD, DosBC, LangT, SrcCD, VMSCmpT) [FSFman]
+
+     Version 2 of the GNU C Compiler supports the languages C, C++, and
+     Objective-C; the source file name suffix or a compiler option selects
+     the language.  Objective-C support was donated by NeXT.  The runtime
+     support needed to run Objective-C programs is now distributed with GCC
+     (this does not include any Objective-C classes aside from `object', but
+     see "GNUStep" in *Note Forthcoming GNUs::).  As much as possible, G++ is
+     kept compatible with the evolving draft ANSI standard, but not with
+     `cfront' (AT&T's compiler), which has been diverging from ANSI.
+
+     The GNU C Compiler is a fairly portable optimizing compiler which
+     performs automatic register allocation, common sub-expression
+     elimination, invariant code motion from loops, induction variable
+     optimizations, constant propagation and copy propagation, delayed
+     popping of function call arguments, tail recursion elimination,
+     integration of inline functions and frame pointer elimination,
+     instruction scheduling, loop unrolling, filling of delay slots, leaf
+     function optimization, optimized multiplication by constants, a certain
+     amount of common subexpression elimination (CSE) between basic blocks
+     (though not all of the supported machine descriptions provide for
+     scheduling or delay slots), a feature for assigning attributes to
+     instructions, and many local optimizations that are automatically
+     deduced from the machine description.
+
+     GCC can open-code most arithmetic on 64-bit values (type `long long
+     int').  It supports extended floating point (type `long double') on the
+     68k; other machines will follow.
+
+     GCC supports full ANSI C, traditional C, & GNU C extensions (including:
+     nested functions support, nonlocal gotos, & taking the address of a
+     label).
+
+     GCC can generate a.out, COFF, ELF, & OSF-Rose files when used with a
+     suitable assembler.  It can produce debugging information in these
+     formats: BSD stabs, COFF, ECOFF, ECOFF with stabs, & DWARF.
+
+     GCC generates code for many CPUs, including the a29k, Alpha  ARM  AT&T
+     DSP1610 Clipper Convex cN Elxsi Fujitsu Gmicro i370, i860, i960,
+     MIL-STD-1750a, MIPS, ns32k, PDP-11, Pyramid, ROMP, RS/6000, SH, SPUR,
+     Tahoe, VAX, & we32k.  Position-independent code is generated for the
+     Clipper, Hitachi H8/300, HP-PA (1.0 & 1.1), i386/i486/Pentium, m68k,
+     m88k, SPARC, & SPARClite.
+
+     Operating systems supported include: GNU/Hurd, GNU/Linux, ACIS, AIX, AOS,
+     BSD, Clix, Concentrix, Ctix, DG/UX, Dynix, FreeBSD, Genix, HP-UX, Irix,
+     ISC, Luna, LynxOS, Minix, NetBSD, NewsOS, NeXTStep, OS/2, OSF, OSF-Rose,
+     RISCOS, SCO, Solaris 2, SunOS 4, System/370, SysV, Ultrix, Unos, VMS, &
+     Windows/NT.
+
+     Using the configuration scheme for GCC, building a cross-compiler is as
+     easy as building a native compiler.
+
+     Version 1 of GCC, G++, & libg++ are no longer maintained.
+
+     Texinfo source for the `Using and Porting GNU CC' manual, is included
+     with GCC (*note Documentation::.).
+
+     *Note Forthcoming GNUs::, for plans for later releases of GCC.
+
+   * GDB   (BinCD, DjgpD, DosBC, LangT, SrcCD) [FSFman, FSFrc]
+
+     GDB, the GNU DeBugger, is a source-level debugger for C, C++, & Fortran.
+
+     GDB can debug both C and C++ programs, and will work with executables
+     produced by many different compilers; however, C++ debugging will have
+     some limitations if you do not use GCC.
+
+     GDB has a command line user interface, and Emacs has a GDB mode.  Two X
+     interfaces (not distributed or maintained by the FSF) are: `gdbtk' (FTP
+     it from `ftp.cygnus.com' in directory `/pub/gdb'); and `xxgdb' (FTP it
+     from `ftp.x.org' in directory `/contrib/utilities').
+
+     Executable files and symbol tables are read via the BFD library, which
+     allows a single copy of GDB to debug programs with multiple object file
+     formats (e.g., a.out, COFF, ELF). Other features include a rich command
+     language, remote debugging over serial lines or TCP/IP, and watchpoints
+     (breakpoints triggered when the value of an expression changes).
+
+     GDB uses a standard remote interface to a simulator library which (so
+     far) has simulators for the Hitachi H8/300, H8/500, Super-H, & Zilog
+     Z8001/2.
+
+     GDB can perform cross-debugging.  To say that GDB "targets" a platform
+     means it can perform native or cross-debugging for it.  To say that GDB
+     can "host" a given platform means that it can be built on it, but cannot
+     necessarily debug native programs.
+
+     GDB can:
+
+       * "target" & "host": Amiga 3000 (Amix), DEC Alpha (OSF/1), DECstation
+         3100 & 5000 (Ultrix), HP 9000/300 (BSD, HP-UX), HP 9000/700 (HP-UX
+         9, 10), i386 (GNU/Hurd, GNU/Linux, BSD, FreeBSD, LynxOS, NetBSD,
+         SCO), IBM RS/6000 (AIX, LynxOS), Motorola Delta m88k (System V,
+         CX/UX), PC532 (NetBSD), Motorola m68k MVME-167 (LynxOS), NCR 3000
+         (SVR4), SGI (Irix V3, V4, V5), SONY News (NewsOS 3.x), SPARC
+         (LynxOS, NetBSD, Solaris, & SunOS 4.1 ) Sun-3 (SunOS 4.1), &
+         Ultracomputer (a29k running Sym1).
+
+       * "target", but not "host": AMD 29000 (COFF & a.out), Hitachi H8/300,
+         Hitachi SH, i386 (a.out, COFF, OS/9000), i960 (Nindy, VxWorks),
+         m68k/m68332 (a.out, COFF, VxWorks), MIPS (ELF, IDT ecoff), Fujitsu
+         SPARClite (a.out, COFF), & Z8000.
+
+       * "host", but not "target": IBM RT/PC (AIX), HP/Apollo 68k (BSD), &
+         Apple Macintosh (MacOS).
+
+     Sources for the manual, `Debugging with GDB', and a reference card are
+     included (*note Documentation::.).
+
+   * `gdbm'   (LangT, SrcCD, UtilD)
+
+     `gdbm' is the GNU replacement for the traditional `dbm' and `ndbm'
+     libraries.         It implements a database using quick lookup by hashing.
+     `gdbm' does not ordinarily make sparse files (unlike its Unix and BSD
+     counterparts).
+
+   * `gettext'  (LangT, SrcCD)
+
+     The GNU `gettext' tool set contains everything maintainers need to
+     internationalize a package for messages, tools that help translators
+     localize messages to their native language, once a package has been
+     internationalized.         *Note Help the GNU Translation Project::.
+
+   * Ghostscript   (DosBC, SrcCD, UtilT)
+
+     The GNU release of Ghostscript is an interpreter for the Postscript
+     graphics language (*note Forthcoming GNUs::., for future plans).
+
+     The current version of GNU Ghostscript is 2.6.2.  Features include the
+     ability to use the fonts provided by the platform on which Ghostscript
+     runs (X Window System & Microsoft (MS) Windows), resulting in much
+     better-looking screen displays; improved text file printing (like
+     `enscript'); a utility to extract the text from a Postscript language
+     document; a much more reliable (and faster) MS Windows implementation;
+     support for MS C/C++ 7.0; drivers for many new printers ( e.g. the
+     SPARCprinter), & for TIFF/F (Fax) file format; many more Postscript Level
+     2 facilities, including most of the color space facilities (but not
+     patterns); & the ability to switch between Level 1 & Level 2
+     dynamically.  Version 2.6.2 adds a LaserJet 4 driver & several important
+     bug fixes to version 2.6.1.
+
+     Ghostscript executes commands in the Postscript language by writing
+     directly to a printer, drawing on an X window, or writing to files for
+     printing later or manipulating with other graphics programs.
+
+     Ghostscript includes a C-callable graphics library (for client programs
+     that do not want to deal with the Postscript language).  It also supports
+     i386/i486/Pentiums running MS-DOS with EGA, VGA or SuperVGA graphics (but
+     please do *not* ask the FSF staff any questions about this; we do not
+     use MS-DOS).
+
+   * Ghostview  (DosBC, SrcCD, UtilT)
+
+     Tim Theisen, `ghostview@cs.wisc.edu', created Ghostview, a previewer for
+     multi-page files with an X Window interface.  Ghostview & Ghostscript
+     work together; Ghostview creates a viewing window & Ghostscript draws in
+     it.
+
+   * GIT   (SrcCD, UtilT)
+
+     GIT is a set of interactive tools: an extensible file system browser, an
+     ASCII/hex file viewer, a process viewer/killer, & other related
+     utilities & shell scripts.         It can be used to increase the speed &
+     efficiency of many daily tasks, such as copying & moving files &
+     directories, invoking editors, compressing/uncompressing files, creating
+     & expanding archives, compiling programs, sending mail, etc.  It looks
+     nice, has colors (if the standard ANSI color sequences are supported), &
+     is user-friendly.
+
+   * `gmp'    **Note Forthcoming GNUs::*   (LangT, SrcCD)
+
+     GNU `mp' is a library for arbitrary precision arithmetic on signed
+     integers and rational numbers.  It has a rich set of functions with a
+     regular interface.
+
+   * GN          (SrcCD)
+
+     GN is a gopher/HTTP server.  It recognizes whether the request came from
+     an HTTP (World Wide Web) or gopher client and responds accordingly.
+
+   * Gnans    (SrcCD)
+
+     Gnans is a program (and language) for the numerical study of
+     deterministic and stochastic dynamical systems.  The dynamical systems
+     may evolve in continuous or discrete time.         Gnans has graphical &
+     command line interfaces.
+
+   * GNATS   (SrcCD, UtilT)
+
+     GNATS (GNats: A Tracking System, not to be confused with GNAT, The GNU
+     Ada Translator) is a bug-tracking system. It is based upon the paradigm
+     of a central site or organization which receives problem reports and
+     negotiates their resolution by electronic mail.  Although it has been
+     used primarily as a software bug-tracking system so far, it is
+     sufficiently generalized that it could be used for handling system
+     administration issues, project management, or any number of other
+     applications.
+
+   * `gnuplot'  (SrcCD, UtilT, WdwsD)
+
+     `gnuplot' is an interactive program for plotting mathematical
+     expressions and data.  It plots both curves (2 dimensions) & surfaces (3
+     dimensions).  Curiously, it was neither written nor named for the GNU
+     Project; the name is a coincidence.  Various GNU programs use `gnuplot'.
+
+   * `gnuserv'  (LspEmcT, SrcCD)
+
+     `gnuserv' is a enhanced version of Emacs' `emacsclient' program.  It
+     lets the user direct a running Emacs to edit files or evaluate arbitrary
+     Emacs Lisp constructs from another process.
+
+   * GnuGo   (SrcCD, UtilT)
+
+     GnuGo plays the game of Go (Wei-Chi); version 1.2 was released with minor
+     changes for portability,  but it is not yet very sophisticated.
+
+   * `gperf'   (LangT, SrcCD)
+
+     `gperf' generates perfect hash tables.  The C version is in package
+     cperf.  The C++ version is in libg++.  Both produce hash functions in
+     either C or C++.
+
+   * Graphics  (SrcCD, UtilT)
+
+     GNU Graphics produces x-y plots from ASCII or binary data.         It outputs
+     in Postscript, Tektronix 4010 compatible, and Unix device-independent
+     "plot" formats.  It has a previewer for the X Window System.  Features
+     include a `spline' interpolation program; examples of shell scripts
+     using `graph' and `plot'; a statistics toolkit; and output in TekniCAD
+     TDA and ln03 file formats.         Email bugs or queries to Rich Murphey,
+     `Rich@lamprey.utmb.edu'.
+
+   * grep   (DosBC, SrcCD, UtilT)
+
+     This package has GNU `grep', `egrep', and `fgrep', which find lines that
+     match entered patterns.  They are much faster than the traditional Unix
+     versions.
+
+   * Groff   (DjgpD, DosBC, SrcCD, UtilT)
+
+     Groff is a document formatting system based on a device-independent
+     version of `troff' & includes: `eqn', `nroff', `pic', `refer', `tbl',
+     `troff'; the `man', `ms', & `mm' macros; & drivers for Postscript, TeX
+     `dvi' format, and typewriter-like devices.         Groff's `mm' macro package
+     is almost compatible with the DWB `mm' macros with several extensions.
+     Also included is a modified version of the Berkeley `me' macros and an
+     enhanced version of the X11 `xditview' previewer. A driver for the
+     LaserJet 4 series of printers is currently in test.  Written in C++,
+     these programs can be compiled with GNU C++ Version 2.5 or later.
+
+     Groff users are encouraged to contribute enhancements.  Most needed are
+     complete Texinfo documentation, a `grap' emulation (a `pic' preprocessor
+     for typesetting graphs), a page-makeup postprocessor similar to `pm'
+     (see `Computing Systems', Vol. 2, No. 2; ask `office@usenix.org' how to
+     get a copy), and an ASCII output class for `pic' to integrate `pic' with
+     Texinfo.  Questions and bug reports from users who have read the
+     documentation provided with Groff can be sent to
+     `bug-groff@prep.ai.mit.edu'.
+
+   * `gzip'   (DjgpD, DosBC, LangT, LspEmcT, SrcCD, UtilT)
+
+     `gzip' can expand LZW-compressed files but uses another, unpatented
+     algorithm for compression which generally produces better results.         It
+     also expands files compressed with System V's `pack' program.
+
+   * `hello'   (DosBC, SrcCD, UtilT)
+
+     The GNU `hello' program produces a familiar, friendly greeting.  It
+     allows non-programmers to use a classic computer science tool which would
+     otherwise be unavailable to them. Because it is protected by the GNU
+     General Public License, users are free to share and change it.  `hello'
+     is also a good example of a program that meets the GNU coding standards.
+
+     Like any truly useful program, `hello' contains a built-in mail reader.
+
+   * `hp2xx'   (SrcCD, UtilT)
+
+     GNU `hp2xx' reads HP-GL files, decomposes all drawing commands into
+     elementary vectors, and converts them into a variety of vector and raster
+     output formats.  It is also an HP-GL previewer.  Currently supported
+     vector formats include encapsulated Postscript, Uniplex RGIP, Metafont,
+     various special TeX-related formats, and simplified HP-GL (line drawing
+     only) for imports.         Raster formats supported include IMG, PBM, PCX, &
+     HP-PCL (including Deskjet & DJ5xxC support).  Previewers work under X11
+     (Unix), OS/2 (PM & full screen), & MS-DOS (SVGA, VGA, & HGC).
+
+   * HylaFAX   (SrcCD, UtilT)
+
+     HylaFAX (once named FlexFAX) is a facsimile system for Unix systems.  It
+     supports sending, receiving, & polled retrieval of facsimile, as well as
+     transparent shared data use of the modem.
+
+     Details are available on the World Wide Web at:
+     `http://www.vix.com/hylafax/'.
+
+   * Hyperbole  (LspEmcT, SrcCD)
+
+     Hyperbole, written by Bob Weiner in Emacs Lisp, is an open, efficient,
+     programmable information management & hypertext system, intended for
+     everyday work on any platform supported by Emacs.
+
+   * `indent'  (DosBC, LangT, SrcCD, UtilD)
+
+     GNU `indent' formats C source code into the GNU indentation style.         It
+     also has options to output BSD, K&R, or your own special style.  GNU
+     `indent' is more robust & provides more functionality than other such
+     programs, including handling C++ comments.         It runs on a number of
+     systems, including DOS & VMS.
+
+     The next version will also format C++ source code.
+
+   * Ispell   (DosBC, SrcCD, UtilT)
+
+     Ispell is an interactive spell checker that suggests "near misses" to
+     replace unrecognized words.  System & user-maintained dictionaries for
+     multiple languages can be used.  Standalone & Emacs interfaces are
+     available.
+
+     Previously, the FSF had its own version of Ispell ("Ispell 4.0"), but
+     has dropped it for a parallel branch that has had more development
+     ("Ispell 3.1").  (Ispell 3 was an earlier release by the original Ispell
+     author, but others have since made it more sophisticated.)
+
+   * JACAL   *Not available from the FSF except by FTP*
+
+     JACAL is a symbolic mathematics system for the manipulation and
+     simplification of algebraic equations and expressions.  New in JACAL is
+     multivariate factoring from Michael Thomas `(mjt@octavia.anu.edu.au)'.
+     See JACAL's documentation at `http://www-swiss.ai.mit.edu/~jaffer/'.
+
+     JACAL is written in Scheme using the SLIB portable Scheme Library.         It
+     comes with SCM, an IEEE P1178 & R4RS compliant version of Scheme written
+     in C.  SCM runs on Amiga, Atari-ST, MS-DOS, OS/2, NOS/VE, Unicos, VMS,
+     Unix, & similar systems.
+
+     The FSF is not distributing JACAL on any physical media.  To get an IBM
+     PC floppy disk with the freely redistributable source & executable
+     files, send $99.00 to:
+
+         Aubrey Jaffer
+         84 Pleasant Street
+         Wakefield, MA   01880-1846
+         USA
+
+   * `less'   (DosBC, SrcCD, UtilD, UtilT)
+
+     `less' is a display paginator similar to `more' and `pg', but with
+     various features (such as the ability to scroll backwards) that most
+     pagers lack.
+
+   * `m4'   (DosBC, SrcCD, UtilD, UtilT)
+
+     GNU `m4' is an implementation of the traditional Unix macro processor.
+     It is mostly SVR4 compatible, although it has some extensions (e.g.,
+     handling more than 9 positional parameters to macros).  `m4' also has
+     built-in functions for including files, running shell commands, doing
+     arithmetic, etc.
+
+   * `make' (BinCD,DjgpD,DosBC,LangT,LspEmcT,SrcCD,UtilD,UtilT)[FSFman]
+
+     GNU `make' supports POSIX 1003.2 and has all but a few obscure features
+     of the BSD and System V versions of `make'.  GNU extensions include long
+     options, parallel compilation, flexible implicit pattern rules,
+     conditional execution, & powerful text manipulation functions.  Texinfo
+     source for the `Make Manual' comes with the program (*note
+     Documentation::.).
+
+   * MandelSpawn   (SrcCD, UtilT)
+
+     A parallel Mandelbrot generation program for the X Window System.
+
+   * Midnight Commander (`mc')  (SrcCD, UtilT)
+
+     The Midnight Commander is a user friendly and colorful Unix file manager
+     and shell, useful to novice and guru alike.  It has a built-in virtual
+     file system that allows the user to manipulate files inside tar files
+     (both regular and compressed) or files on remote machines using the FTP
+     protocol.
+
+   * `mkisofs'  (SrcCD, UtilT)
+
+     `mkisofs' is a pre-mastering program to generate an ISO 9660 file system.
+     It takes a snapshot of a directory tree, and makes a binary image which
+     corresponds to an ISO 9660 file system when written to a block device.
+
+     It can also generate the System Use Sharing Protocol records of the Rock
+     Ridge Interchange Protocol (used to further describe the files in an ISO
+     9660 file system to a Unix host; it provides information such as longer
+     filenames, uid/gid, permissions, and device nodes).
+
+     Also included is `cdwrite', which can take an image from `mkisofs' and
+     write it to a Phillips CD recorder system attached to a GNU/Linux system.
+
+   * mtools   (SrcCD, UtilT)
+
+     mtools is a set of public domain programs to allow Unix systems to read,
+     write, and manipulate files on an MS-DOS file system (usually a
+     diskette).
+
+   * MULE   (DosBC, EmcsD, LspEmcT, SrcCD)
+
+     MULE is a MULtilingual Enhancement to GNU Emacs.  MULE text buffers can
+     contain a mix of characters from many languages including: Japanese,
+     Chinese, Korean, Vietnamese, Thai, modern European languages (including
+     Greek & Russian), Arabic, & Hebrew.  MULE also provides input methods
+     for all of them.  MULE is being merged into GNU Emacs.  *Note GNU &
+     Other Free Software in Japan::, for more information about MULE.
+
+   * `ncurses'  (LangT, SrcCD)
+
+     `ncurses' is an implementation of the Unix `curses' library for
+     developing screen based programs that are terminal independent.
+
+   * NetHack   (SrcCD, UtilT)
+
+     NetHack is a Rogue-like adventure game supporting character & X displays.
+
+   * NIH Class Library  (LangT, SrcCD)
+
+     The NIH Class Library (once known as "OOPS", Object-Oriented Program
+     Support) is a portable collection of C++ classes (similar to those in
+     Smalltalk-80) written in C++ by Keith Gorlen of the National Institutes
+     of Health (NIH).
+
+   * `nvi'   (SrcCD, UtilT)
+
+     `nvi' is a free implementation of the `vi'/`ex' Unix editor.  It has
+     most of the functionality of the original `vi'/`ex', except "open" mode
+     & the `lisp' option, which will be added. Enhancements over `vi'/`ex'
+     include split screens with multiple buffers, handling 8-bit data,
+     infinite file & line lengths, tag stacks, infinite undo, & extended
+     regular expressions.  It runs under GNU/Linux, BSD, NetBSD, FreeBSD,
+     BSDI, AIX, HP-UX, DGUX, IRIX, PSF, PTX, Solaris, SunOS, Ultrix, and
+     Unixware, & should port easily to other systems.
+
+   * Oaklisp   (SrcCD)
+
+     Oaklisp is a fast, portable, object-oriented Scheme with first class
+     types.
+
+   * Objective-C Library   **Note Forthcoming GNUs::*  (LangT, SrcCD)
+
+     Our Objective-C Class Library (`libobjects') has general-purpose,
+     non-graphical Objective-C objects written by Andrew McCallum & other
+     volunteers.  It includes collection classes for using groups of objects
+     & C types, I/O streams, coders for formatting objects & C types to
+     streams, ports for network packet transmission, distributed objects
+     (remote object messaging), string classes, exceptions, pseudo-random
+     number generators, & time handling facilities.  It also includes the
+     foundation classes for the GNUStep project; over 70 of them have already
+     been implemented. The library is known to work on i386/i486/Pentiums,
+     m68k, SPARC, MIPS, HPPA, & RS/6000.  Send queries & bug reports to
+     `mccallum@gnu.ai.mit.edu'.
+
+   * OBST   (LangT, SrcCD)
+
+     OBST is a persistent object management system with bindings to C++.
+     OBST supports incremental loading of methods.  Its graphical tools
+     require the X Window System.  It features a hands-on tutorial including
+     sample programs.  It compiles with G++, and should install easily on
+     most Unix platforms.
+
+   * Octave   (LangT, SrcCD)
+
+     Octave is a high-level language similar to MATLAB, primarily intended
+     for numerical computations.  It has a convenient command line interface
+     for solving linear & nonlinear problems numerically.
+
+     Octave does arithmetic for real and complex scalars and matrices, solves
+     sets of nonlinear algebraic equations, integrates systems of ordinary
+     differential & differential-algebraic equations, and integrates
+     functions over finite & infinite intervals.  Two- & three-dimensional
+     plotting is available using `gnuplot'.
+
+     Send queries and bug reports to: `bug-octave@bevo.che.wisc.edu'.
+
+     Texinfo source is included for a 220+ page Octave manual, not yet
+     published by the FSF.
+
+   * Oleo   (SrcCD, UtilT)
+
+     Oleo is a spreadsheet program (better for you than the more expensive
+     spreadsheets).  It supports the X Window System and character-based
+     terminals, and can output Embedded Postscript renditions of spreadsheets.
+     Keybindings should be familiar to Emacs users and are configurable.
+     Oleo supports multiple variable-width fonts when used under the X Window
+     System or outputting to Postscript devices.
+
+   * `p2c'   (LangT, SrcCD)
+
+     `p2c' is Dave Gillespie's Pascal-to-C translator. It inputs many
+     different dialects (HP, ISO, Turbo, VAX, et al.) and generates readable,
+     maintainable, portable C.
+
+   * `patch'   (DosBC, SrcCD, UtilT)
+
+     `patch' is our version of Larry Wall's program to take `diff''s output
+     and apply those differences to an original file to generate the modified
+     version.
+
+   * PCL   (LspEmcT, SrcCD)
+
+     PCL is a free implementation of a large subset of CLOS, the Common Lisp
+     Object System.  It runs under both GCL and CLISP, mentioned above.
+
+   * `perl'   (DosBC, LangT, SrcCD)
+
+     Larry Wall's `perl' combines the features and capabilities of `sed',
+     `awk', `sh', and C.  It also provides interfaces to the Unix system
+     calls and many C library routines.
+
+   * `pine'   (SrcCD, UtilT)
+
+     `pine' is a friendly menu-driven electronic mail manager and user
+     interface .
+
+   * `ptx'    **Note Forthcoming GNUs::*   (SrcCD, UtilD, UtilT)
+
+     GNU `ptx' is our version of the traditional permuted index generator.
+     It handles multiple input files at once, produces TeX compatible output,
+     and generates readable "KWIC" (KeyWords In Context) indexes without
+     using `nroff'.
+
+     It does not yet handle input files that do not fit in memory all at once.
+
+   * `rc'   (SrcCD, UtilT)
+
+     `rc' is a shell that features a C-like syntax (much more so than `csh')
+     and far cleaner quoting rules than the C or Bourne shells.         It's
+     intended to be used interactively, but is also great for writing
+     scripts.  It inspired the shell `es'.
+
+   * RCS   (SrcCD, UtilD, UtilT)
+
+     RCS, the Revision Control System, is used for version control &
+     management of software projects.  Used with GNU `diff', RCS can handle
+     binary files (executables, object files, 8-bit data, etc).         RCS now
+     conforms to GNU configuration standards and to POSIX 1003.1b-1993.         Also
+     see the CVS item above.
+
+   * `recode'   **Note Forthcoming GNUs::*   (SrcCD, UtilT)
+
+     GNU `recode' converts files between character sets and usages.  When
+     exact transliterations are not possible, it may delete the offending
+     characters or fall back on approximations.         This program recognizes or
+     outputs nearly 150 different character sets and is able to transliterate
+     files between almost any pair.  Most RFC 1345 character sets are
+     supported.
+
+   * `regex'   (LangT, SrcCD)
+
+     The GNU regular expression library supports POSIX.2, except for
+     internationalization features.  It is included in many GNU programs which
+     do regular expression matching & is available separately. An alternate
+     regular expression package, `rx', is faster than `regex' in most cases &
+     will replace `regex' over time.
+
+   * `rx'   (LangT, SrcCD)
+
+     Tom Lord has written `rx', a new regular expression library which is
+     faster than the older GNU `regex' library.         It is now being distributed
+     with `sed' and `tar'.  `rx' will be used in the next releases of `m4'
+     and `ptx'.
+
+   * SAOimage  (SrcCD, UtilT)
+
+     SAOimage is an X-based astronomical image viewer. It reads data images
+     and displays them with a pseudocolor colormap.  There is full interactive
+     control of the colormap, reading, and writing of colormaps, etc.
+
+   * Scheme   *For more information, see *Note Scheme Tape::*  (SrcCD, SchmT)
+
+   * `screen'  (SrcCD, UtilT)
+
+     `screen' is a terminal multiplexer that runs several separate "screens"
+     (ttys) on a single character-based terminal.  Each virtual terminal
+     emulates a DEC VT100 plus several ISO 2022 and ISO 6429 (ECMA 48, ANSI
+     X3.64) functions, including color.         Arbitrary keyboard input translation
+     is also supported.         `screen' sessions can be detached and resumed later
+     on a different terminal type.  Output in detached sessions is saved for
+     later viewing.
+
+   * `sed'   (DjgpD, DosBC, SrcCD, UtilD, UtilT)
+
+     `sed' is a stream-oriented version of `ed'.  It comes with the `rx'
+     library.
+
+   * Sharutils  (SrcCD, UtilT)
+
+     `shar' makes so-called shell archives out of many files, preparing them
+     for transmission by electronic mail services; `unshar' helps unpack
+     these shell archives after reception.  `uuencode' and `uudecode' are
+     POSIX compliant implementations of a pair of programs to transform files
+     into a format that can be safely transmitted across a 7-bit ASCII link.
+
+   * Shellutils          (DosBC, SrcCD, UtilT)
+
+     They are: `basename', `date', `dirname', `echo', `env', `expr', `false',
+     `groups', `hostname', `id', `logname', `nice', `nohup', `pathchk',
+     `printenv', `printf', `pwd', `sleep', `stty', `su', `tee', `test',
+     `true', `tty', `uname', `users', `who', `whoami', & `yes'.
+
+   * Shogi   (SrcCD, UtilT)
+
+     Shogi is a Japanese game similar to Chess; a major difference is that
+     captured pieces can be returned into play.
+
+     GNU Shogi is a variant of GNU Chess; it implements the same features &
+     similar heuristics.  As a new feature, sequences of partial board
+     patterns can be introduced to help the program play toward specific
+     opening patterns. It has both character and X display interfaces.
+
+     It is primarily supported by Matthias Mutz on behalf of the FSF.
+
+   * SIPP    (SrcCD)
+
+     SIPP is a library for creating photorealistic renderings of 3D scenes.
+     A scene is built up of objects which can be transformed with rotation,
+     translation, and scaling. The objects form hierarchies where each object
+     can have arbitrarily many subobjects and subsurfaces.  A surface is a
+     number of connected polygons which are rendered with either Phong,
+     Gouraud, or flat shading. The library supports programmable shaders and
+     texture mapping with textures in up to 3 dimensions and automatic
+     interpolation of texture coordinates.  A scene can be illuminated by an
+     arbitrary number of light sources.         The lights from some of them are
+     capable of casting shadows of objects.
+
+   * Smalltalk  *Also see *Note Forthcoming GNUs::*   (LangT,SrcCD)
+
+     GNU Smalltalk is an interpreted object-oriented programming language
+     system written in highly portable C.  It has been ported to many Unix,
+     DOS, & other OSes.         Features include a binary image save capability, the
+     ability to call user-written C code with parameters, an Emacs editing
+     mode, a version of the X protocol invocable from Smalltalk, optional
+     byte-code compilation and/or execution tracing, & automatically loaded
+     per-user initialization files.  It implements all of the classes &
+     protocol in the book "Smalltalk-80: The Language", except for the
+     graphic user interface (GUI) related classes.
+
+   * SNePS    (SrcCD)
+
+     SNePS is the Semantic Network Processing System.  It is an
+     implementation of a fully intensional theory of propositional knowledge
+     representation and reasoning.  SNePS runs under CLISP or GCL.
+
+   * Spinner   (SrcCD)
+
+     Spinner is a modularized, object oriented, non-forking World Wide Web
+     server with high performance and throughput.
+
+   * Superopt  (LangT, SrcCD)
+
+     Superopt is a function sequence generator that uses an exhaustive
+     generate-and-test approach to find the shortest instruction sequence for
+     a given function. You provide a function as input, a CPU to generate
+     code for, and how many instructions you want.  Its use in GCC is
+     described in the `ACM SIGPLAN PLDI'92 Proceedings'.  It supports: SPARC,
+     m68k, m68020, m88k, IBM POWER and PowerPC, AMD 29k, Intel x86 and 960,
+     Pyramid, DEC Alpha, Hitachi SH, & HP-PA.
+
+   * `tar'   (DosBC, SrcCD, UtilT)
+
+     GNU `tar' includes multi-volume support, the ability to archive sparse
+     files, compression/decompression, remote archives, and special features
+     that allow `tar' to be used for incremental and full backups.  GNU `tar'
+     uses an early draft of the POSIX 1003.1 `ustar' format which is
+     different from the final version. This will be corrected in the future.
+
+   * Termcap Library   (SrcCD, UtilT) [FSFman]
+
+     The GNU Termcap library is a drop-in replacement for `libtermcap.a' on
+     any system.  It does not place an arbitrary limit on the size of Termcap
+     entries, unlike most other Termcap libraries.  Included is source for the
+     `Termcap Manual' in Texinfo format (*note Documentation::.).
+
+   * Termutils  (SrcCD, UtilT)
+
+     The Termutils package contains programs for controlling terminals.
+     `tput' is a portable way for shell scripts to use special terminal
+     capabilities.  `tabs' is a program to set hardware terminal tab settings.
+
+   * TeX   (DosBC, SrcCD)
+
+     TeX is a document formatting system that handles complicated
+     typesetting, including mathematics.  It is GNU's standard text formatter.
+
+     The University of Washington maintains & supports a tape distribution of
+     TeX for Unix systems.  The core material is Karl Berry's `web2c' TeX
+     package.  Sources are available via anonymous ftp; retrieval
+     instructions are in `/pub/tex/unixtex.ftp' on `ftp.cs.umb.edu'.  If you
+     receive any installation support from the University of Washington,
+     consider sending them a donation.
+
+     To order a full distribution written in `tar' on either a 1/4inch
+     4-track QIC-24 cartridge or a 4mm DAT cartridge, send $210.00 to:
+
+         Pierre A. MacKay
+         Department of Classics
+         DH-10, Denny Hall 218
+         University of Washington
+         Seattle, WA   98195
+         USA
+
+         Electronic-Mail: `mackay@cs.washington.edu'
+         Telephone: +1-206-543-2268
+
+     Please make checks payable to: `University of Washington'.         Do not
+     specify any other payee.  That causes accounting problems.         Checks must
+     be in U.S. dollars, drawn on a U.S. bank. Only prepaid orders can be
+     handled.  Overseas sites: please add to the base cost $20.00 to ship via
+     air parcel post or $30.00 to ship via courier.  Please check with the
+     above for current prices & formats.
+
+   * Texinfo   (DjgpD,DosBC,LangT,LspEmcT,SrcCD,UtilD,UtilT)[FSFman]
+
+     Texinfo is a set of utilities (`makeinfo', `info', `texi2dvi',
+     `texindex', `tex2patch', & `fixfonts') which generate both printed
+     manuals & online hypertext documentation (called "Info"), & can read
+     online Info documents.  Version 3 has both Emacs Lisp & standalone
+     programs written in C or shell script.  Texinfo mode for Emacs enables
+     easy editing & updating of Texinfo files. Source for the `Texinfo
+     Manual' is included (*note Documentation::.).
+
+   * Textutils  (DosBC, SrcCD, UtilT)
+
+     The Textutils programs manipulate textual data.  They include: `cat',
+     `cksum', `comm', `csplit', `cut', `expand', `fmt', `fold', `head',
+     `join', `md5sum', `nl', `od', `paste', `pr', `sort', `split', `sum',
+     `tac', `tail', `tr', `unexpand', `uniq', and `wc'.
+
+   * Tile Forth          (LangT, SrcCD)
+
+     Tile Forth is a 32-bit implementation of the Forth-83 standard written
+     in C, allowing it to be easily ported to new systems and extended with
+     any C-function (graphics, windowing, etc).
+
+     Many documented Forth libraries are available, including ones for
+     top-down parsing, multi-threads, & object oriented programming.
+
+   * `time'   (SrcCD, UtilT)
+
+     `time' reports (usually from a shell) the user, system, & real time used
+     by a process.  On some systems it also reports memory usage, page
+     faults, etc.
+
+   * `ucblogo'  (LangT, SrcCD)
+
+     `ucblogo' implements the classic teaching language, Logo.
+
+   * UUCP   (SrcCD, UtilT)
+
+     GNU's UUCP system (written by Ian Lance Taylor) supports the `f', `g',
+     `v' (all window & packet sizes), `G', `t', `e', Zmodem, & two new
+     bidirectional (`i' & `j') protocols.  With a BSD sockets library, it can
+     make TCP connections.  With TLI libraries, it can make TLI connections.
+     Source is included for a manual (not yet published by the FSF).
+
+   * W3          (LspEmcT, SrcCD)
+
+     W3 (written by William Perry in Emacs Lisp) is an extensible, advanced
+     World Wide Web browser that runs as part of GNU Emacs.  It understands
+     many protocols: FTP, gopher, HTML, SMTP, Telnet, WAIS, et al.
+
+   * `wdiff'   (DosBC, SrcCD, UtilT)
+
+     `wdiff' is a front-end to GNU `diff'.  It compares two files, finding
+     the words deleted or added to the first to make the second.  It has many
+     output formats and works well with terminals and pagers.  `wdiff' is
+     very useful when two texts differ only by a few words and paragraphs
+     have been refilled.
+
+   * X11   *For details, see *Note X11 Tapes::*          (SrcCD, X11OptT, X11ReqT)
+
+   * `xboard', `xshogi'          (SrcCD, UtilT)
+
+     `xboard' is an X Window interface to GNU Chess.  `xshogi' is an X Window
+     interface to GNU Shogi.  They use the R4 Athena widgets and Xt
+     Intrinsics to provide an interactive referee for managing a game between
+     a user & a computer opponent, or between two computers.  You can also use
+     `xboard' without GNU Chess to play through games in files or to play
+     through games manually (force mode); in this case, moves aren't
+     validated.
+
+   * `xgrabsc'  (SrcCD)
+
+     `xgrabsc' is a screen capture program similar to `xwd' but providing
+     more ways of selecting the part of the screen to capture and different
+     types of output: Postscript, color Postscript, xwd, bitmap, pixmap, and
+     puzzle.
+
+   * `Ygl'   (SrcCD, UtilT)
+
+     `Ygl' emulates a subset of SGI's GL (Graphics Language) library under
+     X11 on GNU/Linux with XFree, AIX 3.2, ConvexOS, HP-UX, SunOS, et al.  It
+     has most two-dimensional graphics routines, the queue device & query
+     routines, double buffering, RGB mode with dithering, FORTRAN bindings,
+     at al.
+
+
+
+Program/Package Cross Reference
+*******************************
+
+Here is a list of what package each GNU program or library is in.  You can FTP
+the current list in the file `/pub/gnu/ProgramIndex' from a GNU FTP host
+(listed in *Note How to Get GNU Software::).
+
+       * a2p perl
+       * a2x xopt
+       * ac bsd44
+       * accton bsd44
+       * ackpfd phttpd
+       * acl bsd44
+       * acm acm
+       * acms acm
+       * addftinfo Groff
+       * adventure bsd44
+       * afm2tfm TeX
+       * amd bsd44
+       * ansitape bsd44
+       * AnswerGarden xopt
+       * apply bsd44
+       * appres xreq
+       * apropos bsd44
+       * ar Binutils
+       * arithmetic bsd44
+       * arp bsd44
+       * atc bsd44
+       * autoconf Autoconf
+       * autoheader Autoconf
+       * autoreconf Autoconf
+       * autoscan Autoconf
+       * autoupdate Autoconf
+       * auto_box xopt
+       * auto_box xreq
+
+       * b2m Emacs
+       * backgammon bsd44
+       * bad144 bsd44
+       * badsect bsd44
+       * banner bsd44
+       * basename Shellutils
+       * bash BASH
+       * battlestar bsd44
+       * bc bc
+       * bcd bsd44
+       * bdes bsd44
+       * bdftops Ghostscript
+       * beach_ball xopt
+       * beach_ball xreq
+       * beach_ball2 xopt
+       * bibtex TeX
+       * biff bsd44
+       * bison Bison
+       * bitmap xreq
+       * boggle bsd44
+       * bpltobzr Fontutils
+       * bugfiler bsd44
+       * buildhash Ispell
+       * bzrto Fontutils
+
+       * c++ GCC
+       * c++filt Binutils
+       * c2ph perl
+       * ca100 xopt
+       * caesar bsd44
+       * cal bsd44
+       * calendar bsd44
+       * canfield bsd44
+       * cat Textutils
+       * cbars wdiff
+       * cc GCC
+       * cc1 GCC
+       * cc1obj GCC
+       * cc1plus GCC
+       * cccp GCC
+       * cdwrite mkisofs
+       * cfengine cfengine
+       * cgi Spinner
+       * charspace Fontutils
+       * checknr bsd44
+       * chess bsd44
+       * chflags bsd44
+       * chgrp Fileutils
+       * ching bsd44
+       * chmod Fileutils
+       * chown Fileutils
+       * chpass bsd44
+       * chroot bsd44
+       * ci RCS
+       * cksum Textutils
+       * cktyps g77
+       * clisp CLISP
+       * clri bsd44
+       * cmail xboard
+       * cmmf TeX
+       * cmodext xopt
+       * cmp Diffutils
+       * co RCS
+       * col bsd44
+       * colcrt bsd44
+       * colrm bsd44
+       * column bsd44
+       * comm Textutils
+       * compress bsd44
+       * comsat bsd44
+       * connectd bsd44
+       * cp Fileutils
+       * cpicker xopt
+       * cpio cpio
+       * cpp GCC
+       * cppstdin perl
+       * cribbage bsd44
+       * crock xopt
+       * csh bsd44
+       * csplit Textutils
+       * ctags Emacs
+       * ctwm xopt
+       * cu UUCP
+       * cut Textutils
+       * cvs CVS
+       * cvscheck CVS
+       * cvtmail Emacs
+       * cxterm xopt
+
+       * d Fileutils
+       * date Shellutils
+       * dc bc
+       * dd Fileutils
+       * ddd DDD
+       * delatex TeX
+       * demangle Binutils
+       * descend CVS
+       * detex TeX
+       * df Fileutils
+       * dhtppd phttpd
+       * diff Diffutils
+       * diff3 Diffutils
+       * digest-doc Emacs
+       * dipress bsd44
+       * dir Fileutils
+       * dirname Shellutils
+       * dish xopt
+       * disklabel bsd44
+       * diskpart bsd44
+       * dld dld
+       * dm bsd44
+       * dmesg bsd44
+       * doschk doschk
+       * dox xopt
+       * du Fileutils
+       * dump bsd44
+       * dump mkisofs
+       * dumpfs bsd44
+       * dvi2tty TeX
+       * dvicopy TeX
+       * dvips TeX
+       * dvitype TeX
+
+       * ecc ecc
+       * echo Shellutils
+       * ed ed
+       * edit-pr GNATS
+       * editres xreq
+       * edquota bsd44
+       * eeprom bsd44
+       * egrep grep
+       * emacs Emacs
+       * emacsclient Emacs
+       * emacsserver Emacs
+       * emacstool Emacs
+       * emu xopt
+       * env Shellutils
+       * eqn Groff
+       * error bsd44
+       * es es
+       * esdebug es
+       * etags Emacs
+       * ex nvi
+       * expand Textutils
+       * expect DejaGnu
+       * expr Shellutils
+       * exterm xopt
+
+       * f2c f2c
+       * factor bsd44
+       * fakemail Emacs
+       * false Shellutils
+       * fastboot bsd44
+       * fax2ps HylaFAX
+       * faxalter HylaFAX
+       * faxanswer HylaFAX
+       * faxcover HylaFAX
+       * faxd HylaFAX
+       * faxd.recv HylaFAX
+       * faxmail HylaFAX
+       * faxquit HylaFAX
+       * faxrcvd HylaFAX
+       * faxrm HylaFAX
+       * faxstat HylaFAX
+       * fc f2c
+       * fdraw xopt
+       * ffe g77
+       * fgrep grep
+       * file bsd44
+       * find Findutils
+       * find2perl perl
+       * finger Finger
+       * fingerd Finger
+       * fish bsd44
+       * fixfonts Texinfo
+       * fixinc.svr4 GCC
+       * fixincludes GCC
+       * flex flex
+       * flex++ flex
+       * fmt bsd44
+       * fold Textutils
+       * font2c Ghostscript
+       * fontconvert Fontutils
+       * forth Tile Forth
+       * forthicon Tile Forth
+       * forthtool Tile Forth
+       * fortune bsd44
+       * fpr bsd44
+       * freq Ispell
+       * freqtbl Ispell
+       * from bsd44
+       * fsck bsd44
+       * fsplit bsd44
+       * fstat bsd44
+       * ftp bsd44
+       * ftpd bsd44
+
+       * g++ GCC
+       * gas Binutils
+       * gawk GAWK
+       * gcc GCC
+       * gcore bsd44
+       * gdb GDB
+       * genclass libg++
+       * gettext gettext
+       * getty bsd44
+       * gftodvi TeX
+       * gftopk TeX
+       * gftype TeX
+       * ghostview Ghostview
+       * git GIT
+       * gitaction GIT
+       * gitcmp GIT
+       * gitkeys GIT
+       * gitmatch GIT
+       * gitmount GIT
+       * gitps GIT
+       * gitredir GIT
+       * gitrgrep GIT
+       * gitview GIT
+       * gitwipe GIT
+       * gn GN
+       * gnans Gnans
+       * gnanslator Gnans
+       * gnats GNATS
+       * gnuchess Chess
+       * gnuchessc Chess
+       * gnuchessn Chess
+       * gnuchessr Chess
+       * gnuchessx Chess
+       * gnuclient gnuserv
+       * gnudoit gnuserv
+       * gnupdisp Shogi
+       * gnuplot gnuplot
+       * gnuplot_x11 gnuplot
+       * gnuserv gnuserv
+       * gnushogi Shogi
+       * gnushogir Shogi
+       * gnushogix Shogi
+       * go GnuGo
+       * gpc xopt
+       * gpc xreq
+       * gperf cperf
+       * gperf libg++
+       * gprof Binutils
+       * graph Graphics
+       * grep grep
+       * grodvi Groff
+       * groff Groff
+       * grops Groff
+       * grotty Groff
+       * groups Shellutils
+       * gs Ghostscript
+       * gsbj Ghostscript
+       * gsdj Ghostscript
+       * gslj Ghostscript
+       * gslp Ghostscript
+       * gsnd Ghostscript
+       * gsrenderfont Fontutils
+       * gunzip gzip
+       * gwm xopt
+       * gzexe gzip
+       * gzip gzip
+
+       * h2ph perl
+       * h2pl perl
+       * hack bsd44
+       * hangman bsd44
+       * head Textutils
+       * hello hello
+       * hexdump bsd44
+       * hexl Emacs
+       * hostname Shellutils
+       * hp2xx hp2xx
+       * hterm xopt
+       * htmlencode phttpd
+       * httpd apache
+       * httpdecode phttpd
+
+       * i18nOlwmV2 xopt
+       * i2mif xopt
+       * ico xopt
+       * ico xreq
+       * id Shellutils
+       * ident RCS
+       * ifconfig bsd44
+       * ifnames Autoconf
+       * ImageMagick xopt
+       * imageto Fontutils
+       * iman xopt
+       * imgrotate Fontutils
+       * indent indent
+       * indxbib Groff
+       * inetd bsd44
+       * info Texinfo
+       * inimf TeX
+       * init bsd44
+       * initex TeX
+       * inn bsd44
+       * install Fileutils
+       * iostat bsd44
+       * isodiag mkisofs
+       * isodump mkisofs
+       * ispell Ispell
+       * ixterm xopt
+       * ixx xopt
+
+       * join Textutils
+       * jot bsd44
+       * jove bsd44
+
+       * kdestroy bsd44
+       * kdump bsd44
+       * kermit bsd44
+       * kgames xopt
+       * kgmon bsd44
+       * kill bsd44
+       * kinit bsd44
+       * kinput2 xopt
+       * klist bsd44
+       * kpasswdd bsd44
+       * ksrvtgt bsd44
+       * kterm xopt
+       * ktrace bsd44
+
+       * lam bsd44
+       * larn bsd44
+       * lasergnu gnuplot
+       * last bsd44
+       * lastcomm bsd44
+       * latex TeX
+       * lclock xopt
+       * ld Binutils
+       * leave bsd44
+       * less less
+       * lesskey less
+       * libavcall.a ffcall
+       * libbfd.a Binutils
+       * libbfd.a GDB
+       * libbzr.a Fontutils
+       * libc.a C Library
+       * libcompat.a bsd44
+       * libcurses.a bsd44
+       * libcurses.a ncurses
+       * libdcurses.a ncurses
+       * libedit.a bsd44
+       * libF77.a f2c
+       * libF77.a g77
+       * libg++.a libg++
+       * libgdbm.a gdbm
+       * libgf.a Fontutils
+       * libgmp.a gmp
+       * libgnanslib Gnans
+       * libI77.a f2c
+       * libI77.a g77
+       * libkvm.a bsd44
+       * libm.a bsd44
+       * libncurses.a ncurses
+       * libnihcl.a NIHCL
+       * libnihclmi.a NIHCL
+       * libnihclvec.a NIHCL
+       * libnls.a xreq
+       * libobjects.a libobjects
+       * liboctave.a Octave
+       * liboldX.a xreq
+       * libpbm.a Fontutils
+       * libPEXt.a xopt
+       * libpk.a Fontutils
+       * libresolv.a bsd44
+       * librpc.a bsd44
+       * libsipp.a SIPP
+       * libtcl.a DejaGnu
+       * libtelnet.a bsd44
+       * libterm.a bsd44
+       * libtermcap.a Termcap
+       * libtfm.a Fontutils
+       * libutil.a bsd44
+       * libvacall.a ffcall
+       * libWc.a xopt
+       * libwidgets.a Fontutils
+       * libX.a xreq
+       * libXau.a xreq
+       * libXaw.a xreq
+       * libXcp.a xopt
+       * libXcu.a xopt
+       * libXdmcp.a xreq
+       * libXmp.a xopt
+       * libXmu.a xreq
+       * libXO.a xopt
+       * libXop.a xopt
+       * libXp.a xopt
+       * libXpex.a xopt
+       * libXt.a xopt
+       * libXt.a xreq
+       * libXwchar.a xopt
+       * liby.a bsd44
+       * libYgl.a Ygl
+       * limn Fontutils
+       * listres xopt
+       * listres xreq
+       * lkbib Groff
+       * ln Fileutils
+       * locate Findutils
+       * lock bsd44
+       * logcvt-ip2n phttpd
+       * logger bsd44
+       * login bsd44
+       * logname Shellutils
+       * logo ucblogo
+       * lookbib Groff
+       * lorder bsd44
+       * lpr bsd44
+       * ls Fileutils
+
+       * m4 m4
+       * mail bsd44
+       * mail-files Sharutils
+       * mailshar Sharutils
+       * make make
+       * make-docfile Emacs
+       * make-path Emacs
+       * makeindex TeX
+       * makeinfo Texinfo
+       * MakeTeXPK TeX
+       * man bsd44
+       * man-macros Groff
+       * mattrib mtools
+       * maze xopt
+       * maze xreq
+       * mazewar xopt
+       * mc mc
+       * mcd mtools
+       * mcopy mtools
+       * mcserv mc
+       * mdel mtools
+       * mdir mtools
+       * me-macros Groff
+       * merge RCS
+       * mesg bsd44
+       * mf TeX
+       * mformat mtools
+       * mft TeX
+       * mgdiff xopt
+       * mh bsd44
+       * mille bsd44
+       * mkcache GN
+       * mkdep bsd44
+       * mkdir Fileutils
+       * mkfifo Fileutils
+       * mkisofs mkisofs
+       * mklocale bsd44
+       * mkmanifest mtools
+       * mkmf bsd44
+       * mkmodules CVS
+       * mknod Fileutils
+       * mkstr bsd44
+       * mlabel mtools
+       * mm-macros Groff
+       * mmd mtools
+       * monop bsd44
+       * more bsd44
+       * morse bsd44
+       * mount bsd44
+       * mountd bsd44
+       * movemail Emacs
+       * mprof bsd44
+       * mrd mtools
+       * mread mtools
+       * mren mtools
+       * ms-macros Groff
+       * msgcmp gettext
+       * msgfmt gettext
+       * msgmerge gettext
+       * msgs bsd44
+       * msgunfmt gettext
+       * mst Smalltalk
+       * mt cpio
+       * mterm xopt
+       * mtree bsd44
+       * mtype mtools
+       * mule MULE
+       * muncher xopt
+       * mv Fileutils
+       * mvdir Fileutils
+       * mwrite mtools
+
+       * nethack NetHack
+       * netstat bsd44
+       * newfs bsd44
+       * nfsd bsd44
+       * nfsiod bsd44
+       * nfsstat bsd44
+       * nice Shellutils
+       * nl Textutils
+       * nlmconv Binutils
+       * nm Binutils
+       * nohup Shellutils
+       * notify HylaFAX
+       * nroff Groff
+       * number bsd44
+
+       * objc GCC
+       * objcopy Binutils
+       * objdump Binutils
+       * objective-c GCC
+       * obst-boot OBST
+       * obst-CC OBST
+       * obst-cct OBST
+       * obst-cgc OBST
+       * obst-cmp OBST
+       * obst-cnt OBST
+       * obst-cpcnt OBST
+       * obst-csz OBST
+       * obst-dir OBST
+       * obst-dmp OBST
+       * obst-gen OBST
+       * obst-gsh OBST
+       * obst-init OBST
+       * obst-scp OBST
+       * obst-sil OBST
+       * obst-stf OBST
+       * oclock xreq
+       * octave Octave
+       * od Textutils
+       * oleo Oleo
+       * ora-examples xopt
+
+       * p2c p2c
+       * pagesize bsd44
+       * palette xopt
+       * pascal bsd44
+       * passwd bsd44
+       * paste Textutils
+       * patch patch
+       * patgen TeX
+       * pathalias bsd44
+       * pathchk Shellutils
+       * pax bsd44
+       * pbmplus xopt
+       * perl perl
+       * pfbtops Groff
+       * phantasia bsd44
+       * phttpd phttpd
+       * pic Groff
+       * pico pine
+       * pig bsd44
+       * pine pine
+       * ping bsd44
+       * pixedit xopt
+       * pixmap xopt
+       * pktogf TeX
+       * pktype TeX
+       * plaid xopt
+       * plot2fig Graphics
+       * plot2plot Graphics
+       * plot2ps Graphics
+       * plot2tek Graphics
+       * pltotf TeX
+       * pollrcvd HylaFAX
+       * pom bsd44
+       * pooltype TeX
+       * portmap bsd44
+       * ppt bsd44
+       * pr Textutils
+       * pr-addr GNATS
+       * pr-edit GNATS
+       * primes bsd44
+       * printenv Shellutils
+       * printf Shellutils
+       * protoize GCC
+       * proxygarb Spinner
+       * ps bsd44
+       * ps2ascii Ghostscript
+       * ps2epsi Ghostscript
+       * ps2fax HylaFAX
+       * psbb Groff
+       * pstat bsd44
+       * psycho xopt
+       * ptester phttpd
+       * ptx ptx
+       * pubdic+ xopt
+       * puzzle xopt
+       * puzzle xreq
+       * pwd Shellutils
+       * pyramid xopt
+
+       * query-pr GNATS
+       * quiz bsd44
+       * quot bsd44
+       * quota bsd44
+       * quotacheck bsd44
+       * quotaon bsd44
+
+       * rain bsd44
+       * random bsd44
+       * ranlib Binutils
+       * rbootd bsd44
+       * rc rc
+       * rcp bsd44
+       * rcs RCS
+       * rcs-to-cvs CVS
+       * rcs2log Emacs
+       * rcsdiff RCS
+       * rcsfreeze RCS
+       * rcsmerge RCS
+       * rdist bsd44
+       * reboot bsd44
+       * recode recode
+       * recvstats HylaFAX
+       * red ed
+       * refer Groff
+       * remsync Sharutils
+       * renice bsd44
+       * repquota bsd44
+       * restore bsd44
+       * rev bsd44
+       * rexecd bsd44
+       * rlog RCS
+       * rlogin bsd44
+       * rlogind bsd44
+       * rm Fileutils
+       * rmail bsd44
+       * rmdir Fileutils
+       * rmt cpio
+       * rmt tar
+       * robots bsd44
+       * rogue bsd44
+       * route bsd44
+       * routed bsd44
+       * rr xopt
+       * rs bsd44
+       * rsh bsd44
+       * rshd bsd44
+       * runtest DejaGnu
+       * runtest.exp DejaGnu
+       * ruptime bsd44
+       * rwho bsd44
+       * rwhod bsd44
+
+       * s2p perl
+       * sail bsd44
+       * saoimage SAOimage
+       * savecore bsd44
+       * sc bsd44
+       * sccs bsd44
+       * sccs2rcs CVS
+       * scdisp xopt
+       * screen screen
+       * script bsd44
+       * scsiformat bsd44
+       * sctext xopt
+       * sdiff Diffutils
+       * sed sed
+       * send-pr GNATS
+       * sendfax HylaFAX
+       * sendmail bsd44
+       * sgi2fax HylaFAX
+       * sgn GN
+       * sh bsd44
+       * shar Sharutils
+       * shinbun xopt
+       * shogi Shogi
+       * showfont xopt
+       * showmount bsd44
+       * shutdown bsd44
+       * size Binutils
+       * sj3 xopt
+       * sjxa xopt
+       * slattach bsd44
+       * sleep Shellutils
+       * sliplogin bsd44
+       * snake bsd44
+       * snftobdf xopt
+       * soelim Groff
+       * sort Textutils
+       * sos2obst OBST
+       * spider xopt
+       * split Textutils
+       * startslip bsd44
+       * stf OBST
+       * strings Binutils
+       * strip Binutils
+       * stty Shellutils
+       * su Shellutils
+       * sum Textutils
+       * superopt Superopt
+       * swapon bsd44
+       * sync bsd44
+       * sysctl bsd44
+       * syslogd bsd44
+       * systat bsd44
+
+       * tabs Termutils
+       * tac Textutils
+       * tail Textutils
+       * taintperl perl
+       * talk bsd44
+       * talkd bsd44
+       * tangle TeX
+       * tar tar
+       * tbl Groff
+       * tcl DejaGnu
+       * tclsh DejaGnu
+       * tcopy bsd44
+       * tcp Emacs
+       * tee Shellutils
+       * tek2plot Graphics
+       * telnet bsd44
+       * telnetd bsd44
+       * test Shellutils
+       * test-g++ DejaGnu
+       * test-tool DejaGnu
+       * tetris bsd44
+       * tex TeX
+       * tex3patch Texinfo
+       * texi2dvi Texinfo
+       * texindex Texinfo
+       * texspell TeX
+       * textfmt HylaFAX
+       * tfmtodit Groff
+       * tftopl TeX
+       * tftp bsd44
+       * tftpd bsd44
+       * tgrind TeX
+       * time time
+       * timed bsd44
+       * timer Emacs
+       * timex xopt
+       * tip bsd44
+       * tkpostage xopt
+       * tn3270 bsd44
+       * touch Fileutils
+       * tput Termutils
+       * tr Textutils
+       * traceroute bsd44
+       * transcript HylaFAX
+       * transfig xopt
+       * trek bsd44
+       * trn3 bsd44
+       * troff Groff
+       * trpt bsd44
+       * trsp bsd44
+       * true Shellutils
+       * tset bsd44
+       * tsort bsd44
+       * tty Shellutils
+       * ttygnans Gnans
+       * tunefs bsd44
+       * tupdate gettext
+       * tvtwm xopt
+       * twm xreq
+
+       * ul bsd44
+       * ulpc Spinner
+       * umount bsd44
+       * uname Shellutils
+       * uncompress gzip
+       * unexpand Textutils
+       * unifdef bsd44
+       * unify wdiff
+       * uniq Textutils
+       * unprotoize GCC
+       * unshar Sharutils
+       * unvis bsd44
+       * update bsd44
+       * updatedb Findutils
+       * users Shellutils
+       * uuchk UUCP
+       * uucico UUCP
+       * uuconv UUCP
+       * uucp UUCP
+       * uucpd bsd44
+       * uudecode Sharutils
+       * uudir UUCP
+       * uuencode Sharutils
+       * uulog UUCP
+       * uuname UUCP
+       * uupick UUCP
+       * uurate UUCP
+       * uusched UUCP
+       * uustat UUCP
+       * uuto UUCP
+       * uux UUCP
+       * uuxqt UUCP
+
+       * v Fileutils
+       * vacation bsd44
+       * vandal xopt
+       * vcdiff Emacs
+       * vdir Fileutils
+       * vftovp TeX
+       * vgrind bsd44
+       * vi nvi
+       * viewres xopt
+       * viewres xreq
+       * vine xopt
+       * vipw bsd44
+       * virmf TeX
+       * virtex TeX
+       * vis bsd44
+       * vmstat bsd44
+       * vptovf TeX
+
+       * w bsd44
+       * waisgn GN
+       * wakeup Emacs
+       * wall bsd44
+       * wargames bsd44
+       * wc Textutils
+       * wdiff wdiff
+       * weave TeX
+       * what bsd44
+       * whatis bsd44
+       * whereis bsd44
+       * who Shellutils
+       * whoami Shellutils
+       * whois bsd44
+       * window bsd44
+       * winterp xopt
+       * wish DejaGnu
+       * worm bsd44
+       * worms bsd44
+       * write bsd44
+       * wump bsd44
+
+       * x11perf xreq
+       * x2p perl
+       * xalarm xopt
+       * xancur xopt
+       * xargs Findutils
+       * xauth xreq
+       * xbfe Fontutils
+       * xbiff xopt
+       * xbiff xreq
+       * xboard xboard
+       * xboing xopt
+       * xbuffy3 xopt
+       * xcalc xopt
+       * xcalc xreq
+       * xcalendar xopt
+       * xcdplayer xopt
+       * xcell xopt
+       * xclipboard xreq
+       * xclock xreq
+       * xcmdmenu xopt
+       * xcms xopt
+       * xcmsdb xreq
+       * xcmstest xreq
+       * xco xopt
+       * xcolorize xopt
+       * xcolors xopt
+       * xconsole xreq
+       * xcrtca xopt
+       * xdaliclock xopt
+       * xdiary xopt
+       * xditview Groff
+       * xditview xopt
+       * xditview xreq
+       * xdm xreq
+       * xdpyinfo xreq
+       * xdu xopt
+       * xdvi TeX
+       * xdvi xopt
+       * xdvorak xopt
+       * xearth xopt
+       * xed xopt
+       * xedit xopt
+       * xedit xreq
+       * xev xopt
+       * xev xreq
+       * xexit xopt
+       * xeyes xopt
+       * xeyes xreq
+       * xfd xreq
+       * xfed xopt
+       * xfedor xopt
+       * xfeoak xopt
+       * xferstats HylaFAX
+       * xfig xopt
+       * xfontsel xopt
+       * xfontsel xreq
+       * xforecast xopt
+       * xgas xopt
+       * xgas xreq
+       * xgc xopt
+       * xgc xreq
+       * xgettext gettext
+       * xhearts xopt
+       * xhelp xopt
+       * xhost xreq
+       * xinit xreq
+       * xkeycaps xopt
+       * xkill xreq
+       * xlax xopt
+       * xlayout xopt
+       * xlbiff xopt
+       * xless xopt
+       * xload xopt
+       * xload xreq
+       * xlogin xopt
+       * xlogo xreq
+       * xlsatoms xreq
+       * xlsclients xreq
+       * xlsfonts xreq
+       * xmag xreq
+       * xmail xopt
+       * xmailbox xopt
+       * xmailwatcher xopt
+       * xman xopt
+       * xman xreq
+       * xmandel xopt
+       * xmessage xopt
+       * xmeter xopt
+       * xmh xreq
+       * xmh-icons xopt
+       * xmh.editor xopt
+       * xmodmap xreq
+       * xmon xopt
+       * xmove xopt
+       * xmphone xopt
+       * xpd xopt
+       * xphoon xopt
+       * xpipeman xopt
+       * xplot Graphics
+       * xpostit xopt
+       * xpr xopt
+       * xpr xreq
+       * xprompt xopt
+       * xproof xopt
+       * xprop xreq
+       * xpserv xopt
+       * xrdb xreq
+       * xrefresh xreq
+       * xrsh xopt
+       * xrubik xopt
+       * xrunclient xopt
+       * xscope xopt
+       * xscreensaver xopt
+       * xsession xopt
+       * xset xreq
+       * xsetroot xreq
+       * xshogi xshogi
+       * xstdcmap xreq
+       * xstr bsd44
+       * xtalk xopt
+       * xterm xreq
+       * xterm_color xopt
+       * xtetris xopt
+       * xTeXcad.13 xopt
+       * xtiff xopt
+       * xtree xopt
+       * xtv xopt
+       * xwd xreq
+       * xwininfo xreq
+       * xwud xreq
+
+       * yacc bsd44
+       * yes Shellutils
+       * youbin xopt
+       * yow Emacs
+
+       * zcat gzip
+       * zcmp gzip
+       * zdiff gzip
+       * zforce gzip
+       * zgrep gzip
+       * zmore gzip
+       * znew gzip
+
+       * [ Shellutils
+
+
+
+Tapes
+*****
+
+We offer Unix source code on tapes in `tar' format on these media:
+
+   * 4mm DAT cartridge tape.
+
+   * 8mm Exabyte cartridge tape.
+
+   * Sun DC300XLP QIC-24 1/4in cartridge (readable on some other systems).
+
+   * Hewlett-Packard 16-track DC600HC 1/4in cartridge tape.
+
+   * IBM RS/6000 QIC-150 1/4in cartridge (readable on some other systems).
+
+   * 1600bpi 9-track 1/2in reel tape.
+
+The contents of the various tapes for Unix systems are the same; only the
+media are different.  For prices, see the *note Free Software Foundation
+Order Form::.. Source code for the manuals & reference cards is included
+(*note Documentation::.).
+
+Some of the files on the tapes are compressed with `gzip' to allow more files
+on each tape.  Refer to the top-level `README' file at the beginning of each
+tape for instructions on uncompressing them.  `uncompress' and `unpack' *do
+not work*!
+
+
+
+Languages Tape
+--------------
+
+This tape contains programming tools: compilers, interpreters and, related
+programs (parsers, translators, debuggers, linkers, etc.).
+
+       * Binutils 2.6
+       * Bison 1.24
+       * C Library 1.09
+       * cperf 2.1a
+       * DejaGnu 1.2
+       * dld 3.2.3
+       * ecc 1.2.1
+       * f2c 1995.02.24
+       * flex 2.5.2
+       * g77 0.5.17
+       * GAWK 2.15.6
+       * GCC/G++/Objective-C 2.7.2
+       * GDB 4.15.1
+       * gdbm 1.7.3
+       * gettext 0.10
+       * gmp 1.3.2
+       * gzip 1.2.4
+       * indent 1.9.1
+       * libg++ 2.7.1
+       * libobjects 0.1.3
+       * make 3.74
+       * ncurses 1.9.4
+       * NIHCL 3.1.4
+       * OBST 3.4.3
+       * Octave 1.1.1
+       * p2c 1.20
+       * perl 4.036
+       * perl 5.001
+       * regex 0.12
+       * rx 0.05
+       * Smalltalk 1.1.1
+       * Superopt 2.5
+       * Texinfo 3.6
+       * Tile Forth 2.1
+       * ucblogo 3.3
+
+
+
+Lisps/Emacs Tape
+----------------
+
+This tape has Common Lisp systems and libraries, GNU Emacs, assorted
+extensions that work with Emacs, manuals, & a few other important utilities.
+
+       * Calc 2.02c
+       * CLISP 1995.12.04
+       * CLX 5.02
+       * Common Lisp 2.2
+       * Elib 0.06
+       * Emacs 18.59
+       * Emacs 19.28
+       * Emacs 19.30
+       * GNU Emacs Lisp Reference Manual Ed. 1.03 for Version 18
+       * GNU Emacs Lisp Reference Manual Ed. 2.4 for Version 19.29
+       * gnuserv 2.1alpha
+       * gzip 1.2.4
+       * Hyperbole 4.01
+       * make 3.74
+       * MULE 2.3
+       * PCL 2.2
+       * Programming in Emacs Lisp: An Introduction Ed. 1.04
+       * Texinfo 3.6
+       * W3 2.2.25
+
+
+
+Utilities Tape
+--------------
+
+This tape consists mostly of smaller utilities and miscellaneous applications.
+
+       * acm 4.7
+       * Autoconf 2.7
+       * BASH 1.14.5
+       * bc 1.03
+       * cfengine 1.2.14
+       * cfengine 1.2.22
+       * Chess 4.0.pl75
+       * cpio 2.3
+       * CVS 1.6
+       * Diffutils 2.7
+       * doschk 1.1
+       * ed 0.2
+       * es 0.84
+       * Fileutils 3.12
+       * Findutils 4.1
+       * Finger 1.37
+       * Fontutils 0.6
+       * Ghostscript 2.6.2
+       * Ghostview 1.5
+       * Ghostview for Windows 1.0
+       * GIT 4.3.6
+       * GNATS 3.2
+       * GnuGo 1.2
+       * gnuplot 3.5
+       * Graphics 0.17
+       * grep 2.0
+       * Groff 1.10
+       * gzip 1.2.4
+       * hello 1.3
+       * hp2xx 3.1.4
+       * HylaFAX 3.0.0
+       * Ispell 3.1.20
+       * less 2.9.0
+       * m4 1.4
+       * make 3.74
+       * MandelSpawn 0.07
+       * mc 3.0
+       * mkisofs 1.04
+       * mm 1.07
+       * mtools 2.0.7
+       * NetHack 3.1.3
+       * nvi 1.34
+       * Oleo 1.6
+       * patch 2.1
+       * pine 3.91
+       * ptx 0.4
+       * rc 1.4
+       * RCS 5.7
+       * readline 2.0
+       * recode 3.4
+       * SAOimage 1.16
+       * screen 3.7.1
+       * sed 2.05
+       * Sharutils 4.2
+       * Shellutils 1.12
+       * Shogi 1.2.3
+       * tar 1.11.8
+       * Termcap 1.3
+       * Termutils 2.0
+       * Texinfo 3.6
+       * Textutils 1.13
+       * time 1.6
+       * UUCP 1.06.1
+       * wdiff 0.5
+       * xboard 3.4.pl0
+       * xshogi 1.2.03
+       * Ygl 3.0.3
+
+
+
+Scheme Tape
+-----------
+
+Scheme is a simplified, lexically-scoped dialect of Lisp.  It was designed at
+MIT and other universities to teach students the art of programming and to
+research new parallel programming constructs and compilation techniques.
+
+This tape now has MIT Scheme 7.3, which conforms to the "Revised^4 Report On
+the Algorithmic Language Scheme" (MIT AI Lab Memo 848b), for which TeX source
+is included.  It is written partly in C, but is presently hard to bootstrap.
+Binaries that can be used to bootstrap it exist for: HP 9000 series 300, 400,
+700, & 800 (running HP-UX 9.0), NeXT (NeXT OS 2 or 3.2), DEC Alpha (OSF/1),
+IBM RS/6000 (AIX), Sun-3 or Sun-4 (SunOS 4.1), DECstation 3100/5100 (Ultrix
+4.0), Sony NeWS-3250 (NEWS OS 5.01), & Intel i386 (MS-DOS, Windows 3.1 or NT).
+If your system is not on this list & you don't enjoy the bootstrap challenge,
+see "JACAL" in *Note GNU Software::.
+
+
+
+X11 Tapes
+---------
+
+The two X11 tapes contain Version 11, Release 6 of the X Window System.         The
+first tape has all of the core software, documentation, & some contributed
+clients.  We call this the "required" X tape since it is necessary for
+running X or Emacs under X.  The second, "optional" tape has contributed
+libraries & toolkits, the Andrew User Interface System, games, etc.
+
+The X11 Required tape also contains all fixes and patches released to date.
+We update this tape as new fixes and patches are released for programs on
+both tapes.  *Note Tape & CD-ROM Subscription Service::.
+
+While supplies last, we will distribute X11R5 on the *Note November 1993
+Source Code CD-ROM::.
+
+
+
+Berkeley 4.4BSD-Lite Tape
+-------------------------
+
+The "4.4BSD-Lite" release is the last from the Computer Systems Research
+Group at the University of California at Berkeley.  It has most of the BSD
+software system, except for a few files that remain proprietary.  It is much
+more complete than the previous "Net2" release.
+
+
+
+VMS Emacs and VMS Compiler Tapes
+--------------------------------
+
+We offer two VMS tapes.         One has just GNU Emacs 18.59 (none of the other
+software on the *Note Lisps/Emacs Tape::, is included).         The other has GCC
+2.3.3, Bison 1.19 (to compile GCC), `gas' 1.38 (to assemble GCC's output), and
+some library and include files (none of the other software on the *Note
+Languages Tape::, is included).         We are not aware of a GDB port for VMS.
+Both VMS tapes have DEC VAX executables from which you can bootstrap, as the
+DEC VMS C compiler cannot compile GCC. We do not have executables for DEC
+Alpha VMS systems.  Please do not ask us to devote effort to VMS support,
+because it is peripheral to the GNU Project.
+
+
+
+CD-ROMs
+*******
+
+We offer these CD-ROMs:
+
+   * Several editions of our *Note Source Code CD-ROMs::.
+
+   * *Note December 1995 Compiler Tools Binaries CD-ROM::.
+
+   * *Note December 1994 Compiler Tools Binaries CD-ROM::.
+
+   * *Note December 1993 Compiler Tools Binaries CD-ROM::.
+
+   * *Note MS-DOS Book with CD-ROM::.
+
+   * *Note Debian GNU/Linux Book with CD-ROM::.
+
+Our CD-ROMs are in ISO 9660 format & can be mounted as a read-only file
+system on most computers.  If your driver supports it you can mount each CD
+with "Rock Ridge" extensions (the MS-DOS CD-ROM is only in ISO 9660 format),
+& it will look just like an ordinary Unix file system, rather than one full
+of truncated & otherwise mangled names that fit vanilla ISO 9660.
+
+You can build most of the software without copying the sources off the CD.
+You only need enough disk space for object files and intermediate build
+targets.
+
+
+
+Pricing of the GNU CD-ROMs
+--------------------------
+
+If a business or organization is ultimately paying, the December 1995 Source
+CDs costs $240.         It costs $60 if you, an individual, are paying out of your
+own pocket.  The December 1995 Compiler Tools Binaries CD-ROM costs $220 for
+a business or organization, and $55 for an individual.
+
+
+
+What do the individual and company prices mean?
+...............................................
+
+The software on our disks is free; anyone can copy it and anyone can run it.
+What we charge for is the physical disk and the service of distribution.
+
+We charge two different prices depending on who is buying.  When a company or
+other organization buys the December 1995 Source CD-ROMs, we charge $240.
+When an individual buys the same CD-ROM, we charge just $60.  This
+distinction is not a matter of who is allowed to use the software.  In either
+case, once you have a copy, you can distribute as many copies as you wish and
+there's no restriction on who can have or run them.  The price distinction is
+entirely a matter of what kind of entity pays for the CD.
+
+You, the reader, are certainly an individual, not a company.  If you are
+buying a disk "in person", then you are probably doing so as an individual.
+But if you expect to be reimbursed by your employer, then the disk is really
+for the company; so please pay the company price and get reimbursed for it.
+We won't try to check up on you--we use the honor system--so please cooperate.
+
+Buying CDs at the company price is very helpful for GNU; just
+140 Source CDs at that price support an FSF programmer or tech writer for a
+year.
+
+
+
+Why is there an individual price?
+.................................
+
+In the past, our distribution tapes have been ordered mainly by companies.
+The CD at the price of $240 provides them with all of our software for a much
+lower price than they would previously have paid for six different tapes.  To
+lower the price more would cut into the FSF's funds very badly and decrease
+the software development we can do.
+
+However, for individuals, $240 is too high a price; hardly anyone could
+afford that.  So we decided to make CDs available to individuals at the lower
+price of $60.
+
+
+
+Is there a maximum price?
+.........................
+
+Our stated prices are minimum prices.  Feel free to pay a higher price if you
+wish to support GNU development more.  The sky's the limit; we will accept as
+high a price as you can offer. Or simply give a donation (tax-deductible in
+the U.S.) to the Free Software Foundation, a tax-exempt public charity.
+
+
+
+December 1995 Compiler Tools Binaries CD-ROM
+--------------------------------------------
+
+We now have the third edition of our CD-ROM that has binaries and complete
+sources for GNU compiler tools for some systems which lack a compiler. This
+enables the people who use these systems to compile GNU and other free
+software without having to buy a proprietary compiler. You can also use
+these GNU tools to compile your own C/C++/Objective-C programs.         Older
+editions of this CD are available while supplies last at a reduced price; see
+the *note Free Software Foundation Order Form::..
+
+We hope to have more systems on each update of this CD.         If you can help
+build binaries for new systems (especially those that don't come with a C
+compiler), or have one to suggest, please contact us at the addresses on page
+1.
+
+These packages:
+
+       * DJGPP 1.12m4 from GCC 2.6.3
+       * GCC/G++/Objective-C 2.7.1
+       * GNU C Library 1.09
+       * GDB 4.15.1
+       * Binutils 2.6
+       * Bison 1.24
+       * Emacs 19.29 (MS-DOS only)
+       * Flex 2.5.2
+       * Make 3.74
+       * libg++ 2.7.1
+
+On these platforms:
+
+       * `i386-msdos'
+       * `hppa1.0-hp-hpux9'
+       * `sparc-sun-solaris2'
+       * `sparc-sun-sunos4.1'
+
+
+
+December 1994 Compiler Tools Binaries CD-ROM
+--------------------------------------------
+
+We still have the 2nd edition of our CD-ROM that contains executables for GNU
+compiler tools for some systems which lack a compiler. This enables the
+people who use these systems to compile GNU and other free software without
+having to buy a proprietary compiler.  You can also use the GNU compilation
+system to compile your own C/C++/Objective-C programs.
+
+We hope to have more systems on each update of this CD.         If you can help
+build binaries for new systems (especially those that don't come with a C
+compiler), or have one to suggest, please contact us at the addresses on
+page 1.
+
+These packages:
+
+       *DJGPP 1.12.m2 from GCC 2.6.0
+       *GCC/G++/Objective-C 2.6.2
+       *GNU C Library 1.09
+       *GDB 4.13
+       *Binutils 2.5.2
+       *Bison 1.22
+       *Emacs 19.26 (MS-DOS only)
+       *Flex 2.4.7
+       *Make 3.72.1
+       *libg++ 2.6.1
+
+On these platforms:
+
+       *`i386-msdos'
+       *`hppa1.1-hp-hpux9'
+       *`sparc-sun-solaris2'
+       *`sparc-sun-sunos4.1'
+
+
+
+December 1993 Compiler Tools Binaries CD-ROM
+---------------------------------------------
+
+We still have the 1st edition of our CD-ROM that contains executables for GNU
+compiler tools for some systems which lack a compiler. This will allow users
+of those systems to compile GNU and other free software without having to buy
+a proprietary compiler.
+
+The CD-ROM is in ISO 9660 format and can be mounted as a read-only file
+system on most operating systems.  If your driver supports it you can mount
+the CD-ROM with "Rock Ridge" extensions and it will look just like an
+ordinary Unix file system, rather than one full of truncated and otherwise
+mangled names that fit the vanilla ISO 9660 specifications.
+
+We hope to have more systems included with each update of this CD-ROM. If
+you can help build binaries for new systems (especially for systems that
+don't come with a C compiler), or have a system to suggest, please contact us
+at either address on the front cover.
+
+These programs:
+
+   * DJGPP 1.11.m1
+
+   * GCC/G++/Objective C 2.5.7
+
+   * GDB 4.11
+
+   * GAS 2.2
+
+   * Binutils 2.3
+
+   * Bison 1.22
+
+   * Flex 2.4.5
+
+   * Make 3.70
+
+   * libg++ 2.5.3
+
+For these platforms:
+
+   * `i386-msdos'
+
+   * `hppa1.1-hp-hpux9'
+
+   * `sparc-sun-solaris2'
+
+   * `sparc-sun-sunos4.1'
+
+
+
+Source Code CD-ROMs
+-------------------
+
+We have several versions of our Source Code CD-ROMs available, including:
+
+   * *Note December 1995 Source Code CD-ROMs::, the newest release, has
+     programs, bug fixes, & improvements not on the other CDs.
+
+   * *Note June 1995 Source Code CD-ROM::.
+
+   * *Note May 1994 Source Code CD-ROM::..
+
+   * *Note November 1993 Source Code CD-ROM::.
+
+   * May 1993 Source Code CD-ROM, see the *note Free Software Foundation
+     Order Form::..
+
+   * October 1992 Source Code CD-ROM, see the *note Free Software Foundation
+     Order Form::..
+
+The older Source CDs are available while supplies last at a reduced price
+(please note that the December 1994 Source CD is permanently out of stock).
+All the Source CDs have Texinfo source for the GNU manuals listed in *Note
+Documentation::.
+
+The VMS tapes' contents are *not* included.  Many programs that are only on
+MS-DOS diskettes & not on the tapes are also *not* included.  The MIT Scheme
+& X11 Optional tapes' contents are *not* on the older Source CDs.  *Note
+Tapes:: & *Note MS-DOS Diskettes::.
+
+There are no precompiled programs on these Source CDs. You will need a C
+compiler (programs which need some other interpreter or compiler normally
+provide the C source for a bootstrapping program).  We ship C compiler
+binaries for some systems on the *Note Compiler Tools Binaries CD-ROM::.
+
+
+
+December 1995 Source Code CD-ROMs
+.................................
+
+The 7th edition of our Source CD is out!  Due to increasing amounts of GNU
+Software, the Source Code CD is now a two disc set--the price remains
+unchanged!  It contains these packages, & some manuals that are not part of
+packages:
+
+       * acm 4.7
+       * apache 0.8.8
+       * Autoconf 2.7
+       * BASH 1.14.5
+       * bc 1.03
+       * Binutils 2.5.2
+       * Binutils 2.6
+       * Bison 1.24
+       * C Library 1.09
+       * Calc 2.02c
+       * cfengine 1.2.21
+       * Chess 4.0.pl75
+       * CLISP 1995.08.12
+       * Common Lisp 2.2
+       * cperf 2.1a
+       * cpio 2.3
+       * CVS 1.6
+       * DDD 1.3b
+       * DejaGnu 1.2.9
+       * Diffutils 2.7
+       * dld 3.2.3
+       * doschk 1.1
+       * ecc 1.2.1
+       * ed 0.2
+       * Elib 0.07
+       * Elisp archive
+       * Emacs 18.59
+       * Emacs 19.28
+       * Emacs 19.29
+       * Emacs 19.30
+       * es 0.84
+       * f2c 1995.11.18
+       * ffcall 1.0
+       * Fileutils 3.12
+       * Findutils 4.1
+       * Finger 1.37
+       * flex 2.5.2
+       * Fontutils 0.6
+       * g77 0.5.17
+       * GAWK 2.15.6
+       * GCC/G++/Objective C 2.7.1
+       * GDB 4.15.1
+       * gdbm 1.7.3
+       * gettext 0.9a
+       * Ghostscript 2.6.2
+       * Ghostview 1.5
+       * Ghostview for Windows 1.0
+       * GIT 4.3.7
+       * gmp 1.3.2
+       * GN 2.23
+       * Gnans 1.5
+       * GNATS 3.2
+       * GNU Emacs Lisp Reference Manual, Ed. 1.03 for Version 18.59
+       * GNU Emacs Lisp Reference Manual, Ed. 2.4 for Version 19.29
+       * GnuGo 1.2
+       * gnuplot 3.5
+       * gnuserv 2.1alpha
+       * Graphics 0.17
+       * grep 2.0
+       * Groff 1.09
+       * gzip 1.2.4
+       * hello 1.3
+       * hp2xx 3.1.4
+       * HylaFAX v3.0pl0
+       * Hyperbole 4.01
+       * indent 1.9.1
+       * Ispell 3.1.20
+       * less 290
+       * libg++ 2.7.1
+       * libobjects 0.1.3
+       * m4 1.4
+       * make 3.74
+       * mc 3.0
+       * MIT Scheme 7.3
+       * mkisofs 1.04GNU
+       * mtools 2.0.7
+       * MULE 2.3
+       * ncurses 1.9.7a
+       * NetHack 3.1.3
+       * NIHCL 3.1.4
+       * nvi 1.34
+       * Oaklisp 93.07.23
+       * OBST 3.4.3
+       * Octave 1.1.1
+       * Oleo 1.6
+       * p2c 1.20
+       * patch 2.1
+       * perl 4.036
+       * perl 5.001
+       * phttpd 0.99.68
+       * pine 3.91
+       * Programming in Emacs Lisp: An Introduction, Ed. 1.04
+       * ptx 0.4
+       * rc 1.4
+       * RCS 5.7
+       * recode 3.4
+       * regex 0.12
+       * rx 0.05
+       * SAOimage 1.08
+       * screen 3.7.1
+       * sed 2.05
+       * Sharutils 4.1
+       * Shellutils 1.12
+       * Shogi 1.2p03
+       * SIPP 3.1
+       * Smalltalk 1.1.1
+       * SNePS 2.3.1
+       * Spinner 1.0b11
+       * Superopt 2.5
+       * tar 1.11.8
+       * Termcap 1.3
+       * TeX 3.145
+       * Texinfo 3.6
+       * Textutils 1.13
+       * Tile Forth 2.1
+       * time 1.6
+       * tput 1.0
+       * ucblogo 3.3
+       * UUCP 1.06.1
+       * W3 2.2.25
+       * wdiff 0.5
+       * X11R6
+       * xboard 3.3.pl3
+       * xgrabsc 2.41
+       * xshogi 1.2p03
+       * Ygl 3.0.2
+
+
+
+June 1995 Source Code CD-ROM
+............................
+
+We still have the 6th edition of our Source CD at a reduced price while
+supplies last. Not all FSF distributed software is included (*note Source
+Code CD-ROMs::.).  It contains these packages, and some manuals that are not
+part of packages:
+
+       * acm 4.7
+       * Autoconf 2.4
+       * BASH 1.14.5
+       * bc 1.03
+       * Binutils 2.5.2
+       * Bison 1.24
+       * C Library 1.09
+       * Calc 2.02c
+       * cfengine 1.0.4
+       * Chess 4.0.pl74
+       * CLISP 1995.04.25
+       * Common Lisp 2.1
+       * cperf 2.1a
+       * cpio 2.3
+       * CVS 1.3
+       * DejaGnu 1.2
+       * Diffutils 2.7
+       * dld 3.2.3
+       * doschk 1.1
+       * ecc 1.2.1
+       * ed 0.2
+       * elib 0.06
+       * Emacs 18.59
+       * Emacs 19.28
+       * Emacs 19.29
+       * GNU Emacs Lisp Reference Manual Ed. 1.03 for Version 18
+       * GNU Emacs Lisp Reference Manual Ed. 2.4 for Version 19.29
+       * es 0.84
+       * f2c 1995.02.24
+       * Fileutils 3.12
+       * Findutils 4.1
+       * Finger 1.37
+       * flex 2.5.2
+       * Fontutils 0.6
+       * g77 0.5.15
+       * GAWK 2.15.6
+       * GCC/G++/Objective C 2.6.3
+       * GCC/G++/Objective C 2.7.0
+       * GDB 4.14
+       * gdbm 1.7.3
+       * Ghostscript 2.6.2
+       * Ghostview 1.5
+       * Ghostview for Windows 1.0
+       * GIT 4.3.6
+       * gmp 1.3.2
+       * GNATS 3.2
+       * GnuGo 1.1
+       * gnuplot 3.5
+       * Graphics 0.17
+       * grep 2.0
+       * Groff 1.09
+       * gzip 1.2.4
+       * hello 1.3
+       * hp2xx 3.1.4
+       * HylaFAX 3.0.pl0
+       * indent 1.9.1
+       * Ispell 3.1.18
+       * less 2.90
+       * libg++ 2.6.2
+       * libg++ 2.7.0
+       * libobjects 0.1.3
+       * m4 1.4
+       * make 3.74
+       * MandelSpawn 0.07
+       * mkisofs 1.03GNU
+       * mtools 2.0.7
+       * MULE 2.2
+       * ncurses 1.9.1
+       * NetHack 3.1.3
+       * NIHCL 3.1.4
+       * nvi 1.34
+       * OBST 3.4.3
+       * Octave 1.1.1
+       * Oleo 1.6
+       * p2c 1.20
+       * patch 2.1
+       * PCL 2.1
+       * perl 4.036
+       * perl 5.001
+       * pine 3.91
+       * Programming in Emacs Lisp: An Introduction Ed. 1.03 for Version 19
+       * ptx 0.4
+       * rc 1.4
+       * RCS 5.7
+       * recode 3.4
+       * regex 0.12
+       * rx 0.05
+       * screen 3.6.2
+       * sed 2.05
+       * Sharutils 4.1
+       * Shellutils 1.12
+       * Shogi 1.2p03
+       * Smalltalk 1.1.1
+       * Superopt 2.5
+       * tar 1.11.8
+       * Termcap 1.2
+       * TeX 3.1415
+       * Texinfo 3.6
+       * Textutils 1.12
+       * Tile Forth 2.1
+       * time 1.6
+       * tput 1.0
+       * ucblogo
+       * UUCP 1.05
+       * wdiff 0.5
+       * X11R6
+       * xboard 3.2.pl2
+       * xshogi 1.2p03
+       * Ygl 2.9.5
+
+
+
+May 1994 Source Code CD-ROM
+...........................
+
+We still have the 4th edition of our Source CD, at a reduced price.    This
+CD has Edition 2.3 for version 19 of the `GNU Emacs Lisp Reference Manual' &
+some additional software; not all FSF distributed software is included (see
+``Source Code CD-ROMs'').  It contains the following packages:
+       *acm 4.5
+       *Autoconf 1.10
+       *BASH 1.13.5
+       *bc 1.02
+       *Binutils 2.3
+       *Bison 1.22
+       *C Library 1.08
+       *Calc 2.02c
+       *Chess 4.0.69
+       *CLISP 1994.01.08
+       *Common Lisp 1.0
+       *cpio 2.3
+       *CVS 1.3
+       *dc 0.2
+       *DejaGnu 1.2
+       *Diffutils 2.6
+       *dld 3.2.3
+       *doschk 1.1
+       *ecc 1.2.1
+       *ed 0.1
+       *elib 0.06
+       *Emacs 18.59
+       *Emacs 19.23
+       *es 0.84
+       *f2c 1994.04.14
+       *Fileutils 3.9
+       *find 3.8
+       *finger 1.37
+       *flex 2.4.6
+       *Fontutils 0.6
+       *GAS 1.36.utah
+       *GAS 2.2
+       *Gawk 2.15.4
+       *GCC 2.5.8
+       *GDB 4.12
+       *gdbm 1.7.1
+       *Ghostscript 2.6.1
+       *Ghostview 1.5
+       *Ghostview for Windows 1.0
+       *gmp 1.3.2
+       *GNATS 3.2
+       *GnuGo 1.1
+       *gnuplot 3.5
+       *gperf 2.1a
+       *Graphics 0.17
+       *grep 2.0
+       *Groff 1.09
+       *gzip 1.2.4
+       *hello 1.3
+       *hp2xx 3.1.4
+       *indent 1.9.1
+       *ispell 4.0
+       *libg++ 2.5.3
+       *m4 1.1
+       *Make 3.71
+       *MandelSpawn 0.07
+       *mtools 2.0.7
+       *MULE 1.0
+       *NetFax 3.2.1
+       *Nethack 3.1.3
+       *NIHCL 3.0
+       *nvi 1.11
+       *Octave 1.0
+       *Oleo 1.5
+       *p2c 1.20
+       *patch 2.1
+       *PCL 1993.03.18
+       *perl 4.036
+       *ptx 0.3
+       *rc 1.4
+       *RCS 5.6.0.1
+       *recode 3.3
+       *regex 0.12
+       *screen 3.5.2
+       *sed 2.05
+       *shellutils 1.9.4
+       *Shogi 1.1.02
+       *Smalltalk 1.1.1
+       *Superopt 2.3
+       *tar 1.11.2
+       *Termcap 1.2
+       *TeX 3.1
+       *Texinfo 3.1
+       *Textutils 1.9.1
+       *Tile Forth 2.1
+       *time 1.6
+       *tput 1.0
+       *UUCP 1.05
+       *uuencode 1.0
+       *wdiff 0.04
+       *X11R6
+       *xboard 3.0.9
+       *xshogi 1.2.02
+
+
+
+November 1993 Source Code CD-ROM
+................................
+
+We still have the 3rd edition of our Source CD, at a reduced price, while
+supplies last. It was the last Source Code CD to contain X11R5.  This CD has
+Edition 2.2 for version 19 of the `GNU Emacs Lisp Reference Manual' & some
+additional software; not all FSF distributed software is included (*note
+Source Code CD-ROMs::.).  It contains these packages:
+
+       * acm 3.1
+       * Autoconf 1.7
+       * BASH 1.13.4
+       * bc 1.02
+       * Binutils 1.9 2.3
+       * Bison 1.22
+       * C Library 1.06.7
+       * Calc 2.02b
+       * Chess 4.0p62
+       * CLISP 93.11.08
+       * cpio 2.3
+       * CVS 1.3
+       * dc 0.2
+       * DejaGnu 1.0.1
+       * Diffutils 2.6
+       * dld 3.2.3
+       * doschk 1.1
+       * ecc 1.2.1
+       * elib 0.06
+       * Emacs 18.59
+       * Emacs 19.21
+       * es 0.84
+       * f2c 1993.04.28
+       * Fileutils 3.9
+       * find 3.8
+       * Finger 1.37
+       * flex 2.3.8
+       * Fontutils 0.6
+       * GAS 1.36.utah
+       * GAS 1.38.1
+       * GAS 2.2
+       * GAWK 2.15.3
+       * GCC/G++/Objective C 2.5.4
+       * GDB 4.11
+       * gdbm 1.7.1
+       * Ghostscript 2.6.1
+       * Ghostview 1.5
+       * Ghostview for Windows 1.0
+       * gmp 1.3.2
+       * GNATS 3.01
+       * GnuGo 1.1
+       * gnuplot 3.5
+       * cperf 2.1a
+       * Graphics 0.17
+       * grep 2.0
+       * Groff 1.08
+       * gzip 1.2.4
+       * hello 1.3
+       * hp2xx 3.1.3a
+       * indent 1.8
+       * Ispell 4.0
+       * less 177
+       * libg++ 2.5.1
+       * m4 1.1
+       * make 3.69.1
+       * MandelSpawn 0.06
+       * mtools 2.0.7
+       * MULE 1.0
+       * NetFax 3.2.1
+       * NetHack 3.1.3
+       * NIHCL 3.0
+       * Oleo 1.5
+       * p2c 1.20
+       * patch 2.1
+       * PCL 93.03.18
+       * perl 4.036
+       * ptx 0.3
+       * rc 1.4
+       * RCS 5.6.0.1
+       * recode 3.2.4
+       * regex 0.12
+       * screen 3.5.2
+       * sed 1.18 2.03
+       * Shellutils 1.9.1
+       * Shogi 1.1p02
+       * Smalltalk 1.1.1
+       * Superopt 2.3
+       * tar 1.11.2
+       * Termcap 1.2
+       * TeX 3.1
+       * Texinfo 3.1
+       * Tile Forth 2.1
+       * time 1.6
+       * time 1.6
+       * tput 1.0
+       * UUCP 1.04
+       * uuencode 1.0
+       * wdiff 0.04
+       * X11R5
+
+
+
+MS-DOS Book with CD-ROM
+-----------------------
+
+We are working on our first book describing GNU Software for MS-DOS, but we
+do not know when it will be finished.  It will include a CD-ROM with all the
+sources & binaries on the MS-DOS Diskettes and more.
+
+Please do NOT contact us about this book until we announce it on our mailing
+lists (to subscribe, ask `info-gnu-request@prep.ai.mit.edu'), because it just
+slows us down.
+
+
+
+Debian GNU/Linux Book with CD-ROM
+---------------------------------
+
+We are working on our first book describing Debian GNU/Linux but we do not
+know when it will be finished. Please do NOT contact us about this book
+until we announce it on our mailing lists (ask
+`info-gnu-request@prep.ai.mit.edu' to subscribe), because it just slows us
+down.
+
+A CD will be inside the book with sources & binaries for Debian GNU/Linux,
+which is a complete operating system for i386/i486/Pentium.  It is a
+GNU/Linux system--that is to say, a variant GNU system which uses Linux as
+the kernel.  (All the systems now available that use the Linux kernel are
+GNU/Linux systems, see item "Linux" in *Note Free Software for
+Microcomputers::.)
+
+Debian is being developed by Ian Murdock and the Debian Association in
+conjunction with the Free Software Foundation. We are distributing it as an
+interim measure until the GNU kernel (the Hurd) is ready for users.
+
+For details on Debian & how to help, see URL: `http://www.debian.org/' or
+FTP, `/pub/gnu/GNUinfo/DEBIAN' from a GNU FTP host (*note How to Get GNU
+Software::.).  FTP Debian under `/debian' from `ftp.debian.org'.
+
+
+
+MS-DOS Diskettes
+****************
+
+The FSF distributes some of the GNU software ported to MS-DOS, on 3.5inch
+1.44MB diskettes.  These disks have both sources and executables.
+
+
+
+DJGPP Diskettes
+---------------
+
+We offer DJGPP on 30 diskettes.         For further details, see *Note GNU
+Software::.  The DJGPP diskettes contain the following:
+
+       * Binutils 2.5.2
+       * Bison 1.22
+       * Diffutils 2.6
+       * DJGPP 1.12m4
+       * flex 2.4.7
+       * GCC/G++ 2.6.3
+       * GDB 4.12
+       * Groff 1.09
+       * gzip 1.24
+       * libg++ 2.6.2
+       * make 3.71
+       * patch 2.1
+       * sed 1.18
+       * Texinfo 3.1
+
+
+
+Emacs Diskettes
+---------------
+
+Two versions of GNU Emacs are included on the Emacs diskettes we distribute:
+GNU Emacs version 19.29 handles 8-bit character sets; the other, MULE version
+2.2, handles 16-bit character sets including Kanji.
+
+
+
+Selected Utilities Diskettes
+----------------------------
+
+The GNUish MS-DOS Project ported GNU software to PC compatibles.  Though
+GNUish is no longer active, users still ask for these ports done some years
+ago.  We offer these ports on five diskettes.  In general, the ports run on
+8086/80286-based 16-bit machines; an 80386 is not required.  Some are
+necessarily missing features.
+
+Included are: `cpio', `diff', `find', `flex', `gdbm', `grep', `indent',
+`less', `m4', `make', `ptx', RCS, `sed', `shar', `sort', & Texinfo.
+
+
+
+Windows Diskette
+----------------
+
+We offer GNU Chess and `gnuplot' for Microsoft Windows on a single diskette.
+
+
+
+Tape & CD-ROM Subscription Service
+**********************************
+
+If you do not have net access, our subscription service enables you to stay
+current with the latest GNU developments.  For a one-time cost equivalent to
+three tapes or CD-ROMs (plus shipping in some cases), we will ship you four
+new versions of the tape of your choice or the Source Code CD-ROM.  The tapes
+are sent each quarter; the CD-ROMs are sent as they are issued (currently
+twice a year, but we hope to make it more frequent).
+
+Regularly, we will send you a new version of a Lisps/Emacs, Languages,
+Utilities, or X Window System (X11R6) Required tape, or the Source CD-ROM.
+The MIT Scheme and X Window System Optional tapes are not changed often
+enough to warrant quarterly updates.  We do not yet know if we will be
+offering subscriptions to the Compiler Tools Binaries or our new Books with
+CD-ROM.
+
+Since Emacs 19 is on the Lisps/Emacs Tape and the Source CD-ROM, a
+subscription to either is an easy way to keep current with Emacs 19 as it
+evolves.
+
+A subscription is an easy way to keep up with the regular bug fixes to the X
+Window System. We update the X11R6 Required tape as fixes and patches are
+issued throughout the year.  Each edition of the *Note Source Code CD-ROMs::,
+also has updated sources for the required part of the X Window System.
+
+Please note: In two cases, you must pay 4 times the normal shipping required
+for a single order when you pay for each subscription. If you're in Alaska,
+Hawaii, or Puerto Rico you must add $20.00 for shipping for each
+subscription.  If you're outside of U.S., Canada, and Puerto Rico, you must
+add $80.00 for each subscription.  See "Unix and VMS Software" and "Shipping
+Instructions" on the *note Free Software Foundation Order Form::..
+
+
+
+FSF T-shirt
+***********
+
+There is a GNU & improved T-shirt.  The front has the GNU Emacs Lisp code
+`(USE 'GNU)' with "`()'" being the dancing parentheses from the cover of our
+`GNU Emacs Lisp Reference Manual' (drawn by Berkeley, CA artist Etienne
+Suvasa).  The back of the shirt is still imprinted with the Preamble to the
+GNU General Public License.
+
+These shirts come in two colors, Natural & Black.  Natural is an off-white,
+unbleached, undyed, environment-friendly cotton, printed with black ink, & is
+great for tye-dyeing or displaying as is.  Black is printed with white ink &
+is perfect for late night hacking.  All shirts are thick 100% cotton, & come
+in sizes M, L, XL, & XXL.  GNU shirts often create spontaneous friendships at
+technical conferences and on major university campuses!         (They also make
+great gifts!)
+
+
+
+Free Software Foundation Order Form
+***********************************
+
+All items are distributed with permission to copy and to redistribute.
+Texinfo source for each manual and source for each reference card is on
+the appropriate tape, diskette, or CD-ROM; the prices for these magnetic
+media do not include printed documentation.  All items are provided on
+an ``as is'' basis, with no warranty of any kind.  Please allow six
+weeks for delivery (though it won't usually take that long).
+
+
+     PRICE AND CONTENTS MAY CHANGE WITHOUT NOTICE AFTER June 30, 1996.
+
+
+
+Unix and VMS Software
+---------------------
+
+These tapes in the formats indicated (*note Tapes::., for contents):
+
+       Please circle the dollar amount for each tape you order.
+
+               Reel to   Sun (1)   HP        IBM (2)   Exabyte  DAT
+               reel                          RS/6000
+               Unix tar  Unix tar  Unix tar  Unix tar  Unix tar Unix tar
+               9-track   QIC-24    16-track  QIC-150
+               1600 bpi  DC300XLP  DC600HC   DC600A
+               1/2" reel 1/4" c.t. 1/4" c.t. 1/4" c.t. 8mm c.t. 4mm c.t.
+
+    (c.t. = cartridge tape)
+
+Lisps/Emacs    $200      $210      $230      $215      $205     $225
+
+Languages      $200      $210      $230      $215      $205     $225
+
+Utilities      $200      $210      $230      $215      $205     $225
+
+4.4BSD-Lite    $200      $210      $230      $215      $205     $225
+
+Scheme         $200      $210      $230      $215      $205     $225
+
+X11R6-Required $200      $210      $230      $215      $205     $225
+
+X11R6-Optional $200      $210      $230      $215      $205     $225
+
+        (1) Sun tapes can be read on some other Unix systems.
+        (2) IBM RS/6000 tapes can be read on some other Unix systems.
+
+
+Subscriptions, 4 updates for one year (*note Tape & CD-ROM Subscription Service::.):
+
+Emacs          $600      $630      $690      $645      $615     $675
+
+Languages      $600      $630      $690      $645      $615     $675
+
+Utilities      $600      $630      $690      $645      $615     $675
+
+X11R6-Required $600      $630      $690      $645      $615     $675
+
+      Subtotal $ ______         Please put total of the above circled amounts here.
+
+
+These 1600 bpi reel-to-reel 9 track 1/2" tapes, in VMS BACKUP format (aka
+interchange format) (*note VMS Emacs and VMS Compiler Tapes::.):
+
+____ @ $195  = $ ______          VMS Emacs, GNU Emacs source & executables only.
+
+____ @ $195  = $ ______          VMS Compiler, GCC, GAS, and Bison source and
+                          executables only.
+
+
+FSF Deluxe Distribution
+.......................
+(Please call with any questions.  *note Deluxe Distribution::. for machine,
+operating system, and media types.):
+
+
+____ @ $5000 = $ ______          The Deluxe Distribution, with manuals, etc.
+
+Machine: _____________________________________________________________________
+
+Operating system: ____________________________________________________________
+
+Media type: __________________________________________________________________
+
+Version of X Windows System to build: _______________________________________
+
+
+
+CD-ROMs, in ISO 9660 format (*note CD-ROMs::.):
+..............................................
+
+
+GNU Source Code CD-ROMs, Version 7 with X11R6 (*note December 1995 Source Code CD-ROMs::.):
+
+____ @ $240  = $ ______          for corporations and other organizations.
+
+____ @ $ 60  = $ ______          for individuals.
+
+
+Subscriptions, next 4 updates, of the Source Code CD-ROM, in ISO 9660 format
+(*note Tape & CD-ROM Subscription Service::.):
+
+____ @ $720  = $ ______          for corporations and other organizations.
+
+____ @ $180  = $ ______          for individuals.
+
+
+GNU Compiler Tools Binaries CD-ROM, Version 3, December 1995 Edition
+(*note Compiler Tools Binaries CD-ROM::.):
+
+____ @ $220  = $ ______          for corporations and other organizations.
+
+____ @ $55  = $ ______   for individuals.
+
+
+
+MS-DOS Software
+---------------
+
+The following sources and executables for MS-DOS, on 3.5" 1.44MB diskettes
+(*note MS-DOS Diskettes::.):
+
+____ @ $ 90  = $ ______          Emacs diskettes, GNU Emacs, for 80386 and up.
+
+____ @ $ 80  = $ ______          DJGPP diskettes, GCC version 2, and other tools
+                          for 80386 and up (also on the
+                          *note Compiler Tools Binaries CD-ROM::.).
+
+____ @ $ 85  = $ ______          Selected Utilities diskettes, 8086 and up.
+
+____ @ $ 40  = $ ______          Windows diskette: GNU Chess and gnuplot for
+                          Microsoft Windows.
+
+
+Manuals
+-------
+
+These manuals (*note Documentation::.).         The latest version of each manual
+will be shipped.  Please call if you want a specific version.
+
+____ @ $ 25  = $ ______          GNU Emacs version manual, with a reference card.
+
+____ @ $ 50  = $ ______          GNU Emacs Lisp Reference manual, in two volumes.
+
+____ @ $ 60  = $ ______          GNU Emacs Lisp Reference, Japanese Edition.
+
+____ @ $ 50  = $ ______          Using and Porting GNU CC.
+
+____ @ $ 50  = $ ______          GNU C Library Reference Manual.
+
+____ @ $ 50  = $ ______          GNU Emacs Calc manual, with a reference card.
+
+____ @ $ 20  = $ ______          Programming in Emacs Lisp: An Introduction.
+
+____ @ $ 20  = $ ______          Debugging with GDB, with a reference card.
+
+____ @ $ 25  = $ ______          GAWK manual.
+
+____ @ $ 20  = $ ______          Make manual.
+
+____ @ $ 20  = $ ______          Bison manual, with a reference card.
+
+____ @ $ 20  = $ ______          Flex manual, with a reference card.
+
+____ @ $ 20  = $ ______          Texinfo manual.
+
+____ @ $ 15  = $ ______          Termcap manual.
+
+
+
+Reference Cards
+---------------
+
+The following reference cards, in packets of ten.  For single copies please
+call.
+
+____ @ $ 10  = $ ______          GNU Emacs version 19 reference cards.
+
+____ @ $ 10  = $ ______          GNU Emacs Calc reference cards.
+
+____ @ $ 10  = $ ______          GDB reference cards.
+
+____ @ $ 10  = $ ______          Bison reference cards.
+
+____ @ $ 10  = $ ______          Flex reference cards.
+
+
+
+T-shirts
+--------
+
+GNU/FSF T-shirts, thick 100% cotton (*note FSF T-shirt::.):
+
+____ @ $ 15  = $ ______          Size M     ____ natural  ____ black.
+
+____ @ $ 15  = $ ______          Size L     ____ natural  ____ black.
+
+____ @ $ 15  = $ ______          Size XL    ____ natural  ____ black.
+
+____ @ $ 15  = $ ______          Size XXL   ____ natural  ____ black.
+
+
+
+Older Items
+-----------
+
+Older items are only available while supplies last.
+
+____ @ $  5  = $ ______          GNU Emacs version 18 reference cards, in packets
+                          of ten.
+
+
+Please fill in the number of each older CD-ROM you order:
+
+                                               for             for
+                                               corporations    individuals:
+                                               and other
+                                               organizations:
+
+GNU Compiler Tools Binaries CD-ROM
+       December 1994 Edition (Version 2)       ____________    ____________
+
+GNU Compiler Tools Binaries CD-ROM
+       December 1993 Edition (Version 1)       ____________    ____________
+
+
+Please note that the December 1994 Source CD is permanently out of stock.
+
+GNU Source Code CD-ROM
+       June 1995 edition with X11R6            ____________    ____________
+
+GNU Source Code CD-ROM
+       May 1994 edition with X11R6             ____________    ____________
+
+GNU Source Code CD-ROM
+       November 1993 edition with X11R5        ____________    ____________
+
+GNU Source Code CD-ROM
+       May 1993 edition with X11R5             ____________    ____________
+
+GNU Source Code CD-ROM
+       October 1992 edition with X11R5         ____________    ____________
+
+
+Please put the total count and cost of the above older CD-ROMs here:
+
+____ @ $ 80  = $ ______          for corporations and other organizations.
+
+____ @ $ 20  = $ ______          for individuals.
+
+                ======
+
+      Subtotal $ ______
+
+
+
+Tax and Shipping Costs
+----------------------
+
+            + $ ______   For addresses in Massachusetts: add 5% sales tax
+                         or give tax exempt number.  There is no sales tax
+                         on T-shirts.
+            + $ ______   Shipping fee for addresses in Alaska, Hawaii, or
+                         Puerto Rico:
+                           $  5.00 base charge;
+                         + $  5.00 for *each* Emacs Calc or Emacs Lisp
+                           Reference manual ($ 5.00 * #ofMans);
+                         + $ 20.00 for *each* tape subscription or CD
+                           subscription ($20.00 * #ofSubs);
+                         + $  1.00 for *each* item other then the above
+                           (shipping for all other items =
+                                                    $ 1.00 * #ofOtherItems).
+            + $ ______   Shipping fee for most Foreign Destinations: (Please
+                         do *not* use this formula for addresses in China,
+                         Guam, Indonesia, Israel, Malaysia, New Zealand,
+                         Philippines, and Thailand.  Please fax,
+                         or call for an exact shipping quote.)
+                           $ 20.00 base charge for orders to other
+                             addresses outside of U.S., Canada, & Puerto Rico:
+                         + $ 80.00 for *each* tape subscription or CD
+                           subscription ($ 80.00 * #ofSubs);
+                         + $ 10.00 for *each* of the other items in the
+                           order ($ 10.00 * #ofItems).
+            + $ ______   Optional (tax-deductible in the U.S.) donation.
+                ------   We suggest 5% if paying by credit card.
+
+        TOTAL $ ______   We pay for shipping via UPS ground transportation in
+                         the contiguous 48 states and Canada.  For very
+                         large orders, ask about actual shipping costs for
+                         that order.
+
+
+
+Shipping Information
+--------------------
+
+Name: ________________________________________________________________________
+
+Mail Stop/Dept. Name: ________________________________________________________
+
+Organization: ________________________________________________________________
+
+Street Address: ______________________________________________________________
+
+City/State/Province: _________________________________________________________
+
+Zip Code/Postal Code/Country: ________________________________________________
+
+Telephone number in case of a problem with your order.
+For international orders, please include a Fax number. _______________________
+
+
+------------------------------------------------------------------------------
+|                                                                           |
+|  Orders filled only upon receipt of check, money order, or credit card     |
+|  order in U.S. dollars.  Unpaid orders will be returned to the sender.     |
+|  We do not have the staff to handle the billing of unpaid orders.  Please  |
+|  help keep our lives simple by including your payment with your order.     |
+|                                                                           |
+------------------------------------------------------------------------------
+
+
+
+For orders from outside the U.S.:
+---------------------------------
+
+You are responsible for paying all duties, tariffs, and taxes. If you
+refuse to pay the charges, the shipper will return or abandon the order.
+
+
+ ---------------------------------------------------------------------------
+ |                                                                        |
+ |     Please make checks payable to the ``Free Software Foundation''.    |
+ |                                                                        |
+ ---------------------------------------------------------------------------
+
+
+
+For Credit Card Orders:
+-----------------------
+
+The Free Software Foundation takes these credit cards: Carte Blanche,
+Diner's Club, JCB, MasterCard, Visa, or American Express.  Please note that
+we are charged about 5% of an order's total amount in credit card
+processing fees.  Please consider paying by check instead, or adding on a 5%
+donation to make up the difference.  To place a credit card order, please
+give us this information:
+
+
+Card type: ___________________________________________________________________
+
+Account Number: ______________________________________________________________
+
+Expiration Date: _____________________________________________________________
+
+Cardholder's Signature: ______________________________________________________
+
+
+
+------------------------------------------------------------------------------
+|                                                                           |
+|     If you wish to pay by wire transfer or you are a reseller, please             |
+|     call or write us for details.                                         |
+|                                                                           |
+------------------------------------------------------------------------------
+
+
+               Please mail orders to:  Free Software Foundation
+                                       59 Temple Place -- Suite 330
+                                       Boston, MA   02111
+PRICES AND CONTENTS MAY CHANGE         +1-617-542-5942
+WITHOUT NOTICE AFTER June 30, 1996.    Fax (including Japan): +1-617-542-2652
+
+Version: January 1996 ASCII etc/ORDERS
+
+-----------------------------------------------------------------------------
+
+local variables:
+mode: text
+fill-column: 78
+end:
diff --git a/etc/ORDERS.EUROPE b/etc/ORDERS.EUROPE
new file mode 100644 (file)
index 0000000..7004963
--- /dev/null
@@ -0,0 +1,6 @@
+The Free Software Foundation does not currently have a distributor in
+Europe.
+
+Please use the file etc/ORDERS in the GNU Emacs distribution or the
+ftpable file prep.ai.mit.edu:/pub/gnu/GNUinfo/ORDERS to order from the
+FSF in the United States.
diff --git a/etc/ORDERS.JAPAN b/etc/ORDERS.JAPAN
new file mode 100644 (file)
index 0000000..cdaa9f4
--- /dev/null
@@ -0,0 +1,246 @@
+Note: this file describes how you order software from the Free Software
+Foundation directly.  Information on getting XEmacs can be found in
+the file DISTRIB.
+                          GNU ORDER FORM FOR JAPAN
+
+Prices and contents may change without notice after June 30, 1996.
+
+  Item                                         Unit Price Quantity Item Price
+  ----------------------------------------     ---------- -------- ----------
+* indicates New or Substantially Updated items.
+
+* Compiler Tools Binaries CD-ROM December '95     Y32,000 ________ __________
+  Edition, Version 3, if a corporation or other
+  organization is ultimately paying.
+
+* Compiler Tools Binaries CD-ROM December '95      Y8,000 ________ __________
+  Edition, Version 3, if an individual is
+  ultimately paying.
+
+* Source Code CD-ROM December '95 Edition,        Y40,000 ________ __________
+  Version 7, with X11R6, if a corporation or
+  other organization is ultimately paying.
+
+* Source Code CD-ROM December '95 Edition,        Y10,000 ________ __________
+  Version 7, with X11R6, if an individual is
+  ultimately paying.
+
+  Source Code CD-ROM November '93 Edition,       Y40,000 ________ __________
+  Version 3, with X11R5, if a corporation or other
+  organization is ultimately paying (while supplies last).
+
+  Source Code CD-ROM November '93 Edition,       Y10,000 ________ __________
+  Version 3, with X11R5, if an individual is
+  ultimately paying (while supplies last).
+
+  Subscription to next four editions of the      Y125,000 ________ __________
+  Source Code CD-ROMs.  (There is no subscription
+  yet to the Compiler Tools Binaries CD-ROM.)
+
+* Source Code on Tape                             Y30,000 ________ __________
+  (per tape; see the next page for more details.)
+
+  Emacs manual, with reference card                Y3,700 ________ __________
+  (Eleventh Edition for Version 19.29)
+
+* Programming in Emacs Lisp, An Introduction       Y3,100 ________ __________
+  (Edition 1.04)
+
+* Emacs Lisp Reference manual, in two volumes      Y7,100 ________ __________
+  (Edition 2.4 for Version 19.29)
+
+* Emacs Lisp Reference, Japanese Edition manual    Y8,000 ________ __________
+  (Japanese DRAFT Revision 1.0, Dec 1995,
+  from English Edition 2.4 for Version 19.29)
+
+  Emacs Calc manual, with reference card           Y7,400 ________ __________
+  (Edition 2.02 for Version 2.02)
+
+  Using and Porting GNU CC manual                  Y7,100 ________ __________
+  (September 1994 Edition for Version 2.6)
+
+  GNU C Library Reference manual                   Y7,400 ________ __________
+  (Edition 0.06 for Version 1.09)
+
+  Debugging with GDB manual, with reference card   Y3,100 ________ __________
+  (Edition 4.12 for Version 4.14)
+
+  Texinfo manual (Edition 2.21 for Version 3)      Y2,800 ________ __________
+
+  Termcap manual (Second Edition for Version 1.2)  Y2,100 ________ __________
+
+  Bison manual, with reference card                Y2,100 ________ __________
+  (December 1993 Edition for Version 1.23)
+
+* Gawk manual (Edition 1.0 for Version 3.0)        Y3,700 ________ __________
+
+* Make manual (Edition 0.49 for Version 3.74)      Y2,800 ________ __________
+
+  Flex manual, with reference card                 Y2,100 ________ __________
+  (Edition 1.03 for Version 2.3.7)
+
+  Packet of ten Emacs 19 reference cards           Y1,500 ________ __________
+
+  Packet of ten Emacs 18 reference cards           Y1,500 ________ __________
+  (while supplies last)
+
+  Packet of ten GDB reference cards                Y1,500 ________ __________
+
+  Packet of ten Emacs Calc reference cards         Y1,500 ________ __________
+
+  Packet of ten Bison reference cards              Y1,500 ________ __________
+
+  Packet of ten Flex reference cards               Y1,500 ________ __________
+
+  FSF T-shirt (size M)                             Y5,000 ________ __________
+  Color:  Natural or Black  (circle)
+
+  FSF T-shirt (size L)                             Y5,000 ________ __________
+  Color:  Natural or Black  (circle)
+
+  FSF T-shirt (size XL)                            Y5,000 ________ __________
+  Color:  Natural or Black  (circle)
+
+  FSF T-shirt (size XXL)                           Y5,000 ________ __________
+  Color:  Natural or Black  (circle)
+
+  Shipping                                                             Y1,500
+
+  Optional donation--help the FSF write more free software!        __________
+
+                                                             Total __________
+
+The following is your shipping label.  Please write clearly using Romaji.
+All orders must be prepaid.  See the next page for payment instructions.
+
+    Name: ___________________________________________________________________
+
+    Company: ________________________________________________________________
+
+    Address: ________________________________________________________________
+
+Please also provide the following information in case there is a problem
+with your order.
+
+  Telephone: ________________ Fax: ________________ E-Mail: _________________
+
+  ____ Please add my name to the mailing list for future FSF events in
+       Japan.  I prefer to be notified by: ______ fax _____ e-mail
+
+  ____ Please send me information regarding the GNU corporate deluxe
+       software and documentation package.
+
+  ____ My company is interested in becoming a corporate sponsor of the FSF.
+
+  ____ I am interested in working as a volunteer for the FSF.
+
+Prices and contents may change without notice after June 30, 1996.
+
+  Version: January 1996 ASCII etc/ORDERS.JAPAN
+
+ Free Software Foundation                FAX     001-1-617-542-2652
+ 59 Temple Place - Suite 330             Voice   001-1-617-542-5942
+ Boston, MA  02111-1307                  E-mail  gnu@prep.ai.mit.edu
+ U.S.A.
+\f
+
+                  GNU ORDER FORM ADDITIONAL INSTRUCTIONS
+
+You can fax your order directly to 001-1-617-542-2652.  Inquires may
+be made to gnu@prep.ai.mit.edu.  Orders may also be sent by ordinary
+mail to:
+
+    Free Software Foundation
+    59 Temple Place - Suite 330
+    Boston, MA  02111-1307
+    U.S.A.
+
+Orders may be prepaid either by credit card or by bank transfer.  The credit
+cards we accept are JCB, Visa, MasterCard, Diner's Club, Carte Blanche, and
+American Express.  Please provide your card type, expiration date, account
+number, and your signature.  Bank transfer payments should be made to the
+following account:
+
+    Bank:             Sanwa Bank
+    Branch:           Azabu Branch (#620)
+    Account name:     Free Software Foundation
+    Account number:   3683216
+
+Prices and contents may change without notice after June 30, 1996.  All
+software and publications are distributed with permission to copy and to
+redistribute.  Texinfo source for each manual is on the Source Code CD-ROM
+and/or on the appropriate tape.  We will ship the latest version of each
+manual, unless you instruct us otherwise.
+
+The minimum order amount (before postage) is Y5,000.  The FSF regrets that it
+cannot fill orders for smaller amounts.  Please contact the FSF directly by
+telephone at 001-1-617-542-5942 or by fax at 001-1-617-542-2652 prior to
+placing any orders for greater than Y500,000.
+
+The FSF offers a deluxe package to Japanese corporations which consists of
+source code in your preferred format, a set of custom binaries for
+your preferred architecture and operating system, and a complete documentation
+set with reference cards.  Purchasers of the corporate deluxe package will
+also receive invitations to future private presentations conducted by Richard
+Stallman in Japan.  The price for the corporate deluxe package is Y1,000,000.
+For more information, contact the FSF directly.
+
+Software may also be ordered on magnetic tape.  The following tape titles are
+available:
+  * Lisps/Emacs
+  * Languages
+  * Utilities
+  * Scheme
+  * 4.4BSD-Lite
+  * X11R6-Required
+    X11R6-Optional
+    X11R5-Required
+    X11R5-Optional
+
+The following tape formats are available:
+
+    Generic Unix tar 9-track 1600bpi 1/2" reel tape
+
+    Generic Unix tar DAT 4mm cartridge tape
+
+    Generic Unix tar Exabyte 8mm cartridge tape
+
+    Sun Unix tar QIC-24 DC300XLP 1/4" cartridge tape
+    (may also be read on other systems)
+
+    HP Unix tar 16-track DC600HC 1/4" cartridge tape
+
+    IBM RS/6000 Unix tar QIC-150 DC600A 1/4" cartridge tape
+    (may also be read on other systems)
+
+    VMS backup 9-track 1600bpi 1/2" reel tape
+    (only two titles:  GNU Emacs and GCC/GAS/Bison)
+
+Please indicate your desired tape titles and formats on a separate sheet of
+paper and fax that along with your order.  If you need information regarding
+which programs are on which tapes, please consult the Japanese edition of the
+January 1996 GNU Bulletin.  If you do not have a copy of the Japanese edition
+of the GNU Bulletin, please contact the FSF.
+
+For T-shirt orders, please circle desired color.
+
+Richard Stallman regrets that he cannot autograph items ordered by mail.
+If time permits, he will autograph items purchased at or brought to
+speaking engagements.
+
+All sales are final.
+
+Prices and contents may change without notice after June 30, 1996.
+
+                       Please do not fax this page.
+
+                          For use in Japan only.
+
+                         Free Software Foundation
+                        59 Temple Place - Suite 330
+                          Boston, MA  02111-1307
+                                  U.S.A.
diff --git a/etc/PACKAGES b/etc/PACKAGES
new file mode 100644 (file)
index 0000000..598c097
--- /dev/null
@@ -0,0 +1,324 @@
+* Description of available packages by category
+===============================================
+
+This data is up-to-date as of 13 January 1998.
+
+** Library Packages (libs)
+==========================
+
+These packages are required to build and support most of the rest of
+XEmacs.  By design, xemacs-base is a `regular' package.  Use restraint 
+when adding new files there as it is required by almost everything.
+
+*** Sun
+
+Support for Sparcworks.  Must be installed prior to XEmacs build to be 
+effective.
+
+*** apel
+
+A Portable Emacs Library.  Used by XEmacs MIME support.
+
+*** edebug
+
+A Lisp debugger.
+
+*** dired
+
+The DIRectory EDitor is for manipulating, and running commands on
+files in a directory.
+
+*** efs
+
+Treat files on remote systems the same as local files.
+
+*** mail-lib
+
+Fundamental lisp files for providing email support.
+
+*** tooltalk
+
+Support for building with Tooltalk.  Must be installed prior to XEmacs 
+build to be effective.
+
+*** xemacs-base
+
+Fundamental XEmacs support.  Install this unless you wish a totally
+naked XEmacs.
+
+*** xemacs-devel
+
+XEmacs Lisp developer support.  This package contains utilities for
+supporting Lisp development.  It is a single-file package so it may be 
+tailored.
+
+** Communications Packages (comm)
+=================================
+
+These packages provide support for various communications, primarily
+email and usenet.
+
+*** footnote
+
+Footnoting in mail message editing modes.
+
+*** gnats
+
+XEmacs bug reports.
+
+*** gnus
+
+The Gnus Newsreader and Mailreader.
+
+*** mailcrypt
+
+Support for messaging encryption with PGP.
+
+*** mh-e
+
+Front end support for MH.
+
+*** net-utils
+
+Miscellaneous Networking Utilities.  This is a single-file package and 
+files may be deleted at will.
+
+*** ph
+
+Emacs implementation of the ph client to CCSO/qi directory servers.
+
+*** rmail
+
+An obsolete Emacs mailer.  If you do not already use it don't start.
+
+*** supercite
+
+An Emacs citation tool.  Useful with all Emacs Mailers and Newsreaders.
+
+*** tm
+
+Emacs MIME support.
+
+*** vm
+
+An Emacs mailer.  This package must be installed prior to building XEmacs.
+
+*** w3
+
+A Web browser.
+
+** Games and Amusements (games)
+===============================
+
+*** cookie
+
+Spook and Yow (Zippy quotes).
+
+*** games
+
+Tetris, Sokoban, and Snake.
+
+*** mine
+
+Minehunt.
+
+*** misc-games
+
+Other amusements and diversions.
+
+** Mule Support (mule)
+======================
+
+*** egg-its
+
+Wnn (4.2 and 6) support.  SJ3 support.  Must be installed prior to
+XEmacs build.
+
+*** leim
+
+Quail.  Used for everything other than English and Japanese.
+
+*** locale
+
+Used for localized menubars (French and Japanese) and localized splash
+screens (Japanese).
+
+*** mule-base
+
+Basic Mule support.  Must be installed prior to building with Mule.
+
+*** skk
+
+Another Japanese Language Input Method.  Can be used without a
+separate process running as a dictionary server.
+
+** Productivity Packages (oa)
+=============================
+
+*** calendar
+
+Calendar and diary support.
+
+*** edit-utils
+
+Single file lisp packages for various XEmacs goodies.  Load this and
+weed out the junk you don't want.
+
+*** forms
+
+Forms editing support (obsolete, use the builtin Widget instead).
+
+*** frame-icon
+
+Provide a WM icon based on major mode.
+
+*** hm--html-menus
+
+HTML editing.
+
+*** ispell
+
+Spell-checking with ispell.
+
+*** pc
+
+PC style interface emulation.
+
+*** psgml
+
+Validated HTML/SGML editing.
+
+*** sgml
+
+SGML/Linuxdoc-SGML editing.
+
+*** slider
+
+User interface tool.
+
+*** speedbar
+
+??? Document me.
+
+*** strokes
+
+Mouse enhancement utility.
+
+*** text-modes
+
+Various single file lisp packages for editing text files.
+
+*** time
+
+Display time & date on the modeline.
+
+** Operating System Utilities (os)
+==================================
+
+*** eterm
+
+Terminal emulator.
+
+*** igrep
+
+Enhanced front-end for Grep.
+
+*** ilisp
+
+Front-end for Inferior Lisp.
+
+*** os-utils
+
+Miscellaneous single-file O/S utilities.
+
+*** view-process
+
+A Unix process browsing tool.
+
+** Program Editing Support (prog)
+=================================
+
+*** ada
+
+Ada language support.
+
+*** c-support
+
+Basic single-file add-ons for editing C code.
+
+*** cc-mode
+
+C, C++ and Java language support.
+
+*** debug
+
+GUD, gdb, dbx debugging support.
+
+*** ediff
+
+Interface over patch.
+
+*** emerge
+
+Another interface over patch.
+
+*** pcl-cvs
+
+CVS frontend.
+
+*** prog-modes
+
+Miscellaneous single-file lisp files for various programming languages.
+
+*** scheme
+
+Front-end support for Inferior Scheme.
+
+*** sh-script
+
+Support for editing shell scripts.
+
+*** vc
+
+Version Control for Free systems.  This package must be installed
+prior to building XEmacs.
+
+*** vc-cc
+
+Version Control for ClearCase.  This package must be installed prior
+to building XEmacs [broken as of XEmacs 20.5-beta19].
+
+*** vhdl
+
+Support for VHDL.
+
+** Word Processing (wp)
+=======================
+
+*** auctex
+
+Basic TeX/LaTeX support.
+
+*** crisp
+
+Crisp/Brief emulation.
+
+*** edt
+
+DEC EDIT/EDT emulation.
+
+*** texinfo
+
+XEmacs TeXinfo support.
+
+*** textools
+
+Single-file TeX support.
+
+*** tpu
+
+DEC EDIT/TPU support.
+
+*** viper
+
+VI emulation support.
diff --git a/etc/README b/etc/README
new file mode 100644 (file)
index 0000000..49c2065
--- /dev/null
@@ -0,0 +1,80 @@
+
+This directory contains some text files of documentation for XEmacs or
+of interest to XEmacs users, some programs used by or with XEmacs, and
+the file of on-line documentation for XEmacs.
+
+BETA                   Information about Beta versions
+CHARSETS               Character set descriptions
+CODING-STANDARDS       XEmacs C & Lisp coding standards
+CODINGS                        Character set codings
+COOKIES                        Urban Legend, or True Story? :-)
+COPYING                        GNU Public License
+COPYING.LIB            Library GNU Public License
+DEBUG                  Hints on how to debug XEmacs
+DISTRIB                        How to obtain copies of XEmacs and Emacs
+Emacs.ad               Sample Resource file
+FTP                    XEmacs FTP Mirrors
+GNU                    GNU Manifesto
+GOATS                  Complete XEmacs internals documentation
+InstallGuide           Fast track to installation
+LPF                    Information about the League for Programming Freedom
+MACHINES               List of known machines configurations (OLD)
+MAILINGLISTS           List of available Mailing lists
+MORE.STUFF             List of useful unbundled packages
+NEWS                   XEmacs 21.2 release information
+ORDERS
+ORDERS.EUROPE
+ORDERS.JAPAN           Order forms for GNU software
+PACKAGES               List of packages available for 21.2 release
+README                 This file
+README.HYPERBOLE
+README.OO-BROWSER      How to obtain Hyperbole and the OO-Browser
+SERVICE                        How to obtain paid support for free software
+TERMS                  Information about termcap entries
+TUTORIAL               Tutorial for first time users (English version)
+TUTORIAL.*             Tutorials in non-English languages
+XKeysymDB              X Keysym Database with Motif bindings
+aliases.sh             Useful shell aliases
+cbx.png                        "Created by XEmacs" logo
+check_cygwin_setup.sh  Script to check for presence of Cygwin
+ctags.1                        Ctags man page
+custom/                        Images used in Custom mode
+editclient.sh          Either start up XEmacs or connect to a running one
+emacskeys.sco          
+emacsstrs.sco          Special files for running on an SCO console
+eos/                   Images for EOS support (GUD)
+etags.1                        Etags man page
+gnu.xbm                        
+gnu.xpm                        Image of a Gnu.
+gnuattach.1            Gnuattach man page
+gnuclient.1            Gnuclient man page
+gnudoit.1              Gnudoit man page
+gnuserv.1              Gnuserv man page
+gnuserv.README         Original README file from gnuserv
+gnusref.tex            Gnus reference card
+gray1.xbm              Gray bitmap
+ms-kermit
+ms-kermit-7bit         Files for running XEmacs through kermit
+photos/*.Z             Various pictures of XEmacs developers
+recycle.xpm
+recycle2.xpm           Two versions of oversized Recycle cursor
+refcard.ps.gz          Postscript version of XEmacs reference card
+refcard.tex            XEmacs reference card
+sample.Xdefaults       Example ~/.Xdefaults file
+sample.emacs           Example ~/.emacs file
+sink.xbm               A Gnu icon
+sparcworks/            Support files for Sparcworks
+tests/                 Testcases for external widget
+time/                  Image files for display-time
+toolbar/               Image files for the toolbar
+trash.xpm              Garbage can icon
+xemacs-beta.xpm                XEmacs Beta logo
+xemacs-fe.sh           XEmacs frontend driver
+xemacs-icon.xpm
+xemacs-icon2.xbm
+xemacs-icon2.xpm
+xemacs-icon3.xpm       Various versions of an XEmacs WM icon
+xemacs-ja.1            Japanese XEmacs man page
+xemacs.1               XEmacs man page
+xemacs.xbm
+xemacs.xpm             XEmacs logo used on the splash screen
diff --git a/etc/README.HYPERBOLE b/etc/README.HYPERBOLE
new file mode 100644 (file)
index 0000000..b1e8e63
--- /dev/null
@@ -0,0 +1,6 @@
+Hyperbole is a suite of tools for enhancing productivity.
+
+The latest working version of this package with major enhancements
+is available together with professional support exclusively from their
+developer, Altrasoft Inc.  See http://www.altrasoft.com for product
+and service details.
diff --git a/etc/README.OO-BROWSER b/etc/README.OO-BROWSER
new file mode 100644 (file)
index 0000000..f572fab
--- /dev/null
@@ -0,0 +1,6 @@
+The OO-Browser is a tool for examining object oriented code.
+
+The latest working version of this package with major enhancements
+is available together with professional support exclusively from their
+developer, Altrasoft Inc.  See http://www.altrasoft.com for product
+and service details.
diff --git a/etc/SERVICE b/etc/SERVICE
new file mode 100644 (file)
index 0000000..9219b24
--- /dev/null
@@ -0,0 +1,935 @@
+                                                       -*- text -*-
+GNU Service Directory
+---------------------
+
+This is a list of people who have asked to be listed as offering
+support services for GNU software, including GNU Emacs, for a fee
+or in some cases at no charge.
+
+The information comes from the people who asked to be listed;
+we do not include any information we know to be false, but we
+cannot check out any of the information; we are transmitting it to
+you as it was given to us and do not promise it is correct.
+Also, this is not an endorsement of the people listed here.
+We have no opinions and usually no information about the abilities of
+any specific person.  We provide this list to enable you to contact
+service providers and decide for yourself whether to hire one.
+
+Before FSF will list your name in the GNU Service Directory, we ask
+that you agree informally to the following terms:
+
+1. You will not restrict (except by copyleft) the use or distribution
+of any software, documentation, or other information you supply anyone
+in the course of modifying, extending, or supporting GNU software.
+This includes any information specifically designed to ameliorate the
+use of GNU software.
+
+2. You will not take advantage of contact made through the Service
+Directory to advertise an unrelated business (e.g., sales of
+non-GNU-related proprietary information).  You may spontaneously
+mention your availability for general consulting, but you should not
+promote a specific unrelated business unless the client asks.
+
+Please include some indication of your rates, because otherwise users
+have nothing to go by. Please put each e-mail address inside "<>".
+Please put nothing else inside "<>".  Thanks!
+
+For a current copy of this directory, or to have yourself listed, ask:
+       gnu@prep.ai.mit.edu
+
+** Please keep the entries in this file alphabetical **
+
+\1f
+Altrasoft      <info@altrasoft.com>
+4880 Stevens Creek Blvd., Suite 205
+San Jose, CA  95129-1034
++1 408 243 3300
+http://www.altrasoft.com
+
+Altrasoft provides corporate-quality support, development and user
+documentation for GNU Emacs, XEmacs and InfoDock.  (InfoDock is a turnkey
+information management and software development toolset built atop emacs,
+written by one of our associates.)  Emacs distributions for a variety of
+platforms are also available, as is support for other emacs variants, such as
+those often found on PCs.
+
+Our unique focus on emacs-related work allows us to attract expert talent in
+this area to keep you on the leading edge of productivity, especially if you
+do software development work.  We do the porting, patching, coding,
+integrating, debugging, documenting and testing so that your people spend
+much more productive time on their mainline tasks.
+
+Standard support packages include help on all aspects of the packages
+supported, including all tools shipped as a standard part of the original
+package distribution.  In general, we want to give you an unbelievably strong
+level of support, so where we can, we will also answer questions concerning
+any add-on Lisp code that is used at your site.  Setup and customization
+help, bug fixes, and announcements of new releases are, of course, included.
+
+Support rates start at $1,000 USD, for single user support for one year.
+Discounts are available for group contracts.  We also offer Golden Support
+contracts for those who need the absolute best in mission-critical support;
+contact us for details.  Hourly development rates and fixed bid work are
+available.
+
+Updated 20-March-1997.
+\1f
+Joseph Arceneaux               <jla@ai.mit.edu>
+PO Box 460633                  http://www.samsara.com/~jla
+San Francisco, CA  94146-0633
++1 415 648 9988
++1 415 285 9088
+
+Recently led the project making Wells Fargo Bank the first to provide
+secure customer account access over the Internet.
+
+Former FSF staffmember.  Performed X11 implementation of Emacs version
+19, designed and implemented WYSIWYG Emacs.  Installed and
+administered FSF network.  Maintainer of GNU indent.  Over 15 years
+experience with Unix and other systems, from writing ROM monitors to
+UI design and system administration.
+
+I provide installation, porting, debugging and customization or
+development of GNU and other Unix software.  I also design and
+implement free software projects and consult on software engineering
+and systems design.  Handholding and  teaching services are also
+available as well as things like LAN and compute--infrastructure design.
+
+Time and material rates around $150 USD per hour, depending upon the
+particular job.  I am also very interested in fixed-bid jobs.  For
+selected non-profit organizations with worthy goals, I work for free.
+
+Updated: 17Oct95
+\1f
+Gerd Aschemann         <aschemann@Informatik.TH-Darmstadt.de>
+Osannstr. 49
+D-64285 Darmstadt
+Tel.: +49 6151 16 2259
+http://www.informatik.th-darmstadt.de/~ascheman/
+
+- System Administrator (UNIX) at CS Department, TU Darmstadt, Germany
+- 15 years expirience with CS, Systemadministration on different platforms
+-  8 years with UNIX/Networking/FreeWare/GNU/X11
+-  6 years organizer of Operating Systems and Distributed Systems courses
+- Lectures on System and Network Administration
+- Platforms: Solaris, SunOS, Ultrix, OSF1, HP-UX, Linux, FreeBSD, AIX
+- Experience with parallel environments (Connection Machine, Meiko, Parsytec)
+- Consultant for other UNIX users at TU Darmstadt
+
+Rates are at 100,-- DM (~60 US$) per hour minimum, depending on the job.
+I am willing to travel for sufficiently large jobs.
+
+Updated: 17Oct95
+\1f
+Giuseppe Attardi       <attardi@di.unipi.it>
+Dipartimento di Informatica
+Corso Italia 40
+I-56125 Pisa, Italy
++39 50 887-244
+
+GNU: help on obtaininig GNU, for italian sites.
+
+Updated: 5Apr94
+\1f
+James Craig Burley
+97 Arrowhead Circle
+Ashland, MA 01721-1987
+508 881-6087, -4745
+(Please call only between 0900-1700 Eastern time, and only if you
+are prepared to hire me -- ask me to help you for free only
+via email, to which I might or might not respond.)
+Email: <burley@gnu.ai.mit.edu> --preferred--
+       <burley@cygnus.com>
+       <burley@world.std.com>
+
+Expertise:
+    Compiler Internals (author of GNU Fortran, for example)
+    Operating Systems Internals
+    Tools/Utilities Development and Maintenance
+    Microcode Development and Maintenance (primarily VLIW machines)
+    System Design (computers, operating systems, toolsets, &c)
+    Debugging (often asked to help debug Other People's Code)
+    Documentation (authored many books and ran a few doc projects)
+    Extensive experience with a variety of operating systems, hardware,
+       languages, and so on
+
+Rate: $70/hour -- willing to consider flat-fee arrangements
+
+Updated: 14Aug95
+\1f
+Michael I. Bushnell            <mib@gnu.ai.mit.edu>
+545 Technology Square, NE43-426
+Cambridge, MA  02139
+(617) 253-8568
+
+All GNU software: Installation, customization, answering simple or
+                 complex questions, bug fixing, extension.
+
+Experience:  I have done Unix and GNU programming for several years,
+            I am the primary author of the Hurd (which provides most
+            kernel related facilities for the GNU OS).
+
+I am easily available in the Cambridge/Boston area; work via email.
+I am willing to travel for sufficiently large jobs.
+
+Rates: $100/hr, negotiable, less for non-profit organizaions.
+
+Updated: 5Apr94
+\1f
+C2V                    Renaud Dumeur <renaud@ccv.fr>
+82 bd Haussmann                Michel Delval <mfd@ccv.fr>
+75009 Paris            Jean-Alain Le Borgne <jalb@ccv.fr>
+France
+Tel (1) 40.08.07.07
+Fax (1) 43.87.35.99
+
+We offer source or source+binary distribution, installation, training,
+maintenance, technical support, consulting, specific development and
+followup on the GNU software development environment: Emacs, gcc/g++,
+binutils, gas, gdb.
+
+Experience: adapted gcc, gas and binutils to work as cross-development
+tools for the Thomson st18950 DSP chip: GCC parser and typing system
+have been augmented to allow the manipulation of variables located in
+separated memory spaces. Porting on new platforms, and professionally
+developing software with the GNU tools in the Unix/X11 environment
+since they were first available.
+
+Rates: from 2000 FF/day to 150 000 FF/year, 40% discount for
+educational institutions, add taxes and expenses.  Ask for list.
+
+Entered: 5May94
+\1f
+Contributed Software
+Graefestr. 76
+10967 Berlin, Germany
+phone:   (+49 30) 694 69 07
+FAX:     (+49 30) 694 68 09
+modems:          (+49 30) 694 60 55 (5xZyXEL )
+modems:          (+49 30) 693 40 51 (8xUSR DS)
+email:   <info@contrib.de>
+internet: uropax.contrib.de [192.109.39.2], login as 'guest'.
+
+We distribute, install, port, teach and support free software
+in general, i.e. X11, GNU, khoros etc. Rates are ECU 80,-- plus
+tax per hour. We offer maintenance and support contracts for full
+customer satisfaction.
+Highlights are transparent development environments for multi-platform
+sites and configuration management.  Traveling is no problem.
+
+Free Archive login for downloading on above modem numbers.
+
+Updated: 5Apr94
+\1f
+Stuart Cracraft                <cracraft@ai.mit.edu>
+25682 Cresta Loma
+Laguna Niguel, Ca.
+92677
+GNUline: 714-347-8106
+Rate: $75/hour
+Consultation topics:
+  Entire GNU suite - porting, compilation, installation,
+  user-training, administrator-training
+Method: telephone line support, call-in via modem to your site,
+or direct visit.
+
+Experience: supporting GNU since the mid-1980's, coordinator
+of GNU Chess (original author), GNU Shogi, GNU Go. Ported GNU Emacs
+to Solaris (System V Release 4). Expertise in C, Emacs Lisp, and Perl.
+Customized programming also available.
+
+Entered: 5Apr94
+\1f
+Cygnus Support                 <info@cygnus.com>
+1937 Landings Drive            ...uunet!cygint!info
+Mountain View, CA 94043 USA
++1 415 903 1400 voice
++1 415 903 0122 fax
+
+Cygnus Support
+48 Grove Street
+Somerville, MA 02144
++1 617 629 3000 voice
++1 617 629 3010 fax
+
+Cygnus Support continues to provide supported, maintained versions of
+the GNU toolset including GCC, G++, the GNU debugger with graphical
+user interface, GNU linker, GNU macro-assembler and Emacs 19. In
+keeping with the rapidly advancing needs of software developers,
+Cygnus maintains a 90 day release cycle of the GNU toolset. Each
+release is regression tested and includes substantial improvements and
+additions to the existing matrix of over 65 supported platform
+configurations.
+
+Updated: 2Feb95
+\1f
+Edgar Der-Danieliantz  <EDD@AIC.NET> <edd@ns.aic.net> <edd@arminco.com>
+P.O. Box 10                    
+Yerevan 375009 AM      
+ARMENIA
+Support for GCC (C & Objective C), X Window System, 
+World Wide Web, x86-based embedded systems, logic programming, etc.
+Via Internet (mail, talk, irc, etc.)
+Experience:
+   OS's: 4.3 & 4.4 BSD, SVR3.2 & 4.2, FreeBSD, Linux,
+      NetBSD, SCO, Solaris, SunOS, Ultrix, NEXTSTEP, UnixWare.
+   Languages: C, C++, Objective C, Pascal, Tcl/Tk, Perl,
+      Bourne Shell, PostScript, HTML, Prolog.
+   Platforms: Intel, SPARC, Mac, VAX, NeXT.
+Rates: Depending on type of work, appx $20/hour. Contact for more information.
+   Negotiable for individuals and non-profit organizations.
+   FREE for individuals who can't pay. Your 'Thanks!' just enough! :-)
+   Payment by international wire transfer.
+
+Entered: 6Mar96
+\1f
+Free Software Association of Germany
+Michaela Merz
+Heimatring 19
+6000 Frankfurt/Main 70
+phone:   (+49 69) 6312083)
+ert  :   (+49-172-6987246)
+email:   (info@elara.fsag.de)
+
+Supporting all kinds of freeware (i.e. GNU), freeware development, consulting,
+training, installation.         Special LINUX support group.
+
+RATES:
+
+Companies and for profit
+organizations             :  100 US$ / hour
+Private and not-for-profit
+organizations             :   40 US$ / hour
+ert (24h Emergency
+response team)            :  300 US$ / hour
+
+Entered: 14Apr94
+\1f
+Noah Friedman             <friedman@prep.ai.mit.edu>
+Building 600, Suite 214             2002-A Guadalupe St. #214
+One Kendall Square                  Austin, TX 78705
+Cambridge, MA  02139                (Local, faster to reach me)
+(Permanent)
+
+
+Author of several Emacs Lisp packages and parts of Emacs 19, as well as
+numerous utilities written in shell script and perl.  Co-maintained GNU
+Texinfo and Autoconf for a couple of years.  System administrator for a
+network of heterogenous machines.  FSF employee Feb 1991--Sep 1994.
+
+I can perform installation, porting, and enhancement of all GNU software
+and any other free software; system administration for unix-type systems
+and ethernet networks; and I am willing to teach shell programming and
+Emacs Lisp.
+
+Fees negotiable, averaging $60-$75/hour.  I can work in the Austin, TX area
+or anywhere accessible on the Internet.  For larger jobs I may be willing
+to travel.
+
+Updated: 16Aug95
+\1f
+Ronald F. Guilmette    <rfg@monkeys.com>
+Infinite Monkeys & Co.
+1751 East Roseville Pkwy. #1828
+Roseville, CA 95661
+Tel: +1 916 786 7945
+FAX: +1 916 786 5311
+
+Services:      Development & porting of GNU software development tools.
+
+GNU Contributions:
+               Invented, designed, and implemented the protoize and
+               unprotoize tools supplied with GCC2.
+
+               Designed and developed all code to support the generation
+               of Dwarf symbolic debugging information for System V Release
+               4 in GCC2.
+
+               Performed original port of GNU compilers to SVr4 system.
+
+               Finished port of GNU compilers to Intel i860 RISC
+               processor.
+
+Experience:    13+ years UNIX systems experience, all working on compilers
+               and related tools.
+
+               7+ years working professionally on GCC, G++, and GDB under
+               contract to various firms including the Microelectronics
+               and Computer Technology Corporation (MCC), Data General (DG),
+               Network Computing Devices (NCD), and Intel Corp.
+
+Other qualifications:
+               Developer of the RoadTest (tm) C and C++ commercial
+               compiler test suites.
+
+               Former vice-chairman of UNIX International Programming
+               Languages Special Interest Group (UI/PLSIG).
+
+               Bachelor's and a Master's degrees, both in Computer Science.
+
+Rates:         Variable depending upon contract duration.  Call for quote.
+
+Updated: 23Sep95
+\1f
+Hundred Acre Consulting                <info@pooh.com>
+1155 W Fourth St Ste 225
+PO Box 6209
+Reno NV 89513-6209
+(702)-348-7299
+Hundred Acre is a consulting group providing support and development
+services to organizations of all sizes.         We support GNU C++ and C in
+particular, but also provide support for all other GNU software and
+certain non-GNU public domain software as well.         We work on a "service
+contract" basis for support -- for a yearly fee, we provide multiple
+levels of email and toll free telephone support, and free updates and
+bug fixes. The highersupport levels have on-site support.  Development
+is charged on either an hourly or fixed bid basis.
+
+Consulting rates: $70 to $90 per hour, or fixed bid.
+Support contracts:  Several levels, from $495 to $90000 per year.
+
+Updated: 27Dec94
+\1f
+Interactive Information Limited
+
+Interactive Information Limited is an Edinburgh-based company that
+specialises in WWW services and support for using the Internet for
+marketing.
+
+Our staff have many years experience in using, and developing lisp packages
+within, Emacs, and in using other GNU/Unix tools, particularly under public
+domain UNIXes.
+
+We can provide services throughout the UK, at any level from general
+consultancy through fetching, installing and customising software to
+bespoke programming.  Fees would be in the range #300 - #600 per day,
+depending primarily on the size of the job.
+
+You can contact us
+       by email: <enquire@interactive.co.uk>
+       by phone: 0370 30 40 52 (UK)
+                 (+44) 370 30 40 52 (International)
+       by post: 3, Lauriston Gardens,
+                Edinburgh EH3 9HH
+                Scotland
+
+Entered: 13Nov95
+\1f
+Scott D. Kalter                        <sdk@mithril.com)
+2032 Corral Canyon
+Malibu, CA 90265-9503
+Home: (310) 456-0254
+
+Emacs: Eoops, Elisp, and C level customization/extension training for
+       general use and customization user support, installation, and
+       troubleshooting.
+
+Rates: $50/hr
+       May answer brief and interesting questions for free.
+       Prefer e-mail communication to telephone.
+
+Qualifications: BS Math/CS 1985: Carnegie Mellon University
+               MS CS 1988: UCLA
+
+       Very familiar with all levels of elisp programming.  Taught
+       Emacs use and customization in universities and industry.  Extensive
+       troubleshooting and user support experience.  Co-developed an
+       object-oriented extension to Elisp that can be used for
+       projects.  Extensive Elisp level modification for  rapid
+       prototyping of designs used in groupware research.  This
+       includes the development of an infrastructure to support
+       multiple, communicating Emacs processes.
+
+Updated: 6Apr94
+\1f
+KAMAN SCIENCES CORPORATION
+258 GENESEE STREET
+UTICA  NY  13502
+(315) 734-3600
+
+CONTACTS: Alan Piszcz (peesh)      <apiszcz@utica1.kaman.com>
+        : Dennis Fitzgerald        <dennis@utica.kaman.com>
+
+Kaman Sciences has performed a GNU port for a custom RISC processor.
+We have experience in the definition and description of the machine
+register transfer language to the GNU tool-set.  This includes rewriting
+and modification of the necessary description and source files of gcc, gas,
+and gld and other binutils.  Kaman also has services for installation and
+setup of GNU tools, (GAWK, GCC, EMACS, etc.) on Sun workstations.
+
+Work is on a "service contract" basis and development is charged either
+hourly or as a fixed price contract.
+
+Consulting rates: $70 to $200 per hour.
+
+Entered: 13Jan95
+\1f
+Scott J. Kramer                <sjk@aura.nbn.com>
+P.O. Box 620207
+Woodside, CA  94062
++1 415-941-0755
+
+GNU Software:  Tutoring, installations/upgrades, Emacs Lisp customizations,
+               general troubleshooting/support.  Prefer that work I do
+               becomes part integrated into official Free Software Foundation
+               distributions.
+
+Systems Administration:         Sun (SunOS & Solaris) and SGI (IRIX)
+                        UNIX hardware/software platforms.
+
+Rate:  Task- and time-dependent; non-monetary offers accepted.
+
+Updated: 12Apr94
+\1f
+Fen Labalme                  <fen@comedia.com)
+Broadcatch Technologies
+40 Carl St. #4                WE ARE EVERYWHERE
+San Francisco CA 94117         JUST SAY "KNOW"
+(415) 731-1174                  ARE YOU KIND?
+
+Rates: $80 hour (negotiable); quick email or phone questions free.
+       Lower rates -- free of barter -- for schools and non-profits.
+
+Consulting, installation, customization and training for GNU Emacs,
+and selected other GNU & network software (but not G++).  I have been
+hacking Emacs since '76 when it was TECO and ^R macros (don't ask).
+
+Updated: 6Apr94
+\1f
+Greg Lehey
+LEMIS
+Schellnhausen 2
+36325 Feldatal
+Germany
+
+Phone: +49-6637-919123
+Fax:   +49-6637-919122
+Mail   <grog@lemis.de>
+
+Services: Supply, porting, installation, consultation on all GNU
+products.
+
+Experience: 20 years OS and compiler experience, portations of most
+GNU products.  Author of ported software CD-ROM for Unix 4.2.
+
+Rates: Choice of DM 150 per hour or hotline rates 3 DM per minute + 10
+DM per phone call. Quick questions may be free. Limited free support
+available for purchasers of LEMIS CD-ROMs.
+
+Updated: 21Feb95
+\1f
+Marty Leisner     <leisner@sdsp.mc.xerox.com>
+332 Shaftsbury Road
+Rochester, New York  14610
+Home:(716) 654-7931
+
+Experience: 12 years C/Unix, 7 years DOS.
+           Extensive experience with GNU binary tools, cross-compilers,
+           embedded/hosted systems, realtime.
+Degree :    BS CS, Cornell University
+Rates:     $75/hr
+
+
+
+marty
+<leisner@sdsp.mc.xerox.com>  <leisner@eso.mc.xerox.com>
+
+Updated: 15Apr94
+\1f
+Richard Levitte             (in TeX: Richard Levitte
+Södra Långgatan 39, II               S\"odra L{\aa}nggatan 39, II
+S-171 49  Solna                      S-171 49  Solna
+Sweden                               Sweden)
+Tel.nr.:  +46 (8) 18 30 99     (there is an answering machine)
+e-mail:          <levitte@e.kth.se> (preferred)
+         <levitte@vms.stacken.kth.se>
+
+What I do:
+       Primarly I work on GNU software for VMS, both VAX and AXP.  I
+       also work on GNU stuff for Unix on occasion.  I'm familiar with
+       SunOS (version 4.x.x), BSD (version 4.2 and up),
+       Ultrix (version 4.2 and up).
+       I've been porting GNU Emacs to VMS since spring 1991.  This
+       includes versions 18.57 to 18.59 and version 19.22.
+       I maintain GNU vmslib.
+
+Programs supported:
+       GNU vmslib:     extending, installation, upgrading aid,
+                       simple and complex questions, you name it.
+       GNU Emacs:      porting, extending, installation, upgrading aid,
+                       customization, simple or complex questions,
+                       training, you name it.
+       GNU autoconf:   porting, extending, installation, upgrading aid.
+       GNU zip, diffutils, m4, patch, texinfo:
+                       porting, installation, upgrading aid.
+       GNU C/C++:      installation, upgrading aid.  I might start to
+                       hack at it some day.
+
+The list of programs I currently support represents both my interests and
+current priorities.  Your interest and funding can influence my priorities.
+
+Experience:
+       Fluent in C, C++, Emacs Lisp, Pascal as well as assembler
+       on VAX, Motorola 680x0, Intel 8086 and 80x86.  Modified key
+       elements in Emacs (e.g., memory and process management) to work
+       transparently on VMS.  I have very good knowledge in the VMS
+       operating system, as well as MS-DOS and IBM PC compatibles.
+       I have worked for four and a half years as a VMS system manager.
+       I've also provided consulting services on IBM PC compatibles,
+       as well as held classes for IBM PC users.
+       A reference list is available on request.
+
+Your Rate:
+       $50-$80/hour (400-700 SEK in sweden), plus expenses.  My rates
+       are negotiable, depending on how interesting the project is to me.
+
+
+Entered: 18Aug94
+\1f
+Roland McGrath         <roland@frob.com>
+545 Tech Sq, Rm 426
+Cambridge, MA  02139
+Work: (617) 253-8568
+
+Co-author of GNU Make (with Richard Stallman); maintainer of GNU Make.
+Author and maintainer of the GNU C Library and co-author of the GNU Hurd.
+Author of several GNU Emacs Lisp packages and parts of GNU Emacs 19.
+FSF employee summer 1989, fall 1990 to the present.
+
+Installation, maintenance, porting, enhancement of all GNU software.  I can
+install GNU software and maintain its installation on call via the Internet.
+
+Fees negotiable; $75-$100/hour, higher for very short term projects.  I can
+work anywhere in the Boston or SF Bay Area, or anywhere on the Internet.  I
+am working full-time for the FSF on the GNU Hurd, so I am likely to take on
+only jobs that either can be done entirely via the Internet and are
+short-term, or that are very interesting.
+
+Updated: 21Jan95
+\1f
+Erik Naggum            <erik@naggum.no>
+P.O. Box 1570 Vika     http://www.naggum.no
+0118 OSLO              phone: +47 2295 0313
+NORWAY                 NIC handle: EN9
+
+Have extensive experience with Unix and C (since 1983), Internet protocols
+(1987), International Standards for character sets (1988), SGML (1990),
+ANSI Common Lisp (1994); Emacs user and programmer from 1984 to 1987
+(TOPS-20) and 1991 to present (Unix).  Have worked on GNU Emacs development
+since early 1994, both in Emacs Lisp and C.  Have been tracking development
+code for Emacs since mid-1995, and know new versions intimately.
+
+Services offered: installation, support, customization, and development of
+new packages, plus courses and seminars from basic usage through Emacs Lisp
+programming to writing extensions in C.  General aid with all GNU software.
+
+Rates depend on duration of work: From $6/minute for <= 1 hour, to $500/day
+for >= 1 month.  Service agreements are encouraged.  Cover Scandinavia for
+on-site work.  Remote debugging and help by mail available for smaller
+fees, without limits to distance.
+
+Please call only about actual work, I prefer mail for all other questions.
+
+I accept VISA and Mastercard, preferred for remote jobs and small amounts.
+\1f
+Wolfgang S. Rupprecht          <wolfgang@wsrcc.com>
+47 Esparito Ave.
+Fremont, CA 94539-3827
+(510) 659-9757
+
+Anything, (lisp, C, customization, porting, installing) I have
+written thousands of lines of GNU Emacs C and Lisp code.  Original
+author of the floating point additions in Emacs 19.
+
+Rates: $95/hr.
+
+Updated: 14Apr94
+\1f
+Signum Support AB              <info@signum.se>
+Box 2044     _                 ...!seunet!signum!info
+S-580 02 Linkoping, Sweden
++46 13 21 46 00 voice
++46 13 21 47 00 fax
+
+Signum Support AB is a company dedicated to supporting, developing
+and distributing free software for, including but not limited to,
+UNIX systems. The people behind Signum Support AB have many years
+of general UNIX experience, both as system administrators and as
+programmers, and also extensive experience in maintaining the GNU
+programs, both administrating it and finding and fixing bugs.
+
+Services offered:
+
+ - Installation and customizing GNU and other free software.  We will
+   make free software as easy to install and use as shrink wrapped
+   programs.
+ - Warranty protection.
+ - Customization and porting.
+ - Subscriptions to new versions which we will send monthly or with
+   any other interval.
+ - Finding, Recommending and Investigation of free software in any
+   area of the customers choise.
+ - Regular consulting.
+
+Rates: For software items, request our price list.
+       For consulting, 400-800 SEK/hour.
+
+Updated: 14Apr94
+\1f
+Small Business Systems, Inc.           <postmaster@anomaly.sbs.com>
+Box 17220, Route 104
+Esmond, RI  02917
+401.273.4669
+
+Rate:  Varies depending on complexity of task.
+       Hourly and fixed-rate contracts are available.
+Programs Supported:    All
+
+Updated: 14Apr94
+\1f
+Julian H. Stacey.  <stacey@freefall.cdrom.com>
+Vector Systems Ltd, Holz Strasse 27d, D 80469 Munich (Muenchen), GERMANY.
+Tel. +49 89 268616  (089 268616 in Germany)  09:00-21:00 Timezone=GMT+01:00
+
+Sources: All FSF/GNU, FreeBSD-current, X-Windows, XFree86, NetBSD, Mach, etc.
+       (Plus various other things, such as, but not limited to:
+         blas blt cflow CAD cnews crypt dvi2lj eispack elm encryption expect
+         ezd f2c flexfax gic gopher info-zip ingres inn jpeg kermit ksh
+         less lha linpack md5 mh mprof mtools mush nntp octave pbmplus
+         popper sather sc schemetoc slurp sml spreadsheet sup tcl tcl-dp
+         tcsh tcx term tex tiff tk top trn unarj ups urt wine xlock xv
+         xview xxgdb zmodem zip zircon zoo zsh.)
+Media: QIC 1/4" Cartridge 525M, 150M, & 60M, TEAC CAS-60 60M Cassette,
+       CD-ROM, Floppies 1.4M & 1.2 & 720K & 360K. DAT arrangeable.
+       Postal Service C.O.D.(=`Nachnahme') or pre payment available.
+Commercial Consultancy:
+       Custom Designs, Provision & support of FreeBSD or Unix, C, FSF tools,
+       X Windows, own tools, systems engineering, hardware interfacing,
+       multi lingual European, Cyrillic & Chinese tools & systems,
+       Unix, MSDOS, real time etc, communications & scientific & industrial.
+DEUTSCH + FRANCAIS:
+       Man kann mir in Deutsch schreiben, (oder mich anrufen).
+       Je comprend Francais, mais je n'ecris pas des responses en Francais.
+       (Contact me in English, German, or French).
+FREE for Symmetric Computer Systems Model 375 owners:
+       Free Binaries & sources on SCS/375's TEAC 50/60M Cassette, for:
+       GCC-1.40, UUCP-1.4, Ghostscript 2.3, Tar-1.08, Gzip-1.2.2 etc.
+       (Native SCS compiler can't compile GCC on this NSC32016 based BSD4.2)
+On Request:  Resume, Company Profile, Index of public & proprietary tools,
+Rate:  ~120 DM/hour. ~100DM/Cartridge.  (1.5DM = $1 USA = 0.6 UK Pounds @4/'94)
+Short enquiries free. (Kurze Anfragen Ohne Gebuhr).
+
+Updated: 14Jun94
+\1f
+Richard M. Stallman    <rms@prep.ai.mit.edu>
+UUCP:  {mit-eddie,ucbvax,uunet,harvard,uw-beaver}!ai.mit.edu!rms
+545 Tech Sq, Rm 430
+Cambridge, MA 02139
+
+Emacs: anything whatever
+Is anyone interested in courses in using or extending GNU Emacs?
+
+Original inventor of Emacs and main author of GNU Emacs and GCC.
+
+Rates: $6/min or $250/hr.
+
+Updated: 14Apr94
+\1f
+JoS-Ware Comp Tech     Johan Svensson <support@spird.jos.ec.lu.se>
+Box 739
+220 07 LUND
+SWEDEN
+Tel +46-46-104505 (Dept. of Economics, University of LUND)
+Fax +46-46-188445 (JoS-Ware Comp Tech)
+
+What:  We offer consulting services regarding installation,
+       customization, troubleshooting, porting and integration
+       of all free software, including GNU software.
+
+Spec.: Network integration, integration of public domain software
+       into commercial systems, WorldWideWeb, C, X-Windows, Linux,
+       networked information systems
+
+How:   Remote login over internet, email, modem, phone, personal
+       visits (in southern Sweden mainly)
+
+Rates: 550SEK (+ tax) per hour within Sweden
+       370SEK (+ tax) per hour within Sweden for educational org.
+       US $90 per hour outside Sweden
+       US $70 per hour outside Sweden for educational org.
+       Note: fees may vary and special arrangements may be considered
+
+Entered: 7Apr94
+\1f
+Kayvan Sylvan <kayvan@satyr.Sylvan.COM>
+Sylvan Associates
+879 Lewiston Drive
+San Jose, CA 95136
+Phone: 408-978-1407
+
+I will help you port, install and customize GNU Emacs, GCC, G++,
+bison, and other GNU tools on almost any architechture and operating
+system. Questions answered. GNU C and lisp hacking available. I will
+also do ongoing support and periodic upgrades if you get on my GNU
+software subscription list.
+
+Rates: $60-$100/hour, depending on type of work. Substantial discounts
+for long-term contracts and also for educational or non-profit
+institutions.
+
+Experience: Many different Unix systems (2.9BSD to 4.4BSD, SVR3 and
+SVR4, Linux, Xenix). Systems programming and system administration on all
+brands of Unix. Kernel hacking experience. Lots of porting experience.
+I can port anything to anything (within reason).
+
+Updated: 14Apr94
+\1f
+Leonard H. Tower Jr.   <tower@prep.ai.mit.edu>
+36 Porter Street
+Somerville, MA 02143, USA
++1 (617) 623-7739
+
+Will work on most GNU software.
+Installation, handholding, trouble shooting, extensions, teaching.
+
+Rates: 100.00/hour + travel expenses.  Negotiable for non-profits.
+
+Experience: Have hacked on over a dozen architectures in many languages.  Have
+system mothered several varieties of Unixes.  Assisted rms with the front end
+of gcc and it's back-end support.  Resume available on request.
+
+Entered: 14Apr94
+\1f
+UrbanSoft AO  <info@usoft.spb.su>
+68 Malooktinskii Prospect
+St. Petersburg, Russia 195272
+
+Custom GhostScript and TeX programming by e-mail.
+Database documents, directories, standard forms.
+
+UrbanSoft uses a portion of its revenues to contribute
+diskette distributions of GNU software to Russian
+universities (most of which lack FTP access).
+
+Rates: 30,000 rubles (currently USD 16.80) per hour.
+       Fixed rate contracts also possible.
+       Payable by bank transfer.
+
+Updated: 20Apr94
+\1f
+noris network
+Matthias Urlichs
+Schleiermacherstrasse 12
+90491 Nuernberg
+Germany
+Phone: +49 911 9959621
+Fax: +49 911 5980150
+<info@noris.de>
+http://info.noris.de/ (German)
+
+Expertise:
+  OS internals, esp. Linux and BSD, esp. device drivers
+  Network protocol / program design and coding
+  Utilities coding and maintainance
+  Program debugging, testing
+  User interface design and testing
+  Several programming and tool languages
+
+Services:
+  Installation, debugging, enhancement, distribution,
+    for all kinds of free software.
+  System administration for most Unix-like systems.
+  Email, Fax, phone, and in-person consulting (and/or "question answering").
+  Remote support and system monitoring (over the Internet),
+  Update service (new tools tested and installed automagically)
+  Internet access
+
+Rates:
+  DM 110 (~$70) per hour
+  Support contracts start at DM 170/month + DM 30/supported system.
+  Willing to travel for sufficiently large jobs.
+  Rates don't include taxes.
+
+Entered: 16Aug94
+\1f
+Joe Wells <jbw@cs.bu.edu>
+Postal Address:
+  care of: Boston University Computer Science Department
+  111 Cummington Street, Room 138
+  Boston, Massachusetts 02215
+Work Telephone: (617) 353-3381 (sorry, but no answering machine or voice mail)
+Home Telephone: (617) 739-7456 (until August 1995)
+Finger "jbw@cs.bu.edu" for up-to-date contact information.
+
+Experience:
+    I have B.A. and M.A. degrees in Computer Science and have completed
+    all but the dissertation for a Ph.D. in C.S.  My research for my
+    Ph.D.  is in the areas of logic, type systems, and programming
+    language theory.  My primary programming languages are Emacs Lisp,
+    Perl, and Bourne shell, but of course I can program in any language.
+    I have written numerous Emacs Lisp packages.  I started the USENET
+    "List of Frequently Asked Questions about GNU Emacs with Answers" and
+    maintained it for more than two years.  Most of my work has been
+    related to the telephone system (modems, voice mail, etc.), but I am
+    not limited to that.  Send e-mail for my complete resume or curriculum
+    vita.
+
+Programs supported:
+    GNU Emacs and Taylor UUCP:
+      Installation, training, customization, bug fixing, troubleshooting,
+      extension, development, porting, or answering any kind of question.
+    Any other GNU program:
+      The same things, but I don't necessarily have huge amounts of
+      experience with the particular program.
+
+Working conditions:
+    I am usually available for part-time work (less than 20 hours per week
+    including any travel time).  I can sometimes make time for full-time
+    work for a month or two; please inquire.  I can either work in or near
+    Boston or via the Internet or via telephone; travel outside the Boston
+    metropolitan area can be negotiated.  My schedule is very flexible.
+    Any programs I write will normally have the copying conditions of the
+    GNU General Public License; this is negotiable.
+
+Rates: $65/hour as an independent contractor.
+       travel and telephone expenses.
+       higher rates if extensive travel is required.
+
+Updated: 27Sep94.
+\1f
+Herb Wood
+phone: 1-415-789-7173
+email: <ru@ccnext.ucsf.edu>
+
+I'm a better "planner" than I am a hacker.  A really good hacker will be able
+to keep many pieces of information in their short-term memory and to memorize
+new pieces of information at a fast rate.  This is not my strong point.
+Rather, I excel in domains that require knowledge of the slightly more
+theoretical parts of computer science --for example, logic, formal methods of
+program development, and functional programming.  I can write, and I have
+"tutoring" (teaching one-on-one) experience, an, unlike some programmers,
+I enjoy doing these things.
+
+I have spend a lot of time looking at the Emacs Lisp sources and customizing
+Emacs and VM.  I think I can customize Emacs and its packages quickly and
+effectively.
+
+Entered: 30Jul95
+\1f
+Yggdrasil Computing, Inc./ Freesoft, Inc.      <info@yggdrasil.com>
+4880 Stevens Creek Blvd. Ste. 205
+San Jose, CA  95129
+(408) 261-6630
+(800) 261 6630
+
+Updated: 14Apr94
+\1f
+
+For a current copy of this directory, or to have yourself listed, ask:
+       gnu@prep.ai.mit.edu
+
+** Please keep the entries in this file alphabetical **
diff --git a/etc/TERMS b/etc/TERMS
new file mode 100644 (file)
index 0000000..0245fe2
--- /dev/null
+++ b/etc/TERMS
@@ -0,0 +1,229 @@
+This file describes what you must or might want to do to termcap entries
+to make terminals work properly and efficiently with Emacs.  Information
+on likely problems with specific types of terminals appears at the end
+of the file.
+
+*** What you want in a terminal ***
+
+Vital
+1. Easy to compute suitable padding for.
+2. Never ever sends ^S/^Q unless you type them, at least in one mode.
+
+Nice for speed
+1. Supports insert/delete of multiple lines in one command.
+2. Same for multiple characters, though doing them one by
+one is usually fast enough except on emulators running on
+machines with bitmap screens.
+
+Nice for usability
+1. Considerably more than 24 lines.
+2. Meta key (shift-like key that controls the 0200 bit
+in every character you type).
+
+*** New termcap strings ***
+
+Emacs supports certain termcap strings that are not described in the
+4.2 manual but appear to be standard in system V.  The one exception
+is `cS', which I invented.
+
+`AL'    insert several lines.  Takes one parameter, the number of
+        lines to be inserted.  You specify how to send this parameter
+       using a %-construct, just like the cursor positions in the `cm'
+       string.
+
+`DL'    delete several lines.  One parameter.
+
+`IC'    insert several characters.  One parameter.
+
+`DC'    delete several characters.  One parameter.
+
+`rp'    repeat a character.  Takes two parameters, the character
+        to be repeated and the number of times to repeat it.
+       Most likely you will use `%.' for sending the character
+       to be repeated.  Emacs interprets a padding spec with a *
+       as giving the amount of padding per repetition.
+
+       WARNING: Many terminals have a command to repeat the
+       *last character output* N times.  This means that the character
+       will appear N+1 times in a row when the command argument is N.
+       However, the `rp' string's parameter is the total number of
+       times wanted, not one less.  Therefore, such repeat commands
+       may be used in an `rp' string only if you use Emacs's special
+       termcap operator `%a-c\001' to subtract 1 from the repeat count
+       before substituting it into the string.  It is probably safe
+       to use this even though the Unix termcap does not accept it
+       because programs other than Emacs probably won't look for `rp'
+       anyway.
+       
+`cs'    set scroll region.  Takes two parameters, the vertical
+       positions of the first line to include in the scroll region
+       and the last line to include in the scroll region.
+       Both parameters are origin-zero.  The effect of this
+       should be to cause a following insert-line or delete-line
+       not to move lines below the bottom of the scroll region.
+
+       This is not the same convention that Emacs version 16 used.
+       That is because I was led astray by unclear documentation
+       of the meaning of %i in termcap strings.  Since the termcap
+       documentation for `cs' is also unclear, I had to deduce the
+       correct parameter conventions from what would make the VT-100's
+       `cs' string work properly.  From an incorrect assumption about
+       %i, I reached an incorrect conclusion about `cs', but the result
+       worked correctly on the VT100 and ANSII terminals.  In Emacs
+       version 17, both `cs' and %i work correctly.
+
+       The version 16 convention was to pass, for the second parameter,
+       the line number of the first line beyond the end of the
+       scroll region.
+
+`cS'    set scroll region.  Differs from `cs' in taking parameters
+       differently.  There are four parameters:
+       1. Total number of lines on the screen.
+       2. Number of lines above desired scroll region.
+       3. Number of lines below (outside of) desired scroll region.
+       4. Total number of lines on the screen, like #1.
+       This is because an Ambassador needs the parameters like this.
+
+`cr', `do', `le'
+       Emacs will not attempt to use ^M, ^J or ^H for cursor motion
+       unless these capabilities are present and say to use those
+       characters.
+
+`km'    Says the terminal has a Meta key.
+
+Defining these strings is important for getting maximum performance
+from your terminal.
+
+Make sure that the `ti' string sets all modes needed for editing
+in Emacs.  For example, if your terminal has a mode that controls
+wrap at the end of the line, you must decide whether to specify
+the `am' flag in the termcap entry; whichever you decide, the `ti'
+string should contain commands to set the mode that way.
+(Emacs also sends the `vs' string after the `ti' string.
+You can put the mode-setting commands in either one of them.)
+
+*** Specific Terminal Types ***
+
+Watch out for termcap entries for Ann Arbor Ambassadors that
+give too little padding for clear-screen.  7.2 msec per line is right.
+These are the strings whose padding you probably should change:
+    :al=1*\E[L:dl=1*\E[M:cd=7.2*\E[J:cl=7.2*\E[H\E[J:
+I have sometimes seen `\E[2J' at the front of the `ti' string;
+this is a clear-screen, very slow, and it can cause you to get
+Control-s sent by the terminal at startup.  I recommend removing
+the `\E[2J' from the `ti' string.
+The `ti' or `vs' strings also usually need stuff added to them, such as
+    \E[>33;52;54h\E[>30;37;38;39l
+You might want to add the following to the `te' or `ve' strings:
+    \E[>52l\E[>37h
+The following additional capabilities will improve performance:
+    :AL=1*\E[%dL:DL=1*\E[%dM:IC=4\E[%d@:DC=4\E[%dP:rp=1*%.\E[%a-c\001%db:
+If you find that the Meta key does not work, make sure that
+    :km:
+is present in the termcap entry.
+
+Watch out for termcap entries for VT100's that fail to specify
+the `sf' string, or that omit the padding needed for the `sf' and `sr'
+strings (2msec per line affected).  What you need is
+    :sf=2*^J:sr=2*\EM:cs=\E[%i%d;%dr:
+
+The Concept-100 and Concept-108 have many modes that `ti' strings
+often fail to initialize.  If you have problems on one of these
+terminals, that is probably the place to fix them.  These terminals
+can support an `rp' string.
+
+Watch out on HP terminals for problems with standout disappearing on
+part of the mode line.  These problems are due to the absence of
+:sg#0: which some HP terminals need.
+
+The vi55 is said to require `ip=2'.
+
+The Sun console should have these capabilities for good performance.
+          :AL=\E[%dL:DL=\E[%dM:IC=\E[%d@:DC=\E[%dP:
+
+The vt220 needs to be set to vt220 mode, 7 bit, space parity
+in order to work fully with TERM=vt220.
+
+If you are using a LAT terminal concentrator, you need to issue these
+commands to turn off flow control:
+
+    set port flow control disable
+    define port flow control disable
+
+On System V, in the terminfo database, various terminals may have
+the `xt' flag that should not have it.  `xt' should be present only
+for the Teleray 1061 or equivalent terminal.
+
+In particular, System V for the 386 often has `xt' for terminal type
+AT386 or AT386-M, which is used for the console.  You should delete
+this flag.  Here is how:
+
+You can get a copy of the terminfo "source" for at386 using the
+command: `infocmp at386 >at386.tic'.  Edit the file at386.tic and remove
+the `xt' flag.  Then compile the new entry with: `tic at386.tic'.
+
+It is also reported that these terminal types sometimes have the wrong
+reverse-scroll string.  It should be \E[T, but sometimes is given as \E[S.
+
+Here is what watserv1!maytag!focsys!larry recommends for these terminals:
+
+# This copy of the terminfo description has been fixed.
+# The suggestions came from a number of usenet postings.
+#
+# Intel AT/386 for color card with monochrome display
+#
+AT386-M|at386-m|386AT-M|386at-m|at/386 console,
+       am, bw, eo, xon,
+       cols#80, lines#25,
+       acsc=``a1fxgqh0jYk?lZm@nEooppqDrrsstCu4vAwBx3yyzz{{||}}~~,
+       bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z,
+       clear=\E[2J\E[H,
+       cr=\r, cub=\E[%p1%dD, cub1=\E[D, cud=\E[%p1%dB,
+       cud1=\E[B, cuf=\E[%p1%dC, cuf1=\E[C,
+       cup=\E[%i%p1%02d;%p2%02dH, cuu=\E[%p1%dA, cuu1=\E[A,
+       dch=\E[%p1%dP, dch1=\E[P, dl=\E[%p1%dM, dl1=\E[1M,
+       ech=\E[%p1%dX,ed=\E[J, el=\E[K, el1=\E[1K\E[X, flash=^G, home=\E[H,
+       hpa=\E[%i%p1%dG, ich=\E[%p1%d@, ich1=\E[1@, il=\E[%p1%dL, il1=\E[1L,
+       ind=\E[S, indn=\E[%p1%dS, invis=\E[9m,
+       is2=\E[0;10;38m, kbs=\b, kcbt=^], kclr=\E[2J,
+       kcub1=\E[D, kcud1=\E[B, kcuf1=\E[C, kcuu1=\E[A,
+       kdch1=\E[P, kend=\E[Y, kf1=\EOP, kf10=\EOY, kf11=\EOZ,
+       kf12=\EOA, kf2=\EOQ, kf3=\EOR, kf4=\EOS, kf5=\EOT,
+       kf6=\EOU, kf7=\EOV, kf8=\EOW, kf9=\EOX, khome=\E[H,
+       kich1=\E[@, knp=\E[U, kpp=\E[V, krmir=\E0, rev=\E[7m, ri=\E[T,
+       rin=\E[%p1%dT, rmacs=\E[10m, rmso=\E[m, rmul=\E[m,
+       sgr=\E[10m\E[0%?%p1%p3%|%t;7%;%?%p2%t;4%;%?%p4%t;5%;%?%p6%t;1%;%?%p9%t;12%;%?%p7%t;9%;m,
+       sgr0=\E[0;10m, smacs=\E[12m, smso=\E[7m, smul=\E[4m,
+
+#
+# AT&T 386 color console 
+#
+AT386|at386|386AT|386at|at/386 console,
+       colors#8, ncv#3, pairs#64,
+       is2=\E[0;10;39m,
+       op=\E[0m, 
+       setb=\E[%?%p1%{0}%=%t40m
+                %e%p1%{1}%=%t44m
+                %e%p1%{2}%=%t42m
+                %e%p1%{3}%=%t46m
+                %e%p1%{4}%=%t41m
+                %e%p1%{5}%=%t45m
+                %e%p1%{6}%=%t43m
+                %e%p1%{7}%=%t47m%;,
+       setf=\E[%?%p1%{0}%=%t30m
+                %e%p1%{1}%=%t34m
+                %e%p1%{2}%=%t32m
+                %e%p1%{3}%=%t36m
+                %e%p1%{4}%=%t31m
+                %e%p1%{5}%=%t35m
+                %e%p1%{6}%=%t33m
+                %e%p1%{6}%=%t33m
+                %e%p1%{7}%=%t37m%;,
+       use=at386-m,
+#
+# Color console version that supports underline but maps blue
+# foreground color to cyan.
+#
+AT386-UL|at386-ul|386AT-UL|386at-ul|at/386 console,
+       is2=\E[0;10;38m,
+       use=at386,
diff --git a/etc/TUTORIAL b/etc/TUTORIAL
new file mode 100644 (file)
index 0000000..e6a3b3e
--- /dev/null
@@ -0,0 +1,1114 @@
+Copyright (c) 1985, 1996 Free Software Foundation, Inc. See end for conditions.
+
+You are looking at the Emacs tutorial.
+
+Emacs commands generally involve the CONTROL key (sometimes labelled
+CTRL or CTL) or the META key.  On some keyboards, the META key is
+labelled ALT or EDIT or something else (for example, on Sun keyboards,
+the diamond key to the left of the spacebar is META).  If you have no
+META key, you can use ESC instead.  Rather than write out META or
+CONTROL each time we want you to prefix a character, we'll use the
+following abbreviations:
+
+ C-<chr>  means hold the CONTROL key while typing the character <chr>
+         Thus, C-f would be: hold the CONTROL key and type f.
+ M-<chr>  means hold the META key down while typing <chr>.  If there
+         is no META key, type <ESC>, release it, then type the
+         character <chr>.
+
+Important note: to end the Emacs session, type C-x C-c.  (Two characters.)
+The characters ">>" at the left margin indicate directions for you to
+try using a command.  For instance:
+<<Middle of page left blank for didactic purposes. Text continues below.>>
+>>  Now type C-v (View next screen) to move to the next screen.
+       (go ahead, do it by holding down the control key while typing v).
+       From now on, you should do this again whenever you finish
+       reading the screen.
+
+Note that there is an overlap of two lines when you move from screen
+to screen; this provides some continuity so you can continue reading
+the text.
+
+The first thing that you need to know is how to move around from place
+to place in the text.  You already know how to move forward one screen,
+with C-v.  To move backwards one screen, type M-v (hold down the META key
+and type v, or type <ESC>v if you do not have a META, EDIT, or ALT key).
+
+>>  Try typing M-v and then C-v, a few times.
+
+
+* SUMMARY
+---------
+
+The following commands are useful for viewing screenfuls:
+
+       C-v     Move forward one screenful
+       M-v     Move backward one screenful
+       C-l     Clear screen and redisplay everything
+                putting the text near the cursor at the center.
+                (That's control-L, not control-1.)
+
+>> Find the cursor, and note what text is near it.
+   Then type C-l.
+   Find the cursor again and notice that the same text
+   is near the cursor now.
+
+
+* BASIC CURSOR CONTROL
+----------------------
+
+Moving from screenful to screenful is useful, but how do you
+move to a specific place within the text on the screen?
+
+There are several ways you can do this.  The most basic way is to use
+the commands C-p, C-b, C-f, and C-n.  Each of these commands moves the
+cursor one row or column in a particular direction on the screen.
+Here is a table showing these four commands and shows the directions
+they move:
+                         Previous line, C-p
+                                 :
+                                 :
+   Backward, C-b .... Current cursor position .... Forward, C-f
+                                 :
+                                 :
+                           Next line, C-n
+
+>> Move the cursor to the line in the middle of that diagram
+   using C-n or C-p.  Then type C-l to see the whole diagram
+   centered in the screen.
+
+You'll probably find it easy to think of these by letter: P for
+previous, N for next, B for backward and F for forward.  These are the
+basic cursor positioning commands, and you'll be using them ALL the
+time, so it would be of great benefit if you learn them now.
+
+>> Do a few C-n's to bring the cursor down to this line.
+
+>> Move into the line with C-f's and then up with C-p's.
+   See what C-p does when the cursor is in the middle of the line.
+
+Each of text line ends with a Newline character, which serves to
+separate it from the following line.  The last line in your file ought
+to have a Newline at the end (but Emacs does not require it to have
+one).
+
+>> Try to C-b at the beginning of a line.  It should move to
+   the end of the previous line.  This is because it moves back
+   across the Newline character.
+
+C-f can move across a Newline just like C-b.
+
+>> Do a few more C-b's, so you get a feel for where the cursor is.
+   Then do C-f's to return to the end of the line.
+   Then do one more C-f to move to the following line.
+
+When you move past the top or bottom of the screen, the text beyond
+the edge shifts onto the screen.  This is called "scrolling".  It
+enables Emacs to move the cursor to the specified place in the text
+without moving it off the screen.
+
+>> Try to move the cursor off the bottom of the screen with C-n, and
+   see what happens.
+
+If moving by characters is too slow, you can move by words.  M-f
+(Meta-f) moves forward a word and M-b moves back a word.
+
+>> Type a few M-f's and M-b's.
+
+When you are in the middle of a word, M-f moves to the end of the word.
+When you are in whitespace between words, M-f moves to the end of the
+following word.  M-b works likewise in the opposite direction.
+
+>> Type M-f and M-b a few times, interspersed with C-f's and C-b's
+   so that you can observe the action of M-f and M-b from various
+   places inside and between words.
+
+Notice the parallel between C-f and C-b on the one hand, and M-f and
+M-b on the other hand.  Very often Meta characters are used for
+operations related to the units defined by language (words, sentences,
+paragraphs), while Control characters operate on basic units that are
+independent of what you are editing (characters, lines, etc).
+
+This parallel applies between lines and sentences: C-a and C-e move to
+the beginning or end of a line, and M-a and M-e move to the beginning
+or end of a sentence.
+
+>> Try a couple of C-a's, and then a couple of C-e's.
+   Try a couple of M-a's, and then a couple of M-e's.
+
+See how repeated C-a's do nothing, but repeated M-a's keep moving one
+more sentence.  Although these are not quite analogous, each one seems
+natural.
+
+The location of the cursor in the text is also called "point".  To
+paraphrase, the cursor shows on the screen where point is located in
+the text.
+
+Here is a summary of simple cursor-moving operations, including the
+word and sentence moving commands:
+
+       C-f     Move forward a character
+       C-b     Move backward a character
+
+       M-f     Move forward a word
+       M-b     Move backward a word
+
+       C-n     Move to next line
+       C-p     Move to previous line
+
+       C-a     Move to beginning of line
+       C-e     Move to end of line
+
+       M-a     Move back to beginning of sentence
+       M-e     Move forward to end of sentence
+
+>> Try all of these commands now a few times for practice.
+   These are the most often used commands.
+
+Two other important cursor motion commands are M-< (Meta Less-than),
+which moves to the beginning of the whole text, and M-> (Meta
+Greater-than), which moves to the end of the whole text.
+
+On most terminals, the "<" is above the comma, so you must use the
+shift key to type it.  On these terminals you must use the shift key
+to type M-< also; without the shift key, you would be typing M-comma.
+
+>> Try M-< now, to move to the beginning of the tutorial.
+   Then use C-v repeatedly to move back here.
+
+>> Try M-> now, to move to the end of the tutorial.
+   Then use M-v repeatedly to move back here.
+
+You can also move the cursor with the arrow keys, if your terminal has
+arrow keys.  We recommend learning C-b, C-f, C-n and C-p for three
+reasons.  First, they work on all kinds of terminals.  Second, once
+you gain practice at using Emacs, you will find that typing these CTRL
+characters is faster than typing the arrow keys (because you do not
+have to move your hands away from touch-typing position).  Third, once
+you form the habit of using these CTRL character commands, you can
+easily learn to use other advanced cursor motion commands as well.
+
+Most Emacs commands accept a numeric argument; for most commands, this
+serves as a repeat-count.  The way you give a command a repeat count
+is by typing C-u and then the digits before you type the command.  If
+you have a META (or EDIT or ALT) key, there is another alternative way
+to enter a numeric argument: type the digits while holding down the
+META key.  We recommend learning the C-u method because it works on
+any terminal.
+
+For instance, C-u 8 C-f moves forward eight characters.
+       
+>> Try using C-n or C-p with a numeric argument, to move the cursor
+   to a line near this one with just one command.
+
+Most commands use the numeric argument as a repeat count.  Certain
+exceptional commands use it differently.  C-v and M-v are among the
+exceptions.  When given an argument, they scroll the screen up or down
+by that many lines, rather than by a screenfuls.  For example, C-u 4
+C-v scrolls the screen by 4 lines.
+
+>> Try typing C-u 8 C-v now.
+
+This should have scrolled the screen up by 8 lines.  If you would like
+to scroll it down again, you can give an argument to M-v.
+
+If you are using the X Window system, there is probably a rectangular
+area called a scroll bar at the right hand side of the Emacs window.
+You can scroll the text by manipulating the scroll bar with the mouse.
+
+>> Try pressing the middle button at the top of the highlighted area
+   within the scroll bar.  This should scroll the text to a position
+   determined by how high or low you click.
+
+>> Move the mouse to a point in the scroll bar about three lines from
+the top, and click the left button a couple of times.
+
+
+* CURSOR CONTROL WITH AN X TERMINAL
+-----------------------------------
+
+If you have an X terminal, you will probably find it easier to use
+the keys on the keypad to control the cursor.  The left, right, up,
+and down arrow keys move in the expected direction; they function
+exactly like C-b, C-f, C-p, and C-n, but are easier to type and to
+remember.  You can also use C-left and C-right to move by words, and
+C-up and C-down to move by blocks (e.g.  paragraphs, if you're
+editing text).  If you have keys labelled HOME (or BEGIN) and END,
+they will take you to the beginning and end of a line, respectively,
+and C-home and C-end will move to the beginning and end of the file.
+If your keyboard has PgUp and PgDn keys, you can use them to move up
+and down a screenful at a time, like M-v and C-v.
+
+All of these commands can take numeric arguments, as described above.
+You can use a shortcut to enter these arguments: just hold down the
+CONTROL or META key and type the number. For example, to move 12
+words to the right, type C-1 C-2 C-right.  Note that it is very easy
+to type this because you do not have to release the CONTROL key
+between keystrokes.
+
+
+* WHEN EMACS IS HUNG
+--------------------
+
+If Emacs stops responding to your commands, you can stop it safely by
+typing C-g.  You can use C-g to stop a command which is taking too
+long to execute.
+
+You can also use C-g to discard a numeric argument or the beginning of
+a command that you do not want to finish.
+
+>> Type C-u 100 to make a numeric arg of 100, then type C-g.
+   Now type C-f.  It should move just one character,
+   because you canceled the argument with C-g.
+
+If you have typed an <ESC> by mistake, you can get rid of it
+with a C-g.
+
+
+* DISABLED COMMANDS
+-------------------
+
+Some Emacs commands are "disabled" so that beginning users cannot use
+them by accident.
+
+If you type one of the disabled commands, Emacs displays a message
+saying what the command was, and asking you whether you want to go
+ahead and execute the command.
+
+If you really want to try the command, type Space in answer to the
+question.  Normally, if you do not want to execute the disabled
+command, answer the question with "n".
+
+>> Type `C-x n p' (which is a disabled command),
+   then type n to answer the question.
+
+
+* WINDOWS
+---------
+
+Emacs can have several windows, each displaying its own text.
+Note that "window" as used by Emacs does not refer to separate
+overlapping windows in the window system, but to separate panes
+within a single X window. (Emacs can also have multiple X
+windows, or "frames" in Emacs terminology.  This is described
+later.)
+
+At this stage it is better not to go into the techniques of
+using multiple windows.  But you do need to know how to get
+rid of extra windows that may appear to display help or
+output from certain commands.  It is simple:
+
+       C-x 1   One window (i.e., kill all other windows).
+
+That is Control-x followed by the digit 1.  C-x 1 expands the window
+which contains the cursor, to occupy the full screen.  It deletes all
+other windows.
+
+>> Move the cursor to this line and type C-u 0 C-l.
+
+(Remember that C-l redraws the screen.  If you give a
+numeric argument to this command, it means "redraw the
+screen and put the current line that many lines from the
+top of the screen."  So C-u 0 C-l means "redraw the
+screen, putting the current line at the top.")
+
+>> Type Control-x 2
+   See how this window shrinks, while a new one appears
+   to display contents of this buffer.
+
+>> Type C-x 1 and see the new window disappear.
+
+
+* INSERTING AND DELETING
+------------------------
+
+If you want to insert text, just type the text.  Characters which you
+can see, such as A, 7, *, etc. are taken by Emacs as text and inserted
+immediately.  Type <Return> (the carriage-return key) to insert a
+Newline character.
+
+You can delete the last character you typed by typing <Delete>.
+<Delete> is a key on the keyboard, which may be labeled "Del".  In
+some cases, the "Backspace" key serves as <Delete>, but not always!
+
+More generally, <Delete> deletes the character immediately before the
+current cursor position.
+
+>> Do this now--type a few characters, then delete them
+   by typing <Delete> a few times.  Don't worry about this file
+   being changed; you will not alter the master tutorial.  This is
+   your personal copy of it.
+
+When a line of text gets too big for one line on the screen, the line
+of text is "continued" onto a second screen line.  A backslash ("\")
+at the right margin indicates a line which has been continued.
+
+>> Insert text until you reach the right margin, and keep on inserting.
+   You'll see a continuation line appear.
+
+>> Use <Delete>s to delete the text until the line fits on one screen
+   line again.  The continuation line goes away.
+
+You can delete a Newline character just like any other character.
+Deleting the Newline character between two lines merges them into
+one line.  If the resulting combined line is too long to fit in the
+screen width, it will be displayed with a continuation line.
+
+>> Move the cursor to the beginning of a line and type <Delete>.  This
+   merges that line with the previous line.
+
+>> Type <Return> to reinsert the Newline you deleted.
+
+Remember that most Emacs commands can be given a repeat count;
+this includes text characters.  Repeating a text character inserts
+it several times.
+
+>>  Try that now -- type C-u 8 * to insert ********.
+
+You've now learned the most basic way of typing something in
+Emacs and correcting errors.  You can delete by words or lines
+as well.  Here is a summary of the delete operations:
+
+       <Delete>     delete the character just before the cursor
+       C-d          delete the next character after the cursor
+
+       M-<Delete>   kill the word immediately before the cursor
+       M-d          kill the next word after the cursor
+
+       C-k          kill from the cursor position to end of line
+       M-k          kill to the end of the current sentence
+
+Notice that <Delete> and C-d vs M-<Delete> and M-d extend the parallel
+started by C-f and M-f (well, <Delete> is not really a control
+character, but let's not worry about that).  C-k and M-k are like C-e
+and M-e, sort of, in that lines are opposite sentences.
+
+When you delete more than one character at a time, Emacs saves the
+deleted text so that you can bring it back.  Bringing back killed text
+is called "yanking".  You can yank the killed text either at the same
+place where it was killed, or at some other place in the text.  You
+can yank the text several times in order to make multiple copies of
+it.  The command to yank is C-y.
+
+Note that the difference between "Killing" and "Deleting" something is
+that "Killed" things can be yanked back, and "Deleted" things cannot.
+Generally, the commands that can remove a lot of text save the text,
+while the commands that delete just one character, or just blank lines
+and spaces, do not save the deleted text.
+
+>> Move the cursor to the  beginning of a line which is not empty.
+   Then type C-k to kill the text on that line.
+>> Type C-k a second time.  You'll see that it kills the Newline
+   which follows that line.
+
+Note that a single C-k kills the contents of the line, and a second
+C-k kills the line itself, and make all the other lines move up.  C-k
+treats a numeric argument specially: it kills that many lines AND
+their contents.  This is not mere repetition.  C-u 2 C-k kills two
+lines and their newlines; typing C-k twice would not do that.
+
+To retrieve the last killed text and put it where the cursor currently
+is, type C-y.
+
+>> Try it; type C-y to yank the text back.
+
+Think of C-y as if you were yanking something back that someone took
+away from you.  Notice that if you do several C-k's in a row, all of
+the killed text is saved together, so that one C-y will yank all of
+the lines.
+
+>> Do this now, type C-k several times.
+
+Now to retrieve that killed text:
+
+>> Type C-y.  Then move the cursor down a few lines and type C-y
+   again.  You now see how to copy some text.
+
+What do you do if you have some text you want to yank back, and then
+you kill something else?  C-y would yank the more recent kill.  But
+the previous text is not lost.  You can get back to it using the M-y
+command.  After you have done C-y to get the most recent kill, typing
+M-y replaces that yanked text with the previous kill.  Typing M-y
+again and again brings in earlier and earlier kills.  When you have
+reached the text you are looking for, you do not have to do anything to
+keep it.  Just go on with your editing, leaving the yanked text where
+it is.
+
+If you M-y enough times, you come back to the starting point (the most
+recent kill).
+
+>> Kill a line, move around, kill another line.
+   Then do C-y to get back the second killed line.
+   Then do M-y and it will be replaced by the first killed line.
+   Do more M-y's and see what you get.  Keep doing them until
+   the second kill line comes back, and then a few more.
+   If you like, you can try giving M-y positive and negative
+   arguments.
+
+
+* UNDO
+------
+
+If you make a change to the text, and then decide that it was a
+mistake, you can undo the change with the undo command, C-x u.
+
+Normally, C-x u undoes the changes made by one command; if you repeat
+the C-x u several times in a row, each repetition undoes one
+additional command.
+
+But there are two exceptions: commands that do not change the text do
+not count (this includes cursor motion commands and scrolling
+command), and self-inserting characters are usually handled in groups
+of up to 20.  (This is to reduce the number of C-x u's you have to
+type to undo insertion of text.)
+
+>> Kill this line with C-k, then type C-x u and it should reappear.
+
+C-_ is an alternative undo command; it works just the same as C-x u,
+but it is easier to type several times in a row.  The disadvantage of
+C-_ is that on some keyboards it is not obvious how to type it.  That
+is why we provide C-x u as well.  On some terminals, you can type C-_
+by typing / while holding down CTRL.
+
+A numeric argument to C-_ or C-x u acts as a repeat count.
+
+
+* FILES
+-------
+
+In order to make the text you edit permanent, you must put it in a
+file.  Otherwise, it will go away when your invocation of Emacs goes
+away.  You put your editing in a file by "finding" the file.  (This is
+also called "visiting" the file.)
+
+Finding a file means that you see the contents of the file within
+Emacs.  In many ways, it is as if you were editing the file itself.
+However, the changes you make using Emacs do not become permanent
+until you "save" the file.  This is so you can avoid leaving a
+half-changed file on the system when you do not want to.  Even when
+you save, Emacs leaves the original file under a changed name in case
+you later decide that your changes were a mistake.
+
+If you look near the bottom of the screen you will see a line that
+begins and ends with dashes, and contains the string "Emacs:
+TUTORIAL".  This part of the screen always shows the name of the file
+that you are visiting.  Right now, you are visiting a file called
+"TUTORIAL" which is your personal scratch copy of the Emacs tutorial.
+Whatever file you find, that file's name will appear in that precise
+spot.
+
+The commands for finding and saving files are unlike the other
+commands you have learned in that they consist of two characters.
+They both start with the character Control-x.  There is a whole series
+of commands that start with Control-x; many of them have to do with
+files, buffers, and related things.  These commands are two, three or
+four characters long.
+
+Another thing about the command for finding a file is that you have
+to say what file name you want.  We say the command "reads an argument
+from the terminal" (in this case, the argument is the name of the
+file).  After you type the command
+
+       C-x C-f   Find a file
+
+Emacs asks you to type the file name.  The file name you type appears
+on the bottom line of the screen.  The bottom line is called the
+minibuffer when it is used for this sort of input.  You can use
+ordinary Emacs editing commands to edit the file name.
+
+While you are entering the file name (or any minibuffer input),
+you can cancel the command with C-g.
+
+>> Type C-x C-f, then type C-g.  This cancels the minibuffer,
+   and also cancels the C-x C-f command that was using the
+   minibuffer.  So you do not find any file.
+
+When you have finished entering the file name, type <Return> to
+terminate it.  Then C-x C-f command goes to work, and finds the file
+you chose.  The minibuffer disappears when the C-x C-f command is
+finished.
+
+In a little while the file contents appear on the screen, and you can
+edit the contents.  When you wish to make your changes permanent,
+type the command
+
+       C-x C-s   Save the file
+
+This copies the text within Emacs into the file.  The first time you
+do this, Emacs renames the original file to a new name so that it is
+not lost.  The new name is made by adding "~" to the end of the
+original file's name.
+
+When saving is finished, Emacs prints the name of the file written.
+You should save fairly often, so that you will not lose very much
+work if the system should crash.
+
+>> Type C-x C-s, saving your copy of the tutorial.
+   This should print "Wrote ...TUTORIAL" at the bottom of the screen.
+
+NOTE: On some systems, typing C-x C-s will freeze the screen and you
+will see no further output from Emacs.  This indicates that an
+operating system "feature" called "flow control" is intercepting the
+C-s and not letting it get through to Emacs.  To unfreeze the screen,
+type C-q.  Then see the section "Spontaneous Entry to Incremental
+Search" in the Emacs manual for advice on dealing with this "feature".
+
+You can find an existing file, to view it or edit it.  You can also
+find a file which does not already exist.  This is the way to create a
+file with Emacs: find the file, which will start out empty, and then
+begin inserting the text for the file.  When you ask to "save" the
+file, Emacs will really create the file with the text that you have
+inserted.  From then on, you can consider yourself to be editing an
+already existing file.
+
+
+* BUFFERS
+---------
+
+If you find a second file with C-x C-f, the first file remains
+inside Emacs.  You can switch back to it by finding it again with
+C-x C-f.  This way you can get quite a number of files inside Emacs.
+
+>> Create a file named "foo" by typing  C-x C-f foo <Return>.
+   Then insert some text, edit it, and save "foo" by typing  C-x C-s.
+   Finally, type C-x C-f TUTORIAL <Return>
+   to come back to the tutorial.
+
+Emacs stores each file's text inside an object called a "buffer."
+Finding a file makes a new buffer inside Emacs.  To see a list of the
+buffers that current exist in your Emacs job, type
+
+       C-x C-b   List buffers
+
+>> Try C-x C-b now.
+
+See how each buffer has a name, and it may also have a file name
+for the file whose contents it holds.  Some buffers do not correspond
+to files.  For example, the buffer named "*Buffer List*" does
+not have any file.  It is the buffer which contains the buffer
+list that was made by C-x C-b.  ANY text you see in an Emacs window
+is always part of some buffer.
+
+>> Type C-x 1 to get rid of the buffer list.
+
+If you make changes to the text of one file, then find another file,
+this does not save the first file.  Its changes remain inside Emacs,
+in that file's buffer.  The creation or editing of the second file's
+buffer has no effect on the first file's buffer.  This is very useful,
+but it also means that you need a convenient way to save the first
+file's buffer.  It would be a nuisance to have to switch back to
+it with C-x C-f in order to save it with C-x C-s.  So we have
+
+       C-x s     Save some buffers
+
+C-x s asks you about each buffer which contains changes that you have
+not saved.  It asks you, for each such buffer, whether to save the
+buffer.
+
+>> Insert a line of text, then type C-x s.
+   It should ask you whether to save the buffer named TUTORIAL.
+   Answer yes to the question by typing "y".
+
+* USING THE MENU
+----------------
+
+If you are on an X terminal, you will notice a menubar at the
+top of the Emacs screen.  You can use this menubar to access all
+the most common Emacs commands, such as "find file".  You will
+find this easier at first, because you don't need to remember
+the keystrokes necessary to access any particular command.  Once
+you are comfortable with Emacs, it will be easy to begin using
+the keyboard commands because each menu item with a
+corresponding keyboard command has the command listed next to
+it.
+
+Note that there are many items in the menubar that have no exact
+keyboard equivalents.  For example, the Buffers menu lists all
+of the available buffers in most-recently used order.  You can
+switch to any buffer by simply findings its name in the Buffers
+menu and selecting it.
+
+
+* USING THE MOUSE
+-----------------
+
+When running under X, Emacs is fully integrated with the mouse.
+You can position the text cursor by clicking the left button at
+the desired location, and you can select text by dragging the
+left mouse button across the text you want to select. (Or
+alternatively, click the left mouse button at one end of the
+text, then move to the other end and use Shift-click to select
+the text.)
+
+To kill some selected text, you can use C-w or choose the Cut
+item from the Edit menu.  Note that these are *not* equivalent:
+C-w only saves the text internally within Emacs (similar to C-k
+as described above), whereas Cut does this and also puts the
+text into the X clipboard, where it can be accessed by other
+applications.
+
+To retrieve text from the X clipboard, use the Paste item from
+the Edit menu.
+
+The middle mouse button is commonly used to choose items that
+are visible on the screen.  For example, if you enter Info (the
+on-line Emacs documentation) using C-h i or the Help menu, you
+can follow a highlighted link by clicking the middle mouse
+button on it.  Similarly, if you are typing a file name in
+(e.g. when prompted by "Find File") and you hit TAB to show the
+possible completions, you can click the middle mouse button on
+one of the completions to select it.
+
+The right mouse button brings up a popup menu.  The contents of
+this menu vary depending on what mode you're in, and usually
+contain a few commonly used commands, so they're easier to
+access.
+
+>> Press the right mouse button now.
+
+You will have to hold the button down in order to keep the
+menu up.
+
+
+* EXTENDING THE COMMAND SET
+---------------------------
+
+There are many, many more Emacs commands than could possibly be put
+on all the control and meta characters.  Emacs gets around this with
+the X (eXtend) command.  This comes in two flavors:
+
+       C-x     Character eXtend.  Followed by one character.
+       M-x     Named command eXtend.  Followed by a long name.
+
+These are commands that are generally useful but used less than the
+commands you have already learned about.  You have already seen two of
+them: the file commands C-x C-f to Find and C-x C-s to Save.  Another
+example is the command to end the Emacs session--this is the command
+C-x C-c.  (Do not worry about losing changes you have made; C-x C-c
+offers to save each changed file before it kills the Emacs.)
+
+C-z is the command to exit Emacs *temporarily*--so that you can go
+back to the same Emacs session afterward.
+
+On systems which allow it, C-z "suspends" Emacs; that is, it returns
+to the shell but does not destroy the Emacs.  In the most common
+shells, you can resume Emacs with the `fg' command or with `%emacs'.
+
+On systems which do not implement suspending, C-z creates a subshell
+running under Emacs to give you the chance to run other programs and
+return to Emacs afterward; it does not truly "exit" from Emacs.  In
+this case, the shell command `exit' is the usual way to get back to
+Emacs from the subshell.
+
+The time to use C-x C-c is when you are about to log out.  It's also
+the right thing to use to exit an Emacs invoked under mail handling
+programs and other miscellaneous utilities, since they may not know
+how to cope with suspension of Emacs.  In ordinary circumstances,
+though, if you are not about to log out, it is better to suspend Emacs
+with C-z instead of exiting Emacs.
+
+There are many C-x commands.  Here is a list of the ones you have learned:
+
+       C-x C-f         Find file.
+       C-x C-s         Save file.
+       C-x C-b         List buffers.
+       C-x C-c         Quit Emacs.
+       C-x u           Undo.
+
+Named eXtended commands are commands which are used even less
+frequently, or commands which are used only in certain modes.  An
+example is the command replace-string, which globally replaces one
+string with another.  When you type M-x, Emacs prompts you at the
+bottom of the screen with M-x and you should type the name of the
+command; in this case, "replace-string".  Just type "repl s<TAB>" and
+Emacs will complete the name.  End the command name with <Return>.
+
+The replace-string command requires two arguments--the string to be
+replaced, and the string to replace it with.  You must end each
+argument with <Return>.
+
+>> Move the cursor to the blank line two lines below this one.
+   Then type M-x repl s<Return>changed<Return>altered<Return>.
+
+   Notice how this line has changed: you've replaced
+   the word c-h-a-n-g-e-d with "altered" wherever it occurred,
+   after the initial position of the cursor.
+
+
+* AUTO SAVE
+-----------
+
+When you have made changes in a file, but you have not saved them yet,
+they could be lost if your computer crashes.  To protect you from
+this, Emacs periodically writes an "auto save" file for each file that
+you are editing.  The auto save file name has a # at the beginning and
+the end; for example, if your file is named "hello.c", its auto save
+file's name is "#hello.c#".  When you save the file in the normal way,
+Emacs deletes its auto save file.
+
+If the computer crashes, you can recover your auto-saved editing by
+finding the file normally (the file you were editing, not the auto
+save file) and then typing M-x recover file<return>.  When it asks for
+confirmation, type yes<return> to go ahead and recover the auto-save
+data.
+
+
+* ECHO AREA
+-----------
+
+If Emacs sees that you are typing commands slowly it shows them to you
+at the bottom of the screen in an area called the "echo area."  The echo
+area contains the bottom line of the screen.
+
+
+* MODELINE
+-----------
+
+The line immediately above the echo area it is called the "modeline".
+The mode line says something like this:
+
+--**-XEmacs: TUTORIAL          (Fundamental)--L670--58%----------------
+
+This line gives useful information about the status of Emacs and
+the text you are editing.
+
+You already know what the filename means--it is the file you have
+found.  -NN%-- indicates your current position in the text; it means
+that NN percent of the text is above the top of the screen.  If the
+top of the file is on the screen, it will say --Top-- instead of
+--00%--.  If the bottom of the text is on the screen, it will say
+--Bot--.  If you are looking at text so small that all of it fits on
+the screen, the mode line says --All--.
+
+The stars near the front mean that you have made changes to the text.
+Right after you visit or save a file, that part of the mode line shows
+no stars, just dashes.
+
+The part of the mode line inside the parentheses is to tell you what
+editing modes you are in.  The default mode is Fundamental which is
+what you are using now.  It is an example of a "major mode".  
+
+Emacs has many different major modes.  Some of them are meant for
+editing different languages and/or kinds of text, such as Lisp mode,
+Text mode, etc.  At any time one and only one major mode is active,
+and its name can always be found in the mode line just where
+"Fundamental" is now.
+
+Each major mode makes a few commands behave differently.  For example,
+there are commands for creating comments in a program, and since each
+programming language has a different idea of what a comment should
+look like, each major mode has to insert comments differently.  Each
+major mode is the name of an extended command, which is how you can
+switch to that mode.  For example, M-x fundamental-mode is a command to
+switch to Fundamental mode.
+
+If you are going to be editing English text, such as this file, you
+should probably use Text Mode.
+>> Type M-x text-mode<Return>.
+
+Don't worry, none of the commands you have learned changes Emacs in
+any great way.  But you can observe that M-f and M-b now treat
+apostrophes as part of words.  Previously, in Fundamental mode,
+M-f and M-b treated apostrophes as word-separators.
+
+Major modes usually make subtle changes like that one: most commands
+do "the same job" in each major mode, but they work a little bit
+differently.
+
+To view documentation on your current major mode, type C-h m.
+
+>> Use C-u C-v once or more to bring this line near the top of screen.
+>> Type C-h m, to see how Text mode differs from Fundamental mode.
+>> Type q to remove the documentation from the screen.
+
+Major modes are called major because there are also minor modes.
+Minor modes are alternatives not to the major modes, just minor
+modifications of them.  Each minor mode can be turned on or off by
+itself, independent of all other minor modes, and independent of your
+major mode.  So you can use no minor modes, or one minor mode, or any
+combination of several minor modes.
+
+One minor mode which is very useful, especially for editing English
+text, is Auto Fill mode.  When this mode is on, Emacs breaks the line
+in between words automatically whenever you insert text and make a
+line that is too wide.
+
+You can turn Auto Fill mode on by doing M-x auto-fill-mode<Return>.
+When the mode is on, you can turn it off by doing M-x
+auto-fill-mode<Return>.  If the mode is off, this command turns it on,
+and if the mode is on, this command turns it off.  We say that the
+command "toggles the mode".
+
+>> Type M-x auto-fill-mode<Return> now.  Then insert a line of "asdf "
+   over again until you see it divide into two lines.  You must put in
+   spaces between them because Auto Fill breaks lines only at spaces.
+
+The margin is usually set at 70 characters, but you can change it
+with the C-x f command.  You should give the margin setting you want
+as a numeric argument.
+
+>> Type C-x f with an argument of 20.  (C-u 2 0 C-x f).
+   Then type in some text and see Emacs fill lines of 20
+   characters with it.  Then set the margin back to 70 using
+   C-x f again.
+
+If you makes changes in the middle of a paragraph, Auto Fill mode
+does not re-fill it for you.
+To re-fill the paragraph, type M-q (Meta-q) with the cursor inside
+that paragraph.
+
+>> Move the cursor into the previous paragraph and type M-q.
+
+
+* SEARCHING
+-----------
+
+Emacs can do searches for strings (these are groups of contiguous
+characters or words) either forward through the text or backward
+through it.  Searching for a string is a cursor motion command;
+it moves the cursor to the next place where that string appears.
+
+The Emacs search command is different from the search commands
+of most editors, in that it is "incremental".  This means that the
+search happens while you type in the string to search for.
+
+The command to initiate a search is C-s for forward search, and C-r
+for reverse search.  BUT WAIT!  Don't try them now.
+
+When you type C-s you'll notice that the string "I-search" appears as
+a prompt in the echo area.  This tells you that Emacs is in what is
+called an incremental search waiting for you to type the thing that
+you want to search for.  <Return> terminates a search.
+
+>> Now type C-s to start a search.  SLOWLY, one letter at a time,
+   type the word 'cursor', pausing after you type each
+   character to notice what happens to the cursor.
+   Now you have searched for "cursor", once.
+>> Type C-s again, to search for the next occurrence of "cursor".
+>> Now type <Delete> four times and see how the cursor moves.
+>> Type <RET> to terminate the search.
+
+Did you see what happened?  Emacs, in an incremental search, tries to
+go to the occurrence of the string that you've typed out so far,
+highlighting it for your convenience.  To go to the next occurrence of
+'cursor' just type C-s again.  If no such occurrence exists Emacs
+beeps and tells you the search is currently "failing", C-g would also
+terminate the search.
+
+NOTE: On some systems, typing C-s will freeze the screen and you will
+see no further output from Emacs.  This indicates that an operating
+system "feature" called "flow control" is intercepting the C-s and not
+letting it get through to Emacs.  To unfreeze the screen, type C-q.
+Then see the section "Spontaneous Entry to Incremental Search" in the
+Emacs manual for advice on dealing with this "feature".
+
+If you are in the middle of an incremental search and type <Delete>,
+you'll notice that the last character in the search string is erased
+and the search backs up to the last place of the search.  For
+instance, suppose you have typed "c", to search for the first
+occurrence of "c".  Now if you type "u", the cursor will move
+to the first occurrence of "cu".  Now type <Delete>.  This erases
+the "u" from the search string, and the cursor moves back to
+the first occurrence of "c".
+
+If you are in the middle of a search and type a control or meta
+character (with a few exceptions--characters that are special in
+a search, such as C-s and C-r), the search is terminated.
+
+The C-s starts a search that looks for any occurrence of the search
+string AFTER the current cursor position.  If you want to search for
+something earlier in the text, type C-r instead.  Everything that we
+have said about C-s also applies to C-r, except that the direction of
+the search is reversed.
+
+
+* MULTIPLE WINDOWS
+------------------
+
+One of the nice features of Emacs is that you can display more than one
+window on the screen at the same time.
+
+>> Move the cursor to this line and type C-u 0 C-l.
+
+>> Now type C-x 2 which splits the screen into two windows.
+   Both windows display this tutorial.  The cursor stays in the top window.
+
+>> Type C-M-v to scroll the bottom window.
+   (If you do not have a real Meta key, type ESC C-v.)
+
+>> Type C-x o ("o" for "other") to move the cursor to the bottom window.
+>> Use C-v and M-v in the bottom window to scroll it.
+   Keep reading these directions in the top window.
+
+>> Type C-x o again to move the cursor back to the top window.
+   The cursor in the top window is just where it was before.
+
+You can keep using C-x o to switch between the windows.  Each
+window has its own cursor position, but only one window actually
+shows the cursor.  All the ordinary editing commands apply to the
+window that the cursor is in.  We call this the "selected window".
+
+The command C-M-v is very useful when you are editing text in one
+window and using the other window just for reference.  You can keep
+the cursor always in the window where you are editing, and advance
+through the other window sequentially with C-M-v.
+
+C-M-v is an example of a CONTROL-META character.  If you have a real
+META key, you can type C-M-v by holding down both CTRL and META while
+typing v.  It does not matter whether CTRL or META "comes first,"
+because both of these keys act by modifying the characters you type.
+
+If you do not have a real META key, and you use ESC instead, the order
+does matter: you must type ESC followed by CTRL-v; CTRL-ESC v will not
+work.  This is because ESC is a character in its own right, not a
+modifier key.
+
+>> Type C-x 1 (in the top window) to get rid of the bottom window.
+
+(If you had typed C-x 1 in the bottom window, that would get rid
+of the top one.  Think of this command as "Keep just one
+window--the window I am already in.")
+
+You do not have to display the same buffer in both windows.  If you
+use C-x C-f to find a file in one window, the other window does not
+change.  You can find a file in each window independently.
+
+Here is another way to use two windows to display two different
+things:
+
+>> Type C-x 4 C-f followed by the name of one of your files.
+   End with <Return>.  See the specified file appear in the bottom
+   window.  The cursor goes there, too.
+
+>> Type C-x o to go back to the top window, and C-x 1 to delete
+   the bottom window.
+
+
+* RECURSIVE EDITING LEVELS
+--------------------------
+
+Sometimes you will get into what is called a "recursive editing
+level".  This is indicated by square brackets in the mode line,
+surrounding the parentheses around the major mode name.  For
+example, you might see [(Fundamental)] instead of (Fundamental).
+
+To get out of the recursive editing level, type ESC ESC ESC.  That is
+an all-purpose "get out" command.  You can also use it for eliminating
+extra windows, and getting out of the minibuffer.
+
+>> Type M-x to get into a minibuffer; then type ESC ESC ESC to get out.
+
+You cannot use C-g to get out of a recursive editing level.  This is
+because C-g is used for canceling commands and arguments WITHIN the
+recursive editing level.
+
+
+* GETTING MORE HELP
+-------------------
+
+In this tutorial we have tried to supply just enough information to
+get you started using Emacs.  There is so much available in Emacs that
+it would be impossible to explain it all here.  However, you may want
+to learn more about Emacs since it has many other useful features.
+Emacs provides commands for reading documentation about Emacs
+commands.  These "help" commands all start with the character
+Control-h, which is called "the Help character".
+
+To use the Help features, type the C-h character, and then a
+character saying what kind of help you want.  If you are REALLY lost,
+type C-h ? and Emacs will tell you what kinds of help it can give.
+If you have typed C-h and decide you do not want any help, just
+type C-g to cancel it.
+
+(Some sites rebind the character C-h.  They really should not do this
+as a blanket measure, so complain to the system administrator.
+Meanwhile, if C-h does not display a message about help at the bottom
+of the screen, try typing M-x help RET instead.)
+
+The most basic HELP feature is C-h c.  Type C-h, a c, and a
+command character or sequence, and Emacs displays a very brief
+description of the command.
+
+>> Type C-h c Control-p.
+  The message should be something like
+
+       C-p runs the command previous-line
+
+This tells you the "name of the function".  Function names are used
+mainly for customizing and extending Emacs.  But since function names
+are chosen to indicate what the command does, they can serve also as
+very brief documentation--sufficient to remind you of commands you
+have already learned.
+
+Multi-character commands such as C-x C-s and (if you have no META or
+EDIT or ALT key) <ESC>v are also allowed after C-h c.
+
+To get more information about a command, use C-h k instead of C-h c.
+
+>> Type C-h k Control-p.
+
+This displays the documentation of the function, as well as its
+name, in an Emacs window.  When you are finished reading the
+output, type q to get rid of the help text.
+
+Here are some other useful C-h options:
+
+   C-h f       Describe a function.  You type in the name of the
+               function.
+
+>> Try typing C-h f previous-line<Return>.
+   This prints all the information Emacs has about the
+   function which implements the C-p command.
+
+   C-h a       Hyper Apropos.  Type in a keyword and Emacs will list
+               all the functions and variables whose names contain
+               that keyword.  The commands that can be invoked with
+               Meta-x, an asterisk will be displayed to the left.
+
+>> Type C-h a newline<Return>.
+
+This displays a list of all functions and variables with "newline" in
+their names.  Press <Return> or click the middle mouse button to find
+out more about a function or variable.  Type `q' to exit hyper-apropos.
+
+
+* CONCLUSION
+------------
+
+Remember, to exit Emacs permanently use C-x C-c.  To exit to a shell
+temporarily, so that you can come back in, use C-z.  (under X, this
+iconifies the current Emacs frame.)
+
+This tutorial is meant to be understandable to all new users, so if
+you found something unclear, don't sit and blame yourself - complain!
+
+
+COPYING
+-------
+
+This tutorial descends from a long line of Emacs tutorials
+starting with the one written by Stuart Cracraft for the original Emacs.
+Ben Wing updated the tutorial for X Windows.  Martin Buchholz and
+Hrvoje Niksic added more corrections for XEmacs.
+
+This version of the tutorial, like GNU Emacs, is copyrighted, and
+comes with permission to distribute copies on certain conditions:
+
+Copyright (c) 1985, 1996 Free Software Foundation
+
+   Permission is granted to anyone to make or distribute verbatim copies
+   of this document as received, in any medium, provided that the
+   copyright notice and permission notice are preserved,
+   and that the distributor grants the recipient permission
+   for further redistribution as permitted by this notice.
+
+   Permission is granted to distribute modified versions
+   of this document, or of portions of it,
+   under the above conditions, provided also that they
+   carry prominent notices stating who last altered them.
+
+The conditions for copying Emacs itself are more complex, but in the
+same spirit.  Please read the file COPYING and then do give copies of
+GNU Emacs to your friends.  Help stamp out software obstructionism
+("ownership") by using, writing, and sharing free software!
diff --git a/etc/TUTORIAL.de b/etc/TUTORIAL.de
new file mode 100644 (file)
index 0000000..a7b9fa8
--- /dev/null
@@ -0,0 +1,1159 @@
+Copyright (c) 1997, Adrian Aichner <aichner@ecf.teradyne.com>.
+
+Copyright (c) 1985, 1996 Free Software Foundation, Inc. See end for conditions.
+
+Du betrachtest das Emacs Tutorial.
+Dies sind die einführenden Übungen für Emacs.
+
+Emacs-Befehle verwenden generell entweder die CONTROL- (manchmal mit
+CTRL oder CTL beschriftet, auf deutschen Tastaturen auch oft mit STRG)
+oder die META-Taste.  Auf manchen Tastaturen ist die META-Taste mit
+ALT, EDIT oder sonstwie (z.B. ist auf einer Sun Tastatur die
+Raute-Taste links vom SPACE Balken die META-Taste) beschriftet.  Statt
+jedesmal META oder CONTROL auszuschreiben, wenn wir wollen daß Du die
+Taste drückst, verwenden wir folgende Abkürzungen:
+
+C-<chr>        bedeutet: Halte die CONTROL-Taste während der Betätigung der
+       <chr>-Taste gedrückt.  Also bedeutet C-f: Halte die CONTROL
+       Taste, während Du den Buchstaben f drückst.
+M-<chr>        bedeutet: Halte die META-Taste während der Betätigung der
+       <chr>-Taste gedrückt.  Falls es keine META-Taste gibt, tippe
+       zuerst ESC (die ESCAPE-Taste) und danach die <chr>-Taste.
+
+Wichtig: Tippe C-x C-c, um die Emacs-Sitzung zu beenden (zwei
+Zeichen). Die ">>" am linken Seitenrand deuten auf Anweisungen, die
+Du probieren solltest.  so z.B:
+<<Seitenmitte aus didaktischen Gründen leer. Text wird unten fortgesetzt.>>
+>> Tippe nun C-v (Betrachte nächste Seite) um die nächste Seite zu
+       betrachten.  (Also, halte die CONTROL-Taste gedrückt während
+       Du v tippst.)
+       Von jetzt an tu das bitte jeweils nachdem Du eine Seite
+       vollständig gelesen hast.
+
+Bitte beachte die Überlappung von zwei Zeilen wenn Du vorwärts
+blätterst; dies erlaubt es, den Text fließend weiter zu lesen.
+
+Zuerst solltest Du wissen, wie man sich im Text von Stelle zu Stelle
+bewegt. Du weißt bereits, wie man sich mit C-v eine Seite
+weiterbewegt.  Um eine Seite zurück zu gehen, tippe M-v (halte die
+META-Taste gedrückt und tippe v oder tippe <ESC>v wenn Deine Tastatur
+keine META-, EDIT- oder ALT-Taste besitzt).
+
+>>  Versuche ein paar Mal M-v und C-v zu tippen.
+
+
+* ZUSAMMENFASSUNG
+-----------------
+
+Die folgenden Befehle sind nützlich um Text seitenweise zu betrachten:
+
+       C-v     Eine Seite vorwärts blättern
+       M-v     Eine Seite zurück blättern
+       C-l     Bewegt den Bildschirminhalt um den Textzeiger in die
+               Bildmitte und baut den Bildschirm neu auf.
+               (Dies ist CONTROL-<klein L>, nicht CONTROL-1.)
+
+>> Finde den Textzeiger und merke Dir den Text der ihm nahe ist.
+   Nun tippe C-l.
+   Finde den Textzeiger abermals und achte darauf daß er sich,
+   relativ zum Text, nicht bewegt hat.
+
+
+* EINFACHE TEXTZEIGER-STEUERUNG
+-------------------------------
+
+Das Bewegen von Bildschirminhalt zum nächsten ist nützlich, aber wie
+bewegt man sich an eine bestimmte Stelle im Text?
+
+Dazu gibt es mehrere Möglichkeiten.  Die einfachste ist die Befehle
+C-p, C-b, C-f und C-n zu verwenden.  Jeder dieser Befehle bewegt den
+Textzeiger um eine Zeile bzw. Spalte in eine bestimmte Richtung.
+Hier ist eine Tabelle welche die Bewegungsrichtung der vier Befehle
+zeigt:
+                         Vorherige Zeile, C-p
+                                 :
+                                 :
+   Rückwärts, C-b .... Jetzige Textzeiger-Position .... Vorwärts, C-f
+                                 :
+                                 :
+                           Nächste Zeile, C-n
+>> Bewege den Textzeiger mittels C-n oder C-p auf die mittlere Zeile
+   der obigen Tabelle. Dann zentriere das Diagramm mittels C-l im
+   Bildschirmfenster.
+
+Auf Englisch kann man sich diese Befehle leicht einprägen: P für
+previous, N für next, B für backward und F für forward.  Dies sind die
+einfachen Befehle zur Bewegung des Textzeigers. Da Du sie ständig
+benutzen wirst, solltest Du sie jetzt erlernen.
+
+>> Verwende einige C-n's um den Textzeiger auf diese Zeile zu
+   bringen.
+
+>> Bewege Dich mit C-f's in die Zeile und dann hinauf mit C-p's.
+   Beobachte das Verhalten von C-p, wenn Du Dich mitten in einer Zeile
+   befindest.
+
+Jede Textzeile endet mit einem Newline-Zeichen, welches sie von der
+nächsten trennt.  Auch die letzte Zeile in Deiner Datei sollte ein
+Newline am Ende besitzen (obschon Emacs dieses nicht benötigt).
+
+>> Versuche C-b am  Beginn einer Zeile.  Es  sollte Dich zum  Ende der
+   vorigen Zeile bringen.  Dies deshalb, weil es Dich über das 
+   Newline-Zeichen zurückbewegt.
+
+C-f kann sich, wie C-b, über ein Newline hinwegbewegen.
+
+>> Tippe einige C-b's um ein Gefühl für die Position des Textzeigers
+   zu bekommen.  Dann verwende C-f um ans Ende der Zeile zu gelangen.
+   Nun versuche ein weiteres C-f um in die nächste Zeile zu gelangen.
+
+Wenn Du Dich am Anfang oder Ende aus dem Bildschirm bewegst, schiebt
+sich der Text ins Blickfeld.  Diesen Vorgang nennt man rollen oder
+"scrolling".  Er erlaubt Emacs den Textzeiger an die gewünschte
+Stelle zu bringen, ohne ihn aus dem Bildschirmfenster zu bewegen.
+
+>> Versuche den Textzeiger mittels C-n aus dem Blickfeld zu bewegen
+   und beobachte was geschieht.
+
+Wenn Dir die zeichenweise Fortbewegung zu langsam ist, kannst Du
+Dich Wort für Wort bewegen.  M-f (META-f) geht ein Wort weiter und M-b
+geht eins zurück.
+
+>> Tippe ein paar M-f's und M-b's.
+
+Wenn Du mitten in einem Wort bist, bringt Dich M-f an sein Ende.
+Wenn Du auf Leerzeichen zwischen Worten stehst, bewegt Dich M-f zum
+Ende des folgenden Wortes.  M-b bewegt sich sinngemäß zurück.
+
+>> Versuche M-f und M-b einige Male, abgewechselt  von C-f's und C-b's
+   so daß Du das Verhalten von M-f und M-b an verschiedenen Stellen
+   innerhalb und zwischen Wörtern beobachten kannst.
+
+Achte auf die Verwandtschaft von C-f und C-b auf der einen Seite und
+M-f und M-b auf der anderen.  Sehr oft werden META-Befehle für
+Operationen mit Einheiten einer Sprache verwendet (Worte, Sätze,
+Absätze), während CONTROL-Befehle unverändert mit den einfachen
+Einheiten (Buchstaben, Zeilen, etc.) arbeiten.
+
+Diese Parallele ist auf Zeilen und Sätze anwendbar: C-a und C-e gehen
+zum Anfang und Ende einer Zeile, M-a und M-e zum Anfang bzw. Ende
+eines Satzes.
+
+>> Versuche ein paar C-a's und dann ein paar C-e's.
+   Versuche ein paar M-a's und dann ein paar M-e's.
+
+Schau wie mehrere C-a's nichts bewirken, mehrere M-a's sich aber Satz
+für Satz weiterbewegen.  Obwohl sich ihr Verhalten unterscheidet,
+erscheint es natürlich.
+
+Die Stelle des Textzeigers im Text wird auch "Punkt" genannt. Der
+Textzeiger auf dem Bildschirm zeigt an welchem Punkt im Text sich
+dieser befindet.
+
+Hier ist eine Zusammenfassung der einfachen Befehle zur Bewegung des
+Textzeigers, inklusive der Befehle zur wort- und satzweisen Bewegung:
+
+       C-f     Gehe ein Zeichen weiter
+       C-b     Gehe ein Zeichen zurück
+
+       M-f     Gehe ein Wort weiter
+       M-b     Gehe ein Wort zurück
+
+       C-n     Gehe zur nächsten Zeile
+       C-p     Gehe zur vorherigen Zeile
+
+       C-a     Gehe an den Anfang der Zeile
+       C-e     Gehe an das Ende der Zeile
+
+       M-a     Gehe zurück zum Anfang des Satzes
+       M-e     Gehe weiter zum Ende des Satzes
+
+>> Übe jetzt alle diese Befehle einige Male.
+   Es sind die am häufigsten benutzten.
+
+Zwei weitere wichtige Befehle zur Bewegung im Text sind M-< (META
+kleiner), welcher an den Anfang des gesamten Texts springt, und M->
+(META größer), welcher an das Textende hüpft.
+
+Auf einigen deutschen Tastaturen ist ">" über "<", Du mußt also
+möglicherweise die Shift-Taste drücken, um ein > zu tippen. Auf
+solchen Tastaturen mußt Du auch für M-> die Shift-Taste drücken; ohne
+Shift-Taste würdest Du sonst M-< tippen.
+
+>> Versuche jetzt M-< um  an den Beginn dieser einführenden Übungen zu
+   gelangen.
+   Dann verwende C-v wiederholt um hierher zurück zu kommen.
+
+>> Versuche jetzt M-> um ans Ende der Übungen zu springen.
+   Benutzte M-v widerholt um hierher zurück zu gelangen.
+
+Du kannst den Textzeiger auch mit den Pfeil-Tasten bewegen, falls
+Deine Tastatur solche besitzt.  Wir empfehlen das Erlernen von C-b,
+C-f, C-n und C-p aus drei Gründen. Erstens funktionieren sie auf allen
+Tastaturen. Zweitens wirst Du herausfinden, wenn Du einige Übung mit
+Emacs bekommst, daß es schneller ist die CTRL-Tasten zu drücken als
+die Pfeil-Tasten (weil Du Deine Hände nicht aus dem normalen
+Fingersatz bringen mußt). Drittens: Hast Du die Versendung der CTRL
+Befehle erst zu Deiner Gewohnheit gemacht, wird es ein Leichtes
+weitere Bewegungs-Befehle zu erlernen.
+
+Die meisten Emacs-Befehle akzeptieren ein numerisches Argument;
+meistens dient dieses als Wiederholzähler. Dieses Argument übergibt
+man mit C-u, gefolgt von einer Zahl, bevor man den jeweiligen Befehl
+eingibt.  Steht Dir eine META- (oder EDIT- oder ALT)-Taste zur
+Verfügung, so kannst Du dieses Argument auch wie folgt eingeben: Tippe
+die Ziffern während Du die META-Taste gedrückt hältst.  Wir empfehlen
+das Erlernen der C-u Methode, da sie überall funktioniert.
+
+
+z.B., C-u 8 C-f bewegt den Textzeiger um acht Zeichen weiter.
+
+>> Versuche C-n und C-p mit  numerischem  Argument um den  Textzeiger
+   mit nur einem Befehl nahe an diese Zeile heranzubringen.
+
+Die meisten Befehle verwenden ein Argument als Wiederholzähler. Einige
+ausgenommene Befehle verwenden es anders.  C-v und M-v sind unter den
+Ausnahmen. Mit Argument rollen sie den Text um eben soviele Zeilen,
+anstelle von Bildschirmseiten.  z.B. C-u 4 C-v rollt den
+Bildschirminhalt um 4 Zeilen.
+
+>> Versuche C-u 8 C-v nun aus.
+
+Dies sollte den Bildschirminhalt um acht Zeilen nach oben gerollt
+haben.  Wenn Du ihn wieder zurückrollen willst, kannst Du M-v ein
+entsprechendes Argument geben.
+
+Verwendest Du das X Window System, so befindet sich wahrscheinlich ein
+rechteckiger Balken, Scrollbar oder Rollbalken genannt, rechts neben
+dem Emacs-Fenster. Du kannst den Text auch durch Manipulieren dieses
+Rollbalkens mit der Maus rollen.
+
+>> Versuche die mittlere Maustaste in der hervorgehobenen Fläche
+   innerhalb des Rollbalkens zu drücken.  Dies sollte den Text mehr
+   oder weniger rollen, je nachdem wie hoch oder tief der Mauszeiger
+   auf dem Rollbalken positioniert ist.
+
+>> Bewege den Mauszeiger im Rollbalken etwa drei Zeilen unter das
+   obere Ende und drücke die linke Maus-Taste einige Male.
+
+* TEXTZEIGER STEUERUNG MIT EINEM X-TERMINAL 
+-------------------------------------------
+
+An einem X-Terminal wirst Du es wahrscheinlich einfacher finden die
+Tasten des Tastenfeldes zur Textzeiger Steuerung zu gebrauchen.  Die
+Links, Rechts, Auf und Ab Pfeil Tasten steuern in die erwartete
+Richtung; sie funktionieren exakt wie C-b, C-f, C-p und C-n, sind aber
+leichter zu tippen und zu merken.  Du kannst auch C-Links und C-Rechts
+verwenden um wortweise zu springen.  C-Auf und C-Ab bewegen den
+Textzeiger blockweise (z.B.  Absätze, wenn Du Text bearbeitest).
+Die Tasten HOME (oder BEGIN, POS1) und END (oder ENDE) bringen Dich
+zum Anfang oder Ende einer Zeile und C-HOME bzw. C-END bringen Dich
+zum Anfang oder Ende der Datei.  Hat Deine Tastatur PgUp (oder BILD
+AUF) und PgDn (oder BILD AB) kannst Du diese wie M-v und C-v zum
+seitenweisen Rollen verwenden.
+
+All diese Befehle nehmen numerische Argumente wie weiter oben
+beschrieben.  Du kannst diese Argumente mittels einer Abkürzung
+eingeben: Drücke einfache die CONTROL- oder META-Taste während Du die
+Ziffern tippst. z.B. um 12 Worte nach rechts zu gehen, tippe C-1 C-2
+C-Rechts.  Beachte, daß dies ganz einfach, ohne Loslassen der 
+CONTROL-Taste, getippt werden kann.
+
+* WENN EMACS HÄNGT
+------------------
+
+Wenn Emacs auf Deine Befehle nicht mehr reagiert, kannst Du den
+Befehle risikolos mit C-g unterbrechen.  Mit C-g kann man Befehle
+abbrechen, die zu lange dauern.
+
+Du kannst mit C-g auch ein numerisches Argument oder einen teilweise
+eingegebenen Befehl, den Du nicht mehr ausführen willst, verwerfen.
+
+>> Tippe C-u 100 für ein numerisches Argument von 100, dann tippe
+   C-g. Nun tippe C-f.  Es wird nur eine Bewegung um ein Zeichen
+   ausgeführt, da Du das Argument mit C-g verworfen hast.
+
+Hast Du fälschlich ein <ESC> getippt, kannst Du es mit C-g loswerden.
+
+
+* GESPERRTE BEFEHLE
+-------------------
+
+Einige Emacs-Befehle sind "gesperrt", damit sie von Anfängern nicht
+versehentlich benutzt werden können.
+
+Wenn Du einen der gesperrten Befehle tippst, zeigt Emacs die
+Befehlsdokumentation und fragt um Bestätigung, daß der Befehl
+tatsächlich ausgeführt werden soll.
+
+Wenn Du den Befehl wirklich probieren willst, tippe Space als Antwort
+auf die Frage.  Normalerweise, wenn Du den gesperrten Befehl nicht
+ausführen willst, beantwortest Du die Frage mit "n".
+
+>> Tippe `C-x n p' (ein gesperrter Befehl), dann beantworte die Frage
+   mit n.
+
+
+* FENSTER
+---------
+
+Emacs unterstützt mehrere Fenster, jedes mit unterschiedlichem Text.
+Beachte, daß sich der Begriff "Fenster" in Emacs nicht auf
+verschiedene, überlappende Fenster im Fenstersystem bezieht, sondern
+auf verschiedene Teil-Fenster innerhalb eines X Fensters.  (Emacs
+unterstützt auch mehrere X-Fenster, oder "Rahmen" ("frames") in 
+Emacs-Terminologie.  Dies wird später beschrieben.)
+
+       C-x 1   Ein Fenster (d.h., Beende alle anderen Fenster).
+
+Dies ist CONTROL-x gefolgt von der Ziffer 1.  C-x 1 erweitert das
+Fenster mit dem Textzeiger, so daß es das ganze Emacs-Fenster
+einnimmt. Alle anderen Fenster werden beendet.
+
+>> Bewege den Textzeiger auf diese Zeile und tippe C-u 0 C-l.
+
+(Denke daran, daß C-l den Bildschirminhalt neu aufbaut.  Das
+numerische Argument bedeutet: "Baue den Bildschirminhalt neu auf und
+bewege die aktuelle Zeile ebensoviele Zeilen vom oberen
+Bildschirmrand." C-u 0 C-l bedeutet also "Bau den Bildschirm, mit der
+aktuellen Zeile ganz oben, neu auf.")
+
+>> Tippe CONTROL-x 2
+   Beachte wie das Fenster schrumpft, während ein neues mit Teilen
+   derselben Datei erscheint.
+
+>> Tippe C-x 1 und sehe das neue Fenster verschwinden.
+
+
+* EINFÜGEN UND LÖSCHEN
+----------------------
+
+Willst Du Text einfügen, so tippe ihn.  Sichtbare Zeichen, wie A,
+7, *, etc., werden von Emacs als Text betrachtet und unmittelbar
+eingefügt. Tippe <Return> (die Rücklauf-Taste) um ein Newline
+einzufügen.
+
+Mit <Delete> kannst Du das zuletzt getippte Zeichen löschen.
+<Delete> ist eine Taste die möglicherweise mit "Del" oder "Entf"
+beschriftet ist.  In einigen Fällen dient die Backspace (Rückschritt)
+Taste als <Delete>, jedoch nicht immer!
+
+Allgemeiner ausgedrückt löscht <Delete> das Zeichen unmittelbar vor
+dem Textzeiger.
+
+>> Tu dies nun -- tippe einige Buchstaben, lösche sie dann durch
+   mehrmaliges Tippen von <Delete>.  Kein Grund zur Sorge diese Datei
+   zu verändern. Es ist Deine persönliche Kopie der "Einführenden
+   Übungen für Emacs".
+
+Wird eine Zeile zu lang für eine Bildschirm-Zeile, so wird die Zeile
+auf der nächsten Bildschirm-Zeile fortgesetzt. Ein umgekehrter
+Schrägstrich ("\") am rechten Rand zeigt an, daß die Zeile fortgesetzt
+wird.
+
+>> Füge Text ein bis Du den rechten Rand erreichst und tippe weiter.
+   Du wirst bemerken, wie die Fortsetzungszeile erscheint.
+
+>> Verwende <Delete>s bis die Zeile wieder auf eine Bildschirmzeile
+   paßt.  Die Fortsetzungszeile verschwindet.
+
+Ein Newline-Zeichen kann wie jedes andere gelöscht werden. Das
+Löschen des Newline-Zeichens fügt die umgebenden Zeilen zusammen.
+Ist die entstehende Zeile zu lang für den Bildschirm, erscheint 
+wieder eine Fortsetzungszeile.
+
+>> Geh an den Anfang einer Zeile und tippe <Delete>.  Dies fügt die
+   Zeile an die vorhergehende an.
+
+>> Tippe <Return> um den Newline-Zeichen wieder einzufügen.
+
+Denke daran, daß die meisten Emacs-Befehle mittels eines Arguments
+wiederholt werden können; Ein Textzeichen wird mittels Argument
+mehrfach eingefügt.
+
+>> Versuch's einfach -- Tippe C-u 8 * um ******** einzufügen.
+
+Du hast jetzt die einfachsten Befehle zum Einfügen und Korrigieren von
+Text gelernt.  Du kannst auch ganze Worte oder Zeilen löschen.  Hier
+ist eine Zusammenfassung der Lösch-Befehle:
+
+       <Delete>     Lösche das Zeichen vor dem Textzeiger
+       C-d          Lösche das Zeichen nach dem Textzeiger
+
+       M-<Delete>   Lösche das Wort vor dem Textzeiger
+       M-d          Lösche das Wort nach dem Textzeiger
+
+       C-k          Lösche vom Textzeiger bis ans Zeilenende
+       M-k          Lösche vom Textzeiger bis ans Satzende
+
+Beachte daß <Delete> und C-d gegenüber M-<Delete> und M-d die
+Verwandtschaft von C-f und M-f fortsetzen (<Delete> ist zwar keine
+CONTROL-Taste, aber das kümmert uns nicht).  C-k und M-k verhalten
+sich zueinander wie C-e und M-e zu Zeilen und Sätzen.
+
+Wenn Du mehr als ein Zeichen auf einmal löschst, speichert sie
+Emacs, damit Du sie wieder abrufen kannst.  Den gelöschten Text
+zurückzuholen nennt man "yanking".  Du kannst den gelöschten Text an
+der selben oder an einer anderen Textstelle zurückholen.  Der Text
+kann mehrere Male zurückgeholt geholt werden um Mehrfachkopien
+anzulegen.  Der Zurückhol-Befehl ist C-y.
+
+Beachte daß der Unterschied zwischen Entfernen ("Killing") und Löschen
+("Deleting") darin besteht, daß gelöschte Teile zurückgeholt werden
+können, während dies für entfernte Teile nicht möglich ist. Allgemein
+speichern Befehle die viel Text löschen diesen auch, während Befehle,
+die nur einzelne Zeichen oder Leerzeilen entfernen, diese nicht
+speichern.
+
+>> Gehe zum Beginn einer nicht leeren Zeile.
+   Dann lösche den gesamten Text der Zeile mit C-k.
+>> Tippe C-k ein zweites Mal. Du wirst sehen, daß dies das folgende
+   Newline-Zeichen löscht.
+
+Beachte, daß ein einzelnes C-k den Inhalt einer Zeile löscht, ein
+zweites die Zeile selbst, so daß sich nachfolgende Zeilen nach oben
+bewegen.  Ein numerisches Argument wird von C-k besonders behandelt:
+Es löscht ebensoviele Zeilen mitsamt Inhalt.  Dies ist keine einfache
+Wiederholung.  C-u 2 C-k löscht zwei Zeilen und deren Inhalt; zwei
+aufeinanderfolgende C-k würden dies nicht tun.
+
+Um den zuletzt gelöschten Text beim Textzeiger zurückzuholen, tippe
+C-y.
+
+>> Versuch's; Tippe C-y um den Text zurückzuholen.
+
+Denke so über C-y als ob Du etwas zurückholst, das man Dir genommen
+hat.  Beachte, daß bei aufeinanderfolgenden C-k's der gelöschte Text in
+einem Stück gespeichert wird, so daß ein C-y alle Zeilen zurück bringt.
+
+>> Tu's jetzt, tippe C-k mehrere Male.
+
+Nun das Zurückholen des gelöschten Texts:
+
+>> Tippe C-y.  Dann gehe einige Zeilen nach unten und tippe wieder C-y.
+   Jetzt siehst Du, wie man Text kopiert.
+
+Was machst Du, wenn Du Text zum Zurückholen hast, dann aber etwas
+anderes löscht?  C-y würde das zuletzt Gelöschte zurückbringen.  Aber
+der zuvor gelöschte Text ist nicht verloren.  Du kannst Ihn mit M-y
+zurückholen.  Nachdem Du C-y getippt hast, kannst Du mit M-y den
+zurückgeholten Text durch früher gelöschten Text ersetzten.  Tippst Du
+M-y wieder und wieder, holst Du früher und früher Gelöschtes zurück.
+Hast Du den gewünschten Text erreicht, brauchst Du nichts weiter zu
+tun um diesen zu behalten.  Fahre mit mit Deiner Arbeit fort und laß
+den zurückgeholten Text wo er ist.
+
+Verwendest Du M-y oft genug, kehrst Du an den Anfang zurück (der
+letzte Löschvorgang).
+
+>> Lösche eine Zeile, bewege Dich im Text, lösche eine weitere Zeile.
+   Dann tippe C-y um die zuletzt gelöschte Zeile zurückzuholen.
+   Darauf verwende M-y und die zuerst gelöschte Zeile ersetzt den
+   zuvor zurückgeholten Text.  Verwende weitere M-y's und sieh was
+   passiert. Fahre fort bis die zweite Zeile wiederkehrt und versuche
+   noch einige M-y's.
+   Wenn Du willst, kannst Du M-y positive und negative Argumente
+   geben.
+
+
+* RÜCKGÄNGIG MACHEN
+-------------------
+
+Veränderst Du Text und entscheidest Du dann, daß dies ein Fehler war,
+kannst Du die Änderungen mit C-x u rückgängig machen.
+
+Üblicherweise macht C-x u die Änderungen des letzten Befehls
+rückgängig; wenn Du C-x u mehrmals wiederholst, wird jeweils ein
+weiterer Befehl rückgängig gemacht.
+
+Aber es gibt zwei Ausnahmen: Befehle, die keinen Text verändern,
+zählen nicht (dies schließt Befehle zum Bewegen und Rollen des
+Textzeigers ein) und selbsteinfügende Befehle werden üblicherweise in
+Zwanziger-Gruppen behandelt.  (Dies dient dazu, die Anzahl der C-x u's
+zu reduzieren die Du tippen mußt um eingetippten Text rückgängig zu
+machen.)
+
+>> Lösche diese Zeile mit C-k, dann tippe C-x u und sie sollte
+   wiedererscheinen.
+
+C-_ ist ein alternativer rückgängig (undo) Befehl; er funktioniert wie
+C-x u, ist aber einfacher zu Wiederholen. Der Nachteil ist, daß C-_
+auf einigen Tastaturen nicht direkt getippt werden kann. Deshalb gibt
+es C-x u.  Auf einigen Tastaturen kann man C-_ als C-\ tippen.
+
+Ein numerisches Argument für C-_ oder C-x u dient als Wiederholwert.
+
+
+* DATEIEN
+---------
+
+Um an einem Text bleibende Änderungen vorzunehmen, mußt Du ihn in
+einer Datei speichern.  Sonst gehen Deine Änderungen mit dem Beenden
+von Emacs verloren.  Du legst Deine Arbeit in einer Datei ab, indem Du
+eine Datei "findest".  (Man nennt dies auch das "Besuchen"
+("visiting") einer Datei.)
+
+Das Finden einer Datei bedeutet, daß Du ihren Inhalt mit Emacs
+betrachtest.  In vielfacher Hinsicht ist es, als würdest Du die Datei
+selbst bearbeiten.  Jedoch sind Deine Änderungen nicht permanent bis
+Du die Datei sicherst.  Damit kannst Du verhindern halb-fertige
+Dateien auf dem System abzulegen, wenn Du dies nicht willst.  Sogar
+beim Abspeichern hinterläßt Emacs die Originaldatei unter verändertem
+Namen falls Du später entscheiden solltest, daß die Änderungen ein
+Fehler waren.
+
+Nahe dem unteren Ende des Bildschirms siehst Du eine Zeile die mit
+Bindestrichen beginnt und endet und den Text "Emacs: TUTORIAL"
+enthält.  Dieser Teil des Bildschirms zeigt immer den Namen der
+besuchten Datei. Zur Zeit besuchst Du eine Datei namens "TUTORIAL",
+welche Deine persönliche Kopie des Emacs Tutorials ist.  Was immer für
+eine Datei Du findest, ihr Name wird immer an dieser Stelle
+erscheinen.
+
+Die Befehle zum Finden und Sichern von Dateien sind anders als die
+bisher erlernten, da sie jeweils aus zwei Zeichen bestehen.  Beide
+beginnen mit dem Zeichen CONTROL-x. Es gibt eine ganze Reihe von
+Befehlen, die mit CONTROL-x beginnen; viele haben mit Dateien, Buffern
+und verwandten Dingen zu tun.  Diese Befehle sind zwei, drei oder vier
+Zeichen lang.
+
+Bei Befehlen zum Finden einer Datei mußt Du außerdem den Dateinamen
+angeben.  Wir sagen: "Der Befehl liest ein Argument vom Terminal." (In
+diesem Fall ist das Argument der Dateiname).  Nachdem Du folgenden
+Befehl tippst
+
+       C-x C-f   Finde eine Datei
+
+bittet Dich Emacs, einen Dateinamen einzugeben.  Der Dateiname den Du
+tippst erscheint am unteren Ende des Emacs-Fensters.  Diese unterste
+Zeile wird Minibuffer genannt, wenn sie für diese Art Eingabe
+verwendet wird.  Du kannst die üblichen Emacs-Befehle zum
+Bearbeiten des Dateinamens verwenden.
+
+Während Du den Dateinamen eingibst (oder bei jeder anderen
+Minibuffer-Eingabe) kannst Du den Befehl mit C-g abbrechen.
+
+>> Tippe C-x C-f, dann tippe C-g. Dies beendet den Minibuffer und
+   bricht den C-x C-f Befehl ab, der den Minibuffer benutzte. Du wirst
+   also keine Datei finden.
+
+Wenn Du mit dem Bearbeiten des Dateinamens fertig bist, tippe <Return>
+um die Eingabe zu beenden.  Der C-x C-f Befehl beginnt seine Arbeit
+und findet die Datei Deiner Wahl.  Der Minibuffer verschwindet, wenn
+der C-x C-f Befehl beendet ist.
+
+Nach kurzer Zeit erscheint der Inhalt der Datei auf dem Bildschirm und
+Du kannst diesen bearbeiten.  Wenn Du Deine Änderungen sichern willst,
+tippe den Befehl
+
+       C-x C-s   Sichere die Datei
+
+Das kopiert den Text von Emacs in die Datei.  Geschieht dies das erste
+Mal so benennt Emacs die Originaldatei um, so daß sie nicht verloren
+geht.  Der neue Name entsteht durch Anhängen von "~" am Ende des
+Originalnamens.
+
+Ist der Sicherungsvorgang beendet, gibt Emacs den Namen der Datei an.
+Du solltest recht oft sichern, damit Du nicht viel Arbeit verlierst,
+sollte das System abstürzen.
+
+>> Tippe C-x C-s um Deine Kopie des tutorials zu sichern.
+   Dies sollte "Wrote ...TUTORIAL" am Fuß des Bildschirms ausgeben.
+
+ACHTUNG: Auf manchen Systemen wird C-x C-s den Bildschirm anhalten und
+Du wirst keine weitere Ausgabe von Emacs sehen.  Dies bedeutet, daß
+auf Deinem System eine Betriebssystemeigenschaft ("feature") namens
+Flußsteuerung ("flow control") das C-s abfängt und nicht an Emacs
+weitergibt.  Tippe C-q, um den Effekt aufzuheben, so daß der Bildschirm
+wieder reagiert.  Schau dann unter "Spontaneous Entry to Incremental
+Search" im Emacs Manual nach, um Hilfe im Umgang mit diesem "Vorzug"
+("feature") zu bekommen.
+
+Du kannst eine existierende Datei finden, um sie zu betrachten.  Du
+kannst aber auch eine Datei "finden", die es noch nicht gibt.  So
+erstellt man eine neue Datei mit Emacs: finde die Datei, welche
+anfänglich leer ist, dann tippe den Text für die Datei ein.  Wenn Du
+danach sicherst, wird Emacs die Datei tatsächlich anlegen und Deinen
+eingetippten Text darin ablegen.  Von da an arbeitest Du an einer
+existierenden Datei.
+
+
+* BUFFER
+--------
+
+Findest Du eine weitere Datei mit C-x C-f, bleibt die erste in Emacs
+erhalten.  Du kannst zu dieser mit C-x C-f zurückschalten.  Auf diese
+Art kannst Du eine erhebliche Anzahl von Dateien in Emacs verfügbar
+haben.
+
+>> Erstelle eine Datei namens "foo" durch Eintippen von C-x C-f foo
+   <Return>.
+   Dann füge etwas Text ein, bearbeite ihn und sichere die Datei "foo"
+   mit C-x C-s.
+   Schließlich tippe C-x C-f TUTORIAL <Return> um zum Tutorial zurück
+   zu gelangen.
+
+Emacs hält den Text jeder Datei in einem Objekt namens "buffer".  Das
+Finden einer Datei legt in Emacs einen neuen Buffer an.  Um eine Liste
+aller Buffer in Deiner Emacs-Sitzung zu erhalten tippst Du
+
+       C-x C-b   Liste alle Buffer
+
+>> Probiere C-x C-b jetzt aus.
+
+Beachte, daß jeder Buffer einen Namen hat.  Wenn der Buffer einer Datei
+zugeordnet ist, wird auch der Dateiname angezeigt.  Einige Buffer haben
+keine Entsprechung im Dateisystem.  So hat z.B. der Buffer namens
+"*Buffer List*" keine zugeordnete Datei.  Dieser Buffer enthält die
+Liste der Buffer, die mit C-x C-b erstellt wurde.  JEDER Text in Emacs
+ist Teil irgendeines Buffers.
+
+>> Tippe C-x 1 um die Bufferliste loszuwerden.
+
+Wenn Du Änderungen in einer Datei vornimmst, dann eine andere findest,
+so wird der Inhalt der ersten nicht gesichert.  Die Änderungen bleiben
+innerhalb von Emacs im zugeordneten Buffer erhalten.  Das Bearbeiten
+einer weiteren Datei hat keinen Einfluß auf den Buffer der ersten.
+Dies ist sehr nützlich, man braucht aber auch eine angenehme
+Möglichkeit, den Buffer der ersten Datei zu sichern.  Es wäre lästig,
+müßte man mit C-x C-f zur ersten Datei zurückgehen, um diese dann mit
+C-x C-s zu sichern. Darum haben wir
+
+       C-x s     Sichere mehrere Buffer
+
+C-x s befragt Dich zu jedem Buffer, der ungesicherte Änderungen
+enthält.  Für jeden einzelnen wirst Du gefragt ob Du Ihn sichern
+willst.
+
+>> Füge eine Text-Zeile ein, dann tippe C-x s.
+   Du wirst gefragt, ob Du den Buffer namens TUTORIAL speichern
+   willst.
+
+* VERWENDUNG DES MENÜS
+----------------------
+
+An einem X-Terminal wirst Du eine Menüleiste am oberen Ende des Emacs
+Fensters bemerken.  Mit der Menüleiste kannst Du die allgemeinsten
+Emacs-Befehle, wie "Finde Datei" ("find file"), erreichen.  Du wirst
+dies anfänglich einfacher finden, da Du dir die notwendigen
+Tastenkombinationen der Befehle nicht merken mußt.  Bist Du einmal
+mit Emacs vertraut, wird es ein Leichtes sein die Kommandos zu
+benutzen, da jeder Menüeintrag, der einer Tastenkombination
+entspricht, diese auch anzeigt.
+
+Beachte, daß es viele Menüeinträge ohne entsprechende Tastensequenz
+gibt.  So listet z.B. das Buffers-Menü die verfügbaren Buffer in
+letzt-benutzter Reihenfolge.  Du kannst zu jedem Buffer über den
+Eintrag im Buffers-Menü gelangen.
+
+* VERWENDUNG DER MAUS
+---------------------
+
+Unter X Windows hat Emacs volle Maus-Unterstützung. Der Textzeiger
+kann durch Drücken der linken Maustaste an der gewünschten Stelle des
+Mauszeigers dorthin gesetzt werden. Text kann durch Ziehen des
+Mauszeigers bei gedrückter linker Maustaste selektiert werden.
+(Oder man klickt die linke Maustaste an der einen Stelle im Text und
+verwendet SHIFT-Klick an der anderen um den dazwischenliegenden Text
+zu selektieren.)
+
+Um selektierten Text zu löschen kannst Du C-w benutzen, oder den
+Menüeintrag "Cut" im Edit-Menü verwenden.  Beachte, daß diese
+Methoden nicht gleichbedeutend sind: C-w sichert den Text nur
+innerhalb von Emacs (ähnlich wie oben unter C-k beschrieben), während
+Cut den Text auch im X Clipboard ablegt, von wo ihn andere Programme
+abholen können.
+
+Verwende "Paste" im Edit-Menü um Text vom X Clipboard zurückzuholen.
+
+Die mittlere Maustaste wird häufig verwendet um sichtbare Objekte auf
+dem Bildschirm auszuwählen.  Wenn Du z.B. "Info" (die Online Emacs
+Dokumentation) mit C-h i oder über das Help-Menü aufrufst, kannst Du
+einer hervorgehobenen Verknüpfung durch Klicken der mittleren
+Maustaste folgen. Ganz ähnlich, wenn Du einen Dateinamen eingibst
+(z.B. wenn von "Find File" gefragt) und TAB tippst um die möglichen
+Vervollständigungen zu erhalten, kannst Du mit der mittleren Maus die
+gewünschte Vervollständigung wählen.
+
+Die rechte Maustaste zeigt ein Popup-Menü.  Der Inhalt des Menüs
+variiert abhängig vom gewählten Modus und zeigt für gewöhnlich einige
+häufig benutzte Befehle, die so einfacher benutzt werden können.
+
+>> Drücke jetzt die rechte Maustaste.
+
+Du mußt die Taste gedrückt halten, damit das Menü nicht gleich wieder
+verschwindet.
+
+* ERWEITERUNG DES BEFEHLSSATZES
+-------------------------------
+
+Es gibt viel mehr Emacs-Befehle als man auf allen CONTROL- und 
+META-Zeichen unterbringen könnte. Emacs löst dieses Problem mit dem X
+(eXtend) Befehl. Davon gibt es zwei Ausführungen:
+
+       C-x     Zeichenerweiterung eXtend.  Gefolgt von einer
+               Tastaturkombination.
+       M-x     Namenserweiterung eXtend.  Gefolgt von einer
+               ausgeschriebenen Befehlsbezeichnung.
+
+Diese Befehle sind zwar im Allgemeinen nützlich, werden aber seltener 
+verwendet als die bereits erlernten Befehle. Zwei von ihnen hast Du 
+bereits kennengelernt: Die Befehle C-x C-f zum Finden und C-x C-s 
+zum Sichern von Dateien. Ein anderes Beispiel ist der Befehl zum Beenden 
+einer Emacs-Sitzung -- dieser Befehl ist C-x C-c. (Habe keine Angst, 
+ungesicherte Änderungen zu verlieren; C-x C-c bietet die Möglichkeit zum 
+Sichern einer jeden geänderten Datei bevor Emacs beendet wird.)
+
+Mit C-z kann man Emacs vorübergehend verlassen -- so daß Du später zur
+gleichen Sitzung zurückkehren kannst.
+
+Auf Systemen, die dies unterstützen sendet C-z Emacs "in den
+Hintergrund"; man kehrt zur Shell zurück, ohne daß der Emacs-Prozeß
+beendet wird.  In den gebräuchlichsten Shells kann man zu Emacs mit
+`fg' oder `%emacs' zurückkehren.
+
+Auf Systemen, die dieses Aussetzen von Emacs nicht unterstützen,
+startet C-z eine s.g. Sub-Shell von der aus Du Programme starten und
+danach zu Emacs zurückkehren kannst; Emacs wird in diesem Fall nicht
+wirklich verlassen.  Der Shell-Befehl `exit' ist in diesem Fall der
+üblichste um zu Emacs zurückzukehren.
+
+C-x C-c verwendet man unmittelbar bevor man das System verlassen will.
+Es ist auch die richtige Methode um einen Emacs zu verlassen der für
+E-mail-Programme, oder andere Erweiterungen, die das Aussetzen von
+Emacs nicht korrekt handhaben können, benutzt wird.  Normalerweise 
+ist es besser Emacs mit C-z auszusetzen statt ihn zu beenden, wenn 
+man das System nicht verlassen will,.
+
+Es gibt viele C-x-Befehle.  Hier ist eine Liste der bereits erlernten:
+
+       C-x C-f         Finde Datei.
+       C-x C-s         Sichere Datei.
+       C-x C-b         Liste alle Buffer.
+       C-x C-c         Beende Emacs.
+       C-x u           Rückgängig machen (Undo).
+
+Namenserweiterte Befehle (eXtended commands) sind solche, die weniger
+häufig oder nur in einem bestimmten Modus verwendet werden.  Ein
+Beispiel ist der Befehl replace-string, der einen Text durch einen
+anderen ersetzt.  Wenn Du M-x tippst, zeigt dies Emacs am unteren Ende
+des Emacs-Fensters mit M-x an und Du solltest den Namen des Befehls
+eintippen; in diesem Fall "replace-string".  Tippe einfach
+"repl s<TAB>" und Emacs wird den Namen vervollständigen. Beende den
+Befehlsnamen mit <Return>.
+
+Der replace-string Befehl braucht zwei Argumente -- den zu ersetzenden
+Text und den Ersatz-Text. Jedes Argument muß mit <Return> beendet
+werden.
+
+>> Gehe zur Leerzeile zwei Zeilen unter dieser.
+   Dann tippe M-x repl s<Return>veraendert<Return>geaendert<Return>.
+
+   Beachte wie diese Zeile sich veraendert hat: Du hast das Wort
+   v-e-r-a-e-n-d-e-r-t mit "geaendert" ersetzt wo immer es nach der
+   anfänglichen Textzeiger Position auftrat.
+
+
+* AUTOMATISCHE SICHERUNG
+------------------------
+
+Wenn Du Änderungen in einer Datei vornimmst, diese aber noch nicht
+gesichert hast, so können diese bei einem Computerabsturz verloren
+gehen.  Um Dich davor zu schützen, schreibt Emacs regelmäßig eine 
+Autosave-Datei für jede Datei, die Du bearbeitest.  Autosave-Dateien
+beginnen und enden mit "#"; wenn Deine Datei z.B. "hello.c" heißt, so
+heißt die auto-save Datei "#hello.c#".  Sicherst Du die Datei, so
+löscht Emacs die entsprechende auto-save Datei.
+
+Nach einem Computerabsturz kannst Du die automatisch
+gesicherten Änderungen nach dem normalen Finden der Datei (Deiner
+Datei, nicht der Autosave-Datei) durch Eintippen von M-x
+recover-file<return> zurückholen.  Wenn Du nach der Bestätigung 
+gefragt wirst, tippst Du yes<return> um die Änderungen in der 
+Autosave-Datei wiederherzustellen.
+
+
+* ECHO BEREICH
+--------------
+
+Wenn Emacs bemerkt, daß Du Befehle langsam tippst, werden Dir diese am
+Fuß des Emacs-Fensters in der s.g. "echo area" angezeigt.  Die echo
+area nimmt die unterste Zeile im Emacs-Fenster ein.
+
+
+* MODUSZEILE
+------------
+
+Die Zeile über der echo area wird "mode line" genannt.  Die Moduszeile
+zeigt etwa folgendes:
+
+--**-XEmacs: TUTORIAL          (Fundamental)--L670--58%----------------
+
+Diese Zeile gibt nützliche Information über den Zustand von Emacs und
+dem Text, den Du bearbeitest.
+
+Du kennst bereits die Bedeutung des Dateinamens -- es ist die Datei,
+die Du gefunden hast.  -NN%-- zeigt Deine Position im Text; dies
+bedeutet daß NN Prozent des Texts oberhalb des sichtbaren Bereiches
+liegen.  Bist Du am Beginn, so erscheint --Top-- anstelle von --00%--.
+Bist Du am Ende des Texts, so erscheint --Bot--.  Ist der gesamte Text
+sichtbar, so erscheint --All--.
+
+Die Sterne nahe dem Beginn der Moduszeile bedeuten, daß der Text
+verändert wurde.  Unmittelbar nach dem Besuchen oder Sichern einer
+Datei, zeigt dieser Bereich keine Sterne, sondern Bindestriche.
+
+Der Teil der Moduszeile innerhalb der Klammern gibt Auskunft über die
+Bearbeitungs-Modi, die Du derzeit verwendest.  Der Ausgangsmodus ist
+Fundamental --  der, den Du jetzt gerade benutzt. Er ist ein Beispiel
+für einen Hauptmodus ("major mode").
+
+Emacs besitzt viele verschiedene Hauptmodi.  Einige von ihnen sind zum
+Bearbeiten von verschiedenen Computersprachen und/oder Textformaten,
+wie z.B. Lisp-Modus, Text-Modus, etc., gedacht.  Es ist immer nur ein
+Hauptmodus aktiv und sein Name kann dort gefunden werden, wo jetzt
+"Fundamental" steht.
+
+Jeder Hauptmodus ändert das Verhalten einiger Befehle. So gibt es
+z.B. Befehle zum Erstellen von Kommentaren in Programmen und da diese
+in jeder Programmiersprache unterschiedlich aussehen, muß jeder
+Hauptmodus diese Kommentare entsprechend vorbereiten.  Jeder
+Hauptmodus trägt den Namen eines entsprechenden Erweiterungsbefehls, so
+kann man ihn wählen.  So ist z.B. M-x fundamental-mode der Befehl, um
+in den Fundamental-Modus zu schalten.
+
+Wenn Du deutschen Text bearbeitest, wie in diesem Fall, solltest Du
+wahrscheinlich den Text-Modus verwenden.
+
+>> Tippe M-x text-mode<Return>.
+
+Keine Sorge, keiner der bis jetzt erlernten Befehle ändert Emacs
+grundlegend.  Du kannst aber beobachten, daß M-f und M-b Gänsefüßchen
+jetzt als Teil von Worten betrachten.  Zuvor, im Fundamental-Modus,
+haben M-f und M-b diese als Wort-Separatoren betrachtet.
+
+Hauptmodi machen im Allgemeinen kleine Änderungen wie diese: die
+meisten Befehle erfüllen den selben Zweck, aber sie funktionieren
+etwas anders.
+
+Um Dokumentation über den aktuellen Hauptmodus zu bekommen, kannst Du
+immer C-h m verwenden.
+
+>> Verwende C-u C-v ein- oder mehrmals um diese Zeile ans obere Ende
+   des Emacs-Fensters zu bekommen.
+>> Tippe C-h m um den Unterschied zwischen Text- und Fundamental-Modus
+   zu sehen.
+>> Tippe C-x 1 um die  Dokumentation wieder verschwinden zu lassen.
+
+Hauptmodi heißen so, weil es auch Untermodi gibt. Untermodi sind keine
+Alternativen zu Hauptmodi, sondern bewirken kleine Veränderungen
+derselben.  Jeder Untermodus kann für sich allein, unabhängig von
+allen Haupt- und Untermodi, ein und ausgeschaltet werden.  Du kannst
+also jederzeit keinen, einen, oder beliebig viele Untermodi verwenden.
+
+Ein sehr nützlicher Untermodus, speziell für deutschen Text, ist der
+Automatische-Zeilenumbruch-Modus (auto fill).  Ist dieser Modus aktiv,
+bricht Emacs überlange Zeilen automatisch zwischen zwei Worten um.
+
+Du kannst den Modus mit M-x auto-fill-mode<Return> einschalten.  Ist
+der Modus aktiv, kannst Du ihn mit M-x auto-fill-mode<Return> wieder
+ausschalten.  Wir sagen der Befehl "toggelt" den Modus.
+
+>> Tippe jetzt M-x auto-fill-mode<Return>.  Dann füge "asdf "
+   wiederholt ein, bis die Zeile, zu lang geworden, umgebrochen
+   wird. Du mußt die Leerzeichen einfügen, weil Auto Fill Zeilen nur an
+   diesen Zeichen umbricht.
+   
+Die Umbruchspalte steht üblicherweise bei 70 Zeichen, aber Du kannst
+dies mit dem C-x f Befehl ändern.  Die gewünschte Umbruchspalte wird
+als numerisches Argument übergeben.
+
+>> Tippe C-x f mit einem Argument von 20.  (C-u 2 0 C-x f).
+   Danach tippe etwas Text, um zu sehen wie Emacs die Zeilen jetzt bis
+   Spalte 20 füllt.  Dann setze den Zeilenumbruch zurück auf 70.
+
+Machst Du Änderungen mitten im Absatz, so wird der automatische Umbruch
+diesen nicht für Dich auffüllen.  Um den Absatz aufzufüllen, tippe M-q
+(META-q) während der Textzeiger in diesem Absatz steht.
+
+>> Bewege den Textzeiger in den vorherigen Absatz und tippe M-q.
+
+
+* SUCHEN
+--------
+
+Emacs kann nach Zeichenketten ("Strings", dies sind Gruppen von 
+zusammenhängenden Buchstaben oder Worten) entweder vorwärts oder 
+rückwärts durch den Text suchen.  Suchen nach einem String ist ein 
+Befehl, der den Textzeiger bewegt; er bewegt den Textzeiger zur 
+nächsten Stelle an der ein bestimmter String vorkommt.
+
+Der Emacs Suchbefehl unterscheidet sich von denen der meisten anderen
+Editoren, da er "inkrementell" ist. Dies bedeutet, daß das Suchen 
+während der Eingabe des Such-Strings passiert.
+
+Der Befehl um eine Suche auszulösen ist C-s für vorwärtiges und C-r
+für rückwärtiges Suchen. ABER WARTE! Versuche die Befehle noch nicht.
+
+Wenn Du C-s tippt, wirst Du den String "I-search" in der echo area
+bemerken.  Dies bedeutet, daß Emacs im inkrementellen Suchmodus auf
+Deine Eingabe wartet.  <RET> bricht die Suche ab.
+
+>> Nun tippe C-s um die Suche einzuleiten. LANGSAM, Buchstabe für
+   Buchstabe, tippe das Wort 'Textzeiger', mit Pausen dazwischen,
+   damit Du beobachten kannst, was mit dem Textzeiger basiert.
+   Du hast jetzt einmal nach "Textzeiger" gesucht.
+>> Tippe erneut C-s, um nach dem nächsten Vorkommen von "Textzeiger"
+   zu suchen.
+>> Nun tippe <Delete> viermal und schau wie sich der Textzeiger
+   bewegt.
+>> Tippe <RET> zum Abbrechen der Suche.
+
+Hast Du gesehen was passiert?  Emacs, in der inkrementellen Suche,
+versucht zu dem String zu springen, den Du bisher getippt hast.  Um
+zum nächsten Auftreten von "Textzeiger" zu gelangen, tippst Du einfach
+wieder C-s.  Gibt es kein weiteres Vorkommen, so piepst Emacs und
+zeigt die Suche als fehlgeschlagen an. C-g bricht die Suche auch ab.
+
+ACHTUNG: Auf manchen Systemen wird C-s den Bildschirm anhalten und Du
+wirst keine weitere Ausgabe von Emacs sehen.  Dies bedeutet, daß auf
+Deinem System eine Betriebssystemeigenschaft ("feature") namens
+Flußsteuerung ("flow control") das C-s abfängt und nicht an Emacs
+weitergibt.  Tippe C-q, um den Effekt aufzuheben, so daß der Bildschirm
+wieder reagiert.  Schau dann unter "Spontaneous Entry to Incremental
+Search" im Emacs Manual nach, um Hilfe im Umgang mit diesem "Vorzug"
+("feature") zu bekommen.
+
+Wenn Du in der Mitte einer inkrementellen Suche <Delete> tippst, wirst
+Du bemerken, wie der letzte Such-Buchstabe entfernt wird und die Suche
+an die letzte Stelle der Suche zurück springt.  Nehmen wir z.B. an, Du
+hast "T" getippt, um nach dem ersten Auftreten von "T" zu suchen. Wenn
+Du jetzt "e" tippst, springt der Textzeiger zum ersten Auftreten von
+"Te". Tippe nun <Delete>. Dies entfernt das "e" von Such-String und
+der Textzeiger springt zurück zum ersten Vorkommen von "T".
+
+Wenn Du mitten in einer Suche ein CONTROL- oder META-Zeichen tippst
+(mit wenigen Ausnahmen -- Buchstaben mit Sonderbedeutung bei der
+Suche, so wie C-s und C-r), wird die Suche abgebrochen.
+
+C-s startet eine Suche NACH der aktuellen Textzeiger Position.  Willst
+Du etwas früher im Text finden, tippe stattdessen C-r.  All das was
+wir über C-s gesagt haben gilt auch für C-r, nur daß die Suchrichtung
+umgedreht wird.
+
+
+* MEHRERE FENSTER
+-----------------
+
+Einer der netten Vorzüge von Emacs ist es, daß Du mehr als jeweils ein
+Fenster am Bildschirm darstellen kannst.
+
+>> Bewege den Textzeiger auf diese Zeile und tippe C-u 0 C-l.
+
+>> Nun tippe C-x 2, was das Emacs-Fenster zweiteilen wird.
+   Beide Fenster zeigen dieses Tutorial. Der Textzeiger bleibt im
+   oberen Fenster.
+
+>> Tippe C-M-v um beide Fenster zu rollen.
+   (Hast Du keine echte META-Taste, tippe Esc C-v.)
+
+>> Tippe C-x o ("o" für "other" oder anderes) um den Textzeiger ins
+   andere (untere) Fenster zu bewegen.
+>> Verwende C-v und M-v im unteren Fenster um dieses zu rollen.
+   Lies diese Anweisungen im oberen Fenster weiter.
+
+>> Tippe C-x o um wieder zurück ins obere Fenster zu gelangen.
+   Der Textzeiger im oberen Fenster ist noch immer wo er vorher war.
+
+Du kannst weiterhin mit C-x o zwischen den Fenstern umschalten.  Jedes
+Fenster hat seine eigene Textzeiger-Position, aber nur ein Fenster
+zeigt diese auch an.  Alle üblichen Bearbeitungs-Befehle beziehen sich
+auf das Fenster mit dem Textzeiger.  Wir nennen es das "selektierte
+Fenster".
+
+Der Befehl C-M-v ist sehr hilfreich wenn Du in einem Fenster Text
+bearbeitest und das andere als Referenz verwendest.  Du kannst den
+Textzeiger immer im oberen Fenster lassen, und Dich mit C-M-v durch
+das andere Fenster bewegen.
+
+C-M-v ist ein Beispiel für einen CONTROL-META-Zeichen.  Wenn Du eine
+echte META-Taste hast, kannst Du sowohl CTRL als auch META gedrückt
+halten, während Du v tippst.  Es kommt nicht darauf an ob CTRL oder
+META zuerst gedrückt wird, weil beide dazu dienen um den gedrückten
+Buchstaben zu verändern.
+
+Hast Du keine echte META-Taste und Du verwendest stattdessen ESC, ist
+die Reihenfolge nicht egal: zuerst tippst Du ESC, gefolgt von CTRL-v;
+CTRL-ESC v wird nicht funktionieren.  Dies ist so weil ESC ein
+eigenständiges Zeichen ist und keine Modifikations-Taste.
+
+>> Tippe C-x 1 (im oberen Fenster) um das untere Fenster loszuwerden.
+
+(Hättest Du C-x 1 im unteren Fenster getippt, wäre das obere Fenster
+verschwunden.  Merke Dir den Befehl mit "Behalte nur ein Fenster --
+das aktuelle Fenster.")
+
+Du mußt nicht denselben Buffer in beiden Fenstern anzeigen.  Wenn Du
+C-x C-f zum Finden einer Datei in einem Fenster verwendest, verändert
+sich das andere Fenster nicht.  Du kannst in jedem Fenster unabhängig
+eine Datei finden.
+
+Hier ist eine andere Möglichkeit zwei Fenster zum Anzeigen
+verschiedener Dinge zu nutzen:
+
+>> Tippe C-x 4 C-f gefolgt vom Namen einer Deiner Dateien.
+   Beende mit <Return>.  Schau wie die angegebene Datei im unteren
+   Fenster erscheint.  Auch der Textzeiger folgt dorthin.
+
+>> Tippe C-x o um ins obere Fenster zurückzukehren und beende das
+   untere Fenster mit C-x 1.
+
+
+* REKURSIVE BEARBEITUNGSEBENEN
+------------------------------
+
+Manchmal wirst Du in sogenannte rekursive Bearbeitungsebenen
+gelangen.  Dies wird durch eckige Klammern in der Moduszeile angezeigt,
+welche den Namen des Hauptmodus umgeben.  Du könntest
+z.B. [(Fundamental)] anstelle von (Fundamental) sehen.
+
+Um aus der rekursiven Bearbeitungsebene zu gelangen, tippst Du ESC
+ESC ESC.  Dies ist ein allgemeiner Ausstiegs- oder "get out"-Befehl.
+Du kannst ihn auch verwenden, um unnötige Fenster loszuwerden und um
+aus dem Minibuffer zu gelangen.
+
+>> Tippe M-x um in den Minibuffer zu gelangen; dann ESC ESC ESC um
+   auszusteigen.
+
+Du kannst nicht mit C-g aus einer rekursiven Bearbeitungs-Ebene
+gelangen.  Dies deshalb, weil C-g zum Beenden von Befehlen und
+Argumenten INNERHALB von rekursiven Bearbeitungs-Ebenen dient.
+
+
+* WEITERFÜHRENDE HILFE
+----------------------
+
+In diesen einführenden Übungen haben wir versucht, gerade genug
+Information zu liefern, damit Du beginnen kannst mit Emacs zu
+arbeiten.  Emacs ist so umfangreich, daß es unmöglich wäre, alles
+hier zu erklären.  Allerdings solltest Du versuchen, mehr über Emacs zu
+lernen, da er so viele nützliche Vorzüge besitzt.  Emacs bietet
+Befehle zum Lesen der Emacs-Befehlsdokumentation.  Diese Hilfe- oder
+"help" Befehle beginnen alle mit dem Buchstaben CONTROL-h, den wir auch
+das "Hilfe-Zeichen" nennen.
+
+Um die Hilfeeinrichtungen zu verwenden, tippe C-h, gefolgt von einem
+Buchstaben der angibt, welche Art von Hilfe Du willst.  Wenn Du Dich
+WIRKLICH "verirrst", tippe C-h ? und Emacs wird Dir mitteilen, welche
+Art von Hilfe zur Verfügung steht.  Hast Du C-h getippt, willst aber
+keine Hilfe mehr, dann tippe einfach C-g zum Abbrechen des Befehls.
+
+(Einige Administratoren verändern die Bedeutung von C-h.  Sie sollten
+dies wirklich nicht tun, beschwere Dich also beim System
+Administrator.  In der Zwischenzeit, wenn C-h keine Mitteilung
+bezüglich Hilfe am Fuß des Emacs-Fensters anzeigt, versuche M-x help
+RET zu tippen.)
+
+Die einfachste Hilfe-Einrichtung ist C-h c.  Tippe C-h, ein c und
+einen Befehls-Buchstaben oder eine Sequenz davon und Emacs gibt Dir
+eine ganz kurze Beschreibung des Befehls.
+
+>> Tippe C-h c C-p.
+   Die Mitteilung sollte etwa wie folgt aussehen
+
+       C-p runs the command previous-line
+
+Dies teils Dir den "Namen der Funktion" mit. Funktions-Namen werden
+hauptsächlich zum Spezialisieren und Erweitern von Emacs verwendet.
+Aber da die Funktions-Namen etwas darüber aussagen was der Befehl tut,
+können Sie auch als sehr kurze Dokumentation dienen -- genug um Dich
+an Befehle zu erinnern die Du bereits gelernt hast.
+
+Zeichenerweiterte Befehle so wie C-x C-s und (wenn Du keine META- oder
+EDIT- oder ALT-Taste hast) <ESC>v sind nach C-h c auch erlaubt.
+
+Um mehr Hilfe zu einem Befehl zu bekommen verwende C-h k anstelle von
+C-h c.
+
+>> Tippe C-h k C-p.
+
+Dies zeigt die Dokumentation der Funktion, als auch ihren Namen, in
+einem eigenen Emacs-Fenster.  Wenn Du mit dem Lesen fertig bist, tippe
+C-x 1 um den Hilfetext loszuwerden.  Du mußt dies nicht gleich tun.
+Du kannst etwas bearbeiten, das sich auf den Hilfetext bezieht und
+dann C-x 1 tippen.
+
+Hier sind einige andere nützliche C-h Möglichkeiten:
+
+   C-h f       Beschreibe eine Funktion.  Du tippst den Namen der
+                Funktion
+
+>> Versuche C-h f previous-line<Return>.
+   Dies gibt Dir all die Information die Emacs zu der Funktion hat, welche
+   C-p implementiert.
+
+   C-h a        Befehls-Apropos.  Tippe ein Schlüsselwort und Emacs listet
+                alle Befehle die es enthalten.
+                Diese Befehle können alle mit M-x aufgerufen werden.
+                Für einige Befehle listet das Befehls-Apropos eine
+                Buchstaben-Sequenz, die den Befehl ausführt.
+
+>> Tippe C-h a file<Return>.
+
+Dies zeigt in einem anderen Fenster eine Liste aller M-x Befehle die
+"file" in ihrem Namen haben.  Du wirst Buchstaben-Sequenzen wie C-x
+C-f mit dem entsprechenden Befehl, wie etwa find-file, aufgelistet
+sehen.
+
+>> Tippe C-M-v um das Hilfe Fenster zu rollen. Mache dies ein paar mal.
+   
+>> Tippe C-x 1 um das Fenster loszuwerden.
+
+
+* ZUM SCHLUß
+------------
+
+Merke Dir, daß Du Emacs mit C-x C-c endgültig beendest.  Um vorübergehend
+in eine Shell auszusteigen, so daß Du später zurückkehren kannst,
+verwende C-z.  (Unter X ikonifiziert dies den aktuellen Emacs-Rahmen.)
+
+Dieses Tutorial sollte für Anfänger verständlich sein, hast Du etwas
+Unklares gefunden, schiebe die Schuld nicht auf Dich - beschwere Dich!
+
+
+ANFERTIGEN VON KOPIEN
+---------------------
+
+Dieses Tutorial stammt, über eine lange Linie von Emacs Tutorials, von
+dem von Stuart Cracraft für den ursprünglichen Emacs geschriebenen ab.
+Ben Wing hat das Tutorial für X Windows erweitert.  Martin Buchholz
+und Hrvoje Niksic haben weitere Korrekturen für XEmacs beigetragen.
+Ins Deutsche übertragen wurde es von Adrian Aichner
+<aichner@ecf.teradyne.com>.
+
+Diese Version des Tutorials ist, wie GNU Emacs selbst,
+urheberrechtlich geschützt und erlaubt die Verteilung von Kopien unter
+bestimmten Voraussetzungen:
+
+Copyright (c) 1997, Adrian Aichner <aichner@ecf.teradyne.com>.
+
+Copyright (c) 1985, 1996 Free Software Foundation
+
+   Permission is granted to anyone to make or distribute verbatim copies
+   of this document as received, in any medium, provided that the
+   copyright notice and permission notice are preserved,
+   and that the distributor grants the recipient permission
+   for further redistribution as permitted by this notice.
+
+   Permission is granted to distribute modified versions
+   of this document, or of portions of it,
+   under the above conditions, provided also that they
+   carry prominent notices stating who last altered them.
+
+Die Bedingungen zum Kopieren von Emacs sind komplexer, entsprechen
+aber dem selben Geist.  Bitte lies die Datei COPYING und gib doch
+Kopien von GNU Emacs an Freunde weiter.  Hilf mit bei der Beseitigung
+von Software-Verhinderungspolitik ("Besitz") durch das Verwenden,
+Schreiben and Weitergeben von kostenloser Software!
diff --git a/etc/TUTORIAL.fr b/etc/TUTORIAL.fr
new file mode 100644 (file)
index 0000000..4a0d27c
--- /dev/null
@@ -0,0 +1,1085 @@
+Copyright (c) 1997, Didier Verna <verna@inf.enst.fr>.
+Se reporter à la fin du document pour les conditions.
+
+Vous lisez actuellement la version française du tutoriel d'Emacs.
+
+Cette version a été produite à partir de la version anglaise, qui est 
+Copyright (c) 1985, 1996 Free Software Foundation, Inc.
+
+
+
+             Bienvenue dans le tutoriel d'Emacs en Français !!
+
+
+La plupart des commandes d'Emacs utilisent la touche <Control>
+(également notée <Ctrl> ou <Ctl>), ou la touche <Meta>. Sur certains
+claviers, la touche <Meta> s'appelle <Alt>, <Edit> ou autre chose (sur
+les claviers des stations Sun par exemple, il s'agit de la touche à
+gauche de la barre espace, celle avec un petit losange). Si vous ne
+disposez pas de la touche <Meta>, il est possible d'utiliser la touche
+<Esc> à la place. Afin de décrire les combinaisons de touches
+disponibles dans Emacs, les conventions suivantes sont utilisées:
+
+ C-<chr> signifie maintenir la touche <Control> enfoncée tout en tapant
+         le caractère <chr>. Ainsi, C-f signifie «maintenir la touche
+         <Control> enfoncée, et taper 'f'».
+ M-<chr> signifie maintenir la touche <Meta> enfoncée tout en tapant le
+         caractère <chr>. Si la touche <Meta> n'est pas disponible,
+         tapez d'abord <Esc>, relâchez la, puis tapez <chr>.
+
+NOTE IMPORTANTE: pour quitter Emacs, tapez C-x C-c (deux caractères).
+
+Quand vous trouvez les caractères >> au début d'une ligne, cette ligne 
+vous donne des directives pour essayer une commande. Par exemple:
+<<Lignes blanches à but pédagogique. Le texte continue ci-dessous.>>
+>> Maintenant, tapez C-v («view next screen») pour passer à l'écran
+   suivant. (Faites le vraiment! Maintenez la touche <Control>
+   enfoncée et tapez 'v'). À partir de maintenant, refaites la même
+   chose quand vous avez fini de lire tout l'écran.
+
+Remarquez que quand vous changez d'écran, les deux dernières lignes de 
+l'écran précédent sont conservées, ceci afin de conserver un minimum
+de continuité dans la lecture.
+
+Une des premières choses à savoir dans Emacs est comment se déplacer
+dans un texte. Vous savez déjà comment changer d'écran avec C-v. Pour
+revenir d'un écran en arrière, tapez M-v (maintenez la touche <Meta>
+enfoncée tout en appuyant sur 'v', ou encore tapez <Esc>-v si vous ne
+disposez pas de <Meta>, <Edit> ou <Alt>).
+
+>> Essayez de taper M-v puis C-v un certain nombre de fois.
+
+
+* RÉSUMÉ
+--------
+
+Les commandes suivantes sont utiles pour voir des écrans entiers:
+
+       C-v     Passer à l'écran suivant
+       M-v     Revenir à l'écran précédent
+       C-l     Effacer l'écran et tout retracer, en mettant la ligne
+                où se trouve le curseur au centre (C'est bien la
+                touche 'L', pas la touche 'un'
+
+>> Trouvez le curseur et rappelez vous bien du texte qui l'entoure.
+   Tapez C-l
+   Trouvez le curseur à nouveau, et remarquez qu'il s'agit bien du
+   même texte autour de lui.
+
+
+* MOUVEMENTS DE BASE DU CURSEUR
+-------------------------------
+
+Passer d'un écran à l'autre, c'est bien ... mais comment faire pour se 
+déplacer dans le texte d'un seul écran?
+
+Il existe plusieurs manières de faire. La plus simple est d'utiliser
+les commandes C-p, C-b, C-f et C-n. Chacune de ces commandes déplace
+le curseur d'une ligne ou d'une colonne dans une direction donnée,
+comme illustré sur le diagramme suivant:
+
+
+                         Ligne précédente, C-p
+                                  :
+                                  :
+     En arrière, C-b .... Position courante .... En avant, C-f
+                                  :
+                                  :
+                         Ligne suivante, C-n
+
+>> Déplacez le curseur au centre de ce diagramme en utilisant C-n ou
+   C-p, puis placez le au centre de l'écran avec C-l.
+
+
+Pour vous rappeler ces commandes, pensez à leur signification en
+anglais (et oui, pas en français ...): F pour Forward, B pour
+Backward, N pour Next, P pour Previous. Retenez bien ces commandes,
+car vous vous en servirez très souvent.
+
+>> Amenez le curseur sur cette ligne avec quelques C-n.
+
+>> Déplacez vous sur la ligne avec des C-f, puis vers le haut avec des 
+   C-p. Remarquez ce que fait C-p quand le curseur est au milieu de la 
+   ligne.
+
+Chaque ligne de texte se termine avec un caractère nommé Newline, qui
+sert à séparer les lignes entre elles. La dernière ligne du fichier
+est censée avoir un tel caractère à la fin (bien qu'Emacs n'ait pas
+particulièrement besoin de sa présence).
+
+>> Placez vous au début d'une ligne, et tapez C-b. Cela devrait vous
+   placer à la fin de la ligne précédente. En fait, on a juste reculé
+   d'un caractère, à travers le caractère Newline.
+
+C-f vous déplace à travers Newline, exactement comme C-b.
+
+>> Faites encore quelques C-b, pour bien sentir comment se déplace le
+   curseur, puis des C-f pour retourner à la fin de la ligne, et pour
+   finir encore un C-f pour aller au début de la ligne suivante.
+
+Si vous vous déplacez en dehors de l'écran, le texte se déplace de
+manière à ce que la position du curseur redevienne visible. Cette
+opération est appelée «scrolling».
+
+>> Déplacez le curseur jusqu'en bas de l'écran, et remarquez ce qu'il
+   se passe.
+
+Si vous trouvez que le déplacement caractère par caractère est trop
+lent, vous pouvez vous déplacer mot par mot. M-f et M-b vous déplacent 
+respectivement d'un mot en avant et en arrière.
+
+>> Tapez quelques M-f et M-b.
+
+Si vous êtes au milieu d'un mot, M-f vous déplace à la fin du mot.
+Si vous êtes entre deux mots, M-f vous déplace à la fin du mot
+suivant. M-b produit le même comportement, en sens inverse.
+
+>> Mélangez quelques M-f et M-b avec quelques C-f et C-b pour bien
+noter les différences de comportement suivant l'endroit où vous êtes.
+
+Remarquez le parallèle qui existe entre C-f et C-b d'un côté, et M-f
+et M-b de l'autre. Très souvent, les commandes Meta agissent sur des
+unités de langage (mots, phrases, paragraphes etc.) tandis que les
+commandes Control agissent sur des unités plus primaires (caractères,
+lignes etc.).
+
+Ce parallèle existe encore entre les lignes et les phrases: C-a et C-e 
+vous positionnent au début ou à la fin d'une ligne, tandis que M-a et
+M-e vous déplacent au début ou à la fin d'une phrase.
+
+>> Tapez quelques C-a et quelques C-e.
+   Puis tapez quelques M-a et quelques M-e.
+
+Remarquez que plusieurs C-a ne font rien, mais que plusieurs M-a
+n'arrêtent pas de vous faire remonter de phrase en phrase.
+
+La position du curseur sur dans le texte est aussi appelée le
+«point». En d'autres termes, le curseur à l'écran se trouve où le
+point est dans le texte.
+
+Voici un résumé des commandes simples de déplacement, y compris celles 
+relatives aux mots et aux phrases:
+
+       C-f     En avant d'un caractère
+       C-b     En arrière d'un caractère
+
+       M-f     En avant d'un mot
+       M-b     En arrière d'un mot
+
+       C-n     Ligne suivante
+       C-p     Ligne précédente
+
+       C-a     Début de ligne
+       C-e     Fin de ligne
+
+       M-a     Début de phrase
+       M-e     Fin de phrase
+
+>> Entraînez vous un peu à la pratique de ces commandes. Elles sont
+   très souvent utilisées.
+
+Deux autres commandes importantes pour le déplacement sont M-<
+(Meta-Inférieur) et M-> (Meta-Supérieur). Elles vous déplacent
+respectivement au début et à la fin de tout le texte.
+
+Sur la plupart des terminaux, '<' se trouve au dessus de la
+virgule. Il faut donc utiliser la touche <Shift> pour l'obtenir, sans
+quoi vous obtiendrez M-'virgule'.
+
+>> Tapez M-< pour retourner au début du texte.
+   Puis tapez plusieurs C-v pour revenir ici.
+
+>> Tapez M-> pour aller à la fin du texte.
+   Puis tapez plusieurs M-v pour revenir ici.
+
+Vous pouvez aussi déplacer le curseur avec les flèches, si votre
+clavier en possède. Il est cependant préférable d'utiliser C-b C-f C-n
+et C-p pour trois raisons: premièrement, ces commandes fonctionnent
+sur tous les terminaux. Deuxièmement, quand vous vous serez habitué à
+Emacs, vous découvrirez que ces touches sont plus rapides car vous
+n'avez pas besoin de déplacer vos mains loin des lettres du
+clavier. Enfin, quand vous aurez l'habitude d'utiliser la touche
+<Control>, vous apprendrez plus facilement d'autres commandes de
+déplacement plus complexes.
+
+La plupart des commandes d'Emacs acceptent un argument numérique, qui
+sert souvent comme compteur de répétition. Pour donner un tel argument 
+à une fonction, tapez C-u puis les chiffres, et enfin entrez la
+commande. Si vous disposez de la touche <Meta> (ou <Edit> ou <Alt>), vous
+pouvez aussi tapez directement les chiffres tout en maintenant la
+touche <Meta> enfoncée. Il est préférable d'apprendre la méthode C-u car 
+elle fonctionne sur tous les terminaux.
+
+Par exemple, C-u 8 C-f vous déplace de huit caractères en avant.
+       
+>> Essayez d'utiliser C-n avec un argument numérique pour vous
+   déplacer d'un seul coup sur une autre ligne.
+
+Certaines commandes n'interprètent pas leur argument numérique comme
+un compteur de répétition. C'est le cas de C-v et M-v qui déplacent le 
+texte d'autant de lignes plutôt que d'écrans entiers. Par exemple, C-u 
+4 C-v déroulera l'écran de 4 lignes.
+
+>> Essayez C-u 8 C-v.
+
+Cela a du déplacer l'écran de 8 lignes. Pour faire la manoeuvre
+inverse, donnez le même argument a M-v.
+
+Si vous travaillez sous X Window, il y a sans doute une scrollbar sur
+le côté droit de la fenêtre d'Emacs. Vous pouvez aussi vous en servir
+avec la souris pour déplacer le texte.
+
+>> Essayer de cliquer avec le deuxième bouton au dessus du bouton de
+   la scrollbar. Cela devrait dérouler le texte jusqu'à une position
+   déterminée par l'endroit où vous avez cliqué.
+
+>> Cliquez maintenant avec le premier bouton à quelques lignes du
+   sommet dans la scrollbar.
+
+
+* CONTRôLE DU CURSEUR AVEC UN TERMINAL X
+----------------------------------------
+
+Si vous travaillez sur un terminal X, vous trouverez surement plus
+facile d'utiliser les flèches du pavé numérique pour déplacer le
+curseur. Les quatre flèches fonctionnent exactement comme C-f C-b C-n
+et C-p mais sont plus faciles à retenir. Vous pouvez aussi les
+combiner avec la touche <Control> pour vous déplacer par bloc (par
+exemple par paragraphe dans un texte). Si votre pavé numérique dispose
+de touches <Home> (ou <Begin>) et <End>, elles vous déplaceront
+respectivement en début et en fin de ligne. Combinées avec la touche
+<Control>, elles vous déplaceront respectivement en début et en fin de
+fichier. Si enfin votre pavé numérique dispose des touches <PgUp> et
+<PgDn>, celles-ci vous déplaceront d'écran en écran comme C-v et M-v.
+
+Toutes ces commandes acceptent des arguments numériques comme décrit
+précédemment. 
+
+
+* QUAND EMACS EST BLOQUÉ
+------------------------
+
+Si jamais Emacs ne répond plus à vos ordres, vous pouvez l'arrêter en
+toute sécurité en tapant C-g. C-g peut aussi être utilisé pour stopper 
+une commande qui met trop de temps à s'exécuter.
+
+C-g sert également à annuler un argument numérique, ou une commande
+que vous ne voulez plus mener à terme.
+
+>> Tapez C-u 1 0 0 pour produire un argument numérique de 100, puis
+   tapez C-g.
+   Maintenant, tapez C-f. Le curseur doit finalement ne bouger que
+   d'un seul caractère, puisque vous avez annulé l'argument.
+
+Si vous avez tapé un <Esc> par erreur, vous pourrez toujours l'annuler 
+avec C-g.
+
+
+* COMMANDES DÉSACTIVÉES
+-----------------------
+
+Quelques commandes sont «désactivées» pour empêcher les nouveaux
+utilisateurs de les appeler par accident.
+
+Si vous tapez une de ces commandes, Emacs ouvrira un message vous
+disant quelle était cette commande, et vous demandant si vous voulez
+vraiment poursuivre son exécution.
+
+Si vous souhaitez effectivement l'essayer, appuyez sur la barre
+espace. Sinon, répondez à la question en tapant 'n'.
+
+>> Tapez `C-x n p' (commande désactivée), puis répondez par 'n'.
+
+
+* FENÊTRES
+----------
+
+Emacs peut afficher plusieurs fenêtres, chacune avec un texte
+différent. Le terme «fenêtre» signifie ici une zone particulière dans
+la fenêtre d'Emacs; il ne s'agit pas de fenêtres pouvant se superposer 
+dans votre système de multifenétrage. Emacs peut aussi ouvrir
+plusieurs fenêtres X (appelées «frames» en jargon Emacsien), mais ceci 
+est décrit ultérieurement.
+
+Pour l'instant, mieux vaut ne pas trop s'occuper de plusieurs fenêtres 
+simultanées, sauf peut-être pour savoir les éliminer toutes sauf
+une. Ceci est effectué par la commande C-x 1 ('un', pas 'L'). Cette
+commande tue toutes les fenêtres sauf celle dans laquelle vous vous
+trouvez, et s'arrange pour que la fenêtre restante occupe toute la place.
+
+>> Amenez le curseur ici, puis tapez C-u 0 C-l.
+
+(Rappelez vous que C-l recentre le curseur au milieu de la
+fenêtre. Avec un argument numérique, elle place la ligne courante à
+autant de lignes du sommet de la fenêtre. Avec 0 comme argument, on
+réaffiche donc le texte, en plaçant la ligne courante en haut.)
+
+>> Tapez Control-x 2
+   Notez que cette fenêtre diminue (de moitié), et qu'une nouvelle
+   fenêtre apparaît (avec le même texte).
+
+>> Tapez C-x 1 pour faire à nouveau disparaître la deuxième fenêtre.
+
+
+* INSÉRER ET EFFACER
+--------------------
+
+Pour insérer du texte, il suffit de le taper. Tous les caractères que
+vous pouvez voir à l'écran (A, %, - etc.) sont considérés comme du
+texte et sont insérés. Pour insérer le caractère Newline, tapez
+<Return> (retour chariot).
+
+Vous pouvez effacer le dernier caractère que vous avez tapé avec la
+touche <Delete> parfois nommée «Del». La touche <Backspace> peut
+quelques fois être utilisée de la même manière, mais pas tout le
+temps!
+
+Plus généralement, <Delete> efface le caractère situé juste avant le
+curseur. 
+
+>> Maintenant, tapez quelques caractères, puis effacez-les avec
+   <Delete>. Ne vous inquiétez pas pour le contenu de ce tutoriel, ce
+   que vous avez à l'écran n'est que votre copie personnelle du
+   fichier, pas le fichier d'origine.
+
+Si une ligne de texte devient trop grande, elle se poursuit sur une
+seconde ligne. Un «Backslash» ('\') situé tout à fait à droite de la
+ligne indique que celle-ci continue sur la ligne suivante.
+
+>> Insérez des caractères jusqu'à ce que la ligne devienne trop
+   grande, et notez l'apparition du '\'.
+
+>> Utilisez <Delete> pour effacer des caractères jusqu'à ce que la
+   ligne reprenne une taille raisonnable. Vous remarquerez que le '\'
+   disparaît.
+
+Le caractère Newline s'efface exactement comme les autres. L'effacer
+revient à ne faire qu'une seule ligne à partir de deux. Si cette
+nouvelle ligne est trop grande, le '\' apparaîtra a nouveau.
+
+>> Déplacez le curseur au début d'une ligne et tapez <Delete>. Le
+caractère Newline sera effacé et cette ligne sera ajoutée à la ligne
+précédente.
+
+>> Tapez <Return> pour réinsérer le Newline que vous avez effacé.
+
+Rappelez-vous bien que la plupart des commandes acceptent un argument
+numérique, y compris l'insertion de caractères: 
+
+>>  Tapez C-u 8 *, vous obtiendrez "********".
+
+Vous connaissez maintenant les commandes de base pour insérer du texte 
+et corriger des erreurs. Toujours grâce aux touches <Control> et
+<Meta>, vous pouvez aussi effacer du texte par mot ou par ligne:
+
+       <Delete>     efface le caractère juste avant le curseur
+       C-d          efface le caractère juste après le curseur
+
+       M-<Delete>   supprime le mot juste avant le curseur
+       M-d          supprime le mot juste après le curseur
+
+       C-k          supprime tout du curseur jusqu'à la fin de ligne
+       M-k          supprime tout du curseur jusqu'à la fin de phrase
+
+
+Quand vous supprimez plus d'un caractère à la fois, Emacs sauvegarde le
+texte pour vous donner la possibilité de le réintroduire. L'opération
+de réintroduction s'appelle le «yanking». Vous pouvez réintroduire le
+texte à la même place ou ailleurs. Vous pouvez même le réintroduire
+plusieurs fois, pourquoi pas à des endroits différents. La commande de 
+«yanking» est C-y.
+
+Notez bien la différence entre «effacer» et «supprimer». Un texte
+«supprimé» est sauvegardé, tandis qu'un caractère «effacé» ne l'est
+pas. De même, les commandes effaçant juste des blancs ou des lignes
+vides ne sauvegardent rien.
+
+>> Placez le curseur au début d'une ligne non vide.
+   Tapez C-k pour supprimer le texte sur cette ligne.
+>> Tapez C-k une deuxième fois. Vous remarquerez que cette fois-ci, la 
+   ligne elle-même est supprimée (le caractère Newline).
+
+C-k traite son argument numérique de manière spéciale: il supprime
+autant de lignes Y COMPRIS LE CARACTÈRE NEWLINE. Taper C-k deux fois
+de suite ne produirait pas le même résultat.
+
+>> Pour récupérer le texte dernièrement supprimé, tapez C-y. Celui-ci
+   sera placé où se trouve le curseur.
+
+Notez également que si vous faites plusieurs C-k à la suite, tout les
+morceaux supprimés seront concaténés, et un seul C-y suffira à tout
+ramener.
+
+>> Faites-le. C-k plusieurs fois, puis C-y.
+
+>> Déplacez le curseur à un autre endroit puis tapez à nouveau C-y.
+   Voilà comment on copie du texte!
+
+C-y restaure le dernier morceau de texte à avoir été supprimé, mais
+les suppressions précédentes ne sont pas perdues pour autant. Après
+avoir tapé C-y, la commande M-y remplace le texte restauré par l'avant
+dernière suppression. Tapez à nouveau M-y et vous obtiendrez
+l'avant-avant dernière suppression et ainsi de suite. Quand vous avez
+récupéré le texte que vous cherchiez, rien de plus à faire: continuez
+simplement votre édition.
+
+Si vous tapez M-y assez longtemps, vous retomberez sur la suppression
+la plus récente.
+
+>> Supprimez une ligne, déplacez vous et supprimez-en une autre.
+   Tapez C-y pour récupérer la dernière ligne.
+   Puis tapez M-y, ce qui restaurera la première ligne supprimée.
+   Tapez encore M-y pour voir ce qu'il se passe, et continuez jusqu'à
+   récupérer à nouveau la deuxième ligne.
+   Si ça vous amuse, donnez des arguments positifs et négatifs à M-y.
+
+
+* ANNULATION
+------------
+
+Si vous changez du texte, et que finalement vous décidez que ce
+n'était pas une bonne idée, vous pouvez annuler les changements grâce
+à la commande C-x u.
+
+C-x u annule les changements produits par la dernière commande. Taper
+C-x u plusieurs fois annule de plus en plus de commandes précédentes.
+
+Il existe cependant quelques exceptions: les commandes qui ne changent
+pas le texte ne comptent pas (par exemple les commandes de
+déplacement). Les commandes qui insèrent juste un caractère sont
+souvent regroupées jusqu'à une vingtaine, ceci pour réduire le nombre
+de C-x u à taper ensuite.
+
+>> Supprimez cette ligne avec C-k, puis tapez C-x u. Elle devrait
+   revenir ...
+
+Une alternative à C-x u est C-_. C-x u existe car c'est plus facile à
+taper sur certains claviers. Sur d'autres vous pouvez également
+obtenir C-_ en tapant C-/. 
+
+Enfin, la commande d'annulation accepte les argument numériques.
+
+
+* FICHIERS
+----------
+
+Pour sauver votre texte, vous avez besoin de le mettre dans un
+fichier, sans quoi il disparaîtra quand vous quitterez Emacs. On dit
+«trouver» un fichier («finding»), ou encore «visiter» un fichier
+(«visiting»), ou bien «ouvrir». 
+
+Visiter un fichier revient à voir son contenu dans Emacs. Si vous
+modifiez le texte du fichier dans Emacs, ces changements ne deviennent 
+pas permanent, sauf si vous «sauvez» le fichier. Cela permet de ne pas 
+avoir des fichiers à moitié modifiés sur votre système, à moins que
+vous ne le souhaitiez vraiment. D'autre part, quand Emacs «sauve» un
+fichier, il commence par copier l'ancienne version sous un nouveau nom 
+afin que vous puissiez toujours revenir en arrière.
+
+Regardez en bas de la fenêtre d'Emacs. Vous trouverez une ligne
+contenant des tirets '-', et la chaîne de caractères 
+«Emacs: TUTORIAL.FRANCAIS». Cela vous donne le nom du fichier que vous
+êtes en train de visiter. En ce moment, vous visitez le fichier
+«TUTORIAL.FRANCAIS» qui correspond au Tutoriel d'Emacs, version
+française. Ceci est votre copie personnelle du fichier. Pour chaque
+fichier que vous visitez, son nom apparaît exactement à cet endroit.
+
+La plupart des commandes relatives aux fichiers sont des commandes à
+deux caractères, commençant par C-x. Il y a toute une série de
+commandes commençant par C-x, beaucoup concernant les fichiers et les
+buffers, et longues de 2 caractères ou plus.
+
+Une autre chose importante pour visiter un fichier est que vous devez
+spécifier le nom du fichier à visiter. On dit que cette commande «lis
+un argument depuis le terminal». Dans le cas présent, l'argument est
+le nom du fichier. Après avoir tapé la commande
+
+C-x C-f («find»)
+
+Emacs vous demande son nom. Le nom que vous tapez apparaît tout en bas
+de la fenêtre. Quand cette ligne sert à entrer des données de cette
+manière, on l'appelle «minibuffer». Les commandes d'édition ordinaires
+peuvent être utilisées pour éditer le nom du fichier.
+
+Pendant que vous êtes en train de taper le nom du fichier, vous pouvez 
+annuler la commande grâce à C-g.
+
+>> Tapez C-x C-f puis C-g. Cela annule le minibuffer ainsi que la
+   commande C-x C-f. Vous n'allez finalement pas visiter de fichier.
+
+Quand le nom du fichier est correct, tapez <Return>. La commande
+prendra alors effet et ira chercher le fichier. Après avoir terminé la 
+saisie du nom, le minibuffer disparaît.
+
+Au bout d'un petit moment, le contenu du fichier apparaît et vous
+pouvez commencer votre édition. Quand vous êtes satisfait des
+changements apportés au texte, tapez
+
+C-x C-s («save»)
+
+Cette commande copie le texte contenu dans Emacs vers le fichier
+lui-même. La première fois que vous le faites, Emacs sauvegarde la
+version initiale du fichier sous un autre nom, en ajoutant un '~' à la 
+fin du nom.
+
+Quand la sauvegarde est terminée, Emacs affiche le nom du fichier dans
+lequel on vient d'écrire. Il est fortement conseillé de sauver assez
+souvent les fichiers pour éviter de tout perdre en cas de crash
+système (non pas qu'Emacs ne puisse jamais crasher lui-même ...).
+
+>> Tapez C-x C-s pour sauver votre copie du tutoriel.
+   Vous devriez voir apparaître «Wrote ...TUTORIAL.FRANCAIS" tout en bas 
+   de la fenêtre.
+
+NOTE: Sur certains systèmes, C-x C-s bloque l'écran et Emacs ne dit
+plus rien. Cela signifie qu'une «fonctionnalité» système que l'on
+appelle le «flow control» intercepte le C-s et l'empêche de parvenir à 
+Emacs. Pour débloquer la situation, tapez C-q. Reportez-vous dans ce
+cas à la section «Spontaneous Entry to Incremental Search» du manuel
+d'Emacs pour plus d'information sur cette ... «particularité». 
+
+Vous pouvez visiter des fichiers existant, mais aussi des fichiers qui 
+n'existent pas. C'est en fait comme cela que l'on crée un nouveau
+fichier dans Emacs. Initialement, le fichier sera inexistant, et la
+première fois que vous demanderez à Emacs de le sauver, il créera
+effectivement le fichier correspondant.
+
+
+* BUFFERS
+---------
+
+Si vous ouvrez un nouveau fichier avec C-x C-f, le précédent reste
+dans Emacs. Pour retravailler dessus, retapez simplement C-x C-f. De
+cette manière, vous pouvez avoir un nombre important de fichiers
+ouverts dans Emacs.
+
+>> Créez un fichier nommé «foo» en tapant C-x C-f foo<Return>.
+   Insérez un peu de texte puis sauvez-le en tapant C-x C-s.
+   Enfin, tapez C-x C-f TUTORIAL.FRANCAIS<Return> pour revenir ici.
+
+Emacs conserve le contenu de chaque fichier dans un objet appelé
+«buffer». Visiter un fichier revient à créer un nouveau buffer et y
+placer le contenu du fichier. Pour obtenir la liste des buffers qui
+existent actuellement dans votre session Emacs, tapez la commande
+suivante:
+
+>> Tapez C-x C-b pour obtenir la liste des buffers.
+
+Remarquez que chaque buffer a un nom, et qu'il peut aussi avoir un nom
+de fichier dans le cas où un fichier lui est associé. Il extsite des
+buffers non attachés à des fichiers, par exemple, le buffer nommé
+«*Buffer List*». C'est le buffer qui a été créé par la commande C-x
+C-b. Par contre, TOUT texte que vous pouvez voir dans Emacs appartient
+à un buffer.
+
+>> Tapez C-x 1 pour faire disparaître le buffer contenant la liste des 
+   buffers.
+
+Quand vous éditez un fichier, puis que vous en ouvrez un autre, le
+fichier précédent n'a pas été sauvé. Tous les changements effectués
+sont conservés dans le buffer associé au fichier, mais l'ouverture
+et l'édition d'un nouveau fichier n'ont aucun effet sur le
+premier. Vous constatez donc qu'il serait ennuyeux d'avoir à revenir
+au premier fichier pour le sauver avec C-x C-s. Pour éviter ce
+désagrément, il existe une autre commande:
+
+       C-x s (Sauver certains buffers)
+
+C-x s vous demandera, pour chaque buffer contenant des modifications
+non sauvegardées, si vous désirez le sauver ou non.
+
+>> Insérez une ligne de texte, puis tapez C-x s
+   Emacs vous demandera si vous désirez sauver le buffer nommé
+   TUTORIAL.FRANCAIS.
+   Répondez «oui» à la question en tapant 'y'.
+
+
+* UTILISATION DES MENU
+----------------------
+
+Si vous travaillez sur un terminal X, vous avez déjà remarqué une
+barre de menu en haut de la fenêtre d'Emacs. Cette barre de menu vous
+permet d'accéder à la plupart des commandes d'Emacs comme celles
+permettant d'ouvrir ou de sauver un fichier. L'utilisation de la barre
+de menu vous semblera plus facile au début, puis quand vous serez
+habitué à Emacs, il vous sera facile d'utiliser les commandes au
+clavier, car chaque commande figurant dans un menu affiche également
+son équivalent clavier sur le bouton.
+
+Remarquez qu'il existe des boutons n'ayant aucun équivalent
+clavier. Par exemple, le menu «Buffers» donne la liste de tous les
+buffers par ordre de plus récente utilisation. Vous pouvez passer d'un 
+buffer à l'autre en les sélectionnant par leur nom dans ce menu.
+
+
+* UTILISATION DE LA SOURIS
+--------------------------
+
+Quand vous travaillez sous X, Emacs utilise pleinement la souris. Vous
+pouvez vous positionner dans le texte en cliquant avec le bouton de
+gauche à l'endroit souhaité, vous pouvez sélectionner du texte en
+déplaçant la souris avec le bouton de gauche enfoncé, ou bien en
+cliquant le bouton de gauche au début de la portion à sélectionner,
+puis en Shift-cliquant à l'autre bout.
+
+Pour supprimer un morceau de texte, utilisez C-w ou le bouton «Cut» du 
+menu «Edit». Notez bien que ces deux commandes ne sont pas
+équivalentes: C-w ne fait que supprimer le texte en le sauvegardant de 
+manière interne (comme C-k), mais «Cut» sauvegarde en plus le texte
+dans le clipboard de X Window, où il pourra être accédé par d'autres
+applications. 
+
+Pour récupérer du texte en provenance d'autres applications, utilisez
+«Paste» du menu «Edit».
+
+Le bouton du milieu sert principalement à choisir des objets visibles
+dans les fenêtres d'Emacs. Par exemple, si vous entrez dans «Info» (le
+système de documentation en ligne) en tapant C-h i ou en utilisant le
+menu «Help», vous pourrez suivre un lien surligné en cliquant dessus
+avec le bouton du milieu. De la même manière, si vous commencez à
+taper un nom de fichier après avoir fait C-x C-f, et que vous appuyez
+sur <Tab> en cours de route, Emacs vous ouvrira une fenêtre avec
+toutes les complétions possibles, et vous pourrez en sélectionner une
+grâce au bouton du milieu.
+
+Le bouton droit fait apparaître un menu. Le contenu de ce menu varie
+en fonction du mode dans lequel vous vous trouvez, et contient en
+général quelques commandes fréquemment utilisées.
+
+>> Cliquez avec le bouton de droite pour voir le menu en question.
+
+Si vous relâchez le bouton, le menu disparaît.
+
+
+* EXTENSION DE L'ENSEMBLE DES COMMANDES
+---------------------------------------
+
+Il existe bien plus de commandes dans Emacs que l'on ne pourrait en
+associer aux touches <Control> et <Meta>. Pour remédier à cela, Emacs
+utilise la commande X (eXtension) qui se présente sous deux aspects:
+
+       C-x     Extension par caractère (suivit d'un caractère).
+       M-x     Extension par nom (suivit d'un nom de commande).
+
+Ces commandes, bien que très utiles, sont utilisées moins souvent que
+celles que vous avez déjà apprises. Vous en connaissez déjà deux: les
+commandes relatives aux fichiers (C-x C-f et C-x C-s). Un autre
+exemple est la commande pour quitter définitivement Emacs, C-x C-c (ne 
+vous inquiétez pas des éventuels changements qui seraient perdus, C-x
+C-c vous propose de sauver ces changements avant de tuer Emacs).
+
+C-z est la commande qui vous permet de quitter Emacs «temporairement», 
+pour que vous puissiez y revenir plus tard.
+
+Sur les systèmes le permettant, C-z «suspend» Emacs, ce qui signifie
+que l'on retourne au shell sans tuer Emacs. Dans la plupart des cas,
+vous pouvez revenir à Emacs en tapant 'fg' ou '%emacs'.
+
+Sur les systèmes ne permettant pas la suspension de processus, cette
+commande créé un sous-shell qui continue à exécuter Emacs, vous
+donnant ainsi la possibilité de faire tourner d'autres programmes et
+revenir à Emacs plus tard. Dans ce cas, la commande shell 'exit' est
+la manière habituelle de retourner au sous-shell d'Emacs.
+
+Vous utiliserez C-x C-c quand le moment sera venu de vous déloguer ou
+d'éteindre la machine. C'est aussi la bonne manière de sortir d'Emacs
+si celui-ci a été lancé depuis un maileur ou tout autre utilitaire,
+ceux-ci ne sachant pas forcément comment gérer les suspensions. Dans
+des circonstances où vous ne vous déloguez pas, mieux vaut suspendre
+par C-z au lieu de sortir véritablement d'Emacs.
+
+Il existe de nombreuses commandes sous C-x. Voici celles que vous avez 
+apprises jusque là:
+
+       C-x C-f         Visiter un fichier (Find File).
+       C-x C-s         Sauver un fichier (Save File).
+       C-x C-b         Lister les buffers (List buffers).
+       C-x C-c         Quitter Emacs (Quit Emacs).
+       C-x u           Annuler Opération (Undo).
+
+Les commandes étendues par nom sont des commandes utilisées très peu
+souvent, ou disponibles seulement sous certains modes. Par exemple, la
+commande «replace-string» substitue globalement une chaîne de
+caractères par une autre. Si vous tapez M-x, Emacs vous affichera M-x
+en bas de la fenêtre et vous pourrez alors taper le nom d'une
+commande, ici replace-string. Tapez simplement 'repl <Espace> s <Tab>' 
+et Emacs complétera le nom pour vous. Terminez le nom avec <Return>
+
+La commande replace-string requiert deux arguments: la chaîne à
+remplacer et la chaîne de remplacement. Terminez chacune de ces
+chaînes par <Return>.
+
+>> Déplacez le curseur sur la ligne blanche en dessous de ce
+   paragraphe, puis tapez 
+   M-x repls<Return>Remarquez<Return>Notez<Return>. 
+
+   Remarquez comme cette ligne a changé: le mot R-e-m-a-r-q-u-e-z a
+   été remplacé par N-o-t-e-z partout où il est apparu après le
+   curseur. 
+
+
+* SAUVEGARDE AUTOMATIQUE
+------------------------
+
+Si votre système crashe alors que certaines modifications n'étaient
+pas sauvées, vous perdez des donnés. Pour remédier à ce problème,
+Emacs sauvegarde périodiquement tous vous fichiers, et cela de manière
+automatique. Ce fichier de sauvegarde est appelé «auto save». Son nom
+commence et se termine par un '#'. Par exemple, un fichier auto save
+de 'hello.c' a pour nom '#hello.c#'. Quand vous sauvez le fichier de
+manière normale, le fichier auto save est effacé.
+
+Si votre ordinateur crashe, vous pouvez restaurer la sauvegarde en
+ouvrant le fichier normalement (le VRAI fichier, pas l'auto save),
+puis en tapant M-x recover-file<Return>. Répondez 'yes<Return>' à la
+question.
+
+
+* ZONE D'ÉCHO
+-------------
+
+Quand Emacs constate que vous tapez lentement, il vous montre ce que
+vous avez tapez en bas de la fenêtre, dans la zone d'écho («echo
+area»). Cette zone contient la dernière ligne de la fenêtre d'Emacs.
+
+
+* LIGNE DE MODE
+---------------
+
+La ligne juste au dessus de la zone d'écho s'appelle ligne de mode
+(«modeline»). Elle dit actuellement quelque chose comme ça:
+
+--**-XEmacs: TUTORIAL.FRANCAIS     (Fundamental)--L752--67%--------- 
+
+Cette ligne fournit des renseignements utiles sur le status d'Emacs et 
+le texte que vous éditez.
+
+Vous connaissez déjà la signification du nom de fichier: c'est celui
+que vous êtes en train d'éditer. -xx%- indique le pourcentage de texte 
+situé au dessus du curseur. Si vous pouvez voir le début du fichier à
+l'écran, --Top-- sera indiqué au lieu de --00%--. Si le bas du fichier 
+est visible, il y aura --Bot-- à la place. Si votre texte est tout
+entier contenu dans la fenêtre, vous verrez --All--.
+
+Les étoiles '*' au début signifient que vous avez fait des changements
+au texte. Quand vous ouvrez le fichier, ou après l'avoir sauvé, il n'y
+aura plus d'étoiles, mais juste des tirets.
+
+La partie entre parenthèses vous indique dans quel mode d'édition vous
+vous trouvez. Le défaut (que vous utilisez en ce moment) est le mode
+«Fundamental». C'est un exemple de Mode Majeur («major mode»).
+
+Il existe de nombreux modes majeurs. Certains sont faits pour éditer
+différents langages, différentes sortes de texte, du Lisp, du C etc.
+Il ne peut y avoir qu'un mode majeur actif à la fois, et son nom se
+trouve sur la ligne de mode (là ou vous voyez «Fundamental» en ce
+moment).
+
+Chaque mode fait certaines commandes se comporter différemment. Par
+exemple, la commande pour créer des commentaires dans un programme
+tient compte des différents caractères de commentaire des
+langages. Chaque mode majeur est le nom d'une commande étendue. Par
+exemple la commande M-x fundamental-mode vous place en mode
+fondamental.
+
+Si vous voulez éditer du texte en français, vous devriez plutôt
+choisir le mode Text.
+
+>> Tapez M-x text-mode<Return>
+
+Pas d'inquiétude: les commandes que vous avez apprises jusqu'ici ne
+sont pas radicalement différentes d'un mode à l'autre. Mais vous
+pouvez constater par exemple que M-b et M-f traitent les apostrophes
+comme faisant partie des mots. Auparavant, ces caractères étaient
+considérés comme des séparateurs de mots. En général, les modes
+majeurs ne changent que très peu le comportement des commandes
+habituelles. 
+
+Pour voir la documentation du mode majeur courant, tapez C-h m.
+
+>> Utilisez C-u C-v pour amener cette ligne vers le haut de l'écran.
+>> Tapez C-h m, pour voir les différences entre les mode Fundamental
+   et Text.
+>> Tapez 'q' pour faire disparaître la documentation.
+
+Les modes majeurs sont appelés «majeurs» parce qu'il y en a aussi des
+«mineurs». Les modes mineurs n'altèrent que partiellement le
+comportement de tel ou tel mode majeur. Ils peuvent être activés ou
+désactivés indépendamment du mode majeur courant. Vous pouvez en
+utiliser autant que possible en même temps.
+
+Un mode mineur très utile pour éditer du texte est le mode 
+«Auto Fill». Quand ce mode est activé, Emacs coupe lui-même les lignes
+si vous tapez du texte trop long pour être contenu sur une seule.
+
+Pour activer ce mode, tapez M-x auto-fill-mode<Return>. Cette commande
+sert à le désactiver ou à l'activer selon son status actuel; elle
+intervertit son état d'activation.
+
+>> Tapez M-x auto-fill-mode<Return>. Insérez maintenant une quantité
+   de «aslidfhw» jusqu'à voir que votre ligne se divise
+   automatiquement en deux, à un endroit où il y avait un espace.
+
+La marge est en général à 70 caractères, mais vous pouvez la changer
+grâce à la commande C-x f. Donner la marge requise comme argument
+numérique.
+
+>> Tapez C-x f avec un argument de 20 (C-u 2 0 C-x f).
+   Tapez du texte jusqu'à ce que la ligne soit coupée, puis replacez
+   la marge à 70.
+
+Si vous faites des changements au milieu d'un paragraphe, le mode Auto 
+Fill ne recoupera pas les lignes tout seul. Pour réajuster les lignes
+d'un tel paragraphe, tapez M-q avec le curseur n'importe où dans le
+paragraphe.
+
+>> Déplacez le curseur dans le paragraphe précédent, et tapez M-q.
+
+
+* RECHERCHE
+-----------
+
+Emacs est capable de rechercher des chaînes de caractères aussi bien
+en avant qu'en arrière dans un texte. Ces commandes sont en fait des
+commandes de déplacement du curseur. Elles déplacent le curseur au
+prochain (ou précédent) endroit ou la chaîne apparaît.
+
+La commande de recherche d'Emacs est un peu différente de celle des
+autres éditeurs de texte dans la mesure où elle est incrémentale: la
+recherche intervient au fur et à  mesure que vous tapez la chaîne à
+rechercher. 
+
+Pour démarrer une recherche, tapez C-s (en avant) ou C-r (en
+arrière). MAIS PAS TOUT DE SUITE !! Attendez un peu pour tester ...
+
+Après avoir tapé C-s, vous constaterez que la chaîne «I-search»
+apparaît comme prompt dans la zone d'écho. Cela vous indique qu'Emacs
+est en mode de recherche incrémentale, et qu'il attend que vous
+entriez la chaîne à rechercher. <Return> termine la chaîne.
+
+>> Tapez C-s, et entrez LENTEMENT, une lettre à la fois, le mot
+   «curseur», en regardant bien ce qu'il se produit.
+   À ce stade, vous avez cherché le mot «curseur» une fois.
+>> Tapez C-s à nouveau, pour chercher la prochaine occurrence du mot.
+>> Maintenant, tapez <Delete> quatre fois et regardez comment le
+   curseur se déplace.
+>> Tapez <Return> pour terminer la recherche.
+
+En mode incrémental, Emacs recherche ce que vous avez tapé jusqu'ici,
+en surlignant les occurrences trouvées. Si aucune (nouvelle) occurrence
+n'existe, C-s produira un «bip», et la zone d'écho affichera
+«failing». C-g terminerait aussi bien la recherche.
+
+NOTE: Sur certains systèmes, C-x C-s bloque l'écran et Emacs ne dit
+plus rien. Cela signifie qu'une «fonctionnalité» système que l'on
+appelle le «flow control» intercepte le C-s et l'empêche de parvenir à 
+Emacs. Pour débloquer la situation, tapez C-q. Reportez-vous dans ce
+cas à la section «Spontaneous Entry to Incremental Search» du manuel
+d'Emacs pour plus d'information sur cette ... «particularité». 
+
+Si vous êtes au milieu d'une recherche incrémentale et que vous tapez
+<Delete>, vous constaterez que le dernier caractère de la chaîne est
+effacé, et que Emacs retourne à l'occurrence précédente. Si d'autre
+part vous tapez un caractère <Control> ou <Meta> (mises à part
+quelques exceptions comme les caractères spéciaux pour la recherche,
+C-s et C-r), la recherche sera terminée.
+
+Rappelez vous que si C-s cherche une chaîne APRÈS le curseur, C-r la
+recherche AVANT. Tout ce que nous venons de dire sur C-s s'applique à
+C-r.
+
+
+* FENÊTRES MULTIPLES
+--------------------
+
+Un des avantages d'Emacs est que vous pouvez afficher plusieurs
+fenêtres à la fois sur l'écran.
+
+>> Déplacez le curseur sur cette ligne, et tapez C-u 0 C-l ('L' pas '1')
+
+>> Maintenant tapez C-x 2 pour obtenir deux fenêtres.
+   Les deux fenêtres affichent le tutoriel. Le curseur reste en haut.
+
+>> Tapez C-M-v (ou <Esc> C-v) pour dérouler la fenêtre du bas.
+
+>> Tapez C-x o (o pour ôtre ...) pour placer le curseur dans la
+   fenêtre du bas.
+>> Utilisez C-v et M-v pour dérouler la fenêtre.
+   Continuez de lire dans celle du haut.
+
+>> Tapez C-x o pour retourner dans la fenêtre du haut.
+   Le curseur est exactement à la même place que quand vous aviez
+   quitté cette fenêtre.
+
+Vous pouvez continuer d'utiliser C-x o pour passer d'une fenêtre à
+l'autre. Chaque fenêtre a sa propre position du curseur, mais une
+seule fenêtre a la fois contient réellement le curseur. Toutes les
+commandes ordinaires d'édition prennent effet dans la fenêtre qui
+contient le curseur. On dit que cette fenêtre est «sélectionnée».
+
+La commande C-M-v est très utile quand vous éditez un texte dans une
+fenêtre et que vous vous servez d'une autre en guise de
+référence. Vous pouvez avancer dans l'autre grâce à C-M-v.
+
+C-M-v (ou <Esc> C-v si vous n'avez pas de touche <Meta>) est un
+exemple de Control-Méta caractère. L'ordre dans lequel les touches
+<Control> et <Meta> sont enfoncées n'a pas d'importance. Ce sont juste 
+des modificateurs. Par contre, <Esc> n'est pas un modificateur, donc
+vous êtes obligés de taper d'abord <Esc>, et C-v ensuite.
+
+>> Tapez C-x 1 dans la fenêtre du haut pour éliminer celle du bas.
+
+C-x 1 élimine en fait toutes les fenêtres non sélectionnées.
+
+Les fenêtres peuvent bien entendu contenir des buffers différents. Si
+vous utilisez C-x C-f pour ouvrir un fichier dans l'une des fenêtres,
+l'autre ne change pas. Elles sont totalement indépendantes.
+
+Voici une autre manière d'ouvrir un fichier dans l'autre fenêtre:
+
+>> Tapez C-x 4 C-f suivit du nom d'un fichier, puis <Return>.
+   Vous verrez le fichier apparaître dans l'autre fenêtre. Le curseur
+   ira également dans cette fenêtre.
+
+>> Tapez C-x o pour remonter à la fenêtre du haut, puis C-x 1 pour
+   éliminer celle du bas.
+
+
+* NIVEAUX D'ÉDITION RÉCURSIFS
+-----------------------------
+
+De temps en temps, vous vous trouverez dans ce qu'on appelle des
+niveaux d'édition récursifs. Ceci est indiqué dans la ligne de mode
+par des crochets autour des parenthèses qui englobent le nom du mode
+majeur. Par exemple, vous pouvez voir [(Fundamental)] au lieu de
+(Fundamental).
+
+Pour sortir d'un niveau récursif d'édition, tapez <Esc> <Esc>
+<Esc>. C'est un «siège éjectable» à usage multiple. Vous pouvez aussi
+l'utiliser pour sortir du minibuffer ou éliminer des fenêtres
+superflues.
+
+>> Tapez M-x pour vous rendre dans le minibuffer, puis tapez 
+   <Esc> <Esc> <Esc> pour en sortir.
+
+Il n'est pas possible d'utiliser C-g pour sortir d'un niveau récursif
+d'édition. La raison en est que C-g sert à annuler des commandes au
+sein même d'un niveau récursif d'édition.
+
+
+* POUR OBTENIR PLUS D'AIDE
+--------------------------
+
+Dans ce tutoriel, nous avons essayé de vous fournir assez de
+connaissance pour commencer à utiliser Emacs. Emacs est tellement
+riche en possibilités qu'il serait impossible de tout dire
+ici. Cependant, vous souhaiterez surement à un moment ou un autre
+avoir plus de renseignements sur ses énormes possibilités. Emacs
+comprend entre autres des commandes d'aide sur sa propre
+utilisation. Toutes ces commandes d'aide commencent par le préfixe
+C-h, le «caractère d'aide».
+
+Typiquement, vous tapez C-h, puis un caractère indiquant quelle aide
+vous souhaitez obtenir. Si vous êtes VRAIMENT perdu, tapez C-h ? et
+Emacs vous indiquera quelles sortes d'aide il peut vous fournir. Si
+vous ne désirez finalement pas d'aide après avoir tapé C-h, tapez
+simplement C-g.
+
+(Quelques sites redéfinissent la commande C-h. Cela ne devrait vraiment 
+pas être fait, donc allez vous plaindre à votre administrateur système.
+Si C-h ne marche pas, tapez M-x help<Return>.)
+
+L'aide de base est C-h c. Tapez C-h c puis une commande (même une
+séquence comme C-x f), et Emacs vous donnera une brève description de
+la commande en question.
+
+>> Tapez C-h c C-p.
+   Le message doit ressembler à quelque chose comme 
+
+       C-p runs the command previous-line
+
+Cela vous donne le «nom de la fonction». Les noms de fonctions sont
+principalement utilisés pour customiser Emacs, mais comme en général
+ils sont choisi de manière à indiquer ce que fait la commande, ils
+peuvent servir de courte documentation (au moins pour vous rappeler
+les commandes que vous avez déjà apprises).
+
+Pour de plus amples informations sur les commandes, utilisez C-h k au
+lieu de C-h c.
+
+>> Tapez C-h k C-p.
+
+Ceci affiche la documentation sur la fonction, ainsi que son nom dans
+une autre fenêtre. Quand vous avez fini de lire, tapez 'q' pour
+éliminer la fenêtre d'aide.
+
+Voici d'autres aides utiles:
+
+   C-h f       Décrire une fonction. Vous donnez son nom.
+
+>> Tapez C-h f previous-line<Return>.
+   Cela vous donne toute l'information dont Emacs dispose sur la
+   fonction appelée par la commande C-p.
+
+   C-h a       Hyper Apropos. Tapez un mot-clé et Emacs vous
+                affichera toutes les fonctions ou variables contenant
+                ce mot-clé. Les commandes que vous pouvez appeler
+                grâce à M-x ont un astérisque à gauche de leur nom.
+
+>> Tapez C-h a newline<Return>.
+
+Tapez <Return> pour effacer l'à-propos, ou cliquez avec le bouton du
+milieu sur un nom pour obtenir l'aide sur cette fonction ou variable.
+
+
+* CONCLUSION
+------------
+
+Rappelez-vous bien, pour quitter définitivement Emacs, tapez C-x
+C-c. Pour quitter temporairement (et pour pouvoir revenir), tapez C-z
+(sous X Windows, C-z iconifie la fenêtre).
+
+Ce tutoriel est fait pour être compréhensible par tout nouvel
+utilisateur. Donc si quelque chose n'est pas clair, n'hésitez pas à
+vous plaindre !! 
+
+Si vous avez plus particulièrement des remarques à faire sur la
+version française, vous pouvez aussi me contacter directement
+(Didier Verna <verna@inf.enst.fr>).
+
+
+COPIES / DISTRIBUTION
+---------------------
+
+Un peu d'histoire ...
+
+* Le premier tutoriel pour l'Emacs d'origine fut écrit par Stuart
+  Cracraft.
+* Ben Wing l'a mis à jour pour X Windows.
+* Martin Buchholz et Hrvoje Niksic y ont apporté des corrections pour
+  XEmacs. 
+* J'en (Didier Verna) ai fait une version française un beau jour de 1997.
+
+Cette version du tutoriel, tout comme Emacs, est copyrightée, et vous
+est fournie avec la permission d'en distribuer des copies sous
+certaines conditions (je laisse la notice du copyright en anglais):
+
+Copyright (c) 1997, Didier Verna.
+
+   Permission is granted to anyone to make or distribute verbatim copies
+   of this document as received, in any medium, provided that the
+   copyright notice and permission notice are preserved,
+   and that the distributor grants the recipient permission
+   for further redistribution as permitted by this notice.
+
+   Permission is granted to distribute modified versions
+   of this document, or of portions of it,
+   under the above conditions, provided also that they
+   carry prominent notices stating who last altered them.
+
+Les conditions pour copier Emacs lui-même sont plus complexes, mais
+dans le même état d'esprit. Vous êtes conviés à lire le fichier
+COPYING et à distribuer Emacs à vos amis. Aidez-nous à tuer
+l'obstructionnisme logiciel en utilisant, écrivant et partageant du
+logiciel libre!
+
diff --git a/etc/TUTORIAL.hr b/etc/TUTORIAL.hr
new file mode 100644 (file)
index 0000000..7acd515
--- /dev/null
@@ -0,0 +1,1128 @@
+Copyright (c) 1985, 1996 Free Software Foundation, Inc.  Uvjeti
+kopiranja na kraju.
+
+Ovo su osnovne upute za Emacs.
+
+Opæenito, Emacsove naredbe sadr¾e tipku CONTROL (ponekad oznaèenu CTRL
+ili CTL) ili tipku META.  Na nekim tipkovnicama tipka META je oznaèena
+kao ALT ili EDIT, ili ne¹to treæe (na primjer, na Sunovim tipkovnicama
+karo znak lijevo od razmaknice je META).  Ako nemate tipku META,
+umjesto nje mo¾ete koristiti ESC.  Da ne pi¹emo META ili CONTROL svaki
+put kad mislimo na prefiksnu tipku, koristit æemo sljedeæe skraæenice:
+
+ C-<znak>  znaèi dr¾eæi tipku CONTROL, stisnite znak <znak>.  Tako bi
+          C-f bilo: Dr¾eæi tipku CONTROL, napi¹ite f.
+ M-<znak>  znaèi dr¾eæi tipku META, pritisnite <znak>.  Ako nema tipke 
+          META, pritisnite <ESC>, otpustite ga, i napi¹ite znak
+          <znak>.
+
+Napomena: za izlazak iz Emacsa, utipkajte C-x C-c.  (Dva znaka.)
+Znakovi ">>" na lijevom rubu naznaèuju uputstva da poku¹ate koristiti
+neku naredbu.  Na primjer:
+<<Sredina stranice namjerno ostavljena prazna.  Tekst se nastavlja dolje.>>
+>>  Sad utipkajte C-v za pomak na sljedeæi ekran.
+       (samo naprijed, uèinite to tako da dr¾ite tipku control i
+       pritisnite 'v').  Od sad, ovo trebate napraviti kad god zavr¹ite
+       sa èitanjem stranice teksta.
+
+Uoèite dva reda koja se preklapaju kad se pomaknete s ekrana na ekran; 
+preklapanje osigurava kontinuitet koji vam olak¹ava èitanje teksta.
+
+Prva stvar koju trebate znati jest kako se micati s mjesta na mjesto u
+tekstu.  Veæ znate kako se pomaknuti ekran naprijed, pomoæu C-v.  Da 
+biste se pomakli ekran natrag, pritisnite M-v (dr¾ite tipku META i
+pritisnite v, ili upi¹ite <ESC>v ako nemate tipke META, EDIT ili ALT).
+
+>>  Poku¹ajte tipkati M-v, zatim C-v, nekoliko puta.
+
+
+* SA®ETAK
+---------
+
+Sljedeæe naredbe su korisne za pregledavanje stranica teksta:
+
+       C-v     Pomièe stranicu naprijed
+       M-v     Pomièe stranicu natrag
+       C-l     Bri¹e ekran, i ponovno iscrtava sve, stavljajuæi tekst 
+               pokraj kursora u sredinu.
+                (to je control-L, a ne control-1.)
+
+>> Naðite kursor, i pogledajte tekst pokraj njega.
+   Sada stisnite C-l.
+   Opet naðite kursor, i uoèite da se pokraj kursora nalazi isti
+   tekst.
+
+
+* OSNOVE KONTROLE KURSORA
+-------------------------
+
+Pomaci s ekrana na ekran su korisni, ali kako se pomaknuti na pojedino 
+mjesto u tekstu na ekranu?
+
+To mo¾ete uèiniti na nekoliko naèina.  Najosnovniji naèin je
+upotrijebiti naredbe C-p, C-b, C-f i C-n.  Svaka od ovih naredbi
+pomièe kursor jedan redak ili stupac u pojedinom smjeru.  Evo tablice
+koja pokazuje ove èetiri naredbe i smjerove u kojem pomièu.
+
+                         Prethodni red, C-p
+                        (eng. previous line)
+                                 :
+                                 :
+     Natrag, C-b  .... Trenutni polo¾aj kursora .... Naprijed, C-f
+  (eng. backward)                :                 (eng. forward)
+                                 :
+                         Sljedeæi red, C-n
+                          (eng. next line)
+
+>> Pomaknite kursor do retka u sredini tablice koristeæi C-n i C-p.
+   Tada stisnite C-l da vidite cijelu tablicu u sredi¹tu ekrana.
+
+Ove su naredbe temeljene na engleskim mnemonicima: P za previous, N za
+next, B za backward i F za forward.  Ovo su osnovne naredbe za
+pomicanje kursora, i s vremenom æete ih SVE koristiti, pa bi bilo vrlo
+korisno da ih sada nauèite.
+
+>> Stisnite C-n nekoliko puta, tako da dovedete kursor do ovog retka.
+
+>> Pomaknite se na red s C-f-ovima, i onda gore do C-p-ova.
+   Uoèite ¹to C-p radi kad je kursor na sredini reda.
+
+Svaki red teksta zavr¹ava znakom Newline (novi red), èime ga se odvaja 
+od sljedeæeg reda.  Zadnji red u datoteci bi trebao imati Newline na
+kraju (ali Emacs to ne zahtijeva).
+
+>> Poku¹ajte stisnuti C-b na poèetku reda.  Trebalo bi vas pomaknuti
+   na kraj prethodnog reda.  To se dogaða zato ¹to ste se pomakli
+   unatrag, preko znaka Newline.
+
+C-f se mièe preko Newline-a, ba¹ kao i C-b.
+
+>> Pritisnite jo¹ nekoliko puta C-b, da steknete osjeæaj za kursor.
+   Tad sti¹æite C-f dok se ne vratite na kraj reda.
+   Zatim se jo¹ jednim C-f-om pomaknite na poèetak sljedeæeg reda.
+
+Kad se pomaknete preko gornjeg ili donjeg ruba ekrana, tekst iza ruba
+se pomakne na ekran.  Ovo se naziva "pomak" (eng. scrolling).  Njime
+Emacs mo¾e pomaknuti kursor na neko mjesto u tekstu bez uklanjanja
+kursora s ekrana.
+
+>> Poku¹ajte pomaknuti kursor s donjeg ruba sa C-n, i pogledajte ¹to
+   se dogaða.
+
+Ako je micanje po znakovima presporo, mo¾ete se micati po rijeèima.
+M-f (Meta-f) mièe rijeè naprijed, a M-b mièe rijeè natrag.
+
+>> Pritisnite nekoliko puta M-f i M-b.
+
+Kad se nalazite u sredini rijeèi, M-f pomièe na kraj rijeèi.  Kad se
+nalazite u praznom prostoru izmeðu rijeèi, M-f pomièe na kraj sljedeæe 
+rijeèi.  M-b se pona¹a na isti naèin, ali u suprotnom smjeru.
+
+>> Pritisnite M-f i M-b nekoliko puta, izmije¹ano s C-f i C-b, tako da 
+   mo¾ete promotriti kako se M-f i M-b pona¹aju na razlièitim mjestima 
+   unutar i izmeðu rijeèi.
+
+Uoèite paralelu izmeðu C-f i C-b na jednoj strani, i M-f i M-b na
+drugoj.  Meta znakovi se èesto koriste za operacije vezane uz jedinice 
+definirane jezikom (rijeèi, reèenice, paragrafi), dok Control znakovi
+rade na osnovnim jedinicama, neovisno o onome ¹to editirate (znakovi, 
+redovi, itd.)
+
+Analogija vrijedi i izmeðu redova i reèenica: C-a i C-e pomièu na
+poèetak, odnosno na kraj reda, dok M-a i M-e pomièu na poèetak, odnosno 
+kraj reèenice.
+
+>> Isku¹ajte C-a nekoliko puta, potom C-e nekoliko puta.
+>> Iskupajte M-a nekoliko puta, potom M-e nekoliko puta.
+
+Uoèite kako ponovljeni C-a ne rade ni¹ta, dok ponovljeni M-a
+nastavljaju micati po reèenicama.  Iako ovo nije sasvim analogno,
+svaka se naredba doima prirodnom.
+
+Polo¾aj kursora u tekstu se takoðer naziva "toèka" (eng. point).
+Drugaèije reèeno, kursor pokazuje na ekranu gdje se point nalazi u
+tekstu.
+
+Evo sa¾etka jednostavnih operacija za micanje kursora, ukljuèujuæi i
+naredbe za pomicanje preko rijeèi i reèenica:
+
+       C-f     Znak naprijed
+       C-b     Znak natrag
+
+       M-f     Rijeè naprijed
+       M-b     Rijeè natrag
+
+       C-n     Sljedeæi red
+       C-p     Prethodni red
+
+       C-a     Poèetak reda
+       C-e     Kraj reda
+
+       M-a     Poèetak reèenice
+       M-e     Kraj reèenice
+
+>> Isku¹ajte sve ove naredbe jo¹ nekoliko puta, za vje¾bu.
+   To su najèe¹æe rabljene naredbe.
+
+Dvije druge va¾ne naredbe za pomicanje kursora su M-< (Meta Manje),
+koja pomièe na poèetak cijelog teksta, i M-> (Meta Veæe), koja pomièe
+na kraj cijelog teksta.
+
+Na veæini terminala, "<" je iznad zareza, tako da morate koristiti
+tipku shift da biste ga utipkali.  Na tim terminalima morate koristiti 
+tipku shift i da biste utipkali M-<; bez shifta, pisali biste M-zarez.
+
+>> Sada isku¹ajte M-<, da biste se pomaknuli na poèetak uputa.
+   Potom upotrijebite C-v nekoliko puta da se vratite ovamo.
+
+>> Sada isku¹ajte M->, pomaknuv¹i se na kraj uputa.
+   Potom upotrijebite M-v nekoliko puta da se vratite ovamo.
+
+Ako va¹ terminal ima kursorske tipke, mo¾ete kursor pomicati njima.
+Preporuèujemo da nauèite C-b, C-f, C-n i C-p iz tri razloga.  Prvo,
+rade na svim vrstama terminala.  Drugo, kad steknete rutinu kori¹tenja 
+Emacsa, primijetit æete da je tipkanje ovih CTRL znakova br¾e od
+uporabe kursorskih tipki (jer ne morate odmicati prste od polo¾aja za
+tipkanje).  Treæe, jednom kad se naviknete koristiti CTRL znakovne
+naredbe, lako æete nauèiti koristiti druge napredne naredbe za micanje 
+kursora.
+
+Veæina Emacsovih naredbi prihvaæa numerièki argument; za veæinu njih
+ovo slu¾i kao brojaè ponavljanja.  Brojaè ponavljanja zadajete tako da 
+utipkate C-u i potom znamenke prije nego ¹to utipkate naredbu.  Ako
+imate tipku META (ili EDIT ili ALT), postoji jo¹ jedan alternativan
+naèin uno¹enja numerièkog argumenta: tipkajte znamenke dr¾eæi svo vrijeme 
+tipku META.  Preporuèujemo uèenje metode pomoæu C-u, jer radi na svim
+terminalima.
+
+Primjerice, C-u 8 C-f pomièe osam znakova naprijed.
+
+>> Poku¹ajte koristiti C-n ili C-p s numerièkim argumentom, tako da
+   pomaknete kursor na liniju blisku ovoj samo jednom naredbom.
+
+Veæina naredbi koristi numerièki argument kao brojaè ponavljanja.
+Neke ga naredbe, izunimno, koriste drugaèije.  C-v i M-v su meðu
+iznimkama.  Kad im se proslijedi argument, one pomaknu ekran gore ili
+dolje, za toliko redova, a ne stranica.  Na primjer, C-u 4 C-v pomièe
+ekran za èetiri reda.
+
+>> Sada poku¹ajte upisati C-u 8 C-v.
+
+Ovo je trebalo pomaknuti ekran za 8 redova.  Ako ga hoæete pomaknuti
+natrag, mo¾ete dati isti argument M-v.
+
+Ako koristite X Window sistem, vjerojatno se na desnoj strani Emacsova
+prozora nalazi pravokutno podruèje nazvano "vrpca za pomicanje"
+(eng. scroll-bar).  Mo¾ete pomicati tekst mi¹em povlaèeæi klizaè
+unutar vrpce.
+
+>> Poku¹ajte pritisnuti srednju tipku mi¹a na vrh klizaèa unutar
+   scroll-bara.  Ovo bi trebalo pomaknuti tekst do polo¾aja odreðenog
+   visinom toèke pritiska.
+
+>> Pomaknite mi¹a na toèku scroll-bara otprilike tri reda od vrha, i
+pritisnite lijevu tipku mi¹a nekoliko puta.
+
+
+* KONTROLA KURSORA NA X TERMINALU
+---------------------------------
+
+Ako imate X terminal, vjerojatno æe vam biti lak¹e koristiti tipke
+kursorskog bloka.  Lijeva, desna, gornja i donja strelica pomièu u
+oèekivanom smjeru; one funkcioniraju jednako kao i C-b, C-f, C-p i
+C-n, ali ih je lak¹e tipkati i zapamtiti.  Takoðer mo¾ete koristiti
+C-lijevo i C-desno za pomake po rijeèima, a C-gore i C-dolje za pomake 
+po blokovima (npr. paragrafima, ako editirate tekst).  Ako imate tipke 
+oznaèene s HOME (ili BEGIN) i END, one æe vas pomaknuti na poèetak
+odnosno kraj reda, a C-home i C-end æe vas pomaknuti na poèetak
+odnosno kraj datoteke.  Ako va¹a tipkovnica ima tipke PgUp i PgDn,
+mo¾ete ih koristiti za pomicanje gore i dolje po stranicama, kao M-v i 
+C-v.
+
+Sve ove naredbe mogu primiti numerièke argumente, kao ¹to je gore
+opisano.  Mo¾ete taj argument unijeti kraæim putem: samo dr¾ite tipku
+CONTROL ili META, i upi¹ite broj.  Na primjer, za pomak 12 rijeèi
+desno, tipkajte C-1 C-2 C-desno.  Uoèite da je ovo jako lako utipkati, 
+jer ne morate otpu¹tati tipku CONTROL izmeðu pritisaka tipki.
+
+
+* KAD EMACS BLOKIRA
+-------------------
+
+Ako Emacs prestane odgovarati na va¹e naredbe, mo¾ete ga zaustaviti
+utipkav¹i C-g.  Mo¾ete koristiti C-g da zaustavite naredbu koja predugo
+traje.
+
+Takoðer s C-g mo¾ete odbaciti numerièki argument, ili poèetak naredbe
+koju ne ¾elite zavr¹iti.
+
+>> Upi¹ite C-u 100 da napravite numerièki argument 100, zatim stisnite C-g.
+   Sad upi¹ite C-f.  Pomaknut æe se samo za jedan znak, jer ste
+   argument odbacili s C-g.
+
+Ako gre¹kom stisnete <ESC>, mo¾ete ga se rije¹iti s C-g.
+
+
+* ONEMOGUÆENE NAREDBE
+---------------------
+
+Neke Emacsove naredbe su "onemoguæene", tako da ih poèetnici ne mogu
+pokrenuti gre¹kom.
+
+Ako utipkate jednu od onemoguæenih naredbi, Emacs æe vas porukom
+obavijestiti koju ste naredbu poku¹ali pokrenuti, i pitati vas ¾elite
+li je ipak izvr¹iti.
+
+Ako je zaista ¾elite isprobati, pritisnite razmaknicu kao odgovor na
+pitanje.  Inaèe, ako ne ¾elite izvr¹iti onemoguæenu naredbu,
+odgovorite na pitanje s "n".
+
+>> Pritisnite `C-x n p' (¹to je onemoguæena naredba),
+   zatim na pitanje odgovorite s "n".
+
+
+* PROZORI
+---------
+
+Emacs mo¾e imati nekoliko prozora, svaki s vlastitim tekstom.  Uoèite
+da se pojam "prozora" kako ga koristi Emacs ne odnosi na odvojene
+preklapajuæe prozore windowing sustava, veæ na razdvojene dijelove
+unutar jednog X prozora.  (Emacs takoðer mo¾e prikazati vi¹e X
+prozora, odnosno "okvira", u Emacsovoj terminologiji.  To je opisano
+kasnije.)
+
+Za sada je bolje ne ulaziti u tehnike kori¹tenja vi¹e prozora.  Ono
+¹to trebate znati jest kako se rije¹iti dodatnih prozora koji se mogu
+javiti za prikaz pomoæi, ili kao izlaz nekih naredbi.
+Jednostavno:
+
+       C-x 1   Jedan prozor (tj. ubij sve druge prozore)
+
+To je Control-x praæen znamenkom 1.  C-x 1 pro¹iruje prozor u kojem je 
+kursor, tako da on zauzme cijeli ekran.  Pobri¹e, takoðer, i ostale
+prozore.
+
+>> Pomaknite kursor na ovu liniju i upi¹ite C-u 0 C-l.
+
+(Sjetite se da C-l ponovno iscrtava ekran.  Ako ovoj naredbi date
+numerièki argument, on znaèi "iscrtaj ekran i smjesti trenutni red
+toliko linija od vrha ekrana."  Tako C-u 0 C-l znaèi "iscrtaj ekran, i 
+stavi trenutni red na vrh.")
+
+>> Pritisnite Control-x 2
+   Uoèite kako se ovaj prozor smanjuje, dok se novi pojavljuje
+   prikazujuæi sadr¾aj ovog spremnika (buffera).
+
+>> Upi¹ite C-x 1 i gledajte kako novi prozor nestaje.
+
+
+* UMETANJE I BRISANJE
+---------------------
+
+®elite li umetnuti tekst, samo ga utipkajte.  Znakove koje vidite, kao 
+¹to su A, 7, *, itd. Emacs shvaæa kao tekst i umeæe trenutno.
+Pritisnite <Return> (znak za novi red) da umetnete znak Newline.
+
+Zadnji znak koji ste umetnuli mo¾ete izbrisati pritisnuv¹i <Delete>.
+<Delete> je tipka na tipkovnici koja mo¾e biti oznaèena kao "Del".  U
+nekim sluèajevima, tipka "Backspace" slu¾i kao <Delete>, ali ne
+uvijek!
+
+Opæenitije, <Delete> bri¹e znak neposredno ispred trenutnog polo¾aja
+kursora.
+
+>> Uèinite sljedeæe: utipkajte nekoliko znakova, zatim ih izbri¹ite
+   stisnuv¹i <Delete> nekoliko puta.  Ne brinite o promjeni ove
+   datoteke; neæete izmijeniti glavnu verziju uputa.  Ovo je va¹a
+   osobna kopija.
+
+Kad red teksta postane prevelik za jedan red na ekranu, red se
+"nastavlja" na drugi ekranski red.  Obrnuta kosa crta ("\") na desnom
+rubu ukazuje na red koji je nastavljen.
+
+>> Upisujte tekst dok ne doðete do desnog ruba, i nastavite pisati.
+   Vidjet æete kako se pojavljuje nastavljeni red.
+
+>> Tipkom <Delete> bri¹ite tekst dok red teksta opet ne stane na red
+   ekrana.  Kontinuacijski red tada nestaje.
+
+Mo¾ete izbrisati znak Newline kao i bilo koji drugi znak.  Brisanje
+znaka Newline izmeðu dva reda ih spaja u jedan red.  Ako je novonastali
+zajednièki red prevelik da stane na ekranski red, bit æe prikazan
+kontinuacijskim redom.
+
+>> Pomaknite kursor na poèetak reda i pritisnite <Delete>.  Red æe se
+   spojiti s redom iznad.
+
+>> Pritisnite <Return> tako da ponovno umetnete Newline koji ste
+   izbrisali.
+
+Upamtite da se veæini Emacsovih naredbi mo¾e zadati brojaè
+ponavljanja; ovo ukljuèuje znakove teksta.  Ponavljanje znaka teksta
+unosi ga nekoliko puta.
+
+>>  Isku¹ajte sad -- upi¹ite C-u 8 * da upi¹ete ********.
+
+Sada ste nauèili najosnovnije naèine upisivanja u Emacs i ispravljanja 
+gre¹aka.  Sada mo¾ete i brisati po rijeèima ili redovima.  Evo sa¾etka 
+operacija brisanja:
+
+       <Delete>     bri¹i znak neposredno pred kursorom
+       C-d          bri¹i znak nakon kursora
+
+       M-<Delete>   ubij rijeè prije kursora
+       M-d          ubij rijeè poslije kursora
+
+       C-k          ubij od pozicije kursora do kraja reda
+       M-k          ubij do kraja trenutne reèenice
+
+Uoèite da <Delete> i C-d nasuprot M-<Delete> i M-d pro¹iruju paralelu
+zaèetu s C-f i M-f (dobro, <Delete> ba¹ i nije kontrolni znak, ali
+nemojmo brinuti o tome).  C-k i M-k su na neki naèin slièni C-e i M-e, 
+po operaciji na redovima, odnosno reèenicama.
+
+Kad bri¹ete vi¹e od jednog znaka istovremeno, Emacs sprema izbrisani
+tekst, tako da ga mo¾ete dobiti natrag.  Vraæanje ubijenog teksta zove 
+se "dobavljanje" (eng. yanking).  Mo¾ete dobaviti ubijeni tekst bilo
+na isto mjesto gdje je bio ubijen, bilo na neko drugo mjesto u
+tekstu.  Mo¾ete dobaviti tekst nekoliko puta, èime æete dobiti
+vi¹estruke kopije.  Komanda za dobavljanje je C-y.
+
+Uoèite da je razlika izmeðu "ubijanja" i "brisanja" neèega u tome ¹to
+se ubijeni tekst mo¾e dobaviti natrag, a izbrisani ne mo¾e.  Opæenito,
+naredbe koje uklanjaju puno teksta spreme izbrisani tekst, dok ga
+naredbe koje bri¹u samo jedan znak ili samo prazne linije i razmake ne
+spremaju.
+
+>> Pomaknite kursor na poèetak reda koji nije prazan.
+   Zatim pritisnite C-k da ubijete tekst u tom redu.
+>> Stisnite C-k drugi put.  Vidjet æete da ubija Newline koji prati
+   taj red.
+
+Uoèite da jedan C-k ubija sadr¾aj reda, dok drugi C-k ubija sam red, i
+mièe sve druge redove prema gore.  C-k tretira numerièki argument na
+specijalan naèin: ubija toliko redova, i njihov sadr¾aj.  Ovo nije
+obièno ponavljanje.  C-u 2 C-k ubija dva reda i njihove newline;
+pritiskanje C-k dvaput ne bi dalo taj rezultat.
+
+Da povratite zadnji ubijeni tekst i stavite ga gdje je kursor
+trenutno, pritisnite C-y.
+
+>> Poku¹ajte; pritisnite C-y da dobavite tekst.
+
+Gledajte na C-y kao da dobavljate natrag ne¹to ¹to vam je netko uzeo.
+Uoèite da ako ponovite C-k nekoliko puta, sav tekst bit æe spremljen
+zajedno, tako da æe ga C-y dobaviti odjednom.
+
+>> Uèinite to sad, pritisnite C-k nekoliko puta.
+
+Sad, da bi vratili ubijeni tekst:
+
+>> Stisnite C-y.  Tad spustite kursor nekoliko linija ni¾e i opet
+   stisnite C-y.  Sada vidite kako se kopira tekst.
+
+©to napraviti ako imate tekst koji ¾elite dobaviti, ali onda ubijete
+ne¹to drugo?  C-y bi dobavio zadnji tekst.  Ali prethodni tekst nije
+izgubljen.  Mo¾ete ga povratiti koristeæi naredbu M-y.  Nakon ¹to
+pritisnete C-y i dobijete zadnje ubijeni tekst, pritiskanje M-y ga
+zamjenjuje s prethodno ubijenim tekstom.  Uzastopno pozivanje M-y
+dobavlja sve ranije i ranije tekstove.  Kad doðete do teksta koji ste
+tra¾ili, ne morate uèiniti ni¹ta posebno da ga zadr¾ite.  Samo
+nastavite s editiranjem, ostaviv¹i dobavljeni tekst gdje jest.
+
+Ako pritisnete M-y dovoljno puta, vratit æete se na polaznu toèku
+(zadnji ubijeni tekst).
+
+>> Ubijte jedan red, pomièite se po tekstu, ubijte drugi red.
+   Zatim pritisnite C-y da biste dobili natrag drugi ubijeni red.
+   Zatim napravite M-y pa æe taj tekst biti zamijenjen prvim ubijenim
+   redom.  Napravite jo¹ par puta M-y i pogledajte ¹to dobivate.
+   Nastavite s M-y dok ne vratite drugi ubijeni red, a zatim M-y 
+   pritisnite jo¹ par puta.  Ako ¾elite, mo¾ete poku¹ati proslijediti
+   naredbi M-y pozitivne i negativne argumente.
+
+
+* PONI©TENJE
+------------
+
+Ako napravite izmjenu u tekstu, pa se zatim predomislite, mo¾ete
+poni¹titi (eng. "undo") promjenu naredbom undo, C-x u.
+
+Obièno, C-x u poni¹tava promjene koje su rezultat jedne naredbe; ako
+ponovite C-x u nekoliko puta uzastopce, svako novo ponavljanje
+poni¹tava uèinak jo¹ jedne naredbe.
+
+Ali, postoje dva izuzetka: naredbe koje ne mijenjaju tekst se ne
+raèunaju (ovo ukljuèuje naredbe koje mièu kursor i pomièu tekst), a
+samo-umeæuæi znakovi se obièno grupiraju u skupine od po 20 (da se
+umanji broj C-x u koje morate stisnuti da biste poni¹tili unos
+teksta).
+
+>> Ubijte ovu liniju s C-k, zatim utipkajte C-x u i trebala bi se
+   ponovno pojaviti.
+
+C-_ je alternativna naredba za poni¹tenje; ona radi isto kao C-x u,
+ali ju je lak¹e utipkati nekoliko puta za redom.  Mana C-_ je da na
+nekim tipkovnicama nije oèigledno kako je utipkati.  Zato ostavljamo i 
+C-x u.  Na nekim terminalima mo¾ete dobiti C-_ kombinacijom CTRL i /.
+
+Numerièki argument naredbi C-_ ili C-x u slu¾i kao brojaè ponavljanja.
+
+
+* DATOTEKE
+----------
+
+Da biste za stalno spremili izmjene na tekstu koji editirate, morate ga
+spremiti u datoteku.  Ako to ne uèinite, tekst æe nestati kada izaðete 
+iz Emacsa.  Svoje izmjene stavljate u datoteku tako ¹to je prvo
+"naðete" (ovo se jo¹ naziva i "posjeta" datoteci).
+
+Nala¾enje datoteke znaèi da vidite sadr¾aj datoteke unutar Emacsa.  U
+neku ruku, ovo je kao da editirate samu datoteku.  Meðutim, izmjene
+koje napravite koristeæi Emacs ne postaju trajne dok niste "snimili"
+datoteku.  Tako mo¾ete izbjeæi ostavljanje poluzavr¹ene datoteke u
+sustavu, ako to ne ¾elite.  Èak i kad snimate, Emacs ostavlja izvornu
+datoteku pod promijenjenim imenom, za sluèaj da se kasnije
+predomislite.
+
+Ako pogledate pri dnu ekrana, vidjet æete red koji poèinje i zavr¹ava
+s crticama, i sadr¾i niz "XEmacs: TUTORIAL.hr".  Ovaj dio ekrana
+uvijek pokazuje naziv datoteke koju posjeæujete.  U ovom trenutku vi
+posjeæujete datoteku koja se zove "TUTORIAL", a koja je va¹a osobna
+kopija Emacsovih uputa.  Koju god datoteku na¹li, njen æe se naziv
+pojaviti na tom istom mjestu.
+
+Naredbe za pronala¾enje i spremanje datoteka se razlikuju od drugih
+naredbi koje ste dosad upoznali, po tome ¹to se sastoje od dva znaka.
+Obje poèinju znakom Control-x; mnoge od njih rade s datotekama,
+spremnicima i povezanim stvarima.  Ove naredbe su dugaèke dva, tri ili
+èetiri znaka.
+
+Jo¹ jedna stvar u vezi naredbe za nala¾enje datoteke je da morate reæi 
+koju datoteku ¾elite.  Ka¾emo da naredba "èita argument s terminala"
+(u ovom sluèaju, argument je naziv datoteke).  Kad utipkate naredbu
+
+       C-x C-f   Naði datoteku
+
+Emacs tra¾i od vas da upi¹ete naziv datoteke.  Naziv datoteke koji
+upi¹ete pojavljuje se u donjem redu ekrana.  Taj donji red naziva se
+minispremnik (minibuffer) kad se koristi za tu vrstu unosa.  Mo¾ete
+koristiti uobièajene Emacsove naredbe da editirate naziv datoteke.
+
+Dok unosite naziv datoteke (ili za bilo kojeg unosa iz minispremnika), 
+mo¾ete otkazati naredbu pomoæu C-g.
+
+>> Upi¹ite C-x C-f, potom C-g.  Ovo otkazuje minispremnik, a takoðer
+   otkazuje i naredbu C-x C-f koja je koristila minispremnik.  Tako
+   nijedna datoteka neæe biti pronaðena.
+
+Kad zavr¹ite s upisom imena datoteke, stisnite <Return> za kraj.  Tad
+æe naredba C-x C-f otpoèeti svoj posao, i naæi datoteku koju ste
+izabrali.  Minispremnik nestaje kad naredba C-x C-f zavr¹i.
+
+Ubrzo æe se sadr¾aj datoteke pojaviti na ekranu, i moæi æete editirati 
+sadr¾aj.  Kad po¾elite trajno saèuvati svoje izmjene, upi¹ite naredbu
+
+       C-x C-s   Spremi datoteku
+
+Ovo kopira tekst unutar Emacsa u datoteku na disku.  Prvi put kad ovo
+uèinite, Emacs æe preimenovati izvornu datoteku u novo ime, tako da je
+ne izgubite.  Novo se ime tvori dodavanjem znaka ~ na izvorno ime
+datoteke.
+
+Kad snimanje zavr¹i, Emacs ispi¹e ime snimljene datoteke.  Trebali
+biste snimati relativno èesto, tako da ne izgubite puno ako sustav
+padne.
+
+>> Upisav¹i C-x C-s, spremite svoju kopiju uputa.
+   Na dnu ekrana bi trebalo pisati "Wrote ...TUTORIAL.hr".
+
+Primjedba: Na nekim sustavima, tipkanje C-x C-s æe zamrznuti ekran, i
+neæete vi¹e vidjeti Emacsov output.  To znaèi da "prednost"
+operativnog sustava zvana "kontrola toka" (eng. flow control) presreæe
+C-s i ne da mu da doðe do Emacsa.  Odmrznite sustav tipkom C-q.  Tada
+pogledajte odjeljak "Spontaneous Entry to Incremental Search"
+Emacsovog manuala za savjet kako se nositi s ovom "predno¹æu".
+
+Mo¾ete naæi postojeæu datoteku, da je pogledate ili editirate.  Mo¾ete 
+takoðer naæi i datoteku koja jo¹ ne postoji.  Tako se stvaraju nove
+datoteke Emacsom: naðite datoteku, koja æe ispoèetka biti prazna, i
+poènite unositi tekst u datoteku.  Kad zatra¾ite "snimanje" datoteke,
+Emacs æe zaista stvoriti datoteku s tekstom koji ste unijeli.  Od tad
+pa nadalje, mo¾ete smatrati da editirate veæ postojeæu datoteku.
+
+
+* SPREMNICI
+-----------
+
+Ako naðete jo¹ jednu datoteku s C-x C-f, ona prva ostaje unutar
+Emacsa.  Mo¾ete se vratiti natrag na nju nalazeæi je opet s C-x C-f.
+Ovako mo¾ete otvoriti prilièan broj datoteka unutar Emacsa.
+
+>> Stvorite datoteku imena "foo" tipkajuæi C-x C-f foo <Return>.
+   Tad unesite neki tekst, editirajte ga, i snimite "foo" utipkav¹i
+   C-x C-s.
+   Konaèno, upi¹ite C-x C-f TUTORIAL.hr <Return> da se vratite na
+   upute.
+
+Emacs pohranjuje tekst svake datoteke u objektu zvanom "spremnik"
+(eng. buffer).  Nala¾enje datoteke otvara novi spremnik unutar
+Emacsa.  Popis spremnika koji se nalaze u trenutnom pozivu Emacsa
+mo¾ete dobiti sa
+
+       C-x C-b   Izlistaj spremnike
+
+>> Sada isku¹ajte C-x C-b.
+
+Uoèite kako svaki spremnik ima naziv, a mo¾e imati i ime datoteke koje
+se odnosi na datoteku èiji sadr¾aj je u njemu.  Neki spremnici ne
+odgovaraju ni jednoj datoteci.  Na primjer, spremnik "*Buffer List*" nema
+ni jednu datoteku.  To je spremnik koji sadr¾i spisak spremnika koji
+je stvorila naredba C-x C-b.  BILO KOJI tekst koji vidite u nekom
+Emacsovom prozoru uvijek je dio nekog spremnika.
+
+>> Pritisnite C-x 1 da se rije¹ite spiska spremnika.
+
+Ako promijenite tekst jedne datoteke, zatim naðete drugu datoteku, ova 
+prva neæe biti snimljena.  Njene promjene ostaju unutar Emacsa, u
+spremniku te datoteke.  Ovo je korisno, ali to i znaèi da je potreban
+pogodan naèin snimanja datoteke prvog spremnika.  Bilo bi nespretno
+prebacivati se natrag u spremnik s C-x C-f samo zato da ga se snimi s
+C-x C-s.  Zato imamo
+
+       C-x s     Snimi neke spremnike.
+
+C-x s vas pita za svaki spremnik koji sadr¾i izmjene koje niste
+snimili.  Za svaki takav spremnik pita vas da li ga ¾elite snimiti.
+
+>> Upi¹ite red teksta, potom upi¹ite C-x s.
+   Pitat æe vas ¾elite li snimiti spremnik s nazivom TUTORIAL.hr.
+   Odgovorite potvrdno na pitanje, tipkajuæi "y".
+
+
+* UPORABA IZBORNIKA
+-------------------
+
+Ako ste na X terminalu, uoèit æete izbornik na vrhu Emacsovog prozora.
+Mo¾ete koristiti izbornik za pristup svim uobièajenim Emacsovim
+naredbama, kao ¹to su "find file".  Ovo æe vam u poèetku biti lak¹e,
+jer neæete morati pamtiti tipke za neku naredbu.  Jednom kad vam rad u
+Emacsu postane ugodan, lako æete poèeti koristiti naredbe s
+tipkovnice, jer svaka stavka izbornika sadr¾i i odgovarajuæu tipku za
+pokretanje naredbe.
+
+Uoèite da postoji puno stavki koje nemaju ekvivalent na tipkovnici.
+Na primjer, izbornik "Buffers" prikazuje sve raspolo¾ive spremnike
+redosljedom posljednje uporabe.  Mo¾ete se prebaciti na bilo koji
+spremnik tako da jednostavno izaberete njegov naziv u izborniku
+"Buffers".
+
+
+* UPORABA MI©A
+--------------
+
+Kad radite pod X-ima, Emacs je u potpunosti integriran s mi¹em.
+Mo¾ete pozicionirati tekstualni kursor pritisnuv¹i lijevu tipku mi¹a
+na ¾eljenom mjestu, mo¾ete izabrati tekst povlaèeæi lijevu tipku mi¹a
+po ¾eljenom tekstu.  (Ili, na drugi naèin, pritisnuti lijevu tipku
+mi¹a s jedne strane, zatim se pomaknuti na drugu stranu, i koristiti
+Shift i tipku mi¹a za izbor teksta.)
+
+Ako ¾elite ubiti izabrani tekst, mo¾ete pritisnuti C-w, ili izabrati
+Cut u izborniku Edit.  Uoèite da ovo dvoje *nije* isto: C-w samo
+sprema tekst unutar Emacsa (slièno C-k, kako je opisano gore), dok Cut
+radi ovo, i jo¹ sprema tekst u X clipboard, gdje do njega mogu
+pristupiti ostale aplikacije.
+
+Tekst s X clipboarda mo¾ete dobiti koristeæi stavku Paste izbornika
+Edit.
+
+Srednja tipka mi¹a se obièno koristi za izbor stvari koje su vidljive
+na ekranu.  Na primjer, ako uðete u Info (Emacsovu on-line
+dokumentaciju) koristeæi C-h i ili izbornik Help, mo¾ete pratiti
+osvijetljeni link pritisnuv¹i srednju tipku mi¹a na njemu.  Slièno,
+ako tipkate naziv datoteke (npr. na "Find File" promptu) i pritisnete
+TAB da vidite moguænosti, mo¾ete stisnuti srednju tipku mi¹a na neku
+od moguænosti, da je izaberete.
+
+Desna tipka mi¹a poziva "skoèni" izbornik.  Sadr¾aj ovog izbornika
+ovisi o modu u kojem se trenutno nalazite, i obièno sadr¾i nekoliko
+èesto kori¹tenih naredbi, tako da se do njih lak¹e doðe.
+
+>> Sada pritisnite desnu tipku mi¹a.
+
+Morat æete dr¾ati tipku da zadr¾ite izbornik.
+
+
+* PRO©IRENJE SKUPA NAREDBI
+--------------------------
+
+Emacsovih naredbi ima puno puno vi¹e nego ¹to bi ikad moglo stati na
+sve kontrolne i meta znakove.  Emacs ovo zaobilazi pro¹irenim
+(eXtended) naredbama.  One dolaze u dva oblika:
+
+       C-x     Pro¹iri znak.  Praæena jednim znakom.
+       M-x     Pro¹irena naredba s imenom.  Praæena dugim imenom.
+
+Postoje naredbe koje jesu korisne, ali ih se rabi manje nego naredbe o 
+kojima smo dosad govorili.  Veæ ste vidjeli dvije: naredbe s
+datotekama C-x C-f za nala¾enje i C-x C-s za snimanje.  Jo¹ jedan
+primjer je naredba kojom se izlazi iz Emacsa -- to je naredba C-x
+C-c.  (ne brinite o gubljenju izmjena koje ste napravili; C-x C-c vam
+nudi da snimite svaku izmijenjenu datoteku prije no ¹to izaðe iz
+Emacsa).
+
+Naredbom C-z *privremeno* izlazite iz Emacsa -- tako da se mo¾ete
+nakon nekog vremena opet vratiti u Emacs.
+
+Na sustavima koji to dozvoljavaju, C-z "suspendira" Emacs; to jest,
+vraæa se u ljusku, ali ne uni¹tava Emacs.  U veæini ljuski, mo¾ete
+nastaviti rad Emacsa naredbom `fg', ili s `%emacs'.
+
+Na sustavima koji ne podr¾avaju suspendiranje, C-z stvara podljusku
+koja radi pod Emacsom, tako da mo¾ete pokrenuti druge programe i
+naknadno se vratiti u Emacs; ona neæe zaista "izaæi" iz Emacsa.  U
+ovom sluèaju, ljuskina naredba `exit' je uobièajen naèin povratka iz
+podljuske u Emacs.
+
+Vrijeme za C-x C-c je onda kad se kanite odlogirati.  Takoðer, to je
+ispravna stvar kad je Emacs pozvan iz èitaèa po¹te, ili nekog drugog
+programa, jer se oni ne moraju znati nositi sa suspendiranjem Emacsa.
+U normalnim okolnostima, meðutim, ako se ne kanite odlogirati, bolje
+je suspendirati Emacs s C-z nego izaæi iz njega.
+
+Postoji puno C-x naredbi.  Evo spiska onih koje ste nauèili:
+
+       C-x C-f         Naði datoteku.
+       C-x C-s         Snimi datoteku.
+       C-x C-b         Popis spremnika.
+       C-x C-c         Izaði iz Emacsa.
+       C-x u           Poni¹ti zadnju naredbu.
+
+Imenovane pro¹irene naredbe su naredbe koje se jo¹ rjeðe koriste, ili
+se koriste samo unutar stanovitih modova.  Primjer je naredba
+replace-string, koja globalno zamjenjuje jedan niz drugim.  Kad
+napi¹ete M-x, Emacs æe vam dati prompt na dnu ekrana, a vi trebate
+samo napisati naziv naredbe.  U ovom sluèaju, "replace-string".  Samo
+napi¹ite "repl s<TAB>", i Emacs æe dovr¹iti ime.  Zavr¹ite naziv
+naredbe s <Return>.
+
+Naredba replace-string tra¾i dva argumenta -- niz koji se zamjenjuje,
+i niz kojim æe se zamijeniti.  Zavr¹ite svaki argument s <Return>.
+
+>> Pomaknite kursor na prazan red dva reda ispod ovoga.  Zatim
+   napi¹ite M-x repl s <Return>promijenio<Return>izmijenio<Return>.
+
+   Primijetite kako se ovaj red promijenio: zamijenili ste rijeè
+   p-r-o-m-i-j-e-n-i-o s "izmijenio" gdje god se ova pojavila, nakon
+   poèetnog polo¾aja kursora.
+
+
+* AUTOMATSKO SNIMANJE
+---------------------
+
+Kada ste promijenili datoteku, ali je jo¹ niste snimili, va¹e bi
+izmjene mogle biti izgubljene ako raèunalo padne.  Da vas za¹titi od
+ovoga, Emacs povremeno ispisuje "auto save" (automatsko snimanje)
+datoteku za svaku datoteku koju editirate.  Auto-save datoteka ima #
+na poèetku i na kraju imena; na primjer, ako se va¹a datoteka zove
+"hello.c", njezina æe se auto-save datoteka zvati "#hello.c#".  Kad
+snimite datoteku na normalan naèin, Emacs æe izbrisati njezinu
+auto-save datoteku.
+
+Ako raèunalo padne, mo¾ete obnoviti svoje automatski spremljene
+promjene tako ¹to normalno naðete datoteku, i napi¹ete
+M-x recover file <Return>.  Kad vas pita za potvrdu, upi¹ite
+yes<return> za nastavak i vratite automatski snimljene podatke.
+
+
+* PROSTOR ZA PORUKE
+-------------------
+
+Ako Emacs vidi da pi¹ete naredbe polako, pokazat æe vam ih na dnu
+ekrana na mjestu koje se zove "prostor za poruke" (eng. echo area).
+Prostor za poruke je na najni¾em redu ekrana.
+
+
+* STATUSNI RED
+--------------
+
+Red odmah iznad prostora za poruke se zove "statusni red"
+(eng. modeline).  Statusni red izgleda otprilike ovako:
+
+--**-XEmacs: TUTORIAL.hr       (Fundamental)--L670--58%----------------
+
+Ovaj red pru¾a korisne informacije o statusu Emacsa i tekstu koji
+editirate.
+
+Veæ znate ¹to je ime datoteke -- to je datoteka koju ste na¹li.
+-NN%-- predstavlja va¹ trenutni polo¾aj u tekstu; to znaèi da je NN
+postotaka teksta iznad vrha ekrana.  Ako je vrh teksta na ekranu,
+pisat æe --Top-- umjesto --00%--.  Ako je kraj teksta na ekranu, pisat 
+æe --Bot--.  Ako gledate u tako kratak tekst da sav stane na ekran, u
+statusnoj liniji æe pisati --All--.
+
+Zvjezdice na poèetku znaèe da ste napravili izmjene na tekstu.
+Neposredno po posjeti ili snimanju datoteke, taj dio statusne linije
+nema zvjezdica, veæ samo crtice.
+
+Dio statusne linije u zagradama govori u kojem se modu editiranja
+nalazite.  Podrazumijeva se Fundamentalni mod, koji trenutno koristite.
+On je primjer "glavnog moda".
+
+Emacs ima puno razlièitih glavnih modova.  Neki od njih su predviðeni
+za editiranje razlièitih jezika i/ili vrsta teksta, kao ¹to je Lisp
+mod, tekst mod, itd.  U bilo kojem trenutku jedan i samo jedan glavni
+mod je aktivan, i njegovo se ime nalazi na statusnom redu, gdje sada
+stoji "Fundamental".
+
+Svaki glavni mod èini da se nekoliko naredbi pona¹a razlièito.  Na
+primjer, postoje naredbe za stvaranje komentara u programu, a buduæi
+da svaki programski jezik ima drugaèiju predod¾bu o tome kako komentar 
+izgleda, svaki glavni mod razlièito unosi komentare.  Svaki glavni mod 
+je ime jedne pro¹irene naredbe, ¹to je i naèin kako se mo¾ete
+prebaciti u taj mod.  Na primjer, M-x fundamental-mode je naredba koja 
+vas prebacuje u Fundamental mod.
+
+Ako editirate tekst na hrvatskom, kao ¹to je ova datoteka, vjerojatno
+biste trebali koristiti tekstualni mod.
+>> Napi¹ite M-x text-mode<Return>.
+
+Ne brinite, nijedna od naredbi koje ste nauèili neæe promijeniti Emacs 
+na znaèajan naèin.  Ali mo¾ete uoèiti da M-f i M-b sad tretiraju
+apostrofe kao dio rijeèi.  U fundamentalnom modu M-f i M-b su
+tretirali apostrofe kao separatore rijeèi.
+
+Glavni modovi obièno rade suptilne izmjene poput navedene: veæina 
+naredbi rade "isti posao" u svakom glavnom modu, ali funkcioniraju s
+malom razlikom.
+
+Da biste vidjeli dokumentaciju trenutnog glavnog moda, pritisnite
+C-h m.
+
+>> Pritisnite jo¹ jednom C-u C-v da dovedete ovu liniju do vrha ekrana.
+>> Utipkajte C-h m, da vidite kako se tekstualni mod razlikuje od
+   fundamentalnog moda.
+>> Pritisnite q da uklonite dokumentaciju s ekrana.
+
+Glavni modovi se nazivaju glavnima, jer postoje jo¹ i sporedni
+modovi.  Sporedni su modovi nisu zamjena za glavne modove, veæ njihova 
+usputna modifikacija.  Svaki sporedni mod mo¾e biti ukljuèen ili
+iskljuèen za sebe, neovisno o ostalim sporednim modovima, i neovisno o 
+glavnom modu.  Tako mo¾ete ne biti niti u jednom sporednom modu, ili u 
+jednom sporednom modu, ili u kombinaciji nekoliko sporednih modova.
+
+Jedan vrlo koristan sporedni mod, naroèito za editiranje hrvatskog
+teksta, jest mod za automatsko popunjavanje (Auto Fill mode).  Kad je
+ovaj mod ukljuèen, Emacs automatski lomi linije izmeðu rijeèi kad god
+umetanjem teksta stvorite red koji je pre¹irok.
+
+Mo¾ete ukljuèiti Auto Fill mod pisanjem M-x auto-fill-mode<Return>.
+Kad je mod ukljuèen, iskljuèujete ga s M-x auto-fill-mode<Return>.
+Kad je mod iskljuèen, ova ga naredba ukljuèuje, kad je ukljuèen, ona
+ga iskljuèuje.
+
+>> Napi¹ite M-x auto-fill-mode<Return> sad.  Potom umeæite tekst "asdf "
+   dok god se red ne razdvoji na dva dijela.  Morate stavljati razmake 
+   izmeðu, jer Auto Fill lomi redove samo na razmacima.
+
+Rub je obièno postavljen na 70 znakova, ali ga mo¾ete promijeniti
+naredbom C-x f.  Rub koji ¾elite postaviti pode¹avate numerièkim
+argumentom.
+
+>> Utipkajte C-x f s argumentom 20.  (C-u 2 0 C-x f).
+   Potom upi¹ite neki tekst, i gledajte kako Emacs lomi redove dulje
+   od 20 znakova.  Tad postavite rub natrag na 70 ponovno
+   upotrijebiv¹i C-x f.
+
+Ako napravite promjene u sredini paragrafa, Auto Fill mod ga neæe
+cijelog reformatirati.
+Za preoblikovanje paragrafa, utipkajte M-q (Meta-q) s kursorom unutar
+paragrafa.
+
+>> Pomaknite kursor na prethodni paragraf, i stisnite M-q.
+
+
+* TRA®ENJE
+----------
+
+Emacs mo¾e tra¾iti nizove (grupe uzastopnih znakova ili rijeèi) bilo
+prema naprijed ili prema natrag kroz tekst.  Tra¾enje niza je naredba
+kojom se pomièe kursor; ona æe pomaknuti kursor do sljedeæeg mjesta na 
+kom se niz pojavljuje.
+
+Emacsova naredba za tra¾enje se razlikuje od sliènih naredbi veæine
+editora po tome ¹to je "postupna" (eng. incremental).  To znaèi da se 
+pretra¾ivanje odvija dok upisujete niz koji tra¾ite.
+
+Naredba kojom poèinjete naredbu je C-s za tra¾enje prema naprijed, i
+C-r za tra¾enje unatrag.  ALI ÈEKAJTE!  Nemojte ih odmah isprobati.
+
+Kad utipkate C-s, primijetit æete da se tekst "I-search" pojavljuje
+kao prompt u prostoru za poruke.  Ovo vam ka¾e da je Emacs u stanju
+postupnog tra¾enja, i da èeka da upi¹ete ¹to ¾elite tra¾iti.
+<Return> zaustavlja tra¾enje.
+
+>> Sad stisnite C-s da zapoènete pretra¾ivanje.  POLAKO, znak po znak, 
+   utipkajte rijeè `kursor', radeæi stanku izmeðu znakova da uoèite
+   ¹to se dogaða s kursorom.
+   Sad ste na¹li "kursor", jednom.
+>> Stisnite C-s opet, da naðete sljedeæe pojavljivanje "kursora".
+>> Sad stisnite <Delete> èetiri puta, i gledajte kako se kursor
+   pomièe.
+>> Stisnite <RET> da prekinete tra¾enje.
+
+Jeste li vidjeli ¹to se dogodilo?  Za vrijeme inkrementalnog tra¾enja, 
+Emacs poku¹ava otiæi na mjesto gdje se pojavljuje niz kojeg ste do sad 
+utipkali, osvjetljavajuæi ga zbog preglednosti.  Za odlazak na
+sljedeæe mjesto gdje se "kursor" pojavljuje, samo opet stisnite C-s.
+Ako ni jedno takvo mjesto ne postoji, Emacs æe se oglasiti zvuènim
+signalom i reæi vam da pretraga niju uspjela ("failing").  Pretragu
+mo¾ete prekinuti i pomoæu C-g.
+
+
+PRIMJEDBA: Na nekim sustavima, tipkanje C-s æe smrznuti sustav i vi¹e
+neæete vidjeti daljnji Emacsov output.  To pokazuje da "prednost"
+operativnog sustava zvana "kontrola toka" (eng. flow control) presreæe
+C-s i ne da mu da doðe do Emacsa.  Pritisak na C-q æe odmrznuti ekran.
+Tad pogledajte odjeljak "Spontaneous Entry to Incremental Search"
+Emacsovog manuala za savjet kako se nositi s ovom "predno¹æu".
+
+Ako za vrijeme postupnog tra¾enja pritisnete <Delete>, uoèit æete 
+da je zadnji znak niza izbrisan i da se pretraga vratila na zadnje
+mjesto.  Na primjer, pretpostavimo da ste stisnuli "k" ne bi li na¹li
+prvo pojavljivanje "k".  Ako sad stisnete "u", kursor æe se pomaknuti
+na mjesto prvog pojavljivanja "ku".  Sad stisnite <Delete>.  Ovo æe
+ukloniti "u" iz tra¾enog niza, i pomaknuti kursor natrag na prvu
+pojavu "k".
+
+Ako ste usred tra¾enja i stisnete kontrolni ili meta znak (s nekoliko
+iznimki -- znakova koji imaju posebno znaèenje pri tra¾enju, kao ¹to
+su C-s i C-r), tra¾enje se zaustavlja.
+
+C-s zapoèinje pretragu koja tra¾i bilo koju pojavu tra¾enog niza NAKON 
+trenutnog polo¾aja kursora.  Ako ¾elite tra¾iti ne¹to ¹to se
+pojavljuje ranije u tekstu, stisnite C-r.  Sve ¹to smo rekli za C-s
+vrijedi i za C-r, jedino ¹to je smjer pretrage suprotan.
+
+
+* VI©ESTRUKI PROZORI
+--------------------
+
+Jedna od lijepih stvari u Emacsu je ¹to mo¾ete prikazati vi¹e prozora
+na ekranu istovremeno.
+
+>> Dovedite kursor do ovog reda i stisnite C-u 0 C-l.
+
+>> Sad stisnite C-x 2, ¹to razdvaja ekran na dva prozora.
+   Oba prozora prikazuju ove upute.  Kursor ostaje u gornjem prozoru.
+
+>> Stisnite C-M-v da pomaknete donji prozor.
+   (Ako nemate pravu tipku Meta, stisnite ESC C-v.)
+
+>> Stisnite C-x o ("o" kao eng. "other", drugi) da pomaknete kursor u
+   donji prozor.
+>> U donjem se prozoru pomièite s C-v i M-v.
+   Nastavite èitati ove upute u gornjem prozoru.
+
+>> Opet stisnite C-x o da pomaknete kursor natrag u gornji prozor.
+   Kursor u gornjem prozoru je upravo gdje je prije bio.
+
+Mo¾ete stalno koristiti C-x o za pomicanje meðu prozorima.  Svaki
+prozor ima vlastiti polo¾aj kursora, ali samo jedan prozor zapravo
+prikazuje kursor.  Sve uobièajene naredbe za editiranja djeluju na
+prozoru u kojem je kursor.  Taj prozor nazivamo "izabrani prozor"
+(eng. selected window).
+
+Naredba C-M-v korisna je kad editirate tekst u jednom prozoru, a drugi 
+koristite za referencu.  Tada mo¾ete dr¾ati kursor uvijek u prozoru
+gdje editirate, a napredovati kroz onaj drugi s C-M-v.
+
+C-M-v je primjer CONTROL-META znaka.  Ako imate pravu tipku META,
+mo¾ete dobiti C-M-v dr¾eæi zajedno i CTRL i META, dok tipkate v.  Nema 
+veze da li je CTRL ili META "prvi", jer obje ove tipke rade
+mijenjajuæi znakove koji pi¹ete.
+
+Ako nemate pravu META tipku, a umjesto nje koristite ESC, tad je
+poredak va¾an: morate stisnuti ESC praæen s CTRL-v; CTRL-ESC v neæe
+raditi.  Razlog za ovo je ¹to je ESC tipka za sebe, a ne modifikator.
+
+>> Pritisnite C-x 1 (u gornjem prozoru) da se rije¹ite donjeg
+   prozora.
+
+(Da ste stisnuli C-x 1 u donjem prozoru, rije¹ili biste se gornjeg.
+Ovu naredbu mo¾ete shvatiti kao "Ostavi samo jedan prozor -- onaj u
+kojem veæ jesam.")
+
+Ne morate prikazivati isti spremnik u oba prozora.  Ako pritisnete C-x 
+C-f da naðete datoteku u jednom prozoru, drugi se prozor ne mijenja.
+Mo¾ete naæi datoteku u svakom prozoru neovisno o drugima.
+
+Evo jo¹ jednog naèina da upotrijebite dva prozora za prikaz dvije
+razlièite stvari:
+
+>> Utipkajte C-x 4 C-f, a zatim ime neke od va¹ih datoteka.
+   Zavr¹ite s <Return>.  Uoèite da se navedena datoteka pojavila u
+   donjem prozoru, a takoðer i kursor.
+
+>> Pritisnite C-x o za povrat u gornji prozor, i C-x 1 da uklonite
+   donji.
+
+
+* REKURZIVNE RAZINE EDITIRANJA
+------------------------------
+
+Ponekad æete po¾eljeti uæi u ono ¹to se zove "rekurzivna razina
+editiranja" (eng. recursive editing level).  Ovo je naznaèeno uglatim
+zagradama u statusnom redu, koje okru¾uju okrugle zagrade oko naziva
+moda.  Na primjer, vidjeli biste [(Fundamental)] umjesto
+(Fundamental).
+
+Za izlazak iz rekurzivnog editiranja, pritisnite ESC ESC ESC.  To je
+vi¹enamjenska naredba za "izlazak".  Mo¾ete je koristiti i za
+uklanjanje dodatnih prozora, kao i za izlazak iz minispremnika.
+
+>> Stisnite M-x za ulazak u minispremnik; potom utipkajte ESC ESC ESC
+   za izlaz.
+
+Iz rekurzivne razine editiranja ne mo¾ete izaæi s C-g.  To je zato ¹to 
+se C-g koristi za otkazivanje naredbi i argumenata UNUTAR te razine
+editiranja.
+
+
+* DODATNA POMOÆ
+---------------
+
+U ovim smo uputama poku¹ali dati upravo toliko informacija da mo¾ete
+poèeti koristiti Emacs.  Toliko je toga prisutno u Emacsu da bi bilo
+nemoguæe sve to ovdje objasniti.  Meðutim, mo¾da po¾elite nauèiti vi¹e 
+o Emacsu, jer on ima jo¹ puno korisnih prednosti.  Emacs ima naredbe
+za èitanje dokumentacije o Emacsovim naredbama.  Ove naredbe "pomoæi"
+sve poèinju sa znakom Control-h, koji se zove "znak za pomoæ"
+(eng. the Help character).
+
+Za kori¹tenje naredbi pomoæi, stisnite znak C-h, praæen znakom koji
+ka¾e koju vrstu pomoæi ¾elite.  Ako ste ZAISTA izgubljeni, stisnite
+C-h ? i Emacs æe vam reæi koje vrste pomoæi mo¾e dati.  Ako stisnete
+C-h, ali se predomislite, samo pritisnite C-g za otkaz pomoæi.
+
+(Na nekim je sistemima promijenjeno znaèenje C-h.  Ovo se zaista ne bi
+smjelo raditi, pa se po¾alite sistemskom administratoru.  U meðuvremenu,
+ako C-h ne prikazuje poruku o pomoæi na dnu ekrana, poku¹ajte upisati
+M-x help RET umjesto toga.)
+
+Osnovna naredba pomoæi je C-h c.  Napi¹ite C-h, potom c, i znak ili
+niz znakova, i Emacs æe pokazati vrlo kratak opis naredbe.
+
+>> Stisnite C-h c Control-p.
+  Poruka bi trebala biti poput:
+
+       C-p runs the command previous-line
+
+       (C-p pokreæe naredbu previous-line)
+
+Ovo vam ka¾e "ime funkcije".  Imena funkcija se koriste uglavnom za
+mijenjanje i pro¹irivanje Emacsa.  Ali buduæi da se imena funkcija
+biraju tako da pokazuju ¹to naredba radi, ona mogu poslu¾iti i kao
+vrlo kratka dokumentacija -- dovoljna da vas podsjeti na naredbu koju
+veæ znate.
+
+Vi¹e-znakovne naredbe kao ¹to su C-x C-s i (ako nemate tipku META,
+EDIT ili ALT) <ESC>v su takoðer dozvoljene nakon C-h c.
+
+Za vi¹e podataka o naredbi, pritisnite C-h k umjesto C-h c.
+
+>> Stisnite C-h k Control-p.
+
+Osim imena, sad vidite i dokumentaciju funkcije u Emacsovom prozoru.
+Kad zavr¹ite s èitanjem ispisa, stisnite q da se rije¹ite teksta.
+
+Evo nekoliko korisnih moguænosti C-h:
+
+   C-h f       Opi¹i funkciju.  Upi¹ete ime funkcije.
+
+>> Poku¹ajte stisnuti C-h f previous-line<Return>.
+   Ovo æe ispisati sve ¹to Emacs zna o funkciji koja implementira
+   naredbu C-p.
+
+   C-h a       Hiper Apropos.  Upi¹ite rijeè, i Emacs æe popisati sve
+               funkcije i varijable èija imena sadr¾e rijeè.  Naredbe 
+               koje se mogu izvr¹iti s Meta-x bit æe oznaèene
+               zvjezdicom slijeva.
+
+>> Utipkajte C-h a newline<Return>.
+
+Ovo prikazuje hipertekstualni spisak svih funkcija i varijabli s
+"newline" u imenima.  Stisnite <Return>, ili pritisnite srednju tipku
+mi¹a da saznate vi¹e o funkciji ili varijabli.  Stisnite `q' za izlaz
+iz hiper-aproposa.
+
+
+* ZAKLJUÈAK
+-----------
+
+Upamtite, za trajan izlaz iz Emacsa stisnite C-x C-c.  Za privremeni
+izlaz u ljusku upotrijebite C-z.  (pod X-ima, ovo ikonizira trenutni
+Emacsov okvir.)
+
+Ove upute su predviðene da budu razumljive svim novim korisnicima, pa
+ako vam je ne¹to ovdje nejasno, nemojte sjediti i kriviti sebe -
+¾alite se!
+
+
+KOPIRANJE
+---------
+
+Ove upute potjeèu iz duge loze Emacsovih uputa, poèev¹i od onih koje
+je napisao Stuart Cracraft za izvorni Emacs.  Ben Wing je dopisao
+poglavlje o X Windowsima.  Martin Buchholz i Hrvoje Nik¹iæ su dodali
+jo¹ ispravki vezanih uz XEmacs.
+
+Na Hrvatski preveo Hrvoje Nik¹iæ, uz dodatnu lekturu Denisa Pleiæa.
+
+Ova verzija uputa je, kao i GNU Emacs, pod autorskim pravima, i dolazi 
+s dozvolom redistribuiranja uz sljedeæe uvjete:
+
+(c) 1985, 1996 Free Software Foundation, sva prava zadr¾ana.
+
+   Svakome je dozvoljeno praviti ili distribuirati nepromijenjene
+   kopije ovog dokumenta, na bilo kojem mediju, uz uvjet da su
+   saèuvane poruka o autorskim pravima i dozvolama, i da distributer
+   daje drugima prava za daljnju redistribuciju, kako ovdje pi¹e.
+
+   Dozvoljena je distribucija izmijenjenih verzija ovog dokumenta ili
+   njegovih djelova, pod gore navedenim uvjetima, uz dodatni uvjet da
+   sadr¾i obavijest o zadnjoj promjeni.
+
+Uvjeti kopiranja samog Emacsa su slo¾eniji, ali u istom duhu.  Molimo
+vas da proèitate datoteku COPYING, i da podijelite kopije GNU Emacsa
+svojim prijateljima.  Pomozite nam zgaziti opstrukcionizam
+("vlasni¹tvo") nad softverom koristeæi, pi¹uæi i dijeleæi slobodan
+softver!
+
+
+This tutorial descends from a long line of Emacs tutorials
+starting with the one written by Stuart Cracraft for the original Emacs.
+Ben Wing updated the tutorial for X Windows.  Martin Buchholz and
+Hrvoje Niksic added more corrections for XEmacs.
+
+This version of the tutorial, like GNU Emacs, is copyrighted, and
+comes with permission to distribute copies on certain conditions:
+
+Copyright (c) 1985, 1996 Free Software Foundation
+
+   Permission is granted to anyone to make or distribute verbatim copies
+   of this document as received, in any medium, provided that the
+   copyright notice and permission notice are preserved,
+   and that the distributor grants the recipient permission
+   for further redistribution as permitted by this notice.
+
+   Permission is granted to distribute modified versions
+   of this document, or of portions of it,
+   under the above conditions, provided also that they
+   carry prominent notices stating who last altered them.
+
+The conditions for copying Emacs itself are more complex, but in the
+same spirit.  Please read the file COPYING and then do give copies of
+GNU Emacs to your friends.  Help stamp out software obstructionism
+("ownership") by using, writing, and sharing free software!
diff --git a/etc/TUTORIAL.ja b/etc/TUTORIAL.ja
new file mode 100644 (file)
index 0000000..e7cfc57
--- /dev/null
@@ -0,0 +1,741 @@
+                      ==============================
+                      \e$BF|K\8l\e(B GNUEMACS(Mule) \e$BF~LgJT\e(B
+                      ==============================
+
+\e$BCm0U!'\e(B          \e$B$3$NF~LgJT$O!"!V=,$&$h$j47$l$m!W$r%b%C%H!<$K:n@.$5$l$F$$$^\e(B
+               \e$B$9!#\e(B">>" \e$B$+$i;O$^$k9T$O!"$=$N;~2?$r$9$Y$-$+$r;X<($7$F$$$^$9!#\e(B
+
+
+     Mule \e$B$N%3%^%s%I$rF~NO$9$k$H$-$K$O!"0lHLE*$K%3%s%H%m!<%k!&%-!<!J%-!<!&\e(B
+\e$B%H%C%W$K!"\e(BCTRL \e$B$"$k$$$O!"\e(BCTL \e$B$H=q$$$F$"$k!K$d%a%?!&%-!<!JIaDL!"%(%9%1!<%W!&\e(B
+\e$B%-!<$r;H$&!K$,;H$o$l$^$9!#$=$3$G!"\e(BCONTROL \e$B$H$+\e(B META \e$B$H$+=q$/Be$o$j$K!"<!$N\e(B
+\e$B$h$&$J5-9f$r;H$&$3$H$K$7$^$9!#\e(B
+
+C-<\e$BJ8;z\e(B>       \e$B%3%s%H%m!<%k!&%-!<$r2!$7$?$^$^!"\e(B<\e$BJ8;z\e(B>\e$B%-!<$r2!$7$^$9!#Nc$($P!"\e(B
+               C-f  \e$B$O!"%3%s%H%m!<%k!&%-!<$r2!$7$J$,$i\e(B f \e$B$N%-!<$r2!$9$3$H$r\e(B
+               \e$B0UL#$7$^$9!#\e(B
+<<Blank lines inserted here by startup of help-with-tutorial>>
+       >> \e$B$=$l$G$O!"\e(BC-v\e$B!J\e(BView Next Screen; \e$B<!$N2hLL$r8+$k!K$r%?%$%W$7$F\e(B
+          \e$B$_$F2<$5$$!#<!$N2hLL$K?J$`$3$H$,$G$-$^$9!#\e(B
+         \e$B0J9_!"0l2hLL$rFI$_=*$($k$?$S$KF1MM$K$7$F<!$N2hLL$KFI$_?J$s$G\e(B
+         \e$B2<$5$$!#\e(B
+
+ESC <\e$BJ8;z\e(B>     \e$B%(%9%1!<%W!&%-!<$r2!$7$F$+$iN%$7!"$=$l$+$i\e(B<\e$BJ8;z\e(B>\e$B%-!<$r2!$7$^\e(B
+               \e$B$9!#\e(B
+
+\e$BCm0U!'\e(B         <\e$BJ8;z\e(B>\e$B$O!"BgJ8;z$G$b>.J8;z$G$b%3%^%s%I$H$7$F$OF1$80UL#$K$J$j\e(B
+               \e$B$^$9!#%a%?%-!<$,;H$($k$J$i$P\e(B ESC <\e$BJ8;z\e(B> \e$B$NBe$o$j$K\e(B M-<\e$BJ8;z\e(B>
+              (\e$B%a%?%-!<$r2!$7$?$^$^\e(B<\e$BJ8;z\e(B>\e$B%-!<$r2!$9\e(B) \e$B$,;H$($^$9!#\e(B
+
+\e$B=EMW$G$9!'\e(B     Emacs\e$B$r=*N;$5$;$?$$;~$O!"\e(BC-x C-c \e$B$r%?%$%W$7$^$9!#\e(BEmacs\e$B$r\e(Bcsh
+               \e$B$+$i5/F0$7$F$$$k>l9g!"%5%9%Z%s%I$9$k!J0l;~E*$K;_$a$k\e(B)\e$B$3$H$,\e(B
+               \e$B=PMh$^$9!#\e(BEmacs\e$B$r%5%9%Z%s%I$9$k$K$O!"\e(BC-z\e$B$r%?%$%W$7$^$9!#\e(B
+
+
+     \e$B$5$F!"$3$l$+$i$O!"0l2hLLJ,FI$_=*$($?$i!"\e(BC-v  \e$B$rF~NO$7$F9T$C$F2<$5$$!#\e(B
+
+     \e$BA0$N2hLL$H<!$N2hLL$H$G$O!"I=<($5$l$kFbMF$K2?9TJ8$+$N=E$J$j$,$"$j$^$9!#\e(B
+\e$B$3$l$O!"I=<($5$l$F$$$kFbMF$,O"B3$7$F$$$k$3$H$,$9$0H=$k$h$&$K$9$k$?$a$G$9!#\e(B
+
+
+     \e$B$^$:$O!"%U%!%$%k$NCf$r0\F0$7$F9T$/J}K!$rCN$kI,MW$,$"$j$^$9!#\e(BC-v  \e$B$K$h\e(B
+\e$B$C$F@h$K?J$`$3$H$O$b$&H=$j$^$7$?!#85$KLa$k$K$O!"\e(BESC v \e$B$r%?%$%W$7$^$9!#\e(B
+
+      >> ESC v \e$B$H\e(B C-v  \e$B$r;H$C$F!"A08e$K0\F0$9$k$3$H$r2?2s$+;n$7$F$_$J$5$$!#\e(B
+
+\e$BMWLs\e(B
+====
+     \e$B%U%!%$%k$r2hLLKh$K8+$F9T$/$K$O!"<!$N%3%^%s%I$r;H$$$^$9!#\e(B
+
+     C-v     \e$BA0$K0l2hLLJ,?J$`\e(B
+     ESC v   \e$B8e$m$K0l2hLLJ,La$k\e(B
+     C-l     \e$B2hLL$r=q$-D>$9!#$3$N$H$-!"85%+!<%=%k$N$"$C$?9T$,\e(B
+             \e$B2hLL$NCf1{$K$/$k$h$&$K$9$k\e(B
+
+       >> \e$B:#%+!<%=%k$,$I$3$K$"$k$+!"$=$N6a$/$K$I$s$J%F%-%9%H$,=q$+$l$F$$$k\e(B
+          \e$B$+$r3P$($J$5$$!#\e(BC-l  \e$B$r%?%$%W$7!"%+!<%=%k$,$I$3$K0\F0$7$?$+!"$=$N\e(B
+          \e$B6a$/$N%F%-%9%H$O$I$&$J$C$?$+$rD4$Y$F$_$J$5$$!#\e(B
+
+\e$B4pK\E*$J%+!<%=%k$N@)8f\e(B
+======================
+
+     \e$B2hLLKh$N0\F0$O$G$-$k$h$&$K$J$j$^$7$?!#:#EY$O!"2hLL$NCf$G!"FCDj$N>l=j$K\e(B
+\e$B0\F0$9$k$?$a$NJ}K!$r21$($^$7$g$&!#$3$l$K$O$$$/$D$+$N$d$jJ}$,$"$j$^$9!#0l$D\e(B
+\e$B$NJ}K!$O!"A0\e(B(previous)\e$B<!\e(B(next)\e$B@h\e(B(forward)\e$B8e\e(B(backward)\e$B$K0\F0$9$k%3%^%s%I$r;H\e(B
+\e$B$&$3$H$G$9!#$3$l$i$N%3%^%s%I$O$=$l$>$l!"\e(BC-p,  C-n, C-f,C-b \e$B$K3d$jEv$F$i$l$F\e(B
+\e$B$*$j!"8=:_$N>l=j$+$i?7$7$$>l=j$K%+!<%=%k$r0\F0$5$;$^$9!#?^$G=q$1$P!"\e(B
+
+
+                               \e$BA0$N9T!$\e(BC-p
+                                    :
+                                    :
+     \e$B8e$NJ8;z!$\e(BC-b   ....   \e$B8=:_$N%+!<%=%k0LCV\e(B   ....   \e$B@h$NJ8;z!$\e(BC-f
+                                    :
+                                    :
+                               \e$B<!$N9T!$\e(BC-n
+
+
+     \e$B$3$l$i$O!"$=$l$>$l!"\e(BPrevious, Next, Backward, Forward \e$B$NF,J8;z$K$J$C$F\e(B
+\e$B$$$k$N$G!"21$($d$9$$$G$7$g$&!#$3$l$i$O!"4pK\E*$J%+!<%=%k0\F0%3%^%s%I$G$"$j!"\e(B
+\e$B$$$D$G$b;H$&$b$N$G$9!#\e(B
+
+       >> C-n \e$B$r2?2s$+%?%$%W$7!"!J:#!"$"$J$?$,FI$s$G$$$k!K$3$N9T$^$G%+!<%=\e(B
+          \e$B%k$r0\F0$5$;$J$5$$!#\e(B
+
+       >> C-f  \e$B$r;H$C$F9T$NCf$[$I$K0\F0$7!"\e(BC-p  \e$B$G2?9T$+>e$K0\F0$7$F$_$J$5\e(B
+          \e$B$$!#%+!<%=%k$N0LCV$NJQ2=$KCm0U$7$J$5$$!#\e(B
+
+       >> \e$B9T$N@hF,$G\e(B C-b \e$B$r%?%$%W$7$F$_$J$5$$!#%+!<%=%k$O$I$3$K0\F0$7$^$9$+\e(B
+          \e$B!)$5$i$K$b$&>/$7\e(B C-b \e$B$r%?%$%W$7!":#EY$O\e(B C-f  \e$B$G9TKv$NJ}$KLa$j$J$5\e(B
+          \e$B$$!#%+!<%=%k$,9TKv$r1[$($k$H$I$&$J$j$^$9$+!)\e(B
+
+
+     \e$B2hLL$N@hF,$dKvHx$r1[$($F%+!<%=%k$r0\F0$5$;$h$&$H$9$k$H!"$=$NJ}8~$K$"$k\e(B
+\e$B%F%-%9%H$,0\F0$7$FMh$F!"%+!<%=%k$O>o$K2hLLFb$K$"$k$h$&$K$5$l$^$9!#\e(B
+
+       >> C-n \e$B$r;H$C$F!"%+!<%=%k$r2hLL$N2<C<$h$j2<$K0\F0$5$;$F$_$J$5$$!#2?\e(B
+          \e$B$,5/$3$j$^$7$?$+!)%+!<%=%k$N0LCV$O$I$&JQ$j$^$7$?$+!)\e(B
+
+     \e$B0lJ8;zC10L$N0\F0$G$O$^$I$m$C$3$7$$$H;W$&$J$i!"C18lC10L$G0\F0$9$k$3$H$b\e(B
+\e$B$G$-$^$9!#\e(BESC f \e$B$G0lC18lJ,@h$K?J$_!"\e(BESC b \e$B$G0lC18lJ,A0$KLa$j$^$9!#\e(B
+
+\e$BCm0U!'\e(B           \e$BF|K\8l$K$D$$$F$O!"C18l$N@Z$lL\$rG'<1$9$k$3$H$O$G$-$^$;$s$,!"\e(B
+               \e$B5?;wE*$JJ8@a$rC18l$N@Z$lL\$H$7$F$$$^$9!#\e(B
+
+       >> ESC f \e$B$d\e(B ESC b \e$B$r2?2s$+%?%$%W$7$F$_$J$5$$!#\e(BC-f \e$B$d\e(B C-b \e$B$HJ;MQ$7$F\e(B
+          \e$B$_$J$5$$!#\e(B
+
+     C-f  \e$B$d\e(B C-b \e$B$KBP$9$k!"\e(BESC f \e$B$d\e(B ESC b \e$B$NN`;w@-$KCmL\$7$^$7$g$&!#B?$/$N\e(B
+\e$B>l9g!"\e(BESC  <\e$BJ8;z\e(B>\e$B$OJ8=q4X78$N=hM}$K;H$o$l!"0lJ}\e(BC-<\e$BJ8;z\e(B>\e$B$O$=$l$h$j$b$b$C$H4p\e(B
+\e$BK\E*$JBP>]!JJ8;z$H$+9T$H$+!K$KBP$9$kA`:n$K;H$o$l$^$9!#\e(B
+
+     C-a \e$B$H\e(B C-e \e$B$bCN$C$F$$$FJXMx$J%3%^%s%I$G$9!#\e(BC-a \e$B$O%+!<%=%k$r9T$N@hF,$K\e(B
+\e$B0\F0$5$;!"\e(BC-e \e$B$O9T$NKvHx$K0\F0$5$;$^$9!#\e(B
+
+
+       >> C-a \e$B$r#22s!"$=$l$+$i\e(B C-e \e$B$r#22sF~NO$7$F$_$J$5$$!#$3$l$i$N%3%^%s%I\e(B
+          \e$B$r#22s0J>e7+JV$7$F$b!"%+!<%=%k$O$=$l0J>e0\F0$7$J$$$3$H$KCm0U!#\e(B
+
+     \e$B$"$HFs$D!"4JC1$J%+!<%=%k0\F0%3%^%s%I$,$"$j$^$9!#%U%!%$%k$N@hF,$K0\F0$9\e(B
+\e$B$k\e(B ESC < \e$B$H!"%U%!%$%k$NKvHx$K0\F0$9$k\e(B ESC > \e$B$G$9!#\e(B
+
+     \e$B%F%-%9%HCf$G%+!<%=%k$NB8:_$9$k0LCV$r!V%]%$%s%H!W$H8F$S$^$9!#8@$$$+$($l\e(B
+\e$B$P!"%+!<%=%k$O!"%F%-%9%H$N$I$3$K%]%$%s%H$,$"$k$+$r2hLL>e$G<($7$F$$$k$N$G$9!#\e(B
+
+     \e$B0J2<$KC1=c$J0\F0A`:n$K$D$$$FMWLs$7$^$9!#$3$N$J$+$K$O!"C18l$d9TC10L$G$N\e(B
+\e$B0\F0%3%^%s%I$b4^$^$l$F$$$^$9!#\e(B
+
+     C-f     \e$B0lJ8;z@h$K?J$`\e(B
+     C-b     \e$B0lJ8;z8e$KLa$k\e(B
+
+     ESC f   \e$B0lC18l@h$K?J$`\e(B
+     ESC b   \e$B0lC18l8e$KLa$k\e(B
+
+     C-n     \e$B<!$N9T$K0\F0\e(B
+     C-p     \e$BA0$N9T$K0\F0\e(B
+
+     ESC ]   \e$BCJMn$N=*$o$j$K0\F0\e(B
+     ESC [   \e$BCJMn$N@hF,$K0\F0\e(B
+
+     C-a     \e$B9T$N:G=i$K0\F0\e(B
+     C-e     \e$B9T$N:G8e$K0\F0\e(B
+
+     ESC <   \e$B%U%!%$%k$N:G=i$K0\F0\e(B
+     ESC >   \e$B%U%!%$%k$N:G8e$K0\F0\e(B
+
+       >> \e$B3F!9$N%3%^%s%I$r;n$7$F$_$J$5$$!#$3$l$i$N%3%^%s%I$O!":G$b$7$P$7$P\e(B
+          \e$B;H$o$l$k$b$N$G$9!#:G8e$NFs$D$G$O!"$3$N>l=j$H$ON%$l$?$H$3$m$K0\F0\e(B
+          \e$B$9$k$N$G!"\e(B C-v  \e$B$d\e(B ESC v \e$B$r;H$C$F$3$3$KLa$C$FMh$k$h$&$K$7$J$5$$!#\e(B
+
+     Emacs\e$B$NB>$N%3%^%s%I$HF1MM$K!"$3$l$i$N%3%^%s%I$K$O!"7+$jJV$7$N2s?t$r;X\e(B
+\e$BDj$9$k0z?t\e(B  \e$B$rM?$($k$3$H$,$G$-$^$9!#$=$N$?$a$K$O!"%3%^%s%I$rF~NO$9$kA0$K!"\e(B
+C-u\e$B$KB3$$$F7+$jJV$92s?t$rF~NO$7$^$9!#\e(B
+
+     \e$BNc$($P!"\e(BC-u 8 C-f  \e$B$H$9$k$H!"#8J8;zJ,@h$K0\F0$7$^$9!#\e(B
+
+       >> C-n \e$B$"$k$$$O\e(B C-p  \e$B$KE,Ev$J0z?t$r;XDj$7$F!"0l2s$N0\F0$G$J$k$Y$/$3\e(B
+          \e$B$N9T$N6a$/$KMh$k$h$&$K$7$F$_$J$5$$!#\e(B
+
+     C-v \e$B$d\e(B ESC v \e$B$K$D$$$F$O>/$70c$$$^$9!#$3$N>l9g!";XDj$5$l$??t$N9T$@$12h\e(B
+\e$BLL$r0\F0$9$k$3$H$K$J$j$^$9!#\e(B
+
+       >> C-u 3 C-v  \e$B$HF~NO$7$F$_$J$5$$!#\e(B
+
+     \e$B85$KLa$k$K$O!"\e(BC-u 3 ESC v \e$B$r;H$($P$h$$$N$G$9!#\e(B
+
+\e$BCf;_%3%^%s%I\e(B
+============
+
+     C-g  \e$B$H$$$&%3%^%s%I$G!"F~NO$rI,MW$H$9$k$h$&$J%3%^%s%I$rCf;_$9$k$3$H$,\e(B
+\e$B$G$-$^$9!#Nc$($P!"0z?t$rF~NO$7$F$$$kESCf$d!"#2$D0J>e$N%-!<F~NO$rI,MW$H$9$k\e(B
+\e$B%3%^%s%I$rF~NO$7$F$$$k:GCf$K!"$=$l$r$d$a$?$/$J$C$?$i!"\e(BC-g  \e$B$r;H$($PNI$$$N$G\e(B
+\e$B$9!#\e(B
+
+       >> C-u 100 \e$B$r%?%$%W$7$F0z?t$r#1#0#0$K@_Dj$7!"\e(BC-g  \e$B$r%?%$%W$7$J$5$$!#\e(B
+          \e$B$=$N$"$H$G\e(B  C-f  \e$B$r%?%$%W$7$F$_$J$5$$!#2?J8;z0\F0$7$^$7$?$+!)$b$7\e(B
+          \e$B4V0c$C$F\e(B ESC \e$B$rF~NO$7$F$7$^$C$?;~$b!"\e(BC-g  \e$B$rF~NO$9$l$P<h$j>C$;$^\e(B
+          \e$B$9!#\e(B
+
+\e$B%(%i!<\e(B
+======
+
+     \e$B;~$K$O!"\e(BEmacs\e$B$G5v$5$l$F$$$J$$A`:n$r$7$F$7$^$&$3$H$,$"$j$^$9!#Nc$($P!"\e(B
+\e$B%3%^%s%I$NDj5A$5$l$F$$$J$$%3%s%H%m!<%k!&%-!<$rF~NO$7$F$7$^$C$?;~$K$O!"\e(BEmacs
+\e$B$O%Y%k$rLD$i$7!"$5$i$K!"2hLL$N0lHV2<$K!"2?$,0-$+$C$?$+$rI=<($7$^$9!#\e(B
+
+     Emacs\e$B$N%P!<%8%g%s$K$h$C$F$O!"$3$NF~LgJT$K=q$+$l$F$$$k$3$H$r<B9T$G$-$J\e(B
+\e$B$$>l9g$,$"$jF@$^$9!#$=$NMM$J>l9g$K$O!"%(%i!<%a%C%;!<%8$,I=<($5$l$^$9$+$i!"\e(B
+\e$B2?$+%+!<%=%k0\F0%-!<$r2!$7$F!"$=$N<!$NItJ,$K?J$s$G2<$5$$!#\e(B
+
+\e$B%&%#%s%I%&\e(B
+==========
+
+     Emacs\e$B$O4v$D$b$N%&%#%s%I%&$r;}$D$3$H$H!"$=$N$=$l$>$l$KBP$7$F%F%-%9%H$r\e(B
+\e$BI=<($9$k$3$H$,$G$-$^$9!#%X%k%W$d!"4v$D$+$N%3%^%s%I$+$i$N=PNO$rI=<($9$k$?$a\e(B
+\e$B$K8=$l$?M>J,$J%&%#%s%I%&$r>C$9$?$a$K!"<!$N%3%^%s%I$rCN$kI,MW$,$"$j$^$9!#\e(B
+
+     C-x 1             \e$B%&%#%s%I%&$r#1$D$K$9$k!#\e(B
+
+     C-x 1 \e$B$O!"B>$N%&%#%s%I%&$r>C$7$F!"%+!<%=%k$N$"$k%&%#%s%I%&$r!"2hLLA4BN\e(B
+\e$B$K9-$2$^$9!#\e(B
+
+       >> \e$B%+!<%=%k$r$3$N9T$K;}$C$F$-$F!"\e(BC-u 0 C-l \e$B$H%?%$%W$7$^$9!#\e(B
+
+       >> C-h k C-f \e$B$H%?%$%W$7$J$5$$!#?7$7$$%&%#%s%I%&$,\e(B C-f \e$B%3%^%s%I$N%I%-\e(B
+          \e$B%e%a%s%H$rI=<($9$k$?$a$K8=$l$k$HF1;~$K!"$3$N%&%#%s%I%&$,$I$N$h$&\e(B
+          \e$B$K=L$`$+$r4Q;!$7$J$5$$!#\e(B
+
+       >> C-x 1\e$B$H%?%$%W$7$F!"%I%-%e%a%s%H$N8=$o$l$F$$$?%&%#%s%I%&$r>C$7$J$5\e(B
+          \e$B$$!#\e(B
+
+\e$BA^F~$H:o=|\e(B
+==========
+
+     \e$B%F%-%9%H$r%?%$%W$7$?$1$l$P!"C1$K$=$l$r%?%$%W$9$k$@$1$G9=$$$^$;$s!#L\$K\e(B
+\e$B8+$($kJ8;z!J\e(B'A','7','*','\e$B$"\e(B'\e$B$J$I!K$O\e(BEmacs\e$B$K$h$C$F%F%-%9%H$G$"$k$H$_$J$5$l!"\e(B
+\e$B$=$N$^$^A^F~$5$l$^$9!#9T$N=*$o$j$O2~9TJ8;z$GI=$5$l!"$3$l$rF~NO$9$k$K$O\e(B
+<Return> \e$B$r%?%$%W$7$^$9!#\e(B
+
+     \e$BD>A0$KF~NO$7$?J8;z$r:o=|$9$k$K$O!"\e(B<Delete> \e$B$rF~NO$7$^$9!#\e(B<Delete> \e$B$O!"\e(B
+\e$B%-!<%\!<%I$G!V\e(BDelete\e$B!W$H=q$$$F$"$k%-!<$r2!$7$FF~NO$7$^$9!#!V\e(BDelete\e$B!W$N$+$o\e(B
+\e$B$j$K!V\e(BRubout\e$B!W$H=q$$$F$"$k$+$bCN$l$^$;$s!#$h$j0lHLE*$K$O!"\e(B<Delete> \e$B$O!"8=:_\e(B
+\e$B%+!<%=%k$N$"$k0LCV$ND>A0$NJ8;z$r:o=|$7$^$9!#\e(B
+
+       >> \e$BJ8;z$r$$$/$D$+%?%$%W$7!"$=$l$+$i$=$l$i$r\e(B <Delete> \e$B$r;H$C$F:o=|$7\e(B
+          \e$B$J$5$$!#\e(B
+
+       >> \e$B1&%^!<%8%s$r1[$($k$^$G%F%-%9%H$r%?%$%W$7$J$5$$!#%F%-%9%H$,0l9T$N\e(B
+          \e$BI}0J>e$KD9$/$J$k$H!"$=$N9T$O2hLL$+$i$O$_=P$7$F!V7QB3!W$5$l$^$9!#\e(B
+          \e$B1&C<$K$"$k\e(B'\'\e$B5-9f$O!"$=$N9T$,7QB3$5$l$F$$$k$3$H$rI=$7$F$$$^$9!#\e(B
+          Emacs\e$B$O!"8=:_JT=8Cf$N0LCV$,8+$($k$h$&$K9T$r%9%/%m!<%k$7$^$9!#2hLL\e(B
+          \e$B$N1&$"$k$$$O:8$NC<$K$"$k\e(B'\'\e$B5-9f$O!"$=$NJ}8~$K9T$,$^$@B3$$$F$$$k$3\e(B
+          \e$B$H$rI=$7$F$$$^$9!#\e(B
+
+     \e$B$3$l$O!"J8>O$G@bL@$9$k$h$j<B:]$K$d$C$?J}$,$h$/H=$k$G$7$g$&!#\e(B
+
+       >> \e$B@h$[$IF~NO$7$?!"7QB3$5$l$?9T$N>e$K%+!<%=%k$r$b$C$F$$$-!"\e(BC-d \e$B$G%F\e(B
+          \e$B%-%9%H$r:o=|$7$F!"%F%-%9%H$,0l9T$K<}$^$k$h$&$K$7$F$_$J$5$$!#7QB3\e(B
+          \e$B$rI=$9\e(B'\'\e$B5-9f$O>C$($^$7$?$M!#\e(B
+
+       >> \e$B%+!<%=%k$r9T$N@hF,$K0\F0$7!"\e(B<Delete> \e$B$rF~NO$7$J$5$$!#$3$l$O$=$N9T\e(B
+          \e$B$ND>A0$N9T6g@Z$j$r:o=|$9$k$N$G!"$=$N9T$,A0$N9T$H$D$J$,$C$F$7$^$$\e(B
+          \e$B$^$9!#$D$J$,$C$?9T$,2hLL$NI}$h$jD9$/$J$k$H!"7QB3$NI=<($,$5$l$k$G\e(B
+          \e$B$7$g$&!#\e(B
+
+       >> <Return> \e$B$r2!$7$F!"$b$&0lEY9T6g@Z$j$rA^F~$7$J$5$$!#\e(B
+
+     Emacs\e$B$N$[$H$s$I$N%3%^%s%I$O!"7+$jJV$7$N2s?t$rM?$($k$3$H$,$G$-$^$9!#$3\e(B
+\e$B$N$3$H$O!"J8;z$NA^F~$K$D$$$F$bEv$F$O$^$j$^$9!#\e(B
+
+       >> C-u 8 * \e$B$HF~NO$7$F$_$J$5$$!#$I$&$J$j$^$7$?$+!#\e(B
+
+     \e$BFs$D$N9T$N4V$K6uGr9T$r:n$j$?$$>l9g$K$O!"FsHVL\$N9T$N@hF,$K9T$-!"\e(BC-o \e$B$r\e(B
+\e$BF~NO$7$^$9!#\e(B
+
+       >> \e$BE,Ev$J9T$N@hF,$K9T$-!"$=$3$G\e(B C-o \e$B$rF~NO$7$F$_$J$5$$!#\e(B
+
+     \e$B$3$l$G!"\e(BEmacs\e$B$G!"%F%-%9%H$rF~NO$7!"$^$?4V0c$$$r=$@5$9$k$b$C$H$b4pK\E*\e(B
+\e$B$JJ}K!$r3X$s$@$3$H$K$J$j$^$9!#J8;z$HF1$8MM$K!"C18l$d9T$b:o=|$9$k$3$H$,$G$-\e(B
+\e$B$^$9!#:o=|A`:n$K$D$$$FMWLs$9$k$H<!$N$h$&$K$J$j$^$9!#\e(B
+
+     <Delete>       \e$B%+!<%=%k$ND>A0$NJ8;z$r:o=|\e(B
+     C-d            \e$B%+!<%=%k$N$"$kJ8;z$r:o=|\e(B
+
+     ESC <Delete>   \e$B%+!<%=%k$ND>A0$NC18l$r:o=|\e(B
+     ESC d          \e$B%+!<%=%k0LCV0J9_$K$"$kC18l$r:o=|\e(B
+
+     C-k            \e$B%+!<%=%k0LCV$+$i9TKv$^$G$r:o=|\e(B
+
+     \e$B2?$+$r:o=|$7$?8e$G!"$=$l$r85$KLa$7$?$/$J$k$3$H$,$"$j$^$9!#\e(BEmacs\e$B$O!"0l\e(B
+\e$BJ8;z$h$j$bBg$-$$C10L$G:o=|$r9T$C$?;~$K$O!":o=|$7$?FbMF$rJ]B8$7$F$*$-$^$9!#\e(B
+\e$B85$KLa$9$K$O!"\e(BC-y \e$B$r;H$$$^$9!#Cm0U$7$?$$$N$O!"\e(BC-y \e$B$r:o=|$r9T$C$?>l=j$@$1$G\e(B
+\e$B$O$J$/!"$I$3$K$G$b=PMh$k$3$H$G$9!#\e(BC-y  \e$B$O!"J]B8$5$l$?%F%-%9%H$r8=:_%+!<%=%k\e(B
+\e$B$N$"$k>l=j$KA^F~$9$k$?$a$N%3%^%s%I$G$9$+$i!"$3$l$r;H$C$F%F%-%9%H$N0\F0$r9T\e(B
+\e$B$&$3$H$,$G$-$^$9!#\e(B
+
+     \e$B:o=|$r9T$&%3%^%s%I$K$O!"\e(B"Delete" \e$B%3%^%s%I$H!"\e(B"Kill" \e$B%3%^%s%I$H$,$"$j$^\e(B
+\e$B$9!#\e(B"Kill"  \e$B%3%^%s%I$G$O:o=|$5$l$?$b$N$OJ]B8$5$l$^$9$,!"\e(B"Delete" \e$B%3%^%s%I$G\e(B
+\e$B$OJ]B8$5$l$^$;$s!#$?$@$7!"7+$jJV$72s?t$,M?$($i$l$k$H!"J]B8$5$l$^$9!#\e(B
+
+      >> C-n \e$B$r#22s$[$I%?%$%W$7$F!"2hLL$NE,Ev$J>l=j$K0\F0$7$J$5$$!#$=$7$F!"\e(B
+          C-k \e$B$G!"$=$N9T$r:o=|$7$J$5$$!#\e(B
+
+     \e$B0l2sL\$N\e(B C-k \e$B$G$=$N9T$NFbMF$,:o=|$5$l!"$b$&0lEY\e(B C-k \e$B$rF~NO$9$k$H!"$=$N\e(B
+\e$B9T<+?H$,:o=|$5$l$^$9!#$b$7!"\e(BC-k  \e$B$K7+$jJV$72s?t$r;XDj$7$?>l9g$K$O!"$=$N2s?t\e(B
+\e$B$@$1$N9T$,!JFbMF$H9T<+?H$H$,F1;~$K!K:o=|$5$l$^$9!#\e(B
+
+     \e$B:#:o=|$5$l$?%F%-%9%H$O!"J]B8$5$l$F$$$k$N$G!"$=$l$r<h$j=P$9$3$H$,$G$-$^\e(B
+\e$B$9!#$=$N$?$a$K$O!"\e(BC-y \e$B$r%?%$%W$7$^$9!#\e(B
+
+       >> C-y \e$B$r;n$7$F$_$J$5$$!#\e(B
+
+     C-k \e$B$r2?EY$bB3$1$F9T$&$H!":o=|$5$l$k%F%-%9%H$O!"$^$H$a$FJ]B8$5$l!"\e(BC-y
+\e$B$G!"$=$NA4$F$,<h$j=P$5$l$^$9!#\e(B
+
+       >> C-k \e$B$r2?EY$b%?%$%W$7$F$_$J$5$$!#\e(B
+
+       >> \e$B%F%-%9%H$r<h$j=P$9$K$O!"\e(BC-y \e$B$G$9!#%+!<%=%k$r?t9T2<$K0\F0$5$;!"$b\e(B
+          \e$B$&0lEY\e(B C-y \e$B$r%?%$%W$7$F$_$J$5$$!#$3$l$G%F%-%9%H$N%3%T!<$,$G$-$k$o\e(B
+          \e$B$1$G$9!#\e(B
+
+     \e$B8=:_2?$+$N%F%-%9%H$,J]B8$5$l$F$$$F!"$5$i$KB>$N%F%-%9%H$r:o=|$9$k$H$I$&\e(B
+\e$B$J$k$G$7$g$&$+!#\e(BC-y \e$B$O!"$b$C$H$b:G6a:o=|$5$l$?$b$N$r<h$j=P$7$^$9!#\e(B
+
+
+       >> \e$B9T$r:o=|$7!"%+!<%=%k$r0\F0$5$;!"JL$N9T$r:o=|$7$J$5$$!#\e(BC-y \e$B$r9T$&\e(B
+          \e$B$H!"#2HVL\$N9T$,F@$i$l$^$9!#\e(B
+
+\e$B<h$j>C$7\e(B(UNDO)
+==============
+
+     \e$B$$$D$G$b!"%F%-%9%H$rJQ99$7$?$1$l$I$b!"$=$l$r$b$H$KLa$7$?$$$H$-$O\e(BC-x u
+\e$B$GD>$j$^$9!#IaDL$O4V0c$($?%3%^%s%I$rL58z$K$9$kF/$-$r$7$^$9!#7+$jJV$7$F\e(BUNDO
+\e$B$r9T$J$*$&$H$9$k;~$O!"2?EY$b$=$N%3%^%s%I$r9T$J$($P=PMh$k$h$&$K$J$C$F$$$^$9!#\e(B
+
+       >> \e$B$3$N9T$r\e(BC-k\e$B$G>C$7$F2<$5$$!#$=$7$F!"\e(BC-x u\e$B$GLa$7$F2<$5$$!#\e(B
+
+     C-_\e$B$O!"\e(BUNDO\e$B$r9T$J$&!"$b$&0l$D$N%3%^%s%I$G$9!#5!G=$O!"\e(BC-x u\e$B$HF1$8$G$9!#\e(B
+
+     C-_\e$B$d\e(BC-x u\e$B$K\e(BUNDO\e$B$N2s?t$r!"M?$($k$3$H$,=PMh$^$9!#\e(B
+
+
+\e$B%U%!%$%k\e(B
+========
+
+     \e$B%F%-%9%H$X$NJQ99$r1J5WE*$K$9$k$?$a$K$O!"$=$l$r%U%!%$%k$KJ]B8$7$J$1$l$P\e(B
+\e$B$J$j$^$;$s!#J]B8$5$l$J$$$H!"$[$I$3$7$?JQ99$O!"\e(BEmacs\e$B$r=*N;$9$k$HF1;~$K<:$o$l\e(B
+\e$B$F$7$^$$$^$9!#\e(B
+
+     \e$B$$$^8+$F$$$k%U%!%$%k$KBP$7$F!"$"$J$?$NJT=8$r9T$C$?$b$N$r=q$-9~$_$^$9!#\e(B
+\e$B$$$^8+$F$$$k%U%!%$%k$H$O!"4JC1$K$$$($PJT=8$7$F$$$k%U%!%$%k<+BN$N$3$H$G$9!#\e(B
+
+     \e$B$"$J$?$,%U%!%$%k$r%;!<%V!JJ]B8$9$k!K$9$k$^$G!":#$^$G$NJQ99$OJT=8$7$F$$\e(B
+\e$B$k%U%!%$%k$K=q$-9~$^$l$k;v$O$"$j$^$;$s!#$=$l$O!"$"$J$?$,$=$N$h$&$K9T$$$?$/\e(B
+\e$B$J$$$N$K!"ESCf$^$GJQ99$r2C$($?$b$N$,>!<j$K=q$-9~$^$l$k$h$&$J;v$,$J$$$h$&$K\e(B
+\e$B$G$9!#\e(B
+
+     \e$B%;!<%V$r9T$C$?8e$G$5$(JQ99$7$?$b$N$,4V0c$C$F$$$?;~$N$?$a$K\e(BEmacs\e$B$OL>A0\e(B
+\e$B$rJQ$($F%*%j%8%J%k$N%U%!%$%k$r;D$7$^$9!#\e(B
+
+\e$BHw9M\e(B:          \e$B$^$?!"\e(BEmacs\e$B$OITB,$N;vBV$KBP$7!"0lDj$N%?%$%_%s%0$4$H$K<+F0E*\e(B
+               \e$B$KJT=8$7$F$$$k%U%!%$%k$NFbMF$rL>A0$rJQ$($?%U%!%$%k$K%;!<%V$7\e(B
+               \e$B$^$9!#$3$l$K$h$C$F!"K|0l$N>l9g$O9T$C$?$NJQ99$KBP$7:G>.8B$NHo\e(B
+               \e$B32$G:Q$`$h$&$K$J$C$F$$$^$9!#\e(B
+
+     \e$B2hLL$N2<$NJ}$r8+$k$H!"$3$N$h$&$J46$8$G%b!<%I%i%$%s$,I=<($5$l$F$$$k$H;W\e(B
+\e$B$$$^$9!#\e(B
+
+
+(\e$BNc\e(B)  [--]J:--**-Mule: MULE.tut     (Fundamental) ---55%--------------
+
+
+     \e$B$3$N\e(BEmacs\e$B%A%e!<%H%j%"%k$N%3%T!<$O\e(BMULE.tut\e$B$H8F$P$l$F$$$^$9!#%U%!%$%k$r\e(B
+\e$B%U%!%$%s%I!J%U%!%$%k$r8+$D$1$F%P%C%U%!$KFI$_9~$`$3$H!K$9$k$H!"\e(BMULE.tut\e$B$NIt\e(B
+\e$BJ,$KI=<($5$l$^$9!#Nc$($P!"\e(Bnew-file\e$B$H$$$&L>A0$N%U%!%$%k$r%U%!%$%s%I$7$?$J$i\e(B
+\e$B$P!"\e(B"Mule: new-file"\e$B$H$$$&%b!<%I%i%$%s$K$J$k$G$7$g$&!#\e(B
+
+\e$BCm0U!'\e(B         \e$B%b!<%I%i%$%s$K$D$$$F$O8e$[$I@bL@$7$^$9!#>/$7$*BT$A$r!#\e(B
+
+     \e$B%U%!%$%k$r%U%!%$%s%I$7$?$j!"%;!<%V$7$?$j$9$k%3%^%s%I$O!"$3$l$^$G$N$b$N\e(B
+\e$B$H$O0c$$!"#2$D$NJ8;z$+$i$J$C$F$$$^$9!#\e(BC-x  \e$B$KB3$$$FF~NO$9$kJ8;z$,!"%U%!%$%k\e(B
+\e$B$KBP$7$F9T$&A`:n$rI=$7$^$9!#\e(B
+
+     \e$B$b$&0l$D$3$l$^$G$N$b$N$H0c$&E@$O!"%U%!%$%s%I$N;~!"%U%!%$%kL>$r\e(BEmacs\e$B$K\e(B
+\e$BLd$o$l$^$9!#$3$N$3$H$r!"C<Kv$+$i0z?t$rFI$_9~$s$G$/$k%3%^%s%I$H8@$C$F$$$^$9!#\e(B
+
+\e$BCm0U!'\e(B         \e$B$3$N>l9g$O%U%!%$%kL>$G$9!#\e(B
+
+                    C-x C-f   \e$B%U%!%$%k$r8+$D$1$k!J%U%!%$%s%I$9$k!K\e(B
+
+     Emacs\e$B$O%U%!%$%kL>$rJ9$$$F$-$^$9!#$=$l$O!"2hLL$N2<$N9T$K8=$l$^$9!#%U%!\e(B
+\e$B%$%kL>$r;XDj$7$F$$$kItJ,$O!"%_%K%P%C%U%!$H8F$P$l$k$b$N$G$9!#%_%K%P%C%U%!$O\e(B
+\e$B$3$NMM$J;H$o$lJ}$r$7$^$9!#%U%!%$%kL>$KB3$$$F!"%j%?!<%s%-!<$r2!$9$H!"%_%K%P\e(B
+\e$B%C%U%!$KI=<($5$l$F$$$?FbMF$O$b$&I,MW$G$O$J$/$J$k$N$G>C$($F$7$^$$$^$9!#\e(B
+
+       >> C-x C-f\e$B$H%?%$%W$7$?8e$K\e(BC-g\e$B$H%?%$%W$7$F2<$5$$!#%_%K%P%C%U%!$NFbMF\e(B
+          \e$B$r<h$j>C$7!"$^$?!"\e(BC-x C-f\e$B%3%^%s%I$b<h$j>C$7$^$9!#$H8@$&Lu$G!"2?$b\e(B
+         \e$B%U%!%$%k$r8+$D$1$k$h$&$J$3$H$O$7$^$;$s!#\e(B
+
+     \e$B:#EY$O%U%!%$%k$r%;!<%V$7$F$_$^$7$g$&!#:#$^$G$NJQ99$rJ]B8$9$k$?$a$K$O<!\e(B
+\e$B$N$h$&$J%3%^%s%I$r;H$$$^$9!#\e(B
+
+     C-x C-s   \e$B%U%!%$%k$r%;!<%V$9$k\e(B
+
+     Emacs\e$B$NFbMF$O%U%!%$%k$K=q$-=P$5$l$^$9!#%;!<%V$9$k;~!"%*%j%8%J%k$N\e(B
+\e$B%U%!%$%k$O?7$7$$L>A0$r$D$1$i$l$F;D$5$l$F$$$k$N$GFbMF$O<:$o$l$^$;$s!#$=\e(B
+\e$B$N?7$7$$L>A0$O%*%j%8%J%k$N%U%!%$%k$NL>A0$K\e(B'~'\e$B$r$D$1$?$b$N$G$9!#\e(B
+
+     \e$B%;!<%V$,=*$o$k$H!"\e(BEmacs\e$B$O%;!<%V$7$?%U%!%$%k$NL>A0$rI=<($7$^$9!#\e(B
+
+       >> C-x C-s\e$B$H%?%$%W$7$F%A%e!<%H%j%"%k$N%3%T!<$r%;!<%V$7$F2<$5$$!#$=$N\e(B
+          \e$B;~!"2hLL$N2<$NJ}$K\e(B"Wrote ...../MULE.tut"\e$B$HI=<($5$l$^$9!#\e(B
+
+     \e$B?7$7$$%U%!%$%k$r:n$k;~!"$"$?$+$b0JA0$+$i$"$C$?%U%!%$%k$r%U%!%$%s%I$9$k\e(B
+\e$B$h$&$J%U%j$r$7$^$9!#$=$&$7$F!"$=$N%U%!%$%s%I$7$?%U%!%$%k$K%?%$%W$7$F$$$-$^\e(B
+\e$B$9!#\e(B
+
+     \e$B%U%!%$%k$r%;!<%V$7$h$&$H$7$?;~$K=i$a$F!"\e(BEmacs\e$B$O:#$^$GJT=8$7$F$$$?FbMF\e(B
+\e$B$r%U%!%$%k$NCf$K=q$-9~$_$^$9!#\e(B
+
+
+\e$B%P%C%U%!\e(B
+========
+
+     \e$B$b$7!"#2HVL\$N%U%!%$%k$r\e(B C-x C-f \e$B$G<h$j=P$9$H!"#1HVL\$N%U%!%$%k$O\e(BEmacs
+\e$BFbIt$K;D$j$^$9!#\e(BEmacs\e$BFbIt$K$"$k%U%!%$%k$+$i%F%-%9%H$rFI$_9~$s$GJ]B8$7$F$$$k\e(B
+\e$B$b$N$O%P%C%U%!$H8F$P$l$^$9!#%U%!%$%k$N<h$j=P$7$O!"\e(BEmacs\e$BFbIt$K?7$7$$%P%C%U%!\e(B
+\e$B$r:n$j$^$9!#\e(B
+
+     Emacs\e$B$NCf$KJ]B8$7$F$$$k%P%C%U%!$N%j%9%H$r8+$k$K$O!"<!$N$h$&$K%?%$%W$7\e(B
+\e$B$^$9!#\e(B
+
+     C-x C-b
+
+       >> C-x C-b \e$B$H%?%$%W$7$J$5$$!#$=$l$>$l$N%P%C%U%!$,$I$N$h$&$KL>A0$r;}\e(B
+          \e$B$C$F$$$k$+!"$=$7$F!"$I$N$h$&$J%U%!%$%kL>$r$D$1$F$$$k$N$+4Q;!$7$J\e(B
+          \e$B$5$$!#\e(B
+
+     \e$B%P%C%U%!$K$O%U%!%$%k$H0lCW$J$$$b$N$b$"$j$^$9!#$?$H$($P!"\e(B
+"*Buffer List*" \e$B$H$$$&%U%!%$%k$O$"$j$^$;$s!#$3$l$O\e(B C-x C-b \e$B$K$h$C$F:n$i$l\e(B
+\e$B$?%P%C%U%!%j%9%H$KBP$7$F$N%P%C%U%!$G$9!#\e(B
+
+     \e$B$"$J$?$,8+$F$$$k\e(BEmacs\e$B%&%#%s%I%&Fb$K$"$k!"$I$s$J%F%-%9%H$G$b!"$$$:$l$+\e(B
+\e$B$N%P%C%U%!Fb$K$"$j$^$9!#\e(B
+
+       >> \e$B%P%C%U%!%j%9%H$r>C$9$?$a\e(B C-x 1 \e$B$H%?%$%W$7$J$5$$!#\e(B
+
+     \e$B$b$7!"$"$k%U%!%$%k$N%F%-%9%H$KJQ99$r9T$J$C$F$+$i!"B>$N%U%!%$%k$r<h$j=P\e(B
+\e$B$7$?$H$7$?$i!":G=i$N%U%!%$%k$O%;!<%V$5$l$F$$$^$;$s!#$=$NJQ99$O\e(BEmacs\e$BFbIt$N%U\e(B
+\e$B%!%$%k$HBP1~$9$k%P%C%U%!$NCf$@$1$K9T$J$o$l$F$$$^$9!#\e(B
+
+     \e$B#2HVL\$N%U%!%$%k$KBP1~$9$k%P%C%U%!$r:n$C$?$j!"%(%G%#%C%H$7$?$j$7$F$b!"\e(B
+\e$B#1HVL\$N%U%!%$%k$KBP1~$9$k%P%C%U%!$K$O2?$b1F6A$rM?$($^$;$s!#$3$l$O$H$F$b;H\e(B
+\e$B$$0W$/!"$^$?!"#1HVL\$N%U%!%$%k$KBP1~$9$k%P%C%U%!$r<h$C$F$*$/$?$a$KLr$KN)$D\e(B
+\e$BJ}K!$G$9!#\e(B
+
+     C-x C-s \e$B$G%P%C%U%!$r%;!<%V$9$k$?$a$K\e(B C-x C-f \e$B$G%P%C%U%!$r@Z$jBX$($k$N\e(B
+\e$B$OLq2p$G$9!#$=$3$G<!$N%3%^%s%I$r;H$$$^$9!#\e(B
+
+     C-x s   \e$B8=:_$"$k%P%C%U%!$r%;!<%V$9$k!#\e(B
+
+     C-x s \e$B$OFbMF$rJQ$($?%P%C%U%!A4$F$r%U%!%$%k$K%;!<%V$7$^$9!#$3$N;~!"$R$H\e(B
+\e$B$D$R$H$D$N\e(B(\e$B%;!<%V$5$l$k$Y$-\e(B)\e$B%P%C%U%!$KBP$7$F!"%;!<%V$9$k$+!"$7$J$$$+$r\e(By\e$B$+\e(Bn
+\e$B$GLd$o$l$^$9!#$3$NI=<($O2hLL$N2<$N9T$KI=<($5$l$^$9!#Nc$($P!"$3$N$h$&$K$G$9!#\e(B
+
+             Save file  /usr/private/yours/MULE.tut? (y or n)
+
+
+
+\e$B%3%^%s%I$N3HD%\e(B
+==============
+
+     \e$B%(%G%#%?$K$O!"%3%s%H%m!<%k!&%-!<$d%a%?!&%-!<$GF~NO$G$-$k$b$N$h$j$b$:$C\e(B
+\e$B$HB?$/$N%3%^%s%I$,$"$j$^$9!#$3$l$i$r07$&$?$a$K!"3HD%!J\e(BeXtend\e$B!K%3%^%s%I$r\e(B
+\e$B;H$$$^$9!#$=$l$K$O!"0J2<$N#2$D$N<oN`$,$"$j$^$9!#\e(B
+
+     C-x     \e$BJ8;z$K$h$k3HD%!#B3$1$F0lJ8;z$rF~NO$7$^$9!#\e(B
+     ESC x   \e$BL>A0$K$h$k3HD%!#B3$1$F%3%^%s%I$NL>A0$rF~NO$7$^$9!#\e(B
+
+     \e$B$3$l$i$O0lHL$K!"JXMx$@$1$l$I$b!"$3$l$^$G8+$F$-$?$b$N$[$IIQHK$K$OMQ$$$i\e(B
+\e$B$l$J$$%3%^%s%I$N$?$a$N$b$N$G$9!#\e(BC-x  C-f \e$B!J%U%!%$%s%I!K$d\e(B C-x C-s\e$B!J%;!<%V!K\e(B
+\e$B$O$3$NCg4V$G$9!#B>$K!"\e(BC-x C-c\e$B!J%(%G%#%?$N=*N;!K$b$=$&$G$9!#\e(B
+
+     C-z\e$B$O\e(BEmacs\e$B$rH4$1$k$N$KNI$/;H$o$l$kJ}K!$G$9!#\e(BEmacs\e$B$r=*N;$9$k$3$H$J$/!"\e(B
+\e$B0lC6!"\e(Bcsh\e$B$N%l%Y%k$KLa$k$K$O0lHVNI$$J}K!$H8@$($k$G$7$g$&!#\e(BC-z\e$B$r9T$J$o$l$F$b\e(B
+Emacs\e$B$O%9%H%C%W$7$F$$$k$@$1$G!"FbMF$,GK2u$5$l$k$H$$$&$3$H$O$"$j$^$;$s!#\e(B
+
+\e$BCm0U\e(B:          \e$B$?$@$7\e(BX-window\e$B$G9T$J$C$F$$$k>l9g!"$b$7$/$O;HMQ$7$F$$$k%7%'%k\e(B
+               \e$B$,\e(Bsh\e$B$N;~$O!"$3$N8B$j$G$O$"$j$^$;$s!#\e(B
+
+
+     C-x  \e$B%3%^%s%I$O!"$?$/$5$s$"$j$^$9!#$9$G$K3X$s$@$b$N$O0J2<$N$b$N$G$9!#\e(B
+
+     C-x C-f   \e$B%U%!%$%k$NJT=8!J\e(BFind\e$B!K\e(B
+     C-x C-s   \e$B%U%!%$%k$NJ]B8!J\e(BSave\e$B!K\e(B
+     C-x C-b   \e$B%P%C%U%!%j%9%H$NI=<(\e(B
+     C-x C-c   \e$B%(%G%#%?$r=*N;$9$k!#%U%!%$%k$NJ]B8$O!"<+F0E*$K$O9T$o$l$^$;\e(B
+               \e$B$s!#$7$+$7!"$b$7%U%!%$%k$,JQ99$5$l$F$$$l$P!"%U%!%$%k$NJ]B8\e(B
+               \e$B$r$9$k$N$+$I$&$+$rJ9$$$F$-$^$9!#J]B8$7$F=*N;$9$kIaDL$NJ}K!\e(B
+               \e$B$O!"\e(BC-x C-s C-x C-c \e$B$H$9$k$3$H$G$9!#\e(B
+
+     \e$BL>A0$K$h$k3HD%%3%^%s%I$K$O!"$"$^$j;H$o$l$J$$$b$N$d!"FCDj$N%b!<%I$G$7$+\e(B
+\e$B;H$o$J$$$b$N$J$I$,$"$j$^$9!#Nc$H$7$F!"\e(B"command-apropos" \e$B$r$H$j$"$2$^$9!#$3\e(B
+\e$B$N%3%^%s%I$O%-!<%o!<%I$rF~NO$5$;!"$=$l$K%^%C%A$9$kA4$F$N%3%^%s%I$NL>A0$rI=\e(B
+\e$B<($7$^$9!#\e(BESC x \e$B$H%?%$%W$9$k$H!"%9%/%j!<%s$N2<$K\e(B "M-x" \e$B$,I=<($5$l$^$9!#$3$l\e(B
+\e$B$KBP$7$F!"<B9T$9$k%3%^%s%I$NL>A0!J:#$N>l9g!"\e(B"command-apropos"\e$B!K$rF~NO$7$^$9!#\e(B
+"command-a" \e$B$^$GF~NO$7$?8e%9%Z!<%9$rF~$l$l$P!"8e$NItJ,$O<+F0E*$KJd$o$l$^$9!#\e(B
+\e$B$3$N8e!"%-!<%o!<%I$rJ9$+$l$^$9$+$i!"CN$j$?$$J8;zNs$r%?%$%W$7$^$9!#$J$*!"%-!<\e(B
+\e$B%o!<%I$rF~$l$J$$$H!"A4$F$N%3%^%s%I$,I=<($5$l$^$9!#\e(B
+
+       >> ESC x \e$B$r%?%$%W$7!"B3$1$F!"\e(B"command-apropos<Return>" \e$B$"$k$$$O\e(B
+          "command-a<Space><Return>" \e$B$H%?%$%W$7$^$9!#<!$K!"\e(B"kanji<Return>"
+          \e$B$H%?%$%W$7$^$9!#\e(B
+
+     \e$B8=$l$?!V%&%#%s%I%&!W$r>C$9$K$O!"\e(BC-x 1 \e$B$H%?%$%W$7$^$9!#\e(B
+
+\e$B%b!<%I%i%$%s\e(B
+============
+
+     \e$B$b$7$f$C$/$j$H%3%^%s%I$rBG$C$?$J$i$P!"2hLL$N2<Dl$N%(%3!<%(%j%"$H8F$P$l\e(B
+\e$B$k>l=j$KBG$C$?$b$N$,I=<($5$l$^$9!#%(%3!<%(%j%"$O2hLL$N\e(B1\e$B$P$s2<$N9T$G$9!#$=$N\e(B
+\e$B$9$0>e$N9T$O!"%b!<%I%i%$%s$H8F$P$l$F$$$^$9!#%b!<%I%i%$%s$O$3$s$JIw$KI=<($5\e(B
+\e$B$l$F$$$k$G$7$g$&!#\e(B
+
+ [--]J:--**-Mule: MULE.tut     (Fundamental) ---NN%--------------
+
+
+\e$BCm0U\e(B:           NN%\e$B$N\e(BNN\e$B$O?t;z$,F~$C$F$$$^$9!#$"$J$?$,;H$C$F$$$k\e(BEmacs\e$B$N%b!<\e(B
+               \e$B%I%i%$%s$H0c$&$+$bCN$l$J$$$1$I!"92$F$J$$$h$&$K!#Nc$($P!";~4V\e(B
+               \e$B$d\e(Buptime\e$B$,I=<($5$l$F$$$k$N$O!"\e(Bdisplay-time\e$B$H$$$&5!G=$,F0$$$F\e(B
+               \e$B$$$k$+$i$G$9!#\e(B
+
+     \e$B$3$N9T$K$h$C$FB?$/$NM-MQ$J>pJs$,F@$i$l$^$9!#\e(B
+
+
+     \e$B:#!"$"$J$?$,8+$F$$$k%U%!%$%kL>$rI=<($7$F$$$^$9!#\e(BNN%\e$B$O8=:_%9%/%j!<%s>e\e(B
+\e$B$K%U%!%$%k$N0lHV>e$+$i2?%Q!<%;%s%HL\$,I=<($5$l$F$$$k$+$r<($7$F$$$^$9!#%U%!\e(B
+\e$B%$%k$N0lHV:G=i$rI=<($7$F$$$k$J$i$P!"\e(B--Top--\e$B$HI=<($5$l$F$^$9!#%U%!%$%k$N0lHV\e(B
+\e$B:G8e$rI=<($7$F$$$k$J$i$P!"\e(B--Bot--\e$B$HI=<($5$l$^$9!#2hLL$NCf$K%U%!%$%k$NA4$F$,\e(B
+\e$BI=<($5$l$F$$$k$J$i$P!"\e(B--All--\e$B$HI=<($5$l$^$9!#\e(B
+
+     \e$B%b!<%I%i%$%s$N>.3g8L$NCf$O!":#$I$s$J%b!<%I$KF~$C$F$$$k$+$r<($7$F$$$^$9!#\e(B
+\e$B8=:_$O!"%G%U%)%k%H$N\e(BFundamental\e$B$KF~$C$F$$$^$9!#$3$l$b%a%8%c!<%b!<%I$N0lNc$G\e(B
+\e$B$9!#\e(B
+
+     Emacs\e$B$O\e(BLisp mode\e$B$d\e(BText mode\e$B$N$h$&$J$3$H$J$k%W%m%0%i%`8@8l$d%F%-%9%H$K\e(B
+\e$BBP$7$F%(%G%#%C%H$r9T$&$?$a$N4v$D$+$N%a%8%c!<%b!<%I$r;}$C$F$$$^$9!#$I$s$J;~\e(B
+\e$B$G$bI,$:$$$:$l$+$N%a%8%c!<%b!<%I$N>uBV$K$J$C$F$$$^$9!#\e(B
+
+     \e$B$=$l$>$l$N%a%8%c!<%b!<%I$O4v$D$+$N%3%^%s%I$rA4$/0c$&?6$kIq$$$K$7$F$7$^\e(B
+\e$B$$$^$9!#Nc$r>e$2$F$_$^$7$g$&!#%W%m%0%i%`$NCf$K%3%a%s%H$r:n$k%3%^%s%I$,$"$j\e(B
+\e$B$^$9!#%3%a%s%H$r$I$NMM$J7A<0$K$9$k$+$O!"3F%W%m%0%i%`8@8l$K$h$C$F0c$$$^$9$,!"\e(B
+\e$B$=$l$>$l$N%a%8%c!<%b!<%I$O!"$-$A$s$HF~$l$F$/$l$^$9!#\e(B
+
+     \e$B$=$l$>$l$N%a%8%c!<%b!<%I$KF~$k$?$a$N%3%^%s%I$O%b!<%IL>$N3HD%$5$l$?$b$N\e(B
+\e$B$K$J$C$F$$$^$9!#Nc$($P!"\e(BM-x fundamental-mode\e$B$O\e(BFundamental\e$B$KF~$k$?$a$N$b$N$G\e(B
+\e$B$9!#\e(B
+
+     \e$B$b$7!"1Q8l$r%(%G%#%C%H$9$k$J$i$P!"\e(BText mode\e$B$KF~$j$^$9!#\e(B
+
+       >> M-x text-mode <Retuen>\e$B$H%?%$%W$7$J$5$$!#\e(B
+
+     \e$B8=:_$N%a%8%c!<%b!<%I$K$D$$$F$N%I%-%e%a%s%H$r8+$?$$;~$O!"\e(BC-h m\e$B$H%?%$%W\e(B
+\e$B$7$^$9!#\e(B
+
+       >> C-h m \e$B$r;H$C$F\e(BText mode\e$B$H\e(BFundamental mode\e$B$N0c$$$rD4$Y$J$5$$!#\e(B
+
+       >> C-x 1\e$B$G%I%-%e%a%s%H$r2hLL$+$i>C$7$J$5$$!#\e(B
+
+     \e$B:8C<$N\e(B '[--]' \e$B$O8=:_$N%-!<F~NO$N%b!<%I$r<($7$F$$$^$9!#\e(B[--] \e$B$N;~$K$O\e(B
+\e$B1Q8l%"%k%U%!%Y%C%H$,$=$N$^$^F~NO$G$-$^$9!#F~NO%b!<%I$K$D$$$F$N>\$7$$@bL@$O\e(B
+\e$B!V$?$^$4!W$N%^%K%e%"%k$rD4$Y$F2<$5$$!#\e(B
+
+     \e$B$=$N$9$01&$K$O%3!<%IBN7O\e(B (coding-system) \e$B$K4X$9$k%U%i%0$N>uBV$,I=\e(B
+\e$B<($5$l$F$$$^$9!#\e(BMule \e$B$O!"%U%!%$%kF~=PNO!"F~NO!"2hLL=PNO$K$D$$$F!"$=$l$>$lFH\e(B
+\e$BN)$K%3!<%IBN7O$r;XDj$5$;$k$3$H$,=PMh$^$9$,!"DL>o$O%U%!%$%kMQ$N%3!<%IBN7O$N\e(B
+\e$B%K!<%b%K%C%/$N$_I=<($7$F$$$^$9!#\e(B
+
+       >> \e$B%b!<%I%i%$%s>e$K\e(B"J:","S:",\e$B$b$7$/$O\e(B "E:"\e$B$,I=<($5$l$F$$$k$+$I$&$+3N\e(B
+         \e$BG'$7$J$5$$!#\e(B
+
+     \e$B:G=i$N0lJ8;z$,%3!<%IBN7O$N%K!<%b%K%C%/!"<!$N\e(B ':' \e$B$,8=:_1Q8l0J30$NJ8;z\e(B
+\e$B!JF|K\8l!"Cf9q8l$J$I!K$b$A$c$s$HI=<($9$k$H$$$&$3$H$r<($7$F$$$^$9!#\e(BJ\e$B$O\e(BJUNET 
+\e$B$G;H$o$l$F$$$k\e(B JIS \e$B%3!<%I!"\e(BS \e$B$O\e(B Shift-JIS\e$B!"\e(BE \e$B$OF|K\8l\e(BEUC \e$B$r<($7$F$$$^$9!#\e(B 
+\e$BB?9q8l$NI=<($NM-L5$O\e(B C-x C-k t \e$B$G\e(B ON/OFF\e$B$N%H%0%k$,$G$-$^$9!#\e(B
+
+     \e$B<!$NNc$O!"0lEYB?9q8lI=<($r\e(BOFF\e$B$7$F$+$i!"$b$&0lEY\e(BON\e$B$r9T$C$F$_$^$9!#\e(B
+
+       >> C-x C-k t\e$B$r\e(B2\e$BEY9T$$$J$5$$!#\e(B
+
+     \e$BF~NO%b!<%I$,\e(BJIS\e$B%3!<%I$N@_Dj$H$J$C$F$$$k;~!"$b$7$"$J$?$N;H$C$F$$$kC<Kv\e(B
+\e$B$K%a%?!&%-!<$,IU$$$F$$$k$J$i!"%(%9%1!<%W!&%-!<$NBe$o$j$K$=$l$r;H$&$3$H$,=P\e(B
+\e$BMh$^$9!#$=$N;~!"%a%?!&%-!<$N;H$$J}$O%3%s%H%m!<%k!&%-!<$HF1MM$K2!$7$J$,$iJ8\e(B
+\e$B;z$r%?%$%W$7$^$9!#\e(BESC <\e$BJ8;z\e(B>\e$B$b\e(BM-<\e$BJ8;z\e(B>\e$B$bF1$8F/$-$r$7$^$9!#:#$^$G$N@bL@$G\e(BESC
+<\e$BJ8;z\e(B>\e$B$H9T$J$C$F$$$?$H$3$m$,!"\e(BM-<\e$BJ8;z\e(B>\e$B$H$J$j$^$9!#Cm0U$7$J$1$l$P$J$i$J$$$N\e(B
+\e$B$O!"%7%U%H\e(BJIS\e$B$d\e(BEUC\e$B%3!<%I$N;~$O;HMQ$G$-$^$;$s!#\e(B
+
+     \e$B%3!<%IBN7O$N$N@Z$jBX$($O!"3F!9$N%P%C%U%!$KBP$7$F$N$_M-8z$G$9!#$=$l$>$l\e(B
+\e$B$N!"%3!<%IBN7O;XDj$K$D$$$F$O!"\e(BC-h a coding-system <Return>\e$B$G8+$k$3$H\e(B
+\e$B$,=PMh$^$9!#\e(B
+
+       >> C-h a coding-system <Return>\e$B$G=P$F$/$k%I%-%e%a%s%HCf$N!"\e(B
+         set-display-coding-system, set-file-coding-system,
+         set-process-coding-system \e$B$N@bL@$rFI$_$J$5$$!#\e(B
+
+\e$B8!:w\e(B
+=====
+
+     \e$BJ8;zNs$r!"%U%!%$%kFb$G!"A0J}Kt$O8eJ}$K!"C5$9;v$,$G$-$^$9!#8!:w$r;O$a$k\e(B
+\e$B%3%^%s%I$O!"%+!<%=%k0LCV0J9_$r8!:w$9$k$J$i$P\e(B  C-s\e$B!"%+!<%=%k0LCV0JA0$J$i$P\e(B
+C-r \e$B$G$9!#\e(BC-s \e$B$r%?%$%W$9$k$H!"%(%3!<%(%j%"$K\e(B "I-search:"\e$B$H$$$&J8;zNs$,%W%m\e(B
+\e$B%s%W%H$H$7$FI=<($5$l$^$9!#\e(BESC\e$B$r2!$9$H!"=*N;$G$-$^$9!#\e(B
+
+
+       >> C-s\e$B$G8!:w$,;O$^$j$^$9!#$=$l$+$i!"$f$C$/$j$H#1J8;z$:$D\e(B"cursor"\e$B$H$$\e(B
+          \e$B$&C18l$rF~NO$7$^$9!##1J8;zF~NO$9$k$4$H$K!"%+!<%=%k$O!"$I$s$JF0$-\e(B
+          \e$B$r$7$^$9$+\e(B?
+
+       >> \e$B$b$&#1EY\e(B C-s \e$B$r%?%$%W$9$k$H!"<!$N\e(B"cursor"\e$B$r8+$D$1$i$l$^$9!#\e(B
+
+       >> <Delete>\e$B$r#42sF~NO$7$F!"%+!<%=%k$NF0$-$r8+$J$5$$!#\e(B
+
+       >> ESC\e$B$r2!$7$F!"=*N;$7$^$9!#\e(B
+
+     \e$BC5$7$?$$J8;zNs$r%?%$%WCf$G$b!"%?%$%W$7$?J8;zItJ,$@$1$G!"8!:w$r;O$a$^$9!#\e(B
+\e$B<!$NJ8;z$rC5$9$K$O!":F$S\e(BC-s\e$B$r%?%$%W$7$^$9!#$b$7!"J8;zNs$,B8:_$7$J$+$C$?$i!"\e(B
+\e$B%a%C%;!<%8$,I=<($5$l$^$9!#\e(BC-g \e$B$G$b=*N;$G$-$^$9!#\e(B
+
+     \e$B8!:w<B9TCf$K\e(B<Delete>\e$B$rF~NO$9$k$H!"8!:wJ8;zNs$N#1HV8e$m$NJ8;z$,>C$($^$9!#\e(B
+\e$B$=$7$F!"%+!<%=%k$O!"A02s$N0LCV$KLa$j$^$9!#$?$H$($P!"\e(B"cu"\e$B$H%?%$%W$7$F!":G=i\e(B
+\e$B$N\e(B"cu"\e$B$N0LCV$K%+!<%=%k$,F0$$$?$H$7$^$9!#$3$3$G\e(B<Delete>\e$B$rF~NO$9$k$H!"%5!<%A\e(B
+\e$B%i%$%s$N\e(B'u'\e$B$,>C$(!"%+!<%=%k$O!"\e(B'u'\e$B$r%?%$%W$9$kA0$K!"%+!<%=%k$,$"$C$?\e(B'c'\e$B$N0L\e(B
+\e$BCV$K!"0\F0$7$^$9!#\e(B
+
+     \e$B8!:w<B9TCf$K!"\e(BC-s \e$B$d\e(B C-r \e$B0J30$N%3%s%H%m!<%kJ8;z$r%?%$%W$9$k$H!"8!:w$O\e(B
+\e$B=*N;$7$^$9!#\e(B
+
+     C-s \e$B$O!"8=:_$N%+!<%=%k0LCV0J9_$K=P$F$/$k8!:wJ8;zNs$rC5$7$^$9!#$b$7!"A0\e(B
+\e$B$NJ}$rC5$7$?$+$C$?$i!"\e(BC-r  \e$B$r%?%$%W$9$k$3$H$G!"5UJ}8~8!:w$,$G$-$^$9!#\e(BC-s \e$B$H\e(B
+C-r \e$B$O!"8!:w$NJ}8~$,H?BP$J$@$1$G!"A4$FF1$8F/$-$r$7$^$9!#\e(B
+
+\e$B%j%+!<%7%V\e(B \e$B%(%G%#%F%#%s%0\e(B \e$B%l%Y%k\e(B
+
+     \e$B$H$-$I$-!"!JITK\0U$K!K%j%+!<%7%V\e(B \e$B%(%G%#%F%#%s%0\e(B \e$B%l%Y%k$H8F$P$l$k>uBV$K\e(B
+\e$BF~$k$3$H$,$"$j$^$9!#%a%8%c!<%b!<%I$N>.3g8L\e(B'()'\e$B$N2s$j$rCf3g8L\e(B'[]'\e$B$G0O$s$@$b\e(B
+\e$B$N$,%b!<%I%i%$%s>e$KI=<($5$l$^$9!#Nc$($P!"\e(B(Fundamental)\e$B$HI=<($5$l$kBe$o$j$K\e(B
+[(Fundamental)]\e$B$N$h$&$K$J$j$^$9!#\e(B
+
+\e$BCm0U\e(B:          \e$B$3$3$G$O%j%+!<%7%V\e(B \e$B%(%G%#%F%#%s%0\e(B \e$B%l%Y%k<+BN$K$D$$$F$O@bL@$7\e(B
+               \e$B$^$;$s!#\e(B
+
+     \e$B%j%+!<%7%V\e(B \e$B%(%G%#%F%#%s%0\e(B \e$B%l%Y%k$+$iH4$1$G$k$?$a$K$O!"\e(BM-x top-level
+<Return>\e$B$H%?%$%W$7$^$9!#\e(B
+
+       >> \e$B;n$7$F$_$F2<$5$$!#%9%/%j!<%s$NDl$K\e(B"Back to top level"\e$B$HI=<($5$l$^\e(B
+          \e$B$9!#\e(B
+
+     \e$BK\Ev$O!"$3$N;n$_$,9T$o$l$?;~$O!"$9$G$K%H%C%W%l%Y%k$K$$$?$N$G$9!#\e(BM-x
+top-level\e$B$O!"2?$b1F6A$rM?$($F$$$^$;$s!#\e(B
+
+     \e$B%j%+!<%7%V\e(B \e$B%(%G%#%F%#%s%0\e(B \e$B%l%Y%k$+$iH4$1=P$k$N$KBP$7$F$O\e(BC-g\e$B$O8z$-$^$;\e(B
+\e$B$s!#\e(B
+
+
+\e$B%X%k%W\e(B
+======
+
+     Emacs\e$B$K$O!"$?$/$5$s$NLr$KN)$D5!G=$,$"$j!"$3$3$G!"$9$Y$F$r@bL@$9$k$3$H\e(B
+\e$B$O!"IT2DG=$G$9!#$7$+$7!"$^$@CN$i$J$$B?$/$N5!G=$r3X$V$?$a$K$O!"\e(B<HELP>\e$B$H8F$P\e(B
+\e$B$l$k\e(B C-h \e$B$r%?%$%W$9$k$3$H$G!"$?$/$5$s$N>pJs$r<j$KF~$l$k$3$H$,$G$-$^$9!#\e(B
+
+     \e$B;H$$J}$O!"\e(BC-h \e$B$r%?%$%W$7!"B3$$$FI,MW$J%*%W%7%g%s$r#1J8;z%?%$%W$7$^$9!#\e(B
+\e$B$o$+$i$J$1$l$P!"\e(BC-h ?  \e$B$H%?%$%W$9$k$H!"$I$s$J%*%W%7%g%s$,$"$k$N$+I=<($5$l$^\e(B
+\e$B$9!#$b$7!"\e(BC-h \e$B$r%?%$%W$7$F$+$i5$$,JQ$o$C$?$i!"\e(BC-g \e$B$r%?%$%W$9$l$P!"<h$j>C$9\e(B
+\e$B$3$H$,$G$-$^$9!#\e(B
+
+     \e$B:G$b4pK\E*$J$b$N$O!"\e(BC-h c \e$B$G$9!#$3$l$KB3$$$F%-!<$rF~NO$9$k$H!"$=$N%3%^\e(B
+\e$B%s%I$K$D$$$F$NC;$$@bL@$rI=<($7$^$9!#\e(B
+
+       >> C-h c C-p \e$B$H%?%$%W$7$F$_$J$5$$!#\e(B"C-p runs the command previous-
+          line"\e$B$N$h$&$J%a%C%;!<%8$,I=<($5$l$k$O$:$G$9!#\e(B
+
+     \e$B8+$?$3$H$O$"$k$,!"3P$($F$O$$$J$$%3%^%s%I$b;W$$=P$;$k$N$G$9!#\e(BC-x C-s \e$B$N\e(B
+\e$B$h$&$JJ#?t$G#1$D$N%3%^%s%I$b\e(BC-h c \e$B$N8e$m$KB3$1$i$l$^$9!#\e(B
+
+     \e$B$b$C$H>\$7$/CN$j$?$+$C$?$i!"\e(Bc \e$B$NBe$o$j$K\e(B k \e$B$r;XDj$7$^$9!#\e(B
+
+       >> C-h k C-p \e$B$H%?%$%W$7$F$_$J$5$$!#\e(B
+
+     Emacs\e$B$N%&%#%s%I%&$K!"%3%^%s%I$NL>A0$H5!G=$,I=<($5$l$^$9!#FI$_=*$($?$i!"\e(B
+C-x 1 \e$B$H%?%$%W$9$k$H!"H4$1$i$l$^$9!#\e(B
+
+     \e$BB>$K$bLr$KN)$D%*%W%7%g%s$,$"$j$^$9!#\e(B
+
+    C-h f      \e$B%U%!%s%/%7%g%sL>$rF~NO$9$k$H!"%U%!%s%/%7%g%s$rI=<($7$^$9!#\e(B
+
+       >> C-h f previous-line \e$B$r%?%$%W$7!"\e(B<Return> \e$B$r2!$7$J$5$$!#\e(BC-p \e$B%3%^%s\e(B
+          \e$B%I$r<B9T$9$k%U%!%s%/%7%g%s$K$D$$$F$N>pJs$rI=<($7$^$9!#\e(B
+
+    C-h a      \e$B%-!<%o!<%I$rF~NO$9$k$H!"L>A0$K$=$N%-!<%o!<%I$r4^$`!"A4$F$N%3\e(B
+               \e$B%^%s%I$rI=<($7$^$9!#$3$l$i$N%3%^%s%I$O$9$Y$F\e(BESC x \e$B$G<B9T$G$-\e(B
+               \e$B$^$9!#\e(B
+
+       >> C-h a file \e$B$H%?%$%W$7!"\e(B<Return>\e$B$r2!$7$J$5$$!#L>A0$K\e(B"file"\e$B$H$$$&J8\e(B
+          \e$B;z$r;}$DA4$F$N%3%^%s%I$rI=<($7$^$9!#$^$?!"\e(Bfind-file \e$B$d\e(B write-file
+          \e$B$H$$$&L>$N\e(B C-x C-f \e$B$d\e(B C-x C-w \e$B$N$h$&$J%3%^%s%I$bI=<($5$l$^$9!#\e(B
+
+\e$B$*$o$j$K\e(B
+========
+
+\e$BK:$l$:$K!'\e(B      \e$B=*N;$9$k$K$O!"\e(BC-x C-c \e$B$H$7$^$9!#\e(B
+
+
+     \e$B$3$NF~LgJT$O!"$^$C$?$/$N=i?4<T$K$b$o$+$j$d$9$$$h$&$K$H0U?^$7$F$$$^$9!#\e(B
+\e$B$G$9$+$i!"$b$72?$+$o$+$j$K$/$$E@$,$"$C$?$J$i!"0l?M$G6rCT$r8@$&$N$G$O$J$/!"\e(B
+\e$BJ86g$r$D$1$F2<$5$$!#\e(B
+
+
+     \e$B$b$7!"\e(BEMACS \e$B$r2?F|$+$G$b;H$C$F$_$l$P!"$=$l$r$d$a$F$7$^$&$3$H$J$I$G$-$J\e(B
+\e$B$/$J$k$G$7$g$&!#:G=i$O8MOG$&$+$bCN$l$^$;$s!#$7$+$7!"$=$l$O$I$s$J%(%G%#%?$G\e(B
+\e$B$bF1MM$G$9!#\e(BEMACS \e$B$N$h$&$K!"Hs>o$KB?$/$N$3$H$,$G$-$k>l9g$K$OFC$K$=$&$G$7$g\e(B
+\e$B$&!#$=$7$F!"\e(BEMACS \e$B$G$O!"<B:]!"2?$G$b$G$-$k$N$G$9$+$i!#\e(B
+
+
+
+\e$B<U<-\e(B
+=====
+     \e$B$3$NJ8=q$O!"\e(BJUNET\e$B$GN.$5$l$?\e(B"\e$BF|K\8l\e(B MicroEMACS (kemacs) \e$BF~LgJT\e(B" \e$B$r\e(BGNUE-
+macs (Nemacs)\e$B$N\e(BTutorial\e$BMQ$K=q$-49$($?$b$N$G$9!#\e(B
+
+     Jonathan Payne \e$B$K$h$k\e(B "JOVE Tutorial" (19 January 86) \e$B$rJQ99$7$?$b$N$G\e(B
+     \e$B$"$j!"$=$l$O$b$H$b$H$O!"\e(BCCA-UNIX\e$B$N\e(BSteve Zimmerman \e$B$K$h$C$FJQ99$5$l$?!"\e(B
+     MIT \e$B$N\e(B "Teach-Emacs" \e$BF~LgJT\e(B (31 October 85) \e$B$r!J$5$i$K!KJQ99$7$?$b$N$G\e(B
+     \e$B$7$?!#\e(B
+
+     Update - February 1986 by Dana Hoggatt.
+
+     Update - December 1986 by Kim Leburg.
+
+     Update/Translate - July 1987 by SANETO Takanori
+
+\e$BFCJL$J<U<-\e(B
+==========
+
+     \e$B:G=i$K$3$l$NF|K\8lLu$r:n$i$l$?!"\e(BSANETO Takanori\e$B$5$s!#$3$NJ8>O$O\e(BGMW +
+Wnn  + Nemacs\e$B$r;H$C$F=q$-$^$7$?!#$=$N$h$&$JAG@2$i$7$$%W%m%0%i%`$r:n$C$?J}!9\e(B
+\e$B$X46<U$N0U$rI=$7$?$$$H;W$$$^$9!#K]Lu$H$+!"F~NO$H$+$r?'!9$H<jEA$C$F$/$l$?!"\e(B
+\e$BF#86>M;R$5$s!"$I$&$b$"$j$,$H$&!#\e(B
+
+
+
+
+
+\e$B8mLu!"13!"$=$NB>!"$NJ8@U$O!"0J2<$N<T$K$"$j$^$9!#\e(B
+
+                        \e$BNkLZM5?.\e(B hironobu@sra.co.jp
+
+
+Update/Add - December 1987 by Hironobu Suzuki
+Update/Add - November 1989 by Ken'ichi Handa
+Update/Add - January  1990 by Shigeki Yoshida
+Update/Add - March    1992 by Kenichi HANDA
diff --git a/etc/TUTORIAL.ko b/etc/TUTORIAL.ko
new file mode 100644 (file)
index 0000000..6033958
--- /dev/null
@@ -0,0 +1,776 @@
+                      ==============================
+                      \e$(C@O:;>n\e(B GNUEMACS(Mule) \e$(C@T9.Fm\e(B
+                      ==============================
+
+\e$(CAV@G\e(B:          \e$(C@L\e(B \e$(C@T9.Fm@:\e(B, "\e$(C9h?l1b:84Y\e(B \e$(C@M<wGXAv1b\e(B"\e$(C8&\e(B \e$(C8pEd7N\e(B \e$(C@[<:5G>n\e(B
+               \e$(C@V=@4O4Y\e(B. ">>" \e$(C7N:NEM\e(B \e$(C=C@[GO4B\e(B \e$(CG`@:\e(B, \e$(C1W\e(B \e$(C6'\e(B \e$(C9+>y@;\e(B \e$(CGX>_\e(B
+               \e$(CGO4B0!8&\e(B \e$(CAv=CGO0m\e(B \e$(C@V=@4O4Y\e(B.
+
+     Mule \e$(C@G\e(B \e$(C8m7I>n8&\e(B \e$(C@T7BGR\e(B \e$(C6'?!4B\e(B, \e$(C@O9]@{@87N\e(B \e$(CD\F.7Q\e(B*\e$(CE0\e(B(\e$(CE0\e(B*\e$(CEi?!\e(B,
+CTRL \e$(C6G4B\e(B, CTL \e$(C6s0m\e(B \e$(C=a@V4Y\e(B)\e$(C3*\e(B \e$(C8^E8\e(B*\e$(CE0\e(B(\e$(C:8Ek\e(B, \e$(C@L=:DI@LGA\e(B*\e$(CE08&\e(B \e$(C;g?kGQ4Y\e(B)\e$(C0!\e(B
+\e$(C;g?k5K4O4Y\e(B. \e$(C1W7!<-\e(B, CONTROL \e$(C@L6s5g0!\e(B META \e$(C6s0m\e(B \e$(C>24B\e(B \e$(C4k=E?!\e(B, \e$(C4Y@=0z00@:\e(B
+\e$(C1bH#8&\e(B \e$(C;g?kGO4B\e(B \e$(C0M@87N\e(B \e$(CGU4O4Y\e(B.
+
+C-<\e$(C9.@Z\e(B>       \e$(CD\F.7Q\e(B*\e$(CE08&\e(B \e$(C4)8%C$\e(B, <\e$(C9.@Z\e(B>\e$(CE08&\e(B \e$(C4)8(4O4Y\e(B. \e$(C?98&\e(B \e$(C5i8i\e(B,
+               C-f \e$(C4B\e(B, \e$(CD\F.7Q\e(B*\e$(CE08&\e(B \e$(C4)8#8i<-\e(B f \e$(CE08&\e(B \e$(C4)8#4B\e(B \e$(C0M@;\e(B
+               \e$(C@G9LGU4O4Y\e(B.
+<<Blank lines inserted here by startup of help-with-tutorial>>
+       >> \e$(C1W7/8i\e(B, C-v (View Next Screen; \e$(C4Y@=@G\e(B \e$(CH-8i@;\e(B \e$(C:;4Y\e(B) \e$(C8&\e(B \e$(CE8@LGA\e(B
+          \e$(CGO?)\e(B \e$(C:8<<?d\e(B. \e$(C4Y@=@G\e(B \e$(CH-8i@87N\e(B \e$(C0%\e(B \e$(C<v\e(B \e$(C@V=@4O4Y\e(B.
+         From now on, you'll be expected to do this whenever you finish
+         reading the screen.
+
+ESC <\e$(C9.@Z\e(B>     \e$(C@L=:DI@LGA\e(B*\e$(CE08&\e(B \e$(C4)8#0m3*<-\e(B, \e$(C1W\e(B \e$(C5Z\e(B <\e$(C9.@Z\e(B>\e$(CE08&\e(B \e$(C4)8(4O4Y\e(B.
+
+\e$(CAV@G\e(B:          <\e$(C9.@Z\e(B>\e$(C4B\e(B, \e$(C4k9.@Z3*\e(B \e$(C<R9.@Z4B\e(B \e$(C8m7I>n7N<-4B\e(B \e$(C00@:\e(B \e$(C@G9L0!\e(B
+               \e$(C5K4O4Y\e(B. \e$(C8^E8E08&\e(B \e$(C;g?kGR\e(B \e$(C<v\e(B \e$(C@V@88i\e(B ESC <\e$(C9.@Z\e(B> \e$(C4k=E?!\e(B M-
+               <\e$(C9.@Z\e(B> (\e$(C8^E8E08&\e(B \e$(C4)8%C$\e(B<\e$(C9.@Z\e(B>\e$(CE08&\e(B \e$(C4)8%4Y\e(B) \e$(C8&\e(B \e$(C;g?kGR\e(B \e$(C<v\e(B
+              \e$(C@V=@4O4Y\e(B.
+
+\e$(CA_?dGU4O4Y\e(B:    Emacs\e$(C8&\e(B \e$(CA>7a=CE00m\e(B \e$(C=M@;\e(B \e$(C6'4B\e(B, C-x C-c \e$(C8&\e(B \e$(CE8@LGAGU4O4Y\e(B.
+              Emacs\e$(C8&\e(B csh\e$(C7N:NEM\e(B \e$(C1b5?GO0m\e(B \e$(C@V4B\e(B \e$(C0f?l\e(B, \e$(C<-=:Ff5eGO4B\e(B(\e$(C@O=C\e(B
+               \e$(C@{@87N\e(B \e$(CA_4\GQ4Y\e(B)\e$(CGR\e(B \e$(C<v0!\e(B \e$(C@V=@4O4Y\e(B. Emacs\e$(C8&\e(B \e$(C<-=:Ff5eGO4B\e(B
+               \e$(C5%4B\e(B, C-z\e$(C8&\e(B \e$(CE8@LGAGU4O4Y\e(B.
+
+     \e$(C1W7/8i\e(B, \e$(C@LA&:NEM4B\e(B, \e$(CGQH-8i@;\e(B \e$(C4Y\e(B \e$(C@P>z@88i\e(B, C-v \e$(C8&\e(B \e$(C@T7BGO?)\e(B \e$(CAV<<?d\e(B.
+
+     \e$(C>U@G\e(B \e$(CH-8i0z\e(B \e$(C4Y@=\e(B \e$(CH-8i?!4B\e(B, \e$(CG%=C5G4B\e(B \e$(C3;?k?!\e(B \e$(C8nG`@G\e(B \e$(C9.@L\e(B \e$(CA_:95G0m\e(B
+\e$(C@V=@4O4Y\e(B. \e$(CG%=C5G0m\e(B \e$(C@V4B\e(B \e$(C3;?k@L\e(B \e$(C?,<S5G>n\e(B \e$(C@V4B\e(B \e$(C0M@;\e(B \e$(C>K\e(B \e$(C<v\e(B \e$(C@V557O\e(B \e$(CGO1b\e(B \e$(C@'\e(B
+\e$(CGQ\e(B \e$(C0M@T4O4Y\e(B.
+
+
+     \e$(C$^8U@z\e(B, \e$(CH-@O\e(B \e$(C<S@;\e(B \e$(C@L5?GO?)\e(B \e$(C0!4B\e(B \e$(C9f9}@;\e(B \e$(C>K\e(B \e$(CGJ?d0!\e(B \e$(C@V=@4O4Y\e(B. C-v 
+\e$(C?!\e(B \e$(C@GGO?)\e(B \e$(C>U@87N\e(B \e$(CAxG`GO4B\e(B \e$(C0M@:\e(B \e$(C@L9L\e(B \e$(C>K>R=@4O4Y\e(B. \e$(C?x7!@G\e(B \e$(C@Z8.7N\e(B \e$(C5G59>F\e(B
+\e$(C0!4B5%4B\e(B, ESC v \e$(C8&\e(B \e$(CE8@LGAGU4O4Y\e(B.
+
+      >> ESC v \e$(C?M\e(B C-v \e$(C8&\e(B \e$(C;g?kGO?)\e(B, \e$(C@|HD7N\e(B \e$(C@L5?GO4B\e(B \e$(C0M@;\e(B \e$(C8n9x\e(B \e$(C=C55GO?)\e(B 
+         \e$(C:8<<?d\e(B.
+
+\e$(C?d>`\e(B
+====
+     \e$(CH-@O@;\e(B \e$(CH-8i4\@'7N\e(B \e$(C:80m\e(B \e$(C0!4B5%4B\e(B, \e$(C4Y@=@G\e(B \e$(C8m7I>n8&\e(B \e$(C;g?kGU4O4Y\e(B.
+
+     C-v     \e$(C>U@87N\e(B \e$(CGQ\e(B \e$(CH-8i:P\e(B \e$(CAxG`GQ4Y\e(B
+     ESC v   \e$(C5Z7N\e(B \e$(CGQ\e(B \e$(CH-8i:P\e(B \e$(C5G59>F0#4Y\e(B
+     C-l     \e$(CH-8i@;\e(B \e$(C4Y=C>44Y\e(B. \e$(C@L\e(B \e$(C6'\e(B, \e$(C?x7!\e(B \e$(CD?<-0!\e(B \e$(C@V>z4x\e(B \e$(CG`@L\e(B
+             \e$(CH-8i@G\e(B \e$(CA_>S?!\e(B \e$(C?@557O\e(B \e$(CGQ4Y\e(B
+
+       >> \e$(CAv1]\e(B \e$(CD?<-0!\e(B \e$(C>n5p?!\e(B \e$(C@V4B0!\e(B, \e$(C1W\e(B \e$(C1YC3?!\e(B \e$(C>n62\e(B \e$(CEX=:F.0!\e(B \e$(C=aA.\e(B \e$(C@V4B\e(B
+          \e$(C0!8&\e(B \e$(C1b>oGO<<?d\e(B. C-l \e$(C8&\e(B \e$(CE8@LGAGO0m\e(B, \e$(CD?<-0!\e(B \e$(C>n5p7N\e(B \e$(C@L5?GO?44B\e(B
+         \e$(C0!\e(B, \e$(C1W\e(B \e$(C1YC3@G\e(B \e$(CEX=:F.4B\e(B \e$(C>n6;0T\e(B \e$(C5G>z4B0!8&\e(B \e$(CA6;gGO?)\e(B \e$(C:8<<?d\e(B.
+
+\e$(C1b:;@{@N\e(B \e$(CD?<-@G\e(B \e$(CA&>n\e(B
+======================
+
+     \e$(CH-8i4\@'@G\e(B \e$(C@L5?@:\e(B \e$(CGR\e(B \e$(C<v\e(B \e$(C@V0T\e(B \e$(C5G>z=@4O4Y\e(B. \e$(C@LA&4B\e(B, \e$(CH-8i\e(B \e$(C3;?!<-\e(B, \e$(CF/\e(B
+\e$(CA$@G\e(B \e$(C@e<R7N\e(B \e$(C@L5?GO1b\e(B \e$(C@'GQ\e(B \e$(C9f9}@;\e(B \e$(C@MH|=C4Y\e(B. \e$(C@L0M?!4B\e(B \e$(C8n0!Av@G\e(B \e$(C9f9}@L\e(B \e$(C@V\e(B
+\e$(C=@4O4Y\e(B.  \e$(CGQ0!Av\e(B \e$(C9f9}@:\e(B, \e$(C@|\e(B(previous)\e$(CHD\e(B(next)\e$(C>U\e(B(forward)\e$(C5Z\e(B(backward)\e$(C7N\e(B 
+\e$(C@L5?GO4B\e(B \e$(C8m7I>n8&\e(B \e$(C;g?kGO4B\e(B \e$(C0M@T4O4Y\e(B. \e$(C@L5i@G\e(B \e$(C8m7I>n4B\e(B \e$(C0"0"\e(B, C-p, C-n,
+C-f, C-b \e$(C?!\e(B \e$(CGR4g5G>n\e(B \e$(C@V0m\e(B, \e$(CGv@g@G\e(B \e$(C@e<R7N:NEM\e(B \e$(C;u7N?n\e(B \e$(C@e<R7N\e(B \e$(CD?<-8&\e(B \e$(C@L5?\e(B
+\e$(C=CE54O4Y\e(B.  \e$(C1W82@87N\e(B \e$(C1W8.8i\e(B,
+
+
+                              \e$(C@L@|@G\e(B \e$(CG`\e(B, C-p
+                                    :
+                                    :
+     \e$(C5Z@G\e(B \e$(C9.@Z\e(B, C-b ....  \e$(CGv@g@G\e(B \e$(CD?<-@'D!\e(B ....  \e$(C@|9f@G\e(B \e$(C9.@Z\e(B, C-f
+                                    :
+                                    :
+                               \e$(C4Y@=\e(B \e$(CG`\e(B, C-n
+
+
+     \e$(C@L5i@:\e(B, \e$(C0"0"\e(B, Previous, Next, Backward, Forward \e$(C@G\e(B \e$(C8S8.9.@Z7N\e(B \e$(C5G\e(B
+\e$(C>n\e(B \e$(C@V@89G7N\e(B, \e$(C?\?l1b\e(B \e$(C=,?o\e(B \e$(C0M@T4O4Y\e(B. \e$(C@L5i@:\e(B, \e$(C1b:;@{@N\e(B \e$(CD?<-@L5?\e(B \e$(C8m7I>n@L0m\e(B
+, \e$(C@ZAV\e(B \e$(C;g?kGO4B\e(B \e$(C0M@T4O4Y\e(B.
+
+       >> C-n \e$(C@;\e(B \e$(C8nH8A$55\e(B \e$(CE8@LGAGO0m\e(B, (\e$(CAv1]\e(B, \e$(C4g=E@L\e(B \e$(C@P0m\e(B \e$(C@V4B\e(B) \e$(C@L\e(B \e$(CG`1n\e(B
+          \e$(CAv\e(B \e$(CD?<-8&\e(B \e$(C@L5?=CE0<<?d\e(B.
+
+       >> C-f \e$(C8&\e(B \e$(C;g?kGO?)\e(B \e$(CG`@G\e(B \e$(CA_0#A$557N\e(B \e$(C@L5?GO0m\e(B, C-p \e$(C@87N\e(B \e$(C8nG`A$55\e(B
+          \e$(C@'7N\e(B \e$(C@L5?GO?)\e(B \e$(C:8<<?d\e(B. \e$(CD?<-@'D!@G\e(B \e$(C:/H-?!\e(B \e$(CAV@GGO<<?d\e(B.
+
+       >> \e$(CG`@G\e(B \e$(C<15N?!<-\e(B C-b \e$(C8&\e(B \e$(CE8@LGAGO?)\e(B \e$(C:8<<?d\e(B. \e$(CD?<-4B\e(B \e$(C>n5p7N\e(B \e$(C@L5?GU\e(B
+          \e$(C4O1n\e(B? \e$(C4Y=C\e(B \e$(CA61]\e(B \e$(C4u\e(B C-b \e$(C8&\e(B \e$(CE8@LGAGO0m\e(B, \e$(C@L9x@:\e(B C-f \e$(C7N\e(B \e$(CG`3!\e(B \e$(CBJ\e(B
+         \e$(C@87N\e(B \e$(C5G59>F0!<<?d\e(B. \e$(CD?<-0!\e(B \e$(CG`3!@;\e(B \e$(C3Q@88i\e(B \e$(C>n6;0T\e(B \e$(C5K4O1n\e(B?
+
+
+     \e$(CH-8i@G\e(B \e$(C<15N3*\e(B \e$(C8;9L8&\e(B \e$(C3Q>n<-\e(B \e$(CD?<-8&\e(B \e$(C@L5?=CE07A0m\e(B \e$(CGO8i\e(B, \e$(C1W\e(B \e$(C9fGb?!\e(B 
+\e$(C@V4B\e(B \e$(CEX=:F.0!\e(B \e$(C@L5?GO?)\e(B \e$(C?@0m\e(B, \e$(CD?<-4B\e(B \e$(CGW;s\e(B \e$(CH-8i3;?!\e(B \e$(C@V557O\e(B \e$(C5K4O4Y\e(B.
+
+       >> C-n \e$(C@;\e(B \e$(C;g?kGO?)\e(B, \e$(CD?<-8&\e(B \e$(CH-8i@G\e(B \e$(CGO4\:84Y\e(B \e$(C9X@87N\e(B \e$(C@L5?=CDQ\e(B \e$(C:8<<\e(B
+          \e$(C?d\e(B. \e$(C9+>y@L\e(B \e$(C@O>n334O1n\e(B? \e$(CD?<-@G\e(B \e$(C@'D!4B\e(B \e$(C>n6;0T\e(B \e$(C:/GO?4=@4O1n\e(B?
+
+     \e$(CGQ9.@Z\e(B \e$(C4\@'@G\e(B \e$(C@L5?@87N4B\e(B \e$(C9x0E7S4Y0m\e(B \e$(C;}0"5G8i\e(B, \e$(C4\>n4\@'7N\e(B \e$(C@L5?GR\e(B 
+\e$(C<v55\e(B \e$(C@V=@4O4Y\e(B. ESC f \e$(C7N\e(B \e$(CGQ\e(B \e$(C4\>n:P\e(B \e$(C>U@87N\e(B \e$(CAxG`GO0m\e(B, ESC b \e$(C7N\e(B \e$(CGQ\e(B \e$(C4\>n:P\e(B 
+\e$(C@L@|@87N\e(B \e$(C5G59>F0)4O4Y\e(B.
+
+\e$(CAV@G\e(B:           \e$(C@O:;>n?!\e(B \e$(C4kGX<-4B\e(B, \e$(C4\>n@G\e(B \e$(C2w4B\e(B \e$(C4\@'@;\e(B \e$(C@N=DGR\e(B \e$(C<v\e(B \e$(C>x=@4O\e(B
+                \e$(C4Y88\e(B, \e$(C@G;g@{@N\e(B \e$(C9.@}@;\e(B \e$(C4\>n@G\e(B \e$(C2w4B\e(B \e$(C4\@'7N<-\e(B \e$(CGO0m\e(B \e$(C@V=@4O\e(B
+               \e$(C4Y\e(B.
+
+       >> ESC f \e$(C3*\e(B ESC b \e$(C8&\e(B \e$(C8nH8A$55\e(B \e$(CE8@LGAGO?)\e(B \e$(C:8<<?d\e(B. C-f \e$(C3*\e(B C-b \e$(C?M\e(B 
+          \e$(C:4?kGO?)\e(B \e$(C:8<<?d\e(B.
+
+     C-f \e$(C3*\e(B C-b \e$(C?!\e(B \e$(C4kGQ\e(B, ESC f \e$(C3*\e(B ESC b \e$(C@G\e(B \e$(C@/;g<:?!\e(B \e$(CAV8qGO<<?d\e(B. \e$(C4k:N:P\e(B
+\e$(C@G\e(B \e$(C0f?l\e(B, ESC <\e$(C9.@Z\e(B>\e$(C4B\e(B \e$(C9.<-0|0h@G\e(B \e$(CC38.?!\e(B \e$(C;g?k5G0m\e(B, \e$(CGQFm\e(B C-<\e$(C9.@Z\e(B>\e$(C4B\e(B \e$(C1W0M\e(B
+\e$(C:84Y55\e(B \e$(C4u?m\e(B \e$(C1b:;@{@N\e(B \e$(C4k;s\e(B(\e$(C9.@Z6s5g0!\e(B \e$(CG`@L6s5g0!\e(B)\e$(C?!\e(B \e$(C4kGQ\e(B \e$(CA6@[?!\e(B \e$(C;g?k5K\e(B
+\e$(C4O4Y\e(B.
+
+     C-a \e$(C?M\e(B C-e \e$(C55\e(B \e$(C>K0m\e(B \e$(C@V@88i\e(B \e$(CFm8.GQ\e(B \e$(C8m7I>n@T4O4Y\e(B. C-a \e$(C4B\e(B \e$(CD?<-8&\e(B \e$(CG`@G\e(B 
+\e$(C<15N7N\e(B \e$(C@L5?=CE00m\e(B, C-e \e$(C4B\e(B \e$(CG`@G\e(B \e$(C3!@87N\e(B \e$(C@L5?=CE54O4Y\e(B.
+
+       >> C-a \e$(C8&\e(B 2\e$(CH8\e(B, \e$(C1W8.0m3*<-\e(B C-e \e$(C8&\e(B 2\e$(CH8\e(B \e$(C@T7BGO?)\e(B \e$(C:8<<?d\e(B. \e$(C@L5i@G\e(B \e$(C8m\e(B
+          \e$(C7I>n8&\e(B 2\e$(CH8@L;s\e(B \e$(C9]:9GO4u6s55\e(B, \e$(CD?<-4B\e(B \e$(C1W\e(B \e$(C@L;s\e(B \e$(C@L5?GOAv\e(B \e$(C>J4B\e(B \e$(C0M\e(B
+          \e$(C?!\e(B \e$(CAV@G\e(B.
+
+     \e$(C5N0!Av\e(B \e$(C4u\e(B, \e$(C0#4\GQ\e(B \e$(CD?<-\e(B \e$(C@L5?\e(B \e$(C8m7I>n0!\e(B \e$(C@V=@4O4Y\e(B. \e$(CH-@O@G\e(B \e$(C<15N7N\e(B \e$(C@L5?\e(B
+\e$(CGO4B\e(B ESC < \e$(C?M\e(B, \e$(CH-@O@G\e(B \e$(C3!@87N\e(B \e$(C@L5?GO4B\e(B ESC > \e$(C@T4O4Y\e(B.
+
+     \e$(CEX=:F.\e(B \e$(C3;?!<-\e(B, \e$(CD?<-0!\e(B \e$(CA8@gGO4B\e(B \e$(C@'D!8&\e(B "\e$(CFw@NF.\e(B"\e$(C6s0m\e(B \e$(C:N8(4O4Y\e(B. \e$(C9Y2Y\e(B
+\e$(C>n\e(B \e$(C8;GO8i\e(B, \e$(CD?<-4B\e(B, \e$(CEX=:F.@G\e(B \e$(C>n5p?!\e(B \e$(C@V4B0!8&\e(B \e$(CH-8i@'?!\e(B \e$(C3*E83;0m\e(B \e$(C@V4B\e(B \e$(C0M\e(B
+\e$(C@T4O4Y\e(B.
+
+     \e$(C>F7!?!\e(B \e$(C4\<xGQ\e(B \e$(C@L5?A6@[?!\e(B \e$(C4kGX<-\e(B \e$(C?d>`GU4O4Y\e(B. \e$(C@L\e(B \e$(CA_?!4B\e(B, \e$(C4\>n3*\e(B \e$(CG`\e(B
+\e$(C4\@'7N@G\e(B \e$(C@L5?8m7I>n55\e(B \e$(CFwGT5G>n\e(B \e$(C@V=@4O4Y\e(B.
+
+     C-f     \e$(CGQ\e(B \e$(C9.@Z\e(B \e$(C>U@87N\e(B \e$(CAxG`GQ4Y\e(B
+     C-b     \e$(CGQ\e(B \e$(C9.@Z\e(B \e$(C5Z7N\e(B \e$(C5G59>F0#4Y\e(B
+
+     ESC f   \e$(CGQ\e(B \e$(C4\>n\e(B \e$(C>U@87N\e(B \e$(CAxG`GQ4Y\e(B
+     ESC b   \e$(CGQ\e(B \e$(C4\>n\e(B \e$(C5Z7N\e(B \e$(C5G59>F0#4Y\e(B
+
+     C-n     \e$(C4Y@=\e(B \e$(CG`@87N\e(B \e$(C@L5?\e(B
+     C-p     \e$(C@L@|\e(B \e$(CG`@87N\e(B \e$(C@L5?\e(B
+
+     ESC ]   \e$(C4\6t@G\e(B \e$(C3!@87N\e(B \e$(C@L5?\e(B
+     ESC [   \e$(C4\6t@G\e(B \e$(C<15N7N\e(B \e$(C@L5?\e(B
+
+     C-a     \e$(CG`@G\e(B \e$(CCVCJ7N\e(B \e$(C@L5?\e(B
+     C-e     \e$(CG`@G\e(B \e$(CCVHD7N\e(B \e$(C@L5?\e(B
+
+     ESC <   \e$(CH-@O@G\e(B \e$(CCVCJ7N\e(B \e$(C@L5?\e(B
+     ESC >   \e$(CH-@O@G\e(B \e$(CCVHD7N\e(B \e$(C@L5?\e(B
+
+       >> \e$(C0"0"@G\e(B \e$(C8m7I>n8&\e(B \e$(C=C55GO?)\e(B \e$(C:8<<?d\e(B. \e$(C@L5i@G\e(B \e$(C8m7I>n4B\e(B, \e$(C0!@e\e(B \e$(C@ZAV\e(B
+          \e$(C;g?k5G4B\e(B \e$(C0M@T4O4Y\e(B. \e$(CCVHD@G\e(B \e$(C5N0!Av4B\e(B, \e$(C@L\e(B \e$(C@e<R?M4B\e(B \e$(C63>nAx\e(B \e$(C0w@8\e(B
+          \e$(C7N\e(B \e$(C@L5?GO1b\e(B \e$(C6'9.?!\e(B, C-v \e$(C3*\e(B ESC v \e$(C8&\e(B \e$(C;g?kGO?)\e(B \e$(C?)1b7N\e(B \e$(C5G59>F\e(B
+         \e$(C?@557O\e(B \e$(CGO<<?d\e(B.
+
+     Emacs\e$(C@G\e(B \e$(C4Y8%\e(B \e$(C8m7I?M\e(B \e$(C6H00@L\e(B, \e$(C@L5i@G\e(B \e$(C8m7I>n?!4B\e(B, \e$(C9]:9H8<v8&\e(B \e$(CAvA$GO\e(B
+\e$(C4B\e(B \e$(C@N<v8&\e(B \e$(CAY\e(B \e$(C<v\e(B \e$(C@V=@4O4Y\e(B. \e$(C@L8&\e(B \e$(C@'GX<-4B\e(B, \e$(C8m7I>n8&\e(B \e$(C@T7BGO1b\e(B \e$(C@|?!\e(B, C-u
+\e$(C?!\e(B \e$(C@L>n<-\e(B \e$(C9]:9GO4B\e(B \e$(CH8<v8&\e(B \e$(C@T7BGU4O4Y\e(B.
+
+     \e$(CNc?98&\e(B \e$(C5i8i\e(B, C-u 8 C-f \e$(C6s0m\e(B \e$(CGO8i\e(B, 8\e$(C9.@Z:P\e(B \e$(C>U@87N\e(B \e$(C@L5?GU4O4Y\e(B.
+
+       >> C-n \e$(CH$@:\e(B C-p \e$(C?!\e(B \e$(C@{4gGQ\e(B \e$(C@N<v8&\e(B \e$(CAvA$GO0m\e(B, \e$(C@OH8@G\e(B \e$(C@L5?@87N\e(B \e$(C0!4I\e(B
+          \e$(CGQGQ\e(B, \e$(C@L\e(B \e$(CG`@G\e(B \e$(C1YC3?!\e(B \e$(C?@557O\e(B \e$(CGO?)\e(B \e$(C:8<<?d\e(B.
+
+     C-v \e$(C3*\e(B ESC v \e$(C?!\e(B \e$(C4kGX<-4B\e(B \e$(CA61]\e(B \e$(C4Y8(4O4Y\e(B. \e$(C@L\e(B \e$(C0f?l\e(B, \e$(CAvA$5H\e(B \e$(C<v@G\e(B \e$(CG`88\e(B
+\e$(CH-8i@;\e(B \e$(C@L5?GO4B\e(B \e$(C0M@L\e(B \e$(C5K4O4Y\e(B.
+
+       >> C-u 3 C-v \e$(C6s0m\e(B \e$(C@T7BGO?)\e(B \e$(C:8<<?d\e(B.
+
+     \e$(C?x7!\e(B \e$(C@Z8.7N\e(B \e$(C5G59>F0!4B5%4B\e(B, C-u 3 ESC v \e$(C8&\e(B \e$(C;g?kGO8i\e(B \e$(C5K4O4Y\e(B.
+
+\e$(CA_Av8m7I>n\e(B
+==========
+
+     C-g \e$(C6s4B\e(B \e$(C8m7I>n@L8g\e(B, \e$(C@T7B@;\e(B \e$(CGJ?d7N\e(B \e$(CGO4B\e(B \e$(C0M0z\e(B \e$(C00@:\e(B \e$(C8m7I>n8&\e(B \e$(CA_AvGR\e(B 
+\e$(C<v\e(B \e$(C@V=@4O4Y\e(B. \e$(C?98&\e(B \e$(C5i8i\e(B, \e$(C@N<v8&\e(B \e$(C@T7BGO0m\e(B \e$(C@V4B\e(B \e$(C55A_@L3*\e(B, 2\e$(C03\e(B \e$(C@L;s@G\e(B \e$(CE0@T\e(B
+\e$(C7B@;\e(B \e$(CGJ?d7N\e(B \e$(CGO4B\e(B \e$(C8m7I>n8&\e(B \e$(CGQC"\e(B \e$(C@T7BGO0m\e(B \e$(C@V4B\e(B \e$(C55A_?!\e(B, \e$(C1W0M@;\e(B \e$(CA_AvGO0m\e(B \e$(C=M\e(B
+\e$(C@88i\e(B, C-g \e$(C8&;g?kGO8i\e(B \e$(C5K4O4Y\e(B.
+
+       >> C-u 100 \e$(C8&\e(B \e$(CE8@LGAGO?)\e(B \e$(C@N<v8&\e(B 100\e$(C@87N\e(B \e$(C<3A$GO0m\e(B, C-g \e$(C8&\e(B \e$(CE8@LGA\e(B
+          \e$(CGO<<?d\e(B. \e$(C1W\e(B \e$(C5Z?!\e(B C-f \e$(C8&\e(B \e$(CE8@LGAGO?)\e(B \e$(C:8<<?d\e(B. \e$(C8n9.@Z\e(B \e$(C@L5?GO?4=@\e(B
+         \e$(C4O1n\e(B? \e$(C88>`\e(B, \e$(C@_8xGO?)\e(B ESC \e$(C8&\e(B \e$(C@T7BGX\e(B \e$(C9v7H@;\e(B \e$(C6'55\e(B, C-g \e$(C8&\e(B \e$(C@T7BGO\e(B
+          \e$(C8i\e(B \e$(CCk<R=CE3\e(B \e$(C<v\e(B \e$(C@V=@4O4Y\e(B.
+
+\e$(C?!7/\e(B
+====
+
+     \e$(C6'7N4B\e(B, Emacs\e$(C?!<-\e(B \e$(CGc?k5G0m\e(B \e$(C@VAv\e(B \e$(C>J4B\e(B \e$(CA6@[@;\e(B \e$(CGX9v8.4B\e(B \e$(C@{@L\e(B \e$(C@V=@4O\e(B
+\e$(C4Y\e(B. \e$(C?98&\e(B \e$(C5i8i\e(B, \e$(C8m7I>n0!\e(B \e$(CA$@G5G>n\e(B \e$(C@VAv\e(B \e$(C>J4B\e(B \e$(CD\F.7Q\e(B*\e$(CE08&\e(B \e$(C@T7BGX\e(B \e$(C9v80\e(B \e$(C6'\e(B
+\e$(C?!4B\e(B, Emacs\e$(C4B\e(B \e$(C:'@;\e(B \e$(C?o8.0m\e(B, \e$(C1W8.0m\e(B, \e$(CH-8i@G\e(B \e$(CA&@O\e(B \e$(C9X?!\e(B, \e$(C9+>y@L\e(B \e$(C3*;&4B\e(B \e$(C0!\e(B
+\e$(C8&\e(B \e$(CG%=CGU4O4Y\e(B.
+
+     Emacs \e$(C9vA/?!\e(B \e$(C5{6s<-4B\e(B, \e$(C@L\e(B \e$(C@T9.Fm?!\e(B \e$(C>2?)A.\e(B \e$(C@V4B\e(B \e$(C0M@;\e(B \e$(C=GG`GR\e(B \e$(C<v\e(B \e$(C>x\e(B
+\e$(C4B\e(B \e$(C0f?l0!\e(B \e$(C@V@;\e(B \e$(C<v\e(B \e$(C@V=@4O4Y\e(B. \e$(C1W?M\e(B \e$(C00@:\e(B \e$(C0f?l?!4B\e(B, \e$(C?!7/8^<<Av0!\e(B \e$(CG%=C5G9G\e(B
+\e$(C7N\e(B, \e$(C>n4@\e(B \e$(C0M@N0!\e(B \e$(C@L5?E08&\e(B \e$(C4)8#0m\e(B, \e$(C1W\e(B \e$(C4Y@=@G\e(B \e$(C:N:P@87N\e(B \e$(CAxG`GO?)\e(B \e$(CAV<<?d\e(B.
+
+\e$(C@)55?l\e(B
+======
+
+     Emacs\e$(C4B\e(B \e$(C8n03@G\e(B \e$(C@)55?l8&\e(B \e$(C0!Av4B\e(B \e$(C0M0z\e(B, \e$(C1W\e(B \e$(C0"0"?!\e(B \e$(C4kGO?)\e(B \e$(CEX=:F.8&\e(B \e$(CG%\e(B
+\e$(C=CGR\e(B \e$(C<v\e(B \e$(C@V=@4O4Y\e(B. \e$(CGoGA3*\e(B, \e$(C8n0!Av@G\e(B \e$(C8m7I>n7N:NEM@G\e(B \e$(CCb7B@;\e(B \e$(CG%=CGO1b\e(B \e$(C@'GO\e(B
+\e$(C?)\e(B \e$(C3*E83-\e(B \e$(C?):P@G\e(B \e$(C@)55?l8&\e(B \e$(CAv?l1b\e(B \e$(C@'GO?)\e(B, \e$(C4Y@=@G\e(B \e$(C8m7I>n8&\e(B \e$(C>K\e(B \e$(CGJ?d0!\e(B \e$(C@V=@\e(B
+\e$(C4O4Y\e(B.
+
+     C-x 1                \e$(C@)55?l8&\e(B 1\e$(C037N\e(B \e$(CGQ4Y\e(B.
+
+     C-x 1 \e$(C4B\e(B, \e$(C4Y8%\e(B \e$(C@)55?l8&\e(B \e$(CAv?l0m\e(B, \e$(CD?<-0!\e(B \e$(C@V4B\e(B \e$(C@)55?l8&\e(B, \e$(CH-8i@|C<7N\e(B 
+\e$(CH.@eGU4O4Y\e(B.
+
+       >> \e$(CD?<-8&\e(B \e$(C@L\e(B \e$(CG`?!\e(B \e$(C0.0m\e(B \e$(C?M<-\e(B, C-u 0 C-l \e$(C@L6s0m\e(B \e$(CE8@LGAGU4O4Y\e(B.
+
+       >> C-h k C-f \e$(C6s0m\e(B \e$(CE8@LGAGO<<?d\e(B. \e$(C;u7N?n\e(B \e$(C@)55?l0!\e(B C-f \e$(C8m7I>n@G\e(B \e$(C55\e(B
+          \e$(CE%8UF.8&\e(B \e$(CG%=CGO1b\e(B \e$(C@'GO?)\e(B \e$(C3*E8320z\e(B \e$(C5?=C?!\e(B, \e$(C@L\e(B \e$(C@)55?l0!\e(B \e$(C>n6;0T\e(B
+          \e$(CAY>n5e4B0!\e(B \e$(C0|B{GO<<?d\e(B.
+
+       >> C-x 1\e$(C@L6s0m\e(B \e$(CE8@LGAGO0m\e(B, \e$(C55E%8UF.0!\e(B \e$(C3*E8354x\e(B \e$(C@)55?l8&\e(B \e$(CAv?l<<\e(B
+          \e$(C?d\e(B.
+
+\e$(C;p@T0z\e(B \e$(C;hA&\e(B
+===========
+
+     \e$(CEX=:F.8&\e(B \e$(CE8@LGAGO0m\e(B \e$(C=M@88i\e(B, \e$(C4\<xHw\e(B \e$(C1W0M@;\e(B \e$(CE8@LGAGO4B\e(B \e$(C0M88@87N\e(B \e$(C1&\e(B
+\e$(CBz=@4O4Y\e(B. \e$(C4+?!\e(B \e$(C:8@L4B\e(B \e$(C9.@Z\e(B ('A','7','*','\e$(C$"\e(B'\e$(C5n\e(B)\e$(C@:\e(B Emacs\e$(C?!\e(B \e$(C@GGO?)\e(B \e$(CEX=:\e(B
+\e$(CF.6s0m\e(B \e$(C0#AV5G0m\e(B,\e$(C1W4k7N\e(B \e$(C;p@T5K4O4Y\e(B. \e$(CG`@G\e(B \e$(C3!@:\e(B \e$(C03G`9.@Z7N\e(B \e$(C3*E83*0m\e(B, \e$(C@L\e(B
+\e$(C0M@;\e(B \e$(C@T7BGO4B5%4B\e(B<Return> \e$(C@;\e(B \e$(CE8@LGAGU4O4Y\e(B.
+
+     \e$(CAw@|?!\e(B \e$(C@T7BGQ\e(B \e$(C9.@Z8&\e(B \e$(C;hA&GO4B5%4B\e(B, <Delete> \e$(C8&\e(B \e$(C@T7BGU4O4Y\e(B. 
+<Delete> \e$(C4B\e(B,\e$(CE0:85e?!<-\e(B "Delete"\e$(C6s0m\e(B \e$(C=a@V4B\e(B \e$(CE08&\e(B \e$(C4-7/<-\e(B \e$(C@T7BGU4O4Y\e(B. 
+"Delete" \e$(C4k=E?!\e(B"Rubout"\e$(C6s0m\e(B \e$(C=a@V@;\e(B \e$(CAv55\e(B \e$(C8p8(4O4Y\e(B. \e$(C:84Y\e(B \e$(C@O9]@{@87N\e(B,
+<Delete> \e$(C4B\e(B, \e$(CGv@gD?<-0!\e(B \e$(C@V4B\e(B \e$(C@'D!@G\e(B \e$(CAw@|@G\e(B \e$(C9.@Z8&\e(B \e$(C;hA&GU4O4Y\e(B.
+
+       >> \e$(C9.@Z8&\e(B \e$(C8n03A$55\e(B \e$(CE8@LGAGO0m\e(B, \e$(C1W8.0m3*<-\e(B \e$(C1W0M@;\e(B <Delete> \e$(C8&\e(B \e$(C;g\e(B
+          \e$(C?kGO?)\e(B \e$(C;hA&GO<<?d\e(B.
+
+       >> \e$(C?@8%BJ86Ax@;\e(B \e$(C3Q@;\e(B \e$(C6'1nAv\e(B \e$(CEX=:F.8&\e(B \e$(CE8@LGAGO<<?d\e(B. \e$(CEX=:F.0!\e(B \e$(CGQ\e(B
+          \e$(CG`@G\e(B \e$(CFx\e(B \e$(C@L;s@87N\e(B \e$(C1f0T\e(B \e$(C5G8i\e(B, \e$(C1W\e(B \e$(CG`@:\e(B \e$(CH-8i@87N:NEM\e(B \e$(C:q>nA.3*?M\e(B
+         "\e$(C0h<S\e(B"\e$(C5K4O4Y\e(B. \e$(C?l4\?!\e(B \e$(C@V4B\e(B '\'\e$(C1bH#4B\e(B, \e$(C1W\e(B \e$(CG`@L\e(B \e$(C0h<S5G0m\e(B \e$(C@V4B\e(B
+         \e$(C0M@;\e(B \e$(C3*E83;0m\e(B \e$(C@V=@4O4Y\e(B. Emacs\e$(C4B\e(B, \e$(CGv@g\e(B \e$(CFmA}A_@G\e(B \e$(C@'D!0!\e(B \e$(C:8@L\e(B
+          \e$(C557O\e(B \e$(CG`@;\e(B \e$(C=:E)7QGU4O4Y\e(B. \e$(CH-8i@G\e(B \e$(C?@8%BJ\e(B \e$(CH$@:\e(B \e$(C?^BJ@G\e(B \e$(C3!?!\e(B \e$(C@V4B\e(B
+         '\'\e$(C1bH#4B\e(B, \e$(C1W\e(B \e$(C9fGb?!\e(B \e$(CG`@L\e(B \e$(C>FAw\e(B \e$(C@L>nAv0m\e(B \e$(C@V4B\e(B \e$(C0M@;\e(B \e$(C3*E83;0m\e(B
+          \e$(C@V=@4O4Y\e(B.
+
+     \e$(C@L0M@:\e(B, \e$(C1[7N\e(B \e$(C<38mGO4B\e(B \e$(C0M:84Y\e(B \e$(C=GA&7N\e(B \e$(CGX:84B\e(B \e$(CFm@L\e(B \e$(C@_\e(B \e$(C>K\e(B \e$(C<v\e(B \e$(C@V0ZAv?d\e(B.
+
+       >> \e$(CA61]@|\e(B \e$(C@T7BGQ\e(B, \e$(C0h<S5H\e(B \e$(CG`@G\e(B \e$(C@'?!\e(B \e$(CD?<-8&\e(B \e$(C0.0m0!<-\e(B, C-d \e$(C7N\e(B \e$(CEX\e(B
+          \e$(C=:F.8&\e(B \e$(C;hA&GO0m\e(B, \e$(CEX=:F.0!\e(B \e$(CGQG`?!\e(B \e$(C5i>n0!557O\e(B \e$(CGX:8<<?d\e(B. \e$(C0h<S@;\e(B
+          \e$(C3*E83;4B\e(B '\'\e$(C1bH#4B\e(B \e$(CAv?vA3Av?d\e(B?
+
+       >> \e$(CD?<-8&\e(B \e$(CG`@G\e(B \e$(C<15N7N\e(B \e$(C@L5?GO0m\e(B, <Delete> \e$(C8&\e(B \e$(C@T7BGO<<?d\e(B. \e$(C@L0M@:\e(B 
+          \e$(C1W\e(B \e$(CG`@G\e(B \e$(CAw@|@G\e(B \e$(CG`\e(B \e$(C4\6tAv@=@;\e(B \e$(C;hA&GO9G7N\e(B, \e$(C1W\e(B \e$(CG`@L\e(B \e$(C>U@G\e(B \e$(CG`0z\e(B
+         \e$(C@L>nA.\e(B \e$(C9v834O4Y\e(B. \e$(C@L>nAx\e(B \e$(CG`@L\e(B \e$(CH-8i@G\e(B \e$(CFx:84Y\e(B \e$(C1f0T\e(B \e$(C5G8i\e(B, \e$(C0h<S\e(B
+          \e$(CG%=C0!\e(B \e$(C5G0ZAv?d\e(B.
+
+       >> <Return> \e$(C8&\e(B \e$(C4)8#0m\e(B, \e$(CGQ9x\e(B \e$(C4u\e(B \e$(CG`4\6tAv@=@;\e(B \e$(C;p@TGO<<?d\e(B.
+
+     Emacs\e$(C@G\e(B \e$(C4k:N:P@G\e(B \e$(C8m7I>n4B\e(B, \e$(C9]:9\e(B \e$(CH8<v8&\e(B \e$(CAY\e(B \e$(C<v\e(B \e$(C@V=@4O4Y\e(B. \e$(C@L0M@:\e(B, \e$(C9.\e(B
+\e$(C@Z\e(B \e$(C;p@T?!\e(B \e$(C4kGX<-55\e(B \e$(C@{?k5K4O4Y\e(B.
+
+       >> C-u 8 * \e$(C6s0m\e(B \e$(C@T7BGO?)\e(B \e$(C:8<<?d\e(B. \e$(C>n6;0T\e(B \e$(C5G>z=@4O1n\e(B?
+
+     \e$(C5N03@G\e(B \e$(CG`\e(B \e$(C;g@L?!\e(B \e$(C0x9iG`@;\e(B \e$(C885i0m\e(B \e$(C=M@:\e(B \e$(C0f?l?!4B\e(B, \e$(C5N9xB0\e(B \e$(CG`@G\e(B \e$(C<15N\e(B
+\e$(C7N\e(B \e$(C0!<-\e(B, C-o \e$(C8&\e(B \e$(C@T7BGU4O4Y\e(B.
+
+       >> \e$(C@{4gHw\e(B \e$(CG`@G\e(B \e$(C<15N?!\e(B \e$(C0!<-\e(B, \e$(C0E1b<-\e(B C-o \e$(C8&\e(B \e$(C@T7BGO?)\e(B \e$(C:8<<?d\e(B.
+
+     \e$(C@L0M@87N\e(B, Emacs\e$(C?!<-\e(B, \e$(CEX=:F.8&\e(B \e$(C@T7BGO0m\e(B, \e$(C6GGQ\e(B \e$(CF280\e(B \e$(C0M@;\e(B \e$(C<vA$GO4B\e(B 
+\e$(C0!@e\e(B \e$(C1b:;@{@N\e(B \e$(C9f9}@;\e(B \e$(C9h?n\e(B \e$(C0M@L\e(B \e$(C5G>z=@4O4Y\e(B. \e$(C9.@Z?M\e(B \e$(C00@L\e(B, \e$(C4\>n3*\e(B \e$(CG`55\e(B
+\e$(C;hA&GR\e(B \e$(C<v\e(B \e$(C@V=@4O4Y\e(B.  \e$(C;hA&A6@[?!\e(B \e$(C4kGX<-\e(B \e$(C?d>`GO8i\e(B \e$(C4Y@=0z\e(B \e$(C00=@4O4Y\e(B.
+
+     <Delete>       \e$(CD?<-Aw@|@G\e(B \e$(C9.@Z8&\e(B \e$(C;hA&\e(B
+     C-d            \e$(CD?<-0!\e(B \e$(C@V4B\e(B \e$(C9.@Z8&\e(B \e$(C;hA&\e(B
+
+     ESC <Delete>   \e$(CD?<-Aw@|@G\e(B \e$(C4\>n8&\e(B \e$(C;hA&\e(B
+     ESC d          \e$(CD?<-@'D!\e(B \e$(C@LHD?!\e(B \e$(C@V4B\e(B \e$(C4\>n8&\e(B \e$(C;hA&\e(B
+
+     C-k            \e$(CD?<-@'D!7N:NEM\e(B \e$(CG`3!1nAv8&\e(B \e$(C;hA&\e(B
+
+     \e$(C9+>y@N0!8&\e(B \e$(C;hA&GQ\e(B \e$(CHD?!\e(B, \e$(C1W0M@;\e(B \e$(C?x7!4k7N\e(B \e$(C5G598.0m\e(B \e$(C=M@;\e(B \e$(C6'0!\e(B \e$(C@V=@4O\e(B
+\e$(C4Y\e(B.  Emacs\e$(C4B\e(B, \e$(CGQ9.@Z:84Y\e(B \e$(CE+\e(B \e$(C4\@'7N\e(B \e$(C;hA&8&\e(B \e$(CG`GQ\e(B \e$(C6'?!4B\e(B, \e$(C;hA&GQ\e(B \e$(C3;?k@;\e(B 
+\e$(C:8A8GO?)\e(B \e$(C5S4O4Y\e(B.  \e$(C?x7!4k7N\e(B \e$(C5G598.4B5%4B\e(B, C-y \e$(C8&\e(B \e$(C;g?kGU4O4Y\e(B. \e$(CAV@GGX>_\e(B
+\e$(CGO4B\e(B \e$(C0M@:\e(B, C-y \e$(C8&\e(B \e$(C;hA&8&\e(B \e$(CG`GQ\e(B \e$(C@e<R88@L\e(B \e$(C>F4O6s\e(B, \e$(C>n5p?!<-6s55\e(B \e$(CGR\e(B \e$(C<v\e(B \e$(C@V4Y\e(B
+\e$(C4B\e(B \e$(C0M@T4O4Y\e(B. C-y \e$(C4B\e(B, \e$(C:8A85H\e(B \e$(CEX=:F.8&\e(B \e$(CGv@g\e(B \e$(CD?<-0!\e(B \e$(C@V4B\e(B \e$(C@e<R?!\e(B \e$(C;p@TGO1b\e(B 
+\e$(C@'GQ\e(B \e$(C8m7I>n@L9G7N\e(B, \e$(C@L0M@;\e(B \e$(C;g?kGO?)\e(B \e$(CEX=:F.8&\e(B \e$(C@L5?GR\e(B \e$(C<v\e(B \e$(C@V=@4O4Y\e(B.
+
+     \e$(C;hA&8&\e(B \e$(CG`GO4B\e(B \e$(C8m7I>n?!4B\e(B, "Delete" \e$(C8m7I>n?M\e(B, "Kill" \e$(C8m7I>n0!\e(B \e$(C@V=@\e(B
+\e$(C4O4Y\e(B.  "Kill" \e$(C8m7I>n?!<-4B\e(B \e$(C;hA&5H\e(B \e$(C0M@:\e(B \e$(C:8A85GAv88\e(B, "Delete"\e$(C?!<-4B\e(B \e$(C:8A8\e(B
+\e$(C5GAv\e(B \e$(C>J=@4O4Y\e(B.  \e$(C4\\e(B, \e$(C9]:9H8<v0!\e(B \e$(CAV>nAv8i\e(B, \e$(C:8A85K4O4Y\e(B.
+
+      >> C-n \e$(C@;\e(B 2\e$(CH8\e(B \e$(CA$55\e(B \e$(CE8@LGAGO0m\e(B, \e$(CH-8i@G\e(B \e$(C@{4gGQ\e(B \e$(C@e<R7N\e(B \e$(C@L5?GO<<?d\e(B. 
+         \e$(C1W8.0m\e(B, C-k \e$(C7N\e(B, \e$(C1W\e(B \e$(CG`@;\e(B \e$(C;hA&GO<<?d\e(B.
+
+     \e$(CC99xB0@G\e(B C-k \e$(C7N\e(B \e$(C1W\e(B \e$(CG`@G\e(B \e$(C3;?k@L\e(B \e$(C;hA&5G0m\e(B, \e$(CGQ9x4u\e(B C-k \e$(C8&\e(B \e$(C@T7BGO8i\e(B, 
+\e$(C1W\e(B \e$(CG`\e(B \e$(C@Z=E@L\e(B \e$(C;hA&5K4O4Y\e(B. \e$(C88>`\e(B, C-k \e$(C?!\e(B \e$(C9]:9H8<v8&\e(B \e$(CAvA$GQ\e(B \e$(C0f?l?!4B\e(B, \e$(C1W\e(B
+\e$(CH8<v88E-@G\e(B \e$(CG`@L\e(B(\e$(C3;?k0z\e(B \e$(CG`@Z=E0!\e(B \e$(C5?=C?!\e(B)\e$(C;hA&5K4O4Y\e(B.
+
+     \e$(CAv1]\e(B \e$(C;hA&5H\e(B \e$(CEX=:F.4B\e(B, \e$(C:8A85G0m\e(B \e$(C@V@89G7N\e(B, \e$(C1W0M@;\e(B \e$(C2t3>\e(B \e$(C<v\e(B \e$(C@V=@4O4Y\e(B.
+\e$(C@L8&\e(B \e$(C@'GX<-4B\e(B, C-y \e$(C8&\e(B \e$(CE8@LGAGU4O4Y\e(B.
+
+       >> C-y \e$(C8&\e(B \e$(C=CGhGO?)\e(B \e$(C:8<<?d\e(B.
+
+     C-k \e$(C8&\e(B \e$(C8n9x@L3*\e(B \e$(C0h<SGO?)\e(B \e$(CG`GO8i\e(B, \e$(C;hA&5H\e(B \e$(CEX=:F.4B\e(B, \e$(CA$8.5G>n\e(B \e$(C:8A85G\e(B
+\e$(C0m\e(B, C-y\e$(C7N\e(B, \e$(C1W\e(B \e$(C@|:N0!\e(B \e$(C2t3;>nA}4O4Y\e(B.
+
+       >> C-k \e$(C8&\e(B \e$(C8n9x\e(B \e$(CE8@LGAGO?)\e(B \e$(C:8<<?d\e(B.
+
+       >> \e$(CEX=:F.8&\e(B \e$(C2t3;4B5%4B\e(B, C-y \e$(C@T4O4Y\e(B. \e$(CD?<-8&\e(B \e$(C8nG`\e(B \e$(C9X@87N\e(B \e$(C@L5?=CE0\e(B
+          \e$(C0m\e(B, \e$(CGQ9x\e(B \e$(C4u\e(B C-y \e$(C8&\e(B \e$(CE8@LGAGO?)\e(B \e$(C:8<<?d\e(B. \e$(C@L0M@87N\e(B \e$(CEX=:F.@G\e(B \e$(C:9;g\e(B
+         \e$(C0!\e(B \e$(C5K4O4Y\e(B.
+
+     \e$(CGv@g\e(B \e$(C>n62\e(B \e$(CEX=:F.0!\e(B \e$(C:8A85G>n\e(B \e$(C@V0m\e(B, \e$(C4u183*\e(B \e$(C4Y8%\e(B \e$(CEX=:F.8&\e(B \e$(C;hA&GO8i\e(B 
+\e$(C>n6;0T\e(B \e$(C5G0Z=@4O1n\e(B? C-y\e$(C4B\e(B, \e$(C0!@e\e(B \e$(CCV1Y\e(B \e$(C;hA&5H\e(B \e$(C0M@;\e(B \e$(C2tA}>n3@4O4Y\e(B.
+
+       >> \e$(CG`@;\e(B \e$(C;hA&GO0m\e(B, \e$(CD?<-8&\e(B \e$(C@L5?=CE00m\e(B, \e$(C4Y8%\e(B \e$(CG`@;\e(B \e$(C;hA&GO<<?d\e(B. C-y 
+          \e$(C8&\e(B \e$(CG`GO8i\e(B, 2\e$(C9xB0@G\e(B \e$(CG`@L\e(B \e$(C3*?I4O4Y\e(B.
+
+\e$(CCk<R\e(B(UNDO)
+==========
+
+     \e$(C>pA&6s55\e(B, \e$(CEX=:F.8&\e(B \e$(C:/0fGO?4Av88\e(B, \e$(C1W0M@;\e(B \e$(C?x7!4k7N\e(B \e$(C5G598.0m\e(B \e$(C=M@;\e(B \e$(C6'\e(B
+\e$(C4B\e(B C-x u\e$(C7N\e(B \e$(C0mD(4O4Y\e(B. \e$(C:8Ek@:\e(B \e$(C@_8x5H\e(B \e$(C8m7I>n8&\e(B \e$(C9+H?7N\e(B \e$(CGO4B\e(B \e$(C@[5?@;\e(B \e$(CGU4O4Y\e(B. 
+\e$(C9]:9GX<-\e(B UNDO\e$(C8&\e(B \e$(CG`GO7A0m\e(B \e$(CGR\e(B \e$(C6'4B\e(B, \e$(C8n9x@L3*\e(B \e$(C1W\e(B \e$(C8m7I>n8&\e(B \e$(CG`GO8i\e(B \e$(C5G557O\e(B 
+\e$(C5G>n\e(B \e$(C@V=@4O4Y\e(B.
+
+       >> \e$(C@L\e(B \e$(CG`@;\e(B C-k\e$(C7N\e(B \e$(CAv?l<<?d\e(B. \e$(C1W8.0m\e(B, C-x u\e$(C7N\e(B \e$(C5G598.<<?d\e(B.
+
+     C-_\e$(C4B\e(B, UNDO\e$(C8&\e(B \e$(CG`GO4B\e(B, \e$(C6G\e(B \e$(CGO3*@G\e(B \e$(C8m7I>n@T4O4Y\e(B. \e$(C1b4I@:\e(B, C-x u\e$(C?M\e(B \e$(C00\e(B
+     \e$(C=@4O4Y\e(B.
+
+     C-_\e$(C3*\e(B C-x u\e$(C?!\e(B UNDO\e$(C@G\e(B \e$(CH8<v8&\e(B \e$(CAY\e(B \e$(C<v\e(B \e$(C@V=@4O4Y\e(B.
+
+
+\e$(CH-@O\e(B
+====
+
+     \e$(CEX=:F.@G\e(B \e$(C:/0f@;\e(B \e$(C?518@{@87N\e(B \e$(CGO1b\e(B \e$(C@'GX<-4B\e(B, \e$(C1W0M@;\e(B \e$(CH-@O?!\e(B \e$(C:8A8GO?)\e(B
+\e$(C>_\e(B \e$(CGU4O4Y\e(B. \e$(C:8A8GOAv\e(B \e$(C>J@88i\e(B, \e$(CG`GQ\e(B \e$(C:/0f@:\e(B, Emacs\e$(C8&\e(B \e$(CA>7aGO8i\e(B \e$(C5?=C?!\e(B \e$(C@R>n\e(B
+\e$(C9v8.0T\e(B \e$(C5K4O4Y\e(B.
+
+     \e$(CAv1]\e(B \e$(C:80m\e(B \e$(C@V4B\e(B \e$(CH-@O?!\e(B \e$(C4kGX<-\e(B, \e$(C4g=E@L\e(B \e$(CFmA}@;\e(B \e$(CG`GQ\e(B \e$(C0M@;\e(B \e$(C=a3V=@4O4Y\e(B.
+\e$(CAv1]\e(B, \e$(C:80m\e(B \e$(C@V4B\e(B \e$(CH-@O@L6u\e(B \e$(C0M@:\e(B, \e$(C0#4\Hw\e(B \e$(C8;GO8i\e(B \e$(CFmA}GO0m\e(B \e$(C@V4B\e(B \e$(CH-@O\e(B \e$(C@ZC<@T\e(B
+\e$(C4O4Y\e(B.
+
+     \e$(C4g=E@L\e(B \e$(CH-@O@;\e(B \e$(C<<@L:j\e(B(\e$(C:8A8GQ4Y\e(B)\e$(CGO1b\e(B \e$(C1nAv\e(B, \e$(CAv1]1nAv@G\e(B \e$(C:/0f@:\e(B \e$(CFmA}GO\e(B
+\e$(C0m@V4B\e(B \e$(CH-@O?!\e(B \e$(C=a3V4B\e(B \e$(C0M@:\e(B \e$(C>F4U4O4Y\e(B. \e$(C1W0M@:\e(B, \e$(C4g=E@L\e(B \e$(C@L?M\e(B \e$(C00@L\e(B \e$(C:/0fGO0m\e(B 
+\e$(C=MAv\e(B \e$(C>J@:5%55\e(B, \e$(C55A_1nAv\e(B \e$(C:/0f@;\e(B \e$(C0!GQ\e(B \e$(C0M@L\e(B \e$(CA&8Z4k7N\e(B \e$(C=a3V>nAv4B\e(B \e$(C@O@L\e(B \e$(C>x55\e(B
+\e$(C7O\e(B \e$(CGO1b\e(B \e$(C@'GX<-\e(B \e$(C@T4O4Y\e(B.
+
+     \e$(C<<@L:j@;\e(B \e$(CG`GQ\e(B \e$(C5ZA6Bw\e(B \e$(C:/0fGQ\e(B \e$(C0M@L\e(B \e$(C@_8x\e(B \e$(C5G>n\e(B \e$(C@V@;\e(B \e$(C6'8&\e(B \e$(C@'GO?)\e(B Emacs
+\e$(C4B\e(B \e$(C@L8'@;\e(B \e$(C:/0fGO?)\e(B \e$(C?x:;\e(B \e$(CH-@O@;\e(B \e$(C321i4O4Y\e(B.
+
+\e$(C:q0m\e(B:          \e$(C6GGQ\e(B, Emacs\e$(C4B\e(B \e$(C?9CxGR\e(B \e$(C<v\e(B \e$(C>x4B\e(B \e$(C;sEB?!\e(B \e$(C4k:qGO?)\e(B, \e$(C@OA$GQ\e(B \e$(C=C\e(B
+               \e$(C0#0#0]@87N\e(B \e$(C@Z5?@{@87N\e(B \e$(CFmA}GO0m\e(B \e$(C@V4B\e(B \e$(CH-@O@G\e(B \e$(C3;?k@;\e(B \e$(C@L8'\e(B
+               \e$(C@;\e(B \e$(C:/0fGQ\e(B \e$(CH-@O?!\e(B \e$(C<<@L:jGU4O4Y\e(B. \e$(C@L0M?!\e(B \e$(C@GGX\e(B, \e$(C88@O@G\e(B \e$(C0f?l\e(B
+               \e$(C4B\e(B \e$(CG`GQ\e(B \e$(C:/0f?!\e(B \e$(C4kGO?)\e(B \e$(CCV<RGQ@G\e(B \e$(CGGGX7N\e(B \e$(C3!3;557O\e(B \e$(CGO0m\e(B \e$(C@V\e(B
+               \e$(C=@4O4Y\e(B.
+
+     \e$(CH-8i@G\e(B \e$(C>F7!\e(B \e$(CBJ@;\e(B \e$(C:88i\e(B, \e$(C@L?M\e(B \e$(C00@:\e(B \e$(C6f@87N\e(B \e$(C8p5e6s@N@L\e(B \e$(CG%=C5G>n\e(B \e$(C@V4Y\e(B
+\e$(C0m\e(B \e$(C;}0"GU4O4Y\e(B.
+
+(\e$(C?9\e(B) [--]J:--**-Mule: MULE.tut (Fundamental) ---55%--------------
+
+
+     \e$(C@L\e(B Emacs\e$(CF)Ed8.>s@G\e(B \e$(C:9;g:;@:\e(B MULE.tut\e$(C@L6s0m\e(B \e$(C:R8.0m\e(B \e$(C@V=@4O4Y\e(B. \e$(CH-@O\e(B
+\e$(C@;\e(B \e$(CH-@N5e\e(B(\e$(CH-@O@;\e(B \e$(CC#>F<-\e(B \e$(C9vF[?!\e(B \e$(C@P>n3V4B\e(B \e$(C0M\e(B)\e$(CGO8i\e(B, MULE.tut\e$(C@G\e(B \e$(C:N:P?!\e(B \e$(CG%=C\e(B
+\e$(C5K4O4Y\e(B. \e$(C?98&\e(B \e$(C5i8i\e(B, new-file\e$(C@L6s4B\e(B \e$(C@L8'@G\e(B \e$(CH-@O@;\e(B \e$(CH-@N5eGO?44Y8i\e(B, "Mule:
+new-file"\e$(C@L6s4B\e(B \e$(C8p5e6s@N@L\e(B \e$(C5G0ZAv?d\e(B.
+
+\e$(CAV@G\e(B:         \e$(C8p5e6s@N?!\e(B \e$(C4kGX<-4B\e(B \e$(C3*A_?!\e(B \e$(C<38mGO0Z=@4O4Y\e(B. \e$(C@a1q\e(B \e$(C1b4Y8.=C\e(B
+              \e$(C1b8&\e(B.
+
+     \e$(CH-@O@;\e(B \e$(CH-@N5eGO0E3*\e(B, \e$(C<<@L:jGO4B\e(B \e$(C8m7I>n4B\e(B, \e$(CAv1]1nAv@G\e(B \e$(C0M0z4B\e(B \e$(C4^8.\e(B,
+2\e$(C03@G\e(B \e$(C9.@Z7N\e(B \e$(C5G>n\e(B \e$(C@V=@4O4Y\e(B. C-x \e$(C?!\e(B \e$(C@L>n<-\e(B \e$(C@T7BGO4B\e(B \e$(C9.@Z0!\e(B, \e$(CH-@O?!\e(B \e$(C4kGX\e(B
+\e$(C<-\e(B \e$(CG`GO4B\e(B \e$(CA6@[@;\e(B \e$(C3*E83@4O4Y\e(B.
+
+     \e$(CGQ0!Av\e(B \e$(C4u\e(B, \e$(CAv1]1nAv@G\e(B \e$(C0M0z\e(B \e$(C4Y8%\e(B \e$(CA!@:\e(B, \e$(CH-@N5e\e(B \e$(C=C\e(B, \e$(CH-@O8m@;\e(B Emacs\e$(C0!\e(B
+\e$(C90>n:>4O4Y\e(B. \e$(C@L0M@;\e(B, \e$(C4\8;7N:NEM\e(B \e$(C@N<v8&\e(B \e$(C@P>n5i?)?@4B\e(B \e$(C8m7I>n6s0m\e(B \e$(C8;GO0m\e(B 
+\e$(C@V=@4O4Y\e(B.
+
+
+\e$(CAV@G\e(B:         \e$(C@L\e(B \e$(C0f?l4B\e(B \e$(CH-@O8m\e(B \e$(C@T4O4Y\e(B.
+
+                    C-x C-f   \e$(CH-@O@;\e(B \e$(CC#4B4Y\e(B(\e$(CH-@N5eGQ4Y\e(B)
+
+     Emacs\e$(C4B\e(B \e$(CH-@O8m@;\e(B \e$(C90>n?I4O4Y\e(B. \e$(C@L0M@:\e(B, \e$(CH-8i9X@G\e(B \e$(CG`?!\e(B \e$(C3*E8334O4Y\e(B.
+\e$(CH-@O8m@;\e(B \e$(CAvA$GO0m\e(B \e$(C@V4B\e(B \e$(C:N:P@:\e(B, \e$(C9L4O9vF[6s0m\e(B \e$(C:R8.?l4B\e(B \e$(C0M@T4O4Y\e(B. \e$(C9L4O9v\e(B
+\e$(CF[4B\e(B \e$(C@L?M\e(B \e$(C00@L\e(B \e$(C;g?k5K4O4Y\e(B. \e$(CH-@O8m?!\e(B \e$(C@L>n<-\e(B, \e$(C8.4xE08&\e(B \e$(C4)8#8i\e(B, \e$(C9L4O9vF[\e(B
+\e$(C?!\e(B \e$(CG%=C5G>nAx\e(B \e$(C3;?k@:\e(B \e$(C4u\e(B \e$(CGJ?dGOAv\e(B \e$(C>J1b\e(B \e$(C6'9.?!\e(B \e$(CAv?vA.\e(B \e$(C9v834O4Y\e(B.
+
+       >> C-x C-f\e$(C6s0m\e(B \e$(CE8@LGAGQ\e(B \e$(C5Z?!\e(B C-g\e$(C6s0m\e(B \e$(CE8@LGAGO<<?d\e(B. \e$(C9L4O9vF[@G\e(B 
+          \e$(C3;?k@;\e(B \e$(CCk<RGO0m\e(B, \e$(C6GGQ\e(B, C-x C-f\e$(C8m7I>n55\e(B \e$(CCk<RGU4O4Y\e(B. \e$(C@L780T\e(B
+          \e$(CGO?)\e(B, \e$(C>n62\e(B \e$(CH-@O55\e(B \e$(CC#Av\e(B \e$(C>J=@4O4Y\e(B.
+
+     \e$(C@L9x?!4B\e(B \e$(CH-@O@;\e(B \e$(C<<@L:jGO?)\e(B \e$(C:8<<?d\e(B. \e$(CAv1]1nAv@G\e(B \e$(C:/0f@;\e(B \e$(C:8A8GO1b\e(B \e$(C@'\e(B
+\e$(CGX<-4B\e(B \e$(C4Y@=0z\e(B \e$(C00@:\e(B \e$(C8m7I>n8&\e(B \e$(C;g?kGU4O4Y\e(B.
+
+     C-x C-s   \e$(CH-@O@;\e(B \e$(C<<@L:jGQ4Y\e(B
+
+     Emacs\e$(C@G\e(B \e$(C3;?k@:\e(B \e$(CH-@O?!\e(B \e$(C=a3;>nA}4O4Y\e(B. \e$(C<<@L:jGR\e(B \e$(C6'\e(B, \e$(C?x:;@G\e(B \e$(CH-@O@:\e(B \e$(C;u\e(B
+\e$(C7N?n\e(B \e$(C@L8'@;\e(B \e$(C:Y?)<-\e(B \e$(C320\Av1b\e(B \e$(C@V@89G7N\e(B \e$(C3;?k@:\e(B \e$(C>x>nAvAv\e(B \e$(C>J=@4O4Y\e(B.  \e$(C@L\e(B \e$(C;u\e(B
+\e$(C7N?n\e(B \e$(C@L8'@:\e(B \e$(C?x:;@G\e(B \e$(CH-@O@G\e(B \e$(C@L8'?!\e(B '~'\e$(C8&\e(B \e$(C:Y@N\e(B \e$(C0M@T4O4Y\e(B.
+
+     \e$(C%;<<@L:j0!\e(B \e$(C3!3*8i\e(B, Emacs\e$(C4B\e(B \e$(C<<@L:jGQ\e(B \e$(CH-@O@G\e(B \e$(C@L8'@;\e(B \e$(CG%=CGU4O4Y\e(B.
+
+       >> C-x C-s\e$(C6s0m\e(B \e$(CE8@LGAGO0m\e(B \e$(CF)Ed8.>s@G\e(B \e$(C:9;g:;@;\e(B \e$(C<<@L:jGO<<?d\e(B.
+          \e$(C@L\e(B \e$(C6'\e(B, \e$(CH-8i\e(B \e$(C9XBJ?!\e(B "Wrote ...../MULE.tut"\e$(C6s0m\e(B \e$(CG%=C5K4O4Y\e(B.
+
+    \e$(C;u7N?n\e(B \e$(CH-@O@;\e(B \e$(C885i\e(B \e$(C6'\e(B, \e$(C86D!\e(B \e$(C@L@|:NEM\e(B \e$(C@V4x\e(B \e$(CH-@O@;\e(B \e$(CH-@N5eGO4B\e(B \e$(C5mGQ\e(B
+\e$(C5?@[@;\e(B \e$(CGU4O4Y\e(B. \e$(C1W780T\e(B \e$(CGO?)\e(B, \e$(CH-@N5eGQ\e(B \e$(CH-@O?!\e(B \e$(CE8@LGAGO?)\e(B \e$(C0)4O4Y\e(B.
+
+     \e$(C%UH-@O@;\e(B \e$(C<<@L:jGO7A0m\e(B \e$(CG_@;\e(B \e$(C4k\e(B \e$(C:q7N<R\e(B, Emacs\e$(C4B\e(B \e$(CAv1]1nAv\e(B \e$(CFmA}GO0m\e(B 
+\e$(C@V4x\e(B \e$(C3;?k@;\e(B \e$(CH-@O\e(B \e$(C3;?!\e(B \e$(C=a3V=@4O4Y\e(B.
+
+
+\e$(C9vF[\e(B
+====
+
+     \e$(C88>`\e(B, 2\e$(C9xB0@G\e(B \e$(CH-@O@;\e(B C-x C-f \e$(C7N\e(B \e$(C2(3;8i\e(B, 1\e$(C9xB0@G\e(B \e$(CH-@O@:\e(B Emacs\e$(C3;:N\e(B
+\e$(C?!\e(B \e$(C32=@4O4Y\e(B. Emacs\e$(C3;:N?!\e(B \e$(C@V4B\e(B \e$(CH-@O7N:NEM\e(B \e$(CEX=:F.8&\e(B \e$(C@P>n3V>n\e(B \e$(C:8A8GO0m@V\e(B
+\e$(C4B\e(B \e$(C0M@:\e(B \e$(C9vF[6s0m\e(B \e$(C:R8.?s4O4Y\e(B. \e$(CH-@O@;\e(B \e$(C2(3;4B\e(B \e$(C0M@:\e(B, Emacs\e$(C3;:N?!\e(B \e$(C;u7N?n\e(B
+\e$(C9vF[8&\e(B \e$(C885l4O4Y\e(B.
+
+     Emacs \e$(C3;?!\e(B \e$(C:8A8GO0m\e(B \e$(C@V4B\e(B \e$(C9vF[@G\e(B \e$(C8.=:F.8&\e(B \e$(C:84B5%4B\e(B, \e$(C4Y@=0z\e(B \e$(C00@L\e(B
+\e$(CE8@LGAGU4O4Y\e(B.
+
+     C-x C-b
+
+       >> C-x C-b \e$(C6s0m\e(B \e$(CE8@LGAGO<<?d\e(B. \e$(C0"0"@G\e(B \e$(C9vF[0!\e(B \e$(C>n60GQ\e(B \e$(C@L8'@;\e(B \e$(C0.\e(B
+          \e$(C0m\e(B \e$(C@V4B0!\e(B, \e$(C1W8.0m\e(B, \e$(C>n60GQ\e(B \e$(CH-@O8m@;\e(B \e$(C:Y@L0m\e(B \e$(C@V4B\e(B \e$(C0M@N0!\e(B \e$(C0|B{\e(B
+          \e$(CGO<<?d\e(B.
+
+     \e$(C9vF[?!4B\e(B \e$(CH-@O0z\e(B \e$(C@OD!GOAv\e(B \e$(C>J4B\e(B \e$(C0M55\e(B \e$(C@V=@4O4Y\e(B. \e$(C?98&\e(B \e$(C5i8i\e(B, "*Buffer
+List*" \e$(C6s4B\e(B \e$(CH-@O@:\e(B \e$(C>x=@4O4Y\e(B. \e$(C@L0M@:\e(B C-x C-b \e$(C?!\e(B \e$(C@GGO?)\e(B \e$(C885i>nAx\e(B \e$(C9vF[8.\e(B
+\e$(C=:F.?!\e(B \e$(C4kGQ\e(B \e$(C9vF[@T4O4Y\e(B.
+
+     \e$(C4g=E@L\e(B \e$(C:80m\e(B \e$(C@V4B\e(B Emacs\e$(C@)55?l3;?!\e(B \e$(C@V4B\e(B, \e$(C>n60GQ\e(B \e$(CEX=:F.6s55\e(B, \e$(C>n4@0M\e(B
+\e$(C@N0!@G\e(B \e$(C9vF[3;?!\e(B \e$(C@V=@4O4Y\e(B.
+
+       >> \e$(C9vF[8.=:F.8&\e(B \e$(CAv?l1b\e(B \e$(C@'GX\e(B C-x 1 \e$(C6s0m\e(B \e$(CE8@LGAGO<<?d\e(B.
+
+     \e$(C88>`\e(B, \e$(C>n62\e(B \e$(CH-@O@G\e(B \e$(CEX=:F.?!\e(B \e$(C:/0f@;\e(B \e$(CG`GO0m3*<-\e(B, \e$(C4Y8%\e(B \e$(CH-@O@;\e(B \e$(C2(3;>z\e(B
+\e$(C4Y0m\e(B \e$(CG_4Y8i\e(B, \e$(CCVCJ@G\e(B \e$(CH-@O@:\e(B \e$(C<<@L:j5G>n\e(B \e$(C@VAv\e(B \e$(C>J=@4O4Y\e(B. \e$(C1W\e(B \e$(C:/0f@:\e(B Emacs
+\e$(C3;:N@G\e(B \e$(CH-@O0z\e(B \e$(C4k@@GO4B\e(B \e$(C9vF[\e(B \e$(C3;?!88\e(B \e$(CG`GO?)A.\e(B \e$(C@V=@4O4Y\e(B.
+
+     2\e$(C9xB0@G\e(B \e$(CH-@O?!\e(B \e$(C4k@@GO4B\e(B \e$(C9vF[8&\e(B \e$(C885i1b55GO0m\e(B, \e$(C?!5pF.GO4u6s55\e(B, 1\e$(C9x\e(B
+\e$(CB0@G\e(B \e$(CH-@O?!\e(B \e$(C4k@@GO4B\e(B \e$(C9vF[?!4B\e(B \e$(C>F9+71\e(B \e$(C?5Gb@;\e(B \e$(CAVAv\e(B \e$(C>J=@4O4Y\e(B. \e$(C@L0M@:\e(B \e$(C4k\e(B
+\e$(C4\Hw\e(B \e$(C;g?kGO1b\e(B \e$(C=10T\e(B, \e$(C6GGQ\e(B, 1\e$(C9xB0@G\e(B \e$(CH-@O?!\e(B \e$(C4k@@GO4B\e(B \e$(C9vF[8&\e(B \e$(CH.:8GO?)\e(B \e$(C5N\e(B
+\e$(C1b\e(B \e$(C@'GO?)\e(B \e$(C55?r@L\e(B \e$(C5G4B\e(B \e$(C9f9}@T4O4Y\e(B.
+
+     C-x C-s \e$(C7N\e(B \e$(C9vF[8&\e(B \e$(C<<@L:jGO1b\e(B \e$(C@'GO?)\e(B C-x C-f \e$(C7N\e(B \e$(C9vF[8&\e(B \e$(C13C<GO4B\e(B \e$(C0M\e(B
+\e$(C@:\e(B \e$(C1MBz=@4O4Y\e(B. \e$(C1W7!<-\e(B \e$(C>F7!@G\e(B \e$(C8m7I>n8&\e(B \e$(C;g?kGU4O4Y\e(B.
+
+     C-x s   \e$(CGv@g\e(B \e$(C@V4B\e(B \e$(C9vF[8&\e(B \e$(C<<@L:jGQ4Y\e(B.
+
+     C-x s \e$(C4B\e(B \e$(C3;?k@;\e(B \e$(C9Y2[\e(B \e$(C9vF[\e(B \e$(C@|C<8&\e(B \e$(CH-@O?!\e(B \e$(C<<@L:jGU4O4Y\e(B. \e$(C@L\e(B \e$(C6'\e(B, \e$(CGO3*\e(B 
+\e$(CGO3*@G\e(B (\e$(C<<@L:j5G>n>_\e(B \e$(CGR\e(B)\e$(C9vF[?!\e(B \e$(C4kGO?)\e(B, \e$(C<<@L:jGO4B0!\e(B, \e$(CGOAv\e(B \e$(C>J4B0!8&\e(B y\e$(C3*\e(B 
+n\e$(C@87N\e(B \e$(C9/=@4O4Y\e(B. \e$(C@L\e(B \e$(CG%=C4B\e(B \e$(CH-8i\e(B \e$(C9X@G\e(B \e$(CG`?!\e(B \e$(CG%=C5K4O4Y\e(B. \e$(C?98&\e(B \e$(C5i8i\e(B, \e$(C>F7!?M\e(B 
+\e$(C00=@4O4Y\e(B.
+
+             Save file /usr/private/yours/MULE.tut? (y or n)
+
+
+
+\e$(C8m7I>n@G\e(B \e$(CH.@e\e(B
+=============
+
+     \e$(C?!5pEM?!4B\e(B, \e$(CD\F.7Q\e(B*\e$(CE03*\e(B \e$(C8^EM\e(B*\e$(CE07N\e(B \e$(C@T7BGR\e(B \e$(C<v\e(B \e$(C@V4B\e(B \e$(C0M:84Y55\e(B \e$(CHN>@\e(B
+\e$(C89@:\e(B \e$(C8m7I>n0!\e(B \e$(C@V=@4O4Y\e(B. \e$(C@L0M5i@;\e(B \e$(C4Y7g1b\e(B \e$(C@'GO?)\e(B, \e$(CH.@e\e(B(eXtend) \e$(C8m7I>n8&\e(B
+\e$(C;g?kGU4O4Y\e(B. \e$(C@L0M?!4B\e(B, \e$(C>F7!@G\e(B 2\e$(C0!Av\e(B \e$(CA>7y0!\e(B \e$(C@V=@4O4Y\e(B.
+
+     C-x     \e$(C9.@Z?!\e(B \e$(C@GGQ\e(B \e$(CH.@e\e(B. \e$(C@L>n<-\e(B \e$(CGQ9.@Z8&\e(B \e$(C@T7BGU4O4Y\e(B.
+     ESC x   \e$(C@L8'?!\e(B \e$(C@GGQ\e(B \e$(CH.@e\e(B. \e$(C@L>n<-\e(B \e$(C8m7I>n@G\e(B \e$(C@L8'@;\e(B \e$(C@T7BGU4O4Y\e(B.
+
+     \e$(C@L0M5i@:\e(B \e$(C@O9]@{@87N\e(B, \e$(CFm8.GOAv88\e(B, \e$(CAv1]1nAv\e(B \e$(C:8>F?B\e(B \e$(C0M0z\e(B \e$(CA61]\e(B \e$(C:s9xGO\e(B
+\e$(C0T4B\e(B \e$(C;g?k5GAv\e(B \e$(C>J4B\e(B \e$(C8m7I>n8&\e(B \e$(C@'GQ\e(B \e$(C0M@T4O4Y\e(B. C-x C-f (\e$(CH-@N5e\e(B)\e$(C3*\e(B C-x C-s
+(\e$(C<<@L:j\e(B)\e$(C4B\e(B \e$(C@L\e(B \e$(C:N7y@T4O4Y\e(B. \e$(C@L?\?!\e(B, C-x C-c(\e$(C?!5pEM@G\e(B \e$(CA>7a\e(B)\e$(C55\e(B \e$(C1W78=@4O4Y\e(B.
+
+     C-z\e$(C4B\e(B Emacs\e$(C?!<-\e(B \e$(C:|A.3*?@4@5%?!\e(B \e$(C@ZAV\e(B \e$(C;g?k5G4B\e(B \e$(C9f9}@T4O4Y\e(B. Emacs\e$(C8&\e(B
+\e$(CA>7aGO4B\e(B \e$(C0M@L\e(B \e$(C>F4O6s\e(B, \e$(C@O4\\e(B, csh\e$(C@G\e(B \e$(C79:'?!\e(B \e$(C5G59>F0!4B5%?!4B\e(B \e$(CA&@O\e(B \e$(CAA@:\e(B \e$(C9f\e(B
+\e$(C9}@L6s0m\e(B \e$(C8;GR\e(B \e$(C<v@V0ZAv?d\e(B. C-z\e$(C8&\e(B \e$(CG`GO4u6s55\e(B Emacs\e$(C4B\e(B \e$(C=:EiGO0m\e(B \e$(C@V@;\e(B \e$(C;S\e(B,
+\e$(C3;?k@L\e(B \e$(CFD1+5G4B\e(B \e$(C0M@:>F4U4O4Y\e(B.
+
+\e$(CAV@G\e(B:          \e$(C4\\e(B, X-window\e$(C?!<-\e(B \e$(CG`GO0m\e(B \e$(C@V4B\e(B \e$(C0f?l\e(B, \e$(CH$@:\e(B \e$(C;g?kGO0m\e(B \e$(C@V4B\e(B 
+               \e$(C=)@L\e(B sh\e$(C@O\e(B \e$(C6'4B\e(B, \e$(C1W78Av\e(B \e$(C>J=@4O4Y\e(B.
+
+     C-x       \e$(C8m7I>n4B\e(B,\e$(C89@L\e(B \e$(C@V=@4O4Y\e(B. \e$(C@L9L\e(B \e$(C9h?n\e(B \e$(C0M@:\e(B \e$(C>F7!@G\e(B \e$(C0M@T4O4Y\e(B.
+
+     C-x C-f   \e$(CH-@O@G\e(B \e$(CFmA}\e(B(Find)
+     C-x C-s   \e$(CH-@O@G\e(B \e$(C:8A8\e(B(Save)
+     C-x C-b   \e$(C9vF[8.=:F.@G\e(B \e$(CG%=C\e(B
+     C-x C-c   \e$(C?!F<EM8&\e(B \e$(CA>7aGQ4Y\e(B. \e$(CH-@O@G\e(B \e$(C:8A8@:\e(B, \e$(C@Z5?@{@87N4B\e(B \e$(CG`GO?)\e(B
+               \e$(CAvAv\e(B \e$(C>J4B4Y\e(B. \e$(C1W7/3*\e(B, \e$(CH-@O@L\e(B \e$(C:/0f5G>n\e(B \e$(C@V@88i\e(B, \e$(CH-@O@G\e(B \e$(C:8\e(B
+               \e$(CA8@;\e(B \e$(CGO4B0!\e(B, \e$(C>F4Q0!8&\e(B \e$(C90>n?I4O4Y\e(B. \e$(C:8A8GO?)\e(B \e$(CA>7aGO4B\e(B \e$(C:8\e(B
+               \e$(CEk@G\e(B \e$(C9f9}\e(B, C-x C-s C-x C-c \e$(C7N\e(B \e$(CGO4B\e(B \e$(C0M@T4O4Y\e(B.
+
+     \e$(C@L8'?!\e(B \e$(C@GGQ\e(B \e$(CH.@e8m7I>n?!4B\e(B, \e$(C1W4YAv\e(B \e$(C;g?k5GAv\e(B \e$(C>J4B\e(B \e$(C0M@L3*\e(B, \e$(CF/A$@G\e(B 
+\e$(C8p5e?!<-9[?!\e(B \e$(C;g?k5GAv\e(B \e$(C>J4B\e(B \e$(C0M5n@L\e(B \e$(C@V=@4O4Y\e(B. \e$(C?97N<-\e(B, "command-apropos" 
+\e$(C8&\e(B \e$(C5l4O4Y\e(B.  \e$(C@L\e(B \e$(C8m7I>n4B\e(B \e$(CE0?v5e8&\e(B \e$(C@T7B=CE00m\e(B, \e$(C1W0M?!\e(B \e$(C8ED!GO4B\e(B \e$(C8p5g\e(B \e$(C8m7I\e(B
+\e$(C>n@G\e(B \e$(C@L8'@;\e(B \e$(CG%=CGU4O4Y\e(B. ESC x \e$(C6s0m\e(B \e$(CE8@LGAGO8i\e(B, \e$(C=:E)80\e(B \e$(C9X?!\e(B "M-x" \e$(C0!\e(B \e$(CG%\e(B
+\e$(C=C5K4O4Y\e(B. \e$(C@L0M?!\e(B \e$(C4kGO?)\e(B, \e$(C=GG`GO4B\e(B \e$(C8m7I>n@G\e(B \e$(C@L8'\e(B(\e$(CAv1]@G\e(B \e$(C0f?l\e(B,
+"command-apropos")\e$(C8&\e(B \e$(C@T7BGU4O4Y\e(B.  "command-a" \e$(C1nAv\e(B \e$(C@T7BGQ\e(B \e$(C5Z\e(B \e$(C=:Fd@L=:\e(B
+\e$(C8&\e(B \e$(CD!8i\e(B, \e$(C5Z@G\e(B \e$(C:N:P@:\e(B \e$(C@Z5?@{@87N\e(B \e$(C8^?vA}4O4Y\e(B.  \e$(C@L\e(B \e$(CHD\e(B, \e$(CE0?v5e8&\e(B \e$(C90@89G7N\e(B, 
+\e$(C>K0m\e(B \e$(C=M@:\e(B \e$(C9.@Z?-@;\e(B \e$(CE8@LGAGU4O4Y\e(B. \e$(C6GGQ\e(B, \e$(CE0?v5e8&\e(B \e$(C@T7BGOAv\e(B \e$(C>J@88i\e(B, \e$(C8p5g\e(B 
+\e$(C8m7I>n0!\e(B \e$(CG%=C5K4O4Y\e(B.
+
+       >> ESC x \e$(C8&\e(B \e$(CE8@LGAGO0m\e(B, \e$(C@L>n<-\e(B, "command-apropos<Return>" \e$(CH$@:\e(B
+          "command-a<Space><Return>" \e$(C@L6s0m\e(B \e$(CE8@LGAGU4O4Y\e(B. \e$(C4Y@=?!\e(B,
+          "kanji<Return>"\e$(C@L6s0m\e(B \e$(CE8@LGAGU4O4Y\e(B.
+
+     \e$(C3*E83-\e(B "\e$(C@)55?l\e(B"\e$(C8&\e(B \e$(CAv?l4B5%4B\e(B, C-x 1 \e$(C@L6s0m\e(B \e$(CE8@LGAGU4O4Y\e(B.
+
+\e$(C8p5e6s@N\e(B
+========
+
+     \e$(C88>`\e(B \e$(CC5C5Hw\e(B \e$(C8m7I>n8&\e(B \e$(CCF4Y8i\e(B, \e$(CH-8i@G\e(B \e$(C9XBJ@G\e(B \e$(C?!DZ?!8.>n6s0m\e(B \e$(C:R8.4B\e(B
+\e$(C@e<R?!\e(B, \e$(CD#\e(B \e$(C0M@L\e(B \e$(CG%=C5K4O4Y\e(B. \e$(C?!DZ?!8.>n4B\e(B \e$(CH-8i@G\e(B \e$(CA&@O\e(B \e$(C9X\e(B \e$(CG`@T4O4Y\e(B. \e$(C1W\e(B
+\e$(C9Y7N\e(B \e$(C@'@G\e(B \e$(CG`@:\e(B, \e$(C8p5e6s@N@L6s0m\e(B \e$(C:R8.0m\e(B \e$(C@V=@4O4Y\e(B. \e$(C8p5e6s@N@:\e(B \e$(C@L7/GQ\e(B \e$(C=D@8\e(B
+\e$(C7N\e(B \e$(CG%=C5G>n\e(B \e$(C@V0ZAv?d\e(B.
+
+ [--]J:--**-Mule: MULE.tut (Fundamental) ---NN%--------------
+
+
+\e$(CAV@G\e(B:          NN%\e$(C@G\e(B NN\e$(C@:\e(B \e$(C<}@Z0!\e(B \e$(C5i>n\e(B \e$(C@V=@4O4Y\e(B. \e$(C4g=E@L\e(B \e$(C;g?kGO0m\e(B \e$(C@V4B\e(B
+               Emacs\e$(C@G\e(B \e$(C8p5e6s@N0z\e(B \e$(C4Y8&\e(B \e$(CAv55\e(B \e$(C8p8#Av88\e(B, \e$(C4gH2GOAv\e(B \e$(C8;557O\e(B.
+               \e$(C?98&\e(B \e$(C5i8i\e(B, \e$(C=C0#@L3*\e(B uptime\e$(C@L\e(B \e$(CG%=C5G0m\e(B \e$(C@V4B\e(B \e$(C0M@:\e(B,
+               display-time\e$(C@L6s4B\e(B \e$(C1b4I@L\e(B \e$(C@[5?GO0m\e(B \e$(C@V1b\e(B \e$(C6'9.@T4O4Y\e(B.
+
+     \e$(C@L\e(B \e$(CG`?!\e(B \e$(C@GGO?)\e(B \e$(C89@:\e(B \e$(C@/?kGQ\e(B \e$(CA$:80!\e(B \e$(C>r>nA}4O4Y\e(B.
+
+
+     \e$(CAv1]\e(B, \e$(C4g=E@L\e(B \e$(C:80m\e(B \e$(C@V4B\e(B \e$(CH-@O8m@;\e(B \e$(CG%=CGO0m\e(B \e$(C@V=@4O4Y\e(B. NN%\e$(C@:\e(B \e$(CGv@g\e(B \e$(C=:\e(B
+\e$(CE)80@'?!\e(B \e$(CH-@O@G\e(B \e$(CA&@O\e(B \e$(C@'?!<-:NEM\e(B \e$(C8n\e(B \e$(CF[<>F.B00!\e(B \e$(CG%=C5G0m\e(B \e$(C@V4B\e(B \e$(C0!8&\e(B \e$(C3*E8\e(B
+\e$(C3;0m\e(B \e$(C@V=@4O4Y\e(B. \e$(CH-@O@G\e(B \e$(C0!@e\e(B \e$(CCVCJ8&\e(B \e$(CG%=CGO0m\e(B \e$(C@V@88i\e(B, --Top--\e$(C6s0m\e(B \e$(CG%=C5K\e(B
+\e$(C4O4Y\e(B. \e$(CH-@O@G\e(B \e$(C0!@e\e(B \e$(CCVHD8&\e(B \e$(CG%=CGO0m\e(B \e$(C@V4Y8i\e(B, --Bot--\e$(C6s0m\e(B \e$(CG%=C5K4O4Y\e(B. \e$(CH-8i\e(B
+\e$(C3;?!\e(B \e$(CH-@O\e(B \e$(C@|:N0!\e(B \e$(CG%=C5G0m\e(B \e$(C@V4Y8i\e(B, --All--\e$(C6s0m\e(B \e$(CG%=C5K4O4Y\e(B.
+
+     \e$(C8p5e6s@N@G\e(B \e$(C<R0}H#\e(B \e$(C3;?!4B\e(B, \e$(CAv1]\e(B \e$(C>n60GQ\e(B \e$(C8p5e?!\e(B \e$(C5i>n@V4B\e(B \e$(C0!8&\e(B \e$(C3*E8\e(B
+\e$(C3;0m\e(B \e$(C@V=@4O4Y\e(B.  \e$(CGv@g4B\e(B, \e$(C5pFzF.@N\e(B Fundamental\e$(C?!\e(B \e$(C5i>n0!\e(B \e$(C@V=@4O4Y\e(B. \e$(C@L0M55\e(B 
+\e$(C8^@LA.8p5e@G\e(B \e$(CGO3*@G\e(B \e$(C?9@T4O4Y\e(B.
+
+     Emacs\e$(C4B\e(B Lisp mode\e$(C3*\e(B Text mode\e$(C?M\e(B \e$(C00@L\e(B, \e$(C4Y8%\e(B \e$(CGA7N1W7%>p>n3*\e(B \e$(CEX=:F.\e(B
+\e$(C?!\e(B \e$(C4kGO?)\e(B \e$(C?!5pF.8&\e(B \e$(CG`GO1b\e(B \e$(C@'GQ\e(B \e$(C8n0!Av@G\e(B \e$(C8^@LA.8p5e8&\e(B \e$(C0.0m\e(B \e$(C@V=@4O4Y\e(B.
+\e$(C>n62\e(B \e$(C6'6s55\e(B \e$(C9]5e=C\e(B \e$(C>n4@0M@N0!@G\e(B \e$(C8^@LA.8p5e@G\e(B \e$(C;sEB7N\e(B \e$(C5G>n\e(B \e$(C@V=@4O4Y\e(B.
+
+     \e$(C0"0"@G\e(B \e$(C8^@LA.8p5e4B\e(B \e$(C8n0!Av@G\e(B \e$(C8m7I>n8&\e(B \e$(C@|Gt\e(B \e$(C4Y8%\e(B \e$(CG`5?@87N\e(B \e$(CGO?)\e(B \e$(C9v\e(B
+\e$(C834O4Y\e(B. \e$(C?98&\e(B \e$(C5i>n\e(B \e$(C:8=J4O4Y\e(B. \e$(CGA7N1W7%\e(B \e$(C3;?!\e(B \e$(C8m7I>n8&\e(B \e$(C885e4B\e(B \e$(C8m7I>n0!\e(B \e$(C@V\e(B
+\e$(C=@4O4Y\e(B.  \e$(C8m7I>n8&\e(B \e$(C>n60GQ\e(B \e$(CG|=D@87N\e(B \e$(CGO4B0!4B\e(B, \e$(C0"\e(B \e$(CGA7N1W7%>p>n?!\e(B \e$(C5{6s<-\e(B 
+\e$(C4Y8#Av88\e(B, \e$(C0"0"@G\e(B \e$(C8^@LA.8p5e4B\e(B, \e$(C9]5e=C\e(B \e$(C3V>nA]4O4Y\e(B.
+
+     \e$(C0"0"@G\e(B \e$(C8^@LA.8p5e?!\e(B \e$(C5i>n0!1b\e(B \e$(C@'GQ\e(B \e$(C8m7I>n4B\e(B \e$(C8p5e8m@L\e(B \e$(CH.@e5H\e(B \e$(C0M@87N\e(B
+\e$(C5G>n\e(B \e$(C@V=@4O4Y\e(B. \e$(C?98&\e(B \e$(C5i8i\e(B, M-x fundamental-mode\e$(C4B\e(B Fundamental\e$(C7N\e(B \e$(C5i>n0!\e(B
+\e$(C1b\e(B \e$(C@'GQ\e(B \e$(C0M@T4O4Y\e(B.
+
+     \e$(C88>`\e(B, \e$(C?5>n8&\e(B \e$(C?!5pF.GQ4Y8i\e(B, Text mode\e$(C7N\e(B \e$(C5i>n0)4O4Y\e(B.
+
+       >> M-x text-mode <Return>\e$(C6s0m\e(B \e$(CE8@LGAGO<<?d\e(B.
+
+     \e$(CGv@g@G\e(B \e$(C8^@LA.8p5e?!\e(B \e$(C4kGQ\e(B \e$(C55E%8UF.8&\e(B \e$(C:80m\e(B \e$(C=M@;\e(B \e$(C6'4B\e(B, C-h m\e$(C@L6s0m\e(B 
+\e$(CE8@LGAGU4O4Y\e(B.
+
+       >> C-h m \e$(C8&\e(B \e$(C;g?kGO?)\e(B Text mode\e$(C?M\e(B Fundamental mode\e$(C@G\e(B \e$(CBw@L8&\e(B \e$(C>K>F\e(B
+          \e$(C:8<<?d\e(B.
+
+       >> C-x 1\e$(C7N\e(B \e$(C55E%8UF.8&\e(B \e$(CH-8i@87N:NEM\e(B \e$(CAv?l<<?d\e(B.
+
+     \e$(C?^BJ\e(B \e$(C3!@G\e(B '[--]' \e$(C@:\e(B \e$(CGv@g@G\e(B \e$(CE0@T7B@G\e(B \e$(C8p5e8&\e(B \e$(C3*E83;0m\e(B \e$(C@V=@4O4Y\e(B. 
+[--] \e$(C@N\e(B \e$(C6'?!4B?5>n\e(B \e$(C>KFD:*@;\e(B \e$(C1W4k7N\e(B \e$(C@T7BGR\e(B \e$(C<v\e(B \e$(C@V=@4O4Y\e(B. \e$(C@T7B8p5e?!\e(B \e$(C4kGQ\e(B 
+\e$(C;s<<GQ\e(B \e$(C<38m@:\e(B "\e$(CE8860m\e(B" \e$(C8^4:>s@;\e(B \e$(C:8<<?d\e(B.
+
+     \e$(C1W\e(B \e$(C9Y7N\e(B \e$(C?@8%BJ?!4B\e(B \e$(CDZ5eC<0T\e(B (coding-system) \e$(C?!\e(B \e$(C0|GQ\e(B \e$(CGA7!1W@G\e(B \e$(C;sEB\e(B
+\e$(C0!\e(B \e$(CG%=C5G>n\e(B \e$(C@V=@4O4Y\e(B. Mule \e$(C@:\e(B, \e$(CH-@O@TCb7B\e(B, \e$(C@T7B\e(B, \e$(CH-8iCb7B?!\e(B \e$(C4kGO?)\e(B, \e$(C0"\e(B
+\e$(C0"\e(B \e$(C5683@{@87N\e(B \e$(CDZ5eC<0h8&\e(B \e$(CAvA$=CE3\e(B \e$(C<v\e(B \e$(C@VAv88\e(B, \e$(CEk;s@:\e(B \e$(CH-@O?k@G\e(B \e$(CDZ5eC<0h@G\e(B 
+\e$(C4:8p4P88\e(B \e$(CG%=CGO0m@V=@4O4Y\e(B.
+
+       >> \e$(C8p5e6s@N\e(B \e$(C@'?!\e(B "J:","S:", \e$(CH$@:\e(B "E:"\e$(C0!\e(B \e$(CG%=C5G>n\e(B \e$(C@V4B0!\e(B \e$(CH.@N\e(B
+         \e$(CGO<<?d\e(B.
+
+     \e$(CCVCJ@G\e(B \e$(CGQ\e(B \e$(C9.@Z0!\e(B \e$(CDZ5eC<0h@G\e(B \e$(C4:8p4P\e(B, \e$(C4Y@=@G\e(B ':' \e$(C0!\e(B \e$(CGv@g\e(B \e$(C?5>n\e(B \e$(C@L?\\e(B
+\e$(C@G\e(B \e$(C9.@Z\e(B(\e$(C@O:;>n\e(B, \e$(CGQ19>n5n\e(B)\e$(C55\e(B \e$(CG%=CGQ4Y4B\e(B \e$(C0M@;\e(B \e$(C3*E83;0m\e(B \e$(C@V=@4O4Y\e(B. J\e$(C4B\e(B 
+JUNET\e$(C@87N\e(B \e$(C;g?k5G0m\e(B \e$(C@V4B\e(B JIS \e$(CDZ5e\e(B, S \e$(C4B\e(B Shift-JIS, E \e$(C4B\e(B \e$(C@O:;>n\e(BEUC \e$(C8&\e(B \e$(C3*\e(B
+\e$(CE83;0m\e(B \e$(C@V=@4O4Y\e(B.  \e$(C4Y19>n\e(B \e$(CG%=C@G\e(B \e$(C@/9+4B\e(B C-x C-k t \e$(C7N\e(B ON/OFF\e$(C@G\e(B \e$(CEd1[@L\e(B \e$(C0!\e(B
+\e$(C4IGU4O4Y\e(B.
+
+     \e$(C4Y@=@G\e(B \e$(C?94B\e(B, \e$(C@O4\\e(B \e$(C4Y19>nG%=C8&\e(B OFF\e$(CGO0m3*<-\e(B, \e$(C4Y=C\e(B \e$(CGQ9x\e(B ON\e$(C@;\e(B \e$(CG`GO?)\e(B 
+\e$(C:>4O4Y\e(B.
+
+       >> C-x C-k t\e$(C8&\e(B 2\e$(C9x\e(B \e$(CG`GO<<?d\e(B.
+
+     \e$(C@T7B8p5e0!\e(B JIS\e$(CDZ5e@G\e(B \e$(C<3A$@L\e(B \e$(C5G>n\e(B \e$(C@V@;\e(B \e$(C6'\e(B, \e$(C88>`\e(B \e$(C4g=E@L\e(B \e$(C;g?kGO0m\e(B \e$(C@V\e(B
+\e$(C4B\e(B \e$(C4\8;?!\e(B \e$(C8^EM\e(B*\e$(CE00!\e(B \e$(C:Y>n\e(B \e$(C@V@88i\e(B, \e$(C@L=:DI@LGA\e(B*\e$(CE0\e(B \e$(C4k=E?!\e(B \e$(C1W0M@;\e(B \e$(C;g?kGO4B\e(B 
+\e$(C0M@L\e(B \e$(C0!4IGU4O4Y\e(B. \e$(C@L\e(B \e$(C6'\e(B, \e$(C8^EM\e(B*\e$(CE0@G\e(B \e$(C;g?k9f9}@:\e(B \e$(CD\F.7Q\e(B*\e$(CE0?M\e(B \e$(C00@L\e(B \e$(C4)8#8i<-\e(B 
+\e$(C9.@Z8&\e(B \e$(CE8@LGAGU4O4Y\e(B.  ESC <\e$(C9.@Z\e(B>\e$(C55\e(B M-<\e$(C9.@Z\e(B>\e$(C55\e(B \e$(C00@:\e(B \e$(C@[5?@;\e(B \e$(CGU4O4Y\e(B. \e$(CAv1]\e(B
+\e$(C1nAv@G\e(B \e$(C<38m?!<-\e(B ESC <\e$(C9.@Z\e(B>\e$(C6s0m\e(B \e$(CG`GO0m\e(B \e$(C@V4x\e(B \e$(C0w@L\e(B, M-<\e$(C9.@Z\e(B>\e$(C7N\e(B \e$(C5K4O4Y\e(B. \e$(CAV\e(B
+\e$(C@GGX>_\e(B \e$(CGO4B\e(B \e$(C0M@:\e(B, \e$(C=,GAF.\e(BJIS\e$(C3*\e(B EUC\e$(CDZ5e\e(B \e$(C6'4B\e(B \e$(C;g?kGR\e(B \e$(C<v\e(B \e$(C>x=@4O4Y\e(B.
+
+     \e$(CDZ5eC<0h@G\e(B \e$(C13C<4B\e(B, \e$(C0"0"@G\e(B \e$(C9vF[?!\e(B \e$(C4kGX<-88\e(B \e$(C@/H?GU4O4Y\e(B. \e$(C0"0"@G\e(B, \e$(CDZ\e(B
+\e$(C5eC<0h\e(B \e$(CAvA$?!\e(B \e$(C4kGX<-4B\e(B, C-h a coding-system <Return>\e$(C@87N:<\e(B \e$(C<v\e(B \e$(C@V=@4O4Y\e(B.
+
+       >> C-h a coding-system <Return>\e$(C@87N\e(B \e$(C3*?@4B\e(B \e$(C55E%8UF.\e(B \e$(C3;@G\e(B,
+         set-display-coding-system, set-file-coding-system,
+         set-process-coding-system \e$(C@G\e(B \e$(C<38m@;\e(B \e$(C@P>n:8<<?d\e(B.
+
+\e$(C0K;v\e(B
+====
+
+     \e$(C9.@Z?-@;\e(B, \e$(CH-@O3;?!<-\e(B, \e$(C@|9f\e(B \e$(CH$@:\e(B \e$(CHD9f@87N\e(B, \e$(CC#@;\e(B \e$(C<v\e(B \e$(C@V=@4O4Y\e(B. \e$(C0K;v\e(B
+\e$(C@;\e(B \e$(C=C@[GO4B\e(B \e$(C8m7I>n4B\e(B, \e$(CD?<-@'D!\e(B \e$(C@LHD8&\e(B \e$(C0K;vGQ4Y8i\e(B, C-s, \e$(CD?<-@'D!\e(B \e$(C@L@|@L\e(B
+\e$(C6s8i\e(B C-r \e$(C@T4O4Y\e(B. C-s \e$(C8&\e(B \e$(CE8@LGAGO8i\e(B, \e$(C?!DZ?!8.>n?!\e(B "I-search:"\e$(C6s4B\e(B \e$(C9.@Z?-\e(B
+\e$(C@L\e(B \e$(CGA7RF.7N<-\e(B \e$(CG%=C5K4O4Y\e(B. ESC\e$(C8&\e(B \e$(C4)8#8i\e(B, \e$(CA>7a5K4O4Y\e(B.
+
+
+       >> C-s\e$(C7N\e(B \e$(C0K;v@L\e(B \e$(C=C@[5K4O4Y\e(B. \e$(C1W8.0m\e(B, \e$(CC5C5Hw\e(B 1\e$(C9.@Z>?\e(B "cursor"\e$(C6s4B\e(B
+         \e$(C4\>n8&\e(B \e$(C@T7BGU4O4Y\e(B. 1\e$(C9.@Z\e(B \e$(C@T7BGR\e(B \e$(C6'864Y\e(B, \e$(CD?<-4B\e(B, \e$(C>n6;0T\e(B \e$(C?rAw\e(B
+          \e$(C@T4O1n\e(B?
+
+       >> \e$(CGQ9x\e(B \e$(C4u\e(B C-s \e$(C8&\e(B \e$(CE8@LGAGO8i\e(B, \e$(C4Y@=@G\e(B "cursor"\e$(C8&\e(B \e$(CC#@;\e(B \e$(C<v\e(B \e$(C@V=@4O4Y\e(B.
+
+       >> <Delete>\e$(C8&\e(B 4\e$(CH8\e(B \e$(C@T7BGO0m\e(B, \e$(CD?<-@G\e(B \e$(C?rAw@S@;\e(B \e$(C:8<<?d\e(B.
+
+       >> ESC\e$(C8&\e(B \e$(C4)8#0m\e(B, \e$(CA>7aGU4O4Y\e(B.
+
+     \e$(CC#0m\e(B \e$(C=M@:\e(B \e$(C9.@Z?-@;\e(B \e$(CE8@LGAA_?!55\e(B, \e$(CE8@LGAGQ\e(B \e$(C9.@Z:N:P88@87N\e(B, \e$(C0K;v@;\e(B 
+\e$(C=C@[GU4O4Y\e(B.  \e$(C4Y@=\e(B \e$(C9.@Z8&\e(B \e$(CC#4B5%4B\e(B, \e$(C4Y=C\e(B C-s\e$(C8&\e(B \e$(CE8@LGAGU4O4Y\e(B. \e$(C88>`\e(B, \e$(C9.@Z\e(B
+\e$(C?-@L\e(B \e$(CA8@gGOAv\e(B \e$(C>J@88i\e(B, \e$(C8^<<Av0!\e(B \e$(CG%=C5K4O4Y\e(B. C-g \e$(C7N55\e(B \e$(CA>7a5K4O4Y\e(B.
+
+     \e$(C0K;v=GG`A_?!\e(B, <Delete>\e$(C8&\e(B \e$(C@T7BGO8i\e(B, \e$(C0K;v9.@Z?-@G\e(B \e$(CA&@O\e(B \e$(C5Z@G\e(B \e$(C9.@Z0!\e(B 
+\e$(CAv?vA}4O4Y\e(B.  \e$(C1W8.0m3*<-\e(B, \e$(CD?<-4B\e(B, \e$(C@L@|9x@G\e(B \e$(C@'D!7N\e(B \e$(C5G59>F0)4O4Y\e(B. \e$(C?98&\e(B \e$(C5i\e(B
+\e$(C8i\e(B, "cu"\e$(C6s0m\e(B \e$(CE8@LGAGO0m\e(B, \e$(CCVCJ@G\e(B "cu"\e$(C@G\e(B \e$(C@'D!?!\e(B \e$(CD?<-0!\e(B \e$(C?rAw?44Y0m\e(B \e$(CGU=C4Y\e(B. 
+\e$(C?)1b?!<-\e(B <Delete>\e$(C8&\e(B \e$(C@T7BGO8i\e(B, \e$(C<-D!6s@N@G\e(B 'u'\e$(C0!\e(B \e$(CAv?vAv0m\e(B, \e$(CD?<-4B\e(B 'u'\e$(C8&\e(B 
+\e$(CE8@LGAGO1b\e(B \e$(C@|?!\e(B, \e$(CD?<-0!\e(B \e$(C@V>z4x\e(B 'c'\e$(C@G\e(B \e$(C@'D!7N\e(B,\e$(C@L5?GU4O4Y\e(B.
+
+     \e$(C0K;v=GG`A_?!\e(B, C-s \e$(C3*\e(B C-r \e$(C@L?\@G\e(B \e$(CD\F.7Q9.@Z8&\e(B \e$(CE8@LGAGO8i\e(B, \e$(C0K;v@:\e(B 
+\e$(CA>7aGU4O4Y\e(B.
+
+     C-s \e$(C4B\e(B, \e$(CGv@g@G\e(B \e$(CD?<-@'D!\e(B \e$(C@LHD?!\e(B \e$(C3*?@4B\e(B \e$(C0K;v9.@Z?-@;\e(B \e$(CC#=@4O4Y\e(B. \e$(C88>`\e(B, 
+\e$(C@L@|\e(B \e$(CBJ@;\e(B \e$(CC#0m\e(B \e$(C=M@88i\e(B, C-r \e$(C@;\e(B \e$(CE8@LGAGO4B\e(B \e$(C0M@87N\e(B, \e$(C?*9fGb0K;v@L\e(B \e$(C0!4IGU4O\e(B
+\e$(C4Y\e(B. C-s \e$(C?M\e(BC-r \e$(C4B\e(B, \e$(C0K;v@G\e(B \e$(C9fGb@L\e(B \e$(C9]4k@O\e(B \e$(C;S\e(B, \e$(C@|:N\e(B \e$(C00@:\e(B \e$(C?rAw@S@;\e(B \e$(CGU4O4Y\e(B.
+
+\e$(C8.D?=C:j\e(B \e$(C?!5pFC\e(B \e$(C79:'\e(B
+
+     \e$(C6'6'7N\e(B, (\e$(C:;@G\e(B \e$(C>F4O0T\e(B) \e$(C8.D?=C:j\e(B \e$(C?!5pFC\e(B \e$(C79:'@L6s0m\e(B \e$(C:R8.4B\e(B \e$(C;sEB?!\e(B \e$(C5i\e(B
+\e$(C>n0!4B\e(B \e$(C6'0!\e(B \e$(C@V=@4O4Y\e(B. \e$(C8^@LA.8p5e@G\e(B \e$(C<R0}H#\e(B'()'\e$(C@G\e(B \e$(CAV@'8&\e(B \e$(CA_0}H#\e(B'[]'\e$(C7N\e(B \e$(C5Q\e(B
+\e$(C7/=Q\e(B \e$(C0M@L\e(B \e$(C8p5e6s@N\e(B \e$(C@'?!\e(B \e$(CG%=C5K4O4Y\e(B. \e$(C?98&\e(B \e$(C5i8i\e(B, (Fundamental)\e$(C@L6s0m\e(B \e$(CG%=C\e(B
+\e$(C5G4B\e(B \e$(C4k=E?!\e(B[(Fundamental)]\e$(C?M\e(B \e$(C00@L\e(B \e$(C5K4O4Y\e(B.
+
+\e$(CAV@G\e(B:          \e$(C?)1b?!<-4B\e(B \e$(C8.D?=C:j\e(B \e$(C?!5pFC\e(B \e$(C79:'\e(B \e$(C@ZC<?!\e(B \e$(C4kGX<-4B\e(B \e$(C<38mGOAv\e(B
+               \e$(C>J=@4O4Y\e(B.
+
+     \e$(C8.D?=C:j\e(B \e$(C?!5pFC\e(B \e$(C79:'7N:NEM\e(B \e$(C:|A.3*?@1b\e(B \e$(C@'GX<-4B\e(B, M-x top-level
+<Return>\e$(C@L6s0m\e(B \e$(CE8@LGAGU4O4Y\e(B.
+
+       >> \e$(C=CGhGO?)\e(B \e$(C:8<<?d\e(B. \e$(C=:E)80\e(B \e$(C9X?!\e(B "Back to top level"\e$(C6s0m\e(B \e$(CG%=C5K\e(B
+          \e$(C4O4Y\e(B.
+
+     \e$(CK\;g=G@:\e(B, \e$(C@L\e(B \e$(C=C550!\e(B \e$(CG`GO?)A3@;\e(B \e$(C6'4B\e(B, \e$(C@L9L\e(B \e$(CEi79:'?!\e(B \e$(C@V>z4x\e(B \e$(C0M@T4O\e(B
+\e$(C4Y\e(B. M-x top-level\e$(C@:\e(B, \e$(C>F9+71\e(B \e$(C?5Gb@;\e(B \e$(CAV0m\e(B \e$(C@VAv\e(B \e$(C>J=@4O4Y\e(B.
+
+     \e$(C8.D?=C:j\e(B \e$(C?!5pFC\e(B \e$(C79:'7N:NEM\e(B \e$(C:|A.3*?@4B\e(B \e$(C0M?!\e(B \e$(C4kGX<-4B\e(B C-g\e$(C4B\e(B \e$(C5hAv\e(B \e$(C>J\e(B
+\e$(C=@4O4Y\e(B.
+
+
+\e$(CGoGA\e(B
+====
+
+     Emacs\e$(C?!4B\e(B, \e$(C89@:\e(B \e$(C55?r1b4I@L\e(B \e$(C@V0m\e(B, \e$(C?)1b?!<-\e(B, \e$(C@|:N8&\e(B \e$(C<38mGO4B\e(B \e$(C0M@:\e(B
+\e$(C:R0!4IGU4O4Y\e(B. \e$(C1W7/3*\e(B, \e$(C>FAw\e(B \e$(C8p8#4B\e(B \e$(C89@:\e(B \e$(C1b4I@;\e(B \e$(C9h?l1b\e(B \e$(C@'GX<-4B\e(B, <HELP>
+\e$(C6s0m\e(B \e$(C:R8.4B\e(B C-h \e$(C8&\e(B \e$(CE8@LGAGO4B\e(B \e$(C0M@87N\e(B, \e$(C89@:\e(B \e$(CA$:88&\e(B \e$(C@T<vGR\e(B \e$(C<v\e(B \e$(C@V=@4O4Y\e(B.
+
+     \e$(C;g?k9f9}@:\e(B, C-h \e$(C8&\e(B \e$(CE8@LGAGO0m\e(B, \e$(C@L>n<-\e(B \e$(CGJ?dGQ\e(B \e$(C?I<G@;\e(B 1\e$(C9.@Z\e(B \e$(CE8@LGA\e(B
+\e$(CGU4O4Y\e(B.  \e$(C8p8#0Z@88i\e(B, C-h ?  \e$(C6s0m\e(B \e$(CE8@LGAGO8i\e(B, \e$(C>n62\e(B \e$(C?I<G@L\e(B \e$(C@V4B0!\e(B \e$(CG%=C5K\e(B
+\e$(C4O4Y\e(B.  \e$(C88>`\e(B, C-h \e$(C8&\e(B \e$(CE8@LGAGO0m3*<-\e(B \e$(C86@=@L\e(B \e$(C:/G_4Y8i\e(B, C-g \e$(C8&\e(B \e$(CE8@LGAGO8i\e(B, 
+\e$(CCk<RGR<v\e(B \e$(C@V=@4O4Y\e(B.
+
+     \e$(C0!@e\e(B \e$(C1b:;@{@N\e(B \e$(C0M@:\e(B, C-h c \e$(C@T4O4Y\e(B. \e$(C@L0M?!\e(B \e$(C@L>n<-\e(B \e$(CE08&\e(B \e$(C@T7BGO8i\e(B, \e$(C1W\e(B
+\e$(C8m7I>n?!\e(B \e$(C4kGQ\e(B \e$(CB*@:\e(B \e$(C<38m@;\e(B \e$(CG%=CGU4O4Y\e(B.
+
+       >> C-h c C-p \e$(C6s0m\e(B \e$(CE8@LGAGO?)\e(B \e$(C:8<<?d\e(B. "C-p runs the command
+          previous-line"\e$(C0z\e(B \e$(C00@:\e(B \e$(C8^<<Av0!\e(B \e$(CG%=C5K4O4Y\e(B.
+
+     \e$(C:;\e(B \e$(C@{@:\e(B \e$(C@VAv88\e(B, \e$(C1b>oGO0m\e(B \e$(C@VAv\e(B \e$(C>J@:\e(B \e$(C8m7I>n55\e(B \e$(C;}0"GX\e(B \e$(C3>\e(B \e$(C<v\e(B \e$(C@V4B\e(B \e$(C0M\e(B
+\e$(C@T4O4Y\e(B.  C-x C-s \e$(C?M\e(B \e$(C00@:\e(B \e$(C:9<v@L8i<-\e(B 1\e$(C03@G\e(B \e$(C8m7I>n55\e(B C-h c \e$(C@G\e(B \e$(C5Z?!\e(B \e$(C@L>n\e(B
+\e$(CA}4O4Y\e(B.
+
+     \e$(C4u?m\e(B \e$(C;s<<GO0T\e(B \e$(C>K0m\e(B \e$(C=M@88i\e(B, c \e$(C4k=E?!\e(B k \e$(C8&\e(B \e$(CAvA$GU4O4Y\e(B.
+
+       >> C-h k C-p \e$(C6s0m\e(B \e$(CE8@LGAGO?)\e(B \e$(C:8<<?d\e(B.
+
+     Emacs\e$(C@G\e(B \e$(C@)55?l?!\e(B, \e$(C8m7I>n@G\e(B \e$(C@L8'0z\e(B \e$(C1b4I@L\e(B \e$(CG%=C5K4O4Y\e(B. \e$(C4Y\e(B \e$(C@P>z@88i\e(B,
+C-x 1 \e$(C6s0m\e(B \e$(CE8@LGAGO8i\e(B, \e$(C:|A.3*?I4O4Y\e(B.
+
+     \e$(C@L?\?!55\e(B \e$(C55?r@L\e(B \e$(C5G4B\e(B \e$(C?I<G@L\e(B \e$(C@V=@4O4Y\e(B.
+
+    C-h f      \e$(CFc<G8m@;\e(B \e$(C@T7BGO8i\e(B, \e$(CFc<G@;\e(B \e$(CG%=CGU4O4Y\e(B.
+
+       >> C-h f previous-line \e$(C@;\e(B \e$(CE8@LGAGO0m\e(B, <Return> \e$(C@;\e(B \e$(C4)8#<<?d\e(B. C-p
+          \e$(C8m7I>n8&\e(B \e$(C=GG`GO4B\e(B \e$(CFc<G?!\e(B \e$(C4kGQ\e(B \e$(CA$:88&\e(B \e$(CG%=CGU4O4Y\e(B.
+
+    C-h a      \e$(CE0?v5e8&\e(B \e$(C@T7BGO8i\e(B, \e$(C@L8'?!\e(B \e$(C1W\e(B \e$(CE0?v5e8&\e(B \e$(CFwGTGO0m\e(B, \e$(C8p5g\e(B \e$(C8m\e(B
+               \e$(C7I>n8&\e(B \e$(CG%=CGU4O4Y\e(B. \e$(C@L\e(B \e$(C8m7I>n5i@:\e(B \e$(C8p5N\e(B ESC x \e$(C7N\e(B \e$(C=GG`GR\e(B
+               \e$(C<v\e(B \e$(C@V=@4O4Y\e(B.
+
+       >> C-h a file \e$(C>K0m\e(B \e$(CE8@LGAGO0m\e(B, <Return>\e$(C@;\e(B \e$(C4)8#<<?d\e(B. \e$(C@L8'?!\e(B 
+          "file"\e$(C@L6s4B\e(B \e$(C9.@Z8&\e(B \e$(C0.4B\e(B \e$(C8p5g\e(B \e$(C8m7I>n8&\e(B \e$(CG%=CGU4O4Y\e(B. \e$(C6GGQ\e(B,
+          find-file \e$(C@L3*\e(B write-file\e$(C6s4B\e(B \e$(C@L8'@G\e(B C-x C-f \e$(C3*\e(B C-x C-w \e$(C?M\e(B \e$(C00\e(B
+          \e$(C@:\e(B \e$(C8m7I>n55\e(B \e$(CG%=C5K4O4Y\e(B.
+
+\e$(C3!@87N\e(B
+======
+
+\e$(C@XAv8;0m\e(B:      \e$(CA>7aGO4B5%4B\e(B, C-x C-c \e$(C6s0m\e(B \e$(CGU4O4Y\e(B.
+
+
+     \e$(C@L\e(B \e$(C@T9.Fm@:\e(B, \e$(CCJ=I@Z?!0T55\e(B \e$(C>K1b\e(B \e$(C=10T\e(B \e$(CGO557O\e(B \e$(C@G55GO0m\e(B \e$(C@V=@4O4Y\e(B.
+\e$(C1W7/9G7N\e(B, \e$(CH$=C\e(B \e$(C9+>y@N0!\e(B \e$(C@LGXGO1b\e(B \e$(C>n7A?n\e(B \e$(CA!@L\e(B \e$(C@V4Y8i\e(B, \e$(CH%@Z<-\e(B \e$(CG*3d\e(B
+\e$(CGOAv\e(B \e$(C8;0m\e(B, \e$(CF.A}@;\e(B \e$(C@b>F\e(B \e$(CAV<<?d\e(B.
+
+
+     \e$(C88>`\e(B, EMACS \e$(C8&\e(B \e$(C8n@OA$55\e(B \e$(C;g?kGO0m\e(B \e$(C:88i\e(B, \e$(C1W0M@;\e(B \e$(C1W885P4Y4B\e(B \e$(C0M@:\e(B 
+\e$(C8xGO0T\e(B \e$(C5I\e(B \e$(C0M@T4O4Y\e(B. \e$(CCVCJ?!4B\e(B \e$(C>n8.5U@}GR\e(B \e$(CAv55\e(B \e$(C8p8#0Z=@4O4Y\e(B.  \e$(C1W7/3*\e(B, 
+\e$(C1W0M@:\e(B \e$(C>n60GQ\e(B \e$(C?!5pEM6s55\e(B \e$(C6H\e(B \e$(C00=@4O4Y\e(B. EMACS \e$(C?M\e(B \e$(C00@L\e(B, \e$(C4k4\Hw\e(B \e$(C89@:\e(B \e$(C0M@L\e(B 
+\e$(C0!4IGQ\e(B \e$(C0f?l?!4B\e(B \e$(CF/Hw\e(B \e$(C1W780ZAv?d\e(B. \e$(C1W8.0m\e(B, EMACS \e$(C?!<-4B\e(B, \e$(C=GA&7N\e(B, \e$(C9+>y@L\e(B
+\e$(C3*\e(B \e$(CGR\e(B \e$(C<v\e(B \e$(C@V1b\e(B \e$(C6'9.?!\e(B.
+
+
+\e$(C0(;g\e(B
+====
+     \e$(C@L\e(B \e$(C9.<-4B\e(B, JUNET\e$(C?!<-\e(B \e$(C9hFw5H\e(B "\e$(C@O:;>n\e(B MicroEMACS (kemacs) \e$(C@T9.Fm\e(B" 
+\e$(C@;\e(B GNUE- macs (Nemacs)\e$(C@G\e(B Tutorial\e$(C?k@87N\e(B \e$(C0mCD>4\e(B \e$(C0M@T4O4Y\e(B.
+
+     Jonathan Payne \e$(C?!\e(B \e$(C@GGQ\e(B "JOVE Tutorial" (19 January 86) \e$(C@;\e(B \e$(C:/0fGQ\e(B 
+     \e$(C0M@L0m\e(B, \e$(C1W0M@:\e(B \e$(C?x7!\e(B, CCA-UNIX\e$(C@G\e(B Steve Zimmerman \e$(C?!\e(B \e$(C@GGX<-\e(B \e$(C:/0f5H\e(B,
+     MIT \e$(C@G\e(B "Teach-Emacs" \e$(C@T9.Fm\e(B (31 October 85) \e$(C@;\e(B (\e$(C4u?m\e(B) \e$(C:/0fGQ\e(B \e$(C0M@L\e(B
+     \e$(C>z=@4O4Y\e(B.
+
+     Update - February 1986 by Dana Hoggatt.
+
+     Update - December 1986 by Kim Leburg.
+
+     Update/Translate - July 1987 by SANETO Takanori
+
+\e$(CF/:0GQ\e(B \e$(C0(;g\e(B
+===========
+
+     \e$(CCVCJ?!\e(B \e$(C@L\e(B \e$(C@O:;>n9x?*@;\e(B \e$(C@[<:GQ\e(B, SANETO Takanori\e$(C>>\e(B. \e$(C@L\e(B \e$(C9.@e@:\e(B GMW +
+Wnn  + Nemacs\e$(C@;\e(B \e$(C;g?kGO?)\e(B \e$(C@[<:G_=@4O4Y\e(B. \e$(C1W?M\e(B \e$(C00@:\e(B \e$(CHG8"GQ\e(B \e$(CGA7N1W7%@;\e(B \e$(C885g\e(B
+\e$(C8p5g\e(B \e$(C:P?!0T\e(B \e$(C0(;g@G\e(B \e$(C6f@;\e(B \e$(CG%GO0m\e(B \e$(C=M=@4O4Y\e(B. \e$(C9x?*@L6s5g0!\e(B, \e$(C@T7B\e(B \e$(C5n\e(B
+\e$(C?)7/8p7N\e(B \e$(C55?M\e(B \e$(CAX\e(B \e$(CHDAvGO6s<n?l2?>>\e(B, \e$(C4k4\Hw\e(B \e$(C0(;gGU4O4Y\e(B.
+
+
+
+\e$(C?@?*\e(B, \e$(C0EA~\e(B, \e$(C@L\e(B \e$(C?\@G\e(B \e$(C9.C%@:\e(B \e$(C>F7!@G\e(B \e$(C;g6w?!0T\e(B \e$(C@V=@4O4Y\e(B.
+
+                        \e$BNkLZM5?.\e(B hironobu@sra.co.jp
+
+
+Update/Add - December 1987 by Hironobu Suzuki
+Update/Add - November 1989 by Ken'ichi Handa
+Update/Add - January  1990 by Shigeki Yoshida
+Update/Add - March    1992 by Kenichi HANDA
+
+
+\e$(C6G4Y8%\e(B \e$(C0(;g\e(B
+===========
+
+    \e$(C@L\e(B \e$(C9.<-4B\e(B "\e$(C@O:;>n\e(B GNUEMACS(Mule) \e$(C@T9.Fm\e(B"\e$(C@;\e(B \e$(CGQ19>n7N\e(B \e$(C9x?*GO?)\e(B,
+hemacs\e$(C7N\e(B \e$(C@[<:GQ\e(B \e$(C0M@T4O4Y\e(B. \e$(C@O:;>n9x?*@;\e(B \e$(C4c4gGQ\e(B \e$(C8p5g\e(B \e$(C:P\e(B, hemacs\e$(C8&\e(B
+\e$(C039_GO?)\e(B \e$(CAV=E\e(B \e$(C:P\e(B, \e$(CF/Hw\e(B Mule\e$(C0z\e(B hemacs\e$(C@G\e(B \e$(CH/0f18C`?!\e(B \e$(C89@:\e(B \e$(C55?r@;\e(B \e$(CAX\e(B
+\e$(C136G4kGP\e(B \e$(C3*0!?@?,18=G\e(B \e$(CA9>w;}@N\e(B Masashi SHIMBO\e$(C>>?M\e(B Katsuyoshi 
+Yamagami\e$(C>>?!0T\e(B \e$(C0(;g@G\e(B \e$(C6f@;\e(B \e$(C@|GU4O4Y\e(B.
+
+                      1993. 9. 25
+                             
+                     \e$(C136G4kGP\e(B \e$(C0xGP:N\e(B \e$(C@|1b0xGP0z\e(B \e$(C3*0!?@?,18=G\e(B
+                      Dosam HWANG   hwang@forest.kuee.kyoto-u.ac.jp
diff --git a/etc/TUTORIAL.no b/etc/TUTORIAL.no
new file mode 100644 (file)
index 0000000..0c8671a
--- /dev/null
@@ -0,0 +1,1125 @@
+Copyright (c) 1997, Stig Bjørlykke <stigb@tihlde.hist.no>
+Se i slutten av dokumentet for vilkår og betingelser.
+
+Dette dokumentet er basert på den engelske veiledningen, som er 
+Copyright (c) 1985, 1996 Free Software Foundation, Inc.
+
+
+Dette er den norske brukerveiledningen til Emacs.
+
+Emacs-kommandoer inkluderer ofte bruk av CONTROL-tasten (noen ganger
+merket CTRL eller CTL) eller META-tasten.  På noen tastaturer er
+META-tasten merket ALT eller EDIT eller noe annet (på Sun-tastaturer
+for eksempel, er det "ruter"-tasten til venstre for mellomromstasten).
+Hvis du ikke har noen META-tast kan du bruke ESC.  Istedenfor å skrive
+META eller CONTROL vil vi her bruke følgende forkortelser:
+
+ C-<chr>  betyr at du skal holde nede CONTROL-tasten mens du trykker
+         bokstaven <chr>.  Dermed vil C-f bety: hold nede
+         CONTROL-tasten og trykk f.
+ M-<chr>  betyr at du skal holde nede META-tasten mens du trykker
+         <chr>.  Hvis du ikke har noen META-tast kan du trykke <ESC>,
+         slippe tasten, og så trykke bokstaven <chr>.
+
+Viktig: for å avslutte Emacs trykker du C-x C-c.  (To tegn.)
+Tegnene ">>" helt til venstre angir en veiledning slik at du kan prøve 
+ut en kommando.  For eksempel:
+<<Blanke linjer, av pedagogiske grunner.  Teksten fortsetter nedenfor>>
+>>  Trykk C-v (View next screen) for å hoppe til neste skjermbilde.
+       (kom igjen, hold ned control-tasten og trykk v).  Fra nå av
+       bør du gjøre dette hver gang du er ferdig med å lese et
+       skjermbilde.
+
+Merk at det er en overlapping på to linjer når du skifter fra
+skjermbilde til skjermbilde.  Dette er for at det skal bli en viss
+kontinuitet når du skal bevege deg gjennom filen.
+
+Det første du trenger å vite er hvordan du manøvrerer deg i fra plass
+til plass i teksten.  Du har allerede lært hvordan du flytter deg ett
+skjermbilde framover, med C-v.  For å flytte deg et skjermbilde
+bakover trykker du M-v (hold ned META-tasten og trykk v, eller trykk
+<ESC>v hvis du ikke har META-, EDIT- eller ALT-tast).
+
+>> Prøv å trykke M-v og så C-v noen ganger.
+
+
+* OPPSUMMERING
+--------------
+
+Følgende kommandoer er nyttige for å se hele skjermbilder:
+
+       C-v     Flytt ett skjermbilde framover.
+       M-v     Flytt ett skjermbilde bakover.
+       C-l     Rensker skjermen og plasser teksten der markøren står
+               på midten av skjermbildet. (Det var control-(liten L),
+               ikke control-1.  Control-1 har en helt annen mening,
+               som beskrevet nedenfor.)
+
+>> Finn markøren og se hva slags tekst som står der.
+   Trykk C-l.
+   Finn markøren igjen og se hva slags tekst som står der nå.
+
+
+* GRUNNLEGGENDE MARKØRBEVEGELSER
+--------------------------------
+
+Det å flytte seg fra skjermbilde til skjermbilde er nyttig, men
+hvordan flytter man seg til en spesiell plass innenfor skjermbildet?
+
+Det er flere måter å gjøre dette på.  Den vanligste måter er å bruke
+kommandoene C-p, C-b, C-f og C-n.  Hver av disse kommandoene flytter
+markøren en rad eller kolonne i en bestemt retning på skjermen.  Her
+vises disse fire kommandoene og i hvilken retning de flytter markøren:
+
+                    Forrige linje (previous), C-p
+                                 :
+                                 :
+   Bakover, C-b .... Nåværende markørposisjon .... Framover, C-f
+                                 :
+                                 :
+                       Neste linje (next), C-n
+
+>> Flytt markøren til linjen midt i diagrammet ved å bruke C-n og C-p.
+   Bruk så C-l for å sentrere diagrammet på skjermbildet.
+
+Dette er sikkert litt enklere å huske hvis du tenker på disse
+forkortelsene: P (engelsk previous) for forrige, N for neste, B for
+bakover og F for framover.  Dette er de grunnleggende kommandoene for
+å flytte markøren, og du kommer sikkert til å bruke dem hele tiden, så
+det vil være en stor fordel om du lærer dem nå.
+
+>> Gjør noen C-n slik at du kommer ned til denne linjen.
+
+>> Flytt deg innover på linjen ved hjelp av noen C-f og så oppover med 
+   noen C-p.  Legg merke til hva C-p gjør når markøren står midt i en
+   linje.
+
+Tekstlinjer er atskilt med linjeskift-tegn. Den siste linjen i teksten
+avsluttes vanligvis med linjeskift, men Emacs krever ikke at du har
+det.
+
+>> Prøv en C-b i begynnelsen av en linje.  Dette gjør at markøren
+   flyttes til slutten av forrige linje.  Dette er fordi den flytter
+   markøren over linjeskiftet.
+
+C-f flytter også over linjeskift, akkurat som C-b.
+
+>> Utfør noen flere C-b slik at du får en følelse av hvor markøren
+   er.  Trykk så noen C-f til du kommer til slutten av linjen.  Trykk
+   da en C-f til slik at du flytter markøren til neste linje.
+
+Når du flytter markøren forbi toppen eller bunnen av skjermbildet vil
+teksten utenfor skjermen komme til syne.  Dette kalles "scrolling" og
+gjør det mulig for Emacs å flytte markøren uten at den forsvinner ut
+av skjermbildet.
+
+>> Prøv å flytte markøren forbi bunnen av skjermbildet ved hjelp av C-n 
+   og se hva som skjer.
+
+Hvis det går for tregt å flytte markøren ett og ett tegn kan du flytte
+den ett og ett ord.  M-f (Meta-f) flytter markøren ett ord framover,
+og M-b flytter den ett ord bakover.
+
+>> Utfør noen M-f og M-b.
+
+Hvis markøren står midt i et ord vil M-f flytte markøren til slutten
+av ordet.  Hvis du står midt mellom to ord vil M-f flytte markøren til
+slutten av det kommende ordet.  M-b fungerer på samme måte, bare i
+motsatt retning.
+
+>> Trykk M-f og M-b noen ganger og skift markørposisjon med noen C-f
+   og C-b slik at du ser hvordan M-f og M-b oppfører seg ved
+   forskjellig plassering av markøren både i og mellom ord.
+
+Legg merke til parallellen mellom C-f og C-b på en side, og M-f og M-b
+på den andre.  Ofte er Meta-kommandoer brukt til operasjoner relatert
+til enheter definert av språket (ord, setninger, avsnitt), mens
+Control-kommandoer blir brukt på grunnleggende enheter som er
+uavhengig av hva man redigerer (bokstaver, linjer, etc.).
+
+Denne parallellen finnes også mellom linjer og setninger: C-a og C-e
+flytter markøren til begynnelsen av linjen, eller til slutten av
+linjen, mens M-a og M-e flytter den til begynnelsen eller slutten av
+setningen.
+
+>> Prøv noen C-a, og så noen C-e
+   Prøv også noen M-a, og så noen M-e
+
+Se hvordan gjentatte C-a etter hverandre ikke gjør noe, mens flere M-a
+fortsetter å flytte markøren til neste setning.  Selv om dette ikke
+virker selvfølgelig er det ganske naturlig.
+
+Her er en kort oppsummering av de enkleste markørforflyttnings-
+kommandoene, inkludert ord- og setningsforflyttnings-kommandoene:
+
+       C-f     Flytte markøren en plass framover
+       C-b     Flytte markøren en plass bakover
+
+       M-f     Flytte markøren ett ord framover
+       M-b     Flytte markøren ett ord bakover
+
+       C-n     Flytte markøren til neste linje
+       C-p     Flytte markøren til forrige linje
+
+       C-a     Flytte markøren til begynnelsen av linjen
+       C-e     Flytte markøren til slutten av linjen
+
+       M-a     Flytte markøren til begynnelsen av setningen
+       M-e     Flytte markøren til slutten av sentingen
+
+>> Prøv ut alle disse kommandoene noen ganger, bare for trening.
+   Dette er de mest brukte kommandoene.
+
+To andre viktige markørbevegelses-kommandoer er M-< (Meta Mindre-enn),
+som flytter markøren til begynnelsen av teksten, og M-> (Meta
+større-enn), som flytter den til slutten av teksten.
+
+På noen tastaturer er ">" plassert over komma, så man må bruke shift
+for å få den fram.  På disse tastaturene må man også bruke shift for å
+taste M-<.  Uten shift-tasten vil det bli M-komma.
+
+>> Prøv M-< nå for å flytte markøren til begynnelsen av veiledningen.
+   Bruk så C-v for å flytte markøren tilbake hit igjen.
+
+>> Prøv også M-> for å flytte markøren til slutten av veiledningen.
+   Bruk så M-v for å flytte markøren tilbake hit igjen.
+
+Du kan også flytte markøren ved hjelp av piltastene, hvis terminalen
+har piltaster.  Vi anbefaler at du lærer deg C-b, C-f, C-n og C-p av
+tre grunner.  Først fordi de vil fungere på alle slags terminaler.
+Nummer to fordi når du først får litt trening i bruk av Emacs vil du
+finne ut at det går mye kjappere å bruke control-kombinasjoner enn
+piltastene (fordi du slipper å flytte hendene bort fra
+touch-plasseringen).  Den tredje grunnen er at når du først har lært
+deg til å bruke control-tastene blir det lettere å lære seg de mer
+avanserte control-funksjonene.
+
+De fleste av kommandoene i Emacs tar også et numerisk argument.  For
+de fleste av kommandoene vil dette si repetert utførelse.  Måten du
+gir en kommando et slikt argument er at du trykker C-u og deretter
+tallet, før du taster kommandoen.  Hvis du har en META- (eller EDIT-
+eller ALT-) tast så finnes det et annet alternativ for å gi numeriske
+argumenter: Trykk ned tallet mens du holder META-tasten nede.  Vi
+anbefaler at du bruker C-u fordi det fungerer på alle slags
+terminaler.
+
+For eksempel: C-u 8 C-f flytter markøren åtte plasser framover.
+
+>> Prøv kommandoene C-n eller C-p med numerisk argument slik at du
+   kommer nærmest mulig denne linjen med bare en kommando.
+
+De fleste kommandoene bruker det numeriske argumentet som en repetert
+utførelse.  Men det finnes kommandoer som bruker den annerledes.  C-v
+og M-v er blant disse unntakene.  Hvis man gir et argument til en av
+disse kommandoene vil skjermbildet flytte seg opp eller ned så mange
+linjer som argumentet, isteden for så mange skjermbilder.  For
+eksempel vil C-u 4 C-v flytte skjermbildet 4 linjer oppover.
+
+>> Prøv å taste C-u 8 C-v nå.
+
+Dette burde flyttet skjermbildet 8 linjer oppover.  Hvis du ønsker å
+flytte det tilbake igjen er det bare å gi samme argument til M-v.
+
+Hvis du bruker Emacs under X er det sannsynligvis et firkantet område
+på høyresiden av Emacs-vinduene, også kalt rullefelt.  Dette kan du
+også bruker for å forflytte deg innenfor teksten.
+
+>> Prøv å trykk på den midterste musknappen i det uthevete området på
+   rullefeltet.  Dette burde flyttet skjermbildet til en plass i
+   teksten avhengig av hvor i rullefeltet du trykket.
+
+>> Flytt muspekeren til en plass i rullefeltet ca. 1/5 fra toppen og
+   trykk på venstre musknapp noen ganger.
+
+
+* MARKØRBEVEGELSE PÅ EN X-TERMINAL
+----------------------------------
+
+Hvis du sitter på en X-terminal vil du sansynligvis finne det mye
+enklere å bruke piltastene for å bevege markøren.  Venstre-, høyre-,
+opp- og ned-pilene beveger markøren i ønsket retning.  De fungerer på
+samme måte som C-b, C-f, C-p og C-n, men er enklere å taste og huske.
+Du kan også bruke C-venstre og C-høyre for å bevege den innenfor ord,
+og C-opp og C-ned for å bevege den innenfor blokker (For eksempel
+avsnitt hvis du redigerer tekst).  Hvis du har tastene merket HOME
+(eller BEGIN) og END kan du bruke disse for å gå til henholdsvis
+begynnelsen av linjen og slutten av linjen, og C-HOME og C-END vil gå
+til henholdsvis begynnelsen av filen og slutten av filen.  Hvis
+tastaturet har PgUp- og PgDn-taster kan du bruker dem for å gå opp og
+ned et skjermbilde av gangen, på samme måte som M-v og C-v.
+
+Alle disse kan ta numeriske argumenter, som beskrevet ovenfor.  Du kan
+også benytte en snarvei for å skrive inn disse argumentene: hold ned
+CONTROL eller META tasten og skriv inn nummeret. For eksempel for å gå
+12 ord til høyre taster du C-1 C-2 C-høyre.  Legg merke til at dette
+blir svært enkelt å taste fordi du ikke slipper CONTROL-tasten mellom
+tastetrykkene.
+
+
+* HVIS EMACS HENGER
+-------------------
+
+Hvis Emacs slutter å reagere på kommandoer kan du trygt stoppe den ved
+å trykke C-g.  Du kan også bruke C-g for å stoppe en kommando som tar
+for lang tid å utføre.
+
+Det er også mulig å bruke C-g for å avbryte et numerisk argument eller
+begynnelsen på en kommando du ikke ønsker å utføre.
+
+>> Tast C-u 100 for å lage et numerisk argument på 100 og trykk C-g.
+   Trykk nå C-f.  Markøren skal nå flytte seg bare ett steg,
+   fordi du avbrøt argumentet med C-g.
+
+Hvis du ved en feiltakelse trykket <ESC> blir du kvitt denne ved å
+trykke C-g.
+
+
+* UTILGJENGELIGE KOMMANDOER
+---------------------------
+
+Enkelte av Emacs-kommandoene er "utilgjengelige" slik at nybegynnere
+ikke kan bruke dem uten at de ønsker det.
+
+Hvis du prøver en av disse utilgjengelige kommandoene vil Emacs komme
+med en melding som forteller hvilken kommando det er, og vil spørre om
+du virkelig vil fortsette å utføre denne kommandoen.
+
+Hvis du virkelig ønsker å prøve denne kommandoen trykker du
+mellomromstast som svar på spørsmålet.  Normalt, hvis du ikke ønsker å
+kjøre denne kommandoen, svarer du "n" på spørsmålet.
+
+>> Tast `C-x n p' (som er en utilgjengelig kommando),
+   tast n som svar på spørsmålet.
+
+
+* VINDUER
+---------
+
+Emacs kan ha flere vinduer, og hver av dem kan vise sin egen tekst.
+Legg merke til at "vinduer" i Emacs ikke refererer til separate
+overlappende vinduer i vindus-systemet, men til separate buffer
+innenfor et enkelt X-vindu.  (Emacs kan også ha flere X-vinduer, eller
+"rammer" i Emacs-terminologi.  Dette blir beskrevet senere.)
+
+Akkurat nå er det best at vi ikke går inn på teknikker for å bruke
+flere vinduer, men du trenger å vite hvordan du blir kvitt ekstra
+vinduer som kan dukke opp for å vise hjelp, eller utskrift fra enkelte
+kommandoer.  Det er enkelt:
+
+       C-x 1   Ett vindu (dvs. gjem alle andre vinduer).
+
+Det er da Control-x etterfulgt av tallet 1.  C-x 1 utvider vinduet der
+markøren står, slik at det fyller hele skjermbildet og gjemmer alle
+andre vinduer.
+
+>> Flytt markøren til denne linjen og trykk C-u 0 C-l.
+
+(Husk at C-l renser skjermen og midtstiller linjen der markøren står.
+Hvis du gir et numerisk argument til denne kommandoen betyr det "rensk
+skjermen og legg linjen der markøren står på linjen angitt av
+argumentet" Derfor betyr C-u 0 C-l at skjermen skal renskes og linjen
+der markøren står plasseres øverst.)
+
+>> Tast Control-x 2.
+   Se hvordan vinduet krympes og et nytt dukker opp med samme
+   innhold som dette.
+
+>> Tast C-x 1 for at vinduet skal forsvinne.
+
+
+* INNSETTING OG SLETTING
+------------------------
+
+Hvis du ønsker å sette inn tekst er det bare å skrive teksten.  Tegn
+som du kan se, slik som A, 7, *, ol. blir tolket som tekst og blir
+satt rett inn.  Tast <Retur> (enter-tasten) for å sette inn et
+linjeskift.
+
+Du kan slette det siste tastete tegnet ved å trykke <Delete>.
+<Delete> er en tast på tastaturet, og kan også være merket "Del".  I
+noen tilfeller fungerer også "Backspace" som <Delete>, men ikke
+alltid!
+
+Mere generelt sletter <Delete> tegnet rett foran der markøren er
+plassert.
+
+>>  Gjør dette nå -- skriv inn noen tegn og slett dem ved å bruke
+    <Delete>.  Ikke vær redd for å skrive i denne filen, du vil ikke
+    kunne forandre på den originale veiledningen.  Dette er bare en
+    lokal kopi.
+
+Når en linje blir for lang til å passe inn på en skjermbredde så
+fortsetter den på linjen under.  En backslash ("\") i enden av høyre
+marg indikerer at linjen fortsetter.  Om du kjører Emacs under X vil
+du se en liten pil som peker ned til neste linje.
+
+>>  Skriv inn litt tekst slik at du kommer til enden av linjen, og
+    fortsett å skrive litt til.  Du vil da se hvordan
+    fortsettelseslinjen blir.
+
+>>  Bruk <Delete> for å slette teksten inntil linjen passer på en
+    skjermbredde igjen.  Fortsettelseslinjen vil da forsvinne.
+
+Du kan slette linjeskift akkurat som andre tegn.  Ved å slette
+linjeskiftet mellom to linjer blir disse smeltet sammen til en.  Hvis
+resultatet av denne sammensmeltingen blir for stor til å passe på en
+skjermbredde så vil den bli vist med en fortsettelseslinje.
+
+>> Flytt markøren til begynnelsen av en linje og trykk <Delete>.
+   Dette vil spleise sammen linjen med linjen over.
+
+>> Trykk <Return> for å sette inn linjeskiftet du slettet.
+
+Husk at de fleste Emacs-kommandoene kan ta numeriske argumenter.
+Dette gjelder også tekst-tegn.  Ved å repetere et tekst-tegn vil det
+komme flere ganger.
+
+>> Prøv det nå: tast C-u 8 * for å sette inn ********.
+
+Du har nå lært de mest grunnleggende måtene å skrive noe inn i Emacs,
+og å rette feil.  Du kan slette ord eller linjer også.  Her er en
+oversikt over kommandoer for sletting:
+
+       <Delete>     sletter tegnet som står rett foran markøren
+       C-d          sletter tegnet som står rett under markøren
+
+       M-<Delete>   sletter ordet rett foran markøren
+       M-d          sletter ordet rett etter markøren
+
+       C-k          sletter fra markøren til slutten av linjen
+       M-k          sletter til slutten av setningen
+       
+Legg merke til at <Delete> og C-d kontra M-<Delete> og M-d fortsetter
+parallellen som ble startet av C-f og M-f (vel, <Delete> er ikke
+akkurat noe kontroll-tegn, men la oss ikke bry oss om det).  C-k og
+M-k fungerer på samme måte som C-e og M-e (nesten).
+
+Når du sletter flere enn ett tegn om gangen vil Emacs lagre den
+slettete teksten slik at du han hente den tilbake igjen.  Denne
+teksten blir kalt "killed text".  Å bringe tilbake "killed text" blir
+kalt "yanking".  Du kan enten hente tilbake "killed text" på samme
+plassen som den ble slettet, eller du kan sette den inn en annen plass
+i teksten.  Du kan også hente den tilbake flere ganger etter hverandre
+slik at du får flere like forekomster av den.  Kommandoen for å hente
+tilbake teksten er C-y.
+
+Legg merke til at forskjellen mellom "killed text" og "deleted text"
+er at "killed text" kan bli hentet tilbake, mens "deleted text" ikke
+kan det.  Generelt kan man si at kommandoer som sletter flere enn ett
+tegn lagrer unna teksten slik at den kan bli hentet tilbake, og
+kommandoer som bare sletter ett tegn, eller tomme linjer og mellomrom
+ikke lagrer det.
+
+>> Flytt markøren til begynnelsen av en linje som ikke er tom.
+   Trykk så C-k for å "kille" teksten på denne linjen.
+>> Trykk C-k en gang til.  Du vil nå se at den sletter den tomme
+   linjen som ble stående igjen etter teksten.
+
+Legg merke til at en enkel C-k bare sletter teksten på linjen, og at
+enda en C-k sletter selve linjen og flytter teksten på linjen under en
+linje opp.  C-k takler numeriske argumenter litt spesielt.  Den
+sletter så mange linjer OG innholdet i dem.  Dette er ikke bare
+repetisjon av kommandoen.  C-u 2 C-k sletter to linjer samt de tomme
+linjene, mens C-k to ganger ikke vil gjøre det.
+
+Trykk C-y for å hente tilbake teksten som sist ble "killet" der
+markøren står.
+
+>> Prøv dette.  Trykk C-k etpar ganger.
+
+Og hent dem så tilbake igjen:
+
+>> Trykk C-y.  Flytt markøren noen linjer ned og trykk C-y igjen.
+   Dette er måten å kopiere tekst på.
+
+Men hva gjør du hvis du har en tekst du ønsker å hente tilbake, og så
+"killer" noe nytt?  C-y vil hente tilbake den siste teksten som ble
+"killet".  Men den forrige teksten er ikke fortapt.  Du kan få den
+tilbake ved å bruke kommandoen M-y.  Etter at du har brukt C-y for å
+hente tilbake den siste "killed text" vil M-y erstatte denne teksten
+med teksten fra den forrige "killed text".  Når du har funnet fram til
+ønsket tekst trenger du ikke gjøre noe mere for å beholde den.
+
+Hvis du tastet M-y mange nok ganger vil du komme tilbake til starten
+igjen (teksten som sist ble "killet")
+
+>> "Kill" en linje, flytt markøren til en ny linje og "kill" denne
+   også.  Bruk så C-y for å hente tilbake den siste linjen.  Trykk M-y 
+   for å bytte den med den forrige "killete" linjen.  Trykk flere M-y
+   og se hva du får.  Fortsett med dette til du får tilbake den første
+   linjen igjen, og så noen ganger til.  Hvis du ønsker kan du prøve
+   med positive og negative argumenter til M-y.
+
+* ANGRE
+-------
+
+Hvis du gjør en forandring i teksten og finner ut at du angrer på det
+du har gjort kan du oppheve dette med kommandoen C-x u (undo).
+
+Normalt vil C-x u oppheve forandringene gjort av den siste utførte
+kommandoen.  Hvis du repeterer C-x u flere ganger på rad vil hver
+repetisjon oppheve enda en utført kommando.
+
+Men det er to unntak her.  Kommandoer som ikke forandrer i teksten
+teller ikke (dette inkluderer markørbevegelser og flytte-kommandoer),
+og inntastede enkeltbokstaver blir vanligvis gruppert i grupper på opp
+til 20 tegn.  (Dette er for å redusere antall C-x u'er som trengs for
+å angre inntastet tekst.)
+
+>> "Kill" denne linjen med C-k.  C-x u vil få den tilbake igjen.
+
+C-_ er en alternativ angre-kommando.  Den fungerer på samme måte som
+C-x u, men er enklere å taste flere ganger på rad.  Ulempen med C-_ er
+at den er vanskelig å finne fram til på enkelte tastaturer.  Det er
+derfor vi i tillegg har C-x u.  På enkelte terminaler kan du få fram
+C-_ ved å trykke / mens CTRL er holdt nede.
+
+Et numerisk argument til C-_ eller C-x u vil repetere antall
+angringer.
+
+
+* FILER
+-------
+
+For at teksten du har forandret på skal lagres permanent må du legge
+den i en fil.  Hvis ikke vil den forsvinne når du avslutter Emacs.  Du
+legger teksten i en fil ved først å "finne" denne filen.  (Dette blir
+også kalt å "besøke" filen.)
+
+Det å finne en fil betyr at du henter innholdet av filen inn i Emacs.
+På mange måter er det som om du forandrer på selve filen, men
+forandringene du gjør på filen mens du benytter Emacs vil ikke bli
+permanente får du lagrer filen.  Dette er fordi du skal slippe å legge
+igjen halv-forandrete filer hvis du ikke ønsker det.  Og selv når du
+lagrer vil Emacs legge igjen en backup-fil i tilfelle du senere
+bestemmer deg for at du ikke ønsker disse forandringene.
+
+Hvis du ser nesten nederst i skjermbildet så vil du se en linje som
+begynner og slutter med minustegn, og som inneholder teksten "XEmacs:
+TUTORIAL.no".  Denne delen av skjermbildet vil alltid vise navnet på
+filen du er "inne i".  Akkurat nå er du inne i en fil som heter
+"TUTORIAL.no" og som er en personlig kopi av Emacs- veiledningen.
+Samme hvilken fil du er inne i så vil filnavnet stå akkurat på denne
+plassen.
+
+Kommandoene for å finne filer og lagre filer er litt ulike de andre
+kommandoene du har lært fordi de består av to tegn.  Begge starter med
+tegnet Control-x.  Det er faktisk mange kommandoer som starter med
+Control-x, og mange av dem har med filer, skjermbilder og slike ting å
+gjøre.  Disse kommandoene er to, tre eller fire tegn lange.
+
+En annen ting med kommandoen for å finne filer er at du må fortelle
+hvilket filnavn du ønsker.  Vi sier at kommandoen "leser et argument
+fra terminalen" (i dette tilfellet vil argumentet være navnet på
+filen).  Etter at du har trykket kommandoen
+
+       C-x C-f   Finn en fil
+
+vil Emacs spørre etter et filnavn.  Filnavnet du skriver vil komme
+fram på den nederste linjen i skjermbildet.  Denne linjen blir kalt
+minibuffer når det blir brukt slik.  Du kan bruke vanlige
+Emacs-redigeringskommandoer for å forandre på filnavnet.
+
+Mens du holder på å skrive inn filnavnet (eller noe annet i
+minibuffret) kan du avbryte med kommandoen C-g.
+
+>> Tast C-x C-f og så C-g.  Dette avbryter minibuffret og avbryter
+   også C-x C-f kommandoen som brukte minibuffret.
+
+Når du er ferdig med å skrive filnavnet trykker du <Return> for å
+fullføre kommandoen.  Da vil C-x C-f kommandoen begynne å lete fram
+filen.  Minibuffret forsvinner når C-x C-f kommandoen er ferdig.
+
+Om en liten stund vil filen komme inn i skjermbildet og du kan begynne
+å redigere innholdet.  Når du ønsker å lagre filen kan du bruke denne
+kommandoen
+
+       C-x C-s   Lagre fil
+
+Denne kopierer teksten i skjermbildet over til filen.  Første gang
+dette gjøres vil Emacs døpe om det originale filnavnet til et nytt
+navn slik at den ikke går tapt.  Det nye filnavnet blir laget ved at
+det blir lagt til en "~" i slutten av det originale filnavnet.
+
+Når lagringen er utført vil Emacs skrive ut navnet på filen som ble
+lagret.  Du bør lagre ofte slik at du ikke mister så mye om det skulle
+oppstå en system-krasj.
+
+>> Trykk C-x C-s for å lagre en kopi av denne veiledningen.
+   Dette skal føre til at "Wrote ...TUTORIAL.no" blir
+   skrevet ut nederst i skjermbildet.
+
+NB: På noen systemer vil C-x C-s føre til at skjermen "fryses" og du
+vil ikke være istand til å utføre noen flere kommandoer.  Dette
+indikerer at en operativsystem-egenskap kalt "flytkontroll" har fanget
+opp C-s'en og ikke sendt den videre til Emacs.  For å fortsette må du
+trykke C-q.  Se da i avsnittet "Spontaneous Entry to Incremental
+Search" i Emacs-manualen for råd om hvordan dette kan avverges.
+
+Du kan finne en eksisterende fil, enten for å forandre den eller for å
+se på den.  Du kan også finne en fil som ikke eksisterer.  Dette er
+måten du lager nye filer med Emacs: finn filen, som er tom til å
+begynne med, og start å skrive teksten som skal inn i denne filen.
+Først når du lagrer filen vil Emacs virkelig opprette filen med den
+teksten du har skrevet.  Fra nå av kan du betrakte deg selv som om du
+skriver i en fil som allerede eksisterer.
+
+
+* BUFFER
+--------
+
+Hvis du finner en ny fil med C-x C-f vil den første filen fortsatt
+være åpen i Emacs.  Du kan bytte tilbake til den ved å finne den på
+nytt med C-x C-f.  På denne måten kan du ha et stort antall åpne filer
+i Emacs.
+
+>> Lag en fil med navnet "foo" ved å trykke C-x C-f foo <Return>.
+   Sett inn litt tekst, forandre litt på den, og lagre "foo" ved å
+   bruke C-x C-s.  Skriv tilslutt C-x C-f TUTORIAL.no<Return>
+   for å komme tilbake til denne veiledningen.
+
+Emacs lagrer teksten i hver av filene i et objekt kalt "buffer".  Når
+du finner en ny fil vil det opprettes et nytt buffer i Emacs.  For å
+se en liste over eksisterende buffer i Emacs kan du trykke
+
+       C-x C-b   Utlisting av buffrene.
+
+>> Prøv C-x C-b nå.
+
+Se hvordan hvert av buffrene har hvert sitt navn, og at de også kan ha
+et filnavn på den filen der innholdet kommer fra.  Noen buffre er ikke
+knyttet til noen fil, for eksempel bufferet "Buffer List".  Det er det
+buffret som inneholder listen over buffre som ble generert med C-x
+C-b.  All teksten du ser i et Emacs-vindu tilhører et buffer.
+
+>> Tast C-x 1 for å bli kvitt buffer-listen.
+
+Hvis du gjør forandringer i en av filene og åpner en ny fil så vil
+ikke den første filen bli lagret, men forandringene vil fortsatt være
+i buffret.  Oppretting eller redigering av en ny fil vil ikke påvirke
+den første filens buffer.  Dette er nyttig, men betyr også at du
+trenger en passende måte å lagre den første filens buffer.  Det vil
+bli alt for omstendig å skifte tilbake til det forrige buffret med C-x
+C-f for så å lagre filen med C-x C-s.  Derfor har vi kommandoen
+
+       C-x s   Lagre noen buffer
+
+C-x s spør for hvert enkelt buffer som har blitt forandret siden
+forrige lagring om du ønsker å lagre dette.
+
+>> Sett inn en linje med tekst og lagre med C-x s
+   Du skal nå få et spørsmål om du ønsker å lagre buffret
+   TUTORIAL.no.  Svar ja på spørsmålet ved å taste "y" (yes).
+
+
+* BRUK AV MENYEN
+----------------
+
+Hvis du bruker en X-terminal vil du sikkert legge merke til menyen på
+toppen av skjermbildet.  Via denne menyen får du tilgang til de mest
+brukte Emacs-kommandoene, slik som "find file".  Dette er svært enkelt
+i begynnelsen, når du ikke husker alle tastetrykkene som skal til for
+hver av kommandoene.  Men når du begynner å kjenne Emacs vil det være
+lettere å begynne å bruke tastekombinasjonene.  Disse står rett ved
+siden av menynavnet i menyen.
+
+Legg merke til at det er mange menypunkter som ikke har en eksakt
+tastekombinasjon.  For eksempel "Buffers"-menyen, som lister ut alle
+tilgjengelige buffre sortert i "sist brukt"-rekkefølge.  Du kan enkelt
+skifte til et buffer ved å finne navnet på det i "Buffers"-menyen og
+velge det.
+
+
+* BRUK AV MUSA
+---------------
+
+Når du kjører Emacs under X er det muligheter for å bruke musen.  Du
+kan plassere markøren ved å trykke venstre mustast der du ønsker at
+den skal være, og du kan markere tekst ved å holde nede venstre
+mustast mens du beveger markøren over teksten du ønsker å markere.
+(Eller alternativt: klikk venstre mustast i den ene enden av teksten
+du ønsker å markere, flytt muspekeren til den andre enden og bruk
+Shift-klikk for å markere teksten.)
+
+For å "kille" den markerte teksten kan du bruke kommandoen C-w eller
+velge Cut fra "Edit"-menyen.  Legg merke til at disse *ikke* er
+likeverdige.  C-w lagrer bare teksten internt i Emacs (ala C-k, som
+beskrevet ovenfor), mens Cut legger også teksten i X sitt "clipboard",
+der den også blir tilgjengelig for andre applikasjoner.
+
+For å hente tekst fra X-clipboard'et kan du bruke "Paste" fra "Edit"-
+menyen.
+
+Den midterste musknappen blir vanligvis brukt for å velge "linker" som
+er tilgjengelig i skjermbildet.  Hvis du for eksempel går inn i Info
+(on-line dokumentasjonen til Emacs) ved å bruke C-h i, eller "Help"-
+menyen, kan du følge linkene ved å trykke den midterste musknappen.
+Og hvis du skriver inn et filnavn (For eksempel "Find File"), og
+trykker TAB for å få fram en fillisting, så kan du komplettere
+filnavnet ved å trykke den midterste musknappen på filnavnet.
+
+Ved å trykke høyre musknapp vil du få fram en popup-meny.  Innholdet i
+denne menyen er avhengig av hvilken modus du er inne i, og vanligvis
+inneholder den et par av de mest brukte kommandoene slik at de blir
+lett tilgjengelige.
+
+>> Trykk høyre mustast nå.
+
+Du er nødt til å holde knappen nede for at menyen skal vises.
+
+
+* UTVIDING AV KOMMANDOSETTET
+----------------------------
+
+Det finnes mange flere Emacs-kommandoer enn det som er mulig å tilegne
+control- eller meta-taster.  For å komme rundt dette har Emacs en "X"-
+(eXtend) kommando.  Denne kommer i to utgaver:
+
+       C-x     Tegn-utvidelse.  Etterfulgt av et tegn.
+       M-x     Navngitt kommandoutvidelse.  Etterfulgt av et
+               kommandonavn.
+
+Dette er kommandoer som er generelt viktige, men som blir brukt mindre
+enn de kommandoene du allerede har lært.  Du har allerede sett to av
+dem, C-x C-f for Find, og C-x C-x for Save.  Et annet eksempel er
+kommandoen for å avslutte Emacs, som har kommandoen C-x C-c.  (Ikke
+vær redd for å miste eventuelle forandringer du har gjort, C-x C-c vil
+sørge for at du får lagret de forandringene du ønsker før Emacs
+avslutter.)
+
+C-z er kommandoen for å avslutte Emacs *midlertidig* slik at du kan
+vende tilbake til samme Emacs senere.
+
+På systemer som tillater det vil C-z suspendere Emacs, dvs. returnere
+tilbake til skallet uten å drepe Emacs-prosessen.  I de fleste
+skallene kan du få tilbake Emacs med kommandoen `fg', eller `%xemacs'.
+
+På systemer som ikke har implementert denne egenskapen vil C-z
+opprette et skall som kjører under Emacs, og som gir deg sjansen til å
+kjøre andre programmer og så returnere til Emacs etterpå.  Den gir
+ingen eksakt avslutning av Emacs.  I slike tilfeller vil vanligvis
+kommandoen `exit' returnere fra skallet og tilbake til Emacs.
+
+C-x C-c benyttes når du skal avslutte Emacs.  Det er også fornuftig å
+avslutte Emacs hvis den har blitt startet opp av et mail-program,
+eller andre applikasjoner, siden det ikke er sikkert at de greier å
+håndtere suspendering av Emacs.  Under normale omstendigheter, hvis du
+ikke har tenkt å logge ut, er det bedre å suspendere Emacs med C-z
+isteden for å avslutte.
+
+Det finnes mange C-x kommandoer.  Her er en liste over dem du har
+lært:
+
+       C-x C-f         Finne fil.
+       C-x C-s         Lagre fil.
+       C-x C-b         Utlisting av buffrene.
+       C-x C-c         Avslutte Emacs.
+       C-x u           Angre.
+
+Navngitte kommandoer er kommandoer som blir brukt mye sjeldnere, eller
+kommandoer som bare brukes i bestemte modus.  Et eksempel på en slik
+kommando er "replace-string", som globalt erstatter en tekststreng med
+en annen.  Når du taster M-x vil Emacs komme med en prompt nederst i
+skjermbildet der du skal skrive inn kommandoen du ønsker å kjøre, i
+dette tilfellet "replace-string".  Det er bare å skrive "repl s<TAB>",
+Emacs vil da fullføre kommandonavnet.  Avslutt kommandoen med
+<Return>.
+
+Kommandoen "replace-string" krever to argumenter, tekststrengen som
+skal erstattes og tekststrengen som denne skal erstattes med.  Du må
+avslutte begge argumentene med <Return>.
+
+>> Flytt markøren til den blanke linjen to linjer under denne.
+   Trykk M-x repl s<Return>forandret<Return>endret<Return>.
+
+   Legg merke til hvordan denne linjen har blitt forandret, du har
+   erstattet ordet f-o-r-a-n-d-r-e-t med "endret" alle plassene der
+   ordet "forandret" forekommer, etter markørpossisjonen.
+
+
+* AUTOMATISK LAGRING
+--------------------
+
+Når du har gjort forandringer i en fil, men ikke lagret den, vil det
+gå tapt hvis maskinen krasjer.  Som en beskyttelse mot dette vil Emacs
+periodisk lagre en "autosave"-fil for hver av filene du redigerer.
+Denne filen har en # i begynnelsen og slutten av filnavnet.  Hvis du
+for eksempel har en fil med navnet "hallo.c" så vil navnet på
+"autosave"-filen bli "#hallo.c#".  Når du lagrer filen på vanlig måte
+vil Emacs slette unna "autosave"-filen.
+
+Hvis maskinen krasjer kan du gjenvinne "autosave"-filene ved å finne
+filen på vanlig måte (filen du redigerte på, ikke "auto-save"- filen)
+og trykke M-x recover file<Return>.  Når Emacs vil ha bekreftelse
+svarer du yes<Return> for å gjenvinne "autosave"-filen.
+
+
+* ECHO-OMRÅDE
+-------------
+
+Hvis Emacs ser at du skriver kommandoene langsomt så vil den vise dem
+på den nederste linjen i skjermbildet i et område som blir kalt "echo
+area".  Dette området inneholder den nederste linjen i skjermbildet.
+
+
+* MODUSLINJEN
+-------------
+
+Linjen like over echoområdet blir kalt "moduslinje".  Denne ser
+omtrent slik ut:
+
+--**-XEmacs: TUTORIAL.no          (Fundamental)--L773--68%--------
+
+Denne linjen inneholder nyttig informasjon over statusen til Emacs og
+teksten du redigerer på.
+
+Du vet allerede hva filnavnet betyr, det er den filen du har funnet.
+-NN%-- forteller den aktuelle posisjonen i teksten, dvs. NN prosent av
+teksten befinner seg over toppen av skjermbildet.  Hvis toppen av
+filen er i skjermbildet vil det stå --Top-- isteden for --00%--, og
+hvis slutten av filen er i skjermbildet vil det stå --Bot--.  Hvis du
+ser på en fil der hele teksten passer inn på en side vil det stå
+--All--.
+
+Stjernene i begynnelsen av linjen forteller at det er blitt foretatt
+endringer i filen siden den sist ble lagret.  Når du nettopp har åpnet
+en fil vil det ikke stå noe her, bare minustegn.
+
+Den delen av moduslinjen som står inne i parenteser forteller hvilken
+redigeringsmodus du bruker.  Standardmodusen er "Fundamental", som er
+den du bruker nå.  Det er et eksempel på en "hovedmodus".
+
+Emacs har mange forskjellige hovedmoduser.  Noen av dem er tiltenkt
+redigering av forskjellige programmeringsspråk og/eller typer tekst,
+for eksempel Lisp mode, Text mode, ol.  Det kan bare være en
+hovedmodus om gangen, og modusnavnet vil alltid stå der det står
+Fundamental nå.
+
+Hver hovedmodus gjør at endel kommandoer oppfører seg annerledes.  Det
+finnes for eksempel kommandoer for å sette inn kommentarer i
+programkode, og siden hvert programmeringsspråk har forskjellige måter
+å angi kommentarer på må de ulike hovedmodusene sette inn disse
+kommentarene på forskjellige måter.  Hver hovedmodus har en kommando
+som brukes for å skifte til denne modusen på.  For eksempel M-x
+fundamental-mode er kommandoen for å skifte til Fundamental mode.
+
+Hvis du skal redigere engelsk (eller norsk) tekst, slik som denne
+filen, bør du bruke "Text Mode".
+
+>> Tast M-x text-mode<Return>.
+
+Ingen av kommandoene du har lært hittil vil forandre Emacs i noe
+særlig grad.  Men du kan legge merke til at M-f og M-b nå behandler
+apostrofer som en del av ordet.  Tidligere, i Fundamental mode,
+behandlet M-f og M-b apostrofene som ordskillere.
+
+Hver hovedmodus gjør vanligvis små forandringer slik som denne, og de
+fleste kommandoene gjør det samme i hver hovedmodus, de fungerer bare
+litt annerledes.
+
+For å få fram dokumentasjonen på den hovedmodusen du er inne i nå kan
+du trykke C-h m.
+
+>> Bruk C-u C-v slik at denne linjen kommer nær toppen av
+   skjermbildet.
+>> Trykk C-h m, og se hvordan Text mode er forskjellig fra Fundamental 
+   mode.
+>> Trykk q for å fjerne dokumentasjonen fra skjermbildet.
+
+Hovedmodus blir kalt hovedmodus fordi det også finnes bimodus.
+Bimodus er ikke alternativer til hovedmodus, men de modifiserer dem.
+Hver bimodus kan bli slått av og på uavhenging av andre bimoduser, og
+uavhengig av hovedmodus.  Derfor kan du bruke ingen bimodus, en
+bimodus, eller en kombinasjon av flere bimoduser.
+
+En bimodus som er nyttig, spesielt ved redigering av tekst, er "Auto
+Fill mode".  Når denne er slått på vil Emacs dele linjene automatisk
+hvis linjen blir for lang for å passe inn på ett skjermbilde.
+
+Du kan slå på Auto Fill mode ved å utføre en M-x
+auto-fill-mode<Return>.  Når denne modusen er på kan du slå den av
+igjen ved å utføre en ny M-x auto-fill-mode<Return>.  Denne kommandoen
+bytter mellom av og på, også kalt "toggle the mode".
+
+>> Trykk M-x auto-fill-mode<Return> nå.  Skriv så inn en linje med
+   "aoeu " inntil linjen deler seg.  Du er nødt til å putte inn
+   ordskillere, fordi Auto Fill bare brekker linjen ved ordskillere.
+
+Margen er vanligvis satt til 70 tegn, men du kan endre dette ved å
+bruke kommandoen C-x f.  Antall tegn blir gitt til kommandoen gjennom
+et numerisk argument.
+
+>> Tast C-x f med et argument på 20.  (C-u 20 C-x f).  Skriv så inn
+   noe tekst og legg merke til at Emacs bryter linjer som er lengre
+   enn 20 tegn.  Sett margen tilbake til 70 tegn igjen, ved å bruke
+   C-x f en gang til.
+
+Hvis du gjør forandringer midt i en linje så vil ikke Auto Fill mode
+kunne reformatere linjene for deg.  For å gjøre dette kan du taste M-q
+(Meta-q) med markøren inne i det avsnittet du ønsker å reformatere.
+
+>> Flytt markøren inn i forrige avsnitt og trykk M-q.
+
+
+* SØKING
+--------
+
+Emacs kan utføre søk etter tekststrenger (grupper med sammenhengende
+bokstaver eller ord) enten framover eller bakover i teksten.  Når du
+søker etter tekst vil markøren flytte seg til den neste plassen der
+tekststrengen opptrer.
+
+Søkemetoden til Emacs er litt forskjellig fra andre søkemetoder
+implementert i de fleste andre redigeringsprogrammer på den måten at
+den er inkrementell.  Dette betyr at søket foregår mens du taster inn
+tekststrengen du skal søke etter.
+
+Kommandoen for å innlede et søk er C-s for å søke framover, og C-r for 
+å søke bakover.  MEN VENT!  Ikke prøv dem enda.
+
+Når du taster C-s vil du legge merke til at teksten "I-search" dukker
+opp i echoområdet.  Dette forteller deg at Emacs er inne i det som
+kalles inkrementellt søk, og venter på at du skal skrive inn det du
+leter etter.  <Return> avslutter søket.
+
+>> Trykk nå C-s for å starte et søk.  Skriv så, en bokstav om gangen,
+   ordet 'markør', og legg inn en pause etter hver gang du skriver en
+   bokstav slik at du får med deg hva som skjer med markøren.
+   Nå har du søkt etter ordet "markør" en gang.
+>> Tast C-s en gang til for å søke etter neste forekomst av ordet
+   "markør".
+>> Trykk nå <Delete> fire ganger og se hvordan markøren beveger seg
+>> Trykk <Return> for å avslutte søket.
+
+La du merke til hva som skjedde?  I inkrementell søk prøver Emacs å gå
+til den forekomsten av teksten som du har skrevet så langt, og uthever
+det slik at du ser hvor den er.  For å gå til neste forekomst av ordet
+'markør' er det bare å taste C-s en gang til.  Hvis det ikke er flere
+forekomster vil Emacs komme med et pip og en melding om at søket
+midlertidig har feilet.  C-g vil også avbryte søket.
+
+NB: På noen systemer vil C-s føre til at skjermen "fryses" og du vil
+ikke være istand til å utføre noen flere kommandoer.  Dette indikerer
+at en operativsystem-egenskap kalt "flytkontroll" har fanget opp
+C-s'en og ikke sendt den videre til Emacs.  For å fortsette må trykke
+C-q.  Se da i avsnittet "Spontaneous Entry to Incremental Search" i
+Emacs-manualen for råd om hvordan dette kan avverges.
+
+Hvis du er inne i et inkrementellt søk og trykker <Delete> vil du
+legge merke til at den siste bokstaven i søkestrengen blir slettet og
+søket hopper tilbake til den forrige forekomsten fra søket.  Hvis du
+for eksempel taster "m" for å søke etter den første forekomsten av
+"m", og så trykker "a" så vil markøren bevege seg til første forekomst
+av "ma".  Trykk nå <Delete>.  Dette fjerner "a" fra søkestrengen, og
+markøren beveger seg tilbake til den første forekomsten av "m".
+
+Hvis du er midt i et søk og trykker en control- eller meta-kombinasjon
+(med et par unntak: tegn som blir brukt under søkingen, slik som C-s
+og C-r), vil søket avbrytes.
+
+C-s starter et søk som leter etter enhver forekomst av søkestrengen
+ETTER markørposisjonen.  Hvis du skal søke etter en streng tidligere i
+teksten må du bruke C-r.  Alt vi har fortalt om C-s fungerer også for
+C-r, bortsett fra at retningen på søket er i motsatt retning.
+
+
+* FLERE VINDUER
+---------------
+
+En av egenskapene til Emacs er at du kan vise flere en et buffer på
+skjermen samtidig.
+
+>> Flytt markøren til denne linjen og trykk C-u 0 C-l
+
+>> Tast nå C-x 2, som vil føre til at skjermen deles i to vinduer.
+   Begge vinduene viser denne veiledningen.  Markøren står i det
+   øverste vinduet.
+
+>> Tast C-M-v for å "scrolle" det nederste vinduet.
+   (Hvis du ikke har Meta-tasten trykker du ESC C-v.)
+
+>> Tast C-x o ("o" for "other") for å flytte markøren til det
+   nederste vinduet.
+
+>> Bruk C-v og M-v i det nederste vinduet for å flytte deg opp og ned
+   i teksten.  Fortsett å les denne anvisningen i det øverste vinduet.
+
+>> Tast C-x o igjen for å flytte markøren tilbake til det øverste
+   vinduet.  Markøren i det øverste vinduet står på samme plass som
+   det gjorde før du forlot det.
+
+Du kan fortsette å bruke C-x o for å bytte mellom de to vinduene.
+Hvert av vinduene har sin egen plassering av markøren, men det er bare
+ett av vinduene som viser den.  Alle redigeringskommandoer fungerer på
+det vinduet markøren er synlig i.  Vi kaller dette vinduet det valgte
+vinduet, eller "selected window".
+
+Kommandoen C-M-v er nyttig når du redigerer tekst i et vindu og bruker
+det andre vinduet for referanser.  Da kan du kan ha markøren i det
+samme vinduet hele tiden og du kan bruke C-M-v for å flytte deg i det
+andre vinduet.
+
+C-M-v er et eksempel på en CONTROL-META-kombinasjon.  Hvis du har
+META-tast holder du både CTRL og META nedtrykt mens du trykker v.  Det
+er ikke nøye hvilken av tastene CTRL og META som trykkes først, fordi
+begge fungerer slik at de "modifiserer" de andre tastene du trykker.
+
+Hvis du ikke har META-tasten, og bruker ESC isteden, er rekkefølgen
+viktig.  Du må trykke ESC etterfulgt av CTRL-v, CTRL-ESC v vil ikke
+fungere.  Dette er fordi ESC er et tegn for seg selv, og fungerer ikke
+som "modifikator".
+
+>> Tast C-x 1 (i det øverste vinduet) for å bli kvitt det nederste
+   vinduet.
+
+(Hvis du hadde tastet C-x 1 i det nederste vinduet ville det øverste
+forsvunnet.  Tenk på denne kommandoen som "Behold bare et vindu, det
+som markøren står i.")
+
+Du er ikke nødt til å ha samme buffer i begge vinduene.  Du kan bruke
+C-x C-f for å finne en ny fil i et av vinduene, det andre vinduet
+forblir uforandret.  Du vil merke at vinduene er helt uavhengige.
+
+Her er en annen måte å bruke to vinduer til å vise to forskjellige
+filer:
+
+>> Tast C-x 4 C-f etterfulgt av et filnavn.  Avslutt med <Return>.
+   Den nye filen vil da dukke opp i det nederste vinduet.  Markøren
+   blir også flyttet dit.
+
+>> Tast C-x o for å gå tilbake til det øverste vinduet, og C-x 1 for å
+   bli kvitt det nederste igjen.
+
+
+* REKURSIVE REDIGERINGSNIVÅER
+-----------------------------
+
+Noen ganger kommer du inn i noe som blir kalt "recursive editing
+level".  Dette blir indikert med hakeparenteser i moduslinjen, og vil
+omringe parentesene rundt hovedmodusen.  For eksempel vil det da stå
+[(Fundamental)] istedenfor (Fundamental).
+
+For å komme ut av "recursive editing mode" trykker du ESC ESC ESC.
+Dette er en generell "kom seg ut" kommando.  Du kan også bruke den for
+å bli kvitt ekstra vinduer og for å komme deg ut av minibuffret.
+
+>> Tast M-x for å komme inn i minibuffren.  Tast så ESC ESC ESC for å
+   komme ut.
+
+Du kan ikke bruke C-g for å komme ut av "recursive editing mode".
+Dette er fordi C-g blir brukt for å avbryte kommandoer og argumenter
+INNENFOR "recursive editing level".
+
+
+* HVORDAN FINNE MERE HJELP
+--------------------------
+
+I denne veiledningen har vi prøvd å inkludere akkurat nok informasjon
+til at du kan begynne å bruke Emacs.  Det er så mange muligheter i
+Emacs at det ville vært umulig å forklare her.  Men du ønsker sikkert
+å lære mer om Emacs siden den har mange nyttige egenskaper.  Emacs
+tilbyr kommandoer for å lese dokumentasjonen om Emacs-kommandoer.
+Disse "hjelp"-kommandoene starter med tastekombinasjonen Control-h,
+som blir kalt "the Help character".
+
+For å bruke denne hjelpen taster du C-h etterfulgt av et tegn som
+forklarer hva du vil ha hjelp om.  Hvis du virkelig har rotet deg bort
+kan du taste C-h ? for at Emacs skal vise hvilken hjelp som er
+tilgjengelig.  Hvis du har tastet C-h og bestemmer deg for at du ikke
+vil ha noen hjelp så kan du taste C-g for å avbryte.
+
+(På noen servere er C-h rekonfigurert.  Dette skal vanligvis ikke
+gjøres, og hvis det er det så klag til systemadministratoren.  Imens
+kan du bruke M-x help<Return> istedenfor.)
+
+Den mest grunnleggende hjelp-funksjonen er C-h c.  Tast C-h, en "c" og
+en kommandosekvens.  Emacs vil da komme med en beskrivelse av denne
+kommandoen.
+
+>> Tast C-h c Control-p.
+   Meldingen skal da bli noe slik som
+
+       C-p runs the command previous-line
+
+Dette forteller navnet til funksjonen.  Funksjonsnavn blir stort sett
+brukt for å spesialtilpasse og utvide Emacs.  Men siden
+funksjonsnavnet er valgt for å indikere hvilken kommando den utfører
+kan de også fungere som en enkel dokumentasjon, nok for å minne deg på
+kommandoer du allerede har lært.
+
+Flertegnskommandoer, slik som C-x C-s og (hvis du ikke har META, EDIT
+eller ALT tast) <ESC>v, er også tillatt etter C-h c.
+
+For å få mere informasjon om en kommando kan du bruke C-h k isteden
+for C-h c.
+
+>> Tast C-h k Control-p.
+
+Dette vil komme med en dokumentasjon på funksjonen og navnet i et eget
+vindu.  For å avslutte hjelpvinduet kan du trykke q.
+
+Her er flere nyttige C-h opsjoner:
+
+   C-h f       Beskrive en funksjon.  Du skriver inn funksjonsnavnet.
+
+>> Prøv å tast C-h f previous-line<Return>.
+   Dette vil skrive ut informasjonen Emacs har om funksjonen som
+   implementerer C-p kommandoen.
+
+   C-h a       Apropos.  Vil liste ut alle funksjoner og variabler
+               som søkestrengen angir.  Kommandoer som kan bli utført 
+               med Meta-x blir markert med en stjerne (*) til venstre
+               for funksjonsnavnet.
+
+>> Tast C-h a newline<Return>.
+
+Dette vil få fram en liste over alle funksjoner og variabler der
+"newline" inngår i navnet.  Du kan trykke <Return> eller klikk den
+midterste musknappen for å finne ut mere om en funksjon eller
+variabel.  Trykk `q' for å avslutte.
+
+
+* TIL SLUTT
+-----------
+
+Husk at C-x C-c vil avslutte Emacs permanent.  For å gå midlertidig
+til et skall, slik at du senere kan komme tilbake igjen, bruker du
+C-z.  (Under X vil dette minimere Emacs.)
+
+Denne veiledningen er laget for at den skal være forståelig for nye
+brukere, så hvis det er noe som er uklart holder det ikke å synes synd
+på seg selv: send en mail og klag!
+
+
+KOPIERING / DISTRIBUSJON
+------------------------
+
+Denne veiledningen stammer fra en hel rekke Emacs-veiledninger, og den
+første ble skrevet av Stuart Cracraft for den originale Emacs.  Ben
+Wing oppdaterte veiledningen for X Windows.  Martin Buchholz og Hrvoje
+Niksic la til endringer for XEmacs, og Stig Bjørlykke oversatte den
+til norsk.
+
+
+This version of the tutorial, like GNU Emacs, is copyrighted, and
+comes with permission to distribute copies on certain conditions:
+
+Copyright (c) 1997, Stig Bjørlykke.
+
+   Permission is granted to anyone to make or distribute verbatim copies
+   of this document as received, in any medium, provided that the
+   copyright notice and permission notice are preserved,
+   and that the distributor grants the recipient permission
+   for further redistribution as permitted by this notice.
+
+   Permission is granted to distribute modified versions
+   of this document, or of portions of it,
+   under the above conditions, provided also that they
+   carry prominent notices stating who last altered them.
+
+The conditions for copying Emacs itself are more complex, but in the
+same spirit.  Please read the file COPYING and then do give copies of
+GNU Emacs to your friends.  Help stamp out software obstructionism
+("ownership") by using, writing, and sharing free software!
diff --git a/etc/TUTORIAL.pl b/etc/TUTORIAL.pl
new file mode 100644 (file)
index 0000000..85ffdcb
--- /dev/null
@@ -0,0 +1,1170 @@
+Copyright (c) 1985, 1994 Free Software Foundation, Inc.  Szczegó³y na
+koñcu pliku.
+
+Czytasz w³a¶nie krótki podrêcznik Emacsa.
+
+Polecenia Emacsa ogólnie wymagaj± wci¶niêcia klawisza CONTROL (czasami
+oznaczanego CTRL lub CTL) lub klawisza META.  Na niektórych
+klawiaturach klawisz META jest oznaczany ALT lub EDIT, albo jeszcze
+inaczej (na przyk³ad na klawiaturach firmy SUN klawisz ze znakiem karo
+na lewo od klawisza odstêpu to jest w³a¶nie META).  Je¶li nie masz
+klawisza META, mo¿esz w jego zastêpstwie u¿ywaæ ESC.  Zamiast pisaæ
+META czy CONTROL za ka¿dym razem, gdy masz przycisn±æ ten klawisz,
+u¿ywaæ bêdziemy nastêpuj±cych skrótów:
+
+ C-<znak> oznacza trzymanie klawisza CONTROL podczas
+          wciskania klawisza <znak>.  Na przyk³ad C-f bêdzie odpowiada³o
+          naci¶niêciu f, podczas gdy klawisz CONTROL by³ wci¶niêty.
+
+ M-<znak> oznacza trzymanie klawisza META wci¶niêtego podczas
+          wciskania klawisza <znak>.  Je¶li nie masz klawisza META,
+          naci¶nij i pu¶æ klawisz ESC, a potem naci¶nij
+          klawisz <znak>.
+
+Uwaga: by zakoñczyæ sesje Emacsa naci¶nij C-x C-c (dwa znaki).
+
+Znaki ">>" na lewym marginesie w dalszej czê¶ci tego podrêcznika
+oznaczaj± æwiczenia dla Ciebie.  Na przyk³ad: 
+<<Blank lines inserted here by startup of help-with-tutorial>>
+
+>>  Teraz naci¶nij C-v (nastêpny ekran), by przej¶æ na nastêpny ekran
+    podrêcznika (zrób to naciskaj±c jednocze¶nie klawisz CONTROL
+    i v).  Od tego momentu powiniene¶ robiæ to zawsze, gdy dojdziesz
+    do koñca ekranu.
+
+Zwróæ uwagê na to, ze kilka linii powtarza siê, gdy przechodzisz z
+ekranu na ekran; zachowanie to ma zapewniæ pewna ci±g³o¶æ podczas
+przesuwania siê w obrêbie pliku.
+
+Pierwsza umiejêtno¶ci±, która powiniene¶ opanowaæ, jest sposób
+przesuwania siê z miejsca na miejsce.  Ju¿ wiesz, jak przesuwaæ siê o
+jeden ekran do przodu.  By przesun±æ siê o jeden ekran do tylu,
+wci¶nij M-v (wci¶nij META i naci¶nij v, lub naci¶nij <ESC>v je¶li nie
+masz klawisza META lub EDIT).
+
+>>  Spróbuj nacisn±æ M-v, a potem C-v by przesun±æ siê w przód i w ty³
+    kilka razy.
+
+
+PODSUMOWANIE
+------------
+
+Nastêpuj±ce polecenia s± u¿yteczne do przegl±dania po jednym ekranie:
+
+       C-v     Przesuñ siê o jeden ekran do przodu
+       M-v     Przesuñ siê o jeden ekran do tylu
+       C-l     Wyczy¶æ ekran i wy¶wietl go na nowo, umieszczaj±c
+                tekst z okolic kursora w ¶rodku ekranu.
+                (Ta kombinacja to CONTROL-L, a nie CONTROL-1.)
+
+>> Znajd¼ kursor i zapamiêtaj, jaki tekst jest w jego okolicy.
+   Naci¶nij nastêpnie C-l.
+   Znajd¼ kursor jeszcze raz i zwróæ uwagê, ¿e znajduje 
+   siê on w okolicy tego samego tekstu.
+
+
+PODSTAWY KIEROWANIA KURSOREM
+----------------------------
+
+Przesuwanie siê z ekranu na ekran jest u¿yteczne, ale jak przej¶æ do
+okre¶lonego miejsca w obrêbie jednego ekranu?
+
+Mo¿na to zrobiæ na kilka sposobów.  Najprostszym jest u¿ycie poleceñ
+C-p, C-b, C-f oraz C-n.  Ka¿de z tych poleceñ przesuwa kursor o jeden
+wiersz lub kolumnê w okre¶lonym kierunku.  Oto schemat, który to
+obrazuje:
+
+                  Poprzednia linia, C-p
+                   (ang. previous line)
+                            :
+                            :
+       Wstecz, C-b ....  Kursor ....  Do przodu, C-f
+       (ang. back)          :         (ang. forward)    
+                            :
+                            :
+                    Nastêpna linia, C-n
+                     (ang. next line)
+
+>> Przesuñ kursor na ¶rodek schematu za pomoc± C-n lub C-p.  Naci¶nij
+   potem C-l, by zobaczyæ ca³y diagram na ¶rodku ekranu.
+
+To s± podstawowe polecenia kieruj±ce po³o¿eniem kursora, których
+bêdziesz u¿ywaæ nieustannnie, warto wiêc je zapamiêtaæ.
+
+>> Naci¶nij kilka razy C-n, by przesun±æ kursor do tej linii.
+
+>> Przesuñ siê w g³±b linii za pomoc± C-f, a potem do góry za pomoc±
+   C-p.  Zwróæ uwagê na zachowanie siê C-p, gdy kursor jest w ¶rodku
+   linii.
+
+Ka¿da linia tekstu koñczy siê znakiem nowej linii, który oddziela ja
+od nastêpnej.  Ka¿dy Twój plik powinien koñczyæ siê znakiem nowej
+linii (ale Emacs nie zmusza Ciê do tego).
+
+>> Spróbuj nacisn±æ C-b na pocz±tku linii.  Powinno to Ciê przenie¶æ
+   na koniec poprzedniej linii.  Dzieje siê tak dlatego, ¿e kursor
+   przechodzi nad znakiem nowej linii.
+
+C-f przechodzi nad znakiem nowej linii tak samo jak C-b.
+
+>> Naci¶nij kilka razy C-b, by¶ dostrzeg³, gdzie jest kursor.
+   Naci¶nij potem C-f, by wróciæ na koniec linii.  W koñcu naci¶nij
+   jeszcze raz C-f, by przej¶æ do nastêpnej linii.
+
+Gdy przesuwasz kursor poza dolna krawêd¼ ekranu, tekst za krawêdzi±
+przesuwa siê na ekran (ang. scrolling).  Dziêki temu Emacs mo¿e
+przesun±æ kursor do okre¶lonego miejsca bez umieszczania go poza
+ekranem.
+
+>> Spróbuj przesun±æ kursor poza dolna granice ekranu za pomoc± C-n i
+   zobacz co siê stanie.
+
+Je¶li przesuwanie siê o jeden znak na raz jest dla Ciebie za wolne,
+spróbuj przesuwaæ siê o s³owa.  M-f (Meta-f) przesuwa kursor do przodu
+o s³owo, a M-b przesuwa go do tylu o jedno s³owo.
+
+>> Spróbuj nacisn±æ kilka M-f i M-b.
+
+Gdy jeste¶ w ¶rodku s³owa, M-f przesuwa kursor na koniec s³owa.  Je¶li
+natomiast jeste¶ w przerwie miedzy s³owami, M-f przesuwa kursor na
+koniec nastêpnego s³owa.  M-b zachowuje siê podobnie, jak chodzi o
+ruch do ty³u.
+
+>> Naci¶nij M-f i M-b kilka razy na przemian z C-f i C-b tak, by¶
+   móg³ zauwa¿yæ dzia³anie M-f i M-b naci¶nietych w ró¿nych miejscach
+   wewn±trz i pomiêdzy s³owami.
+
+Zauwa¿ podobieñstwo pomiêdzy C-f i C-b oraz M-f i M-b.  Bardzo czêsto
+kombinacje zawieraj±ce Meta opisuj± operacje zwi±zane z jednostkami
+jêzykowymi (s³owa, zdania, akapity), podczas gdy kombinacje oparte o
+Control dzia³aj± na podstawowych jednostkach niezale¿nych od tego, co
+edytujesz (znaki, linie, itd.).
+
+Ta zale¿no¶æ stosuje siê do linii i zdañ: C-a i C-e przesuwaj± kursor
+na pocz±tek i koniec linii, a M-a i M-e przesuwaj± go na pocz±tek i
+koniec zdania.
+
+>> Naci¶nij kilka razy C-a, a potem kilka razy C-e.
+   Powtórz to z M-a, a potem z M-e.
+
+Czy zauwa¿y³e¶, ze powtarzanie C-a nic nie zmienia, natomiast powtórne
+M-a przesuwa Ciê o jedno zdanie?  Chocia¿ nie jest to do koñca
+analogiczne, wydaje siê jednak naturalne.
+
+Po³o¿enie kursora w tek¶cie okre¶lane jest mianem "punktu".
+
+Oto podsumowanie prostych poleceñ s³u¿±cych do przesuwania kursora,
+w³±cznie z operacjami dotycz±cymi s³ów i zdañ:
+
+       C-f     Do przodu o jeden znak
+       C-b     W ty³ o jeden znak
+
+       M-f     Do przodu o s³owo
+       M-b     W ty³ o s³owo
+
+       C-n     Nastêpna linia
+       C-p     Poprzednia linia
+
+       C-a     Pocz±tek linii
+       C-e     Koniec linii
+
+       M-a     W ty³ na pocz±tek zdania
+       M-e     Do przodu na koniec zdania
+
+>> Przeæwicz kilka razy wszystkie powy¿sze polecenia dla wprawy.
+   S± one najczê¶ciej u¿ywanymi poleceniami.
+
+Dwa inne wa¿ne polecenia przesuwaj±ce kursor to M-< (Meta i znak
+mniejszo¶ci), które przesuwa kursor na pocz±tek ca³ego tekstu i M->
+(Meta i znak wiêkszo¶ci), które przesuwa kursor na koniec ca³ego
+tekstu.
+
+Na wiêkszo¶ci terminali "<" jest nad przecinkiem, tak wiec musisz u¿yæ
+klawisza Shift by nacisn±æ "<".  Musisz wiec tak¿e u¿yæ Shift by
+nacisn±æ M-<.  Bez Shift by³oby to M-przecinek.
+
+>> Naci¶nij M-< by przej¶æ na pocz±tek podrêcznika.  U¿yj potem C-v
+   kilkukrotnie, by wróciæ tutaj.
+
+>> Teraz naci¶nij M->, by przej¶æ na koniec podrêcznika.  Wróæ do tego
+   miejsca za pomoc± kilkukrotnego M-v.
+
+Je¶li Twój terminal ma klawisze strza³ek, to mo¿esz ich u¿yæ do
+przesuwania kursora.  Zalecamy Ci nauczenie siê kombinacji C-b, C-f,
+C-n i C-p z trzech powodów.  Po pierwsze, dzia³aj± one na wszystkich
+typach terminali.  Po drugie, gdy ju¿ zdobêdziesz pewna praktykê w
+pos³ugiwaniu siê Emacsem, bêdzie Ci szybciej nacisn±æ te kombinacje
+ni¿ klawisze strza³ek (poniewa¿ nie wymaga to przenoszenia d³oni z
+miejsca, które zajmuj± podczas szybkiego pisania za pomoc± 10 palców).
+Po trzecie wreszcie, gdy ju¿ wyrobisz sobie zwyczaj pos³ugiwania siê
+tymi poleceniami z klawiszem Control, bêdziesz móg³ ³atwo nauczyæ siê
+innych zaawansowanych poleceñ przesuwaj±cych kursor.
+
+Wiêkszo¶æ poleceñ Emacsa akceptuje argument liczbowy; dla wiêkszo¶ci
+poleceñ s³u¿y on jako liczba powtórzeñ.  Sposób, w jaki okre¶lasz
+liczbê powtórzeñ polecenia, to naci¶niecie C-u a potem cyfr, zanim
+naci¶niesz polecenie.  Je¶li masz klawisz META (lub EDIT lub ALT),
+alternatywnym sposobem jest wciskanie klawiszy cyfr podczas
+wprowadzania argumentu liczbowego.  Zalecamy nauczenie siê metody
+klawisza C-u, poniewa¿ dzia³a ona na wszystkich terminalach.
+
+Na przyk³ad C-u 8 C-f przesuwa kursor do przodu o osiem znaków.
+       
+>> Spróbuj u¿yæ C-n i C-p z argumentem liczbowym, by przesun±æ kursor
+   do jednej z linii w pobli¿u tego zdania za pomoc± tylko jednego
+   polecenia.
+
+Wiêkszo¶æ poleceñ u¿ywa argumentu liczbowego jako liczba powtórzeñ.
+Jest kilka poleceñ, które u¿ywaj± go w inny sposób.  C-v i M-v s±
+w¶ród tych wyj±tków.  Je¶li poda siê im argument, przesuwaj± zawarto¶æ
+ekranu w gore lub w dó³ o podana liczbê linii zamiast o tyle¿ ekranów.
+Na przyk³ad C-u 4 C-v przewija ekran o 4 linie.
+
+>> Spróbuj nacisn±æ C-u 8 C-v.
+
+To powinno by³o przewin±æ ekran do góry o 8 linii.  Je¶li chcia³by¶
+przewin±æ go w dó³, mo¿esz podaæ argument przed poleceniem M-v.
+
+Je¶li u¿ywasz systemu X-Windows, prawdopodobnie po prawej stronie okna
+Emacsa znajduje siê prostok±tny obszar, nazywany po angielsku
+"scrollbar".  Za jego pomoc± mo¿esz przewijaæ tekst, u¿ywaj±c do tego
+celu myszy.
+
+>> Spróbuj nacisn±æ ¶rodkowy klawisz myszy u góry pod¶wietlonego
+   obszaru na scrollbarze.  To powinno przewin±æ tekst do miejsca
+   okre¶lonego wysoko¶ci±, na której nacisn±³e¶ klawisz myszy.
+
+>> Przesuñ mysz do miejsca oddalonego od górnego koñca scrollbaru
+   mniej wiêcej o trzy linie i naci¶nij lewy klawisz myszy kilka razy.
+
+
+* KIEROWANIE KURSOREM Z X TERMINALA
+-----------------------------------
+
+Je¶li masz X terminal, prawdopodobnie ³atwiej Ci bêdzie u¿ywaæ
+klawiszy strza³ek po prawej stronie klawiatury do kierowania kursorem.
+Klawisze strza³ek w lewo, w prawo, w górê i w dó³ dzia³aj± zgodnie z
+oczekiwaniem; odpowiadaj± one dok³adnie C-b, C-f, C-p i C-n, ale s±
+³atwiejsze do zapamiêtania.  Mo¿esz tak¿e u¿ywaæ C-lewo i C-prawo by
+przesuwaæ siê o s³owa oraz C-góra i C-dó³, by przesuwaæ siê o bloki
+(np. akapity, je¶li edytujesz tekst).  Je¶li masz klawisze oznaczone
+HOME (lub BEGIN) oraz END, zanios± Ciê one na pocz±tek i koniec linii,
+a C-home i C-end na pocz±tek i koniec pliku.  Je¶li Twoja klawiatura
+ma klawisze PgUp i PgDn, mo¿esz ich u¿yæ do przesuwania siê o jeden
+ekran za jednym razem, tak jak M-v i C-v.
+
+Wszystkie te polecenia akceptuj± argument liczbowy, jak to jest
+opisane powy¿ej.  Mo¿esz stosowaæ pewne skróty w celu wpisania tych
+argumentów: naci¶nij i trzymaj CONTROL lub META i wpisz liczbê.  Na
+przyk³ad, by przesun±æ kursor o 12 s³ów w prawo naci¶nij C-1 C-2
+C-prawo.  Zwróæ uwagê, ze jest to ³atwe do wpisania, poniewa¿ nie
+musisz puszczaæ klawisza CONTROL podczas wciskania klawiszy.
+
+
+* GDY EMACS JEST ZABLOKOWANY
+----------------------------
+
+Je¶li Emacs przestaje odpowiadaæ na Twoje polecenia, mo¿esz go
+bezpiecznie zatrzymaæ przyciskaj±c C-g.  Mo¿esz u¿yæ C-g do przerwania
+polecenia, które zabiera zbyt wiele czasu.
+
+Mo¿esz u¿yæ C-g tak¿e, by anulowaæ argument liczbowy lub pocz±tek
+polecenia, którego nie chcesz dokañczaæ.
+
+>> Napisz C-u 100 jako argument liczbowy, po czym naci¶nij C-g.  
+   Teraz naci¶nij C-f.  Powinno przesun±æ to kursor o tylko jeden
+   znak, poniewa¿ anulowa³e¶ argument za pomoc± C-g.
+
+Je¶li nacisn±³e¶ <ESC> przez pomy³kê, mo¿esz tego siê pozbyæ za pomoc±
+C-g.
+
+
+* ZABLOKOWANE POLECENIA
+-----------------------
+
+Pewne polecenia Emacsa s± "zablokowane", tak by pocz±tkuj±cy
+u¿ytkownicy nie mogli ich wywo³aæ przez przypadek.
+
+Je¶li wywo³asz jedno z zablokowanych poleceñ, Emacs wypisze komunikat
+informuj±cy o tym, co to za polecenie, i zapyta Ciê, czy chcesz je
+wywo³aæ.
+
+Je¶li naprawdê chcesz wywo³aæ to polecenie, naci¶nij spacje w
+odpowiedzi na pytanie.  Je¶li nie chcesz wywo³aæ zablokowanego
+polecenia, odpowiedz na pytanie naciskaj±c "n".
+
+>> Napisz `C-x n p' (co jest zablokowanym poleceniem) i odpowiedz "n"
+   na zadane pytanie.
+
+
+* OKNA
+------
+
+Emacs mo¿e miêæ kilka okien, ka¿de wy¶wietlaj±ce w³asny tekst.  Zwróæ
+uwagê, ze "okno" je¶li chodzi o Emacsa, nie odnosi siê do osobnego
+okienka systemu okienkowego, ale do pojedynczego panelu wewn±trz
+okienka systemu X-Windows.  (Emacs mo¿e miêæ kilka X-okien, lub
+"ramek" w terminologii Emacsa.  Opisane jest to poni¿ej.)
+
+Na tym etapie lepiej jest siê nie zag³êbiaæ w techniki wykorzystuj±ce
+kilka okien.  Powiniene¶ jedynie wiedzieæ, w jaki sposób pozbyæ siê
+nadmiaru okien, które mog± pojawiæ siê jako sk³adniki systemu pomocy
+lub wynik pewnych poleceñ.  Robi siê to w prosty sposób:
+
+       C-x 1   Jedno okno (tzn. zabij wszystkie inne okna).
+
+Kombinacja ta to Control-x, po którym wystêpuje cyfra 1.  C-x 1
+powiêksza okno, w którym jest kursor tak, by zajê³o ca³y ekran.
+Kasuje to wszystkie inne okna Emacsa.
+
+>> Przesuñ kursor do tej linii i naci¶nij C-u 0 C-l.
+
+(C-l, jak pamiêtasz od¶wie¿a zawarto¶æ ekranu.  Je¶li poda siê temu
+poleceniu argument liczbowy, bêdzie to oznacza³o "od¶wie¿ zawarto¶æ
+ekranu i umie¶æ bie¿±ca linie o tyle linii od góry ekranu".  Tak wiec
+C-u 0 C-1 oznacza "od¶wie¿ ekran, umieszczaj±c bie¿±ca linie na samej
+górze".)
+
+>> Naci¶nij Control-x 2
+   Zauwa¿ jak okno siê kurczy, podczas gdy nowe okno pojawia siê,
+   wy¶wietlaj±c zawarto¶æ tego bufora.
+
+>> Naci¶nij C-x 1 i nowe okno zniknie.
+
+
+* WSTAWIANIE I USUWANIE
+-----------------------
+
+Je¶li chcesz wstawiaæ tekst, po prostu go napisz.  Znaki, które da siê
+wy¶wietliæ, takie jak A, 7, *, itd, Emacs traktuje jako tekst i
+wstawia natychmiast do bufora.  Naci¶nij <Return> (znak powrotu
+karetki), by wstawiæ znak nowej linii.
+
+Ostatni znak, który napisa³e¶ mo¿esz skasowaæ przez naci¶niecie
+klawisza <Delete>.  Klawisz ten mo¿e byæ oznaczony "Del".  W pewnych
+wypadkach klawisz "Backspace" mo¿e s³u¿yæ za <Delete>, ale nie jest to
+regu³±!
+
+Ogólniej, <Delete> usuwa znak bezpo¶rednio przed bie¿±ca pozycj±
+kursora.
+
+>> Zrób to teraz: wstaw kilka znaków, po czym usuñ je za pomaca
+   kilkukrotnego naci¶niêcia <Delete>.  Nie przejmuj siê tym, 
+   ¿e zmieniasz ten plik; nie zmienisz w ten sposób g³ównego pliku
+   podrêcznika.  To jest Twoja w³asna kopia.
+
+Gdy linia tekstu staje siê zbyt d³uga, by zmie¶ciæ siê w jednym
+wierszu na ekranie, jest ona "kontynuowana" w nastêpnym wierszu
+ekranu.  Znak "backslash" (`\') na prawym marginesie pozwala Ci
+rozpoznaæ takie linie.
+
+>> Wpisuj jaki¶ tekst tak d³ugo, a¿ dojdziesz do prawego marginesu, i
+   potem nie przestawaj.  Zauwa¿ysz, ze pojawi siê linia kontynuacji.
+
+>> U¿yj <Delete> by usun±æ tekst tak, by linia znowu
+   mie¶ci³a siê na ekranie.  Linia kontynuacji zniknie.
+
+Znak nowej linii mo¿e byæ kasowany tak, jak ka¿dy inny znak.
+Usuniecie znaku nowej linii ³±czy je w jedna.  Je¶li powsta³a w wyniku
+tego linia jest zbyt d³uga, by zmie¶ciæ siê na szeroko¶æ ekranu,
+zostanie ona wy¶wietlona z lini± kontynuacji.
+
+>> Przesuñ kursor na pocz±tek linii i naci¶nij <Delete>.  Bie¿±ca
+   linia zostanie po³±czona z poprzednia.
+
+>> Naci¶nij <Return>, by z powrotem wstawiæ znak nowej linii, który
+   skasowa³e¶.
+
+Pamiêtaj, ze wiêkszo¶æ poleceñ Emacsa mo¿e zostaæ wywo³anych z
+parametrem liczby powtórzeñ; dotyczy to tak¿e znaków tekstu.  Argument
+liczbowy powoduje wstawienie znaku kilkukrotnie.
+
+>>  Spróbuj zrobiæ to teraz -- naci¶nij C-u 8 * by uzyskaæ ********.
+
+Nauczy³e¶ siê ju¿ wiêkszej czê¶ci podstawowych sposobów pisania oraz
+poprawiania b³êdów.  W Emacsie mo¿esz usuwaæ równie¿ cale s³owa lub
+cale linie.  Oto podsumowanie operacji usuwania znaków:
+
+       <Delete>     usuñ znak bezpo¶rednio przed kursorem
+       C-d          usuñ znak bezpo¶rednio za kursorem
+
+       M-<Delete>   wytnij s³owo bezpo¶rednio przed kursorem
+       M-d          wytnij nastêpne s³owo bezpo¶rednio za kursorem
+
+       C-k          wytnij zawarto¶æ linii od kursora do jej koñca
+       M-k          wytnij wszystkie znaki od kursora do koñca zdania
+
+Zauwa¿, ze <Delete> i C-d w po³±czeniu z M-<Delete> i M-d rozszerzaj±
+regule rozpoczêt± przez C-f i M-f (Có¿, <Delete> tak naprawdê nie
+wymaga wci¶niêcia Control, ale pomiñmy to milczeniem).  C-k i M-k s±
+podobne do C-e i M-e w sensie, ¿e linie s± odpowiednikami zdañ.
+
+Gdy usuwasz wiêcej ni¿ jeden znak naraz, Emacs zachowuje usuniêty
+tekst tak, by¶ móg³ go gdzie¶ wstawiæ z powrotem.  Wstawianie
+usuniêtego tekstu to "wklejanie".  Mo¿esz wklejaæ usuniêty tekst b±d¼
+to w to samo miejsce, z którego zosta³ usuniêty, b±d¼ to w inne
+miejsca.  Ten sam tekst mo¿esz wklejaæ kilkukrotnie, w celu uzyskania
+wielu kopii.  Poleceniem, które wkleja tekst jest C-y.
+
+Zauwa¿ ró¿nicê pomiêdzy "wycinaniem" i "usuwaniem", polegaj±c± na tym,
+ze wyciête rzeczy mog± byæ wklejone na nowo, natomiast usuniête nie.
+W ogólno¶ci, polecenia, które kasuj± du¿o tekstu zachowuj± go, podczas
+gdy polecenia, które usuwaj± po prostu jeden znak lub puste linie i
+przerwy, nie zachowuj± usuniêtego tekstu.
+
+>> Przesuñ kursor na pocz±tek linii, która nie jest pusta.  Naci¶nij
+   C-k, by wyci±æ tekst z tej linii.
+
+>> Naci¶nij C-k jeszcze raz.  Zauwa¿, ze wycina to znak nowej linii,
+   który znajduje siê za ta linia.
+
+Zwróæ uwagê, ze pojedyncze C-k wycina zawarto¶æ linii, a powtórne C-k
+wycina sam± linie tak, ¿e pozosta³e linie przesuwaj± siê do góry.  C-k
+traktuje argument liczbowy w specjalny sposób: wycina ono tyle linii
+ORAZ ich zawarto¶æ.  To nie jest samo powtarzanie kilka razy C-k.  C-u
+2 C-k wycina dwie linie i ich znaki nowej linii; dwukrotne naci¶niecie
+C-k nie zrobi³oby tego.
+
+By odzyskaæ ostatnio wyciêty tekst i wstawiæ go w miejsce kursora,
+naci¶nij C-y.
+
+>> Twoja kolej.  Naci¶nij C-y, by z powrotem wstawiæ tekst.
+
+Zwróæ uwagê, ze je¶li naci¶niesz C-k kilka razy pod rz±d, ca³y wyciêty
+tekst jest zachowywany w jednym kawa³ku tak, ¿e jedno C-y wklei
+wszystkie linie.
+
+>> Naci¶nij C-k kilka razy.
+
+By odzyskaæ ten wyciêty tekst...
+
+>> ...naci¶nij C-y.  Przesuñ potem kursor o kilka linii w dó³ i
+   naci¶nij C-y jeszcze raz.  Widzisz, ze wstawia to ten sam tekst.
+
+Co zrobiæ, je¶li chcesz wstawiæ tekst, który wcze¶niej wyci±³e¶, a
+potem wycinasz cos innego?  C-y wstawia tekst ostatnio wyciêty.
+Poprzedni fragment nie jest jednak stracony.  Mo¿esz wróciæ do niego,
+u¿ywaj±c polecenia M-y.  Po tym, jak naci¶niesz C-y, by wstawiæ
+ostatnio wyciêty tekst, naci¶niecie M-y zastêpuje wstawiony tekst
+poprzednio wyciêtym.  Dalsze naciskanie M-y przywo³uje coraz
+wcze¶niejsze fragmenty tekstu.  Gdy dojdziesz do tekstu, którego
+szuka³e¶, nie musisz robiæ nic, by zosta³ on we w³a¶ciwym miejscu.  Po
+prostu kontynuuj edycjê tekstu, pozostawiaj±c wklejony tekst tam,
+gdzie siê znajduje.
+
+Je¶li bêdziesz naciska³ M-y wystarczaj±co wiele razy, dojdziesz do
+punktu, z którego wystartowa³e¶ (tekst ostatnio wyciêty).
+
+>> Wytnij jak±¶ line, zmieñ pozycjê kursora i wytnij inna.  Naci¶nij
+   potem C-y by wstawiæ druga z wyciêtych linii.  Potem naci¶nij M-y,
+   i linia ta zostanie zast±piona przez ta pierwsza.  Naci¶nij M-y
+   jeszcze kilka razy, by zobaczyæ co siê dzieje.  Powtarzaj to tak
+   d³ugo, a¿ druga z linii pojawi siê z powrotem.  Je¶li chcesz,
+   mo¿esz pod±æ M-y dodatnie i ujemne argumenty.
+
+
+* COFNIJ
+--------
+
+Je¶li wprowadzisz zmiany do tekstu, a potem dojdziesz do wniosku, ¿e
+to by³a pomy³ka, mo¿esz cofn±æ te zmiany za pomoc± polecenia "cofnij"
+(ang. undo), C-x u.
+
+C-x u cofa zmiany wprowadzone przez jedno polecenie; je¶li powtórzysz
+C-x u kilka razy pod rz±d, ka¿de powtórzenie cofa koleje polecenie.
+
+Od tej regu³y s± dwa wyj±tki: polecenia, które nie zmieniaj± tekstu
+nie licz± siê jako polecenia, które mo¿na cofn±æ (zarówno przesuniêcia
+kursora, jak i przewijanie tekstu), oraz znaki wstawiane do tekstu
+(np.  litery) ³±czone s± w grupy do 20.  (Ma to na celu zredukowanie
+liczby naci¶niêæ C-x u, które musia³by¶ wykonaæ, by cofn±æ wstawianie
+tekstu.)
+
+>> Wytnij te linie za pomoc± C-k, a potem naci¶nij C-x u i linia
+   powinna pojawiæ siê tu z powrotem.
+
+C-_ jest innym sposobem wywo³ania polecenia "cofnij"; dzia³a to
+dok³adnie tak samo jak C-x u, jest jedynie ³atwiejsze do naci¶niêcia
+kilka razy pod rz±d.  Wada C-_ jest to, ze nie jest to oczywiste w
+jaki sposób nacisn±æ te kombinacje na niektórych klawiaturach.  To
+w³a¶nie dlatego C-x u jest tak¿e dostêpne.  Na niektórych terminalach
+mo¿esz nacisn±æ C-_ poprzez przytrzymanie CTRL i naci¶niecie /.
+
+Argument liczbowy podany przed C-_ lub C-x u okre¶la liczbê powtórzeñ
+tego polecenia.
+
+
+* PLIKI
+-------
+
+Aby edytowny przez Ciebie tekst zosta³ nma trwa³e zachowany, musisz
+umie¶ciæ go w pliku.  W przeciwnym wypadku zniknie on, gdy Emacs w
+którym go edytowa³e¶ zostanie zamkniêty.  Zachowywanie Twojego tekstu
+w pliku nazywane bywa "odwiedzaniem" lub "znajdywaniem" pliku (ang.
+"visiting" lub "finding").
+
+Odwiedzanie pliku oznacza, ¿e jego zawarto¶æ zostaje wy¶wietlona w
+Emacsie.  Bardzo czêsto sprowadza siê to do edycji samego pliku.
+Jednak¿e zmiany, które wprowadzasz nie s± trwa³e do momentu, w którym
+"zachowasz" plik (ang. save).  Zapobiega to sytuacji, w której
+zostawiasz w systemie plik, który zosta³ tylko w po³owie zmieniony, a
+tego nie chcesz zrobiæ.  Nawet wtedy, gdy zachowujesz plik, Emacs
+zostawia orygina³ zachowany pod inna nazwa na wypadek, gdyby¶ doszed³
+do wniosku, ¿e wprowadzone zmiany by³y b³êdne.
+
+Je¶li popatrzysz na dó³ ekranu, zauwa¿ysz linie, która zaczyna i
+koñczy siê my¶lnikami i zawiera tekst "XEmacs: TUTORIAL".  W tej
+czê¶ci ekranu zawsze mo¿esz znale¼æ nazwê pliku, który w³a¶nie
+odwiedzasz.  W tej chwili odwiedzasz plik o nazwie "TUTORIAL", który
+jest Twoja w³asn± kopi± podrêcznika Emacsa.  Obojêtnie jaki plik
+odwiedzisz, jego nazwa pojawi siê dok³adnie w tym miejscu.
+
+Polecenia, które s³u¿± do odwiedzania i zachowywania plików ró¿ni± siê
+od innych poleceñ, które pozna³e¶ tym, ¿e sk³adaj± siê one z dwóch
+znaków.  Obydwa zaczynaj± siê od znaku Control-x.  Jest mnóstwo
+poleceñ, które zaczynaj± siê od tego w³a¶nie znaku; wiele z nich
+dotyczy plików, buforów i z tym zwi±zanych rzeczy.  Polecenia te maj±
+d³ugo¶æ dwóch, trzech lub czterech znaków.
+
+Kolejn± nowa rzecz± odno¶nie polecenia odwiedzania pliku jest to, ¿e
+musisz mu pod±æ nazwê pliku, który chcesz znale¼æ.  Mówimy o tym, ¿e
+polecenie "czyta argument z terminala" (w tym wypadku argument jest
+nazwa pliku).  Po tym, gdy wpiszesz polecenie
+
+       C-x C-f   znajd¼ plik (ang. find a file)
+
+Emacs poprosi Ciê o wpisanie nazwy pliku.  Nazwa ta pojawia siê w
+dolnej linii ekranu.  Liniê tê nazywa siê "minibuforem" (ang.
+"minibuffer") wtedy, gdy jest u¿ywana do wprowadzania tego typu
+danych.  Do edycji nazwy pliku u¿ywasz zwyk³ych poleceñ Emacsa.
+
+Wprowadzanie nazwy pliku (lub jakichkolwiek innych danych w
+minibuforze) mo¿e zostaæ anulowane za pomoc± C-g.
+
+>> Naci¶nij C-x C-f, po czym naci¶nij C-g.  Na skutek tego zniknie
+   minibufor oraz przerwane zostanie polecenie C-x C-f, które tego
+   minibufora u¿ywa³o.  W rezultacie wiêc nie odwiedzisz ¿adnego
+   pliku.
+
+Gdy skoñczysz wpisywaæ nazwê pliku, naci¶nij <Return>, po czym
+polecenie C-x C-f zabierze siê do roboty i znajdzie plik, który
+wybra³e¶.  Minibufor znika z chwil± zakoñczenia wykonywania polecenia
+C-x C-f.
+
+Po chwili zawarto¶æ pliku pojawia siê na ekranie i mo¿esz j± edytowaæ.
+Gdy chcesz zachowaæ zmiany, tak by je utrwaliæ, wydaj polecenie
+
+       C-x C-s   zachowaj plik (ang. save).
+
+Kopiuje to tekst z Emacsa do pliku.  Za pierwszym razem gdy to robisz
+Emacs zmienia nazwê oryginalnego pliku poprzez dodanie "~" na koñcu
+jego nazwy.
+
+Gdy zachowywanie skoñczy siê, Emacs wypisuje nazwê zapisanego pliku.
+Pliki powiniene¶ zachowywaæ stosunkowo czêsto, tak by nie straciæ za
+du¿o w przypadku za³amania systemu.
+
+>> Naci¶nij C-x C-s by zachowaæ swoja kopie podrêcznika.  Emacs
+   powinien wypisaæ "Wrote ...TUTORIAL" na dole ekranu.
+
+UWAGA: W niektórych systemach naci¶niecie C-x C-s zamrozi ekran i nie
+zobaczysz ¿adnego tekstu z Emacsa.  Oznacza to, ¿e sk³adowa systemu
+operacyjnego, zwana kontrol± przep³ywu (ang. flow control)
+przechwyci³a C-s i nie pozwoli³a mu doj¶æ do Emacsa.  By odzyskaæ
+kontrole nad ekranem, naci¶nij C-q.  Dodatkowej pomocy poszukaj w
+rozdziale "Spontaneous Entry to Incremental Search" w podrêczniku
+Emacsa.
+
+Mo¿esz odwiedziæ istniej±ce pliki w celu ich edycji lub czytania.
+Mo¿esz tak¿e odwiedziæ plik, który jeszcze nie istnieje.  W ten
+w³a¶nie sposób tworzy siê w Emacsie nowe pliki: odwied¼ plik, co da Ci
+nowe puste miejsce, a potem zacznij wstawiaæ tekst.  Gdy za¿±dasz
+zachowania pliku, wtedy Emacs naprawdê utworzy plik z tekstem, który
+wpisa³e¶.  Od tego momentu mo¿esz uwa¿aæ, ¿e edytujesz istniej±cy
+plik.
+
+
+* BUFORY
+--------
+
+Je¶li odwiedzisz inny plik za pomoc± C-x C-f, poprzedni plik pozostaje
+w Emacsie.  Mo¿esz prze³±czyæ siê do niego, odwiedzaj±c go jeszcze raz
+za pomoc± C-x C-f.  W ten sposób mo¿esz w Emacsie miêæ ca³kiem du¿o
+plików.
+
+>> Utwórz plik o nazwie "foo" za pomoc± C-x C-f foo <Return>.
+   Wpisz w niego jaki¶ tekst i zachowaj "foo" za pomoc± C-x C-s.
+   W koñcu napisz C-x C-f TUTORIAL <Return>, by wróciæ do podrêcznika.
+
+Emacs przechowuje tekst ka¿dego pliku w obiekcie, zwanym "buforem".
+Odwiedzenie pliku tworzy nowy bufor wewn±trz Emacsa.  By zobaczyæ
+listê buforów, które istniej± w Twoim Emacsie, naci¶nij
+
+       C-x C-b   lista buforów (ang. list buffers).
+
+>> Naci¶nij C-x C-b.
+
+Zwróæ uwagê, ze ka¿dy bufor ma w³asn± nazwê, mo¿e tak¿e mieæ
+skojarzon± z sob± nazwê pliku, który zawiera.  Pewne bufory nie
+odpowiadaj± ¿adnym plikom.  Na przyk³ad bufor "*Buffer List*" nie
+odwiedza ¿adnego pliku.  Jest to bufor, który zawiera listê buforów
+stworzona przez Twoje naci¶niecie C-x C-b.  DOWOLNY tekst, który
+ogl±dasz w oknie Emacsa jest zawsze czê¶ci± jakiego¶ bufora.
+
+>> Naci¶nij C-x 1 by pozbyæ siê listy buforów.
+
+Je¶li dokonujesz zmian tekstu w jakim¶ pliku, a potem odwiedzisz inny
+plik, zawarto¶æ tego pierwszego NIE jest automatycznie zachowywana.
+Zmiany, które wprowadzi³e¶ pozostaj± w Emacsie, w buforze tego¿ pliku.
+Tworzenie czy edytowanie innego bufora nie ma ¿adnego wp³ywu na ten
+pierwszy.  Jest to bardzo przydatne, ale oznacza tak¿e, ¿e potrzebny
+jest Ci wygodny sposób zachowywania zawarto¶ci Twoich buforów.
+Prze³±czanie siê z powrotem do pierwszego bufora zawsze przy
+wykonywaniu C-x C-f tylko po to, by nacisn±æ tam C-x C-s by³oby
+niewygodne.  Dlatego istnieje polecenie:
+
+       C-x s     Zachowaj bufory (ang. save some buffers)
+
+C-x s pyta Ciê, czy chcesz zachowaæ ka¿dy z buforów, w którym
+dokona³e¶ pewnych nie zachowanych jeszcze zmian.
+
+>> Wstaw jak±¶ liniê tekstu, a potem naci¶nij C-x s.
+   Powiniene¶ zostaæ zapytany o to, czy chcesz zachowaæ bufor
+   TUTORIAL.  Odpowiedz na to pytanie twierdz±co naciskaj±c "y".
+
+* U¯YWANIE MENU
+---------------
+
+Je¶li siedzisz przy X-terminalu zauwa¿ysz u góry okna Emacsa pasek
+menu.  Mo¿esz u¿ywaæ menu by dotrzeæ do najpopularniejszych poleceñ
+Emacsa, takich jak "find file".  Na pocz±tku bêdziesz s±dzi³, ze jest
+to ³atwiejsze ni¿ klawiatura, poniewa¿ nie musisz uczyæ siê na pamiêæ
+kombinacji klawiszy uruchamiaj±cych jakie¶ polecenie.  Gdy ju¿
+zaznajomisz siê z Emacsem, bêdziesz móg³ zacz±æ uczyæ siê klawiszy ---
+elementy menu pokazuj± kombinacje klawiszy, która wywo³uje dane
+polecenie.
+
+Zwróæ uwagê, ze pewne polecenia w menu nie maja jednoznacznych
+odpowiedników klawiszowych.  Na przyk³ad menu "Buffers" zawiera listê
+wszystkich dostêpnych buforów.  Mo¿esz prze³±czyæ siê do dowolnego z
+nich wybieraj±c jego nazwê z menu Buffers.
+
+
+* U¯YWANIE MYSZY
+----------------
+
+Emacs potrafi w pe³ni wykorzystywaæ mysz, je¶li tylko jest uruchomiony
+pod X-Windows.  Mo¿esz zmieniaæ pozycje kursora poprzez naci¶niecie
+lewego klawisza myszy w po¿±danym miejscu, mo¿esz tak¿e zaznaczaæ
+tekst przez przesuniecie myszy z wci¶niêtym lewym klawiszem nad
+tekstem, który chcesz zaznaczyæ.  (Innym sposobem jest klikniêcie na
+jednym z koñców obszaru, przesuniêcie myszy na drugi koniec i
+klikniêcie tam z jednoczesnym wci¶niêciem klawisza Shift.)
+
+By wyci±æ zaznaczony tekst mo¿esz nacisn±æ C-w lub wybraæ Cut z menu
+Edit.  Zwróæ uwagê na to, ze *nie* s± to równowa¿ne polecenia: C-w
+zapamiêtuje zaznaczony tekst tylko wewn±trz Emacsa (podobnie jak
+omówione powy¿ej C-k), natomiast Cut robi to oraz umieszcza ten tekst
+w schowku systemu X, sk±d mo¿e on zostaæ pobrany przez inne programy.
+
+By wkleiæ tekst ze schowka systemu X-Windows u¿yj polecenia Paste z
+menu Edit.
+
+¦rodkowy klawisz myszy jest czêsto u¿ywany do wybierania elementów,
+które s± wy¶wietlone na ekranie.  Na przyk³ad, je¶li uruchomisz Info
+(system dokumentacji Emacsa) naciskaj±c C-h i, lub wybieraj±c ten
+element z menu Help, przej¶cie pod¶wietlonym po³±czeniem (ang. link)
+odbywa siê poprzez naci¶niecie ¶rodkowego klawisza myszy.  Podobnie,
+je¶li wpisujesz nazwê pliku (np. podczas wykonywania "Find File") i
+naci¶niesz TAB, by zobaczyæ wszystkie mo¿liwe dokoñczenia nazwy,
+mo¿esz wybraæ jedno z nich z wy¶wietlonej listy, w³a¶nie naciskaj±c
+¶rodkowy klawisz myszy.
+
+Prawy klawisz myszy pokazuje lokalne menu.  Zawarto¶æ tego menu zale¿y
+od trybu pracy Emacsa, w którym aktualnie jeste¶, i zawiera kilka
+czêsto u¿ywanych poleceñ, tak by by³y one ³atwiejsze w dostêpie.
+
+>> Naci¶nij prawy klawisz myszy
+
+Prawy klawisz myszy musi byæ trzymany, by menu nie znik³o
+automatycznie.
+
+
+* ROZSZERZANIE ZESTAWU POLECEN
+------------------------------
+
+Poleceñ Emacsa jest du¿o du¿o wiêcej, ni¿ mo¿na by skojarzyæ
+kombinacjami zwyk³ych klawiszy oraz META czy CTRL.  Emacs radzi sobie
+z tym za pomoc± polecenia X (ang. eXtend).  Istniej± jego dwa rodzaje:
+
+       C-x     Rozszerzenie o znak.  Nastêpuje po nim jeden znak.
+       M-x     Rozszerzenie o nazwane polecenie.  Nastêpuje po nim
+                pe³na d³uga nazwa polecenia.  
+
+Polecenia te w ogólno¶ci s± u¿yteczne, ale s± u¿ywane nie tak czêsto
+jak polecenia, których ju¿ siê nauczy³e¶.  Mia³e¶ ju¿ okazje poznaæ
+dwa z nich: C-x C-f s³u¿±ce do odwiedzania plików oraz C-x C-s do ich
+zachowywania.  Innym przyk³adem mo¿e byæ polecenie, które koñczy sesje
+Emacsa C-x C-c.  (Nie martw siê, ze mo¿esz w ten sposób straciæ
+zmiany, które dokona³e¶; C-x C-c oferuje Ci mo¿liwo¶æ zachowania
+ka¿dego ze zmodyfikowanych plików przed zamkniêciem Emacsa.)
+
+C-z jest poleceniem, które wychodzi z Emacsa *na chwile*, tak by¶ móg³
+wróciæ do tej samej sesji Emacsa po jakim¶ czasie.
+
+W systemach, w których jest to mo¿liwe, C-z zawiesza proces Emacsa;
+powoduje to powrót do pow³oki (ang.  shell), ale nie niszczy Emacsa.
+W najpopularniejszych pow³okach mo¿esz wróciæ do Emacsa za pomoc±
+polecenia `fg' lub `%emacs'.
+
+W systemach, w których zawieszanie procesów nie dzia³a, C-z tworzy
+proces podpow³oki (ang. "subshell"), który dzia³a pod Emacsem i daje
+Ci szansê uruchamiania innych programów i powrotu do Emacsa po ich
+skoñczeniu; w tych systemach C-z nie wychodzi naprawdê z Emacsa.  W
+tych wypadkach normalnym poleceniem powrotu do Emacsa jest wyj¶cie z
+podpow³oki za pomoc± "exit".
+
+Polecenia C-x C-c powiniene¶ u¿ywaæ, gdy masz siê wylogowaæ.  Zalecane
+jest tak¿e wychodzenie z Emacsa wystartowanego przez np. programy
+obs³uguj±ce pocztê elektroniczna lub innego rodzaju narzêdzia,
+poniewa¿ mog± one nie wiedzieæ jak sobie poradziæ z zawieszeniem
+Emacsa.  Jednak¿e w zwyk³ych okoliczno¶ciach, je¶li nie musisz
+wylogowywaæ siê z systemu, lepiej jest zawiesiæ Emacsa za pomoc± C-z
+ni¿ z niego wyj¶æ.
+
+Istnieje wiele poleceñ zaczynaj±cych siê od C-x.  Oto lista tych,
+których siê ju¿ nauczy³e¶:
+
+       C-x C-f           odwied¼ plik
+       C-x C-s           zachowaj plik
+       C-x C-b           wy¶wietl listê buforów
+       C-x C-c           wyjd¼ z Emacsa
+       C-x u             cofnij
+
+Poleceñ podawanych za pomoc± nazwy u¿ywa siê jeszcze rzadziej lub
+u¿ywa siê tylko w pewnych trybach.  Przyk³adem mo¿e byæ polecenie
+replace-string, które globalnie zastêpuje jeden ³añcuch innym.  Gdy
+naciskasz M-x, Emacs czeka na ci±g dalszy, wy¶wietlaj±c "M-x" na dole
+ekranu.  Powiniene¶ po tym wpisaæ nazwê polecenia, w tym wypadku
+"replace-string".  Napisz tylko "repl s<TAB>", a Emacs dokoñczy nazwê.
+Zakoñcz wprowadzanie nazwy przez naci¶niecie klawisza <Return>.
+
+Polecenie replace-string wymaga dwóch argumentów: ³añcucha, który ma
+zostaæ zastêpowany i ³añcucha, który ma byæ wstawiony w miejsce tego¿.
+Obydwa ³añcuchy musza byæ zakoñczone przyci¶niêciem <Return>.
+
+>> Przesuñ kursor do czystej linii, dwie linie poni¿ej tej.
+   Naci¶nij M-x repl s<Return>zmieni<Return>zmodyfikuje<Return>.
+
+Zwróæ uwagê na to, jak ta linia siê zmieni: zast±pi³e¶ s³owem
+"zmodyfikuje" ka¿de wyst±pienie s³owa z-m-i-e-n-i poni¿ej pocz±tkowej
+pozycji kursora.
+
+
+* AUTOMATYCZNE ZACHOWYWANIE
+---------------------------
+
+Gdy wprowadzisz zmiany do pliku i ich nie zachowasz, mog± one zostaæ
+stracone, je¶li Twój komputer przestanie dzia³aæ.  By uchroniæ Ciê
+przed tym, Emacs okresowo zapisuje specjalny plik z wprowadzonymi
+zmianami.  Plik ten ma znak # na pocz±tku i na koñcu swojej nazwy.  Na
+przyk³ad, za³ó¿my, ze Twój plik nazywa siê "hello.c".  Odpowiadaj±cy
+mu plik automatycznie zachowywany bêdzie nosi³ nazwê "#hello.c#".  Gdy
+zachowujesz plik w zwyk³y sposób, Emacs kasuje plik automatycznie
+zachowany.
+
+Je¶li Twój komputer przestanie dzia³aæ, mo¿esz odzyskaæ Twoje dane z
+pliku automatycznie zachowanego przez zwykle odwiedzenie pliku (tego,
+który edytowa³e¶, a nie pliku automatycznie zachowanego) i napisanie
+M-x recover file<return>.  Gdy Emacs zapyta o potwierdzenie, napisz
+yes<return> by odzyskaæ dane, które zosta³y automatycznie zachowane.
+
+
+* OBSZAR ECHA
+-------------
+
+Je¶li polecenia dla Emacsa wpisujesz dostatecznie wolno, zostan± one
+pokazywane w specjalnym obszarze na dole ekranu, zwanym obszarem echa
+(ang. echo area).  Obszar echa zawiera ostatnia dolna linie ekranu.
+
+
+* LINIA STANU
+-------------
+
+Linia, która znajduje siê bezpo¶rednio nad obszarem echa, zwana jest
+"lini± trybu" (ang. modeline).  Pokazuje ona tekst podobny do
+nastêpuj±cego:
+
+--**-XEmacs: TUTORIAL         (Fundamental)--L670--58%----------------
+
+Linia ta podaje u¿yteczne informacje o stanie Emacsa i tekstu, który
+edytujesz.  Wiesz ju¿, jakie jest znaczenie nazwy pliku: jest to plik,
+który odwiedzi³e¶.  --NN%-- opisuje Twoja bie¿±c± pozycje wewn±trz
+tekstu; oznacza to, ¿e NN procent tekstu znajduje siê ponad górnym
+brzegiem ekranu.  Je¶li pocz±tek pliku znajduje siê na pocz±tku
+ekranu, zamiast liczby --00%-- zobaczysz w tym miejscu --Top--.
+Podobnie dla koñca tekstu pojawi siê tam napis --Bot-- (od
+ang. bottom).  Je¶li wy¶wietlasz tekst na tyle krótki, ze mie¶ci siê w
+ca³o¶ci na ekranie, linia stanu poka¿e --All--.
+
+Gwiazdki blisko pocz±tku linii trybu oznaczaj±, ze wprowadzi³e¶ do
+tekstu jakie¶ zmiany.  Bezpo¶rednio po odwiedzeniu lub po zachowaniu
+pliku nie bêdzie w tym miejscu ¿adnych gwiazdek, a tylko my¶lniki.
+
+Wewn±trz nawiasów znajdziesz informacje na temat trybu edycji, w
+którym w³a¶nie jest Emacs.  Domy¶lnym trybem edycji jest tryb
+podstawowy (ang. fundamental), który jest trybem (w³a¶nie w tej chwili
+u¿ywanym--) u¿ywanym w³a¶nie w tej chwili.  Jest to przyk³ad "trybu
+g³ównego" (ang. major mode).
+
+Emacs mo¿e dzia³aæ w wielu trybach g³ównych.  Pewne z nich zosta³y
+zaprojektowane do edycji rozmaitych jêzyków i/lub rodzajów tekstu,
+takie jak tryb Lispu, tryb tekstowy, itd.  W danej chwili mo¿e byæ
+aktywny tylko jeden g³ówny tryb pracy, i to jego nazwa jest
+wy¶wietlana w linii trybu w miejscu, w którym teraz jest
+"Fundamental".
+
+Ka¿dy z g³ównych trybów edycyjnych mo¿e zmieniæ zachowanie niektórych
+poleceñ.  Na przyk³ad, w Emacsie istniej± polecenia s³u¿±ce do
+tworzenia komentarzy w programach.  Ka¿dy jêzyk programowania na swój
+sposób okre¶la, jak powinien wygl±daæ komentarz, tak wiec ka¿dy z
+g³ównych trybów edycyjnych musi wstawiaæ komentarze w specyficzny
+sposób.  Ka¿dy tryb edycyjny jest nazw± polecenia, które mo¿esz
+wykonaæ, by prze³±czyæ siê w ten tryb lub wy³±czyæ ten tryb.
+Przyk³adem mo¿e byæ M-x fundamental-mode, które jest poleceniem
+prze³±czaj±cym tryb podstawowy.
+
+Je¶li zamierzasz edytowaæ tekst w jêzyku angielskim, taki jak na
+przyk³ad oryginalna wersja tego podrêcznika, prawdopodobnie powiniene¶
+u¿ywaæ trybu tekstowego (ang. text mode).
+
+>> Napisz M-x text-mode<Return>.
+
+Nie musisz siê martwiæ, ¿adne z poleceñ, które do tej pory pozna³e¶,
+nie zmienia Emacsa w powa¿ny sposób.  Mo¿esz jednak zauwa¿yæ, ze teraz
+M-f i M-b traktuj± apostrofy jako czê¶ci s³ów.  Poprzednio, w trybie
+podstawowym, polecenia te traktowa³y apostrofy jako separatory s³ów.
+
+G³ówne tryby edycji wprowadzaj± zwykle subtelne zmiany, takie jak
+opisana powy¿ej: wiêkszo¶æ poleceñ robi dalej "to samo", robi to
+jednak w sposób troszeczkê inny.
+
+By zobaczyæ dokumentacjê na temat bie¿±cego g³ównego trybu edycji,
+naci¶nij C-h m.
+
+>> Naci¶nij C-u C-v raz lub wiêcej razy tak, by ta linia znalaz³a siê
+   blisko góry ekranu.
+
+>> Naci¶nij C-h m, by zobaczyæ jak tryb tekstowy ró¿ni siê od trybu
+   podstawowego. 
+
+>> Naci¶nij q, by usun±æ dokumentacje z ekranu.
+
+G³ówne tryby edycji nazywaj± siê "g³ównymi", poniewa¿ s± tak¿e
+podrzêdne tryby edycji (ang. minor modes).  Podrzêdne tryby edycji nie
+s± alternatyw± dla g³ównych trybów edycji, a jedynie ich niewielk±
+modyfikacj±.  Ka¿dy podrzêdny tryb edycji mo¿e zostaæ w³±czony lub
+wy³±czony niezale¿nie od pozosta³ych podrzêdnych trybów edycji oraz
+niezale¿nie od g³ównego trybu edycji.  Mo¿esz wiec u¿ywaæ jednego,
+kombinacji dowolnych, lub nie u¿ywaæ ¿adnego trybu podrzêdnego.
+
+Jednym z podrzêdnych trybów edycji, który jest bardzo u¿yteczny
+szczególnie do edycji tekstu angielskiego, jest tryb automatycznego
+wype³niania (ang. auto fill mode).  Je¶li ten tryb jest w³±czony,
+Emacs lamie linie pomiêdzy s³owami automatycznie, gdy wstawiasz tekst
+i linia robi siê za szeroka.
+
+Tryb automatycznego wstawiania w³±cza siê na przyk³ad poprzez
+wywo³anie polecenia M-x auto-fill-mode<Return>.  Je¶li ten tryb jest
+w³±czony to samo polecenie wy³±cza go, i vice versa.  Mówimy, ze
+polecenie to "prze³±cza ten tryb".
+
+>> Napisz M-x auto-fill-mode<Return>.  Wstawiaj potem liniê pe³n±
+   "asdf " tak d³ugo, a¿ zobaczysz, ¿e siê podzieli na dwie linie.
+   Musisz wstawiæ spacje pomiêdzy znaki, poniewa¿ tryb automatycznego
+   wype³niania ³amie linie tylko tam, gdzie s± spacje.
+
+Margines jest zazwyczaj ustawiony na 70 znaków, ale mo¿esz go zmieniæ
+za pomoc± polecenia C-x f.  Powiniene¶ podaæ mu argument liczbowy
+mówi±cy, w której kolumnie ma zostaæ ustawiony margines.
+
+>> Wywo³aj C-x f z argumentem równym 20. (C-u 2 0 C-x f).
+   Napisz potem jaki¶ tekst i zauwa¿, ze Emacs wype³nia linie do
+   d³ugo¶ci co najwy¿ej 20 znaków.  Ustaw margines z powrotem na
+   70 znaków, wywo³uj±c jeszcze raz C-x f.
+
+Je¶li dokonujesz zmian wewn±trz akapitu, tryb 
+automatycznego wype³niania nie wyrówna marginesu
+sam z siebie.  By wywo³aæ polecenie
+wyrównania marginesu, naci¶nij M-q (Meta-q), 
+podczas gdy kursor znajduje siê wewn±trz akapitu.
+
+>> Przesuñ kursor do poprzedniego akapitu i naci¶nij M-q.
+
+
+* SZUKANIE
+----------
+
+Emacs potrafi szukaæ ³añcuchów (zwartych ci±gów znaków lub s³ów)
+zarówno wstecz jaki i do przodu.  Szukanie ³añcucha jest poleceniem,
+które przesuwa kursor; przesuwa ono kursor do nastêpnego miejsca, w
+którym dany ³añcuch wystêpuje.
+
+Polecenie Emacsa "search" ró¿ni siê od podobnych poleceñ innych
+edytorów w tym sensie, ze jest ono przyrostowe.  Znaczy to, ze
+szukanie odbywa siê w trakcie, gdy Ty wpisujesz kolejne znaki
+³añcucha, który ma zostaæ odnaleziony.
+
+Poleceniami zapocz±tkowuj±cymi szukanie s±: C-s dla szukania w przód
+oraz C-r dla szukania wstecz.  POCZEKAJ PROSZÊ!  Nie próbuj ich w tej
+chwili.
+
+Gdy naci¶niesz C-s zauwa¿ysz, ze tekst "I-search" pojawi siê w
+obszarze echa.  Informuje Ciê to, ¿e Emacs znajduje siê w trybie
+"incremental search", czekaj±c by¶ napisa³ tekst, który ma on znale¼æ.
+Naci¶niecie <Return> koñczy proces szukania.
+
+>> Teraz naci¶nij C-s, by rozpocz±æ szukanie.  POWOLI, litera po
+   literze, napisz s³owo "kursor", zatrzymuj±c siê po ka¿dym znaku i
+   obserwuj±c, gdzie zatrzymuje siê kursor.  Gdy naci¶niesz drugie
+   "r", bêdzie mo¿na powiedzieæ, ¿e szuka³e¶ s³owa "kursor"
+   jednokrotnie.  Naci¶nij C-s jeszcze raz, by znale¼æ nastêpne
+   wyst±pienie s³owa "kursor".  Naci¶nij teraz <Delete> cztery
+   razy i zobacz, co siê dzieje z kursorem.  Naci¶nij <RET>, by skoñczyæ
+   szukanie.
+
+Widzia³e¶, co siê dzia³o? Emacs podczas szukania przyrostowego próbuje
+przej¶æ do miejsca wyst±pienia ³añcucha, który do tej pory wpisa³e¶,
+pod¶wietlaj±c go dla Twojej wygody.  By znale¼æ nastêpne wyst±pienie
+s³owa "kursor", po prostu naci¶nij C-s jeszcze raz.  Je¶li takiego nie
+ma, Emacs zapiszczy i powie Ci, ze szukanie "skoñczy³o siê pora¿k±".
+Naci¶niecie C-g tak¿e przerywa proces szukania.
+
+UWAGA: W niektórych systemach naci¶niecie C-s zamrozi ekran i nie
+zobaczysz ¿adnego tekstu z Emacsa.  Oznacza to, ¿e sk³adowa systemu
+operacyjnego, zwana kontrol± przep³ywu (ang. "flow control")
+przechwyci³a C-s i nie pozwoli³a mu dojsæ do Emacsa.  By odzyskaæ
+kontrole nad ekranem, nacisnij C-q.  Dodatkowej pomocy poszukaj w
+rozdziale "Spontaneous Entry to Incremental Search" w podrêczniku
+Emacsa.
+
+Jesli podczas szukania przyrostowego naci¶niesz <Delete> zauwa¿ysz, ze
+ostatni znak, który wcisn±³es znika i kursor wraca do poprzedniego
+miejsca.  Na przyk³ad, za³ó¿my, ze nacisn±³es "k" i znalaz³es pierwsze
+wyst±pienie tej litery.  Jesli teraz naci¶niesz "u", kursor przesunie
+siê do pierwszego wyst±pienia "ku".  Teraz nacisnij <Delete>.  Skasuje
+to "u" z ³añcucha, którego poszukujesz, a kursor wróci do pierwszego
+wyst±pienia "k".
+
+Je¶li podczas szukania nacisniesz jaki¶ klawisz razem z META lub CTRL
+(z nielicznymi wyj±tkami --- znakami, które maj± specjalne znaczenie
+podczas szukania, takimi jak C-s i C-r) szukanie zostanie przerwane.
+
+C-s rozpoczyna proces szukania, który poszukuje ³añcucha, który
+znajduje siê ZA bie¿±c± pozycja kursora.  Je¶li chcesz szukaæ czego¶
+wcze¶niej w tek¶cie, naci¶nij C-r.  Wszystko, co powiedzieli¶my o C-s
+stosuje siê do C-r, oczywi¶cie ze zmian± kierunku szukania na wstecz.
+
+
+* WIELE OKIEN
+-------------
+
+Jedn± z przyjemnych cech Emacsa jest mo¿liwo¶æ wy¶wietlania wiêcej ni¿
+jednego okna na raz.
+
+>> Przesuñ kursor do tej linii i naci¶nij C-u 0 C-l.
+
+>> Naci¶nij teraz C-x 2, co podzieli ekran na dwa okna.  Obydwa okna
+   wy¶wietlaj± ten podrêcznik.  Kursor pozostaje w górnym oknie.
+
+>> Naci¶nij C-M-v by przewin±æ dolne okno.  (Je¶li nie masz
+   prawdziwego klawisza Meta, naci¶nij ESC C-v.)
+
+>> Naci¶nij C-x o ("o" jak angielskie "other") by przesun±æ kursor do
+   dolnego okna.  U¿yj C-v i M-v w dolnym oknie by przewin±æ jego
+   zawarto¶æ.  Polecenia, które masz wykonaæ czytaj w górnym oknie.
+
+>> Naci¶nij C-x o jeszcze raz tak, by kursor wróci³ do górnego okna.
+   Kursor w górnym oknie nie zmieni³ po³o¿enia.
+
+Ka¿de okno pamiêta po³o¿enie swojego w³asnego kursora, lecz tylko
+jedno okno w danej chwili wy¶wietla kursor.  Wszystkie polecenia
+edycyjne stosuj± siê do okna, w którym jest kursor.  To okno nazywane
+jest "wybranym oknem".
+
+Polecenie C-M-v jest bardzo u¿yteczne gdy edytujesz tekst w jednym
+oknie, a drugiego u¿ywasz tylko jako punkt odniesienia.  Dziêki temu
+kursor mo¿e zawsze znajdowaæ siê w oknie, zawarto¶æ którego edytujesz,
+a Ty mo¿esz przesuwaæ drugie okno za pomoc± C-M-v.
+
+C-M-v to przyk³ad znaku, który uzyskuje siê za pomoc± CONTROL-META.
+Je¶li masz prawdziwy klawisz META, C-M-v mo¿esz uzyskaæ przytrzymuj±c
+jednocze¶nie CTRL oraz META i naciskaj±c v.  Nie jest wa¿ne, co
+zosta³o naci¶niete wcze¶niej, CTRL czy META, poniewa¿ obydwa te
+klawisze dzia³aj± jako modyfikatory znaczenia klawiszy, które
+naciskasz.
+
+Je¶li nie masz klawisza META i u¿ywasz w jego zastêpstwie ESC,
+kolejno¶æ naciskania klawiszy jest znacz±ca: musisz najpierw nacisn±æ
+i pu¶ciæ ESC, po czym nacisn±æ CTRL-v; CTRL-ESC v nie bêdzie dzia³aæ.
+Dzieje siê tak dlatego, ze ESC jest znakiem, a nie modyfikatorem.
+
+>> Naci¶nij C-x 1 (w górnym oknie), by pozbyæ siê dolnego okna.
+
+(Je¶li nacisn±³by¶ C-x 1 w dolnym oknie, to znik³oby górne.  Mo¿esz
+sobie t³umaczyæ to polecenie jako "zatrzymaj tylko jedno okno --- to w
+którym w³a¶nie jestem".)
+
+Nie musisz wy¶wietlaæ tego samego bufora w obydwu oknach.  Je¶li
+u¿yjesz C-x C-f by wy¶wietliæ plik w jednym z okien, zawarto¶æ
+drugiego nie zmieni siê.  W ka¿dym oknie mo¿esz wy¶wietlaæ ró¿ne pliki
+niezale¿nie.
+
+Oto inny sposób u¿ywania dwóch okien do wy¶wietlania dwóch ró¿nych
+rzeczy:
+
+>> Naci¶nij C-x 4 C-f i nazwê jednego z Twoich plików.  Zakoñcz
+   wprowadzanie klawiszem <Return>.  Podany plik pojawi siê w dolnym
+   oknie razem z kursorem, który tam przeskakuje.
+
+>> Naci¶nij C-x o, by wróciæ do górnego okna, oraz C-x 1 by
+   usun±æ dolne okno.
+
+
+* REKURSYWNE POZIOMY EDYCJI
+---------------------------
+
+Czasami mo¿esz znale¼æ siê w czym¶, co nazywa siê "rekursywnym
+poziomem edycji".  Mo¿esz to rozpoznaæ po nawiasach kwadratowych w
+linii trybu, obejmuj±cych nawiasy okr±g³e zawieraj±ce nazwê g³ównego
+trybu edycji.  Na przyk³ad, móg³by¶ widzieæ [(Fundamental)] zamiast
+(Fundamental).
+
+By wyj¶æ z rekursywnego poziomu edycji naci¶nij ESC ESC ESC.  Jest to
+ogólnego przeznaczenia "wychodzimy".  Mo¿esz go u¿yæ tak¿e by pozbyæ
+siê nadmiaru okien lub wyj¶æ z minibufora.
+
+>> Naci¶nij M-x by wej¶æ do minibufora; naci¶nij potem ESC ESC ESC, by
+   z niego wyj¶æ.
+
+Nie mo¿esz u¿yæ C-g, by wyj¶æ z rekursywnego poziomu edycji.  Dzieje
+siê tak dlatego, ze C-g jest u¿ywane do anulowania poleceñ i
+argumentów WEWN¡TRZ rekursywnego poziomu edycji.
+
+
+SZUKANIE DODATKOWEJ POMOCY
+--------------------------
+
+W tym podrêczniku spróbowali¶my dostarczyæ tylko tyle informacji, ile
+jest niezbêdne, by¶ móg³ zacz±æ u¿ywaæ Emacsa.  Emacs jest istn±
+kopalni± najró¿niejszych rzeczy, których nie sposób tutaj opisaæ.
+Zapewne bêdziesz chcia³ dowiedzieæ siê wiêcej o Emacsie, poniewa¿
+posiada on wiele po¿±danych cech, o których na razie nic nie wiesz.
+Jest w nim zaszyte mnóstwo wewnêtrznej dokumentacji, która mo¿e byæ
+osi±gniêta za pomoc± Control-h, które okre¶lamy mianem "znaku pomocy"
+z powodu spe³nianej przez niego roli.
+
+By uzyskaæ pomoc, naci¶nij C-h a potem znak, który okre¶la jakiego
+typu pomocy oczekujesz.  Je¶li poczujesz siê NAPRAWDÊ zagubiony,
+napisz C-h ? i Emacs spróbuje powiedzieæ Ci, jakiego typu pomocy mo¿e
+Ci dostarczyæ.  Je¶li naci¶niesz C-h a potem zadecydujesz, ¿e pomoc
+nie jest Ci jednak potrzebna, po prostu wci¶nij C-g by anulowaæ C-h.
+
+Najprostsz± pomoc mo¿esz uzyskaæ naciskaj±c C-h c.  Naci¶nij C-h a
+potem c, po czym kombinacje klawiszy polecenia, i Emacs wy¶wietli
+bardzo krótki opis polecenia.
+
+>> Naci¶nij C-h c Control-p.
+   Powinno to przywo³aæ komunikat, o tre¶ci podobnej do
+
+       C-p runs the command previous-line
+
+W ten sposób mo¿esz uzyskaæ "nazwê funkcji".  Przydaje siê to podczas
+pisania kodu w Lispie, który rozszerza Emacsa; wystarcza to tak¿e do
+przypomnienia Ci, co dane polecenie robi, je¶li widzia³e¶ je ju¿
+wcze¶niej, ale nie zapamiêta³e¶ go.
+
+Polecenia wywo³ywane za pomoc± wieloznakowej kombinacji klawiszy, na
+przyk³ad C-x C-s oraz (je¶li nie masz klawisza META lub EDIT) <ESC>v,
+s± tak¿e dopuszczalne po C-h c.
+
+By uzyskaæ wiêcej informacji na temat polecenia, naci¶nij C-h k
+zamiast C-h c.
+
+>> Naci¶nij C-h k Control-p.
+
+To polecenie wy¶wietla dokumentacjê na temat danej funkcji oraz jej
+nazwê w oknie Emacsa.  Gdy skoñczysz ¶ledziæ wynik tego polecenia
+naci¶nij C-x 1, by pozbyæ siê tekstu pomocy.  Nie musisz tego robiæ od
+razu.  Mo¿esz wykonaæ pewne operacje w oparciu o tekst pomocy zanim
+naci¶niesz C-x 1.
+
+Oto kilka innych u¿ytecznych wariantów C-h:
+
+   C-h f       Opisz funkcje o podanej nazwie.
+
+>> Napisz C-h f previous-line<Return>.  Wypisze to na ekranie ca³±
+   informacje, jak± Emacs ma na temat funkcji, która implementuje
+   polecenie C-p.
+
+   C-h a       Apropos.   Wpisz s³owo kluczowe, a Emacs wypisze listê
+                wszystkich poleceñ, których nazwa zawiera to s³owo.
+                Polecenia te mog± zostaæ wywo³ane za pomoc± Meta-x.
+                Dla niektórych poleceñ Apropos wypisze jedno- lub
+                dwuznakowe sekwencje, które wywo³uj± dane polecenie.
+
+>> Napisz C-h a file<Return>.  Zobaczysz listê wszystkich poleceñ,
+   dostêpnych za pomoc± M-x, które maja s³owo "file" w swojej nazwie.
+   Zauwa¿ysz tam tak¿e polecenia takie, jak C-x C-f oraz C-x C-w,
+   umieszczone obok nazw poleceñ "find-file" i "write-file".
+
+
+PODSUMOWANIE
+------------
+
+Pamiêtaj, ¿e by wyj¶æ z Emacsa na sta³e, u¿ywaj C-x C-c.  By wyj¶æ do
+pow³oki na chwilê tak, by¶ móg³ wróciæ, u¿yj C-z. (To nie dzia³a pod
+X-Windows, poniewa¿ tam nie ma prawdziwego konceptu przej¶cia na
+chwile do pow³oki.  Zamiast tego C-z ikonizuje okno Emacsa.)
+
+Ten podrêcznik by³ pisany tak, by wszyscy nowi u¿ytkownicy mogli go
+zrozumieæ.  Je¶li co¶ pozostawi³ niejasnym, nie sied¼ cicho i nie
+obwiniaj siebie, tylko daj nam znaæ!
+
+
+KOPIOWANIE
+----------
+
+Niniejszy podrêcznik jest potomkiem w d³ugiej linii podrêczników
+Emacsa, która rozpoczyna siê od tego, który zosta³ napisany przez
+Stuarta Cracrafta dla oryginalnego Emacsa.  Zosta³ on zmodyfikowany we
+wrze¶niu 1994 przez Bena Winga, który zaktualizowa³ go, je¶li chodzi o
+X-Windows.
+
+T³umaczenia na jêzyk polski dokona³ Remek Trzaska z pomoc± Ryszarda
+Kubiaka.  Jesli polskie znaki nie byly poprawnie wyswietlane w tym
+buforze, oznacza to, ze nie masz zainstalowanych polskich fontow. 
+Pomoc w tym zakresie mozesz znalezc pod adresem: 
+               <URL:http://www.agh.edu.pl/ogonki>
+
+Ta wersja podrêcznika, podobnie jak GNU Emacs, jest zastrze¿ona, a
+pozwolenie na kopiowanie udzielone jest pod nastêpuj±cymi warunkami:
+
+Copyright (c) 1985, 1994 Free Software Foundation
+
+   Permission is granted to anyone to make or distribute verbatim
+   copies of this document as received, in any medium, provided that
+   the copyright notice and permission notice are preserved,
+   and that the distributor grants the recipient permission
+   for further redistribution as permitted by this notice.
+
+   Permission is granted to distribute modified versions
+   of this document, or of portions of it,
+   under the above conditions, provided also that they
+   carry prominent notices stating who last altered them.
+
+Warunki kopiowania samego Emacsa s± w pewnym stopniu inne, aczkolwiek
+zachowuj± te sama idee.  Proszê, przeczytaj plik COPYING, po czym
+rozdaj swoim znajomym kopie Emacsa.  Pomó¿ zwalczyæ przeszkody w
+rozpowszechnianiu oprogramowania przez tworzenie i dzielenie siê
+oprogramowaniem.
diff --git a/etc/TUTORIAL.ro b/etc/TUTORIAL.ro
new file mode 100644 (file)
index 0000000..16eaa16
--- /dev/null
@@ -0,0 +1,1205 @@
+Copyright (c) 1998 Tudor Hulubei <tudor@gnu.org>
+Mulþumiri Aidei Hulubei <aida@chang.pub.ro> pentru corecturi ºi sugestii.
+
+A se citi sfârºitul pentru condiþii.
+
+Aceastã versiune a fost produsã plecând de la versiunea în limba
+englezã, care este
+Copyright (c) 1985, 1996 Free Software Foundation, Inc.
+
+Citiþi acum versiunea româneascã a tutorialului de Emacs.
+
+Comenzile Emacs folosesc în general tasta CONTROL (uneori denumitã
+CTRL sau CTL) sau tasta META.  Pe unele tastaturi, tasta META este
+etichetatã ALT, EDIT sau în alt fel (de exemplu, pe tastaturile Sun,
+tasta META este etichetatã cu un diamant ºi se gãseºte la stânga
+tastei spaþiu).  Dacã nu aveþi o tastã META, puteþi folosi ESC în loc.
+În loc sã scriem META sau CONTROL de fiecare datã când vrem sã
+prefixãm un caracter, vom folosi urmãtoarele prescurtãri:
+
+ C-<chr> înseamnã cã þineþi apãsatã tasta CONTROL în timp ce tastaþi
+        caracterul <chr>.  Astfel, C-f înseamnã: þineþi apãsatã tasta
+        CONTROL ºi tastaþi f.
+
+ M-<chr> înseamnã cã þineþi apãsatã tasta META în timp ce tastaþi
+        <chr>.  Dacã nu existã tasta META, tastaþi <ESC>, ridicaþi ºi
+        apoi tastaþi caracterul <chr>.
+
+Observaþie importantã: pentru a termina sesiunea Emacs, tastaþi C-x
+C-c.  (Douã caractere.)  Caracterele ">>" la marginea din stânga
+reprezintã instrucþiuni pentru a încerca o comandã.  De exemplu:
+<<Mijlocul paginii e gol din raþiuni didactice.  Textul continuã dedesubt.>>
+>> Acum tastaþi C-v (citirea urmãtorului ecran) pentru a vã muta la
+   urmãtorul ecran.  (Executaþi aceastã comandã acum, tinând apãsatã
+   tasta CONTROL în timp ce tastaþi v).  De acum înainte faceþi acest
+   lucru din nou, de fiecare datã când terminaþi de citit ecranul.
+
+De remarcat cã existã o zonã de suprapunere de douã linii când vã
+mutaþi de la un ecran la altul; aveþi astfel o oarecare continuitate
+în citirea textului.
+
+Primul lucru pe care trebuie sã-l stiþi este cum sã vã deplasaþi din
+loc în loc în text.  ªtiþi deja cum sã vã mutaþi la urmãtorul ecran cu
+C-v.  Pentru a vã deplasa înapoi un ecran, tastaþi M-v (þineþi apãsatã
+tasta META ºi tastaþi v, sau <ESC>v dacã nu aveþi o tastã META, EDIT,
+sau ALT).
+
+>> Încercaþi sã tastaþi M-v ºi apoi C-v de câteva ori.
+
+
+* SUMAR
+-------
+
+Urmãtoarele comenzi sunt utile pentru a vedea ecrane:
+
+       C-v     avanseazã un ecran
+       M-v     înapoi un ecran
+       C-l     ºterge ecranul ºi reafiºeazã totul poziþionând textul
+               de lângã cursor în centrul ecranului.  (Este C-L, nu
+               C-1.)
+
+>> Gãsiþi cursorul ºi þineþi minte ce text este în jurul lui.
+   Apoi tastaþi C-l.  Gãsiþi cursorul din nou ºi observaþi cã textul
+   de lângã cursor este acelaºi.
+
+
+* COMENZI DE BAZàPENTRU CONTROLUL CURSORULUI
+---------------------------------------------
+
+Mutatul ecran cu ecran este util, dar cum vã mutaþi la o anumitã
+poziþie în textul de pe ecran?
+
+Sunt mai multe modalitaþi în care puteþi face acest lucru.  Cel mai
+simplu este sã folosiþi comenzile C-p, C-b, C-f ºi C-n.  Fiecare din
+aceste comenzi mutã cursorul o linie sau coloanã într-o anumitã
+direcþie pe ecran.  Diagrama urmãtoare prezintã aceste patru comenzi
+ºi aratã direcþiile în care ele mutã cursorul.
+
+                        Linia precedentã, C-p
+                                 :
+                                 :
+    Înapoi, C-b .... Poziþia curentã a cursorului .... Înainte, C-f
+                                 :
+                                 :
+                        Linia urmãtoare, C-n
+
+>> Mutaþi cursorul la linia din mijlocul diagramei folosind C-n sau
+   C-p.  Tastaþi apoi C-l pentru a vedea întreaga diagramã centratã pe
+   ecran.
+
+Vi se va pãrea probabil mai simplu sã vã amintiþi aceste comenzi
+gândindu-vã la semnificaþia lor în limba englezã: P pentru previous, N
+pentru next, B pentru backward ºi F pentru forward.  Acestea sunt
+comenzile de bazã pentru poziþionarea cursorului ºi le veþi folosi tot
+timpul, deci ar fi foarte util sã le învãþaþi acum.
+
+>> Tastaþi câteva C-n-uri pentru a aduce cursorul la aceastã linie.
+
+>> Mutaþi-vã în interiorul liniei cu C-f-uri ºi apoi în sus cu
+   C-p-uri.  Urmãriþi ce face C-p atunci când cursorul este în
+   mijlocul liniei.
+
+Fiecare linie se terminã cu un caracter NEWLINE care o separã de linia
+urmãtoare.  Ultima linie în fiºierele dumneavoastrã ar trebui sã aibã
+un asemenea caracter la sfârºit (deºi Emacs-ul nu-l necesitã).
+
+>> Încercaþi sã tastaþi C-b la începutul unei linii.  Cursorul ar
+   trebui sã se mute la sfârºitul liniei precedente, din cauza
+   trecerii peste caracterul NEWLINE.
+
+C-f poate sã treacã peste un caracter NEWLINE, la fel ca ºi C-b.
+
+>> Tastaþi câteva C-b-uri, pentru a vã familiariza cu poziþia
+   cursorului.  Tastaþi apoi câteva C-f-uri pentru a vã întoarce la
+   sfârºitul liniei.  Încã un C-f ºi vã veþi muta la linia urmãtoare.
+
+Când ajungeþi sã treceþi peste începutul sau sfârºitul ecranului,
+textul aflat dincolo de margine intrã în ecran, permiþându-i
+Emacs-ului sã mute cursorul la poziþia specificatã, fãrã a ieºi din
+zona vizibilã (ecran).  Aceastã operaþiune se numeste în limba englezã
+"scrolling".
+
+>> Încercaþi sã mutaþi cursorul în afara pãrþii de jos a ecranului cu
+   C-n ºi observaþi ce se întamplã.
+
+Dacã mutatul caracter cu caracter este lent, puteþi muta cursorul
+cuvânt cu cuvânt.  M-f (META-f) avanseazã cursorul cu un cuvânt, iar
+M-b mutã cursorul un cuvânt înapoi.
+
+>> Tastaþi câteva M-f-uri ºi apoi câteva M-b-uri.
+
+Când cursorul este în mijlocul unui cuvânt, M-f îl mutã la sfârºitul
+cuvântului.  Când cursorul este în spaþiul dintre cuvinte, M-f îl mutã
+la sfârºitul cuvântului urmãtor.  M-b acþioneazã similar, dar în
+direcþia opusã.
+
+>> Tastaþi M-f ºi M-b de câteva ori, intercalate cu C-f-uri ºi
+   C-b-uri, pentru a observa efectul comenzilor M-f ºi M-b din diverse
+   poziþii în interiorul cuvintelor ºi între ele.
+
+Observaþi paralela între C-f ºi C-b pe de o parte, ºi M-f ºi M-b pe de
+cealaltã parte.  De multe ori, caracterele META sunt folosite pentru
+operaþii referitoare la unitãþile definite de limbaj (cuvinte, fraze,
+paragrafe), în timp ce caracterele CONTROL opereazã pe unitãþi de
+bazã, care sunt independente de tipul textului editat (caractere,
+linii, etc).
+
+Aceastã paralelã se aplicã ºi între linii ºi fraze: C-a ºi C-e mutã
+cursorul la începutul ºi, respectiv sfârºitul unei linii, în timp ce
+M-a ºi M-e îl mutã la începutul ºi, respectiv sfârºitul unei fraze.
+
+>> Încercaþi câteva C-a-uri, apoi câteva C-e-uri.
+   Încercaþi câteva M-a-uri, apoi câteva M-e-uri.
+
+Remarcaþi cum repetarea tastãrii lui C-a nu schimbã nimic, în timp ce
+repetarea tastãrii lui M-a mutã cursorul la fraza urmãtoare.  Deºi
+aceste operaþii nu sunt tocmai analoage, fiecare pare naturalã.
+
+Poziþia cursorului în text mai este numitã ºi "punct" ("point" în
+limba englezã).  Cursorul aratã pe ecran poziþia punctului în text.
+
+Operaþiile ce mutã cursorul (inclusiv comenzile ce mutã cursorul
+cuvânt cu cuvânt sau frazã cu frazã) sunt prezentate în sumarul
+urmãtor:
+
+       C-f     avanseazã un caracter
+       C-b     înapoi un caracter
+
+       M-f     avanseazã un cuvânt
+       M-b     înapoi un cuvânt
+
+       C-n     avanseazã o linie
+       C-p     înapoi o linie
+
+       C-a     înapoi la începutul liniei
+       C-e     avanseazã la sfârºitul liniei
+
+       M-a     înapoi la începutul frazei
+       M-e     avanseazã la sfârºitul frazei
+
+>> Exersaþi toate aceste comenzi acum, sunt comenzile cele mai des
+   folosite.
+
+Douã alte comenzi importante legate de mutatul cursorului sunt M-<
+(META Mai-mic), care mutã cursorul la începutul textului, ºi M-> (META
+Mai-mare), care mutã cursorul la sfârºitul textului.
+
+Pe majoritatea terminalelor "<" este deasupra virgulei ºi deci este
+necesar sã apãsaþi tasta SHIFT în acelaºi timp.  Pe aceste terminale
+este nevoie sã apãsaþi SHIFT ºi când tastaþi M-<; fãrã tasta SHIFT,
+aþi apãsa M-virgulã.
+
+>> Încercaþi M-< acum, pentru a vã muta la începutul tutorialului.
+   Folosiþi apoi C-v în mod repetat pentru a ajunge înapoi aici.
+
+>> Încercaþi M-> acum, pentru a vã muta la sfârºitul tutorialului.
+   Folosiþi apoi M-v repetat pentru a ajunge înapoi aici.
+
+Puteþi de asemenea sã mutaþi cursorul cu tastele sãgeþi, dacã
+terminalul are asemenea taste.  Se recomandã însã acomodarea cu C-b,
+C-f, C-n ºi C-p din trei motive.  În primul rând, aceste taste
+funcþioneazã pe toate tipurile de terminale.  În al doilea rând, odatã
+ce vã obiºnuiþi cu Emacs-ul, veþi remarca faptul cã tastarea lor este
+mai rapidã decât cea a tastelor sãgeþi (pentru cã nu trebuie sã vã
+schimbaþi poziþia mâinilor pe tastaturã).  În al treilea rând, odatã
+format obiceiul de a folosi aceste comenzi bazate pe CONTROL,
+comenzile avansate de mutat cursorul se învaþã foarte uºor.
+
+Majoritatea comenzilor Emacs acceptã un argument numeric; pentru
+majoritatea comenzilor, acest argument reprezintã un contor de
+repetiþie.  Contorul de repetiþie se introduce tastând C-u, cifrele ce
+alcãtuiesc contorul ºi apoi comanda.  Dacã aveþi tasta META (EDIT sau
+ALT), existã ºi o altã alternativã pentru a introduce un argument
+numeric: tastaþi cifrele în timp ce þineþi tasta META apãsatã.  Se
+recomandã însã folosirea metodei cu C-u, deoarece funcþioneazã pe
+orice terminal.
+
+De exemplu, C-u 8 C-f avanseazã cursorul cu opt caractere.
+
+>> Încercaþi sã folosiþi C-n sau C-p cu un argument numeric pentru a
+   muta cursorul dintr-o singurã comandã pe o linie apropiatã de
+   aceasta.
+
+Majoritatea comenzilor utilizeazã argumentul numeric ca un contor de
+repetitie.  Anumite comenzi speciale îl folosesc însa în mod diferit.
+C-v si M-v sunt printre aceste excepþii.  Când li se dã un argument
+numeric, ele mutã ecranul mai sus sau mai jos cu numarul specificat de
+linii, nu de ecrane.  De exemplu, C-u 4 C-v mutã ecranul cu 4 linii.
+
+>> Încercaþi sã tastaþi C-u 8 C-v acum.
+
+Aceastã comandã trebuie sã mute ecranul în sus cu 8 linii.  Dacã
+doriti sã îl mutaþi înapoi, puteþi sã-i daþi lui M-v un argument
+numeric.
+
+Dacã folosiþi sistemul X Window, existã probabil o zonã rectangularã
+numita "scroll bar" la dreapta ferestrei Emacs-ului.  Puteþi deplasa
+textul manipulând "scroll bar"-ul cu mouse-ul.
+
+>> Încercaþi sã apãsaþi butonul din mijloc al mouse-ului la mijlocul
+   butonului din scroll bar.  Aceasta ar trebui sã mute textul la o
+   poziþie determinatã de cât de sus sau de jos aþi apãsat pe scroll
+   bar.
+
+>> Mutaþi mouse-ul într-un punct în scroll bar la aproximativ trei
+   linii de început ºi apãsaþi butonul din stânga de câteva ori.
+
+
+* CONTROLUL CURSORULUI ÎNTR-UN TERMINAL X
+-----------------------------------------
+
+Dacã aveþi un terminal X, vi se va pãrea probabil mai uºor sã folosiþi
+tastele de pe keypad pentru a controla cursorul.  Sãgeþile stânga,
+dreapta, sus ºi jos mutã cursorul în direcþia specificatã;
+funcþioneaza exact ca ºi C-b, C-f, C-p ºi C-n, dar sunt mai uºor de
+tastat ºi reþinut.  Puteþi folosi de asemenea C-stânga ºi C-dreapta
+pentru a vã deplasa cuvânt cu cuvânt, ºi C-sus ºi C-jos, pentru a vã
+deplasa bloc cu bloc (de ex. paragraf cu paragraf, dacã editaþi text).
+Dacã tastatura are taste etichetate HOME (sau BEGIN) ºi END, acestea
+vã vor muta la începutul, respectiv sfârºitul liniei, iar C-home ºi
+C-end vã vor muta la începutul, respectiv sfârºitul fiºierului.  Dacã
+tastatura are taste etichetate PgUp ºi PgDn, acestea vã vor muta ecran
+cu ecran, exact ca M-v ºi C-v.
+
+Toate aceste comenzi acceptã argument numeric, aºa cum am explicat mai
+sus.  Puteþi folosi o modalitate mai simplã de a-l introduce: þineþi
+apãsatã tasta CONTROL sau tasta META ºi tastaþi numãrul.  De exemplu,
+pentru a vã muta 12 cuvinte la dreapta, tastaþi C-1 C-2 C-dreapta.  De
+remarcat faptul cã este foarte uºor sã tastaþi, pentru cã nu trebuie
+sã ridicaþi tasta CONTROL.
+
+
+* CÂND EMACS-ul ESTE BLOCAT
+---------------------------
+
+Dacã Emacs-ul înceteazã sã vã raspundã la comenzi, îl puteþi opri,
+fãrã sã pierdeþi modificãrile fãcute pânã atunci, tastând C-g.  Puteþi
+folosi C-g pentru a opri o comandã care dureazã prea mult.
+
+Puteþi de asemenea folosi C-g pentru a opri introducerea unui argument
+numeric sau începutul unei comenzi pe care nu doriþi sã o continuaþi.
+
+>> Tastaþi C-u 100 pentru a introduce 100 ca un argument numeric, apoi
+   tastaþi C-g.  Tastaþi apoi C-f.  Cursorul ar trebui sã se mute un
+   singur caracter, pentru cã aþi oprit introducerea argumentului
+   numeric cu C-g.
+
+Dacã aþi tastat un <ESC> din greºealã, puteþi sã-l anulaþi cu un C-g.
+
+
+* COMENZI DEZAFECTATE
+---------------------
+
+Anumite comenzi sunt dezafectate în Emacs, în aºa fel încât
+utilizatorii sã nu le poatã folosi din neatenþie.
+
+Dacã tastaþi una din comenzile dezafectate, Emacs-ul va afiºa un mesaj
+spunând ce comandã aþi tastat ºi întrebându-vã dacã doriþi sã
+continuaþi.
+
+Dacã într-adevãr doriþi sã încercaþi comanda respectivã, tastaþi
+SPAÞIU.  În mod normal, dacã nu doriþi sã executaþi comanda
+dezafectatã, rãspundeþi cu "n".
+
+>> Tastaþi `C-x n p' (care este o comandã dezafectatã), apoi tastaþi n
+   ca rãspuns la întrebarea pusã de Emacs.
+
+
+* FERESTRE
+----------
+
+Emacs-ul poate avea mai multe ferestre, fiecare afiºând propriul sãu
+text.  De remarcat cã "fereastrã" în sensul folosit de Emacs nu se
+referã la ferestrele ce se pot suprapune într-un sistem bazat pe
+ferestre (cum ar fi X Window System), ci la secþiuni separate într-o
+singurã fereastrã X.  (Emacs-ul poate avea multiple ferestre X -
+"frame"-uri în terminologia Emacs.  Acestea vor fi descrise mai
+târziu.)
+
+În acest moment este mai bine sã nu detaliem tehnicile de folosire a
+ferestrelor multiple, dar trebuie sã ºtiþi cum sã închideþi ferestrele
+care ar putea apare ca rezultat al afiºãrii unor documentaþii sau
+rezultate specifice anumitor comenzi.  Este simplu:
+
+       C-x 1   o singurã fereastrã (adicã închide toate celelalte
+               ferestre).
+
+Asta înseamnã CONTROL-x urmat de cifra 1.  C-x 1 mãreºte fereastra
+care conþine cursorul pânã când ocupã întregul ecran.  Toate celelalte
+ferestre sunt distruse.
+
+>> Mutaþi cursorul la aceastã linie ºi tastaþi C-u 0 C-l.
+
+(Dupã cum vã amintiþi, C-l redeseneazã ecranul.  Un argument numeric
+înseamnã "redeseneazã ecranul ºi pune linia curentã la o distanþã (în
+numãr de linii) de partea de sus a ecranului egalã cu argumentul
+numeric".  În concluzie, C-u 0 C-l înseamnã "redeseneazã ecranul,
+poziþionând linia curentã la început.")
+
+>> Tastaþi C-x 2.  Observaþi cum aceastã fereastrã se micºoreazã, în
+   timp ce o nouã fereastrã apare, afiºând acelaºi text.
+
+>> Tastaþi C-x 1 ºi observaþi cum noua fereastrã dispare.
+
+
+* INTRODUCEREA ªI ªTERGEREA
+---------------------------
+
+Dacã vreþi sã introduceþi text, pur ºi simplu tastaþi textul dorit.
+Caracterele pe care le puteþi vedea, cum ar fi A, 7, *, etc. sunt
+interpretate de Emacs ca text ºi introduse imediat.  Tastaþi <Return>
+(tasta mai este etichetatã <Enter> uneori) pentru a introduce un
+caracter NEWLINE.
+
+Puteþi ºterge ultimul caracter pe care l-aþi introdus tastând
+<Delete>.  <Delete> este o tastã pe tastaturã etichetatã "Del" sau
+"Delete".  În unele cazuri tasta "Backspace" poate acþiona ca
+<Delete>, dar nu întotdeauna!
+
+Mai general, <Delete> ºterge caracterul dinaintea poziþiei curente a
+cursorului.
+
+>> Executaþi urmãtoarele operaþii acum - tastaþi câteva caractere,
+   apoi ºtergeþi-le tastând <Delete> de câteva ori.  Nu vã temeþi cã
+   veþi schimba acest fiºier; nu veþi altera versiunea principalã a
+   tutorialului.  Aceasta este copia dumneavoastrã personalã.
+
+Când o linie de text devine prea mare pentru a putea fi reprezentatã
+pe o linie de ecran, linia de text este continuatã pe urmãtoarea linie
+de pe ecran.  Un caracter backslash ("\") la marginea din dreapta
+indicã o linie care a fost continuatã.
+
+>> Introduceþi text pânã când depãºiþi cu câteva caractere marginea
+   din dreapta a ecranului.  Veþi observa apariþia liniei de
+   continuare.
+
+>> Folosiþi <Delete>-uri pentru a ºterge textul pânã când linia încape
+   din nou pe o linie de ecran.  Linia de continuare va dispãrea.
+
+Puteþi ºterge un caracter NEWLINE ca pe orice alt caracter.  ªtergerea
+unui NEWLINE dintre douã linii concateneaza cele douã linii.  Dacã
+linia rezultatã este prea lungã pentru a fi afiºatã pe ecran, va fi
+afiºatã cu o linie de continuare.
+
+>> Mutaþi cursorul la începutul unei linii ºi tastaþi <Delete>.
+   Aceasta concateneazã linia curentã cu cea precedentã.
+
+>> Tastaþi <Return> pentru a reintroduce caracterul NEWLINE ºters.
+
+Aºa cum vã reamintiþi, majoritatea comenzilor Emacs pot primi un
+argument numeric ce acþioneazã ca un contor de repetiþie; introducerea
+caracterelor ascultã aceleaºi reguli.  Un argument numeric dat unui
+caracter duce la introducerea caracterului respectiv de numãrul
+specificat de ori.
+
+>>  Încercaþi asta acum - tastaþi C-u 8 * pentru a introduce ********.
+
+Aþi învãþat acum metodele elementare de tastat ºi corectat erori în
+Emacs.  Puteþi de asemenea ºterge cuvinte sau linii.  Acesta este un
+sumar al operaþiilor de ºtergere.
+
+       <Delete>     ºterge caracterul de dinaintea cursorului
+       C-d          ºterge caracterul de dupã cursor
+
+       M-<Delete>   ºterge cuvântul de dinaintea cursorului
+       M-d          ºterge cuvântul de dupã cursor
+
+       C-k          ºterge de la poziþia curentã pânã la sfârºitul
+                    liniei
+       M-k          ºterge de la poziþia curentã pânã la sfârºitul
+                    frazei
+
+De remarcat cã <Delete> ºi C-d versus M-<Delete> ºi M-d extind
+paralela începutã de C-f ºi M-f (<Delete> nu este cu adevãrat un
+caracter bazat pe CONTROL, dar nu o sã ne ocupãm de asta acum).  C-k
+ºi M-k sunt ca C-e ºi M-e, într-un fel, dacã facem o paralelã între
+linii ºi fraze.
+
+Când ºtergeþi mai mult de un caracter la un moment dat, Emacs-ul
+pãstreazã intern textul distrus în aºa fel încât îl puteþi restaura.
+Termenul folosit de Emacs pentru operaþiunea de restaurare a textului
+distrus este "yanking".  Puteþi restaura textul distrus fie în acelaºi
+loc, fie în alt loc în fiºier.  Puteþi de asemenea restaura textul de
+mai multe ori pentru a face mai multe copii.  Comanda de restaurare
+este C-y.
+
+Diferenþa dintre "distrugerea" ºi "ºtergerea" unei porþiuni din text
+este aceea ca porþiunile de text "distruse" pot fi restaurate, în timp
+ce porþiunile de text "ºterse", nu.  În general, comenzile care
+distrug porþiuni semnificative din text, pãstreazã intern textul
+respectiv, în timp ce comenzile care ºterg doar un caracter, linii
+goale sau spaþii, nu fac acest lucru.
+
+>> Mutaþi cursorul la începutul unei linii care nu este goalã.
+   Tastaþi apoi C-k pentru a distruge textul de pe linia respectivã.
+>> Tastaþi C-k o a doua oarã.  Veþi observa distrugerea caracterului
+   NEWLINE de la sfârºitul liniei.
+
+Dupã cum vedeþi, un singur C-k distruge conþinutul liniei, iar un al
+doilea C-k distruge linia însãºi, facând toate celelalte linii sã se
+mute în sus.  C-k trateazã un argument numeric în mod special:
+distruge numãrul specificat de linii ºi conþinutul lor.  Aceastã
+comportare nu este doar o simplã repetiþie.  C-u 2 C-k distruge douã
+linii ºi NEWLINE-urile de dupã ele; tastând C-k de douã ori nu
+obþineþi acelaºi rezultat.
+
+Pentru a extrage ultimul text distrus ºi a-l plasa la poziþia curentã
+a cursorului, tastaþi C-y.
+
+>> Tastaþi C-y pentru a restaura textul distrus anterior.
+
+Gânditi-vã la C-y ca ºi cum aþi recupera ceva ce v-a fost luat.
+Observaþi cã dacã executaþi mai multe C-k-uri la rând, tot textul
+distrus este stocat într-o singurã bucatã, în aºa fel încât un singur
+C-y va restaura toate liniile.
+
+>> Tastaþi acum C-k de câteva ori.
+
+Acum încercaþi sã restauraþi textul distrus:
+
+>> Tastaþi C-y.  Mutaþi apoi cursorul câteva linii mai jos ºi tastaþi
+   C-y din nou.  Veþi vedea cum se copiazã porþiuni de text.
+
+Ce faceþi dacã aveþi porþiuni de text pe care vreþi sã le restauraþi,
+dar între timp distrugeþi o altã porþiune de text?  C-y va restaura
+porþiunea de text care a fost distrusã cel mai recent.  Cu toate
+acestea, textul distrus anterior nu este pierdut.  Puteþi sã-l
+restauraþi folosind comanda M-y.  Dupã ce aþi executat C-y pentru a
+obþine textul cel mai recent distrus, tastând M-y veþi înlocui textul
+ce tocmai a fost restaurat cu textul distrus înaintea lui.  Tastând
+M-y de mai multe ori puteþi obþine porþiuni de text distrus din ce în
+ce mai vechi.  Odatã ajunºi la textul care vã intereseazã, puteþi sã
+continuaþi editarea fãrã sã mai faceþi nimic special, lasând textul
+restaurat în poziþia în care se gãseºte.
+
+Dacã tastaþi M-y de suficient de multe ori, veþi ajunge în cele din
+urmã la punctul de plecare (textul distrus cel mai de curând).
+
+>> Distrugeþi o linie, mutaþi-vã puþin în jurul ei, distrugeþi o altã
+   linie.  Executaþi apoi C-y pentru a obþine înapoi cea de-a doua
+   linie distrusã.  Executaþi apoi M-y ºi veþi constata cã este
+   înlocuitã de prima linie distrusã.  Executaþi mai multe M-y-uri ºi
+   observaþi ce obþineþi.  Continuaþi sã le executaþi pânã când a doua
+   linie apare din nou, etc.  Dacã doriþi, puteþi încerca sã-i daþi
+   comenzii M-y argumente numerice pozitive ºi negative.
+
+
+* ANULARE
+---------
+
+Dacã faceþi o schimbare în text, ºi apoi constataþi cã aþi greºit,
+puteþi anula schimbarea cu comanda de anulare, C-x u.
+
+În mod normal, C-x u anuleazã schimbãrile fãcute de o comandã; dacã
+repetaþi C-x u de câteva ori la rând, fiecare nouã repetiþie anuleazã
+încã o comandã.
+
+Existã însã douã excepþii: comenzile care nu schimbã textul nu sunt
+luate în considerare (acestea includ comenzile de mutat cursorul ºi
+cele de "scrolling"), iar caracterele introduse individual sunt
+tratate în grupuri de maxim 20.  (Motivaþia din spatele acestei
+abordãri este aceea de a reduce numãrul de C-x u-uri pe care trebuie
+sã le tastaþi pentru anularea inserãrilor de text).
+
+>> Distrugeþi linia aceasta cu C-k, apoi tastaþi C-x u; linia ar
+   trebui sã reaparã.
+
+C-_ este o altã comandã de anulare; funcþioneazã exact ca ºi C-x u,
+dar este mai uºor de tastat de mai multe ori la rând.  Dezavantajul
+lui C-_ este cã pe anumite tastaturi nu este clar cum trebuie tastat.
+Din acest motiv existã C-x u.  Pe unele terminale se poate sã tastaþi
+C-_ tastând "/" în timp ce þineþi apãsatã tasta CONTROL.
+
+Un argument numeric la C-_ sau C-x u acþioneazã ca un contor de
+repetiþie.
+
+
+* FIªIERE
+---------
+
+Pentru a face permanente modificãrile din textul pe care îl editaþi,
+trebuie sã-l stocaþi (salvaþi) într-un fiºier.  Altminteri,
+modificãrile se vor pierde în momentul pãrãsirii Emacs-ului.  Puneþi
+textul într-un fiºier "deschizând" (sau "vizitând") fiºierul.
+
+Deschiderea unui fiºier înseamnã cã puteþi vedea conþinutul fiºierului
+în Emacs.  Este ca ºi cum aþi edita chiar fiºierul, singura diferenþã
+fiind aceea cã schimbãrile nu devin permanente pânã când nu îl
+"salvaþi" ("save" în limba englezã).  Se evitã astfel existenþa în
+sistem a unor fiºiere incomplet modificate atunci când nu doriþi acest
+lucru.  Chiar ºi când salvaþi fiºierul, Emacs-ul pãstreazã fiºierul
+iniþial (cu un nume schimbat) în aºa fel încât sã-l puteþi recupera în
+cazul în care decideþi cã modificãrile efectuate au fost greºite.
+
+Aproape de marginea de jos a ecranului veþi observa o linie care
+începe ºi se terminã cu minusuri, ºi conþine ºirul "Emacs:
+TUTORIAL.ro".  Aceastã parte a ecranului aratã întotdeauna numele
+fiºierului pe care îl vizitaþi.  Acum vizitaþi fiºierul "TUTORIAL.ro"
+care este copia dumneavoastrã de încercãri a tutorialului în limba
+românã.  Orice fiºier aþi edita, numele acelui fiºier va apãrea în
+poziþia respectivã.
+
+Comenzile pentru gãsirea ºi salvarea fiºierelor sunt diferite de
+celelalte comenzi pe care le-aþi învãþat, în sensul cã sunt compuse
+din douã caractere.  Amândouã încep cu caracterul C-x.  Existã o
+întreagã serie de comenzi care încep cu C-x; multe dintre ele sunt
+legate de fiºiere, buffere ºi alte lucruri înrudite.  Aceste comenzi
+sunt compuse din douã, trei sau patru caractere.
+
+Comenzii de deschidere a unui fiºier trebuie sã îi spuneþi numele
+fiºierului dorit.  Spunem despre comandã ca "citeºte un argument de la
+terminal" (în acest caz, argumentul este numele fiºierului).  Dupã ce
+tastaþi comanda
+
+       C-x C-f (deschide un fiºier)
+
+Emacs-ul vã va cere sã introduceþi numele fiºierului.  Numele pe care
+îl tastaþi apare pe ultima linie a ecranului.  Aceastã linie se
+numeste "minibuffer" când este folositã pentru acest tip de
+introducere.  Comenzile normale de editare în Emacs pot fi folosite ºi
+pentru editarea numelui fiºierului.
+
+În timp ce introduceþi numele fiºierului (sau orice alt tip de
+introducere de date în minibuffer), puteþi anula comanda cu C-g.
+
+>> Tastaþi C-x C-f, apoi tastaþi C-g.  Aceasta anuleazã minibuffer-ul,
+   ºi, de asemenea, anuleazã comanda C-x C-f care îl folosea.  În
+   concluzie, nu veþi mai deschide nici un fiºier.
+
+Când aþi terminat de introdus numele fiºierului, tastaþi <Return>
+pentru a-l încheia.  Dupã aceasta, comanda C-x C-f începe sã lucreze
+ºi deschide fiºierul pe care l-aþi ales.  Minibuffer-ul dispare când
+comanda C-x C-f se terminã.
+
+Dupã câteva momente, conþinutul fiºierului apare pe ecran ºi îl puteþi
+edita.  Când doriti sã faceþi schimbãrile permanente, tastaþi comanda
+
+       C-x C-s (salveazã fiºierul)
+
+Aceasta copiazã textul din Emacs într-un fiºier.  Prima oarã când
+faceþi acest lucru, Emacs-ul redenumeºte fiºierul iniþial în aºa fel
+încât sã nu se piardã.  Noul nume este creat prin adãugarea
+caracterului "~" la numele iniþial.
+
+Când operaþiunea de salvare este terminatã, Emacs-ul afiºeazã numele
+fiºierului salvat.  Se recomandã salvarea la intervale relativ mici,
+pentru a nu pierde prea multã muncã în cazul unei eventuale blocãri a
+sistemului.
+
+>> Tastaþi C-x C-s, pentru a salva copia tutorialului.
+   Aceasta ar trebui sã afiºeze "Wrote ...TUTORIAL.ro" la marginea de
+   jos a ecranului.
+
+OBSERVAÞIE: În unele sisteme, tastarea comenzii C-x C-s va bloca
+ecranul ºi nu veþi mai primi nici un de rãspuns din partea Emacs-ului.
+Aceasta indicã faptul cã o facilitate a sistemului de operare numitã
+"controlul fluxului" ("flow control" în limba englezã) intercepteazã
+C-s, nelasându-l sã ajungã la Emacs.  Pentru deblocarea ecranului,
+tastaþi C-q.  Puteþi gãsi detalii referitoare la aceastã aºa-numitã
+"facilitate" în secþiunea "Spontaneous Entry to Incremental Search"
+din manualul Emacs-ului.
+
+Puteþi deschide un fiºier existent, pentru a-l vedea sau edita.
+Puteþi de asemenea deschide un fiºier care nu existã.  Aceasta este
+modalitatea în care creaþi noi fiºiere cu Emacs-ul: deschideþi
+fiºierul (care va fi gol iniþial), apoi începeþi sã introduceþi text
+în el.  Când îi veþi cere sã "salveze" fiºierul, Emacs-ul va crea
+fiºierul cu textul pe care l-aþi introdus.  De acum înainte puteþi
+considera cã editaþi un fiºier existent.
+
+
+* BUFFERE
+---------
+
+Dacã deschideþi un al doilea fiºier cu C-x C-f, primul va continua sã
+existe în Emacs.  Puteþi sã vã mutaþi înapoi la el deschizându-l din
+nou cu C-x C-f.  În acest fel puteþi avea un numãr destul de mare de
+fiºiere deschise în Emacs.
+
+>> Creaþi un fiºier numit "foo" tastând C-x C-f foo <Return>.
+   Introduceþi un text oarecare, editaþi-l, apoi salvaþi "foo" tastând
+   C-x C-s.  În cele din urmã, tastaþi C-x C-f TUTORIAL.ro <Return>
+   pentru a vã întoarce la tutorial.
+
+Emacs-ul stocheazã textul fiecãrui fiºier într-un obiect numit
+"buffer".  Deschiderea unui fiºier creeazã un nou buffer în Emacs.
+Pentru a vedea o listã a bufferelor existente în Emacs, tastaþi
+
+       C-x C-b   (lista de buffere)
+
+>> Încercaþi C-x C-b acum.
+
+Observaþi cum fiecare buffer are un nume ºi, uneori, un nume de fiºier
+corespunzãtor fiºierului al cãrui conþinut este menþinut în buffer-ul
+respectiv.  Unele buffere nu corespund nici unui fiºier.  De exemplu,
+buffer-ul numit "*Buffer List*" nu are nici un fiºier asociat.  Este
+buffer-ul care conþine lista de buffere ºi a fost creat de comanda C-x
+C-b.  Orice text pe care îl vedeþi într-o fereastrã a Emacs-ului este
+întotdeauna parte dintr-un buffer.
+
+>> Tastaþi C-x 1 pentru a scãpa de lista de buffere.
+
+Dacã faceþi schimbãri în textul unui fiºier, apoi deschideþi un alt
+fiºier, primul fiºier nu este salvat.  Schimbãrile efectuate rãmân în
+Emacs, în buffer-ul asociat acelui fiºier.  Crearea sau editarea
+buffer-ului celui de-al doilea fiºier nu are nici un efect asupra
+buffer-ului primului fiºier.  Acest lucru este foarte util, dar
+înseamnã cã aveþi nevoie de o modalitate convenabilã de a salva
+buffer-ul primului fiºier.  Ar fi obositor sã fie necesar sã vã mutaþi
+înapoi la el cu C-x C-f pentru a-l putea salva cu C-x C-s.  Din acest
+motiv existã comanda:
+
+       C-x s   salveazã niºte buffere
+
+C-x s vã întreabã despre fiecare buffer care conþine modificãri (ºi
+care nu a fost salvat) dacã doriþi sã-l salvaþi.
+
+>> Introduceþi o linie de text, apoi tastaþi C-x s.
+   Ar trebui sã vã întrebe dacã sã salveze buffer-ul TUTORIAL.ro.
+   Raspundeþi "da" la întrebare tastând "y".
+
+
+* FOLOSIREA MENIULUI
+--------------------
+
+Dacã sunteþi la consola unui terminal X, veþi observa o barã de
+meniuri ("menubar" în limba englezã) la marginea de sus a ferestrei
+Emacs-ului.  Puteþi folosi acest menubar pentru a accesa toate
+comenzile uzuale ale Emacs-ului, cum ar fi "deschide fiºier".
+Probabil cã vi se va pãrea mai uºor la început, pentru cã nu este
+nevoie sã vã amintiþi tastele necesare accesãrii comenzilor.  Odatã
+acomodaþi cu Emacs-ul, va fi uºor sã începeþi sã folosiþi tastatura,
+deoarece fiecare element din meniu, care are o comandã asociatã,
+afiºeazã ºi tastele cu care acea comandã poate fi accesatã.
+
+Existã multe elemente în meniu care nu au nici un echivalent într-o
+secvenþã de taste.  De exemplu, meniul Buffers listeazã toate
+buffer-ele existente în ordinea celei mai recente folosiri.  Puteþi sã
+vã mutaþi la orice buffer gãsindu-i ºi selectându-i numele în meniul
+Buffers.
+
+
+* FOLOSIREA MOUSE-ului
+----------------------
+
+Când ruleazã sub X, Emacs-ul oferã suport integrat pentru mouse.
+Puteþi poziþiona cursorul în text apãsând butonul stâng deasupra
+poziþiei dorite; puteþi selecta text trãgând mouse-ul peste porþiunea
+doritã, în timp ce butonul stâng este apãsat.  O metodã alternativã
+este sã apãsaþi butonul stâng al mouse-ului deasupra uneia dintre
+extremitãþile porþiunii de text dorite, apoi sã vã mutaþi la cealaltã
+extremitate ºi sã apãsaþi butonul stâng, þinând tasta SHIFT apãsatã
+pentru a selecta textul.
+
+Ca sã distrugeþi textul selectat, puteþi folosi C-w sau "Cut" în meniu
+de editare ("Edit").  Existã însã o diferenþã între cele douã
+modalitãþi.  C-w nu face decât sã distrugã textul (pãstrând o copie
+internã), în timp ce "Cut" face acelaºi lucru, dar pune textul ºi în
+clipboard-ul X-ului, de unde poate fi accesat de cãtre alte aplicaþii.
+
+Dacã vreþi sã extrageþi textul din clipboard-ul X-ului, folosiþi
+"Paste" in meniul "Edit".
+
+Butonul din mijloc al mouse-ului este folosit pentru a alege elemente
+care sunt vizibile pe ecran.  De exemplu, dacã intraþi în Info
+(documentaþia Emacs-ului) folosind C-h i sau meniul "Help", puteþi
+selecta o legaturã pusã în evidenþã apãsând butonul din mijloc al
+mouse-ului deasupra ei.  În mod analog, dacã introduceþi un nume de
+fiºier (de exemplu când deschideþi un fiºier cu "Find File") ºi
+tastaþi TAB pentru a obþine completãrile posibile, puteþi apãsa
+butonul din mijloc al mouse-ului pe una din completãri, pentru a o
+selecta.
+
+Butonul din dreapta al mouse-ului invocã un meniu popup.  Conþinutul
+acestui meniu variazã în funcþie de modul de editare curent ºi, în mod
+normal, conþine câteva comenzi uzuale, pentru a le face mai uºor
+accesibile.
+
+>> Apãsaþi butonul din dreapta al mouse-ului acum.
+
+Va trebui sã þineþi butonul apãsat pentru a menþine meniul vizibil.
+
+
+* EXTINDEREA SETULUI DE COMENZI
+-------------------------------
+
+Existã mult mai multe comenzi Emacs decât combinaþii de taste bazate
+pe CONTROL ºi META.  Soluþia în Emacs este folosirea comenzilor
+eXtinse.  Acestea sunt de douã feluri:
+
+       C-x     eXtinde un caracter; urmatã de un caracter
+       M-x     eXtinde un nume; urmatã de un nume lung
+
+Acestea sunt comenzi care sunt utile în general, dar folosite mai rar
+decât comenzile despre care aþi învãþat pânã acum.  Aþi vãzut deja
+douã dintre ele: comanda de deschis fiºiere (C-x C-f) ºi comanda de
+salvat fiºiere (C-x C-s).  Un alt exemplu este comanda de pãrãsit
+Emacs-ul: C-x C-c.  (Nu vã temeþi cã veþi pierde schimbãri fãcute în
+fiºiere; înainte de a termina sesiunea curentã Emacs, C-x C-c vã va
+întreba dacã doriþi sã salvaþi fiºierele modificate.)
+
+C-z este comanda cu care puteþi ieºi din Emacs *temporar* - astfel
+încât sã puteþi sã vã întoarceþi la aceeaºi sesiune Emacs mai târziu.
+
+Pe sistemele unde este posibil, C-z "suspendã" Emacs-ul; asta înseamnã
+cã, deºi vã veþi întoarce la prompt-ul shell-ului, Emacs-ul nu a fost
+distrus.  În shell-urile (interpretoarele de comenzi Unix) cele mai
+uzuale puteþi reactiva Emacs-ul cu comanda `fg' sau `%emacs'.
+
+Pe sistemele care nu implementeazã mecanismele de suspendare, C-z
+creeazã un subshell care ruleazã sub Emacs pentru a vã oferi
+posibilitatea de a rula alte programe ºi de a vã întoarce la Emacs mai
+târziu; pe aceste sisteme C-z nu iese cu adevãrat din Emacs - comanda
+`exit' la promptul subshell-ului este modalitatea uzualã de a vã
+întoarce în Emacs.
+
+În general C-x C-c se foloseºte înainte de pãrãsirea sistemului.
+Puteþi folosi aceastã comandã ºi pentru a ieºi din instanþe de Emacs
+lansate de programe de citit mail sau alte utilitare, deoarece acestea
+s-ar putea sã nu fie capabile sã foloseascã facilitaþile de suspendare
+ale Emacs-ului.  În mod normal însã, dacã nu sunteþi pe cale sã
+pãrãsiþi sistemul, este mai bine sã suspendaþi Emacs-ul cu C-z decât
+sã ieºiþi complet cu C-x C-c.
+
+Emacs-ul are multe comenzi prefixate cu C-x.  Aceasta este lista celor
+pe care le-aþi învãþat pânã acum:
+
+       C-x C-f         deschide un fiºier
+       C-x C-s         salveazã fiºierul
+       C-x C-b         listeazã bufferele
+       C-x C-c         pãrãseºte Emacs-ul
+       C-x u           anuleazã
+
+Comenzile eXtinse cu nume sunt comenzile care sunt folosite ºi mai rar
+sau comenzile care sunt folosite numai în anumite moduri.  Un exemplu
+este comanda replace-string (înlocuieºte-ºir) care înlocuieºte global
+toate apariþiile unui ºir de caractere cu alt ºir de caractere.  Când
+tastaþi M-x, Emacs-ul afiºeazã pe ultima linie de pe ecran "M-x" ºi
+puteþi introduce numele comenzii - în cazul nostru "replace-string".
+Puteþi sã tastaþi doar "repl s<TAB>" ºi Emacs-ul va completa numele.
+Terminaþi comanda cu <Return>.
+
+Comanda replace-string necesitã douã argumente - ºirul ce va fi
+înlocuit ºi ºirul înlocuitor.  La sfârºitul introducerii fiecãrui
+argument trebuie sã tastaþi <Return>.
+
+>> Mutaþi cursorul pe linia goalã care se gãseste douã linii mai jos.
+   Tastaþi apoi M-x repl s<Return>modificat<Return>alterat<Return>.
+
+   Observaþi modul în care aceastã linie s-a modificat: aþi înlocuit
+   toate apariþiile cuvântului s-c-h-i-m-b-a-t cu "alterat", dupã
+   poziþia iniþialã a cursorului.
+
+
+* SALVARE AUTOMATÃ
+------------------
+
+Dacã aþi facut schimbãri într-un fiºier, dar nu le-aþi salvat, aceste
+schimbãri se pot pierde în cazul în care sistemul se blocheazã.
+Pentru a vã proteja munca, Emacs-ul salveazã periodic un fiºier de
+"autosalvare" pentru fiecare fiºier pe care îl editaþi.  Acest fiºier
+are un "#" la început ºi unul la sfârºit; de exemplu, dacã fiºierul
+dumneavoastrã se numeste "hello.c", fiºierul de autosalvare
+corespunzãtor se va numi "#hello.c#".  Când salvaþi fiºierul în mod
+normal, Emacs-ul ºterge fiºierul de autosalvare.
+
+În cazul unei cãderi a sistemului, puteþi sã vã recuperaþi fiºierul de
+autosalvare deschizând fiºierul în mod normal (fiºierul pe care îl
+editaþi, nu pe cel de autosalvare) ºi tastând dupã aceea M-x recover
+file<Return>.  Când vi se cere confirmarea, tastaþi yes<Return> pentru
+a continua ºi a recupera fiºierul.
+
+
+* ZONA DE ECOU
+--------------
+
+Dacã Emacs-ul observã cã tastaþi comenzile încet, vi le va arãta la
+marginea de jos a ecranului într-o zona numitã "zona de ecou".  Zona
+de ecou conþine cea mai de jos linie a ecranului.
+
+
+* LINIA DE MOD
+--------------
+
+Linia de deasupra zonei de ecou se numeºte "linia de mod" ("modeline"
+în limba englezã).  Linia de mod conþine ceva de genul:
+
+--**-XEmacs: TUTORIAL          (Fundamental)--L670--58%----------------
+
+Aceastã linie prezintã informaþii utile despre starea Emacs-ului ºi
+despre textul pe care îl editaþi.
+
+Stiþi deja ce înseamnã numele fiºierului - este fiºierul pe care l-aþi
+deschis.  -NN%-- indicã poziþia curentã a cursorului în text - NN la
+sutã din text este deasupra primei linii de pe ecran.  Dacã începutul
+fiºierului este vizibil pe ecran, veþi vedea --Top-- în loc de
+--00%--.  Dacã sfârºitul fiºierului este vizibil pe ecran, veþi vedea
+--Bot-- (de la "bottom" în limba englezã).  Dacã fiºierul este atât de
+mic, încât încape în întregime pe ecran, pe linia de mod veþi vedea
+--All--.
+
+Stelele de la începutul liniei de mod semnalizeazã existenþa unor
+modificãri nesalvate în text.  Imediat dupã deschiderea fiºierului,
+porþiunea respectivã din linia de mod nu conþine nici o stea, doar
+minusuri.
+
+Porþiunea dinãuntrul parantezelor vã spune modul de editare curent.
+Modul implicit este "Fundamental", modul pe care îl folosiþi chiar
+acum.  Este un exemplu de "mod major".
+
+Emacs-ul are multe moduri majore.  Unele dintre ele sunt destinate
+editãrii diferitelor limbaje ºi/sau tipuri de text, cum ar fi modul
+Lisp, modul Text, etc.  Numai un mod major poate fi activ la un moment
+dat ºi numele sãu va fi întotdeauna acolo unde este "Fundamental"
+acum.
+
+Fiecare mod major schimbã comportamentul unor comenzi.  De exemplu
+existã comenzi pentru crearea comentariilor într-un program, dar, cum
+fiecare limbaj de programare are o idee diferitã despre felul cum ar
+trebui sã arate un comentariu, fiecare mod major trebuie sã le
+introducã într-un alt fel.  Existã câte o comandã asociatã fiecãrui
+mod major - aceasta este modalitatea de a schimba modul major.  De
+exemplu, M-x fundamental-mode este comanda cu care poate fi ales modul
+"Fundamental".
+
+Dacã editaþi text în limba românã, cum ar fi de exemplu acest fiºier,
+ar trebui probabil sã folosiþi modul Text.
+
+>> Tastaþi M-x text-mode<Return>.
+
+Nu vã temeti, nici una din comenzile pe care le-aþi învãþat pânã acum
+nu schimbã Emacs-ul prea mult.  Puteþi observa acum cã M-f ºi M-b
+trateazã apostrofurile ca parte din cuvinte.  Înainte, în modul
+Fundamental, M-f ºi M-b tratau apostrofurile ca separatoare de
+cuvinte.
+
+Modurile majore opereazã schimbãri subtile, ca cea descrisã mai sus.
+Majoritatea comenzilor executã aceeaºi operaþie în fiecare mod major,
+dar funcþioneazã puþin diferit.
+
+Pentru a vedea documentaþia referitoare la modul major curent, tastaþi
+C-h m.
+
+>> Folosiþi C-u C-v o datã sau de mai multe ori pentru a aduce aceastã
+   linie aproape de începutul ecranului.  Tastaþi C-h m ca sã aflaþi
+   diferenþele dintre modul Text ºi modul Fundamental.  Tastaþi q
+   pentru a ºterge documentaþia de pe ecran.
+
+Modurile majore se numesc "majore" pentru cã existã ºi moduri minore.
+Modurile minore sunt ajustãri minore ale modurilor majore.  Fiecare
+mod minor poate fi activat sau dezactivat separat, independent de
+celelalte moduri minore ºi independent de modul major curent.  Puteþi
+sã nu folosiþi nici un mod minor, un mod minor sau orice combinaþie de
+moduri minore.
+
+Un mod minor care este foarte util, în mod special când editaþi text,
+este modul "Auto Fill".  Când acest mod este activat, Emacs-ul sparge
+automat liniile la spaþiul dintre cuvinte de fiecare datã când
+introducând text creaþi o linie care este prea lungã.
+
+Puteþi activa modul "Auto Fill" executând M-x auto-fill-mode<Return>.
+Când acest mod este activat, îl puteþi dezactiva executând aceeaºi
+comandã.  Dacã modul este dezactivat, aceastã comandã îl activeazã,
+când este activat, comanda îl dezactiveazã.  Se spune cã aceastã
+comandã inverseazã modul.
+
+>> Tastaþi M-x auto-fill-mode<Return> acum.  Introduceþi apoi o linie
+   conþinând "asdf " de mai multe ori, pânã când linia se sparge în
+   douã.  Trebuie sã puneþi spaþii între cuvinte pentru cã Auto Fill
+   sparge linia numai la spaþii.
+
+Marginea este stabilitã în mod normal la 70 de caractere, dar puteþi
+schimba aceastã valoare cu comanda C-x f.  Introduceþi valoarea doritã
+ca argument numeric pentru C-x f.
+
+>> Tastaþi C-x f cu 20 ca argument numeric.  (C-u 2 0 C-x f).
+   Introduceþi apoi un text oarecare ºi observaþi cum Emacs-ul umple
+   linii de maximum 20 de caractere.  Restauraþi marginea la 70 de
+   caractere folosind din nou C-x f.
+
+Dacã faceþi schimbãri în mijlocul unui paragraf, modul Auto Fill nu
+rearanjeazã paragraful.  Pentru a face acest lucru, trebuie sã tastaþi
+M-q (META-q) cu cursorul poziþionat înãuntrul paragrafului.
+
+>> Mutaþi cursorul în paragraful precedent ºi tastaþi M-q.
+
+
+* CÃUTARE
+---------
+
+Emacs-ul poate cautã ºiruri (grupuri continue de caractere sau
+cuvinte) fie înainte, fie înapoi (faþã de poziþia curentã a cursorului
+în text).  Cãutarea unui ºir este o operaþie ce mutã cursorul;
+cursorul este mutat în poziþia corespunzãtoare urmãtoarei apariþii a
+ºirului în text.
+
+Cãutarea este diferitã în Emacs faþã de majoritatea editoarelor,
+deoarece este "incrementalã".  Asta înseamnã cã execuþia operaþiunii
+de cãutare se face în timp ce tastaþi ºirul de cãutat.
+
+Comanda ce iniþiazã cãutarea este C-s pentru cãutare înainte ºi C-r
+pentru cãutare înapoi.  AªTEPTAÞI!  Nu le încercaþi acum.
+
+Când tastaþi C-s veþi remarca faptul cã ºirul "I-search" apare ca
+prompt în zona de ecou.  Aceasta vã spune cã Emacs-ul este în modul de
+cãutare incrementalã, aºteptând ca dumneavoastrã sã introduceþi ºirul
+pe care doriþi sã-l cãutaþi.  Cãutarea poate fi terminatã cu <Return>.
+
+>> Tastaþi acum C-s pentru a porni o cãutare.  ÎNCET, câte o singurã
+   literã la un moment dat, tastaþi cuvântul "cursor", fãcând o pauzã
+   dupã fiecare caracter tastat ca sã observaþi ce se întamplã cu
+   cursorul.  Acum aþi terminat de cãutat prima apariþie a cuvântului
+   "cursor".
+>> Tastaþi C-s din nou, pentru a cãuta urmãtoarea apariþie a
+   cuvântului "cursor".
+>> Tastaþi acum <Delete> de patru ori ºi observaþi miºcarea
+   cursorului.
+>> Tastaþi <Return> pentru a termina cãutarea.
+
+Aþi observat ce s-a întamplat?  În timpul unei cãutãri incrementale
+Emacs-ul încearcã sã se poziþioneze pe prima apariþie a ºirului pe
+care l-aþi introdus pânã în momentul respectiv, punându-o în evidenþã
+pentru ca sã o puteþi identifica mai uºor.  Dacã vreþi sã vã
+poziþionaþi pe urmãtoarea apariþie a cuvântului "cursor", nu trebuie
+decât sã tastaþi C-s încã o datã.  Dacã nu mai existã o altã apariþie,
+Emacs-ul va emite un sunet ºi vã va anunþa cã operaþiunea de cãutare a
+eºuat ("failing" în limba englezã).  C-g este o altã metodã de a
+termina cãutarea.
+
+OBSERVAÞIE: Pe unele sisteme, C-s va bloca ecranul ºi nu veþi mai
+primi nici un rãspuns de la Emacs.  Aceasta indicã faptul cã o
+"facilitate" a sistemului de operare numitã "controlul fluxului"
+("flow control" în limba englezã) intercepteazã caracterul C-s ºi
+acesta nu mai ajunge la Emacs.  Pentru deblocarea ecranului, apãsaþi
+C-q.  Puteþi gãsi detalii referitoare la aceastã aºa-numitã
+"facilitate" în secþiunea "Spontaneous Entry to Incremental Search"
+din manualul Emacs-ului.
+
+Dacã sunteþi în mijlocul unei cãutãri incrementale ºi tastaþi
+<Delete>, veþi observa cã ultimul caracter în cãutarea incrementalã
+este ºters ºi cãutarea se întoarce la poziþia anterioarã.  De exemplu,
+sã presupunem cã aþi tastat "c", pentru a cãuta prima apariþie a lui
+"c".  Dacã tastaþi "u", cursorul se va muta la prima apariþie a lui
+"cu".  Tastaþi acum <Delete>.  Aceasta va ºterge "u"-ul din ºirul de
+cãutare ºi cursorul se va muta înapoi la prima apariþie a lui "c".
+
+Cãutarea incrementalã poate fi terminatã prin tastarea unui caracter
+bazat pe CONTROL sau META (cu câteva excepþii - caracterele care sunt
+specifice cãutãrii, cum ar fi C-s ºi C-r).
+
+C-s începe o cãutare care inspecteazã textul de DUPàpoziþia curentã a
+cursorului.  Dacã doriþi sã cãutaþi în textul dinaintea poziþiei
+curente a cursorului, folosiþi C-r.  Toatã discuþia referitoare la C-s
+se aplicã ºi comenzii C-r, cu menþiunea cã direcþia de cãutare este
+inversã.
+
+
+* FERESTRE MULTIPLE
+-------------------
+
+Una dintre facilitãþile importante ale Emacs-ului este aceea de a
+afiºa pe ecran mai multe ferestre simultan.
+
+>> Mutaþi cursorul pe aceastã linie ºi tastaþi C-u 0 C-l.
+
+>> Tastaþi acum C-x 2 pentru a împãrþi ecranul în douã ferestre.
+   Amândouã ferestrele vor afiºa acest tutorial.  Cursorul va rãmane
+   în fereastra din partea de sus a ecranului.
+
+>> Tastaþi C-M-v pentru a miºca textul din fereastra de jos.
+   (Dacã nu aveþi o tastã META, tastaþi ESC C-v.)
+
+>> Tastaþi C-x o ("o" de la "other" - "cealaltã" în limba
+   englezã) pentru a muta cursorul în fereastra de jos.
+
+>> Tastaþi C-v ºi M-v în fereastra de jos pentru a muta textul.
+   Continuaþi sã citiþi aceste instrucþiuni în fereastra de sus.
+
+>> Tastaþi C-x o din nou pentru a muta cursorul înapoi în fereastra de
+   sus.  Cursorul va fi plasat în locul unde a fost anterior.
+
+Puteþi continua sã folosiþi C-x o pentru a vã muta între ferestre.
+Fiecare fereastrã are propria ei poziþie a cursorului, dar numai o
+fereastrã aratã cursorul la un moment dat.  Toate operaþiile normale
+de editare au efect în fereastra în care se gãseºte cursorul -
+fereastra respectivã se numeºte "fereastra selectatã".
+
+Comanda C-M-v este foarte utilã când editaþi text într-o fereastrã ºi
+folosiþi cealaltã fereastrã pentru a citi documentaþii.  Puteþi þine
+întotdeauna cursorul în fereastra în care editaþi, în timp ce avansaþi
+textul din cealaltã fereastrã cu C-M-v.
+
+C-M-v este un exemplu de caracter CONTROL-META.  Dacã aveþi o tastã
+META, puteþi tasta C-M-v þinând apãsate ºi CONTROL ºi META când
+tastaþi v.  Nu conteazã care dintre CONTROL sau META este apãsatã mai
+întâi, pentru cã amândouã acþioneazã prin modificarea caracterului pe
+care îl tastaþi.
+
+Dacã nu aveþi o tastã META ºi folosiþi ESC în loc, ordinea este
+importantã: trebuie sã tastaþi ESC urmat de CONTROL-v; CONTROL-ESC v
+nu va funcþiona, din cauza faptului cã ESC este un caracter de sine
+stãtãtor, nu un modificator.
+
+>> Tastaþi C-x 1 (în fereastra de sus) ca sã renunþaþi la fereastra
+   de jos.
+
+(Dacã aþi tastat C-x 1 în fereastra de jos, aceastã comandã va închide
+fereastra de sus.  Gândiþi-vã la ea aºa "Pãstreazã doar o fereastrã -
+cea în care sunt acum.")
+
+Nu este nevoie sã afisaþi acelaºi buffer în ambele ferestre.  Dacã
+folosiþi C-x C-f pentru a deschide un fiºier într-o fereastrã,
+cealaltã fereastrã nu se schimbã.  Puteþi deschide un fiºier diferit
+în fiecare fereastrã.
+
+O altã modalitate de a folosi douã ferestre ca sã afiºaþi lucruri
+diferite:
+
+>> Tastaþi C-x 4 C-f apoi numele unui fiºier.  Terminaþi comanda
+   cu <Return>  Observaþi cã fiºierul specificat apare în fereastra de
+   jos.  Cursorul la fel.
+
+>> Tastaþi C-x o pentru a vã muta în fereastra de sus, apoi tastaþi
+   C-x 1 pentru a ºterge fereastra de jos.
+
+
+* NIVELURI DE EDITARE RECURSIVÃ
+-------------------------------
+
+Uneori veþi intra în ceea ce se numeste un "nivel de editare
+recursivã".  Acesta este indicat de prezenþa unor paranteze drepte în
+linia de mod în jurul numelui modului major.  De exemplu, s-ar putea
+sã vedeþi [(Fundamental)] în loc de (Fundamental).
+
+Pentru a ieºi din nivelul de editare recursivã, tastaþi ESC ESC ESC.
+Aceasta este o comandã de ieºire de uz general.  O puteþi folosi ºi ca
+sã ieºiþi din minibuffer sau ca sã eliminaþi ferestrele în plus.
+
+>> Tastaþi M-x pentru a intra în minibuffer; tastaþi apoi ESC ESC ESC
+   ca sã ieºiþi.
+
+Nu puteþi folosi C-g pentru a ieºi dintr-un nivel de editare recursivã
+deoarece comanda C-g este folositã pentru a anula comenzi ºi argumente
+înãuntrul unui nivel de editare recursivã.
+
+
+* CUM PUTEÞI OBÞINE MAI MULTE INFORMAÞII
+----------------------------------------
+
+În acest tutorial am încercat sã furnizãm suficiente informaþii pentru
+a face primii paºi în Emacs.  Existã atât de multe comenzi în Emacs
+încât ar fi imposibil sã le explicãm pe toate aici.  S-ar putea însã
+sã doriþi sã învaþaþi mai multe despre Emacs, deoarece oferã foarte
+multe facilitaþi interesante.  Existã comenzi pentru a citi
+documentaþia despre comenzile Emacs-ului.  Aceste comenzi ajutãtoare
+sunt prefixate cu caracterul C-h, denumit ºi "caracterul de ajutor".
+
+Pentru a folosi aceste facilitãþi de ajutor, tastaþi caracterul C-h,
+apoi un caracter ce specificã tipul de ajutor de care aveþi nevoie.
+În cazul în care sunteþi nelãmurit, tastaþi C-h ? ºi Emacs-ul vã va
+spune ce fel de ajutor vã poate oferi.  Dacã aþi tastat C-h ºi vã
+rãzgândiþi (nu mai doriþi ajutor) puteþi tasta C-g pentru a anula
+comanda.
+
+(Anumite site-uri remapeazã caracterul C-h.  Nu ar trebui sã facã asta
+orbeºte pentru toþi utilizatorii - aveþi motiv sã vã plângeþi
+administratorului de sistem.  Între timp, dacã C-h nu afiºeazã un
+mesaj despre ajutor la marginea de jos a ecranului, încercaþi M-x
+help<Return> în loc.)
+
+Comanda elementarã de ajutor este C-h c.  Tastaþi C-h, apoi caracterul
+c ºi o comandã alcãtuitã dintr-un caracter sau secvenþã de caractere
+ºi Emacs-ul va afiºa o scurtã descriere a comenzii.
+
+>> Tastaþi C-h c C-p.
+
+Mesajul ar trebui sã fie ceva de genul
+
+       C-p runs the command previous-line
+
+Aceasta vã spune "numele funcþiei".  Numele de funcþii sunt folosite
+în principal pentru a adapta ºi extinde Emacs-ul, dar, cum numele
+funcþiilor sunt alese în aºa fel încât sã indice actiunea comenzii
+respective, ele pot servi ca o documentaþie foarte scurtã, suficientã
+ca sã vã aminteascã de comenzi pe care le-aþi învãþat deja.
+
+Comenzile formate din mai multe caractere (cum ar fi C-x C-s) ºi (dacã
+nu aveþi o tasta META, EDIT sau ALT) <ESC> v sunt de asemenea permise
+dupã C-h c.
+
+Pentru a obþine mai multe informaþii despre o comandã, folosiþi C-h k
+în loc de C-h c.
+
+>> Tastaþi C-h k C-p.
+
+Aceastã comandã afiºeazã documentaþia ºi numele funcþiei într-o
+fereastrã separatã.  Când terminaþi de citit, tastaþi q pentru a
+o elimina.
+
+Câteva comenzi C-h utile:
+
+   C-h f       descrie o funcþie al cãrei nume trebuie sã-l
+               introduceþi
+
+>> Încercaþi sã tastaþi C-h f previous-line<Return>.
+   Aceasta afiºeazã toatã informaþia pe care o are Emacs-ul despre
+   funcþia ce implementeazã comanda C-p.
+
+   C-h a       Hyper Apropos.  Tastaþi un cuvânt cheie ºi Emacs-ul va
+               lista toate funcþiile ºi variabilele ale cãror nume
+               conþin acel cuvânt cheie.  La stânga comenzilor care
+               pot fi invocate cu M-x va fi afiºatã o steluþã.
+
+>> Tastaþi C-h a newline<Return>.
+
+Aceasta afiºeazã lista tuturor funcþiilor ºi variabilelor al cãror
+nume conþine "newline".  Tastaþi <Return> sau apãsaþi butonul din
+mijloc al mouse-ului, pentru a afla mai multe despre o funcþie sau
+variabilã.  Tastaþi q ca sã ieºiþi din hyper-apropos.
+
+
+* CONCLUZII
+-----------
+
+Þineþi minte, pentru a ieºi permanent din Emacs, folosiþi C-x C-c.
+Pentru a ieºi temporar într-un shell (în aºa fel încât sã vã puteþi
+întoarce la Emacs mai târziu) folosiþi C-z.  (sub X, aceastã comandã
+minimizeaza frame-ul curent al Emacs-ului.)
+
+Acest tutorial a fost organizat în aºa fel încât sã fie pe înþelesul
+noilor utilizatori - nu vã sfiiþi sã vã plângeþi autorilor dacã gasiþi
+ceva neclar!
+
+
+COPIERE
+-------
+
+Acest tutorial este rezultatul prelucrãrii unei serii lungi de
+tutoriale pentru Emacs derivate din cel scris de Stuart Cracraft
+pentru versiunea iniþialã de Emacs.  Ben Wing a adaptat tutorialul
+pentru X Windows.  Martin Buchholz ºi Hrvoje Niksic au adãugat
+corecþii pentru XEmacs.
+
+Cu scopul evitãrii oricãror confuzii datorate traducerii, las în
+continuare noþita de copyright originalã în limba englezã.
+
+This version of the tutorial, like GNU Emacs, is copyrighted, and
+comes with permission to distribute copies on certain conditions:
+
+Copyright (c) 1985, 1996 Free Software Foundation
+
+   Permission is granted to anyone to make or distribute verbatim copies
+   of this document as received, in any medium, provided that the
+   copyright notice and permission notice are preserved,
+   and that the distributor grants the recipient permission
+   for further redistribution as permitted by this notice.
+
+   Permission is granted to distribute modified versions
+   of this document, or of portions of it,
+   under the above conditions, provided also that they
+   carry prominent notices stating who last altered them.
+
+Condiþiile de copiere a Emacs-ului sunt mai complexe, dar în acelaºi
+spirit.  Citiþi fiºierul COPYING ºi apoi distribuiþi prietenilor copii
+ale Emacs-ului.  Contribuiþi la eliminarea obstrucþionismului software
+folosind, scriind ºi distribuind free software!
diff --git a/etc/TUTORIAL.ru b/etc/TUTORIAL.ru
new file mode 100644 (file)
index 0000000..49b17ff
--- /dev/null
@@ -0,0 +1,1082 @@
+Copyright (c) 1985, 1996 Free Software Foundation, Inc. See end for conditions.
+
+÷Ù ÞÉÔÁÅÔÅ ÕÞÅÂÎÉË Emacs.
+
+äÌÑ ÕÐÒÁ×ÌÅÎÉÑ Emacs ÏÂÙÞÎÏ ÉÓÐÏÌØÚÕÅÔÓÑ ËÌÁ×ÉÛÁ CONTROL (ÉÎÏÇÄÁ ÏÔÍÅÞÁÅÍÁÑ ËÁË
+CTRL ÉÌÉ CTL) ÉÌÉ ËÌÁ×ÉÛÁ META.  îÁ ÎÅËÏÔÏÒÙÈ ËÌÁ×ÉÁÔÕÒÁÈ, ËÌÁ×ÉÛÁ META
+ÏÔÍÅÞÅÎÁ ALT ÉÌÉ EDIT ÉÌÉ ËÁË-ÎÉÂÕÄØ ÅÝÅ (ÎÁÐÒÉÍÅÒ, ÎÁ ËÌÁ×ÉÁÔÕÒÁÈ Sun,
+"the diamond key" ÓÌÅ×Á ÏÔ ÐÒÏÂÅÌÁ É ÅÓÔØ META). åÓÌÉ Õ ×ÁÓ ÎÅÔ ËÌÁ×ÉÛÉ
+META, ×Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ESC ×ÍÅÓÔÏ ÎÅÅ. äÁÌÅÅ ×ÍÅÓÔÏ META ÉÌÉ 
+CONTROL ËÁÖÄÙÊ ÒÁÚ ÍÙ ÂÕÄÅÍ ÉÓÐÏÌØÚÏ×ÁÔØ ÐÒÅÆÉËÓÎÙÊ ÓÉÍ×ÏÌ × ÓÌÅÄÕÀÝÉÈ
+ÓÏËÒÁÝÅÎÉÑÈ:
+
+ C-<chr>  ÓÌÅÄÕÅÔ ÕÄÅÒÖÉ×ÁÔØ ËÌÁ×ÉÛÕ CONTROL ÐÏËÁ ÎÁÂÉÒÁÅÔÓÑ ÓÉÍ×ÏÌ <chr>
+         ôÁË, C-f ÄÏÌÖÎÏ ÏÚÎÁÞÁÔØ: ÎÁÖÁÔØ ËÌÁ×ÉÛÕ CONTROL É f.
+ M-<chr>  ÓÌÅÄÕÅÔ ÕÄÅÒÖÉ×ÁÔØ ËÌÁ×ÉÛÕ META ÐÏËÁ ÎÁÂÉÒÁÅÔÓÑ ÓÉÍ×ÏÌ <chr>.
+          åÓÌÉ ÔÁËÏ×ÏÊ ÎÅÔ, ÎÁÖÍÉÔÅ <ESC>, ÏÔÐÕÓÔÉÔÅ ÅÅ, ÐÏÔÏÍ ÓÉÍ×ÏÌ <chr>.
+
+÷ÁÖÎÏÅ ÚÁÍÅÞÁÎÉÅ: ÄÌÑ ÚÁ×ÅÒÛÅÎÉÑ ÓÅÁÎÓÁ Emacs, ÎÁÂÅÒÉÔÅ C-x C-c.  (ä×Á 
+ÓÉÍ×ÏÌÁ). óÉÍ×ÏÌÙ ">>" Ó ÌÅ×ÏÊ ÓÔÏÒÏÎÙ ÕËÁÚÙ×ÁÀÔ, ÞÔÏ ×ÁÍ ÎÕÖÎÏ ÄÅÌÁÔØ,
+ÞÔÏ ÐÒÉÍÅÎÉÔØ ËÏÍÁÎÄÕ.  îÁÐÒÉÍÅÒ:
+
+>> ôÅÐÅÒØ ÎÁÖÍÉÔÅ C-v (ðÒÏÓÍÏÔÒ ÓÌÅÄÕÀÝÅÇÏ ÜËÒÁÎÁ) ÄÌÑ ÐÅÒÅÍÅÝÅÎÉÑ ÎÁ
+   ÓÌÅÄÕÀÝÉÊ ÜËÒÁÎ. (ÉÄÉÔÅ ×ÐÅÒÅÄ, ÕÄÅÒÖÉ×ÁÑ ËÌÁ×ÉÛÕ Control ÎÁÖÉÍÁÑ v).
+   ôÅÐÅÒØ ×Ù ÄÏÌÖÎÙ ÜÔÏ ÓÄÅÌÁÔØ ÅÝÅ ÒÁÚ, ËÏÇÄÁ ÚÁËÏÎÞÉÔÅ ÞÉÔÁÔØ ÜËÒÁÎ.
+
+ïÂÒÁÔÉÔÅ ×ÎÉÍÁÎÉÅ ÎÁ ÔÏ, ÞÔÏ, ÐÏËÁ ×Ù Ä×ÉÖÅÔÅÓØ Ó ÜËÒÁÎÁ ÎÁ ÜËÒÁÎ,
+ÐÅÒÅËÒÙ×ÁÀÔÓÑ Ä×Å ÓÔÒÏÞËÉ; ÜÔÏ ÏÂÅÓÐÅÞÉ×ÁÅÔ ÎÅËÏÔÏÒÕÀ ÎÅÐÒÅÒÙ×ÎÏÓÔØ, ÔÁËÉÍ
+ÏÂÒÁÚÏÍ ×Ù ÍÏÖÅÔÅ ÐÒÏÄÏÌÖÁÔØ ÞÉÔÁÔØ ÔÅËÓÔ.
+
+ðÅÒ×ÏÅ ÞÔÏ ×ÁÍ ÎÅÏÂÈÏÄÉÍÏ ÚÎÁÔØ - ËÁË ÐÅÒÅÄ×ÉÇÁÔØÓÑ ÐÏ ÔÅËÓÔÕ ÉÚ ÏÄÎÏÇÏ ÍÅÓÔÁ
+× ÄÒÕÇÏÅ. ÷Ù ÕÖÅ ÚÎÁÅÔÅ, ËÁË ÐÅÒÅÄ×ÉÎÕÔØ ×ÐÅÒÅÄ ÏÄÉΠÜËÒÁÎ, ÉÓÐÏÌØÚÕÑ C-v.
+äÌÑ ÐÅÒÅÍÅÝÅÎÉÑ ÎÁÚÁÄ ÏÄÎÏÇÏ ÜËÒÁÎÁ, ÎÁÖÍÉÔÅ M-v (ÕÄÅÒÖÉ×ÁÊÔÅ ËÌÁ×ÉÛÕ META
+É ÎÁÂÅÒÉÔÅ v, ÉÌÉ ÎÁÖÍÉÔÅ <ESC>v ÅÓÌÉ Õ ×ÁÓ ÎÅÔ ËÌÁ×ÉÛÕ META, EDIT, ÉÌÉ ALT).
+
+>>  ÐÏÐÒÏÂÕÊÔÅ ÎÁÂÒÁÔØ M-v É ÐÏÔÏÍ C-v, ÎÅÓËÏÌØËÏ ÒÁÚ.
+
+
+* ëòáôëï
+---------
+
+óÌÅÄÕÀÝÉÅ ËÏÍÁÎÄÙ ÉÓÐÏÌØÚÕÀÔÓÑ ÄÌÑ ÐÒÏÓÍÏÔÒÁ:
+
+       C-v     ðÅÒÅÊÔÉ ÎÁ ÏÄÉΠÜËÒÁΠ×ÐÅÒÅÄ
+       M-v     ðÅÒÅÊÔÉ ÎÁ ÏÄÉΠÜËÒÁΠÎÁÚÁÄ
+       C-l     ïÞÉÓÔÉÔØ ÜËÒÁΠɠÏÔÏÂÒÁÚÉÔØ ×ÓÅ ÚÁÎÏ×Ï, ÒÁÚÍÅÓÔÉ×
+                ÔÅËÓÔ, ÎÁÈÏÄÑÝÉÊÓÑ ×ÏÚÌÅ ËÕÒÓÏÒÁ, × ÃÅÎÔÒÅ ÜËÒÁÎÁ.
+                (üÔÏ control-L, ÎÅ control-1.)
+
+>> îÁÊÄÉÔÅ ËÕÒÓÏÒ, É ÚÁÐÏÍÎÉÔÅ ÔÅËÓÔ ×ÏÚÌÅ ÎÅÇÏ.
+   ðÏÔÏÍ ÎÁÖÍÉÔÅ C-l.
+   îÁÊÄÉÔÅ ËÕÒÓÏÒ ÓÎÏ×Á É ÕÂÅÄÉÔÅÓØ, ÞÔÏ ×ÏÚÌÅ ÎÅÇÏ ×ÓÅ ÔÏÔ ÖÅ ÔÅËÓÔ.
+
+
+* âáúï÷ïå õðòá÷ìåîéå ëõòóïòïí
+-----------------------------
+
+ä×ÉÖÅÎÉÅ ÏÔ ÜËÒÁÎÁ Ë ÜËÒÁÎÕ ÕÄÏÂÎÏ, ÎÏ ËÁË  ÐÅÒÅÍÅÓÔÉÔØÓÑ × 
+ÏÐÒÅÄÅÌÅÎÎÏÅ ÍÅÓÔÏ ÐÏ ÔÅËÓÔÕ ÎÁ ÜËÒÁÎÅ? 
+
+åÓÔØ ÎÁÓËÏÌØËÏ ÐÕÔÅÊ, ÞÔÏÂÙ ÓÄÅÌÁÔØ ÜÔÏ. ïÓÎÏ×ÎÏÊ ÐÕÔØ - ÉÓÐÏÌØÚÏ×ÁÔØ ËÏÍÁÎÄÙ
+C-p, C-b, C-f, É C-n.  ëÁÖÄÁÑ ÉÚ ÜÔÉÈ ËÏÍÁÎÄ ÐÅÒÅÄ×ÉÇÁÅÔ ËÕÒÓÏÒ ÎÁ ÏÄÎÕ
+ÓÔÒÏËÕ ÉÌÉ ËÏÌÏÎËÕ ÎÁ ÜËÒÁÎÅ × ÏÐÒÅÄÅÌÅÎÎÏÍ ÎÁÐÒÁ×ÌÅÎÉÉ.  üÔÁ ÔÁÂÌÉÃÁ
+ÐÏËÁÚÙ×ÁÅÔ  ÞÅÔÙÒÅ ËÏÍÁÎÄÙ É ÞÅÔÙÒÅ ÎÁÐÒÁ×ÌÅÎÉÑ Ä×ÉÖÅÎÉÑ:
+                         ðÒÅÄÙÄÕÝÁÑ ÓÔÒÏËÁ, C-p
+                                 :
+                                 :
+         îÁÚÁÄ, C-b .... ôÅËÕÝÁÑ ÐÏÚÉÃÉÑ ËÕÒÓÏÒÁ .... ÷ÐÅÒÅÄ, C-f
+                                 :
+                                 :
+                          óÌÅÄÕÀÝÁÑ ÓÔÒÏËÁ, C-n
+
+>> ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ÎÁ ÓÔÒÏËÕ ÒÑÄÏÍ Ó ÄÉÁÇÒÁÍÍÏÊ, ÉÓÐÏÌØÚÕÑ C-n ÉÌÉ C-p.
+   ðÏÔÏÍ, ÎÁÖÍÉÔÅ C-l É ÐÏÓÍÏÔÒÉÔÅ ËÁË ÄÉÁÇÒÁÍÍÁ ÒÁÚÍÅÓÔÉÔÓÑ × ÃÅÎÔÒÅ ÜËÒÁÎÁ.
+
+÷ÁÍ ÂÕÄÅÔ ÎÅÓÌÏÖÎÏ ÚÁÐÏÍÎÉÔØ ÐÏ ÂÕË×ÁÍ (// ÎÄÁ, ÚÎÁÑ ÁÎÇÌÉÊÓËÉÊ - ÓÏ×ÓÅÍ
+ÌÅÇËÏ ) : P-ÐÒÅÄÙÄÕÝÉÊ (previous), N-ÓÌÅÄÕÀÝÉÊ (next), B-ÎÁÚÁÄ (backward) É
+F-×ÐÅÒÅÄ (forward).  üÔÏ ÏÓÎÏ×ÎÙÅ ËÏÍÁÎÄÙ ÐÏÚÉÃÉÏÎÉÒÏ×ÁÎÉÑ ËÕÒÓÏÒÁ, ËÏÔÏÒÙÍÉ ÷Ù
+ÂÕÄÅÔÅ ÐÏÌØÚÏ×ÁÔØÓÑ ÷óåçäá, ÔÁË ÞÔÏ ÂÕÄÅÔ ÎÅÐÌÏÈÏ ÉÈ ×ÙÕÞÉÔØ.
+
+>> îÁÖÍÉÔÅ ÎÅÓËÏÌØËÏ ÒÁÚ C-n ÞÔÏ ÏÐÕÓÔÉÔØ ËÕÒÓÏÒ ×ÎÉÚ ÎÁ ÜÔÕ ÓÔÒÏËÕ.
+
+>> ðÅÒÅÍÅÓÔÉÔÅÓØ ÐÏ ÓÔÒÏËÅ, ÉÓÐÏÌØÚÕÑ C-f É ÐÏÔÏÍ ÐÏÄÎÉÍÉÔÅÓØ ××ÅÒÈ Ó ÐÏÍÏÝØÀ
+   C-p. ðÏÓÍÏÔÒÉÔÅ, ËÁË ÉÚÍÅÎÉÌÏÓØ ÐÏÌÏÖÅÎÉÅ ËÕÒÓÏÒÁ ÐÒÉ ÎÁÖÁÔÉÉ ó-Ò, ÅÓÌÉ ÏÎ
+   ÎÁÈÏÄÉÌÓÑ × ÓÅÒÅÄÉÎÅ ÓÔÒÏËÉ.
+
+ëÁÖÄÁÑ ÓÔÒÏËÁ ÔÅËÓÔÁ ÚÁ×ÅÒÛÁÅÔÓÑ ÓÉÍ×ÏÌÏÍ îÏ×ÁÑóÔÒÏËÁ (Newline character),
+ËÏÔÏÒÙÊ ÏÔÄÅÌÑÅÔ ÅÅ ÏÔ ÓÌÅÄÕÀÝÅÊ ÓÔÒÏËÉ. ðÏÓÌÅÄÎÑÑ ÓÔÒÏËÁ × ×ÁÛÅÍ ÆÁÊÌÅ
+ÄÏÌÖÎÁ ÂÙ ÔÏÖÅ ÚÁ×ÅÒÛÁÔØÓÑ ÓÉÍ×ÏÌÏÍ îÏ×ÁÑóÔÒÏËÁ (ÎÏ Emacs ÎÅ ÔÒÅÂÕÅÔ ÜÔÏÇÏ).
+
+>> ðÏÐÒÏÂÕÊÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ C-b × ÎÁÞÁÌÅ ÓÔÒÏËÉ. ëÕÒÓÏÒ ÄÏÌÖÅΠÐÅÒÅÍÅÓÔÉÔØÓÑ ÎÁ
+   ËÏÎÅàÐÒÅÄÙÄÕÝÅÊ ÓÔÒÏËÉ. üÔÏ ÐÒÏÉÓÈÏÄÉÔ ÐÏÔÏÍÕ, ÞÔÏ ÏΠÄ×ÉÖÅÔÓÑ ÎÁÚÁÄ ÞÅÒÅÚ
+   ÓÉÍ×ÏÌ îÏ×ÁÑóÔÒÏËÁ.
+
+C-f ÍÏÖÅÔ ÐÅÒÅÍÅÝÁÔØ ËÕÒÓÏÒ ÞÅÒÅÚ îÏ×ÕÀóÔÒÏËÕ ÔÁË ÖÅ, ËÁË É C-b.
+
+>> ðÏÐÒÏÂÕÊÔÅ ÎÅÓËÏÌØËÏ ÒÁÚ ÐÒÉÍÅÎÉÔØ C-b, ÔÁË ÞÔÏÂÙ ÷Ù Õ×ÉÄÅÌÉ, ËÁË Ä×ÉÖÅÔÓÑ
+   ËÕÒÓÏÒ.
+   äÁÌÅÅ ÉÓÐÏÌØÚÕÊÔÅ C-f ÞÔÏÂÙ ×ÅÒÎÕÔØÓÑ ÎÁ ËÏÎÅàÓÔÒÏËÉ.
+   îÁÖÍÉÔÅ C-f ÅÝÅ ÒÁÚ, ÞÔÏÂÙ ÐÅÒÅÊÔÉ Ë ÎÁÞÁÌÕ ÓÌÅÄÕÀÝÅÊ ÓÔÒÏËÉ.
+
+ëÏÇÄÁ ×Ù ÐÅÒÅÍÅÝÁÅÔÅÓØ ÚÁ ×ÅÒÈÎÉÊ ÉÌÉ ÎÉÖÎÉÊ ËÒÁÊ ÜËÒÁÎÁ, ÔÅËÓÔ, ÎÁÈÏÄÑÝÉÊÓÑ
+ÚÁ ÜËÒÁÎÏÍ, ÓÄ×ÉÇÁÅÔÓÑ ×ÎÕÔÒØ ÜËÒÁÎÁ. üÔÏ ÎÁÚÙ×ÁÅÔÓÑ "ÓËÒÏÌÌÉÎÇ". óËÒÏÌÌÉÎÇ
+ÐÏÚ×ÏÌÑÅÔ Emacs`Õ ÐÅÒÅÍÅÝÁÔØ ËÕÒÓÏÒ × ÎÕÖÎÏÅ ÍÅÓÔÏ ÔÅËÓÔÁ ÂÅÚ ÐÅÒÅÍÅÝÅÎÉÑ
+ÅÇÏ ÚÁ ÐÒÅÄÅÌÙ ÜËÒÁÎÁ.
+
+>> ðÏÐÒÏÂÕÊÔÅ ÐÅÒÅÍÅÓÔÉÔØ ËÕÒÓÏÒ ÚÁ ÎÉÖÎÀÀ ÇÒÁÎÉÃÕ ÜËÒÁÎÁ, ÉÓÐÏÌØÚÕÑ C-n,
+   É ÐÏÓÍÏÔÒÉÔÅ, ÞÔÏ ÉÚÍÅÎÉÔÓÑ.
+
+åÓÌÉ ÐÏÓÉÍ×ÏÌØÎÏÅ ÐÅÒÅÍÅÝÅÎÉÅ ÓÌÉÛËÏÍ ÍÅÄÌÅÎÎÏ, ÷Ù ÍÏÖÅÔÅ Ä×ÉÇÁÔØÓÑ ÐÏ
+ÓÌÏ×ÁÍ. M-f (Meta-f) ÐÅÒÅÍÅÝÁÅÔ ×ÐÅÒÅÄ ÎÁ ÓÌÏ×Ï, Á M-b ÎÁÚÁÄ ÎÁ ÓÌÏ×Ï.
+
+>> îÁÖÍÉÔÅ ÎÅÓËÏÌØËÏ ÒÁÚ M-f É M-b.
+
+åÓÌÉ ËÕÒÓÏÒ ÎÁÈ. × ÓÅÒÅÄÉÎÅ ÓÌÏ×Á, M-f ÐÅÒÅÍÅÓÔÉÔ ÅÇÏ × ËÏÎÅàÓÌÏ×Á.
+åÓÌÉ ËÕÒÓÏÒ ÎÁÈ. ÍÅÖÄÕ ÓÌÏ×ÁÍÉ, M-f ÐÅÒÅÍÅÓÔÉÔ ÅÇÏ × ËÏÎÅÃ
+ÓÌÅÄÕÀÝÅÇÏ ÓÌÏ×Á. M-b ÒÁÂÏÔÁÅÔ ÔÏÞÎÏ ÔÁË ÖÅ × ÐÒÏÔÉ×ÏÐÏÌÏÖÎÏÍ ÎÁÐÒÁ×ÌÅÎÉÉ.
+
+>> îÁÖÍÉÔÅ M-f É M-b ÎÅÓËÏÌØËÏ ÒÁÚ, ÐÅÒÅÍÅÖÁÑ Ó C-f É C-b - ÔÁË ×Ù ÓÍÏÖÅÔÅ
+   ÚÁÍÅÔÉÔØ ÄÅÊÓÔ×ÉÑ M-f É M-b ÉÚ ÒÁÚÎÙÈ ÐÏÚÉÃÉÊ × ÓÌÏ×ÁÈ É ÍÅÖÄÕ ÎÉÍÉ.
+
+ïÔÍÅÔØÔÅ ÐÁÒÁÌÌÅÌØ ÍÅÖÄÕ C-f É C-b Ó ÏÄÎÏÊ ÓÔÏÒÏÎÙ, É M-f É M-b Ó ÄÒÕÇÏÊ.
+ïÞÅÎØ ÞÁÓÔÏ Meta-ÓÉÍ×ÏÌÙ ÉÓÐÏÌØÚÕÀÔÓÑ ÄÌÑ ÓÏÏÔ×ÅÔÓÔ×ÕÀÝÉÈ ÏÐÅÒÁÃÉÊ ÎÁÄ
+ÅÄÉÎÉÃÁÍÉ, ÏÐÒÅÄÅÌÅÎÎÙÍÉ × ÑÚÙËÅ (ÓÌÏ×Á, ÐÒÅÄÌÏÖÅÎÉÑ, ÁÂÚÁÃÙ), ËÏÇÄÁ
+Control-ÓÉÍ×ÏÌÙ ÏÐÅÒÉÒÕÀÔ  ÏÓÎÏ×ÎÙÍÉ ÅÄÉÎÉÃÁÍÉ, ÎÅÚÁ×ÉÓÉÍÏ ÏÔ ÔÏÇÏ, ÞÔÏ
+÷Ù ÒÅÄÁËÔÉÒÕÅÔÅ (ÓÉÍ×ÏÌÙ, ÓÔÒÏËÉ, É Ô.Ä.).
+
+üÔÁ ÐÁÒÁÌÌÅÌØ ÓÕÝÅÓÔ×ÕÅÔ ÍÅÖÄÕ ÓÔÒÏËÁÍÉ É ÐÒÅÄÌÏÖÅÎÉÑÍÉ: C-a É C-e ÐÅÒÅÍÅÝÁÅÔ
+ËÕÒÓÏÒ × ÎÁÞÁÌÏ É ËÏÎÅàÓÔÒÏËÉ, Á M-a É M-e ÐÅÒÅÍÅÝÁÅÔ ËÕÒÓÏÒ × ÎÁÞÁÌÏ É
+ËÏÎÅàÐÒÅÄÌÏÖÅÎÉÑ.
+
+>> ðÏÐÒÏÂÕÊÔÅ ÎÁÖÁÔØ ÐÁÒÕ ÒÁÚ C-a, É ÐÏÔÏÍ ÐÁÒÕ ÒÁÚ C-e.
+   ðÏÐÒÏÂÕÊÔÅ ÐÁÒÕ ÒÁÚ ÎÁÖÁÔØ M-a, ÐÏÓÌÅ ÜÔÏÇÏ ÐÁÒÕ ÒÁÚ ÎÁÖÁÔØ M-e.
+
+ðÏÓÍÏÔÒÉÔÅ, ÞÔÏ ÐÏ×ÔÏÒ C-a ÎÉÞÅÇÏ ÎÅ ÉÚÍÅÎÑÅÔ, Á ÐÏ×ÔÏÒ M-a ÐÒÏÄÏÌÖÁÅÔ Ä×ÉÖÅÎÉÅ 
+ËÕÒÓÏÒÁ Ë ÓÌÅÄÕÀÝÅÍÕ ÐÒÅÄÌÏÖÅÎÉÀ. üÔÏ ÎÅ ÓÏÈÒÁÎÑÅÔ ÁÎÁÌÏÇÉÀ, ÎÏ ×ÙÇÌÑÄÉÔ
+ÅÓÔÅÓÔ×ÅÎÎÏ.
+
+ðÏÌÏÖÅÎÉÅ ËÕÒÓÏÒÁ × ÔÅËÓÔÅ ÔÁËÖÅ ÎÁÚÙ×ÁÀÔ "ÔÏÞËÁ". óËÁÖÅÍ ÉÎÁÞÅ: ËÕÒÓÏÒ
+ÐÏËÁÚÙ×ÁÅÔ ÍÅÓÔÏ ÎÁ ÜËÒÁÎÅ × ËÁËÏÊ ÔÏÞËÅ ÂÕÄÅÔ ÒÁÓÐÏÌÏÖÅΠ××ÏÄÉÍÙÊ ÔÅËÓÔ.
+
+úÄÅÓØ ÓÏÂÒÁÎÙ ÐÒÏÓÔÙÅ ËÏÍÁÎÄÙ ÐÅÒÅÍÅÝÅÎÉÑ ËÕÒÓÏÒÁ, ×ËÌÀÞÁÑ Ä×ÉÖÅÎÉÅ ÐÏ ÓÌÏ×ÁÍ
+É ÐÒÅÄÌÏÖÅÎÉÑÍ:
+
+       C-f     îÁ ÓÉÍ×ÏÌ ×ÐÅÒÅÄ
+       C-b     îÁ ÓÉÍ×ÏÌ ÎÁÚÁÄ
+
+       M-f     îÁ ÓÌÏ×Ï ×ÐÅÒÅÄ
+       M-b     îÁ ÓÌÏ×Ï ÎÁÚÁÄ
+
+       C-n     îÁ ÓÌÅÄÕÀÝÕÀ ÓÔÒÏËÕ
+       C-p     îÁ ÐÒÅÄÙÄÕÝÕÀ ÓÔÒÏËÕ
+
+       C-a     ÷ ÎÁÞÁÌÏ ÓÔÒÏËÉ
+       C-e     ÷ ËÏÎÅàÓÔÒÏËÉ
+
+       M-a     îÁÚÁÄ, × ÎÁÞÁÌÏ ÐÒÅÄÌÏÖÅÎÉÑ
+       M-e     ÷ÐÅÒÅÄ, × ËÏÎÅàÐÒÅÄÌÏÖÅÎÉÑ
+
+>> ðÏÐÒÏÂÕÊÔÅ ÓÅÊÞÁÓ ÎÁ ÐÒÁËÔÉËÅ ÐÒÉÍÅÎÉÔØ ÎÅÓËÏÌØËÏ ÒÁÚ ×ÓÅ ÜÔÉ ËÏÍÁÎÄÙ.
+   üÔÏ ÎÁÉÂÏÌÅÅ ÉÓÐÏÌØÚÕÅÍÙÅ ËÏÍÁÎÄÙ.
+
+ä×Å ÄÒÕÇÉÅ ×ÁÖÎÙÅ ËÏÍÁÎÄÙ Ä×ÉÖÅÎÉÑ ËÕÒÓÏÒÁ M-< (Meta Less-then {íÅÎØÛÅ-þÅÍ}),
+ËÏÔÏÒÁÑ ÐÅÒÅÍÅÝÁÅÔ ËÕÒÓÏÒ × ÎÁÞÁÌÏ ÔÅËÓÔÁ, É M-> (Meta Greater-than {âÏÌØÛÅ-þÅÍ}),
+ËÏÔÏÒÁÑ ÐÅÒÅÍÅÝÁÅÔ ËÕÒÓÏÒ × ËÏÎÅàÔÅËÓÔÁ.
+
+îÁ ÂÏÌØÛÉÎÓÔ×Å ÔÅÒÍÉÎÁÌÏ× ÓÉÍ×ÏÌ "<" ÎÁÈÏÄÉÔÓÑ ÎÁÄ ÔÏÞËÏÊ, É ×Ù ÄÏÌÖÎÙ
+ÉÓÐÏÌØÚÏ×ÁÔØ ËÌÁ×ÉÛÕ Shift ÞÔÏ ÎÁÂÒÁÔØ ÅÇÏ. îÁ ÜÔÉÈ ÔÅÒÍÉÎÁÌÁÈ ×Ù ÔÁË ÖÅ
+ÄÏÌÖÎÙ ÉÓÐÏÌØÚÏ×ÁÔØ Shift ÞÔÏ ÎÁÂÒÁÔØ M-<; âÅÚ ÕÄÅÒÖÁÎÉÑ ËÌÁ×ÉÛÉ Shift ×Ù
+ÎÁÂÅÒÅÔÅ M-ÔÏÞËÁ.
+
+>> óÅÊÞÁÓ ÐÏÐÒÏÂÕÊÔÅ M-<, ÞÔÏ ÐÅÒÅÍÅÓÔÉÔØÓÑ × ÎÁÞÁÌÏ ÕÞÅÂÎÉËÁ.
+   ðÏÔÏÍ ÉÓÐÏÌØÚÕÊÔÅ C-v ÞÔÏ ×ÅÒÎÕÔØÓÑ  ÎÁÚÁÄ.
+
+>> óÅÊÞÁÓ ÐÏÐÒÏÂÕÊÔÅ M->, ÞÔÏ ÐÅÒÅÍÅÓÔÉÔØÓÑ Ë ËÏÎÃÕ ÕÞÅÂÎÉËÁ.
+   éÓÐÏÌØÚÕÊÔÅ M-v ÞÔÏ ×ÅÒÎÕÔØÓÑ  ÓÎÏ×Á.
+
+ëÕÒÓÏÒ ÍÏÖÎÏ ÐÅÒÅÍÅÝÁÔØ  ÓÔÒÅÌÏÞËÁÍÉ, ÅÓÌÉ ÷ÁÛ ÔÅÒÍÉÎÁÌ ÉÍÅÅÔ ÉÈ.
+íÙ ÒÅËÏÍÅÎÄÕÅÍ ×ÙÕÞÉÔØ C-b, C-f, C-n É C-p ÐÏ ÔÒÅÍ ÐÒÉÞÉÎÁÍ. ðÅÒ×ÏÅ, ÏÎÉ
+ÒÁÂÏÔÁÀÔ ÎÁ ÌÀÂÙÈ ÔÅÒÍÉÎÁÌÁÈ. ÷ÔÏÒÏÅ, ÏÄÎÁÖÄÙ ÐÏÌÕÞÉ× ÐÒÁËÔÉËÕ ÉÓÐÏÌØÚÏ×ÁÎÉÑ
+Emacs, ×Ù ÐÏÊÍÅÔÅ, ÞÔÏ ÉÓÐÏÌØÚÏ×ÁÔØ CTRL-ÓÉÍ×ÏÌÙ ÕÄÏÂÎÅÅ É ÂÙÓÔÒÅÅ, ÞÅÍ ËÎÏÐËÉ
+ÓÏ ÓÔÒÅÌÏÞËÁÍÉ (ÐÏÔÏÍÕ ÞÔÏ ×Ù ÎÅ ÕÂÉÒÁÅÔÅ ÒÕËÉ Ó ÏÂÙÞÎÏÇÏ ÉÈ ÐÏÌÏÖÅÎÉÑ ÐÒÉ
+ÐÅÞÁÔÉ). ôÒÅÔØÅ, ËÁË ÔÏÌØËÏ ×Ù ÐÒÉ×ÙËÎÉÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ CTRL-ÓÉÍ×ÏÌÙ, ×Ù
+ÓÍÏÖÅÔÅ ÔÁË ÖÅ ÌÅÇËÏ ×ÙÕÞÉÔØ É ÉÓÐÏÌØÚÏ×ÁÔØ ÄÒÕÇÉÅ, ÂÏÌÅÅ ÓÐÅÃÉÁÌØÎÙÅ
+ËÏÍÁÎÄÙ ÐÅÒÅÍÅÝÅÎÉÑ ËÕÒÓÏÒÁ.
+
+âÏÌØÛÉÎÓÔ×Ï ËÏÍÁÎÄ Emacs`Á ÄÏÐÕÓËÁÀÔ ÃÉÆÒÏ×ÏÊ ÁÒÇÕÍÅÎÔ; ÄÌÑ ÂÏÌØÛÉÎÓÔ×Á
+ËÏÍÁÎÄ, ÜÔÏ ÓÌÕÖÉÔ ÓÞÅÔÞÉËÏÍ ÐÏ×ÔÏÒÅÎÉÑ. þÔÏ ÚÁÄÁÔØ ÓÞÅÔÞÉË ÐÏ×ÔÏÒÅÎÉÑ ÄÌÑ
+ËÏÍÁÎÄÙ, ÎÁÖÍÉÔÅ C-u, ÐÏÔÏÍ ÞÉÓÌÏ ÐÏ×ÔÏÒÅÎÉÊ,  ÕËÁÖÉÔÅ ËÏÍÁÎÄÕ.  åÓÌÉ Õ
+×ÁÓ ÅÓÔØ ËÌÁ×ÉÛÁ META (ÉÌÉ EDIT ÉÌÉ ALT), ÅÓÔØ ÄÒÕÇÏÊ ÓÐÏÓÏ ÚÁÄÁÔØ ÃÉÆÒÏ×ÏÊ
+ÁÒÇÕÍÅÎÔ: ÎÁÂÅÒÉÔÅ ÃÉÆÒÙ, ÕÄÅÒÖÉ×ÁÑ ËÎÏÐËÕ META. íÙ ÒÅËÏÍÅÎÄÕÅÍ ÏÓ×ÏÉÔØ
+ÉÓÐÏÌØÚÏ×ÁÎÉÅ C-u, Ô.Ë ÜÔÁ ÐÏÓÌÅÄÏ×ÁÔÅÌØÎÏÓÔØ ËÌÁ×ÉÛ ÒÁÂÏÔÁÅÔ ÎÁ ÌÀÂÏÍ ÔÅÒÍÉÎÁÌÅ.
+
+îÁÐÒÉÍÅÒ, C-u 8 C-f ÐÅÒÅÍÅÓÔÉÔ ËÕÒÓÏÒ ÎÁ ×ÏÓÅÍØ ÓÉÍ×ÏÌÏ× ×ÐÅÒÅÄ.
+       
+>> ðÏÐÒÏÂÕÊÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ C-n ÉÌÉ C-p Ó ÃÉÆÒÏ×ÙÍ ÁÒÇÕÍÅÎÔÏÍ, ÞÔÏÂÙ ÐÅÒÅÍÅÓÔÉÔØ
+   ËÕÒÓÏÒ ÎÁ ÓÔÒÏËÕ ÒÑÄÏÍ Ó ÜÔÏÊ ËÏÍÁÎÄÏÊ.
+
+íÎÏÇÉÅ ËÏÍÁÎÄÙ ÉÓÐÏÌØÚÕÀÔ ÞÉÓÌÏ×ÏÊ ÁÒÇÕÍÅÎÔ ËÁË ÓÞÅÔÞÉË ÐÏ×ÔÏÒÅÎÉÊ. îÏ ÅÓÔØ
+ÉÓËÌÀÞÅÎÉÑ. ôÁËÉÅ ÉÓËÌÀÞÅÎÉÑ - C-v É M-v .
+ðÒÉ ÐÏÌÕÞÅÎÉÉ ÞÉÓÌÏ×ÏÇÏ ÁÒÇÕÍÅÎÔÁ, ÏÎÉ ÓËÒÏÌÌÉÒÕÀÔ ÜËÒÁΠ××ÅÒÈ ÉÌÉ ×ÎÉÚ
+ÎÁ ÕËÁÚÁÎÎÏÅ ÞÉÓÌÏ ÓÔÒÏË, ×ÍÅÓÔÏ ÔÁËÏÇÏ ÖÅ ÞÉÓÌÁ ÜËÒÁÎÏ×. îÁÐÒÉÍÅÒ, C-u 4 C-v
+ÐÒÏËÒÕÔÉÔ ÜËÒÁΠÎÁ 4 ÓÔÒÏËÉ.
+
+>> óÅÊÞÁÓ ÐÏÐÒÏÂÕÊÔÅ ËÏÍÂÉÎÁÃÉÀ C-u 8 C-v.
+
+üÔÁ ËÏÍÁÎÄÁ ÄÏÌÖÎÁ ÐÒÏËÒÕÔÉÔØ ÜËÒÁΠÎÁ 8 ÓÔÒÏË ××ÅÒÈ. åÓÌÉ ×Ù ÈÏÔÉÔÅ
+ÐÒÏËÒÕÔÉÔØ ÅÇÏ ×ÎÉÚ,  ÍÏÖÅÔÅ ÚÁÄÁÔØ ÁÒÇÕÍÅÎÔ ÄÌÑ M-v.
+
+åÓÌÉ ×Ù ÉÓÐÏÌØÚÕÅÔÅ X Window, ×ÅÒÏÑÔÎÏ ÅÓÔØ ÐÒÑÍÏÕÇÏÌØÎÉË ÉÍÅÎÕÅÍÙÊ ÐÏÌÏÓÁ
+ÐÒÏËÒÕÔËÉ (scroll bar) Ó ÓÐÒÁ×ÏÊ ÓÔÏÒÏÎÙ ÏËÎÁ Emacs. ÷Ù ÍÏÖÅÔÅ ÓËÒÏÌÌÉÒÏ×ÁÔØ
+ÔÅËÓÔ, ÍÁÎÉÐÕÌÉÒÕÑ ÍÙÛØÀ.
+
+>> ðÏÐÒÏÂÕÊÔÅ ÎÁÖÁÔØ ÓÒÅÄÎÀÀ ËÎÏÐËÕ ÍÙÛËÉ ××ÅÒÈÕ ÐÏÄÓ×ÅÞÅÎÎÏÊ ÏÂÌÁÓÔÉ
+   ×ÎÕÔÒÉ ÐÏÌÏÓÙ ÐÒÏËÒÕÔËÉ. ôÅËÓÔ ÄÏÌÖÅΠÐÒÏËÒÕÔÉÔØÓÑ ÄÏ ÐÏÚÉÃÉÉ,
+   ÏÐÒÅÄÅÌÅÎÎÏÊ ÔÅÍ, ËÁË ×ÙÓÏËÏ ÉÌÉ ÎÉÚËÏ ×Ù ÎÁÖÍÅÔÅ.
+
+>> ðÅÒÍÅÓÔÉÔÅ ÍÙÛËÕ × ÔÏÞËÕ ÐÏÌÏÓÙ ÐÒÏËÒÕÔËÉ ×ÏÚÌÅ ÔÒÅÔÅÊ ÓÔÒÏËÉ Ó×ÅÒÈÕ 
+   É ÎÁÖÍÉÔÅ ÌÅ×ÕÀ ËÎÏÐËÕ ÐÁÒÕ ÒÁÚ.
+
+
+* õðòá÷ìåîéå ëõòóïòïí îá X-ôåòíéîáìå
+------------------------------------
+
+åÓÌÉ Õ ×ÁÓ X-ÔÅÒÍÉÎÁÌ, ×ÁÍ, ×ÅÒÏÑÔÎÏ, ÐÏËÁÖÅÔÓÑ ÂÏÌÅÅ ÌÅÇËÉÍ ÉÓÐÏÌØÚÏ×ÁÔØ ËÌÁ×ÉÛÉ
+ÎÁ keypad`Å ÄÌÑ ÕÐÒÁ×ÌÅÎÉÑ ËÕÒÓÏÒÏÍ. óÔÒÅÌËÉ ×ÌÅ×Ï, ×ÐÒÁ×Ï, ××ÅÒÈ É ×ÎÉÚ
+ÐÅÒÅÄ×ÉÇÁÀÔ ËÕÒÓÏÒ × ÏÖÉÄÁÅÍÏÍ ÎÁÐÒÁ×ÌÅÎÉÉ; ÏÎÉ ÆÕÎËÃÉÏÎÉÒÕÀÔ ÔÏÞÎÏ ËÁË C-b,
+C-f, C-p, É C-n, ÎÏ ÌÅÇÞÅ × ÎÁÂÏÒÅ É ÚÁÐÏÍÉÎÁÎÉÉ.  ÷Ù ÔÁË ÖÅ ÍÏÖÅÔÅ
+ÉÓÐÏÌØÚÏ×ÁÔØ C-left É C-right ÄÌÑ ÐÅÒÅÄ×ÉÖÅÎÉÑ ÐÏ ÓÌÏ×ÁÍ, É C-up É C-down ÄÌÑ
+ÐÅÒÅÄ×ÉÖÅÎÉÑ ÐÏ ÂÌÏËÁÍ (Ô.Å. ÐÁÒÁÇÒÁÆÁÍ, ÅÓÌÉ ×Ù ÒÅÄÁËÔÉÒÕÅÔÅ ÔÅËÓÔ). åÓÌÉ Õ
+×ÁÓ ÅÓÔØ ËÎÏÐËÁ ÐÏÍÅÞÅÎÎÁÑ HOME (ÉÌÉ BEGIN) É END, ÔÏ ÏÎÉ ÂÕÄÕÔ ÐÅÒÅÍÅÝÁÔØ
+ËÕÒÓÏÒ × ÎÁÞÁÌÏ É ËÏÎÅàÓÔÒÏËÉ, ÓÏÏÔ×ÅÔÓÔ×ÅÎÎÏ, É C-home É C-end ÂÕÄÕÔ
+ÐÅÒÅÍÅÝÁÔØ × ÎÁÞÁÌÏ É ËÏÎÅàÆÁÊÌÁ. åÓÌÉ ÎÁ ×ÁÛÅÊ ËÌÁ×ÉÁÔÕÒÅ ÅÓÔØ ËÎÏÐËÉ PgUp
+É PgDn, ×Ù ÍÏÖÅÔÅ ÉÈ ÉÓÐÏÌØÚÏ×ÁÔØ ÄÌÑ ÐÅÒÅÍÅÝÅÎÉÑ ××ÅÒÈ É ×ÎÉÚ ÐÏÜËÒÁÎÎÏ, ËÁË
+M-v É C-v.
+
+÷ÓÅ ÜÔÉ ËÏÍÁÎÄÙ ÍÏÇÕÔ ÐÏÌÕÞÁÔØ ÃÉÆÒÏ×ÏÊ ÁÒÇÕÍÅÎÔ, ËÁË ÒÁÓÓËÁÚÁÎÏ ×ÙÛÅ.
+÷Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ shortcut ÄÌÑ ××ÏÄÁ ÜÔÏÇÏ ÁÒÇÕÍÅÎÔÁ: ÐÒÏÓÔÏ ÎÁÖÍÉÔÅ
+CONTROL ÉÌÉ META É ÎÁÂÅÒÉÔÅ ÞÉÓÌÏ. îÁÐÒÉÍÅÒ, ÄÌÑ ÐÅÒÅÍÅÝÅÎÉÑ ÎÁ 12 ÓÌÏ×
+×ÐÒÁ×Ï, ÎÁÂÅÒÉÔÅ C-1 C-2 C-right. úÁÐÏÍÎÉÔÅ ÞÔÏ ÔÁË ÏÞÅÎØ ÌÅÇËÏ ÎÁÂÉÒÁÔØ,
+ÐÏÔÏÍÕ ÞÔÏ ×Ù ÎÅ ÏÔÐÕÓËÁÅÔÅ ËÎÏÐËÕ CONTROL ÍÅÖÄÕ ÎÁÖÁÔÉÑÍÉ.
+
+
+* åóìé EMACS úá÷éó 
+------------------
+
+åÓÌÉ Emacs ÐÅÒÅÓÔÁÌ ÒÅÁÇÉÒÏ×ÁÔØ ÎÁ ×ÁÛÉ ËÏÍÁÎÄÙ, ×Ù ÍÏÖÅÔÅ ÏÓÔÁÎÏ×ÉÔØ ÜÔÏ
+ÐÒÏÓÔÏ ÎÁÖÁ× C-g. ÷Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ C-g ÞÔÏ ÏÓÔÁÎÏ×ÉÔØ ËÏÍÁÎÄÕ ËÏÔÏÒÁÑ
+ÓÌÉÛËÏÍ ÄÏÌÇÏ ×ÙÐÏÌÎÑÅÔÓÑ.
+
+÷Ù ÔÁË ÖÅ ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ C-g ÄÌÑ ÏÔÍÅÎÙ ÃÉÆÒÏ×ÏÇÏ ÁÒÇÕÍÅÎÔÁ ÉÌÉ ÎÁÞÁÔÏÊ
+ËÏÍÁÎÄÙ ËÏÔÏÒÕÀ ×Ù ÎÅ ÈÏÔÉÔÅ ÚÁ×ÅÒÛÁÔØ.
+
+>> îÁÂÅÒÉÔÅ C-u 100 ÄÌÑ ÚÁÄÁÎÉÑ ÁÒÇÕÍÅÎÔÁ 100, ÐÏÔÏÍ ÎÁÖÍÉÔÅ C-g.
+   ôÅÐÅÒØ ÎÁÖÍÉÔÅ C-f. ëÕÒÓÏÒ ÄÏÌÖÅΠÐÅÒÅÍÅÓÔÉÔØÓÑ ×ÓÅÇÏ ÎÁ ÏÄÉΠÓÉÍ×ÏÌ,
+   ÐÏÔÏÍÕ ÞÔÏ ×Ù ÏÔÍÅÎÉÌÉ ÁÒÇÕÍÅÎÔ ÎÁÖÁÔÉÅÍ C-g.
+
+åÓÌÉ ×Ù ÎÁÖÁÌÉ <ESC> ÐÏ ÏÛÉÂËÅ, ×Ù ÔÁË ÖÅ ÍÏÖÅÔÅ ÉÚÂÁ×ÉÔØÓÑ ÏÔ ÜÔÏÇÏ ÎÁÖÁÔÉÅÍ
+C-g.
+
+
+* ÷ùëìàþåîîùå ëïíáîäù (DISABLED COMMANDS)
+-----------------------------------------
+
+îÅËÏÔÏÒÙÅ ËÏÍÁÎÄÙ Emacs "×ÙËÌÀÞÅÎÙ" ÔÁË ËÁË ÎÁÞÉÎÁÀÝÉÅ ÐÏÌØÚÏ×ÁÔÅÌÉ ÍÏÇÕÔ ÉÈ
+ÉÓÐÏÌØÚÏ×ÁÔØ ÓÌÕÞÁÊÎÏ.
+
+åÓÌÉ ×Ù ÎÁÂÒÁÌÉ ÏÄÎÕ ÉÚ ×ÙËÌÀÞÅÎÎÙÈ ËÏÍÁÎÄ, Emacs ÐÏËÁÖÅÔ ÓÏÏÂÝÅÎÉÅ ÇÏ×ÏÒÑÝÅÅ
+ËÁËÁÑ ËÏÍÁÎÄÁ ×ÙÚÙ×ÁÅÔÓÑ, É ÓÐÒÏÓÉÔ, ÈÏÔÉÔÅ ÌÉ ×Ù ÐÒÏÄÏÌÖÉÔØ É ×ÙÐÏÌÎÉÔØ
+ËÏÍÁÎÄÕ.
+
+åÓÌÉ ×Ù ÄÅÊÓÔ×ÉÔÅÌØÎÏ ÈÏÔÉÔÅ ÐÏÐÒÏÂÏ×ÁÔØ ËÏÍÁÎÄÕ, ÎÁÖÍÉÔÅ ðÒÏÂÅÌ (Space) ×
+ÏÔ×ÅÔ ÎÁ ÜÔÏÔ ×ÏÐÒÏÓ. ïÂÙÞÎÏ, ÅÓÌÉ ×Ù ÎÅ ÈÏÔÉÔÅ ×ÙÐÏÌÎÑÔØ ×ÙËÌÀÞÅÎÎÕÀ
+ËÏÍÁÎÄÕ, ÏÔ×ÅÞÁÊÔÅ ÎÁ ×ÏÐÒÏÓ "n".
+
+>> îÁÖÍÉÔÅ `C-x n p' (×ÙËÌÀÞÅÎÎÁÑ ËÏÍÁÎÄÁ), ÐÏÔÏÍ ÏÔ×ÅÔØÔÅ "n" ÎÁ ×ÏÐÒÏÓ.
+
+
+* ïëîá
+------
+
+Emacs ÍÏÖÅÔ ÉÍÅÔØ ÎÅÓËÏÌØËÏ ÏËÏÎ, ËÁÖÄÏÅ ÏÔÏÂÒÁÖÁÅÔ Ó×ÏÊ ÔÅËÓÔ.
+úÁÍÅÔØÔÅ, "ÏËÎÏ" ÉÓÐÏÌØÚÕÅÍÏÅ Emacs`ÏÍ ÜÔÏ ÎÅ ÏÔÄÅÌØÎÙÅ ÐÅÒÅËÒÙ×ÁÀÝÅÅÓÑ
+ÏËÎÁ × ÏËÏÎÎÏÊ ÓÉÓÔÅÍÙ, ÜÔÏ ÏÔÄÅÌØÎÙÅ ÏÂÌÁÓÔÉ × ÏÄÎÏÍ ÏËÎÅ X window.
+(Emacs ÔÁË ÖÅ ÍÏÖÅÔ ÉÍÅÔØ ÎÅÓËÏÌØËÏ ÏËÏΠX windows, ÉÌÉ "ËÁÄÒÏ×" ("frames")
+× ÔÅÒÍÉÎÏÌÏÇÉÉ Emacs. üÔÏ ÂÕÄÅÔ ÏÐÉÓÁÎÏ ÐÏÚÖÅ.)
+
+îÁ ÜÔÏÊ ÓÔÁÄÉÉ ÌÕÞÛÅ ÎÅ ÐÏÇÒÕÖÁÔØÓÑ × ÔÅÈÎÏÌÏÇÉÀ ÉÓÐÏÌØÚÏ×ÁÎÉÑ ÍÎÏÖÅÓÔ×Á
+ÏËÏÎ. îÏ ×ÁÍ ÎÕÖÎÏ ÚÎÁÔØ, ËÁË ÉÚÂÁ×ÌÑÔØÓÑ ÏÔ ÌÉÛÎÉÈ ÏËÏÎ, ËÏÔÏÒÙÅ ÍÏÇÕÔ
+ÐÏÑ×ÌÑÔØÓÑ ÞÔÏ ÏÔÏÂÒÁÚÉÔØ ÐÏÍÏÝØ, ÉÌÉ ×Ù×ÏÄ ÏÐÒÅÄÅÌÅÎÎÙÈ ËÏÍÁÎÄ.  üÔÏ
+ÐÒÏÓÔÏ:
+
+       C-x 1   ïÄÎÏ ÏËÎÏ. (ÚÁËÒÙÔØ ×ÓÅ ÄÒÕÇÉÅ ÏËÎÁ).
+
+üÔÏ Control-x ÓÏ ÓÌÅÄÕÀÝÅÊ ÃÉÆÒÏÊ 1. C-x 1 ÒÁÚ×ÅÒÎÅÔ ÏËÎÏ ËÏÔÏÒÏÅ ÓÏÄÅÒÖÉÔ
+ËÕÒÓÏÒ, ÔÁË, ÞÔÏ ÏÎÏ ÚÁÎÑÌÏ ×ÅÓØ ÜËÒÁÎ. üÔÏ ÕÄÁÌÉÔ ×ÓÅ ÄÒÕÇÉÅ ÏËÎÁ.
+
+>> ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ÎÁ ÜÔÕ ÓÔÒÏËÕ É ÎÁÖÍÉÔÅ C-u 0 C-l.
+
+(úÁÐÏÍÎÉÔÅ ÞÔÏ C-l ÐÅÒÅÒÉÓÏ×Ù×ÁÅÔ ÜËÒÁÎ. åÓÌÉ ×Ù ÚÁÄÁÅÔÅ ÃÉÆÒÏ×ÏÊ
+ÁÒÇÕÍÅÎÔ ÄÌÑ ÜÔÏÊ ËÏÍÁÎÄÙ, ÜÔÏ ÚÎÁÞÉÔ "ÐÅÒÅÒÉÓÏ×ÁÔØ ÜËÒÁΠɠÐÏÍÅÓÔÉÔØ
+ÔÅËÕÝÕÀ ÓÔÒÏËÕ ÎÁ ÓÔÏÌØËÏ-ÔÏ ÓÔÒÏË ÏÔ ÎÁÞÁÌÁ ÜËÒÁÎÁ." ôÁË C-u 0 C-l
+ÏÚÎÁÞÁÅÔ "ÐÅÒÅÒÉÓÏ×ÁÔØ ÜËÒÁÎ, ÐÏÍÅÓÔÉÔØ ÔÅËÕÝÕÀ ÓÔÒÏËÕ × ÎÁÞÁÌÅ.")
+
+>> îÁÂÅÒÉÔÅ Control-x 2
+   ðÏÓÍÏÔÒÉÔÅ, ËÁË ÔÅËÕÝÅÅ ÏËÎÏ ÓÏÖÍÅÔÓÑ, ËÏÇÄÁ ÎÏ×ÏÅ ÐÏÑ×ÉÔÓÑ É
+   ÏÔÏÂÒÁÚÉÔ ÓÏÄÅÒÖÉÍÏÅ ÜÔÏÇÏ ÂÕÆÅÒÁ.
+
+>> îÁÂÅÒÉÔÅ C-x 1 É ÐÏÓÍÏÔÒÉÔÅ ËÁË ÏËÎÏ ÉÓÞÅÚÎÅÔ.
+
+
+* ÷óôá÷ëá é õäáìåîéå
+--------------------
+
+åÓÌÉ ×Ù ÈÏÔÉÔÅ ×ÓÔÁ×ÉÔØ ÔÅËÓÔ, ÐÒÏÓÔÏ ÎÁÂÅÒÉÔÅ ÔÅËÓÔ. óÉÍ×ÏÌÙ, ËÏÔÏÒÙÅ ×Ù
+ÍÏÖÅÔÅ ×ÉÄÅÔØ, ÔÁËÉÅ ËÁË A, 7, *, É ÐÒ. ÐÏÎÉÍÁÀÔÓÑ Emacs`ÏÍ ËÁË ÔÅËÓÔ É
+×ÓÔÁ×ÌÑÀÔÓÑ ÎÅÍÅÄÌÅÎÎÏ. îÁÖÍÉÔÅ <Return> (ËÎÏÐËÁ ÐÅÒÅ×ÏÄÁ ËÁÒÅÔËÉ) ÄÌÑ
+×ÓÔÁ×ËÉ ÓÉÍ×ÏÌÁ îÏ×ÁÑóÔÒÏËÁ.
+
+÷Ù ÍÏÖÅÔÅ ÕÄÁÌÉÔØ ÐÏÓÌÅÄÎÉÊ ÎÁÂÒÁÎÎÙÊ ÓÉÍ×ÏÌ ÎÁÖÉÍÁÑ <Delete>.
+ëÌÁ×ÉÛÁ <Delete> ÎÁ ËÌÁ×ÉÁÔÕÒÅ ÍÏÖÅÔ ÂÙÔØ ÏÂÏÚÎÁÞÅÎÁ ËÁË "Del".
+÷ ÎÅËÏÔÏÒÙÈ ÓÌÕÞÁÑÈ, ËÌÁ×ÉÛÅ "Backspace" ÒÁÂÏÔÁÅÔ ËÁË <Delete>,
+ÎÏ ÎÅ ×ÓÅÇÄÁ!
+
+÷ ÏÓÎÏ×ÎÏÍ, <Delete> ÕÄÁÌÑÅÔ ÓÉÍ×ÏÌ ÎÅÐÏÓÒÅÄÓÔ×ÅÎÎÏ ÐÅÒÅÄ ÔÅËÕÝÅÊ ÐÏÚÉÃÉÅÊ
+ËÕÒÓÏÒÁ.
+
+>> ðÏÐÒÏÂÕÊÔÅ ÜÔÏ ÓÅÊÞÁÓ -- ÎÁÂÅÒÉÔÅ ÎÅÓËÏÌØËÏ ÓÉÍ×ÏÌÏ×, ÐÏÔÏÍ ÕÄÁÌÉÔÅ ÉÈ
+   ÎÁÖÉÍÁÑ <Delete> ÎÅÓËÏÌØËÏ ÒÁÚ. îÅ ×ÏÌÎÕÊÔÅÓØ Ï ÉÚÍÅÎÅÎÉÑÈ ÜÔÏÇÏ ÆÁÊÌÁ;
+   ×Ù ÎÅ ÉÚÍÅÎÑÅÔÅ ÇÌÁ×ÎÙÊ ÕÞÅÂÎÉË. üÔÏ ×ÁÛÁ ÌÉÞÎÁÑ ËÏÐÉÑ ÕÞÅÂÎÉËÁ.
+
+ëÏÇÄÁ ÓÔÒÏËÁ ÔÅËÓÔÁ ÓÔÁÎÏ×ÉÔÓÑ ÓÌÉÛËÏÍ ÂÏÌØÛÏÊ ÄÌÑ ÓÔÒÏËÉ ÜËÒÁÎÁ, ÓÔÒÏËÁ
+ÔÅËÓÔÁ "ÐÒÏÄÏÌÖÁÅÔÓÑ" ÎÁ ÓÌÅÄÕÀÝÅÊ ÓÔÒÏËÅ ÜËÒÁÎÁ. óÉÍ×ÏÌ "ÏÂÒÁÔÎÏÅ ÄÅÌÅÎÉÅ"
+("\") Ó ÐÒÁ×ÏÊ ÇÒÁÎÉÃÙ ÐÏËÁÚÙ×ÁÅÔ, ÞÔÏ ÓÔÒÏËÁ ÂÕÄÅÔ ÐÒÏÄÏÌÖÅÎÁ.
+
+>> ÷ÓÔÁ×ÌÑÊÔÅ ÔÅËÓÔ, ÐÏËÁ ÎÅ ÄÏÓÔÉÇÎÉÔÅ ÐÒÁ×ÏÊ ÇÒÁÎÉÃÙ, É ÐÒÏÄÏÌÖÁÊÔÅ ×ÓÔÁ×ËÕ.
+   ÷Ù Õ×ÉÄÉÔÅ, ËÁË ÐÏÑ×ÉÔÓÑ ÓÉÍ×ÏÌ ÐÒÏÄÏÌÖÅÎÉÑ ÓÔÒÏËÉ.
+
+>> éÓÐÏÌØÚÕÊÔÅ <Delete> ÄÌÑ ÕÄÁÌÅÎÉÑ ÔÅËÓÔÁ, ÐÏËÁ ÓÔÒÏËÁ ÎÅ ÐÏÍÅÓÔÉÔÓÑ ×
+   ÜËÒÁΠÓÎÏ×Á. óÉÍ×ÏÌ ÐÒÏÄÏÌÖÅÎÉÑ ÓÔÒÏËÉ ÉÓÞÅÚÎÅÔ.
+
+íÏÖÎÏ ÕÄÁÌÑÔØ ÓÉÍ×ÏÌ îÏ×ÁÑóÔÒÏËÁ ÔÁË ÖÅ, ËÁË É ÌÀÂÏÊ ÄÒÕÇÏÊ. õÄÁÌÅÎÉÅ ÓÉÍ×ÏÌÁ
+îÏ×ÁÑóÔÒÏËÁ ÍÅÖÄÕ Ä×ÕÍÑ ÓÔÒÏËÁÍÉ ÐÒÉ×ÅÄÅÔ Ë ÓËÌÅÊËÅ ÉÈ × ÏÄÎÕ. åÓÌÉ
+ÒÅÚÕÌØÔÉÒÕÀÝÁÑ ÓÔÒÏËÁ ÓÌÉÛËÏÍ ÄÌÉÎÎÁÑ, ÞÔÏÂÙ ×ÍÅÓÔÉÔØÓÑ × ÜËÒÁÎ, ÏÎÁ ÂÕÄÅÔ
+ÏÔÏÂÒÁÖÅÎÁ ËÁË ÐÒÏÄÏÌÖÅÎÎÁÑ ÓÔÒÏËÁ.
+
+>> ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ × ÎÁÞÁÌÏ ÓÔÒÏËÉ É ÎÁÖÍÉÔÅ <Delete>. üÔÏ ÓÏÅÄÉÎÉÔ
+   ÔÅËÕÝÕÀ ÓÔÒÏËÕ É ÐÒÅÄÙÄÕÝÕÀ.
+
+>> îÁÖÍÉÔÅ <Return> ÄÌÑ ×ÓÔÁ×ËÉ ÓÉÍ×ÏÌÁ îÏ×ÁÑóÔÒÏËÁ ÓÎÏ×Á, ×ÍÅÓÔÏ 
+   ÕÄÁÌÅÎÎÏÇÏ ×ÁÍÉ.
+
+ðÏÍÎÉÔÅ, ÞÔÏ ÍÎÏÇÉÅ ËÏÍÁÎÄÙ Emacs ÍÏÇÕÔ ÐÏÌÕÞÁÔØ ÓÞÅÔÞÉË ÐÏ×ÔÏÒÅÎÉÑ;
+ÐÒÏÓÔÙÅ ÓÉÍ×ÏÌÙ ÎÅ ÉÓËÌÀÞÅÎÉÅ. îÅÂÅÒÁÊÔÅ ÐÒÏÓÔÙÅ ÓÉÍ×ÏÌÙ ×ÓÔÁ×ÌÑÑ
+ÉÈ ÐÏ ÎÅÓËÏÌØËÏ ÚÁ ÏÄÉΠÒÁÚ.
+
+>> ðÏÐÒÏÂÕÊÔÅ ÜÔÏ -- ÎÁÂÅÒÉÔÅ C-u 8 * ÄÌÑ ×ÓÔÁ×ËÉ ********.
+
+ôÅÐÅÒØ ×Ù ÎÁÕÞÉÌÉÓØ ÏÓÎÏ×ÎÏÍÕ ÓÐÏÓÏÂÕ ÎÁÂÒÉÔØ ÞÔÏ-ÎÉÂÕÄØ × Emacs É
+ÉÓÐÒÁ×ÌÑÔØ ÏÛÉÂËÉ. ôÁË ÖÅ ×Ù ÍÏÖÅÔÅ ÕÄÁÌÑÔØ ÓÌÏ×Á É ÓÔÒÏËÉ.
+úÄÅÓØ ÓÏÂÒÁÎÙ ÏÐÅÒÁÃÉÉ ÕÄÁÌÅÎÉÑ:
+
+       <Delete>     ÕÄÁÌÉÔØ ÓÉÍ×ÏÌ ÐÅÒÅÄ ËÕÒÓÏÒÏÍ
+       C-d          ÕÄÁÌÉÔØ ÓÉÍ×ÏÌ ÓÌÅÄÕÀÝÉÊ ÚÁ (ÎÁÄ) ËÕÒÓÏÒÏÍ
+
+       M-<Delete>   õÂÉÔØ ÓÔÒÏËÕ ÎÅÐÏÓÒÅÄÓÔ×ÅÎÎÏ ÐÅÒÅÄ ËÕÒÓÏÒÏÍ
+       M-d          õÂÉÔØ ÓÌÏ×Ï ÓÌÅÄÕÀÝÅÅ ÚÁ ËÕÒÓÏÒÏÍ
+
+       C-k          õÂÉÔØ ×ÓÅ ÏÔ ËÕÒÓÏÒÁ ÄÏ ËÏÎÃÁ ÓÔÒÏËÉ
+       M-k          õÂÉÔØ ×ÓÅ ÄÏ ËÏÎÃÁ ÐÒÅÄÌÏÖÅÎÉÑ
+
+úÁÍÅÔØÔÅ, ÞÔÏ <Delete> É C-d ÐÒÏÔÉ× M-<Delete> É M-d ÒÁÓÛÉÒÑÀÔ ÐÁÒÁÌÌÅÌØ
+ÎÁÞÁÔÕÀ, C-f É M-f (ÄÁ, <Delete> ÜÔÏ ÎÅ ÒÅÁÌØÎÙÊ control-ÓÉÍ×ÏÌ, ÎÏ
+ÎÅ ÎÕÖÎÏ ×ÏÌÎÏ×ÁÔØÓÑ Ï ÜÔÏÍ). C-k É M-k ËÁË É C-e É M-e, ÐÒÏ×ÏÄÑÔ
+ÐÁÒÁÌÌÅÌØ ÍÅÖÄÕ ÓÔÒÏËÁÍÉ É ÐÒÅÄÌÏÖÅÎÉÑÍÉ.
+
+ëÏÇÄÁ ×Ù ÕÄÁÌÑÅÔÅ ÂÏÌÅÅ ÞÅÍ ÏÄÉΠÓÉÍ×ÏÌ ÓÒÁÚÕ, Emacs ÓÏÈÒÁÎÑÅÔ ÕÄÁÌÅÎÎÙÊ
+ÔÅËÓÔ, ÞÔÏÂÙ ×Ù ÍÏÇÌÉ ×ÅÒÎÕÔØ ÅÇÏ ÏÂÒÁÔÎÏ. ÷ÏÚ×ÒÁÔ ÔÅËÓÔÁ, ÕÄÁÌÅÎÎÏÇÏ ÒÁÎÅÅ,
+ÎÁÚÙ×ÁÀÔ "×ÏÓÓÔÁÎÏ×ÌÅÎÉÅ" ("yanking"). ÷Ù ÍÏÖÅÔÅ ×ÏÓÓÔÁÎÏ×ÉÔØ ÕÄÁÌÅÎÎÙÊ
+ÔÅËÓÔ × ÔÏÍ ÖÅ ÍÅÓÔÅ, ÉÌÉ × ÌÀÂÏÍ ÄÒÕÇÏÍ. ÷Ù ÍÏÖÅÔÅ ×ÏÓÓÔÁÎÏ×ÉÔØ
+ÔÅËÓÔ ÎÅÓËÏÌØËÏ ÒÁÚ É ÐÏÌÕÞÉÔØ ÍÎÏÇÏ ËÏÐÉÊ. ëÏÍÁÎÄÁ "×ÏÓÓÔÁÎÏ×ÉÔØ" - C-y.
+
+úÁÍÅÔØÔÅ, ÞÔÏ ÅÓÔØ ÒÁÚÎÉÃÁ ÍÅÖÄÕ "ÕÄÁÌÉÔØ" É "ÕÂÉÔØ" ÞÔÏ-ÎÉÂÕÄØ. "õÂÉÔÏÅ"
+ÍÏÖÅÔ ÂÙÔØ ×ÏÓÓÔÁÎÏ×ÌÅÎÏ ÎÁÚÁÄ, Á ÕÄÁÌÅÎÎÏÅ - ÎÅÔ. ïÂÙÞÎÏ, ËÏÍÁÎÄÙ, ËÏÔÏÒÙÅ 
+ÍÏÇÕÔ ÕÂÉÒÁÔØ ÍÎÏÇÏ ÔÅËÓÔÁ, ÓÏÈÒÁÎÑÀÔ ÅÇÏ, Á ËÏÍÁÎÄÙ, ÕÄÁÌÑÀÝÉÅ ÏÄÉΠÓÉÍ×ÏÌ
+ÉÌÉ ÐÒÏÓÔÏ ÐÕÓÔÕÀ ÓÔÒÏËÕ, ÎÅ ÓÏÈÒÁÎÑÀÔ ÕÄÁÌÅÎÎÏÅ.
+
+>> ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ÎÁ ÎÁÞÁÌÏ ÎÅÐÕÓÔÏÊ ÓÔÒÏËÉ.
+   ôÅÐÅÒØ ÎÁÖÍÉÔÅ C-k ÞÔÏ ÕÂÉÔØ ÔÅËÓÔ × ÜÔÏÊ ÓÔÒÏËÅ.
+
+>> îÁÖÍÉÔÅ C-k ÅÝÅ ÒÁÚ.  ÷Ù ×ÉÄÉÔÅ, ÞÔÏ ÜÔÏ ÕÂßÅÔ ÓÉÍ×ÏÌ îÏ×ÁÑóÔÒÏËÁ
+   ÓÌÅÄÕÀÝÉÊ ÚÁ ÜÔÏÊ ÓÔÒÏËÏÊ.
+
+úÁÍÅÔØÔÅ ÞÔÏ ÐÅÒ×ÏÅ C-k ÕÂÉ×ÁÅÔ ÓÏÄÅÒÖÉÍÏÅ ÓÔÒÏËÉ, Á ×ÔÏÒÏÅ C-k ÕÂÉ×ÁÅÔ
+ÓÁÍÕ ÓÔÒÏËÕ É ÐÏÄÎÉÍÁÅÔ ÄÒÕÇÉÅ ÓÔÒÏËÉ ××ÅÒÈ. C-k ÏÂÒÁÂÁÔÙ×ÁÅÔ ÞÉÓÌÏ×ÏÊ
+ÁÒÇÕÍÅÎÔ ÓÐÅÃÉÁÌØÎÙÍ ÏÂÒÁÚÏÍ: ÕÂÉ×ÁÅÔ ÍÎÏÇÏ ÓÔÒÏË _é_ ÉÈ ÓÏÄÅÒÖÉÍÏÅ.
+ÜÔÏ ÎÅ ÐÒÏÓÔÏ ÐÏ×ÔÏÒÅÎÉÅ. C-u 2 C-k ÕÂ`ÅÔ Ä×Å ÓÔÒÏÉ É ÚÁ×ÅÒÛÁÀÝÉÅ ÉÈ
+ÓÉÍ×ÏÌÙ îÏ×ÁÑóÔÒÏËÁ; ÷×ÏÄ C-k Ä×ÁÖÄÙ ÎÅ ÓÄÅÌÁÅÔ ÜÔÏÇÏ.
+
+äÌÑ ÔÏÇÏ ÞÔÏ ×ÅÒÎÕÔØ ÐÏÓÌÅÄÎÉÊ ÕÂÉÔÙÊ ÔÅËÓÔ × ÍÅÓÔÏ ÒÁÓÐÏÌÏÖÅÎÉÅ ËÕÒÓÏÒÁ
+ÎÁÂÅÒÉÔÅ C-y.
+
+>> ðÏÐÒÏÂÕÊÔÅ ÜÔÏ; ÎÁÂÅÒÉÔÅ C-y ÞÔÏ ×ÅÒÎÕÔØ ÔÅËÓÔ ÎÁÚÁÄ.
+
+äÕÍÁÊÔÅ Ï C-y ËÁË Ï ÓÐÏÓÏÂÅ ×ÅÒÎÕÔØ ÞÔÏ-ÔÏ ÎÁÚÁÄ, ÞÔÏ ×Ù ÐÏÔÅÒÑÌÉ.
+ðÏÍÎÉÔÅ, ÅÓÌÉ ×Ù ÉÓÐÏÌØÚÏ×ÁÌÉ ÎÅÓËÏÌØËÏ C-k' × ÓÔÒÏËÅ, ×ÓÅ ÕÂÉÔÙÅ ÓÔÒÏËÉ 
+ÂÕÄÕÔ ÓÏÈÒÁÎÅÎÙ ×ÍÅÓÔÅ, ÔÁË, ÞÔÏ C-y ×ÏÓÓÔÁÎÏ×ÉÔ ÉÈ ×ÍÅÓÔÅ.
+
+>> ðÏÐÒÏÂÕÊÔÅ ÜÔÏ ÓÅÊÞÁÓ, ÎÁÖÍÉÔÅ C-k ÎÅÓËÏÌØËÏ ÒÁÚ.
+
+ôÅÐÅÒØ ×ÅÒÎÅÍ ÜÔÏÔ ÕÂÉÔÙÊ ÔÅËÓÔ:
+
+>> îÁÖÍÉÔÅ C-y. ôÅÐÅÒØ ÐÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ÎÁ ÎÅÓËÏÌØËÏ ÓÔÒÏË ×ÎÉÚ, É ÓÎÏ×Á
+   ÎÁÖÍÉÔÅ C-y. óÅÊÞÁÓ ×Ù ×ÉÄÉÔÅ ËÁË ÍÏÖÎÏ ÓËÏÐÉÒÏ×ÁÔØ ÎÅËÏÔÏÒÙÊ ÔÅËÓÔ.
+
+þÔÏ ÄÅÌÁÔØ ÅÓÌÉ ÅÓÔØ ÎÅËÏÔÏÒÙÊ ÔÅËÓÔ, ËÏÔÏÒÙÊ ×Ù ÈÏÔÉÔÅ ×ÅÒÎÕÔØ ÎÁÚÁÄ É
+ÐÏÔÏÍ ÕÂÉÔØ ÞÔÏ-ÔÏ ÅÝÅ?  C-y ×ÅÒÎÅÔ ÎÅ ÂÏÌÅÅ ÞÅÍ ÐÏÓÌÅÄÎÉÊ ÕÄÁÌÅÎÎÙÊ ÔÅËÓÔ.
+îÏ ÐÒÅÄÙÄÕÝÉÊ ÔÅËÓÔ ÎÅ ÂÕÄÅÔ ÐÏÔÅÒÑÎ. ÷Ù ÓÍÏÖÅÔÅ ÅÇÏ ×ÅÒÎÕÔØ ÎÁÚÁÄ ÉÓÐÏÌØÚÕÑ
+ËÏÍÁÎÄÕ M-y. ðÏÓÌÅ ÔÏÇÏ ËÁË ×Ù ×ÅÒÎÕÌÉ ÐÏÓÌÅÄÎÉÊ ÕÄÁÌÅÎÎÙÊ ÔÅËÓÔ, ÎÁÖÍÉÔÅ
+M-y, É ÚÁÍÅÎÉÔÅ ÜÔÏÔ ×ÏÓÓÔÁÎÏ×ÌÅÎÎÙÊ ÔÅËÓÔ ÔÅÍ, ËÏÔÏÒÙÊ ÂÙÌ ÕÂÉÔ ÒÁÎÅÅ.
+îÁÖÁÔÉÅ M-y ÓÎÏ×Á É ÓÎÏ×Á ÂÕÄÅÔ ×ÏÚ×ÒÁÝÁÔØ ×ÓÅ ÒÁÎÅÅ É ÒÁÎÅÅ ÕÂÉÔÙÊ ÔÅËÓÔ.
+ëÏÇÄÁ ×Ù ÄÏÓÔÉÇÎÉÔÅ ÉÓËÏÍÏÇÏ ÔÅËÓÔÁ, ×ÁÍ ÎÅ ÎÕÖÎÏ ÄÅÌÁÔØ ÎÉÞÅÇÏ ÂÏÌÅÅ ÞÔÏÂ
+ÓÏÈÒÁÎÉÔØ ÅÇÏ. ðÒÏÓÔÏ ÐÒÏÄÏÌÖÁÊÔÅ ÒÅÄÁËÔÉÒÏ×ÁÎÉÅ, ÏÓÔÁ×É× ×ÏÓÓÔÁÎÏ×ÌÅÎÎÙÊ
+ÔÅËÓÔ ÔÁÍ, ÇÄÅ ÏΠÅÓÔØ.
+
+îÁÖÉÍÁÑ M-y ÄÏÓÔÁÔÏÞÎÏÅ ÞÉÓÌÏ ÒÁÚ, ×Ù ÍÏÖÅÔÅ ×ÅÒÎÕÔØÓÑ × ÎÁÞÁÌØÎÕÀ ÔÏÞËÕ
+(ÎÁÉÂÏÌÅÅ ÒÁÎÎÅÅ ÕÄÁÌÅÎÉÅ).
+
+>> õÂÅÊÔÅ ÓÔÒÏËÕ, ÐÏËÒÕÔÉÔÅÓØ ËÕÒÓÏÒÏÍ ×ÏËÒÕÇ, ÐÏÔÏÍ ÕÄÁÌÉÔÅ ÅÝÅ ÏÄÎÕ ÓÔÒÏËÕ.
+   úÁÔÅÍ ÉÓÐÏÌØÚÕÊÔÅ C-y ÄÌÑ ×ÏÓÓÔÁÎÏ×ÌÅÎÉÑ ×ÔÏÒÏÊ ÕÂÉÔÏÊ ÓÔÒÏËÉ.
+   úÁÔÅÍ ÉÓÐÏÌØÚÕÊÔÅ M-y É ÏÎÁ ÂÕÄÅÔ ÚÁÍÅÎÅÎÁ ÐÅÒ×ÏÊ ÕÂÉÔÏÊ ÓÔÒÏËÏÊ.
+   îÁÖÍÉÔÅ ÅÝÅ ÎÅÓËÏÌØËÏ ÒÁÚ M-y ÞÔÏ Õ×ÉÄÅÔØ ÞÔÏ ÐÏÌÕÞÉÔÓÑ. ðÒÏÄÏÌÖÁÊÔÅ 
+   ÄÅÌÁÔØ ÜÔÏ ÐÏËÁ ×ÔÏÒÁÑ ÕÂÉÔÁÑ ÓÔÒÏËÁ ÎÅ ×ÅÒÎÅÔÓÑ, É ÅÝÅ ÞÕÔØ-ÞÕÔØ.
+   åÓÌÉ ×ÁÍ ÈÏÞÅÔÓÑ, ×Ù ÍÏÖÅÔÅ ÚÁÄÁ×ÁÔØ ÄÌÑ M-y ÐÏÌÏÖÉÔÅÌØÎÙÅ É ÏÔÒÉÃÁÔÅÌØÎÙ
+   ÁÒÇÕÍÅÎÔÙ.
+
+
+* ïôíåîá (UNDO)
+---------------
+
+åÓÌÉ ×Ù ÓÄÅÌÁÌÉ ÉÚÍÅÎÅÎÉÑ × ÔÅËÓÔÅ, É ÒÅÛÉÌÉ, ÞÔÏ ÏÛÉÂÌÉÓØ, ÍÏÖÅÔÅ
+ÏÔÍÅÎÉÔØ ÉÚÍÅÎÅÎÉÑ ËÏÍÁÎÄÏÊ "ÏÔÍÅÎÁ", C-x u.
+
+ïÂÙÞÎÏ, C-x u ÏÔÍÅÎÑÅÔ ÉÚÍÅÎÅÎÉÑ, ÓÄÅÌÁÎÎÙÅ ÏÄÎÏÊ ËÏÍÁÎÄÏÊ; ÅÓÌÉ ÐÏ×ÔÏÒÉÔØ C-x
+u ÎÅÓËÏÌØËÏ ÒÁÚ ÐÏÄÒÑÄ, ËÁÖÄÙÊ ÒÁÚ ÂÕÄÅÔ ÏÔÍÅÎÑÔØÓÑ ÅÝÅ ÏÄÎÁ ËÏÍÁÎÄÁ.
+
+îÏ ÅÓÔØ Ä×Á ÉÓËÌÀÞÅÎÉÑ: ËÏÍÁÎÄÙ ËÏÔÏÒÙÅ ÎÅ ÉÚÍÅÎÑÀÔ ÔÅËÓÔ ÎÅ ÕÞÉÔÙ×ÁÀÔÓÑ (ÜÔÏ
+×ËÌÀÞÁÅÔ ËÏÍÁÎÄÙ ÐÅÒÅÍÅÝÅÎÉÑ ËÕÒÓÏÒÁ É ÐÒÏËÒÕÔËÉ), É ÓÁÍÏ×ÓÔÁ×ÌÑÀÝÉÅÓÑ
+(self-inserting) ÓÉÍ×ÏÌÙ ÏÂÒÁÂÁÔÙ×ÁÀÔÓÑ ÇÒÕÐÐÁÍÉ ÄÏ 20.  (üÔÏ ÕÍÅÎØÛÁÅÔ ÞÉÓÌÏ
+C-x u ËÏÔÏÒÙÅ ×Ù ÍÏÖÅÔÅ ÎÁÂÒÁÔØ ÄÌÑ ÏÔÍÅÎÙ ××ÏÄÁ ÔÅËÓÔÁ.)
+
+>> õÂÅÊÔÅ ÜÔÕ ÓÔÒÏËÕ ÉÓÐÏÌØÚÕÑ C-k, ÚÁÔÅÍ ÎÁÂÅÒÉÔÅ C-x u
+   É ÏÎÁ ÄÏÌÖÎÁ ×ÅÒÎÕÔØÓÑ ÎÁÚÁÄ.
+
+C-_ ÁÌØÔÅÒÎÁÔÉ×ÎÁÑ ËÏÍÁÎÄÁ ÏÔÍÅÎÙ; ÏÎÁ ÒÁÂÏÔÁÅÔ ÔÁËÖÅ ËÁË É C-x u, ÎÏ ÌÅÇÞÅ ×
+ÉÓÐÏÌØÚÏ×ÁÎÉÉ ÎÅÓËÏÌØËÏ ÒÁÚ ÐÏÄÒÑÄ. îÅÕÄÏÂÎÏÅ ÐÏÌÏÖÅÎÉÅ C-_ Á ÎÁ ÎÅËÏÔÏÒÙÈ
+ËÌÁ×ÉÁÔÕÒÁÈ ÄÅÌÁÅÔ ÎÅÏÞÅ×ÉÄÎÙÍ ÓÐÏÓÏ ÅÅ ÎÁÂÏÒÁ. ðÏÜÔÏÍÕ ÍÙ ÐÒÅÄÌÁÇÁÅÍ C-x u
+Ë ÉÓÐÏÌØÚÏ×ÁÎÉÀ. îÁ ÎÅËÏÔÏÒÙÈ ÔÅÒÍÉÎÁÌÁÈ, ×Ù ÍÏÖÅÔÅ ÎÁÂÉÒÁÔØ C-_ ÎÁÖÉÍÁÑ / É
+ÕÄÅÒÖÉ×ÁÑ ËÌÁ×ÉÛÕ CTRL.
+
+þÉÓÌÏ×ÏÊ ÁÒÇÕÍÅÎÔ ÄÌÑ C-_ ÉÌÉ C-x u ÒÁÂÏÔÁÅÔ ËÁË ÓÞÅÔÞÉË ÐÏ×ÔÏÒÅÎÉÑ.
+
+
+* æáêìù
+-------
+
+þÔÏÂÙ ÓÏÚÄÁÎÎÙÊ ÔÅËÓÔ ÍÏÖÎÏ ÂÙÌÏ ÒÅÄÁËÔÉÒÏ×ÁÔØ ÐÏÚÖÅ, ×Ù ÄÏÌÖÎÙ ÅÇÏ
+ÐÏÍÅÓÔÉÔØ × ÆÁÊÌ. éÎÁÞÅ, ÏΠÉÓÞÅÚÎÅÔ ËÏÇÄÁ ×Ù ×ÙÊÄÉÔÅ ÉÚ Emacs. ÷Ù ÐÏÍÅÝÁÅÔÅ
+×ÁÛ ÔÅËÓÔ × ÆÁÊÌ "ÏÔËÒÙ×ÁÑ" ÆÁÊÌ. (åÝÅ ÜÔÏ ÎÁÚÙ×ÁÀÔ "ÐÒÉÊÔÉ" × ÆÁÊÌ.)
+(// × ÏÒÉÇÉÎÁÌÅ ÔÅÒÍÉÎÙ "finding", É "visiting")
+
+ïÔËÒÙÔØ ÆÁÊÌ ÏÚÎÁÞÁÅÔ ÐÏÓÍÏÔÒÅÔØ ÅÇÏ ÓÏÄÅÒÖÉÍÏÅ ÉÓÐÏÌØÚÕÑ Emacs. ÷Ï ÍÎÏÇÉÈ
+ÓÌÕÞÁÑÈ, ÜÔÏ ÐÒÏÉÓÈÏÄÉÔ ËÏÇÄÁ ×Ù ÒÅÄÁËÔÉÒÕÅÔÅ ÆÁÊÌ ÓÁÍÉ. ïÄÎÁËÏ ×ÁÛÉ
+ÉÚÍÅÎÅÎÉÑ, ÓÄÅÌÁÎÎÙÅ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ Emacs ÎÅ ÂÕÄÕÔ ÚÁÆÉËÓÉÒÏ×ÁÎÙ, ÐÏËÁ ×Ù ÎÅ
+"ÓÏÈÒÁÎÉÔÅ" ("save") ÆÁÊÌ. ôÁË ×Ù ÍÏÖÅÔÅ ÎÅ ÏÓÔÁ×ÌÑÔØ ÐÏÌÕÉÚÍÅÎÅÎÎÙÊ ÆÁÊÌ ×
+ÓÉÓÔÅÍÅ, ÅÓÌÉ ×Ù ÎÅ ÈÏÔÉÔÅ ÜÔÏÇÏ. äÁÖÅ ËÏÇÄÁ ×Ù ÓÏÈÒÁÎÑÅÔÅ ÆÁÊÌ, Emacs
+ÏÓÔÁ×ÌÑÅÔ ÏÒÉÇÉÎÁÌØÎÙÊ ÆÁÊÌ Ó ÉÚÍÅÎÅÎÎÙÍ ÉÍÅÎÅÍ, ÞÔÏ ×Ù ÍÏÇÌÉ ÐÏÚÖÅ ÒÅÛÉÔØ
+ÞÔÏ ×ÁÛÉ ÉÚÍÅÎÅÎÉÑ ÂÙÌÉ ÏÛÉÂÏÞÎÙ.
+
+åÓÌÉ ÐÏÓÍÏÔÒÅÔØ × ÎÉÖÎÀÀ ÞÁÓÔØ ÜËÒÁÎÁ, ×Ù Õ×ÉÄÉÔÅ ÓÔÒÏËÕ ËÏÔÏÒÁÑ ÎÁÞÉÎÁÅÔÓÑ Ó
+ÔÉÒÅ É ÓÏÄÅÒÖÉÔ ÓÔÒÏËÕ "Emacs: TUTORIAL.ru". üÔÁ ÞÁÓÔØ ÜËÒÁÎÁ ×ÓÅÇÄÁ
+ÐÏËÁÚÙ×ÁÅÔ ÉÍÑ ÆÁÊÌÁ ËÏÔÏÒÙÊ ×Ù ÏÔËÒÙÌÉ. éÔÁË, ÓÅÊÞÁÓ ×Ù ÏÔËÒÙÌÉ ÆÁÊÌ Ó
+ÉÍÅÎÅÍ "TUTORIAL.ru" ËÏÔÏÒÙÊ Ñ×ÌÑÅÔÓÑ ×ÁÛÅÊ ÐÅÒÓÏÎÁÌØÎÏÊ ËÏÐÉÅÊ ÕÞÅÂÎÉËÁ
+Emacs. ìÀÂÏÊ ÆÁÊÌ ËÏÔÏÒÙÊ ×Ù ÏÔËÒÏÅÔÅ, ÜÔÏ ÉÍÑ ÆÁÊÌÁ Ó ÄÏÂÁ×ÌÅÎÎÏÊ ÍÁÌÅÎØËÏÊ
+ËÒÁÐÉÎËÏÊ. (Whatever file you find, that file's name will appear in that
+precise spot.)
+
+ëÏÍÁÎÄÙ ÄÌÑ ÏÔËÒÙÔÉÑ É ÓÏÈÒÁÎÅÎÉÑ ÆÁÊÌÁ × ÏÔÌÉÞÉÉ ÏÔ ÄÒÕÇÉÈ ËÏÍÁÎÄ, ËÏÔÏÒÙÅ ×Ù
+ÕÖÅ ×ÙÕÞÉÌÉ, ÔÒÅÂÕÀÔ Ä×ÕÈ ÓÉÍ×ÏÌÏ×. ïÎÉ ÏÂÁ ÎÁÞÉÎÁÀÔÓÑ Ó ÓÉÍ×ÏÌÁ Control-x.
+âÏÌØÛÁÑ ÓÅÒÉÑ ËÏÍÁÎÄ ÎÁÞÉÎÁÅÔÓÑ Ó ÓÉÍ×ÏÌÁ Control-x; íÎÏÇÉÅ ÉÈ ÎÉÈ ÒÁÂÏÔÁÀÔ Ó
+ÆÁÊÌÁÍÉ, ÂÕÆÅÒÁÍÉ É ÐÏÈÏÖÉÍÉ ×ÅÝÁÍÉ. üÔÏ ËÏÍÁÎÄÙ × Ä×Á, ÔÒÉ ÉÌÉ ÞÅÔÙÒÅ
+ÓÉÍ×ÏÌÁ ÄÌÉÎÏÊ.
+
+óÌÅÄÕÀÝÅÅ, ÞÔÏ ×ÁÍ ÎÕÖÎÏ ÚÎÁÔØ Ï ËÏÍÁÎÄÅ ÏÔËÒÙÔÉÑ ÆÁÊÌÁ - ÜÔÏ ÔÏ, ÞÔÏ ×Ù
+ÄÏÌÖÎÙ ××ÅÓÔÉ ÉÍÑ ÆÁÊÌÁ, ËÏÔÏÒÙÊ ÎÕÖÎÏ ÞÉÔÁÔØ. íÙ ÜÔÏ ÎÁÚÙ×ÁÅÍ ËÏÍÁÎÄÁ "ÞÉÔÁÀÝÁÑ
+ÁÒÇÕÍÅÎÔ Ó ÔÅÒÍÉÎÁÌÁ" (× ÜÔÏÍ ÓÌÕÞÁÅ, ÁÒÇÕÍÅÎÔ ÜÔÏ ÉÍÑ ÆÁÊÌÁ).  ðÏÓÌÅ ××ÏÄÁ
+ËÏÍÁÎÄÙ
+
+       C-x C-f   ïÔËÒÙÔØ (ÎÁÊÔÉ) ÆÁÊÌ
+
+Emacs ÐÏÐÒÏÓÉÔ ×ÁÓ ××ÅÓÔÉ ÉÍÑ ÆÁÊÌÁ. éÍÑ ÆÁÊÌÁ ×Ù ÎÁÂÅÒÅÔÅ × ÎÉÖÎÅÊ ÓÔÒÏËÅ
+ÜËÒÁÎÁ. îÉÖÎÑÑ ÓÔÒÏËÁ ÎÁÚÙ×ÁÅÔÓÑ ÍÉÎÉÂÕÆÅÒ, ÏΠÉÓÐÏÌØÚÕÅÔÓÑ ÄÌÑ ËÏÒÏÔËÏÇÏ
+××ÏÄÁ. ÷Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÏÂÙÞÎÙÅ ËÏÍÁÎÄÙ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ Emacs ÄÌÑ
+ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ ÉÍÅÎÉ.
+
+ëÏÇÄÁ ×Ù ××ÏÄÉÔÅ ÉÍÑ ÆÁÊÌÁ (ÉÌÉ ÌÀÂÕÀ ÉÎÆÏÒÍÁÃÉÀ × ÍÉÎÉÂÕÆÅÒ), ×Ù ÍÏÖÅÔÅ
+ÏÔÍÅÎÉÔØ ËÏÍÁÎÄÕ ÎÁÖÁ× C-g.
+
+>> îÁÖÍÉÔÅ C-x C-f, ÚÁÔÅÍ ÎÁÖÍÉÔÅ C-g. üÔÏ ÏÔÍÅÎÉÔ ÍÉÎÉÂÕÆÅÒ, É ËÏÍÁÎÄÕ
+   C-x C-f ËÏÔÏÒÁÑ ÉÓÐÏÌØÚÏ×ÁÌÁ ÍÉÎÉÂÕÆÅÒ. ÷ ÉÔÏÇÅ, ×Ù ÎÅ ÏÔËÒÙÌÉ ÎÉ ÏÄÎÏÇÏ
+   ÆÁÊÌÁ.
+
+ëÏÇÄÁ ×Ù ÚÁ×ÅÒÛÉÔÅ ××ÏÄ ÉÍÅÎÉ ÆÁÊÌÁ, ÎÁÖÍÉÔÅ <Return>. äÁÌÅÅ ÓÒÁÂÏÔÁÅÔ
+ËÏÍÁÎÄÁ C-x C-f, É ÏÔËÒÏÅÔ ÆÁÊÌ ×ÙÂÒÁÎÎÙÊ ×ÁÍÉ.  íÉÎÉÂÕÆÅÒ ÉÓÞÅÚÎÅÔ ËÏÇÄÁ
+ËÏÍÁÎÄ C-x C-f ÚÁ×ÅÒÛÉÔÓÑ.
+
+é ÍÇÎÏ×ÅÎÉÅÍ ÐÏÚÖÅ ÓÏÄÅÒÖÉÍÏÅ ÆÁÊÌÁ ÐÏÑ×ÉÔÓÑ ÎÁ ÜËÒÁÎÅ, É ×Ù ÓÍÏÖÅÔÅ ÅÇÏ
+ÒÅÄÁËÔÉÒÏ×ÁÔØ. ëÏÇÄÁ ×Ù ÚÁËÏÎÞÉÔÅ ÒÅÄÁËÔÉÒÏ×ÁÎÉÅ, ÞÔÏÂÙ ÓÏÈÒÁÎÉÔØ ÉÚÍÅÎÅÎÉÑ
+ÎÁÂÅÒÉÔÅ ËÏÍÁÎÄÕ
+
+       C-x C-s   óÏÈÒÁÎÉÔØ ÆÁÊÌ
+
+üÔÏ ÓËÏÐÉÒÕÅÔ ÔÅËÓ ÉÚ Emacs × ÆÁÊÌ. ÷ ÐÅÒ×ÙÊ ÒÁÚ, ËÏÇÄÁ ×Ù ÜÔÏ ÓÄÅÌÁÅÔÅ,
+Emacs ÐÅÒÅÉÍÅÎÕÅÔ ÏÒÉÇÉÎÁÌØÎÙÊ ÆÁÊÌ Ó ÎÏ×ÙÍ ÉÍÅÎÅÍ, ÞÔÏÂÙ ÏΠÎÅ ÐÏÔÅÒÑÌÓÑ.
+îÏ×ÏÅ ÉÍÑ ÐÏÌÕÞÁÅÔÓÑ ÄÏÂÁ×ÌÅÎÉÅÍ ÓÉÍ×ÏÌÁ "~" Ë ÏÒÉÇÉÎÁÌØÎÏÍÕ ÉÍÅÎÉ ÆÁÊÌÁ.
+
+ëÏÇÄÁ ÓÏÈÒÁÎÅÎÉÅ ÚÁ×ÅÒÛÉÔÓÑ, Emacs ÎÁÐÅÞÁÔÁÅÔ ÉÍÑ ÚÁÐÉÓÁÎÎÏÇÏ ÆÁÊÌÁ.
+÷Ù ÄÏÌÖÎÙ ÓÏÈÒÁÎÑÔØ ÉÚÍÅÎÅÎÉÑ ÄÏÓÔÁÔÏÞÎÏ ÞÁÓÔÏ, ÔÁË ÞÔÏÂÙ ÎÅ ÐÏÔÅÒÑÔØ
+ÍÎÏÇÏ ÒÁÂÏÔÙ ÅÓÌÉ ×ÄÒÕÇ ÓÉÓÔÅÍÁ ÐÏÇÉÂÎÅÔ.
+
+>> îÁÂÅÒÉÔÅ C-x C-s, ÓÏÈÒÁÎÉÔÅ ×ÁÛÕ ËÏÐÉÀ ÕÞÅÂÎÉËÁ.
+   äÏÌÖÎÁ ÐÏÑ×ÉÔØÓÑ ÎÁÄÐÉÓØ "Wrote ...TUTORIAL.ru" × ÎÉÖÎÅÊ ÓÔÒÏËÅ ÜËÒÁÎÁ.
+
+úáíåþáîéå: îÁ ÎÅËÏÔÏÒÙÈ ÓÉÓÔÅÍÁÈ, ××ÏÄ C-x C-s ÚÁÍÏÒÏÚÉÔ ÜËÒÁΠɠ×Ù ÎÅ
+Õ×ÉÄÉÔÅ ÐÏÓÌÅÄÕÀÝÅÇÏ ×Ù×ÏÄÁ Emacs`Á. üÔÏ ÏÚÎÁÞÁÅÔ ÞÔÏ ÏÐÅÒÁÃÉÏÎÎÁÑ ÓÉÓÔÅÍÁ
+ÉÍÅÅÔ "ÏÓÏÂÅÎÎÏÓÔØ" ÉÍÅÎÕÅÍÕÀ "flow control" ÐÅÒÅÈ×ÁÔÙ×ÁÀÝÕÀ C-s É ÎÅ
+ÐÒÏÐÕÓËÁÀÝÕÀ ÜÔÏÔ ÓÉÍ×ÏÌ Ë Emacs`Õ.  äÌÑ ÒÁÚÍÏÒÏÚËÉ ÜËÒÁÎÁ, ÎÁÖÍÉÔÅ C-q.
+óÍÏÔÒÉÔÅ ÒÁÚÄÅÌ "Spontaneous Entry to Incremental Search" ÒÕËÏ×ÏÄÓÔ×Á Emacs
+ÞÔÏÂÙ ÕÚÎÁÔØ ËÁË ÂÏÒÏÔØÓÑ Ó ÜÔÏÊ "ÏÓÏÂÅÎÎÏÓÔØÀ".
+
+÷Ù ÍÏÖÅÔÅ ÏÔËÒÙÔØ ÓÕÝÅÓÔ×ÕÀÝÉÊ ÆÁÊÌ ÄÌÑ ÐÒÏÓÍÏÔÒÁ ÉÌÉ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ. ÷Ù
+ÔÁË-ÖÅ ÍÏÖÅÔÅ ÎÁÊÔÉ ÆÁÊÌ, ËÏÔÏÒÙÊ ÅÝÅ ÎÅ ÓÕÝÅÓÔ×ÕÅÔ. äÒÕÇÉÍÉ ÓÌÏ×ÁÍÉ -
+ÓÏÚÄÁÔØ ÆÁÊÌ Ó ÐÏÍÏÝØÀ Emacs: ÎÁÊÔÉ ÆÁÊÌ, ÓÏÚÄÁÔØ ÎÏ×ÙÊ, É ÎÁÞÁÔØ ××ÏÄÉÔØ
+ÔÅËÓÔ. ëÏÇÄÁ ×Ù ÓËÁÖÉÔÅ "ÓÏÈÒÁÎÉ" ÆÁÊÌ, Emacs ÓÏÚÄÁÓÔ ÒÅÁÌØÎÙÊ ÆÁÊÌ Ó
+ÎÁÂÒÁÎÎÙÍ ×ÁÍÉ ÔÅËÓÔÏÍ. äÁÌÅÅ, ËÁË ×Ù ÐÏÎÑÌÉ, ×Ù ÂÕÄÉÔÅ ÒÅÄÁËÔÉÒÏ×ÁÔØ ÕÖÅ
+ÓÕÝÅÓÔ×ÕÀÝÉÊ ÆÁÊÌ.
+
+
+* âõæåòá
+--------
+
+åÓÌÉ ×Ù ÎÁÈÏÄÉÔÅ ×ÔÏÒÏÊ ÆÁÊÌ Ó ÉÓÐÏÌØÚÏ×ÁÎÉÅÍ C-x C-f, ÐÅÒ×ÙÊ ÏÓÔÁÅÔÓÑ ×ÎÕÔÒÉ
+Emacs. ÷Ù ÍÏÖÅÔÅ ÐÅÒÅËÌÀÞÉÔØÓÑ ÎÁÚÁÄ ÎÁÊÄÑ ÅÇÏ ÓÎÏ×Á C-x C-f. üÔÏ ÓÐÏÓÏÂ
+ÚÁÇÒÕÚÉÔØ ÎÅÓËÏÌØËÏ ÆÁÊÌÏ× × Emacs.
+
+>> óÏÚÄÁÊÔÅ ÆÁÊÌ Ó ÉÍÅÎÅÍ "foo" ÎÁÂÉÒÁÑ C-x C-f foo <Return>.
+   ÷ÓÔÁ×ØÔÅ ËÁËÏÊ-ÎÉÂÕÄØ ÔÅËÓÔ, ÏÔÒÅÄÁËÔÉÒÕÊÔÅ ÅÇÏ, É ÓÏÈÒÁÎÉÔÅ "foo"
+   ÎÁÂÒÁ× C-x C-s.
+   îÁËÏÎÅÃ, ÎÁÂÅÒÉÔÅ C-x C-f TUTORIAL.ru <Return> 
+   ÞÔÏÂÙ ×ÅÒÎÕÔØÓÑ ÎÁÚÁÄ Ë ÕÞÅÂÎÉËÕ.
+
+Emacs ÓÏÈÒÁÎÑÅÔ ÔÅËÓÔ ËÁÖÄÏÇÏ ÆÁÊÌÁ ×ÎÕÔÒÉ × ÏÂßÅËÔÅ ÉÍÅÎÕÅÍÙÊ "ÂÕÆÅÒ"
+("buffer"). ïÔËÒÙÔÉÅ ÆÁÊÌÁ ÓÏÚÄÁÅÔ ÎÏ×ÙÊ ÂÕÆÅÒ ×ÎÕÔÒÉ Emacs. ÞÔÏÂÙ Õ×ÉÄÅÔØ
+ÓÐÉÓÏË ÂÕÆÅÒÏ× ÓÏÚÄÁÎÎÙÈ × ÔÅËÕÝÅÍ Emacs ÎÁÂÅÒÉÔÅ
+
+       C-x C-b   óÐÉÓÏË ÂÕÆÅÒÏ×
+
+>> ðÏÐÒÏÂÕÊÔÅ C-x C-b ÓÅÊÞÁÓ.
+
+íÙ ×ÉÄÉÍ ÞÔÏ ËÁÖÄÙÊ ÂÕÆÅÒ ÉÍÅÅÔ ÉÍÑ, É ÍÏÖÅÔ ÉÍÅÔØ ÉÍÑ ÆÁÊÌÁ, ÓÏÄÅÒÖÉÍÏÅ
+ËÏÔÏÒÏÇÏ × ÎÅÍ ÈÒÁÎÉÔÓÑ. îÅËÏÔÏÒÙÅ ÂÕÆÅÒÁ ÎÅ ÓÏÏÔ×ÅÔÓÔ×ÕÀÔ ÆÁÊÌÁÍ. îÁÐÒÉÍÅÒ,
+ÂÕÆÅÒ ÎÁÚ×ÁÎÎÙÊ "*Buffer List*" ÎÅ ÓÏÄÅÒÖÉÔ ÎÉËÁËÏÇÏ ÆÁÊÌÁ. ÷ ÜÔÏÍ ÂÕÆÅÒÅ
+ÓÏÄÅÒÖÉÔÓÑ ÓÐÉÓÏË ÂÕÆÅÒÏ×, ËÏÔÏÒÙÊ ÂÙÌ ÓÏÚÄÁΠËÏÍÁÎÄÏÊ C-x C-b. ìàâïê ÔÅËÓÔ
+ËÏÔÏÒÙÊ ×É ×ÉÄÉÔÅ × ÏËÎÅ Emacs ×ÓÅÇÄÁ Ñ×ÌÑÅÔÓÑ ÞÁÓÔØÀ ËÁËÏÇÏ-ÌÉÂÏ ÂÕÆÅÒÁ.
+
+>> îÁÂÅÒÉÔÅ C-x 1 ÞÔÏÂÙ ÉÚÂÁ×ÉÔØÓÑ ÏÔ ÓÐÉÓËÁ ÂÕÆÅÒÏ×.
+
+åÓÌÉ ×Ù ÉÚÍÅÎÑÅÔÅ ÔÅËÓÔ ÏÄÎÏÇÏ ÆÁÊÌÁ, ÐÏÔÏÍ ÏÔËÒÙ×ÁÅÔÅ ÄÒÕÇÏÊ, ÔÏ ÐÅÒ×ÙÊ
+ÏÓÔÁÅÔÓÑ ÎÅ ÓÏÈÒÁÎÅÎÎÙÍ. éÚÍÅÎÅÎÉÑ ÏÓÔÁÎÕÔÓÑ ×ÎÕÔÒÉ Emacs, × ÆÁÊÌÏ×ÏÍ ÂÕÆÅÒÅ.
+óÏÚÄÁÎÉÅ ÉÌÉ ÒÅÄÁËÔÉÒÏ×ÁÎÉÅ ÓÌÅÄÕÀÝÅÇÏ ÆÁÊÌÏ×ÏÇÏ ÂÕÆÅÒÁ ÎÅ ÓËÁÚÙ×ÁÅÔÓÑ ÎÁ
+ÐÅÒ×ÏÍ ÂÕÆÅÒÅ. üÔÏ ÏÞÅÎØ ÕÄÏÂÎÏ, ÎÏ ÉÍÅÊÔÅ × ×ÉÄÕ ÞÔÏ ×ÁÍ ÎÕÖÎÏ ÉÍÅÔØ ÕÄÏÂÎÙÊ
+ÓÐÏÓÏ ÓÏÈÒÁÎÉÔØ ÐÅÒ×ÙÊ ÆÁÊÌÏ×ÙÊ ÂÕÆÅÒ.  âÙÌÏ ÂÙ ÎÅÐÒÉÑÔÎÏ ËÁÖÄÙÊ ÒÁÚ
+×ÏÚ×ÒÁÝÁÔØÓÑ ÎÁÚÁÄ Ó ÐÏÍÏÝØÀ C-x C-f É ÐÏÔÏÍ ÉÓÐÏÌØÚÏ×ÁÔØ C-x C-s.  
+ðÏÜÔÏÍÕ ÓÕÝÅÓÔ×ÕÅÔ
+
+       C-x s     óÏÈÒÁÎÉÔØ ÎÅËÏÔÏÒÙÅ ÂÕÆÅÒÁ. (Save some buffers)
+
+C-x s ÓÐÒÁÛÉ×ÁÅÔ ×ÁÓ Ï ËÁÖÄÏÍ ÂÕÆÅÒÅ ËÏÔÏÒÙÊ ÓÏÄÅÒÖÉÔ ÎÅ ÓÏÈÒÁÎÅÎÎÙÅ
+ÉÚÍÅÎÅÎÉÑ. äÌÑ ËÁÖÄÏÇÏ ÔÁËÏÇÏ ÂÕÆÅÒÁ Õ ×ÁÓ ÓÐÒÁÛÉ×ÁÀÔ ÓÏÈÒÁÎÑÔØ ÉÌÉ ÎÅ
+ÓÏÈÒÁÎÑÔØ ÉÚÍÅÎÅÎÉÑ.
+
+>> ÷ÓÔÁ×ØÔÅ ÓÔÒÏËÕ ÔÅËÓÔÁ, ÐÏÔÏÍ ÎÁÂÅÒÉÔÅ C-x s.
+   õ ×ÁÓ ÄÏÌÖÎÙ ÓÐÒÏÓÉÔØ ÓÏÈÒÁÎÑÔØ ÌÉ ÂÕÆÅÒ Ó ÉÍÅÎÅÍ TUTORIAL.ru.
+   ïÔ×ÅÔØÔÅ ÎÁ ×ÏÐÒÏÓ ÄÁ ÎÁÂÒÁ× "y".
+
+* éóðïìøúï÷áîéå íåîà
+--------------------
+
+åÓÌÉ Õ ×ÁÓ X-ÔÅÒÍÉÎÁÌ, ×Ù ÚÁÍÅÔÉÔÅ ÐÏÌÏÓÙ ÍÅÎÀ ××ÅÒÈÕ ÜËÒÁÎÁ Emacs.  ÷Ù
+ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÜÔÏ ÍÅÎÀ ÄÌÑ ÄÏÓÔÕÐÁ ËÏ ×ÓÅÍ ÎÁÉÂÏÌÅÅ ÏÂÝÉÍ ËÏÍÁÎÄÁÍ
+Emacs, ÔÁËÉÅ ËÁË "ÏÔËÒÙÔØ ÆÁÊÌ" ("find file"). ÷Ù ÓÒÁÚÕ ÎÁÊÄÅÔÅ ÞÔÏ ÜÔÏ
+ÐÒÏÓÔÏ, ÐÏÔÏÍÕ ÞÔÏ ×ÁÍ ÎÅ ÎÕÖÎÏ ÚÁÐÏÍÉÎÁÔØ ÓÏÞÅÔÁÎÉÑ ËÌÁ×ÉÛ ÎÅÏÂÈÏÄÉÍÙÈ ÄÌÑ
+ÄÏÓÔÕÐÁ Ë ËÁÖÄÏÊ ËÏÍÁÎÄÙ. ëÏÇÄÁ ×Ù ÐÒÉ×ÙËÎÉÔÅ Ë Emacs, ×ÁÍ ÂÕÄÉÔÅ ÌÅÇËÏ
+ÉÓÐÏÌØÚÏ×ÁÔØ ËÌÁ×ÉÁÔÕÒÎÙÅ ËÏÍÁÎÄÙ, ÐÏÔÏÍÕ ÞÔÏ ËÁÖÄÏÍ ÐÕÎËÔÅ ÍÅÎÀ, Ë ËÏÔÏÒÏÍÕ
+ÐÒÉ×ÑÚÁÎÁ ÓÏÞÅÔÁÎÉÅ ËÌÁ×ÉÛ, ÎÁÐÉÓÁÎÏ ÜÔÏ ÓÏÞÅÔÁÎÉÅ.
+
+úÁÍÅÔÉÍ ÞÔÏ ÍÎÏÇÏ ÐÕÎËÔÏ× ÍÅÎÀ ÎÅ ÓÏÄÅÒÖÁÔ ËÌÁ×ÉÁÔÕÒÎÙÅ ÜË×É×ÁÌÅÎÔÙ.
+îÁÐÒÉÍÅÒ, ÓÐÉÓÏË ÍÅÎÀ ÓÏ ×ÓÅÍÉ ÄÏÓÔÕÐÎÙÍÉ ÂÕÆÅÒÁÍÉ. ÷Ù ÍÏÖÅÔÅ ÐÅÒÅËÌÀÞÉÔØ ×
+ÌÀÂÏÊ ÂÕÆÅÒ ðÒÏÓÔÏ ÎÁÊÄÑ ÅÇÏ ÉÍÑ × ÍÅÎÀ ÂÕÆÅÒÏ× (Buffers menu) É ×ÙÂÒÁ× ÅÇÏ.
+
+
+* éóðïìøúï÷áîéå íùûé
+--------------------
+
+÷ÙÐÏÌÎÑÅÍÙÊ × X, Emacs ÐÏÌÎÏÓÔØÀ ÉÎÔÅÇÒÉÒÏ×ÁΠӠÍÙÛØÀ.  ÷Ù ÍÏÖÅÔÅ
+ÐÏÚÉÃÉÏÎÉÒÏ×ÁÔØ ËÕÒÓÏÒ ÎÁÖÁÔÉÅÍ ÌÅ×ÏÊ ËÎÏÐËÉ × ÖÅÌÁÅÍÏÍ ÍÅÓÔÅ, ×Ù ÍÏÖÅÔÅ
+ÏÔÍÅÞÁÔØ ÔÅËÓÔ ÐÏÔÑÎÕ× ÍÙÛËÕ Ó ÎÁÖÁÔÏÊ ÌÅ×ÏÊ ËÎÏÐËÏÊ ÞÅÒÅÚ ÔÕ ÞÁÓÔØ, ËÏÔÏÒÕÀ
+ÈÏÔÉÔÅ ÏÔÍÅÔÉÔØ. (éÌÉ ËÌÉËÎÕÔØ ÌÅ×ÏÊ ËÎÏÐËÏÊ ÍÙÛËÉ × ÏÄÎÏÍ ËÏÎÃÅ ÔÅËÓÔÁ,
+ÚÁÔÅÍ ÐÅÒÅÍÅÓÔÉÔØÓÑ × ÄÒÕÇÏÊ, É ËÌÉËÎÕÔØ ÅÝÅ ÒÁÚ, ÕÄÅÒÖÉ×ÁÑ Shift ÞÔÏÂÙ
+ÏÔÍÅÔÉÔØ ÔÅËÓÔ.)
+
+ÞÔÏÂÙ ÕÂÉÔØ ÎÅËÏÔÏÒÙÊ ×ÙÄÅÌÅÎÎÙÊ ÔÅËÓÔ, ×Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ C-w ÉÌÉ ×ÙÂÒÁÔØ
+ÐÕÎËÔ ÍÅÎÀ "÷ÙÒÅÚÁÔØ" ("Cut") ÉÚ ÍÅÎÀ "òÅÄÁËÔÉÒÏ×ÁÔØ" ("Edit"). úÁÍÅÔØÔÅ, ÞÔÏ
+ÜÔÏ *ÎÅ* ÏÄÎÏ É ÔÏ ÖÅ: C-w ÓÏÈÒÁÎÑÅÔ ÔÅËÓÔ ÔÏÌØËÏ ×ÎÕÔÒÉ Emacs (ÁÎÁÌÏÇÉÞÎÏ C-k
+ÏÐÉÓÁÎÎÏÇÏ ÒÁÎÅÅ), "÷ÙÒÅÚÁÔØ" ("Cut") ÄÅÌÁÅÔ ÜÔÏ ÖÅ, É ÐÏÍÅÝÁÅÔ ÔÅËÓÔ × ÂÕÆÅÒ
+ÏÂÍÅÎÁ X (X clipboard), ÇÄÅ ÏΠÍÏÖÅÔ ÂÙÔØ ÄÏÓÔÕÐÅΠÄÒÕÇÉÍ ÐÒÏÇÒÁÍÍÁÍ.
+
+ÞÔÏÂÙ ÐÏÌÕÞÉÔØ ÔÅËÓÔ ÉÚ ÂÕÆÅÒÁ ÏÂÍÅÎÁ X, ÉÓÐÏÌØÚÕÊÔÅ ËÏÍÁÎÄÕ "÷ÓÔÁ×ÉÔØ"
+("Insert") ÉÚ ÍÅÎÀ "òÅÄÁËÔÉÒÏ×ÁÔØ" ("Edit").
+
+óÒÅÄÎÑÑ ËÎÏÐËÁ ÍÙÛÉ ÏÂÙÞÎÏ ÉÓÐÏÌØÚÕÅÔÓÑ ÄÌÑ ×ÙÂÏÒÁ ÐÕÎËÔÏ× (items), ×ÉÄÉÍÙÈ ÎÁ
+ÜËÒÁÎÅ. îÁÐÒÉÍÅÒ, ÅÓÌÉ ×Ù ×ÏÛÌÉ × Info (on-line ÄÏËÕÍÅÎÔÁÃÉÑ Emacs) ÉÓÐÏÌØÚÕÑ
+C-h i ÉÌÉ ÍÅÎÀ ðÏÍÏÝØ (Help), ×Ù ÍÏÖÅÔÅ ÓÌÅÄÏ×ÁÔØ ÐÏÄÓ×ÅÞÅÎÎÙÍ ÓÓÙÌËÁÍ
+ÐÒÏÓÔÙÍ ÎÁÖÁÔÉÅÍ ÓÒÅÄÎÅÊ ËÎÏÐËÉ ÎÁ ÎÉÈ. áÎÁÌÏÇÉÞÎÏ, ÅÓÌÉ ×Ù ××ÏÄÉÔÅ ÉÍÑ ÆÁÊÌÁ
+(ÎÁÐÒÉÍÅÒ × ÐÒÉÇÌÁÛÅÎÉÉ "ÏÔËÒÙÔØ ÆÁÊÌ") É ×Ù ÎÁÖÉÍÁÅÔÅ TAB ÞÔÏÂÙ Õ×ÉÄÅÔØ
+×ÏÚÍÏÖÎÙÅ ×ÁÒÉÁÎÔÙ (completions), ×Ù ÍÏÖÅÔÅ ËÌÉËÎÕÔØ ÓÒÅÄÎÀÀ ËÎÏÐËÕ ÍÙÛÉ ÎÁ
+ÏÄÎÏÍ ÉÚ ×ÁÒÉÁÎÔÏ×, ÞÔÏÂÙ ×ÙÂÒÁÔØ ÅÇÏ.
+
+ðÒÁ×ÁÑ ËÎÏÐËÁ ÍÙÛÉ ×ÙÚÙ×ÁÅÔ ×ÓÐÌÙ×ÁÀÝÅÅ ÍÅÎÀ (popup menu). óÏÄÅÒÖÉÍÏÅ ÜÔÏÇÏ
+ÍÅÎÀ ÉÚÍÅÎÑÅÔÓÑ × ÚÁ×ÉÓÉÍÏÓÔÉ ÏÔÏ ÔÏÇÏ ÇÄÅ ×Ù ÎÁÈÏÄÉÔÅÓØ, É ÏÂÙÞÎÏ ÓÏÄÅÒÖÉÔ
+ÎÅÓËÏÌØËÏ ÞÁÓÔÏ ÉÓÐÏÌØÚÕÅÍÙÈ ËÏÍÁÎÄ ÄÌÑ ÂÏÌÅÅ ÐÒÏÓÔÏÇÏ ÄÏÓÔÕÐÁ Ë ÎÉÍ.
+
+>> îÁÖÍÉÔÅ ÐÒÁ×ÕÀ ËÎÏÐËÕ ÍÙÛÉ ÓÅÊÞÁÓ. 
+
+÷ÁÍ ÎÕÖÎÏ ÕÄÅÒÖÉ×ÁÔØ ËÎÏÐËÕ ÎÁÖÁÔÏÊ, ÞÔÏÂÙ ÓÏÈÒÁÎÉÔØ ÍÅÎÀ ÏÔËÒÙÔÙÍ.
+(// You will have to hold the button down in order to keep the menu up.)
+
+
+* òáóûéòåîîùê îáâïò ëïíáîä 
+--------------------------
+
+õ Emacs ÏÞÅÎØ ÍÎÏÇÏ ËÏÍÁÎÄ, ÏÎÉ ÍÏÇÕÔ ÂÙÔØ ÎÁÚÎÁÞÅÎÙ ÎÁ ×ÓÅ control- É meta-
+ÓÉÍ×ÏÌÙ. Emacs ÏÂÈÏÄÉÔ ÜÔÏ, ÉÓÐÏÌØÚÕÑ  X-ËÏÍÁÎÄÕ (eXtend). åÓÔØ Ä×Å
+×ÏÚÍÏÖÎÏÓÔÉ:
+
+       C-x     óÉÍ×ÏÌ ÒÁÓÛÉÒÅÎÉÑ (Character eXtend). 
+                úÁ ÎÉÍ ÓÌÅÄÕÅÍ ÏÄÉΠÓÉÍ×ÏÌ.
+       M-x     éÍÅÎÎÏ×ÁÎÙÅ ÒÁÓÛÉÒÅÎÎÙÅ ËÏÍÁÎÄÙ (Named command eXtend).
+                úÁ ÎÉÍ ÓÌÅÄÕÅÔ ÉÍÑ ËÏÍÁÎÄÙ.
+
+üÔÏ ËÏÍÁÎÄÙ ËÏÔÏÒÙÅ ÏÂÙÞÎÏ ÉÓÐÏÌØÚÕÀÔÓÑ, ÎÏ ×Ù ÕÖÅ ×ÙÕÞÉÌÉ ÎÅËÏÔÏÒÙÅ ÉÚ ÎÉÈ.
+÷Ù ÕÖÅ ×ÉÄÅÌÉ: ËÏÍÁÎÄÙ ÒÁÂÏÔÙ Ó ÆÁÊÌÁÍÉ C-x C-f - ÏÔËÒÙÔØ, É C-x C-s
+ÓÏÈÒÁÎÉÔØ.  äÒÕÇÏÊ ÐÒÉÍÅÒ - ÚÁ×ÅÒÛÅÎÉÑ ÒÁÂÏÔÙ Ó Emacs -- ÜÔÏ ËÏÍÁÎÄÁ C-x C-c.
+(ÎÅ ×ÏÌÎÕÊÔÅÓØ Ï ÔÏÍ, ÞÔÏ ×Ù ÐÏÔÅÒÑÅÔÅ ÓÄÅÌÁÎÎÙÅ ÉÚÍÅÎÅÎÉÑ, C-x C-c
+ÐÒÅÄÌÁÇÁÅÔ ÓÏÈÒÁÎÉÔØ ÉÚÍÅÎÅÎÉÑ ÐÅÒÅÄ ÔÅÍ ËÁË ÕÄÁÌÉÔ ÂÕÆÅÒ Emacs.)
+
+C-z ÜÔÏ ËÏÍÁÎÄÁ *×ÒÅÍÅÎÎÏÇÏ* ×ÙÈÏÄÁ ÉÚ Emacs -- ×Ù ÍÏÖÅÔÅ ×ÅÒÎÕÔØÓÑ × ÔÕÖÅ
+ÓÅÓÓÉÀ Emacs ÐÏÓÌÅ.
+
+îÁ ÓÉÓÔÅÍÁÈ, ËÏÔÏÒÙÅ ÄÏÐÕÓËÁÀÔ ÜÔÏÇÏ, C-z "ÐÒÉÏÓÔÁÎÁ×ÌÉ×ÁÀÔ" ("suspends")
+Emacs; ÷ÏÚ×ÒÁÝÁÀÔ × ÏÂÏÌÏÞËÕ (shell), ÎÏ ÎÅ ÚÁËÒÙ×ÁÀÔ Emacs. ÷ ÂÏÌØÛÉÎÓÔ×Å
+ÏÂÏÌÏÞÅË ×Ù ÍÏÖÅÔÅ ÐÒÏÄÏÌÖÉÔØ ÒÁÂÏÔÕ × Emacs ÉÓÐÏÌØÚÕÑ ËÏÍÁÎÄÕ `fg' ÉÌÉ
+`%emacs'.
+
+÷ ÓÉÓÔÅÍÁÈ ÎÅ ÐÏÄÄÅÒÖÉ×ÁÀÝÉÈ ÐÒÉÏÓÔÁÎÏ×, C-z ÓÏÚÄÁÅÔ ÎÏ×ÕÀ ÏÂÏÌÏÞËÕ (subshell),
+ÚÁÐÕÝÅÎÎÕÀ ÉÚ-ÐÏÄ Emacs ÞÔÏÂÙ ÄÁÔØ ×ÁÍ ×ÏÚÍÏÖÎÏÓÔØ ×ÙÐÏÌÎÉÔØ ÄÒÕÇÕÀ ÐÒÏÇÒÁÍÍÕ,
+É ÐÏÔÏÍ ×ÅÒÎÕÔØÓÑ × Emacs; üÔÏ ÎÅ ÎÁÓÔÏÑÝÉÊ ×ÙÈÏÄ ÉÚ Emacs. ÷ ÜÔÏÍ ÓÌÕÞÁÅ,
+ËÏÍÁÎÄÁ `exit' ×ÅÒÎÅÔ ×ÁÓ × Emacs ÉÚ ÏÂÏÌÏÞËÉ.
+
+éÓÐÏÌØÚÕÊÔÅ C-x C-c ÅÓÌÉ ×Ù ÈÏÔÉÔÅ ×ÙÊÔÉ (log out) ÉÚ ÓÉÓÔÅÍÙ. üÔÏ ÔÁËÖÅ
+ÉÓÐÏÌØÚÕÅÔÓÑ ÞÔÏÂÙ ×ÙÊÔÉ ÉÚ Emacs ×ÙÚ×ÁÎÎÏÇÏ ÉÚ ÐÏÞÔÏ×ÏÊ ÐÒÏÇÒÁÍÍÙ, ÉÌÉ ÄÒÕÇÏÊ
+ÕÔÉÌÉÔÙ, ËÏÔÏÒÁÑ ÍÏÖÅÔ ÎÅ ÚÎÁÅÔ ËÁË ÓÐÒÁ×ÉÔØÓÑ Ó ÐÒÉÏÓÔÁÎÏ×ÌÅÎÎÙÍ Emacs.
+ïÂÙÞÎÏ, ÔÁËÉ ÅÓÌÉ ×Ù ÎÅ ×ÙÈÏÄÉÔÅ ÉÚ ÓÉÓÔÅÍÙ, ÌÕÞÛÅ ÐÒÉÏÓÔÁÎÏ×ÉÔØ Emacs
+ÉÓÐÏÌØÚÕÑ C-z ×ÍÅÓÔÏ ×ÙÈÏÄÁ ÉÈ ÎÅÇÏ.
+
+ïÞÅÎØ ÍÎÏÇÏ C-x ËÏÍÁÎÄ. üÔÉ ×Ù ÕÖÅ ×ÙÕÞÉÌÉ:
+
+       C-x C-f         ïÔËÒÙÔØ ÆÁÊÌ.
+       C-x C-s         óÏÈÒÁÎÉÔØ ÆÁÊÌ.
+       C-x C-b         óÐÉÓÏË ÂÕÆÅÒÏ×.
+       C-x C-c         ÷ÙÈÏÄ ÉÚ Emacs.
+       C-x u           ïÔÍÅÎÁ.
+
+éÍÅÎÏ×ÁÎÎÙÅ ÒÁÓÛÉÒÅÎÎÙÅ ËÏÍÁÎÄÙ ÉÓÐÏÌØÚÕÀÔÓÑ ÇÏÒÁÚÄÏ ÒÅÖÅ, ÉÌÉ ÉÓÐÏÌØÚÕÀÔÓÑ
+ÔÏÌØËÏ × ÏÐÒÅÄÅÌÅÎÎÙÈ ÒÅÖÉÍÁÈ. ÷ ËÁÞÅÓÔ×Å ÐÒÉÍÅÒÁ ËÏÍÁÎÄÁ ÚÁÍÅÎÁ ÓÔÒÏËÉ,
+ËÏÔÏÒÁÑ ÚÁÍÅÎÑÅÔ ÏÄÎÕ ÓÔÒÏËÕ ÎÁ ÄÒÕÇÕÀ ×Ï ×ÓÅÍ ÔÅËÓÔÅ. ëÏÇÄÁ ×Ù ÎÁÂÅÒÅÔÅ M-x,
+Emacs ÐÒÅÄÌÏÖÉÔ ×ÁÍ ××ÅÓÔÉ ÉÍÑ ËÏÍÁÎÄÙ × ÎÉÖÎÅÊ ÓÔÒÏËÅ ÜËÒÁÎÁ; × ÎÁÛÅÍ ÓÌÕÞÁÅ,
+"replace-string". ôÏÌØËÏ ÎÁÂÅÒÉÔÅ "repl s<TAB>" É Emacs ÄÏÐÏÌÎÉÔ
+ÉÍÑ. úÁ×ÅÒÛÉÔÅ ÉÍÑ ××ÏÄÏÍ <Return>.
+
+ëÏÍÁÎÄÁ ÚÁÍÅÎÙ ÓÔÒÏËÉ (replace-string) ÔÒÅÂÕÅÔ Ä×Á ÁÒÇÕÍÅÎÔÁ -- ÓÔÒÏËÕ
+ËÏÔÏÒÁÑ ÂÕÄÅÔ ÚÁÍÅÎÅÎÁ, É ÓÔÒÏËÁ ÎÁ ËÏÔÏÒÕÀ ÎÕÖÎÏ ÚÁÍÅÎÉÔØ. ÷Ù ÄÏÌÖÎÙ
+ÚÁ×ÅÒÛÁÔØ ËÁÖÄÙÊ ÁÒÇÕÍÅÎÔ ××ÏÄÏÍ <Return>.
+
+>> ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ÎÁ Ä×Å ÐÕÓÔÙÅ ÓÔÒÏËÉ ÎÉÖÅ ÜÔÏÊ.
+   îÁÂÅÒÉÔÅ M-x repl s<Return>changed<Return>altered<Return>.
+
+   úÁÍÅÔØÔÅ ËÁË ÜÔÁ ÓÔÒÏËÁ ÉÚÍÅÎÉÔÓÑ: ×Ù ÚÁÍÅÎÉÔÅ ÓÌÏ×Ï c-h-a-n-g-e-d
+   ÓÌÏ×ÏÍ "altered" ×ÅÚÄÅ, ÇÄÅ ÏÎÏ ×ÓÔÒÅÔÉÔÓÑ, ÎÉÖÅ ÐÏÚÉÃÉÉ ËÕÒÓÏÒÁ.
+
+
+* á÷ôïóïèòáîåîéå
+----------------
+
+ëÏÇÄÁ ×Ù ÍÏÄÉÆÉÃÉÒÕÅÔÅ ÆÁÊÌ, ÎÏ ÎÅ ÓÏÈÒÁÎÑÅÔÅ ÅÇÏ, ×Ù ÍÏÖÅÔÅ ÐÏÔÅÒÑÔØ
+ÉÎÆÏÒÍÁÃÉÀ × ÓÌÕÞÁÅ ËÒÁÈÁ ÓÉÓÔÅÍÙ. ÞÔÏÂÙ ÚÁÝÉÔÉÔØ ×ÁÓ ÏÔ ÜÔÏÇÏ, Emacs
+ÐÅÒÉÏÄÉÞÅÓËÉ ÚÁÐÉÓÙ×ÁÅÔ ËÁÖÄÙÊ ÆÁÊÌ, ËÏÔÏÒÙÊ ×Ù ÒÅÄÁËÔÉÒÕÅÔÅ. á×ÔÏÓÏÈÒÁÎÅÎÉÅ
+ÐÒÏÉÓÈÏÄÉÔ × ÆÁÊÌ, ÉÍÑ ËÏÔÏÒÏÇÏ ÔÁËÏÅ ÖÅ, ÎÏ ÎÁÞÉÎÁÅÔÓÑ É ÚÁËÁÎÞÉ×ÁÅÔÓÑ
+ÓÉÍ×ÏÌÏÍ "#"; ÎÁÐÒÉÍÅÒ, ÅÓÌÉ ×ÁÛ ÆÁÊÌ ÎÁÚÙ×ÁÅÔÓÑ "hello.c", ÔÏ
+Á×ÔÏÓÏÈÒÁÎÅÎÎÙÊ ÆÁÊÌ ÂÕÄÅÔ ÎÁÚÙ×ÁÔØÓÑ "#hello.c#". ëÏÇÄÁ ×Ù ÓÏÈÒÁÎÉÔÅ ÆÁÊÌ
+ÏÂÙÞÎÙÍ ÓÐÏÓÏÂÏÍ.  Emacs ÕÄÁÌÉÔ Á×ÔÏÓÏÈÒÁÎÅÎÎÙÊ ÆÁÊÌ.
+
+åÓÌÉ ÓÉÓÔÅÍÁ ÐÏÄ×ÉÓÁÅÔ, ×Ù ÍÏÖÅÔÅ ×ÏÓÓÔÁÎÏ×ÉÔØ ×ÁÛÉ ÉÚÍÅÎÅÎÉÑ ËÏÔÏÒÙÊ ÂÙÌÉ
+ÓÏÈÒÁÎÅÎÙ Á×ÔÏÍÁÔÉÞÅÓËÉ, ÐÕÔÅÍ ÏÔËÒÙÔÉÑ ÎÏÒÍÁÌØÎÏÇÏ ÆÁÊÌÁ (ÆÁÊÌÁ ËÏÔÏÒÙÊ ×Ù
+ÒÅÄÁËÔÉÒÏ×ÁÌÉ, ÎÅ Á×ÔÏÓÏÈÒÁÎÅÎÎÏÇÏ) É ÚÁÔÅÍ ÎÁÂÒÁÔØ M-x recover file<return>.
+ëÏÇÄÁ Õ ×ÁÓ ÓÐÒÏÓÑÔ ÐÏÄÔ×ÅÒÖÄÅÎÉÅ, ÎÁÂÅÒÉÔÅ yes<return> ÞÔÏÂÙ ×ÏÓÓÔÁÎÏ×ÉÔØ
+Á×ÔÏÓÏÈÒÁÎÅÎÎÙÅ ÄÁÎÎÙÅ.
+
+
+* ïâìáóôø üèï (ECHO AREA)
+-------------------------
+
+åÓÌÉ Emacs ×ÉÄÉÔ ÞÔÏ ×Ù ÍÅÄÌÅÎÎÏ ÎÁÂÉÒÁÅÔÅ ËÏÍÁÎÄÙ, ÏΠÐÏËÁÚÙ×ÁÅÔ ÉÈ ×ÁÍ
+×ÎÉÚÕ ÜËÒÁÎÁ, × ÏÂÌÁÓÔÉ ÎÁÚÙ×ÁÅÍÏÊ "ÏÂÌÁÓÔØ ÜÈÏ". ïÂÌÁÓÔØ ÜÈÏ ÜÔÏ ÎÉÖÎÑÑ
+ÓÔÒÏËÁ ÜËÒÁÎÁ.
+
+
+* óôòïëá óïóôïñîéñ
+------------------
+
+óÔÒÏËÁ ÓÒÁÚÕ ÎÁÄ ÏÂÌÁÓÔØÀ ÜÈÏ ÎÁÚÙ×ÁÅÔÓÑ "ÓÔÒÏËÁ ÓÏÓÔÏÑÎÉÑ".
+÷ÙÇÌÑÄÉÔ ÜÔÁ ÓÔÒÏËÁ ÐÒÉÍÅÒÎÏ ÔÁË:
+
+--**-XEmacs: TUTORIAL.ru       (Fundamental)--L670--66%----------------
+
+üÔÁ ÓÔÒÏËÁ ÓÏÏÂÝÁÅÔ ÐÏÌÅÚÎÕÀ ÉÎÆÏÒÍÁÃÉÀ Ï ÓÏÓÔÏÑÎÉÉ Emacs É ÔÅËÓÔÁ, ËÏÔÏÒÙÊ
+×Ù ÒÅÄÁËÔÉÒÕÅÔÅ.
+
+÷Ù ÕÖÅ ÚÎÁÅÔÅ ÞÔÏ ÏÚÎÁÞÁÅÔ ÉÍÑ ÆÁÊÌÁ - ÜÔÏ ÆÁÊÌ, ËÏÔÏÒÙÊ ×Ù ÏÔËÒÙÌÉ. -NN%--
+ÐÏËÁÚÙ×ÁÅÔ ÔÅËÕÝÕÀ ÐÏÚÉÃÉÀ ËÕÒÓÏÒÁ × ÔÅËÓÔÅ; ÜÔÏ ÏÚÎÁÞÁÅÔ ÞÔÏ NN ÐÒÏÃÅÎÔÏ×
+ÔÅËÓÔÁ ×ÙÛÅ ÞÅÍ ÎÁÞÁÌÏ ÜËÒÁÎÁ. åÓÌÉ ÐÅÒ×ÁÑ ÓÔÒÏËÁ ÎÁÈÏÄÉÔÓÑ × ÐÅÒ×ÏÊ ÓÔÒÏËÅ
+ÜËÒÁÎÁ, ×Ù ÔÁÍ Õ×ÉÄÉÔÅ --Top-- ×ÍÅÓÔÏ --00%--. åÓÌÉ ÐÏÓÌÅÄÎÑÑ ÓÔÒÏËÁ
+ÏÔÏÂÒÁÖÁÅÔÓÑ ÎÁ ÜËÒÁÎÅ, ÔÁÍ ÂÕÄÅÔ --Bot--. åÓÌÉ ÔÅËÓÔ ÎÁÓÔÏÌØËÏ ÍÁÌ, ÞÔÏ ×ÅÓØ
+×ÍÅÝÁÅÔÓÑ × ÜËÒÁÎ, ÓÔÒÏËÁ ÓÏÓÔÏÑÎÉÑ ÓÏÏÂÝÉÔ --All--.
+
+ú×ÅÚÄÏÞËÉ × ÎÁÞÁÌÅ ÓÔÒÏËÉ ÏÚÎÁÞÁÀÔ ÞÔÏ ×Ù ÉÚÍÅÎÑÌÉ ÔÅËÓÔ. ëÁË ÔÏÌØËÏ ×Ù
+ÏÔËÒÙÌÉ ÉÌÉ ÓÏÈÒÁÎÉÌÉ ÆÁÊÌ, ÜÔÁ ÞÁÓÔØ ÓÔÒÏËÉ ÂÕÄÅÔ ÓÏÄÅÒÖÁÔØ ÎÅ Ú×ÅÚÄÏÞËÉ, Á
+ÔÉÒÅ.
+
+þÁÓÔØ ÓÔÒÏËÉ ÓÔÁÔÕÓÁ ×ÎÕÔÒÉ ÓËÏÂÏÞÅË ÓÏÏÂÝÁÅÔ ×ÁÍ ÒÅÖÉÍ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ,
+ËÏÔÏÒÙÍ ×Ù ÐÏÌØÚÕÅÔÅÓØ. óÔÁÎÄÁÒÔÎÙÊ ÒÅÖÉÍ - Fundamental, ÅÇÏ  ×Ù ÉÓÐÏÌØÚÕÅÔÅ
+É ÓÅÊÞÁÓ. üÔÏ ÐÒÉÍÅÒ "ÏÓÎÏ×ÎÏÇÏ ÒÅÖÉÍÁ" ("major mode").
+
+Emacs ÉÍÅÅÔ ÍÎÏÇÏ ÒÁÚÌÉÞÎÙÈ ÏÓÎÏ×ÎÙÈ ÒÅÖÉÍÏ×. îÅËÏÔÏÒÙÅ ÉÚ ÒÅÖÉÍÏ× ÏÚÎÁÞÁÀÔ,
+ÞÔÏ ×Ù ÒÅÄÁËÔÉÒÕÅÔÅ ÔÅËÓÔ ÎÁ ÒÁÚÌÉÞÎÏÍ ÑÚÙËÅ É/ÉÌÉ ÒÁÚÌÉÞÎÙÅ ×ÉÄÙ ÔÅËÓÔÁ,
+ÔÁËÉÅ ËÁË Lisp-ÒÅÖÉÍ, Text-ÒÅÖÉÍ É ÐÒ. ÷ ÌÀÂÏÅ ×ÒÅÍÑ ÔÏÌØËÏ ÏÄÉΠÏÓÎÏ×ÎÏÊ
+ÒÅÖÉÍ ÁËÔÉ×ÉÒÏ×ÁÎ, É ÅÇÏ ÎÁÚ×ÁÎÉÅ ×Ù ÍÏÖÅÔÅ ÎÁÊÔÉ × ÓËÏÂÏÞËÁÈ, ÇÄÅ ÓÅÊÞÁÓ
+ÎÁÈÏÄÉÔÓÑ ÓÌÏ×Ï "Fundamental" (ÂÁÚÏ×ÙÊ).
+
+ëÁÖÄÙÊ ÏÓÎÏ×ÎÏÊ ÒÅÖÉÍ ÉÍÅÅÔ ÎÅÓËÏÌØËÏ ÏÔÌÉÞÉÔÅÌØÎÙÈ ËÏÍÁÎÄ. îÁÐÒÉÍÅÒ, ËÏÍÁÎÄÙ
+ÓÏÚÄÁÎÉÑ ËÏÍÍÅÎÔÁÒÉÑ × ÐÒÏÇÒÁÍÍÅ, É ÐÏÓËÏÌØËÕ × ËÁÖÄÏÍ ÑÚÙËÅ ÐÒÏÇÒÁÍÍÉÒÏ×ÁÎÉÑ
+ËÏÍÍÅÎÔÁÒÉÉ ÚÁÐÉÓÙ×ÁÀÔÓÑ ÐÏ-Ó×ÏÅÍÕ, ËÁÖÄÙÊ ÏÓÎÏ×ÎÏÊ ÒÅÖÉÍ ×ÓÔÁ×ÌÑÅÔ ÉÈ
+ÐÏ-ÒÁÚÎÏÍÕ. ëÁÖÄÙÊ ÏÓÎÏ×ÎÏÊ ÒÅÖÉÍ ÉÍÅÅÔ ÉÍÅÎÏ×ÁÎÎÕÀ ËÏÍÁÎÄÕ, ËÏÔÏÒÁÑ ×ËÌÀÞÁÅÔ
+ÅÇÏ. îÁÐÒÉÍÅÒ, M-x fundamental-mode - ËÏÍÁÎÄÁ, ËÏÔÏÒÁÑ ÐÅÒÅËÌÀÞÁÅÔ × ÂÁÚÏ×ÙÊ
+(Fundamental) ÒÅÖÉÍ.
+
+åÓÌÉ ×Ù ÒÅÄÁËÔÉÒÕÅÔÅ ÁÎÇÌÉÊÓËÉÊ ÔÅËÓÔ, ÎÁÐÒÉÍÅÒ ËÁË ÜÔÏÔ (//ËÏÎÅÞÎÏ ÎÅ ÉÍÅÎÎÏ
+ÜÔÏÔ, Á TUTORIAL) ÆÁÊÌ, ×Ù ×ÅÒÏÑÔÎÏ ÄÏÌÖÎÙ ÐÅÒÅËÌÀÞÉÔØÓÑ × Text-ÒÅÖÉÍ.
+
+>> îÁÂÅÒÉÔÅ M-x text-mode<Return>.
+
+îÅ ×ÏÌÎÕÊÔÅÓØ, ÎÉ ÏÄÎÁ ÉÚ ×ÙÕÞÅÎÎÙÈ ×ÁÍÉ ËÏÍÁÎÄ Emacs ÎÅ ÉÚÍÅÎÉÌÁÓØ. îÏ ×Ù
+ÍÏÖÉÔÅ ÚÁÍÅÔÉÔØ, ÞÔÏ M-f É M-b ÔÅÐÅÒØ ÒÁÚÌÉÞÁÔØ ÁÐÏÓÔÒÏÆÙ ËÁË ÞÁÓÔÉ ÓÌÏ×Á.
+òÁÎÅÅ, × ÂÁÚÏ×ÏÍ ÒÅÖÉÍÅ (Fundamental mode), M-f É M-b ÐÏÎÉÍÁÌÉ ÁÐÏÓÔÒÏÆÙ
+ËÁË ÒÁÚÄÅÌÉÔÅÌÉ ÓÌÏ×. 
+
+ïÓÎÏ×ÎÏÊ ÒÅÖÉÍ ÏÂÙÞÎÏ ÄÅÌÁÅÔ ÎÅÂÏÌØÛÉÅ ÉÚÍÅÎÅÎÉÑ, ÔÁËÉÅ ËÁË: ÂÏÌØÛÉÎÓÔ×Ï 
+ËÏÍÁÎÄ ÄÅÌÁÀÔ "ÔÕÖÅ ÒÁÂÏÔÕ" × ËÁÖÄÏÍ ÉÚ ÒÅÖÉÍÏ×, ÎÏ ÉÈ ÒÁÂÏÔÁ ÏÔÌÉÞÁÅÔÓÑ
+ËÁËÏÊ-ÎÉÂÕÄØ ÍÅÌÏÞØÀ.
+
+äÌÑ ÐÒÏÓÍÏÔÒÁ ÄÏËÕÍÅÎÔÁÃÉÉ Ï ×ÁÛÅÍ ÔÅËÕÝÅÍ ÏÓÎÏ×ÎÏÍ ÒÅÖÉÍÅ, ÎÁÖÍÉÔÅ C-h m.
+
+>> éÓÐÏÌØÚÕÊÔÅ C-u C-v ÏÄÉΠÒÁÚ ÉÌÉ ÂÏÌÅÅ, ÞÔÏÂÙ ÒÁÓÐÏÌÏÖÉÔØ ÜÔÕ ÓÔÒÏËÕ ÂÌÉÖÅ
+   Ë ×ÅÒÈÕ ÜËÒÁÎÁ.
+>> îÁÂÅÒÉÔÅ C-h m, ÞÔÏ ÐÏÓÍÏÔÒÅÔØ ÏÔÌÉÞÉÑ Text-ÒÅÖÉÍÁ ÏÔ ÂÁÚÏ×ÏÇÏ.
+>> îÁÂÅÒÉÔÅ q ÞÔÏÂÙ ÕÂÒÁÔØ ÄÏËÕÍÅÎÔÁÃÉÀ Ó ÇÌÁÚ ÄÏÌÏÊ :)
+
+ïÓÎÏ×ÎÏÊ ÒÅÖÉÍ ÎÁÚÙ×ÁÅÔÓÑ ÏÓÎÏ×ÎÙÍ ÐÏÔÏÍÕ, ÞÔÏ ÅÓÔØ ÎÅÓËÏÌØËÏ ÄÏÐÏÌÎÉÔÅÌØÎÙÈ
+(minor) ÒÅÖÉÍÏ×. äÏÐÏÌÎÉÔÅÌØÎÙÅ ÒÅÖÉÍÙ ÎÅ ÁÌØÔÅÒÎÁÔÉ×Ù Ë ÏÓÎÏ×ÎÙÍ, ÏÎÉ ÔÏÌØËÏ
+ÞÕÔØ-ÞÕÔØ ÍÏÄÉÆÉÃÉÒÕÀÔ ÉÈ. ëÁÖÄÙÊ ÄÏÐÏÌÎÉÔÅÌØÎÙÊ ÒÅÖÉÍ ×ËÌÀÞÁÅÔÓÑ/×ÙËÌÀÞÁÅÔÓÑ
+ÎÅÚÁ×ÉÓÉÍÏ ÏÔ ÄÒÕÇÉÈ ÄÏÐÏÌÎÉÔÅÌØÎÙÈ ÒÅÖÉÍÏ×, É ÎÅÚÁ×ÉÓÉÍÏ ÏÔ ×ÁÛÅÇÏ ÏÓÎÏ×ÎÏÇÏ
+ÒÅÖÉÍÁ. ÷Ù ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÏÓÎÏ×ÎÏÊ ÒÅÖÉÍ ÂÅÚ ÄÏÐÏÌÎÉÔÅÌØÎÙÈ, ÉÌÉ Ó ÌÀÂÏÊ
+ÉÈ ËÏÍÂÉÎÁÃÉÅÊ.
+
+ïÄÉΠÉÚ ÄÏÐÏÌÎÉÔÅÌØÎÙÈ ÒÅÖÉÍÏ× ÏÞÅÎØ ÐÏÌÅÚÅÎ, ÏÓÏÂÅÎÎÏ ÄÌÑ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ
+ÁÎÇÌÉÊÓËÏÇÏ ÔÅËÓÔÁ - ÜÔÏ ÒÅÖÉÍ Á×ÔÏÚÁÐÏÌÎÅÎÉÑ (Auto Fill mode). ëÏÇÄÁ ÜÔÏÔ
+ÒÅÖÉÍ ×ËÌÀÞÅÎ, Emacs ÒÁÚÒÙ×ÁÅÔ ÓÔÒÏËÉ ÍÅÖÄÕ ÓÌÏ×ÁÍÉ Á×ÔÏÍÁÔÉÞÅÓËÉ, ËÏÇÄÁ ×Ù
+×ÓÔÁ×ÌÑÅÔÅ ÔÅËÓÔ É ÄÅÌÁÅÔÅ ÓÔÒÏËÉ ÓÌÉÛËÏÍ ÄÌÉÎÎÙÍÉ.
+
+÷Ù ÍÏÖÅÔÅ ×ËÌÀÞÉÔØ ÒÅÖÉÍ Á×ÔÏÚÁÐÏÌÎÅÎÉÑ ÎÁÂÒÁ× M-x auto-fill-mode<Return>.
+ëÏÇÄÁ ÜÔÏÔ ÒÅÖÉÍ ×ËÌÀÞÅÎ, ÅÇÏ ÍÏÖÎÏ ×ÙËÌÀÞÉÔØ - M-x auto-fill-mode<Return>.
+åÓÌÉ ÒÅÖÉÍ ×ËÌÀÞÅΠ- ËÏÍÁÎÄÁ ÅÇÏ ×ÙËÌÀÞÉÔ, ÅÓÌÉ ×ÙËÌÀÞÅΠ- ×ËÌÀÞÉÔ. íÙ
+ÎÁÚÙ×ÁÅÍ ÜÔÏ ËÏÍÁÎÄÁ "ÐÅÒÅËÌÀÞÅÎÉÑ ÒÅÖÉÍÁ".
+
+>> îÁÂÅÒÉÔÅ M-x auto-fill-mode<Return>. úÁÔÅÍ ×ÓÔÁ×ÌÑÊÔÅ ÓÔÒÏËÕ
+   ÉÚ "ÆÙ×Á " ÐÏËÁ ÎÅ Õ×ÉÄÉÔÅ ËÁË ÏÎÁ ÒÁÚÄÅÌÉÔÓÑ ÎÁ Ä×Å ÓÔÒÏËÉ.
+   ÷Ù ÄÏÌÖÎÙ ÐÏÍÅÝÁÔØ ÐÒÏÂÅÌÙ ÍÅÖÄÕ ÓÌÏ×ÁÍÉ, ÐÏÔÏÍÕ ÞÔÏ ÒÅÖÉÍ Á×ÔÏÚÁÐÏÌÎÅÎÉÑ
+   ÒÁÚÄÅÌÑÅÔ ÓÔÒÏËÉ ÔÏÌØËÏ ÐÏ ÐÒÏÂÅÌÁÍ.
+
+çÒÁÎÉÃÁ ÏÂÙÞÎÏ ×ÙÓÔÁ×ÌÅÎÁ ÎÁ 70-ÔÉ ÓÉÍ×ÏÌÁÈ, ÎÏ ×Ù ÍÏÖÅÔÅ ÉÚÍÅÎÉÔØ ÅÅ
+ÉÓÐÏÌØÚÕÑ ËÏÍÁÎÄÕ C-x f. ÷Ù ÄÏÌÖÎÙ ÚÁÄÁÔØ ÇÒÁÎÉÃÕ × ×ÉÄÅ ÞÉÓÌÏ×ÏÇÏ ÁÒÇÕÍÅÎÔÁ 
+ÄÌÑ ÜÔÏÊ ËÏÍÁÎÄÙ.
+
+>> ÷×ÅÄÉÔÅ C-x f Ó ÁÒÇÕÍÅÎÔÏÍ 20. (C-u 2 0 C-x f).
+   ÚÁÔÅÍ ××ÏÄÉÔÅ ËÁËÏÊ-ÎÉÂÕÄØ ÔÅËÓÔ, É ÓÍÏÔÒÉÔÅ ËÁË Emacs ÚÁÐÏÌÎÑÅÔ ÌÉÎÉÉ 
+   ÐÏ 20 ÓÉÍ×ÏÌÏ× × ËÁÖÄÏÊ. ÷ÅÒÎÉÔÅ ÚÎÁÞÅÎÉÅ ÇÒÁÎÉÃÙ 70 ÎÁÚÁÄ, ÉÓÐÏÌØÚÕÑ
+   C-x f ÓÎÏ×Á.
+
+åÓÌÉ ×Ù ÓÄÅÌÁÌÉ ÉÚÍÅÎÅÎÉÑ × ÓÅÒÅÄÉÎÅ ÐÁÒÁÇÒÁÆÁ, Á×ÔÏÚÁÐÏÌÎÅÎÉÅ ÎÅ ÐÅÒÅÓÔÒÏÉÔ
+ÔÅËÓÔ ÄÌÑ ×ÁÓ. þÔÏÂÙ ÐÅÒÅÓÔÒÏÉÔØ ÐÁÒÁÇÒÁÆ, ÎÁÂÅÒÉÔÅ M-q (Meta-q) × ÔÏ ×ÒÅÍÑ,
+ËÏÇÄÁ ËÕÒÓÏÒ ÂÕÄÅÔ ×ÎÕÔÒÉ ÐÁÒÁÇÒÁÆÁ.
+
+>> ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ × ÐÒÅÄÙÄÕÝÉÊ ÐÁÒÁÇÒÁÆ, É ÎÁÖÍÉÔÅ M-q.
+
+
+* ðïéóë
+-------
+
+Emacs ÕÍÅÅÔ ÉÓËÁÔØ ÓÔÒÏËÉ (ÜÔÏ ÎÅÐÒÅÒÙ×ÎÙÅ ÇÒÕÐÐÙ ÓÉÍ×ÏÌÏ× ÉÌÉ ÓÌÏ×Á) ×ÐÅÒÅÄ
+ÐÏ ÔÅËÓÔÕ, ÉÌÉ ÎÁÚÁÄ. ðÏÉÓË ÓÔÒÏËÉ ÜÔÏ ËÏÍÁÎÄÁ ÐÅÒÅÍÅÝÅÎÉÑ ËÕÒÓÏÒÁ; ÏÎÁ
+ÐÅÒÅÍÅÝÁÅÔ ËÕÒÓÏÒ × ÓÌÅÄÕÀÝÕÀ ÔÏÞËÕ, ÇÄÅ ÎÁÊÄÅÎÁ ÉÓËÏÍÁÑ ÓÔÒÏËÁ.
+
+ëÏÍÁÎÄÁ ÐÏÉÓËÁ Emacs ÏÔÌÉÞÁÀÔÓÑ ÏÔ ÁÎÁÌÏÇÉÞÎÙÈ ËÏÍÁÎÄ ÂÏÌØÛÉÎÓÔ×Á ÄÒÕÇÉÈ
+ÒÅÄÁËÔÏÒÏ× ÔÅÍ, ÞÔÏ ÏÎÁ ÉÎËÒÅÍÅÎÔÁÌØÎÁÑ. üÔÏ ÏÚÎÁÞÁÅÔ ÞÔÏ ÐÏÉÓË ÐÒÏÉÓÈÏÄÉÔ ÐÏ
+ÍÅÒÅ ÔÏÇÏ ËÁË ×Ù ÎÁÂÉÒÁÅÔÅ ÉÓËÏÍÕÀ ÓÔÒÏËÕ.
+
+ëÏÍÁÎÄÁ, ÎÁÞÉÎÁÀÝÁÑ ÐÏÉÓË ×ÐÅÒÅÄ - C-s, É C-r ÉÝÅÔ ÎÁÚÁÄ.
+ðïäïöäéôå! îÅ ÎÕÖÎÏ ÐÒÏÂÏ×ÁÔØ ÜÔÏ ÐÒÑÍÏ ÓÅÊÞÁÓ.
+
+ëÏÇÄÁ ×Ù ÎÁÖÍÅÔÅ C-s ×Ù Õ×ÉÄÉÔÅ ÓÔÒÏËÕ "I-search", ÐÏÑ×É×ÛÕÀÓÑ × ÏÂÌÁÓÔÉ ÜÈÏ.
+÷ÁÍ ÓÏÏÂÝÁÅÔÓÑ ÞÔÏ Emacs ÖÄÅÔ ××ÏÄÁ ÓÌÏ×Á, ËÏÔÏÒÏÅ ×Ù ÈÏÔÉÔÅ ÎÁÊÔÉ. 
+<Return> ÚÁ×ÅÒÛÁÅÔ ÐÏÉÓË.
+
+>> ôÅÐÅÒØ, ÎÁÖÍÉÔÅ C-s ÄÌÑ ÎÁÞÁÌÁ ÐÏÉÓËÁ. íÅÄÌÅÎÎÏ, ÏÄÎÕ ÂÕË×Õ ÚÁ ÏÄÉΠÒÁÚ,
+   ÎÁÂÉÒÁÊÔÅ ÓÌÏ×Ï, 'ËÕÒÓÏÒ', ÏÓÔÁÎÁ×ÌÉ×ÁÑÓØ ÐÏÓÌÅ ËÁÖÄÏÊ ××ÅÄÅÎÎÏÊ ÂÕË×Ù,
+   ÚÁÍÅÞÁÑ ÞÔÏ ÐÒÏÉÓÈÏÄÉÔ Ó ËÕÒÓÏÒÏÍ. 
+   óÅÊÞÁÓ ×Ù ÎÁÛÌÉ ÐÅÒ×ÏÅ ×ÈÏÖÄÅÎÉÅ ÓÌÏ×Á "ËÕÒÓÏÒ".
+>> îÁÖÍÉÔÅ C-s ÓÎÏ×Á, ÞÔÏÂÙ ÎÁÊÔÉ ÓÌÅÄÕÀÝÅÅ ×ÈÏÖÄÅÎÉÅ ÓÌÏ×Á "ËÕÒÓÏÒ".
+>> ôÅÐÅÒØ ÎÁÖÍÉÔÅ <Delete> ÞÅÔÙÒÅ ÒÁÚÁ É ÐÒÏÓÌÅÄÉÔÅ ÚÁ ÐÅÒÅÍÅÝÅÎÉÑÍÉ ËÕÒÓÏÒÁ.
+>> îÁÖÍÉÔÅ <RET> ÄÌÑ ÚÁ×ÅÒÛÅÎÉÑ ÐÏÉÓËÁ.
+
+÷Ù ×ÉÄÅÌÉ ÞÔÏ ÐÒÏÉÓÈÏÄÉÌÏ? Emacs, × ÒÅÖÉÍÅ ÉÎËÒÅÍÅÎÔÁÌØÎÏÇÏ ÐÏÉÓËÁ, ÐÙÔÁÌÓÑ
+ÐÅÒÅÈÏÄÉÔØ Ë ÓÔÒÏËÁÍ ÓÏ×ÐÁÄÁÀÝÉÍ Ó ÎÁÂÉÒÁÅÍÏÊ ×ÁÍÉ, ÐÏÄÓ×ÅÞÉ×ÁÑ ÉÈ ÄÌÑ ×ÁÓ.
+ÞÔÏÂÙ ÐÅÒÅÊÔÉ Ë ÓÌÅÄÕÀÝÅÍÕ ×ÈÏÖÄÅÎÉÑ ÓÌÏ×Á 'ËÕÒÓÏÒ' ÐÒÏÓÔÏ ÎÁÖÍÉÔÅ C-s ÓÎÏ×Á.
+åÓÌÉ ÂÏÌØÛÅ ÎÅÔ ×ÈÏÖÄÅÎÉÊ, Emacs ÉÚÄÁÓÔ Ú×ÕËÏ×ÏÊ ÓÉÇÎÁÌ, É ÓËÁÖÅÔ ÞÔÏ ×ÁÛ
+ÐÏÉÓË ÎÅ ÕÄÁÌÓÑ ("failing"), C-g ÔÏ ÖÅ ÔÏÌÖÅΠÏÔÍÅÎÉÔØ ÐÏÉÓË.
+
+úáíåþáîéå: îÁ ÎÅËÏÔÏÒÙÈ ÓÉÓÔÅÍÁÈ, ××ÏÄ C-x C-s ÚÁÍÏÒÏÚÉÔ ÜËÒÁΠɠ×Ù ÎÅ Õ×ÉÄÉÔÅ
+ÐÏÓÌÅÄÕÀÝÅÇÏ ×Ù×ÏÄÁ Emacs`Á. üÔÏ ÏÚÎÁÞÁÅÔ ÞÔÏ ÏÐÅÒÁÃÉÏÎÎÁÑ ÓÉÓÔÅÍÁ ÉÍÅÅÔ
+"ÏÓÏÂÅÎÎÏÓÔØ" ÉÍÅÎÕÅÍÕÀ "flow control" ÐÅÒÅÈ×ÁÔÙ×ÁÀÝÕÀ C-s É ÎÅ ÐÒÏÐÕÓËÁÀÝÕÀ
+ÜÔÏÔ ÓÉÍ×ÏÌ Ë Emacs`Õ.  äÌÑ ÒÁÚÍÏÒÏÚËÉ ÜËÒÁÎÁ, ÎÁÖÍÉÔÅ C-q.  óÍÏÔÒÉÔÅ ÒÁÚÄÅÌ
+"Spontaneous Entry to Incremental Search" ÒÕËÏ×ÏÄÓÔ×Á Emacs ÞÔÏÂÙ ÕÚÎÁÔØ ËÁË
+ÂÏÒÏÔØÓÑ Ó ÜÔÏÊ "ÏÓÏÂÅÎÎÏÓÔØÀ".
+
+åÓÌÉ ×Ù ×Ï ×ÒÅÍÑ ÉÎËÒÅÍÅÎÔÁÌØÎÏÇÏ ÐÏÉÓËÁ ÎÁÖÍÅÔÅ <Delete>, ×Ù ÍÏÖÅÔÅ ÚÁÍÅÔÉÔØ
+ÞÔÏ ÐÏÓÌÅÄÎÉÊ ÓÉÍ×ÏÌ × ÉÓËÏÍÏÊ ÓÔÒÏËÅ ÕÄÁÌÉÌÓÑ, É ÐÏÉÓË ×ÅÒÎÕÌÓÑ Ë ÐÒÅÄÙÄÕÝÅÍÕ
+ÎÁÊÄÅÎÎÏÍÕ ÍÅÓÔÕ. îÁÐÒÉÍÅÒ, ÐÒÅÄÐÏÌÏÖÉÍ ×Ù ÎÁÂÒÁÌÉ "c", ÐÏÉÓË ÐÅÒÅÊÄÅÔ Ë
+ÐÅÒ×ÏÍÕ ×ÈÏÖÄÅÎÉÀ ÓÉÍ×ÏÌÁ "c". ôÅÐÅÒØ ÅÓÌÉ ×Ù ÎÁÂÅÒÅÔÅ "u", ËÕÒÓÏÒ ÐÅÒÅÊÄÅÔ Ë
+ÐÅÒ×ÏÍÕ ×ÈÏÖÄÅÎÉÀ "cu". îÁÖÁÔÉÅ <Delete> ÕÄÁÌÉÔ ÓÉÍ×ÏÌ "u" ÉÈ ÓÔÒÏËÉ ÐÏÉÓËÁ, É 
+ËÕÒÓÏÒ ×ÅÒÎÅÔÓÑ Ë ÐÅÒ×ÏÍÕ ×ÈÏÖÄÅÎÉÀ "c".
+
+åÓÌÉ ×Ù ×Ï ×ÒÅÍÑ ÐÏÉÓËÁ ××ÅÄÅÔÅ control- ÉÌÉ meta- ÓÉÍ×ÏÌ (ÚÁ ÎÅËÏÔÏÒÙÍÉ
+ÉÓËÌÀÞÅÎÉÑÍÉ -- ÓÉÍ×ÏÌÙ ×ÙÚÙ×ÁÀÝÉÅ ÐÏÉÓË, Á ÉÍÅÎÎÏ C-s É C-r), ÐÏÉÓË
+ÐÒÅËÒÁÔÉÔÓÑ.
+
+C-s ÎÁÞÉÎÁÅÔ ÐÏÉÓË É ÓÍÏÔÒÉÔ ÎÁ ÌÀÂÙÅ ×ÈÏÖÄÅÎÉÑ ÉÓËÏÍÏÊ ÓÔÒÏËÉ ðïóìå ÔÅËÕÝÅÊ
+ÐÏÚÉÃÉÉ ËÕÒÓÏÒÁ. åÓÌÉ ×Ù ÈÏÔÉÔÅ ÎÁÊÔÉ ÞÔÏ-ÔÏ ÒÁÎÅÅ × ÔÅËÓÔÅ, ÎÁÖÍÉÔÅ C-r. ÷ÓÅ
+ÞÔÏ ÍÙ ÇÏ×ÏÒÉÌÉ Ï C-s ÐÒÉÍÅÎÉÍÏ É Ë C-r, ÚÁ ÉÓËÌÀÞÅÎÉÅÍ ÐÒÏÔÉ×ÏÐÏÌÏÖÎÏÇÏ
+ÎÁÐÒÁ×ÌÅÎÉÑ ÐÏÉÓËÁ.
+
+
+* íîïçï ïëïî (MULTIPLE WINDOWS)
+-------------------------------
+
+ïÄÎÁ ÉÚ ÐÒÉÑÔÎÙÈ ÏÓÏÂÅÎÎÏÓÔÅÊ Emacs ÜÔÏ ÔÏ, ÞÔÏ ×Ù ÍÏÖÅÔÅ ÏÔÏÂÒÁÖÁÔØ ÂÏÌÅÅ ÞÅÍ 
+ÏÄÎÏ ÏËÎÏ ÎÁ ÜËÒÁÎÅ ÏÄÎÏ×ÒÅÍÅÎÎÏ. 
+
+>> ðÅÒÅÍÅÓÔÉÔÅ ËÕÒÓÏÒ ÎÁ ÜÔÕ ÌÉÎÉÀ, É ÎÁÂÅÒÉÔÅ C-u 0 C-l.
+
+>> ôÅÐÅÒØ, ÎÁÂÅÒÉÔÅ C-x 2, ÞÔÏ ÒÁÚÄÅÌÉÔ ÜËÒÁΠÎÁ Ä×Á ÏËÎÁ.
+   ïÂÁ ÏËÎÁ ÏÔÏÂÒÁÖÁÀÔ ÕÞÅÂÎÉË. ëÕÒÓÏÒ ÏÓÔÁÌÓÑ × ×ÅÒÈÎÅÍ ÏËÎÅ.
+
+>> îÁÖÍÉÔÅ C-M-v ÄÌÑ ÐÒÏËÒÕÔËÉ ÎÉÖÎÅÇÏ ÏËÎÁ.
+   (ÅÓÌÉ Õ ×ÁÓ ÎÅÔ ÎÁÓÔÏÑÝÅÊ ËÎÏÐËÉ Meta (Alt), ÎÁÖÍÉÔÅ ESC C-v.)
+
+>> îÁÖÍÉÔÅ C-x o ("o" ÏÔ ÓÌÏ×Á "other" - ÄÒÕÇÏÅ) ÄÌÑ ÐÅÒÅÍÅÝÅÎÉÑ ËÕÒÓÏÒÁ ×
+   ÎÉÖÎÅÅ ÏËÎÏ. 
+>> éÓÐÏÌØÚÕÊÔÅ C-v É M-v × ÎÉÖÎÅÍ ÏËÎÅ ÞÔÏ ÐÒÏËÒÕÞÉ×ÁÔØ ÅÇÏ.
+   ðÒÏÄÏÌÖÉÔÅ ÞÔÅÎÉÅ ÜÔÉÈ ÉÎÓÔÒÕËÃÉÊ × ×ÅÒÈÎÅÍ ÏËÎÅ.
+
+>> îÁÖÍÉÔÅ C-x o ÓÎÏ×Á ÞÔÏÂÙ ÐÅÒÅÍÅÓÔÉÔØ ËÕÒÓÏÒ ÎÁÚÁÄ × ×ÅÒÈÎÅÅ ÏËÎÏ.
+   ëÕÒÓÏÒ × ×ÅÒÈÎÅÍ ÏËÎÅ ÔÁÍ ÖÅ, ÇÄÅ É ÂÙÌ ÄÏ ÔÏÇÏ.
+
+÷Ù ÍÏÖÅÔÅ ÐÒÏÄÏÌÖÁÔØ ÐÅÒÅËÌÀÞÁÔØÓÑ ÍÅÖÄÕ ÏËÎÁÍÉ, ÉÓÐÏÌØÚÕÑ C-x o. ëÁÖÄÏÅ ÏËÎÏ
+ÈÒÁÎÉÔ Ó×ÏÀ ÐÏÚÉÃÉÀ ËÕÒÓÏÒÁ, ÎÏ ÔÏÌØËÏ ÏÄÎÏ ÐÏËÁÚÙ×ÁÅÔ ËÕÒÓÏÒ. ÷ÓÅ ÏÂÙÞÎÙÅ
+ËÏÍÁÎÄÙ ÒÅÄÁËÃÉÉ ÐÒÉÍÅÎÑÀÔÓÑ Ë ÏËÎÕ, × ËÏÔÏÒÏÍ ÏÔÏÂÒÁÖÁÅÔÓÑ ËÕÒÓÏÒ.
+íÙ ÎÁÚÙ×ÁÅÍ ÅÇÏ "×ÙÂÒÁÎÎÏÅ ÏËÎÏ" ("selected window").
+
+ëÏÍÁÎÄÁ C-M-v ÏÞÅÎØ ÕÄÏÂÎÁ, ËÏÇÄÁ ×Ù ÒÅÄÁËÔÉÒÕÅÔÅ ÔÅËÓÔ × ÏÄÎÏÍ ÏËÎÅ, É
+ÉÓÐÏÌØÚÕÅÔÅ ×ÔÏÒÏÅ × ËÁÞÅÓÔ×Å ÓÐÒÁ×ÏÞÎÉËÁ. ÷Ù ÍÏÖÅÔÅ ×ÓÅÇÄÁ ÓÏÈÒÁÎÑÔØ ËÕÒÓÏÒ
+× ÏËÎÅ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ É ÐÏÓÌÅÄÏ×ÁÔÅÌØÎÏ ÐÒÏÄ×ÉÇÁÔØÓÑ ×Ï ×ÔÏÒÏÍ, ÉÓÐÏÌØÚÕÑ
+C-M-v.
+
+C-M-v ÐÒÉÍÅÒ CONTROL-META ÓÉÍ×ÏÌÁ. åÓÌÉ Õ ×ÁÓ ÅÓÔØ ÎÁÓÔÏÑÝÁÑ ËÎÏÐËÁ META
+(Alt), ×Ù ÍÏÖÅÔÅ ÎÁÂÒÁÔØ C-M-v ÎÁÖÁ× ÏÄÎÏ×ÒÅÍÅÎÎÏ CTRL É META É ÎÅ ÏÔÐÕÓËÁÑ
+ÎÁÖÁÔØ v. é ÎÅ ×ÁÖÎÏ ËÔÏ ÂÕÄÅÔ ÎÁÖÁÔ ÐÅÒ×ÙÍ, CTRL ÉÌÉ META, ÐÏÔÏÍÕ ÞÔÏ ÜÔÉ
+ËÎÏÐËÉ ÍÏÄÉÆÉÃÉÒÕÀÔ ÔÉРÓÉÍ×ÏÌÁ. 
+
+åÓÌÉ Õ ×ÁÓ ÎÅÔ ÎÁÓÔÏÑÝÅÊ ËÎÏÐËÉ META, É ×Ù ÉÓÐÏÌØÚÕÅÔÅ ESC ×ÍÅÓÔÏ ÎÅÅ,
+ÐÏÒÑÄÏË ÄÏÌÖÅΠÂÙÔØ ÓÌÅÄÕÀÝÉÍ: ×Ù ÄÏÌÖÎÙ ÎÁÖÁÔØ ESC Á ÓÌÅÄÏÍ CTRL-v;
+CTRL-ESC v ÎÅ ÂÕÄÅÔ ÒÁÂÏÔÁÔØ. ðÏÔÏÍÕ, ÞÔÏ ESC ÉÍÅÅÔ Ó×ÏÊ ÓÏÂÓÔ×ÅÎÎÙÊ ÓÉÍ×ÏÌ,
+ÜÔÏ ÎÅ ÍÏÄÉÆÉÃÉÒÕÀÝÁÑ ËÎÏÐËÁ.
+
+>> îÁÖÍÉÔÅ C-x 1 (× ×ÅÒÈÎÅÍ ÏËÎÅ) ÞÔÏÂÙ ÉÚÂÁ×ÉÔØÓÑ ÏÔ ÎÉÖÎÅÇÏ.
+
+(åÓÌÉ ×Ù ÎÁÖÁÌÉ C-x 1 × ÎÉÖÎÅÍ ÏËÎÅ, ÔÏ ×Ù ÉÚÂÁ×ÉÌÉÓØ ÏÔ ×ÅÒÈÎÅÇÏ. ðÏÎÉÍÁÊÔÅ
+ÜÔÕ ËÏÍÁÎÄÕ ËÁË "ïÓÔÁ×ÉÔØ ÔÏÌØËÏ ÏÄÎÏ ÏËÎÏ, ÔÏ × ËÏÔÏÒÏÍ Ñ ÓÅÊÞÁÓ ÎÁÈÏÖÕÓØ").
+
+÷ÁÍ ÎÅ ÎÕÖÎÏ ÏÔÏÂÒÁÖÁÔØ ÏÄÉΠɠÔÏÔ ÖÅ ÂÕÆÅÒ × ÏÂÏÉÈ ÏËÎÁÈ. åÓÌÉ ×Ù ÉÓÐÏÌØÚÕÅÔÅ 
+C-x C-f ÞÔÏÂÙ ÏÔËÒÙÔØ ÆÁÊÌ × ÏÄÎÏÍ ÏËÎÅ, ÄÒÕÇÏÅ ÏÓÔÁÎÅÔÓÑ ÂÅÚ ÉÚÍÅÎÅÎÉÑ. ÷Ù
+ÍÏÖÅÔÅ ÏÔËÒÙ×ÁÔØ ÆÁÊÌÙ × ËÁÖÄÏÍ ÏËÎÅ ÎÅÚÁ×ÉÓÉÍÏ.
+
+åÓÔØ ÄÒÕÇÏÊ ÐÕÔØ ÉÓÐÏÌØÚÏ×ÁÔØ Ä×Á ÏËÎÁ ÏÔÏÂÒÁÖÁÀÝÉÈ ÒÁÚÎÙÅ ÆÁÊÌÙ:
+
+>> îÁÂÅÒÉÔÅ C-x 4 C-f ÚÁÔÅÍ ÉÍÑ ÏÄÎÏÇÏ É ×ÁÛÉÈ ÆÁÊÌÏ×. úÁ×ÅÒÛÉÔÅ <Return>.
+   ðÏÓÍÏÔÒÉÔÅ ÞÔÏ ×ÙÂÒÁÎÎÙÊ ÆÁÊÌ ÐÏÑ×ÉÌÓÑ × ÎÉÖÎÅÍ ÏËÎÅ. ëÕÒÓÏÒ ÐÅÒÅÛÅÌ
+   ÔÕÄÁ ÖÅ.
+
+>> îÁÂÅÒÉÔÅ C-x o ÞÔÏÂÙ ×ÅÒÎÕÔØÓÑ × ×ÅÒÈÎÅÅ ÏËÎÏ, É C-x 1 ÞÔÏÂÙ ÕÄÁÌÉÔØ ÎÉÖÎÅÅ
+   ÏËÎÏ.
+
+
+* òåëõòóé÷îùå õòï÷îé òåäáëôéòï÷áîéñ (RECURSIVE EDITING LEVELS)
+--------------------------------------------------------------
+
+éÎÏÇÄÁ ×Ù ÂÕÄÅÔÅ ×ËÌÀÞÁÔØ ÔÁË ÎÁÚÙ×ÁÅÍÙÅ "ÒÅËÕÒÓÉ×ÎÙÅ ÕÒÏ×ÎÉ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ".
+îÁ ÜÔÏ ÕËÁÚÙ×ÁÀÔ ÐÒÑÍÏÕÇÏÌØÎÙÅ ÓËÏÂÏÞËÉ × ÓÔÒÏËÅ ÓÏÓÔÏÑÎÉÑ, ÏËÒÕÖÁÀÝÉÅ ÏÂÙÞÎÙÅ 
+ÓËÏÂËÉ ×ÏËÒÕÇ ÉÍÅÎÉ ÏÓÎÏ×ÎÏÇÏ ÒÅÖÉÍÁ. îÁÐÒÉÍÅÒ ×Ù ÍÏÖÅÔÅ Õ×ÉÄÅÔØ
+[(Fundamental)] ×ÍÅÓÔÏ (Fundamental).
+
+ÞÔÏÂÙ ×ÙÊÔÉ ÉÚ ÒÅËÕÒÓÉ×ÎÙÈ ÕÒÏ×ÎÅÊ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ, ÎÁÖÍÉÔÅ ESC ESC ESC.
+üÔÏ ÍÎÏÇÏÃÅÌÅ×ÁÑ ËÏÍÁÎÄÁ "×ÙÈÏÄ". ÷Ù ÔÁË ÖÅ ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ ÅÅ ÄÌÑ
+ÕÎÉÞÔÏÖÅÎÉÑ ÌÉÛÎÉÈ ÏËÏÎ, É ×ÙÈÏÄÁ ÉÚ ÍÉÎÉÂÕÆÅÒÁ.
+
+>> îÁÖÍÉÔÅ M-x ÞÔÏÂÙ ÐÏÐÁÓÔØ × ÍÉÎÉÂÕÆÅÒ; ÚÁÔÅÍ ÎÁÖÍÉÔÅ  ESC ESC ESC
+   ÞÏ ×ÙÊÔÉ.
+
+÷Ù ÎÅ ÍÏÖÅÔÅ ÉÓÐÏÌØÚÏ×ÁÔØ C-g ÞÔÏÂÙ ÕÊÔÉ ÉÚ ÒÅËÕÒÓÉ×ÎÙÈ ÕÒÏ×ÎÅÊ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ.
+ðÏÔÏÍÕ ÞÔÏ C-g ÉÓÐÏÌØÚÕÅÔÓÑ ÄÌÑ ÏÔÍÅÎÙ ËÏÍÁÎÄÙ É ÁÒÇÕÍÅÎÔÏ× âåú ÒÅËÕÒÓÉ×ÎÙÈ
+ÕÒÏ×ÎÅÊ ÒÅÄÁËÔÉÒÏ×ÁÎÉÑ.
+
+
+* ëáë ðïìõþéôø ðïíïýø (GETTING MORE HELP)
+-----------------------------------------
+
+÷ ÜÔÏÍ ÕÞÅÂÎÉËÅ ÍÙ ÐÏÐÙÔÁÌÉÓØ ÓÎÁÂÄÉÔØ ×ÁÓ ÔÏÌØËÏ ÔÏÊ ÉÎÆÏÒÍÁÃÉÅÊ, ËÏÔÏÒÁÑ
+ÐÏÍÏÖÅÔ ÎÁÞÁÔØ ÉÓÐÏÌØÚÏ×ÁÔØ Emacs. ïÞÅÎØ ÍÎÏÇÏ ÉÎÆÏÒÍÁÃÉÉ ÄÏÓÔÕÐÎÏ ×
+Emacs, É ÎÅ×ÏÚÍÏÖÎÏ ×ÓÀ ÅÅ ÐÒÅÄÓÔÁ×ÉÔØ ÚÄÅÓØ. ïÄÎÁËÏ, ×Ù ÍÏÖÅÔÅ 
+×ÙÕÞÉÔØ ÂÏÌØÛÅ ×ÏÚÍÏÖÎÏÓÔÅÊ Emacs, ÕÚÎÁÔØ ÄÒÕÇÉÅ ÐÏÌÅÚÎÙÅ ÏÓÏÂÅÎÎÏÓÔÉ. Emacs
+ÐÒÅÄÏÓÔÁ×ÌÑÅÔ ËÏÍÁÎÄÙ ÄÌÑ ÞÔÅÎÉÑ ÄÏËÕÍÅÎÔÁÃÉÉ Ï ËÏÍÁÎÄÁÈ Emacs. üÔÉ ËÏÍÁÎÄÙ
+"ÐÏÍÏÝÉ" ("help") ×ÓÅ ÎÁÞÉÎÁÀÔÓÑ Ó ÓÉÍ×ÏÌÁ Control-h, ËÏÔÏÒÙÊ Ñ×ÌÑÅÔÓÑ
+"ÓÉÍ×ÏÌÏÍ ÐÏÍÏÝÉ".
+
+ÞÔÏÂÙ ÉÓÐÏÌØÚÏ×ÁÔØ ÏÓÏÂÅÎÎÏÓÔÉ ðÏÍÏÝÉ, ÎÁÖÍÉÔÅ C-h, É ÚÁÔÅÍ ÓÉÍ×ÏÌ, ËÏÔÏÒÙÊ
+ÒÁÓÓËÁÖÅÔ ËÁËÏÊ ÉÍÅÎÎÏ ×ÉÄ ÐÏÍÏÝÉ ×Ù ÈÏÔÉÔÅ ÐÏÌÕÞÉÔØ. åÓÌÉ ×Ù äåêóô÷éôåìøîï
+ÒÁÓÔÅÒÑÌÉÓØ, ÎÁÂÅÒÉÔÅ C-h ? É Emacs ÒÁÓÓËÁÖÅÔ ×ÁÍ ËÁËÕÀ ÐÏÍÏÝØ ÏΠÍÏÖÅÔ ×ÁÍ
+ÐÒÅÄÏÓÔÁ×ÉÔØ. åÓÌÉ ×Ù ÎÁÖÁÌÉ C-h É ÐÅÒÅÄÕÍÁÌÉ ÏÂÒÁÝÁÔØÓÑ Ë ÐÏÍÏÝÉ, ÐÒÏÓÔÏ
+ÎÁÖÍÉÔÅ C-g ÞÔÏÂÙ ÏÔÍÅÎÉÔØ ÜÔÕ ËÏÍÁÎÄÕ.
+
+(ëÏÅ-ÇÄÅ ÐÅÒÅÎÁÚÎÁÞÁÀÔ ÓÉÍ×ÏÌ C-h. òÅÁÌØÎÏÊ ÎÅÏÂÈÏÄÉÍÏÓÔÉ × ÜÔÏÍ ÎÅÔ,
+ÓÏÏÂÝÉÔÅ Ï ÎÅÊ ÓÉÓÔÅÍÎÏÍÕ ÁÄÍÉÎÉÓÔÒÁÔÏÒÕ. ôÅÍ ×ÒÅÍÅÎÅÍ, ÅÓÌÉ C-h ÎÅ
+×ÙÚÙ×ÁÅÔ ÓÏÏÂÝÅÎÉÅ ÐÏÍÏÝÉ ×ÎÉÚÕ ÜËÒÁÎÁ, ÐÏÐÒÏÂÕÊÔÅ ÎÁÂÒÁÔØ M-x help RET
+×ÍÅÓÔÏ ÜÔÏÇÏ.)
+
+óÁÍÁÑ ÏÓÎÏ×ÎÁÑ ×ÏÚÍÏÖÎÏÓÔØ ðïíïýé - C-h c. îÁÖÍÉÔÅ C-h, ÚÁÔÅÍ c, É ÓÉÍ×ÏÌ
+ËÏÍÁÎÄÙ ÉÌÉ ÐÏÓÌÅÄÏ×ÁÔÅÌØÎÏÓÔØ, É Emacs ÏÔÏÂÒÁÚÉÔ ÏÞÅÎØ ËÒÁÔËÏÅ ÏÐÉÓÁÎÉÅ
+ËÏÍÁÎÄÙ.
+
+>> îÁÖÍÉÔÅ C-h c Control-p.
+  óÏÏÂÝÅÎÉÅ ÄÏÌÖÎÏ ×ÙÇÌÑÄÅÔØ ÐÒÉÍÅÒÎÏ ÔÁË
+
+       C-p runs the command previous-line
+       (C-p ×ÙÐÏÌÎÑÅÔ ËÏÍÁÎÄÕ previous-line {ÐÒÅÄÙÄÕÝÁÑ-ÌÉÎÉÑ})
+
+÷ÁÍ ÓÏÏÂÝÁÀÔ "ÉÍÑ ÆÕÎËÃÉÉ". éÍÅÎÁ ÆÕÎËÃÉÉ ÉÓÐÏÌØÚÕÀÔÓÑ × ÏÓÎÏ×ÎÏÍ ÄÌÑ
+ÎÁÓÔÒÏÊËÉ É ÒÁÓÛÉÒÅÎÉÑ Emacs. éÍÅÎÁ ÆÕÎËÃÉÊ ×ÙÂÒÁÎÙ ÔÁË, ÞÔÏÂÙ ÐÏËÁÚÁÔØ ÞÔÏ
+ÉÍÅÎÎÏ ËÏÍÁÎÄÁ ÄÅÌÁÅÔ, ÔÁË ÖÅ ÏÎÉ ÐÏÚ×ÏÌÑÀÔ Ó ÐÏÍÏÝØÀ ÜÔÏÊ ËÒÁÔËÏÊ ÉÎÆÏÒÍÁÃÉÉ
+ÌÅÇÞÅ ÚÁÐÏÍÎÉÔØ ÕÖÅ ×ÙÕÞÅÎÎÙÅ ËÏÍÁÎÄÙ.
+
+íÎÏÇÏÓÉÍ×ÏÌØÎÙÅ ËÏÍÁÎÄÙ, ÔÁËÉÅ ËÁË C-x C-s É (ÅÓÌÉ Õ ×ÁÓ ÎÅÔ ËÎÏÐËÉ META ÉÌÉ
+EDIT ÉÌÉ ALT) <ESC>v ÔÁË ÖÅ ÂÕÄÕÔ ÄÏÓÔÕÐÎÙ ÐÏÓÌÅ C-h c.
+
+ðÏÌÕÞÉÔÅ ÂÏÌØÛÅ ÉÎÆÏÒÍÁÃÉÉ Ï ËÏÍÁÎÄÅ ÉÓÐÏÌØÚÕÑ C-h k ×ÍÅÓÔÏ C-h c.
+
+>> îÁÂÅÒÉÔÅ C-h k Control-p.
+
+÷Ù Õ×ÉÄÉÔÅ ÏÐÉÓÁÎÉÅ ÆÕÎËÃÉÉ, Á ÔÁËÖÅ ÅÅ ÉÍÑ × ÏÔÄÅÌØÎÏÍ ÏËÎÅ Emacs. ëÏÇÄÁ ×Ù
+ÚÁ×ÅÒÛÉÔÅ ÞÔÅÎÉÅ, ÎÁÖÍÉÔÅ q ÞÔÏÂÙ ÉÚÂÁ×ÉÔØÓÑ ÏÔ ÔÅËÓÔÁ ÐÏÍÏÝÉ.
+
+åÓÔØ ÅÝÅ ÎÅÓËÏÌØËÏ ÐÏÌÅÚÎÙÈ ÏÐÃÉÊ C-h:
+
+   C-h f       ïÐÉÓÙ×ÁÅÔ ÆÕÎËÃÉÀ. ÷ÁÍ  ÎÅÏÂÈÏÄÉÍÏ ÎÁÂÒÁÔØ ÉÍÑ ÆÕÎËÃÉÉ.
+
+>> ðÏÐÒÏÂÕÊÔÅ ÎÁÂÒÁÔØ C-h f previous-line<Return>.
+   üÔÏ ÒÁÓÐÅÞÁÔÁÅÔ ÉÎÆÏÒÍÁÃÉÀ Emacs Ï ÜÔÏÊ ÆÕÎËÃÉÉ, ËÏÔÏÒÁÑ ×ÙÐÏÌÎÑÅÔÓÑ
+   ËÏÍÁÎÄÏÊ C-p.
+
+   C-h a       Hyper Apropos. ÷×ÅÄÉÔÅ ËÌÀÞÅ×ÏÅ ÓÌÏ×Ï É Emacs ÐÏËÁÖÅÔ ×ÁÍ
+                ÓÐÉÓÏË ×ÓÅÈ ÆÕÎËÃÉÊ É ÐÅÒÅÍÅÎÎÙÈ, ÉÍÅÎÁ ËÏÔÏÒÙÈ ÓÏÄÅÒÖÁÔ ÜÔÏ
+                ÓÌÏ×Ï. ëÏÍÁÎÄÙ, ËÏÔÏÒÙÅ ÍÏÇÕÔ ÂÙÔØ ×ÙÚ×ÁÎÙ ÞÅÒÅÚ Meta-x, 
+                ÂÕÄÕÔ ÏÔÍÅÞÅÎÙ Ú×ÅÚÄÏÞËÏÊ ÓÌÅ×Á.
+
+>> îÁÂÅÒÉÔÅ C-h a newline<Return>.
+
+ÜÔÏ ÏÔÏÂÒÁÚÉÔ ÐÏÌÎÙÊ ÓÐÉÓÏË ÆÕÎËÃÉÊ É ÐÅÒÅÍÅÎÎÙÈ ÉÍÅÎÁ ËÏÔÏÒÙÈ ÎÁÞÉÎÁÀÔÓÑ Ó
+"newline". îÁÖÍÉÔÅ <Return> ÉÌÉ ËÌÉËÎÉÔÅ ÓÒÅÄÎÅÊ ËÎÏÐËÏÊ ÍÙÛËÉ ÞÔÏÂÙ ÐÏÌÕÞÉÔØ
+ÂÏÌØÛÅ Ï ÆÕÎËÃÉÉ ÉÌÉ ÐÅÒÅÍÅÎÎÏÊ. îÁÖÍÉÔÅ `q' ÞÏ ×ÙÊÔÉ ÉÚ hyper-apropos.
+
+
+* úáëìàþåîéå
+------------
+
+úÁÐÏÍÎÉÔÅ, ÞÔÏÂÙ ×ÙÊÔÉ ÉÚ Emacs ÎÁÓÏ×ÓÅÍ ÉÓÐÏÌØÚÕÊÔÅ C-x C-c. ÞÔÏÂÙ ×ÒÅÍÅÎÎÏ
+×ÙÊÔÉ × ÏÂÏÌÏÞËÕ (shell) É ÐÏÔÏÍ ×ÅÒÎÕÔØÓÑ ÏÂÒÁÔÎÏ, ÉÓÐÏÌØÚÕÊÔÅ C-z.
+(× X, ÜÔÏ Ó×ÅÒÎÅÔ ÔÅËÕÝÅÅ ÏËÎÏ Emacs × ÉËÏÎËÕ.)
+
+üÔÏÔ ÕÞÅÂÎÉË ÄÏÌÖÅΠÂÙÔØ ÐÏÎÑÔÅΠ×ÓÅÍ ÎÏ×ÙÍ ÐÏÌØÚÏ×ÁÔÅÌÑÍ, ÅÓÌÉ ×Ù ÎÁÊÄÅÔÅ
+ÞÔÏ-ÎÉÂÕÄØ ÎÅÑÓÎÏÅ, ÎÅ ÎÕÖÎÏ ÓÉÄÅÔØ É ÐÏÒÉÃÁÔØ ÓÅÂÑ - ÖÁÌÕÊÔÅÓØ!
+
+
+COPYING
+-------
+
+üÔÏÔ ÕÞÅÂÎÉË ÐÒÏÉÚÏÛÅÌ ÉÚ ÄÌÉÎÎÏÊ ÓÅÒÉÉ ÕÞÅÂÎÉËÏ× Emacs, ÎÁÞÁÔÏÊ Ó ÏÄÎÁÖÄÙ
+ÎÁÐÉÓÁÎÎÏÇÏ by Stuart Cracraft ÄÌÑ ÏÒÉÇÉÎÁÌØÎÏÇÏ Emacs. Ben Wing ÐÏÄÐÒÁ×ÉÌ
+ÕÞÅÂÎÉË ÄÌÑ X Windows.  Martin Buchholz É Hrvoje Niksic ÄÏÂÁ×ÉÌÉ ÍÎÏÇÏ
+ÉÓÐÒÁ×ÌÅÎÉÊ ÄÌÑ XEmacs.
+
+üÔÁ ×ÅÒÓÉÑ ÕÞÅÂÎÉËÁ, ËÁË É GNU Emacs, ÚÁÝÉÝÅÎÁ ÐÒÁ×ÁÍÉ ËÏÐÉÒÏ×ÁÎÉÑ
+(copyrighted), É ÐÒÉÈÏÄÉÔ Ó ÏÇÒÁÎÉÞÅÎÉÑÍÉ ÒÁÓÐÒÏÓÔÒÁÎÅÎÉÑ ËÏÐÉÊ ÓÏ
+ÓÌÅÄÕÀÝÉÍÉ ÓÏÇÌÁÛÅÎÉÑÍÉ:
+
+Copyright (c) 1985, 1996 Free Software Foundation
+
+   Permission is granted to anyone to make or distribute verbatim copies
+   of this document as received, in any medium, provided that the
+   copyright notice and permission notice are preserved,
+   and that the distributor grants the recipient permission
+   for further redistribution as permitted by this notice.
+
+   Permission is granted to distribute modified versions
+   of this document, or of portions of it,
+   under the above conditions, provided also that they
+   carry prominent notices stating who last altered them.
+
+õÓÌÏ×ÉÑ ËÏÐÉÒÏ×ÁÎÉÑ ÓÁÍÏÇÏ Emacs ÂÏÌÅÅ ÓÌÏÖÎÙÅ, ÎÏ × ÔÏÍ ÖÅ ÄÕÈÅ.
+ðÏÖÁÌÕÊÓÔÁ, ÐÒÏÞÔÉÔÅ ÆÁÊÌ COPYING É ÚÁÔÅÍ ÄÁÊÔÅ ËÏÐÉÀ GNU Emacs ×ÁÛÉ
+ÄÒÕÚØÑÍ. Help stamp out software obstructionism ("ownership") by using,
+writing, and sharing free software!
+
+// ÚÁÍÅÞÁÎÉÑ, ÉÓÐÒÁ×ÌÅÎÉÑ ÏÛÉÂÏË Ó ÎÅÔÅÒÐÅÎÉÅÍ ÖÄÕ ÐÏ ÁÄÒÅÓÕ bor@vb.dn.ua
+// Vladimir Bormotov.
\ No newline at end of file
diff --git a/etc/TUTORIAL.th b/etc/TUTORIAL.th
new file mode 100644 (file)
index 0000000..e2319c6
--- /dev/null
@@ -0,0 +1,696 @@
+                     ==============================
+                     GNUEMACS \e,T@RIR\e0-Uh\e1\e0;Xh\e19\e(B (Mule) \e,T`\e0:Wi\e1M'\e05i\e19\e(B
+                     ==============================
+
+\e,TKARB`K\e05X\e1\e(B:       \e,T`M!JRC)\e0:Q\e1:`\e0:Wi\e1M'\e05i\e19\e09Ui\e1\e(B \e0\e,T6Y\e1!`\e0"U\e1B9\e0"Vi\e19b4B\e0BV\e14K\e0EQ\e1!\e07Uh\e1\e0Gh\e1R\e(B "\e,TEM'`\e0Eh\e19`EB\e04U\e1!\e0Gh\e1R`\e0CU\e1B9\e0CYi\e1\e(B"
+               \e,T:CC\e07Q\e14\e07Uh\e1`\e0CTh\e1A\e05i\e19\e04i\e1GB\e(B ">>" \e,T(P\e0AU\e1$S\e0JQh\e1'\e0Gh\e1R\e(B \e0\e,T5h\e1Md;(Pc\e0Ki\e17SMPdC\e(B
+
+     \e,Tb4B\e07Qh\e1Gd;\e(B \e,T!RC\e0;i\e1M9$S\e0JQh\e1'c\e0Ki\e1\e0!Q\e1:\e(B Mule \e,T7Sd\e04i\e1b4Bc\e0*i\e1\e(B \e0\e,T;Xh\e1A$M9b7CE\e(B (\e0\e,T;Xh\e1A\e07Uh\e1:9K\e09i\e1R\e0JQ\e1A\e0<Q\e1J\e(B \e,T`\e0"U\e1B9d\e0Gi\e1\e(B
+\e0\e,TGh\e1R\e(B CTRL \e,TK\e0CW\e1M\e(B CTL) \e,TK\e0CW\e1M\e(B \e0\e,T;Xh\e1A\e(B META (\e,Tb4B;!\e05T\e1\e(B \e,TKARB\e06V\e1'\e0;Xh\e1A\e(B ESC)  \e,Tc9\e07Uh\e1\e09Ui\e1\e(B \e,T`CR(Pc\e0*i\e1\e0JQ\e1-\e0EQ\e1!I\e03l\e1\e05h\e1Md;\e(B
+\e0\e,T9Ui\e1\e(B \e,Ta79!RC`\e0"U\e1B9`\e05g\e1A\e(B \e,Tf\e(B \e0\e,TGh\e1R\e(B CONTROL \e,TK\e0CW\e1M\e(B META
+
+C-<\e0\e,T5Q\e1G\e0MQ\e1!IC\e(B>     \e,TKARB\e06V\e1'\e(B \e,Tc\e0Ki\e1!4\e0;Xh\e1A$M9b7CE\e0$i\e1R'd\e0Gi\e1\e(B \e,Ta\e0Ei\e1G!4\e0;Xh\e1A\e(B <\e0\e,T5Q\e1G\e0MQ\e1!IC\e(B>   \e0\e,T5Q\e1GM\e0Bh\e1R'`\e0*h\e19\e(B C-f
+               \e,TKARB\e06V\e1'\e(B \e,Tc\e0Ki\e1!4\e0;Xh\e1A$M9b7CE\e0$i\e1R'd\e0Gi\e1\e(B \e,Ta\e0Ei\e1G!4\e0;Xh\e1A\e(B f
+<<Blank lines inserted here by startup of help-with-tutorial>>
+       >> \e,T5M9\e09Ui\e1"Mc\e0Ki\e1EM'!4\e(B C-v (View Next Screen \e0\e,T4Y\e1K\e09i\e1R\e05h\e1Md;\e(B) \e0\e,T4Y\e1\e(B  \e,T`\e0>Wh\e1M`\e0EWh\e1M9d;\e0Mh\e1R9K\e09i\e1R\e(B
+          \e0\e,T5h\e1Md;\e(B
+          \e0\e,T5h\e1M(R!\e09Ui\e1`\e0;g\e19\e05i\e19d;\e(B  \e0\e,T7X\e1!$\e0CQi\e1'\e07Uh\e1\e0Mh\e1R9K\e09i\e1RK\e09Vh\e1'\e(B \e,Tf\e(B \e,T(:"Mc\e0Ki\e17Sc97S9M'`\e04U\e1BG\e0!Q\e19\e(B \e,T`\e0>Wh\e1M`\e0EWh\e1M9d;\e(B
+          \e0\e,T4Y\e1K\e09i\e1R\e05h\e1Md;\e(B
+
+ESC <\e0\e,T5Q\e1G\e0MQ\e1!IC\e(B>   \e,TKARB\e06V\e1'\e(B \e,Tc\e0Ki\e1!4\e0;Xh\e1A\e(B ESC \e,Ta\e0Ei\e1G;\e0Eh\e1MB\e(B \e,TK\e0EQ\e1'(R!\e09Qi\e19\e0(V\e1'!4\e0;Xh\e1A\e(B <\e0\e,T5Q\e1G\e0MQ\e1!IC\e(B> \e,T5RA\e(B
+
+\e,TKARB`K\e05X\e1\e(B:       <\e0\e,T5Q\e1G\e0MQ\e1!IC\e(B> \e,Td\e0Ah\e1\e0Gh\e1R`\e0;g\e19\e05Q\e1GcK\e0-h\e1K\e0CW\e1M\e05Q\e1G`\e0Eg\e1!\e(B \e,T(Pc\e0Ki\e1$GRAKARB`K\e0AW\e1M9\e0!Q\e19`\e0AWh\e1M\e06Y\e1!c\e0*i\e1c9\e(B
+               \e,T$S\e0JQh\e1'\e(B   \e0\e,T6i\e1RKR!\e0AU\e1\e0;Xh\e1A\e(B META \e,Tc\e0Ki\e1!4\e(B \e0\e,T!g\e1(PJRARC6c\e0*i\e1!RC!4\e(B M-<\e0\e,T5Q\e1G\e0MQ\e1!IC\e(B> \e,Ta79\e(B
+               \e,T!RC\e(B ESC <\e0\e,T5Q\e1G\e0MQ\e1!IC\e(B> \e,Td\e04i\e1\e(B  (\e0\e,T$W\e1Mc\e0Ki\e1!4\e0;Xh\e1A\e(B META \e0\e,T$i\e1R'd\e0Gi\e1\e(B \e,Ta\e0Ei\e1G\e0(V\e1'!4\e(B <\e0\e,T5Q\e1G\e0MQ\e1!IC\e(B>)
+
+\e0\e,T"i\e1MJS\e0$Q\e1-\e(B:        \e,T`GER(P`\e0ET\e1!c\e0*i\e1\e(B Emacs \e,Tc\e0Ki\e1!4\e(B C-x C-c  \e,TK\e0CW\e1Mc9!C\e03U\e1\e07Uh\e1\e0JQh\e1'\e(B Emacs \e,T(R!\e(B csh
+               \e0\e,T!g\e1JRARC6c\e0*i\e1\e(B suspend (\e,TK\e0BX\e14\e0*Qh\e1G$CRG\e(B) \e,Td\e04i\e1\e(B  \e,T!RC\e(B suspend Emacs \e,T7Sd\e04i\e1b4B\e(B
+               \e,T!4\e(B C-z
+
+     \e0\e,T5h\e1M(R!\e09Ui\e1\e(B  \e,T"Mc\e0Ki\e1\e0;i\e1M9$S\e0JQh\e1'\e(B C-v \e0\e,T7X\e1!\e(B \e,Tf\e(B \e,T$\e0CQi\e1'\e07Uh\e1\e0Mh\e1R9(:K\e09Vh\e1'K\e09i\e1R\e(B
+
+     \e,T@RBc9K\e09i\e1R\e07Uh\e1a\e0Ei\e1G\e0!Q\e1:K\e09i\e1R\e06Q\e14d;\e(B \e,T(P\e0AU\e1`\e09Wi\e1MKR\e0+i\e1S\e0!Q\e19M\e0BYh\e1:R':CC\e07Q\e14\e(B  \e0\e,T7Uh\e1`\e0;g\e19`\e0*h\e19\e09Ui\e1\e(B \e0\e,T!g\e1`\e0>Wh\e1Mc\e0Ki\e1JRARC6\e0CYi\e1\e(B
+\e,Td\e04i\e1\e0Gh\e1R\e(B \e,T`\e09Wi\e1MKR\e07Uh\e1aJ4'M\e0BYh\e1\e09Qi\e19\e(B \e0\e,T5h\e1M`\e09Wh\e1M'\e0!Q\e19M\e0BYh\e1\e(B
+
+
+     \e0\e,T!h\e1M9\e0MWh\e19\e(B \e,T(S`\e0;g\e19(P\e05i\e1M'\e0CYi\e1\e0GT\e1\e08U\e1!RCbB!\e0Bi\e1RB5SaK\e09h\e1'd;AR\e(B \e,T@RBc9a\e0?i\e1A\e0"i\e1M\e0AY\e1E`\e0JU\e1B\e0!h\e1M9\e(B  \e,T5RA\e07Uh\e1:M!d;\e(B
+\e,Ta\e0Ei\e1G\e(B \e0\e,T!g\e1\e0$W\e1M\e(B C-v \e,Tc\e0*i\e1JSK\e0CQ\e1:`\e0EWh\e1M9d;\e0"i\e1R'K\e09i\e1R\e(B  \e0\e,T6i\e1R(P`\e0EWh\e1M9!\e0EQ\e1:\e07Uh\e1`\e0!h\e1R\e(B \e0\e,T!g\e1c\e0Ki\e1!4\e(B ESC v
+
+      >> \e,TEM'c\e0*i\e1\e(B ESC v \e,TaEP\e(B C-v \e,T`\e0>Wh\e1M`\e0EWh\e1M9d;AR\e04Y\e1\e(B \e0\e,TJQ\e1!JM'JRA$\e0CQi\e1'\e(B
+
+\e,TJ\e0CX\e1;\e(B
+===
+     \e,T$S\e0JQh\e1'\e(B \e,TJSK\e0CQ\e1:`\e0EWh\e1M9d;AR\e07U\e1EPK\e09i\e1R@RBc9a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B \e0\e,T$W\e1M\e(B
+
+     C-v     \e,T`\e0EWh\e1M9d;\e0"i\e1R'K\e09i\e1R\e(B \e,TK\e09Vh\e1'K\e09i\e1R(M\e(B
+     ESC v   \e,T`\e0EWh\e1M9d;\e0"i\e1R'K\e0EQ\e1'\e(B \e,TK\e09Vh\e1'K\e09i\e1R(M\e(B
+     C-l     \e,T`\e0"U\e1B9K\e09i\e1R(McK\e0Ah\e1\e(B \e,TaEPc9"3P`\e04U\e1BG\e0!Q\e19\e(B \e0\e,T!g\e1c\e0Ki\e1`\e0EWh\e1M95SaK\e09h\e1'"M'`$M\e0Cl\e1`+M\e0Cl\e1\e(B (cursor)
+             \e,Td;M\e0BYh\e15C'!ER'(M\e(B
+
+       >> \e,T"Mc\e0Ki\e1\e0JQ\e1'`!5\e04Y\e1\e0Gh\e1R\e(B \e,Tc9"3P\e09Ui\e1`$M\e0Cl\e1`+M\e0Cl\e1M\e0BYh\e1\e07Uh\e1dK9\e(B \e,T>\e0Ci\e1MA\e07Qi\e1'(S\e0"i\e1M$GRA\e07Uh\e1M\e0BYh\e1CM:\e0"i\e1R'"M'\e(B
+          \e,T`$M\e0Cl\e1`+M\e0Cl\e1\e04i\e1GB\e(B  \e,Ta\e0Ei\e1GEM'!4\e(B C-l \e0\e,T4Y\e1\e(B   \e,T5CG(JM:\e04Y\e1\e0Gh\e1R\e(B \e,T`$M\e0Cl\e1`+M\e0Cl\e1`\e0EWh\e1M9d;M\e0BYh\e1\e07Uh\e1dK9\e(B
+          \e0\e,T"i\e1M$GRA\e07Uh\e1M\e0BYh\e1CM:\e0"i\e1R'`;\e0EUh\e1B9d;M\e0Bh\e1R'dC\e(B
+
+\e0\e,TGT\e1\e08U\e1bB!\e0Bi\e1RB`$M\e0Cl\e1`+M\e0Cl\e1\e0"Qi\e19\e0>Wi\e190R9\e(B
+=======================
+
+     \e,T5M9\e09Ui\e1\e(B \e,T`CR\e0!g\e1\e0CYi\e1\e0GT\e1\e08U\e1bB!\e0Bi\e1RBd;ARa::\e07U\e1EPK\e09i\e1Ra\e0Ei\e1G\e(B  \e0\e,T5h\e1Md;\e(B \e0\e,T!g\e1AR`\e0CU\e1B9\e0CYi\e1\e0GT\e1\e08U\e1bB!\e0Bi\e1RBd;\e07Uh\e15SaK\e09h\e1'c4\e(B
+\e,T5SaK\e09h\e1'K\e09Vh\e1'@RBc9K\e09i\e1R`\e04U\e1BG\e0!Q\e19\e(B \e0\e,T+Vh\e1'JRARC67Sd\e04i\e1KERB\e0GT\e1\e08U\e1\e(B  \e0\e,TGT\e1\e08U\e1K\e09Vh\e1'\e0!g\e1\e0$W\e1Mc\e0Ki\e1c\e0*i\e1$S\e0JQh\e1'\e(B \e,Td;:CC\e07Q\e14\e0!h\e1M9K\e09i\e1R\e(B
+(previous) \e,Td;:CC\e07Q\e14\e05h\e1Md;\e(B (next) \e,Td;\e04i\e1R9K\e09i\e1R\e(B (forward) \e,Td;\e04i\e1R9K\e0EQ\e1'\e(B (backward)  \e,T$S\e0JQh\e1'\e(B
+\e,T`K\e0Eh\e1R\e09Ui\e1\e(B \e0\e,T6Y\e1!\e05Qi\e1'd\e0Gi\e1\e07Uh\e1\e(B C-p C-n C-f \e,TaEP\e(B C-b \e,T5RAES\e04Q\e1:\e(B  \e0\e,T+Vh\e1'(P7Sc\e0Ki\e1bB!\e0Bi\e1RBd;ARd\e04i\e1\e(B \e,Tb4B`\e07U\e1B:\e0!Q\e1:\e(B
+\e,T5SaK\e09h\e1'\e0;Q\e1(\e0(X\e1\e0:Q\e19\e(B  \e,TJ\e0CX\e1;`\e0"U\e1B9`\e0;g\e19a<9@R>d\e04i\e1\e04Q\e1'\e09Ui\e1\e(B
+
+
+                             \e,T:CC\e07Q\e14\e07Uh\e1a\e0Ei\e1G\e(B C-p
+                                    :
+                                    :
+   \e0\e,T5Q\e1G\e0MQ\e1!IC\e04i\e1R9K\e0EQ\e1'\e(B C-b  ....  \e,T5SaK\e09h\e1'`$M\e0Cl\e1`+M\e0Cl\e1\e0;Q\e1(\e0(X\e1\e0:Q\e19\e(B  ....   \e0\e,T5Q\e1G\e0MQ\e1!IC\e04i\e1R9K\e09i\e1R\e(B C-f
+                                    :
+                                    :
+                             \e,T:CC\e07Q\e14\e05h\e1Md;\e(B C-n
+
+
+     \e,T$S\e0JQh\e1'`K\e0Eh\e1R\e09Ui\e1\e(B \e,T`MRAR(R!\e05Q\e1G\e0MQ\e1!IC\e05Q\e1GaC!"M'\e(B \e,T$S\e0Gh\e1R\e(B Previous Next Backward Forward
+\e0\e,T+Vh\e1'(P\e0*h\e1GBc\e0Ki\e1(Sd\e04i\e1d\e0Ah\e1BR!\e(B  \e,T$S\e0JQh\e1'`K\e0Eh\e1R\e09Ui\e1`\e0;g\e19$S\e0JQh\e1'JSK\e0CQ\e1:!RCbB!\e0Bi\e1RB\e0"Qi\e19\e0>Wi\e190R9\e(B \e0\e,T+Vh\e1'\e05i\e1M'c\e0*i\e1M\e0BYh\e1`JAM\e(B
+
+       >> \e,TEM'!4\e(B C-n \e0\e,T4Y\e1KERB\e(B \e,Tf\e(B \e,T$\e0CQi\e1'\e(B  \e,T`\e0>Wh\e1M`\e0EWh\e1M9`$M\e0Cl\e1`+M\e0Cl\e1AR\e0BQ\e1':CC\e07Q\e14\e09Ui\e1\e(B (\e,T:CC\e07Q\e14\e07Uh\e1!S\e0EQ\e1'\e0Mh\e1R9\e(B
+          \e,TM\e0BYh\e1\e09Ui\e1\e(B)
+
+       >> \e,TEM'!4\e(B C-f \e0\e,T4Y\e1KERB\e(B \e,Tf\e(B \e,T$\e0CQi\e1'\e(B  \e,T`\e0>Wh\e1M`\e0EWh\e1M9`$M\e0Cl\e1`+M\e0Cl\e1d;\e0BQ\e1'5C'!ER'"M':CC\e07Q\e14\e(B \e,Ta\e0Ei\e1GEM'\e(B
+          \e,T!4\e(B C-p \e,T`\e0EWh\e1M9\e0"Vi\e19\e0"i\e1R':9\e04Y\e1\e(B  \e0\e,TJQ\e1'`!5\e04Y\e1\e04i\e1GB\e0Gh\e1R\e(B \e,T5SaK\e09h\e1'"M'`$M\e0Cl\e1`+M\e0Cl\e1`;\e0EUh\e1B9d;M\e0Bh\e1R'dC\e(B
+
+       >> \e,TEM'!4\e(B C-b \e,T"3P\e07Uh\e1M\e0BYh\e1\e07Uh\e15SaK\e09h\e1'K\e09i\e1R\e0JX\e14"M':CC\e07Q\e14\e04Y\e1\e(B  \e0\e,TJQ\e1'`!5\e04Y\e1\e04i\e1GB\e0Gh\e1R\e(B \e,T`$M\e0Cl\e1`+M\e0Cl\e1`$\e0EWh\e1M9\e(B
+          \e,Td;M\e0Bh\e1R'dC\e(B  \e,T(R!\e09Qi\e19c\e0Ki\e1!4\e(B C-b \e0\e,TMU\e1!JM'JRA$\e0CQi\e1'\e(B  \e,Ta\e0Ei\e1G!4\e(B C-f \e,T`\e0>Wh\e1M`\e0EWh\e1M9d;\e0BQ\e1'\e07i\e1RB\e0JX\e14\e(B
+          \e,T"M':CC\e07Q\e14\e04Y\e1\e(B  \e,T`$M\e0Cl\e1`+M\e0Cl\e1(P`\e0;g\e19M\e0Bh\e1R'dC\e(B \e0\e,T6i\e1R!4(9`EB\e07i\e1RB:CC\e07Q\e14d;\e(B
+
+
+     \e,T`GER\e07Uh\e1`\e0EWh\e1M9`$M\e0Cl\e1`+M\e0Cl\e1\e(B \e,T(9`EB:CC\e07Q\e14aC!\e0JX\e14K\e0CW\e1M:CC\e07Q\e14\e07i\e1RB\e0JX\e14"M'K\e09i\e1Rd;\e(B  \e,T`$M\e0Cl\e1`+M\e0Cl\e1(P\e(B
+\e,T`\e0EWh\e1M9d;\e0BQ\e1':CC\e07Q\e14\e05h\e1Md;c9\e07T\e1H7R'\e09Qi\e19\e(B \e,Tf\e(B  \e,TaEP;\e0CQ\e1:c\e0Ki\e1`$M\e0Cl\e1`+M\e0Cl\e1!\e0EQ\e1:ARM\e0BYh\e1:9K\e09i\e1R(M`JAM\e(B
+
+       >> \e,TEM'!4\e(B C-n \e,T`\e0>Wh\e1M`\e0EWh\e1M9`$M\e0Cl\e1`+M\e0Cl\e1c\e0Ki\e1`EB:CC\e07Q\e14\e0Eh\e1R'\e0JX\e14"M'K\e09i\e1R(M\e04Y\e1\e(B  \e,Ta\e0Ei\e1G\e0JQ\e1'`!5\e04Y\e1\e0Gh\e1R\e(B
+          \e,T`\e0!T\e14MPdC\e0"Vi\e19\e(B \e,TaEP5SaK\e09h\e1'"M'`$M\e0Cl\e1`+M\e0Cl\e1`;\e0EUh\e1B9d;M\e0Bh\e1R'dC\e(B
+
+     \e0\e,T6i\e1R\e0CYi\e1\e0JV\e1!\e0Gh\e1R!RC"\e0BQ\e1:d;\e07U\e1EP\e05Q\e1G\e0MQ\e1!IC\e09Qi\e19\e0MW\e14MR4\e0BW\e14BR4\e(B  \e0\e,T!g\e1JRARC6c\e0*i\e1!RC`\e0EWh\e1M9`$M\e0Cl\e1`+M\e0Cl\e1d;\e07U\e1EP$S\e(B
+\e,Td\e04i\e1\e(B  \e,T!4\e(B ESC f \e,T`\e0>Wh\e1Mc\e0Ki\e1`\e0EWh\e1M9d;\e0"i\e1R'K\e09i\e1RK\e09Vh\e1'$S\e(B \e,TaEP\e(B ESC b \e,T`\e0>Wh\e1Mc\e0Ki\e1`\e0EWh\e1M9d;\e0"i\e1R'K\e0EQ\e1'K\e09Vh\e1'$S\e(B
+
+\e,TKARB`K\e05X\e1\e(B:        \e,TJSK\e0CQ\e1:@RIRd7B\e(B  \e0\e,TBQ\e1'd\e0Ah\e1JRARC6a\e0:h\e1'aB!5SaK\e09h\e1'"M'$Sd\e04i\e1\e06Y\e1!\e05i\e1M'\e(B  \e0\e,T(V\e1'd\e0Ah\e1\e(B
+                \e,TJRARC6c\e0*i\e1JM'$S\e0JQh\e1'\e09Ui\e1d\e04i\e1\e(B
+
+       >> \e,TEM'!4\e(B ESC f \e,TaEP\e(B ESC b \e,TEM'\e04Y\e1KERB\e(B \e,Tf\e(B \e,T$\e0CQi\e1'\e(B  \e,TaEPEM'c\e0*i\e1\e0Ch\e1GA\e0!Q\e1:\e(B C-f \e0\e,T!Q\e1:\e(B C-b \e0\e,T4Y\e1\e(B
+          \e0\e,T4i\e1GB\e(B
+
+     \e,T(P\e0JQ\e1'`!5`\e0Kg\e19d\e04i\e1\e0Gh\e1R\e(B ESC f \e,TaEP\e(B ESC b \e0\e,TAU\e1\e0CY\e1;a::$\e0Ei\e1RB$\e0EV\e1'\e0!Q\e1:\e(B C-f \e,TaEP\e(B C-b  \e,Tb4B\e0Jh\e1G9cK\e0-h\e1\e(B
+ESC <\e0\e,T5Q\e1G\e0MQ\e1!IC\e(B> \e,T(Pc\e0*i\e1`\e0!Uh\e1BG\e0!Q\e1:!RC\e0(Q\e14!RC\e0"i\e1M$GRA\e(B  \e0\e,TJh\e1G9\e(B C-<\e0\e,T5Q\e1G\e0MQ\e1!IC\e(B> \e,T(Pc\e0*i\e1\e0!Q\e1:\e0JTh\e1'\e07Uh\e1`\e0;g\e19\e0>Wi\e190R9AR!\e(B
+\e,T!\e0Gh\e1R\e(B (\e,T`\e0*h\e19\e(B \e0\e,T5Q\e1G\e0MQ\e1!IC\e(B \e,TK\e0CW\e1M\e(B \e,T:CC\e07Q\e14\e(B)
+
+     C-a \e0\e,T!Q\e1:\e(B C-e \e,T`\e0;g\e19$S\e0JQh\e1'\e09h\e1R(P\e0CYi\e1d\e0Gi\e1\e(B  \e,T`>CRP\e0$h\e1M9\e0"i\e1R'JP4G!\e04U\e1\e07U\e1`\e04U\e1BG\e(B  C-a \e,Tc\e0*i\e1JSK\e0CQ\e1:`\e0EWh\e1M9\e(B
+\e,T`$M\e0Cl\e1`+M\e0Cl\e1d;\e07Uh\e15SaK\e09h\e1'K\e09i\e1R\e0JX\e14"M':CC\e07Q\e14\e(B  C-e \e,TJSK\e0CQ\e1:`\e0EWh\e1M9d;\e07Uh\e15SaK\e09h\e1'\e07i\e1RB\e0JX\e14"M':CC\e07Q\e14\e(B
+
+
+       >> \e,TEM'!4\e(B C-a \e0\e,T4Y\e1JM'$\e0CQi\e1'\e(B  \e,TK\e0EQ\e1'(R!\e09Qi\e19c\e0Ki\e1!4\e(B C-e \e0\e,T4Y\e1JM'$\e0CQi\e1'\e(B  \e,Ta\e0Ei\e1GEM'\e0JQ\e1'`!5\e04Y\e1\e0Gh\e1R\e(B \e,T!RC\e(B
+          \e,T!4$S\e0JQh\e1'\e09Ui\e1AR!!\e0Gh\e1RJM'$\e0CQi\e1'\e(B \e,T(Pd\e0Ah\e1\e0*h\e1GBc\e0Ki\e1`\e0EWh\e1M9`$M\e0Cl\e1`+M\e0Cl\e1d;dK9d\e04i\e1AR!!\e0Gh\e1R\e09Qi\e19\e0MU\e1!\e(B
+
+     \e0\e,TBQ\e1'\e0AU\e1\e0MU\e1!JM'$S\e0JQh\e1'\e(B \e,TJSK\e0CQ\e1:!RC`\e0EWh\e1M9`$M\e0Cl\e1`+M\e0Cl\e1a::\e0'h\e1RB\e(B \e,Tf\e(B \e0\e,T$W\e1M\e(B \e,T$S\e0JQh\e1'\e(B ESC < \e,TJSK\e0CQ\e1:!RC`\e0EWh\e1M9\e(B
+\e,T`$M\e0Cl\e1`+M\e0Cl\e1d;\e07Uh\e15SaK\e09h\e1'aC!\e0JX\e14"M'a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B \e,TaEP$S\e0JQh\e1'\e(B ESC > \e,TJSK\e0CQ\e1:!RC`\e0EWh\e1M9d;5SaK\e09h\e1'\e07i\e1RB\e0JX\e14\e(B
+
+     \e,T`CR`\e0CU\e1B!5SaK\e09h\e1'"M'\e0"i\e1M$GRA\e(B \e0\e,T7Uh\e1\e0AU\e1`$M\e0Cl\e1`+M\e0Cl\e1M\e0BYh\e1\e0Gh\e1R\e(B "\e0\e,T(X\e14\e(B (point)"  \e,TK\e0CW\e1M\e0>Y\e14\e0MU\e1!M\e0Bh\e1R'K\e09Vh\e1'd\e04i\e1\e(B
+\e0\e,TGh\e1R\e(B \e,T`$M\e0Cl\e1`+M\e0Cl\e1\e(B \e,T`\e0;g\e19\e0JTh\e1'\e07Uh\e1:M!c\e0Ki\e1`CR\e0CYi\e1\e0Gh\e1R\e(B \e0\e,T(X\e14\e(B \e,TM\e0BYh\e15C'dK9"M'K\e09i\e1R(M\e(B
+
+     \e,TJ\e0CX\e1;$S\e0JQh\e1'JSK\e0CQ\e1:!RC`$\e0EWh\e1M9d;AR\e(B \e0\e,T+Vh\e1'CGA!RC`$\e0EWh\e1M9\e07Uh\e1c9K\e09h\e1GB"M'$S\e(B \e,TK\e09h\e1GB"M':CC\e07Q\e14d\e0Gi\e1\e04i\e1GB\e(B
+\e,Td\e04i\e1\e04Q\e1'\e09Ui\e1\e(B
+
+     C-f     \e,Td;\e0"i\e1R'K\e09i\e1RK\e09Vh\e1'\e05Q\e1G\e0MQ\e1!IC\e(B
+     C-b     \e,T!\e0EQ\e1:\e0"i\e1R'K\e0EQ\e1'K\e09Vh\e1'\e05Q\e1G\e0MQ\e1!IC\e(B
+
+     ESC f   \e,Td;\e0"i\e1R'K\e09i\e1RK\e09Vh\e1'$S\e(B
+     ESC b   \e,T!\e0EQ\e1:\e0"i\e1R'K\e0EQ\e1'K\e09Vh\e1'$S\e(B
+
+     C-n     \e,T`\e0EWh\e1M9d;:CC\e07Q\e14\e05h\e1Md;\e(B
+     C-p     \e,T`\e0EWh\e1M9d;:CC\e07Q\e14\e07Uh\e1a\e0Ei\e1G\e(B
+
+     ESC ]   \e,T`\e0EWh\e1M9d;5SaK\e09h\e1'\e07i\e1RB\e0JX\e14"M'\e0Bh\e1MK\e09i\e1R\e(B (paragraph)
+     ESC [   \e,T`\e0EWh\e1M9d;5SaK\e09h\e1'aC!\e0JX\e14"M'\e0Bh\e1MK\e09i\e1R\e(B
+
+     C-a     \e,T`\e0EWh\e1M9d;5SaK\e09h\e1'aC!\e0JX\e14"M':CC\e07Q\e14\e(B
+     C-e     \e,T`\e0EWh\e1M9d;5SaK\e09h\e1'\e07i\e1RB\e0JX\e14"M':CC\e07Q\e14\e(B
+
+     ESC <   \e,T`\e0EWh\e1M9d;5SaK\e09h\e1'aC!\e0JX\e14"M'a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B
+     ESC >   \e,T`\e0EWh\e1M9d;5SaK\e09h\e1'\e07i\e1RB\e0JX\e14"M'a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B
+
+       >> \e,TEM'c\e0*i\e1$S\e0JQh\e1'a\e05h\e1EP$S\e0JQh\e1'\e04Y\e1\e(B  \e,T$S\e0JQh\e1'`K\e0Eh\e1R\e09Ui\e1`\e0;g\e19$S\e0JQh\e1'\e07Uh\e1c\e0*i\e1\e0!Q\e19\e0:h\e1MB\e0JX\e14\e(B  \e,T$S\e0JQh\e1'JM'$S\e0JQh\e1'K\e0EQ\e1'\e(B
+          \e,T(P`\e0EWh\e1M9`$M\e0Cl\e1`+M\e0Cl\e1\e(B \e,Td;\e0BQ\e1'\e07Uh\e1\e07Uh\e1\e0$h\e1M9\e0"i\e1R'd!E\e(B  \e,Tc\e0Ki\e1EM'c\e0*i\e1$S\e0JQh\e1'\e(B C-v \e,TaEP\e(B ESC v \e,T`\e0>Wh\e1M\e(B
+          \e,T`\e0EWh\e1M9`$M\e0Cl\e1`+M\e0Cl\e1!\e0EQ\e1:AR\e07Uh\e15C'\e09Ui\e1\e(B
+
+     \e,TJSK\e0CQ\e1:$S\e0JQh\e1'\e0MWh\e19\e(B \e,Tf\e(B \e,T"M'\e(B Emacs \e0\e,T!g\e1`\e0*h\e19\e0!Q\e19\e(B  \e,T$S\e0JQh\e1'`K\e0Eh\e1R\e09Ui\e1(PJRARC6`\e0>Th\e1A\e05Q\e1G`\e0EW\e1M!\e(B (argument) 
+\e,T`\e0>Wh\e1M!SK94\e(B \e,T(S9G9$\e0CQi\e1'\e(B \e,Tc9!RC;\e0/T\e1\e0:Q\e1\e05T\e1'R9d\e04i\e1\e(B   \e,T!RC!SK94(S9G9$\e0CQi\e1'\e(B \e,T7Sd\e04i\e1b4B!4\e(B C-u \e,Ta\e0Ei\e1G5RA\e(B
+\e0\e,T4i\e1GB(S9G9$\e0CQi\e1'\e07Uh\e1\e05i\e1M'!RC\e0!h\e1M9\e(B \e,Ta\e0Ei\e1G\e0(V\e1'\e0$h\e1MB!4$S\e0JQh\e1'5RA\e(B
+
+     \e0\e,T5Q\e1GM\e0Bh\e1R'`\e0*h\e19\e(B  \e,T$S\e0JQh\e1'\e(B C-u 8 C-f \e,TKARB\e06V\e1'\e(B \e,Tc\e0Ki\e1`\e0EWh\e1M9d;\e0"i\e1R'K\e09i\e1R\e(B 8 \e0\e,T5Q\e1G\e0MQ\e1!IC\e(B
+
+       >> \e,Tc\e0Ki\e1EM'!SK94(S9G9$\e0CQi\e1'\e07Uh\e1`KARPJAJSK\e0CQ\e1:$S\e0JQh\e1'\e(B C-n \e,TK\e0CW\e1M\e(B C-p \e,T`\e0>Wh\e1M`\e0EWh\e1M9`$M\e0Cl\e1`+M\e0Cl\e1\e(B
+          \e,Tc\e0Ki\e1ARM\e0BYh\e1c!\e0Ei\e1:CC\e07Q\e14\e09Ui\e1c\e0Ki\e1AR!\e07Uh\e1\e0JX\e14`\e07h\e1R\e07Uh\e1(P7Sd\e04i\e1\e(B \e,Tc9!RC`\e0EWh\e1M9`$M\e0Cl\e1`+M\e0Cl\e1$\e0CQi\e1'`\e04U\e1BG\e(B
+
+     \e,TJSK\e0CQ\e1:\e(B C-v \e,TaEP\e(B ESC v \e,T(Pd\e04i\e1<Ea5!\e05h\e1R'd;\e0JQ\e1!`\e0Eg\e1!\e09i\e1MB\e(B  \e,Tc9!C\e03U\e1\e09Ui\e1\e(B \e,T(P`\e0;g\e19!RC`\e0EWh\e1M9K\e09i\e1R(M\e(B
+\e0\e,T"Vi\e19E'\e(B \e,T5RA(S9G9:CC\e07Q\e14a79\e(B
+
+       >> \e,TEM'!4\e(B C-u 3 C-v \e0\e,T4Y\e1\e(B
+
+     \e,T`\e0EWh\e1M9!\e0EQ\e1:\e07Uh\e1`\e0!h\e1Rd\e04i\e1b4B\e(B C-u 3 ESC v
+
+\e,T$S\e0JQh\e1'B!`\e0ET\e1!\e(B
+=========
+
+     \e,T$S\e0JQh\e1'\e(B C-g \e,Tc\e0*i\e1JSK\e0CQ\e1:\e0JQh\e1'B!`\e0ET\e1!$S\e0JQh\e1'\e05h\e1R'\e(B \e,Tf\e(B \e0\e,T7Uh\e1\e05i\e1M'!RC!RC\e0;i\e1M9\e0"i\e1M\e0AY\e1E`\e0>Th\e1A`\e05T\e1A\e(B  \e0\e,T5Q\e1GM\e0Bh\e1R'`\e0*h\e19\e(B
+\e,TCPK\e0Gh\e1R'\e07Uh\e1c\e0Jh\e1\e05Q\e1G`\e0EW\e1M!\e(B (argument) \e,TM\e0BYh\e1\e(B \e,TK\e0CW\e1MCPK\e0Gh\e1R'$S\e0JQh\e1'\e07Uh\e1\e05i\e1M'!RC!4\e0;Xh\e1AAR!!\e0Gh\e1R\e(B 2 \e0\e,T;Xh\e1A\e0"Vi\e19d;\e(B  \e0\e,T6i\e1R\e(B
+\e,TKR!\e05i\e1M'!RCB!`\e0ET\e1!\e(B \e0\e,T!g\e1c\e0Ki\e1!4\e(B C-g
+
+       >> \e,TEM'!SK94(S9G9$\e0CQi\e1'c\e0Ki\e1`\e0;g\e19\e(B 100 \e,Tb4B!RC!4\e(B C-u 100 \e,Ta\e0Ei\e1G!4\e(B C-g \e0\e,T4Y\e1\e(B  \e,TK\e0EQ\e1'(R!\e09Qi\e19\e(B
+          \e,Tc\e0Ki\e1EM'!4\e(B C-f \e0\e,T4Y\e1\e(B \e,Ta\e0Ei\e1G\e0JQ\e1'`!5\e04Y\e1\e0Gh\e1R`$M\e0Cl\e1`+M\e0Cl\e1`\e0EWh\e1M9d;\e0!Uh\e1\e05Q\e1G\e0MQ\e1!IC\e(B  \e,TK\e0CW\e1M5M9\e07Uh\e1>ER4d;!4\e(B
+          ESC \e,Tb4Bd\e0Ah\e1\e05Qi\e1'c(\e(B  \e0\e,T!g\e1JRARC6!4\e(B C-g \e,TB!`\e0ET\e1!d\e04i\e1\e(B
+
+\e0\e,T"i\e1M\e0<T\e14>ER4\e(B (Error)
+================
+
+     \e,Tc9:R'$\e0CQi\e1'\e(B \e,TMR((P\e0AU\e1!RC\e0JQh\e1';\e0/T\e1\e0:Q\e1\e05T\e1'R9:R'M\e0Bh\e1R'\e(B \e0\e,T7Uh\e1\e(B Emacs \e,TBMA\e0CQ\e1:d\e0Ah\e1d\e04i\e1`\e0!T\e14\e0"Vi\e19\e(B  \e0\e,T5Q\e1GM\e0Bh\e1R'`\e0*h\e19\e(B
+\e,T!RC!4$S\e0JQh\e1'$M9b7CE:R'$S\e0JQh\e1'\e(B \e0\e,T7Uh\e1d\e0Ah\e1d\e04i\e1!SK94d\e0Gi\e1c9\e(B Emacs \e0\e,T!g\e1(P7Sc\e0Ki\e1\e(B Emacs \e0\e,TJh\e1'`\e0JU\e1B'`\e05W\e1M9\e(B
+\e,TaEPaJ4'<E\e07Uh\e1:CC\e07Q\e14\e0Eh\e1R'\e0JX\e14"M'(M\e(B \e,T:M!\e0Gh\e1R\e0<T\e14>ER4M\e0Bh\e1R'dC\e(B
+
+     \e,T$S\e0JQh\e1':R'$S\e0JQh\e1'\e07Uh\e1`\e0"U\e1B9d\e0Gi\e1c9`M!JRC)\e0:Q\e1:\e09Ui\e1\e(B \e,TMR(c\e0*i\e1d\e0Ah\e1d\e04i\e1\e0!Q\e1:\e(B Emacs \e,T:R'\e0CXh\e19\e(B (version) \e0\e,T+Vh\e1'(P\e(B
+\e,T7Sc\e0Ki\e1\e0AU\e1!RCaJ4'<E\e0"i\e1M\e0<T\e14>ER4\e(B (error) \e0\e,T"Vi\e19\e(B   \e,Tc9!C\e03U\e1\e09Ui\e1\e(B \e,T"Mc\e0Ki\e1!4\e0;Xh\e1AMPdC\e0!g\e1d\e04i\e1\e(B \e,T`\e0>Wh\e1M`\e0EWh\e1M9d;\e0BQ\e1'\e0Jh\e1G9\e(B
+\e0\e,T5h\e1Md;\e(B
+
+\e0\e,TGT\e19b4\e0Gl\e1\e(B (Window)
+==============
+
+     Emacs \e,TJRARC6`\e0;T\e14\e0GT\e19b4\e0Gl\e1d\e04i\e1>\e0Ci\e1MA\e0!Q\e19KERB\e0GT\e19b4\e0Gl\e1\e(B \e,TaEPc\e0*i\e1\e0GT\e19b4\e0Gl\e1`K\e0Eh\e1R\e09Qi\e19aJ4'<E\e0"i\e1M$GRA\e(B
+\e0\e,T5h\e1R'\e(B \e,Tf\e(B \e,T5RA\e05i\e1M'!RCd\e04i\e1\e(B  \e0\e,T!h\e1M9\e0MWh\e19\e(B \e0\e,T!g\e1$GC(P7S$GRA\e0CYi\e1\e0(Q\e1!\e0!Q\e1:$S\e0JQh\e1'\e(B \e0\e,T7Uh\e1c\e0*i\e1JSK\e0CQ\e1:!RCE:\e0GT\e19b4\e0Gl\e1\e0Jh\e1G9`\e0!T\e19\e(B
+\e,Tc9`GER\e07Uh\e1aJ4'<E\e0EQ\e1>\e08l\e1"M'$S\e0JQh\e1':R'$S\e0JQh\e1'\e(B \e,TK\e0CW\e1M\e(B Help \e,TMM!`\e0JU\e1B\e0!h\e1M9\e(B
+
+     C-x 1             \e,T7Sc\e0Ki\e1`\e0;g\e19\e0GT\e19b4\e0Gl\e1`\e04U\e1BG\e(B
+
+     \e,T$S\e0JQh\e1'\e(B C-x 1 \e,Tc\e0*i\e1JSK\e0CQ\e1:E:\e0GT\e19b4\e0Gl\e1\e0MWh\e19\e(B  \e,Ta\e0Ei\e1G"BRB\e0GT\e19b4\e0Gl\e1\e07Uh\e1\e0AU\e1`$M\e0Cl\e1`+M\e0Cl\e1M\e0BYh\e1\e(B  \e,Tc\e0Ki\e1`\e05g\e1A(M`\e0;g\e19\e(B
+\e0\e,TGT\e19b4\e0Gl\e1`\e04U\e1BG\e(B
+
+       >> \e,Tc\e0Ki\e1`\e0EWh\e1M9`$M\e0Cl\e1`+M\e0Cl\e1AR\e07Uh\e1:CC\e07Q\e14\e09Ui\e1\e(B  \e,Ta\e0Ei\e1G!4\e(B C-u 0 C-l
+
+       >> \e,TEM'!4\e(B C-h k C-f \e0\e,T4Y\e1\e(B  \e,Ta\e0Ei\e1G\e0JQ\e1'`!5\e04Y\e1\e0Gh\e1R\e0GT\e19b4\e0Gl\e1\e09Ui\e1`;\e0EUh\e1B9d;M\e0Bh\e1R'dC\e(B \e,T`\e0AWh\e1M\e0AU\e1\e0GT\e19b4\e0Gl\e1cK\e0Ah\e1\e0+Vh\e1'\e(B
+          \e,TM\e08T\e1:RB\e0GT\e1\e08U\e1c\e0*i\e1$S\e0JQh\e1'\e(B C-f \e,T;CR!/\e0"Vi\e19\e(B
+
+       >> \e,TEM'!4\e(B C-x 1 \e,T`\e0>Wh\e1ME:\e0GT\e19b4\e0Gl\e1\e07Uh\e1b<\e0Eh\e1\e0"Vi\e19ARcK\e0Ah\e1\e(B \e,TMM!\e(B
+
+\e,T!RCa7C!\e(B (insert) \e,TaEP\e(B \e,T!RCE:\e(B (delete)
+===================================
+
+     \e,T:9\e(B Emacs \e,T`CR(PJRARC6\e0>T\e1A\e0>l\e1\e05Q\e1G\e0MQ\e1!IC`\e0"i\e1Rd;d\e04i\e1`EB\e(B \e,T`\e0AWh\e1M\e05i\e1M'!RC\e0>T\e1A\e0>l\e1\e0"i\e1M$GRA\e(B  Emacs \e,T(P\e(B
+\e0\e,T6W\e1M\e0Gh\e1R\e05Q\e1GK\e09Q\e1'\e0JW\e1M\e07Uh\e1AM'`\e0Kg\e19d\e04i\e1\e07X\e1!\e05Q\e1G\e(B (\e,T`\e0*h\e19\e(B 'A' '7' '*' '\e,T!\e(B' \e,TaEP\e0MWh\e19\e(B \e,Tf\e(B) \e,T`\e0;g\e19\e0"i\e1M$GRA\e07Uh\e1\e05i\e1M'!RC(P\e(B
+\e,Ta7C!\e(B (insert) \e,T`\e0"i\e1Rd;5C'\e(B \e,Tf\e(B  \e,T`\e0AWh\e1M(P(::CC\e07Q\e14\e(B \e,Tc\e0Ki\e1!4\e(B <Return> \e,T`\e0>Wh\e1M`\e05T\e1A\e0MQ\e1!IC\e0"Vi\e19:CC\e07Q\e14cK\e0Ah\e1\e(B
+(linefeed character) \e,Ta7C!`\e0"i\e1Rd;\e(B
+
+     \e,Tc\e0Ki\e1!4\e(B <Delete> \e,T`\e0AWh\e1M\e05i\e1M'!RC(PE:\e05Q\e1G\e0MQ\e1!IC\e07Uh\e1`\e0>Th\e1'\e0>T\e1A\e0>l\e1`\e0"i\e1Rd;\e(B  <Delete> \e,TKARB\e06V\e1'\e0;Xh\e1A`\e0"U\e1B9\e(B
+\e,T:9\e0<T\e1GK\e09i\e1Rd\e0Gi\e1\e0Gh\e1R\e(B "Delete"  \e,TK\e0CW\e1M:R'\e07U\e1MR((P`\e0"U\e1B9d\e0Gi\e1\e(B "Rubout" \e0\e,T!g\e1d\e04i\e1\e(B   \e,Tb4B\e07Qh\e1Gd;\e(B <Delete>
+\e,Tc\e0*i\e1JSK\e0CQ\e1:E:\e05Q\e1G\e0MQ\e1!IC\e07Uh\e1M\e0BYh\e1\e0!h\e1M9K\e09i\e1R5SaK\e09h\e1'`$M\e0Cl\e1`+M\e0Cl\e1\e0;Q\e1(\e0(X\e1\e0:Q\e19\e(B
+
+       >> \e,TEM'\e0>T\e1A\e0>l\e1\e05Q\e1G\e0MQ\e1!IC`\e0"i\e1Rd;KERB\e(B \e,Tf\e(B \e0\e,T5Q\e1G\e(B  \e,Ta\e0Ei\e1Gc\e0*i\e1\e(B <Delete> \e,TE:\e05Q\e1G\e0MQ\e1!IC`K\e0Eh\e1R\e09Qi\e19\e07Ti\e1'\e(B
+
+       >> \e,TEM'\e0>T\e1A\e0>l\e1\e0"i\e1M$GRAE'd;c\e0Ki\e1`\e0!T\e19"M:"GR\e(B (right margin)  \e,T`GER\e07Uh\e1\e0>T\e1A\e0>l\e1\e0"i\e1M$GRA`\e0"i\e1Rd;\e(B
+          \e,TBRG`\e0!T\e19$GRA!\e0Gi\e1R'"M'K\e09Vh\e1':CC\e07Q\e14\e(B  \e,T:CC\e07Q\e14\e09Qi\e19\e0!g\e1(P\e(B "\e0\e,T6Y\e1!\e05h\e1M\e(B" \e,Tc\e0Ki\e1BRG`\e0!T\e19K\e09Vh\e1'K\e09i\e1R(M\e(B
+         \e,Tb4Bc\e0Jh\e1`$\e0CWh\e1M'KARB\e(B '\' \e,Td\e0Gi\e1\e07Uh\e1"M:"GR\e0JX\e14\e(B \e,T`\e0>Wh\e1M:M!c\e0Ki\e1\e0CYi\e1\e0Gh\e1R:CC\e07Q\e14\e09Ui\e1\e0BQ\e1'\e0AU\e1\e05h\e1M\e(B  Emacs \e,T(P\e(B
+         \e,T`\e0EWh\e1M9\e(B (scroll) \e,TK\e09i\e1R(M`\e0>Wh\e1Mc\e0Ki\e1`\e0Kg\e195SaK\e09h\e1'\e07Uh\e1!S\e0EQ\e1'a\e0!i\e1d"M\e0BYh\e1d\e04i\e1M\e0Bh\e1R'\e0*Q\e14`(9\e(B  \e0\e,T6i\e1RKR!\e(B
+         \e,T"M:"GRK\e0CW\e1M"M:\e0+i\e1RB"M'\e0AU\e1`$\e0CWh\e1M'KARB\e(B '\' \e,TM\e0BYh\e1\e(B \e0\e,T!g\e1`\e0;g\e19!RC:M!c\e0Ki\e1\e0CYi\e1\e0Gh\e1R\e(B \e,T:CC\e07Q\e14\e09Qi\e19\e0BQ\e1'\e0AU\e1\e05h\e1M\e(B
+         \e,Td;c9\e07T\e1H7R'\e09Qi\e19\e(B \e,Tf\e(B
+
+     \e,TEM';\e0/T\e1\e0:Q\e1\e05T\e1\e04Y\e1`EB\e(B \e,T$'(P\e0*h\e1GBc\e0Ki\e1`\e0"i\e1Rc(\e0'h\e1RB!\e0Gh\e1R!RCM\e08T\e1:RB\e04i\e1GB\e05Q\e1GK\e09Q\e1'\e0JW\e1M\e(B
+
+       >> \e,Tc\e0Ki\e1"\e0BQ\e1:`$M\e0Cl\e1`+M\e0Cl\e1d;d\e0Gi\e1:9:CC\e07Q\e14\e0+Vh\e1'\e06Y\e1!\e05h\e1Mc\e0Ki\e1BRG`\e0!T\e19K\e09Vh\e1'K\e09i\e1R(M\e(B \e0\e,T7Uh\e1`\e0>Th\e1'\e0;i\e1M9`\e0"i\e1Rd;`\e0AWh\e1M\e(B
+          \e0\e,TJQ\e1!$\e0CYh\e1\e09Ui\e1\e(B  \e,Ta\e0Ei\e1Gc\e0*i\e1\e(B C-d \e,TE:\e0"i\e1M$GRAMM!:R'\e0Jh\e1G9\e(B \e,T(9$GRABRG"M'\e0"i\e1M$GRAM\e0BYh\e1@RBc9K\e09Vh\e1'\e(B
+         \e,T:CC\e07Q\e14\e(B  \e0\e,TJQ\e1'`!5\e04Y\e1\e0Gh\e1R`$\e0CWh\e1M'KARB\e(B '\' \e,T(PKRBd;\e(B
+
+       >> \e,Tc\e0Ki\e1`\e0EWh\e1M9`$M\e0Cl\e1`+M\e0Cl\e1d;d\e0Gi\e1\e07Uh\e15SaK\e09h\e1'aC!\e0JX\e14"M':CC\e07Q\e14\e(B \e,Ta\e0Ei\e1G!4\e(B <Delete> \e0\e,T4Y\e1\e(B  \e,T!RC7S\e(B
+          \e,Ta::\e09Ui\e1\e(B \e,T(P7Sc\e0Ki\e1\e0JQ\e1-\e0EQ\e1!I\e03l\e1\e0$Qh\e19CPK\e0Gh\e1R':CC\e07Q\e14\e06Y\e1!E:MM!d;\e(B  \e,T:CC\e07Q\e14\e09Qi\e19\e0!g\e1(P\e06Y\e1!`MRd;\e05h\e1M\e0!Q\e1:\e(B
+         \e,T:CC\e07Q\e14\e0!h\e1M9K\e09i\e1R\e09Qi\e19\e(B \e,TCGA\e0!Q\e19`\e0;g\e19:CC\e07Q\e14BRG:CC\e07Q\e14`\e04U\e1BG\e(B \e,TaEPMR((P\e0AU\e1\e0JQ\e1-\e0EQ\e1!I\e03l\e1\e05h\e1M:CC\e07Q\e14\e(B
+         \e,T;CR!/\e0"Vi\e19\e(B
+
+       >> \e,Tc\e0Ki\e1!4\e(B <Return> \e,T`\e0>Wh\e1M`\e0>Th\e1A\e(B \e0\e,T5Q\e1G\e0MQ\e1!IC\e0"Vi\e19:CC\e07Q\e14cK\e0Ah\e1\e(B \e,T!\e0EQ\e1:d;M\e0Bh\e1R'`\e04T\e1A\e(B
+
+     \e,T$S\e0JQh\e1'\e0Jh\e1G9cK\e0-h\e1"M'\e(B Emacs \e,T(PJRARC6!SK94(S9G9$\e0CQi\e1'\e07Uh\e1\e05i\e1M'!RCc\e0Ki\e1;\e0/T\e1\e0:Q\e1\e05T\e1d\e04i\e1\e(B  \e,TCGA\e07Qi\e1'!RC\e(B
+\e,Ta7C!\e(B (insert) \e0\e,T5Q\e1G\e0MQ\e1!IC\e04i\e1GB\e(B
+
+
+       >> \e,TEM'\e0;i\e1M9$S\e0JQh\e1'\e(B C-u 8 * \e0\e,T4Y\e1\e(B  \e0\e,TJQ\e1'`!5\e04Y\e1\e0Gh\e1R`\e0!T\e14MPdC\e0"Vi\e19\e(B
+
+     \e0\e,T6i\e1R\e05i\e1M'!RC(P`\e0>Th\e1A:CC\e07Q\e14\e0Gh\e1R'\e(B \e,Tf\e(B (blank line) \e,TCPK\e0Gh\e1R'JM':CC\e07Q\e14\e(B  \e,Tc\e0Ki\e1`\e0EWh\e1M9d;\e07Uh\e15SaK\e09h\e1'\e(B
+\e,TaC!\e0JX\e14"M':CC\e07Q\e14\e07Uh\e1JM'\e(B  \e,Ta\e0Ei\e1G!4\e(B C-o
+
+       >> \e,Tc\e0Ki\e1`\e0EWh\e1M9d;\e07Uh\e15SaK\e09h\e1'aC!\e0JX\e14"M':CC\e07Q\e14c4\e0!g\e1d\e04i\e1\e(B  \e,Ta\e0Ei\e1GEM'!4\e(B C-o \e0\e,T4Y\e1\e(B
+
+     \e0\e,T6V\e1'5C'\e09Ui\e1\e(B  \e,T`CR\e0!g\e1d\e04i\e1`\e0CU\e1B9\e0GT\e1\e08U\e1\e0>Wi\e190R9JSK\e0CQ\e1:!RC\e0;i\e1M9\e0"i\e1M$GRA\e(B \e,TaEP!RCa\e0!i\e1\e07Uh\e1\e0<T\e14a\e0Ei\e1G\e(B  \e,T9M!(R!(P\e(B
+\e,TE:d\e04i\e1\e07U\e1EP\e05Q\e1G\e0MQ\e1!ICa\e0Ei\e1G\e(B  \e0\e,TBQ\e1'\e0AU\e1$S\e0JQh\e1'\e0+Vh\e1'JRARC6c\e0*i\e1E:d\e04i\e1c9`\e0;g\e19$S\e(B \e,Tf\e(B \e,TK\e0CW\e1M`\e0;g\e19:CC\e07Q\e14\e(B \e,Tf\e(B \e0\e,TMU\e1!\e04i\e1GB\e(B  \e,TJ\e0CX\e1;\e(B
+\e,T$S\e0JQh\e1'JSK\e0CQ\e1:!RCE:d\e04i\e1\e04Q\e1'\e09Ui\e1\e(B
+
+     <Delete>       \e,TE:\e05Q\e1G\e0MQ\e1!IC\e07Uh\e1M\e0BYh\e1K\e09i\e1R`$M\e0Cl\e1`+M\e0Cl\e1\e(B
+     C-d            \e,TE:\e05Q\e1G\e0MQ\e1!IC\e07Uh\e1M\e0BYh\e1\e07Uh\e1`$M\e0Cl\e1`+M\e0Cl\e1\e(B
+
+     ESC <Delete>   \e,TE:$S\e07Uh\e1M\e0BYh\e1K\e09i\e1R`$M\e0Cl\e1`+M\e0Cl\e1\e(B
+     ESC d          \e,TE:$S\e05Qi\e1'a\e05h\e15SaK\e09h\e1'\e07Uh\e1`$M\e0Cl\e1`+M\e0Cl\e1M\e0BYh\e1\e(B
+
+     C-k            \e,TE::CC\e07Q\e14\e05Qi\e1'a\e05h\e15SaK\e09h\e1'\e07Uh\e1`$M\e0Cl\e1`+M\e0Cl\e1M\e0BYh\e1\e(B
+
+     \e,Tc9:R'$\e0CQi\e1'\e(B \e,T`CRMR(\e05i\e1M'!RC(P`MR\e0Jh\e1G9\e07Uh\e1E:d;!\e0EQ\e1:\e0$W\e19AR\e(B   \e,Tb;Ca!CA\e(B Emacs \e,T(P(S\e0Jh\e1G9\e07Uh\e1E:\e(B
+\e,TMM!d\e0Gi\e1\e(B \e,T`GER\e07Uh\e1E:\e0"i\e1M$GRAc9K\e09h\e1GB\e07Uh\e1AR!!\e0Gh\e1RK\e09Vh\e1'\e05Q\e1G\e0MQ\e1!IC\e(B   \e,Tc\e0Ki\e1c\e0*i\e1$S\e0JQh\e1'\e(B C-y \e,T`GER\e07Uh\e1\e05i\e1M'!RC(P`MR\e(B
+\e0\e,T"i\e1M$GRA!\e0EQ\e1:\e0$W\e19\e(B  \e0\e,TJTh\e1'\e07Uh\e1$GCCP\e0GQ\e1'\e0!g\e1\e0$W\e1M\e(B C-y \e,Td\e0Ah\e1c\e0*h\e1c\e0*i\e1d\e04i\e1`\e0>U\e1B'a\e0$h\e15SaK\e09h\e1'\e07Uh\e1E:\e0"i\e1M$GRAMM!`\e07h\e1R\e09Qi\e19\e(B  \e,Ta\e05h\e1(P\e(B
+\e,Tc\e0*i\e1\e0!Q\e1:5SaK\e09h\e1'c4\e0!g\e1d\e04i\e1\e(B  C-y \e,T`\e0;g\e19$S\e0JQh\e1'JSK\e0CQ\e1:a7C!\e0"i\e1M$GRA\e07Uh\e1`\e0!g\e1:d\e0Gi\e1\e(B \e,TE'c95SaK\e09h\e1'\e07Uh\e1\e0AU\e1`$M\e0Cl\e1`+M\e0Cl\e1M\e0BYh\e1\e(B
+\e,T`CRJRARC6c\e0*i\e1$GRAJRARC6\e09Ui\e1c9!RC`$\e0EWh\e1M9\e0Bi\e1RB\e0"i\e1M$GRAd\e04i\e1\e(B
+
+     \e,T$S\e0JQh\e1'JSK\e0CQ\e1:!RCE:\e0AU\e1M\e0BYh\e1JM'a::\e0$W\e1M\e(B \e,T$S\e0JQh\e1'\e(B "Delete" \e0\e,T!Q\e1:\e(B \e,T$S\e0JQh\e1'\e(B "Kill"  \e,T$S\e0JQh\e1'\e(B "Kill"
+\e,T(P`\e0!g\e1:\e0Jh\e1G9E:MM!d\e0Gi\e1\e(B \e,Ta\e05h\e1$S\e0JQh\e1'\e(B "Delete" \e,T(Pd\e0Ah\e1`\e0!g\e1:\e(B  \e,Ta\e05h\e1\e06i\e1RKR!c\e0*i\e1$S\e0JQh\e1'\e09Ui\e1KERB\e(B \e,Tf\e(B \e,T$\e0CQi\e1'\e(B  \e0\e,T!g\e1(P`\e0!g\e1:\e(B
+\e0\e,TJh\e1G9\e07Uh\e1E:MM!d\e0Gi\e1c\e0Ki\e1\e(B
+
+      >> \e,Tc\e0Ki\e1!4\e(B C-n \e0\e,TJQ\e1!JM'JRA$\e0CQi\e1'\e(B \e,T`\e0>Wh\e1M`\e0EWh\e1M9d;\e0BQ\e1'\e07Uh\e1\e07Uh\e1`KARPJA:9K\e09i\e1R(M\e(B \e,Ta\e0Ei\e1GEM'!4\e(B C-k \e,T`\e0>Wh\e1M\e(B
+         \e,TE::CC\e07Q\e14\e09Qi\e19MM!\e04Y\e1\e(B
+
+     \e,T`\e0AWh\e1M!4\e(B C-k \e,T$\e0CQi\e1'aC!\e(B \e0\e,T"i\e1M$GRAc9:CC\e07Q\e14\e09Qi\e19(P\e06Y\e1!E:MM!\e(B  \e,TaEP`\e0AWh\e1M!4\e0MU\e1!\e(B C-k \e0\e,TMU\e1!$\e0CQi\e1'\e(B \e,T:CC\e07Q\e14\e(B
+\e0\e,T9Qi\e19`M'\e07Qi\e1':CC\e07Q\e14\e0!g\e1(P\e06Y\e1!E:MM!d;\e04i\e1GB\e(B  \e,Ta\e05h\e1\e06i\e1R!SK94(S9G9$\e0CQi\e1'c\e0Ki\e1\e0!Q\e1:$S\e0JQh\e1'\e(B C-k \e0\e,T!g\e1(PKARB\e06V\e1'\e(B \e,Tc\e0Ki\e1E:\e(B
+\e,T:CC\e07Q\e14MM!\e(B (\e0\e,T7Qi\e1'`\e09Wi\e1MKRaEP\e05Q\e1G:CC\e07Q\e14\e(B) \e,T`\e0;g\e19(S9G9:CC\e07Q\e14\e(B \e,T`\e07h\e1R\e0!Q\e1:(S9G9$\e0CQi\e1'\e07Uh\e1!SK94\e(B
+
+     \e,T:CC\e07Q\e14\e07Uh\e1`\e0>Th\e1'E:MM!d;\e(B \e,T(P\e06Y\e1!`\e0!g\e1:d\e0Gi\e1\e(B \e,TaEPJRARC69S!\e0EQ\e1:\e0$W\e19ARd\e04i\e1\e(B \e,Tb4Bc\e0*i\e1$S\e0JQh\e1'\e(B C-y
+
+       >> \e,TEM'!4\e(B C-y \e0\e,T4Y\e1\e(B
+
+     \e0\e,T"i\e1M$GRA\e07Uh\e1\e06Y\e1!E:MM!\e(B \e,Tb4B!RC!4\e(B C-k \e,TKERB\e(B \e,Tf\e(B \e,T$\e0CQi\e1'\e(B  \e,T(P\e06Y\e1!`\e0!g\e1:CG:CGAd\e0Gi\e1\e(B \e,TaEPJRARC69S\e(B
+\e,T!\e0EQ\e1:AR\e07Qi\e1'KA4d\e04i\e1c9$\e0CQi\e1'`\e04U\e1BG\e(B \e,Tb4B!RC!4\e(B C-y
+
+       >> \e,TEM'!4\e(B C-k \e0\e,T4Y\e1KERB\e(B \e,Tf\e(B \e,T$\e0CQi\e1'\e(B
+
+       >> \e,T$S\e0JQh\e1'JSK\e0CQ\e1:`\e0CU\e1B!\e0"i\e1M$GRA!\e0EQ\e1:AR\e(B \e0\e,T$W\e1M\e(B C-y   \e0\e,T!h\e1M9\e0MWh\e19c\e0Ki\e1`\e0EWh\e1M9`$M\e0Cl\e1`+M\e0Cl\e1E'd;\e0"i\e1R'\e0Eh\e1R'\e(B
+          \e0\e,TJQ\e1!JM'JRA:CC\e07Q\e14\e(B  \e,Ta\e0Ei\e1GEM'!4\e(B C-y \e0\e,T4Y\e1\e(B \e0\e,T!g\e1(PJRARC6\e0$Q\e14EM!\e(B (copy) \e0\e,T"i\e1M$GRAd\e04i\e1\e(B
+
+     \e0\e,T6i\e1R5M9\e09Ui\e1`\e0!g\e1:\e0"i\e1M$GRAMPdC:R'M\e0Bh\e1R'd\e0Gi\e1\e(B  \e,Ta\e0Ei\e1GE:\e0"i\e1M$GRA\e0MWh\e19`\e0>Th\e1A`\e0"i\e1Rd;\e0MU\e1!\e(B \e,T(P`\e0!T\e14MPdC\e0"Vi\e19\e(B
+\e,T<E\e0EQ\e1>\e08l\e1\e0$W\e1M\e(B C-y \e,T(P`\e0CU\e1B!\e0$W\e19d\e04i\e1a\e0$h\e1`\e0>U\e1B'\e0"i\e1M$GRA\e07Uh\e1E:MM!$\e0CQi\e1'\e0Eh\e1R\e0JX\e14`\e07h\e1R\e09Qi\e19\e(B
+
+
+       >> \e,TEM'E::CC\e07Q\e14\e04Y\e1K\e09Vh\e1':CC\e07Q\e14\e(B  \e,Ta\e0Ei\e1G`\e0EWh\e1M9`$M\e0Cl\e1`+M\e0Cl\e1d;\e07Uh\e1\e0MWh\e19\e(B  \e,Ta\e0Ei\e1GE::CC\e07Q\e14MM!\e04Y\e1\e0MU\e1!K\e09Vh\e1'\e(B
+          \e,T:CC\e07Q\e14\e(B  \e,TEM'!4\e(B C-y \e0\e,T4Y\e1\e(B \e,Ta\e0Ei\e1G\e0JQ\e1'`!5\e04Y\e1\e0Gh\e1R(Pd\e04i\e1a\e0$h\e1`\e0>U\e1B':CC\e07Q\e14\e07Uh\e1JM'\e0$W\e19`\e07h\e1R\e09Qi\e19\e(B
+
+\e,T!RC\e0MQ\e19\e04Y\e1\e(B (UNDO)
+=============
+
+     \e,T`GER\e07Uh\e1a\e0!i\e1d"\e0"i\e1M$GRA:R'M\e0Bh\e1R'\e(B \e,Ta\e0Ei\e1G\e05i\e1M'!RC(P`;\e0EUh\e1B9!\e0EQ\e1:c\e0Ki\e1`\e0;g\e19M\e0Bh\e1R'`\e04T\e1A\e(B  \e0\e,T!g\e1JRARC67Sd\e04i\e1\e07X\e1!\e(B
+\e,T`\e0AWh\e1M\e04i\e1GB$S\e0JQh\e1'\e(B C-x u   \e,Tb4B;!\e05T\e1\e(B \e,T(Pc\e0*i\e1JSK\e0CQ\e1:B!`\e0ET\e1!$S\e0JQh\e1'\e(B \e0\e,T7Uh\e1\e0;i\e1M9`\e0"i\e1Rd;b4Bd\e0Ah\e1\e05Qi\e1'c(\e(B  \e,TJRARC6c\e0*i\e1\e(B
+\e,T$S\e0JQh\e1'\e09Ui\e1\e0!Uh\e1$\e0CQi\e1'\e0!g\e1d\e04i\e15RA\e05i\e1M'!RC\e(B
+
+       >> \e,TEM'E::CC\e07Q\e14\e09Ui\e1MM!\e04Y\e1\e(B \e0\e,T4i\e1GB$S\e0JQh\e1'\e(B C-k \e,Ta\e0Ei\e1G`\e0CU\e1B!!\e0EQ\e1:\e0$W\e19AR\e04i\e1GB\e(B C-x u
+
+     \e,T$S\e0JQh\e1'\e(B C-_ \e0\e,T!g\e1`\e0;g\e19$S\e0JQh\e1'\e0MQ\e19\e04Y\e1\e0MU\e1!\e0MQ\e19K\e09Vh\e1'\e(B  \e,T$GRAJRARC6`K\e0AW\e1M9\e0!Q\e1:$S\e0JQh\e1'\e(B C-x u
+
+     \e,TJRARC6!SK94(S9G9$\e0CQi\e1'c\e0Ki\e1$S\e0JQh\e1'\e(B C-_ \e,TaEP\e(B C-x u \e,Td\e04i\e1\e(B
+
+
+\e,Ta\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B (File)
+==============
+
+     \e,T`CR(S`\e0;g\e19\e05i\e1M'`\e0!g\e1:\e0CQ\e1!IR\e(B (save) \e0\e,T"i\e1M$GRA\e07Uh\e1a\e0!i\e1d"d\e0Gi\e1c9a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B  \e0\e,T6i\e1R\e05i\e1M'!RC(Pc\e0Ki\e1\e0JTh\e1'\e07Uh\e1\e(B
+\e,Ta\e0!i\e1d"`;\e0EUh\e1B9d;M\e0Bh\e1R'6RGC\e(B  \e,Td\e0Ah\e1`\e0*h\e19\e09Qi\e19\e(B \e0\e,TJTh\e1'\e07Uh\e1a\e0!i\e1d"d;\e0!g\e1(PKRBd;\e(B \e0\e,T7Q\e19\e07U\e1\e07Uh\e1`\e0ET\e1!!RCc\e0*i\e1\e(B Emacs
+
+     \e,Ta\e0?i\e1A\e0"i\e1M\e0AY\e1E\e07Uh\e1AM'`\e0Kg\e19M\e0BYh\e1\e(B \e0\e,T$W\e1M\e0JTh\e1'\e07Uh\e1\e0:Q\e19\e07V\e1!\e0JTh\e1'\e07Uh\e1!S\e0EQ\e1'a\e0!i\e1d"M\e0BYh\e1\e(B  \e,TK\e0CW\e1M\e0>Y\e14\e0'h\e1RB\e(B \e,Tf\e(B \e0\e,T!g\e1\e0$W\e1Ma\e0?i\e1A\e0"i\e1M\e0AY\e1E\e07Uh\e1AM'`\e0Kg\e19\e(B
+\e,TM\e0BYh\e1\e0$W\e1M\e05Q\e1Ga\e0?i\e1A\e0"i\e1M\e0AY\e1E\e07Uh\e1!S\e0EQ\e1'a\e0!i\e1d"M\e0BYh\e1\e(B
+
+     \e,Ta\e05h\e1(9!\e0Gh\e1Ra\e0?i\e1A\e0"i\e1M\e0AY\e1E(P\e06Y\e1!`\e0!g\e1:\e0CQ\e1!IR\e(B (save) \e,TE'd;\e(B  \e,Ta\e0?i\e1A\e0"i\e1M\e0AY\e1E\e07Uh\e1\e06Y\e1!a\e0!i\e1d"M\e0BYh\e1\e(B \e,T(Pd\e0Ah\e1\e06Y\e1!`\e0"U\e1B9\e07Q\e1:\e(B
+\e,TE'd;M\e0Bh\e1R'`\e04g\e14"R4\e(B  \e0\e,TMQ\e19\e09Ui\e1`\e0>Wh\e1M`\e0;g\e19!RC\e0;i\e1M'\e0!Q\e19!RC`\e0"U\e1B9\e07Q\e1:a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e07Uh\e1a\e0!i\e1d"d;a::$\e0CVh\e1'\e(B \e,Tf\e(B \e,T!ER'\e(B \e,Tf\e(B
+\e,Tb4Bd\e0Ah\e1d\e04i\e1\e05Qi\e1'c(\e(B
+
+     \e,T9M!(R!\e09Ui\e1\e(B \e,T`\e0>Wh\e1M`\e0;g\e19!RC\e0;i\e1M'\e0!Q\e19!RC`\e0!g\e1:\e0CQ\e1!IR\e(B (save) \e0\e,TJTh\e1'\e07Uh\e1a\e0!i\e1d"\e0<T\e14d;b4Bd\e0Ah\e1\e05Qi\e1'c(\e(B  Emacs
+\e,T(P`;\e0EUh\e1B9\e0*Wh\e1Ma\e0?i\e1A\e0"i\e1M\e0AY\e1E\e05i\e19)\e0:Q\e1:`\e0!g\e1:d\e0Gi\e1c\e0Ki\e1\e(B \e0\e,T!h\e1M9!RC`\e0!g\e1:\e0CQ\e1!IR\e(B
+
+\e,TKARB`K\e05X\e1\e(B:       Emacs \e0\e,TBQ\e1'\e0AU\e1!RC\e0;i\e1M'\e0!Q\e19\e0MX\e1\e0:Q\e1\e05T\e1`K\e05X\e1\e07Uh\e1$R4d\e0Ah\e1\e06V\e1'\e(B \e,Tb4B!RC`\e0!g\e1:\e0CQ\e1!IRa\e0?i\e1A\e0"i\e1M\e0AY\e1E\e07Uh\e1!S\e0EQ\e1'\e(B
+               \e,Ta\e0!i\e1d"M\e0BYh\e1`\e0;g\e19CPBP\e(B \e,Tf\e(B \e,Tb4Bc\e0*i\e1\e0*Wh\e1Ma\e0?i\e1A\e0"i\e1M\e0AY\e1E\e05h\e1R'\e0!Q\e19\e(B  \e0\e,T4i\e1GB\e0GT\e1\e08U\e1\e09Ui\e1\e(B \e,T(P7Sc\e0Ki\e1JRARC6E4\e(B
+               \e,T$GRA`\e0JU\e1BKRB\e07Uh\e1MR(`\e0!T\e14\e0"Vi\e19d\e04i\e1\e(B  \e,Tc\e0Ki\e1\e09i\e1MB\e07Uh\e1\e0JX\e14`\e07h\e1R\e07Uh\e1(P7Sd\e04i\e1\e(B
+
+     \e,T5C'\e0Jh\e1G9\e0Eh\e1R'"M'(M\e(B \e,T(P\e0AU\e1:CC\e07Q\e14bKA4\e(B (mode line) \e,Tc9\e0EQ\e1!I3P\e0"i\e1R'\e0Eh\e1R'aJ4'M\e0BYh\e1\e(B
+
+
+(\e0\e,T5Q\e1GM\e0Bh\e1R'\e(B) [--]J:--**-Mule: TUTORIAL.th    (Fundamental) ---55%--------------
+
+
+     \e,T)\e0:Q\e1:JS`9R"M'\e(B Tutorial \e,T"M'\e(B Emacs \e0\e,T7Uh\e1!S\e0EQ\e1'\e0Mh\e1R9M\e0BYh\e1\e09Ui\e1\e0*Wh\e1M\e(B TUTORIAL.th  \e,T`GER\e07Uh\e1\e0JQh\e1'c\e0Ki\e1KR\e(B
+\e,Ta\e0?i\e1A\e0"i\e1M\e0AY\e1EK\e0CW\e1M\e(B find-file (\e0\e,T$i\e19KRa\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B \e,Ta\e0Ei\e1G\e0Mh\e1R9`\e0"i\e1RARc9\e0:Q\e1?`?M\e0Cl\e1\e(B) \e0\e,T!g\e1(PaJ4'\e0*Wh\e1Ma\e0?i\e1A\e0"i\e1M\e0AY\e1Ed\e0Gi\e1\e(B
+\e,T5C'\e0Jh\e1G9\e(B TUTORIAL.th  \e0\e,T5Q\e1GM\e0Bh\e1R'`\e0*h\e19\e(B \e0\e,T6i\e1R\e0JQh\e1'c\e0Ki\e1KRa\e0?i\e1A\e0"i\e1M\e0AY\e1E\e0*Wh\e1M\e(B new-file  \e,T:CC\e07Q\e14bKA4\e0!g\e1(PaJ4'\e(B
+\e,T<E\e0Gh\e1R\e(B "Mule: new-file"
+
+\e,TKARB`K\e05X\e1\e(B:       \e,T(P\e0AU\e1$SM\e08T\e1:RB`\e0>Th\e1A`\e05T\e1A`\e0!Uh\e1BG\e0!Q\e1::CC\e07Q\e14bKA4\e(B (mode line) \e,Tc95M9K\e0EQ\e1'\e(B
+
+     \e,T$S\e0JQh\e1'c\e0Ki\e1KRa\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B \e,TaEP$S\e0JQh\e1'c\e0Ki\e1`\e0!g\e1:\e0CQ\e1!IRa\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B \e0\e,TAU\e1\e0EQ\e1!I3Pa5!\e05h\e1R'(R!$S\e0JQh\e1'\e07Uh\e1\e0<h\e1R9\e(B \e,Tf\e(B \e,TAR\e(B
+\e,T5C'\e07Uh\e1\e(B \e,T;CP!M:d;\e04i\e1GB\e(B 2 \e0\e,T5Q\e1G\e0MQ\e1!IC\e(B \e0\e,T$W\e1M\e05i\e1M'!4$S\e0JQh\e1':R'M\e0Bh\e1R'\e(B \e,T5RAK\e0EQ\e1'$S\e0JQh\e1'\e(B C-x \e0\e,T+Vh\e1'KARB\e06V\e1'$S\e0JQh\e1'\e(B
+\e,T`\e0!Uh\e1BG\e0!Q\e1:a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B
+
+     \e,TaEP\e0MU\e1!\e0(X\e14K\e09Vh\e1'\e(B \e,Ta\e05h\e1a5!\e05h\e1R'(R!$S\e0JQh\e1'\e07Uh\e1\e0<h\e1R9AR\e0$W\e1M\e(B \e,T`GER\e0JQh\e1'c\e0Ki\e1\e0$i\e19KRa\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B \e,T`CR(P\e06Y\e1!\e(B Emacs
+\e,T6RA\e0*Wh\e1M"M'a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e09Qi\e19\e(B \e,Tf\e(B  \e,T`CR`\e0CU\e1B!$S\e0JQh\e1'`K\e0Eh\e1R\e09Qi\e19\e0Gh\e1R\e(B \e,T$S\e0JQh\e1';CP`@7\e07Uh\e16RA\e05Q\e1G`\e0EW\e1M!\e(B (argument)
+\e,T(R!`7M\e0Cl\e1\e0AT\e1\e09Q\e1E\e(B
+
+\e,TKARB`K\e05X\e1\e(B:       \e,Tc9\e07Uh\e1\e09Ui\e1\e(B \e0\e,T5Q\e1G`\e0EW\e1M!\e(B (argument) \e0\e,T$W\e1M\e0*Wh\e1Ma\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B
+
+                    C-x C-f   \e0\e,TJQh\e1'c\e0Ki\e1KR\e(B (find) \e,Ta\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B
+
+     \e,Ta\e0Ei\e1G\e(B Emacs \e,T(P6RA\e0*Wh\e1M"M'a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B \e,Tb4B;CR!/\e0"Vi\e19\e07Uh\e1\e0Jh\e1G9\e0Eh\e1R'"M'(M\e(B  \e,T`CR`\e0CU\e1B!\e0Jh\e1G9\e07Uh\e1c\e0Ki\e1\e0;i\e1M9\e(B
+\e0\e,T*Wh\e1Ma\e0?i\e1A\e0"i\e1M\e0AY\e1E\e09Qi\e19\e0Gh\e1R\e(B \e0\e,TAT\e1\e09T\e1\e0:Q\e1?`?M\e0Cl\e1\e(B (mini buffer)  \e0\e,TAT\e1\e09T\e1\e0:Q\e1?`?M\e0Cl\e1(P\e06Y\e1!c\e0*i\e1'R9c9\e0EQ\e1!I3P\e09Ui\e1\e(B  \e0\e,TAT\e1\e09T\e1\e0:Q\e1?`?M\e0Cl\e1\e(B
+\e,T(PKA4K\e09i\e1R\e07Uh\e1aEPKRBd;\e(B \e,TK\e0EQ\e1'(R!\e07Uh\e1\e0;i\e1M9\e0*Wh\e1Ma\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B \e,Ta\e0Ei\e1G!4\e0;Xh\e1A\e(B <Return> 
+
+       >> \e,TEM'!4\e(B C-x C-f \e,Ta\e0Ei\e1G5RA\e04i\e1GB\e(B C-g \e0\e,T4Y\e1\e(B  \e,T`\e0;g\e19!RC\e0JQh\e1'B!`\e0ET\e1!`\e09Wi\e1MKRc9\e0AT\e1\e09T\e1\e0:Q\e1?`?M\e0Cl\e1\e(B \e,TK\e0CW\e1M\e(B
+          \e,TB!`\e0ET\e1!$S\e0JQh\e1'\e(B C-x C-f  \e0\e,T4Q\e1'\e09Qi\e19\e(B Emacs \e,T(Pd\e0Ah\e1\e0$i\e19KRa\e0?i\e1A\e0"i\e1M\e0AY\e1Ec4\e(B \e,Tf\e(B
+
+     \e,T$CRG\e09Ui\e1\e(B \e,TAREM'`\e0!g\e1:\e0CQ\e1!IRa\e0?i\e1A\e0"i\e1M\e0AY\e1E\e04Y\e1\e(B  \e,T`GER\e07Uh\e1\e05i\e1M'!RC`\e0!g\e1:\e0CQ\e1!IR\e0JTh\e1'\e07Uh\e1a\e0!i\e1d"AR(9\e06V\e1'5M9\e09Ui\e1\e(B \e0\e,T!g\e1c\e0Ki\e1c\e0*i\e1\e(B
+\e,T$S\e0JQh\e1'\e04Q\e1'\e09Ui\e1\e(B
+
+     C-x C-s   \e,T`\e0!g\e1:\e0CQ\e1!IR\e(B (save) \e,Ta\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B
+
+     \e,Ta\e0Ei\e1G`\e09Wi\e1MKR\e07Uh\e1M\e0BYh\e1c9\e(B Emacs \e0\e,T!g\e1(P\e06Y\e1!`\e0"U\e1B9E'd;\e07Uh\e1a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B  \e,T`GER`\e0!g\e1:\e0CQ\e1!IRa\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B \e,Ta\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B
+\e0\e,T5i\e19)\e0:Q\e1:(Pd\e0Ah\e1\e0JY\e1-KRBd;\e(B \e,Ta\e05h\e1(P\e06Y\e1!`\e0!g\e1:d\e0Gi\e1c9\e0*Wh\e1McK\e0Ah\e1\e(B  \e0\e,T+Vh\e1'd\e04i\e1AR(R!\e0*Wh\e1M`\e0!h\e1R\e07Uh\e1\e05h\e1M\e07i\e1RB\e04i\e1GB\e(B '~'
+
+     \e,TK\e0EQ\e1'(R!\e07Uh\e1`\e0!g\e1:\e0CQ\e1!IRa\e0?i\e1A\e0"i\e1M\e0AY\e1E`J\e0Cg\e1(a\e0Ei\e1G\e(B  Emacs \e0\e,T!g\e1(PaJ4'\e0*Wh\e1Ma\e0?i\e1A\e0"i\e1M\e0AY\e1E\e07Uh\e1`\e0!g\e1:c\e0Ki\e1\e04Y\e1\e(B
+
+       >> \e,TEM'!4\e(B C-x C-x \e,T`\e0>Wh\e1M`\e0!g\e1:\e0CQ\e1!IRJS`9R"M'\e(B Tutorial \e0\e,T9Ui\e1\e04Y\e1\e(B  \e0\e,T!g\e1(P`\e0Kg\e19\e0Gh\e1R\e(B \e0\e,T7Uh\e1\e0Jh\e1G9\e0Eh\e1R'\e(B
+          \e,T"M'(M\e(B \e0\e,TAU\e1\e0"i\e1M$GRA\e0Gh\e1R\e(B "Wrote ...../TUTORIAL.th" \e,T;CR!/\e0"Vi\e19\e(B
+
+     \e,T`GER\e07Uh\e1(PJ\e0Ci\e1R'a\e0?i\e1A\e0"i\e1M\e0AY\e1EcK\e0Ah\e1\e(B  \e0\e,T!g\e1c\e0Ki\e17SCRG\e0!Q\e1:\e0Gh\e1R(P\e0$i\e19KR\e(B (find-file) \e,Ta\e0?i\e1A\e0"i\e1M\e0AY\e1E`\e0!h\e1R\e0+Vh\e1'\e0AU\e1\e(B
+\e,TM\e0BYh\e1\e0!h\e1M9K\e09i\e1R\e09Ui\e1a\e0Ei\e1G\e(B  \e,Ta\e0Ei\e1G\e0>T\e1A\e0>l\e1\e0"i\e1M$GRAE'd;c9a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e07Uh\e1KR`(M\e(B
+
+     \e,TaEP`GER\e07Uh\e1\e0JQh\e1'`\e0!g\e1:\e0CQ\e1!IRa\e0?i\e1A\e0"i\e1M\e0AY\e1E`\e07h\e1R\e09Qi\e19\e(B  \e0\e,T$W\e1M5M9\e07Uh\e1\e(B Emacs \e,T(P`\e0!g\e1:`\e09Wi\e1MKR\e07Uh\e1a\e0!i\e1d"AR\e07Qi\e1'KA4\e(B \e,TE'\e(B
+\e,Tc9a\e0?i\e1A\e0"i\e1M\e0AY\e1E`\e0;g\e19$\e0CQi\e1'aC!\e(B
+
+
+\e0\e,T:Q\e1?`?M\e0Cl\e1\e(B (Buffer)
+===============
+
+     \e0\e,T6i\e1RKR!\e0JQh\e1'c\e0Ki\e1KRa\e0?i\e1A\e0"i\e1M\e0AY\e1E\e0MQ\e19\e07Uh\e1JM'\e(B \e0\e,T4i\e1GB$S\e0JQh\e1'\e(B C-x C-f  \e,T`\e09Wi\e1MKR"M'a\e0?i\e1A\e0"i\e1M\e0AY\e1EaC!\e(B \e0\e,T!g\e1(P\e0BQ\e1'$'\e(B
+\e0\e,T6Y\e1!`\e0!g\e1:\e0CQ\e1!IRM\e0BYh\e1c9\e(B Emacs  \e0\e,TJTh\e1'\e07Uh\e1`\e0!g\e1:\e0CQ\e1!IRa\e0?i\e1A\e0"i\e1M\e0AY\e1E\e07Uh\e1\e0Mh\e1R9`\e0"i\e1RAR\e(B \e0\e,T+Vh\e1'M\e0BYh\e1@RBc9\e(B Emacs \e,T`\e0CU\e1B!\e0Gh\e1R\e(B
+\e0\e,T:Q\e1?`?M\e0Cl\e1\e(B (Buffer)  \e,T`GER\e07Uh\e1\e0Mh\e1R9a\e0?i\e1A\e0"i\e1M\e0AY\e1EcK\e0Ah\e1`\e0"i\e1RAR\e(B Emacs \e0\e,T!g\e1(PJ\e0Ci\e1R'\e0:Q\e1?`?M\e0Cl\e1cK\e0Ah\e1\e(B \e0\e,T"Vi\e19AR@RBc9\e(B
+
+     \e0\e,T6i\e1R\e05i\e1M'!RC(P\e04Y\e1CRB!RC"M'\e0:Q\e1?`?M\e0Cl\e1\e(B \e0\e,T7Uh\e1\e06Y\e1!`\e0!g\e1:\e0CQ\e1!IRM\e0BYh\e1@RBc9\e(B Emacs  \e0\e,T!g\e1c\e0Ki\e1!4$S\e0JQh\e1'\e(B
+
+     C-x C-b
+
+       >> \e,TEM'!4\e(B C-x C-b \e0\e,T4Y\e1\e(B  \e0\e,TJQ\e1'`!5\e04Y\e1\e0Gh\e1Ra\e05h\e1EP\e0:Q\e1?`?M\e0Cl\e1\e0AU\e1\e0*Wh\e1M\e0Gh\e1RMPdC\e(B  \e,TaEP\e06Y\e1!\e05Qi\e1'\e0*Wh\e1Md\e0Gi\e1\e0Gh\e1R\e(B
+          \e,TM\e0Bh\e1R'dC\e(B \e,Tc9\e(B Emacs
+
+     \e0\e,TAU\e1:R'\e0:Q\e1?`?M\e0Cl\e1\e(B \e0\e,T7Uh\e1d\e0Ah\e1\e0AU\e1\e0$Yh\e1\e0!Q\e1:a\e0?i\e1A\e0"i\e1M\e0AY\e1E(\e0CT\e1'\e(B \e,Tf\e(B  \e0\e,T5Q\e1GM\e0Bh\e1R'`\e0*h\e19\e(B \e,Td\e0Ah\e1\e0AU\e1a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e07Uh\e1\e0AU\e1\e0*Wh\e1M\e0Gh\e1R\e(B "*Buffer
+List*" \e,TM\e0BYh\e1(\e0CT\e1'\e(B \e,Tf\e(B  \e,Ta\e05h\e1`\e0;g\e19\e0:Q\e1?`?M\e0Cl\e1\e07Uh\e1J\e0Ci\e1R'\e0"Vi\e19AR`\e0>Wh\e1MaJ4'CRB!RC\e0:Q\e1?`?M\e0Cl\e1\e(B \e,Tb4B$S\e0JQh\e1'\e(B C-x C-b
+
+     \e0\e,T"i\e1M$GRA\e07X\e1!\e0"i\e1M$GRA\e07Uh\e1;CR!/M\e0BYh\e1c9\e0GT\e19b4\e0Gl\e1"M'\e(B Emacs \e0\e,T9Qi\e19\e(B \e,T(PM\e0BYh\e1c9\e0:Q\e1?`?M\e0Cl\e1c4\e0:Q\e1?`?M\e0Cl\e1K\e09Vh\e1'`JAM\e(B
+
+       >> \e,TEM'!4\e(B C-x 1 \e,T`\e0>Wh\e1ME:CRB!RC\e0:Q\e1?`?M\e0Cl\e1MM!\e04Y\e1\e(B
+
+     \e,T!RC`\e0CU\e1B!a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e0MWh\e19\e0"Vi\e19ARa\e0!i\e1d"\e(B \e,T5M9\e07Uh\e1!S\e0EQ\e1'a\e0!i\e1d"a\e0?i\e1A\e0"i\e1M\e0AY\e1EK\e09Vh\e1'M\e0BYh\e1\e09Qi\e19\e(B  \e,T(Pd\e0Ah\e17Sc\e0Ki\e1a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B
+\e,TaC!\e06Y\e1!`\e0!g\e1:\e0CQ\e1!IR\e(B  \e0\e,TJTh\e1'\e07Uh\e1a\e0!i\e1d"d;c9a\e0?i\e1A\e0"i\e1M\e0AY\e1EaC!(P\e06Y\e1!\e0:Q\e19\e07V\e1!d\e0Gi\e1c9\e0:Q\e1?`?M\e0Cl\e1"M'a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e09Qi\e19\e(B \e,T`\e07h\e1R\e09Qi\e19\e(B
+
+     \e,T!RCJ\e0Ci\e1R'\e0:Q\e1?`?M\e0Cl\e1cK\e0Ah\e1\e0"Vi\e19\e(B \e,TJSK\e0CQ\e1:a\e0!i\e1d"a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e0MQ\e19\e07Uh\e1JM'\e(B \e,Ta\e0Ei\e1Ga\e0!i\e1MPdC:R'M\e0Bh\e1R'c9\e0:Q\e1?`?M\e0Cl\e1\e09Qi\e19\e(B
+\e,T(Pd\e0Ah\e1\e0AU\e1<Ec4\e(B \e,Tf\e(B \e0\e,T5h\e1M\e0:Q\e1?`?M\e0Cl\e1"M'a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e0MQ\e19\e07Uh\e1K\e09Vh\e1'\e07Qi\e1'\e0JTi\e19\e(B  \e0\e,T(X\e14\e09Ui\e17Sc\e0Ki\e1JRARC6`\e0!g\e1:a\e0?i\e1A\e0"i\e1M\e0AY\e1EaC!d\e0Gi\e1`\e0>Wh\e1M\e(B
+\e,Ta\e0!i\e1d"c95M9K\e0EQ\e1'\e(B
+
+     \e,Ta\e05h\e1`GER\e07Uh\e1\e05i\e1M'!RC(P`\e0!g\e1:\e0CQ\e1!IR\e(B (save) \e0\e,T:Q\e1?`?M\e0Cl\e1E'd;c9a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B \e0\e,T4i\e1GB$S\e0JQh\e1'\e(B C-x C-s \e0\e,T9Qi\e19\e(B
+\e,T(P\e05i\e1M'J\e0GT\e17\e0+l\e1d;\e0BQ\e1'\e0:Q\e1?`?M\e0Cl\e1\e07Uh\e1\e05i\e1M'!RC(P`\e0!g\e1:\e(B \e0\e,T4i\e1GB$S\e0JQh\e1'\e(B C-x C-f \e0\e,T+Vh\e1'\e0$h\e1M9\e0"i\e1R'\e0BXh\e1'BR!\e(B  \e,T`CR\e0AU\e1$S\e0JQh\e1'\e0+Vh\e1'\e(B
+\e,Tc\e0*i\e1JSK\e0CQ\e1:!RC\e09Ui\e1b4B`)>RP\e(B \e0\e,T$W\e1M\e(B
+
+     C-x s   \e,T`\e0!g\e1:\e0CQ\e1!IR\e(B (save) \e0\e,T7X\e1!\e0:Q\e1?`?M\e0Cl\e1\e07Uh\e1\e0AU\e1M\e0BYh\e1\e(B
+
+     C-x s \e,T(P`\e0!g\e1:\e0CQ\e1!IR\e07X\e1!\e0:Q\e1?`?M\e0Cl\e1\e07Uh\e1\e06Y\e1!a\e0!i\e1d"`\e09Wi\e1MKRd;\e(B \e,TE'c9a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B \e,Tb4B(P6RA\e0!h\e1M9\e0Gh\e1R(Pc\e0Ki\e1\e(B
+\e,T`\e0!g\e1:\e0:Q\e1?`?M\e0Cl\e1\e09Ui\e1dKA\e(B y \e,TK\e0CW\e1M\e(B n \e0\e,T!Q\e1:\e0:Q\e1?`?M\e0Cl\e1a\e05h\e1EP\e0:Q\e1?`?M\e0Cl\e1\e(B  \e,T$S6RA(P;CR!/c9\e0Jh\e1G9\e0Eh\e1R'"M'K\e09i\e1R(M\e(B \e0\e,T4Q\e1'\e(B
+\e0\e,T5Q\e1GM\e0Bh\e1R'\e09Ui\e1\e(B
+
+             Save file  /usr/private/yours/TUTORIAL.th? (y or n)
+
+
+
+\e,T!RC"BRB$S\e0JQh\e1'\e(B (extension)
+=======================
+
+     \e,Tc9b;Ca!CA\e(B Editor \e0\e,T9Ui\e1\e(B \e0\e,TAU\e1(S9G9$S\e0JQh\e1'AR!!\e0Gh\e1R\e(B \e,T(S9G9$S\e0JQh\e1'\e0+Vh\e1'JRARC6!4d\e04i\e1b4B\e0;Xh\e1A$M9b7CE\e(B
+\e,TK\e0CW\e1M\e0;Xh\e1A\e(B META \e,Td\e04i\e1KA4\e(B  \e,T$S\e0JQh\e1'"BRB\e(B (eXtend) \e0\e,TAU\e1d\e0Gi\e1`\e0>Wh\e1Mc\e0Ki\e1JRARC6c\e0*i\e1$S\e0JQh\e1'`K\e0Eh\e1R\e09Ui\e1d\e04i\e1KA4\e(B \e0\e,TAU\e1M\e0BYh\e1\e(B 2
+\e,Ta::\e(B \e0\e,T4Q\e1'\e09Ui\e1\e(B
+
+     C-x     \e,T"BRB`\e0>Th\e1A\e04i\e1GB\e05Q\e1G\e0MQ\e1!IC\e(B \e,TJSK\e0CQ\e1:!4\e05Q\e1G\e0MQ\e1!IC5RA`\e0"i\e1Rd;\e(B 1 \e0\e,T5Q\e1G\e(B
+     ESC x   \e,T"BRB`\e0>Th\e1A\e04i\e1GB\e0*Wh\e1M$S\e0JQh\e1'\e(B \e,TJSK\e0CQ\e1:!4\e0*Wh\e1M$S\e0JQh\e1'5RA`\e0"i\e1Rd;\e07Qi\e1'KA4\e(B
+
+     \e,T$S\e0JQh\e1';CP`@7\e09Ui\e1\e(B \e0\e,T!g\e1`\e0;g\e19$S\e0JQh\e1'\e07Uh\e1\e0AU\e1;CPbB*\e09l\e1\e(B  \e,Ta\e05h\e1\e0Jh\e1G9cK\e0-h\e1(P\e06Y\e1!`\e0CU\e1B!c\e0*i\e1\e(B \e0\e,T9i\e1MB$\e0CQi\e1'!\e0Gh\e1R$S\e0JQh\e1'\e07Qh\e1Gd;\e(B
+\e0\e,T5Q\e1GM\e0Bh\e1R'`\e0*h\e19\e(B \e,T$S\e0JQh\e1'KRa\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B (find) C-x C-f  \e,T$S\e0JQh\e1'`\e0!g\e1:\e0CQ\e1!IRa\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B (save) C-x C-s
+\e,T$S\e0JQh\e1'\e(B C-x C-c (\e,T`\e0ET\e1!\e(B Editor) \e0\e,T5h\e1R'\e0!g\e1`\e0;g\e19K\e09Vh\e1'c9$S\e0JQh\e1'`K\e0Eh\e1R\e09Ui\e1\e(B
+
+     \e,T$S\e0JQh\e1'\e(B C-z \e,T`\e0;g\e19$S\e0JQh\e1'\e07Uh\e1c\e0*i\e1c9c9!RCMM!(R!\e(B Emacs \e0\e,T$h\e1M9\e0"i\e1R'\e0:h\e1MB\e(B  \e,T$S\e0JQh\e1'\e09Ui\e1(Pd\e0Ah\e1B!`\e0ET\e1!\e(B
+Emacs \e,T`EB\e07U\e1`\e04U\e1BG\e(B \e,Ta\e05h\e1(PK\e0BX\e14\e(B Emacs \e,Td\e0Gi\e1\e0*Qh\e1G$CRG\e(B \e,T`\e0>Wh\e1Mc\e0Ki\e1JRARC6!\e0EQ\e1:d;c\e0*i\e1\e(B csh \e,Td\e04i\e1\e0MU\e1!\e(B  \e,T!RC!4\e(B
+C-z \e0\e,T(V\e1'`\e0;g\e19!RCK\e0BX\e14\e(B Emacs \e,Td\e0Gi\e1\e0*Qh\e1G$CRG`\e07h\e1R\e09Qi\e19\e(B \e,T(Pd\e0Ah\e17S$GRA`\e0JU\e1BKRBc\e0Ki\e1\e0!Q\e1:`\e09Wi\e1MKR\e07Uh\e1a\e0!i\e1d"d;\e(B
+
+\e,TKARB`K\e05X\e1\e(B:       \e,Ta\e05h\e17\e0Gh\e1R\e(B \e,Tc9!C\e03U\e1\e07Uh\e1c\e0*i\e1:9\e(B X-window \e,TK\e0CW\e1Mc\e0*i\e1\e(B sh \e,TM\e0BYh\e1\e(B \e0\e,T!g\e1(Pd\e0Ah\e1\e0AU\e1$GRAJRARC6\e09Ui\e1\e(B
+
+
+     \e,T$S\e0JQh\e1';CP`@7\e(B C-x \e0\e,TAU\e1AR!ARBKERB$S\e0JQh\e1'\e(B  \e,T$S\e0JQh\e1'\e07Uh\e1M\e08T\e1:RBd;a\e0Ei\e1G\e0AU\e1\e04Q\e1'\e09Ui\e1\e(B
+
+     C-x C-f   \e,TKRa\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B (find) \e,TJSK\e0CQ\e1:a\e0!i\e1d"\e(B
+     C-x C-s   \e,T`\e0!g\e1:\e0CQ\e1!IRa\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B (save)
+     C-x C-b   \e,TaJ4'CRB!RC\e0:Q\e1?`?M\e0Cl\e1\e(B (buffer list)
+     C-x C-c   \e,T`\e0ET\e1!!RCc\e0*i\e1\e(B Editor \e,TaEP`\e0!g\e1:\e0CQ\e1!IRa\e0?i\e1A\e0"i\e1M\e0AY\e1Eb4B\e0MQ\e15b9\e0AQ\e1\e05T\e1\e(B  \e,Ta\e05h\e1\e06i\e1RKR!\e0AU\e1a\e0?i\e1A\e(B
+               \e0\e,T"i\e1M\e0AY\e1E:R'\e0MQ\e19\e06Y\e1!a\e0!i\e1d"\e(B  \e0\e,T!g\e1c\e0Ki\e16RA\e0Gh\e1R(P`\e0!g\e1:\e0CQ\e1!IRa\e0?i\e1A\e0"i\e1M\e0AY\e1E\e09Qi\e19dKA\e(B  \e,Tb4B\e07Qh\e1Gd;\e(B
+               \e,T!RCMM!(R!\e(B Emacs \e,T7Sd\e04i\e1b4B$S\e0JQh\e1'\e(B C-x C-s C-x C-c \e0\e,T$W\e1Mc\e0Ki\e1`\e0!g\e1:\e0CQ\e1!IR\e(B
+               \e0\e,T!h\e1M9a\e0Ei\e1G\e0(V\e1'`\e0ET\e1!\e(B
+
+     \e,T$S\e0JQh\e1'"BRB`\e0>Th\e1Aa::\e0*Wh\e1M\e09Qi\e19\e(B \e,Tc\e0*i\e1JSK\e0CQ\e1:$S\e0JQh\e1'\e07Uh\e1d\e0Ah\e1\e0$h\e1MBd\e04i\e1c\e0*i\e1\e(B \e,TK\e0CW\e1M$S\e0JQh\e1'\e07Uh\e1c\e0*i\e1`)>RP\e0!Q\e1:bKA4\e0>T\e1`HI:R'\e(B
+\e,TbKA4\e(B  \e0\e,T5Q\e1GM\e0Bh\e1R'`\e0*h\e19\e(B \e,T$S\e0JQh\e1'\e(B "command-apropos" \e0\e,T+Vh\e1'(P6RA\e(B \e0\e,T$U\e1\e0Bl\e1`\e0GT\e1\e0Cl\e14\e(B (keyword) \e,Ta\e0Ei\e1GaJ4'<E\e(B
+\e,T$S\e0JQh\e1'\e07X\e1!$S\e0JQh\e1'\e07Uh\e1\e0AU\e1\e0*Wh\e1M`\e0!Uh\e1BG\e0"i\e1M'\e0!Q\e1:\e0!Q\e1:\e0$U\e1\e0Bl\e1`\e0GT\e1\e0Cl\e14\e09Qi\e19\e(B  \e,T`GER(P\e0JQh\e1'$S\e0JQh\e1'\e09Ui\e1\e(B \e0\e,T!g\e1c\e0Ki\e1!4\e(B ESC x \e,Ta\e0Ei\e1G(P\e0AU\e1\e05Q\e1G\e0MQ\e1!IC\e(B
+"M-x" \e,T;CR!/\e0"Vi\e19\e07Uh\e1\e0Jh\e1G9\e0Eh\e1R'"M'(M\e(B  \e,T(R!\e09Qi\e19\e0!g\e1c\e0Ki\e1c\e0Jh\e1\e0*Wh\e1M$S\e0JQh\e1'\e07Uh\e1\e05i\e1M'!RC\e(B (\e,Tc9!C\e03U\e1\e09Ui\e1\e0$W\e1M\e(B
+"command-apropos")  \e,T`\e0AWh\e1M\e0;i\e1M9\e0"i\e1M\e0AY\e1Ed;\e06V\e1'\e(B "command-a" \e,Ta\e0Ei\e1G!4\e(B SPACE BAR \e0\e,TJh\e1G9\e07Uh\e1`K\e0EW\e1M"M'\e(B
+\e0\e,T*Wh\e1M$S\e0JQh\e1'\e0!g\e1(P\e06Y\e1!`\e05T\e1A`\e05g\e1A\e(B (completion) \e,Tc\e0Ki\e1`M'b4B\e0MQ\e15b9\e0AQ\e1\e05T\e1\e(B   \e,TK\e0EQ\e1'(R!\e09Qi\e19\e(B \e,T(P\e06Y\e1!6RA\e0$U\e1\e0Bl\e1`\e0GT\e1\e0Cl\e14\e(B \e0\e,T!g\e1c\e0Ki\e1\e(B
+\e,T!4JRB\e0MQ\e1!"CP\e(B (string) \e0\e,T7Uh\e1\e05i\e1M'!RC\e0CYi\e1E'd;\e(B  \e0\e,T5i\e1M'd\e0Ah\e1c\e0Jh\e1\e0$U\e1\e0Bl\e1`\e0GT\e1\e0Cl\e14MPdC`EB\e(B \e0\e,T!g\e1(Pd\e04i\e1$S\e0JQh\e1'\e07Qi\e1'KA4\e07Uh\e1\e0AU\e1M\e0BYh\e1\e(B
+
+       >> \e,TEM'!4\e(B ESC x \e,T5RA\e04i\e1GB\e(B "command-apropos<Return>" \e,TK\e0CW\e1M\e(B
+          "command-a<Space><Return>"  \e,TK\e0EQ\e1'(R!\e09Qi\e19\e0!g\e1!4\e(B "kanji<Return>" \e0\e,T4Y\e1\e(B
+
+     \e,Tc\e0Ki\e1!4\e(B C-x 1 \e,T`GER\e05i\e1M'!RC(PE:\e(B "\e0\e,TGT\e19b4\e0Gl\e1\e(B" \e0\e,T7Uh\e1b<\e0Eh\e1\e0"Vi\e19ARcK\e0Ah\e1\e(B 
+
+\e,T:CC\e07Q\e14bKA4\e(B (Mode Line)
+=====================
+
+     \e,T`GER\e07Uh\e1\e0>T\e1A\e0>l\e1$S\e0JQh\e1'`\e0"i\e1Rd;\e0*i\e1R\e(B \e,Tf\e(B Emacs \e,T(PaJ4'\e0JTh\e1'\e07Uh\e1\e0>T\e1A\e0>l\e1E'd;5C':CC\e07Q\e14\e0Eh\e1R'\e0JX\e14"M'(M\e0+Vh\e1'`\e0CU\e1B!\e(B
+\e0\e,TGh\e1R\e(B echo area  \e,T:CC\e07Q\e14\e0+Vh\e1'M\e0BYh\e1\e06Q\e14\e0"Vi\e19ARK\e09Vh\e1':CC\e07Q\e14\e(B \e,T`\e0CU\e1B!\e0Gh\e1R:CC\e07Q\e14bKA4\e(B (mode line)  \e,T:CC\e07Q\e14\e(B
+\e,TbKA4\e0AU\e1\e0EQ\e1!I3P\e04Q\e1'\e09Ui\e1\e(B
+
+
+ [--]J:--**-Mule: TUTORIAL.th   (Fundamental) ---NN%--------------
+
+
+\e,TKARB`K\e05X\e1\e(B:       \e,T5C'\e0Jh\e1G9\e(B NN \e,T"M'\e(B NN% \e,T(P\e0AU\e1\e05Q\e1G`E"c\e0Jh\e1M\e0BYh\e1\e(B  \e,T:CC\e07Q\e14bKA4\e07Uh\e1aJ4'M\e0BYh\e1MR((Pa5!\e05h\e1R'\e(B
+               \e,Td;(R!\e05Q\e1GM\e0Bh\e1R'\e0:i\e1R'\e(B \e,Ta\e05h\e1\e0!g\e1d\e0Ah\e1`\e0;g\e19dC\e(B  \e0\e,T5Q\e1GM\e0Bh\e1R'`\e0*h\e19\e(B \e,TMR((P\e0AU\e1`GERK\e0CW\e1M\e(B uptime
+               \e,TaJ4'<EM\e0BYh\e1\e(B  \e0\e,TMQ\e19\e09Ui\e1`\e0;g\e19$GRAJRARC6"M'b;Ca!CA\e(B display-time
+
+     \e,T:CC\e07Q\e14\e09Ui\e1\e0AU\e1\e0"i\e1M\e0AY\e1E\e07Uh\e1`\e0;g\e19;CPbB*\e09l\e1M\e0BYh\e1KERBM\e0Bh\e1R'\e(B
+
+
+     \e0\e,T"i\e1M\e0AY\e1EaC!\e0$W\e1M\e(B \e0\e,T*Wh\e1Ma\e0?i\e1A\e0"i\e1M\e0AY\e1E\e07Uh\e1!S\e0EQ\e1'\e0Mh\e1R9M\e0BYh\e1\e(B   \e0\e,T5Q\e1G`E"\e(B NN% \e,T(PaJ4'c\e0Ki\e1\e0CYi\e1\e0Gh\e1R!S\e0EQ\e1'aJ4'<E\e0Jh\e1G9dK9\e(B
+\e,T"M'a\e0?i\e1A\e0"i\e1M\e0AY\e1EM\e0BYh\e1\e(B \e,Tb4B\e0$T\e14`\e0;g\e19`;M\e0Cl\e1`+9\e05l\e1\e(B   \e0\e,T6i\e1R`\e0;g\e19\e0Jh\e1G9:9\e0JX\e14"M'a\e0?i\e1A\e0"i\e1M\e0AY\e1EM\e0BYh\e1\e0!g\e1(P\e0AU\e1\e0"i\e1M$GRA\e0Gh\e1R\e(B
+--Top-- \e,TaJ4'M\e0BYh\e1\e(B  \e0\e,T6i\e1R`\e0;g\e19\e0Jh\e1G9\e0Eh\e1R'\e0JX\e14\e0!g\e1(P\e0AU\e1\e0"i\e1M$GRA\e0Gh\e1R\e(B --Bot--  \e0\e,T6i\e1RKR!JRARC6aJ4'a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B
+\e0\e,T7Qi\e1'KA4:9K\e09i\e1R(Md\e04i\e1\e(B \e0\e,T!g\e1(P\e0AU\e1\e0"i\e1M$GRA\e0Gh\e1R\e(B --All-- \e,TaJ4'M\e0BYh\e1\e(B
+
+     \e,T@RBc9G'`\e0Eg\e1:"M':CC\e07Q\e14bKA4\e(B \e,T(PaJ4'c\e0Ki\e1\e0CYi\e1\e0Gh\e1R5M9\e09Ui\e1M\e0BYh\e1c9bKA4\e(B (mode) \e,TMPdC\e(B  \e,Tc9\e05Q\e1GM\e0Bh\e1R'\e(B
+\e0\e,T"i\e1R':9\e0$W\e1M\e(B \e,TM\e0BYh\e1c9bKA4\e(B Fundamental \e0\e,T+Vh\e1'`\e0;g\e19bKA4`\e0CTh\e1A\e05i\e19\e(B (default)  \e,TbKA4\e09Ui\e1`\e0;g\e19K\e09Vh\e1'c9bKA4\e(B
+\e,TK\e0EQ\e1!\e(B (Major Mode)
+
+     Emacs \e0\e,TAU\e1bKA4K\e0EQ\e1!\e(B (Major Mode) \e,TJSK\e0CQ\e1:!RCb;Ca!CA@RIR\e(B \e,TK\e0CW\e1M!RCa\e0!i\e1\e0"i\e1M$GRA\e(B \e,T`\e0*h\e19\e(B
+Lisp mode Text mode \e,TaEPbKA4\e0MWh\e19\e(B \e,Tf\e(B \e0\e,TMU\e1!KERBbKA4\e(B  \e,Tb4B;!\e05T\e1\e(B Emacs \e,T(PM\e0BYh\e1c9bKA4K\e0EQ\e1!\e(B
+\e,TbKA4c4bKA4K\e09Vh\e1'`JAM\e(B
+
+     \e,T$S\e0JQh\e1':R'$S\e0JQh\e1'(P\e0AU\e1>D\e05T\e1!CCA\e07Uh\e1a5!\e05h\e1R'\e0!Q\e19b4B\e0JTi\e19`\e0*T\e1'\e(B \e,T`\e0AWh\e1MM\e0BYh\e1c9bKA4K\e0EQ\e1!\e07Uh\e1\e05h\e1R'\e0!Q\e19\e(B   \e0\e,T5Q\e1GM\e0Bh\e1R'\e(B
+\e,T`\e0*h\e19\e(B \e,T`GERb;Ca!CA@RIR\e(B \e,T(P\e0AU\e1$S\e0JQh\e1'JSK\e0CQ\e1:J\e0Ci\e1R'\e(B \e,TKARB`K\e05X\e1\e(B (comment) \e,TM\e0BYh\e1\e(B  \e,T`\e09Wh\e1M'(R!\e0GT\e1\e08U\e1c\e0Jh\e1\e(B
+\e,TKARB`K\e05X\e1"M'@RIRa\e05h\e1EP@RIRa5!\e05h\e1R'\e0!Q\e19\e(B   \e,T$S\e0JQh\e1'\e09Ui\e1\e0!g\e1(Pa5!\e05h\e1R'\e0!Q\e19d;c9a\e05h\e1EPbKA4K\e0EQ\e1!\e(B  \e,T`\e0>Wh\e1Mc\e0Ki\e1\e(B
+\e,TJRARC6c\e0Jh\e1KARB`K\e05X\e1c9a\e05h\e1EP@RIRd\e04i\e1M\e0Bh\e1R'\e06Y\e1!\e05i\e1M'\e(B
+
+     \e,T$S\e0JQh\e1'JSK\e0CQ\e1:!RC`;\e0EUh\e1B9bKA4c\e0Ki\e1`\e0;g\e19bKA4K\e0EQ\e1!\e0MWh\e19\e(B \e0\e,T$W\e1M$S\e0JQh\e1'"BRB\e(B (extend) \e0\e,T+Vh\e1'\e0*Wh\e1M$S\e0JQh\e1'`\e0;g\e19\e0*Wh\e1M\e(B
+\e,TbKA4\e(B \e0\e,T5Q\e1GM\e0Bh\e1R'`\e0*h\e19\e(B \e,T$S\e0JQh\e1'\e(B M-x fundamental-mode \e0\e,T$W\e1M$S\e0JQh\e1'JSK\e0CQ\e1:`;\e0EUh\e1B9bKA4`\e0;g\e19bKA4\e(B 
+Fundamental
+
+     \e,T`GER\e07Uh\e1(Pa\e0!i\e1d"a\e0?i\e1A\e0"i\e1M\e0AY\e1E@RIR\e0MQ\e1'!DI\e(B \e0\e,T!g\e1c\e0Ki\e1c\e0*i\e1\e(B Text mode
+
+       >> \e,TEM'\e0;i\e1M9$S\e0JQh\e1'\e(B M-x text-mode<Return>
+
+     \e0\e,T6i\e1R\e05i\e1M'!RCKR\e0"i\e1M\e0AY\e1E`\e0>Th\e1A`\e0!Uh\e1BG\e0!Q\e1:bKA4K\e0EQ\e1!\e07Uh\e1c\e0*i\e1M\e0BYh\e1c9\e0;Q\e1(\e0(X\e1\e0:Q\e19\e(B \e0\e,T!g\e1c\e0Ki\e1\e0;i\e1M9$S\e0JQh\e1'\e(B C-h m
+
+       >> \e,Tc\e0Ki\e1!4\e(B C-h m \e,T`\e0>Wh\e1M\e0HV\e1!IR\e0"i\e1Ma5!\e05h\e1R'CPK\e0Gh\e1R'\e(B Text mode \e0\e,T!Q\e1:\e(B Fundamental mode
+
+       >> \e,Tc\e0Ki\e1!4\e(B C-x 1 \e,T`\e0>Wh\e1ME:`M!JRCMM!(R!(M\e(B
+
+     \e,T5C'\e0Jh\e1G9\e0+i\e1RB"M':CC\e07Q\e14bKA4\e(B \e,T(P\e0AU\e1\e0JQ\e1-\e0EQ\e1!I\e03l\e1\e(B '[--]' \e,T`\e0>Wh\e1MaJ4'bKA4JSK\e0CQ\e1:!RC\e0;i\e1M9\e0"i\e1M\e0AY\e1E\e(B
+(input mode) \e,TM\e0BYh\e1\e(B   \e0\e,TJQ\e1-\e0EQ\e1!I\e03l\e1\e(B [--] \e,TKARB\e06V\e1'JRARC6\e0;i\e1M9\e0"i\e1M\e0AY\e1Ed\e04i\e1\e04i\e1GB\e05Q\e1G\e0MQ\e1!IC@RIR\e0MQ\e1'!DI\e(B
+(English alphabets)  \e,T!\e0CX\e13R\e0Mh\e1R9\e0$Yh\e1\e0AW\e1M"M'\e(B "Tamago" \e,TJSK\e0CQ\e1:CRBEP`\e0MU\e1B4"M'\e0GT\e1\e08U\e1c\e0*i\e1\e(B
+
+     \e,TaEP5C'\e04i\e1R9"GR"M'\e0JQ\e1-\e0EQ\e1!I\e03l\e1\e09Qi\e19\e(B \e,T(P\e0AU\e1`$\e0CWh\e1M'KARBaJ4'J6R9P"M'\e(B flag \e,T"M'CP::C\e0KQ\e1J\e(B
+(coding-system) \e,TM\e0BYh\e1\e(B   Mule \e,TJRARC6!SK94CP::C\e0KQ\e1JaB!`)>RPJSK\e0CQ\e1:\e(B \e,T!RC`\e0!g\e1:\e0Mh\e1R9a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B
+\e,T!RC\e0;i\e1M9\e0"i\e1M\e0AY\e1E(R!\e0$U\e1\e0Bl\e1:M\e0Cl\e14\e(B \e,T!RCaJ4'<EMM!7R'(M\e(B \e,Td\e04i\e1\e0MT\e1JCP(R!\e0!Q\e19\e(B  \e,Ta\e05h\e1b4B;!\e05T\e1(PaJ4'`)>RP\e(B
+\e0\e,TJQ\e1-\e0EQ\e1!I\e03l\e1\e0*h\e1GB(S\e(B (mnemonic) \e,T"M'CP::C\e0KQ\e1JJSK\e0CQ\e1:!RC`\e0!g\e1:\e0Mh\e1R9a\e0?i\e1A\e0"i\e1M\e0AY\e1E\e(B \e,T`\e07h\e1R\e09Qi\e19\e(B
+
+       >> \e,T5CG(\e04Y\e1\e0Gh\e1R\e0AU\e1\e0JQ\e1-\e0EQ\e1!I\e03l\e1\e(B \e,T$\e0Ei\e1RB$\e0EV\e1'\e0!Q\e1:\e(B "J:" "S:" "E:" \e,TaJ4'M\e0BYh\e1\e07Uh\e1:CC\e07Q\e14bKA4K\e0CW\e1Md\e0Ah\e1\e(B
+
+     \e0\e,T5Q\e1G\e0MQ\e1!IC\e05Q\e1GaC!\e0$W\e1M\e(B \e0\e,TJQ\e1-\e0EQ\e1!I\e03l\e1\e0*h\e1GB(S\e(B (mnemonic) \e,T"M'CP::C\e0KQ\e1J\e07Uh\e1c\e0*i\e1M\e0BYh\e1\e(B  \e0\e,T5Q\e1G\e(B ':' \e,TaJ4'c\e0Ki\e1\e0CYi\e1\e(B
+\e0\e,TGh\e1R\e0AU\e1\e05Q\e1G\e0MQ\e1!IC"M'@RIR\e0MWh\e19\e(B \e,T9M!(R!@RIR\e0MQ\e1'!DIaJ4'M\e0BYh\e1\e(B (\e,T`\e0*h\e19\e(B \e,T@RIR\e0(U\e19\e(B \e,T@RIR\e0-Uh\e1\e0;Xh\e19\e(B \e,T`\e0;g\e19\e05i\e19\e(B)  \e0\e,T5Q\e1G\e(B J
+\e,TKARB\e06V\e1'\e(B \e,TC\e0KQ\e1J\e07Uh\e1c\e0*i\e1\e0!Q\e1:\e(B JUNET \e0\e,T$W\e1M\e(B \e,TC\e0KQ\e1J\e(B JIS  \e0\e,T5Q\e1G\e(B S \e,TKARB\e06V\e1'\e(B Shift-JIS \e,TaEP\e(B \e0\e,T5Q\e1G\e(B E \e,TKARB\e06V\e1'\e(B
+\e,TC\e0KQ\e1J\e(B EUC \e,T@RIR\e0-Uh\e1\e0;Xh\e19\e(B   \e,T(PJ\e0EQ\e1:`;\e0EUh\e1B9\e(B (toggle) \e,T!RCaJ4'<E@RIR9R9R*R\e05T\e1d\e04i\e1b4B\e(B C-x C-k t
+
+     \e0\e,T5Q\e1GM\e0Bh\e1R'\e0"i\e1R'\e0Eh\e1R'\e(B \e0\e,T$W\e1M!RCJ\e0EQ\e1:`;\e0EUh\e1B9d\e0Ah\e1c\e0Ki\e1aJ4'@RIR9R9R*R\e05T\e1\e(B \e,Ta\e0Ei\e1GJ\e0EQ\e1:!\e0EQ\e1:\e0MU\e1!$\e0CQi\e1'K\e09Vh\e1'\e(B
+
+       >> \e,TEM'\e0;i\e1M9$S\e0JQh\e1'\e(B C-x C-k t \e0\e,T4Y\e1JM'$\e0CQi\e1'\e(B
+
+     \e0\e,T6i\e1R`7M\e0Cl\e1\e0AT\e1\e09Q\e1E\e07Uh\e1c\e0*i\e1M\e0BYh\e1\e0AU\e1\e0;Xh\e1A\e(B META \e,TaEPbKA4\e07Uh\e1c\e0*i\e1M\e0BYh\e1`\e0;g\e19C\e0KQ\e1J\e(B JIS  \e,T`CR\e0!g\e1(PJRARC6c\e0*i\e1\e0;Xh\e1A\e(B META
+\e,Ta79!RC!4\e0;Xh\e1A\e(B ESCAPE \e,Td\e04i\e1\e(B  \e0\e,TGT\e1\e08U\e1c\e0*i\e1(P`K\e0AW\e1M9\e0!Q\e1:!RCc\e0*i\e1\e0;Xh\e1A$M9b7CE\e(B \e0\e,T$W\e1Mc\e0Ki\e1!4\e0;Xh\e1A\e(B META \e0\e,T$i\e1R'd\e0Gi\e1a\e0Ei\e1G\e0(V\e1'\e(B
+\e,T!4\e05Q\e1G\e0MQ\e1!IC5RA\e(B  M-<\e0\e,T5Q\e1G\e0MQ\e1!IC\e(B> \e,T(P7SK\e09i\e1R\e07Uh\e1`K\e0AW\e1M9\e0!Q\e1:\e(B ESC <\e0\e,T5Q\e1G\e0MQ\e1!IC\e(B>  \e0\e,T9Qh\e19\e0$W\e1M\e(B \e0\e,T7X\e1!M\e0Bh\e1R'\e07Uh\e1M\e08T\e1:RBAR\e(B
+\e,T(9\e06V\e1'\e0(X\e14\e09Ui\e1\e(B \e,T(P\e0BQ\e1'$'\e0AU\e1<E`K\e0AW\e1M9`\e04T\e1A\e(B \e,TK\e0EQ\e1'(R!`;\e0EUh\e1B9\e(B ESC <\e0\e,T5Q\e1G\e0MQ\e1!IC\e(B> \e,Tc\e0Ki\e1`\e0;g\e19\e(B M-<\e0\e,T5Q\e1G\e0MQ\e1!IC\e(B>  \e,Ta\e05h\e1\e0"i\e1M\e(B
+\e,T$GCCP\e0GQ\e1'\e0!g\e1\e0$W\e1M\e(B \e0\e,T;Xh\e1A\e(B META \e,T(Pd\e0Ah\e1JRARC6c\e0*i\e1d\e04i\e1\e0!Q\e1:C\e0KQ\e1J\e(B Shift-JIS \e,TaEP\e(B EUC
+
+     \e,T!RC`;\e0EUh\e1B9CP::C\e0KQ\e1J(P\e0AU\e1<Ea\e0$h\e1`\e0>U\e1B'\e0!Q\e1:a\e05h\e1EP\e0:Q\e1?`?M\e0Cl\e1`\e07h\e1R\e09Qi\e19\e(B  \e,TJRARC6\e04Y\e1$S\e0JQh\e1'`\e0!Uh\e1BG\e0!Q\e1:CP::C\e0KQ\e1J\e(B
+\e,Td\e04i\e1b4B$S\e0JQh\e1'\e(B C-h a coding-system <Return>
+
+       >> \e,Tc\e0Ki\e1\e0;i\e1M9$S\e0JQh\e1'\e(B C-h a coding-system <Return> \e,Ta\e0Ei\e1G\e0Mh\e1R9CRBEP`\e0MU\e1B4"M'$S\e0JQh\e1'\e(B 
+         set-display-coding-system set-file-coding-system \e,TaEP\e(B
+         set-process-coding-system \e,T(R!`M!JRC\e07Uh\e1;CR!/\e0"Vi\e19\e(B
+
+\e,T!RC\e0$i\e19KR\e(B (search)
+================
+
+     Emacs \e,TJRARC6\e0$i\e19KRJRB\e0MQ\e1!"CP\e(B (string) \e,T@RBc9a\e0?i\e1A\e0"i\e1M\e0AY\e1Ed;7R'\e0"i\e1R'K\e09i\e1RK\e0CW\e1M\e0"i\e1R'K\e0EQ\e1'd\e04i\e1\e(B
+\e0\e,T6i\e1R\e05i\e1M'!RC\e0$i\e19KRd;7R'\e0"i\e1R'K\e09i\e1R"M'5SaK\e09h\e1'`$M\e0Cl\e1`+M\e0Cl\e1\e(B (cursor) \e0\e,T!g\e1c\e0Ki\e1!4\e(B C-s  \e0\e,T6i\e1R\e05i\e1M'!RC\e0$i\e19KR\e(B
+\e,Td;7R'\e0"i\e1R'K\e0EQ\e1'"M'5SaK\e09h\e1'`$M\e0Cl\e1`+M\e0Cl\e1\e(B  \e0\e,T!g\e1c\e0Ki\e1!4\e(B C-r  \e,TK\e0EQ\e1'(R!\e09Qi\e19(P\e0AU\e1\e0"i\e1M$GRA\e0Gh\e1R\e(B "I-search:"
+\e,T;CR!/\e0"Vi\e195C'\e(B echo area  \e,TB!`\e0ET\e1!!RC\e0$i\e19KRd\e04i\e1\e04i\e1GB!RC!4\e(B ESC
+
+
+       >> \e,T!4\e(B C-s \e,T`\e0>Wh\e1M`\e0CTh\e1A!RC\e0$i\e19KR\e(B  \e,Ta\e0Ei\e1G!4\e05Q\e1G\e0MQ\e1!IC"M'$S\e0Gh\e1R\e(B "cursor" \e,TE'd;\e07U\e1EP\e05Q\e1GM\e0Bh\e1R'\e(B
+          \e0\e,T*i\e1R\e(B \e,Ta\e0Ei\e1G\e0JQ\e1'`!5\e04Y\e1\e0Gh\e1R`$M\e0Cl\e1`+M\e0Cl\e1"\e0BQ\e1:d;M\e0Bh\e1R'dC\e(B
+
+       >> \e,TEM'!4\e(B C-s \e0\e,T4Y\e1\e0MU\e1!K\e09Vh\e1'$\e0CQi\e1'`\e0>Wh\e1M\e0$i\e19KR$S\e0Gh\e1R\e(B "cursor" \e0\e,T5Q\e1G\e05h\e1Md;\e(B
+
+       >> \e,T!4\e(B <Delete> \e0\e,T4Y\e1\e(B 4 \e,T$\e0CQi\e1'\e(B \e,Ta\e0Ei\e1G\e0JQ\e1'`!5\e04Y\e1\e0Gh\e1R!RC`$\e0EWh\e1M9\e07Uh\e1"M'`$M\e0Cl\e1`+M\e0Cl\e1\e(B
+
+       >> \e,T!4\e(B ESC \e,T`\e0>Wh\e1MB!`\e0ET\e1!!RC\e0$i\e19KR\e(B
+
+     \e,T!RC\e0$i\e19KR(P`\e0CTh\e1A\e0"Vi\e19\e07Q\e19\e07U\e1\e(B \e,Tc9CPK\e0Gh\e1R'\e07Uh\e1\e0>T\e1A\e0>l\e1JRB\e0MQ\e1!"CP\e07Uh\e1\e05i\e1M'!RC(P\e0$i\e19KR\e(B \e,T`\e0"i\e1Rd;`\e0>U\e1B':R'\e0Jh\e1G9\e(B
+\e0\e,T6i\e1R\e05i\e1M'!RC(P\e0$i\e19KR\e05Q\e1G\e05h\e1Md;\e(B \e0\e,T!g\e1c\e0Ki\e1!4\e(B C-s \e0\e,TMU\e1!K\e09Vh\e1'$\e0CQi\e1'\e(B  \e0\e,T6i\e1RKR!\e0$i\e19KRJRB\e0MQ\e1!"CP\e07Uh\e1\e0;i\e1M9`\e0"i\e1Rd;d\e0Ah\e1>:\e(B \e0\e,T!g\e1\e(B
+\e,T(P\e0AU\e1\e0"i\e1M$GRA;CR!/\e0"Vi\e19\e(B  \e,Tc\e0Ki\e1!4\e(B C-g \e,T`\e0>Wh\e1MB!`\e0ET\e1!\e(B
+
+     \e,TCPK\e0Gh\e1R'\e07Uh\e1\e0$i\e19KRM\e0BYh\e1\e(B  \e0\e,T6i\e1R!4\e(B <Delete> \e0\e,T5Q\e1G\e0MQ\e1!IC\e05Q\e1G\e0JX\e14\e07i\e1RBc9JRB\e0MQ\e1!"CP\e0!g\e1(P\e06Y\e1!E:d;\e(B  \e,Ta\e0Ei\e1G\e(B
+\e,T`$M\e0Cl\e1`+M\e0Cl\e1\e0!g\e1(P!\e0EQ\e1:d;5SaK\e09h\e1'\e0!h\e1M9K\e09i\e1R\e(B   \e0\e,T5Q\e1GM\e0Bh\e1R'`\e0*h\e19\e(B \e0\e,T6i\e1R!4\e(B "cu" \e0\e,T!g\e1(P\e0$i\e19KRd;\e06V\e1'5SaK\e09h\e1'\e07Uh\e1\e0AU\e1$S\e0Gh\e1R\e(B
+"cu"  \e,Ta\e05h\e1\e06i\e1R!4\e(B <Delete> \e,Tc9\e0(Q\e1'KGP\e09Ui\e1\e(B \e0\e,T5Q\e1G\e(B 'u' \e,Tc9\e(B search line \e0\e,T!g\e1(PKRBd;\e(B \e,Ta\e0Ei\e1G`$M\e0Cl\e1`+M\e0Cl\e1\e(B
+\e,T(P"\e0BQ\e1:!\e0EQ\e1:d;\e07Uh\e15SaK\e09h\e1'\e07Uh\e1\e0AU\e1\e05Q\e1G\e(B 'c' \e,TM\e0BYh\e1\e(B
+
+     \e0\e,T6i\e1R!4\e05Q\e1G\e0MQ\e1!IC$M9b7CE\e(B (control character) \e0\e,T5Q\e1G\e0MWh\e19\e(B \e,T9M!`K\e09W\e1M(R!\e(B C-s \e,TK\e0CW\e1M\e(B C-r
+\e,T!RC\e0$i\e19KR\e0!g\e1(P\e0JTi\e19\e0JX\e14E'\e(B
+
+     \e,T$S\e0JQh\e1'\e(B C-s \e,T(P\e0$i\e19KRJRB\e0MQ\e1!"CP\e07Uh\e1\e05i\e1M'!RC\e(B \e,Td;7R'\e0"i\e1R'K\e09i\e1R"M'5SaK\e09h\e1'`$M\e0Cl\e1`+M\e0Cl\e1\e(B  \e0\e,T6i\e1R\e05i\e1M'!RC\e(B
+\e0\e,T$i\e19KRd;7R'\e07T\e1HK\e0EQ\e1'\e(B  \e0\e,T!g\e1c\e0Ki\e1!4\e(B C-r  \e0\e,T9Qh\e19\e0$W\e1M\e(B \e,TJRARC6c\e0*i\e1\e(B C-s \e,TaEP\e(B C-r \e,TJ\e0EQ\e1:\e0!Q\e19`\e0>Wh\e1M\e0$i\e19KRd;d\e04i\e1c9\e07Qi\e1'\e(B
+\e,TJM'\e07T\e1H7R'\e(B  C-s \e,TaEP\e(B C-r \e,T7SK\e09i\e1R\e07Uh\e1`K\e0AW\e1M9\e0!Q\e19\e07X\e1!;CP!RC\e(B \e,T(P\e05h\e1R'\e0!Q\e19\e0!g\e15C'\e07T\e1H7R'!RC\e0$i\e19KR`\e07h\e1R\e09Qi\e19\e(B
+
+Recursive Editing Level
+
+     \e,T:R'\e07U\e1\e(B \e,T`CRMR((PK\e0EX\e14`\e0"i\e1Rd;M\e0BYh\e1c9J6R9P\e07Uh\e1`\e0CU\e1B!\e0Gh\e1R\e(B Recursive Editing Level \e,Td\e04i\e1b4B\e(B
+\e,Td\e0Ah\e1\e05Qi\e1'c(\e(B  \e,Tc9bKA4\e09Ui\e1\e(B \e,T`$\e0CWh\e1M'KARBG'`\e0Eg\e1:\e(B '()' \e0\e,T7Uh\e1aJ4'\e0*Wh\e1MbKA4K\e0EQ\e1!\e(B (major mode) \e,TM\e0BYh\e1(P\e0AU\e1G'`\e0Eg\e1:\e(B
+'[]' \e0\e,TEi\e1MA\e(B \e,T`\e0>Th\e1A\e0"Vi\e19\e0MU\e1!K\e09Vh\e1'\e0*Qi\e19\e(B  \e0\e,T5Q\e1GM\e0Bh\e1R'`\e0*h\e19\e(B \e0\e,T6i\e1R`\e04T\e1A`\e0;g\e19\e(B (Fundamental) \e,TM\e0BYh\e1\e(B \e0\e,T!g\e1(P`;\e0EUh\e1B9`\e0;g\e19\e(B
+[(Fundamental)] \e,Ta79\e(B
+
+\e,TKARB`K\e05X\e1\e(B:       \e,T`CR(Pd\e0Ah\e1M\e08T\e1:RB`\e0!Uh\e1BG\e0!Q\e1:\e(B Recursive Editing Level \e,Tc9\e07Uh\e1\e09Ui\e1\e(B
+
+     \e,Tc\e0Ki\e1!4\e(B M-x top-level <Return> \e,T`\e0>Wh\e1M\e07Uh\e1(PMM!(R!\e(B Recursive Editing Level
+
+       >> \e,TEM'!4\e04Y\e1\e(B \e,T5C'\e0Jh\e1G9\e0Eh\e1R'"M'(M(P\e0AU\e1\e0"i\e1M$GRA\e0Gh\e1R\e(B "Back to top level" \e,T;CR!/\e0"Vi\e19\e(B
+
+     \e,T`\e09Wh\e1M'(R!\e(B \e,T`CRM\e0BYh\e1c9CP\e04Q\e1::9\e0JX\e14\e(B (top level) \e,TM\e0BYh\e1a\e0Ei\e1G\e(B  \e,T$S\e0JQh\e1'\e09Ui\e1\e0(V\e1'd\e0Ah\e1\e0AU\e1<Ec4\e(B \e,Tf\e(B
+
+     \e,Td\e0Ah\e1JRARC6c\e0*i\e1\e(B \e,T$S\e0JQh\e1'\e(B C-g \e,T`\e0>Wh\e1M\e07Uh\e1(PMM!(R!\e(B Recursive Editing Level \e,Td\e04i\e1\e(B
+
+
+Help
+====
+
+     Emacs \e0\e,TAU\e1$GRAJRARC6\e07Uh\e1\e0AU\e1;CPbB*\e09l\e1\e(B \e,TAR!ARBKERBM\e0Bh\e1R'\e(B \e0\e,T+Vh\e1'd\e0Ah\e1JRARC6M\e08T\e1:RBd\e04i\e1KA4c9\e07Uh\e1\e09Ui\e1\e(B
+\e,Ta\e05h\e1`CR(PJRARC6`\e0CU\e1B!c\e0*i\e1\e(B <HELP> \e,T`\e0>Wh\e1M\e07Uh\e1(P`\e0CU\e1B9\e0CYi\e1$GRAJRARC6`K\e0Eh\e1R\e09Ui\e1\e(B \e,Td\e04i\e1b4B!RC!4\e(B C-h \e0\e,T+Vh\e1'(P\e(B
+\e0\e,T*h\e1GBc\e0Ki\e1`CRd\e04i\e1\e0CQ\e1:\e0CYi\e1\e0"i\e1M\e0AY\e1E`\e0>Th\e1A`\e05T\e1AKERBM\e0Bh\e1R'\e(B
+
+     \e0\e,TGT\e1\e08U\e1c\e0*i\e1\e0$W\e1Mc\e0Ki\e1!4\e(B C-h \e,Ta\e0Ei\e1G5RA\e04i\e1GB\e05Q\e1G`\e0EW\e1M!\e(B (option) \e0\e,TMU\e1!K\e09Vh\e1'\e05Q\e1G\e0MQ\e1!IC\e(B  \e0\e,T6i\e1Rd\e0Ah\e1\e0CYi\e1\e0Gh\e1R(P\e05i\e1M'c\e0*i\e1\e(B
+\e0\e,T5Q\e1G`\e0EW\e1M!MPdC\e(B \e0\e,T!g\e1c\e0Ki\e1!4\e(B C-h ?  \e,Ta\e0Ei\e1G(P\e0AU\e1$SM\e08T\e1:RB`\e0!Uh\e1BG\e0!Q\e1:\e05Q\e1G`\e0EW\e1M!;CR!/\e0"Vi\e19\e(B  \e,Td\e04i\e1KR!`;\e0EUh\e1B9c((P\e(B
+\e,Td\e0Ah\e1`\e0CU\e1B!\e(B HELP \e,TK\e0EQ\e1'(R!!4\e(B C-h \e0\e,T!g\e1c\e0Ki\e1!4\e(B C-g \e,T`\e0>Wh\e1MB!`\e0ET\e1!d\e04i\e1\e(B
+
+     \e,T$S\e0JQh\e1'\e(B HELP \e0\e,T>Wi\e190R9\e07Uh\e1\e0JX\e14\e0MQ\e19K\e09Vh\e1'\e0!g\e1\e0$W\e1M\e(B C-h c \e,Ta\e0Ei\e1G5RA\e04i\e1GB!RC!4$S\e0JQh\e1':R'$S\e0JQh\e1'\e(B  \e0\e,T+Vh\e1'(Pc\e0Ki\e1$S\e(B
+\e,TM\e08T\e1:RB\e0JQi\e19\e(B \e,Tf\e(B \e,T`\e0!Uh\e1BG\e0!Q\e1:$S\e0JQh\e1'\e09Qi\e19\e(B
+
+       >> \e,TEM'!4\e(B C-h c C-p \e0\e,T4Y\e1\e(B  \e0\e,T+Vh\e1'(Pc\e0Ki\e1\e0"i\e1M$GRA\e0Gh\e1R\e(B
+          "C-p runs the command previous-line"
+
+     \e,T$S\e0JQh\e1'\e09Ui\e1(P\e0*h\e1GB\e0CWi\e1M\e0?Wi\e19$GRA(S\e(B \e,T`\e0!Uh\e1BG\e0!Q\e1:$S\e0JQh\e1'\e07Uh\e1`$B\e0<h\e1R95Ra\e0Ei\e1G\e(B \e,Ta\e05h\e1(Sd\e0Ah\e1d\e04i\e1\e(B \e,Td\e04i\e1`\e0;g\e19M\e0Bh\e1R'\e04U\e1\e(B  \e,T$S\e0JQh\e1'\e(B
+\e0\e,T7Uh\e1\e0AU\e1AR!!\e0Gh\e1RK\e09Vh\e1'\e05Q\e1G\e0MQ\e1!IC\e(B \e,T`\e0*h\e19\e(B C-x C-s \e0\e,T!g\e1JRARC6!45RAK\e0EQ\e1'\e(B C-h c \e,Td\e04i\e1\e(B
+
+     \e0\e,T6i\e1RKR!\e05i\e1M'!RC\e0CYi\e1CRBEP`\e0MU\e1B4AR!!\e0Gh\e1R\e09Ui\e1\e(B  \e0\e,T!g\e1c\e0Ki\e1c\e0*i\e1\e(B k \e,Ta79\e05Q\e1G\e(B c
+
+       >> \e,TEM'!4\e(B C-h k C-p \e0\e,T4Y\e1\e(B
+
+     \e0\e,T!g\e1(P\e0AU\e1\e0GT\e19b4\e0Gl\e1`\e0>Th\e1Ac9\e(B Emacs \e0\e,TMU\e1!K\e09Vh\e1'\e0MQ\e19\e(B \e,T`\e0>Wh\e1MaJ4'CRBEP`\e0MU\e1B4"M'$S\e0JQh\e1'\e09Qi\e19\e(B  \e,T`\e0AWh\e1M\e0Mh\e1R9(:a\e0Ei\e1G\e(B
+\e0\e,T!g\e1c\e0Ki\e1!4\e(B C-x 1 \e,T`\e0>Th\e1AE:\e0GT\e19b4\e0Gl\e1MM!\e(B
+
+     \e0\e,T5Q\e1G`\e0EW\e1M!\e0MWh\e19\e07Uh\e1\e0AU\e1;CPbB*\e09l\e1\e(B \e0\e,TAU\e1\e04Q\e1'\e09Ui\e1\e(B
+
+    C-h f      \e,Tc\e0Ki\e1c\e0Jh\e1\e0*Wh\e1M"M'$S\e0JQh\e1'\e(B \e,T`\e0>Wh\e1MaJ4'CRBEP`\e0MU\e1B4`\e0!Uh\e1BG\e0!Q\e1:$S\e0JQh\e1'\e09Qi\e19\e(B
+
+       >> \e,Tc\e0Ki\e1!4\e(B C-h f previous-line \e,Ta\e0Ei\e1G5RA\e04i\e1GB\e(B <Return> \e,T`\e0>Wh\e1MaJ4'CRBEP`\e0MU\e1B4`\e0!Uh\e1BG\e(B
+          \e0\e,T!Q\e1:$S\e0JQh\e1'\e0+Vh\e1'`\e0CU\e1B!c\e0*i\e1d\e04i\e1(R!!RC!4\e(B C-p
+
+    C-h a      \e,Ta\e0Ei\e1G5RA\e04i\e1GB\e0$U\e1\e0Bl\e1`\e0GT\e1\e0Cl\e14\e(B (keyword) \e,T`\e0>Wh\e1MaJ4'$S\e0JQh\e1'\e07X\e1!$S\e0JQh\e1'\e(B \e0\e,T7Uh\e1\e0AU\e1\e0$U\e1\e0Bl\e1`\e0GT\e1\e0Cl\e14\e(B \e,TCGAM\e0BYh\e1\e(B
+               \e,T$S\e0JQh\e1'`K\e0Eh\e1R\e09Ui\e1JRARC6`\e0CU\e1B!c\e0*i\e1d\e04i\e1b4B!RC!4\e(B ESC x
+
+       >> \e,TEM'!4\e(B C-h a file \e,Ta\e0Ei\e1G5RA\e04i\e1GB\e(B <Return> \e,T`\e0>Wh\e1MaJ4'\e0*Wh\e1M$S\e0JQh\e1'\e07X\e1!$S\e0JQh\e1'\e07Uh\e1\e0AU\e1$S\e0Gh\e1R\e(B
+          "file" \e,TCGAM\e0BYh\e1\e(B  \e0\e,T+Vh\e1'(P\e0AU\e1\e(B find-file \e,TaEP\e(B write-file \e0\e,T7Uh\e1`\e0CU\e1B!c\e0*i\e1d\e04i\e1b4B!RC!4\e(B
+          C-x C-f \e,TaEP\e(B C-x C-w \e,TCGAM\e0BYh\e1\e04i\e1GB\e(B
+
+\e0\e,T7i\e1RB\e0JX\e14\e09Ui\e1\e(B
+======
+
+\e,TM\e0Bh\e1R\e0EW\e1A\e(B:         \e,T$S\e0JQh\e1'JSK\e0CQ\e1:!RC`\e0ET\e1!\e(B Emacs \e0\e,T$W\e1M\e(B C-x C-c
+
+
+     \e,T`M!JRC)\e0:Q\e1:`\e0:Wi\e1M'\e05i\e19\e09Ui\e1\e(B  \e0\e,T5Qi\e1'c(`\e0"U\e1B9\e0"Vi\e19JSK\e0CQ\e1:\e0<Yi\e1\e07Uh\e1`\e0CTh\e1A\e0KQ\e14cK\e0Ah\e1\e(B \e,Tb4B`)>RP\e(B  \e0\e,T6i\e1RKR!\e0AU\e1\e0(X\e14dK9\e07Uh\e1d\e0Ah\e1\e(B
+\e,T`\e0"i\e1Rc(\e(B \e0\e,T!g\e1M\e0Bh\e1R\e0AQ\e1Ga\e05h\e1b7I\e05Q\e1G`M'\e(B  \e,Ta\e05h\e1"Mc\e0Ki\e1bB9$GRA\e0<T\e14AR\e0BQ\e1'\e0<Yi\e1`\e0"U\e1B9a79\e(B
+
+
+     \e,TK\e0EQ\e1'(R!c\e0*i\e1\e(B EMACS \e0\e,T4Y\e1\e0JQ\e1!JM'JRA\e0GQ\e19\e(B \e0\e,T!g\e1$'(P\e0*T\e19d;`M'\e(B  \e,Tc95M9aC!\e(B \e,TMR((P\e0AU\e1\e0(X\e14\e07Uh\e1\e0CYi\e1\e0JV\e1!\e0JQ\e1:J9aEP\e(B
+\e,Td\e0Ah\e1`\e0"i\e1Rc(M\e0BYh\e1\e0:i\e1R'\e(B  \e,Ta\e05h\e1\e0JTh\e1'\e09Ui\e1\e0Bh\e1MA`\e0!T\e14\e0"Vi\e19`JAM\e(B \e,T`GERa\e05h\e1`\e0CTh\e1Ac\e0*i\e1\e(B Editor \e,TcK\e0Ah\e1c4\e(B \e,Tf\e(B \e0\e,T!g\e15RA\e(B  \e,Tb4B`)>RP\e(B
+\e,TM\e0Bh\e1R'\e0BTh\e1'\e0!Q\e1:\e(B EMACS \e,T`\e09Wh\e1M'(R!`\e0;g\e19b;Ca!CA\e07Uh\e1\e0AU\e1$GRAJRARC6KER!KERBAR!\e(B   \e0\e,TMQ\e19\e07Uh\e1(\e0CT\e1'a\e0Ei\e1G\e(B EMACS
+\e,T7Sd\e04i\e1\e07X\e1!\e0JTh\e1'\e07X\e1!M\e0Bh\e1R'\e(B
+
+
+
+\e,T"M"M:\e0$X\e13\e(B
+=======
+     \e,T`M!JRC)\e0:Q\e1:\e09Ui\e1\e(B \e0\e,T4Q\e14a;E'AR(R!\e(B "MicroEMACS (kemacs) \e,T@RIR\e0-Uh\e1\e0;Xh\e19\e(B \e,T`\e0:Wi\e1M'\e05i\e19\e(B" \e0\e,T+Vh\e1'd\e04i\e1AR(R!\e(B
+JUNET \e,T`\e0>Wh\e1Mc\e0Ki\e1c\e0*i\e1`\e0;g\e19\e(B Tutorial \e,TJSK\e0CQ\e1:\e(B GNUEmacs (Nemacs)
+
+     \e,T`M!JRC\e09Ui\e1\e(B \e0\e,T4Q\e14a;E'AR(R!\e(B "JOVE Tutorial" (19 \e,TA!CR$A\e(B 86) \e,T"M'\e(B Jonathan Payne
+     \e0\e,T+Vh\e1'\e04Q\e14a;E'AR(R!`M!JRC"M'\e(B Steve Zimmerman \e,Ta\e0Kh\e1'\e(B CCA-UNIX \e0\e,T+Vh\e1'\e04Q\e14a;E'\e(B (\e0\e,TMU\e1!\e07U\e1\e(B) \e,TAR\e(B
+     \e,T(R!`M!JRC\e(B "Teach-Emacs" \e,T)\e0:Q\e1:`\e0:Wi\e1M'\e05i\e19\e(B (31 \e0\e,T5X\e1ER$A\e(B 85) \e,T"M'\e(B MIT
+
+     Update - February 1986 by Dana Hoggatt.
+
+     Update - December 1986 by Kim Leburg.
+
+     Update/Translate - July 1987 by SANETO Takanori
+
+\e,T"M"M:\e0$X\e13`\e0;g\e19\e0>T\e1`HI\e(B
+==============
+
+     \e0\e,T$X\e13\e(B SANETO Takanori (\e,T+R`9b5P\e(B \e,T7R!Rb9\e0CT\e1\e(B) \e0\e,T<Yi\e1a;E@RIR\e0-Uh\e1\e0;Xh\e19)\e0:Q\e1:aC!\e0JX\e14\e(B  \e,T`M!JRC)\e0:Q\e1:\e09Ui\e1\e(B
+\e,T`\e0"U\e1B9\e04i\e1GB\e(B GMW + Wnn + Nemacs  \e,T"MaJ4'$GRA"M:\e0$X\e13\e(B \e,Ta\e04h\e1\e0<Yi\e1\e07Uh\e1J\e0Ci\e1R'b;Ca!CA\e0JX\e14\e0GT\e1`HI`K\e0Eh\e1R\e09Ui\e1\e0"Vi\e19\e(B
+\e,TaEP"M"M:\e0$X\e13\e(B \e0\e,T$X\e13\e(B Fujiwara Shoko \e0\e,T7Uh\e1c\e0Ki\e1$GRA\e0*h\e1GB`K\e0EW\e1Mc9!RCa;E\e(B \e,T!RC\e0;i\e1M9\e0"i\e1M\e0AY\e1E\e(B \e,TaEPM\e0Bh\e1R'\e0MWh\e19\e0MU\e1!\e(B
+\e,TKERB\e(B \e,Tf\e(B \e,TM\e0Bh\e1R'\e(B
+
+
+
+
+\e,T"M\e0CQ\e1:\e0<T\e14*M:\e(B \e,T!RCa;E\e07Uh\e1\e0<T\e14>ER4\e(B \e0\e,T"i\e1M\e0AY\e1E`\e07g\e1(\e(B \e,TaEP\e0MWh\e19\e(B \e,Tf\e(B \e,Td\e0Gi\e1a\e05h\e1`\e0>U\e1B'\e0<Yi\e1`\e04U\e1BG\e(B
+
+                        \e0\e,T+X\e1\e0+Y\e1\e0!T\e1\e(B \e0\e,TNT\e1bCb9\e0:X\e1\e(B@sra.co.jp
+
+
+Update/Add - December 1987 by Hironobu Suzuki
+Update/Add - November 1989 by Ken'ichi Handa
+Update/Add - January  1990 by Shigeki Yoshida
+Update/Add - March    1992 by Kenichi HANDA
+
+Translated into Thai
+          - September 1994 by Manop Wongsaisuwan
diff --git a/etc/XKeysymDB b/etc/XKeysymDB
new file mode 100644 (file)
index 0000000..1b466e4
--- /dev/null
@@ -0,0 +1,204 @@
+! $XConsortium: XKeysymDB,v 1.13 94/04/13 18:07:58 gildea Exp $
+! Copyright 1993 Massachusetts Institute of Technology
+!
+! Permission to use, copy, modify, distribute, and sell this software and
+! its documentation for any purpose is hereby granted without fee, provided
+! that the above copyright notice appear in all copies and that both that
+! copyright notice and this permission notice appear in supporting
+! documentation, and that the name of M.I.T. not be used in advertising or
+! publicity pertaining to distribution of the software without specific,
+! written prior permission.  M.I.T. makes no representations about the
+! suitability of this software for any purpose.  It is provided "as is"
+! without express or implied warranty.
+
+hpmute_acute           :100000A8
+hpmute_grave           :100000A9
+hpmute_asciicircum     :100000AA
+hpmute_diaeresis       :100000AB
+hpmute_asciitilde      :100000AC
+hplira                 :100000AF
+hpguilder              :100000BE
+hpYdiaeresis           :100000EE
+hpIO                   :100000EE
+hplongminus            :100000F6
+hpblock                        :100000FC
+apLineDel              :1000FF00
+apCharDel              :1000FF01
+apCopy                 :1000FF02
+apCut                  :1000FF03
+apPaste                        :1000FF04
+apMove                 :1000FF05
+apGrow                 :1000FF06
+apCmd                  :1000FF07
+apShell                        :1000FF08
+apLeftBar              :1000FF09
+apRightBar             :1000FF0A
+apLeftBox              :1000FF0B
+apRightBox             :1000FF0C
+apUpBox                        :1000FF0D
+apDownBox              :1000FF0E
+apPop                  :1000FF0F
+apRead                 :1000FF10
+apEdit                 :1000FF11
+apSave                 :1000FF12
+apExit                 :1000FF13
+apRepeat               :1000FF14
+hpModelock1            :1000FF48
+hpModelock2            :1000FF49
+hpReset                        :1000FF6C
+hpSystem               :1000FF6D
+hpUser                 :1000FF6E
+hpClearLine            :1000FF6F
+hpInsertLine           :1000FF70
+hpDeleteLine           :1000FF71
+hpInsertChar           :1000FF72
+hpDeleteChar           :1000FF73
+hpBackTab              :1000FF74
+hpKP_BackTab           :1000FF75
+apKP_parenleft         :1000FFA8
+apKP_parenright                :1000FFA9
+
+I2ND_FUNC_L            :10004001
+I2ND_FUNC_R            :10004002
+IREMOVE                        :10004003
+IREPEAT                        :10004004
+IA1                    :10004101
+IA2                    :10004102
+IA3                    :10004103
+IA4                    :10004104
+IA5                    :10004105
+IA6                    :10004106
+IA7                    :10004107
+IA8                    :10004108
+IA9                    :10004109
+IA10                   :1000410A
+IA11                   :1000410B
+IA12                   :1000410C
+IA13                   :1000410D
+IA14                   :1000410E
+IA15                   :1000410F
+IB1                    :10004201
+IB2                    :10004202
+IB3                    :10004203
+IB4                    :10004204
+IB5                    :10004205
+IB6                    :10004206
+IB7                    :10004207
+IB8                    :10004208
+IB9                    :10004209
+IB10                   :1000420A
+IB11                   :1000420B
+IB12                   :1000420C
+IB13                   :1000420D
+IB14                   :1000420E
+IB15                   :1000420F
+IB16                   :10004210
+
+DRemove                        :1000FF00
+Dring_accent           :1000FEB0
+Dcircumflex_accent     :1000FE5E
+Dcedilla_accent                :1000FE2C
+Dacute_accent          :1000FE27
+Dgrave_accent          :1000FE60
+Dtilde                 :1000FE7E
+Ddiaeresis             :1000FE22
+
+osfCopy                        :1004FF02
+osfCut                 :1004FF03
+osfPaste               :1004FF04
+osfBackTab             :1004FF07
+osfBackSpace           :1004FF08
+osfClear               :1004FF0B
+osfEscape              :1004FF1B
+osfAddMode             :1004FF31
+osfPrimaryPaste                :1004FF32
+osfQuickPaste          :1004FF33
+osfPageLeft            :1004FF40
+osfPageUp              :1004FF41
+osfPageDown            :1004FF42
+osfPageRight           :1004FF43
+osfActivate            :1004FF44
+osfMenuBar             :1004FF45
+osfLeft                        :1004FF51
+osfUp                  :1004FF52
+osfRight               :1004FF53
+osfDown                        :1004FF54
+osfPrior               :1004FF55
+osfNext                        :1004FF56
+osfEndLine             :1004FF57
+osfBeginLine           :1004FF58
+osfEndData             :1004FF59
+osfBeginData           :1004FF5A
+osfPrevMenu            :1004FF5B
+osfNextMenu            :1004FF5C
+osfPrevField           :1004FF5D
+osfNextField           :1004FF5E
+osfSelect              :1004FF60
+osfInsert              :1004FF63
+osfUndo                        :1004FF65
+osfMenu                        :1004FF67
+osfCancel              :1004FF69
+osfHelp                        :1004FF6A
+osfSelectAll           :1004FF71
+osfDeselectAll         :1004FF72
+osfReselect            :1004FF73
+osfExtend              :1004FF74
+osfRestore             :1004FF78
+osfSwitchDirection     :1004FF7E
+osfPriorMinor          :1004FFF5
+osfNextMinor           :1004FFF6
+osfRightLine           :1004FFF7
+osfLeftLine            :1004FFF8
+osfDelete              :1004FFFF
+
+SunFA_Grave            :1005FF00
+SunFA_Circum           :1005FF01
+SunFA_Tilde            :1005FF02
+SunFA_Acute            :1005FF03
+SunFA_Diaeresis                :1005FF04
+SunFA_Cedilla          :1005FF05
+SunF36                 :1005FF10
+SunF37                 :1005FF11
+SunSys_Req             :1005FF60
+SunProps               :1005FF70
+SunFront               :1005FF71
+SunCopy                        :1005FF72
+SunOpen                        :1005FF73
+SunPaste               :1005FF74
+SunCut                 :1005FF75
+SunPowerSwitch         :1005FF76
+SunAudioLowerVolume    :1005FF77
+SunAudioMute           :1005FF78
+SunAudioRaiseVolume    :1005FF79
+SunVideoDegauss                :1005FF7A
+SunVideoLowerBrightness        :1005FF7B
+SunVideoRaiseBrightness        :1005FF7C
+SunPowerSwitchShift    :1005FF7D
+
+SunCompose             :FF20
+SunPageUp              :FF55
+SunPageDown            :FF56
+SunPrint_Screen                :FF61
+SunUndo                        :FF65
+SunAgain               :FF66
+SunFind                        :FF68
+SunStop                        :FF69
+SunAltGraph            :FF7E
+
+WYSetup                        :1006FF00
+
+ncdSetup               :1006FF00
+
+XeroxPointerButton1    :10070001
+XeroxPointerButton2    :10070002
+XeroxPointerButton3    :10070003
+XeroxPointerButton4    :10070004
+XeroxPointerButton5    :10070005
+
+usldead_acute          :100000A8
+usldead_grave          :100000A9
+usldead_diaeresis      :100000AB
+usldead_asciicircum    :100000AA
+usldead_asciitilde     :100000AC
+usldead_cedilla                :1000FE2C
+usldead_ring           :1000FEB0
diff --git a/etc/aliases.ksh b/etc/aliases.ksh
new file mode 100755 (executable)
index 0000000..90c0e70
--- /dev/null
@@ -0,0 +1,60 @@
+### aliases.ksh --- Useful shortcuts for XEmacs source hackers
+
+# Copyright (C) 1998 Free Software Foundation, Inc.
+
+# Author: Steve Baur
+# Keywords: internal
+
+# 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; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# Shortcuts for sh-derived Unix shells (ksh, zsh, bash)
+
+# From Steve Baur <steve@altair.xemacs.org>
+# Run temacs as XEmacs
+function runtemacs
+{
+       if [ ! -x temacs ]; then
+               echo "Must be in temacs source directory to run temacs."
+               return 1;
+       fi
+
+       ./temacs -batch -l loadup.el run-temacs "$@"
+}
+
+# From Adrian Aichner <aichner@ecf.teradyne.com>
+# Convenience function for running build-report
+function mak
+{
+       make "$@" 2>&1 | tee beta.err
+}
+# export -f mak
+
+# From Karl Hegbloom <karlheg@bittersweet.inetarena.com>
+# igrep from the shell command line
+function listargs
+{
+       for arg in "$@"; do
+               echo " \"$arg\""
+       done
+}
+
+function igrep
+{
+       exp="$1"; shift
+       gnudoit -q "(igrep nil \"$exp\" '($(listargs "$@")))"
+}
diff --git a/etc/cbx.png b/etc/cbx.png
new file mode 100644 (file)
index 0000000..6d2cde9
Binary files /dev/null and b/etc/cbx.png differ
diff --git a/etc/check_cygwin_setup.sh b/etc/check_cygwin_setup.sh
new file mode 100644 (file)
index 0000000..f569562
--- /dev/null
@@ -0,0 +1,188 @@
+#! bash
+
+yorn()
+{
+       echo -n " [y/n] "
+       read YN junk
+       if [ "$YN" = "n" ]
+       then
+               return -1;
+       else
+               return 0;
+       fi
+}
+
+echo -n "checking for cygwin..."
+
+if ! uname -v
+then
+    echo "couldn't find uname please add cygwin to your path."
+    exit -1
+fi
+
+OSversion="`uname -v | sed 's/^\(.\).*$/\1/'`"
+
+shell=`type sh | sed 's/sh is //'`
+distdir=`dirname $shell`
+
+echo "cygwin installed in $distdir"
+
+echo "checking paths ..."
+
+if [ ! -d "/bin" ]; then
+    echo "You don't have /bin would like to mount cygwin as /bin ?"
+    if yorn; then
+       mkdir /bin
+       mount -b /bin $distdir
+    fi
+elif [ "$distdir" != "/bin" ]; then
+    echo "Warning: you have /bin but it's not the cygwin installation."
+fi
+
+if [ ! -d "/tmp" ]; then
+    echo -n "You don't have /tmp - create it?"
+    if yorn; then
+       mkdir /tmp
+    fi
+else
+    echo "you have /tmp"
+fi
+
+if [ ! -d "/etc" ]; then
+    echo -n "You don't have /etc - create it?"
+    if yorn; then
+       mkdir /etc
+    fi
+else
+    echo "you have /etc"
+fi
+
+if [ -d "/etc" ]
+then
+    if [ ! -f "/etc/termcap" ]; then
+       echo -n "You don't have /etc/termcap - create it?"
+       if yorn; then
+           if [ ! -f "$distdir/../etc/termcap" ]
+           then
+               distdir=`mount | grep "$distdir" | sed -e "s/ .*$//"`
+               echo "Retrieving termcap from $distdir/../etc"
+           fi
+           if [ -f "$distdir/../etc/termcap" ]
+           then 
+               cp "$distdir/../etc/termcap" /etc
+           else
+               echo "Error: can't find termcap file"
+           fi
+       fi
+    else
+       echo "you have /etc/termcap"
+    fi
+
+    if [ ! -f "/etc/passwd" ]; then
+       echo -n "You don't have /etc/passwd - create it?"
+       if yorn; then
+           if [ "$OS" = "Windows_NT" ]
+           then
+               echo -n "Running on NT, create domain or local password file [d/l] "
+               read DL junk
+               if [ "$DL" = "d" ]
+               then
+                   mkpasswd -d > /etc/passwd
+               else
+                   mkpasswd -l > /etc/passwd
+               fi
+           else
+               echo "Please enter your userid e.g. andyp"
+               read userid junk
+               echo "Please enter your user name e.g. Andy Piper"
+               read username junk
+               echo "Administrator::500:513:::/bin/sh" > /etc/passwd
+               echo "$userid::1000:513:$username::/bin/sh" >> /etc/passwd
+           fi
+       fi
+    else
+       echo "you have /etc/passwd"
+       userid=`id | sed -e "s/[^(]*(\([^)]*\)).*/\1/"`
+    fi
+
+    echo "userid is $userid"
+
+    if [ ! -f "/etc/group" ]; then
+       echo -n "You don't have /etc/group - create it?"
+       if yorn; then
+           if [ "$OS" = "Windows_NT" ]
+           then
+               echo -n "Running on NT, create domain or local group file [d/l] "
+               read DL junk
+               if [ "$DL" = "d" ]
+               then
+                   mkgroup -d > /etc/group
+               else
+                   mkgroup -l > /etc/group
+               fi
+           else
+               echo "None::513:" > /etc/group
+               echo "Everyone::0:" >> /etc/group
+           fi
+       fi
+    else
+       echo "you have /etc/group"
+    fi
+
+    if [ ! -f "/etc/hosts" ]; then
+       echo -n "You don't have /etc/hosts - create it?"
+       if yorn; then
+           mname=`uname -n`
+           echo "Machine name is $mname"
+           echo -n "Please enter your ip address "
+           read mipaddr junk
+           echo "$mname $mipaddr" > /etc/hosts
+           echo "localhost 127.0.0.1" >> /etc/hosts
+       fi
+    else
+       echo "you have /etc/hosts"
+    fi
+else
+    echo "Can't create /etc files because /etc does not exist"
+fi
+
+echo "checking environment ..."
+
+if [ "$HOME" = "" ]; then
+    echo -n "HOME is not set, rectify?"
+    if yorn; then
+       if [ "$OS" = "Windows_NT" ]
+       then
+           echo "please enter your home path [/winnt/profiles/$userid]"
+           read HOME junk
+           if [ "$HOME" = "" ]; then
+               HOME="/winnt/profiles/$userid"
+           fi
+       else
+           echo "please enter your home path [/]"
+           read HOME junk
+           if [ "$HOME" = "" ]; then
+               HOME="/"
+           fi
+       fi
+
+       echo "HOME=$HOME; export HOME" >> $HOME/.bashrc
+    fi
+else 
+    echo "HOME is $HOME"
+fi
+
+if [ "$TERM" != "ansi" -a "$TERM" != "linux" ]; then
+    echo -n "TERM is not set to linux or ansi, rectify?"
+    if yorn; then
+       echo "TERM=linux; export TERM" >> $HOME/.bashrc
+    fi
+else 
+    echo "TERM is $TERM"
+fi
+
+if echo $CYGWIN32 | grep -w tty; then
+    echo "CYGWIN32 is $CYGWIN32"
+else 
+    echo "CYGWIN32 does not contain \"tty\" terminal may be deficient"
+fi
diff --git a/etc/chr.png b/etc/chr.png
new file mode 100644 (file)
index 0000000..f329bae
Binary files /dev/null and b/etc/chr.png differ
diff --git a/etc/chrm.png b/etc/chrm.png
new file mode 100644 (file)
index 0000000..f329bae
Binary files /dev/null and b/etc/chrm.png differ
diff --git a/etc/ctags.1 b/etc/ctags.1
new file mode 100644 (file)
index 0000000..1eab02f
--- /dev/null
@@ -0,0 +1 @@
+.so man1/etags.1
diff --git a/etc/custom/check0.xpm b/etc/custom/check0.xpm
new file mode 100644 (file)
index 0000000..9b342ed
--- /dev/null
@@ -0,0 +1,17 @@
+/* XPM */
+static char * check0_xpm[] = {
+"11 11 3 1",
+"      c #E6E6E6E6E6E6",
+".     c #737373737373",
+"X     c #BFBFBFBFBFBF",
+"           ",
+"          .",
+"  XXXXXXX..",
+"  XXXXXXX..",
+"  XXXXXXX..",
+"  XXXXXXX..",
+"  XXXXXXX..",
+"  XXXXXXX..",
+"  XXXXXXX..",
+"  .........",
+" .........."};
diff --git a/etc/custom/check1.xpm b/etc/custom/check1.xpm
new file mode 100644 (file)
index 0000000..19d06d9
--- /dev/null
@@ -0,0 +1,17 @@
+/* XPM */
+static char * check1_xpm[] = {
+"11 11 3 1",
+"      c #737373737373",
+".     c #E6E6E6E6E6E6",
+"X     c #22228B8B2222",
+"           ",
+"          .",
+"  XXXXXXX..",
+"  XXXXXXX..",
+"  XXXXXXX..",
+"  XXXXXXX..",
+"  XXXXXXX..",
+"  XXXXXXX..",
+"  XXXXXXX..",
+"  .........",
+" .........."};
diff --git a/etc/custom/choose-down.png b/etc/custom/choose-down.png
new file mode 100644 (file)
index 0000000..2eed202
Binary files /dev/null and b/etc/custom/choose-down.png differ
diff --git a/etc/custom/choose-up.png b/etc/custom/choose-up.png
new file mode 100644 (file)
index 0000000..e8bc704
Binary files /dev/null and b/etc/custom/choose-up.png differ
diff --git a/etc/custom/done-down.png b/etc/custom/done-down.png
new file mode 100644 (file)
index 0000000..a3b86cb
Binary files /dev/null and b/etc/custom/done-down.png differ
diff --git a/etc/custom/done-up.png b/etc/custom/done-up.png
new file mode 100644 (file)
index 0000000..26b3365
Binary files /dev/null and b/etc/custom/done-up.png differ
diff --git a/etc/custom/down-pushed.xpm b/etc/custom/down-pushed.xpm
new file mode 100644 (file)
index 0000000..34aad89
--- /dev/null
@@ -0,0 +1,18 @@
+/* XPM */
+static char * down[] = {
+"10 10 5 1",
+"      c Gray40",
+".     c Gray40",
+"X     c Gray90",
+"o     c none",
+"O     c Gray75",
+"          ",
+"..      XX",
+"o..OOOOXXo",
+"o..OOOOXXo",
+"oo..OOXXoo",
+"oo..OOXXoo",
+"ooo..XXooo",
+"ooo..XXooo",
+"oooo.Xoooo",
+"oooo.Xoooo"};
\ No newline at end of file
diff --git a/etc/custom/down.xpm b/etc/custom/down.xpm
new file mode 100644 (file)
index 0000000..5a4b99c
--- /dev/null
@@ -0,0 +1,18 @@
+/* XPM */
+static char * down_xpm[] = {
+"10 10 5 1",
+"      c Gray90",
+".     c Gray90",
+"X     c Gray40",
+"o     c none",
+"O     c Gray75",
+"          ",
+"..      XX",
+"o..OOOOXXo",
+"o..OOOOXXo",
+"oo..OOXXoo",
+"oo..OOXXoo",
+"ooo..XXooo",
+"ooo..XXooo",
+"oooo.Xoooo",
+"oooo.Xoooo"};
diff --git a/etc/custom/face.xpm b/etc/custom/face.xpm
new file mode 100644 (file)
index 0000000..38a083e
--- /dev/null
@@ -0,0 +1,28 @@
+/* XPM */
+static char *face[] = {
+/* width height num_colors chars_per_pixel */
+"    17    17        4            1",
+/* colors */
+". c #000000",
+"a c #a8b038",
+"b c #f8f800",
+"c s None c None",
+/* pixels */
+"ccccccccccccccccc",
+"ccccccccccccccccc",
+"cccccbbbbbbcccccc",
+"ccccbbbbbbbbccccc",
+"cccbbbbbbbbbbcccc",
+"ccbbbbbbbbbbbbccc",
+"cbbaaabbbbaaabbcc",
+"cbbbbbbbbbbbbbbcc",
+"cbbbbbbaabbbbbbcc",
+"cbbbbbbaabbbbbbcc",
+"cbbbbbbaabbbbbbcc",
+"cbbbbbaaaabbbbbcc",
+"ccbbabbbbbbabbccc",
+"cccbbabbbbabbcccc",
+"ccccbbaaaabbccccc",
+"cccccbbbbbbcccccc",
+"ccccccccccccccccc"
+};
diff --git a/etc/custom/folder.xpm b/etc/custom/folder.xpm
new file mode 100644 (file)
index 0000000..020ac90
--- /dev/null
@@ -0,0 +1,28 @@
+/* XPM */
+static char *folder[] = {
+/* width height num_colors chars_per_pixel */
+"    17    17        4            1",
+/* colors */
+". c #000000",
+"a c #a8b038",
+"b c #f8f800",
+"c s None c None",
+/* pixels */
+"ccccccccccccccccc",
+"ccccccccccccccccc",
+"ccccccccccccccccc",
+"ccccccccccccccccc",
+"cccccccccaaaaaacc",
+"ccccccccaaaaaaacc",
+"cc......a.a.a.aac",
+"c.bbbbbbbbbbbbb.c",
+".bbbbbbbbbbbbbb.c",
+".bbbbbbbbbbbbbb.c",
+".bbbbbbbbbbbbbb.c",
+".bbbbbbbbbbbbbb.c",
+".bbbbbbbbbbbbbb.c",
+".bbbbbbbbbbbbbb.c",
+".bbbbbbbbbbbbbb.c",
+".bbbbbbbbbbbbbb.c",
+"a..............ac"
+};
diff --git a/etc/custom/open-down.png b/etc/custom/open-down.png
new file mode 100644 (file)
index 0000000..04fa0bf
Binary files /dev/null and b/etc/custom/open-down.png differ
diff --git a/etc/custom/open-up.png b/etc/custom/open-up.png
new file mode 100644 (file)
index 0000000..198fd18
Binary files /dev/null and b/etc/custom/open-up.png differ
diff --git a/etc/custom/option.xpm b/etc/custom/option.xpm
new file mode 100644 (file)
index 0000000..9af6253
--- /dev/null
@@ -0,0 +1,28 @@
+/* XPM */
+static char *option[] = {
+/* width height num_colors chars_per_pixel */
+"    17    17        4            1",
+/* colors */
+". c #000000",
+"a c #a8b038",
+"b c #f8f800",
+"c s None c None",
+/* pixels */
+"ccccccccccccccccc",
+"ccccccccccccccccc",
+"cccccbbbbbbcccccc",
+"ccccbbbbbbbbccccc",
+"cccbbbaaaabbbcccc",
+"ccbbbaaaaaabbbccc",
+"cbbbaabbbaabbbbcc",
+"cbbbaababaabbbbcc",
+"cbbbbbbbaabbbbbcc",
+"cbbbbbbaabbbbbbcc",
+"cbbbbbbaabbbbbbcc",
+"cbbbbbbbbbbbbbbcc",
+"ccbbbbbaabbbbbccc",
+"cccbbbbaabbbbcccc",
+"ccccbbbbbbbbccccc",
+"cccccbbbbbbcccccc",
+"ccccccccccccccccc"
+};
diff --git a/etc/custom/radio0.xpm b/etc/custom/radio0.xpm
new file mode 100644 (file)
index 0000000..9debd41
--- /dev/null
@@ -0,0 +1,18 @@
+/* XPM */
+static char * radio0_xpm[] = {
+"12 11 4 1",
+"      c #FFFFFFFFFFFF s background",
+".     c #E6E6E6E6E6E6",
+"X     c #BFBFBFBFBFBF",
+"o     c #737373737373",
+"     ..     ",
+"    ....    ",
+"   ..XX..   ",
+"  ..XXXX..  ",
+" ..XXXXXX.. ",
+"ooXXXXXXXXoo",
+" ooXXXXXXoo ",
+"  ooXXXXoo  ",
+"   ooXXoo   ",
+"    oooo    ",
+"     oo     "};
diff --git a/etc/custom/radio1.xpm b/etc/custom/radio1.xpm
new file mode 100644 (file)
index 0000000..1fdd917
--- /dev/null
@@ -0,0 +1,18 @@
+/* XPM */
+static char * radio1_xpm[] = {
+"12 11 4 1",
+"      c #FFFFFFFFFFFF s background",
+".     c #737373737373",
+"X     c #22228B8B2222",
+"o     c #E6E6E6E6E6E6",
+"     ..     ",
+"    ....    ",
+"   ..XX..   ",
+"  ..XXXX..  ",
+" ..XXXXXX.. ",
+"ooXXXXXXXXoo",
+" ooXXXXXXoo ",
+"  ooXXXXoo  ",
+"   ooXXoo   ",
+"    oooo    ",
+"     oo     "};
diff --git a/etc/custom/reset-down.png b/etc/custom/reset-down.png
new file mode 100644 (file)
index 0000000..04ce306
Binary files /dev/null and b/etc/custom/reset-down.png differ
diff --git a/etc/custom/reset-up.png b/etc/custom/reset-up.png
new file mode 100644 (file)
index 0000000..0c71b50
Binary files /dev/null and b/etc/custom/reset-up.png differ
diff --git a/etc/custom/right-pushed.xpm b/etc/custom/right-pushed.xpm
new file mode 100644 (file)
index 0000000..692be11
--- /dev/null
@@ -0,0 +1,18 @@
+/* XPM */
+static char * right_xpm[] = {
+"10 10 5 1",
+"      c Gray40",
+".     c Gray40",
+"X     c none",
+"o     c Gray75",
+"O     c Gray90",
+" .XXXXXXXX",
+" ...XXXXXX",
+"  ....XXXX",
+"  oo....XX",
+"  oooo....",
+"  ooooOOOO",
+"  ooOOOOXX",
+"  OOOOXXXX",
+" OOOXXXXXX",
+" OXXXXXXXX"};
diff --git a/etc/custom/right.xpm b/etc/custom/right.xpm
new file mode 100644 (file)
index 0000000..23b5fc8
--- /dev/null
@@ -0,0 +1,18 @@
+/* XPM */
+static char * right_xpm[] = {
+"10 10 5 1",
+"      c Gray90",
+".     c Gray90",
+"X     c none",
+"o     c Gray75",
+"O     c Gray40",
+" .XXXXXXXX",
+" ...XXXXXX",
+"  ....XXXX",
+"  oo....XX",
+"  oooo....",
+"  ooooOOOO",
+"  ooOOOOXX",
+"  OOOOXXXX",
+" OOOXXXXXX",
+" OXXXXXXXX"};
diff --git a/etc/custom/save-down.png b/etc/custom/save-down.png
new file mode 100644 (file)
index 0000000..326369d
Binary files /dev/null and b/etc/custom/save-down.png differ
diff --git a/etc/custom/save-up.png b/etc/custom/save-up.png
new file mode 100644 (file)
index 0000000..9f58bff
Binary files /dev/null and b/etc/custom/save-up.png differ
diff --git a/etc/custom/set-down.png b/etc/custom/set-down.png
new file mode 100644 (file)
index 0000000..39101a1
Binary files /dev/null and b/etc/custom/set-down.png differ
diff --git a/etc/custom/set-up.png b/etc/custom/set-up.png
new file mode 100644 (file)
index 0000000..63ff960
Binary files /dev/null and b/etc/custom/set-up.png differ
diff --git a/etc/custom/state-down.png b/etc/custom/state-down.png
new file mode 100644 (file)
index 0000000..d7a2d7c
Binary files /dev/null and b/etc/custom/state-down.png differ
diff --git a/etc/custom/state-up.png b/etc/custom/state-up.png
new file mode 100644 (file)
index 0000000..1a466ca
Binary files /dev/null and b/etc/custom/state-up.png differ
diff --git a/etc/custom/toggle-off-down.png b/etc/custom/toggle-off-down.png
new file mode 100644 (file)
index 0000000..111e13c
Binary files /dev/null and b/etc/custom/toggle-off-down.png differ
diff --git a/etc/custom/toggle-off-up.png b/etc/custom/toggle-off-up.png
new file mode 100644 (file)
index 0000000..94ef3da
Binary files /dev/null and b/etc/custom/toggle-off-up.png differ
diff --git a/etc/custom/toggle-on-down.png b/etc/custom/toggle-on-down.png
new file mode 100644 (file)
index 0000000..442b97f
Binary files /dev/null and b/etc/custom/toggle-on-down.png differ
diff --git a/etc/custom/toggle-on-up.png b/etc/custom/toggle-on-up.png
new file mode 100644 (file)
index 0000000..edbfc49
Binary files /dev/null and b/etc/custom/toggle-on-up.png differ
diff --git a/etc/editclient.sh b/etc/editclient.sh
new file mode 100644 (file)
index 0000000..8e1c9b7
--- /dev/null
@@ -0,0 +1,13 @@
+#!/bin/sh
+if gnuclient -batch -eval t >/dev/null 2>&1
+then
+  exec gnuclient ${1+"$@"}
+else
+  xemacs -unmapped -f gnuserv-start &
+  until gnuclient -batch -eval t >/dev/null 2>&1
+  do
+     sleep 1
+  done
+  exec gnuclient ${1+"$@"}
+fi
+
diff --git a/etc/emacskeys.sco b/etc/emacskeys.sco
new file mode 100644 (file)
index 0000000..4e47a61
--- /dev/null
@@ -0,0 +1,220 @@
+#
+# SCO(tm) keyboard mapping file with Emacs meta-keys
+# Automatically generated using the emap utility
+#
+# Below is the uuencoded source for the emap utility. This program
+# will, when run on an SCO console, take the current keyboard
+# map and set the 'meta' bit for all keys. To make this usable
+# under Emacs, edit your termcap and terminfo entries for the
+# sco console (the ansi entries) and add the 'km' capability.
+# Usage:
+# emap [-o] [-f filename]
+# If you run the utility with no flags, it will simply modify the
+# current keyboard map in kernel memory for the multiscreen on
+# which it was invoked. Specifying -f and a filename will cause
+# a file suitable for input to the mapkey(M) utility to be generated.
+# Specifying -o will produce, on stdout, a file suitable for input
+# to the mapkey(M) utility but will NOT modify the in-memory
+# map.
+# I personally run this utility once, and replace /usr/lib/keyboard/keys
+# with the result. You may prefer to run it in your .profile or
+# via a shell-script which will in turn invoke emacs.
+#
+# begin 600 emap.c.gz
+# M'XL("'F'RC " V5M87 N8P"=5VUOXC@0_LZOF$W50KIT%^AM[U2V>Z*HW%9+
+# MH2JL=*<6H6"<$A&27&RZ1;?][S=C.X&$%'H7(>S8\\R;QS.3 R]@_G+*X;.0
+# M4R_\,/M2.DB7EH&'J]DUL1(?Y2KB8GMYSE>3T(D5H,2?)8\#8#,GAN,PDD[\
+# MV$P6O4 "+GG!M$HCCV,UXJ]9*FF$(UC@++BX'\$%_%,"L(*E;U5I(L*9F<AG
+# M/>'I))1F$ORM)PZ;Z\F$&_A$Z'%F2 .S_I2\1WID<2+.C)X>ISXW$U9/)HUD
+# M<II,?C','"->K()$UXGA[R0K"T.R-#M<,#UQC:J/9HS-& BK])*ZJH1^][V 
+# M0X7\RJJ [PLG&DLXGB_L$CE/2$=Z3!]&_'3?^'0V:N*R>I>BKA:J.&ND6\1*
+# MSJO@H1C$1S$NN%!!XBI8AY^FJ$45F-U4S&,6K: 2/Q&+NJT0;ABC/GAVM29X
+# M\!EZWV_&@V%K>#7 ]_?O;20!=:[TR#D2DO;V?''R!=6_9Z,/:,*]-U+,Z/%0
+# M^O5@/+B]:E^WNE!!VZIDK&?;AF+-CQ[QPY-LAAK/[8W5+ UZP!$<OHU[_=OS
+# MU YM8Q!&EMV$2<R=>;,(TQU\S6-\,?-<N1MVMPV+WP!K=[_E8<P/,;AWHGK;
+# MJ& _:K"-$OM1E\/691XVD<YD-ZK5'>9!CK_/A06@>"^J/>QN>5#&_AY1!:AX
+# M/ZSWYZ"]Y7B!&:48->6NL_3E>691ASS&+WRYH$-IWW5L.#JBB(;/9J5KVSG,
+# MUEU%J8=3O*L$.TGYO(>ZW<Q!N8^Z9V1VOO=R,G'E#3)=O,(9H9K1:T+WL=-7
+# M,4/U4LK/,HPV+SE91.K#:2.K>.9XTGHCYZ.,K-0KE*0NH-[X=0<7:\I]JQAN
+# MG(I*;#BTWCC+>3-G>OE0'+(R>=+(+S^4RS;\_ GI^T/9MN%WL!X>+#@'2U6(
+# M@@?S8%ZO78)KSX>U!E;5+"YQ]@9Q@^K!R9F@>J"S_]HOCDRJ0L.LOZAJ8E)S
+# M92/;N_ZC@".H/==.[<WBH"Y4=]P_+V!K]7/WR1"W"XG;Q<2]0N)>,?%E(?%E
+# MCIB\%'.YQ$X'"=!RM)KJZ<+Q EVDL1G"TJ7+]S&^/.DRK?NBBQIV0^Y%+:W0
+# MQVZ ]1'[!(<)=)>@TFC1;N>Z>X6[-$UK/OXG]=NK,E4^?\P\'[N#>K;H,N3Y
+# MR*GI@HK6AQ1!<T+W?!W#%+J, NVJWUE':B:'I2&NZ,IA>4T71BBD_@JA6RZN
+# MW*&[":)'V9_TD&^^^$F,6M^%\\C/ ?T7P?U).,(_%UST"=WXT4.0N['/GB1G
+# MY26IT"6G>2&3/E3PE/ZX[H^_7?UUT[JMPA%R5QAMX#OL?++^CK#-I:;(6J/6
+# M@K70S"TA/N0*]$66$;G'#2..L>0&>%X_LJ>E(!4=&G:MV,6I+NUPZ4\A"+%O
+# MQ".5',*EC)92>:?(+8V"9. FCG91F8--=V9W8-#N5^3"AN0[@6(U\H)')0TP
+# M*<S@BF(<%EPZ)Q3I.YBUEC)<4%?K^/X* SG@,>H_A:4@CG+&]7DOI>=[<O4Z
+# MHQTB_N>#G<@.I@+[_F(<"["OR+!9#V:/NK =O%F(GV(PH5P%JJ=,@>;-<"O<
+# MHV\$_A8_O:3]/=/]/</BBK[^$(SIS/ ]W]]36+[;;-Z16C7OO?[=36NSH2 V
+# M&_T_-GHCLW.1W]/8$?S$HO%;K;E/U.#K=6>X4]+@:V=4*$E!WRRH/;S;;1&V
+# ME,5R"/D?[.D@HWT&*5D%!NF-1-2&+,K8:<;)9-%#NHWJXU)_;#*3\S+))Y.P
+# MMH)H#XOBM.?B=PX&=,75'Y9K)6O;]6R=FF^+4O.ZH*W3\ZNI\;8@3>]*A/2O
+# .]VJJY/\+D-=?N%H1  #5
+#  
+# end
+#
+# The output below is the result of running emap on the default
+# SCO keymap as installed by SCO. It is the equivalent of the
+# at.ibm.usa key map file in /usr/lib/keyboard/keys, but with
+# the meta bits set properly. Note that for meta keys to work correctly
+# you MUST edit /etc/termcap and /usr/lib/terminfo/terminfo.src and add
+# the 'km' capability for the 'ansi' entry, and you must disable channel
+# mapping in /etc/default/mapchan for the console screens. Extra function
+# keys have been added, and the matching emacsstrs.sco is in this
+# directory to make a map which scoansi.el can use. So the sequence of
+# events should be:
+# a) Copy this file to /usr/lib/keyboard/keys
+# b) copy emacsstrs.sco to /usr/lib/keyboard/stings
+# c) run mapkey and mapstr and set MAPKEY=yes in /etc/default/boot
+# d) Add mapstr -f to your /etc/profile or your shell startup
+# e) Arrange to have scoansi.el loaded from your .emacs file.
+#
+#                                                        alt
+# scan                      cntrl          alt    alt   cntrl  lock
+# code  base  shift  cntrl  shift   alt   shift  cntrl  shift  state
+#
+    0  nop    nop    nop    nop    nop    nop    nop    nop    O
+    1  esc    esc    esc    esc    0x9b   0x9b   0x9b   0x9b   O
+    2  '1'    '!'    nop    nop    0xb1   0xa1   nop    nop    O
+    3  '2'    '@'    nul    nul    0xb2   0xc0   0x80   0x80   O
+    4  '3'    '#'    nop    nop    0xb3   0xa3   nop    nop    O
+    5  '4'    '$'    nop    nop    0xb4   0xa4   nop    nop    O
+    6  '5'    '%'    nop    nop    0xb5   0xa5   nop    nop    O
+    7  '6'    '^'    rs     rs     0xb6   0xde   0x9e   0x9e   O
+    8  '7'    '&'    nop    nop    0xb7   0xa6   nop    nop    O
+    9  '8'    '*'    nop    nop    0xb8   0xaa   nop    nop    O
+   10  '9'    '('    nop    nop    0xb9   0xa8   nop    nop    O
+   11  '0'    ')'    nop    nop    0xb0   0xa9   nop    nop    O
+   12  '-'    '_'    ns     ns     0xad   0xdf   0x9f   0x9f   O
+   13  '='    '+'    nop    nop    0xbd   0xab   nop    nop    O
+   14  bs     bs     del    del    0x88   0x88   0xff   0xff   O
+   15  ht     btab   nop    nop    0x89   btab   nop    nop    O
+   16  'q'    'Q'    dc1    dc1    0xf1   0xd1   0x91   0x91   C
+   17  'w'    'W'    etb    etb    0xf7   0xd7   0x97   0x97   C
+   18  'e'    'E'    enq    enq    0xe5   0xc5   0x85   0x85   C
+   19  'r'    'R'    dc2    dc2    0xf2   0xd2   0x92   0x92   C
+   20  't'    'T'    dc4    dc4    0xf4   0xd4   0x94   0x94   C
+   21  'y'    'Y'    em     em     0xf9   0xd9   0x99   0x99   C
+   22  'u'    'U'    nak    nak    0xf5   0xd5   0x95   0x95   C
+   23  'i'    'I'    ht     ht     0xe9   0xc9   0x89   0x89   C
+   24  'o'    'O'    si     si     0xef   0xcf   0x8f   0x8f   C
+   25  'p'    'P'    dle    dle    0xf0   0xd0   0x90   0x90   C
+   26  '['    '{'    esc    esc    0xdb   0xfb   0x9b   0x9b   O
+   27  ']'    '}'    gs     gs     0xdd   0xfd   0x9d   0x9d   O
+   28  cr     cr     nl     nl     0x8d   0x8d   0x8a   0x8a   O
+   29  ctrl   ctrl   ctrl   ctrl   ctrl   ctrl   ctrl   ctrl   O
+   30  'a'    'A'    soh    soh    0xe1   0xc1   0x81   0x81   C
+   31  's'    'S'    dc3    dc3    0xf3   0xd3   0x93   0x93   C
+   32  'd'    'D'    eot    eot    0xe4   0xc4   0x84   0x84   C
+   33  'f'    'F'    ack    ack    0xe6   0xc6   0x86   0x86   C
+   34  'g'    'G'    bel    bel    0xe7   0xc7   0x87   0x87   C
+   35  'h'    'H'    bs     bs     0xe8   0xc8   0x88   0x88   C
+   36  'j'    'J'    nl     nl     0xea   0xca   0x8a   0x8a   C
+   37  'k'    'K'    vt     vt     0xeb   0xcb   0x8b   0x8b   C
+   38  'l'    'L'    np     np     0xec   0xcc   0x8c   0x8c   C
+   39  ';'    ':'    nop    nop    0xbb   0xba   nop    nop    O
+   40  '\''   '"'    nop    nop    0xa7   0xa2   nop    nop    O
+   41  '`'    '~'    nop    nop    0xe0   0xfe   nop    nop    O
+   42  lshift lshift lshift lshift lshift lshift lshift lshift O
+   43  '\\'   '|'    fs     fs     0xdc   0xfc   0x9c   0x9c   O
+   44  'z'    'Z'    sub    sub    0xfa   0xda   0x9a   0x9a   C
+   45  'x'    'X'    can    can    0xf8   0xd8   0x98   0x98   C
+   46  'c'    'C'    etx    etx    0xe3   0xc3   0x83   0x83   C
+   47  'v'    'V'    syn    syn    0xf6   0xd6   0x96   0x96   C
+   48  'b'    'B'    stx    stx    0xe2   0xc2   0x82   0x82   C
+   49  'n'    'N'    so     so     0xee   0xce   0x8e   0x8e   C
+   50  'm'    'M'    cr     cr     0xed   0xcd   0x8d   0x8d   C
+   51  ','    '<'    nop    nop    0xac   0xbc   nop    nop    O
+   52  '.'    '>'    nop    nop    0xae   0xbe   nop    nop    O
+   53  '/'    '?'    nop    nop    0xaf   0xbf   nop    nop    O
+   54  rshift rshift rshift rshift rshift rshift rshift rshift O
+   55  '*'    '*'    nscr   nscr   0xaa   0xaa   nscr   nscr   O
+   56  alt    alt    alt    alt    alt    alt    alt    alt    O
+   57  ' '    ' '    ' '    ' '    0xa0   0xa0   0xa0   0xa0   O
+   58  clock  clock  clock  clock  clock  clock  clock  clock  O
+   59  fkey1  fkey13 fkey25 fkey37 scr1   scr11  scr1   scr11  O
+   60  fkey2  fkey14 fkey26 fkey38 scr2   scr12  scr2   scr12  O
+   61  fkey3  fkey15 fkey27 fkey39 scr3   scr13  scr3   scr13  O
+   62  fkey4  fkey16 fkey28 fkey40 scr4   scr14  scr4   scr14  O
+   63  fkey5  fkey17 fkey29 fkey41 scr5   scr15  scr5   scr15  O
+   64  fkey6  fkey18 fkey30 fkey42 scr6   scr16  scr6   scr16  O
+   65  fkey7  fkey19 fkey31 fkey43 scr7   scr7   scr7   scr7   O
+   66  fkey8  fkey20 fkey32 fkey44 scr8   scr8   scr8   scr8   O
+   67  fkey9  fkey21 fkey33 fkey45 scr9   scr9   scr9   scr9   O
+   68  fkey10 fkey22 fkey34 fkey46 scr10  scr10  scr10  scr10  O
+   69  nlock  nlock  dc3    dc3    nlock  nlock  0x93   0x93   O
+   70  slock  slock  del    del    slock  slock  0xff   0xff   O
+   71  fkey49 '7'    '7'    '7'    '7'    0xb7   0xb7   0xb7   N
+   72  fkey50 '8'    '8'    '8'    '8'    0xb8   0xb8   0xb8   N
+   73  fkey51 '9'    '9'    '9'    '9'    0xb9   0xb9   0xb9   N
+   74  fkey52 '-'    '-'    '-'    '-'    0xad   0xad   0xad   N
+   75  fkey53 '4'    '4'    '4'    '4'    0xb4   0xb4   0xb4   N
+   76  fkey54 '5'    '5'    '5'    '5'    0xb5   0xb5   0xb5   N
+   77  fkey55 '6'    '6'    '6'    '6'    0xb6   0xb6   0xb6   N
+   78  fkey56 '+'    '+'    '+'    '+'    0xab   0xab   0xab   N
+   79  fkey57 '1'    '1'    '1'    '1'    0xb1   0xb1   0xb1   N
+   80  fkey58 '2'    '2'    '2'    '2'    0xb2   0xb2   0xb2   N
+   81  fkey59 '3'    '3'    '3'    '3'    0xb3   0xb3   0xb3   N
+   82  fkey60 '0'    '0'    '0'    '0'    0xb0   0xb0   0xb0   N
+   83  del    '.'    del    del    0xff   0xae   0xff   0xff   N
+   84  ns     ns     ns     ns     0x9f   0x9f   0x9f   0x9f   O
+   85  nop    nop    nop    nop    nop    nop    nop    nop    O
+   86  nop    nop    nop    nop    nop    nop    nop    nop    O
+   87  fkey11 fkey23 fkey35 fkey47 scr11  scr11  scr11  scr11  O
+   88  fkey12 fkey24 fkey36 fkey48 scr12  scr12  scr12  scr12  O
+   89  nop    nop    nop    nop    nop    nop    nop    nop    O
+   90  nop    nop    nop    nop    nop    nop    nop    nop    O
+   91  nop    nop    nop    nop    nop    nop    nop    nop    O
+   92  nop    nop    nop    nop    nop    nop    nop    nop    O
+   93  nop    nop    nop    nop    nop    nop    nop    nop    O
+   94  nop    nop    nop    nop    nop    nop    nop    nop    O
+   95  nop    nop    nop    nop    nop    nop    nop    nop    O
+   96  fkey50 fkey62 fkey72 fkey50 fkey82 fkey62 fkey72 fkey50 N
+   97  fkey53 fkey64 fkey74 fkey53 fkey84 fkey64 fkey74 fkey53 N
+   98  fkey58 fkey67 fkey77 fkey58 fkey87 fkey67 fkey77 fkey58 N
+   99  fkey55 fkey65 fkey75 fkey55 fkey85 fkey65 fkey75 fkey55 N
+  100  fkey49 fkey61 fkey71 fkey49 fkey81 fkey61 fkey71 fkey49 N
+  101  nop    nop    nop    nop    nop    nop    nop    nop    O
+  102  fkey57 fkey66 fkey76 fkey57 fkey86 fkey66 fkey76 fkey57 N
+  103  fkey59 fkey68 fkey78 fkey59 fkey88 fkey68 fkey78 fkey59 N
+  104  fkey60 fkey69 fkey79 fkey60 fkey89 fkey69 fkey79 fkey60 N
+  105  del    del    del    del    0xff   0xff   0xff   0xff   N
+  106  fkey54 fkey54 fkey93 fkey54 fkey96 fkey54 fkey54 fkey54 N
+  107  nop    nop    nop    nop    nop    nop    nop    nop    O
+  108  nop    nop    nop    nop    nop    nop    nop    nop    O
+  109  nop    nop    nop    nop    nop    nop    nop    nop    O
+  110  nop    nop    nop    nop    nop    nop    nop    nop    O
+  111  nop    nop    nop    nop    nop    nop    nop    nop    O
+  112  nop    nop    nop    nop    nop    nop    nop    nop    O
+  113  nop    nop    nop    nop    nop    nop    nop    nop    O
+  114  nop    nop    nop    nop    nop    nop    nop    nop    O
+  115  nop    nop    nop    nop    nop    nop    nop    nop    O
+  116  nop    nop    nop    nop    nop    nop    nop    nop    O
+  117  nop    nop    nop    nop    nop    nop    nop    nop    O
+  118  nop    nop    nop    nop    nop    nop    nop    nop    O
+  119  nop    nop    nop    nop    nop    nop    nop    nop    O
+  120  nop    nop    nop    nop    nop    nop    nop    nop    O
+  121  nop    nop    nop    nop    nop    nop    nop    nop    O
+  122  nop    nop    nop    nop    nop    nop    nop    nop    O
+  123  nop    nop    nop    nop    nop    nop    nop    nop    O
+  124  nop    nop    nop    nop    nop    nop    nop    nop    O
+  125  nop    nop    nop    nop    nop    nop    nop    nop    O
+  126  nop    nop    nop    nop    nop    nop    nop    nop    O
+  127  nop    nop    nop    nop    nop    nop    nop    nop    O
+  128  rctrl  rctrl  rctrl  rctrl  rctrl  rctrl  rctrl  rctrl  O
+  129  ralt   ralt   ralt   ralt   ralt   ralt   ralt   ralt   O
+  130  fkey60 fkey69 fkey79 fkey60 fkey89 fkey69 fkey79 fkey60 O
+  131  del    del    del    del    0xff   0xff   0xff   0xff   N
+  132  fkey49 fkey61 fkey71 fkey49 fkey81 fkey61 fkey71 fkey49 N
+  133  fkey57 fkey66 fkey76 fkey57 fkey86 fkey66 fkey76 fkey57 N
+  134  fkey51 fkey63 fkey73 fkey51 fkey83 fkey63 fkey73 fkey51 N
+  135  fkey59 fkey68 fkey78 fkey59 fkey88 fkey68 fkey78 fkey59 N
+  136  fkey55 fkey65 fkey75 fkey55 fkey85 fkey65 fkey75 fkey55 N
+  137  fkey53 fkey64 fkey74 fkey53 fkey84 fkey64 fkey74 fkey53 N
+  138  fkey50 fkey62 fkey72 fkey50 fkey82 fkey62 fkey72 fkey50 N
+  139  fkey58 fkey67 fkey77 fkey58 fkey87 fkey67 fkey77 fkey58 N
+  140  '/'    nop    nop    nop    0xaf   nop    nop    nop    O
+  141  cr     cr     nl     nl     0x8d   0x8d   0x8a   0x8a   O
diff --git a/etc/emacsstrs.sco b/etc/emacsstrs.sco
new file mode 100644 (file)
index 0000000..992d818
--- /dev/null
@@ -0,0 +1,97 @@
+String key values
+"\033[M"               Function #1
+"\033[N"               Function #2
+"\033[O"               Function #3
+"\033[P"               Function #4
+"\033[Q"               Function #5
+"\033[R"               Function #6
+"\033[S"               Function #7
+"\033[T"               Function #8
+"\033[U"               Function #9
+"\033[V"               Function #10
+"\033[W"               Function #11
+"\033[X"               Function #12
+"\033[Y"               Shift Function #1
+"\033[Z"               Shift Function #2
+"\033[a"               Shift Function #3
+"\033[b"               Shift Function #4
+"\033[c"               Shift Function #5
+"\033[d"               Shift Function #6
+"\033[e"               Shift Function #7
+"\033[f"               Shift Function #8
+"\033[g"               Shift Function #9
+"\033[h"               Shift Function #10
+"\033[i"               Shift Function #11
+"\033[j"               Shift Function #12
+"\033[k"               Control Function #1
+"\033[l"               Control Function #2
+"\033[m"               Control Function #3
+"\033[n"               Control Function #4
+"\033[o"               Control Function #5
+"\033[p"               Control Function #6
+"\033[q"               Control Function #7
+"\033[r"               Control Function #8
+"\033[s"               Control Function #9
+"\033[t"               Control Function #10
+"\033[u"               Control Function #11
+"\033[v"               Control Function #12
+"\033[w"               Ctrl/Shft Function #1
+"\033[x"               Ctrl/Shft Function #2
+"\033[y"               Ctrl/Shft Function #3
+"\033[z"               Ctrl/Shft Function #4
+"\033[@"               Ctrl/Shft Function #5
+"\033[["               Ctrl/Shft Function #6
+"\033[\\"              Ctrl/Shft Function #7
+"\033[]"               Ctrl/Shft Function #8
+"\033[^"               Ctrl/Shft Function #9
+"\033[_"               Ctrl/Shft Function #10
+"\033[`"               Ctrl/Shft Function #11
+"\033[{"               Ctrl/Shft Function #12
+"\033[H"               Home
+"\033[A"               Up arrow
+"\033[I"               Page up
+"\033[-"               -
+"\033[D"               Left arrow
+"\033[E"               5
+"\033[C"               Right arrow
+"\033[+"               +
+"\033[F"               End
+"\033[B"               Down arrow
+"\033[G"               Page down
+"\033[L"               Insert
+"\033]A"        Shift Home
+"\033]B"        Shift Up
+"\033]C"        Shift PgUp
+"\033]D"        Shift Left
+"\033]E"        Shift Right
+"\033]F"        Shift End
+"\033]G"        Shift Down
+"\033]H"        Shift PgDn
+"\033]I"        Shift Insert
+"\033]J"        Shift Delete
+"\033]K"        Ctrl Home
+"\033]L"        Ctrl Up
+"\033]M"        Ctrl PgUp
+"\033]N"        Ctrl Left
+"\033]O"        Ctrl Right
+"\033]P"        Ctrl End
+"\033]Q"        Ctrl Down
+"\033]R"        Ctrl PgDn
+"\033]S"        Ctrl Insert
+"\033]T"        Ctrl Delete
+"\033]U"        Alt Home
+"\033]V"        Alt Up
+"\033]W"        Alt PgUp
+"\033]X"        Alt Left
+"\033]Y"        Alt Right
+"\033]Z"        Alt End
+"\033]a"        Alt Down
+"\033]b"        Alt PgDn
+"\033]c"        Alt Insert
+"\033]d"        Alt Delete
+"\033]e"        Ctrl Keypad +
+"\033]f"        Ctrl Keypad -
+"\033]g"        Ctrl Keypad 5
+"\033]h"        Alt Keypad +
+"\033]i"        Alt Keypad -
+"\033]j"        Alt Keypad 5
diff --git a/etc/eos/eos-build.xbm b/etc/eos/eos-build.xbm
new file mode 100644 (file)
index 0000000..a658fc0
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x92,0xa4,0x54,0x05,0x08,0x02,0x02,0x00,0xa2,0x90,0x80,
+ 0x04,0x00,0x42,0x7f,0x00,0x94,0x10,0x35,0x04,0x40,0x42,0xb5,0x00,0x12,0x10,
+ 0x2b,0x04,0x48,0x42,0xb5,0x00,0x82,0x10,0x35,0x04,0x08,0x4a,0xb5,0x00,0xa2,
+ 0x14,0x29,0x04,0x00,0x6a,0xb7,0x00,0x94,0x51,0x35,0x04,0xc0,0xc4,0xa9,0x02,
+ 0x55,0x01,0x35,0x00,0x20,0xfc,0xff,0x09,0x94,0xae,0x84,0x00,0xf0,0x27,0xd9,
+ 0x02,0x2a,0x94,0xc6,0x04,0x80,0x54,0xda,0x00,0x12,0xfd,0xff,0x04,0x40,0x00,
+ 0x00,0x01,0x14,0x54,0x49,0x00,0x40,0x01,0x04,0x05,0x15,0x24,0x41,0x00,0x40,
+ 0x10,0x14,0x09,0x88,0x44,0x41,0x00};
diff --git a/etc/eos/eos-clear-at.xbm b/etc/eos/eos-clear-at.xbm
new file mode 100644 (file)
index 0000000..86fd43d
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x80,0x00,0x24,0xa5,0x2a,0x04,0x82,0x10,0x80,0x00,0x28,0x84,0x24,
+ 0x04,0x80,0x7c,0x83,0x00,0x25,0x02,0x2c,0x04,0x10,0x69,0x81,0x00,0x84,0xb4,
+ 0x33,0x04,0x50,0xde,0xa6,0x00,0x25,0xb5,0x4d,0x04,0x90,0xd3,0x94,0x02,0xd2,
+ 0x65,0xbc,0x00,0x90,0x06,0xab,0x04,0xd2,0x9d,0x9e,0x00,0x90,0x0b,0xb5,0x04,
+ 0x54,0x25,0x2e,0x01,0xd0,0xe3,0xb8,0x04,0x12,0xb9,0x94,0x00,0x20,0xeb,0x4f,
+ 0x02,0x4a,0xbc,0x22,0x00,0x80,0x6a,0x93,0x04,0x29,0xd9,0x09,0x01,0x80,0x02,
+ 0x24,0x04,0x29,0x6c,0x03,0x01,0x00,0x00,0x48,0x04,0x4a,0x25,0x11,0x00,0x20,
+ 0x10,0x44,0x09,0x09,0x44,0x01,0x00};
diff --git a/etc/eos/eos-cont.xbm b/etc/eos/eos-cont.xbm
new file mode 100644 (file)
index 0000000..7ddc819
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x04,0x52,0xa9,0x54,0x01,0x00,0x04,0x02,0x04,0x29,0x81,0x20,
+ 0x01,0x84,0x14,0x0a,0x04,0x20,0x80,0x40,0x01,0xc2,0xef,0x1f,0x04,0xb0,0x06,
+ 0x24,0x01,0xf2,0x27,0x11,0x04,0x94,0xcf,0x7f,0x01,0xf0,0x40,0x00,0x04,0xd4,
+ 0x12,0x14,0x01,0xb0,0x46,0x41,0x04,0xda,0x1e,0x10,0x00,0xf0,0x5b,0x4e,0x09,
+ 0xd4,0x3a,0x1e,0x00,0xb0,0x77,0xbb,0x02,0x65,0x3d,0x3f,0x00,0xd0,0x9b,0x5a,
+ 0x05,0x04,0x2a,0x0c,0x00,0x50,0x87,0x20,0x09,0x05,0x26,0x0a,0x00,0x90,0x80,
+ 0xa0,0x02,0x04,0x28,0x08,0x00,0x50,0x82,0x22,0x05,0x85,0x20,0x40,0x00,0x10,
+ 0x8a,0x0a,0x09,0x84,0x20,0x40,0x00};
diff --git a/etc/eos/eos-dismiss.xbm b/etc/eos/eos-dismiss.xbm
new file mode 100644 (file)
index 0000000..5f270e5
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x10,0x00,0x00,0xaa,0x84,0x52,0x05,0x00,0x22,0x08,0x00,0x92,0x08,0x82,
+ 0x04,0x40,0xa0,0x28,0x00,0x14,0x0a,0x02,0x05,0xc0,0x20,0x18,0x00,0x8a,0x89,
+ 0x92,0x04,0x20,0x03,0x4c,0x00,0x09,0x56,0x16,0x05,0x20,0x0c,0x03,0x00,0x0a,
+ 0x91,0xa1,0x04,0x20,0xf4,0x08,0x02,0x09,0x41,0x82,0x00,0x20,0x74,0x28,0x02,
+ 0x0a,0x99,0x83,0x00,0x20,0x0c,0x09,0x0a,0x89,0x46,0xa6,0x00,0x20,0x03,0x0c,
+ 0x02,0x8a,0x51,0x99,0x00,0xa0,0x00,0x10,0x0a,0x08,0x94,0x84,0x00,0x42,0x40,
+ 0x10,0x02,0x10,0x12,0x85,0x00,0x42,0x08,0x10,0x0a,0x10,0x82,0xa4,0x00,0x42,
+ 0x28,0x02,0x02,0x90,0x82,0x90,0x00};
diff --git a/etc/eos/eos-down.xbm b/etc/eos/eos-down.xbm
new file mode 100644 (file)
index 0000000..eb65382
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x01,0x08,0x54,0x55,0x90,0x02,0x00,0x00,0x05,0x00,0x25,0x49,0x40,
+ 0x05,0x10,0x04,0x15,0x00,0x04,0x51,0x80,0x04,0xd0,0x3f,0x09,0x02,0x65,0x62,
+ 0xa0,0x00,0xc0,0x3a,0x05,0x02,0x52,0x2a,0x90,0x00,0xc0,0xb5,0x44,0x0a,0x69,
+ 0x2a,0x00,0x00,0x40,0x60,0x3d,0x01,0x54,0x34,0x5c,0x04,0xc0,0xa0,0x1e,0x01,
+ 0x55,0x29,0x5c,0x00,0x40,0x60,0x1c,0x05,0x64,0x3f,0x5e,0x00,0xd0,0xbd,0x7f,
+ 0x02,0x44,0x37,0xbe,0x00,0x42,0x3d,0x1c,0x0a,0x60,0xb7,0x9a,0x00,0xca,0x3f,
+ 0x40,0x02,0x40,0x40,0x12,0x00,0x12,0x09,0x88,0x04,0x00,0x82,0x02,0x01,0x2a,
+ 0x28,0x28,0x04,0x80,0x02,0x02,0x01};
diff --git a/etc/eos/eos-evaluate-star.xbm b/etc/eos/eos-evaluate-star.xbm
new file mode 100644 (file)
index 0000000..3593b8b
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x40,0x00,0x00,0x00,0x14,0x24,0x49,0x02,0x42,0x82,0x20,0x08,0x88,0x20,0x0a,
+ 0x02,0x20,0x0a,0xa0,0x00,0x0a,0x40,0x09,0x04,0xa0,0x24,0x24,0x01,0x09,0x01,
+ 0x01,0x04,0x20,0x14,0x54,0x00,0x69,0x43,0x01,0x05,0xc0,0x05,0x24,0x00,0xfa,
+ 0x27,0x81,0x04,0xe0,0xf9,0x14,0x00,0x69,0xb3,0xfd,0x05,0x80,0xb2,0xfd,0x00,
+ 0x29,0xf4,0x05,0x04,0x80,0xb0,0xfd,0x01,0x2a,0xb4,0xfd,0x00,0x80,0xf0,0x49,
+ 0x0a,0x12,0x39,0x82,0x00,0x40,0x74,0x08,0x02,0x14,0x00,0xa2,0x00,0x40,0x29,
+ 0x08,0x0a,0x15,0x82,0x82,0x00,0x40,0x08,0x28,0x02,0x10,0x42,0x82,0x00,0x42,
+ 0x08,0x09,0x0a,0x10,0x42,0x90,0x00};
diff --git a/etc/eos/eos-evaluate.xbm b/etc/eos/eos-evaluate.xbm
new file mode 100644 (file)
index 0000000..83b8ede
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x20,0x00,0x00,0x00,0x09,0x25,0x95,0x04,0x20,0x10,0x40,0x00,0x0a,0x05,0x15,
+ 0x04,0x20,0x50,0x40,0x01,0x89,0x04,0x12,0x04,0x20,0x92,0x40,0x00,0x8a,0x00,
+ 0x14,0x05,0x00,0x52,0x40,0x00,0xa8,0x04,0x12,0x04,0x02,0x50,0x44,0x02,0x90,
+ 0x1e,0x81,0x00,0x42,0x36,0x3f,0x02,0x10,0xbe,0xbf,0x00,0x42,0x37,0x24,0x0a,
+ 0x10,0xb6,0x3f,0x00,0x42,0x36,0xbf,0x02,0x10,0x9e,0x20,0x00,0x42,0x17,0x8a,
+ 0x04,0x10,0x86,0x00,0x01,0x4a,0x14,0x2a,0x04,0x00,0x81,0x00,0x01,0x12,0x14,
+ 0x92,0x08,0x40,0x81,0x04,0x02,0x0a,0x14,0x50,0x00,0x20,0x41,0x05,0x04,0x82,
+ 0x04,0x90,0x00,0x28,0xa0,0x24,0x04};
diff --git a/etc/eos/eos-fix.xbm b/etc/eos/eos-fix.xbm
new file mode 100644 (file)
index 0000000..0426290
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x10,0x00,0x00,0x00,0x04,0x29,0x25,0x05,0x50,0x80,0x10,0x00,0x05,0x24,0x84,
+ 0x04,0x50,0x1d,0x11,0x02,0x04,0x72,0x80,0x00,0x90,0xcb,0x2b,0x02,0x05,0x91,
+ 0x8e,0x00,0x50,0x41,0x32,0x0a,0x84,0x12,0x1d,0x00,0xd0,0xa0,0x47,0x01,0x45,
+ 0xea,0x10,0x04,0x50,0xfc,0x7f,0x01,0xa4,0x07,0x64,0x00,0xf0,0xfa,0xd5,0x0a,
+ 0x45,0x15,0x6a,0x00,0xd0,0xff,0x7f,0x02,0x44,0x4a,0xc6,0x00,0xd0,0x0a,0x5b,
+ 0x0a,0x45,0x5d,0x62,0x00,0x50,0x0d,0x6e,0x01,0x44,0x8a,0x6a,0x04,0xd0,0x2f,
+ 0x7e,0x01,0x24,0x09,0x01,0x00,0x82,0x20,0x54,0x05,0x20,0x08,0x01,0x00,0x8a,
+ 0x22,0x24,0x09,0x00,0x08,0x41,0x00};
diff --git a/etc/eos/eos-intro.xbm b/etc/eos/eos-intro.xbm
new file mode 100644 (file)
index 0000000..43c3137
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x84,0x20,0x00,0x00,0x21,0x0a,0x55,0x05,0x84,0x50,0x00,0x08,0x51,0x24,0xaa,
+ 0x02,0x04,0xf9,0x00,0x04,0xa1,0xd8,0x54,0x01,0x14,0xb6,0x01,0x02,0x81,0xe8,
+ 0xaa,0x04,0x14,0xba,0x00,0x00,0x41,0x21,0x54,0x05,0x14,0x44,0x01,0x08,0x21,
+ 0xfd,0xa8,0x02,0x84,0xaa,0x02,0x04,0x21,0xf8,0x50,0x01,0x94,0xaa,0x02,0x02,
+ 0x02,0xf8,0xa8,0x04,0xa8,0xa8,0x02,0x00,0x04,0xfa,0x50,0x05,0x52,0xe8,0x0a,
+ 0x08,0x00,0xba,0xa0,0x02,0xaa,0xe8,0x04,0x04,0x01,0x79,0x51,0x01,0x54,0xac,
+ 0x05,0x02,0x01,0xf6,0xa3,0x04,0x54,0x01,0x08,0x00,0x02,0x28,0x42,0x05,0xa8,
+ 0x82,0x08,0x00,0x04,0x28,0x52,0x05};
diff --git a/etc/eos/eos-introB.xbm b/etc/eos/eos-introB.xbm
new file mode 100644 (file)
index 0000000..3db1a72
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x88,0x00,0x00,0x02,0x22,0xa8,0xaa,0x00,0x88,0x02,0x00,0x05,0x42,0x68,0x55,
+ 0x00,0x14,0xb9,0x80,0x0a,0x81,0xd8,0x2a,0x00,0x14,0x76,0x41,0x05,0xa1,0xd8,
+ 0x14,0x00,0x04,0x79,0xa1,0x02,0x51,0x22,0x08,0x04,0x04,0x88,0xa2,0x00,0x51,
+ 0xf5,0x10,0x04,0x04,0xde,0x4a,0x01,0x41,0xb1,0x00,0x04,0x14,0xfc,0xaa,0x00,
+ 0x41,0xa9,0x00,0x05,0x14,0xf8,0x2a,0x00,0x82,0xaa,0x00,0x05,0x28,0xf8,0x54,
+ 0x00,0x84,0xaa,0x02,0x05,0x12,0xf8,0xe8,0x08,0x80,0xaa,0x42,0x03,0x2a,0x7c,
+ 0x49,0x02,0x80,0xd6,0xa3,0x05,0x2a,0x08,0x44,0x02,0x81,0x22,0x51,0x02,0x14,
+ 0x84,0xc4,0x09,0x41,0x21,0x20,0x02};
diff --git a/etc/eos/eos-introD.xbm b/etc/eos/eos-introD.xbm
new file mode 100644 (file)
index 0000000..1a2698a
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x08,0x20,0x40,0x00,0xa2,0x0a,0x15,0x04,0x04,0x50,0xa0,0x02,0x51,0x25,0x15,
+ 0x00,0x04,0xf8,0x40,0x05,0xa1,0xaa,0x28,0x00,0x04,0xfc,0x85,0x0a,0x51,0xa9,
+ 0x40,0x00,0x04,0xfa,0x2a,0x05,0xa1,0x20,0x00,0x00,0x14,0x09,0x55,0x05,0x41,
+ 0xf4,0x00,0x00,0x24,0xdf,0xaa,0x02,0x09,0xe8,0x00,0x04,0x50,0xba,0xaa,0x00,
+ 0x84,0xd0,0x00,0x04,0x12,0x7a,0x55,0x01,0x84,0xd8,0x00,0x04,0x50,0xea,0xaa,
+ 0x00,0x0a,0xb8,0x00,0x05,0x5c,0xd9,0x2a,0x00,0x24,0xf4,0x00,0x05,0xa2,0xac,
+ 0x55,0x00,0x2c,0xfa,0x03,0x05,0xa2,0x04,0x28,0x00,0x2c,0x01,0x04,0x05,0x9c,
+ 0x54,0x51,0x08,0x21,0x00,0x08,0x02};
diff --git a/etc/eos/eos-introDB.xbm b/etc/eos/eos-introDB.xbm
new file mode 100644 (file)
index 0000000..fbcb9ff
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x08,0x21,0x80,0x00,0x42,0x88,0x2a,0x04,0x28,0x25,0x40,0x01,0x45,0x20,0x15,
+ 0x04,0x10,0xfd,0xa0,0x00,0x44,0xa8,0x08,0x05,0x12,0xfd,0x25,0x00,0x40,0xa8,
+ 0x00,0x05,0x0a,0xf9,0xaa,0x00,0x40,0x22,0x00,0x04,0x2a,0x08,0x55,0x01,0x01,
+ 0xf5,0x00,0x04,0x54,0xde,0xaa,0x00,0x81,0xe8,0x00,0x04,0x14,0xba,0xaa,0x02,
+ 0x82,0xe8,0x00,0x00,0x28,0xda,0xaa,0x0a,0x04,0xb1,0x00,0x00,0x52,0xfc,0xaa,
+ 0x02,0x00,0xa9,0x00,0x04,0x5e,0xf8,0xea,0x01,0x24,0xaa,0x40,0x06,0xb4,0xfc,
+ 0x45,0x02,0x25,0x56,0xd3,0x01,0xa4,0x00,0x48,0x0a,0x2c,0xaa,0x42,0x02,0x9a,
+ 0x00,0xd4,0x09,0x20,0x54,0x01,0x02};
diff --git a/etc/eos/eos-run.xbm b/etc/eos/eos-run.xbm
new file mode 100644 (file)
index 0000000..1f00bbc
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x04,0x08,0x00,0x54,0x41,0x42,0x05,0x00,0x24,0x08,0x00,0x25,0x09,0x92,
+ 0x04,0x10,0xa0,0x40,0x00,0x04,0x09,0x12,0x04,0x50,0x44,0x88,0x00,0x05,0x11,
+ 0xfe,0x04,0x10,0x40,0x41,0x02,0xe4,0x17,0x12,0x00,0xf0,0x43,0xfe,0x09,0x25,
+ 0x13,0x20,0x02,0xfc,0x5f,0x85,0x00,0xa8,0x0f,0xfe,0x04,0xb2,0x96,0x10,0x00,
+ 0xe8,0x23,0x44,0x05,0xc2,0x81,0xfe,0x00,0x90,0x28,0x00,0x04,0x44,0x82,0xaa,
+ 0x00,0x01,0x20,0xfe,0x04,0x54,0x85,0x00,0x01,0x00,0x20,0x48,0x00,0x92,0x84,
+ 0xfe,0x0a,0x20,0x28,0x84,0x00,0x8a,0x82,0x10,0x02,0x00,0x20,0x84,0x00,0x52,
+ 0x92,0x10,0x0a,0x04,0x04,0x8a,0x00};
diff --git a/etc/eos/eos-run2.xbm b/etc/eos/eos-run2.xbm
new file mode 100644 (file)
index 0000000..94a34ca
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x01,0x00,0x00,0x54,0xa4,0x54,0x05,0x00,0x00,0x02,0x00,0x92,0xaa,0x90,
+ 0x04,0x08,0x00,0x04,0x02,0x82,0x24,0xa1,0x00,0x28,0x82,0x08,0x02,0x82,0x20,
+ 0x82,0x00,0x08,0x0a,0x29,0x0a,0xa2,0x80,0x83,0x00,0x00,0x12,0x17,0x02,0xf4,
+ 0xff,0x8d,0x00,0x60,0x55,0x15,0x0a,0xaa,0xfb,0xbf,0x00,0x60,0x57,0x75,0x02,
+ 0xa9,0xfd,0x3e,0x00,0xe0,0xb7,0x9b,0x02,0xea,0xff,0x2f,0x04,0x20,0x00,0x87,
+ 0x00,0x09,0x48,0x13,0x02,0xa0,0x22,0x41,0x08,0x0a,0x80,0x14,0x02,0x20,0x15,
+ 0x40,0x00,0x48,0x00,0x15,0x05,0x02,0x29,0x40,0x00,0x20,0x82,0x12,0x04,0x8a,
+ 0x08,0x48,0x02,0x20,0x40,0x82,0x00};
diff --git a/etc/eos/eos-step-into.xbm b/etc/eos/eos-step-into.xbm
new file mode 100644 (file)
index 0000000..c339f24
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x40,0x00,0x00,0x00,0x12,0x2a,0x49,0x05,0x88,0x00,0x04,0x00,0x22,0x48,0xa1,
+ 0x04,0x80,0x02,0x04,0x02,0x29,0x50,0x91,0x00,0xc0,0xc7,0x1f,0x02,0xb4,0x26,
+ 0x80,0x00,0xf0,0x97,0x2a,0x0a,0x95,0xc7,0xbf,0x00,0xf0,0x08,0x00,0x02,0xd4,
+ 0x82,0xa4,0x00,0xf0,0x2e,0x02,0x0a,0x9a,0x8b,0x90,0x00,0xf0,0x1f,0xfe,0x02,
+ 0xd4,0x78,0x09,0x00,0xb0,0x77,0xa0,0x02,0xe5,0x3d,0xff,0x04,0xc0,0x1b,0x04,
+ 0x00,0x14,0x0e,0x51,0x05,0x40,0x26,0xfe,0x00,0x12,0x82,0x02,0x02,0x48,0x29,
+ 0x48,0x08,0x02,0x02,0x11,0x02,0x48,0x48,0x44,0x00,0x11,0x02,0x01,0x05,0x44,
+ 0x28,0x14,0x00,0x00,0x02,0x81,0x04};
diff --git a/etc/eos/eos-step-over.xbm b/etc/eos/eos-step-over.xbm
new file mode 100644 (file)
index 0000000..dbc02e7
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x40,0x00,0x04,0x4a,0x15,0x54,0x01,0x20,0x40,0x01,0x04,0x09,0x12,0x24,
+ 0x01,0x20,0x41,0x80,0x08,0x4a,0x10,0x29,0x02,0xc0,0x0f,0x04,0x00,0xa8,0xa6,
+ 0xfe,0x05,0xf2,0x05,0x22,0x00,0x90,0x97,0x80,0x04,0xfa,0x44,0xfe,0x00,0xd0,
+ 0x02,0x29,0x04,0xd2,0x2e,0x84,0x00,0xd8,0x8b,0xfe,0x04,0xf0,0x1f,0x20,0x01,
+ 0x95,0x78,0x0a,0x04,0xf0,0x77,0xfe,0x00,0x68,0x3d,0x21,0x05,0xc2,0x1b,0x84,
+ 0x00,0x20,0x8e,0xfe,0x02,0x8a,0x26,0x22,0x08,0x20,0x82,0x08,0x02,0x82,0x14,
+ 0xfe,0x00,0x10,0x01,0x21,0x05,0x42,0x54,0x84,0x00,0x10,0x00,0x21,0x04,0x42,
+ 0x09,0x84,0x00,0x10,0x42,0x21,0x04};
diff --git a/etc/eos/eos-stop-in.xbm b/etc/eos/eos-stop-in.xbm
new file mode 100644 (file)
index 0000000..32187b8
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x08,0x00,0x10,0x00,0x82,0x52,0x05,0x05,0x28,0x08,0x50,0x00,0x02,0x82,0x04,
+ 0x04,0x48,0x7c,0x93,0x00,0x11,0x02,0x24,0x04,0x44,0xe9,0x88,0x00,0x80,0xbc,
+ 0x33,0x04,0x4a,0x6a,0x87,0x00,0x20,0xdf,0x4d,0x04,0x92,0xb5,0x92,0x02,0x50,
+ 0x61,0xb5,0x00,0xd2,0x55,0x96,0x02,0x90,0x38,0xb3,0x00,0xd2,0x91,0x8d,0x04,
+ 0x50,0x75,0x33,0x01,0x52,0x2d,0xa5,0x04,0x90,0x75,0x97,0x00,0x22,0xad,0x48,
+ 0x02,0x48,0x7a,0xa7,0x00,0x80,0xac,0x11,0x0a,0x25,0xf1,0x0a,0x00,0x10,0x02,
+ 0xa4,0x02,0x84,0x5c,0x03,0x00,0x10,0x00,0x28,0x05,0x25,0xa5,0x42,0x00,0x80,
+ 0x00,0x08,0x09,0x24,0x52,0x42,0x00};
diff --git a/etc/eos/eos-stop.xbm b/etc/eos/eos-stop.xbm
new file mode 100644 (file)
index 0000000..419a535
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x2a,0x55,0xa9,0x04,0x80,0x00,0x04,0x02,0x24,0x22,0x81,
+ 0x00,0x10,0xfc,0x2a,0x02,0x85,0x02,0x84,0x00,0x10,0xa9,0x09,0x0a,0x84,0x78,
+ 0xb3,0x00,0x50,0xee,0x06,0x02,0x25,0xb7,0xcd,0x00,0x90,0x6d,0x9b,0x04,0x52,
+ 0x3b,0xb6,0x00,0xd0,0x02,0xac,0x02,0x94,0x03,0x98,0x00,0x50,0x01,0xa8,0x04,
+ 0xca,0x5f,0xbc,0x00,0x90,0x6a,0xab,0x02,0x52,0x77,0x9d,0x00,0x20,0xdd,0x4b,
+ 0x0a,0x49,0xb6,0x26,0x00,0x80,0xec,0x92,0x04,0x2a,0xb1,0x09,0x00,0x00,0x02,
+ 0xa4,0x02,0x92,0x7c,0x0b,0x00,0x40,0x00,0x20,0x05,0x14,0x42,0x42,0x00,0x40,
+ 0x08,0x08,0x09,0x12,0x92,0x42,0x00};
diff --git a/etc/eos/eos-type.xbm b/etc/eos/eos-type.xbm
new file mode 100644 (file)
index 0000000..228fb7c
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x54,0xa9,0x52,0x05,0x00,0x04,0x08,0x00,0x25,0x41,0x82,
+ 0x04,0x80,0x08,0x49,0x00,0x28,0x42,0x10,0x04,0x02,0x08,0x41,0x01,0x90,0x42,
+ 0x12,0x00,0x42,0x08,0x88,0x0a,0x10,0x42,0x22,0x00,0x62,0x0b,0x81,0x04,0xe8,
+ 0x43,0x28,0x00,0x7a,0xdf,0x86,0x02,0x6c,0xdb,0xee,0x04,0x6c,0xdf,0xa3,0x06,
+ 0xee,0x1b,0xf3,0x01,0x7c,0x9b,0xc3,0x07,0x6c,0xfb,0x56,0x07,0x3a,0xcf,0x26,
+ 0x07,0x40,0x40,0x92,0x00,0x0a,0x15,0x41,0x0a,0x40,0x00,0x10,0x00,0x12,0xa9,
+ 0x42,0x02,0x04,0x02,0x90,0x00,0x50,0x48,0x02,0x0a,0x04,0x82,0xa8,0x00,0x90,
+ 0x08,0x02,0x02,0x25,0xa0,0x90,0x00};
diff --git a/etc/eos/eos-up.xbm b/etc/eos/eos-up.xbm
new file mode 100644 (file)
index 0000000..5f4e0de
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x08,0x00,0x00,0xa9,0x82,0x52,0x05,0x00,0x28,0x08,0x00,0x4a,0x02,0x82,
+ 0x04,0x20,0x48,0x14,0x00,0x09,0x12,0x2f,0x05,0xe0,0x3f,0x1f,0x00,0x4a,0xe2,
+ 0x7f,0x05,0x60,0x2d,0x0e,0x00,0xc8,0xb2,0x9e,0x04,0x42,0x2d,0x0e,0x00,0x60,
+ 0xb2,0x4e,0x05,0x4a,0x29,0x2e,0x00,0x40,0x20,0x0f,0x04,0x52,0x69,0xa4,0x00,
+ 0x44,0x20,0x08,0x04,0x50,0xa5,0x20,0x01,0xc4,0x3e,0x4a,0x04,0x50,0xbb,0x00,
+ 0x01,0xc5,0x3d,0x48,0x00,0x50,0xb7,0x02,0x05,0x44,0x3b,0x50,0x00,0xd0,0xbf,
+ 0x04,0x09,0x45,0x00,0x41,0x00,0x10,0x49,0x14,0x05,0x04,0x10,0x40,0x00,0x50,
+ 0x41,0x09,0x01,0x05,0x14,0x42,0x04};
diff --git a/etc/etags.1 b/etc/etags.1
new file mode 100644 (file)
index 0000000..2a6c375
--- /dev/null
@@ -0,0 +1,227 @@
+.\" Copyright (c) 1992 Free Software Foundation
+.\" See section COPYING for conditions for redistribution
+.TH etags 1 "19apr1994" "GNU Tools" "GNU Tools"
+.de BP
+.sp
+.ti -.2i
+\(**
+..
+
+.SH NAME
+etags, ctags \- generate tag file for Emacs, vi
+.SH SYNOPSIS
+.hy 0
+.na
+.B etags [\|\-aCDRSVh\|] [\|\-i \fIfile\fP\|] [\|\-l \fIlanguage\fP\|] [\|\-i \fIregexp\fP\|] [\|\-o \fItagfile\fP\|]
+.br
+[\|\-\-c++\|] [\|\-\-no\-defines\|] [\|\-\-ignore\-indentation\|]
+[\|\-\-language=\fIlanguage\fP\|] [\|\-\-regex=\fIregexp\fP\|]
+[\|\-\-no\-regexp\|] [\|\-\-help\|] [\|\-\-version\|]
+[\|\-\-include=\fIfile\fP\|] [\|\-\-output=\fItagfile\fP\|]
+[\|\-\-append\|] \fIfile\fP .\|.\|.
+
+.B ctags [\|\-aCdRSVh\|] [\|\-BtTuvwx\|] [\|\-l \fIlanguage\fP\|]
+.br
+[\|\-i \fIregexp\fP\|] [\|\-o \fItagfile\fP\|]
+[\|\-\-c++\|] [\|\-\-defines\|] [\|\-\-ignore\-indentation\|]
+[\|\-\-no\-warn\|] [\|\-\-cxref\|] [\|\-\-backward\-search\|]
+[\|\-\-forward\-search\|] [\|\-\-typedefs\|] [\|\-\-typedefs\-and\-c++\|]
+[\|\-\-language=\fIlanguage\fP\|] [\|\-\-regex=\fIregexp\fP\|]
+[\|\-\-help\|] [\|\-\-version\|]
+.br
+[\|\-\-output=\fItagfile\fP\|] [\|\-\-append\|] [\|\-\-update\|] \fIfile\fP .\|.\|.
+.ad b
+.hy 1
+.SH DESCRIPTION
+The `\|\fBetags\fP\|' program is used to create a tag table file, in a format
+understood by
+.BR emacs ( 1 )\c
+\&; the `\|\fBctags\fP\|' program is used to create a similar table in a
+format understood by
+.BR vi ( 1 )\c
+\&.  Both forms of the program understand
+the syntax of C, Objective C, C++, Java, Fortran, Pascal, Cobol,
+LaTeX, Scheme, Emacs Lisp/Common Lisp, Postscript, Erlang, Prolog and
+most assembler\-like syntaxes.
+Both forms read the files specified on the command line, and write a tag
+table (defaults: `\|TAGS\|' for \fBetags\fP, `\|tags\|' for
+\fBctags\fP) in the current working directory.
+Files specified with relative file names will be recorded in the tag
+table with file names relative to the directory where the tag table
+resides.  Files specified with absolute file names will be recorded
+with absolute file names.
+The programs recognize the language used in an input file based on its
+file name and contents.  The --language switch can be used to force
+parsing of the file names following the switch according to the given
+language, overriding guesses based on filename extensions.
+.SH OPTIONS
+Some options make sense only for the \fBvi\fP style tag files produced
+by ctags;
+\fBetags\fP does not recognize them.
+The programs accept unambiguous abbreviations for long option names.
+.TP
+.B \-a, \-\-append
+Append to existing tag file.  (For vi-format tag files, see also
+\fB\-\-update\fP.)
+.TP
+.B \-B, \-\-backward\-search
+Tag files written in the format expected by \fBvi\fP contain regular
+expression search instructions; the \fB\-B\fP option writes them using
+the delimiter `\|\fB?\fP\|', to search \fIbackwards\fP through files.
+The default is to use the delimiter `\|\fB/\fP\|', to search \fIforwards\fP
+through files.
+Only \fBctags\fP accepts this option.
+.TP
+.B \-C, \-\-c++
+Treat files with `\|.c\|' and `\|.h\|' extensions as C++ code, not C
+code.  Files with `\|.C\|', `\|.H\|', `\|.cxx\|', `\|.hxx\|', or
+`\|.cc\|' extensions are always assumed to be C++ code.
+.TP
+.B \-d, \-\-defines
+Create tag entries for C preprocessor constant definitions 
+and enum constants, too.  This is the
+default behavior for \fBetags\fP, so this option is only accepted
+by \fBctags\fP.
+.TP
+.B \-D, \-\-no\-defines
+Do not create tag entries for C preprocessor constant definitions
+and enum constants.
+This may make the tags file much smaller if many header files are tagged.
+This is the default behavior for \fBctags\fP, so this option is only
+accepted by \fBetags\fP.
+.TP
+\fB\-l\fP \fIlanguage\fP, \fB\-\-language=\fIlanguage\fP
+Parse the following files according to the given language.  More than
+one such options may be intermixed with filenames.  Use \fB\-\-help\fP
+to get a list of the available languages and their default filename
+extensions.  The `auto' language can be used to restore automatic
+detection of language based on filename extension.  The `none'
+language may be used to disable language parsing altogether; only
+regexp matching is done in this case (see the \fB\-\-regex\fP option).
+.TP
+\fB\-\-no_globals\fP
+Do not tag global variables in C, C++, Objective C, Java.  Typically
+this reduces the file size by one fourth.
+.TP
+\fB\-\-members\fP
+Tag variables that are members of strucure-like constructs in C++,
+Objective C, Java. 
+.TP
+\fB\-o\fP \fItagfile\fP, \fB\-\-output=\fItagfile\fP
+Explicit name of file for tag table; overrides default `\|TAGS\|' or
+`\|tags\|'.   (But ignored with \fB\-v\fP or \fB\-x\fP.)
+.TP
+\fB\-r\fP \fIregexp\fP, \fB\-\-regex=\fIregexp\fP
+Make tags based on regexp matching for each line of the files
+following this option, in addition to the tags made with the standard
+parsing based on language.  May be freely intermixed with filenames
+and the \fB\-R\fP option.  The regexps are cumulative, i.e. each
+option will add to the previous ones.  The regexps are of the form:
+.br
+
+               \fB/\fP\fItagregexp\fP[\fB/\fP\fInameregexp\fP]\fB/\fP
+.br
+
+where \fItagregexp\fP is used to match the lines that must be tagged.
+It should not match useless characters.  If the match is
+such that more characters than needed are unavoidably matched by
+\fItagregexp\fP, it may be useful to add a \fInameregexp\fP, to
+narrow down the tag scope.  \fBctags\fP ignores regexps without a
+\fInameregexp\fP.  The syntax of regexps is the same as in emacs, 
+augmented with intervals of the form \\{m,n\\}, as id ed or grep.
+.br
+Here are some examples.  All the regexps are quoted to protect them
+from shell interpretation.
+.br
+
+Tag the DEFVAR macros in the emacs source files:
+.br
+\fI\-\-regex\='/[ \\t]*DEFVAR_[A-Z_ \\t(]+"\\([^"]+\\)"\/'\fP
+.br
+
+Tag VHDL files (this example is a single long line, broken here for
+formatting reasons):
+.br
+\fI\-\-language\=none\ \-\-regex='/[\ \\t]*\\(ARCHITECTURE\\|\\
+CONFIGURATION\\)\ +[^\ ]*\ +OF/'\ \-\-regex\='/[\ \\t]*\\
+\\(ATTRIBUTE\\|ENTITY\\|FUNCTION\\|PACKAGE\\(\ BODY\\)?\\
+\\|PROCEDURE\\|PROCESS\\|TYPE\\)[\ \\t]+\\([^\ \\t(]+\\)/\\3/'\fP
+.br
+
+Tag TCL files (this last example shows the usage of a \fItagregexp\fP):
+.br
+\fI\-\-lang\=none \-\-regex\='/proc[\ \\t]+\\([^\ \\t]+\\)/\\1/'\fP
+
+.TP
+.B \-R, \-\-no\-regex
+Don't do any more regexp matching on the following files.  May be
+freely intermixed with filenames and the \fB\-\-regex\fP option.
+.TP
+.B \-S, \-\-ignore\-indentation
+Don't rely on indentation as much as we normally do.  Currently, this
+means not to assume that a closing brace in the first column is the
+final brace of a function or structure definition in C and C++.
+.TP
+.B \-t, \-\-typedefs
+Record typedefs in C code as tags.  Since this is the default behaviour
+of \fBetags\fP, only \fBctags\fP accepts this option.
+.TP
+.B \-T, \-\-typedefs\-and\-c++
+Generate tag entries for typedefs, struct, enum, and union tags, and
+C++ member functions.  Since this is the default behaviour
+of \fBetags\fP, only \fBctags\fP accepts this option.
+.TP
+.B \-u, \-\-update
+Update tag entries for \fIfiles\fP specified on command line, leaving
+tag entries for other files in place.  Currently, this is implemented
+by deleting the existing entries for the given files and then
+rewriting the new entries at the end of the tags file.  It is often
+faster to simply rebuild the entire tag file than to use this.
+Only \fBctags\fP accepts this option.
+.TP
+.B \-v, \-\-vgrind
+Instead of generating a tag file, write index (in \fBvgrind\fP format)
+to standard output.  Only \fBctags\fP accepts this option.
+.TP
+.B \-w, \-\-no\-warn
+Suppress warning messages about duplicate entries.  The \fBetags\fP
+program does not check for duplicate entries, so this option is not
+allowed with it.
+.TP
+.B \-x, \-\-cxref
+Instead of generating a tag file, write a cross reference (in
+\fBcxref\fP format) to standard output.  Only \fBctags\fP accepts this option.
+.TP
+.B \-H, \-\-help
+Print usage information.
+.TP
+.B \-V, \-\-version
+Print the current version of the program (same as the version of the
+emacs \fBetags\fP is shipped with).
+
+.SH "SEE ALSO"
+`\|\fBemacs\fP\|' entry in \fBinfo\fP; \fIGNU Emacs Manual\fP, Richard
+Stallman.
+.br
+.BR cxref ( 1 ),
+.BR emacs ( 1 ),
+.BR vgrind ( 1 ),
+.BR vi ( 1 ).
+
+.SH COPYING
+Copyright (c) 1992 Free Software Foundation, Inc.
+.PP
+Permission is granted to make and distribute verbatim copies of
+this manual provided the copyright notice and this permission notice
+are preserved on all copies.
+.PP
+Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, provided that the
+entire resulting derived work is distributed under the terms of a
+permission notice identical to this one.
+.PP
+Permission is granted to copy and distribute translations of this
+manual into another language, under the above conditions for modified
+versions, except that this permission notice may be included in
+translations approved by the Free Software Foundation instead of in
+the original English.
diff --git a/etc/gnu.xbm b/etc/gnu.xbm
new file mode 100644 (file)
index 0000000..d1a92bb
--- /dev/null
@@ -0,0 +1,33 @@
+#define gnu_width 50
+#define gnu_height 50
+static unsigned char gnu_bits[] = {
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xef, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0x9f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0xfe, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0x7f, 0xfc, 0xff, 0xff, 0xf7, 0xff, 0xff, 0xff, 0xf1,
+   0xff, 0xff, 0xf3, 0xff, 0x8f, 0xff, 0xe1, 0xff, 0xff, 0xf9, 0x3f, 0x22,
+   0xfe, 0xcb, 0xff, 0xff, 0xf8, 0xc3, 0xf8, 0xfc, 0xcb, 0xff, 0x7f, 0xfc,
+   0xe0, 0xf9, 0xf9, 0xdb, 0xff, 0x7f, 0xfc, 0xf0, 0xfb, 0xf3, 0xd9, 0xff,
+   0x3f, 0x7e, 0xf8, 0xff, 0xf7, 0xcc, 0xff, 0x9f, 0x3e, 0x1c, 0x7f, 0x44,
+   0xce, 0xff, 0xcf, 0x1e, 0xcc, 0x01, 0x00, 0xe7, 0xff, 0xef, 0x0e, 0xce,
+   0x38, 0x1c, 0xe0, 0xff, 0xef, 0x0e, 0x27, 0xfe, 0xfa, 0xc3, 0xff, 0xef,
+   0x7c, 0x93, 0xff, 0xe5, 0xbf, 0xff, 0xef, 0x99, 0xc9, 0xab, 0x2a, 0x00,
+   0xff, 0xcf, 0xc3, 0x24, 0x54, 0xc5, 0xd5, 0xff, 0x9f, 0x7f, 0x16, 0xab,
+   0xca, 0xff, 0xff, 0x1f, 0x1f, 0x93, 0x46, 0x95, 0xff, 0xff, 0x7f, 0xc8,
+   0x49, 0x99, 0x8a, 0xff, 0xff, 0xff, 0xf0, 0x49, 0x4b, 0x95, 0xff, 0xff,
+   0xff, 0xf9, 0x4c, 0x88, 0x8a, 0xff, 0xff, 0xff, 0x1e, 0xe6, 0x58, 0x95,
+   0xff, 0xff, 0x3f, 0x00, 0xe6, 0xb7, 0x0a, 0xff, 0xff, 0xbf, 0x8a, 0xea,
+   0x50, 0x15, 0xff, 0xff, 0xff, 0x8f, 0xca, 0x99, 0x2a, 0xff, 0xff, 0xff,
+   0xa7, 0x95, 0x7f, 0x15, 0xff, 0xff, 0xff, 0x23, 0x55, 0x7f, 0x2a, 0xfe,
+   0xff, 0xff, 0x63, 0xd8, 0xfc, 0x14, 0xfe, 0xff, 0xff, 0x43, 0x9a, 0xfb,
+   0x2b, 0xfe, 0xff, 0xff, 0xc3, 0xaa, 0x12, 0x94, 0xfc, 0xff, 0xff, 0xc1,
+   0x32, 0xd5, 0xc1, 0xfd, 0xff, 0xff, 0x81, 0x46, 0xd5, 0x47, 0xfc, 0xff,
+   0xff, 0x83, 0x6c, 0xc2, 0x6e, 0xfc, 0xff, 0xff, 0x83, 0x89, 0x88, 0x69,
+   0xfe, 0xff, 0xff, 0x07, 0x92, 0x09, 0x3b, 0xfe, 0xff, 0xff, 0x07, 0x22,
+   0x01, 0x3c, 0xfe, 0xff, 0xff, 0x0f, 0x4e, 0x02, 0x03, 0xfe, 0xff, 0xff,
+   0x2f, 0xd0, 0x18, 0x3e, 0xff, 0xff, 0xff, 0x3f, 0xb0, 0x19, 0x9e, 0xff,
+   0xff, 0xff, 0x7f, 0x00, 0x09, 0x80, 0xff, 0xff, 0xff, 0x7f, 0x01, 0xe3,
+   0xc1, 0xff, 0xff, 0xff, 0xff, 0x05, 0xe0, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0x07, 0xf0, 0xff, 0xff, 0xff, 0xff, 0xff, 0x5f, 0xfd, 0xff, 0xff, 0xff,
+   0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+   0xff, 0xff};
diff --git a/etc/gnu.xpm b/etc/gnu.xpm
new file mode 100644 (file)
index 0000000..4d130ca
--- /dev/null
@@ -0,0 +1,67 @@
+/* XPM */
+/*****************************************************************************/
+/* GNU Emacs bitmap conv. to pixmap by Przemek Klosowski (przemek@nist.gov)  */
+/*****************************************************************************/
+static char * image_name [] = {
+/**/
+"50 50 7 1",
+/**/
+"      s mask  c none",
+"B      c blue",
+"x      c black",                  
+":      c sandy brown",            
+"+      c saddle brown",
+"'      c grey",                           
+".      c white",
+"                                                  ",
+"                                                  ",
+"                                    x             ",
+"                                     :x           ",
+"                                     :::x         ",
+"                                       ::x        ",
+"           x                             ::x      ",
+"          x:                xxx          :::x     ",
+"         x:           xxx xxx:xxx         x::x    ",
+"        x::       xxxx::xxx:::::xx        x::x    ",
+"       x::       x:::::::xx::::::xx       x::x    ",
+"       x::      xx::::::::x:::::::xx     xx::x    ",
+"      x::      xx::::::::::::::::::x    xx::xx    ",
+"     x::x     xx:::::xxx:::::::xxx:xxx xx:::xx    ",
+"    x:::x    xx:::::xx...xxxxxxxxxxxxxxx:::xx     ",
+"    x:::x   xx::::::xx..xxx...xxxx...xxxxxxxx     ",
+"    x:::x   x::::::xx.xxx.......x.x.......xxxx    ",
+"    x:::xx x:::x::xx.xx..........x.xx.........x   ",
+"    x::::xx::xx:::x.xx....''''x'x'x''.xxx.....x   ",
+"    xx::::xxxx::xx.xx.xxxx.'''''''.xxx    xxxx    ",
+"     xx::::::::xx..x.xxx..'''''''''.xx            ",
+"     xxx:::::xxx..xx.xx.xx.xxx.'''''.xx           ",
+"       xxx::xx...xx.xx.BBBB..xx''''''xx           ",
+"        xxxx.....xx.xxBB:BB.xx'''''''xx           ",
+"         xx.....xx...x.BBBx.xxx''''''xx           ",
+"        x....xxxx..xx...xxx''''''''''xx           ",
+"        x..xxxxxx..x.......x..''''''''xx          ",
+"        x.x xxx.x.x.x...xxxx.'''''''''xx          ",
+"         x  xxx.x.x.xx...xx..'''''''''xx          ",
+"           xx.x..x.x.xx........''''''''x          ",
+"          xx'.xx.x.x.x.x.......'''''''''x         ",
+"          xx'..xxxx..x...x.......'''''''x         ",
+"          xx''.xx.x..xx...x.......'''.xxx         ",
+"          xx''..x.x.x.x.x.xx.xxxxx.'.xx+xx        ",
+"          xx''..x.xx..xx.x.x.x+++xxxxx+++x        ",
+"          xx'''.x..xxx.x.x.x.x+++++xxx+xxx        ",
+"           xx''.xx..x..xx.xxxx++x+++x++xxx        ",
+"           xx''..xx.xxx.xxx.xxx++xx+x++xx         ",
+"            xx'''.xx.xx..xx.xxxx++x+++xxx         ",
+"            xx'''.xxx.xx.xxxxxxxxx++++xxx         ",
+"             xx''...xx.xx.xxxxxx++xxxxxxx         ",
+"             xx''''..x..xxx..xxxx+++++xx          ",
+"              xx''''..x..xx..xxxx++++xx           ",
+"               xxx'''''x.xx.xxxxxxxxxxx           ",
+"                xxx'''''..xxx    xxxxx            ",
+"                 xxxx''''xxxx                     ",
+"                   xxx'''xxx                      ",
+"                     xxxxx                        ",
+"                                                  ",
+"                                                  "
+};
+
diff --git a/etc/gnuattach.1 b/etc/gnuattach.1
new file mode 100644 (file)
index 0000000..bbe2227
--- /dev/null
@@ -0,0 +1 @@
+.so man1/gnuserv.1
diff --git a/etc/gnuclient.1 b/etc/gnuclient.1
new file mode 100644 (file)
index 0000000..bbe2227
--- /dev/null
@@ -0,0 +1 @@
+.so man1/gnuserv.1
diff --git a/etc/gnudoit.1 b/etc/gnudoit.1
new file mode 100644 (file)
index 0000000..bbe2227
--- /dev/null
@@ -0,0 +1 @@
+.so man1/gnuserv.1
diff --git a/etc/gnuserv.1 b/etc/gnuserv.1
new file mode 100644 (file)
index 0000000..f87359f
--- /dev/null
@@ -0,0 +1,294 @@
+.TH GNUSERV 1 "" "XEmacs Server"
+.UC 4
+.SH NAME
+gnuserv, gnuclient \- Server and Clients for XEmacs
+.SH SYNOPSIS
+.B gnuclient
+[-nw] [-display display] [-q] [-v] [-l library] [-batch] [-f function] [-eval form] 
+[-h hostname] [-p port] [-r remote-pathname] [[+line] file] ...
+.br
+.B gnudoit [-q] 
+form
+.br
+.B gnuserv
+.br
+.B gnuattach   
+Removed as of gnuserv 3.x
+.SH DESCRIPTION
+
+.PP
+\fIgnuclient\fP allows the user to request a running XEmacs process to
+edit the named files or directories and/or evaluate lisp forms.
+Depending on your environment, it can be an X frame or a TTY frame.
+One typical use for this is with a dialup connection to a machine on
+which an XEmacs process is currently running.
+.PP
+\fIgnudoit\fP is a shell script frontend to ``gnuclient -batch -eval form''.
+Its use is depreciated. Try to get used to calling gnuclient directly.
+.PP
+\fIgnuserv\fP is the server program that is set running by XEmacs to
+handle all incoming and outgoing requests. It is not usually invoked
+directly, but is started from XEmacs by loading the \fIgnuserv\fP
+package and evaluating the Lisp form (gnuserv-start).
+.PP
+\fIgnuattach\fP no longer exists. Its functionality has been replaced by
+\fIgnuclient -nw\fP.
+.SH OPTIONS
+.PP 
+\fIgnuclient\fP supports as much of the command line options of Emacs as
+makes sense in this context. In addition it adds a few of its own. 
+.br
+Options with long names can also be specified using a double
+hyphen instead of a single one.
+.TP 8
+.BI \-nw
+This option makes \fIgnuclient\fP act as a frontend such that XEmacs
+can attach to the current TTY. XEmacs will then open a new TTY frame.
+The effect is similar to having started a new XEmacs on this TTY with
+the ``-nw'' option. It currently only works if XEmacs is running on
+the same machine as gnuclient. This is the default if the `DISPLAY'
+environment variable is not set.
+.TP 8
+.BI \-display " display, " \--display " display" 
+If this option is given or the `DISPLAY' environment variable is set
+then gnuclient will tell XEmacs to edit files in a frame on the
+specified X device.
+.TP 8
+.BI \-q
+This option informs \fIgnuclient\fP to exit once connection has been
+made with the XEmacs process.  Normally \fIgnuclient\fP waits until
+all of the files on the command line have been finished with (their
+buffers killed) by the XEmacs process, and all the forms have been
+evaluated.
+.TP 8
+.BI \-v
+When this option is specified \fIgnuclient\fP will request for the
+specified files to be viewed instead of edited.
+.TP 8
+.BI \-l " library"
+Tell Emacs to load the specified library.
+.TP 8
+.BI \-batch
+Tell Emacs not to open any frames. Just load libraries and evaluate
+lisp code.  If no files to execute, functions to call or forms to eval 
+are given using the
+.BR \-l ,
+.BR \-f ,
+or
+.B \-eval
+options, then forms to eval are read from STDIN.
+.TP 8
+.BI \-f " function," 
+Make Emacs execute the lisp function.
+.TP 8
+.BI \-eval " form"
+Make Emacs execute the lisp form.
+.TP 8
+.BI \-h " hostname"
+Used only with Internet-domain sockets, this option specifies the host
+machine which should be running \fIgnuserv\fP. If this option is not
+specified then the value of the environment variable GNU_HOST is used
+if set. If no hostname is specified, and the GNU_HOST variable is not
+set, an internet connection will not be attempted. N\.B.:
+\fIgnuserv\fP does NOT allow internet connections unless XAUTH
+authentication is used or the GNU_SECURE variable has been specified
+and points at a file listing all trusted hosts. (See SECURITY below.)
+
+.br
+Note that an internet address may be specified instead of a hostname
+which can speed up connections to the server by quite a bit,
+especially if the client machine is running YP.
+
+.br
+Note also that a hostname of \fBunix\fP can be used to specify that
+the connection to the server should use a Unix-domain socket (if
+supported) rather than an Internet-domain socket.
+.TP 8
+.BI \-p " port"
+Used only with Internet-domain sockets, this option specifies the
+service port used to communicate between server and clients.  If this
+option is not specified, then the value of the environment variable
+GNU_PORT is used, if set, otherwise a service called ``gnuserv'' is
+looked up in the services database.  Finally, if no other value can be
+found for the port, then a default port is used which is usually 21490
++ uid.
+.br
+Note that since \fIgnuserv\fP doesn't allow command-line options, the port for
+it will have to be specified via one of the alternative methods.
+.TP 8
+.BI \-r " pathname"
+Used only with Internet-domain sockets, the pathname argument may be
+needed to inform XEmacs how to reach the root directory of a remote
+machine.  \fIgnuclient\fP prepends this string to each path argument
+given.  For example, if you were trying to edit a file on a client
+machine called otter, whose root directory was accessible from the
+server machine via the path /net/otter, then this argument should be
+set to '/net/otter'.  If this option is omitted, then the value is
+taken from the environment variable GNU_NODE, if set, or the empty
+string otherwise.
+.TP 8
+.BI "[+n] file"
+This is the path of the file to be edited.  If the file is a directory, then
+the directory browsers dired or monkey are usually invoked instead.
+The cursor is put at line number 'n' if specified.
+
+.SH SETUP
+\fIgnuserv\fP is packaged standardly with recent versions of XEmacs.
+Therefore, you should be able to start the server simply by evaluating
+the XEmacs Lisp form (gnuserv-start), or equivalently by typing
+`M-x gnuserv-start'.
+
+.SH CONFIGURATION
+The behavior of this suite of program is mostly controlled on the lisp 
+side in Emacs and its behavior can be customized to a large extent.
+Type `M-x customize-group RET gnuserv RET' for easy access. More
+documentation can be found in the file `gnuserv.el'
+
+.SH EXAMPLE
+.RS 4
+gnuclient -q -f mh-smail
+.br
+gnuclient -h cuckoo -r /ange@otter: /tmp/*
+.br
+gnuclient -nw ../src/listproc.c
+.RE
+.br
+
+.br
+More examples and sample wrapper scripts are provided in the
+etc/gnuserv directory of the Emacs installation.
+
+
+.SH SYSV IPC
+SysV IPC is used to communicate between \fIgnuclient\fP and
+\fIgnuserv\fP if the symbol SYSV_IPC is defined at the top of
+gnuserv.h. This is incompatible with both Unix-domain and
+Internet-domain socket communication as described below. A file called
+/tmp/gsrv??? is created as a key for the message queue, and if removed
+will cause the communication between server and client to fail until
+the server is restarted.
+.SH UNIX-DOMAIN SOCKETS
+A Unix-domain socket is used to communicate between \fIgnuclient\fP
+and \fIgnuserv\fP if the symbol UNIX_DOMAIN_SOCKETS is defined at the
+top of gnuserv.h.  A file called /tmp/gsrvdir????/gsrv is created for
+communication and if deleted will cause communication between server
+and client to fail.  Only the user running gnuserv will be able to
+connect to the socket.
+.SH INTERNET-DOMAIN SOCKETS
+Internet-domain sockets are used to communicate between
+\fIgnuclient\fP and \fIgnuserv\fP if the symbol
+INTERNET_DOMAIN_SOCKETS is defined at the top of gnuserv.h. Both
+Internet-domain and Unix-domain sockets can be used at the same
+time. If a hostname is specified via -h or via the GNU_HOST
+environment variable, \fIgnuclient\fP establish connections using an
+internet domain socket. If not, a local connection is attempted via
+either a unix-domain socket or SYSV IPC.
+.SH SECURITY
+Using Internet-domain sockets, a more robust form of security is
+needed that wasn't necessary with either Unix-domain sockets or SysV
+IPC. Currently, two authentication protocols are supported to provide
+this: MIT-MAGIC-COOKIE-1 (based on the X11 xauth(1) program) and a
+simple host-based access control mechanism, hereafter called
+GNUSERV-1. The GNUSERV-1 protocol is always available, whereas support
+for MIT-MAGIC-COOKIE-1 may or may not have been enabled (via a #define
+at the top of gnuserv.h) at compile-time.
+.PP
+\fIgnuserv\fP, using GNUSERV-1, performs a limited form of access
+control at the machine level. By default no internet-domain socket is
+opened.  If the variable GNU_SECURE can be found in \fIgnuserv\fP's
+environment, and it names a readable filename, then this file is
+opened and assumed to be a list of hosts, one per line, from which the
+server will allow requests. Connections from any other host will be
+rejected. Even the machine on which \fIgnuserv\fP is running is not
+permitted to make connections via the internet socket unless its
+hostname is explicitly specified in this file.  Note that a host may
+be either a numeric IP address or a hostname, and that
+.I any
+user on an approved host may connect to your gnuserv and execute arbitrary
+elisp (e.g., delete all your files).
+If this file contains a lot of
+hostnames then the server may take quite a time to start up.
+.PP
+When the MIT-MAGIC-COOKIE-1 protocol is enabled, an internet socket
+\fIis\fP opened by default. \fIgnuserv\fP will accept a connection from
+any host, and will wait for a "magic cookie" (essentially, a password)
+to be presented by the client. If the client doesn't present the
+cookie, or if the cookie is wrong, the authentication of the client is
+considered to have failed. At this point. \fIgnuserv\fP falls back to
+the GNUSERV-1 protocol; If the client is calling from a host listed in
+the GNU_SECURE file, the connection will be accepted, otherwise it
+will be rejected. 
+.TP 4
+.I  Using MIT-MAGIC-COOKIE-1 authentication
+When the \fIgnuserv\fP server is started, it looks for a cookie
+defined for display 999 on the machine where it is running. If the
+cookie is found, it will be stored for use as the authentication
+cookie. These cookies are defined in an authorization file (usually
+~/.Xauthority) that is manipulated by the X11 xauth(1) program. For
+example, a machine "kali" which runs an emacs that invokes
+\fIgnuserv\fP should respond as follows (at the shell prompt) when set
+up correctly.
+.PP
+.RS 8
+kali% xauth list
+.br
+GS65.SP.CS.CMU.EDU:0  MIT-MAGIC-COOKIE-1  11223344
+.br
+KALI.FTM.CS.CMU.EDU:999  MIT-MAGIC-COOKIE-1  1234
+.RE
+.PP
+.RS 4
+In the above case, the authorization file defines two cookies. The
+second one, defined for screen 999 on the server machine, is used for
+gnuserv authentication. 
+.PP
+On the client machine's side, the authorization file must contain an
+identical line, specifying the 
+.I server's 
+cookie. In other words, on a machine "foobar" which wishes to connect
+to "kali,"  the `xauth list' output should contain the line:
+.PP
+.RS 4
+KALI.FTM.CS.CMU.EDU:999  MIT-MAGIC-COOKIE-1  1234
+.RE
+.PP
+For more information on authorization files, take a look at the
+xauth(1X11) man page, or invoke xauth interactively (without any
+arguments) and type "help" at the prompt. Remember that case in the
+name of the authorization protocol (i.e.`MIT-MAGIC-COOKIE-1') 
+.I is
+significant!
+.RE
+
+
+.SH ENVIRONMENT
+.PP
+.TP 8
+.B DISPLAY
+Default X device to put edit frame.
+
+.SH FILES
+.PP
+.TP 8
+.B /tmp/gsrv???
+(SYSV_IPC only)
+.TP 8
+.B /tmp/gsrvdir???/gsrv
+(unix domain sockets only)
+.TP 8
+.B ~/.emacs
+XEmacs customization file, see xemacs(1).
+.SH SEE ALSO
+.PP
+.TP 8
+xauth(1X11), Xsecurity(1X11), gnuserv.el
+.SH BUGS
+.PP 
+NULs occurring in result strings don't get passed back to gnudoit properly.
+
+.SH AUTHOR.
+Andy Norman (ange@hplb.hpl.hp.com), based heavily upon
+etc/emacsclient.c, etc/server.c and lisp/server.el from the GNU Emacs
+18.52 distribution.  Various modifications from Bob Weiner (weiner@mot.com),
+Darrell Kindred (dkindred@cmu.edu), Arup Mukherjee (arup@cmu.edu), Ben
+Wing (ben@xemacs.org) and Hrvoje Niksic (hniksic@srce.hr).
diff --git a/etc/gnuserv.README b/etc/gnuserv.README
new file mode 100644 (file)
index 0000000..6256f90
--- /dev/null
@@ -0,0 +1,103 @@
+This file is not meant to be proper documentation. See the file gnuserv.1 for
+more information.
+
+****
+NOTE: This version of gnuserv has some enhancements over the original version 
+  distributed by Andy Norman. See the end of this file for more details. 
+****
+
+To install, copy gnuserv.el into a directory on your GNU Emacs
+load-path. Edit Makefile and change INCLUDES to point to the src
+directory underneath your emacs source tree (or make yourself a
+config.h file in this directory by hand, starting with config.h.proto
+as a first cut) and type:
+
+     make
+
+This should compile the server and the two clients. Now put gnuserv,
+gnuclient and gnudoit in a directory that users have in their executable
+search paths.
+
+File                    : Description
+----------------------------------------------------------------
+Makefile               : Makefile to build gnuserv
+LICENSE                        : GNU General License
+README                 : this file
+gnuclient.c            : editor client C code
+gnudoit.c              : eval client C code
+gnuserv.1              : gnuserv man page
+gnuserv.c              : server C code
+gnuserv.el             : server LISP code for GNU Emacs V18,V19, 
+                          XEmacs/Lucid Emacs and Epoch V4
+gnuserv.h              : server/client C header file
+gnuslib.c              : server/client C common code
+src.x11fns.diff                : diffs to src/x11fns to raise window (for emacs18)
+
+config.h.proto          : Use this file as the starting point for constructing
+                          a config.h if you don't have access to the
+                          one that was used when compiling your emacs. 
+
+If you find *any* problems at all with gnuserv, or you can think of better
+ways of doing things (especially remote file access), please e-mail me at one
+of the addresses below.
+
+ange@hplb.hpl.hp.com
+ange@hpl.hp.co.uk
+...!hplabs!hplb!ange
+...!ukc!hplb!ange
+
+
+
+This version of gnuserv has been enhanced by a number of people, including
+Bob Weiner <weiner@mot.com>, Darrell Kindred <dkindred@cmu.edu>,
+Arup Mukherjee <arup@cmu.edu>, and Ben Wing <ben@xemacs.org>. The
+modifications are basically as follows:
+
+Bob Weiner: 
+
+     Integrated support for several versions of emacs. New requests
+     from gnuclient cause the creation of new frames. Removed the
+     restriction on the length of the string passed to gnudoit. Later
+     added a server-done-function variable to control what happens to
+     a buffer after the user is done with it. Mods to each of the .c
+     files as well as gnuserv.el.
+
+Darrell Kindred:
+
+     Removed the restriction on the length of the string returned from
+     a gnudoit request, for the purposes of unix/internet sockets.
+     Allow the gnudoit request to be read from stdin if it's not
+     specified on the command line. Internet sockets are not opened
+     unless the GNU_SECURE variable is specified. Unix sockets are
+     created in a protected ancestral directory, since many Unix
+     variants don't enforce socket permissions properly. An internet
+     socket accepting local connections is not opened by default
+     because this would make it possibly to override all security on
+     the unix socket. See the man page for details. Unless told to do
+     otherwise by a command-line argument, gnuclient and gnudoit now
+     try to open a unix socket by default if support for them was
+     compiled in.  Mods to each of the .c files and to gnuserv.el.
+
+Arup Mukherjee:
+     Removed the restriction on the length of the string returned from
+     a gnudoit request, for the purposes of sysv ipc. Added support
+     for the "gnuserv-frame" variable allowing you to specify control
+     whether or not new screens are created in response to each
+     gnuclient request. Made a number of other bugfixes and changes to
+     the lisp part of the code, allowing gnuserv to work properly with
+     newer emacs versions. All the changes are listed in the changelog
+     at the beginning of gnuserv.el. Also fixed up the man page to
+     reflect the new gnuserv features. On HPs, stopped the "-r"
+     parameter (in gnuclient) from defaulting to /net/<remotehost>.
+     Not all installations want this, and it's much harder to debug
+     when things stop working. Changed the man page to reflect this.
+     Mods to each of the .c files, gnuserv.el and gnuserv.1
+
+     More recently - added Xauth(1X11)-style authentication to gnuserv (as 
+     of version 2.1). Although the code is completely new, credit is
+     due to Richard Caley <rjc@cogsci.edinburgh.ac.uk> ... he wrote a
+     prototype implementation from which I borrowed the basic
+     mechanism for hooking Xauth into gnuserv. 
+
+Ben Wing:
+     Added gnuattach.
diff --git a/etc/gray1.xbm b/etc/gray1.xbm
new file mode 100644 (file)
index 0000000..d5aa807
--- /dev/null
@@ -0,0 +1,6 @@
+#define bg2_width 16
+#define bg2_height 16
+static char bg2_bits[] = {
+  0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00,
+  0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00,
+  0x55, 0x55, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00};
diff --git a/etc/idd/drop b/etc/idd/drop
new file mode 100644 (file)
index 0000000..a7ba3b3
--- /dev/null
@@ -0,0 +1,8 @@
+#define drop_width 16
+#define drop_height 16
+#define drop_x_hot 6
+#define drop_y_hot 4
+static unsigned char drop_bits[] = {
+   0x00, 0x00, 0xfe, 0x07, 0x02, 0x04, 0x02, 0x04, 0x42, 0x04, 0xc2, 0x04,
+   0xc2, 0x05, 0xc2, 0x07, 0xc2, 0x07, 0xc2, 0x0f, 0xfe, 0x1f, 0xc0, 0x07,
+   0xc0, 0x06, 0x00, 0x0c, 0x00, 0x1c, 0x00, 0x08};
diff --git a/etc/idd/dropmsk b/etc/idd/dropmsk
new file mode 100644 (file)
index 0000000..a7ba3b3
--- /dev/null
@@ -0,0 +1,8 @@
+#define drop_width 16
+#define drop_height 16
+#define drop_x_hot 6
+#define drop_y_hot 4
+static unsigned char drop_bits[] = {
+   0x00, 0x00, 0xfe, 0x07, 0x02, 0x04, 0x02, 0x04, 0x42, 0x04, 0xc2, 0x04,
+   0xc2, 0x05, 0xc2, 0x07, 0xc2, 0x07, 0xc2, 0x0f, 0xfe, 0x1f, 0xc0, 0x07,
+   0xc0, 0x06, 0x00, 0x0c, 0x00, 0x1c, 0x00, 0x08};
diff --git a/etc/ms-kermit b/etc/ms-kermit
new file mode 100644 (file)
index 0000000..e7dba44
--- /dev/null
@@ -0,0 +1,167 @@
+;;; This file is designed for an 8-bit connection.
+;;; Use the file ms-kermit-7bit if you have a 7-bit connection.
+
+;; Meta key mappings for EMACS
+;; By Robert Earl (rearl@watnxt3.ucr.edu)
+;; May 13, 1990
+;;
+;; WARNING:
+;;  requires an 8-bit path to host.  many dialups and lans won't pass the
+;;  eighth bit by default and may require a special command to turn this
+;;  off.  `screen' is known to mask the eighth bit of input as well.
+
+set term controls 8-bit
+set translation key off
+
+;; control keys
+set key \3449 \128     ;; m-c-@
+set key \3358 \129     ;; m-c-a
+set key \3376 \130     ;; m-c-b
+set key \3374 \131     ;; m-c-c
+set key \3360 \132     ;; m-c-d
+set key \3346 \133     ;; m-c-e
+set key \3361 \134     ;; m-c-f
+set key \3362 \135     ;; m-c-g
+set key \3342 \136     ;; m-bs
+set key \3363 \136     ;; m-c-h (sends same code as above)
+set key \2469 \137     ;; m-tab
+set key \3351 \137     ;; m-c-i (same as above)
+set key \3364 \138     ;; m-c-j
+set key \3365 \139     ;; m-c-k
+set key \3366 \140     ;; m-c-l
+;set key \3378 \141    ;; m-c-m
+set key \2332 \141     ;; m-ret (sends same code as above)
+set key \3377 \142     ;; m-c-n
+set key \3352 \143     ;; m-c-o
+set key \3353 \144     ;; m-c-p
+set key \3344 \145     ;; m-c-q
+set key \3347 \146     ;; m-c-r
+set key \3359 \147     ;; m-c-s
+set key \3348 \148     ;; m-c-t
+set key \3350 \149     ;; m-c-u
+set key \3375 \150     ;; m-c-v
+set key \3345 \151     ;; m-c-w
+set key \3373 \152     ;; m-c-x
+set key \3349 \153     ;; m-c-y
+set key \3372 \154     ;; m-c-z
+
+;; misc keys
+;set key \3354 \155    ;; m-c-[
+set key \2305 \155     ;; m-esc (sends same as above)
+set key \3371 \156     ;; m-c-\
+set key \3355 \157     ;; m-c-]
+set key \3453 \158     ;; m-c-^
+set key \3458 \159     ;; m-c-_
+
+;; \160 is conspicuously missing here--
+;; alt-spc doesn't generate a distinct scan code...
+;; neither do shift-spc and ctrl-spc.
+;; no idea why.
+
+set key \2936 \161     ;; m-!
+set key \2856 \162     ;; m-"
+set key \2938 \163     ;; m-#
+set key \2939 \164     ;; m-$
+set key \2940 \165     ;; m-%
+set key \2942 \166     ;; m-&
+set key \2344 \167     ;; m-'
+set key \2944 \168     ;; m-(
+set key \2945 \169     ;; m-)
+set key \2943 \170     ;; m-*
+set key \2947 \171     ;; m-+
+set key \2355 \172     ;; m-,
+set key \2434 \173     ;; m--
+set key \2356 \174     ;; m-.
+set key \2357 \175     ;; m-/
+
+;; number keys
+set key \2433 \176     ;; m-0
+set key \2424 \177     ;; m-1
+set key \2425 \178
+set key \2426 \179
+set key \2427 \180
+set key \2428 \181
+set key \2429 \182
+set key \2430 \183
+set key \2431 \184
+set key \2432 \185     ;; m-9
+
+set key \2855 \186     ;; m-:
+set key \2343 \187     ;; m-;
+set key \2867 \188     ;; m-<
+set key \2435 \189     ;; m-=
+set key \2868 \190     ;; m->
+set key \2869 \191     ;; m-?
+set key \2937 \192     ;; m-@
+
+;; shifted A-Z
+set key \2846 \193     ;; m-A
+set key \2864 \194
+set key \2862 \195
+set key \2848 \196
+set key \2834 \197
+set key \2849 \198
+set key \2850 \199
+set key \2851 \200
+set key \2839 \201
+set key \2852 \202
+set key \2853 \203
+set key \2854 \204
+set key \2866 \205
+set key \2865 \206
+set key \2840 \207
+set key \2841 \208
+set key \2832 \209
+set key \2835 \210
+set key \2847 \211
+set key \2836 \212
+set key \2838 \213
+set key \2863 \214
+set key \2833 \215
+set key \2861 \216
+set key \2837 \217
+set key \2860 \218     ;; m-Z
+
+set key \2330 \219     ;; m-[
+set key \2347 \220     ;; m-\
+set key \2331 \221     ;; m-]
+set key \2941 \222     ;; m-^
+set key \2946 \223     ;; m-_
+set key \2345 \224     ;; m-`
+
+;; lowercase a-z
+set key \2334 \225     ;; m-a
+set key \2352 \226
+set key \2350 \227
+set key \2336 \228
+set key \2322 \229
+set key \2337 \230
+set key \2338 \231
+set key \2339 \232
+set key \2327 \233
+set key \2340 \234
+set key \2341 \235
+set key \2342 \236
+set key \2354 \237
+set key \2353 \238
+set key \2328 \239
+set key \2329 \240
+set key \2320 \241
+set key \2323 \242
+set key \2335 \243
+set key \2324 \244
+set key \2326 \245
+set key \2351 \246
+set key \2321 \247
+set key \2349 \248
+set key \2325 \249
+set key \2348 \250     ;; m-z
+
+;; more shifted misc. keys
+set key \2842 \251     ;; m-{
+set key \2859 \252     ;; m-|
+set key \2843 \253     ;; m-}
+set key \2857 \254     ;; m-~
+set key \2318 \255     ;; m-del
+
+
diff --git a/etc/ms-kermit-7bit b/etc/ms-kermit-7bit
new file mode 100644 (file)
index 0000000..7a55179
--- /dev/null
@@ -0,0 +1,312 @@
+;;; This file is designed for 7-bit connections.
+;;; Use the file ms-kermit if you have an 8-bit connection.
+
+;;; This kermit script maps the IBM-PC keyboard for use with Gnu Emacs.
+;;; The ALT key is used to generate Meta characters and, in conjunction
+;;; with the CTRL key, Control-Meta characters.  A few other useful
+;;; mappings are also performed.
+;;; Andy Lowry, May 1989
+
+;;; Exchange ESC and backquote... tilde stays put (shift-backquote)
+set key \27 `
+set key ` \27
+
+;;; BACKSPACE deletes backward one character
+set key scan \270 \127
+
+;;; The following mappings affect certain special keys... all the keys
+;;; are duplicated on the numeric keypad when NUM LOCK is off, but
+;;; the keypad versions are NOT mapped (string definition space too small 
+;;; for that)
+
+;;; INSERT toggles overwrite mode
+set key scan \4434 \27xoverwrite-mode\13
+;;; HOME moves point to beginning of buffer
+set key scan \4423 \27<
+;;; PAGE-UP scrolls backward one screen
+set key scan \4425 \27v
+;;; DELETE deletes one character *forward*
+set key scan \4435 \4
+;;; END moves point to end of buffer
+set key scan \4431 \27>
+;;; PAGE-DOWN scrolls forward one screen
+set key scan \4433 \22
+;;; ARROW keys move in the appropriate directions
+set key scan \4424 \16
+set key scan \4427 \2
+set key scan \4432 \14
+set key scan \4429 \6
+
+;;; META versions of all the printing characters except uppercase 
+;;; letters are generated by using the ALT key.  The definition string 
+;;; consists of an ESC character followed by the META-ized character.
+;;; The characters are listed roughly left-to-right and top-to-bottom
+;;; as they appear on the keyboard
+set key scan \2345 \27`
+set key scan \2424 \27\o61     ; need to use char code, since digit
+set key scan \2425 \27\o62     ; would not terminate '\27'
+set key scan \2426 \27\o63
+set key scan \2427 \27\o64
+set key scan \2428 \27\o65
+set key scan \2429 \27\o66
+set key scan \2430 \27\o67
+set key scan \2431 \27\o70
+set key scan \2432 \27\o71
+set key scan \2433 \27\o60
+set key scan \2434 \27\45
+set key scan \2435 \27=
+set key scan \2857 \27~
+set key scan \2936 \27!
+set key scan \2937 \27@
+set key scan \2938 \27#
+set key scan \2939 \27$
+set key scan \2940 \27%
+set key scan \2941 \27^
+set key scan \2942 \27&
+set key scan \2943 \27*
+set key scan \2944 \27(
+set key scan \2945 \27)
+set key scan \2946 \27_
+set key scan \2947 \27+
+set key scan \2469 \27\9
+set key scan \2320 \27q
+set key scan \2321 \27w
+set key scan \2322 \27e
+set key scan \2323 \27r
+set key scan \2324 \27t
+set key scan \2325 \27y
+set key scan \2326 \27u
+set key scan \2327 \27i
+set key scan \2328 \27o
+set key scan \2329 \27p
+set key scan \2330 \27[
+set key scan \2842 \27{
+set key scan \2331 \27]
+set key scan \2843 \27}
+set key scan \2347 \27\
+set key scan \2859 \27|
+set key scan \2334 \27a
+set key scan \2335 \27s
+set key scan \2336 \27d
+set key scan \2337 \27f
+set key scan \2338 \27g
+set key scan \2339 \27h
+set key scan \2340 \27j
+set key scan \2341 \27k
+set key scan \2342 \27l
+set key scan \2343 \27\59
+set key scan \2855 \27:
+set key scan \2344 \27'
+set key scan \2856 \27"
+set key scan \2348 \27z
+set key scan \2349 \27x
+set key scan \2350 \27c
+set key scan \2351 \27v
+set key scan \2352 \27b
+set key scan \2353 \27n
+set key scan \2354 \27m
+set key scan \2355 \27,
+set key scan \2867 \27<
+set key scan \2356 \27.
+set key scan \2868 \27>
+set key scan \2357 \27/
+set key scan \2869 \27?
+
+;;; CONTROL-META characters are generated by using both the CTRL and
+;;; ALT keys simultaneously.  All the lowercase letters are included.
+;;; The definition string consists of an ESC character followed by
+;;; the control character corresponding to the letter.
+set key scan \3344 \27\17
+set key scan \3345 \27\23
+set key scan \3346 \27\5
+set key scan \3347 \27\18
+set key scan \3348 \27\20
+set key scan \3349 \27\25
+set key scan \3350 \27\21
+set key scan \3351 \27\9
+set key scan \3352 \27\15
+set key scan \3353 \27\16
+set key scan \3358 \27\1
+set key scan \3359 \27\19
+set key scan \3360 \27\4
+set key scan \3361 \27\6
+set key scan \3362 \27\7
+set key scan \3363 \27\8
+set key scan \3364 \27\10
+set key scan \3365 \27\11
+set key scan \3366 \27\12
+set key scan \3372 \27\26
+set key scan \3373 \27\24
+set key scan \3374 \27\3
+set key scan \3375 \27\22
+set key scan \3376 \27\2
+set key scan \3377 \27\14
+set key scan \3378 \27\13
+
+end of msiem2.ini
+------------------
+
+msiema.hlp
+-----------
+Date:     Wed, 14 Sep 88 05:20:08 GMT
+From:     spolsky@YALE.ARPA
+Subject:  Using MS kermit 2.31 with emacs
+Keywords: MS-DOS Kermit 2.31, EMACS, Meta Key
+
+If you are using kermit (version 2.31 only) with emacs on a mainframe, the
+following file may help you. It assigns all the Alt-keys so that the Alt key
+may be used as a "Meta" shift, e.g. Alt-x produces M-x, etc.  Note that it
+will distinguish correctly between upper and lower case and accepts all
+printables. (If anybody has the patience to do the Meta-Ctrl combinations,
+please post them!)  This actually sends "escapes" so you don't need 8 bits.
+This file also sets up the cursor keys to behave as expected.
+
+On extended keyboards (the ones with a separate cursor pad, like PS/2s) you
+also get assignments for Page Up/Down, Home, End, Insert, Delete, etc.
+
+Please let me know if you find any problems with this.
+
+Joel Spolsky             bitnet: spolsky@yalecs     uucp: ...!yale!spolsky
+Yale University          arpa:   spolsky@yale.edu   voicenet: 203-436-1483
+
+[Ed. - Thanks, Joel!  Your key definitions file has been put in the kermit
+distribution area as msiema.ini ("ms" for MS-Kermit, "i" because it's an
+initialization file, "ema" for EMACS), along with this message as msiema.hlp.]
+
+end of msiema.hlp
+-----------------
+
+
+msiema.ini
+------------
+; Emacs keyboard layout for Kermit 2.31
+; by Joel Spolsky, Yale Univ.  Save this in a file, then
+; initialize it by issuing the kermit command
+; take filename
+; It will set up the keyboard to allow ALT to be used
+; as a meta-key, and will allow cursor keys to be used
+; with emacs.
+
+; First, define all the ALT keys to send ESC+key
+; to simulate "meta"
+
+set key \2320 \27q  ;; letters: unshifted
+set key \2321 \27w
+set key \2322 \27e
+set key \2323 \27r
+set key \2324 \27t
+set key \2325 \27y
+set key \2326 \27u
+set key \2327 \27i
+set key \2328 \27o
+set key \2329 \27p
+set key \2334 \27a
+set key \2335 \27s
+set key \2336 \27d
+set key \2337 \27f
+set key \2338 \27g
+set key \2339 \27h
+set key \2340 \27j
+set key \2341 \27k
+set key \2342 \27l
+set key \2348 \27z
+set key \2349 \27x
+set key \2350 \27c
+set key \2351 \27v
+set key \2352 \27b
+set key \2353 \27n
+set key \2354 \27m
+set key \2832 \27Q ;; letters: shifted
+set key \2833 \27W
+set key \2834 \27E
+set key \2835 \27R
+set key \2836 \27T
+set key \2837 \27Y
+set key \2838 \27U
+set key \2839 \27I
+set key \2840 \27O
+set key \2841 \27P
+set key \2846 \27A
+set key \2847 \27S
+set key \2848 \27D
+set key \2849 \27F
+set key \2850 \27G
+set key \2851 \27H
+set key \2852 \27J
+set key \2853 \27K
+set key \2854 \27L
+set key \2860 \27Z
+set key \2861 \27X
+set key \2862 \27C
+set key \2863 \27V
+set key \2864 \27B
+set key \2865 \27N
+set key \2866 \27M
+set key \2857 \27\126    ; ALT + ~   ;; special symbols begin here
+set key \2345 \27\96     ; ALT + `
+set key \2936 \27\33     ; ALT + !
+set key \2937 \27\64     ; ALT + @
+set key \2938 \27\35     ; ALT + #
+set key \2939 \27\36     ; ALT + $
+set key \2940 \27\37     ; ALT + %
+set key \2941 \27\94     ; ALT + ^
+set key \2942 \27\38     ; ALT + &
+set key \2943 \27\42     ; ALT + *
+set key \2944 \27\40     ; ALT + (
+set key \2945 \27\41     ; ALT + )
+set key \2946 \27\95     ; ALT + _
+set key \2947 \27\43     ; ALT + +
+set key \2842 \27\123    ; ALT + {
+set key \2843 \27\125    ; ALT + }
+set key \2330 \27\91     ; ALT + [
+set key \2331 \27\93     ; ALT + ]
+set key \2859 \27\124    ; ALT + :
+set key \2347 \27\92     ; ALT + \
+set key \2867 \27<       ; ALT + <
+set key \2868 \27>       ; ALT + >
+set key \2343 \27\59     ; ALT + ;
+set key \2855 \27\58     ; ALT + :
+set key \2344 \27\39     ; ALT + '
+set key \2856 \27\34     ; ALT + "
+set key \2355 \27\44     ; ALT + ,
+set key \2356 \27\46     ; ALT + .
+set key \2357 \27\47     ; ALT + /
+set key \2869 \27\63     ; ALT + ?
+set key \2424 \27\49  ;; numbers
+set key \2425 \27\50
+set key \2426 \27\51
+set key \2427 \27\52
+set key \2428 \27\53
+set key \2429 \27\54
+set key \2430 \27\55
+set key \2431 \27\56
+set key \2432 \27\57
+set key \2433 \27\48
+
+;; These 6 special keys for extended (PS/2) keyboards:
+set key \4434 \25      ;; Insert is like ^Y - yank from kill ring
+set key \4435 \23      ;; Delete is like ^W - kill to ring
+set key \4423 \1       ;; Home is ^A
+set key \4431 \5       ;; End is ^E
+set key \4425 \27V     ;; Page up is Esc-V
+set key \4433 \22      ;; Page dn is ^v
+
+set key \328 \16       ;; up cursor is ^P
+set key \331 \2        ;; left cursor is ^B
+set key \333 \6        ;; right cursor is ^F
+set key \336 \14       ;; down cursor is ^N
+set key \4427 \2       ;; left cursor on extended kbd
+set key \4432 \14      ;; down cursor on extended kbd
+set key \4424 \16      ;; up cursor on extended kbd
+set key \4429 \6       ;; right cursor on extended kbd
+
+set key \5491 \27b     ;; ctrl-left cursor is M-b
+set key \5492 \27f     ;; ctrl-right cursor is M-f
+
+;; move kermit's screen scroll (playback) features to Alt- Home,End,PgUp,PgDn
+;; (this is an issue for extended keyboards only)
+
+set key \2455 \khomscn
+set key \2463 \kendscn
+set key \2457 \kupscn
+set key \2465 \kdnscn
diff --git a/etc/package-index.LATEST.pgp b/etc/package-index.LATEST.pgp
new file mode 100644 (file)
index 0000000..d516331
--- /dev/null
@@ -0,0 +1,1819 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+
+;; Package Index file -- Do not edit manually.
+;;;@@@
+(package-get-update-base-entry (quote
+(zenirc
+  (standards-version 1.0
+   version "1.04"
+   author-version "2.112"
+   date "1998-08-15"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority medium
+   category "comm"
+   dump nil
+   description "ZENIRC IRC Client."
+   filename "zenirc-1.04-pkg.tar.gz"
+   md5sum "96d9e09c41de5c19d8aa092ad544ad6d"
+   size 276116
+   provides (zenirc)
+   requires (zenirc)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(w3
+  (standards-version 1.0
+   version "1.10"
+   author-version "4.0pre23"
+   date "1998-07-18"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution experimental
+   priority high
+   category "comm"
+   dump nil
+   description "A Web browser."
+   filename "w3-1.10-pkg.tar.gz"
+   md5sum "6113b455f82c5903b8bd6f4ca48afb00"
+   size 612442
+   provides (w3 url)
+   requires (w3 mail-lib xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(vm
+  (standards-version 1.0
+   version "1.14"
+   author-version "6.62"
+   date "1998-09-22"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority medium
+   category "comm"
+   dump nil
+   description "An Emacs mailer."
+   filename "vm-1.14-pkg.tar.gz"
+   md5sum "e59383b955243ca90581fd6854bb5eff"
+   size 548815
+   provides (vm)
+   requires (mail-lib xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(tm
+  (standards-version 1.0
+   version "1.15"
+   author-version "21.0"
+   date "1998-08-27"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "comm"
+   dump nil
+   description "Emacs MIME support."
+   filename "tm-1.15-pkg.tar.gz"
+   md5sum "7769db3ab1473811a0622742c3e9bf69"
+   size 329539
+   provides (tm tm-edit tm-view mime-setup)
+   requires (gnus mh-e rmail vm mailcrypt mail-lib apel xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(supercite
+  (standards-version 1.0
+   version "1.10"
+   author-version "3.55x2"
+   date "1998-08-9"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "comm"
+   dump nil
+   description "An Emacs citation tool for News & Mail messages."
+   filename "supercite-1.10-pkg.tar.gz"
+   md5sum "09dee2a7f1400bc8680ea067a2399dcb"
+   size 99403
+   provides (supercite)
+   requires (mail-lib xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(rmail
+  (standards-version 1.0
+   version "1.07"
+   author-version "21.0"
+   date "1998-06-28"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution contrib
+   priority low
+   category "comm"
+   dump nil
+   description "An obsolete Emacs mailer."
+   filename "rmail-1.07-pkg.tar.gz"
+   md5sum "0b256dc4b02e832d939850f86951217a"
+   size 96475
+   provides (rmail rmailsum)
+   requires (tm apel mail-lib xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(mew
+  (standards-version 1.0
+   version "1.04"
+   author-version "1.93b38"
+   date "1998-06-21"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution contrib
+   priority low
+   category "comm"
+   dump nil
+   description "Messaging in an Emacs World."
+   filename "mew-1.04-pkg.tar.gz"
+   md5sum "896793a5d91c0ecfe4af5a7351f82fb7"
+   size 517164
+   provides (mew)
+   requires (mew)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(net-utils
+  (standards-version 1.0
+   version "1.10"
+   author-version "21.0"
+   date "1998-07-01"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "comm"
+   dump nil
+   description "Miscellaneous Networking Utilities."
+   filename "net-utils-1.10-pkg.tar.gz"
+   md5sum "89f6d1830b90e701ab57fcadd7337bb8"
+   size 107129
+   provides (ilisp-browse-cltl2 emacsbug feedmail metamail net-utils rcompile shadowfile webjump webster-www)
+   requires (w3 efs mail-lib xemacs-base)
+   type single
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(mh-e
+  (standards-version 1.0
+   version "1.08"
+   author-version "21.0"
+   date "1998-07-12"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution contrib
+   priority low
+   category "comm"
+   dump nil
+   description "Front end support for MH."
+   filename "mh-e-1.08-pkg.tar.gz"
+   md5sum "f1995b0f516668922a5f4331d0c13187"
+   size 176392
+   provides (mh-e)
+   requires (mail-lib xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(mailcryptng
+  (standards-version 1.0
+   version "1.01"
+   author-version "3.5b7"
+   date "1998-10-10"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "comm"
+   dump nil
+   description "Support for messaging encryption with PGP."
+   filename "mailcryptng-1.01-pkg.tar.gz"
+   md5sum "70bbfabaa083dc3a6178aa2be979705e"
+   size 120414
+   provides (mailcrypt)
+   requires (gnus vm mail-lib fsf-compat xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(mailcrypt
+  (standards-version 1.0
+   version "1.06"
+   author-version "3.4"
+   date "1998-01-24"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "comm"
+   dump nil
+   description "Support for messaging encryption with PGP."
+   filename "mailcrypt-1.06-pkg.tar.gz"
+   md5sum "e601fc5c1f43c5b7f577c7262c7877a9"
+   size 106355
+   provides (mailcrypt)
+   requires (gnus vm mail-lib xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(irchat
+  (standards-version 1.0
+   version "1.03"
+   author-version "980625-2"
+   date "1998-09-08"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority medium
+   category "comm"
+   dump nil
+   description "ZENIRC IRC Client."
+   filename "irchat-1.03-pkg.tar.gz"
+   md5sum "9d066b2d79ab2dd5e01e1b8733289aa4"
+   size 219214
+   provides (irchat)
+   requires ()
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(gnats
+  (standards-version 1.0
+   version "1.07"
+   author-version "3.101"
+   date "1998-08-01"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority high
+   category "comm"
+   dump nil
+   description "XEmacs bug reports."
+   filename "gnats-1.07-pkg.tar.gz"
+   md5sum "40d23fbac2ea05d55be0d0822259b023"
+   size 189213
+   provides (gnats gnats-admin send-pr)
+   requires (mail-lib xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(footnote
+  (standards-version 1.0
+   version "1.07"
+   author-version "0.18x"
+   date "1998-08-27"
+   build-date "1998-10-12"
+   maintainer "SL Baur <steve@xemacs.org>"
+   distribution stable
+   priority low
+   category "comm"
+   dump nil
+   description "Footnoting in mail message editing modes."
+   filename "footnote-1.07-pkg.tar.gz"
+   md5sum "1064b49b7e13a467458af2bafd9e62fb"
+   size 13362
+   provides (footnote)
+   requires (mail-lib xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(eudc
+  (standards-version 1.0
+   version "1.24"
+   author-version "1.24"
+   date "1998-10-15"
+   build-date "1998-10-15"
+   maintainer "Oscar Figueiredo <Oscar.Figueiredo@epfl.ch>"
+   distribution stable
+   priority low
+   category "comm"
+   dump nil
+   description "Emacs Unified Directory Client (LDAP, PH)."
+   filename "eudc-1.24-pkg.tar.gz"
+   md5sum "43c173e7e052c81b196c617fb22b6e00"
+   size 50837
+   provides (eudc eudc-ldap eudc-ph)
+   requires (fsf-compat xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(bbdb
+  (standards-version 1.0
+   version "1.06"
+   author-version "2.00.02"
+   date "1998-10-08"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority medium
+   category "comm"
+   dump nil
+   description "The Big Brother Data Base"
+   filename "bbdb-1.06-pkg.tar.gz"
+   md5sum "4889d21fded3ae5cddee558e0d136a20"
+   size 281992
+   provides (bbdb)
+   requires (bbdb edit-utils gnus mh-e rmail supercite vm tm apel mail-lib xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(gnus
+  (standards-version 1.0
+   version "1.33"
+   author-version "5.6.44"
+   date "1998-09-25"
+   build-date "1998-10-15"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority medium
+   category "comm"
+   dump nil
+   description "The Gnus Newsreader and Mailreader."
+   filename "gnus-1.33-pkg.tar.gz"
+   md5sum "46a0466ec203cd7b0d78bfeb215a65f5"
+   size 1874633
+   provides (gnus message)
+   requires (gnus w3 mh-e mailcrypt rmail mail-lib xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(skk
+  (standards-version 1.0
+   version "1.11"
+   author-version "10.38"
+   date "1998-10-01"
+   build-date "1998-10-12"
+   maintainer "SL Baur <steve@altair.xemacs.org>"
+   distribution mule
+   priority medium
+   category "mule"
+   dump t
+   description "Japanese Language Input Method."
+   filename "skk-1.11-pkg.tar.gz"
+   md5sum "c158751b558299be9b5f8f9d10216a79"
+   size 1513975
+   provides (skk skk-tut)
+   requires (viper mule-base elib xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(mule-base
+  (standards-version 1.0
+   version "1.24"
+   author-version "21.0"
+   date "1998-08-12"
+   build-date "1998-10-12"
+   maintainer "SL Baur <steve@altair.xemacs.org>"
+   distribution mule
+   priority high
+   category "mule"
+   dump t
+   description "Basic Mule support, required for building with Mule."
+   filename "mule-base-1.24-pkg.tar.gz"
+   md5sum "9842af89469856fa1c7f3ed60c8c25cf"
+   size 508959
+   provides (canna-leim canna char-table china-util cyril-util isearch-ext japan-util ccl can-n-egg mule-help)
+   requires (fsf-compat xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(egg-its
+  (standards-version 1.0
+   version "1.13"
+   author-version "21.0"
+   date "1998-08-11"
+   build-date "1998-10-15"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution mule
+   priority high
+   category "mule"
+   dump t
+   description "Wnn (4.2 and 6) support.  SJ3 support."
+   filename "egg-its-1.13-pkg.tar.gz"
+   md5sum "e7a5d51eb734310b9bb151c4fba05868"
+   size 259686
+   provides (egg-cnpinyin egg-cnzhuyin egg-cwnn-leim egg-jisx0201 egg-jsymbol egg-kwnn-leim egg-leim egg-sj3-client egg-sj3-leim egg-sj3 egg-wnn egg)
+   requires (leim mule-base fsf-compat xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(edict
+  (standards-version 1.0
+   version "1.06"
+   author-version "0.9.8"
+   date "1998-07-23"
+   build-date "1998-10-12"
+   maintainer "Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>"
+   distribution mule
+   priority high
+   category "mule"
+   dump nil
+   description "Lisp Interface to EDICT, Kanji Dictionary"
+   filename "edict-1.06-pkg.tar.gz"
+   md5sum "d9ba0f5372b2b83fe1499d1462dad3ca"
+   size 68008
+   provides (dui-registry dui edict-edit edict-english edict-japanese edict-morphology edict-test edict ts-mode)
+   requires (mule-base xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(leim
+  (standards-version 1.0
+   version "1.11"
+   author-version "21.0"
+   date "1998-07-23"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution mule
+   priority medium
+   category "mule"
+   dump nil
+   description "Quail.  All non-English and non-Japanese language support."
+   filename "leim-1.11-pkg.tar.gz"
+   md5sum "19f4745d0364b46c7526a34777c653e5"
+   size 1670560
+   provides ()
+   requires (mule-base fsf-compat xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(locale
+  (standards-version 1.0
+   version "1.10"
+   author-version "21.0"
+   date "1998-07-24"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution mule
+   priority high
+   category "mule"
+   dump nil
+   description "Localized menubars and localized splash screens."
+   filename "locale-1.10-pkg.tar.gz"
+   md5sum "8439f2d7e266f3e4c2f18a19aa967202"
+   size 32709
+   provides ()
+   requires (mule-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(time
+  (standards-version 1.0
+   version "1.06"
+   author-version "1.17"
+   date "1998-04-24"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority medium
+   category "oa"
+   dump nil
+   description "Display time & date on the modeline."
+   filename "time-1.06-pkg.tar.gz"
+   md5sum "f55965f3ef08e038bd58ca8f4fb83fe6"
+   size 20018
+   provides (time)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(text-modes
+  (standards-version 1.0
+   version "1.13"
+   author-version "21.0"
+   date "1998-09-24"
+   build-date "1998-10-15"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority high
+   category "oa"
+   dump nil
+   description "Miscellaneous support for editing text files."
+   filename "text-modes-1.13-pkg.tar.gz"
+   md5sum "3209269c42e32e39f70259cb68855e4f"
+   size 195165
+   provides (autoinsert crontab-edit filladapt fold-isearch folding image-mode iso-acc iso-ascii iso-cvt iso-insert iso-swed swedish tabify whitespace-mode winmgr-mode xpm-mode xrdb-mode)
+   requires (ispell fsf-compat xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(strokes
+  (standards-version 1.0
+   version "1.03"
+   author-version "21.0"
+   date "1998-01-25"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority medium
+   category "oa"
+   dump nil
+   description "Mouse enhancement utility."
+   filename "strokes-1.03-pkg.tar.gz"
+   md5sum "170257302196f106a54eb6dcf32fcc7a"
+   size 43480
+   provides (strokes)
+   requires (text-modes edit-utils mail-lib xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(speedbar
+  (standards-version 1.0
+   version "1.10"
+   author-version "0.6.2x"
+   date "1998-10-02"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "oa"
+   dump nil
+   description "Provides a seperate frame with convenient references."
+   filename "speedbar-1.10-pkg.tar.gz"
+   md5sum "eab230ae2aa7d6ed5739f46ec4099dcf"
+   size 64861
+   provides (speedbar)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(slider
+  (standards-version 1.0
+   version "1.08"
+   author-version "0.3x1"
+   date "1998-08-13"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution experimental
+   priority low
+   category "oa"
+   dump nil
+   description "User interface tool."
+   filename "slider-1.08-pkg.tar.gz"
+   md5sum "8d2fe53d7d58fa0af58ac0359caccaca"
+   size 12018
+   provides (slider color-selector)
+   requires ()
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(sgml
+  (standards-version 1.0
+   version "1.03"
+   author-version "21.0"
+   date "1998-01-25"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution contrib
+   priority low
+   category "oa"
+   dump nil
+   description "SGML/Linuxdoc-SGML editing."
+   filename "sgml-1.03-pkg.tar.gz"
+   md5sum "317c7f52a3215f53e964ad90f9c40909"
+   size 26928
+   provides (sgml linuxdoc-sgml)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(psgml
+  (standards-version 1.0
+   version "1.10"
+   author-version "1.01"
+   date "1998-07-06"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority medium
+   category "oa"
+   dump nil
+   description "Validated HTML/SGML editing."
+   filename "psgml-1.10-pkg.tar.gz"
+   md5sum "15e584b90a2d2310a2be15ea2aa0717a"
+   size 424930
+   provides (psgml sgml)
+   requires (edit-utils)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(pc
+  (standards-version 1.0
+   version "1.13"
+   author-version "21.0"
+   date "1998-07-25"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "oa"
+   dump nil
+   description "PC style interface emulation."
+   filename "pc-1.13-pkg.tar.gz"
+   md5sum "e5355fb82d1dbd77ad522bffb334168d"
+   size 16306
+   provides (delbs fusion pc-select pending-del s-region)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(ispell
+  (standards-version 1.0
+   version "1.12"
+   author-version "3.0x2"
+   date "1998-09-15"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "oa"
+   dump nil
+   description "Spell-checking with GNU ispell."
+   filename "ispell-1.12-pkg.tar.gz"
+   md5sum "5786e4688024aae78fe75a5cbf92c446"
+   size 67168
+   provides (ispell)
+   requires ()
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(hm--html-menus
+  (standards-version 1.0
+   version "1.08"
+   author-version "5.9"
+   date "1998-01-25"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "oa"
+   dump nil
+   description "HTML editing."
+   filename "hm--html-menus-1.08-pkg.tar.gz"
+   md5sum "1f0fda934b84c5eed96fcfd02a046398"
+   size 168017
+   provides (adapt hm--date hm--html-configuration hm--html-drag-and-drop hm--html-indentation hm--html-keys hm--html-menu hm--html-mode hm--html-not-standard hm--html html-view tmpl-minor-mode)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(frame-icon
+  (standards-version 1.0
+   version "1.05"
+   author-version "21.0"
+   date "1998-07-14"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution contrib
+   priority low
+   category "oa"
+   dump nil
+   description "Set up mode-specific icons for each frame under XEmacs"
+   filename "frame-icon-1.05-pkg.tar.gz"
+   md5sum "3d1a67ba8a51f74746ecb14385a025ef"
+   size 33490
+   provides (forms forms-mode)
+   requires ()
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(forms
+  (standards-version 1.0
+   version "1.08"
+   author-version "2.10"
+   date "1998-01-25"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution contrib
+   priority low
+   category "oa"
+   dump nil
+   description "Forms editing support (obsolete, use Widget instead)."
+   filename "forms-1.08-pkg.tar.gz"
+   md5sum "8af074cfc164331838bc83eb79eed3b5"
+   size 47670
+   provides (forms forms-mode)
+   requires ()
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(edit-utils
+  (standards-version 1.0
+   version "1.33"
+   author-version "21.0"
+   date "1998-09-29"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority high
+   category "oa"
+   dump nil
+   description "Miscellaneous editor extensions, you probably need this."
+   filename "edit-utils-1.33-pkg.tar.gz"
+   md5sum "0aa0b5d2864dc02a62fb6e87880c4733"
+   size 564543
+   provides (abbrevlist atomic-extents avoid backup-dir balloon-help big-menubar blink-cursor blink-paren bookmark compare-w completion dabbrev desktop detached-minibuf edit-toolbar fast-lock file-part floating-toolbar flow-ctrl foldout func-menu hippie-exp icomplete id-select info-look iswitchb lazy-lock lazy-shot live-icon man mic-paren paren popper mode-motion+ outl-mouse page-ext blink-paren paren permanent-buffers recent-files redo reportmail rsz-minibuf saveconfsavehist saveplace scroll-in-place tempo toolbar-utils tree-menu uniquify where-was-i-db)
+   requires (xemacs-base)
+   type single
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(calendar
+  (standards-version 1.0
+   version "1.08"
+   author-version "21.0"
+   date "1998-09-01"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "oa"
+   dump nil
+   description "Calendar and diary support."
+   filename "calendar-1.08-pkg.tar.gz"
+   md5sum "afe4b31eb98b130960046bb3c2385ed3"
+   size 248313
+   provides (appt cal-dst cal-french cal-mayan cal-x cal-xemacs calendar diary-ins diary-lib holidays lunar solar)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(calc
+  (standards-version 1.0
+   version "1.09"
+   author-version "2.02fX3"
+   date "1998-07-25"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "oa"
+   dump nil
+   description "Emacs calculator"
+   filename "calc-1.09-pkg.tar.gz"
+   md5sum "f0eb907a308a96da7ac5c3fc8c7d8bea"
+   size 1616564
+   provides (calc)
+   requires ()
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(vhdl
+  (standards-version 1.0
+   version "1.06"
+   author-version "2.74"
+   date "1998-01-24"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "prog"
+   dump nil
+   description "Support for VHDL."
+   filename "vhdl-1.06-pkg.tar.gz"
+   md5sum "b6f786b7f682f76d57eeb94d3c917e56"
+   size 65943
+   provides (vhdl-mode)
+   requires ()
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(vc-cc
+  (standards-version 1.0
+   version "1.09"
+   author-version "21.0"
+   date "1998-07-24"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution contrib
+   priority low
+   category "prog"
+   dump nil
+   description "Version Control for ClearCase (UnFree) systems."
+   filename "vc-cc-1.09-pkg.tar.gz"
+   md5sum "43f4947aeb368164aada9dc2df827ce7"
+   size 96473
+   provides (vc)
+   requires (dired xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(vc
+  (standards-version 1.0
+   version "1.14"
+   author-version "21.0"
+   date "1998-10-07"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "prog"
+   dump nil
+   description "Version Control for Free systems."
+   filename "vc-1.14-pkg.tar.gz"
+   md5sum "64c350d9c5280e7545e3dc3936992a8a"
+   size 83885
+   provides (vc)
+   requires (dired xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(sh-script
+  (standards-version 1.0
+   version "1.07"
+   author-version "2.0e"
+   date "1998-05-12"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "prog"
+   dump nil
+   description "Support for editing shell scripts."
+   filename "sh-script-1.07-pkg.tar.gz"
+   md5sum "c5dd114d8e925fc7c8ec6d9130489421"
+   size 33895
+   provides (sh-script executable)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(scheme
+  (standards-version 1.0
+   version "1.06"
+   author-version "21.0"
+   date "1998-09-08"
+   build-date "1998-10-11"
+   maintainer "Karl M. Hegbloom <karlheg@bittersweet.inetarena.com>"
+   distribution contrib
+   priority low
+   category "prog"
+   dump nil
+   description "Front-end support for Inferior Scheme."
+   filename "scheme-1.06-pkg.tar.gz"
+   md5sum "86edb18517b7ed62929041c55ea68927"
+   size 36321
+   provides (scheme xscheme cmuscheme cmuscheme48)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(prog-modes
+  (standards-version 1.0
+   version "1.13"
+   author-version "21.0"
+   date "1998-10-15"
+   build-date "1998-10-15"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority medium
+   category "prog"
+   dump nil
+   description "Support for various programming languages."
+   filename "prog-modes-1.13-pkg.tar.gz"
+   md5sum "6e78de455277b0fe757931532ca56a88"
+   size 574269
+   provides (autoconf-mode cperl-mode eiffel3 f90 fortran ksh-mode m4-mode makefile perl-mode postscript python-mode rexx-mode simula-mode tcl teco verilog-mod)
+   requires (mail-lib xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(pcl-cvs
+  (standards-version 1.0
+   version "1.34"
+   author-version "R-2_0-Beta_2"
+   date "1998-10-12"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "prog"
+   dump nil
+   description "CVS frontend."
+   filename "pcl-cvs-1.34-pkg.tar.gz"
+   md5sum "6a3f944402c486679e7cb33f60b8689b"
+   size 161529
+   provides (pcl-cvs generic-sc)
+   requires (xemacs-base elib dired)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(jde
+  (standards-version 1.0
+   version "1.06"
+   author-version "2.05"
+   date "1998-07-09"
+   build-date "1998-10-11"
+   maintainer "Andy Piper <andyp@parallax.co.uk>"
+   distribution stable
+   priority medium
+   category "prog"
+   dump nil
+   description "Java language and development support."
+   filename "jde-1.06-pkg.tar.gz"
+   md5sum "402a03ac6482ee28a586ee41164cf4f5"
+   size 126911
+   provides (jde)
+   requires (cc-mode debug speedbar edit-utils mail-lib xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(emerge
+  (standards-version 1.0
+   version "1.04"
+   author-version "21.0"
+   date "1998-04-07"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "prog"
+   dump nil
+   description "Another interface over GNU patch."
+   filename "emerge-1.04-pkg.tar.gz"
+   md5sum "681e35d3a0c167782db2e93f37ee3147"
+   size 60972
+   provides (emerge)
+   requires ()
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(ediff
+  (standards-version 1.0
+   version "1.13"
+   author-version "2.71"
+   date "up-mess): "
+   build-date "1998-10-15"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority medium
+   category "prog"
+   dump nil
+   description "Interface over GNU patch."
+   filename "ediff-1.13-pkg.tar.gz"
+   md5sum "6435e57ce61d0b0262196866d62b63be"
+   size 281534
+   provides (ediff)
+   requires (pcl-cvs elib dired xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(debug
+  (standards-version 1.0
+   version "1.06"
+   author-version "21.0"
+   date "1998-07-09"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution contrib
+   priority low
+   category "prog"
+   dump nil
+   description "GUD, gdb, dbx debugging support."
+   filename "debug-1.06-pkg.tar.gz"
+   md5sum "807421911694a3c5853568efb71b88b0"
+   size 88964
+   provides (dbx gdb-highlight gdb gdbsrc gud history)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(cc-mode
+  (standards-version 1.0
+   version "1.13"
+   author-version "5.22"
+   date "1998-03-05"
+   build-date "1998-10-11"
+   maintainer "Barry Warsaw <cc-mode-help@python.org>"
+   distribution stable
+   priority medium
+   category "prog"
+   dump nil
+   description "C, C++ and Java language support."
+   filename "cc-mode-1.13-pkg.tar.gz"
+   md5sum "1ea7ffaa586063356ae65f4777cfb431"
+   size 186436
+   provides (cc-mode)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(c-support
+  (standards-version 1.0
+   version "1.09"
+   author-version "21.0"
+   date "1998-03-25"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution contrib
+   priority low
+   category "prog"
+   dump nil
+   description "Basic single-file add-ons for editing C code."
+   filename "c-support-1.09-pkg.tar.gz"
+   md5sum "f9dc7f8884203038f750d1e96087dc9c"
+   size 68730
+   provides (c-comment-edit cmacexp ctypes hideif hideshow)
+   requires (cc-mode xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(ada
+  (standards-version 1.0
+   version "1.05"
+   author-version "2.27"
+   date "1998-01-24"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "prog"
+   dump nil
+   description "Ada language support."
+   filename "ada-1.05-pkg.tar.gz"
+   md5sum "374870f02139d0d80b56dab23f93b06d"
+   size 54388
+   provides (ada-mode ada-stmt)
+   requires ()
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(viper
+  (standards-version 1.0
+   version "1.10"
+   author-version "3.03"
+   date "1998-02-25"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "wp"
+   dump nil
+   description "VI emulation support."
+   filename "viper-1.10-pkg.tar.gz"
+   md5sum "f34ad536e27aa564849fcfb2fcf22a29"
+   size 315794
+   provides (viper)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(tpu
+  (standards-version 1.0
+   version "1.07"
+   author-version "4.2X"
+   date "1998-07-23"
+   build-date "1998-10-11"
+   maintainer "Kevin Oberman <oberman@es.net>"
+   distribution normal
+   priority medium
+   category "wp"
+   dump nil
+   description "DEC EDIT/TPU support."
+   filename "tpu-1.07-pkg.tar.gz"
+   md5sum "be15173be8a57fcb7b7244a143026f8c"
+   size 58801
+   provides (tpu)
+   requires ()
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(textools
+  (standards-version 1.0
+   version "1.07"
+   author-version "21.0"
+   date "1998-04-29"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stabl
+   priority medium
+   category "wp"
+   dump nil
+   description "Miscellaneous TeX support."
+   filename "textools-1.07-pkg.tar.gz"
+   md5sum "a7dff92bcb92c3401f7e6085216f72d7"
+   size 79178
+   provides (bib-mode bibtex refer-to-bibtex)
+   requires (xemacs-base)
+   type single
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(texinfo
+  (standards-version 1.0
+   version "1.13"
+   author-version "21.0"
+   date "1998-07-20"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority high
+   category "wp"
+   dump nil
+   description "XEmacs TeXinfo support."
+   filename "texinfo-1.13-pkg.tar.gz"
+   md5sum "460efede51ea17cd85872959fcf6474f"
+   size 127794
+   provides (makeinfo tex-mode texinfmt texinfo texnfo-tex texnfo-upd)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(reftex
+  (standards-version 1.0
+   version "1.09"
+   author-version "3.41"
+   date "1998-08-11"
+   build-date "1998-10-11"
+   maintainer "Carsten Dominik <dominik@strw.LeidenUniv.nl>"
+   distribution stable
+   priority medium
+   category "wp"
+   dump nil
+   description "Emacs support for LaTeX cross-references, citations.."
+   filename "reftex-1.09-pkg.tar.gz"
+   md5sum "c7c12198809741e20431cf14a6b965c4"
+   size 204664
+   provides (reftex)
+   requires (fsf-compat xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(edt
+  (standards-version 1.0
+   version "1.06"
+   author-version "21.0"
+   date "1998-04-07"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution contrib
+   priority low
+   category "wp"
+   dump nil
+   description "DEC EDIT/EDT emulation."
+   filename "edt-1.06-pkg.tar.gz"
+   md5sum "bb559e2a5c87b7b3f466b83a2ed7ef3b"
+   size 46138
+   provides (edt)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(crisp
+  (standards-version 1.0
+   version "1.08"
+   author-version "1.34"
+   date "1998-08-18"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "wp"
+   dump nil
+   description "Crisp/Brief emulation."
+   filename "crisp-1.08-pkg.tar.gz"
+   md5sum "2c18df3dd1eb14e01768832b2b208af4"
+   size 10077
+   provides (crisp scroll-lock)
+   requires ()
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(auctex
+  (standards-version 1.0
+   version "1.15"
+   author-version "9.7p"
+   date "1998-09-30"
+   build-date "1998-10-15"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority medium
+   category "wp"
+   dump nil
+   description "Basic TeX/LaTeX support."
+   filename "auctex-1.15-pkg.tar.gz"
+   md5sum "491d156e8e1f91b6b1604eccdfddace3"
+   size 365003
+   provides (auc-old bib-cite font-latex latex multi-prompt tex-buf tex-info tex-jp tex-site tex)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(view-process
+  (standards-version 1.0
+   version "1.05"
+   author-version "2.4"
+   date "1998-01-24"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "os"
+   dump nil
+   description "A Unix process browsing tool."
+   filename "view-process-1.05-pkg.tar.gz"
+   md5sum "ec1ba005feb4ea54a832c9d07414de11"
+   size 59881
+   provides (view-process-mode)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(os-utils
+  (standards-version 1.0
+   version "1.12"
+   author-version "21.0"
+   date "1998-10-01"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority medium
+   category "os"
+   dump nil
+   description "Miscellaneous O/S utilities."
+   filename "os-utils-1.12-pkg.tar.gz"
+   md5sum "603eb56b2af67de1663c9a3fa700b2ae"
+   size 227137
+   provides (archive-mode background crypt crypt++ inf-lisp jka-compr lpr mchat ps-print tar-mode telnet terminal uncompress)
+   requires (xemacs-base)
+   type single
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(ilisp
+  (standards-version 1.0
+   version "1.06"
+   author-version "5.8"
+   date "1998-01-24"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "os"
+   dump nil
+   description "Front-end for Inferior Lisp."
+   filename "ilisp-1.06-pkg.tar.gz"
+   md5sum "89c81fd6dac09a58d09e46ee10db4484"
+   size 262258
+   provides (ilisp completer)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(igrep
+  (standards-version 1.0
+   version "1.04"
+   author-version "2.83"
+   date "1998-08-11"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "os"
+   dump nil
+   description "Enhanced front-end for Grep."
+   filename "igrep-1.04-pkg.tar.gz"
+   md5sum "8621b52d6316c14821334191477a8ba7"
+   size 14904
+   provides (igrep)
+   requires (dired xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(eterm
+  (standards-version 1.0
+   version "1.07"
+   author-version "21.0"
+   date "1998-06-28"
+   build-date "1998-10-12"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority medium
+   category "os"
+   dump nil
+   description "Terminal emulation."
+   filename "eterm-1.07-pkg.tar.gz"
+   md5sum "f25bfd3c591f9ca5be6f3705ea2681a3"
+   size 108929
+   provides (eterm)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(misc-games
+  (standards-version 1.0
+   version "1.08"
+   author-version "21.0"
+   date "1998-03-22"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "games"
+   dump nil
+   description "Other amusements and diversions."
+   filename "misc-games-1.08-pkg.tar.gz"
+   md5sum "ca010a30375137a14b3c37989ad61c48"
+   size 165701
+   provides (decipher gomoku hanoi life morse rot13)
+   requires (xemacs-base)
+   type single
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(mine
+  (standards-version 1.0
+   version "1.09"
+   author-version "1.9"
+   date "1998-05-09"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "games"
+   dump nil
+   description "Minehunt Game."
+   filename "mine-1.09-pkg.tar.gz"
+   md5sum "044c1e48ffca88adf46e0df91d456a49"
+   size 66794
+   provides (xmine)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(games
+  (standards-version 1.0
+   version "1.07"
+   author-version "1.04"
+   date "1998-06-04"
+   build-date "1998-10-11"
+   maintainer "Glynn Clements <glynn@sensei.co.uk>"
+   distribution stable
+   priority low
+   category "games"
+   dump nil
+   description "Tetris, Sokoban, and Snake."
+   filename "games-1.07-pkg.tar.gz"
+   md5sum "ac3fa3b5de00f0daa50c1f372e5b86e0"
+   size 32101
+   provides (gamegrid snake tetris sokoban)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(cookie
+  (standards-version 1.0
+   version "1.09"
+   author-version "21.0"
+   date "1998-04-07"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "games"
+   dump nil
+   description "Spook and Yow (Zippy quotes)."
+   filename "cookie-1.09-pkg.tar.gz"
+   md5sum "c0618f8a6db3951c081f053233fb75b5"
+   size 34228
+   provides (cookie1 yow)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(xemacs-devel
+  (standards-version 1.0
+   version "1.19"
+   author-version "21.0"
+   date "1998-09-18"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority medium
+   category "libs"
+   dump nil
+   description "Emacs Lisp developer support."
+   filename "xemacs-devel-1.19-pkg.tar.gz"
+   md5sum "1a9a1d467ae39ce1e93f5fd238112b3e"
+   size 83669
+   provides (docref eldoc elp find-func hide-copyleft ielm regexp-opt trace)
+   requires (xemacs-base)
+   type single
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(xemacs-base
+  (standards-version 1.0
+   version "1.27"
+   author-version "21.0"
+   date "1998-10-08"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution mule
+   priority high
+   category "libs"
+   dump nil
+   description "Fundamental XEmacs support, you almost certainly need this."
+   filename "xemacs-base-1.27-pkg.tar.gz"
+   md5sum "bbede4998cdf5af078c0e41d7b9af7c8"
+   size 429962
+   provides (add-log advice annotations assoc case-table chistory comint-xemacs comint compile debug ebuff-menu echistory edmacro ehelp electric enriched env facemenu ffap helper imenu iso-syntax macros novice outline overlay passwd pp regi ring shell skeleton sort thing time-stamp timezone xbm-button xpm-button)
+   requires ()
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(tooltalk
+  (standards-version 1.0
+   version "1.08"
+   author-version "21.0"
+   date "1998-07-25"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution contrib
+   priority low
+   category "libs"
+   dump nil
+   description "Support for building with Tooltalk."
+   filename "tooltalk-1.08-pkg.tar.gz"
+   md5sum "9b4d7a73f9bd50273a011b1ed6522535"
+   size 9293
+   provides ()
+   requires ()
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(mail-lib
+  (standards-version 1.0
+   version "1.18"
+   author-version "21.0"
+   date "1998-06-08"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority medium
+   category "libs"
+   dump nil
+   description "Fundamental lisp files for providing email support."
+   filename "mail-lib-1.18-pkg.tar.gz"
+   md5sum "25896164b50a8c09a45fdf74342c48ea"
+   size 120245
+   provides (browse-url highlight-headers mail-abbrevs mail-extr mail-utils reporter rfc822 rmail-mini rmailout sendmail smtpmail)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(fsf-compat
+  (standards-version 1.0
+   version "1.04"
+   author-version "21.0"
+   date "1998-09-12"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution mule
+   priority high
+   category "libs"
+   dump nil
+   description "FSF Emacs compatibility files."
+   filename "fsf-compat-1.04-pkg.tar.gz"
+   md5sum "629a4f399a410e88841db23014d00300"
+   size 17419
+   provides (overlay thingatpt timer x-popup-menu)
+   requires ()
+   type single
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(elib
+  (standards-version 1.0
+   version "1.03"
+   author-version "1.0"
+   date "1998-10-01"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution mule
+   priority high
+   category "libs"
+   dump nil
+   description "Portable Emacs Lisp utilities library."
+   filename "elib-1.03-pkg.tar.gz"
+   md5sum "f65ecef3ac286ee59e102f5fc5ad62cc"
+   size 72830
+   provides (avltree bintree cookie dll elib-node queue-f queue-m read stack-f stack-m string)
+   requires ()
+   type single
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(efs
+  (standards-version 1.0
+   version "1.11"
+   author-version "1.17"
+   date "1998-08-23"
+   build-date "1998-10-11"
+   maintainer "Mike Sperber <sperber@informatik.uni-tuebingen.de>"
+   distribution stable
+   priority medium
+   category "libs"
+   dump nil
+   description "Treat files on remote systems the same as local files."
+   filename "efs-1.11-pkg.tar.gz"
+   md5sum "88a538a5016ae53380dba011db80887a"
+   size 368997
+   provides (efs)
+   requires (xemacs-base vm dired)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(edebug
+  (standards-version 1.0
+   version "1.06"
+   author-version "21.0"
+   date "1998-03-12"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority low
+   category "libs"
+   dump nil
+   description "An Emacs Lisp debugger."
+   filename "edebug-1.06-pkg.tar.gz"
+   md5sum "a897be415a8b68c1f79a3632374c9174"
+   size 112385
+   provides (edebug cl-read cust-print eval-reg cl-specs)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(dired
+  (standards-version 1.0
+   version "1.03"
+   author-version "7.9"
+   date "1998-05-05"
+   build-date "1998-10-11"
+   maintainer "Mike Sperber <sperber@informatik.uni-tuebingen.de>"
+   distribution stable
+   priority medium
+   category "libs"
+   dump nil
+   description "Manage file systems."
+   filename "dired-1.03-pkg.tar.gz"
+   md5sum "30e621efdf8b83e72ad3b68f4e795069"
+   size 187593
+   provides (diff dired)
+   requires (xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(apel
+  (standards-version 1.0
+   version "1.07"
+   author-version "3.3"
+   date "1998-07-23"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution mule
+   priority high
+   category "libs"
+   dump nil
+   description "A Portable Emacs Library.  Used by XEmacs MIME support."
+   filename "apel-1.07-pkg.tar.gz"
+   md5sum "a650a5235403b0a1b46b3269634498e3"
+   size 34784
+   provides (atype emu-20 emu-e19 emu-x20 emu-xemacs emu file-detect filename install mule-caesar path-util richtext std11-parse std11 tinyrich)
+   requires (fsf-compat xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(Sun
+  (standards-version 1.0
+   version "1.09"
+   author-version "21.0"
+   date "1998-07-25"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution sun
+   priority low
+   category "libs"
+   dump nil
+   description "Support for Sparcworks."
+   filename "Sun-1.09-pkg.tar.gz"
+   md5sum "dc41d791f7c66dc13e8d0d206689188b"
+   size 63916
+   provides (sccs eos-browser eos-common eos-debugger eos-debugger eos-editor eos-init eos-load eos-menubar eos-toolbar sunpro)
+   requires (cc-mode xemacs-base)
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(sounds-au
+  (standards-version 1.0
+   version "1.05"
+   author-version "21.0"
+   date "1998-06-30"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority high
+   category "libs"
+   dump nil
+   description "XEmacs Sun sound files."
+   filename "sounds-au-1.05-pkg.tar.gz"
+   md5sum "5e44ddd6754771e35303bf4e71c17a17"
+   size 125753
+   provides ()
+   requires ()
+   type regular
+))
+))
+;;;@@@
+(package-get-update-base-entry (quote
+(sounds-wav
+  (standards-version 1.0
+   version "1.05"
+   author-version "21.0"
+   date "1998-06-30"
+   build-date "1998-10-11"
+   maintainer "XEmacs Development Team <xemacs-beta@xemacs.org>"
+   distribution stable
+   priority high
+   category "libs"
+   dump nil
+   description "XEmacs Microsoft sound files."
+   filename "sounds-wav-1.05-pkg.tar.gz"
+   md5sum "e110bc6096bcd24181b45c1b7f83eb59"
+   size 148564
+   provides ()
+   requires ()
+   type regular
+))
+))
+;;;@@@
+;; Package Index file ends here
+
+-----BEGIN PGP SIGNATURE-----
+Version: 2.6.2
+
+iQCVAwUBNibr5aLJZEUiepcNAQHmWQP+PDjjOvmsdhu6RGXIFCUPV4ado8IWD8i8
+/aEwLHJRdoQWEg0ZuiNgmtF2iNPrNIOkSs9hF+sOF4xoszhxaytfFG7DEA5Q8Alb
+jKooHKEUEF7W0wAxihyGojz3VuH5i7GKAtOcVqFtgWS3eAkNaN4QWlmhxavh0Cdv
+p7wnfYTZYSs=
+=65go
+-----END PGP SIGNATURE-----
diff --git a/etc/photos/ajc.png b/etc/photos/ajc.png
new file mode 100644 (file)
index 0000000..1840291
Binary files /dev/null and b/etc/photos/ajc.png differ
diff --git a/etc/photos/ajcm.png b/etc/photos/ajcm.png
new file mode 100644 (file)
index 0000000..1840291
Binary files /dev/null and b/etc/photos/ajcm.png differ
diff --git a/etc/photos/baw.png b/etc/photos/baw.png
new file mode 100644 (file)
index 0000000..2e1eb1e
Binary files /dev/null and b/etc/photos/baw.png differ
diff --git a/etc/photos/bawm.png b/etc/photos/bawm.png
new file mode 100644 (file)
index 0000000..2e1eb1e
Binary files /dev/null and b/etc/photos/bawm.png differ
diff --git a/etc/photos/bw.png b/etc/photos/bw.png
new file mode 100644 (file)
index 0000000..bf04f2a
Binary files /dev/null and b/etc/photos/bw.png differ
diff --git a/etc/photos/bwm.png b/etc/photos/bwm.png
new file mode 100644 (file)
index 0000000..b721837
Binary files /dev/null and b/etc/photos/bwm.png differ
diff --git a/etc/photos/cthomp.png b/etc/photos/cthomp.png
new file mode 100644 (file)
index 0000000..2946e3c
Binary files /dev/null and b/etc/photos/cthomp.png differ
diff --git a/etc/photos/cthompm.png b/etc/photos/cthompm.png
new file mode 100644 (file)
index 0000000..bc36004
Binary files /dev/null and b/etc/photos/cthompm.png differ
diff --git a/etc/photos/dkindred.png b/etc/photos/dkindred.png
new file mode 100644 (file)
index 0000000..2956bf6
Binary files /dev/null and b/etc/photos/dkindred.png differ
diff --git a/etc/photos/dkindredm.png b/etc/photos/dkindredm.png
new file mode 100644 (file)
index 0000000..dd78752
Binary files /dev/null and b/etc/photos/dkindredm.png differ
diff --git a/etc/photos/dmoore.png b/etc/photos/dmoore.png
new file mode 100644 (file)
index 0000000..83f6810
Binary files /dev/null and b/etc/photos/dmoore.png differ
diff --git a/etc/photos/dmoorem.png b/etc/photos/dmoorem.png
new file mode 100644 (file)
index 0000000..5c1ca35
Binary files /dev/null and b/etc/photos/dmoorem.png differ
diff --git a/etc/photos/dv.png b/etc/photos/dv.png
new file mode 100644 (file)
index 0000000..db531ff
Binary files /dev/null and b/etc/photos/dv.png differ
diff --git a/etc/photos/dvm.png b/etc/photos/dvm.png
new file mode 100644 (file)
index 0000000..18ddd8a
Binary files /dev/null and b/etc/photos/dvm.png differ
diff --git a/etc/photos/hniksic.png b/etc/photos/hniksic.png
new file mode 100644 (file)
index 0000000..6394eb9
Binary files /dev/null and b/etc/photos/hniksic.png differ
diff --git a/etc/photos/hniksicm.png b/etc/photos/hniksicm.png
new file mode 100644 (file)
index 0000000..190b4c9
Binary files /dev/null and b/etc/photos/hniksicm.png differ
diff --git a/etc/photos/jareth.png b/etc/photos/jareth.png
new file mode 100644 (file)
index 0000000..0e8146b
Binary files /dev/null and b/etc/photos/jareth.png differ
diff --git a/etc/photos/jarethm.png b/etc/photos/jarethm.png
new file mode 100644 (file)
index 0000000..206c1ec
Binary files /dev/null and b/etc/photos/jarethm.png differ
diff --git a/etc/photos/jens.png b/etc/photos/jens.png
new file mode 100644 (file)
index 0000000..fbdfe83
Binary files /dev/null and b/etc/photos/jens.png differ
diff --git a/etc/photos/jensm.png b/etc/photos/jensm.png
new file mode 100644 (file)
index 0000000..fbdfe83
Binary files /dev/null and b/etc/photos/jensm.png differ
diff --git a/etc/photos/jmiller.png b/etc/photos/jmiller.png
new file mode 100644 (file)
index 0000000..5005cd5
Binary files /dev/null and b/etc/photos/jmiller.png differ
diff --git a/etc/photos/jmillerm.png b/etc/photos/jmillerm.png
new file mode 100644 (file)
index 0000000..aa1ed0e
Binary files /dev/null and b/etc/photos/jmillerm.png differ
diff --git a/etc/photos/jwz.png b/etc/photos/jwz.png
new file mode 100644 (file)
index 0000000..fe55b4f
Binary files /dev/null and b/etc/photos/jwz.png differ
diff --git a/etc/photos/jwzm.png b/etc/photos/jwzm.png
new file mode 100644 (file)
index 0000000..327d73d
Binary files /dev/null and b/etc/photos/jwzm.png differ
diff --git a/etc/photos/kazz.png b/etc/photos/kazz.png
new file mode 100644 (file)
index 0000000..03b97ef
Binary files /dev/null and b/etc/photos/kazz.png differ
diff --git a/etc/photos/kazzm.png b/etc/photos/kazzm.png
new file mode 100644 (file)
index 0000000..f47ac01
Binary files /dev/null and b/etc/photos/kazzm.png differ
diff --git a/etc/photos/kyle.png b/etc/photos/kyle.png
new file mode 100644 (file)
index 0000000..3fd18f3
Binary files /dev/null and b/etc/photos/kyle.png differ
diff --git a/etc/photos/kylem.png b/etc/photos/kylem.png
new file mode 100644 (file)
index 0000000..3fd18f3
Binary files /dev/null and b/etc/photos/kylem.png differ
diff --git a/etc/photos/larsi.png b/etc/photos/larsi.png
new file mode 100644 (file)
index 0000000..148add1
Binary files /dev/null and b/etc/photos/larsi.png differ
diff --git a/etc/photos/larsim.png b/etc/photos/larsim.png
new file mode 100644 (file)
index 0000000..148add1
Binary files /dev/null and b/etc/photos/larsim.png differ
diff --git a/etc/photos/martin.png b/etc/photos/martin.png
new file mode 100644 (file)
index 0000000..c6877cd
Binary files /dev/null and b/etc/photos/martin.png differ
diff --git a/etc/photos/martinm.png b/etc/photos/martinm.png
new file mode 100644 (file)
index 0000000..d4bc731
Binary files /dev/null and b/etc/photos/martinm.png differ
diff --git a/etc/photos/mcook.png b/etc/photos/mcook.png
new file mode 100644 (file)
index 0000000..98efe4a
Binary files /dev/null and b/etc/photos/mcook.png differ
diff --git a/etc/photos/mcookm.png b/etc/photos/mcookm.png
new file mode 100644 (file)
index 0000000..f3ff539
Binary files /dev/null and b/etc/photos/mcookm.png differ
diff --git a/etc/photos/mly.png b/etc/photos/mly.png
new file mode 100644 (file)
index 0000000..2fb240a
Binary files /dev/null and b/etc/photos/mly.png differ
diff --git a/etc/photos/mlym.png b/etc/photos/mlym.png
new file mode 100644 (file)
index 0000000..435ac93
Binary files /dev/null and b/etc/photos/mlym.png differ
diff --git a/etc/photos/morioka.png b/etc/photos/morioka.png
new file mode 100644 (file)
index 0000000..5329b5e
Binary files /dev/null and b/etc/photos/morioka.png differ
diff --git a/etc/photos/moriokam.png b/etc/photos/moriokam.png
new file mode 100644 (file)
index 0000000..b46f618
Binary files /dev/null and b/etc/photos/moriokam.png differ
diff --git a/etc/photos/ograf.png b/etc/photos/ograf.png
new file mode 100644 (file)
index 0000000..5211917
Binary files /dev/null and b/etc/photos/ograf.png differ
diff --git a/etc/photos/ografm.png b/etc/photos/ografm.png
new file mode 100644 (file)
index 0000000..3c453f9
Binary files /dev/null and b/etc/photos/ografm.png differ
diff --git a/etc/photos/pez.png b/etc/photos/pez.png
new file mode 100644 (file)
index 0000000..6d0f5f4
Binary files /dev/null and b/etc/photos/pez.png differ
diff --git a/etc/photos/pezm.png b/etc/photos/pezm.png
new file mode 100644 (file)
index 0000000..acd6007
Binary files /dev/null and b/etc/photos/pezm.png differ
diff --git a/etc/photos/piper.png b/etc/photos/piper.png
new file mode 100644 (file)
index 0000000..de555fd
Binary files /dev/null and b/etc/photos/piper.png differ
diff --git a/etc/photos/piperm.png b/etc/photos/piperm.png
new file mode 100644 (file)
index 0000000..de555fd
Binary files /dev/null and b/etc/photos/piperm.png differ
diff --git a/etc/photos/rickc.png b/etc/photos/rickc.png
new file mode 100644 (file)
index 0000000..0a91306
Binary files /dev/null and b/etc/photos/rickc.png differ
diff --git a/etc/photos/rickcm.png b/etc/photos/rickcm.png
new file mode 100644 (file)
index 0000000..37630b1
Binary files /dev/null and b/etc/photos/rickcm.png differ
diff --git a/etc/photos/slb.png b/etc/photos/slb.png
new file mode 100644 (file)
index 0000000..5ae2659
Binary files /dev/null and b/etc/photos/slb.png differ
diff --git a/etc/photos/slbm.png b/etc/photos/slbm.png
new file mode 100644 (file)
index 0000000..0ed6713
Binary files /dev/null and b/etc/photos/slbm.png differ
diff --git a/etc/photos/sperber.png b/etc/photos/sperber.png
new file mode 100644 (file)
index 0000000..5853b05
Binary files /dev/null and b/etc/photos/sperber.png differ
diff --git a/etc/photos/sperberm.png b/etc/photos/sperberm.png
new file mode 100644 (file)
index 0000000..88b49cb
Binary files /dev/null and b/etc/photos/sperberm.png differ
diff --git a/etc/photos/stig.png b/etc/photos/stig.png
new file mode 100644 (file)
index 0000000..93c9958
Binary files /dev/null and b/etc/photos/stig.png differ
diff --git a/etc/photos/stigb.png b/etc/photos/stigb.png
new file mode 100644 (file)
index 0000000..e391d97
Binary files /dev/null and b/etc/photos/stigb.png differ
diff --git a/etc/photos/stigbm.png b/etc/photos/stigbm.png
new file mode 100644 (file)
index 0000000..49b8c5c
Binary files /dev/null and b/etc/photos/stigbm.png differ
diff --git a/etc/photos/stigm.png b/etc/photos/stigm.png
new file mode 100644 (file)
index 0000000..73209e6
Binary files /dev/null and b/etc/photos/stigm.png differ
diff --git a/etc/photos/thiessel.png b/etc/photos/thiessel.png
new file mode 100644 (file)
index 0000000..0ba5cf2
Binary files /dev/null and b/etc/photos/thiessel.png differ
diff --git a/etc/photos/thiesselm.png b/etc/photos/thiesselm.png
new file mode 100644 (file)
index 0000000..0ba5cf2
Binary files /dev/null and b/etc/photos/thiesselm.png differ
diff --git a/etc/photos/vin.png b/etc/photos/vin.png
new file mode 100644 (file)
index 0000000..3d5fb27
Binary files /dev/null and b/etc/photos/vin.png differ
diff --git a/etc/photos/vinm.png b/etc/photos/vinm.png
new file mode 100644 (file)
index 0000000..94587f5
Binary files /dev/null and b/etc/photos/vinm.png differ
diff --git a/etc/photos/vladimir.png b/etc/photos/vladimir.png
new file mode 100644 (file)
index 0000000..30a3d6d
Binary files /dev/null and b/etc/photos/vladimir.png differ
diff --git a/etc/photos/vladimirm.png b/etc/photos/vladimirm.png
new file mode 100644 (file)
index 0000000..30a3d6d
Binary files /dev/null and b/etc/photos/vladimirm.png differ
diff --git a/etc/photos/wmperry.png b/etc/photos/wmperry.png
new file mode 100644 (file)
index 0000000..efae1cd
Binary files /dev/null and b/etc/photos/wmperry.png differ
diff --git a/etc/photos/wmperrym.png b/etc/photos/wmperrym.png
new file mode 100644 (file)
index 0000000..6e28324
Binary files /dev/null and b/etc/photos/wmperrym.png differ
diff --git a/etc/recycle.xpm b/etc/recycle.xpm
new file mode 100644 (file)
index 0000000..6f16863
--- /dev/null
@@ -0,0 +1,66 @@
+/* XPM */
+/* A recycle logo, artist unknown, converted to xpm by jwz */
+static char *recycle[] = {
+/*   width height ncolors chars_per_pixel x_hot y_hot */
+"    51    51     4       1               26    23",
+/*  colors */
+"  c None              m None",
+/* "# c black          m black",       */
+/* "@ c black          m black",       */
+/* "- c white          m white",       */
+"# c black             m chartreuse4",
+"@ c chartreuse4       m chartreuse4",
+"- c chartreuse1       m chartreuse1",
+/*  pixels */
+"                                                   ",
+"                 ###################               ",
+"               ##------------##@@-@-##             ",
+"              #-------------#@@@-@----#            ",
+"             #-------------#@@@-@------#           ",
+"             #------------#@@@-@-------#           ",
+"            #-------------##@-@---------#   ###    ",
+"            #------------# #-@----------# ##@##    ",
+"           #-------------# #@------------##-##     ",
+"           #------------#   #---------------#      ",
+"          #-------------#   #--------------#       ",
+"          #------------#     #------------@#       ",
+"         #-------------#     #------------#        ",
+"          ##----------#       #----------#         ",
+"            ##--------#      ##---------@#         ",
+"              ##-----#    ###-----------#          ",
+"                ##---#    ##############   ###     ",
+" ##############   ###                    ##--#     ",
+" #------------##    #                  ##-----#    ",
+"  ##-----------#                     ##-------#    ",
+"    ##---------##                  ##----------#   ",
+"     #----------#                 #------------#   ",
+"    #------------#                #-------------#  ",
+"    #------------##                #------------#  ",
+"   #--------------#                #-------------# ",
+"   #---------------#                #------------# ",
+"   #------------#--##               #------------# ",
+"   #-----------####-#                #-----------# ",
+"   #-----------#   ##          ##    #-----------# ",
+"    #---------#                ##     #---------#  ",
+"    #---------#               #-#     #---------#  ",
+"     #-------#                #-#      #-------#   ",
+"     #-------#               #--#      #----@@##   ",
+"      #-----#############    #--###############    ",
+"      #-----#@@@-@------#   #----------------@#    ",
+"       #---#@@@-@-------#   #---------------@#     ",
+"       #---#@@-@--------#  #----------------@#     ",
+"        #-#@@-@---------#  #---------------@#      ",
+"        #-#@@@----------# #----------------@#      ",
+"         #@@@-----------# #----------------#       ",
+"         #@@@-----------#  #--------------@#       ",
+"          #@@-----------#  #-------------@#        ",
+"           #------------#   #-----------@#         ",
+"            ##----------#   #---------@##          ",
+"              ###########    #--#######            ",
+"                             #--#                  ",
+"                              #-#                  ",
+"                              #-#                  ",
+"                               ##                  ",
+"                               ##                  ",
+"                                                   "
+};
diff --git a/etc/recycle2.xpm b/etc/recycle2.xpm
new file mode 100644 (file)
index 0000000..46a5d0f
--- /dev/null
@@ -0,0 +1,42 @@
+/* XPM */
+static char * recycle2_xpm[] = {
+/* width height ncolors cpp [x_hot y_hot] */
+"32 32 4 1 26 23",
+/* colors */
+"      s none  m none  c none",
+".     s iconColor1    m black c black",
+"X     c #7F7FFFFF0000",
+"o     c #45458B8B0000",
+/* pixels */
+"                                ",
+"           ............         ",
+"         .XXXXXXXX.oooXX.       ",
+"         XXXXXXXX.ooXXXXX.      ",
+"        .XXXXXXXX.ooXXXXXX  ..  ",
+"        .XXXXXXX..XXXXXXXX .o.  ",
+"       .XXXXXXXX  .XXXXXXXXX.   ",
+"       XXXXXXXX.   XXXXXXXX.    ",
+"      .XXXXXXXX.   XXXXXXXX     ",
+"        .XXXXX.    .XXXXXX.     ",
+"         ..XXX   ..XXXXXXX      ",
+" .........  ..            .XX   ",
+"  .XXXXXXX.             .XXXX.  ",
+"   .XXXXXX.           ..XXXXXX. ",
+"   .XXXXXXX.          XXXXXXXXX ",
+"   .XXXXXXX.          .XXXXXXXX ",
+"  .XXXXXXXXX.          .XXXXXXX.",
+"  .XXXXXXX..X.          XXXXXXX.",
+"  .XXXXXXX. ..      .   XXXXXXX.",
+"   .XXXXX.         .X   .XXXXXX ",
+"    XXXXX          .X    .XXXX. ",
+"    .XXX........   XX.........  ",
+"     .X.ooXXXXXX  .XXXXXXXXXo   ",
+"     .X.oXoXXXXX .XXXXXXXXXXo   ",
+"      XooXXXXXXX XXXXXXXXXXo.   ",
+"      .ooXXXXXXX XXXXXXXXXX.    ",
+"       ooXXXXXXX .XXXXXXXXo     ",
+"        .XXXXXXX  .XXXXXo.      ",
+"         .......   XX....       ",
+"                   .X           ",
+"                   .X           ",
+"                    .           "};
diff --git a/etc/refcard.ps.gz b/etc/refcard.ps.gz
new file mode 100644 (file)
index 0000000..eb4b472
Binary files /dev/null and b/etc/refcard.ps.gz differ
diff --git a/etc/refcard.tex b/etc/refcard.tex
new file mode 100644 (file)
index 0000000..7b6c23e
--- /dev/null
@@ -0,0 +1,653 @@
+% Reference Card for XEmacs on Unix systems
+% Time-stamp: <95/02/18 Ben Wing>
+%**start of header
+\newcount\columnsperpage
+
+% This file can be printed with 1, 2, or 3 columns per page (see below).
+% Specify how many you want here.  Nothing else needs to be changed.
+
+\columnsperpage=1
+
+% Copyright (c) 1987, 1993, 1995 Free Software Foundation, Inc.
+
+% 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 1, 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; see the file COPYING.  If not, write to
+% the Free Software Foundation, 675 Mass Ave, Cambridge MA 02139, USA.
+
+% This file is intended to be processed by plain TeX (TeX82).
+%
+% The final reference card has six columns, three on each side.
+% This file can be used to produce it in any of three ways:
+% 1 column per page
+%    produces six separate pages, each of which needs to be reduced to 80%.
+%    This gives the best resolution.
+% 2 columns per page
+%    produces three already-reduced pages.
+%    You will still need to cut and paste.
+% 3 columns per page
+%    produces two pages which must be printed sideways to make a
+%    ready-to-use 8.5 x 11 inch reference card.
+%    For this you need a dvi device driver that can print sideways.
+% Which mode to use is controlled by setting \columnsperpage above.
+%
+% Author:
+%  Stephen Gildea
+%  Internet: gildea@mit.edu
+%
+% Thanks to Paul Rubin, Bob Chassell, Len Tower, and Richard Mlynarik
+% for their many good ideas.
+
+% If there were room, it would be nice to see a section on Dired.
+
+\def\versionnumber{2.0 XEmacs}
+\def\year{1998}
+\def\version{April \year\ v\versionnumber}
+
+\def\shortcopyrightnotice{\vskip 1ex plus 2 fill
+  \centerline{\small \copyright\ \year\ Free Software Foundation, Inc.
+  Permissions on back.  v\versionnumber}}
+
+\def\copyrightnotice{
+\vskip 1ex plus 2 fill\begingroup\small
+\centerline{Copyright \copyright\ \year\ Free Software Foundation, Inc.}
+\centerline{designed by Stephen Gildea, \version}
+\centerline{for GNU Emacs version 19 on Unix systems}
+\centerline{Updated for XEmacs in February 1995 by Ben Wing}
+
+Permission is granted to make and distribute copies of
+this card provided the copyright notice and this permission notice
+are preserved on all copies.
+
+For copies of the GNU Emacs manual, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+USA.
+
+\endgroup}
+
+% make \bye not \outer so that the \def\bye in the \else clause below
+% can be scanned without complaint.
+\def\bye{\par\vfill\supereject\end}
+
+\newdimen\intercolumnskip       %horizontal space between columns
+\newbox\columna                 %boxes to hold columns already built
+\newbox\columnb
+
+\def\ncolumns{\the\columnsperpage}
+
+\message{[\ncolumns\space 
+  column\if 1\ncolumns\else s\fi\space per page]}
+
+\def\scaledmag#1{ scaled \magstep #1}
+
+% This multi-way format was designed by Stephen Gildea October 1986.
+% Note that the 1-column format is fontfamily-independent.
+\if 1\ncolumns                  %one-column format uses normal size
+  \hsize 4in
+  \vsize 10in
+  \voffset -.7in
+  \font\titlefont=\fontname\tenbf \scaledmag3
+  \font\headingfont=\fontname\tenbf \scaledmag2
+  \font\smallfont=\fontname\sevenrm
+  \font\smallsy=\fontname\sevensy
+
+  \footline{\hss\folio}
+  \def\makefootline{\baselineskip10pt\hsize6.5in\line{\the\footline}}
+\else                           %2 or 3 columns uses prereduced size
+  \hsize 3.2in
+  \vsize 7.95in
+  \hoffset -.75in
+  \voffset -.745in
+  \font\titlefont=cmbx10 \scaledmag2
+  \font\headingfont=cmbx10 \scaledmag1
+  \font\smallfont=cmr6
+  \font\smallsy=cmsy6
+  \font\eightrm=cmr8
+  \font\eightbf=cmbx8
+  \font\eightit=cmti8
+  \font\eighttt=cmtt8
+  \font\eightmi=cmmi8
+  \font\eightsy=cmsy8
+  \textfont0=\eightrm
+  \textfont1=\eightmi
+  \textfont2=\eightsy
+  \def\rm{\eightrm}
+  \def\bf{\eightbf}
+  \def\it{\eightit}
+  \def\tt{\eighttt}
+  \normalbaselineskip=.8\normalbaselineskip
+  \normallineskip=.8\normallineskip
+  \normallineskiplimit=.8\normallineskiplimit
+  \normalbaselines\rm           %make definitions take effect
+
+  \if 2\ncolumns
+    \let\maxcolumn=b
+    \footline{\hss\rm\folio\hss}
+    \def\makefootline{\vskip 2in \hsize=6.86in\line{\the\footline}}
+  \else \if 3\ncolumns
+    \let\maxcolumn=c
+    \nopagenumbers
+  \else
+    \errhelp{You must set \columnsperpage equal to 1, 2, or 3.}
+    \errmessage{Illegal number of columns per page}
+  \fi\fi
+
+  \intercolumnskip=.46in
+  \def\abc{a}
+  \output={%                    %see The TeXbook page 257
+      % This next line is useful when designing the layout.
+      %\immediate\write16{Column \folio\abc\space starts with \firstmark}
+      \if \maxcolumn\abc \multicolumnformat \global\def\abc{a}
+      \else\if a\abc
+        \global\setbox\columna\columnbox \global\def\abc{b}
+        %% in case we never use \columnb (two-column mode)
+        \global\setbox\columnb\hbox to -\intercolumnskip{}
+      \else
+        \global\setbox\columnb\columnbox \global\def\abc{c}\fi\fi}
+  \def\multicolumnformat{\shipout\vbox{\makeheadline
+      \hbox{\box\columna\hskip\intercolumnskip
+        \box\columnb\hskip\intercolumnskip\columnbox}
+      \makefootline}\advancepageno}
+  \def\columnbox{\leftline{\pagebody}}
+
+  \def\bye{\par\vfill\supereject
+    \if a\abc \else\null\vfill\eject\fi
+    \if a\abc \else\null\vfill\eject\fi
+    \end}  
+\fi
+
+% we won't be using math mode much, so redefine some of the characters
+% we might want to talk about
+\catcode`\^=12
+\catcode`\_=12
+
+\chardef\\=`\\
+\chardef\{=`\{
+\chardef\}=`\}
+
+\hyphenation{mini-buf-fer}
+
+\parindent 0pt
+\parskip 1ex plus .5ex minus .5ex
+
+\def\small{\smallfont\textfont2=\smallsy\baselineskip=.8\baselineskip}
+
+% newcolumn - force a new column.  Use sparingly, probably only for
+% the first column of a page, which should have a title anyway.
+\outer\def\newcolumn{\vfill\eject}
+
+% title - page title.  Argument is title text.
+\outer\def\title#1{{\titlefont\centerline{#1}}\vskip 1ex plus .5ex}
+
+% section - new major section.  Argument is section name.
+\outer\def\section#1{\par\filbreak
+  \vskip 3ex plus 2ex minus 2ex {\headingfont #1}\mark{#1}%
+  \vskip 2ex plus 1ex minus 1.5ex}
+
+\newdimen\keyindent
+
+% beginindentedkeys...endindentedkeys - key definitions will be
+% indented, but running text, typically used as headings to group
+% definitions, will not.
+\def\beginindentedkeys{\keyindent=1em}
+\def\endindentedkeys{\keyindent=0em}
+\endindentedkeys
+
+% paralign - begin paragraph containing an alignment.
+% If an \halign is entered while in vertical mode, a parskip is never
+% inserted.  Using \paralign instead of \halign solves this problem.
+\def\paralign{\vskip\parskip\halign}
+
+% \<...> - surrounds a variable name in a code example
+\def\<#1>{{\it #1\/}}
+
+% kbd - argument is characters typed literally.  Like the Texinfo command.
+\def\kbd#1{{\tt#1}\null}        %\null so not an abbrev even if period follows
+
+% beginexample...endexample - surrounds literal text, such a code example.
+% typeset in a typewriter font with line breaks preserved
+\def\beginexample{\par\leavevmode\begingroup
+  \obeylines\obeyspaces\parskip0pt\tt}
+{\obeyspaces\global\let =\ }
+\def\endexample{\endgroup}
+
+% key - definition of a key.
+% \key{description of key}{key-name}
+% prints the description left-justified, and the key-name in a \kbd
+% form near the right margin.
+\def\key#1#2{\leavevmode\hbox to \hsize{\vtop
+  {\hsize=.75\hsize\rightskip=1em
+  \hskip\keyindent\relax#1}\kbd{#2}\hfil}}
+
+\newbox\metaxbox
+\setbox\metaxbox\hbox{\kbd{M-x }}
+\newdimen\metaxwidth
+\metaxwidth=\wd\metaxbox
+
+% metax - definition of a M-x command.
+% \metax{description of command}{M-x command-name}
+% Tries to justify the beginning of the command name at the same place
+% as \key starts the key name.  (The "M-x " sticks out to the left.)
+\def\metax#1#2{\leavevmode\hbox to \hsize{\hbox to .75\hsize
+  {\hskip\keyindent\relax#1\hfil}%
+  \hskip -\metaxwidth minus 1fil
+  \kbd{#2}\hfil}}
+
+% threecol - like "key" but with two key names.
+% for example, one for doing the action backward, and one for forward.
+\def\threecol#1#2#3{\hskip\keyindent\relax#1\hfil&\kbd{#2}\hfil\quad
+  &\kbd{#3}\hfil\quad\cr}
+
+%**end of header
+\f
+
+\title{XEmacs Reference Card}
+
+\centerline{(for version 21.0+)}
+
+\section{Starting Emacs}
+
+To enter XEmacs, just type its name: \kbd{xemacs}
+
+To read in a file to edit, see Files, below.
+
+\section{Leaving Emacs}
+
+\key{suspend Emacs (or iconify frame under X)}{C-z}
+\key{exit Emacs permanently}{C-x C-c}
+
+\section{Files}
+
+\key{{\bf read} a file into Emacs}{C-x C-f}
+\key{{\bf save} a file back to disk}{C-x C-s}
+\key{save {\bf all} files}{C-x s}
+\key{{\bf insert} contents of another file into this buffer}{C-x i}
+\key{replace this file with the file you really want}{C-x C-v}
+\key{write buffer to a specified file}{C-x C-w}
+
+\section{Getting Help}
+
+The Help system is simple.  Type \kbd{C-h} and follow the directions.
+If you are a first-time user, type \kbd{C-h t} for a {\bf tutorial}.
+
+\key{quit Help window}{q}
+\key{scroll Help window}{space}
+
+\key{apropos: show commands matching a string}{C-h a}
+\key{show the function a key runs}{C-h c}
+\key{describe a function}{C-h f}
+\key{get mode-specific information}{C-h m}
+
+\section{Error Recovery}
+
+\key{{\bf abort} partially typed or executing command}{C-g}
+\metax{{\bf recover} a file lost by a system crash}{M-x recover-file}
+\metax{{\bf recover} files from a previous Emacs session}{M-x recover-session}
+\key{{\bf undo} an unwanted change}{C-x u {\rm or} C-_}
+\metax{restore a buffer to its original contents}{M-x revert-buffer}
+\key{redraw garbaged screen}{C-l}
+
+\section{Incremental Search}
+
+\key{search forward}{C-s}
+\key{search backward}{C-r}
+\key{regular expression search}{C-M-s}
+\key{reverse regular expression search}{C-M-r}
+
+\key{select previous search string}{M-p}
+\key{select next later search string}{M-n}
+\key{exit incremental search}{RET}
+\key{undo effect of last character}{DEL}
+\key{abort current search}{C-g}
+
+Use \kbd{C-s} or \kbd{C-r} again to repeat the search in either direction.
+If Emacs is still searching, \kbd{C-g} cancels only the part not done.
+
+\shortcopyrightnotice
+
+\section{Motion}
+
+\paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr
+\threecol{{\bf entity to move over}}{{\bf backward}}{{\bf forward}}
+\threecol{character}{C-b}{C-f}
+\threecol{word}{M-b}{M-f}
+\threecol{line}{C-p}{C-n}
+\threecol{go to line beginning (or end)}{C-a}{C-e}
+\threecol{sentence}{M-a}{M-e}
+\threecol{paragraph}{M-\{}{M-\}}
+\threecol{page}{C-x [}{C-x ]}
+\threecol{sexp}{C-M-b}{C-M-f}
+\threecol{function}{C-M-a}{C-M-e}
+\threecol{go to buffer beginning (or end)}{M-<}{M->}
+}
+
+\key{scroll to next screen}{C-v}
+\key{scroll to previous screen}{M-v}
+\key{scroll left}{C-x <}
+\key{scroll right}{C-x >}
+\key{scroll current line to center of screen}{C-u C-l}
+
+\section{Killing and Deleting}
+
+\paralign to \hsize{#\tabskip=10pt plus 1 fil&#\tabskip=0pt&#\cr
+\threecol{{\bf entity to kill}}{{\bf backward}}{{\bf forward}}
+\threecol{character (delete, not kill)}{DEL}{C-d}
+\threecol{word}{M-DEL}{M-d}
+\threecol{line (to end of)}{M-0 C-k}{C-k}
+\threecol{sentence}{C-x DEL}{M-k}
+\threecol{sexp}{M-- C-M-k}{C-M-k}
+}
+
+\key{kill {\bf region}}{C-w}
+\key{copy region to kill ring}{M-w}
+\key{kill through next occurrence of {\it char}}{M-z {\it char}}
+
+\key{yank back last thing killed}{C-y}
+\key{replace last yank with previous kill}{M-y}
+
+\section{Marking}
+
+\key{set mark here}{C-@ {\rm or} C-SPC}
+\key{exchange point and mark}{C-x C-x}
+
+\key{set mark {\it arg\/} {\bf words} away}{M-@}
+\key{mark {\bf paragraph}}{M-h}
+\key{mark {\bf page}}{C-x C-p}
+\key{mark {\bf sexp}}{C-M-@}
+\key{mark {\bf function}}{C-M-h}
+\key{mark entire {\bf buffer}}{C-x h}
+
+\section{Query Replace}
+
+\key{interactively replace a text string}{M-\%}
+\metax{using regular expressions}{M-x query-replace-regexp}
+
+Valid responses in query-replace mode are
+
+\key{{\bf replace} this one, go on to next}{SPC {\rm or} y}
+\key{replace this one, don't move}{,}
+\key{{\bf skip} to next without replacing}{DEL {\rm or} n}
+\key{replace all remaining matches}{!}
+\key{{\bf back up} to the previous match}{^}
+\key{{\bf exit} query-replace}{ESC}
+\key{enter recursive edit (\kbd{C-M-c} to exit)}{C-r}
+\key{delete match and enter recursive edit}{C-w}
+
+\section{Multiple Windows}
+
+\key{delete all other windows}{C-x 1}
+\key{delete this window}{C-x 0}
+\key{split window in two vertically}{C-x 2}
+\key{split window in two horizontally}{C-x 3}
+
+\key{scroll other window}{C-M-v}
+\key{switch cursor to another window}{C-x o}
+
+\metax{shrink window shorter}{M-x shrink-window}
+\key{grow window taller}{C-x ^}
+\key{shrink window narrower}{C-x \{}
+\key{grow window wider}{C-x \}}
+
+\key{select buffer in other window}{C-x 4 b}
+\key{display buffer in other window}{C-x 4 C-o}
+\key{find file in other window}{C-x 4 f}
+\key{find file read-only in other window}{C-x 4 r}
+\key{run Dired in other window}{C-x 4 d}
+\key{find tag in other window}{C-x 4 .}
+
+\section{Formatting}
+
+\key{indent current {\bf line} (mode-dependent)}{TAB}
+\key{indent {\bf region} (mode-dependent)}{C-M-\\}
+\key{indent {\bf sexp} (mode-dependent)}{C-M-q}
+\key{indent region rigidly {\it arg\/} columns}{C-x TAB}
+
+\key{insert newline after point}{C-o}
+\key{move rest of line vertically down}{C-M-o}
+\key{delete blank lines around point}{C-x C-o}
+\key{join line with previous (with arg, next)}{M-^}
+\key{delete all white space around point}{M-\\}
+\key{put exactly one space at point}{M-SPC}
+
+\key{fill paragraph}{M-q}
+\key{set fill column}{C-x f}
+\key{set prefix each line starts with}{C-x .}
+
+\section{Case Change}
+
+\key{uppercase word}{M-u}
+\key{lowercase word}{M-l}
+\key{capitalize word}{M-c}
+
+\key{uppercase region}{C-x C-u}
+\key{lowercase region}{C-x C-l}
+\metax{capitalize region}{M-x capitalize-region}
+
+\section{The Minibuffer}
+
+The following keys are defined in the minibuffer.
+
+\key{complete as much as possible}{TAB}
+\key{complete up to one word}{SPC}
+\key{complete and execute}{RET}
+\key{show possible completions}{?}
+\key{fetch previous minibuffer input}{M-p}
+\key{fetch next later minibuffer input}{M-n}
+\key{regexp search backward through history}{M-r}
+\key{regexp search forward through history}{M-s}
+\key{abort command}{C-g}
+
+Type \kbd{C-x ESC ESC} to edit and repeat the last command that used the
+minibuffer.  The following keys are then defined.
+
+\key{previous minibuffer command}{M-p}
+\key{next minibuffer command}{M-n}
+
+\newcolumn
+\title{XEmacs Reference Card}
+
+\section{Buffers}
+
+\key{select another buffer}{C-x b}
+\key{list all buffers}{C-x C-b}
+\key{kill a buffer}{C-x k}
+
+\section{Transposing}
+
+\key{transpose {\bf characters}}{C-t}
+\key{transpose {\bf words}}{M-t}
+\key{transpose {\bf lines}}{C-x C-t}
+\key{transpose {\bf sexps}}{C-M-t}
+
+\section{Spelling Check}
+
+\key{check spelling of current word}{M-\$}
+\metax{check spelling of all words in region}{M-x ispell-region}
+\metax{check spelling of entire buffer}{M-x ispell-buffer}
+
+\section{Tags}
+
+\key{find a tag (a definition)}{M-.}
+\key{find next occurrence of tag}{C-u M-.}
+\metax{specify a new tags file}{M-x visit-tags-table}
+
+\metax{regexp search on all files in tags table}{M-x tags-search}
+\metax{run query-replace on all the files}{M-x tags-query-replace}
+\key{continue last tags search or query-replace}{M-,}
+
+\section{Shells}
+
+\key{execute a shell command}{M-!}
+\key{run a shell command on the region}{M-|}
+\key{filter region through a shell command}{C-u M-|}
+\metax{start a shell in window \kbd{*shell*}}{M-x shell}
+
+\section{Rectangles}
+
+\key{copy rectangle to register}{C-x r r}
+\key{kill rectangle}{C-x r k}
+\key{yank rectangle}{C-x r y}
+\key{open rectangle, shifting text right}{C-x r o}
+\metax{blank out rectangle}{M-x clear-rectangle}
+\metax{prefix each line with a string}{M-x string-rectangle}
+\key{select rectangle with mouse}{M-button1}
+
+\section{Abbrevs}
+
+\key{add global abbrev}{C-x a g}
+\key{add mode-local abbrev}{C-x a l}
+\key{add global expansion for this abbrev}{C-x a i g}
+\key{add mode-local expansion for this abbrev}{C-x a i l}
+\key{explicitly expand abbrev}{C-x a e}
+
+\key{expand previous word dynamically}{M-/}
+
+\section{Regular Expressions}
+
+\key{any single character except a newline}{. {\rm(dot)}}
+\key{zero or more repeats}{*}
+\key{one or more repeats}{+}
+\key{zero or one repeat}{?}
+\key{any character in the set}{[ {\rm$\ldots$} ]}
+\key{any character not in the set}{[^ {\rm$\ldots$} ]}
+\key{beginning of line}{^}
+\key{end of line}{\$}
+\key{quote a special character {\it c\/}}{\\{\it c}}
+\key{alternative (``or'')}{\\|}
+\key{grouping}{\\( {\rm$\ldots$} \\)}
+\key{{\it n\/}th group}{\\{\it n}}
+\key{beginning of buffer}{\\`}
+\key{end of buffer}{\\'}
+\key{word break}{\\b}
+\key{not beginning or end of word}{\\B}
+\key{beginning of word}{\\<}
+\key{end of word}{\\>}
+\key{any word-syntax character}{\\w}
+\key{any non-word-syntax character}{\\W}
+\key{character with syntax {\it c}}{\\s{\it c}}
+\key{character with syntax not {\it c}}{\\S{\it c}}
+
+\section{Registers}
+
+\key{save region in register}{C-x r s}
+\key{insert register contents into buffer}{C-x r i}
+
+\key{save value of point in register}{C-x r SPC}
+\key{jump to point saved in register}{C-x r j}
+
+\section{Info}
+
+\key{enter the Info documentation reader}{C-h i}
+\beginindentedkeys
+
+Moving within a node:
+
+\key{scroll forward}{SPC}
+\key{scroll reverse}{DEL}
+\key{beginning of node}{. {\rm (dot)}}
+
+Moving between nodes:
+
+\key{{\bf next} node}{n}
+\key{{\bf previous} node}{p}
+\key{move {\bf up}}{u}
+\key{select menu item by name}{m}
+\key{select {\it n\/}th menu item by number (1--5)}{{\it n}}
+\key{follow cross reference  (return with \kbd{l})}{f}
+\key{return to last node you saw}{l}
+\key{return to directory node}{d}
+\key{go to any node by name}{g}
+
+Other:
+
+\key{run Info {\bf tutorial}}{h}
+\key{list Info commands}{?}
+\key{{\bf quit} Info}{q}
+\key{search nodes for regexp}{s}
+
+\endindentedkeys
+
+\section{Keyboard Macros}
+
+\key{{\bf start} defining a keyboard macro}{C-x (}
+\key{{\bf end} keyboard macro definition}{C-x )}
+\key{{\bf execute} last-defined keyboard macro}{C-x e}
+\key{{\bf edit} keyboard macro}{C-x C-k}
+\key{append to last keyboard macro}{C-u C-x (}
+\metax{name last keyboard macro}{M-x name-last-kbd-macro}
+\metax{insert Lisp definition in buffer}{M-x insert-kbd-macro}
+
+\section{Commands Dealing with Emacs Lisp}
+
+\key{eval {\bf sexp} before point}{C-x C-e}
+\key{eval current {\bf defun}}{C-M-x}
+\metax{eval {\bf region}}{M-x eval-region}
+\metax{eval entire {\bf buffer}}{M-x eval-current-buffer}
+\key{read and eval minibuffer}{M-ESC}
+\key{re-execute last minibuffer command}{C-x ESC ESC}
+\metax{read and eval Emacs Lisp file}{M-x load-file}
+\metax{load from standard system directory}{M-x load-library}
+
+\section{Simple Customization}
+
+% The intended audience here is the person who wants to make simple
+% customizations and knows Lisp syntax.
+
+Here are some examples of binding global keys in Emacs Lisp.
+
+\beginexample%
+(global-set-key [(control c) g] 'goto-line)
+(global-set-key [(control x) (control k)] 'kill-region)
+(global-set-key [(meta \#)] 'query-replace-regexp)
+\endexample
+
+An example of setting a variable in Emacs Lisp:
+
+\beginexample%
+(setq backup-by-copying-when-linked t)
+\endexample
+
+\section{Writing Commands}
+
+\beginexample%
+(defun \<command-name> (\<args>)
+  "\<documentation>"
+  (interactive "\<template>")
+  \<body>)
+\endexample
+
+An example:
+
+\beginexample%
+(defun this-line-to-top-of-window (line)
+  "Reposition line point is on to top of window.
+With ARG, put point on line ARG.
+Negative counts from bottom."
+  (interactive "P")
+  (recenter (if (null line)
+                0
+              (prefix-numeric-value line))))
+\endexample
+
+The argument to \kbd{interactive} is a string specifying how to get
+the arguments when the function is called interactively.
+Type \kbd{C-h f interactive} for more information.
+
+\copyrightnotice
+
+\bye
+\f
+% Local variables:
+% compile-command: "tex refcard"
+% End:
diff --git a/etc/sample.Xdefaults b/etc/sample.Xdefaults
new file mode 100644 (file)
index 0000000..52199e8
--- /dev/null
@@ -0,0 +1,288 @@
+! This is a sample .Xdefaults file.  The resources below are the
+! actual resources used as defaults for XEmacs, although the
+! form of these resources in the XEmacs app-defaults file is
+! slightly different.
+! 
+! You can use the examples below as a basis for your own customizations:
+! copy and modify any of the resources below into your own ~/.Xdefaults file.
+! .Xdefaults specifies defaults for all applications, not just XEmacs; it is
+! normally used to customize fonts, colors, and the like, while ~/.emacs is
+! used to change other sorts of (XEmacs-specific) behavior.
+! 
+! In general, changes to your .Xdefaults file will not take effect until the
+! next time you restart the window system.  To reload your resources
+! explicitly, use the shell command
+! 
+!      xrdb -load ~/.Xdefaults
+! 
+! The resources will take effect the next time you restart XEmacs.  (Simply
+! creating a new xemacs frame is not enough - you must restart the editor
+! for the changes to take effect.)
+! 
+
+
+! Colors and backgrounds.
+! ======================
+! The contrasts of these colors will cause them to map to the appropriate
+! one of "black" or "white" on monochrome systems.
+! 
+! The valid color names on your system can be found by looking in the file
+! `rgb.txt', usually found in /usr/lib/X11/ or /usr/openwin/lib/X11/.
+
+! Set the foreground and background colors of the `default' face.
+! The default face colors are the base for most of the other faces'
+! colors.  The default background is gray80, and the default foreground
+! is black.
+Emacs.default.attributeBackground:     gray80
+Emacs.default.attributeForeground:     black
+
+! Set the modeline colors.
+Emacs.modeline*attributeForeground:    Black
+Emacs.modeline*attributeBackground:    Gray75
+
+! Set the color of the text cursor.
+Emacs.text-cursor*attributeBackground: Red3
+
+! If you want to set the color of the mouse pointer, do this:
+! Emacs.pointer*attributeForeground:   Black
+! If you want to set the background of the mouse pointer, do this:
+! Emacs.pointer*attributeBackground:   White
+! Note that by default, the pointer foreground and background are the same
+! as the default face.
+
+! Set the menubar colors.  This overrides the default foreground and
+! background colors specified above.
+Emacs*menubar*Foreground:              Gray30
+Emacs*menubar*Background:              Gray75
+! This is for buttons in the menubar.  
+! Yellow would be better, but that would map to white on monochrome.
+Emacs*menubar.buttonForeground:                Blue
+Emacs*XlwMenu.selectColor:             ForestGreen
+Emacs*XmToggleButton.selectColor:      ForestGreen
+
+! Specify the colors of popup menus.
+Emacs*popup*Foreground:                        Black
+Emacs*popup*Background:                        Gray75
+
+! Specify the colors of the various sub-widgets of the dialog boxes.
+Emacs*dialog*Foreground:               Black
+! #A5C0C1 is a shade of blue
+Emacs*dialog*Background:               #A5C0C1
+! The following three are for Motif dialog boxes ...
+Emacs*dialog*XmTextField*Background:   WhiteSmoke
+Emacs*dialog*XmText*Background:                WhiteSmoke
+Emacs*dialog*XmList*Background:                WhiteSmoke
+! While this one is for Athena dialog boxes.
+Emacs*dialog*Command*Background:       WhiteSmoke
+
+! Xlw Scrollbar colors
+Emacs*XlwScrollBar.Foreground:         Gray30
+Emacs*XlwScrollBar.Background:         Gray75
+Emacs*XmScrollBar.Foreground:          Gray30
+Emacs*XmScrollBar.Background:          Gray75
+
+!
+! The Lucid Scrollbar supports two added resources, SliderStyle is either
+! "plain" (default) or "dimple".  Dimple puts a small dimple in the middle
+! of the slider that depresses when the slider is clicked on.  ArrowPosition is
+! either "opposite" (default) or "same".  Opposite puts the arrows at opposite
+! of the scrollbar, same puts both arrows at the same end, like the Amiga.
+!
+! Emacs*XlwScrollBar.SliderStyle:    dimple
+! Emacs*XlwScrollBar.ArrowPosition:  opposite
+
+
+!
+! If you want to turn off a toolbar, set its height or width to 0.
+! The correct size value is not really arbitrary.  We only control it
+! this way in order to avoid excess frame resizing when turning the
+! toolbars on and off.
+!
+! To change the heights and widths of the toolbars:
+!
+! Emacs.topToolBarHeight:              37
+! Emacs.bottomToolBarHeight:           0
+! Emacs.leftToolBarWidth:              0
+! Emacs.rightToolBarWidth:             0
+
+Emacs*topToolBarShadowColor:           Gray90
+Emacs*bottomToolBarShadowColor:                Gray40
+Emacs*backgroundToolBarColor:          Gray75
+Emacs*toolBarShadowThickness:          2
+
+
+! If you want to turn off vertical scrollbars, or change the default
+! pixel width of the vertical scrollbars, do it like this (0 width
+! means no vertical scrollbars):
+! 
+! Emacs.scrollBarWidth: 0
+! 
+! To change it for a particular frame, do this:
+! 
+! Emacs*FRAME-NAME.scrollBarWidth: 0
+
+
+! If you want to turn off horizontal scrollbars, or change the default
+! pixel height of the horizontal scrollbars, do it like this (0 height
+! means no horizontal scrollbars):
+! 
+! Emacs.scrollBarHeight: 0
+! 
+! To change it for a particular frame, do this:
+! 
+! Emacs*FRAME-NAME.scrollBarHeight: 0
+
+
+! To dynamically change the labels used for menubar buttons...
+! 
+! Emacs*XlwMenu.resourceLabels: True
+! Emacs*XlwMenu.newFrame.labelString: Open Another Window
+
+! To have the Motif scrollbars on the left instead of the right, do this:
+! 
+! Emacs*scrollBarPlacement: BOTTOM_LEFT
+!
+! To have the Athena scrollbars on the right, use `BOTTOM_RIGHT' instead
+
+! To have Motif scrollbars act more like Xt scrollbars...
+!
+! Emacs*XmScrollBar.translations: #override \n\
+!     <Btn1Down>:     PageDownOrRight(0)    \n\
+!     <Btn3Down>:     PageUpOrLeft(0)
+
+! Fonts.
+! ======
+! XEmacs requires the use of XLFD (X Logical Font Description) format font
+! names, which look like
+! 
+!      *-courier-medium-r-*-*-*-120-*-*-*-*-*-*
+! 
+! if you use any of the other, less strict font name formats, some of which
+! look like
+!              lucidasanstypewriter-12
+! and          fixed
+! and          9x13
+! 
+! then XEmacs won't be able to guess the names of the bold and italic versions.
+! All X fonts can be referred to via XLFD-style names, so you should use those
+! forms.  See the man pages for X(1), xlsfonts(1), and xfontsel(1).
+
+
+! The default font for the text area of XEmacs is chosen at run-time
+! by lisp code which tries a number of different possibilities in order
+! of preference.  If you wish to override it, use this:
+! 
+! Emacs.default.attributeFont:  -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*
+
+! If you choose a font which does not have an italic version, you can specify
+! some other font to use for it here:
+! 
+! Emacs.italic.attributeFont:  -*-courier-medium-o-*-*-*-120-*-*-*-*-iso8859-*
+!
+! And here is how you would set the background color of the `highlight' face,
+! but only on the screen named `debugger':
+! 
+! Emacs*debugger.highlight.attributeBackground:                PaleTurquoise
+! 
+! See the NEWS file (C-h n) for a more complete description of the resource
+! syntax of faces.
+
+
+! Font of the modeline, menubar and pop-up menus.
+! Note that the menubar resources do not use the `face' syntax, since they
+! are X toolkit widgets and thus outside the domain of XEmacs proper.
+! 
+Emacs*menubar*Font:            -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*
+Emacs*popup*Font:              -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*
+
+! Font in the Motif dialog boxes.
+! (Motif uses `fontList' while most other things use `font' - if you don't
+! know why you probably don't want to.)
+! 
+Emacs*XmDialogShell*FontList:  -*-helvetica-bold-r-*-*-*-120-*-*-*-*-iso8859-*
+Emacs*XmTextField*FontList:    -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*
+Emacs*XmText*FontList:         -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*
+Emacs*XmList*FontList:         -*-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-*
+
+! Font in the Athena dialog boxes.
+! I think 14-point looks nicer than 12-point.
+! Some people use 12-point anyway because you get more text, but
+! there's no purpose at all in doing this for dialog boxes.
+
+Emacs*Dialog*Font:             -*-helvetica-bold-r-*-*-*-140-*-*-*-*-iso8859-*
+
+! Dialog box translations.
+! =======================
+
+! This accelerator binds <return> in a dialog box to <activate> on button1
+Emacs*dialog*button1.accelerators:#override\
+<KeyPress>Return: ArmAndActivate()\n\
+<KeyPress>KP_Enter: ArmAndActivate()\n\
+Ctrl<KeyPress>m: ArmAndActivate()\n
+
+! Translations to make the TextField widget behave more like XEmacs
+Emacs*XmTextField.translations: #override\n\
+       !<Key>osfBackSpace:     delete-previous-character()\n\
+       !<Key>osfDelete:        delete-previous-character()\n\
+       !Ctrl<Key>h:            delete-previous-character()\n\
+       !Ctrl<Key>d:            delete-next-character()\n\
+       !Meta<Key>osfDelete:    delete-previous-word()\n\
+       !Meta<Key>osfBackSpace: delete-previous-word()\n\
+       !Meta<Key>d:            delete-next-word()\n\
+       !Ctrl<Key>k:            delete-to-end-of-line()\n\
+       !Ctrl<Key>g:            process-cancel()\n\
+       !Ctrl<Key>b:            backward-character()\n\
+       !<Key>osfLeft:          backward-character()\n\
+       !Ctrl<Key>f:            forward-character()\n\
+       !<Key>osfRight:         forward-character()\n\
+       !Meta<Key>b:            backward-word()\n\
+       !Meta<Key>osfLeft:      backward-word()\n\
+       !Meta<Key>f:            forward-word()\n\
+       !Meta<Key>osfRight:     forward-word()\n\
+       !Ctrl<Key>e:            end-of-line()\n\
+       !Ctrl<Key>a:            beginning-of-line()\n\
+       !Ctrl<Key>w:            cut-clipboard()\n\
+       !Meta<Key>w:            copy-clipboard()\n\
+       <Btn2Up>:               copy-primary()\n
+
+! With the XEmacs typeahead it's better to not have space be bound to
+! ArmAndActivate() for buttons that appear in dialog boxes.  This is
+! not 100% Motif compliant but the benefits far outweight the
+! compliancy problem.  
+Emacs*dialog*XmPushButton.translations:#override\n\
+    <Btn1Down>:         Arm()\n\
+    <Btn1Down>,<Btn1Up>: Activate()\
+                       Disarm()\n\
+    <Btn1Down>(2+):     MultiArm()\n\
+    <Btn1Up>(2+):       MultiActivate()\n\
+    <Btn1Up>:           Activate()\
+                       Disarm()\n\
+    <Key>osfSelect:    ArmAndActivate()\n\
+    <Key>osfActivate:   ArmAndActivate()\n\
+    <Key>osfHelp:      Help()\n\
+    ~Shift ~Meta ~Alt <Key>Return:     ArmAndActivate()\n\
+    <EnterWindow>:      Enter()\n\
+    <LeaveWindow>:      Leave()\n
+
+! XIM input method style 
+! ======================= 
+
+! ximStyles is a (whitespace or comma-separated) list of XIMStyles in
+! order of user's preference.  
+! Choose a subset of the following styles or reorder to taste
+Emacs*ximStyles: XIMPreeditPosition|XIMStatusArea\
+            XIMPreeditPosition|XIMStatusNothing\
+            XIMPreeditPosition|XIMStatusNone\
+            XIMPreeditNothing|XIMStatusArea\
+            XIMPreeditNothing|XIMStatusNothing\
+            XIMPreeditNothing|XIMStatusNone\
+            XIMPreeditNone|XIMStatusArea\
+            XIMPreeditNone|XIMStatusNothing\
+            XIMPreeditNone|XIMStatusNone
+
+! XIM Preedit and Status foreground and background
+Emacs*EmacsFrame.ximForeground: black
+Emacs*EmacsFrame.ximBackground: white
+
+! XIM fontset (defaults to system fontset default)
+! Emacs*EmacsFrame.FontSet: -dt-interface user-medium-r-normal-s*-*-*-*-*-*-*-*-*
diff --git a/etc/sample.emacs b/etc/sample.emacs
new file mode 100644 (file)
index 0000000..9e14814
--- /dev/null
@@ -0,0 +1,656 @@
+;; -*- Mode: Emacs-Lisp -*-
+
+;;; This is a sample .emacs file.
+;;;
+;;; The .emacs file, which should reside in your home directory, allows you to
+;;; customize the behavior of Emacs.  In general, changes to your .emacs file
+;;; will not take effect until the next time you start up Emacs.  You can load
+;;; it explicitly with `M-x load-file RET ~/.emacs RET'.
+;;;
+;;; There is a great deal of documentation on customization in the Emacs
+;;; manual.  You can read this manual with the online Info browser: type
+;;; `C-h i' or select "Emacs Info" from the "Help" menu.
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;                     Basic Customization                         ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;; Enable the command `narrow-to-region' ("C-x n n"), a useful
+;; command, but possibly confusing to a new user, so it's disabled by
+;; default.
+(put 'narrow-to-region 'disabled nil)
+
+;;; Define a variable to indicate whether we're running XEmacs/Lucid Emacs.
+;;; (You do not have to defvar a global variable before using it --
+;;; you can just call `setq' directly like we do for `emacs-major-version'
+;;; below.  It's clearer this way, though.)
+
+(defvar running-xemacs (string-match "XEmacs\\|Lucid" emacs-version))
+
+;; Make the sequence "C-x w" execute the `what-line' command, 
+;; which prints the current line number in the echo area.
+(global-set-key "\C-xw" 'what-line)
+
+;; set up the function keys to do common tasks to reduce Emacs pinky
+;; and such.
+
+;; Make F1 invoke help
+(global-set-key [f1] 'help-command)
+;; Make F2 be `undo'
+(global-set-key [f2] 'undo)
+;; Make F3 be `find-file'
+;; Note: it does not currently work to say
+;;   (global-set-key 'f3 "\C-x\C-f")
+;; The reason is that macros can't do interactive things properly.
+;; This is an extremely longstanding bug in Emacs.  Eventually,
+;; it will be fixed. (Hopefully ..)
+(global-set-key [f3] 'find-file)
+
+;; Make F4 be "mark", F5 be "copy", F6 be "paste"
+;; Note that you can set a key sequence either to a command or to another
+;; key sequence.
+(global-set-key [f4] 'set-mark-command)
+(global-set-key [f5] "\M-w")
+(global-set-key [f6] "\C-y")
+
+;; Shift-F4 is "pop mark off of stack"
+(global-set-key [(shift f4)] (lambda () (interactive) (set-mark-command t)))
+
+;; Make F7 be `save-buffer'
+(global-set-key [f7] 'save-buffer)
+
+;; Make F8 be "start macro", F9 be "end macro", F10 be "execute macro"
+(global-set-key [f8] 'start-kbd-macro)
+(global-set-key [f9] 'end-kbd-macro)
+(global-set-key [f10] 'call-last-kbd-macro)
+
+;; Here's an alternative binding if you don't use keyboard macros:
+;; Make F8 be `save-buffer' followed by `delete-window'.
+;;(global-set-key 'f8 "\C-x\C-s\C-x0")
+
+;; If you prefer delete to actually delete forward then you want to
+;; uncomment the next line (or use `Customize' to customize this).
+;; (setq delete-key-deletes-forward t)
+
+
+(cond (running-xemacs
+       ;;
+       ;; Code for any version of XEmacs/Lucid Emacs goes here
+       ;;
+
+       ;; Change the values of some variables.
+       ;; (t means true; nil means false.)
+       ;;
+       ;; Use the "Describe Variable..." option on the "Help" menu
+       ;; to find out what these variables mean.
+       (setq find-file-use-truenames nil
+            find-file-compare-truenames t
+            minibuffer-confirm-incomplete t
+            complex-buffers-menu-p t
+            next-line-add-newlines nil
+            mail-yank-prefix "> "
+            kill-whole-line t
+            )
+
+       ;; When running ispell, consider all 1-3 character words as correct.
+       (setq ispell-extra-args '("-W" "3"))
+
+       (cond ((or (not (fboundp 'device-type))
+                 (equal (device-type) 'x))
+             ;; Code which applies only when running emacs under X goes here.
+             ;; (We check whether the function `device-type' exists
+             ;; before using it.  In versions before 19.12, there
+             ;; was no such function.  If it doesn't exist, we
+             ;; simply assume we're running under X -- versions before
+             ;; 19.12 only supported X.)
+
+             ;; Remove the binding of C-x C-c, which normally exits emacs.
+             ;; It's easy to hit this by mistake, and that can be annoying.
+             ;; Under X, you can always quit with the "Exit Emacs" option on
+             ;; the File menu.
+             (global-set-key "\C-x\C-c" nil)
+
+             ;; Uncomment this to enable "sticky modifier keys" in 19.13
+             ;; and up.  With sticky modifier keys enabled, you can
+             ;; press and release a modifier key before pressing the
+             ;; key to be modified, like how the ESC key works always.
+             ;; If you hold the modifier key down, however, you still
+             ;; get the standard behavior.  I personally think this
+             ;; is the best thing since sliced bread (and a *major*
+             ;; win when it comes to reducing Emacs pinky), but it's
+             ;; disorienting at first so I'm not enabling it here by
+             ;; default.
+
+             ;;(setq modifier-keys-are-sticky t)
+
+             ;; This changes the variable which controls the text that goes
+             ;; in the top window title bar.  (However, it is not changed
+             ;; unless it currently has the default value, to avoid
+             ;; interfering with a -wn command line argument I may have
+             ;; started emacs with.)
+             (if (equal frame-title-format "%S: %b")
+                 (setq frame-title-format
+                       (concat "%S: " invocation-directory invocation-name
+                               " [" emacs-version "]"
+                               (if nil ; (getenv "NCD")
+                                   ""
+                                 "   %b"))))
+
+             ;; If we're running on display 0, load some nifty sounds that
+             ;; will replace the default beep.  But if we're running on a
+             ;; display other than 0, which probably means my NCD X terminal,
+             ;; which can't play digitized sounds, do two things: reduce the
+             ;; beep volume a bit, and change the pitch of the sound that is
+             ;; made for "no completions."
+             ;;
+             ;; (Note that sampled sounds only work if XEmacs was compiled
+             ;; with sound support, and we're running on the console of a
+             ;; Sparc, HP, or SGI machine, or on a machine which has a
+             ;; NetAudio server; otherwise, you just get the standard beep.)
+             ;;
+             ;; (Note further that changing the pitch and duration of the
+             ;; standard beep only works with some X servers; many servers
+             ;; completely ignore those parameters.)
+             ;;
+             (cond ((string-match ":0" (getenv "DISPLAY"))
+                    (load-default-sounds))
+                   (t
+                    (setq bell-volume 40)
+                    (setq sound-alist
+                          (append sound-alist '((no-completion :pitch 500))))
+                    ))
+
+             ;; Make `C-x C-m' and `C-x RET' be different (since I tend
+             ;; to type the latter by accident sometimes.)
+             (define-key global-map [(control x) return] nil)
+
+             ;; Change the pointer used when the mouse is over a modeline
+             (set-glyph-image modeline-pointer-glyph "leftbutton")
+
+             ;; Change the continuation glyph face so it stands out more
+             (and (fboundp 'set-glyph-property)
+                  (boundp 'continuation-glyph)
+                  (set-glyph-property continuation-glyph 'face 'bold))
+
+             ;; Change the pointer used during garbage collection.
+             ;;
+             ;; Note that this pointer image is rather large as pointers go,
+             ;; and so it won't work on some X servers (such as the MIT
+             ;; R5 Sun server) because servers may have lamentably small
+             ;; upper limits on pointer size.
+             ;;(if (featurep 'xpm)
+             ;;   (set-glyph-image gc-pointer-glyph
+             ;;         (expand-file-name "trash.xpm" data-directory)))
+
+             ;; Here's another way to do that: it first tries to load the
+             ;; pointer once and traps the error, just to see if it's
+             ;; possible to load that pointer on this system; if it is,
+             ;; then it sets gc-pointer-glyph, because we know that
+             ;; will work.  Otherwise, it doesn't change that variable
+             ;; because we know it will just cause some error messages.
+             (if (featurep 'xpm)
+                 (let ((file (expand-file-name "recycle.xpm" data-directory)))
+                   (if (condition-case error
+                           ;; check to make sure we can use the pointer.
+                           (make-image-instance file nil
+                                                '(pointer))
+                         (error nil))      ; returns nil if an error occurred.
+                       (set-glyph-image gc-pointer-glyph file))))
+
+             (when (featurep 'menubar)
+               ;; Add `dired' to the File menu
+               (add-menu-button '("File") ["Edit Directory" dired t])
+
+               ;; Here's a way to add scrollbar-like buttons to the menubar
+               (add-menu-button nil ["Top" beginning-of-buffer t])
+               (add-menu-button nil ["<<<" scroll-down         t])
+               (add-menu-button nil [" . " recenter            t])
+               (add-menu-button nil [">>>" scroll-up           t])
+               (add-menu-button nil ["Bot" end-of-buffer       t]))
+
+             ;; Change the behavior of mouse button 2 (which is normally
+             ;; bound to `mouse-yank'), so that it inserts the selected text
+             ;; at point (where the text cursor is), instead of at the
+             ;; position clicked.
+             ;;
+             ;; Note that you can find out what a particular key sequence or
+             ;; mouse button does by using the "Describe Key..." option on
+             ;; the Help menu.
+             (setq mouse-yank-at-point t)
+
+             ;; When editing C code (and Lisp code and the like), I often
+             ;; like to insert tabs into comments and such.  It gets to be
+             ;; a pain to always have to use `C-q TAB', so I set up a more
+             ;; convenient binding.  Note that this does not work in
+             ;; TTY frames, where tab and shift-tab are indistinguishable.
+             (define-key global-map '(shift tab) 'self-insert-command)
+
+             ;; LISPM bindings of Control-Shift-C and Control-Shift-E.
+             ;; Note that "\C-C" means Control-C, not Control-Shift-C.
+             ;; To specify shifted control characters, you must use the
+             ;; more verbose syntax used here.
+             (define-key emacs-lisp-mode-map '(control C) 'compile-defun)
+             (define-key emacs-lisp-mode-map '(control E) 'eval-defun)
+
+             ;; If you like the FSF Emacs binding of button3 (single-click
+             ;; extends the selection, double-click kills the selection),
+             ;; uncomment the following:
+
+             ;; Under 19.13, the following is enough:
+              ;(define-key global-map 'button3 'mouse-track-adjust)
+
+             ;; But under 19.12, you need this:
+              ;(define-key global-map 'button3
+              ;    (lambda (event)
+              ;      (interactive "e")
+              ;      (let ((default-mouse-track-adjust t))
+              ;        (mouse-track event))))
+
+             ;; Under both 19.12 and 19.13, you also need this:
+              ;(add-hook 'mouse-track-click-hook
+              ;          (lambda (event count)
+              ;            (if (or (/= (event-button event) 3)
+              ;                    (/= count 2))
+              ;                nil ;; do the normal operation
+              ;              (kill-region (point) (mark))
+              ;              t ;; don't do the normal operations.
+              ;              )))
+
+             ))
+
+       ))
+
+;; Oh, and here's a cute hack you might want to put in the sample .emacs
+;; file: it changes the color of the window if it's not on the local
+;; machine, or if it's running as root:
+
+;; local emacs background:  whitesmoke
+;; remote emacs background: palegreen1
+;; root emacs background:   coral2
+(cond
+ ((and (string-match "XEmacs" emacs-version)
+       (eq window-system 'x)
+       (boundp 'emacs-major-version)
+       (= emacs-major-version 19)
+       (>= emacs-minor-version 12))
+  (let* ((root-p (eq 0 (user-uid)))
+        (dpy (or (getenv "DISPLAY") ""))
+        (remote-p (not
+                   (or (string-match "^\\(\\|unix\\|localhost\\):" dpy)
+                       (let ((s (system-name)))
+                         (if (string-match "\\.\\(netscape\\|mcom\\)\\.com" s)
+                             (setq s (substring s 0 (match-beginning 0))))
+                         (string-match (concat "^" (regexp-quote s)) dpy)))))
+        (bg (cond (root-p "coral2")
+                  (remote-p "palegreen1")
+                  (t nil))))
+    (cond (bg
+          (let ((def (color-name (face-background 'default)))
+                (faces (face-list)))
+            (while faces
+              (let ((obg (face-background (car faces))))
+                (if (and obg (equal def (color-name obg)))
+                    (set-face-background (car faces) bg)))
+              (setq faces (cdr faces)))))))))
+
+
+;;; Older versions of emacs did not have these variables
+;;; (emacs-major-version and emacs-minor-version.)
+;;; Let's define them if they're not around, since they make
+;;; it much easier to conditionalize on the emacs version.
+
+(if (and (not (boundp 'emacs-major-version))
+        (string-match "^[0-9]+" emacs-version))
+    (setq emacs-major-version
+         (string-to-int (substring emacs-version
+                                   (match-beginning 0) (match-end 0)))))
+(if (and (not (boundp 'emacs-minor-version))
+        (string-match "^[0-9]+\\.\\([0-9]+\\)" emacs-version))
+    (setq emacs-minor-version
+         (string-to-int (substring emacs-version
+                                   (match-beginning 1) (match-end 1)))))
+
+;;; Define a function to make it easier to check which version we're
+;;; running.
+
+(defun running-emacs-version-or-newer (major minor)
+  (or (> emacs-major-version major)
+      (and (= emacs-major-version major)
+          (>= emacs-minor-version minor))))
+
+(cond ((and running-xemacs
+           (running-emacs-version-or-newer 19 6))
+       ;;
+       ;; Code requiring XEmacs/Lucid Emacs version 19.6 or newer goes here
+       ;;
+       ))
+
+(cond ((>= emacs-major-version 19)
+       ;;
+       ;; Code for any vintage-19 emacs goes here
+       ;;
+       ))
+
+(cond ((and (not running-xemacs)
+           (>= emacs-major-version 19))
+       ;;
+       ;; Code specific to FSF Emacs 19 (not XEmacs/Lucid Emacs) goes here
+       ;;
+       ))
+
+(cond ((< emacs-major-version 19)
+       ;;
+       ;; Code specific to emacs 18 goes here
+       ;;
+       ))
+
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;             Customization of Specific Packages                  ;;
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;; Load gnuserv, which will allow you to connect to XEmacs sessions
+;;; using `gnuclient'.
+
+;; If you never run more than one XEmacs at a time, you might want to
+;; always start gnuserv.  Otherwise it is preferable to specify
+;; `-f gnuserv-start' on the command line to one of the XEmacsen.
+; (gnuserv-start)
+
+
+;;; ********************
+;;; Load efs, which uses the FTP protocol as a pseudo-filesystem.
+;;; When this is loaded, the pathname syntax /user@host:/remote/path
+;;; refers to files accessible through ftp.
+;;;
+(require 'dired)
+;; compatible ange-ftp/efs initialization derived from code
+;; from John Turner <turner@lanl.gov>
+;; As of 19.15, efs is bundled instead of ange-ftp.
+;; NB: doesn't handle 20.0 properly, efs didn't appear until 20.1.
+;;
+;; The environment variable EMAIL_ADDRESS is used as the password
+;; for access to anonymous ftp sites, if it is set.  If not, one is
+;; constructed using the environment variables USER and DOMAINNAME
+;; (e.g. turner@lanl.gov), if set.
+
+(if (and running-xemacs
+        (or (> emacs-major-version 20)
+            (and (= emacs-major-version 20) (>= emacs-minor-version 1))
+            (and (= emacs-major-version 19) (>= emacs-minor-version 15))))
+    (progn
+      (message "Loading and configuring bundled packages... efs")
+      (require 'efs-auto)
+      (if (getenv "USER")
+         (setq efs-default-user (getenv "USER")))
+      (if (getenv "EMAIL_ADDRESS")
+         (setq efs-generate-anonymous-password (getenv "EMAIL_ADDRESS"))
+       (if (and (getenv "USER")
+                (getenv "DOMAINNAME"))
+           (setq efs-generate-anonymous-password
+                 (concat (getenv "USER")"@"(getenv "DOMAINNAME")))))
+      (setq efs-auto-save 1))
+  (progn
+    (message "Loading and configuring bundled packages... ange-ftp")
+    (require 'ange-ftp)
+    (if (getenv "USER")
+       (setq ange-ftp-default-user (getenv "USER")))
+    (if (getenv "EMAIL_ADDRESS")
+       (setq ange-ftp-generate-anonymous-password (getenv "EMAIL_ADDRESS"))
+      (if (and (getenv "USER")
+              (getenv "DOMAINNAME"))
+         (setq ange-ftp-generate-anonymous-password
+               (concat (getenv "USER")"@"(getenv "DOMAINNAME")))))
+    (setq ange-ftp-auto-save 1)
+    )
+  )
+
+;;; ********************
+;;; Load the default-dir.el package which installs fancy handling
+;;;  of the initial contents in the minibuffer when reading
+;;; file names.
+
+(if (and running-xemacs
+        (or (and (= emacs-major-version 20) (>= emacs-minor-version 1))
+            (and (= emacs-major-version 19) (>= emacs-minor-version 15))))
+    (require 'default-dir))
+
+;;; ********************
+;;; Load the auto-save.el package, which lets you put all of your autosave
+;;; files in one place, instead of scattering them around the file system.
+;;;
+(setq auto-save-directory (expand-file-name "~/autosave/")
+      auto-save-directory-fallback auto-save-directory
+      auto-save-hash-p nil
+      efs-auto-save t
+      efs-auto-save-remotely nil
+      ;; now that we have auto-save-timeout, let's crank this up
+      ;; for better interactive response.
+      auto-save-interval 2000
+      )
+;; We load this afterwards because it checks to make sure the
+;; auto-save-directory exists (creating it if not) when it's loaded.
+(require 'auto-save)
+
+;; This adds additional extensions which indicate files normally
+;; handled by cc-mode.
+(setq auto-mode-alist
+      (append '(("\\.C$"  . c++-mode)
+               ("\\.cc$" . c++-mode)
+               ("\\.hh$" . c++-mode)
+               ("\\.c$"  . c-mode)
+               ("\\.h$"  . c-mode))
+             auto-mode-alist))
+
+
+;;; ********************
+;;; cc-mode (the mode you're in when editing C, C++, and Objective C files)
+
+;; Tell cc-mode not to check for old-style (K&R) function declarations.
+;; This speeds up indenting a lot.
+(setq c-recognize-knr-p nil)
+
+;; Change the indentation amount to 4 spaces instead of 2.
+;; You have to do it in this complicated way because of the
+;; strange way the cc-mode initializes the value of `c-basic-offset'.
+(add-hook 'c-mode-hook (lambda () (setq c-basic-offset 4)))
+
+
+;;; ********************
+;;; Load a partial-completion mechanism, which makes minibuffer completion
+;;; search multiple words instead of just prefixes; for example, the command
+;;; `M-x byte-compile-and-load-file RET' can be abbreviated as `M-x b-c-a RET'
+;;; because there are no other commands whose first three words begin with
+;;; the letters `b', `c', and `a' respectively.
+;;;
+(load-library "completer")
+
+
+;;; ********************
+;;; Load crypt, which is a package for automatically decoding and reencoding
+;;; files by various methods - for example, you can visit a .Z or .gz file,
+;;; edit it, and have it automatically re-compressed when you save it again.
+;;; 
+(setq crypt-encryption-type 'pgp   ; default encryption mechanism
+      crypt-confirm-password t    ; make sure new passwords are correct
+      ;crypt-never-ever-decrypt t  ; if you don't encrypt anything, set this to
+                                  ; tell it not to assume that "binary" files
+                                  ; are encrypted and require a password.
+      )
+(require 'crypt)
+
+
+;;; ********************
+;;; Edebug is a source-level debugger for emacs-lisp programs.
+;;;
+(define-key emacs-lisp-mode-map "\C-xx" 'edebug-defun)
+
+
+;;; ********************
+;;; Font-Lock is a syntax-highlighting package.  When it is enabled and you
+;;; are editing a program, different parts of your program will appear in
+;;; different fonts or colors.  For example, with the code below, comments
+;;; appear in red italics, function names in function definitions appear in
+;;; blue bold, etc.  The code below will cause font-lock to automatically be
+;;; enabled when you edit C, C++, Emacs-Lisp, and many other kinds of
+;;; programs.
+;;;
+;;; The "Options" menu has some commands for controlling this as well.
+;;;
+(cond (running-xemacs
+
+       ;; If you want the default colors, you could do this:
+       ;; (setq font-lock-use-default-fonts nil)
+       ;; (setq font-lock-use-default-colors t)
+       ;; but I want to specify my own colors, so I turn off all
+       ;; default values.
+       (setq font-lock-use-default-fonts nil)
+       (setq font-lock-use-default-colors nil)
+
+       (require 'font-lock)
+
+       ;; Mess around with the faces a bit.  Note that you have
+       ;; to change the font-lock-use-default-* variables *before*
+       ;; loading font-lock, and wait till *after* loading font-lock
+       ;; to customize the faces.
+
+       ;; string face is green
+       (set-face-foreground 'font-lock-string-face "forest green")
+
+       ;; comments are italic and red; doc strings are italic
+       ;;
+       ;; (I use copy-face instead of make-face-italic/make-face-bold
+       ;; because the startup code does intelligent things to the
+       ;; 'italic and 'bold faces to ensure that they are different
+       ;; from the default face.  For example, if the default face
+       ;; is bold, then the 'bold face will be unbold.)
+       (copy-face 'italic 'font-lock-comment-face)
+       ;; Underlining comments looks terrible on tty's
+       (set-face-underline-p 'font-lock-comment-face nil 'global 'tty)
+       (set-face-highlight-p 'font-lock-comment-face t 'global 'tty)
+       (copy-face 'font-lock-comment-face 'font-lock-doc-string-face)
+       (set-face-foreground 'font-lock-comment-face "red")
+
+       ;; function names are bold and blue
+       (copy-face 'bold 'font-lock-function-name-face)
+       (set-face-foreground 'font-lock-function-name-face "blue")
+
+       ;; misc. faces
+       (and (find-face 'font-lock-preprocessor-face) ; 19.13 and above
+            (copy-face 'bold 'font-lock-preprocessor-face))
+       (copy-face 'italic 'font-lock-type-face)
+       (copy-face 'bold 'font-lock-keyword-face)
+       ))
+
+
+;;; ********************
+;;; fast-lock is a package which speeds up the highlighting of files
+;;; by saving information about a font-locked buffer to a file and
+;;; loading that information when the file is loaded again.  This
+;;; requires a little extra disk space be used.
+;;;
+;;; Normally fast-lock puts the cache file (the filename appended with
+;;; .flc) in the same directory as the file it caches.  You can
+;;; specify an alternate directory to use by setting the variable
+;;; fast-lock-cache-directories.
+
+;; Let's use lazy-lock instead.
+;;(add-hook 'font-lock-mode-hook 'turn-on-fast-lock)
+;;(setq fast-lock-cache-directories '("/foo/bar/baz"))
+
+
+;;; ********************
+;;; lazy-lock is a package which speeds up the highlighting of files
+;;; by doing it "on-the-fly" -- only the visible portion of the
+;;; buffer is fontified.  The results may not always be quite as
+;;; accurate as using full font-lock or fast-lock, but it's *much*
+;;; faster.  No more annoying pauses when you load files.
+
+(add-hook 'font-lock-mode-hook 'turn-on-lazy-lock)
+;; I personally don't like "stealth mode" (where lazy-lock starts
+;; fontifying in the background if you're idle for 30 seconds)
+;; because it takes too long to wake up again on my piddly Sparc 1+.
+(setq lazy-lock-stealth-time nil)
+
+
+;;; ********************
+;;; func-menu is a package that scans your source file for function
+;;; definitions and makes a menubar entry that lets you jump to any
+;;; particular function definition by selecting it from the menu.  The
+;;; following code turns this on for all of the recognized languages.
+;;; Scanning the buffer takes some time, but not much.
+;;;
+;;; Send bug reports, enhancements etc to:
+;;; David Hughes <ukchugd@ukpmr.cs.philips.nl>
+;;;
+(cond (running-xemacs
+       (require 'func-menu)
+       (define-key global-map 'f8 'function-menu)
+       (add-hook 'find-file-hooks 'fume-add-menubar-entry)
+       (define-key global-map "\C-cl" 'fume-list-functions)
+       (define-key global-map "\C-cg" 'fume-prompt-function-goto)
+
+       ;; The Hyperbole information manager package uses (shift button2) and
+       ;; (shift button3) to provide context-sensitive mouse keys.  If you
+       ;; use this next binding, it will conflict with Hyperbole's setup.
+       ;; Choose another mouse key if you use Hyperbole.
+       (define-key global-map '(shift button3) 'mouse-function-menu)
+
+       ;; For descriptions of the following user-customizable variables,
+       ;; type C-h v <variable>
+       (setq fume-max-items 25
+             fume-fn-window-position 3
+             fume-auto-position-popup t
+             fume-display-in-modeline-p t
+             fume-menubar-menu-location "File"
+             fume-buffer-name "*Function List*"
+             fume-no-prompt-on-valid-default nil)
+       ))
+
+
+;;; ********************
+;;; MH is a mail-reading system from the Rand Corporation that relies on a
+;;; number of external filter programs (which do not come with emacs.)
+;;; Emacs provides a nice front-end onto MH, called "mh-e".
+;;;
+;; Bindings that let you send or read mail using MH
+;(global-set-key "\C-xm"  'mh-smail)
+;(global-set-key "\C-x4m" 'mh-smail-other-window)
+;(global-set-key "\C-cr"  'mh-rmail)
+
+;; Customization of MH behavior.
+(setq mh-delete-yanked-msg-window t)
+(setq mh-yank-from-start-of-msg 'body)
+(setq mh-summary-height 11)
+
+;; Use lines like the following if your version of MH
+;; is in a special place.
+;(setq mh-progs "/usr/dist/pkgs/mh/bin.svr4/")
+;(setq mh-lib "/usr/dist/pkgs/mh/lib.svr4/")
+
+
+;;; ********************
+;;; resize-minibuffer-mode makes the minibuffer automatically
+;;; resize as necessary when it's too big to hold its contents.
+
+(autoload 'resize-minibuffer-mode "rsz-minibuf" nil t)
+(resize-minibuffer-mode)
+(setq resize-minibuffer-window-exactly nil)
+
+;;; ********************
+;;; W3 is a browser for the World Wide Web, and takes advantage of the very
+;;; latest redisplay features in XEmacs.  You can access it simply by typing 
+;;; 'M-x w3'; however, if you're unlucky enough to be on a machine that is 
+;;; behind a firewall, you will have to do something like this first:
+
+;(setq w3-use-telnet t
+;      ;;
+;      ;; If the Telnet program you use to access the outside world is
+;      ;; not called "telnet", specify its name like this.
+;      w3-telnet-prog "itelnet"
+;      ;;
+;      ;; If your Telnet program adds lines of junk at the beginning
+;      ;; of the session, specify the number of lines here.
+;      w3-telnet-header-length 4
+;      )
diff --git a/etc/sink.xbm b/etc/sink.xbm
new file mode 100644 (file)
index 0000000..9866aae
--- /dev/null
@@ -0,0 +1,33 @@
+#define kitchen_sink_width 50
+#define kitchen_sink_height 50
+static unsigned char kitchen_sink_bits[] = {
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x01, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x0e,
+   0x00, 0x00, 0x0c, 0x00, 0x70, 0x00, 0x1e, 0x00, 0x00, 0x06, 0xc0, 0xdd,
+   0x01, 0x34, 0x00, 0x00, 0x07, 0x3c, 0x07, 0x03, 0x34, 0x00, 0x80, 0x03,
+   0x1f, 0x06, 0x06, 0x24, 0x00, 0x80, 0x03, 0x0f, 0x04, 0x0c, 0x26, 0x00,
+   0xc0, 0x81, 0x07, 0x00, 0x08, 0x33, 0x00, 0x60, 0xc1, 0xe3, 0x80, 0xbb,
+   0x31, 0x00, 0x30, 0xe1, 0x33, 0xfe, 0xff, 0x18, 0x00, 0x10, 0xf1, 0x31,
+   0xc7, 0xe3, 0x1f, 0x00, 0x10, 0xf1, 0xd8, 0x01, 0x05, 0x3c, 0x00, 0x10,
+   0x83, 0x6c, 0x00, 0x1a, 0x40, 0x00, 0x10, 0x66, 0x36, 0x54, 0xd5, 0xff,
+   0x00, 0x30, 0x3c, 0xdb, 0xab, 0x3a, 0x2a, 0x00, 0x60, 0x80, 0xe9, 0x54,
+   0x35, 0x00, 0x00, 0xe0, 0xe0, 0x6c, 0xb9, 0x6a, 0x00, 0x00, 0x80, 0x37,
+   0xb6, 0x66, 0x75, 0x00, 0x00, 0x00, 0x0f, 0xb6, 0xb4, 0x6a, 0x00, 0x00,
+   0x00, 0x06, 0xb3, 0x77, 0x75, 0x00, 0x00, 0x00, 0xe1, 0x19, 0xa7, 0x6a,
+   0x00, 0x00, 0xc0, 0xff, 0x19, 0x48, 0xf5, 0x00, 0x00, 0x40, 0x75, 0x15,
+   0xaf, 0xea, 0x00, 0x00, 0x00, 0x70, 0x35, 0x66, 0xd5, 0x00, 0x00, 0x00,
+   0x58, 0x6a, 0x80, 0xea, 0x00, 0x00, 0x00, 0xdc, 0xaa, 0x80, 0xd5, 0x01,
+   0x00, 0x00, 0x9c, 0x27, 0x03, 0xeb, 0x01, 0x00, 0x00, 0xbc, 0x65, 0x04,
+   0xd4, 0x01, 0x00, 0x00, 0x3c, 0x55, 0xed, 0x6b, 0x03, 0x00, 0x00, 0x3e,
+   0xcd, 0x2a, 0x3e, 0x02, 0x00, 0x00, 0x7e, 0xb9, 0x2a, 0xb8, 0x03, 0x00,
+   0x00, 0x7c, 0x93, 0x3d, 0x91, 0x03, 0x00, 0x00, 0x7c, 0x76, 0x77, 0x96,
+   0x01, 0x00, 0x00, 0xf8, 0x6d, 0xf6, 0xc4, 0x01, 0x00, 0x00, 0xf8, 0xdd,
+   0xfe, 0xc3, 0x01, 0x00, 0x00, 0xf0, 0xb1, 0xfd, 0xfc, 0x01, 0x00, 0x00,
+   0xd0, 0x2f, 0xe7, 0xc1, 0x00, 0x00, 0x00, 0xc0, 0x4f, 0xe6, 0x61, 0x00,
+   0x00, 0x00, 0x80, 0xff, 0xf6, 0x7f, 0x00, 0x00, 0x00, 0x80, 0xfe, 0x1c,
+   0x3e, 0x00, 0x00, 0x00, 0x00, 0xfa, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0xf8, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa0, 0x02, 0x00, 0x00, 0x00,
+   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+   0x00, 0x00};
diff --git a/etc/sparcworks/SW.Editor.xpm b/etc/sparcworks/SW.Editor.xpm
new file mode 100644 (file)
index 0000000..fb2ba7c
--- /dev/null
@@ -0,0 +1,88 @@
+/* XPM */
+static char *noname[] = {
+/* width height ncolors chars_per_pixel */
+"64 64 17 1",
+/* colors */
+"` c #ABABAB",
+"a c #C34C4C",
+"b c #DBB794",
+"c c #94DBB7",
+"d c #DBFFEE",
+"e c #A0A0A0",
+"f c #BAEADA",
+"g c #888888",
+"h c #7C7C7C",
+"i c #FFFFB7",
+"j c #DB9494",
+"k c #FFB7B7",
+"l c #FFFFFF",
+"m c #4C4C4C",
+"n c #F3F3F3",
+"o c #DBDBDB",
+"p c #CFCFCF",
+/* pixels */
+"mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm",
+"mlllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllom",
+"mlnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnpm",
+"mloooooooooooooooooooooooooooooooooooooooooooooooooooooooooooopm",
+"mlllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllom",
+"mlnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnpm",
+"mloooooooooooooooooooooooooooooooooooooooooooooooooooooooooooopm",
+"mlllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllom",
+"mlnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnpm",
+"mloooooooooooooooooooooooooooooooooooooooooooooooooooooooooooopm",
+"mlllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllom",
+"mlnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnpm",
+"mloooooooooooooooooooooooooooooooooooooooooooooooooooooooooooopm",
+"mllllllllllllllll````````````````````````````````lllllllllllllom",
+"mlnnnnnnnnnnnnnnn`oooooooooooooooooooooooooooooolnnnnnnnnnnnnnpm",
+"mlooooooooooooooo`oooooooooooooooooooooooooooooolooooooooooooopm",
+"mllllllllllllllll`oooooooooooooooooooooooooooooollllllllllllllom",
+"mlnnnnnnnnnnnnnnn`ooooooooooooooooooooooommmoooolnnnnnnnnnnnnnpm",
+"mlooooooooooooooo`ooogggggggggggggggoooomkkjmooolooooooooooooopm",
+"mllllllllllllllll`oooglllllllllllllgmooomkkjmooollllllllllllllom",
+"mlnnnnnnnnnnnnnnn`oooglllllllllllllglmommkjmmooolnnnnnnnnnnnnnpm",
+"mlooooooooooooooo`ooogllmmmlmmmllllgllmmimmmeeoolooooooooooooopm",
+"mllllllllllllllll`oooglllllllllllllmmmmiiibmeeoollllllllllllllom",
+"mlnnnnnnnnnnnnnnn`ooogllmmmmmlllllllllmiibmeeooolnnnnnnnnnnnnnpm",
+"mlooooooooooooooo`oooglllllllllllllllmiiibmeeooolooooooooooooopm",
+"mllllllllllllllll`ooogllllmmmmmmmmlllmiibmeeoooollllllllllllllom",
+"mlnnnnnnnnnnnnnnn`ooogllllllllllllllmiiibmeeoooolnnnnnnnnnnnnnpm",
+"mlooooooooooooooo`oooglllllllmmmmlmmmiibmeeooooolooooooooooooopm",
+"mllllllllllllllll`ooogllllllllllllllmiibmeeooooollllllllllllllom",
+"mlnnnnnnnnnnnnnnn`oooglllmmmmlmmmmllmmimeeoooooolnnnnnnnnnnnnnpm",
+"mlooooooooooooooo`oooglllllaaaaaaallmmmmeooooooolooooooooooooopm",
+"mllllllllllllllll`oooglllaammmmmmmllmmemoooooooollllllllllllllom",
+"mlnnnnnnnnnnnnnnn`oooglllalllllllllameemoooooooolnnnnnnnnnnnnnpm",
+"mlooooooooooooooo`oooglllaallmmmmmaahllmoooooooolooooooooooooopm",
+"mllllllllllllllll`oooglllllaaaaaaalllllmoooooooollllllllllllllom",
+"mlnnnnnnnnnnnnnnn`ooogllllmmlmmmmmlllllmoooooooolnnnnnnnnnnnnnpm",
+"mlooooooooooooooo`oooglllllllllllllllllmoooooooolooooooooooooopm",
+"mllllllllllllllll`oooglllmmmlllllllllllmoooooooollllllllllllllom",
+"mlnnnnnnnnnnnnnnn`oooglllllllllllllllllmoooooooolnnnnnnnnnnnnnpm",
+"mlooooooooooooooo`oooglllllllllllllllllmoooooooolooooooooooooopm",
+"mllllllllllllllll`ooommmmmmmmmmmmmmmmmmmoooooooollllllllllllllom",
+"mlnnnnnnnnnnnnnnn`oooooooooooooooooooooooooooooolnnnnnnnnnnnnnpm",
+"mlooooooooooooooo`oooooooooooooooooooooooooooooolooooooooooooopm",
+"mllllllllllllllll`oooooooooooooooooooooooooooooollllllllllllllom",
+"mlnnnnnnnnnnnnnnn`lllllllllllllllllllllllllllllllnnnnnnnnnnnnnpm",
+"mloooooooooooooooooooooooooooooooooooooooooooooooooooooooooooopm",
+"mlllllllllllllllllllllllllllllllllllllllllllllllllllllllllllllom",
+"mdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcm",
+"mdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcm",
+"mdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcm",
+"mdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcm",
+"mdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcm",
+"mdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcm",
+"mdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcm",
+"mdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcm",
+"mdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcm",
+"mdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcm",
+"mdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcm",
+"mdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcm",
+"mdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcm",
+"mdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcm",
+"mdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffcm",
+"mfcccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccm",
+"mmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm"
+};
diff --git a/etc/sparcworks/sunpro-mailcap b/etc/sparcworks/sunpro-mailcap
new file mode 100644 (file)
index 0000000..1208408
--- /dev/null
@@ -0,0 +1 @@
+application/postscript; pageview %s; needsx11
diff --git a/etc/tests/external-widget/Makefile b/etc/tests/external-widget/Makefile
new file mode 100644 (file)
index 0000000..0692ed9
--- /dev/null
@@ -0,0 +1,30 @@
+CFLAGS += -Xc -g -DTOOLTALK
+EMACSHOME = ../../..
+EMACSLIBDIR = $(EMACSHOME)/editor/src
+EMACSINCLUDEDIR = $(EMACSHOME)/editor/src
+MOTIFHOME = /opt/SUNWmotif
+
+CPPFLAGS += -I$(OPENWINHOME)/include
+LDFLAGS +=  -L$(OPENWINHOME)/lib -R$(OPENWINHOME)/lib
+
+CPPFLAGS += -I$(MOTIFHOME)/include
+LDFLAGS += -L$(MOTIFHOME)/lib -R$(MOTIFHOME)/lib
+
+CPPFLAGS += -I$(EMACSINCLUDEDIR)
+LDFLAGS += -L$(EMACSLIBDIR)
+
+LDFLAGS += -R$(OPENWINHOME)/lib:$(EMACSLIBDIR) -g
+
+TM_OBJS = test-ew-motif.o
+TXL_OBJS = test-ew-xlib.o
+MOTIF_LIBS = -Bstatic -lextcli_Xm -Bdynamic -lXm -lXt -ltt -lX11 -lgen -lm 
+XLIB_LIBS = -Bstatic -lextcli_Xlib -Bdynamic -ltt -lX11 -lgen -lm 
+
+all: test-ew-motif
+
+test-ew-motif: $(TM_OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(TM_OBJS) $(MOTIF_LIBS)
+
+test-ew-xlib: $(TXL_OBJS)
+       $(CC) -o $@ $(LDFLAGS) $(TXL_OBJS) $(XLIB_LIBS)
+
diff --git a/etc/tests/external-widget/test-ew-motif.c b/etc/tests/external-widget/test-ew-motif.c
new file mode 100644 (file)
index 0000000..7cbc064
--- /dev/null
@@ -0,0 +1,145 @@
+#include <Xm/Xm.h>
+#include <Xm/RowColumn.h>
+#include <Xm/Scale.h>
+#include <Xm/PushB.h>
+#include <Xm/Label.h>
+#include <Xm/Text.h>
+#include <Xm/PanedW.h>
+#include "ExternalClient.h"
+
+#ifdef TOOLTALK
+#include <desktop/tt_c.h>
+char *HxProcID;
+#endif
+
+XtAppContext xt_app_con;
+
+void ScaleValueChangedCB(Widget scale, XtPointer app_data, XtPointer widget_data)
+{
+    XmScaleCallbackStruct *xms = (XmScaleCallbackStruct *) widget_data;
+    Widget label = (Widget) app_data;
+    char labelarr[10];
+    XmString labelstr;
+#if 0
+    sprintf(labelarr, "%d", xms->value);
+    labelstr = XmStringCreateLocalized(labelarr);
+    XtVaSetValues(label, XmNlabelString, labelstr, NULL);
+    XmStringFree(labelstr);
+#endif
+}
+
+#ifdef TOOLTALK
+static void
+handle_tt_input(XtPointer client_data, int *source, XtInputId *id)
+{
+  Tt_message m = tt_message_receive();
+
+  if (m && !(tt_ptr_error(m))) {
+    tt_message_destroy(m);
+  }
+}
+
+Tt_status
+HxInitializeToolTalk()
+{
+  static Boolean initialized = FALSE;
+
+  if (!initialized) {
+    int fd;
+    Tt_status status;
+
+    HxProcID = tt_open();
+    fd = tt_fd();
+    if (TT_OK != (status = tt_session_join( tt_default_session() )))
+      return status;
+    (void)XtAppAddInput(xt_app_con, fd, (void *)XtInputReadMask, handle_tt_input, NULL);
+    initialized = TRUE;
+  }
+
+  return TT_OK;
+}
+#endif
+
+main(int argc, char **argv)
+{
+    Widget shell, rowcolumn, scale, pushbutton, label1, label2, text;
+    Widget paned, text2;
+    int n, i;
+    Widget widlist[100];
+    Widget emacscli[100];
+    Arg args[100];
+    int no_ews = 1;
+    char buf[100];
+
+    if (argc > 1)
+      no_ews = atoi (argv[1]);
+
+    shell = XtAppInitialize(&xt_app_con, "Testmotif", NULL, 0,
+       &argc, argv, NULL, NULL, 0);
+
+#ifdef TOOLTALK
+    HxInitializeToolTalk();
+#endif
+
+    rowcolumn = XmCreateRowColumn(shell, "rowcolumn", NULL, 0);
+    XtManageChild(rowcolumn);
+
+    n = 0;
+    XtSetArg(args[n], XmNtraversalOn, TRUE); n++;
+#if 0
+    label1 = XmCreateLabel(rowcolumn, "label1", args, n);
+#endif
+    label1 = XtVaCreateWidget("label1", xmLabelWidgetClass, rowcolumn,
+                             XmNwidth, 50, XmNheight, 30,
+                             XmNtraversalOn, TRUE, NULL);
+    label2 = XmCreateLabel(rowcolumn, "label2", NULL, 0);
+    scale = XmCreateScale(rowcolumn, "scale", NULL, 0);
+    XtAddCallback(scale, XmNvalueChangedCallback, ScaleValueChangedCB, label1);
+    paned = XmCreatePanedWindow(rowcolumn, "paned", NULL, 0);
+    n = 0;
+    widlist[n++] = label1;
+    widlist[n++] = label2;
+    widlist[n++] = scale;
+    widlist[n++] = paned;
+    XtManageChildren(widlist, n);
+
+    pushbutton = XmCreatePushButton(paned, "pushbutton", NULL, 0);
+    text = XmCreateText(paned, "text", NULL, 0);
+    for (i=0; i<no_ews; i++) {
+      sprintf (buf, "extcli%d", i);
+      emacscli[i] = XtVaCreateWidget(buf, externalClientWidgetClass, paned,
+                                    XmNwidth, 500, XmNheight, 200,
+                                    XmNtraversalOn, TRUE,
+#ifdef TOOLTALK
+                                    XtNuseToolTalk, TRUE,
+#endif
+                                    NULL);
+    }
+    text2 = XmCreateText(paned, "text2", NULL, 0);
+    n = 0;
+    widlist[n++] = pushbutton;
+    widlist[n++] = text;
+    for (i=0; i<no_ews; i++)
+      widlist[n++] = emacscli[i];
+    widlist[n++] = text2;
+    XtManageChildren(widlist, n);
+
+    XtRealizeWidget(shell);
+
+    {
+      XmString lab;
+      char labarr[1000];
+      char tmpbuf[50];
+      
+      strcpy (labarr, "window:");
+      for (i=0; i<no_ews; i++) {
+       sprintf (tmpbuf, " %d", XtWindow(emacscli[i]));
+       strcat (labarr, tmpbuf);
+      }
+      lab = XmStringCreateLocalized(labarr);
+      XtVaSetValues(label2, XmNlabelString, lab, NULL);
+      XmStringFree(lab);
+    }
+    
+    XtAppMainLoop(xt_app_con);
+}
diff --git a/etc/tests/external-widget/test-ew-xlib.c b/etc/tests/external-widget/test-ew-xlib.c
new file mode 100644 (file)
index 0000000..677f4d2
--- /dev/null
@@ -0,0 +1,361 @@
+/*
+ * Copyright 1989 O'Reilly and Associates, Inc.
+ * See ../Copyright for complete rights and liability information.
+ */
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/Xos.h>
+#include <X11/Xatom.h>
+
+#include <stdio.h>
+
+#define BITMAPDEPTH 1
+#define TOO_SMALL 0
+#define BIG_ENOUGH 1
+
+/* These are used as arguments to nearly every Xlib routine, so it saves 
+ * routine arguments to declare them global.  If there were 
+ * additional source files, they would be declared extern there. */
+Display *display;
+int screen_num;
+
+static char *progname; /* name this program was invoked by */
+
+void main(argc, argv)
+int argc;
+char **argv;
+{
+       Window topwin, win, win2;
+       unsigned int width, height;     /* window size */
+       int x, y;       /* window position */
+       unsigned int border_width = 4;  /* four pixels */
+       unsigned int display_width, display_height;
+       char *window_name = "Basic Window Program";
+       char *icon_name = "basicwin";
+       XSizeHints size_hints;
+       int count;
+       XEvent report;
+       GC gc;
+       XFontStruct *font_info;
+       char *display_name = NULL;
+       int window_size = BIG_ENOUGH;   /* or TOO_SMALL to display contents */
+
+       progname = argv[0];
+
+       /* connect to X server */
+       if ( (display=XOpenDisplay(display_name)) == NULL )
+       {
+               (void) fprintf( stderr, "%s: cannot connect to X server %s\n", 
+                               progname, XDisplayName(display_name));
+               exit( -1 );
+       }
+
+       /* get screen size from display structure macro */
+       screen_num = DefaultScreen(display);
+       display_width = DisplayWidth(display, screen_num);
+       display_height = DisplayHeight(display, screen_num);
+
+       /* Note that in a real application, x and y would default to 0
+        * but would be settable from the command line or resource database.  
+        */
+       x = y = 0;
+
+       /* size window with enough room for text */
+       width = display_width/2, height = display_height/3;
+
+        /* ------------------------------------------------------------ */
+
+       /* create top-level window */
+       topwin = XCreateSimpleWindow(display, RootWindow(display,screen_num), 
+                       x, y, width, 2*height, border_width,
+                       BlackPixel(display, screen_num),
+                       WhitePixel(display,screen_num));
+
+       /* Set size hints for window manager.  The window manager may
+        * override these settings.  Note that in a real
+        * application if size or position were set by the user
+        * the flags would be UPosition and USize, and these would
+        * override the window manager's preferences for this window. */
+
+       /* x, y, width, and height hints are now taken from
+        * the actual settings of the window when mapped. Note
+        * that PPosition and PSize must be specified anyway. */
+
+       size_hints.flags = PPosition | PSize | PMinSize;
+       size_hints.min_width = 300;
+       size_hints.min_height = 200;
+
+       {
+       XWMHints wm_hints;
+       XClassHint class_hints;
+
+       /* format of the window name and icon name 
+        * arguments has changed in R4 */
+       XTextProperty windowName, iconName;
+
+       /* These calls store window_name and icon_name into
+        * XTextProperty structures and set their other 
+        * fields properly. */
+       if (XStringListToTextProperty(&window_name, 1, &windowName) == 0) {
+               (void) fprintf( stderr, "%s: structure allocation for windowName failed.\n", 
+                               progname);
+               exit(-1);
+       }
+               
+       if (XStringListToTextProperty(&icon_name, 1, &iconName) == 0) {
+               (void) fprintf( stderr, "%s: structure allocation for iconName failed.\n", 
+                               progname);
+               exit(-1);
+       }
+
+       wm_hints.initial_state = NormalState;
+       wm_hints.input = True;
+       wm_hints.flags = StateHint | InputHint;
+
+       class_hints.res_name = progname;
+       class_hints.res_class = "Basicwin";
+
+       XSetWMProperties(display, topwin, &windowName, &iconName, 
+                       argv, argc, &size_hints, &wm_hints, 
+                       &class_hints);
+       }
+
+        /* ------------------------------------------------------------ */
+
+       /* create the window we're in charge of */
+
+       win = XCreateSimpleWindow(display, topwin, 
+                       x, y, width, height, border_width, BlackPixel(display,
+                       screen_num), WhitePixel(display,screen_num));
+
+       /* Select event types wanted */
+       XSelectInput(display, win, ExposureMask | KeyPressMask | 
+                       ButtonPressMask | StructureNotifyMask);
+
+       load_font(&font_info);
+
+       /* create GC for text and drawing */
+       getGC(win, &gc, font_info);
+
+        /* ------------------------------------------------------------ */
+
+       /* create the external-client window */
+
+       win2 = XCreateSimpleWindow(display, topwin, 
+                       x, y+height, width, height, border_width,
+                       BlackPixel(display, screen_num),
+                       WhitePixel(display,screen_num));
+       printf("external window: %d\n", win2);
+       ExternalClientInitialize(display, win2);
+
+        /* ------------------------------------------------------------ */
+
+       /* Display windows */
+       XMapWindow(display, topwin);
+       XMapWindow(display, win);
+       XMapWindow(display, win2);
+
+       /* get events, use first to display text and graphics */
+       while (1)  {
+               XNextEvent(display, &report);
+               if (report.xany.window == win2)
+                 ExternalClientEventHandler(display, win2, &report);
+               else
+               switch  (report.type) {
+               case Expose:
+                       /* unless this is the last contiguous expose,
+                        * don't draw the window */
+                       if (report.xexpose.count != 0)
+                               break;
+
+                       /* if window too small to use */
+                       if (window_size == TOO_SMALL)
+                               TooSmall(win, gc, font_info);
+                       else {
+                               /* place text in window */
+                               draw_text(win, gc, font_info, width, height);
+
+                               /* place graphics in window, */
+                               draw_graphics(win, gc, width, height);
+                       }
+                       break;
+               case ConfigureNotify:
+                       /* window has been resized, change width and
+                        * height to send to draw_text and draw_graphics
+                        * in next Expose */
+                       width = report.xconfigure.width;
+                       height = report.xconfigure.height;
+                       if ((width < size_hints.min_width) || 
+                                       (height < size_hints.min_height))
+                               window_size = TOO_SMALL;
+                       else
+                               window_size = BIG_ENOUGH;
+                       break;
+               case ButtonPress:
+                       /* trickle down into KeyPress (no break) */
+               case KeyPress:
+                       XUnloadFont(display, font_info->fid);
+                       XFreeGC(display, gc);
+                       XCloseDisplay(display);
+                       exit(1);
+               default:
+                       /* all events selected by StructureNotifyMask
+                        * except ConfigureNotify are thrown away here,
+                        * since nothing is done with them */
+                       break;
+               } /* end switch */
+       } /* end while */
+}
+
+getGC(win, gc, font_info)
+Window win;
+GC *gc;
+XFontStruct *font_info;
+{
+       unsigned long valuemask = 0; /* ignore XGCvalues and use defaults */
+       XGCValues values;
+       unsigned int line_width = 6;
+       int line_style = LineOnOffDash;
+       int cap_style = CapRound;
+       int join_style = JoinRound;
+       int dash_offset = 0;
+       static char dash_list[] = {12, 24};
+       int list_length = 2;
+
+       /* Create default Graphics Context */
+       *gc = XCreateGC(display, win, valuemask, &values);
+
+       /* specify font */
+       XSetFont(display, *gc, font_info->fid);
+
+       /* specify black foreground since default window background is 
+        * white and default foreground is undefined. */
+       XSetForeground(display, *gc, BlackPixel(display,screen_num));
+
+       /* set line attributes */
+       XSetLineAttributes(display, *gc, line_width, line_style, 
+                       cap_style, join_style);
+
+       /* set dashes */
+       XSetDashes(display, *gc, dash_offset, dash_list, list_length);
+}
+
+load_font(font_info)
+XFontStruct **font_info;
+{
+       char *fontname = "9x15";
+
+       /* Load font and get font information structure. */
+       if ((*font_info = XLoadQueryFont(display,fontname)) == NULL)
+       {
+               (void) fprintf( stderr, "%s: Cannot open 9x15 font\n", 
+                               progname);
+               exit( -1 );
+       }
+}
+
+draw_text(win, gc, font_info, win_width, win_height)
+Window win;
+GC gc;
+XFontStruct *font_info;
+unsigned int win_width, win_height;
+{
+       char *string1 = "Hi! I'm a window, who are you?";
+       char *string2 = "To terminate program; Press any key";
+       char *string3 = "or button while in this window.";
+       char *string4 = "Screen Dimensions:";
+       int len1, len2, len3, len4;
+       int width1, width2, width3;
+       char cd_height[50], cd_width[50], cd_depth[50];
+       int font_height;
+       int initial_y_offset, x_offset;
+
+
+       /* need length for both XTextWidth and XDrawString */
+       len1 = strlen(string1);
+       len2 = strlen(string2);
+       len3 = strlen(string3);
+
+       /* get string widths for centering */
+       width1 = XTextWidth(font_info, string1, len1);
+       width2 = XTextWidth(font_info, string2, len2);
+       width3 = XTextWidth(font_info, string3, len3);
+
+       font_height = font_info->ascent + font_info->descent;
+
+       /* output text, centered on each line */
+       XDrawString(display, win, gc, (win_width - width1)/2, 
+                       font_height,
+                       string1, len1);
+       XDrawString(display, win, gc, (win_width - width2)/2, 
+                       (int)(win_height - (2 * font_height)),
+                       string2, len2);
+       XDrawString(display, win, gc, (win_width - width3)/2, 
+                       (int)(win_height - font_height),
+                       string3, len3);
+
+       /* copy numbers into string variables */
+       (void) sprintf(cd_height, " Height - %d pixels", 
+                       DisplayHeight(display,screen_num));
+       (void) sprintf(cd_width, " Width  - %d pixels", 
+                       DisplayWidth(display,screen_num));
+       (void) sprintf(cd_depth, " Depth  - %d plane(s)", 
+                       DefaultDepth(display, screen_num));
+
+       /* reuse these for same purpose */
+       len4 = strlen(string4);
+       len1 = strlen(cd_height);
+       len2 = strlen(cd_width);
+       len3 = strlen(cd_depth);
+
+       /* To center strings vertically, we place the first string
+        * so that the top of it is two font_heights above the center
+        * of the window.  Since the baseline of the string is what we
+        * need to locate for XDrawString, and the baseline is one
+        * font_info->ascent below the top of the character,
+        * the final offset of the origin up from the center of the 
+        * window is one font_height + one descent. */
+
+       initial_y_offset = win_height/2 - font_height - font_info->descent;
+       x_offset = (int) win_width/4;
+       XDrawString(display, win, gc, x_offset, (int) initial_y_offset, 
+                       string4,len4);
+
+       XDrawString(display, win, gc, x_offset, (int) initial_y_offset + 
+                       font_height,cd_height,len1);
+       XDrawString(display, win, gc, x_offset, (int) initial_y_offset + 
+                       2 * font_height,cd_width,len2);
+       XDrawString(display, win, gc, x_offset, (int) initial_y_offset + 
+                       3 * font_height,cd_depth,len3);
+}
+
+draw_graphics(win, gc, window_width, window_height)
+Window win;
+GC gc;
+unsigned int window_width, window_height;
+{
+       int x, y;
+       int width, height;
+
+       height = window_height/2;
+       width = 3 * window_width/4;
+       x = window_width/2 - width/2;  /* center */
+       y = window_height/2 - height/2;
+       XDrawRectangle(display, win, gc, x, y, width, height);
+}
+
+TooSmall(win, gc, font_info)
+Window win;
+GC gc;
+XFontStruct *font_info;
+{
+       char *string1 = "Too Small";
+       int y_offset, x_offset;
+
+       y_offset = font_info->ascent + 2;
+       x_offset = 2;
+
+       /* output text, centered on each line */
+       XDrawString(display, win, gc, x_offset, y_offset, string1, 
+                       strlen(string1));
+}
diff --git a/etc/toolbar/compile-cap-up.xpm b/etc/toolbar/compile-cap-up.xpm
new file mode 100644 (file)
index 0000000..f1b7d05
--- /dev/null
@@ -0,0 +1,43 @@
+/* XPM */
+static char * makefile[] = {
+"33 33 7 1",
+"X     c Gray75 s backgroundToolBarColor",
+"u     c #000000000000 s foregroundToolBarColor",
+"o     c black",
+"O     c white",
+"+     c Gray40",
+"@     c Gray90",
+"#     c white",
+"XXXXXXXXXXoooXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXoooOoooXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXo++o++oXXXXXXXXXXXXXXXXXX",
+"XXXXXXXoo+ooo+ooXXXXXXXXXXXXXXXXX",
+"XXXXXXXo++o++++oXXXXXXXXXXXXXXXXX",
+"XXXXXXXoo++o++ooXXXXXXXXXXXXXXXXX",
+"XXXXXXXXo+++++ooooXXXXXXXXXXXXXXX",
+"XXXXXXXXooo+oooo@oXXoXXXXXXXXXXXX",
+"XXXXXXXXXXooo@o@@@oo@oXXXXXXXXXXX",
+"XXXXXXXXXXo@@@@@@@@@@ooXXXXXXXXXX",
+"XXXXXXXXXXXo@@o@o#o@@oXXXXXXXXXXX",
+"XXXXXXXXXoo@@o@o###o@@ooXXXXXXXXX",
+"XXXXXXXXXo@@@oo####o@@@oXXXXXXXXX",
+"XXXXXXXXXooo@o@o###o@oooXXXXXXXXX",
+"XXXXXXXXXXXo@@o@o#o@@oXXXXXXXXXXX",
+"XXXXXXXXXXo@@@@@@@@@@@oXXXXXXXXXX",
+"XXXXXXXXXXoo@oo@@oooooXXXXXXXXXXX",
+"XXXXXXXXoooXooo@@oXXoXXXXXXXXXXXX",
+"XXXXXXXXo++o++ooooXXXXXXXXXXXXXXX",
+"XXXXXXXoo+ooo+ooXXXXXXXXXXXXXXXXX",
+"XXXXXXXo++o++++oXXXXXXXXXXXXXXXXX",
+"XXXXXXXoo++o++ooXXXXXXXXXXXXXXXXX",
+"XXXXXXXXo+++++oXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXooo+oooXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXoooXXXXXXXXXXXuXuXXXXXX",
+"XXXuuuXXXXXXXXXXXXXXXXXXXXuXXXXXX",
+"XXuXXXuXXuuXXuuuuXXuuuXXuXuXXuXXX",
+"XXuXXXXXuXXuXuXuXuXuXXuXuXuXuXuXX",
+"XXuXXXXXuXXuXuXuXuXuXXuXuXuXuuuXX",
+"XXuXXXuXuXXuXuXuXuXuXXuXuXuXuXXXX",
+"XXXuuuXXXuuXXuXuXuXuuuXXuXuXXuuXX",
+"XXXXXXXXXXXXXXXXXXXuXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/compile-cap-xx.xpm b/etc/toolbar/compile-cap-xx.xpm
new file mode 100644 (file)
index 0000000..1b0fc62
--- /dev/null
@@ -0,0 +1,42 @@
+/* XPM */
+static char * makefile[] = {
+"33 33 6 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c white",
+"+     c Gray40",
+"@     c Gray90",
+"#     c white",
+"XXXXXXXXXXoooXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXoooOoooXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXo++o++oXXXXXXXXXXXXXXXXXX",
+"XXXXXXXoo+ooo+ooXXXXXXXXXXXXXXXXX",
+"XXXXXXXo++o++++oXXXXXXXXXXXXXXXXX",
+"XXXXXXXoo++o++ooXXXXXXXXXXXXXXXXX",
+"XXXXXXXXo+++++ooooXXXXXXXXXXXXXXX",
+"XXXXXXXXooo+oooo@oXXoXXXXXXXXXXXX",
+"XXXXXXXXXXooo@o@@@oo@oXXXXXXXXXXX",
+"XXXXXXXXXXo@@@@@@@@@@ooXXXXXXXXXX",
+"XXXXXXXXXXXo@@o@o#o@@oXXXXXXXXXXX",
+"XXXXXXXXXoo@@o@o###o@@ooXXXXXXXXX",
+"XXXXXXXXXo@@@oo####o@@@oXXXXXXXXX",
+"XXXXXXXXXooo@o@o###o@oooXXXXXXXXX",
+"XXXXXXXXXXXo@@o@o#o@@oXXXXXXXXXXX",
+"XXXXXXXXXXo@@@@@@@@@@@oXXXXXXXXXX",
+"XXXXXXXXXXoo@oo@@oooooXXXXXXXXXXX",
+"XXXXXXXXoooXooo@@oXXoXXXXXXXXXXXX",
+"XXXXXXXXo++o++ooooXXXXXXXXXXXXXXX",
+"XXXXXXXoo+ooo+ooXXXXXXXXXXXXXXXXX",
+"XXXXXXXo++o++++oXXXXXXXXXXXXXXXXX",
+"XXXXXXXoo++o++ooXXXXXXXXXXXXXXXXX",
+"XXXXXXXXo+++++oXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXooo+oooXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXoooXXXXXXXXXXXoXoXXXXXX",
+"XXXoooXXXXXXXXXXXXXXXXXXXXoXXXXXX",
+"XXoXXXoXXooXXooooXXoooXXoXoXXoXXX",
+"XXoXXXXXoXXoXoXoXoXoXXoXoXoXoXoXX",
+"XXoXXXXXoXXoXoXoXoXoXXoXoXoXoooXX",
+"XXoXXXoXoXXoXoXoXoXoXXoXoXoXoXXXX",
+"XXXoooXXXooXXoXoXoXoooXXoXoXXooXX",
+"XXXXXXXXXXXXXXXXXXXoXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/compile-dn.xbm b/etc/toolbar/compile-dn.xbm
new file mode 100644 (file)
index 0000000..29fdd56
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0xff,0xf1,0xff,0x0f,0x7f,0xc4,0xff,0x0f,0x7f,0xdb,0xff,0x0f,0x3f,0x91,0xff,
+ 0x0f,0xbf,0xbd,0xff,0x0f,0x3f,0x9b,0xff,0x0f,0x7f,0x1f,0xfe,0x0f,0x7f,0x84,
+ 0xf6,0x0f,0xff,0xd1,0xe9,0x0f,0xff,0xfd,0xcf,0x0f,0xff,0x3b,0xee,0x0f,0xff,
+ 0x5b,0xed,0x0f,0xff,0xac,0x9b,0x0f,0xff,0xce,0xbb,0x0f,0xff,0xa8,0x8b,0x0f,
+ 0xff,0x5b,0xed,0x0f,0xff,0x3b,0xee,0x0f,0xff,0xfd,0xdf,0x0f,0xff,0xc9,0xe0,
+ 0x0f,0x7f,0xc4,0xf6,0x0f,0x7f,0x1b,0xfe,0x0f,0x3f,0x91,0xff,0x0f,0xbf,0xbd,
+ 0xff,0x0f,0x3f,0x9b,0xff,0x0f,0x7f,0xdf,0xff,0x0f,0x7f,0xc4,0xff,0x0f,0xff,
+ 0xf1,0xff,0x0f,0xff,0xff,0xff,0x0f};
diff --git a/etc/toolbar/compile-up.xbm b/etc/toolbar/compile-up.xbm
new file mode 100644 (file)
index 0000000..64c2680
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x0e,0x00,0x00,0x80,0x3b,0x00,0x00,0x80,0x24,0x00,0x00,0xc0,0x6e,0x00,
+ 0x00,0x40,0x42,0x00,0x00,0xc0,0x64,0x00,0x00,0x80,0xe0,0x01,0x00,0x80,0x7b,
+ 0x09,0x00,0x00,0x2e,0x16,0x00,0x00,0x02,0x30,0x00,0x00,0xc4,0x11,0x00,0x00,
+ 0xa4,0x12,0x00,0x00,0x53,0x64,0x00,0x00,0x31,0x44,0x00,0x00,0x57,0x74,0x00,
+ 0x00,0xa4,0x12,0x00,0x00,0xc4,0x11,0x00,0x00,0x02,0x20,0x00,0x00,0x36,0x1f,
+ 0x00,0x80,0x3b,0x09,0x00,0x80,0xe4,0x01,0x00,0xc0,0x6e,0x00,0x00,0x40,0x42,
+ 0x00,0x00,0xc0,0x64,0x00,0x00,0x80,0x20,0x00,0x00,0x80,0x3b,0x00,0x00,0x00,
+ 0x0e,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/compile-up.xpm b/etc/toolbar/compile-up.xpm
new file mode 100644 (file)
index 0000000..f66c1c0
--- /dev/null
@@ -0,0 +1,37 @@
+/* XPM */
+static char * makefile[] = {
+"28 28 6 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c black",
+"O     c white",
+"+     c Gray40",
+"@     c Gray90",
+"#     c white",
+"XXXXXXXXXoooXXXXXXXXXXXXXXXX",
+"XXXXXXXoooOoooXXXXXXXXXXXXXX",
+"XXXXXXXo++o++oXXXXXXXXXXXXXX",
+"XXXXXXoo+ooo+ooXXXXXXXXXXXXX",
+"XXXXXXo++o++++oXXXXXXXXXXXXX",
+"XXXXXXoo++o++ooXXXXXXXXXXXXX",
+"XXXXXXXo+++++ooooXXXXXXXXXXX",
+"XXXXXXXooo+oooo@oXXoXXXXXXXX",
+"XXXXXXXXXooo@o@@@oo@oXXXXXXX",
+"XXXXXXXXXo@@@@@@@@@@ooXXXXXX",
+"XXXXXXXXXXo@@@ooo@@@oXXXXXXX",
+"XXXXXXXXXXo@@o@o#o@@oXXXXXXX",
+"XXXXXXXXoo@@o@o###o@@ooXXXXX",
+"XXXXXXXXo@@@oo####o@@@oXXXXX",
+"XXXXXXXXooo@o@o###o@oooXXXXX",
+"XXXXXXXXXXo@@o@o#o@@oXXXXXXX",
+"XXXXXXXXXXo@@@ooo@@@oXXXXXXX",
+"XXXXXXXXXo@@@@@@@@@@@oXXXXXX",
+"XXXXXXXXXoo@oo@@oooooXXXXXXX",
+"XXXXXXXoooXooo@@oXXoXXXXXXXX",
+"XXXXXXXo++o++ooooXXXXXXXXXXX",
+"XXXXXXoo+ooo+ooXXXXXXXXXXXXX",
+"XXXXXXo++o++++oXXXXXXXXXXXXX",
+"XXXXXXoo++o++ooXXXXXXXXXXXXX",
+"XXXXXXXo+++++oXXXXXXXXXXXXXX",
+"XXXXXXXooo+oooXXXXXXXXXXXXXX",
+"XXXXXXXXXoooXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/compile-xx.xbm b/etc/toolbar/compile-xx.xbm
new file mode 100644 (file)
index 0000000..d0df4bf
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x80,0x3b,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0x6e,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xc0,0x64,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x7b,
+ 0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x30,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xa4,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x31,0x44,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0xa4,0x12,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x20,0x00,0x00,0x00,0x00,
+ 0x00,0x80,0x3b,0x09,0x00,0x00,0x00,0x00,0x00,0xc0,0x6e,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xc0,0x64,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x3b,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/compile-xx.xpm b/etc/toolbar/compile-xx.xpm
new file mode 100644 (file)
index 0000000..e137cc1
--- /dev/null
@@ -0,0 +1,37 @@
+/* XPM */
+static char * makefile[] = {
+"28 28 6 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c white",
+"+     c Gray40",
+"@     c Gray90",
+"#     c white",
+"XXXXXXXXXoooXXXXXXXXXXXXXXXX",
+"XXXXXXXoooOoooXXXXXXXXXXXXXX",
+"XXXXXXXo++o++oXXXXXXXXXXXXXX",
+"XXXXXXoo+ooo+ooXXXXXXXXXXXXX",
+"XXXXXXo++o++++oXXXXXXXXXXXXX",
+"XXXXXXoo++o++ooXXXXXXXXXXXXX",
+"XXXXXXXo+++++ooooXXXXXXXXXXX",
+"XXXXXXXooo+oooo@oXXoXXXXXXXX",
+"XXXXXXXXXooo@o@@@oo@oXXXXXXX",
+"XXXXXXXXXo@@@@@@@@@@ooXXXXXX",
+"XXXXXXXXXXo@@@ooo@@@oXXXXXXX",
+"XXXXXXXXXXo@@o@o#o@@oXXXXXXX",
+"XXXXXXXXoo@@o@o###o@@ooXXXXX",
+"XXXXXXXXo@@@oo####o@@@oXXXXX",
+"XXXXXXXXooo@o@o###o@oooXXXXX",
+"XXXXXXXXXXo@@o@o#o@@oXXXXXXX",
+"XXXXXXXXXXo@@@ooo@@@oXXXXXXX",
+"XXXXXXXXXo@@@@@@@@@@@oXXXXXX",
+"XXXXXXXXXoo@oo@@oooooXXXXXXX",
+"XXXXXXXoooXooo@@oXXoXXXXXXXX",
+"XXXXXXXo++o++ooooXXXXXXXXXXX",
+"XXXXXXoo+ooo+ooXXXXXXXXXXXXX",
+"XXXXXXo++o++++oXXXXXXXXXXXXX",
+"XXXXXXoo++o++ooXXXXXXXXXXXXX",
+"XXXXXXXo+++++oXXXXXXXXXXXXXX",
+"XXXXXXXooo+oooXXXXXXXXXXXXXX",
+"XXXXXXXXXoooXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/copy-cap-up.xpm b/etc/toolbar/copy-cap-up.xpm
new file mode 100644 (file)
index 0000000..7d17d51
--- /dev/null
@@ -0,0 +1,41 @@
+/* XPM */
+static char * copy[] = {
+"33 33 5 1",
+"X     c Gray75 s backgroundToolBarColor",
+"u     c #000000000000 s foregroundToolBarColor",
+"o     c black",
+"O     c white",
+"+     c Gray60",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXoooooooooXXXXXXXXXXXXXXXX",
+"XXXXXXXXoOOOOOOOooXXXXXXXXXXXXXXX",
+"XXXXXXXXoOOOOOOOo+oXXXXXXXXXXXXXX",
+"XXXXXXXXoOoooooOooooXXXXXXXXXXXXX",
+"XXXXXXXXoOOOOOOOOOOoXXXXXXXXXXXXX",
+"XXXXXXXXoOooooOOOOOoXXXXXXXXXXXXX",
+"XXXXXXXXoOOOOOOOOOOoXXXXXXXXXXXXX",
+"XXXXXXXXoOOOOOoooooooooXXXXXXXXXX",
+"XXXXXXXXoOooOOoOOOOOOOooXXXXXXXXX",
+"XXXXXXXXoOOOOOoOOOOOOOo+oXXXXXXXX",
+"XXXXXXXXoOOOOOoOoooooOooooXXXXXXX",
+"XXXXXXXXoOOOOOoOOOOOOOOOOoXXXXXXX",
+"XXXXXXXXoOOOOOoOooooOOOOOoXXXXXXX",
+"XXXXXXXXoooooooOOOOOOOOOOoXXXXXXX",
+"XXXXXXXXXXXXXXoOOOOOOOOOOoXXXXXXX",
+"XXXXXXXXXXXXXXoOoooooooOOoXXXXXXX",
+"XXXXXXXXXXXXXXoOOOOOOOOOOoXXXXXXX",
+"XXXXXXXXXXXXXXoOOOOOOOOOOoXXXXXXX",
+"XXXXXXXXXXXXXXoOOOOOOOOOOoXXXXXXX",
+"XXXXXXXXXXXXXXoOOOOOOOOOOoXXXXXXX",
+"XXXXXXXXXXXXXXooooooooooooXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXuuuXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXuXXXuXXuuXXuuuXXuXXuXXXXXX",
+"XXXXXXXuXXXXXuXXuXuXXuXuXXuXXXXXX",
+"XXXXXXXuXXXXXuXXuXuXXuXuXXuXXXXXX",
+"XXXXXXXuXXXuXuXXuXuXXuXXuuXXXXXXX",
+"XXXXXXXXuuuXXXuuXXuuuXXXuXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXuXXXXuXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/copy-cap-xx.xpm b/etc/toolbar/copy-cap-xx.xpm
new file mode 100644 (file)
index 0000000..36c3d39
--- /dev/null
@@ -0,0 +1,40 @@
+/* XPM */
+static char * copy[] = {
+"33 33 4 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c white",
+"+     c Gray60",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXoooooooooXXXXXXXXXXXXXXXX",
+"XXXXXXXXoOOOOOOOooXXXXXXXXXXXXXXX",
+"XXXXXXXXoOOOOOOOo+oXXXXXXXXXXXXXX",
+"XXXXXXXXoOoooooOooooXXXXXXXXXXXXX",
+"XXXXXXXXoOOOOOOOOOOoXXXXXXXXXXXXX",
+"XXXXXXXXoOooooOOOOOoXXXXXXXXXXXXX",
+"XXXXXXXXoOOOOOOOOOOoXXXXXXXXXXXXX",
+"XXXXXXXXoOOOOOoooooooooXXXXXXXXXX",
+"XXXXXXXXoOooOOoOOOOOOOooXXXXXXXXX",
+"XXXXXXXXoOOOOOoOOOOOOOo+oXXXXXXXX",
+"XXXXXXXXoOOOOOoOoooooOooooXXXXXXX",
+"XXXXXXXXoOOOOOoOOOOOOOOOOoXXXXXXX",
+"XXXXXXXXoOOOOOoOooooOOOOOoXXXXXXX",
+"XXXXXXXXoooooooOOOOOOOOOOoXXXXXXX",
+"XXXXXXXXXXXXXXoOOOOOOOOOOoXXXXXXX",
+"XXXXXXXXXXXXXXoOoooooooOOoXXXXXXX",
+"XXXXXXXXXXXXXXoOOOOOOOOOOoXXXXXXX",
+"XXXXXXXXXXXXXXoOOOOOOOOOOoXXXXXXX",
+"XXXXXXXXXXXXXXoOOOOOOOOOOoXXXXXXX",
+"XXXXXXXXXXXXXXoOOOOOOOOOOoXXXXXXX",
+"XXXXXXXXXXXXXXooooooooooooXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXoooXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXoXXXoXXooXXoooXXoXXoXXXXXX",
+"XXXXXXXoXXXXXoXXoXoXXoXoXXoXXXXXX",
+"XXXXXXXoXXXXXoXXoXoXXoXoXXoXXXXXX",
+"XXXXXXXoXXXoXoXXoXoXXoXXooXXXXXXX",
+"XXXXXXXXoooXXXooXXoooXXXoXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXoXXXXoXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/copy-dn.xbm b/etc/toolbar/copy-dn.xbm
new file mode 100644 (file)
index 0000000..e6f06b2
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,
+ 0x0f,0x1f,0xc0,0xff,0x0f,0xdf,0x9f,0xff,0x0f,0xdf,0x5f,0xff,0x0f,0x5f,0x10,
+ 0xfe,0x0f,0xdf,0xff,0xfe,0x0f,0x5f,0xf8,0xfe,0x0f,0xdf,0xff,0xfe,0x0f,0xdf,
+ 0x07,0xf0,0x0f,0x5f,0xf6,0xe7,0x0f,0xdf,0xf7,0xd7,0x0f,0xdf,0x17,0x84,0x0f,
+ 0xdf,0xf7,0xbf,0x0f,0xdf,0x17,0xbe,0x0f,0x1f,0xf0,0xbf,0x0f,0xff,0xf7,0xbf,
+ 0x0f,0xff,0x17,0xb0,0x0f,0xff,0xf7,0xbf,0x0f,0xff,0xf7,0xbf,0x0f,0xff,0xf7,
+ 0xbf,0x0f,0xff,0xf7,0xbf,0x0f,0xff,0x07,0x80,0x0f,0xff,0xff,0xff,0x0f,0xff,
+ 0xff,0xff,0x0f,0xff,0xff,0xff,0x0f};
diff --git a/etc/toolbar/copy-up.xbm b/etc/toolbar/copy-up.xbm
new file mode 100644 (file)
index 0000000..1e3da9e
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0xe0,0x3f,0x00,0x00,0x20,0x60,0x00,0x00,0x20,0xa0,0x00,0x00,0xa0,0xef,
+ 0x01,0x00,0x20,0x00,0x01,0x00,0xa0,0x07,0x01,0x00,0x20,0x00,0x01,0x00,0x20,
+ 0xf8,0x0f,0x00,0xa0,0x09,0x18,0x00,0x20,0x08,0x28,0x00,0x20,0xe8,0x7b,0x00,
+ 0x20,0x08,0x40,0x00,0x20,0xe8,0x41,0x00,0xe0,0x0f,0x40,0x00,0x00,0x08,0x40,
+ 0x00,0x00,0xe8,0x4f,0x00,0x00,0x08,0x40,0x00,0x00,0x08,0x40,0x00,0x00,0x08,
+ 0x40,0x00,0x00,0x08,0x40,0x00,0x00,0xf8,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/copy-up.xpm b/etc/toolbar/copy-up.xpm
new file mode 100644 (file)
index 0000000..9b3db4b
--- /dev/null
@@ -0,0 +1,35 @@
+/* XPM */
+static char * copy[] = {
+"28 28 4 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c black",
+"O     c white",
+"+     c Gray60",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXoooooooooXXXXXXXXXXXXXX",
+"XXXXXoOOOOOOOooXXXXXXXXXXXXX",
+"XXXXXoOOOOOOOo+oXXXXXXXXXXXX",
+"XXXXXoOoooooOooooXXXXXXXXXXX",
+"XXXXXoOOOOOOOOOOoXXXXXXXXXXX",
+"XXXXXoOooooOOOOOoXXXXXXXXXXX",
+"XXXXXoOOOOOOOOOOoXXXXXXXXXXX",
+"XXXXXoOOOOOoooooooooXXXXXXXX",
+"XXXXXoOooOOoOOOOOOOooXXXXXXX",
+"XXXXXoOOOOOoOOOOOOOo+oXXXXXX",
+"XXXXXoOOOOOoOoooooOooooXXXXX",
+"XXXXXoOOOOOoOOOOOOOOOOoXXXXX",
+"XXXXXoOOOOOoOooooOOOOOoXXXXX",
+"XXXXXoooooooOOOOOOOOOOoXXXXX",
+"XXXXXXXXXXXoOOOOOOOOOOoXXXXX",
+"XXXXXXXXXXXoOoooooooOOoXXXXX",
+"XXXXXXXXXXXoOOOOOOOOOOoXXXXX",
+"XXXXXXXXXXXoOOOOOOOOOOoXXXXX",
+"XXXXXXXXXXXoOOOOOOOOOOoXXXXX",
+"XXXXXXXXXXXoOOOOOOOOOOoXXXXX",
+"XXXXXXXXXXXooooooooooooXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/copy-xx.xbm b/etc/toolbar/copy-xx.xbm
new file mode 100644 (file)
index 0000000..3f093eb
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x60,0x00,0x00,0x00,0x00,0x00,0x00,0xa0,0xef,
+ 0x01,0x00,0x00,0x00,0x00,0x00,0xa0,0x07,0x01,0x00,0x00,0x00,0x00,0x00,0x20,
+ 0xf8,0x0f,0x00,0x00,0x00,0x00,0x00,0x20,0x08,0x28,0x00,0x00,0x00,0x00,0x00,
+ 0x20,0x08,0x40,0x00,0x00,0x00,0x00,0x00,0xe0,0x0f,0x40,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xe8,0x4f,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x40,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x08,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/copy-xx.xpm b/etc/toolbar/copy-xx.xpm
new file mode 100644 (file)
index 0000000..4d83b40
--- /dev/null
@@ -0,0 +1,35 @@
+/* XPM */
+static char * copy[] = {
+"28 28 4 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c white",
+"+     c Gray60",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXoooooooooXXXXXXXXXXXXXX",
+"XXXXXoOOOOOOOooXXXXXXXXXXXXX",
+"XXXXXoOOOOOOOo+oXXXXXXXXXXXX",
+"XXXXXoOoooooOooooXXXXXXXXXXX",
+"XXXXXoOOOOOOOOOOoXXXXXXXXXXX",
+"XXXXXoOooooOOOOOoXXXXXXXXXXX",
+"XXXXXoOOOOOOOOOOoXXXXXXXXXXX",
+"XXXXXoOOOOOoooooooooXXXXXXXX",
+"XXXXXoOooOOoOOOOOOOooXXXXXXX",
+"XXXXXoOOOOOoOOOOOOOo+oXXXXXX",
+"XXXXXoOOOOOoOoooooOooooXXXXX",
+"XXXXXoOOOOOoOOOOOOOOOOoXXXXX",
+"XXXXXoOOOOOoOooooOOOOOoXXXXX",
+"XXXXXoooooooOOOOOOOOOOoXXXXX",
+"XXXXXXXXXXXoOOOOOOOOOOoXXXXX",
+"XXXXXXXXXXXoOoooooooOOoXXXXX",
+"XXXXXXXXXXXoOOOOOOOOOOoXXXXX",
+"XXXXXXXXXXXoOOOOOOOOOOoXXXXX",
+"XXXXXXXXXXXoOOOOOOOOOOoXXXXX",
+"XXXXXXXXXXXoOOOOOOOOOOoXXXXX",
+"XXXXXXXXXXXooooooooooooXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/cut-cap-up.xpm b/etc/toolbar/cut-cap-up.xpm
new file mode 100644 (file)
index 0000000..765be34
--- /dev/null
@@ -0,0 +1,40 @@
+/* XPM */
+static char * cut[] = {
+"33 33 4 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c black s foregroundToolBarColor",
+"O     c Gray90",
+"+     c white",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXoooooXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXooXXXooXXXXXXXXXXXXXXXXXXXX",
+"XXXXXooXXXXXooXXXXXXXXXXoooXXXXXX",
+"XXXXXoXXXXXXXoXXXXXXXXooOOooXXXXX",
+"XXXXXooXXXXXoooXXXXXooOOooXXXXXXX",
+"XXXXXXooXXXoooooXXXoooooXXXXXXXXX",
+"XXXXXXXoooooXXXooooooXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXo+oXXXXXXXXXXXXXX",
+"XXXXXXXoooooXXXooooooXXXXXXXXXXXX",
+"XXXXXXooXXXoooooXXXoooooXXXXXXXXX",
+"XXXXXooXXXXXoooXXXXXooOOooXXXXXXX",
+"XXXXXoXXXXXXXoXXXXXXXXooOOooXXXXX",
+"XXXXXooXXXXXooXXXXXXXXXXoooXXXXXX",
+"XXXXXXooXXXooXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXoooooXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXoXXXXXXXXXXX",
+"XXXXXXXXXXXoooXXXXXXXoXXXXXXXXXXX",
+"XXXXXXXXXXoXXXoXoXoXoooXXXXXXXXXX",
+"XXXXXXXXXXoXXXXXoXoXXoXXXXXXXXXXX",
+"XXXXXXXXXXoXXXXXoXoXXoXXXXXXXXXXX",
+"XXXXXXXXXXoXXXoXoXoXXoXXXXXXXXXXX",
+"XXXXXXXXXXXoooXXXooXXoXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/cut-cap-xx.xpm b/etc/toolbar/cut-cap-xx.xpm
new file mode 100644 (file)
index 0000000..786d1e7
--- /dev/null
@@ -0,0 +1,40 @@
+/* XPM */
+static char * cut[] = {
+"33 33 4 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c Gray90",
+"+     c white",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXoooooXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXooXXXooXXXXXXXXXXXXXXXXXXXX",
+"XXXXXooXXXXXooXXXXXXXXXXoooXXXXXX",
+"XXXXXoXXXXXXXoXXXXXXXXooOOooXXXXX",
+"XXXXXooXXXXXoooXXXXXooOOooXXXXXXX",
+"XXXXXXooXXXoooooXXXoooooXXXXXXXXX",
+"XXXXXXXoooooXXXooooooXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXo+oXXXXXXXXXXXXXX",
+"XXXXXXXoooooXXXooooooXXXXXXXXXXXX",
+"XXXXXXooXXXoooooXXXoooooXXXXXXXXX",
+"XXXXXooXXXXXoooXXXXXooOOooXXXXXXX",
+"XXXXXoXXXXXXXoXXXXXXXXooOOooXXXXX",
+"XXXXXooXXXXXooXXXXXXXXXXoooXXXXXX",
+"XXXXXXooXXXooXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXoooooXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXoXXXXXXXXXXX",
+"XXXXXXXXXXXoooXXXXXXXoXXXXXXXXXXX",
+"XXXXXXXXXXoXXXoXoXoXoooXXXXXXXXXX",
+"XXXXXXXXXXoXXXXXoXoXXoXXXXXXXXXXX",
+"XXXXXXXXXXoXXXXXoXoXXoXXXXXXXXXXX",
+"XXXXXXXXXXoXXXoXoXoXXoXXXXXXXXXXX",
+"XXXXXXXXXXXoooXXXooXXoXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/cut-dn.xbm b/etc/toolbar/cut-dn.xbm
new file mode 100644 (file)
index 0000000..810f3ab
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,
+ 0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0x1f,0xfc,0xff,0x0f,0xcf,0xf9,
+ 0xff,0x0f,0xe7,0xf3,0x3f,0x0e,0xf7,0xf7,0xcf,0x0c,0xe7,0xe3,0x33,0x0f,0xcf,
+ 0xc1,0xc1,0x0f,0x1f,0x1c,0xf8,0x0f,0xff,0xbf,0xfe,0x0f,0x1f,0x1c,0xf8,0x0f,
+ 0xcf,0xc1,0xc1,0x0f,0xe7,0xe3,0x33,0x0f,0xf7,0xf7,0xcf,0x0c,0xe7,0xf3,0x3f,
+ 0x0e,0xcf,0xf9,0xff,0x0f,0x1f,0xfc,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,
+ 0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,
+ 0xff,0xff,0x0f,0xff,0xff,0xff,0x0f};
diff --git a/etc/toolbar/cut-up.xbm b/etc/toolbar/cut-up.xbm
new file mode 100644 (file)
index 0000000..d5735d1
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x03,0x00,0x00,0x30,0x06,
+ 0x00,0x00,0x18,0x0c,0xc0,0x01,0x08,0x08,0x30,0x03,0x18,0x1c,0xcc,0x00,0x30,
+ 0x3e,0x3e,0x00,0xe0,0xe3,0x07,0x00,0x00,0x40,0x01,0x00,0xe0,0xe3,0x07,0x00,
+ 0x30,0x3e,0x3e,0x00,0x18,0x1c,0xcc,0x00,0x08,0x08,0x30,0x03,0x18,0x0c,0xc0,
+ 0x01,0x30,0x06,0x00,0x00,0xe0,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/cut-up.xpm b/etc/toolbar/cut-up.xpm
new file mode 100644 (file)
index 0000000..cc5b817
--- /dev/null
@@ -0,0 +1,35 @@
+/* XPM */
+static char * cut[] = {
+"28 28 4 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c black s foregroundToolBarColor",
+"O     c Gray90",
+"+     c white",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXoooooXXXXXXXXXXXXXXXXXX",
+"XXXXooXXXooXXXXXXXXXXXXXXXXX",
+"XXXooXXXXXooXXXXXXXXXXoooXXX",
+"XXXoXXXXXXXoXXXXXXXXooOOooXX",
+"XXXooXXXXXoooXXXXXooOOooXXXX",
+"XXXXooXXXoooooXXXoooooXXXXXX",
+"XXXXXoooooXXXooooooXXXXXXXXX",
+"XXXXXXXXXXXXXXo+oXXXXXXXXXXX",
+"XXXXXoooooXXXooooooXXXXXXXXX",
+"XXXXooXXXoooooXXXoooooXXXXXX",
+"XXXooXXXXXoooXXXXXooOOooXXXX",
+"XXXoXXXXXXXoXXXXXXXXooOOooXX",
+"XXXooXXXXXooXXXXXXXXXXoooXXX",
+"XXXXooXXXooXXXXXXXXXXXXXXXXX",
+"XXXXXoooooXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/cut-xx.xbm b/etc/toolbar/cut-xx.xbm
new file mode 100644 (file)
index 0000000..8f75bea
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x06,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x08,0x30,0x03,0x00,0x00,0x00,0x00,0x30,
+ 0x3e,0x3e,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x30,0x3e,0x3e,0x00,0x00,0x00,0x00,0x00,0x08,0x08,0x30,0x03,0x00,0x00,0x00,
+ 0x00,0x30,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/cut-xx.xpm b/etc/toolbar/cut-xx.xpm
new file mode 100644 (file)
index 0000000..6905386
--- /dev/null
@@ -0,0 +1,35 @@
+/* XPM */
+static char * cut[] = {
+"28 28 4 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c Gray90",
+"+     c white",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXoooooXXXXXXXXXXXXXXXXXX",
+"XXXXooXXXooXXXXXXXXXXXXXXXXX",
+"XXXooXXXXXooXXXXXXXXXXoooXXX",
+"XXXoXXXXXXXoXXXXXXXXooOOooXX",
+"XXXooXXXXXoooXXXXXooOOooXXXX",
+"XXXXooXXXoooooXXXoooooXXXXXX",
+"XXXXXoooooXXXooooooXXXXXXXXX",
+"XXXXXXXXXXXXXXo+oXXXXXXXXXXX",
+"XXXXXoooooXXXooooooXXXXXXXXX",
+"XXXXooXXXoooooXXXoooooXXXXXX",
+"XXXooXXXXXoooXXXXXooOOooXXXX",
+"XXXoXXXXXXXoXXXXXXXXooOOooXX",
+"XXXooXXXXXooXXXXXXXXXXoooXXX",
+"XXXXooXXXooXXXXXXXXXXXXXXXXX",
+"XXXXXoooooXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/debug-cap-up.xpm b/etc/toolbar/debug-cap-up.xpm
new file mode 100644 (file)
index 0000000..b7f3f8d
--- /dev/null
@@ -0,0 +1,43 @@
+/* XPM */
+static char * bug_xpm[] = {
+"33 33 7 1",
+"X     c Gray75 s backgroundToolBarColor",
+"u     c #000000000000 s foregroundToolBarColor",
+"o     c black",
+"O     c Gray40",
+"+     c Gray60",
+"@     c white",
+"#     c Gray90",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXooooooooooooooooXXXXXXXX",
+"XXXXXXXXoooooooooOoOoOoOooXXXXXXX",
+"XXXXXXXXoooooooooOoOoOoOooXXXXXXX",
+"XXXXXXXXoooooooooooooooooo+XXXXXX",
+"XXXXXXXXXo@@@@@@@@@@@##Xo++XXXXXX",
+"XXXXXXXXo@@@@@@@@@@@@##XXo+XXXXXX",
+"XXXXXXXXo@@@@@@@@@@@@##XXo+XXXXXX",
+"XXXXXXXXo@@@@@@o@@oo@##XXo+XXXXXX",
+"XXXXXXXXo@@@o@@o@oooo##XXo+XXXXXX",
+"XXXXXXXXo@@@@o@oo@ooo##XXo+XXXXXX",
+"XXXXXXXXo@@@@@oooooo@##XXo+XXXXXX",
+"XXXXXXXXo@ooo@ooooo@@##XXo+XXXXXX",
+"XXXXXXXXo@@@oo@oooooo##XXo+XXXXXX",
+"XXXXXXXXo@@o@ooooo@@@##XXo+XXXXXX",
+"XXXXXXXXo@oooooo@@o@@##XXo+XXXXXX",
+"XXXXXXXXo@oooooo@@@o@##XXo+XXXXXX",
+"XXXXXXXXo@ooooooo@@@@##XXo+XXXXXX",
+"XXXXXXXXo@ooooo@o@@@@##XXo+XXXXXX",
+"XXXXXXXXo@@ooo@@o@@@@##XXo+XXXXXX",
+"XXXXXXXXo@@@@@@@@@@@@##XXo+XXXXXX",
+"XXXXXXXXXoooooooooooooooo++XXXXXX",
+"XXXXXXXXX++++++++++++++++++XXXXXX",
+"XXXXXXXXXX++++++++++++++++XXXXXXX",
+"XXXXXXXXXXXXXXXuXXXXXXXXXXXXXXXXX",
+"XXXXXuuuuXXXXXXuXXXXXXXXXXXXXXXXX",
+"XXXXXuXXXuXXuXXuuuXXuXuXXuuuXXXXX",
+"XXXXXuXXXuXuXuXuXXuXuXuXuXXuXXXXX",
+"XXXXXuXXXuXuuuXuXXuXuXuXuXXuXXXXX",
+"XXXXXuXXXuXuXXXuXXuXuXuXXuuuXXXXX",
+"XXXXXuuuuXXXuuXuuuXXXuuXXXXuXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXuuXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/debug-cap-xx.xpm b/etc/toolbar/debug-cap-xx.xpm
new file mode 100644 (file)
index 0000000..66e7b12
--- /dev/null
@@ -0,0 +1,42 @@
+/* XPM */
+static char * bug_xpm[] = {
+"33 33 6 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c Gray40",
+"+     c Gray60",
+"@     c white",
+"#     c Gray90",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXooooooooooooooooXXXXXXXX",
+"XXXXXXXXoooooooooOoOoOoOooXXXXXXX",
+"XXXXXXXXoooooooooOoOoOoOooXXXXXXX",
+"XXXXXXXXoooooooooooooooooo+XXXXXX",
+"XXXXXXXXXo@@@@@@@@@@@##Xo++XXXXXX",
+"XXXXXXXXo@@@@@@@@@@@@##XXo+XXXXXX",
+"XXXXXXXXo@@@@@@@@@@@@##XXo+XXXXXX",
+"XXXXXXXXo@@@@@@o@@oo@##XXo+XXXXXX",
+"XXXXXXXXo@@@o@@o@oooo##XXo+XXXXXX",
+"XXXXXXXXo@@@@o@oo@ooo##XXo+XXXXXX",
+"XXXXXXXXo@@@@@oooooo@##XXo+XXXXXX",
+"XXXXXXXXo@ooo@ooooo@@##XXo+XXXXXX",
+"XXXXXXXXo@@@oo@oooooo##XXo+XXXXXX",
+"XXXXXXXXo@@o@ooooo@@@##XXo+XXXXXX",
+"XXXXXXXXo@oooooo@@o@@##XXo+XXXXXX",
+"XXXXXXXXo@oooooo@@@o@##XXo+XXXXXX",
+"XXXXXXXXo@ooooooo@@@@##XXo+XXXXXX",
+"XXXXXXXXo@ooooo@o@@@@##XXo+XXXXXX",
+"XXXXXXXXo@@ooo@@o@@@@##XXo+XXXXXX",
+"XXXXXXXXo@@@@@@@@@@@@##XXo+XXXXXX",
+"XXXXXXXXXoooooooooooooooo++XXXXXX",
+"XXXXXXXXX++++++++++++++++++XXXXXX",
+"XXXXXXXXXX++++++++++++++++XXXXXXX",
+"XXXXXXXXXXXXXXXoXXXXXXXXXXXXXXXXX",
+"XXXXXooooXXXXXXoXXXXXXXXXXXXXXXXX",
+"XXXXXoXXXoXXoXXoooXXoXoXXoooXXXXX",
+"XXXXXoXXXoXoXoXoXXoXoXoXoXXoXXXXX",
+"XXXXXoXXXoXoooXoXXoXoXoXoXXoXXXXX",
+"XXXXXoXXXoXoXXXoXXoXoXoXXoooXXXXX",
+"XXXXXooooXXXooXoooXXXooXXXXoXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXooXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/debug-dn.xbm b/etc/toolbar/debug-dn.xbm
new file mode 100644 (file)
index 0000000..c981a4d
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0x3f,0x00,0xc0,0x0f,0x1f,0x40,0x95,
+ 0x0f,0x1f,0x40,0x95,0x0f,0x1f,0x00,0x80,0x0f,0xbf,0xff,0xdf,0x0f,0xdf,0xff,
+ 0xbf,0x0f,0xdf,0xff,0xbf,0x0f,0xdf,0xff,0xbf,0x0f,0xdf,0xff,0xbf,0x0f,0xdf,
+ 0x6f,0xbe,0x0f,0xdf,0x2d,0xbc,0x0f,0xdf,0x4b,0xbc,0x0f,0xdf,0x07,0xbe,0x0f,
+ 0x5f,0x04,0xbf,0x0f,0xdf,0x09,0xbc,0x0f,0xdf,0x82,0xbf,0x0f,0x5f,0x60,0xbf,
+ 0x0f,0x5f,0xe0,0xbe,0x0f,0x5f,0xc0,0xbf,0x0f,0x5f,0xd0,0xbf,0x0f,0xdf,0xd8,
+ 0xbf,0x0f,0xdf,0xff,0xbf,0x0f,0x3f,0x00,0xc0,0x0f,0xff,0xff,0xff,0x0f,0xff,
+ 0xff,0xff,0x0f,0xff,0xff,0xff,0x0f};
diff --git a/etc/toolbar/debug-up.xbm b/etc/toolbar/debug-up.xbm
new file mode 100644 (file)
index 0000000..192e257
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xff,0x3f,0x00,0xe0,0xbf,0x6a,
+ 0x00,0xe0,0xbf,0x6a,0x00,0xe0,0xff,0x7f,0x00,0x40,0x00,0x20,0x00,0x20,0x00,
+ 0x40,0x00,0x20,0x00,0x40,0x00,0x20,0x00,0x40,0x00,0x20,0x00,0x40,0x00,0x20,
+ 0x90,0x41,0x00,0x20,0xd2,0x43,0x00,0x20,0xb4,0x43,0x00,0x20,0xf8,0x41,0x00,
+ 0xa0,0xfb,0x40,0x00,0x20,0xf6,0x43,0x00,0x20,0x7d,0x40,0x00,0xa0,0x9f,0x40,
+ 0x00,0xa0,0x1f,0x41,0x00,0xa0,0x3f,0x40,0x00,0xa0,0x2f,0x40,0x00,0x20,0x27,
+ 0x40,0x00,0x20,0x00,0x40,0x00,0xc0,0xff,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/debug-up.xpm b/etc/toolbar/debug-up.xpm
new file mode 100644 (file)
index 0000000..47c6e0c
--- /dev/null
@@ -0,0 +1,37 @@
+/* XPM */
+static char * bug_xpm[] = {
+"28 28 6 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c black",
+"O     c Gray40",
+"+     c Gray60",
+"@     c white",
+"#     c Gray90",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXooooooooooooooooXXXXXX",
+"XXXXXoooooooooOoOoOoOooXXXXX",
+"XXXXXoooooooooOoOoOoOooXXXXX",
+"XXXXXoooooooooooooooooo+XXXX",
+"XXXXXXo@@@@@@@@@@@##Xo++XXXX",
+"XXXXXo@@@@@@@@@@@@##XXo+XXXX",
+"XXXXXo@@@@@@@@@@@@##XXoXXXXX",
+"XXXXXo@@@@@@@@@@@@##XXo+XXXX",
+"XXXXXo@@@@@@@@@@@@##XXo+XXXX",
+"XXXXXo@@@@@@o@@oo@##XXo+XXXX",
+"XXXXXo@@@o@@o@oooo##XXo+XXXX",
+"XXXXXo@@@@o@oo@ooo##XXo+XXXX",
+"XXXXXo@@@@@oooooo@##XXo+XXXX",
+"XXXXXo@ooo@ooooo@@##XXo+XXXX",
+"XXXXXo@@@oo@oooooo##XXo+XXXX",
+"XXXXXo@@o@ooooo@@@##XXo+XXXX",
+"XXXXXo@oooooo@@o@@##XXo+XXXX",
+"XXXXXo@oooooo@@@o@##XXo+XXXX",
+"XXXXXo@ooooooo@@@@##XXo+XXXX",
+"XXXXXo@ooooo@o@@@@##XXo+XXXX",
+"XXXXXo@@ooo@@o@@@@##XXo+XXXX",
+"XXXXXo@@@@@@@@@@@@##XXo+XXXX",
+"XXXXXXoooooooooooooooo++XXXX",
+"XXXXXX++++++++++++++++++XXXX",
+"XXXXXXX++++++++++++++++XXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/debug-xx.xbm b/etc/toolbar/debug-xx.xbm
new file mode 100644 (file)
index 0000000..59b11fd
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0xbf,0x6a,
+ 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x20,0x00,
+ 0x40,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x20,
+ 0x90,0x41,0x00,0x00,0x00,0x00,0x00,0x20,0xb4,0x43,0x00,0x00,0x00,0x00,0x00,
+ 0xa0,0xfb,0x40,0x00,0x00,0x00,0x00,0x00,0x20,0x7d,0x40,0x00,0x00,0x00,0x00,
+ 0x00,0xa0,0x1f,0x41,0x00,0x00,0x00,0x00,0x00,0xa0,0x2f,0x40,0x00,0x00,0x00,
+ 0x00,0x00,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/debug-xx.xpm b/etc/toolbar/debug-xx.xpm
new file mode 100644 (file)
index 0000000..4f15c0e
--- /dev/null
@@ -0,0 +1,37 @@
+/* XPM */
+static char * bug_xpm[] = {
+"28 28 6 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c Gray40",
+"+     c Gray60",
+"@     c white",
+"#     c Gray90",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXooooooooooooooooXXXXXX",
+"XXXXXoooooooooOoOoOoOooXXXXX",
+"XXXXXoooooooooOoOoOoOooXXXXX",
+"XXXXXoooooooooooooooooo+XXXX",
+"XXXXXXo@@@@@@@@@@@##Xo++XXXX",
+"XXXXXo@@@@@@@@@@@@##XXo+XXXX",
+"XXXXXo@@@@@@@@@@@@##XXoXXXXX",
+"XXXXXo@@@@@@@@@@@@##XXo+XXXX",
+"XXXXXo@@@@@@@@@@@@##XXo+XXXX",
+"XXXXXo@@@@@@o@@oo@##XXo+XXXX",
+"XXXXXo@@@o@@o@oooo##XXo+XXXX",
+"XXXXXo@@@@o@oo@ooo##XXo+XXXX",
+"XXXXXo@@@@@oooooo@##XXo+XXXX",
+"XXXXXo@ooo@ooooo@@##XXo+XXXX",
+"XXXXXo@@@oo@oooooo##XXo+XXXX",
+"XXXXXo@@o@ooooo@@@##XXo+XXXX",
+"XXXXXo@oooooo@@o@@##XXo+XXXX",
+"XXXXXo@oooooo@@@o@##XXo+XXXX",
+"XXXXXo@ooooooo@@@@##XXo+XXXX",
+"XXXXXo@ooooo@o@@@@##XXo+XXXX",
+"XXXXXo@@ooo@@o@@@@##XXo+XXXX",
+"XXXXXo@@@@@@@@@@@@##XXo+XXXX",
+"XXXXXXoooooooooooooooo++XXXX",
+"XXXXXX++++++++++++++++++XXXX",
+"XXXXXXX++++++++++++++++XXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/disk-cap-up.xpm b/etc/toolbar/disk-cap-up.xpm
new file mode 100644 (file)
index 0000000..66c06f4
--- /dev/null
@@ -0,0 +1,42 @@
+/* XPM */
+static char * disk[] = {
+"33 33 6 1",
+"X     c Gray75 s backgroundToolBarColor",
+"u     c #000000000000 s foregroundToolBarColor",
+"o     c black",
+"O     c Gray60",
+"+     c Gray90",
+"@     c Gray40",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXooooooooooooooooooXXXXXXX",
+"XXXXXXXXoOOo++++++++++oOOoXXXXXXX",
+"XXXXXXXXoOOo++++++++++oOOoXXXXXXX",
+"XXXXXXXXoOOo++++++++++oOooXXXXXXX",
+"XXXXXXXXoOOo++++++++++oOOoXXXXXXX",
+"XXXXXXXXoOOo++++++++++oOOoXXXXXXX",
+"XXXXXXXXoOOo++++++++++oOOoXXXXXXX",
+"XXXXXXXXoOOo++++++++++oOOoXXXXXXX",
+"XXXXXXXXoOOo++++++++++oOOoXXXXXXX",
+"XXXXXXXXoOOooooooooooooOOoXXXXXXX",
+"XXXXXXXXoOOOOOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXXoOOOOOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXXoOOooooooooooooOOoXXXXXXX",
+"XXXXXXXXoOOo@@@@@@@o++oOOoXXXXXXX",
+"XXXXXXXXoOOo@@@@@@@o++oOOoXXXXXXX",
+"XXXXXXXXoOOo@@@@@@@o++oOOoXXXXXXX",
+"XXXXXXXXXoOo@@@@@@@o++oOOoXXXXXXX",
+"XXXXXXXXXXooooooooooooooooXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXuuuXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXuXXXXuuXXuXXuXXuXXXXXXXXX",
+"XXXXXXXXuuuXXXXuXuXXuXuXuXXXXXXXX",
+"XXXXXXXXXXXuXuuuXuXXuXuuuXXXXXXXX",
+"XXXXXXXXXXXuXuXuXuXuXXuXXXXXXXXXX",
+"XXXXXXXXuuuXXuuXuXuXXXXuuXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/disk-cap-xx.xpm b/etc/toolbar/disk-cap-xx.xpm
new file mode 100644 (file)
index 0000000..aba35ac
--- /dev/null
@@ -0,0 +1,41 @@
+/* XPM */
+static char * disk[] = {
+"33 33 5 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c Gray60",
+"+     c Gray90",
+"@     c Gray40",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXooooooooooooooooooXXXXXXX",
+"XXXXXXXXoOOo++++++++++oOOoXXXXXXX",
+"XXXXXXXXoOOo++++++++++oOOoXXXXXXX",
+"XXXXXXXXoOOo++++++++++oOooXXXXXXX",
+"XXXXXXXXoOOo++++++++++oOOoXXXXXXX",
+"XXXXXXXXoOOo++++++++++oOOoXXXXXXX",
+"XXXXXXXXoOOo++++++++++oOOoXXXXXXX",
+"XXXXXXXXoOOo++++++++++oOOoXXXXXXX",
+"XXXXXXXXoOOo++++++++++oOOoXXXXXXX",
+"XXXXXXXXoOOooooooooooooOOoXXXXXXX",
+"XXXXXXXXoOOOOOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXXoOOOOOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXXoOOooooooooooooOOoXXXXXXX",
+"XXXXXXXXoOOo@@@@@@@o++oOOoXXXXXXX",
+"XXXXXXXXoOOo@@@@@@@o++oOOoXXXXXXX",
+"XXXXXXXXoOOo@@@@@@@o++oOOoXXXXXXX",
+"XXXXXXXXXoOo@@@@@@@o++oOOoXXXXXXX",
+"XXXXXXXXXXooooooooooooooooXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXoooXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXoXXXXooXXoXXoXXoXXXXXXXXX",
+"XXXXXXXXoooXXXXoXoXXoXoXoXXXXXXXX",
+"XXXXXXXXXXXoXoooXoXXoXoooXXXXXXXX",
+"XXXXXXXXXXXoXoXoXoXoXXoXXXXXXXXXX",
+"XXXXXXXXoooXXooXoXoXXXXooXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/disk-dn.xbm b/etc/toolbar/disk-dn.xbm
new file mode 100644 (file)
index 0000000..01b52a2
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,
+ 0x0f,0xff,0xff,0xff,0x0f,0x1f,0x00,0x80,0x0f,0xdf,0xfe,0xb7,0x0f,0xdf,0xfe,
+ 0xb7,0x0f,0xdf,0xfe,0x97,0x0f,0xdf,0xfe,0xb7,0x0f,0xdf,0xfe,0xb7,0x0f,0xdf,
+ 0xfe,0xb7,0x0f,0xdf,0xfe,0xb7,0x0f,0xdf,0xfe,0xb7,0x0f,0xdf,0x00,0xb0,0x0f,
+ 0xdf,0xff,0xbf,0x0f,0xdf,0xff,0xbf,0x0f,0xdf,0x00,0xb0,0x0f,0xdf,0xfe,0xb6,
+ 0x0f,0xdf,0xfe,0xb6,0x0f,0xdf,0xfe,0xb6,0x0f,0xbf,0xfe,0xb6,0x0f,0x7f,0x00,
+ 0x80,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,
+ 0xff,0xff,0x0f,0xff,0xff,0xff,0x0f};
diff --git a/etc/toolbar/disk-up.xbm b/etc/toolbar/disk-up.xbm
new file mode 100644 (file)
index 0000000..19a6f9d
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xe0,0xff,0x7f,0x00,0x20,0x01,0x48,0x00,0x20,0x01,
+ 0x48,0x00,0x20,0x01,0x68,0x00,0x20,0x01,0x48,0x00,0x20,0x01,0x48,0x00,0x20,
+ 0x01,0x48,0x00,0x20,0x01,0x48,0x00,0x20,0x01,0x48,0x00,0x20,0xff,0x4f,0x00,
+ 0x20,0x00,0x40,0x00,0x20,0x00,0x40,0x00,0x20,0xff,0x4f,0x00,0x20,0x01,0x49,
+ 0x00,0x20,0x01,0x49,0x00,0x20,0x01,0x49,0x00,0x40,0x01,0x49,0x00,0x80,0xff,
+ 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/disk-up.xpm b/etc/toolbar/disk-up.xpm
new file mode 100644 (file)
index 0000000..c82cf2c
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * disk[] = {
+"28 28 5 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c black",
+"O     c Gray60",
+"+     c Gray90",
+"@     c Gray40",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXooooooooooooooooooXXXXX",
+"XXXXXoOOo++++++++++oOOoXXXXX",
+"XXXXXoOOo++++++++++oOOoXXXXX",
+"XXXXXoOOo++++++++++oOooXXXXX",
+"XXXXXoOOo++++++++++oOOoXXXXX",
+"XXXXXoOOo++++++++++oOOoXXXXX",
+"XXXXXoOOo++++++++++oOOoXXXXX",
+"XXXXXoOOo++++++++++oOOoXXXXX",
+"XXXXXoOOo++++++++++oOOoXXXXX",
+"XXXXXoOOooooooooooooOOoXXXXX",
+"XXXXXoOOOOOOOOOOOOOOOOoXXXXX",
+"XXXXXoOOOOOOOOOOOOOOOOoXXXXX",
+"XXXXXoOOooooooooooooOOoXXXXX",
+"XXXXXoOOo@@@@@@@o++oOOoXXXXX",
+"XXXXXoOOo@@@@@@@o++oOOoXXXXX",
+"XXXXXoOOo@@@@@@@o++oOOoXXXXX",
+"XXXXXXoOo@@@@@@@o++oOOoXXXXX",
+"XXXXXXXooooooooooooooooXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/disk-xx.xbm b/etc/toolbar/disk-xx.xbm
new file mode 100644 (file)
index 0000000..0c6074d
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x48,0x00,0x00,0x00,
+ 0x00,0x00,0x20,0x01,0x68,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x48,0x00,0x00,
+ 0x00,0x00,0x00,0x20,0x01,0x48,0x00,0x00,0x00,0x00,0x00,0x20,0xff,0x4f,0x00,
+ 0x00,0x00,0x00,0x00,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x49,
+ 0x00,0x00,0x00,0x00,0x00,0x20,0x01,0x49,0x00,0x00,0x00,0x00,0x00,0x80,0xff,
+ 0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/disk-xx.xpm b/etc/toolbar/disk-xx.xpm
new file mode 100644 (file)
index 0000000..eca0709
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * disk[] = {
+"28 28 5 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c Gray60",
+"+     c Gray90",
+"@     c Gray40",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXooooooooooooooooooXXXXX",
+"XXXXXoOOo++++++++++oOOoXXXXX",
+"XXXXXoOOo++++++++++oOOoXXXXX",
+"XXXXXoOOo++++++++++oOooXXXXX",
+"XXXXXoOOo++++++++++oOOoXXXXX",
+"XXXXXoOOo++++++++++oOOoXXXXX",
+"XXXXXoOOo++++++++++oOOoXXXXX",
+"XXXXXoOOo++++++++++oOOoXXXXX",
+"XXXXXoOOo++++++++++oOOoXXXXX",
+"XXXXXoOOooooooooooooOOoXXXXX",
+"XXXXXoOOOOOOOOOOOOOOOOoXXXXX",
+"XXXXXoOOOOOOOOOOOOOOOOoXXXXX",
+"XXXXXoOOooooooooooooOOoXXXXX",
+"XXXXXoOOo@@@@@@@o++oOOoXXXXX",
+"XXXXXoOOo@@@@@@@o++oOOoXXXXX",
+"XXXXXoOOo@@@@@@@o++oOOoXXXXX",
+"XXXXXXoOo@@@@@@@o++oOOoXXXXX",
+"XXXXXXXooooooooooooooooXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/file-cap-up.xpm b/etc/toolbar/file-cap-up.xpm
new file mode 100644 (file)
index 0000000..f52b15a
--- /dev/null
@@ -0,0 +1,41 @@
+/* XPM */
+static char * file[] = {
+"33 33 5 1",
+"X     c Gray75 s backgroundToolBarColor",
+"u     c #000000000000 s foregroundToolBarColor",
+"o     c black",
+"O     c white",
+"+     c Gray60",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXooooooooooXXXXXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOooXXXXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOo+oXXXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOo++oXXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOoooooXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXooooooooooooooXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXuuuXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXuXXXuXuuuXXXuXXuuuXXXXXXX",
+"XXXXXXXXuXXXuXuXXuXuXuXuXXuXXXXXX",
+"XXXXXXXXuXXXuXuXXuXuuuXuXXuXXXXXX",
+"XXXXXXXXuXXXuXuXXuXuXXXuXXuXXXXXX",
+"XXXXXXXXXuuuXXuuuXXXuuXuXXuXXXXXX",
+"XXXXXXXXXXXXXXuXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/file-cap-xx.xpm b/etc/toolbar/file-cap-xx.xpm
new file mode 100644 (file)
index 0000000..13923ee
--- /dev/null
@@ -0,0 +1,40 @@
+/* XPM */
+static char * file[] = {
+"33 33 4 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c white",
+"+     c Gray60",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXooooooooooXXXXXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOooXXXXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOo+oXXXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOo++oXXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOoooooXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXooooooooooooooXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXoooXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXoXXXoXoooXXXoXXoooXXXXXXX",
+"XXXXXXXXoXXXoXoXXoXoXoXoXXoXXXXXX",
+"XXXXXXXXoXXXoXoXXoXoooXoXXoXXXXXX",
+"XXXXXXXXoXXXoXoXXoXoXXXoXXoXXXXXX",
+"XXXXXXXXXoooXXoooXXXooXoXXoXXXXXX",
+"XXXXXXXXXXXXXXoXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/file-dn.xbm b/etc/toolbar/file-dn.xbm
new file mode 100644 (file)
index 0000000..0de263d
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,
+ 0x0f,0xff,0xff,0xff,0x0f,0x7f,0x00,0xfe,0x0f,0x7f,0xff,0xfc,0x0f,0x7f,0xff,
+ 0xfa,0x0f,0x7f,0xff,0xf6,0x0f,0x7f,0xff,0xe0,0x0f,0x7f,0xff,0xef,0x0f,0x7f,
+ 0xff,0xef,0x0f,0x7f,0xff,0xef,0x0f,0x7f,0xff,0xef,0x0f,0x7f,0xff,0xef,0x0f,
+ 0x7f,0xff,0xef,0x0f,0x7f,0xff,0xef,0x0f,0x7f,0xff,0xef,0x0f,0x7f,0xff,0xef,
+ 0x0f,0x7f,0xff,0xef,0x0f,0x7f,0xff,0xef,0x0f,0x7f,0xff,0xef,0x0f,0x7f,0x00,
+ 0xe0,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,
+ 0xff,0xff,0x0f,0xff,0xff,0xff,0x0f};
diff --git a/etc/toolbar/file-up.xbm b/etc/toolbar/file-up.xbm
new file mode 100644 (file)
index 0000000..d1c0bcb
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x01,0x00,0x80,0x00,0x03,0x00,0x80,0x00,
+ 0x05,0x00,0x80,0x00,0x09,0x00,0x80,0x00,0x1f,0x00,0x80,0x00,0x10,0x00,0x80,
+ 0x00,0x10,0x00,0x80,0x00,0x10,0x00,0x80,0x00,0x10,0x00,0x80,0x00,0x10,0x00,
+ 0x80,0x00,0x10,0x00,0x80,0x00,0x10,0x00,0x80,0x00,0x10,0x00,0x80,0x00,0x10,
+ 0x00,0x80,0x00,0x10,0x00,0x80,0x00,0x10,0x00,0x80,0x00,0x10,0x00,0x80,0xff,
+ 0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/file-up.xpm b/etc/toolbar/file-up.xpm
new file mode 100644 (file)
index 0000000..e438dd6
--- /dev/null
@@ -0,0 +1,35 @@
+/* XPM */
+static char * file[] = {
+"28 28 4 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c black",
+"O     c white",
+"+     c Gray60",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXooooooooooXXXXXXXXXXX",
+"XXXXXXXoOOOOOOOOooXXXXXXXXXX",
+"XXXXXXXoOOOOOOOOo+oXXXXXXXXX",
+"XXXXXXXoOOOOOOOOo++oXXXXXXXX",
+"XXXXXXXoOOOOOOOOoooooXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXooooooooooooooXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/file-xx.xbm b/etc/toolbar/file-xx.xbm
new file mode 100644 (file)
index 0000000..92e85cb
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x01,0x00,0x00,0x00,0x00,0x00,0x80,0x00,
+ 0x05,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x1f,0x00,0x00,0x00,0x00,0x00,0x80,
+ 0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x10,0x00,0x00,0x00,0x00,0x00,
+ 0x80,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x10,0x00,0x00,0x00,0x00,
+ 0x00,0x80,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x10,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/file-xx.xpm b/etc/toolbar/file-xx.xpm
new file mode 100644 (file)
index 0000000..3d2854d
--- /dev/null
@@ -0,0 +1,35 @@
+/* XPM */
+static char * file[] = {
+"28 28 4 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c white",
+"+     c Gray60",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXooooooooooXXXXXXXXXXX",
+"XXXXXXXoOOOOOOOOooXXXXXXXXXX",
+"XXXXXXXoOOOOOOOOo+oXXXXXXXXX",
+"XXXXXXXoOOOOOOOOo++oXXXXXXXX",
+"XXXXXXXoOOOOOOOOoooooXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXooooooooooooooXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/folder-cap-up.xpm b/etc/toolbar/folder-cap-up.xpm
new file mode 100644 (file)
index 0000000..7ec8516
--- /dev/null
@@ -0,0 +1,41 @@
+/* XPM */
+static char * folder[] = {
+"33 33 5 1",
+"X     c Gray75 s backgroundToolBarColor",
+"u     c #000000000000 s foregroundToolBarColor",
+"o     c black",
+"O     c white",
+"+     c Gray60",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXoXXXXXXXooXXXXXooXXXXX",
+"XXXXXXXXoooOoXXXoooOoXXooo+oXXXXX",
+"XXXXXXooOOOOooooOOOoooo++++oXXXXX",
+"XXXXXXoOOOOOOOOOooo+++++++oXXXXXX",
+"XXXXXXXoOOOOOOoo++++++++++oXXXXXX",
+"XXXXXXXoOOOOOOo++++ooo+++oXXXXXXX",
+"XXXXXXXoOOOOOOo+ooo++++++oXXXXXXX",
+"XXXXXXXXoOOOOo+++++++++++oXXXXXXX",
+"XXXXXXXXoOOOOo+++oo+++++oXXXXXXXX",
+"XXXXXXXXXoOOo++oo+++++oooXXXXXXXX",
+"XXXXXXXXXoOOo++++++oooXXXXXXXXXXX",
+"XXXXXXXXXoOOo+++oooXXXXXXXXXXXXXX",
+"XXXXXXXXXXoo+oooXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXoooXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXuXXXXXXXXXXXuXXXXXX",
+"XXXXXXXXuuuuXXXXXXXXXXXXXXuXXXXXX",
+"XXXXXXXXuXXXuXuXuXuXuXXXuuuXXXXXX",
+"XXXXXXXXuXXXuXuXuuXuXuXuXXuXXXXXX",
+"XXXXXXXXuXXXuXuXuXXuuuXuXXuXXXXXX",
+"XXXXXXXXuXXXuXuXuXXuXXXuXXuXXXXXX",
+"XXXXXXXXuuuuXXuXuXXXuuXXuuuXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/folder-cap-xx.xpm b/etc/toolbar/folder-cap-xx.xpm
new file mode 100644 (file)
index 0000000..5780ec1
--- /dev/null
@@ -0,0 +1,40 @@
+/* XPM */
+static char * folder[] = {
+"33 33 4 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c white",
+"+     c Gray60",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXoXXXXXXXooXXXXXooXXXXX",
+"XXXXXXXXoooOoXXXoooOoXXooo+oXXXXX",
+"XXXXXXooOOOOooooOOOoooo++++oXXXXX",
+"XXXXXXoOOOOOOOOOooo+++++++oXXXXXX",
+"XXXXXXXoOOOOOOoo++++++++++oXXXXXX",
+"XXXXXXXoOOOOOOo++++ooo+++oXXXXXXX",
+"XXXXXXXoOOOOOOo+ooo++++++oXXXXXXX",
+"XXXXXXXXoOOOOo+++++++++++oXXXXXXX",
+"XXXXXXXXoOOOOo+++oo+++++oXXXXXXXX",
+"XXXXXXXXXoOOo++oo+++++oooXXXXXXXX",
+"XXXXXXXXXoOOo++++++oooXXXXXXXXXXX",
+"XXXXXXXXXoOOo+++oooXXXXXXXXXXXXXX",
+"XXXXXXXXXXoo+oooXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXoooXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoXXXXXXXXXXXoXXXXXX",
+"XXXXXXXXooooXXXXXXXXXXXXXXoXXXXXX",
+"XXXXXXXXoXXXoXoXoXoXoXXXoooXXXXXX",
+"XXXXXXXXoXXXoXoXooXoXoXoXXoXXXXXX",
+"XXXXXXXXoXXXoXoXoXXoooXoXXoXXXXXX",
+"XXXXXXXXoXXXoXoXoXXoXXXoXXoXXXXXX",
+"XXXXXXXXooooXXoXoXXXooXXoooXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/folder-dn.xbm b/etc/toolbar/folder-dn.xbm
new file mode 100644 (file)
index 0000000..1187fe9
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,
+ 0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xfe,
+ 0x7c,0x0e,0x1f,0x1d,0x8d,0x0e,0xe7,0xe1,0xf0,0x0e,0xf7,0x1f,0x7f,0x0f,0xef,
+ 0xe7,0x7f,0x0f,0xef,0xf7,0xb8,0x0f,0xef,0x17,0xbf,0x0f,0xdf,0xfb,0xbf,0x0f,
+ 0xdf,0x3b,0xdf,0x0f,0xbf,0xcd,0xc7,0x0f,0xbf,0xfd,0xf8,0x0f,0xbf,0x1d,0xff,
+ 0x0f,0x7f,0xe2,0xff,0x0f,0x7f,0xfc,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,
+ 0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,
+ 0xff,0xff,0x0f,0xff,0xff,0xff,0x0f};
diff --git a/etc/toolbar/folder-up.xbm b/etc/toolbar/folder-up.xbm
new file mode 100644 (file)
index 0000000..d95e6ab
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
+ 0x83,0x01,0xe0,0xe2,0x72,0x01,0x18,0x1e,0x0f,0x01,0x08,0xe0,0x80,0x00,0x10,
+ 0x18,0x80,0x00,0x10,0x08,0x47,0x00,0x10,0xe8,0x40,0x00,0x20,0x04,0x40,0x00,
+ 0x20,0xc4,0x20,0x00,0x40,0x32,0x38,0x00,0x40,0x02,0x07,0x00,0x40,0xe2,0x00,
+ 0x00,0x80,0x1d,0x00,0x00,0x80,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/folder-up.xpm b/etc/toolbar/folder-up.xpm
new file mode 100644 (file)
index 0000000..cd41285
--- /dev/null
@@ -0,0 +1,35 @@
+/* XPM */
+static char * folder[] = {
+"28 28 4 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c black",
+"O     c white",
+"+     c Gray60",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXoXXXXXXXooXXXXXooXXX",
+"XXXXXoooOoXXXoooOoXXooo+oXXX",
+"XXXooOOOOooooOOOoooo++++oXXX",
+"XXXoOOOOOOOOOooo+++++++oXXXX",
+"XXXXoOOOOOOoo++++++++++oXXXX",
+"XXXXoOOOOOOo++++ooo+++oXXXXX",
+"XXXXoOOOOOOo+ooo++++++oXXXXX",
+"XXXXXoOOOOo+++++++++++oXXXXX",
+"XXXXXoOOOOo+++oo+++++oXXXXXX",
+"XXXXXXoOOo++oo+++++oooXXXXXX",
+"XXXXXXoOOo++++++oooXXXXXXXXX",
+"XXXXXXoOOo+++oooXXXXXXXXXXXX",
+"XXXXXXXoo+oooXXXXXXXXXXXXXXX",
+"XXXXXXXoooXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/folder-xx.xbm b/etc/toolbar/folder-xx.xbm
new file mode 100644 (file)
index 0000000..e472b83
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,
+ 0x83,0x01,0x00,0x00,0x00,0x00,0x18,0x1e,0x0f,0x01,0x00,0x00,0x00,0x00,0x10,
+ 0x18,0x80,0x00,0x00,0x00,0x00,0x00,0x10,0xe8,0x40,0x00,0x00,0x00,0x00,0x00,
+ 0x20,0xc4,0x20,0x00,0x00,0x00,0x00,0x00,0x40,0x02,0x07,0x00,0x00,0x00,0x00,
+ 0x00,0x80,0x1d,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/folder-xx.xpm b/etc/toolbar/folder-xx.xpm
new file mode 100644 (file)
index 0000000..bfb68e7
--- /dev/null
@@ -0,0 +1,35 @@
+/* XPM */
+static char * folder[] = {
+"28 28 4 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c white",
+"+     c Gray60",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXoXXXXXXXooXXXXXooXXX",
+"XXXXXoooOoXXXoooOoXXooo+oXXX",
+"XXXooOOOOooooOOOoooo++++oXXX",
+"XXXoOOOOOOOOOooo+++++++oXXXX",
+"XXXXoOOOOOOoo++++++++++oXXXX",
+"XXXXoOOOOOOo++++ooo+++oXXXXX",
+"XXXXoOOOOOOo+ooo++++++oXXXXX",
+"XXXXXoOOOOo+++++++++++oXXXXX",
+"XXXXXoOOOOo+++oo+++++oXXXXXX",
+"XXXXXXoOOo++oo+++++oooXXXXXX",
+"XXXXXXoOOo++++++oooXXXXXXXXX",
+"XXXXXXoOOo+++oooXXXXXXXXXXXX",
+"XXXXXXXoo+oooXXXXXXXXXXXXXXX",
+"XXXXXXXoooXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/info-def-cap-up.xpm b/etc/toolbar/info-def-cap-up.xpm
new file mode 100644 (file)
index 0000000..1326607
--- /dev/null
@@ -0,0 +1,38 @@
+/* XPM */
+static char * info[] = {
+"33 33 2 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c black s foregroundToolBarColor",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXoXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXoooooooXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXoXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXooooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXoooooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXoooooooXXXXXXXXXXXXX",
+"XXXXXXXXXXXXoooooooooXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXoXXXXXXXXXXXXX",
+"XXXXXXXXXXoXXXXXXXoXXXXXXXXXXXXXX",
+"XXXXXXXXXXoXoooXXoooXooXXXXXXXXXX",
+"XXXXXXXXXXoXoXXoXXoXoXXoXXXXXXXXX",
+"XXXXXXXXXXoXoXXoXXoXoXXoXXXXXXXXX",
+"XXXXXXXXXXoXoXXoXXoXoXXoXXXXXXXXX",
+"XXXXXXXXXXoXoXXoXXoXXooXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/info-def-cap-xx.xpm b/etc/toolbar/info-def-cap-xx.xpm
new file mode 100644 (file)
index 0000000..4dea027
--- /dev/null
@@ -0,0 +1,38 @@
+/* XPM */
+static char * info[] = {
+"33 33 2 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXoXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXoooooooXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXoXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXooooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXoooooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoooooXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXoooooooXXXXXXXXXXXXX",
+"XXXXXXXXXXXXoooooooooXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXoXXXXXXXXXXXXX",
+"XXXXXXXXXXoXXXXXXXoXXXXXXXXXXXXXX",
+"XXXXXXXXXXoXoooXXoooXooXXXXXXXXXX",
+"XXXXXXXXXXoXoXXoXXoXoXXoXXXXXXXXX",
+"XXXXXXXXXXoXoXXoXXoXoXXoXXXXXXXXX",
+"XXXXXXXXXXoXoXXoXXoXoXXoXXXXXXXXX",
+"XXXXXXXXXXoXoXXoXXoXXooXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/info-def-dn.xbm b/etc/toolbar/info-def-dn.xbm
new file mode 100644 (file)
index 0000000..3427bd1
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xdf,0xff,
+ 0x0f,0xff,0x07,0xff,0x0f,0xff,0x07,0xff,0x0f,0xff,0x03,0xfe,0x0f,0xff,0x07,
+ 0xff,0x0f,0xff,0x07,0xff,0x0f,0xff,0xdf,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,
+ 0x03,0xff,0x0f,0xff,0x01,0xff,0x0f,0xff,0x07,0xff,0x0f,0xff,0x07,0xff,0x0f,
+ 0xff,0x07,0xff,0x0f,0xff,0x07,0xff,0x0f,0xff,0x07,0xff,0x0f,0xff,0x07,0xff,
+ 0x0f,0xff,0x07,0xff,0x0f,0xff,0x07,0xff,0x0f,0xff,0x07,0xff,0x0f,0xff,0x03,
+ 0xfe,0x0f,0xff,0x01,0xfc,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,
+ 0xff,0xff,0x0f,0xff,0xff,0xff,0x0f};
diff --git a/etc/toolbar/info-def-up.xbm b/etc/toolbar/info-def-up.xbm
new file mode 100644 (file)
index 0000000..4a4d4eb
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0xfc,0x01,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xfc,0x00,0x00,0x00,0xfe,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0xf8,0x00,0x00,
+ 0x00,0xf8,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0xf8,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0xfc,
+ 0x01,0x00,0x00,0xfe,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/info-def-up.xpm b/etc/toolbar/info-def-up.xpm
new file mode 100644 (file)
index 0000000..d5d294b
--- /dev/null
@@ -0,0 +1,33 @@
+/* XPM */
+static char * info[] = {
+"28 28 2 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c black s foregroundToolBarColor",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXoXXXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXoooooooXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXXXoXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXooooooXXXXXXXXXXXX",
+"XXXXXXXXXoooooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXoooooooXXXXXXXXXXX",
+"XXXXXXXXXoooooooooXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/info-def-xx.xbm b/etc/toolbar/info-def-xx.xbm
new file mode 100644 (file)
index 0000000..7ffb321
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0xfc,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xf8,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0xfe,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/info-def-xx.xpm b/etc/toolbar/info-def-xx.xpm
new file mode 100644 (file)
index 0000000..e37631f
--- /dev/null
@@ -0,0 +1,33 @@
+/* XPM */
+static char * info[] = {
+"28 28 2 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXoXXXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXoooooooXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXXXoXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXooooooXXXXXXXXXXXX",
+"XXXXXXXXXoooooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXXoooooXXXXXXXXXXXX",
+"XXXXXXXXXXoooooooXXXXXXXXXXX",
+"XXXXXXXXXoooooooooXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/info-exit-cap-up.xpm b/etc/toolbar/info-exit-cap-up.xpm
new file mode 100644 (file)
index 0000000..2d0a1a5
--- /dev/null
@@ -0,0 +1,43 @@
+/* XPM */
+static char *exit-up[] = {
+/* width height num_colors chars_per_pixel */
+"32 32 6 1",
+". c #555555",
+"# c #a9a9a9",
+"a c #cbcbcb s backgroundToolBarColor",
+"b c #dcdcdc",
+"c c #ff0000",
+"d c #ffff00",
+"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+"aaaa########################aaaa",
+"aaaa########################.aaa",
+"aaaa##aaaaaaaaaaaaaaaaaaaa##.aaa",
+"aaaa##a##################a##.aaa",
+"aaaa##a#................#a##.aaa",
+"aaaa##a#.aaaaaaaaaaaaaab#a##.aaa",
+"aaaa##a#.acccacacacacccb#a##.aaa",
+"aaaa##a#.acaaaacaacaacab#a##.aaa",
+"aaaa##a#.accaaacaacaacab#a##.aaa",
+"aaaa##a#.acaaaacaacaacab#a##.aaa",
+"aaaa##a#.acccacacacaacab#a##.aaa",
+"aaaa##a#.aaaaaaaaaaaaaab#a##.aaa",
+"aaaa##a#bbbbbbbbbbbbbbbb#a##.aaa",
+"aaaa##a##############ddd#a##.aaa",
+"aaaa##aaaaaaaaaaaaaaadddaa##.aaa",
+"aaaa##a#########a####ddd#a##.aaa",
+"aaaa##a#......b#a#......#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#bbbbbbb#a#bbbbbb#a##.aaa",
+"aaaa##a#########a########a##.aaa",
+"aaaa##aaaaaaaaaaaaaaaaaaaa##.aaa",
+"aaaa########################.aaa",
+"aaaa########################.aaa",
+"aaaaa........................aaa",
+"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+};
diff --git a/etc/toolbar/info-exit-cap-xx.xpm b/etc/toolbar/info-exit-cap-xx.xpm
new file mode 100644 (file)
index 0000000..2d0a1a5
--- /dev/null
@@ -0,0 +1,43 @@
+/* XPM */
+static char *exit-up[] = {
+/* width height num_colors chars_per_pixel */
+"32 32 6 1",
+". c #555555",
+"# c #a9a9a9",
+"a c #cbcbcb s backgroundToolBarColor",
+"b c #dcdcdc",
+"c c #ff0000",
+"d c #ffff00",
+"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+"aaaa########################aaaa",
+"aaaa########################.aaa",
+"aaaa##aaaaaaaaaaaaaaaaaaaa##.aaa",
+"aaaa##a##################a##.aaa",
+"aaaa##a#................#a##.aaa",
+"aaaa##a#.aaaaaaaaaaaaaab#a##.aaa",
+"aaaa##a#.acccacacacacccb#a##.aaa",
+"aaaa##a#.acaaaacaacaacab#a##.aaa",
+"aaaa##a#.accaaacaacaacab#a##.aaa",
+"aaaa##a#.acaaaacaacaacab#a##.aaa",
+"aaaa##a#.acccacacacaacab#a##.aaa",
+"aaaa##a#.aaaaaaaaaaaaaab#a##.aaa",
+"aaaa##a#bbbbbbbbbbbbbbbb#a##.aaa",
+"aaaa##a##############ddd#a##.aaa",
+"aaaa##aaaaaaaaaaaaaaadddaa##.aaa",
+"aaaa##a#########a####ddd#a##.aaa",
+"aaaa##a#......b#a#......#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#bbbbbbb#a#bbbbbb#a##.aaa",
+"aaaa##a#########a########a##.aaa",
+"aaaa##aaaaaaaaaaaaaaaaaaaa##.aaa",
+"aaaa########################.aaa",
+"aaaa########################.aaa",
+"aaaaa........................aaa",
+"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+};
diff --git a/etc/toolbar/info-exit-dn.xbm b/etc/toolbar/info-exit-dn.xbm
new file mode 100644 (file)
index 0000000..6f24d28
--- /dev/null
@@ -0,0 +1,12 @@
+#define noname_width 32
+#define noname_height 32
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0xff,0xff,0x10,0x00,0x01,
+ 0x00,0x10,0x00,0x5d,0x75,0x10,0x00,0x85,0x24,0x10,0x00,0x8d,0x24,0x10,0x00,
+ 0x85,0x24,0x10,0x00,0x5d,0x25,0x10,0x00,0x01,0x00,0x10,0x00,0x00,0x00,0x10,
+ 0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x3f,0xfc,
+ 0x10,0x00,0x01,0x04,0x10,0x00,0x01,0x04,0x10,0x00,0x01,0x04,0x10,0x00,0x01,
+ 0x04,0x10,0x00,0x01,0x04,0x10,0x00,0x01,0x04,0x10,0x00,0x00,0x00,0x10,0x00,
+ 0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,
+ 0xe0,0xff,0xff,0x1f,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/info-exit-up.xbm b/etc/toolbar/info-exit-up.xbm
new file mode 100644 (file)
index 0000000..6f24d28
--- /dev/null
@@ -0,0 +1,12 @@
+#define noname_width 32
+#define noname_height 32
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0xff,0xff,0x10,0x00,0x01,
+ 0x00,0x10,0x00,0x5d,0x75,0x10,0x00,0x85,0x24,0x10,0x00,0x8d,0x24,0x10,0x00,
+ 0x85,0x24,0x10,0x00,0x5d,0x25,0x10,0x00,0x01,0x00,0x10,0x00,0x00,0x00,0x10,
+ 0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x3f,0xfc,
+ 0x10,0x00,0x01,0x04,0x10,0x00,0x01,0x04,0x10,0x00,0x01,0x04,0x10,0x00,0x01,
+ 0x04,0x10,0x00,0x01,0x04,0x10,0x00,0x01,0x04,0x10,0x00,0x00,0x00,0x10,0x00,
+ 0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,
+ 0xe0,0xff,0xff,0x1f,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/info-exit-up.xpm b/etc/toolbar/info-exit-up.xpm
new file mode 100644 (file)
index 0000000..2d0a1a5
--- /dev/null
@@ -0,0 +1,43 @@
+/* XPM */
+static char *exit-up[] = {
+/* width height num_colors chars_per_pixel */
+"32 32 6 1",
+". c #555555",
+"# c #a9a9a9",
+"a c #cbcbcb s backgroundToolBarColor",
+"b c #dcdcdc",
+"c c #ff0000",
+"d c #ffff00",
+"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+"aaaa########################aaaa",
+"aaaa########################.aaa",
+"aaaa##aaaaaaaaaaaaaaaaaaaa##.aaa",
+"aaaa##a##################a##.aaa",
+"aaaa##a#................#a##.aaa",
+"aaaa##a#.aaaaaaaaaaaaaab#a##.aaa",
+"aaaa##a#.acccacacacacccb#a##.aaa",
+"aaaa##a#.acaaaacaacaacab#a##.aaa",
+"aaaa##a#.accaaacaacaacab#a##.aaa",
+"aaaa##a#.acaaaacaacaacab#a##.aaa",
+"aaaa##a#.acccacacacaacab#a##.aaa",
+"aaaa##a#.aaaaaaaaaaaaaab#a##.aaa",
+"aaaa##a#bbbbbbbbbbbbbbbb#a##.aaa",
+"aaaa##a##############ddd#a##.aaa",
+"aaaa##aaaaaaaaaaaaaaadddaa##.aaa",
+"aaaa##a#########a####ddd#a##.aaa",
+"aaaa##a#......b#a#......#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#bbbbbbb#a#bbbbbb#a##.aaa",
+"aaaa##a#########a########a##.aaa",
+"aaaa##aaaaaaaaaaaaaaaaaaaa##.aaa",
+"aaaa########################.aaa",
+"aaaa########################.aaa",
+"aaaaa........................aaa",
+"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+};
diff --git a/etc/toolbar/info-exit-xx.xbm b/etc/toolbar/info-exit-xx.xbm
new file mode 100644 (file)
index 0000000..6f24d28
--- /dev/null
@@ -0,0 +1,12 @@
+#define noname_width 32
+#define noname_height 32
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0xff,0xff,0x10,0x00,0x01,
+ 0x00,0x10,0x00,0x5d,0x75,0x10,0x00,0x85,0x24,0x10,0x00,0x8d,0x24,0x10,0x00,
+ 0x85,0x24,0x10,0x00,0x5d,0x25,0x10,0x00,0x01,0x00,0x10,0x00,0x00,0x00,0x10,
+ 0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x3f,0xfc,
+ 0x10,0x00,0x01,0x04,0x10,0x00,0x01,0x04,0x10,0x00,0x01,0x04,0x10,0x00,0x01,
+ 0x04,0x10,0x00,0x01,0x04,0x10,0x00,0x01,0x04,0x10,0x00,0x00,0x00,0x10,0x00,
+ 0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,
+ 0xe0,0xff,0xff,0x1f,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/info-exit-xx.xpm b/etc/toolbar/info-exit-xx.xpm
new file mode 100644 (file)
index 0000000..2d0a1a5
--- /dev/null
@@ -0,0 +1,43 @@
+/* XPM */
+static char *exit-up[] = {
+/* width height num_colors chars_per_pixel */
+"32 32 6 1",
+". c #555555",
+"# c #a9a9a9",
+"a c #cbcbcb s backgroundToolBarColor",
+"b c #dcdcdc",
+"c c #ff0000",
+"d c #ffff00",
+"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+"aaaa########################aaaa",
+"aaaa########################.aaa",
+"aaaa##aaaaaaaaaaaaaaaaaaaa##.aaa",
+"aaaa##a##################a##.aaa",
+"aaaa##a#................#a##.aaa",
+"aaaa##a#.aaaaaaaaaaaaaab#a##.aaa",
+"aaaa##a#.acccacacacacccb#a##.aaa",
+"aaaa##a#.acaaaacaacaacab#a##.aaa",
+"aaaa##a#.accaaacaacaacab#a##.aaa",
+"aaaa##a#.acaaaacaacaacab#a##.aaa",
+"aaaa##a#.acccacacacaacab#a##.aaa",
+"aaaa##a#.aaaaaaaaaaaaaab#a##.aaa",
+"aaaa##a#bbbbbbbbbbbbbbbb#a##.aaa",
+"aaaa##a##############ddd#a##.aaa",
+"aaaa##aaaaaaaaaaaaaaadddaa##.aaa",
+"aaaa##a#########a####ddd#a##.aaa",
+"aaaa##a#......b#a#......#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#bbbbbbb#a#bbbbbb#a##.aaa",
+"aaaa##a#########a########a##.aaa",
+"aaaa##aaaaaaaaaaaaaaaaaaaa##.aaa",
+"aaaa########################.aaa",
+"aaaa########################.aaa",
+"aaaaa........................aaa",
+"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+};
diff --git a/etc/toolbar/info-exit.xbm b/etc/toolbar/info-exit.xbm
new file mode 100644 (file)
index 0000000..6f24d28
--- /dev/null
@@ -0,0 +1,12 @@
+#define noname_width 32
+#define noname_height 32
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0xff,0xff,0x10,0x00,0x01,
+ 0x00,0x10,0x00,0x5d,0x75,0x10,0x00,0x85,0x24,0x10,0x00,0x8d,0x24,0x10,0x00,
+ 0x85,0x24,0x10,0x00,0x5d,0x25,0x10,0x00,0x01,0x00,0x10,0x00,0x00,0x00,0x10,
+ 0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x3f,0xfc,
+ 0x10,0x00,0x01,0x04,0x10,0x00,0x01,0x04,0x10,0x00,0x01,0x04,0x10,0x00,0x01,
+ 0x04,0x10,0x00,0x01,0x04,0x10,0x00,0x01,0x04,0x10,0x00,0x00,0x00,0x10,0x00,
+ 0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x10,
+ 0xe0,0xff,0xff,0x1f,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/info-exit.xpm b/etc/toolbar/info-exit.xpm
new file mode 100644 (file)
index 0000000..2d0a1a5
--- /dev/null
@@ -0,0 +1,43 @@
+/* XPM */
+static char *exit-up[] = {
+/* width height num_colors chars_per_pixel */
+"32 32 6 1",
+". c #555555",
+"# c #a9a9a9",
+"a c #cbcbcb s backgroundToolBarColor",
+"b c #dcdcdc",
+"c c #ff0000",
+"d c #ffff00",
+"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
+"aaaa########################aaaa",
+"aaaa########################.aaa",
+"aaaa##aaaaaaaaaaaaaaaaaaaa##.aaa",
+"aaaa##a##################a##.aaa",
+"aaaa##a#................#a##.aaa",
+"aaaa##a#.aaaaaaaaaaaaaab#a##.aaa",
+"aaaa##a#.acccacacacacccb#a##.aaa",
+"aaaa##a#.acaaaacaacaacab#a##.aaa",
+"aaaa##a#.accaaacaacaacab#a##.aaa",
+"aaaa##a#.acaaaacaacaacab#a##.aaa",
+"aaaa##a#.acccacacacaacab#a##.aaa",
+"aaaa##a#.aaaaaaaaaaaaaab#a##.aaa",
+"aaaa##a#bbbbbbbbbbbbbbbb#a##.aaa",
+"aaaa##a##############ddd#a##.aaa",
+"aaaa##aaaaaaaaaaaaaaadddaa##.aaa",
+"aaaa##a#########a####ddd#a##.aaa",
+"aaaa##a#......b#a#......#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#.aaaaab#a#.aaaab#a##.aaa",
+"aaaa##a#bbbbbbb#a#bbbbbb#a##.aaa",
+"aaaa##a#########a########a##.aaa",
+"aaaa##aaaaaaaaaaaaaaaaaaaa##.aaa",
+"aaaa########################.aaa",
+"aaaa########################.aaa",
+"aaaaa........................aaa",
+"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
+};
diff --git a/etc/toolbar/info-next-cap-up.xpm b/etc/toolbar/info-next-cap-up.xpm
new file mode 100644 (file)
index 0000000..03d67d5
--- /dev/null
@@ -0,0 +1,38 @@
+/* XPM */
+static char * file[] = {
+/* width height num_colors chars_per_pixel */
+"28 28 5 1",
+"      c Gray75 s backgroundToolBarColor",
+".     c black",
+"X     c white",
+"o     c black",
+"O     c black",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                .           ",
+"                ..          ",
+"                .X.         ",
+"     ............XX.        ",
+"     .XXXXXXXXXXXXoX.       ",
+"     .XoooooooooooooX.      ",
+"     .Xooooooooooooooo.     ",
+"     .XoooooooooooooO.      ",
+"     .oOOOOOOOOOOOoO.       ",
+"     ............OO.        ",
+"                .O.         ",
+"                ..          ",
+"                .           ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            "
+};
diff --git a/etc/toolbar/info-next-cap-xx.xpm b/etc/toolbar/info-next-cap-xx.xpm
new file mode 100644 (file)
index 0000000..03d67d5
--- /dev/null
@@ -0,0 +1,38 @@
+/* XPM */
+static char * file[] = {
+/* width height num_colors chars_per_pixel */
+"28 28 5 1",
+"      c Gray75 s backgroundToolBarColor",
+".     c black",
+"X     c white",
+"o     c black",
+"O     c black",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                .           ",
+"                ..          ",
+"                .X.         ",
+"     ............XX.        ",
+"     .XXXXXXXXXXXXoX.       ",
+"     .XoooooooooooooX.      ",
+"     .Xooooooooooooooo.     ",
+"     .XoooooooooooooO.      ",
+"     .oOOOOOOOOOOOoO.       ",
+"     ............OO.        ",
+"                .O.         ",
+"                ..          ",
+"                .           ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            "
+};
diff --git a/etc/toolbar/info-next-dn.xbm b/etc/toolbar/info-next-dn.xbm
new file mode 100644 (file)
index 0000000..c261d97
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,
+ 0xf9,0x7f,0x00,0x80,0x02,0x40,0x00,0x40,0xff,0x5f,0x00,0xe0,0xff,0x5f,0x00,
+ 0xc0,0xff,0x5f,0x00,0x80,0xff,0x7f,0x00,0x00,0xff,0x7f,0x00,0x00,0x0e,0x00,
+ 0x00,0x00,0x0c,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/info-next-up.xbm b/etc/toolbar/info-next-up.xbm
new file mode 100644 (file)
index 0000000..c261d97
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,
+ 0xf9,0x7f,0x00,0x80,0x02,0x40,0x00,0x40,0xff,0x5f,0x00,0xe0,0xff,0x5f,0x00,
+ 0xc0,0xff,0x5f,0x00,0x80,0xff,0x7f,0x00,0x00,0xff,0x7f,0x00,0x00,0x0e,0x00,
+ 0x00,0x00,0x0c,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/info-next-up.xpm b/etc/toolbar/info-next-up.xpm
new file mode 100644 (file)
index 0000000..03d67d5
--- /dev/null
@@ -0,0 +1,38 @@
+/* XPM */
+static char * file[] = {
+/* width height num_colors chars_per_pixel */
+"28 28 5 1",
+"      c Gray75 s backgroundToolBarColor",
+".     c black",
+"X     c white",
+"o     c black",
+"O     c black",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                .           ",
+"                ..          ",
+"                .X.         ",
+"     ............XX.        ",
+"     .XXXXXXXXXXXXoX.       ",
+"     .XoooooooooooooX.      ",
+"     .Xooooooooooooooo.     ",
+"     .XoooooooooooooO.      ",
+"     .oOOOOOOOOOOOoO.       ",
+"     ............OO.        ",
+"                .O.         ",
+"                ..          ",
+"                .           ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            "
+};
diff --git a/etc/toolbar/info-next-xx.xbm b/etc/toolbar/info-next-xx.xbm
new file mode 100644 (file)
index 0000000..c261d97
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,
+ 0xf9,0x7f,0x00,0x80,0x02,0x40,0x00,0x40,0xff,0x5f,0x00,0xe0,0xff,0x5f,0x00,
+ 0xc0,0xff,0x5f,0x00,0x80,0xff,0x7f,0x00,0x00,0xff,0x7f,0x00,0x00,0x0e,0x00,
+ 0x00,0x00,0x0c,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/info-next-xx.xpm b/etc/toolbar/info-next-xx.xpm
new file mode 100644 (file)
index 0000000..03d67d5
--- /dev/null
@@ -0,0 +1,38 @@
+/* XPM */
+static char * file[] = {
+/* width height num_colors chars_per_pixel */
+"28 28 5 1",
+"      c Gray75 s backgroundToolBarColor",
+".     c black",
+"X     c white",
+"o     c black",
+"O     c black",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                .           ",
+"                ..          ",
+"                .X.         ",
+"     ............XX.        ",
+"     .XXXXXXXXXXXXoX.       ",
+"     .XoooooooooooooX.      ",
+"     .Xooooooooooooooo.     ",
+"     .XoooooooooooooO.      ",
+"     .oOOOOOOOOOOOoO.       ",
+"     ............OO.        ",
+"                .O.         ",
+"                ..          ",
+"                .           ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            "
+};
diff --git a/etc/toolbar/info-next.xbm b/etc/toolbar/info-next.xbm
new file mode 100644 (file)
index 0000000..c261d97
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,
+ 0xf9,0x7f,0x00,0x80,0x02,0x40,0x00,0x40,0xff,0x5f,0x00,0xe0,0xff,0x5f,0x00,
+ 0xc0,0xff,0x5f,0x00,0x80,0xff,0x7f,0x00,0x00,0xff,0x7f,0x00,0x00,0x0e,0x00,
+ 0x00,0x00,0x0c,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/info-next.xpm b/etc/toolbar/info-next.xpm
new file mode 100644 (file)
index 0000000..03d67d5
--- /dev/null
@@ -0,0 +1,38 @@
+/* XPM */
+static char * file[] = {
+/* width height num_colors chars_per_pixel */
+"28 28 5 1",
+"      c Gray75 s backgroundToolBarColor",
+".     c black",
+"X     c white",
+"o     c black",
+"O     c black",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                .           ",
+"                ..          ",
+"                .X.         ",
+"     ............XX.        ",
+"     .XXXXXXXXXXXXoX.       ",
+"     .XoooooooooooooX.      ",
+"     .Xooooooooooooooo.     ",
+"     .XoooooooooooooO.      ",
+"     .oOOOOOOOOOOOoO.       ",
+"     ............OO.        ",
+"                .O.         ",
+"                ..          ",
+"                .           ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            "
+};
diff --git a/etc/toolbar/info-prev-cap-up.xpm b/etc/toolbar/info-prev-cap-up.xpm
new file mode 100644 (file)
index 0000000..8cee7f1
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * left-arrow_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"28 28 3 1",
+"      c Gray75 s backgroundToolBarColor",
+".     c black",
+"X     c white",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"           .                ",
+"          ..                ",
+"         .X.                ",
+"        .XX............     ",
+"       .X.XXXXXXXXXXXX.     ",
+"      .X.............X.     ",
+"     ................X.     ",
+"      ...............X.     ",
+"       ................     ",
+"        ...............     ",
+"         ...                ",
+"          ..                ",
+"           .                ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            "
+};
diff --git a/etc/toolbar/info-prev-cap-xx.xpm b/etc/toolbar/info-prev-cap-xx.xpm
new file mode 100644 (file)
index 0000000..8cee7f1
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * left-arrow_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"28 28 3 1",
+"      c Gray75 s backgroundToolBarColor",
+".     c black",
+"X     c white",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"           .                ",
+"          ..                ",
+"         .X.                ",
+"        .XX............     ",
+"       .X.XXXXXXXXXXXX.     ",
+"      .X.............X.     ",
+"     ................X.     ",
+"      ...............X.     ",
+"       ................     ",
+"        ...............     ",
+"         ...                ",
+"          ..                ",
+"           .                ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            "
+};
diff --git a/etc/toolbar/info-prev-dn.xbm b/etc/toolbar/info-prev-dn.xbm
new file mode 100644 (file)
index 0000000..c261d97
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,
+ 0xf9,0x7f,0x00,0x80,0x02,0x40,0x00,0x40,0xff,0x5f,0x00,0xe0,0xff,0x5f,0x00,
+ 0xc0,0xff,0x5f,0x00,0x80,0xff,0x7f,0x00,0x00,0xff,0x7f,0x00,0x00,0x0e,0x00,
+ 0x00,0x00,0x0c,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/info-prev-up.xbm b/etc/toolbar/info-prev-up.xbm
new file mode 100644 (file)
index 0000000..c261d97
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,
+ 0xf9,0x7f,0x00,0x80,0x02,0x40,0x00,0x40,0xff,0x5f,0x00,0xe0,0xff,0x5f,0x00,
+ 0xc0,0xff,0x5f,0x00,0x80,0xff,0x7f,0x00,0x00,0xff,0x7f,0x00,0x00,0x0e,0x00,
+ 0x00,0x00,0x0c,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/info-prev-up.xpm b/etc/toolbar/info-prev-up.xpm
new file mode 100644 (file)
index 0000000..8cee7f1
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * left-arrow_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"28 28 3 1",
+"      c Gray75 s backgroundToolBarColor",
+".     c black",
+"X     c white",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"           .                ",
+"          ..                ",
+"         .X.                ",
+"        .XX............     ",
+"       .X.XXXXXXXXXXXX.     ",
+"      .X.............X.     ",
+"     ................X.     ",
+"      ...............X.     ",
+"       ................     ",
+"        ...............     ",
+"         ...                ",
+"          ..                ",
+"           .                ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            "
+};
diff --git a/etc/toolbar/info-prev-xx.xbm b/etc/toolbar/info-prev-xx.xbm
new file mode 100644 (file)
index 0000000..c261d97
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,
+ 0xf9,0x7f,0x00,0x80,0x02,0x40,0x00,0x40,0xff,0x5f,0x00,0xe0,0xff,0x5f,0x00,
+ 0xc0,0xff,0x5f,0x00,0x80,0xff,0x7f,0x00,0x00,0xff,0x7f,0x00,0x00,0x0e,0x00,
+ 0x00,0x00,0x0c,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/info-prev-xx.xpm b/etc/toolbar/info-prev-xx.xpm
new file mode 100644 (file)
index 0000000..8cee7f1
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * left-arrow_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"28 28 3 1",
+"      c Gray75 s backgroundToolBarColor",
+".     c black",
+"X     c white",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"           .                ",
+"          ..                ",
+"         .X.                ",
+"        .XX............     ",
+"       .X.XXXXXXXXXXXX.     ",
+"      .X.............X.     ",
+"     ................X.     ",
+"      ...............X.     ",
+"       ................     ",
+"        ...............     ",
+"         ...                ",
+"          ..                ",
+"           .                ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            "
+};
diff --git a/etc/toolbar/info-prev.xbm b/etc/toolbar/info-prev.xbm
new file mode 100644 (file)
index 0000000..c261d97
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x0c,0x00,0x00,0x00,0x0a,0x00,0x00,0x00,
+ 0xf9,0x7f,0x00,0x80,0x02,0x40,0x00,0x40,0xff,0x5f,0x00,0xe0,0xff,0x5f,0x00,
+ 0xc0,0xff,0x5f,0x00,0x80,0xff,0x7f,0x00,0x00,0xff,0x7f,0x00,0x00,0x0e,0x00,
+ 0x00,0x00,0x0c,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/info-prev.xpm b/etc/toolbar/info-prev.xpm
new file mode 100644 (file)
index 0000000..8cee7f1
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * left-arrow_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"28 28 3 1",
+"      c Gray75 s backgroundToolBarColor",
+".     c black",
+"X     c white",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"           .                ",
+"          ..                ",
+"         .X.                ",
+"        .XX............     ",
+"       .X.XXXXXXXXXXXX.     ",
+"      .X.............X.     ",
+"     ................X.     ",
+"      ...............X.     ",
+"       ................     ",
+"        ...............     ",
+"         ...                ",
+"          ..                ",
+"           .                ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            "
+};
diff --git a/etc/toolbar/info-up-cap-up.xpm b/etc/toolbar/info-up-cap-up.xpm
new file mode 100644 (file)
index 0000000..0d82139
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * up-arrow_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"28 28 3 1",
+"      c Gray75 s backgroundToolBarColor",
+".     c black",
+"X     c white",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"              .             ",
+"             ...            ",
+"            .X...           ",
+"           .X.....          ",
+"          .X.......         ",
+"         .XXX.......        ",
+"        ....X........       ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .XXXX..          ",
+"           .......          ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            "
+};
diff --git a/etc/toolbar/info-up-cap-xx.xpm b/etc/toolbar/info-up-cap-xx.xpm
new file mode 100644 (file)
index 0000000..0d82139
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * up-arrow_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"28 28 3 1",
+"      c Gray75 s backgroundToolBarColor",
+".     c black",
+"X     c white",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"              .             ",
+"             ...            ",
+"            .X...           ",
+"           .X.....          ",
+"          .X.......         ",
+"         .XXX.......        ",
+"        ....X........       ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .XXXX..          ",
+"           .......          ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            "
+};
diff --git a/etc/toolbar/info-up-dn.xbm b/etc/toolbar/info-up-dn.xbm
new file mode 100644 (file)
index 0000000..3e4843d
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0xe0,0x00,0x00,0x00,0xd0,
+ 0x01,0x00,0x00,0xe8,0x03,0x00,0x00,0xf4,0x07,0x00,0x00,0xe2,0x0f,0x00,0x00,
+ 0xef,0x1f,0x00,0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,0x00,
+ 0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,
+ 0x00,0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,0x00,0x00,0x08,0x03,0x00,0x00,0xf8,
+ 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/info-up-up.xbm b/etc/toolbar/info-up-up.xbm
new file mode 100644 (file)
index 0000000..3e4843d
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0xe0,0x00,0x00,0x00,0xd0,
+ 0x01,0x00,0x00,0xe8,0x03,0x00,0x00,0xf4,0x07,0x00,0x00,0xe2,0x0f,0x00,0x00,
+ 0xef,0x1f,0x00,0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,0x00,
+ 0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,
+ 0x00,0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,0x00,0x00,0x08,0x03,0x00,0x00,0xf8,
+ 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/info-up-up.xpm b/etc/toolbar/info-up-up.xpm
new file mode 100644 (file)
index 0000000..0d82139
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * up-arrow_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"28 28 3 1",
+"      c Gray75 s backgroundToolBarColor",
+".     c black",
+"X     c white",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"              .             ",
+"             ...            ",
+"            .X...           ",
+"           .X.....          ",
+"          .X.......         ",
+"         .XXX.......        ",
+"        ....X........       ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .XXXX..          ",
+"           .......          ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            "
+};
diff --git a/etc/toolbar/info-up-xx.xbm b/etc/toolbar/info-up-xx.xbm
new file mode 100644 (file)
index 0000000..3e4843d
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0xe0,0x00,0x00,0x00,0xd0,
+ 0x01,0x00,0x00,0xe8,0x03,0x00,0x00,0xf4,0x07,0x00,0x00,0xe2,0x0f,0x00,0x00,
+ 0xef,0x1f,0x00,0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,0x00,
+ 0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,
+ 0x00,0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,0x00,0x00,0x08,0x03,0x00,0x00,0xf8,
+ 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/info-up-xx.xpm b/etc/toolbar/info-up-xx.xpm
new file mode 100644 (file)
index 0000000..0d82139
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * up-arrow_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"28 28 3 1",
+"      c Gray75 s backgroundToolBarColor",
+".     c black",
+"X     c white",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"              .             ",
+"             ...            ",
+"            .X...           ",
+"           .X.....          ",
+"          .X.......         ",
+"         .XXX.......        ",
+"        ....X........       ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .XXXX..          ",
+"           .......          ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            "
+};
diff --git a/etc/toolbar/info-up.xbm b/etc/toolbar/info-up.xbm
new file mode 100644 (file)
index 0000000..3e4843d
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0xe0,0x00,0x00,0x00,0xd0,
+ 0x01,0x00,0x00,0xe8,0x03,0x00,0x00,0xf4,0x07,0x00,0x00,0xe2,0x0f,0x00,0x00,
+ 0xef,0x1f,0x00,0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,0x00,
+ 0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,
+ 0x00,0x00,0xe8,0x03,0x00,0x00,0xe8,0x03,0x00,0x00,0x08,0x03,0x00,0x00,0xf8,
+ 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/info-up.xpm b/etc/toolbar/info-up.xpm
new file mode 100644 (file)
index 0000000..0d82139
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * up-arrow_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"28 28 3 1",
+"      c Gray75 s backgroundToolBarColor",
+".     c black",
+"X     c white",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"              .             ",
+"             ...            ",
+"            .X...           ",
+"           .X.....          ",
+"          .X.......         ",
+"         .XXX.......        ",
+"        ....X........       ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .X.....          ",
+"           .XXXX..          ",
+"           .......          ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            "
+};
diff --git a/etc/toolbar/last-win-cap-up.xpm b/etc/toolbar/last-win-cap-up.xpm
new file mode 100644 (file)
index 0000000..acf8f84
--- /dev/null
@@ -0,0 +1,41 @@
+/* XPM */
+static char * last_win_xpm[] = {
+"33 33 5 1",
+"       c Gray75 s backgroundToolBarColor",
+".      c black",
+"x      c white",
+"y      c Gray90",
+"z      c Gray60",
+"                                 ",
+"                  ...........    ",
+"                  .zzzz.zzzz.    ",
+"           ...........z.zzzz.    ",
+"           .yyyy.yyyy.z.zzzz.    ",
+"    ...........y.yyyy.z.zzzz.    ",
+"    .xxxx.xxxx.y.yyyy.z.zzzz.    ",
+"    .xxxx.xxxx.y.yyyy........    ",
+"    .xxxx.xxxx.y.yyyy.z.zzzz.    ",
+"    .xxxx.xxxx........z.zzzz.    ",
+"    .xxxx.xxxx.y.yyyy.z.zzzz.    ",
+"    ...........y.yyyy.z.zzzz.    ",
+"    .xxxx.xxxx.y.yyyy.z.zzzz.    ",
+"    .xxxx.xxxx.y.yyyy........    ",
+"    .xxxx.xxxx.y.yyyy.           ",
+"    .xxxx.xxxx........           ",
+"    .xxxx.xxxx.                  ",
+"    ...........                  ",
+"                                 ",
+"           ..                    ",
+"         ...                     ",
+"       ...................       ",
+"         ...                     ",
+"           ..                    ",
+"               .           .     ",
+" .             .                 ",
+" .    ..   .. ...    . . . . ... ",
+" .      . .    .     . . . . .  .",
+" .    ...  ..  . ... . . . . .  .",
+" .    . .   .  .      . .  . .  .",
+" .... .. ...   .      . .  . .  .",
+"                                 ",
+"                                 "};
diff --git a/etc/toolbar/last-win-cap-xx.xpm b/etc/toolbar/last-win-cap-xx.xpm
new file mode 100644 (file)
index 0000000..4eac9e4
--- /dev/null
@@ -0,0 +1,41 @@
+/* XPM */
+static char * last_win_xpm[] = {
+"33 33 5 1",
+"       c Gray75 s backgroundToolBarColor",
+".      c Gray60",
+"x      c white",
+"y      c Gray90",
+"z      c Gray60",
+"                                 ",
+"                  ...........    ",
+"                  .zzzz.zzzz.    ",
+"           ...........z.zzzz.    ",
+"           .yyyy.yyyy.z.zzzz.    ",
+"    ...........y.yyyy.z.zzzz.    ",
+"    .xxxx.xxxx.y.yyyy.z.zzzz.    ",
+"    .xxxx.xxxx.y.yyyy........    ",
+"    .xxxx.xxxx.y.yyyy.z.zzzz.    ",
+"    .xxxx.xxxx........z.zzzz.    ",
+"    .xxxx.xxxx.y.yyyy.z.zzzz.    ",
+"    ...........y.yyyy.z.zzzz.    ",
+"    .xxxx.xxxx.y.yyyy.z.zzzz.    ",
+"    .xxxx.xxxx.y.yyyy........    ",
+"    .xxxx.xxxx.y.yyyy.           ",
+"    .xxxx.xxxx........           ",
+"    .xxxx.xxxx.                  ",
+"    ...........                  ",
+"                                 ",
+"           ..                    ",
+"         ...                     ",
+"       ...................       ",
+"         ...                     ",
+"           ..                    ",
+"               .           .     ",
+" .             .                 ",
+" .    ..   .. ...    . . . . ... ",
+" .      . .    .     . . . . .  .",
+" .    ...  ..  . ... . . . . .  .",
+" .    . .   .  .      . .  . .  .",
+" .... .. ...   .      . .  . .  .",
+"                                 ",
+"                                 "};
diff --git a/etc/toolbar/last-win-dn.xbm b/etc/toolbar/last-win-dn.xbm
new file mode 100644 (file)
index 0000000..e165b69
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x00,0xf8,0xff,0xff,0xde,
+ 0xfb,0xff,0x01,0xd0,0xfb,0xff,0xbd,0xd7,0xfb,0x03,0xa0,0xd7,0xfb,0x7b,0xaf,
+ 0xd7,0xfb,0x7b,0xaf,0x07,0xf8,0x7b,0xaf,0xd7,0xfb,0x7b,0x0f,0xd0,0xfb,0x7b,
+ 0xaf,0xd7,0xfb,0x03,0xa0,0xd7,0xfb,0x7b,0xaf,0xd7,0xfb,0x7b,0xaf,0x07,0xf8,
+ 0x7b,0xaf,0xf7,0xff,0x7b,0x0f,0xf0,0xff,0x7b,0xef,0xff,0xff,0x03,0xe0,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf9,0xff,0xff,0x7f,0xfc,
+ 0xff,0xff,0x1f,0x00,0x00,0xff,0x7f,0xfc,0xff,0xff,0xff,0xf9,0xff,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff};
diff --git a/etc/toolbar/last-win-up.xbm b/etc/toolbar/last-win-up.xbm
new file mode 100644 (file)
index 0000000..8c9cf76
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x07,0x00,0x00,0x21,
+ 0x04,0x00,0xfe,0x2f,0x04,0x00,0x42,0x28,0x04,0xfc,0x5f,0x28,0x04,0x84,0x50,
+ 0x28,0x04,0x84,0x50,0xf8,0x07,0x84,0x50,0x28,0x04,0x84,0xf0,0x2f,0x04,0x84,
+ 0x50,0x28,0x04,0xfc,0x5f,0x28,0x04,0x84,0x50,0x28,0x04,0x84,0x50,0xf8,0x07,
+ 0x84,0x50,0x08,0x00,0x84,0xf0,0x0f,0x00,0x84,0x10,0x00,0x00,0xfc,0x1f,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x80,0x03,
+ 0x00,0x00,0xe0,0xff,0xff,0x00,0x80,0x03,0x00,0x00,0x00,0x06,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/last-win-up.xpm b/etc/toolbar/last-win-up.xpm
new file mode 100644 (file)
index 0000000..2d34b31
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * last_win_xpm[] = {
+"28 28 5 1",
+"       c Gray75 s backgroundToolBarColor",
+".      c black",
+"x      c white",
+"y      c Gray90",
+"z      c Gray60",
+"                            ",
+"                            ",
+"                ........... ",
+"                .zzzz.zzzz. ",
+"         ...........z.zzzz. ",
+"         .yyyy.yyyy.z.zzzz. ",
+"  ...........y.yyyy.z.zzzz. ",
+"  .xxxx.xxxx.y.yyyy.z.zzzz. ",
+"  .xxxx.xxxx.y.yyyy........ ",
+"  .xxxx.xxxx.y.yyyy.z.zzzz. ",
+"  .xxxx.xxxx........z.zzzz. ",
+"  .xxxx.xxxx.y.yyyy.z.zzzz. ",
+"  ...........y.yyyy.z.zzzz. ",
+"  .xxxx.xxxx.y.yyyy.z.zzzz. ",
+"  .xxxx.xxxx.y.yyyy........ ",
+"  .xxxx.xxxx.y.yyyy.        ",
+"  .xxxx.xxxx........        ",
+"  .xxxx.xxxx.               ",
+"  ...........               ",
+"                            ",
+"                            ",
+"         ..                 ",
+"       ...                  ",
+"     ...................    ",
+"       ...                  ",
+"         ..                 ",
+"                            ",
+"                            "};
diff --git a/etc/toolbar/last-win-xx.xbm b/etc/toolbar/last-win-xx.xbm
new file mode 100644 (file)
index 0000000..4d779a2
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0x07,0x00,0x00,0x00,
+ 0x00,0x00,0xfe,0x2f,0x04,0x00,0x00,0x00,0x00,0xfc,0x5f,0x28,0x04,0x00,0x00,
+ 0x00,0x00,0x84,0x50,0xf8,0x07,0x00,0x00,0x00,0x00,0x84,0xf0,0x2f,0x04,0x00,
+ 0x00,0x00,0x00,0xfc,0x5f,0x28,0x04,0x00,0x00,0x00,0x00,0x84,0x50,0xf8,0x07,
+ 0x00,0x00,0x00,0x00,0x84,0xf0,0x0f,0x00,0x00,0x00,0x00,0x00,0xfc,0x1f,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xe0,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/last-win-xx.xpm b/etc/toolbar/last-win-xx.xpm
new file mode 100644 (file)
index 0000000..8245f6c
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * last_win_xpm[] = {
+"28 28 5 1",
+"       c Gray75 s backgroundToolBarColor",
+".      c Gray60",
+"x      c white",
+"y      c Gray90",
+"z      c Gray60",
+"                            ",
+"                            ",
+"                ........... ",
+"                .zzzz.zzzz. ",
+"         ...........z.zzzz. ",
+"         .yyyy.yyyy.z.zzzz. ",
+"  ...........y.yyyy.z.zzzz. ",
+"  .xxxx.xxxx.y.yyyy.z.zzzz. ",
+"  .xxxx.xxxx.y.yyyy........ ",
+"  .xxxx.xxxx.y.yyyy.z.zzzz. ",
+"  .xxxx.xxxx........z.zzzz. ",
+"  .xxxx.xxxx.y.yyyy.z.zzzz. ",
+"  ...........y.yyyy.z.zzzz. ",
+"  .xxxx.xxxx.y.yyyy.z.zzzz. ",
+"  .xxxx.xxxx.y.yyyy........ ",
+"  .xxxx.xxxx.y.yyyy.        ",
+"  .xxxx.xxxx........        ",
+"  .xxxx.xxxx.               ",
+"  ...........               ",
+"                            ",
+"                            ",
+"         ..                 ",
+"       ...                  ",
+"     ...................    ",
+"       ...                  ",
+"         ..                 ",
+"                            ",
+"                            "};
diff --git a/etc/toolbar/mail-cap-up.xpm b/etc/toolbar/mail-cap-up.xpm
new file mode 100644 (file)
index 0000000..0675b90
--- /dev/null
@@ -0,0 +1,42 @@
+/* XPM */
+static char * mail[] = {
+"33 33 6 1",
+"X     c Gray75 s backgroundToolBarColor",
+"u     c #000000000000 s foregroundToolBarColor",
+"o     c black",
+"O     c Gray90",
+"+     c Gray60",
+"@     c white",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXoooooooooooXXXXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOooXXXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOo+oXXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOooooXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXooooooooooooooooooooooooXXXX",
+"XXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXX",
+"XXXXXo@oo@@@@@@@@@@@@@@@ooo@oXXXX",
+"XXXXXo@@@@@@@@@@@@@@@@@@o+o@oXXXX",
+"XXXXXo@@@@@@@@@@@@@@@@@@o+o@oXXXX",
+"XXXXXo@@@@@ooooooooo@@@@ooo@oXXXX",
+"XXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXX",
+"XXXXXo@@@@@ooooooo@@@@@@@@@@oXXXX",
+"XXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXX",
+"XXXXXo@@@@@ooooo@@@@@@@@@@@@oXXXX",
+"XXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXX",
+"XXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXX",
+"XXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXX",
+"XXXXXooooooooooooooooooooooooXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXooooooooooooooXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXuXuXXXXXXXXX",
+"XXXXXXXXXXXuXXXuXXXXXXXuXXXXXXXXX",
+"XXXXXXXXXXXuuXuuXuuXXuXuXXXXXXXXX",
+"XXXXXXXXXXXuXuXuXXXuXuXuXXXXXXXXX",
+"XXXXXXXXXXXuXuXuXuuuXuXuXXXXXXXXX",
+"XXXXXXXXXXXuXuXuXuXuXuXuXXXXXXXXX",
+"XXXXXXXXXXXuXuXuXuuXuuXuXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/mail-cap-xx.xpm b/etc/toolbar/mail-cap-xx.xpm
new file mode 100644 (file)
index 0000000..a641fbe
--- /dev/null
@@ -0,0 +1,41 @@
+/* XPM */
+static char * mail[] = {
+"33 33 5 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c Gray90",
+"+     c Gray60",
+"@     c white",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXoooooooooooXXXXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOooXXXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOo+oXXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOooooXXXXXXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXooooooooooooooooooooooooXXXX",
+"XXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXX",
+"XXXXXo@oo@@@@@@@@@@@@@@@ooo@oXXXX",
+"XXXXXo@@@@@@@@@@@@@@@@@@o+o@oXXXX",
+"XXXXXo@@@@@@@@@@@@@@@@@@o+o@oXXXX",
+"XXXXXo@@@@@ooooooooo@@@@ooo@oXXXX",
+"XXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXX",
+"XXXXXo@@@@@ooooooo@@@@@@@@@@oXXXX",
+"XXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXX",
+"XXXXXo@@@@@ooooo@@@@@@@@@@@@oXXXX",
+"XXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXX",
+"XXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXX",
+"XXXXXo@@@@@@@@@@@@@@@@@@@@@@oXXXX",
+"XXXXXooooooooooooooooooooooooXXXX",
+"XXXXXXXXXXoOOOOOOOOOOOOoXXXXXXXXX",
+"XXXXXXXXXXooooooooooooooXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXoXoXXXXXXXXX",
+"XXXXXXXXXXXoXXXoXXXXXXXoXXXXXXXXX",
+"XXXXXXXXXXXooXooXooXXoXoXXXXXXXXX",
+"XXXXXXXXXXXoXoXoXXXoXoXoXXXXXXXXX",
+"XXXXXXXXXXXoXoXoXoooXoXoXXXXXXXXX",
+"XXXXXXXXXXXoXoXoXoXoXoXoXXXXXXXXX",
+"XXXXXXXXXXXoXoXoXooXooXoXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/mail-dn.xbm b/etc/toolbar/mail-dn.xbm
new file mode 100644 (file)
index 0000000..81daa62
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0x7f,0x00,0xfc,0x0f,0x7f,0xff,0xf9,
+ 0x0f,0x7f,0xff,0xf5,0x0f,0x7f,0xff,0xe1,0x0f,0x7f,0xff,0xef,0x0f,0x03,0x00,
+ 0x00,0x0c,0xfb,0xff,0xff,0x0d,0xcb,0xff,0x1f,0x0d,0xfb,0xff,0x5f,0x0d,0xfb,
+ 0xff,0x5f,0x0d,0xfb,0x00,0x1e,0x0d,0xfb,0xff,0xff,0x0d,0xfb,0x80,0xff,0x0d,
+ 0xfb,0xff,0xff,0x0d,0xfb,0xe0,0xff,0x0d,0xfb,0xff,0xff,0x0d,0xfb,0xff,0xff,
+ 0x0d,0xfb,0xff,0xff,0x0d,0x03,0x00,0x00,0x0c,0x7f,0xff,0xef,0x0f,0x7f,0x00,
+ 0xe0,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,
+ 0xff,0xff,0x0f,0xff,0xff,0xff,0x0f};
diff --git a/etc/toolbar/mail-up.xbm b/etc/toolbar/mail-up.xbm
new file mode 100644 (file)
index 0000000..30bae2e
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x03,0x00,0x80,0x00,0x06,
+ 0x00,0x80,0x00,0x0a,0x00,0x80,0x00,0x1e,0x00,0x80,0x00,0x10,0x00,0xfc,0xff,
+ 0xff,0x03,0x04,0x00,0x00,0x02,0x34,0x00,0xe0,0x02,0x04,0x00,0xa0,0x02,0x04,
+ 0x00,0xa0,0x02,0x04,0xff,0xe1,0x02,0x04,0x00,0x00,0x02,0x04,0x7f,0x00,0x02,
+ 0x04,0x00,0x00,0x02,0x04,0x1f,0x00,0x02,0x04,0x00,0x00,0x02,0x04,0x00,0x00,
+ 0x02,0x04,0x00,0x00,0x02,0xfc,0xff,0xff,0x03,0x80,0x00,0x10,0x00,0x80,0xff,
+ 0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/mail-up.xpm b/etc/toolbar/mail-up.xpm
new file mode 100644 (file)
index 0000000..0987b9d
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * mail[] = {
+"28 28 5 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c black",
+"O     c Gray90",
+"+     c Gray60",
+"@     c white",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXoooooooooooXXXXXXXXXX",
+"XXXXXXXoOOOOOOOOOooXXXXXXXXX",
+"XXXXXXXoOOOOOOOOOo+oXXXXXXXX",
+"XXXXXXXoOOOOOOOOOooooXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXooooooooooooooooooooooooXX",
+"XXo@@@@@@@@@@@@@@@@@@@@@@oXX",
+"XXo@oo@@@@@@@@@@@@@@@ooo@oXX",
+"XXo@@@@@@@@@@@@@@@@@@o+o@oXX",
+"XXo@@@@@@@@@@@@@@@@@@o+o@oXX",
+"XXo@@@@@ooooooooo@@@@ooo@oXX",
+"XXo@@@@@@@@@@@@@@@@@@@@@@oXX",
+"XXo@@@@@ooooooo@@@@@@@@@@oXX",
+"XXo@@@@@@@@@@@@@@@@@@@@@@oXX",
+"XXo@@@@@ooooo@@@@@@@@@@@@oXX",
+"XXo@@@@@@@@@@@@@@@@@@@@@@oXX",
+"XXo@@@@@@@@@@@@@@@@@@@@@@oXX",
+"XXo@@@@@@@@@@@@@@@@@@@@@@oXX",
+"XXooooooooooooooooooooooooXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXooooooooooooooXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/mail-xx.xbm b/etc/toolbar/mail-xx.xbm
new file mode 100644 (file)
index 0000000..bd20f48
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xff,0x03,0x00,0x00,0x00,0x00,
+ 0x00,0x80,0x00,0x0a,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x10,0x00,0xfc,0xff,
+ 0xff,0x03,0x04,0x00,0x00,0x02,0x34,0x00,0xe0,0x02,0x04,0x00,0xa0,0x02,0x04,
+ 0x00,0xa0,0x02,0x04,0xff,0xe1,0x02,0x04,0x00,0x00,0x02,0x04,0x7f,0x00,0x02,
+ 0x04,0x00,0x00,0x02,0x04,0x1f,0x00,0x02,0x04,0x00,0x00,0x02,0x04,0x00,0x00,
+ 0x02,0x04,0x00,0x00,0x02,0xfc,0xff,0xff,0x03,0x00,0x00,0x00,0x00,0x80,0xff,
+ 0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/mail-xx.xpm b/etc/toolbar/mail-xx.xpm
new file mode 100644 (file)
index 0000000..90eb2f2
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * mail[] = {
+"28 28 5 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c Gray90",
+"+     c Gray60",
+"@     c white",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXoooooooooooXXXXXXXXXX",
+"XXXXXXXoOOOOOOOOOooXXXXXXXXX",
+"XXXXXXXoOOOOOOOOOo+oXXXXXXXX",
+"XXXXXXXoOOOOOOOOOooooXXXXXXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXooooooooooooooooooooooooXX",
+"XXo@@@@@@@@@@@@@@@@@@@@@@oXX",
+"XXo@oo@@@@@@@@@@@@@@@ooo@oXX",
+"XXo@@@@@@@@@@@@@@@@@@o+o@oXX",
+"XXo@@@@@@@@@@@@@@@@@@o+o@oXX",
+"XXo@@@@@ooooooooo@@@@ooo@oXX",
+"XXo@@@@@@@@@@@@@@@@@@@@@@oXX",
+"XXo@@@@@ooooooo@@@@@@@@@@oXX",
+"XXo@@@@@@@@@@@@@@@@@@@@@@oXX",
+"XXo@@@@@ooooo@@@@@@@@@@@@oXX",
+"XXo@@@@@@@@@@@@@@@@@@@@@@oXX",
+"XXo@@@@@@@@@@@@@@@@@@@@@@oXX",
+"XXo@@@@@@@@@@@@@@@@@@@@@@oXX",
+"XXooooooooooooooooooooooooXX",
+"XXXXXXXoOOOOOOOOOOOOoXXXXXXX",
+"XXXXXXXooooooooooooooXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/news-cap-up.xpm b/etc/toolbar/news-cap-up.xpm
new file mode 100644 (file)
index 0000000..6ac5bd0
--- /dev/null
@@ -0,0 +1,42 @@
+/* XPM */
+static char * news_xpm[] = {
+"33 33 6 1",
+"X     c Gray75 s backgroundToolBarColor",
+"u     c #000000000000 s foregroundToolBarColor",
+"o     c black",
+"O     c white",
+"+     c gray60",
+"@     c gray",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXooooooooooXXXXXXXX",
+"XXXXXooooooooooOOOoOOOoOOoXXXXXXX",
+"XXXXoooOOOoOoooOoOoOoOOoOo++XXXXX",
+"XXXXo@oOOooOOooOooOooOooOOo++XXXX",
+"XXoo@o@oOOOOOOOOOOOOOOOOOOOo+XXXX",
+"XXo@@o@oOooooooooooooooOooOo++XXX",
+"XXoo@o@oOOOOOOOOOOOOOOOOOOOOo++XX",
+"XXoo@@o@oOoOoOoOoooOoOoooooOo++XX",
+"XXo@o@o@oOOoOooOOOOOOoOooOooOo+XX",
+"XXooo@@o@oOoooooOoOOooOoooooOo+XX",
+"XXXo@o@o@oOOooooOOOOOOOOoOooOo++X",
+"XXXXoo@@o@oOoooooOOooooOoooooo++X",
+"XXXXo@o@o@oOOooOooOooOoOoooOOo++X",
+"XXXXXoo@@o@oOoOoooOooooOooOooo+XX",
+"XXXXXoXo@o@oOoooOoOooooOoooo+++XX",
+"XXXXXXoXoo@oOoOooooooooo++++++XXX",
+"XXXXXXXooooooooo++++++++++++++XXX",
+"XXXXXXXXX++++++++++++++++++XXXXXX",
+"XXXXXXXXXX+++++++++XXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXuXXXuXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXuuXXuXXuXXuXuXuXXuuXXXXXXX",
+"XXXXXXXuXuXuXuXuXuXuXuXuXXXXXXXXX",
+"XXXXXXXuXuXuXuuuXuXuXuXXuuXXXXXXX",
+"XXXXXXXuXXuuXuXXXXuXuXXXXuXXXXXXX",
+"XXXXXXXuXXXuXXuuXXuXuXXuuXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/news-cap-xx.xpm b/etc/toolbar/news-cap-xx.xpm
new file mode 100644 (file)
index 0000000..b6b0370
--- /dev/null
@@ -0,0 +1,41 @@
+/* XPM */
+static char * news_xpm[] = {
+"33 33 5 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c white",
+"+     c gray60",
+"@     c gray",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXooooooooooXXXXXXXX",
+"XXXXXooooooooooOOOoOOOoOOoXXXXXXX",
+"XXXXoooOOOoOoooOoOoOoOOoOo++XXXXX",
+"XXXXo@oOOooOOooOooOooOooOOo++XXXX",
+"XXoo@o@oOOOOOOOOOOOOOOOOOOOo+XXXX",
+"XXo@@o@oOooooooooooooooOooOo++XXX",
+"XXoo@o@oOOOOOOOOOOOOOOOOOOOOo++XX",
+"XXoo@@o@oOoOoOoOoooOoOoooooOo++XX",
+"XXo@o@o@oOOoOooOOOOOOoOooOooOo+XX",
+"XXooo@@o@oOoooooOoOOooOoooooOo+XX",
+"XXXo@o@o@oOOooooOOOOOOOOoOooOo++X",
+"XXXXoo@@o@oOoooooOOooooOoooooo++X",
+"XXXXo@o@o@oOOooOooOooOoOoooOOo++X",
+"XXXXXoo@@o@oOoOoooOooooOooOooo+XX",
+"XXXXXoXo@o@oOoooOoOooooOoooo+++XX",
+"XXXXXXoXoo@oOoOooooooooo++++++XXX",
+"XXXXXXXooooooooo++++++++++++++XXX",
+"XXXXXXXXX++++++++++++++++++XXXXXX",
+"XXXXXXXXXX+++++++++XXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXoXXXoXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXooXXoXXoXXoXoXoXXooXXXXXXX",
+"XXXXXXXoXoXoXoXoXoXoXoXoXXXXXXXXX",
+"XXXXXXXoXoXoXoooXoXoXoXXooXXXXXXX",
+"XXXXXXXoXXooXoXXXXoXoXXXXoXXXXXXX",
+"XXXXXXXoXXXoXXooXXoXoXXooXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/news-dn.xbm b/etc/toolbar/news-dn.xbm
new file mode 100644 (file)
index 0000000..465cf3a
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,
+ 0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0x1f,
+ 0x80,0x0f,0x07,0xe0,0x6e,0x0f,0xe3,0xa2,0x5a,0x0f,0x63,0x26,0xc9,0x0e,0xd4,
+ 0xff,0xff,0x0d,0x40,0x00,0x20,0x0d,0xd4,0xff,0xff,0x0b,0x88,0x2a,0x0a,0x0a,
+ 0xa2,0xe5,0x97,0x04,0x10,0x41,0x13,0x04,0x45,0xc3,0xbf,0x04,0x13,0x82,0x21,
+ 0x00,0x83,0x26,0x29,0x06,0x27,0x14,0x21,0x01,0x57,0x45,0x21,0x0c,0x2f,0x14,
+ 0xc0,0x0f,0x1f,0xc0,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,
+ 0xff,0xff,0x0f,0xff,0xff,0xff,0x0f};
diff --git a/etc/toolbar/news-up.xbm b/etc/toolbar/news-up.xbm
new file mode 100644 (file)
index 0000000..7cac29f
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,
+ 0x7f,0x00,0xf8,0x1f,0x91,0x00,0x1c,0x5d,0xa5,0x00,0x94,0xd9,0x36,0x01,0x3f,
+ 0x00,0x00,0x02,0xa9,0xff,0xdf,0x02,0x3f,0x00,0x00,0x04,0x5b,0xd5,0xf5,0x05,
+ 0x77,0x1a,0x68,0x0b,0xb7,0xbe,0xec,0x0b,0xee,0x3c,0x40,0x0b,0x5c,0x7d,0xde,
+ 0x0f,0xd4,0xd9,0xd6,0x09,0xb8,0xea,0xde,0x0e,0xe8,0xbb,0xde,0x03,0xd0,0xea,
+ 0x3f,0x00,0xe0,0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/news-up.xpm b/etc/toolbar/news-up.xpm
new file mode 100644 (file)
index 0000000..eba2ed6
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * news_xpm[] = {
+"28 28 5 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c black",
+"O     c white",
+"+     c gray60",
+"@     c gray",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXooooooooooXXXXX",
+"XXXooooooooooOOOoOOOoOOoXXXX",
+"XXoooOOOoOoooOoOoOoOOoOo++XX",
+"XXo@oOOooOOooOooOooOooOOo++X",
+"oo@o@oOOOOOOOOOOOOOOOOOOOo+X",
+"o@@o@oOooooooooooooooOooOo++",
+"oo@o@oOOOOOOOOOOOOOOOOOOOOo+",
+"oo@@o@oOoOoOoOoooOoOoooooOo+",
+"o@o@o@oOOoOooOOOOOOoOooOooOo",
+"ooo@@o@oOoooooOoOOooOoooooOo",
+"Xo@o@o@oOOooooOOOOOOOOoOooOo",
+"XXoo@@o@oOoooooOOooooOoooooo",
+"XXo@o@o@oOOooOooOooOoOoooOOo",
+"XXXoo@@o@oOoOoooOooooOooOooo",
+"XXXoXo@o@oOoooOoOooooOoooo++",
+"XXXXoXoo@oOoOooooooooo++++++",
+"XXXXXooooooooo++++++++++++++",
+"XXXXXXX++++++++++++++++++XXX",
+"XXXXXXXX+++++++++XXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/news-xx.xbm b/etc/toolbar/news-xx.xbm
new file mode 100644 (file)
index 0000000..5be3f23
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0xf8,0x1f,0x91,0x00,0x1c,0x5d,0xa5,0x00,0x94,0xd9,0x36,0x01,0x3f,
+ 0x00,0x00,0x02,0xa9,0xff,0xdf,0x02,0x3f,0x00,0x00,0x04,0x5b,0xd5,0xf5,0x05,
+ 0x77,0x1a,0x68,0x0b,0xb7,0xbe,0xec,0x0b,0xee,0x3c,0x40,0x0b,0x5c,0x7d,0xde,
+ 0x0f,0xd4,0xd9,0xd6,0x09,0xb8,0xea,0xde,0x0e,0x00,0x00,0x00,0x00,0xd0,0xeb,
+ 0x3f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/news-xx.xpm b/etc/toolbar/news-xx.xpm
new file mode 100644 (file)
index 0000000..83e4ce1
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * news_xpm[] = {
+"28 28 5 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c gray60",
+"O     c white",
+"+     c gray60",
+"@     c gray",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXooooooooooXXXXX",
+"XXXooooooooooOOOoOOOoOOoXXXX",
+"XXoooOOOoOoooOoOoOoOOoOo++XX",
+"XXo@oOOooOOooOooOooOooOOo++X",
+"oo@o@oOOOOOOOOOOOOOOOOOOOo+X",
+"o@@o@oOooooooooooooooOooOo++",
+"oo@o@oOOOOOOOOOOOOOOOOOOOOo+",
+"oo@@o@oOoOoOoOoooOoOoooooOo+",
+"o@o@o@oOOoOooOOOOOOoOooOooOo",
+"ooo@@o@oOoooooOoOOooOoooooOo",
+"Xo@o@o@oOOooooOOOOOOOOoOooOo",
+"XXoo@@o@oOoooooOOooooOoooooo",
+"XXo@o@o@oOOooOooOooOoOoooOOo",
+"XXXoo@@o@oOoOoooOooooOooOooo",
+"XXXoXo@o@oOoooOoOooooOoooo++",
+"XXXXoXoo@oOoOooooooooo++++++",
+"XXXXXooooooooo++++++++++++++",
+"XXXXXXX++++++++++++++++++XXX",
+"XXXXXXXX+++++++++XXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/next-win-cap-up.xpm b/etc/toolbar/next-win-cap-up.xpm
new file mode 100644 (file)
index 0000000..6e411df
--- /dev/null
@@ -0,0 +1,41 @@
+/* XPM */
+static char * next_win_xpm[] = {
+"33 33 5 1",
+"       c Gray75 s backgroundToolBarColor",
+".      c black",
+"x      c white",
+"y      c Gray90",
+"z      c Gray60",
+"                                 ",
+"    ...........                  ",
+"    .zzzz.zzzz.                  ",
+"    .zzzz.z...........           ",
+"    .zzzz.z.yyyy.yyyy.           ",
+"    .zzzz.z.yyyy.y...........    ",
+"    .zzzz.z.yyyy.y.xxxx.xxxx.    ",
+"    ........yyyy.y.xxxx.xxxx.    ",
+"    .zzzz.z.yyyy.y.xxxx.xxxx.    ",
+"    .zzzz.z........xxxx.xxxx.    ",
+"    .zzzz.z.yyyy.y.xxxx.xxxx.    ",
+"    .zzzz.z.yyyy.y...........    ",
+"    .zzzz.z.yyyy.y.xxxx.xxxx.    ",
+"    ........yyyy.y.xxxx.xxxx.    ",
+"           .yyyy.y.xxxx.xxxx.    ",
+"           ........xxxx.xxxx.    ",
+"                  .xxxx.xxxx.    ",
+"                  ...........    ",
+"                                 ",
+"                    ..           ",
+"                     ...         ",
+"       ...................       ",
+"                     ...         ",
+"                    ..           ",
+"               .           .     ",
+".   .          .                 ",
+"..  .  .  . . ...    . . . . ... ",
+". . . . . . .  .     . . . . .  .",
+". . . ...  .   . ... . . . . .  .",
+".  .. .   . .  .      . .  . .  .",
+".   .  .. . .  .      . .  . .  .",
+"                                 ",
+"                                 "};
diff --git a/etc/toolbar/next-win-cap-xx.xpm b/etc/toolbar/next-win-cap-xx.xpm
new file mode 100644 (file)
index 0000000..36fe6ba
--- /dev/null
@@ -0,0 +1,41 @@
+/* XPM */
+static char * next_win_xpm[] = {
+"33 33 5 1",
+"       c Gray75 s backgroundToolBarColor",
+".      c Gray60",
+"x      c white",
+"y      c Gray90",
+"z      c Gray60",
+"                                 ",
+"    ...........                  ",
+"    .zzzz.zzzz.                  ",
+"    .zzzz.z...........           ",
+"    .zzzz.z.yyyy.yyyy.           ",
+"    .zzzz.z.yyyy.y...........    ",
+"    .zzzz.z.yyyy.y.xxxx.xxxx.    ",
+"    ........yyyy.y.xxxx.xxxx.    ",
+"    .zzzz.z.yyyy.y.xxxx.xxxx.    ",
+"    .zzzz.z........xxxx.xxxx.    ",
+"    .zzzz.z.yyyy.y.xxxx.xxxx.    ",
+"    .zzzz.z.yyyy.y...........    ",
+"    .zzzz.z.yyyy.y.xxxx.xxxx.    ",
+"    ........yyyy.y.xxxx.xxxx.    ",
+"           .yyyy.y.xxxx.xxxx.    ",
+"           ........xxxx.xxxx.    ",
+"                  .xxxx.xxxx.    ",
+"                  ...........    ",
+"                                 ",
+"                    ..           ",
+"                     ...         ",
+"       ...................       ",
+"                     ...         ",
+"                    ..           ",
+"               .           .     ",
+".   .          .                 ",
+"..  .  .  . . ...    . . . . ... ",
+". . . . . . .  .     . . . . .  .",
+". . . ...  .   . ... . . . . .  .",
+".  .. .   . .  .      . .  . .  .",
+".   .  .. . .  .      . .  . .  .",
+"                                 ",
+"                                 "};
diff --git a/etc/toolbar/next-win-dn.xbm b/etc/toolbar/next-win-dn.xbm
new file mode 100644 (file)
index 0000000..a8b33ac
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0x01,0xf0,0xff,0xff,0xbd,0xf7,0xff,
+ 0xff,0xbd,0x00,0xf8,0xff,0xbd,0xde,0xfb,0xff,0xbd,0x5e,0x00,0xfc,0xbd,0x5e,
+ 0xef,0xfd,0x01,0x5e,0xef,0xfd,0xbd,0x5e,0xef,0xfd,0xbd,0x00,0xef,0xfd,0xbd,
+ 0x5e,0xef,0xfd,0xbd,0x5e,0x00,0xfc,0xbd,0x5e,0xef,0xfd,0x01,0x5e,0xef,0xfd,
+ 0xff,0x5e,0xef,0xfd,0xff,0x00,0xef,0xfd,0xff,0x7f,0xef,0xfd,0xff,0x7f,0x00,
+ 0xfc,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf9,0xff,0xff,0xff,
+ 0xe3,0xff,0x0f,0x00,0x80,0xff,0xff,0xff,0xe3,0xff,0xff,0xff,0xf9,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0xff,0xff};
diff --git a/etc/toolbar/next-win-up.xbm b/etc/toolbar/next-win-up.xbm
new file mode 100644 (file)
index 0000000..1338b92
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x0f,0x00,0x00,0x42,0x08,0x00,
+ 0x00,0x42,0xff,0x07,0x00,0x42,0x21,0x04,0x00,0x42,0xa1,0xff,0x03,0x42,0xa1,
+ 0x10,0x02,0xfe,0xa1,0x10,0x02,0x42,0xa1,0x10,0x02,0x42,0xff,0x10,0x02,0x42,
+ 0xa1,0x10,0x02,0x42,0xa1,0xff,0x03,0x42,0xa1,0x10,0x02,0xfe,0xa1,0x10,0x02,
+ 0x00,0xa1,0x10,0x02,0x00,0xff,0x10,0x02,0x00,0x80,0x10,0x02,0x00,0x80,0xff,
+ 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,
+ 0x1c,0x00,0xf0,0xff,0x7f,0x00,0x00,0x00,0x1c,0x00,0x00,0x00,0x06,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/next-win-up.xpm b/etc/toolbar/next-win-up.xpm
new file mode 100644 (file)
index 0000000..5374a9d
--- /dev/null
@@ -0,0 +1,38 @@
+/* XPM */
+static char * next_win_xpm[] = {
+"28 28 5 1",
+"       c Gray75 s backgroundToolBarColor",
+".      c black",
+"x      c white",
+"y      c Gray90",
+"z      c Gray60",
+"                            ",
+"                            ",
+" ...........                ",
+" .zzzz.zzzz.                ",
+" .zzzz.z...........         ",
+" .zzzz.z.yyyy.yyyy.         ",
+" .zzzz.z.yyyy.y...........  ",
+" .zzzz.z.yyyy.y.xxxx.xxxx.  ",
+" ........yyyy.y.xxxx.xxxx.  ",
+" .zzzz.z.yyyy.y.xxxx.xxxx.  ",
+" .zzzz.z........xxxx.xxxx.  ",
+" .zzzz.z.yyyy.y.xxxx.xxxx.  ",
+" .zzzz.z.yyyy.y...........  ",
+" .zzzz.z.yyyy.y.xxxx.xxxx.  ",
+" ........yyyy.y.xxxx.xxxx.  ",
+"        .yyyy.y.xxxx.xxxx.  ",
+"        ........xxxx.xxxx.  ",
+"               .xxxx.xxxx.  ",
+"               ...........  ",
+"                            ",
+"                            ",
+"                 ..         ",
+"                  ...       ",
+"    ...................     ",
+"                  ...       ",
+"                 ..         ",
+"                            ",
+"                            "};
+
+
diff --git a/etc/toolbar/next-win-xx.xbm b/etc/toolbar/next-win-xx.xbm
new file mode 100644 (file)
index 0000000..5d0bbad
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xfe,0x0f,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x42,0xff,0x07,0x00,0x00,0x00,0x00,0x00,0x42,0xa1,0xff,0x03,0x00,0x00,
+ 0x00,0x00,0xfe,0xa1,0x10,0x02,0x00,0x00,0x00,0x00,0x42,0xff,0x10,0x02,0x00,
+ 0x00,0x00,0x00,0x42,0xa1,0xff,0x03,0x00,0x00,0x00,0x00,0xfe,0xa1,0x10,0x02,
+ 0x00,0x00,0x00,0x00,0x00,0xff,0x10,0x02,0x00,0x00,0x00,0x00,0x00,0x80,0xff,
+ 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,0x00,
+ 0x00,0x00,0xf0,0xff,0x7f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x06,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/next-win-xx.xpm b/etc/toolbar/next-win-xx.xpm
new file mode 100644 (file)
index 0000000..fa2e9ff
--- /dev/null
@@ -0,0 +1,38 @@
+/* XPM */
+static char * next_win_xpm[] = {
+"28 28 5 1",
+"       c Gray75 s backgroundToolBarColor",
+".      c Gray60",
+"x      c white",
+"y      c Gray90",
+"z      c Gray60",
+"                            ",
+"                            ",
+" ...........                ",
+" .zzzz.zzzz.                ",
+" .zzzz.z...........         ",
+" .zzzz.z.yyyy.yyyy.         ",
+" .zzzz.z.yyyy.y...........  ",
+" .zzzz.z.yyyy.y.xxxx.xxxx.  ",
+" ........yyyy.y.xxxx.xxxx.  ",
+" .zzzz.z.yyyy.y.xxxx.xxxx.  ",
+" .zzzz.z........xxxx.xxxx.  ",
+" .zzzz.z.yyyy.y.xxxx.xxxx.  ",
+" .zzzz.z.yyyy.y...........  ",
+" .zzzz.z.yyyy.y.xxxx.xxxx.  ",
+" ........yyyy.y.xxxx.xxxx.  ",
+"        .yyyy.y.xxxx.xxxx.  ",
+"        ........xxxx.xxxx.  ",
+"               .xxxx.xxxx.  ",
+"               ...........  ",
+"                            ",
+"                            ",
+"                 ..         ",
+"                  ...       ",
+"    ...................     ",
+"                  ...       ",
+"                 ..         ",
+"                            ",
+"                            "};
+
+
diff --git a/etc/toolbar/paste-cap-up.xpm b/etc/toolbar/paste-cap-up.xpm
new file mode 100644 (file)
index 0000000..0858307
--- /dev/null
@@ -0,0 +1,42 @@
+/* XPM */
+static char * paste[] = {
+"33 33 6 1",
+"X     c Gray75 s backgroundToolBarColor",
+"u     c #000000000000 s foregroundToolBarColor",
+"o     c black",
+"O     c Gray90",
+"+     c Gray60",
+"@     c white",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXooXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoOOoXXXXXXXXXXXXXXX",
+"XXXXXXXXooooooOooOooooooXXXXXXXXX",
+"XXXXXXXo++++oOOOOOOo++++oXXXXXXXX",
+"XXXXXXXo+++oooooooooo+++oXXXXXXXX",
+"XXXXXXXo++++++++++++++++oXXXXXXXX",
+"XXXXXXXo++++++++++++++++oXXXXXXXX",
+"XXXXXXXo++++++++++++++++oXXXXXXXX",
+"XXXXXXXo++++++++++++++++oXXXXXXXX",
+"XXXXXXXo++++++oooooooooooXXXXXXXX",
+"XXXXXXXo++++++o@@@@@@@@ooXXXXXXXX",
+"XXXXXXXo++++++o@@@@@@@@o+oXXXXXXX",
+"XXXXXXXo++++++o@oooooo@ooooXXXXXX",
+"XXXXXXXo++++++o@@@@@@@@@@@oXXXXXX",
+"XXXXXXXo++++++o@oooo@@@@@@oXXXXXX",
+"XXXXXXXo++++++o@@@@@@@@@@@oXXXXXX",
+"XXXXXXXo++++++o@@@@@@@@@@@oXXXXXX",
+"XXXXXXXo++++++o@oooooooo@@oXXXXXX",
+"XXXXXXXoooooooo@@@@@@@@@@@oXXXXXX",
+"XXXXXXXXXXXXXXo@@@@@@@@@@@oXXXXXX",
+"XXXXXXXXXXXXXXo@@@@@@@@@@@oXXXXXX",
+"XXXXXXXXXXXXXXoooooooooooooXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXuXXXXXXXXXXX",
+"XXXXXXXuuuXXXXXXXXXXXuXXXXXXXXXXX",
+"XXXXXXXuXXuXuuXXXuuXuuuXuXXXXXXXX",
+"XXXXXXXuXXuXXXuXuXXXXuXuXuXXXXXXX",
+"XXXXXXXuuuXXuuuXXuuXXuXuuuXXXXXXX",
+"XXXXXXXuXXXXuXuXXXuXXuXuXXXXXXXXX",
+"XXXXXXXuXXXXuuXuuuXXXuXXuuXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/paste-cap-xx.xpm b/etc/toolbar/paste-cap-xx.xpm
new file mode 100644 (file)
index 0000000..aeff780
--- /dev/null
@@ -0,0 +1,41 @@
+/* XPM */
+static char * paste[] = {
+"33 33 5 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c Gray90",
+"+     c Gray60",
+"@     c white",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXooXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXoOOoXXXXXXXXXXXXXXX",
+"XXXXXXXXooooooOooOooooooXXXXXXXXX",
+"XXXXXXXo++++oOOOOOOo++++oXXXXXXXX",
+"XXXXXXXo+++oooooooooo+++oXXXXXXXX",
+"XXXXXXXo++++++++++++++++oXXXXXXXX",
+"XXXXXXXo++++++++++++++++oXXXXXXXX",
+"XXXXXXXo++++++++++++++++oXXXXXXXX",
+"XXXXXXXo++++++++++++++++oXXXXXXXX",
+"XXXXXXXo++++++oooooooooooXXXXXXXX",
+"XXXXXXXo++++++o@@@@@@@@ooXXXXXXXX",
+"XXXXXXXo++++++o@@@@@@@@o+oXXXXXXX",
+"XXXXXXXo++++++o@oooooo@ooooXXXXXX",
+"XXXXXXXo++++++o@@@@@@@@@@@oXXXXXX",
+"XXXXXXXo++++++o@oooo@@@@@@oXXXXXX",
+"XXXXXXXo++++++o@@@@@@@@@@@oXXXXXX",
+"XXXXXXXo++++++o@@@@@@@@@@@oXXXXXX",
+"XXXXXXXo++++++o@oooooooo@@oXXXXXX",
+"XXXXXXXoooooooo@@@@@@@@@@@oXXXXXX",
+"XXXXXXXXXXXXXXo@@@@@@@@@@@oXXXXXX",
+"XXXXXXXXXXXXXXo@@@@@@@@@@@oXXXXXX",
+"XXXXXXXXXXXXXXoooooooooooooXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXoXXXXXXXXXXX",
+"XXXXXXXoooXXXXXXXXXXXoXXXXXXXXXXX",
+"XXXXXXXoXXoXooXXXooXoooXoXXXXXXXX",
+"XXXXXXXoXXoXXXoXoXXXXoXoXoXXXXXXX",
+"XXXXXXXoooXXoooXXooXXoXoooXXXXXXX",
+"XXXXXXXoXXXXoXoXXXoXXoXoXXXXXXXXX",
+"XXXXXXXoXXXXooXoooXXXoXXooXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/paste-dn.xbm b/etc/toolbar/paste-dn.xbm
new file mode 100644 (file)
index 0000000..896bb3a
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0x9f,0xff,
+ 0x0f,0xff,0x6f,0xff,0x0f,0x3f,0x90,0xc0,0x0f,0xdf,0xfb,0xbd,0x0f,0xdf,0x01,
+ 0xb8,0x0f,0xdf,0xff,0xbf,0x0f,0xdf,0xff,0xbf,0x0f,0xdf,0xff,0xbf,0x0f,0xdf,
+ 0xff,0xbf,0x0f,0xdf,0xff,0xbf,0x0f,0xdf,0x0f,0x80,0x0f,0xdf,0xef,0x9f,0x0f,
+ 0xdf,0xef,0x5f,0x0f,0xdf,0x2f,0x10,0x0e,0xdf,0xef,0xff,0x0e,0xdf,0x2f,0xfc,
+ 0x0e,0xdf,0xef,0xff,0x0e,0xdf,0xef,0xff,0x0e,0xdf,0x2f,0xc0,0x0e,0x1f,0xe0,
+ 0xff,0x0e,0xff,0xef,0xff,0x0e,0xff,0xef,0xff,0x0e,0xff,0x0f,0x00,0x0e,0xff,
+ 0xff,0xff,0x0f,0xff,0xff,0xff,0x0f};
diff --git a/etc/toolbar/paste-up.xbm b/etc/toolbar/paste-up.xbm
new file mode 100644 (file)
index 0000000..3010992
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x00,
+ 0x00,0x00,0x90,0x00,0x00,0xc0,0x6f,0x3f,0x00,0x20,0x04,0x42,0x00,0x20,0xfe,
+ 0x47,0x00,0x20,0x00,0x40,0x00,0x20,0x00,0x40,0x00,0x20,0x00,0x40,0x00,0x20,
+ 0x00,0x40,0x00,0x20,0x00,0x40,0x00,0x20,0xf0,0x7f,0x00,0x20,0x10,0x60,0x00,
+ 0x20,0x10,0xa0,0x00,0x20,0xd0,0xef,0x01,0x20,0x10,0x00,0x01,0x20,0xd0,0x03,
+ 0x01,0x20,0x10,0x00,0x01,0x20,0x10,0x00,0x01,0x20,0xd0,0x3f,0x01,0xe0,0x1f,
+ 0x00,0x01,0x00,0x10,0x00,0x01,0x00,0x10,0x00,0x01,0x00,0xf0,0xff,0x01,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/paste-up.xpm b/etc/toolbar/paste-up.xpm
new file mode 100644 (file)
index 0000000..8c5a22c
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * paste[] = {
+"28 28 5 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c black",
+"O     c Gray90",
+"+     c Gray60",
+"@     c white",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXooXXXXXXXXXXXXX",
+"XXXXXXXXXXXXoOOoXXXXXXXXXXXX",
+"XXXXXXooooooOooOooooooXXXXXX",
+"XXXXXo++++oOOOOOOo++++oXXXXX",
+"XXXXXo+++oooooooooo+++oXXXXX",
+"XXXXXo++++++++++++++++oXXXXX",
+"XXXXXo++++++++++++++++oXXXXX",
+"XXXXXo++++++++++++++++oXXXXX",
+"XXXXXo++++++++++++++++oXXXXX",
+"XXXXXo++++++++++++++++oXXXXX",
+"XXXXXo++++++oooooooooooXXXXX",
+"XXXXXo++++++o@@@@@@@@ooXXXXX",
+"XXXXXo++++++o@@@@@@@@o+oXXXX",
+"XXXXXo++++++o@oooooo@ooooXXX",
+"XXXXXo++++++o@@@@@@@@@@@oXXX",
+"XXXXXo++++++o@oooo@@@@@@oXXX",
+"XXXXXo++++++o@@@@@@@@@@@oXXX",
+"XXXXXo++++++o@@@@@@@@@@@oXXX",
+"XXXXXo++++++o@oooooooo@@oXXX",
+"XXXXXoooooooo@@@@@@@@@@@oXXX",
+"XXXXXXXXXXXXo@@@@@@@@@@@oXXX",
+"XXXXXXXXXXXXo@@@@@@@@@@@oXXX",
+"XXXXXXXXXXXXoooooooooooooXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/paste-xx.xbm b/etc/toolbar/paste-xx.xbm
new file mode 100644 (file)
index 0000000..da6bec9
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x90,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x04,0x42,0x00,0x00,0x00,
+ 0x00,0x00,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x40,0x00,0x00,
+ 0x00,0x00,0x00,0x20,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x20,0x10,0x60,0x00,
+ 0x00,0x00,0x00,0x00,0x20,0xd0,0xef,0x01,0x00,0x00,0x00,0x00,0x20,0xd0,0x03,
+ 0x01,0x00,0x00,0x00,0x00,0x20,0x10,0x00,0x01,0x00,0x00,0x00,0x00,0xe0,0x1f,
+ 0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x01,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/paste-xx.xpm b/etc/toolbar/paste-xx.xpm
new file mode 100644 (file)
index 0000000..2045bca
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * paste[] = {
+"28 28 5 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c Gray90",
+"+     c Gray60",
+"@     c white",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXooXXXXXXXXXXXXX",
+"XXXXXXXXXXXXoOOoXXXXXXXXXXXX",
+"XXXXXXooooooOooOooooooXXXXXX",
+"XXXXXo++++oOOOOOOo++++oXXXXX",
+"XXXXXo+++oooooooooo+++oXXXXX",
+"XXXXXo++++++++++++++++oXXXXX",
+"XXXXXo++++++++++++++++oXXXXX",
+"XXXXXo++++++++++++++++oXXXXX",
+"XXXXXo++++++++++++++++oXXXXX",
+"XXXXXo++++++++++++++++oXXXXX",
+"XXXXXo++++++oooooooooooXXXXX",
+"XXXXXo++++++o@@@@@@@@ooXXXXX",
+"XXXXXo++++++o@@@@@@@@o+oXXXX",
+"XXXXXo++++++o@oooooo@ooooXXX",
+"XXXXXo++++++o@@@@@@@@@@@oXXX",
+"XXXXXo++++++o@oooo@@@@@@oXXX",
+"XXXXXo++++++o@@@@@@@@@@@oXXX",
+"XXXXXo++++++o@@@@@@@@@@@oXXX",
+"XXXXXo++++++o@oooooooo@@oXXX",
+"XXXXXoooooooo@@@@@@@@@@@oXXX",
+"XXXXXXXXXXXXo@@@@@@@@@@@oXXX",
+"XXXXXXXXXXXXo@@@@@@@@@@@oXXX",
+"XXXXXXXXXXXXoooooooooooooXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/printer-cap-up.xpm b/etc/toolbar/printer-cap-up.xpm
new file mode 100644 (file)
index 0000000..57883a7
--- /dev/null
@@ -0,0 +1,43 @@
+/* XPM */
+static char * printer[] = {
+"33 33 7 1",
+"X     c Gray75 s backgroundToolBarColor",
+"u     c #000000000000 s foregroundToolBarColor",
+"o     c black",
+"O     c white",
+"+     c Gray60",
+"@     c Gray90",
+"#     c Gray40",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXoooooooooXXXXXXXXXXXXXXX",
+"XXXXXXXXXoOOOOOOOooXXXXXXXXXXXXXX",
+"XXXXXXXXXoOooooOOoXoXXXXXXXXXXXXX",
+"XXXXXXXXXoOOOOOOOoooooooXXXXXXXXX",
+"XXXXXXXXXoOoooOOOOOOoXo+ooXXXXXXX",
+"XXXXXXXXXoOOOOOOOOOOoo++++oXXXXXX",
+"XXXXXXXXXoooooooooooo++++ooXXXXXX",
+"XXXXXXXXo@@@@@@@@@@@o+++o+oXXXXXX",
+"XXXXXXXo@@@@@@@@@@@@@o+o++oXXXXXX",
+"XXXXXXooooooooooooooooo+++oXXXXXX",
+"XXXXXXo@@@@@@@@@@@@@@@o+++oXXXXXX",
+"XXXXXXo@@@@@@@@@@@@@@@o++ooXXXXXX",
+"XXXXXXo@@@@@@@@@@@@@@@o+ooXXXXXXX",
+"XXXXXXo@@@@@@@@@@@@@@@oo#oXXXXXXX",
+"XXXXXXooooooooooooooooo#oXXXXXXXX",
+"XXXXXXXo+++++++++++++o#oXXXXXXXXX",
+"XXXXXXXXo+++++++++++o#oXXXXXXXXXX",
+"XXXXXXXXo+++++++++++ooXXXXXXXXXXX",
+"XXXXXXXXXooooooooooooXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXuXXXXXXXuXXXXXXXX",
+"XXXXXXXXuuuXXXXXXXXXXXXXuXXXXXXXX",
+"XXXXXXXXuXXuXuXuuXuuuXXuuuXXXXXXX",
+"XXXXXXXXuXXuXuuXuXuXXuXXuXXXXXXXX",
+"XXXXXXXXuuuXXuXXuXuXXuXXuXXXXXXXX",
+"XXXXXXXXuXXXXuXXuXuXXuXXuXXXXXXXX",
+"XXXXXXXXuXXXXuXXuXuXXuXXuXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/printer-cap-xx.xpm b/etc/toolbar/printer-cap-xx.xpm
new file mode 100644 (file)
index 0000000..3dd2078
--- /dev/null
@@ -0,0 +1,42 @@
+/* XPM */
+static char * printer[] = {
+"33 33 6 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c white",
+"+     c Gray60",
+"@     c Gray90",
+"#     c Gray40",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXoooooooooXXXXXXXXXXXXXXX",
+"XXXXXXXXXoOOOOOOOooXXXXXXXXXXXXXX",
+"XXXXXXXXXoOooooOOoXoXXXXXXXXXXXXX",
+"XXXXXXXXXoOOOOOOOoooooooXXXXXXXXX",
+"XXXXXXXXXoOoooOOOOOOoXo+ooXXXXXXX",
+"XXXXXXXXXoOOOOOOOOOOoo++++oXXXXXX",
+"XXXXXXXXXoooooooooooo++++ooXXXXXX",
+"XXXXXXXXo@@@@@@@@@@@o+++o+oXXXXXX",
+"XXXXXXXo@@@@@@@@@@@@@o+o++oXXXXXX",
+"XXXXXXooooooooooooooooo+++oXXXXXX",
+"XXXXXXo@@@@@@@@@@@@@@@o+++oXXXXXX",
+"XXXXXXo@@@@@@@@@@@@@@@o++ooXXXXXX",
+"XXXXXXo@@@@@@@@@@@@@@@o+ooXXXXXXX",
+"XXXXXXo@@@@@@@@@@@@@@@oo#oXXXXXXX",
+"XXXXXXooooooooooooooooo#oXXXXXXXX",
+"XXXXXXXo+++++++++++++o#oXXXXXXXXX",
+"XXXXXXXXo+++++++++++o#oXXXXXXXXXX",
+"XXXXXXXXo+++++++++++ooXXXXXXXXXXX",
+"XXXXXXXXXooooooooooooXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXoXXXXXXXoXXXXXXXX",
+"XXXXXXXXoooXXXXXXXXXXXXXoXXXXXXXX",
+"XXXXXXXXoXXoXoXooXoooXXoooXXXXXXX",
+"XXXXXXXXoXXoXooXoXoXXoXXoXXXXXXXX",
+"XXXXXXXXoooXXoXXoXoXXoXXoXXXXXXXX",
+"XXXXXXXXoXXXXoXXoXoXXoXXoXXXXXXXX",
+"XXXXXXXXoXXXXoXXoXoXXoXXoXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/printer-dn.xbm b/etc/toolbar/printer-dn.xbm
new file mode 100644 (file)
index 0000000..1e1d034
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,
+ 0x0f,0x3f,0x80,0xff,0x0f,0xbf,0x3f,0xff,0x0f,0xbf,0xb0,0xfe,0x0f,0xbf,0x3f,
+ 0xe0,0x0f,0xbf,0xf8,0x95,0x0f,0xbf,0xff,0x79,0x0f,0x3f,0x00,0x3c,0x0f,0xdf,
+ 0xff,0x5d,0x0f,0xef,0xff,0x6b,0x0f,0x07,0x00,0x70,0x0f,0xf7,0xff,0x77,0x0f,
+ 0xf7,0xff,0x37,0x0f,0xf7,0xff,0x97,0x0f,0xf7,0xff,0xa7,0x0f,0x07,0x00,0xd0,
+ 0x0f,0xef,0xff,0xeb,0x0f,0xdf,0xff,0xf5,0x0f,0xdf,0xff,0xf9,0x0f,0x3f,0x00,
+ 0xfc,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,
+ 0xff,0xff,0x0f,0xff,0xff,0xff,0x0f};
diff --git a/etc/toolbar/printer-up.xbm b/etc/toolbar/printer-up.xbm
new file mode 100644 (file)
index 0000000..ed39a5b
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0xc0,0x7f,0x00,0x00,0x40,0xc0,0x00,0x00,0x40,0x4f,0x01,0x00,0x40,0xc0,
+ 0x1f,0x00,0x40,0x07,0x6a,0x00,0x40,0x00,0x86,0x00,0xc0,0xff,0xc3,0x00,0x20,
+ 0x00,0xa2,0x00,0x10,0x00,0x94,0x00,0xf8,0xff,0x8f,0x00,0x08,0x00,0x88,0x00,
+ 0x08,0x00,0xc8,0x00,0x08,0x00,0x68,0x00,0x08,0x00,0x58,0x00,0xf8,0xff,0x2f,
+ 0x00,0x10,0x00,0x14,0x00,0x20,0x00,0x0a,0x00,0x20,0x00,0x06,0x00,0xc0,0xff,
+ 0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/printer-up.xpm b/etc/toolbar/printer-up.xpm
new file mode 100644 (file)
index 0000000..7afe265
--- /dev/null
@@ -0,0 +1,37 @@
+/* XPM */
+static char * printer[] = {
+"28 28 6 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c black",
+"O     c white",
+"+     c Gray60",
+"@     c Gray90",
+"#     c Gray40",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXoooooooooXXXXXXXXXXXXX",
+"XXXXXXoOOOOOOOooXXXXXXXXXXXX",
+"XXXXXXoOooooOOoXoXXXXXXXXXXX",
+"XXXXXXoOOOOOOOoooooooXXXXXXX",
+"XXXXXXoOoooOOOOOOoXo+ooXXXXX",
+"XXXXXXoOOOOOOOOOOoo++++oXXXX",
+"XXXXXXoooooooooooo++++ooXXXX",
+"XXXXXo@@@@@@@@@@@o+++o+oXXXX",
+"XXXXo@@@@@@@@@@@@@o+o++oXXXX",
+"XXXooooooooooooooooo+++oXXXX",
+"XXXo@@@@@@@@@@@@@@@o+++oXXXX",
+"XXXo@@@@@@@@@@@@@@@o++ooXXXX",
+"XXXo@@@@@@@@@@@@@@@o+ooXXXXX",
+"XXXo@@@@@@@@@@@@@@@oo#oXXXXX",
+"XXXooooooooooooooooo#oXXXXXX",
+"XXXXo+++++++++++++o#oXXXXXXX",
+"XXXXXo+++++++++++o#oXXXXXXXX",
+"XXXXXo+++++++++++ooXXXXXXXXX",
+"XXXXXXooooooooooooXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/printer-xx.xbm b/etc/toolbar/printer-xx.xbm
new file mode 100644 (file)
index 0000000..dceba3c
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x40,0xc0,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0xc0,
+ 0x1f,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x86,0x00,0x00,0x00,0x00,0x00,0x20,
+ 0x00,0xa2,0x00,0x00,0x00,0x00,0x00,0xf8,0xff,0x8f,0x00,0x00,0x00,0x00,0x00,
+ 0x08,0x00,0xc8,0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x58,0x00,0x00,0x00,0x00,
+ 0x00,0x10,0x00,0x14,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x06,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/printer-xx.xpm b/etc/toolbar/printer-xx.xpm
new file mode 100644 (file)
index 0000000..fb3a9dc
--- /dev/null
@@ -0,0 +1,37 @@
+/* XPM */
+static char * printer[] = {
+"28 28 6 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c white",
+"+     c Gray60",
+"@     c Gray90",
+"#     c Gray40",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXoooooooooXXXXXXXXXXXXX",
+"XXXXXXoOOOOOOOooXXXXXXXXXXXX",
+"XXXXXXoOooooOOoXoXXXXXXXXXXX",
+"XXXXXXoOOOOOOOoooooooXXXXXXX",
+"XXXXXXoOoooOOOOOOoXo+ooXXXXX",
+"XXXXXXoOOOOOOOOOOoo++++oXXXX",
+"XXXXXXoooooooooooo++++ooXXXX",
+"XXXXXo@@@@@@@@@@@o+++o+oXXXX",
+"XXXXo@@@@@@@@@@@@@o+o++oXXXX",
+"XXXooooooooooooooooo+++oXXXX",
+"XXXo@@@@@@@@@@@@@@@o+++oXXXX",
+"XXXo@@@@@@@@@@@@@@@o++ooXXXX",
+"XXXo@@@@@@@@@@@@@@@o+ooXXXXX",
+"XXXo@@@@@@@@@@@@@@@oo#oXXXXX",
+"XXXooooooooooooooooo#oXXXXXX",
+"XXXXo+++++++++++++o#oXXXXXXX",
+"XXXXXo+++++++++++o#oXXXXXXXX",
+"XXXXXo+++++++++++ooXXXXXXXXX",
+"XXXXXXooooooooooooXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/replace-cap-up.xpm b/etc/toolbar/replace-cap-up.xpm
new file mode 100644 (file)
index 0000000..f271422
--- /dev/null
@@ -0,0 +1,38 @@
+/* XPM */
+static char * replace[] = {
+"33 33 2 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c black s foregroundToolBarColor",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXooXXXXooooXXXXXXXXXXXXXX",
+"XXXXXXXXXooXXXXooXXoXXXXXXXXXXXXX",
+"XXXXXXXXoXooXXXooXXoXXXXXXXXXXXXX",
+"XXXXXXXXoXooXXXoooooXXXoooXXXXXXX",
+"XXXXXXXoXXXooXXooXXXoXXooXXXXXXXX",
+"XXXXXXXooooooXXooXXXoXXoXoXXXXXXX",
+"XXXXXXoXXXXXooXooXXXoXXXXXoXXXXXX",
+"XXXXXXoXXXXXooXoooooXXXXXXoXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXoXXXXXX",
+"XXXXXXXXXXXXXXXoXXXXXXXXXXoXXXXXX",
+"XXXXXXXXXXXXXXoXXXXXXXXXXoXXXXXXX",
+"XXXXXXXXXXXXXXoXXXXXXXXXoXXXXXXXX",
+"XXXXXXXXXXXXXoXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXoXXXXXXooooXXXXXXXXXX",
+"XXXXXXXXXXXXoXXXXXooXXXoXXXXXXXXX",
+"XXXXXXXXXXXoXXXXXXooXXXXXXXXXXXXX",
+"XXXXXXXXoXoXXXXXXXooXXXXXXXXXXXXX",
+"XXXXXXXXooXXXXXXXXooXXXXXXXXXXXXX",
+"XXXXXXXXooooXXXXXXooXXXXXXXXXXXXX",
+"XXXXXXXXooXXXXXXXXooXXXoXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXooooXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXoXXXXXXXXXXXXXXX",
+"XXXoooXXXXXXXXXXXoXXXXXXXXXXXXXXX",
+"XXXoXXoXXoXXoooXXoXooXXXooXXoXXXX",
+"XXXoXXoXoXoXoXXoXoXXXoXoXXXoXoXXX",
+"XXXoooXXoooXoXXoXoXoooXoXXXoooXXX",
+"XXXoXXoXoXXXoXXoXoXoXoXoXXXoXXXXX",
+"XXXoXXoXXooXoooXXoXooXoXooXXooXXX",
+"XXXXXXXXXXXXoXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/replace-cap-xx.xpm b/etc/toolbar/replace-cap-xx.xpm
new file mode 100644 (file)
index 0000000..44049b0
--- /dev/null
@@ -0,0 +1,38 @@
+/* XPM */
+static char * replace[] = {
+"33 33 2 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXooXXXXooooXXXXXXXXXXXXXX",
+"XXXXXXXXXooXXXXooXXoXXXXXXXXXXXXX",
+"XXXXXXXXoXooXXXooXXoXXXXXXXXXXXXX",
+"XXXXXXXXoXooXXXoooooXXXoooXXXXXXX",
+"XXXXXXXoXXXooXXooXXXoXXooXXXXXXXX",
+"XXXXXXXooooooXXooXXXoXXoXoXXXXXXX",
+"XXXXXXoXXXXXooXooXXXoXXXXXoXXXXXX",
+"XXXXXXoXXXXXooXoooooXXXXXXoXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXoXXXXXX",
+"XXXXXXXXXXXXXXXoXXXXXXXXXXoXXXXXX",
+"XXXXXXXXXXXXXXoXXXXXXXXXXoXXXXXXX",
+"XXXXXXXXXXXXXXoXXXXXXXXXoXXXXXXXX",
+"XXXXXXXXXXXXXoXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXoXXXXXXooooXXXXXXXXXX",
+"XXXXXXXXXXXXoXXXXXooXXXoXXXXXXXXX",
+"XXXXXXXXXXXoXXXXXXooXXXXXXXXXXXXX",
+"XXXXXXXXoXoXXXXXXXooXXXXXXXXXXXXX",
+"XXXXXXXXooXXXXXXXXooXXXXXXXXXXXXX",
+"XXXXXXXXooooXXXXXXooXXXXXXXXXXXXX",
+"XXXXXXXXooXXXXXXXXooXXXoXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXooooXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXoXXXXXXXXXXXXXXX",
+"XXXoooXXXXXXXXXXXoXXXXXXXXXXXXXXX",
+"XXXoXXoXXoXXoooXXoXooXXXooXXoXXXX",
+"XXXoXXoXoXoXoXXoXoXXXoXoXXXoXoXXX",
+"XXXoooXXoooXoXXoXoXoooXoXXXoooXXX",
+"XXXoXXoXoXXXoXXoXoXoXoXoXXXoXXXXX",
+"XXXoXXoXXooXoooXXoXooXoXooXXooXXX",
+"XXXXXXXXXXXXoXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/replace-dn.xbm b/etc/toolbar/replace-dn.xbm
new file mode 100644 (file)
index 0000000..a8983e1
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0x3f,0x0f,0xff,
+ 0x0f,0x3f,0xcf,0xfe,0x0f,0x5f,0xce,0xfe,0x0f,0x5f,0x0e,0xfe,0x0f,0xef,0xcc,
+ 0x8d,0x0f,0x0f,0xcc,0xcd,0x0f,0xf7,0xc9,0xad,0x0f,0xf7,0x09,0x7e,0x0f,0xff,
+ 0xff,0x7f,0x0f,0xff,0xef,0x7f,0x0f,0xff,0xf7,0x7f,0x0f,0xff,0xf7,0xbf,0x0f,
+ 0xff,0xfb,0xdf,0x0f,0xff,0xfd,0xff,0x0f,0xff,0xfd,0xf0,0x0f,0xff,0x7e,0xee,
+ 0x0f,0x5f,0x7f,0xfe,0x0f,0x9f,0x7f,0xfe,0x0f,0x1f,0x7e,0xfe,0x0f,0x9f,0x7f,
+ 0xfe,0x0f,0xff,0x7f,0xee,0x0f,0xff,0xff,0xf0,0x0f,0xff,0xff,0xff,0x0f,0xff,
+ 0xff,0xff,0x0f,0xff,0xff,0xff,0x0f};
diff --git a/etc/toolbar/replace-up.xbm b/etc/toolbar/replace-up.xbm
new file mode 100644 (file)
index 0000000..18cb1b0
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xf0,0x00,
+ 0x00,0xc0,0x30,0x01,0x00,0xa0,0x31,0x01,0x00,0xa0,0xf1,0x01,0x00,0x10,0x33,
+ 0x72,0x00,0xf0,0x33,0x32,0x00,0x08,0x36,0x52,0x00,0x08,0xf6,0x81,0x00,0x00,
+ 0x00,0x80,0x00,0x00,0x10,0x80,0x00,0x00,0x08,0x80,0x00,0x00,0x08,0x40,0x00,
+ 0x00,0x04,0x20,0x00,0x00,0x02,0x00,0x00,0x00,0x02,0x0f,0x00,0x00,0x81,0x11,
+ 0x00,0xa0,0x80,0x01,0x00,0x60,0x80,0x01,0x00,0xe0,0x81,0x01,0x00,0x60,0x80,
+ 0x01,0x00,0x00,0x80,0x11,0x00,0x00,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/replace-up.xpm b/etc/toolbar/replace-up.xpm
new file mode 100644 (file)
index 0000000..63e2ed5
--- /dev/null
@@ -0,0 +1,33 @@
+/* XPM */
+static char * replace[] = {
+"28 28 2 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c black s foregroundToolBarColor",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXooXXXXooooXXXXXXXXXXXX",
+"XXXXXXooXXXXooXXoXXXXXXXXXXX",
+"XXXXXoXooXXXooXXoXXXXXXXXXXX",
+"XXXXXoXooXXXoooooXXXXXXXXXXX",
+"XXXXoXXXooXXooXXXoXXoooXXXXX",
+"XXXXooooooXXooXXXoXXooXXXXXX",
+"XXXoXXXXXooXooXXXoXXoXoXXXXX",
+"XXXoXXXXXooXoooooXXXXXXoXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXoXXXX",
+"XXXXXXXXXXXXoXXXXXXXXXXoXXXX",
+"XXXXXXXXXXXoXXXXXXXXXXXoXXXX",
+"XXXXXXXXXXXoXXXXXXXXXXoXXXXX",
+"XXXXXXXXXXoXXXXXXXXXXoXXXXXX",
+"XXXXXXXXXoXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXoXXXXXXooooXXXXXXXX",
+"XXXXXXXXoXXXXXXooXXXoXXXXXXX",
+"XXXXXoXoXXXXXXXooXXXXXXXXXXX",
+"XXXXXooXXXXXXXXooXXXXXXXXXXX",
+"XXXXXooooXXXXXXooXXXXXXXXXXX",
+"XXXXXooXXXXXXXXooXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXooXXXoXXXXXXX",
+"XXXXXXXXXXXXXXXXooooXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/replace-xx.xbm b/etc/toolbar/replace-xx.xbm
new file mode 100644 (file)
index 0000000..9932d11
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc0,0xf0,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xa0,0x31,0x01,0x00,0x00,0x00,0x00,0x00,0x10,0x33,
+ 0x72,0x00,0x00,0x00,0x00,0x00,0x08,0x36,0x52,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0x80,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x04,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x02,0x0f,0x00,0x00,0x00,0x00,
+ 0x00,0xa0,0x80,0x01,0x00,0x00,0x00,0x00,0x00,0xe0,0x81,0x01,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x80,0x11,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/replace-xx.xpm b/etc/toolbar/replace-xx.xpm
new file mode 100644 (file)
index 0000000..a6ecc94
--- /dev/null
@@ -0,0 +1,33 @@
+/* XPM */
+static char * replace[] = {
+"28 28 2 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXooXXXXooooXXXXXXXXXXXX",
+"XXXXXXooXXXXooXXoXXXXXXXXXXX",
+"XXXXXoXooXXXooXXoXXXXXXXXXXX",
+"XXXXXoXooXXXoooooXXXXXXXXXXX",
+"XXXXoXXXooXXooXXXoXXoooXXXXX",
+"XXXXooooooXXooXXXoXXooXXXXXX",
+"XXXoXXXXXooXooXXXoXXoXoXXXXX",
+"XXXoXXXXXooXoooooXXXXXXoXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXoXXXX",
+"XXXXXXXXXXXXoXXXXXXXXXXoXXXX",
+"XXXXXXXXXXXoXXXXXXXXXXXoXXXX",
+"XXXXXXXXXXXoXXXXXXXXXXoXXXXX",
+"XXXXXXXXXXoXXXXXXXXXXoXXXXXX",
+"XXXXXXXXXoXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXoXXXXXXooooXXXXXXXX",
+"XXXXXXXXoXXXXXXooXXXoXXXXXXX",
+"XXXXXoXoXXXXXXXooXXXXXXXXXXX",
+"XXXXXooXXXXXXXXooXXXXXXXXXXX",
+"XXXXXooooXXXXXXooXXXXXXXXXXX",
+"XXXXXooXXXXXXXXooXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXooXXXoXXXXXXX",
+"XXXXXXXXXXXXXXXXooooXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/spell-cap-up.xpm b/etc/toolbar/spell-cap-up.xpm
new file mode 100644 (file)
index 0000000..ac2805c
--- /dev/null
@@ -0,0 +1,43 @@
+/* XPM */
+static char * dict[] = {
+"33 33 7 1",
+"X     c Gray75 s backgroundToolBarColor",
+"u     c #000000000000 s foregroundToolBarColor",
+"o     c black",
+"O     c Gray90",
+"+     c Gray40",
+"@     c Gray60",
+"#     c white",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXoooooooooooooooooXXXXXXXX",
+"XXXXXXXoXoOOOOOOOOOOOOO+oXXXXXXXX",
+"XXXXXXXooooooooooooooooOoXXXXXXXX",
+"XXXXXXoXo++o@@@@@@o+++oOoXXXXXXXX",
+"XXXXXXXoo++o@@@@@@@o++oOoXXXXXXXX",
+"XXXXXXXoo++o@@@@@@@@o+oOoXXXXXXXX",
+"XXXXXXoXo++o@ooooooo@ooOoXXXXXXXX",
+"XXXXXXXoo++o@o#####o@@oOoXXXXXXXX",
+"XXXXXXXoo++o@ooooooo@@oOoXXXXXXXX",
+"XXXXXXoXo++o@@@@@@@@@@oO###XXXXXX",
+"XXXXXXXoo++o@ooooooo@@###++XXXXXX",
+"XXXXXXXoo++o@@@@@@@@####+XXXXXXXX",
+"XXXXXX#Xo++o@@@@@@####++oXXXXXXXX",
+"XXXXX###o++o@@@@####++oOoXXXXXXXX",
+"XXXX####o++o@@@####+@@oOoXXXXXXXX",
+"XXXX+####++o@####++@@ooOoXXXXXXXX",
+"XXXXX+####+o####+@@@o+oOoXXXXXXXX",
+"XXXXXX+########+@@@o++oooXXXXXXXX",
+"XXXXXXo+######+@@@o+++oXXXXXXXXXX",
+"XXXXXXXo+####+oooooooooXXXXXXXXXX",
+"XXXXXXXXX+##+XXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXX++XXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXuXuXXXXXXXX",
+"XXXXXXXXXuuuXXXXXXXXXXuXuXXXXXXXX",
+"XXXXXXXXuXXXXuuuXXXuXXuXuXXXXXXXX",
+"XXXXXXXXuuuXXuXXuXuXuXuXuXXXXXXXX",
+"XXXXXXXXXXXuXuXXuXuuuXuXuXXXXXXXX",
+"XXXXXXXXXXXuXuXXuXuXXXuXuXXXXXXXX",
+"XXXXXXXXuuuXXuuuXXXuuXuXuXXXXXXXX",
+"XXXXXXXXXXXXXuXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/spell-cap-xx.xpm b/etc/toolbar/spell-cap-xx.xpm
new file mode 100644 (file)
index 0000000..97d2d0e
--- /dev/null
@@ -0,0 +1,42 @@
+/* XPM */
+static char * dict[] = {
+"33 33 6 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c Gray90",
+"+     c Gray40",
+"@     c Gray60",
+"#     c white",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXoooooooooooooooooXXXXXXXX",
+"XXXXXXXoXoOOOOOOOOOOOOO+oXXXXXXXX",
+"XXXXXXXooooooooooooooooOoXXXXXXXX",
+"XXXXXXoXo++o@@@@@@o+++oOoXXXXXXXX",
+"XXXXXXXoo++o@@@@@@@o++oOoXXXXXXXX",
+"XXXXXXXoo++o@@@@@@@@o+oOoXXXXXXXX",
+"XXXXXXoXo++o@ooooooo@ooOoXXXXXXXX",
+"XXXXXXXoo++o@o#####o@@oOoXXXXXXXX",
+"XXXXXXXoo++o@ooooooo@@oOoXXXXXXXX",
+"XXXXXXoXo++o@@@@@@@@@@oO###XXXXXX",
+"XXXXXXXoo++o@ooooooo@@###++XXXXXX",
+"XXXXXXXoo++o@@@@@@@@####+XXXXXXXX",
+"XXXXXX#Xo++o@@@@@@####++oXXXXXXXX",
+"XXXXX###o++o@@@@####++oOoXXXXXXXX",
+"XXXX####o++o@@@####+@@oOoXXXXXXXX",
+"XXXX+####++o@####++@@ooOoXXXXXXXX",
+"XXXXX+####+o####+@@@o+oOoXXXXXXXX",
+"XXXXXX+########+@@@o++oooXXXXXXXX",
+"XXXXXXo+######+@@@o+++oXXXXXXXXXX",
+"XXXXXXXo+####+oooooooooXXXXXXXXXX",
+"XXXXXXXXX+##+XXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXX++XXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXoXoXXXXXXXX",
+"XXXXXXXXXoooXXXXXXXXXXoXoXXXXXXXX",
+"XXXXXXXXoXXXXoooXXXoXXoXoXXXXXXXX",
+"XXXXXXXXoooXXoXXoXoXoXoXoXXXXXXXX",
+"XXXXXXXXXXXoXoXXoXoooXoXoXXXXXXXX",
+"XXXXXXXXXXXoXoXXoXoXXXoXoXXXXXXXX",
+"XXXXXXXXoooXXoooXXXooXoXoXXXXXXXX",
+"XXXXXXXXXXXXXoXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/spell-dn.xbm b/etc/toolbar/spell-dn.xbm
new file mode 100644 (file)
index 0000000..82117fa
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,
+ 0x0f,0x3f,0x00,0x80,0x0f,0x5f,0xff,0xbf,0x0f,0x1f,0x00,0xa0,0x0f,0xaf,0xfd,
+ 0xae,0x0f,0x9f,0xfd,0xad,0x0f,0x9f,0xfd,0xab,0x0f,0xaf,0x05,0xa4,0x0f,0x9f,
+ 0xf5,0xad,0x0f,0x9f,0x05,0xac,0x0f,0xaf,0xfd,0xef,0x0f,0x9f,0x05,0xfc,0x0f,
+ 0x9f,0xfd,0xff,0x0f,0xbf,0xfd,0xbf,0x0f,0xbf,0xfd,0xaf,0x0f,0xbf,0xfd,0xaf,
+ 0x0f,0xff,0xfd,0xa7,0x0f,0xff,0xfd,0xab,0x0f,0xff,0xff,0x8d,0x0f,0xef,0xff,
+ 0xee,0x0f,0xdf,0x0f,0xe0,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,
+ 0xff,0xff,0x0f,0xff,0xff,0xff,0x0f};
diff --git a/etc/toolbar/spell-up.xbm b/etc/toolbar/spell-up.xbm
new file mode 100644 (file)
index 0000000..53a0117
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0xc0,0xff,0x7f,0x00,0xa0,0x00,0x40,0x00,0xe0,0xff,0x5f,0x00,0x50,0x02,
+ 0x51,0x00,0x60,0x02,0x52,0x00,0x60,0x02,0x54,0x00,0x50,0xfa,0x5b,0x00,0x60,
+ 0x0a,0x52,0x00,0x60,0xfa,0x53,0x00,0x50,0x02,0x10,0x00,0x60,0xfa,0x03,0x00,
+ 0x60,0x02,0x00,0x00,0x40,0x02,0x40,0x00,0x40,0x02,0x50,0x00,0x40,0x02,0x50,
+ 0x00,0x00,0x02,0x58,0x00,0x00,0x02,0x54,0x00,0x00,0x00,0x72,0x00,0x10,0x00,
+ 0x11,0x00,0x20,0xf0,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/spell-up.xpm b/etc/toolbar/spell-up.xpm
new file mode 100644 (file)
index 0000000..454c0c6
--- /dev/null
@@ -0,0 +1,37 @@
+/* XPM */
+static char * dict[] = {
+"28 28 6 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c black",
+"O     c Gray90",
+"+     c Gray40",
+"@     c Gray60",
+"#     c white",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXoooooooooooooooooXXXXX",
+"XXXXXoXoOOOOOOOOOOOOO+oXXXXX",
+"XXXXXooooooooooooooooOoXXXXX",
+"XXXXoXo++o@@@@@@o+++oOoXXXXX",
+"XXXXXoo++o@@@@@@@o++oOoXXXXX",
+"XXXXXoo++o@@@@@@@@o+oOoXXXXX",
+"XXXXoXo++o@ooooooo@ooOoXXXXX",
+"XXXXXoo++o@o#####o@@oOoXXXXX",
+"XXXXXoo++o@ooooooo@@oOoXXXXX",
+"XXXXoXo++o@@@@@@@@@@oO###XXX",
+"XXXXXoo++o@ooooooo@@###++XXX",
+"XXXXXoo++o@@@@@@@@####+XXXXX",
+"XXXX#Xo++o@@@@@@####++oXXXXX",
+"XXX###o++o@@@@####++oOoXXXXX",
+"XX####o++o@@@####+@@oOoXXXXX",
+"XX+####++o@####++@@ooOoXXXXX",
+"XXX+####+o####+@@@o+oOoXXXXX",
+"XXXX+########+@@@o++oooXXXXX",
+"XXXXo+######+@@@o+++oXXXXXXX",
+"XXXXXo+####+oooooooooXXXXXXX",
+"XXXXXXX+##+XXXXXXXXXXXXXXXXX",
+"XXXXXXXX++XXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/spell-xx.xbm b/etc/toolbar/spell-xx.xbm
new file mode 100644 (file)
index 0000000..8a0e1ec
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xa0,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x50,0x02,
+ 0x51,0x00,0x00,0x00,0x00,0x00,0x60,0x02,0x54,0x00,0x00,0x00,0x00,0x00,0x60,
+ 0x0a,0x52,0x00,0x00,0x00,0x00,0x00,0x50,0x02,0x10,0x00,0x00,0x00,0x00,0x00,
+ 0x60,0x02,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x02,0x50,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x02,0x58,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x72,0x00,0x00,0x00,
+ 0x00,0x00,0x20,0xf0,0x1f,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/spell-xx.xpm b/etc/toolbar/spell-xx.xpm
new file mode 100644 (file)
index 0000000..206d8f5
--- /dev/null
@@ -0,0 +1,37 @@
+/* XPM */
+static char * dict[] = {
+"28 28 6 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c Gray90",
+"+     c Gray40",
+"@     c Gray60",
+"#     c white",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXoooooooooooooooooXXXXX",
+"XXXXXoXoOOOOOOOOOOOOO+oXXXXX",
+"XXXXXooooooooooooooooOoXXXXX",
+"XXXXoXo++o@@@@@@o+++oOoXXXXX",
+"XXXXXoo++o@@@@@@@o++oOoXXXXX",
+"XXXXXoo++o@@@@@@@@o+oOoXXXXX",
+"XXXXoXo++o@ooooooo@ooOoXXXXX",
+"XXXXXoo++o@o#####o@@oOoXXXXX",
+"XXXXXoo++o@ooooooo@@oOoXXXXX",
+"XXXXoXo++o@@@@@@@@@@oO###XXX",
+"XXXXXoo++o@ooooooo@@###++XXX",
+"XXXXXoo++o@@@@@@@@####+XXXXX",
+"XXXX#Xo++o@@@@@@####++oXXXXX",
+"XXX###o++o@@@@####++oOoXXXXX",
+"XX####o++o@@@####+@@oOoXXXXX",
+"XX+####++o@####++@@ooOoXXXXX",
+"XXX+####+o####+@@@o+oOoXXXXX",
+"XXXX+########+@@@o++oooXXXXX",
+"XXXXo+######+@@@o+++oXXXXXXX",
+"XXXXXo+####+oooooooooXXXXXXX",
+"XXXXXXX+##+XXXXXXXXXXXXXXXXX",
+"XXXXXXXX++XXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/undo-cap-up.xpm b/etc/toolbar/undo-cap-up.xpm
new file mode 100644 (file)
index 0000000..652116e
--- /dev/null
@@ -0,0 +1,42 @@
+/* XPM */
+static char * undo[] = {
+"33 33 6 1",
+"X     c Gray75 s backgroundToolBarColor",
+"u     c #000000000000 s foregroundToolBarColor",
+"o     c black",
+"O     c Gray60",
+"+     c Gray90",
+"@     c white",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXooXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXooOOooooXXXXXX",
+"XXXXXXXXXXXXXXXXXooOOOOOOOOooXXXX",
+"XXXXXXXXXXXXXXXooOOOOOOOOOooXXXXX",
+"XXXXXXXXXXXXXoo++ooooOOOooOoXXXXX",
+"XXXXXXXXXXXoo++++++++oooOOoXXXXXX",
+"XXXXXXXXXoo+++++++++oooOOOoXXXXXX",
+"XXXXXXXoo+++++++++oo++oOOoXXXXXXX",
+"XXXXXXoo++++++++oo+++oOooXXXXXXXX",
+"XXXXXo++oooo++oo+++++ooXXXXXXXXXX",
+"XXXXXo++++++oo+++++ooXXXXXXXXXXXX",
+"XXXXo+++++++o++++ooXXXXXXXXXXXXXX",
+"XXXXo+++++++o++ooXXXXXXXXXXXXXXXX",
+"XXXoo++++++o+ooXXXXXXXXXXXXXXXXXX",
+"XXX@@oooo++ooXXXXXXXXXXXXXXXXXXXX",
+"XXX@@@@@@ooXXXXXXXXXXXXXXXXXXXXXX",
+"XXX@@@@@@XXXXXXXXXXXXXXXXXXXXXXXX",
+"XXX@@@@XXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXX@@@XXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXX@XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXuXXXXXXXXXXXX",
+"XXXXXXuXXXuXXXXXXXXXuXXXXXXXXXXXX",
+"XXXXXXuXXXuXuuuXXXuuuXXuuXXXXXXXX",
+"XXXXXXuXXXuXuXXuXuXXuXuXXuXXXXXXX",
+"XXXXXXuXXXuXuXXuXuXXuXuXXuXXXXXXX",
+"XXXXXXuXXXuXuXXuXuXXuXuXXuXXXXXXX",
+"XXXXXXXuuuXXuXXuXXuuuXXuuXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/undo-cap-xx.xpm b/etc/toolbar/undo-cap-xx.xpm
new file mode 100644 (file)
index 0000000..dd2d5b2
--- /dev/null
@@ -0,0 +1,41 @@
+/* XPM */
+static char * undo[] = {
+"33 33 5 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c Gray60",
+"+     c Gray90",
+"@     c white",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXooXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXooOOooooXXXXXX",
+"XXXXXXXXXXXXXXXXXooOOOOOOOOooXXXX",
+"XXXXXXXXXXXXXXXooOOOOOOOOOooXXXXX",
+"XXXXXXXXXXXXXoo++ooooOOOooOoXXXXX",
+"XXXXXXXXXXXoo++++++++oooOOoXXXXXX",
+"XXXXXXXXXoo+++++++++oooOOOoXXXXXX",
+"XXXXXXXoo+++++++++oo++oOOoXXXXXXX",
+"XXXXXXoo++++++++oo+++oOooXXXXXXXX",
+"XXXXXo++oooo++oo+++++ooXXXXXXXXXX",
+"XXXXXo++++++oo+++++ooXXXXXXXXXXXX",
+"XXXXo+++++++o++++ooXXXXXXXXXXXXXX",
+"XXXXo+++++++o++ooXXXXXXXXXXXXXXXX",
+"XXXoo++++++o+ooXXXXXXXXXXXXXXXXXX",
+"XXX@@oooo++ooXXXXXXXXXXXXXXXXXXXX",
+"XXX@@@@@@ooXXXXXXXXXXXXXXXXXXXXXX",
+"XXX@@@@@@XXXXXXXXXXXXXXXXXXXXXXXX",
+"XXX@@@@XXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXX@@@XXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXX@XXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXoXXXXXXXXXXXX",
+"XXXXXXoXXXoXXXXXXXXXoXXXXXXXXXXXX",
+"XXXXXXoXXXoXoooXXXoooXXooXXXXXXXX",
+"XXXXXXoXXXoXoXXoXoXXoXoXXoXXXXXXX",
+"XXXXXXoXXXoXoXXoXoXXoXoXXoXXXXXXX",
+"XXXXXXoXXXoXoXXoXoXXoXoXXoXXXXXXX",
+"XXXXXXXoooXXoXXoXXoooXXooXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/undo-dn.xbm b/etc/toolbar/undo-dn.xbm
new file mode 100644 (file)
index 0000000..7412f3a
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,
+ 0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xe7,0x0f,0xff,0xff,
+ 0x19,0x0e,0xff,0x7f,0xfe,0x09,0xff,0x9f,0xff,0x0c,0xff,0x67,0x38,0x0d,0xff,
+ 0xf9,0xc7,0x0e,0x7f,0xfe,0xe3,0x0e,0x9f,0xff,0x6c,0x0f,0xcf,0x3f,0x97,0x0f,
+ 0x37,0xcc,0xe7,0x0f,0xf7,0xf3,0xf9,0x0f,0xfb,0x7b,0xfe,0x0f,0xfb,0x9b,0xff,
+ 0x0f,0xf9,0xe5,0xff,0x0f,0x87,0xf9,0xff,0x0f,0x7f,0xfe,0xff,0x0f,0xff,0xff,
+ 0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,0xff,0xff,0x0f,0xff,
+ 0xff,0xff,0x0f,0xff,0xff,0xff,0x0f};
diff --git a/etc/toolbar/undo-up.xbm b/etc/toolbar/undo-up.xbm
new file mode 100644 (file)
index 0000000..5444862
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
+ 0xe6,0x01,0x00,0x80,0x01,0x06,0x00,0x60,0x00,0x03,0x00,0x98,0xc7,0x02,0x00,
+ 0x06,0x38,0x01,0x80,0x01,0x1c,0x01,0x60,0x00,0x93,0x00,0x30,0xc0,0x68,0x00,
+ 0xc8,0x33,0x18,0x00,0x08,0x0c,0x06,0x00,0x04,0x84,0x01,0x00,0x04,0x64,0x00,
+ 0x00,0x06,0x1a,0x00,0x00,0x78,0x06,0x00,0x00,0x80,0x01,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/undo-up.xpm b/etc/toolbar/undo-up.xpm
new file mode 100644 (file)
index 0000000..02f0cb2
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * undo[] = {
+"28 28 5 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c black",
+"O     c Gray60",
+"+     c Gray90",
+"@     c white",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXooXXXXXXX",
+"XXXXXXXXXXXXXXXXXooOOooooXXX",
+"XXXXXXXXXXXXXXXooOOOOOOOOooX",
+"XXXXXXXXXXXXXooOOOOOOOOOooXX",
+"XXXXXXXXXXXoo++ooooOOOooOoXX",
+"XXXXXXXXXoo++++++++oooOOoXXX",
+"XXXXXXXoo+++++++++oooOOOoXXX",
+"XXXXXoo+++++++++oo++oOOoXXXX",
+"XXXXoo++++++++oo+++oOooXXXXX",
+"XXXo++oooo++oo+++++ooXXXXXXX",
+"XXXo++++++oo+++++ooXXXXXXXXX",
+"XXo+++++++o++++ooXXXXXXXXXXX",
+"XXo+++++++o++ooXXXXXXXXXXXXX",
+"Xoo++++++o+ooXXXXXXXXXXXXXXX",
+"X@@oooo++ooXXXXXXXXXXXXXXXXX",
+"X@@@@@@ooXXXXXXXXXXXXXXXXXXX",
+"X@@@@@@XXXXXXXXXXXXXXXXXXXXX",
+"X@@@@XXXXXXXXXXXXXXXXXXXXXXX",
+"X@@@XXXXXXXXXXXXXXXXXXXXXXXX",
+"X@XXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/undo-xx.xbm b/etc/toolbar/undo-xx.xbm
new file mode 100644 (file)
index 0000000..d390443
--- /dev/null
@@ -0,0 +1,11 @@
+#define noname_width 28
+#define noname_height 28
+static char noname_bits[] = {
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x18,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x80,0x01,0x06,0x00,0x00,0x00,0x00,0x00,0x98,0xc7,0x02,0x00,
+ 0x00,0x00,0x00,0x80,0x01,0x1c,0x01,0x00,0x00,0x00,0x00,0x30,0xc0,0x68,0x00,
+ 0x00,0x00,0x00,0x00,0x08,0x0c,0x06,0x00,0x00,0x00,0x00,0x00,0x04,0x64,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x78,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00};
diff --git a/etc/toolbar/undo-xx.xpm b/etc/toolbar/undo-xx.xpm
new file mode 100644 (file)
index 0000000..f02dda1
--- /dev/null
@@ -0,0 +1,36 @@
+/* XPM */
+static char * undo[] = {
+"28 28 5 1",
+"X     c Gray75 s backgroundToolBarColor",
+"o     c Gray60",
+"O     c Gray60",
+"+     c Gray90",
+"@     c white",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXooXXXXXXX",
+"XXXXXXXXXXXXXXXXXooOOooooXXX",
+"XXXXXXXXXXXXXXXooOOOOOOOOooX",
+"XXXXXXXXXXXXXooOOOOOOOOOooXX",
+"XXXXXXXXXXXoo++ooooOOOooOoXX",
+"XXXXXXXXXoo++++++++oooOOoXXX",
+"XXXXXXXoo+++++++++oooOOOoXXX",
+"XXXXXoo+++++++++oo++oOOoXXXX",
+"XXXXoo++++++++oo+++oOooXXXXX",
+"XXXo++oooo++oo+++++ooXXXXXXX",
+"XXXo++++++oo+++++ooXXXXXXXXX",
+"XXo+++++++o++++ooXXXXXXXXXXX",
+"XXo+++++++o++ooXXXXXXXXXXXXX",
+"Xoo++++++o+ooXXXXXXXXXXXXXXX",
+"X@@oooo++ooXXXXXXXXXXXXXXXXX",
+"X@@@@@@ooXXXXXXXXXXXXXXXXXXX",
+"X@@@@@@XXXXXXXXXXXXXXXXXXXXX",
+"X@@@@XXXXXXXXXXXXXXXXXXXXXXX",
+"X@@@XXXXXXXXXXXXXXXXXXXXXXXX",
+"X@XXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
+"XXXXXXXXXXXXXXXXXXXXXXXXXXXX"};
diff --git a/etc/toolbar/workshop-cap-up.xpm b/etc/toolbar/workshop-cap-up.xpm
new file mode 100644 (file)
index 0000000..e10e924
--- /dev/null
@@ -0,0 +1,45 @@
+/* XPM */
+static char * xemacs-cap-workshop_xpm[] = {
+"33 33 9 1",
+"      c #BDBDBDBDBDBD s backgroundToolBarColor",
+"F     c #000000000000 s foregroundToolBarColor",
+".     c #ADADADADADAD",
+"X     c #000000000000",
+"o     c #333333333333",
+"O     c #424242424242",
+"+     c #949494949494",
+"@     c #7F7F7F7F7F7F",
+"#     c #636363636363",
+"                                 ",
+"                                 ",
+"                                 ",
+"    ....  .....   ..             ",
+"   .XXXX ..XXXo   OX.            ",
+"    +XXo.. @XXO   @@.            ",
+"     XXX.  .XXX   O..            ",
+"     OXX+  @XXX   O.             ",
+"     @XXo. o@XXO.@@. XXX. .      ",
+"      XXX..@ XXX.o.@X.. oX@      ",
+"      OXX@O  oXX@O.X@.. .X@      ",
+"      .XXXO  +XXX@+XO.   @@      ",
+"       XXX    XXX @XXO           ",
+"       OXX    OXO  XXXX@         ",
+"       .X#    @X@  @XXXXX@       ",
+"        X      X    .XXXXX@      ",
+"                     .@XXXX      ",
+"                  @    .OXX      ",
+"                  @#.    XX      ",
+"                  @X     X       ",
+"                  @oo@..X@       ",
+"                   ..XXX         ",
+"                                 ",
+"                                 ",
+"         F        F              ",
+" F  F  F F     FF F              ",
+" F  F  F F  F F   FFF   FF  FFF  ",
+"  F F F  F F  FF  F  F F  F F  F ",
+"  F F F  FF     F F  F F  F F  F ",
+"   F F   F F    F F  F F  F F  F ",
+"   F F   F  F FF  F  F  FF  FFF  ",
+"                            F    ",
+"                                 "};
diff --git a/etc/toolbar/workshop-cap-xx.xpm b/etc/toolbar/workshop-cap-xx.xpm
new file mode 100644 (file)
index 0000000..e9bad88
--- /dev/null
@@ -0,0 +1,44 @@
+/* XPM */
+static char * xemacs-cap-workshop-xx_xpm[] = {
+"33 33 8 1",
+"      c #BDBDBDBDBDBD s backgroundToolBarColor",
+".     c #BDBDBDBDBDBD",
+"X     c #737373737373",
+"o     c #737373737373",
+"O     c #737373737373",
+"+     c #BDBDBDBDBDBD",
+"@     c #ADADADADADAD",
+"#     c #737373737373",
+"                                 ",
+"                                 ",
+"                                 ",
+"    ....  .....   ..             ",
+"   .XXXX ..XXXo   OX.            ",
+"    +XXo.. @XXO   @@.            ",
+"     XXX.  .XXX   O..            ",
+"     OXX+  @XXX   O.             ",
+"     @XXo. o@XXO.@@. XXX. .      ",
+"      XXX..@ XXX.o.@X.. oX@      ",
+"      OXX@O  oXX@O.X@.. .X@      ",
+"      .XXXO  +XXX@+XO.   @@      ",
+"       XXX    XXX @XXO           ",
+"       OXX    OXO  XXXX@         ",
+"       .X#    @X@  @XXXXX@       ",
+"        X      X    .XXXXX@      ",
+"                     .@XXXX      ",
+"                  @    .OXX      ",
+"                  @#.    XX      ",
+"                  @X     X       ",
+"                  @oo@..X@       ",
+"                   ..XXX         ",
+"                                 ",
+"                                 ",
+"         X        X              ",
+" X  X  X X     XX X              ",
+" X  X  X X  X X   XXX   XX  XXX  ",
+"  X X X  X X  XX  X  X X  X X  X ",
+"  X X X  XX     X X  X X  X X  X ",
+"   X X   X X    X X  X X  X X  X ",
+"   X X   X  X XX  X  X  XX  XXX  ",
+"                            X    ",
+"                                 "};
diff --git a/etc/toolbar/workshop-up.xpm b/etc/toolbar/workshop-up.xpm
new file mode 100644 (file)
index 0000000..506d530
--- /dev/null
@@ -0,0 +1,39 @@
+/* XPM */
+static char * xemacs-workshop_xpm[] = {
+"28 28 8 1",
+"      c #BDBDBDBDBDBD s backgroundToolBarColor",
+".     c #ADADADADADAD",
+"X     c #000000000000",
+"o     c #333333333333",
+"O     c #424242424242",
+"+     c #949494949494",
+"@     c #7F7F7F7F7F7F",
+"#     c #636363636363",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"  ....  .....   ..          ",
+" .XXXX ..XXXo   OX.         ",
+"  +XXo.. @XXO   @@.         ",
+"   XXX.  .XXX   O..         ",
+"   OXX+  @XXX   O.          ",
+"   @XXo. o@XXO.@@. XXX. .   ",
+"    XXX..@ XXX.o.@X.. oX@   ",
+"    OXX@O  oXX@O.X@.. .X@   ",
+"    .XXXO  +XXX@+XO.   @@   ",
+"     XXX    XXX @XXO        ",
+"     OXX    OXO  XXXX@      ",
+"     .X#    @X@  @XXXXX@    ",
+"      X      X    .XXXXX@   ",
+"                   .@XXXX   ",
+"                @    .OXX   ",
+"                @#.    XX   ",
+"                @X     X    ",
+"                @oo@..X@    ",
+"                 ..XXX      ",
+"                            ",
+"                            ",
+"                            ",
+"                            "};
diff --git a/etc/toolbar/workshop-xx.xpm b/etc/toolbar/workshop-xx.xpm
new file mode 100644 (file)
index 0000000..575895b
--- /dev/null
@@ -0,0 +1,39 @@
+/* XPM */
+static char * xemacs-workshop-xx_xpm[] = {
+"28 28 8 1",
+"      c #BDBDBDBDBDBD s backgroundToolBarColor",
+".     c #BDBDBDBDBDBD",
+"X     c #737373737373",
+"o     c #737373737373",
+"O     c #737373737373",
+"+     c #BDBDBDBDBDBD",
+"@     c #ADADADADADAD",
+"#     c #737373737373",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"                            ",
+"  ....  .....   ..          ",
+" .XXXX ..XXXo   OX.         ",
+"  +XXo.. @XXO   @@.         ",
+"   XXX.  .XXX   O..         ",
+"   OXX+  @XXX   O.          ",
+"   @XXo. o@XXO.@@. XXX. .   ",
+"    XXX..@ XXX.o.@X.. oX@   ",
+"    OXX@O  oXX@O.X@.. .X@   ",
+"    .XXXO  +XXX@+XO.   @@   ",
+"     XXX    XXX @XXO        ",
+"     OXX    OXO  XXXX@      ",
+"     .X#    @X@  @XXXXX@    ",
+"      X      X    .XXXXX@   ",
+"                   .@XXXX   ",
+"                @    .OXX   ",
+"                @#.    XX   ",
+"                @X     X    ",
+"                @oo@..X@    ",
+"                 ..XXX      ",
+"                            ",
+"                            ",
+"                            ",
+"                            "};
diff --git a/etc/trash.xpm b/etc/trash.xpm
new file mode 100644 (file)
index 0000000..246195c
--- /dev/null
@@ -0,0 +1,58 @@
+/* XPM */
+/* A trash can, drawn by jwz */
+static char *trash[] = {
+/*   width height ncolors chars_per_pixel x_hot y_hot */
+"     32     46       4    1              16    23",
+/*  colors */
+"  c None      m None",
+"= c gray85    m white",
+"- c gray75    m white",
+"# c black     m black",
+/*  pixels */
+"                                ",
+"             ######             ",
+"            #======#            ",
+"            #==# ==#            ",
+"   ##########################   ",
+"  #==========================#  ",
+"  ####=#######################  ",
+"   #========================#   ",
+"    #======================#    ",
+"    #=====##====##====##===#    ",
+"  ###-#==#--#==#--#==#--#==###  ",
+" #--#-#==#--#==#--#==#--#==#--# ",
+" ####-#==#--#==#--#==#--#==#### ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #-#==#--#==#--#==#--#==#    ",
+"    #======================#    ",
+"    #======================#    ",
+"    #==######=###########==#    ",
+"   #========================#   ",
+"    ########################    ",
+"                                "
+};
diff --git a/etc/xemacs-beta.xpm b/etc/xemacs-beta.xpm
new file mode 100644 (file)
index 0000000..1e0aeb4
--- /dev/null
@@ -0,0 +1,170 @@
+/* XPM */
+static char *magick[] = {
+/* columns rows colors chars-per-pixel */
+"388 145 19 1",
+"  c #090909090b0b",
+". c #2ef52ef52f89",
+"X c #131315154c4c",
+"o c #7e7e00000000",
+"O c #50e450e451e5",
+"+ c #6f5c6f5c705d",
+"@ c #232327278888",
+"# c #36363a3acccc",
+"$ c #48704e4ed384",
+"% c #68f76cfbddbc",
+"& c #99d200000000",
+"* c #af5000000000",
+"= c #d23a00000000",
+"- c #f5e900000000",
+"; c #912a912a922b",
+": s None c None",
+"> c #8d5e9162eb8a",
+", c #b3c7b7cbf93d",
+"< c #d6dbd706d9dc",
+/* pixels */
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::<:::::::<::::::::::<:::::::::::::::::::::<:::::::::::::::<:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<:::::::::::::::::<:::::::::::::::::::::<::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::::::::::::::::<::::::::::::::<<::::<<<<:::::::::::<<<<<<:::::::::<<::<:::::::::::::::::::::::::::::<:::::::::::::::::<:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::<:<::::::::::<::::::::<::::::<:::::<::<:::::::::::::::::::<:::::::<::::<:<:::::::<:::::<:<<:::::::::<:::<:::::<:::::::::::::<:::::::::::::<::::::::<::::::<:::::<::<::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::<<::<<<<<::::::::::<<<<:::<<<<<:::<<<<:::::<<<::::::::::<:::::::<:::::::<<:::::::::::<<<<<:::<<<::::::::::<<<<<<::<<<<<:::<<<<<::<<<<<::::::::::<<<<:::<<<<<::<<<<<:::<::<::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::<:::<::<<<<<<::<:::<::<:::<::<::::<::<::::::::::::::::::::::<::::::<<<<::::<::::<<<<<::::::::::<<<<<<:<<:<:<::<::::::<::::<:<<<<<<::<<<<<:::<::<::<::::<::<::::<::<<::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::<::::::::::<:::<::<::::<:<::::<::<<<::::::::::::::::::::<::<::<:::<::::<::::<<<:<<:::::<::::::::::<<:<:<::<::::<:<::::<:<<<<<<::::::::::<::<::<::::<::<::::<::<<<:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::<<::<::::::::::::::<:::<::<<::<::<<::<<::<::<:::::::::::::::::::<::<::<::<<::::<::::::::::::<:::<:::::::::<<:<:<::<<:<:::<<::<<:::::::::::::::::<::<:::<::<<::<<::<:::<:<<::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+":::::::<::<::<<<<<::::::::<:::<::::<::<:::<::<::<<::::::::::::::::::::<:::::::<::::<::<::<::::::<::<:<:<:<:::::::<:<:::<<::<:<::::<:<::<::<:<::::::::::<::::::::<:<::::<::::::<:<:<:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<::::::::::::::::::::::::::::<:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<:::::::::::::::::::::::::::::<:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::::<::::::::::::::<:::<:::::::::<:<::::::::::<::::::::::::::::::::::::::::::::::::::::::::::<::<:::::::::::::::::::::::::::::::::::::<::::::::::::::::<::::::::::<:::::::::::::::::::::::::::::::::::::::::::::<:::::::::::::::::::::::::::::::::::::::::::::::::::<::::::::::::::::::<::::::::::<::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::<::::::::::::::<:::::::::::<::::::<::::::::::::<::<:::::::::::::::::::::::::::::::::::<:::<:::::::::::::::::::::::::::::::::::::<:::::::::::::::::<:::::::::<::<:::::::::::::<::::<::::::::::::::::::::::::::::::::::::<::::::::::::::::::<:::::::::::::::::::::<:::::::::::::::<:::::::::::<::<:::::::::::::<::::<:::::::::::::::::::::::::::::::::::<::::::::::::::::::::::",
+"::::::::::::::::::::::::::<::::::::::::<:<::::::::::::<::::::::::<::<::::::::::::<::::::::::::::::::::::::::::<:::::::::::::::::::<::::::::::<::::::::::<::<:::::::::::<:::::::::::::::<:::::::::<::::<::::::::::<:::::::::::::::::::::::::::::::<::::::::::::<::::::::::::::<::::::::::::<:::::::::::::<::::::::::::::<:::::::::<::::<::::::::::<::::::::::::::::::::::::::::<:::::::::::::::::::::",
+"::::::::::::::::::::::<:<:::<::::::::::::::::::::::::::::::::::::::::<:<::<:::::::::::::::::::::::::::::::::::::::<:::::<:<:<:::::<::<::::::::::::::<::::<:::::::::::::::::::::::::::::::::::::::::<:<::::<::::::::::::::::::::::::::::::::::::::::<:::::<:<::::::<::<::::::::::::::<:<:<:::<::::::::::::::::::::::::::::::::::::::<:<::::<:::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::<:::::<::<::::::::<:::::::::::::::::<::::<::::::::::::::::<::::::::::::::::::::::::::::::::<:::::::::<:<:::<:::::::<:<:<:::::<::<::<::<::<::::::::<:::::::::::::::::<::::::::<:<:::::::::::::::::::::::::::::::::<:::::::::::<:::::<:::<::<::::::::<:<:<::::::::<:::::<::<::::::::<:::::::::::::::::<::::::::<:<:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::<::<:<:<::<::::::::::::::::::::::<::::<::::<::<;;<<::<::::<:::<::::<:::::::::::<<:::::::<::::::<::::<<::::<<:::<::::::::::::::::<::<::<:::<:<::::<:::::::::::::::<::<::<:::::::<::<::<:<::<:<::::::::::::::::::::::::::<:::::::::<::::::::::::<:::::::::::::::::<::<:<::::<::::::<:::::::::::::::<::<::<:::::::<::<::<:<::<:<::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::<::<::::<::::<::::::::::::<::::::::::<::<::::<:<::::<::::::::::::<:::::::::::<<:::<:::::<::::<:<::;:::::::<::<:::::::<:<::<::::<:<:<:<::::::::::::::::::::<::::::::::<::<::::<::<::::::::::::::::::::::::::::::::<:::::<::<::::<:::<:<:::<:<:<::::::<:<:<::<::::<::<:<::<:::::::::::::::::<:&&:::::::<::<::::<::<:::::::::::::::::::::::::::::<:::<:::::::::::::::::::::::",
+":::::::::::::::::::::<:<::::::<:<::::::::<::<:::<::::::<::::::::::::::<<:::<<:<:<:<<<<<<<::::<<<::::<<:<::<<<<:::::<::::::::<:<::<<:::<:<:::::::<::::<::<::::::<:<:<:::::<::<:::<::::::<::::::::::::::::<::<::<:::<:::<::::::::::::::::::::::<:::::<::<::::<:::::<:::::<::::::::<:::<::<:<:::::<::<::::::<::<:::<:::&&*&&:::::::::::::::<::<::<:::<:::<:::::::::::::::::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::<::<<:<:::<<:::::::<:::::::::<:::<:::::::<<:<::::<::::<<:::::;:;::<:<::<;::::<<;:::<<::<:::::<:::<:::::::::::::::::::::<:::<:<::::<:<:<:::<::::::::<:::::::::<:::<::::::::::<:<:<:::<:::<:::<::::::::::::::::::::::::::::::::::::<:::::::::::<::<::::::<:::::<::<::<:<<:::<:::::::&&&&&::::::&&-=&::::::::::<:<:<:::<:::<:::<::::::::::::::::::::::::::::::::::::::::::::::::",
+":::::::::::::::::<::::::::::::<:::::::::<:<::<:::<:::<:<::<:<::::::::::::<:<:<;;;::<;:::::::<:::::<:::::::::;:<::<:::<:<:::::<:<:::<:<::<:<:::::<::::<:<:::::<::::::::::<:<::<:::<:::<:<::<:<:::::::::::<<:::<:::<:::<:::<:::::::::::::::::::::::<::<::<:::<:<:<:<:::::::<::::::<<::::::::&:::<:::::::::&*---&:::<:::*--&:<:<:::::::::::<<:::<:::<:::<:::<::::::::::::::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::<:<::::::::<:::::::::<:<::::::::::<:::<::<:<::<::;::::::::::::::::::::::<:<::::::::::<:::<::::::::::::::::::::::::::::::::::::::<:<:::::::::<::::::::<::::::<:::::<:::<:<:::<:::<:::::::<::::::::::::::::<:::::::::::<:::<:::::<::<::::<::::::::::<&&&&&&&&:::::<:<:::=---&&<:::::=--&::::::<:::::<:::<:<:::<:::<:::::::<::::::::::::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::<:::::::::::<:::::::::::::::::::::<<:<<:::<::<:::<:::::;:<:;:::::::;<::<:<::::::::::<:::::<::::<:::::<:<<:::<::<:<:<::::::<::::<:<::::::::::<::::::::::::::::::::<:<::<::<:::<::::::::::<::::<:<::::<::::::::::::::::::::<::<::<:<:::<:::::::::<::<:::::::<:&&--=&&--=&::::<::::=----&::::::&-=&:<:<::<::<:::<::::::::::<::::<:<::::<::::::::::::::::::::::::::::::::::::::",
+":::::::::::::::::::::<:::::::::::::::::::::::::::::::::::<::<::::;<:::;;;;<::;;;<;:;;::<:;<;<;;<:::<;;<:::<;;<;<<::::<:::::<::::::<<::<::::<:<:<<<<<<<<<<<<<:::::::::::::::::::::::::::::<::<<::::::<::<<::<:::<::<:<::::<:::::::::::<:<::::::<::::::::::::<::<:<<<:<:<:::<:<:<:<<::&=--&&&&&--=&:::::::&=----*&:::::&-=&<::<<::::::<::<<::<:::<::<:<::::<::::::::::::<:::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::<:::::,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,<:<<<:::<<,,,,,,,,,,,,,,,,,,,<:<::::::,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,>>>>>>>>>>,:::::::<::::::::::<:<::<::::::<:::::::<:::::<:<:::::::::<:<:::<:<:<:::::::::<:::<::<:<:<:<:<:::<:<::::<:<::<&&&:<::<::<&==&&::::&o--&::<::::&=-----&&::<:&==&:<:::::::<:::::<:<:::::::::<:<:::<:<:<:::::::::<:::::::::::::::::::::::::::",
+"::::::::::::::::::::::::<::::::::,###$##########################%:::<:::<%###################%:<:<:::,######################################################:<:<::::<<:::::::::::::<:::::::<:::<:::<:<:::::<:<:::::::<<<::<::::<:<::::<::<::::::::::::::<:::<&&<::<:<:::&&&<:<::::&&-&&::<:<<&&=&&::<<:&&=------&::<:&*-&::<:::<:::<:<:::::<:<:::::::<<<:::<:::<:<::::<:::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::<:<:<::<##############################@O:<::::<%###################@O::::::<#####################################################@ <:::<<:::::<::<:<::<::<:<<:<::::::::::<::<::<:::::<:<::::::<::<:<:::::::::::::<<::<:<:<<::&&&&*=*&&&::<:<::&*&<::<<<:&=-&::<::<:<&&-&&:::::&=---=&=&&::<&=-&::::::::::<::<::<:::::<:<::::::<::::<:::::::::::::<::::::::::::::::::::::::",
+":::::::::::::::::::::::::::<:::<::%@#########################@@@XO::<:<::,#@################@XO<:<<:::%@###################################################XO<:<:<:::::<:::::::<:<:<:<:::::::<::<<::::<::::<<:::::::<:<::<:::::<:<<:::::<:::<<::::::<:&&=------==&:<:<:<:&&&<:::<:&=-&&::<:<:<:&=-&::::<&----&&--&<:::--=&:::<::<<::::<::::<<:::::::<:<:<<:<:::<:<<:::::::::<:::::::::::::::::::::::",
+"::::::::::::::::::::::::::::<::<:::O.XX###################@X  .OO;<::<:<::;OOO$##########@@  .;:<:::<::OO. @$##################X       XX@@################X+<<<<:<:<:<:<<:<:<::<::::::<::<:::::::<:<:::::::<<<:<:<:::<<:::<<<:::::::<:&&&<:::<::::::&&--***&&&=-=&:::<::&*&<::<<&*--&:::::<:<:<--&<:<:<:---*&:--*::::=--&<:::::::<:<:::::::<<<:<:<:::<::::<:<:::::::::<::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::<::::<::+$################X O:<<:<<<<<<<<<::::<>#########X .+<<<<<<:<:<:::::<>################@ X+:<<<<<:;;O.X@############# ;<<<<<<<:<:<::<::<<<:::<:<::::::::::<::<::<<<::::::::::::::::<::::<<:<::::&&&&&&&::<:::<:&*-*&<<:::&--&:<:<<<*-&::::::---o<:<:::::::==&:<:<:<*--&<<&==&<<:&--&::::::<::<::<<<:::::::::::::<:<:::<:<<:<::::::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::::<:<<%###############XO::<<:<::::<<<<<:::<>########  +:::::::<<<<<:<::<<<%############### .::<:::::::::<<+O@##########@ :::::<<<<<:<:<:<:<:<<<:<::<:<::::<::::<:<<::::::::<:::<::<&&:<:<:<&*&&&&&===----*&::<:::<*-&&<:::<:&---&<:::<=-&<:<:::=--&::::<:<:::&&::::<:<o--&<:<&=&::&&--&&:<:::::<:<<::::::::<:::<::<::<:<:::::<:::<:::::::::::::::::::::::::::::::",
+":::::::::::::::::::<:::::<:::::::::::::<<,$############## O;;;;;;;;;;;::<<<::,%######@  ;;;;;;;;;;:::<<:<::<,%##############@ ;;;;;;;;;;;;;;;;;;O$########@ ;+;;;;:<<<::<:::<:<:<:<:<:::::<<::<::::<:<<:<<:<:::::&&&&&&*&&<:<:&--=&&*=&&&*=--&:::::::--&<::<:::<&==&:<<:<&-&:<::::&-&&::<:::::<&&&::<:::&&&-&&::&=&&<:&--*&::<:<:::<:<<:<<:<:::::<:::::::::<<<:::<:::::<::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::<::::::::<:<<:>##############XOOOOO++++++;;:<<<:,,######@ .OOO++O+O++++;::<<::<<,%##############XXOO+OO+++++++++++++++$#######X.OOOO++::<:::::::<:<::::::<<<:<::<<<:<::::::::<:::&&*&&==----=&::::&--*&&:::<&&&=-=&::::::*-&:<:<<:<::<:<::<:&&-&&<:<:&&-&::::<:<::::&&:::::::&&-*&<::&=&&<&=--&:<<<::::::::::<:::<<:::<::<:<:<::::::::<::<::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::<::::::::<<;>##############X.......OO+++;::<<<,$#####@  .........OOO++OO:<::<<,############### ..........OO+OOOOOOOO%$######  .....+;:<<::::<:::<:<<<<<::<:<:<::<:<<::<:&&&<:<&&----==-=*&&&<::::*-&;::<:::::&--&:::::&&-&<<::::<:::<:<:<:<&-=&<:<::&-*&::::::<:<<&*&::<:::&---&:<:&--&:<---&<:<:<<<::<::<:<:<<::<:::::<::<:::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::<<<:;%#############@   . ..OO++;;:<<<,%#####@ X.. . . ...OO++O:<:::::<,##############@     . ..O.O+++++++OOOO%######     ..O+OO+<<:<:<::<:<:++O+O::<:<<<<:OO<:O&&=&::<&---&&&&&:<&<::::::&-&:::::::::&--&:::::&*-&&:::<::<::::::<:<&--*&:::<&--&::<:::::::&-&::::<:<=--&:<:<&-&::*--&:<<:<:<<::::<:::<:<::::::::<:<:::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::<::<<<:>##############    ...O+;;::<<<,>#####@ .OO.      ..O++++;:<<:::<>##############X      X..OO;+++;;;+O++O>$####@      .O;:;<:<:::<:::::::<:::&&&::<<:<<O:<;&=-&:<:*--&:&<<:::<:::::::&-&::::<::::&--&<::<::&-=&<<:<:::<<::::<:<&---&<<::&--&<:::<:<::::*&&<:<:::*-=&::<:&=-&&&--&<:<:<<:<:<<:::<::<<::::<::::<::::::::::::::::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::<::<:<<<,##############     .O+;:::<<<<>#####@ .O+..     ...+;;;+::::<:+,%##############X      ..O++:++;::O++OO;;%####X     ..+;:;<::<:::::;<<:::::&*=&&;;+<:<<+O&&-&::::&--&:+:;<:<+::+<::+&-*;::+;:;+<&--&:::<;;&--=&&&::;<:<++;:+::&=--&:<<<:&*&:::<:::::::&&&:::<<&*-&&<<::&&-&&&--&<<<<:<:<<:<<::::::::::::::::::::::::::<::::::<:::::::::::::::::::::::::::",
+"::::::::::::::::::::::::<::::::::::::<:<<:<<%#############X   ..+;:<<<<<,,$####@ O;<;+..   ..O.::<<;<<<::::,$##############        .;;;O:<<<<+;;;O;:>####      ..+;:;:<<:<:;++;:<<:::<&&-*&:;+::<<+;:&-&+++O&--*::::::::::::::<&-=&:<+:::+:&--&++::::<&--=--==&&&&:<:<:;:&&--&:::::&*&<::<:::::::&&&<:<::&&-&:<:<<:&=&&&--*:<:<<<<:<:<<:::<<:::<::::::::::::::<::::::<:::<::::::::::::::::::::::::::",
+"::::::::::::::::::::<:::::::::::<:<:<::<:<:<>#############@   .O+;<<<::,,$##### O<;:;O. . ..O++:<<<:<::<<::,##############@      ..+;:+:+<<<:+::;;<<>#### X    ..+:<;<:<::::<<;::<:<::<&--&:::<<:;::&*-&::::&--=&::::::::::::::&--&::+::::&&-*&:::::::&&&&=---===*&<:<:;<&&--&:<:<<&=&<:<:<::<<:<&=&<:<<<:&-*<::<:<:&-=---=&<::::<::::::<:::::<:::::::::::::::::<:::<:::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::<:<::::::<:<:<:<:,##############   .O+:<<:<,,$####@ .<<;+;O. ...+;::<<<:;:<::<<,>##############X      .O+:<:<<+:<:O::<<:<,###@&&&   .O+:<:<:<;:;::<+<:<:::::&&-=::<::::<:&-=&:::<&=-=&:::::<:::;::<+&*-&<:+:<&&=-=&:::::::<:<:&&&*&=&*--&&:;<<<&--=&:<::&-*&::::<<:::<&-=:<::<:&-=&:<:<::&-----=&::::::<<:<::::::::::::::::::::<::<:::<<::<::<:::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::<:<:<<:<:<:::<<<$#############X  .O+:<::<,$#####  <<<:+... .O+OO+::<;OOO;:<:+,%##############       .O;:+;<:O+<:<;O;::<,##&&&=*   .O;;OOOO+::<OO:;;:<:OOO<<&-=&+:::++::&==&:<::&*-=&;<:+::<+O::<:<&&-&&&*=&&=-&&:::::<+;:+<:;:;OO&&&&--&&<:<&=--=&<:<:&--&::<::<<<:<&-=&<<<::&=-&&<:<:<&&----&:<:<:::::::::<:<:<<:::::::::::::::::<:<:<::::::<:::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::<:::<:::<<:<::<%#############@  ..+;:<<,$####@ X::<<:+O...O+;:<<::<<<:<:<::<,$#############@      ..+;::&&&<<&&&&:<<::,##&----&...O;:<<:<:<<:<:<:<::<:::<:&&-*&<::<:<:&*=&::<:&=--&:::::::::::::::&--=----==-=&:::::::::::<<<::::<<:&--&&:&&&--&<::<:&--=&::<:::<:&&-&&::<<<&*-=&:<:<::&*---&<:<::::<::::<::::::<::::::::::::<:::::<::<:<:::::::::::::::::::::::::::::",
+"::::::::::::::::::::::<:::::::<:<:<<:<::<:<:<,##############   .O;:<,%##### X<:<::;O...O+;:<<:<:<:<<:<:<:<,##############@      ..+;&&*--==*==*<:<:<>##&=&*-*&..+::<<<<<::<:<:<:<<:<::<<:&*=&:<:::::&*=&:<::&---&&&&&&&&&&:<:<::&--**---&&&--&&::::::::<::<:<<::<:&---=&&:&==&:<<:<&&*-*&:<:<:<<&*=&<<<:::&&--&::<:<::&&&&&:<:<<:::::::<:<<:<::<::::::::<<:<::<:<:<:<:::<:::::::::::::::::::::::::::",
+":::::::::::::::::::<::::<<::::::::<:<:<<:::::<$#############X  .O;,,%#####  <<<<:;+O..O+;::<<<:::<:<<:<<:,>##############X      .O&*=-------=-*&:<<<<%&&=&&*=&.O+::<<:<<:<::<:<:<:<<<::<:<&-&<:<<::<&-=&:<<:*----&&*-----*<<:<::&-=&&:&&&<&&--&:<<:<::::&<<<:<:<:<&*--=&::&*=&<<:<<<&&--*&::<::&&-*&<<<<<<<*--&<<<:<<:&<:<::<::<<:::<<<:<:<::<::::::::::::<:<::::<:<::<:::::::::::::::::::::::::::::",
+":::::::::::::::::<:::::::::<::<::::<:<:::<<<:<%#############@  .O:,%##### X<<<<:;+O..O+;:<<<:<<<<:<<<:<::,%##########&&&&&&&    &&&---===*&&&&&&<<<:<<&*=&&&=&.O;:<<<<:<:<<<:<::<::<:<:<:<*-*&:::<<<*-=<<:::&---------**&&<<<<<:&-=&<<:<::::&*=&::::::&&&&::<<::<<&=--&&<:&==&:<<<:<<&---&<<:<<&-=&<:<::::<&*&&:::<::<<<<<<<<:::::<::::<:<:<::<::<::<::::<<<<:<::::<<::<<<::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::<::<:::::<>##############   >,%####@  <<<::;+O..O+;:<:::::::<::<<:<:<,#####&&&&*&&&=---*& &&&&&&&&&&&,$##;::<<:<<:&*-&&*-*&+;<<<:<:<:::<:<<<<<,<<:::<:&--*<<,,>>o-&::<<<&-----=&&&&&,,>>>><<&**&<:<:::::&==&::<::&&-=&<:<:<<,,&*-*&<<<&=-&:<<<<<<&&--*&&&&&--&&<<:<<<::<&<<<<<<<,,,>>>>>,<<<:::<:::<:<<:<:<<::<::<,,,,>>>>,<<<::::<,>>,:::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::::<<:::<<:<<##############X ;,%##### X<<<<:;+O..O+;:<<::::<:::<::<:<:<>####&&====&&=*=-*&&  .O+:<<<:&&>### :::::::::=-&:&--*+;<:<:<<<<<<<<,,,>>%$><::::&&-*&>%###&=&%<<:<&*----o&<,,%$######%&==&<:<:<<<:&*-&<<:<::*--&::<,,>%##=-*#$>::*-*,,>>>>>>&&--=&*=--&&::<<<::::<:<:<<,,>%$#######$>,::::<:::<:<<<::<:<<<,,%$#######$>,<<:<,>###:::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::::<:<:::::<<$#############@.,%#####  <<<::;+OO.O+;:<<<::::::<&&&&&&&<,%####&*-&&##&&&&      .O;:<<<:<&$##@ ::::::::&-=<:;&-=&:,,,,,,>>>>%%$######X+<::::&=&&####&&=&#$:<<&*---=&,,%##########&*-&::<<:::<:=-&&::<::&--=<,,>$###o--&###$<&-=#########&&*&&**&&<::::<<<:<:::<,,>%##############%<:<:<<:<:<:<<<::<,,%############$%>,,>$##@ ::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::::::<:<<:<:<>##############,>##### X<<<<:;+O..O+;:<<<<<:&&&&&&*-**-=&&$#####=-&####&#      ..O;:<<<<&&###@.::::::::&-*<<:&--&>%$#####$########### :<<:<,&*=&&###&*=&###<<&&----&>$############=-*<::<:<:<:=--&:<::<:*--&>$####&=-&&####O&=&&#########X+:&&&<:::<::::<<<<<<,>$#################$<<:::<:<<:<:<:<,>$######################@O::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::<:<::,##############>#####  <<<<:;+O..O+;:<<::<;O=-&:&&&&&&*--*&#####---&####@      ..+;<<<<,&&###X+<:<<+O::&=&&<:&=-&&##################X.<<<<<,&&-=&####==&##$@<<&----&##############*-*O:<:<:<:<&--*::<::<&--=&&##&&&-&&####$#&&&########## :::<:O;::::::::::<,,%#######@X  O$#######$<<<<:<:<<<<<<,>########@X   X##########XO::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::<::<<:<<%##################X :<<<:;+OO.O++;:<<:::;:--&:::<;:<&=--&#####&--&####X      .O;:<<<,&&&&## ::<<<<<;&&-&&<::&==&################## +<:<,,$#&--*####-=####@+<&---=&##############&-*&<:<<;O.+&=-&<::<:<&&=--==**==*&   ####%>##########@ <<:<<:;::::::::<<,>$#######X .;:<>########@<:<<:<<:<:<,>$#######X O;<:<;$########X;<:<<:<::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::::::::<::<:<<%#################X O:<<:;+OO.O+;::<<::::;<*&&:::+::::&=-&#####&--&&###       ..;:<:,,&*=&#@ ;<<::::+&*-&:<<:&=-&OXX############### :<;,,$###=-*###&-*#####.:&---&###############&&*&:<<<<:;:&&-*&:::<,>&&&*---=*&  O::;%##%%##########X.::<<<<;:<:<<:::<,>########X O:<<,%#########.:<<<:<;:<<,$#######@ ;<<<<:;:%####### ;<<<::<<:<:<:::::::::::::",
+"::::::::::::::::::::::::::::::<:<::<:::::::::<::,################X .;:::;+O.OO+;;:<<<<:::::&&&<<:;::::+&=&&###&&--&&###       .O;:,,>$&==&#X.;O:;;+;+<--&<:<<<---&OO+>############@ ::,,$####&==&&&&-&##### ;&---&&###############&=&&::<<<;<:&==&&:;,>###&&&*&&&  O;::;;$#$########### O+O::::;<<<:<O;,,%########X O;+O,,$#########XO+::++;;;,>######## .;<<:;+O++$###### :<:+;;;<<<<<<<<:::<::::::",
+"::::::::::::::::::::::::::::::::::<:<<::<::::::<<$##############X .O+;;;+OO.O+;::<<<<<:<:::&&&:<:;<<<:<&==&####&=-=&##@    .OO;:,,>$###--&#X+<<+;++;+<--*::::<&--*;<<,############X.;,,$###@ X&=-**--&##### O&=--*&@  $&&&&&&####&&-&+;;::<;:<:&&&++,>#########@  ++.;+++>############@ ;++;;;;+<<<<;<<,%########@ O;;;.,%##########@..::;<<<:,$######## :;;;;++OOO>#####@ ;:;++;::<:<::::::<:::::::",
+":::::::::::::::::::::::::<::::::<::<::<:<:<:::::<>#############@   OO+++O..O++::<<<<::::<::&*=&&<;<:<;<&=-&####&---&##>,&,,,>>>%%######=-&# :<:++OO++&--&<:<::&*-&;::,############ O>,$###X O&&-----=&####@ >&*---&&&&&&----&&####=&&.O+;:<;<:;&:;<,>##########X +++O+O.O>############X OOOOO+;+:<<<:<,%######### OO++++,###########@ .+;+:<<:>######### :++OOO..OO;$####@ +++OO+;;<<<:<::::<:<:::::",
+":::::::::::::::::::::::::::::::::::<:::<:::<::<::>##############   ..OOOOOO+;;:<<<<<<<:::;:&---&<;<<<<,*--&#####*--&##&&*&&o&##########&=&@ <:OOOO++&&-&&:<&&&&=-&&<<,###########@ O,%##@  O:<&=-----&####@O,$&---=&*-------=&####&&&..O+;:;<:;:<;,>##########@ .;++O..X+>############ ... ..O++:<<<,,%#########  :.+;++>###########@ .O++:<<,>######### ;OO.....OO+%####@ OOO.OO;;<::::::::<:::::::",
+"::::::::::::::::::::::::::<:::::::::<::<:<<::::<:,$#############X  ......OO;::<:<::<:::::;::---&<;<:<:&--&&#####&*--=&&&=---&##########&&#X.O.+OO....&-&&&&=------&&>>###########X ,>###  O.::&-----=&####@,>##=-------**&&&&&#####X   .O..OOOO<:,,$########## O+.. ..  ;>############     .. ...O<<,%#########@ ;:;..XO>###########@ ....O::>%#########X.. .X.....+>####X ... .O+;<:::<::<:::<:::::",
+":::::::::::::::::::::::::::<:::::::::<:<::<<<:::<<%#############@    ...OO+::<<<<<<<<<:::;;<*--&<:+<<,&-*&#######&=----&&*=&&##########&&& ;;;OO.O+;&&-=&&&--=**&--&<%########### >,###  O;:<&=-----&#####>>##@&-*&&&&&&&##########    ..O;:<<<<<,$##########X ;+O... X.>%###########X      .O+:<::,>########## .;++O...>###########   ..O+:<,%##########...  .O+;::,$###X... ..O;:<::::::::::::::::",
+":::::::::::::::::::::::::::::::::<:::::::<:::<::::>##############    ...O;;:<<:<::<:<:::::;&&--&&&&&&&=-&&#######&=-=&&&XXX@@##########&*& ;;O...O+:&--=&&&&&&&&&--*&%##########@O,$##  .O;::&----=&######,$##X .+&&:;,############     .O+:<::<,%##########@ OOO.   ...,%###########X      .O+:<<,,##########@ ;+O...X.+##########@     .+;:<%##########@   ..+;::<<%### ..   .O;:<::::::::::::::::",
+":::::::::::::::::::::::::::::::::::::::<:<:<::<:::,$#############X   ..O+;:<<<:<<<<::::<<<:<&--=&*------&&######&&-*& &      XXX#######&=&X+O....O+:&--&&&::<:<:<=--&###########@,>##X X.+;::&=---&######%%##X  .O;::,%###########@     .O+::<<,>########### .O...   ..O,$###########      ..O;:<<,$########## .+O..  ..O%#########     ..O;:,%##########$   .O+:<<<<>### +O. ..O;:<::::::::::::::::",
+"::::::::::::::::::::::::::::::<:::::<::::<::<:::::,%#############@   ..+;:<<<<<::::<::::<<<<:&-----=**&*-*&#####&=--&       .O+;+$#####&=&.O..X..O;:&=-&<:<::::::&--&###########,>##@  .O+;::,&&*-&&#####>##@   .O;;:,$###########X     ..+::<<,$##########@ O..    ..O;,###########@       O+;<<,%##########@ OO.. . .O+;$#######X      .O+:<$############  .O;:<<:::##@ +O.. .+;<<::::::::::::::::",
+":::::::::::::::::::::::::::::::::<:::::::::<<:<:<<,$##############   .O+:<<:::::::::::<<:<:<<&--*&&&<&&&&-=&####&=--&       .O+;;;%#####*=&.   X.O;:&--&:::<:<:<&&=-&&#########$,###   .O;;:,>#&&&&&####$$##   ..+;;>,############      .O+;<<,%###########X ..    ..O+,>###########X      .O;:<,,###########X O..   ..+;:<O@@@@X        .O+:<>############. .O;:<<<<:<  .;+...O+:<<::::::::::::::::",
+":::::::::::::::::<:::::<::::::::::<:<<:<:::::<::<,%###############X  .O;:<<::<::<<::<<<<::<<:&=-&:::,%##&=-*&###&*--=&      ..O+++>#####&-&    ..+;&&--&<:::<:::::&-=&#########%%##X  .O+;:;,%####&#####$##@    .O++:>############      ..+:<,>###########@ ..     .O+;:%###########       .O;:<,$########### ..X   ..O;:<::<O..X        .O;:<,#############..O+:<:::::<<<:+O..O+:<<::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::<:<::::::,,%################X  .O+:<<:::<<:<<:::<<::<<<&*-&:::,$##&*--&####&---&     ...OOOO+%####&-&    .O+&&&--*&:<::<:<::&=*&#########>##@   .O+;;;,#############@    ..O++,$###########X      .O;:<,$###########X .     ..+;:,%##########@       .+;:,>###########X ..    .O+;:<<<<<:;O.       .O;:<,##############..+;<<:<::<:<:;O..O;:<<::::::::::::::::",
+"::::::::::::::::::::::::::<::::<:::::::<:<::::<,%##################  ..+;<<:<::<<:<<<::<:::<:&*-&<:<,###&&*-&####&*-&      ..OOOOO+%###&*-*&   .O;&&=--=&<<:::<::<<&&&########$$##    .O+;+>>#############X    ..OO;,############X      .O;:,>###########@ X      .O+::,###########X      .O+:<,$###########X .     .O;:<<<:<<:;O..     ..+;:<<%##############.O;:<::<::<<<;+OOO;:<:::::::::::::::::",
+":::::::::::::::::::::::::::<::::::::<:<::<:::<,%###################   .O;<<<<::<::<<<:<<:::<<:&-&:<<%####&=-&####&&**       .O;;;+;>###&--=&  . .;&&---=&<:<<:<:::,%##########$##X    .O+++,%############@     ...O,%###########@       .+;:,$###########X       ..+;:,>###########       .O;:,>############ .     .O+;<<<:<<<:;+O.    ..O+;<<:,##############$O+;<<::::::<:;+O+;<<<::::::::::::::::",
+":::::::::::::::::::::::<::::::::::::::::<<:<<,>#####O$#############@  .O+:<<:<:+<<<<<<::<::::&=-*:;,%####&--&#####&==&  & .O&&&::;,>###&=-=&  .OO;:&*==&<:<::::<:<,$#############    ..O++;,$############X     X..+,$###########@      ..+;,>############        .O;:<,%###########       .O;:,%###########X       .O;:<<<<::<<:;OO.....O+;:<<<<%##############$O;:<<<<:<<<:;++;:<::::::::::::::::::",
+"::::::::::::::::::::<::::::::::<:::::::::::<,>#####X.%#############@  .O+:<<:<:+<:<<<;;<:::::&--=<+,#####&-=&#####&-=&&&*&&&*=&&;;<>###&&=*&  .OO:<<&&:::::<;:;:;<>#############@     .O++>>############@      ...;>############       .O+:,$###########@       ..+;:<,$##########X      .O+;<,############X      ..+;:<::<::<<:;;OOOOOO+;:<<:::,$##############.+;:<:<:::<<:;;::<<:::::::::::::::::",
+":::::::::::::::::::::::::::::<::::::<:<:<:<,>#####X :,##############   .O;:<:::::<<:;;:;:<:;<&---&>>#####&-=&####&&--=&&*=---*&&;+<>### &&.. ..OO:<<<<<<<:<<++;+;,%#############     . .O+,%############X      ..O,%############       .O;,,############        .O;:<<>###########X      .O;:,>############       .O+:<<<::<:<<<<:;++++;;:<<::::<>##############$.+:<<:<:::<<::<<<::::::::::::::::::",
+":::::::::::::::::::::<:<:<::::::<::::::<::,>#####X ;:,$#############X  .O+:<<:;:::<<+O++::<;<&*--=&&####&&=&&####&&--=&&&&**&&&&<:<>### ;OO....+O<<:<;OOOO+::;:;:,%############X      . O+,$###########@       X.+,$###########X      ..+;,%############       ..+;<<,%###########       .O;:,%###########@      ..+;:<<:<:<::<<<<::::;::<<<::::::$###############O+:<<<:<:<<<<<<:::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::<:<,,$####X ;:<<%##############  ..+;<<:;:<::;:<<;<:<;<&&---=&&&&&=-o&######&&-& &...;:<<<:;<%##X :O+...O++<<::<<<:<:<;::;<,#############X     ...O;>############X       ..>>############X      .O+:,$###########X       .O+:<<,$##########@      ..+;<,############@      ..+:<<<<::<:<::<<<<:<<<<<<<:<<:<:<$##############.+;:<:<::::<:<::::::::::::::::::::",
+":::::::::::::::::::::::<:<:<:::::::<::::<,$####@ +:<<:>##############   .O;:<<<;:<:+::<+:<<+<<*-----------&######@      .OO;<<<:<;:>$#X+<++O..O;+<,<::<<<<<<;;::<>############@      ..O+,>############        .O,%###########@       .O+,>############       ..O;:<<>###########X      .O+;<>############X      .O+:<::<:<::<::<:::<<<<<<<<<:<:<::,$##############.+;:<:<::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::<:::::::::<,,$####@ O<<<<;>$#############X  .O+:<<<+:::<OO;;;<<<OO=-----=&*&&&#######X       ...+<:;OOOO+O .....OO..O,>$%<:::<<:O+:O,%############X        O+,$###########XX      .O+,$###########@       .+;,>############       .O+:<<,%###########       .O+:,>############       .O;<<<::<::<:<<<:::<<:<:<:<<:<::::<>##############@O+;:<<::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::<:<::<::<:<,$####@ O<<<:;++%#############@  .O+;<<<::<::<:<::::<:<&*&&&&&&&##########       .O;:<<::::::<::<<:;OOO+:<,$##O<:::::<<<:,$############       ..O:,############        .O>>############       .O+;,$###########@       .+;:<<,###########@      ..+;<,%############      .O+:<<<<::<:::::<:<::::::<:<<::<:<:<<%##############XO+:<<:<::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::<:::::<,%##### O:<<<;;OO>##############   .+;:<<<:<:::::<<::<:<:<&,$##############      ..+;:<<<:<:<:::<<<:;OO+;:,%##@ <:::<:<:<<,############X       .O+,>###########@       ..+,%############       .O;:,############X      ..+;<<,>###########X      .O+;<,%############      .O;:<:<<<::::<<:<:<:::::::::<<<<::::<<%#############X.O;:<<:::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::<:::<::<,%####@ .:<<:;;OO.+$#############X  .O;:<<<<<<:<<:::::::<::<>##############@      .O+:<<:<::::::::<<:;+O+;,>###X.<:<<<:<:<<%############        .O;,$###########X      ..O;,$###########X      ..+;,>############       .O;:<<,$###########       .O;:<,############@      .O;:<:<::<::::<<<::::::::<::<:<<<<::<<<$############# O+;<<<::::::::::::::::::::::::",
+":::::::::::::::::::::::::<:::<:<:::,,%##### X<:<<:++O.OO>#############@  .O;:<<<:<:<:<:<:<:<:<<<<>##############X      .O;:<<:::<<:::<:<<:;+++,,$###X;<<:<<:<<<,%############       .O+:,###########@      X..+:,############        O+:<>###########@      ..+;<<,%############       .O;:<,############@     ..+;:<:<<<:<::::::::::<:::,>,::<:<<:<:<<,$############ .O+:<<::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::<::::<<,%#####  <<<<:;+O.OO+,##############  .O+:<<<<<:<::<:<:<<<::<,$##############       .+;<<<::<:<::<<<<<::;+,,$###@ ::<<<<<<<<,############X       .O;,>###########@      X.O;,>############     O .O;:,%###########@      .O+;<<,$###########@      ..+::<,############@     .O+:<<::<::<<,<::::<:<:::<,##%<::<<:<::<<>############X..O;:<<:::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::<::<,%#####XX<<<<:;+O.OO+;,##############X  .O;:<::<<<<::<:<::<<<<,##############@      ..+:<<::<<:::<:::<<<:::,%####@X<:<<<::<<<>############       ..+;,%###########      X..+;,%###########X    .,>++;:,%###########X      .O+:<,>############X     OOO;:<<,############@     .O;::<<::<<<,>#>:::::<<:::>###O<::<<<<:<<<%###########@ ..+;<<:::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::<<,>#####X ;<<<:;+O..O+;:,%#############X  .O+:<<::<:<:<<<<:<:<<<>##############@      .O+:<<::::<::<<:<<<<<,,%##### +<<<::::<<,%###########@       .O+:,############      X.O+:,$###########     ,>##O:<,%###########X      .+;:<,$############     X,>>;<<:,############@     .O;:<<:::<:,,$##$:::<::::<>### <::::<:::<<,$##########@  .O+:<<::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::,>#####X ;<<<:;+O.OO+;:<<>##############  ..+;:<<<:::<:<<<<::<:<%##############X      .O;:<<::<<<::<<:<:<<<,%###### :<<:;;;;:<,$###########X      ..+;,>###########X      X.+;,,############    +,$##X+<<%###########X     ..+;,,%##$##########     >,##$<::<$############     .O;:<:<:::<,$###XO::<::::<%###X<<<<::<<<:<<>##########@  ..+;:<::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::<,>#####X :<<<:;+OO.O+;:<:<,##############   .O;:<<:<:<:<<<<<<:<<,$##############      ..+;<<<<<<:<::::<:::,,%######@ <<::;++;:<,############       .O+;,%###########       ..+;,>###########@   .,%##@ ;<<%###########X     .O+:,>##%##########@    +,$##XO<<<%############     .+;::<<::<,%###@ +:::<:::,%###@;<:<<<::<<<<,$#########@   .O;:<::::::::::::::::::::::",
+":::::::::::::::::::::::::::::<,>#####@ +<<<:;+O..O+;:<<::<$#############@  .O+::<<<<::<:<:<:<:<,##############@       O+;<<<::<:::;O:<<<,,$#######XO<<:;+O+;:,>############       .O;:,############       .O;:,%###########X   >>### O<<<%###########X     .O;,,$##>##########X   O,%##@ +::<%############@   ..+;<<:::<,>#### .<<::<<<:,$####O<<<<<<<<:<<<>#########X   ..+:<::::::::::::::::::::::",
+"::::::::<::::::::::::::::::<<,>###### .:<<:;+O.OO+;:<<:<:<$##############  ..+;:<<::<<:<:<<<:<<%##############X      .O+:<<:<<:<:<:<:<,,>######### ;<:;O.O+;:,$###########X      ..+;,>###########@      X.O;:,%###########   ,,$##X ;<<<%############     .+,,$##%%##########X  .,>### .<<::>#############    .+;:<::<,>####X <:<<<:<<<,#####.<::::<<:<:<<>#########     .+;:<:::::::::::::::::::::",
+":::::::::::::::<:::::<<<::<,,>######@ <:::;+OO.O+;;;:::::,>##############@  .O;:<<::<::;<:<<:<,$##############X      .O;:<<<::<:<<<<,,>$#########@ ;;;+...O+<,############X      .O+:,%###########X      .O+;:,$###########  ,,$##@ +:<<:>############$   .+,,$##@,%##########X .,>###X :<:<:<$############$  ..+:<<<<,%####X ;::<<<<<<<,######;:;;;:<<<<:<,#########     .O;:<:::::::::::::::::::::",
+":::::::::::::<<<:::::<<:<:<,%#######@.+;:;+O..OO;;;;;:<:::>###############. .O+:<<<:<+;;+:+<:,>###############X     ..O;:<:;:;;<:<<,>$###########X.+.+O...O;,>############       .O;:,$###########       .O;:<,############%,,$##@ .:<<<<,#############%%;,,%$##@ ,###########$>,>###X +<<<<<<%#############$O..+:<<,,$####@ ;<<<<::;::<>######.;++;:<<<<<<,########X     .O+:<:::::::::::::::::::::",
+":::::::::::::<<::::<<<<<:,,%#########O:;;;O..OO;::+O;:<<<,>###############$.XOO.OOO;::::;<:<<,$###############X      ..O:<:;+;:<,,>$############# O++O...O;:,%###########@      ..+;<>###########@      ..O;:<,#############%####X +:<:<::%##############%%##### .,############%$###@ .:<:<<:::$#############$>>,,,>$#####@ O<<:<:;;+;:,>######$++O+;<<<:<<>#######@      .O+:<<::::::::::::::::::::",
+":::::::::::::::<<:::<<<,,>$##########%:++OO..O+;:;<:<::<<,$################$>O+;:<:::::::<:,,%################$O.   .O+:<<:,,,,>%###############@ ;O.....+;:,$###########X      .O+:,%###########X      .O+:<<,#################X O;:<<::;>#################### X<,################@ .;:<<<::;;>#########################@ O<:<<:;+++;:,>#######$OOO;:<:<<,$#######X      .O+:<<::::::::::::::::::::",
+":::::::::::::::::<:::,,>%#############$>,;..O+;:<;<<,,,,>$###################$>,,<<:<::<,,,>$##################$%>,,,,,,>>>%%$##################@ +O. . .+::,############       .O;:,$###########       .O;:<<<$###############X .+;:<<;;+;$##################X ::<$###############  +;::<:;;+;;%#######################@ O::<<:;+OO++:,%########%OO+:<<<,>#######X       .O+:<:::::::::::::::::::::",
+"::::::::<::::<<<<:::<>$##################$#.+;:<::+,%$###########################$>:<+;,%####################################################### . .  ..OOO>>###########@      ..+;,,###########@       .O;<<:<%##############X  O+;:<:;++;>$################X ;<<:%##############  .+::::;;++;:<%#####################X O<<:::;+OOO+;:,%#########$>;,,,,%#######X ..     .O;:<:::::::::::::::::::::",
+"::::::::::::::::::::<>#####################.+:<<:::,##############################@;:::,######################################################## ..   ..O;:,%###########X      .O+:<>###########X      .O+;:<<:<#############X  .O+;::;+++;:>###############  +:<<<<$###########@   O+;:::;++;;:<<+##################@  ;<<<<:;;+OO+;:<,$############%%$########X .O.     .O;:<<::::::::::::::::::::",
+":::::::::::::::::::::,##################### ;:<:::::##############################@O<:::#######################################################@ ..   ..+;:<############       .O;:<%###########       .O+:<<:<:,##########X    .O+;;;+++;;:<;############@  O;::::;;##########X   ..+;;;++++;:<<<<+@##############@X .:<<<::;+OOO+;;:<,####XXX@##############X  +;O.    .O+;<<:::::::::::::::::::::",
+":::::::::::::::::::::::                     ;:<<:::<:                              .<<<::                                                             .O+:<<<                  .+;:<:O                 .O;:<<:<:<<@@###@@X       .O++++++;:<<<:@@######@X   .O++;;;++O@######@      .O++++O+;::<<<<<:.X@########@@X  +:::::;++OOOO+::<<<### X++OXX@########@X  +<:;O.    .O;:<::::::::::::::::::::::",
+":::::::::::::::::::::::::::<<<<:;;+O.     .O;:<<<<::::::<:<<<<<:;+.             .O+::<<<<<:<:<<:<<<;;O.X           X.+;:<<<<<<<<<<::::;;;++O...       .O;:<:<:<<<<<;+OX       ..+:<<:::<:<<:;O.       .O+;<<<:::<:<+.            ..OOOO+;:<<:<<<OXXXX        ..OOOOOOOO.XXX         ..OOOO++;<<:<:<<:;+.  XXXX     .O+;;;;++OOOO++;:<<<<>X .:<:;O.   XXXX   O+:<<:+O.  ..O+;:<<:::::::::::::::::::::",
+":::::::::::::::::::::::::<:<<<:;;+O..     .O+;::<<<<::<::<<<<::;+O.X            ..O+;;:<<<<<:<<<<:;;+..             .O+;::<<<<:::::;;;++OO...        ..+::<::<:::<<;+..       .O;:<<:::::<<:+O.       .O+:<<:<<:<:<<<;+.         ...OO+;:<<<:<<<:;OX          .....OO+;;;O..         ...OO+;:<<::::<<:;O..         ...OOOOOO..OO+;:<<:::<;;:<<:+O.  X..OO+<<<<<<:;O..  ..+;:<<::::::::::::::::::::::",
+":::::::::::::::::::::::::::<<:;+O...      ..O++;::<<:::<:<<::;;+O..              ..O++;;:<<<:<<<:;+OO..             ..O+;;;;;;;;;;+++OOO....         .O+:<<<:<::<<:;O.       ..O;<<<:::<:<<;+O.      ..+;:<<:::<:<:<<:+O.         ..OO;:<<<:<::<<;+O.          X...O+;:::;+O.        ...O+;:<<<:<:::<<:;O..          ........OO+:<:<:<<<:<:::::+O..  ..O+;;:::::;+O.....O;:<<:::::::::::::::::::::::",
+":::::::::::::::::::::::::<:<:;+OO... .  . ..OO++;:<<<:::<<::;++OO.. .        . .....O+++;:<<<<<:;+OO...          . ...OOO++++++++OOOOO.... . .     ...O;:<:<::<<:<:;O..    . .O+:<<:::::<<:;+...    ..O+;<<:<::<:::<<:;O.        ...++::<:<:<:<<<:;+O.X        ...O+;:<<<:;O.        ..O+;:<<:<:<:<:<<::;OO..         ......O+;;:<:<::<:<:<<<<:+........O+;;;;;;+O....O++::<<:<:::::::::::::::::::::",
+"::::::::::::::::::::::::::<<:;+OO...........OOO++;:<<:::<<:;++OOO..................OOO++;::<<<:;++OO..................OOOO+OO+OOOOOOOOO.............OO+::<:::<::<<:;+O.......OO;:<<::::<:<:;+O.......O+;:<<:<<::<::<<:;+O.. . ....O+;:<<:<:::<:<<::;+O..    . ...O+;:<<<<<;+O..    ...O+;:<<:<::::::<<<::;+O.. .  . .  ...OO+;;<<<:::<:<:<::<:;+O....OOOOOO++++OOO...O+;::<:::::::::::::::::::::::::",
+"::::::::::::::::::::::::::<<:;++++OO+OOO+O+O++++;:<<::<::<<:;+++++O++OOOOO+OOO+OO+O+O+++;:<<<<<:;++++++O+O+O+OOOOOO+O++++++++++++++++++OOO+O+OOOO+O++;;:<<::<::<:<:;;++OOOO+++;;<<:<::::<<<:;++OOOO+O+;:<<:<:<:<<::<<<:;+OO...OOO+;;:<<<:::::::<<<<:;+OO......OO++;:<:::<<:;+OO....OO+;;:<<:<:<<::<::<<<<:;++OO.........OO+;;:<<<:<::<:::::<<<:+OOO+++++OOOOOO+OOOOO+;;:<<::::::<:::::::::::::::::::",
+":::::::::::::::::::::::::::<<::;;;;;;;;;;;;;;;;:::<:::::<<<:::;;;;;;;;;;;;;;;;;;;;;;;;;:::<<<<:+::;;;;;;;;;O+;;;:;;;;+;;;;;;;;;;+O+O;;;+;;;;;;;+;;;;:::<<<:::::<<<<:O;;;;;;;;::<<<:::::::<<+O:;;;;;+O:::<<+<;<::<:::<<<:;;++++++;;::<<:::::::;::::<<:;;++OOOO++;;::<;+<:::<:;++OOOO+;;:<<<<:::::<:<:<+::<<::;;++OOOOOO+++;;:<<<<:::::::<<:<::<:;++;;;;;;;++++++++++;;::<:<::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::<<<::::::::<<<<<<<:<<<;<:::::<<<<<<<<<<:<:<::<:<:<<::::::::<<<<:<<<:<<<:::<::::.::<::<<<+:::::<;;<:<;O;.<:<<;<:<:<:;<<::<<<::::::::::<<<<;::<<<<;<<<<::::::<::<<:<<:<<;:<+:<<:O<O:::<:<::<<<:::;;;;:::<<<<::<:::::::<:::<;:;;;;;;;;::<<<:<::::<<<:;;;;;;::<<::::::<:<:::::<:<:<<<::;;+;;;;;;::<<<<::::::::::::::<<<:;:::<<::::;;;;;;;;:::<<<::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::<<:<<<<<:<<<<<:<<<<<:;::<:<:<<:<:<::<<<::<:::<<<<::<<<::::<:<::<:<:<<<<<<<<<<;;<<<<:<<<;<<<<<<;<<<<:+<O<<<<;<<:<:<<:<<<:<::<:::<<<:::<<<:::<<<<;:::<::<:<<<<::::<<:<::<<<<:<:O:+<:<:::<::<:<<<<<<<<<<<::<:::<::::<<:<:<<;:;;::;:;:<:<<::::<::::<<<:<;:;:<::<::<:<:::<::<:::<<::<<<<:+::::<<<<<<::::::::::::<:::::<<<<<<<<<<<<<::::::<<<<:<::<::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::<::<:<::<::<:<::::::::<<:::::::::::;;::::<;+::+:::;::;<:<;:::<:<:::;;:::::<:::<;<::::<::<<:<<<<<::<::<;:;:::::::::::<::::::::::::<;;::;:::+::;::<;::<:::;:;::<:<:::::::<;<<::::+:;::<::::::::<:<<<<<:<:<::::::::<::;:::<:<;:::<<:;:;:::::::<::::::<<<<:+:;:::::;::;:<:<::;;:::;:<;<<<<::<<<<<<<:::::::::::::::<::<:<<<<:<:::<:<<<<<<<<<<<:<::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::::::::::::<::::::::::;;:::::::::::::::<:<;<:::;::<:::::::::::<<:<:::<:::::<::<:::::::::::::::::::<:<:::<:::::<::::::::::::::::<:<:::::::::::::::;::::::::::::::::::<::::<:::::<:<:::::<:::::<::<:<:<:<:::::<:::::::::<<<:+:::::::<::::<:;;;;;<:;::::<:<<:::::::::::::;<<::;:::::::::::::::::::::<::<::::<::::<:<:::::<:<:::<:<:<:::<:<:::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::<::::<:::::::::::::::<:::::::::::<:::::<<:;<<:<<<::::::::::::<:::::<::::::::::::<<:::<:<:::<:::<::<::<:<;::::::;::::::::<::::::<<:::::::::::<::::;:<::::::::::::<::<:::::::::<:::<:<:::::::::::::::::::::::::::<:::::<:::<;:::::<::<::::::::::<:;:<::<:::::::::::::::<;:<<:<:::::::::::::::::::::::::::::::::<:::<:<::::::::::::::<:::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::<::::::::::<::<<::::::<;:::;<:<:::;::<;:::::::<:::<<:::::<:<;::<::::::::::::::::<::::<:<:::::::<::::<:::::::::<<::::<;:::::::<:::::::<:::::::<::;::::::::::::::::::::::<:<:::<:::::<:<:::::::<;<:<::<:::::::::::::<<:<<::;:<::<<::::<:<::::::::;:<::<:::<:<::::<:<;:::::::<:<:::::::::<:<::::::::::::::<:<::::::::<::<::::::::<::::::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::::::::::::::<::::::<;;<::::<:;::::<<;:<:::<;;<:<:;<::;::::;:<;:::<:<:<::::<::::::;::<::::<::::::<::::::<:::::::;::::<;::::<<;:<::;;:<;;:::;;;<:;;::<:;::;;;;<::::<:<:::<::::::<::<:::::::::::<;<::<::::::<:;<:;;<:::;;:::;<<:::<<;;;;::::::::::;<<:::<::;;:::::;;:<;::<;;<:<::;::::::::::::::::::::<:::<:::::<:<::::::::::::::::::<:<::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::<:::::::::::::<:::::<<::::::::::<::::::<:::::<::::<::::::<::::::::<:::::::::::::<:::::<<:<:<:::::::::::<:<:::<<:::::<:::::::::::::::::::::::::::::::::::::::::::::::::<::::::<:<:::<::::::::::::::::::::::<::::::::::::<:::<:::::::::::::::<:<:::::::::::::::::<:::::::::::::::::::<:::::::::::<::::::::::::::<:<::<:::::<::::::::<:<:::::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::::::::::::::::<:::::::::::;;::::::;;:<:::<:::::<:::::::::::::::<:::<::<:::::::::::::::::::::::::<:::::::::::::::::::::::::;;<::::::::::::::::::::::::::::::::::::::::::::::<:::::::::::::::::<:<::<::::::::<::::::::<::::::::::::<:<:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<::::::<::::::::::::::::<:::<:::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::<::::::::::::::::::::::::::::::::::::::::::::::<:::::::::::::::::::::::::::::::::::::::<::<:<::::::::::<:<::::::::::::<::::::::::::::::::::::::::<:::::::::::::::::::::::::::::<:::::<:::::::::::::::::::<:::::::::::::::<:<::::::::::::::::::::::::::<:::::::::<:::::::::::::::::<::::::::::::::::::::::<:::::<:::::::::::::::::::::::::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<:::<::::::::::::::<:::::::::::::::::::::::<:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<::::::::::::::::::<:::::::::::::::::::::::<::::::::::<:<:<::::::::::::::::::::::::::::::::::<:::::<::::::::::::::::::::::::::::<::::::::::::<::<::<::::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::::::::::::::::::::::::<:::::::::::::::::::::::::::::::::::::::::::<::<:::::::::::::<:::<:<:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<:::::::::::::::::::::::::::::::::::::::::::::<::::::::::<:<:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<:::::::::::::::::::::::::::::::::::::::::<::<:::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<::::::::::::::::::<::::::::::::::::::::::::::::::::::::<::::::::::::::::<::<::<:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<:::::::::::::::::::::<::::<:::::::::::::::::::::<:::::::::::::::<:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<::::::::::::::<::<::::::::::::::::::::::<::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<::::::::::<:::::<:::::::::::::::::::::<::::::::::::::<:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<:::::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<::::::::::::::::::::::::::<:::::<<::<:::::::::::::::::::::::::::::::::::::::::::::::::<::::::::::::::::::::::::::::::::::::::::<::::::::::::::<::::<:::::::::::::::<:<::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<:::<:::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<:::::::::::<:<:<::<:<::::::::::<<:::::::::::::::::::<::::::::::::::::::::::<:<::::::<:::::<:<::::::::::::::::::::::::::::::::::<::::::::::::::::::::::::::::<::::::::::::::::::::::::<<::::::::::<::::::::::::::::::::::::::::::::::::::::::::::::::::<::::::<::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<:::<:::::::::::::::::::<::::<::::::<::::::<::::::::::::::::::::<:::::::<:::::::::::::::<:::::<::;:::<:<;:::::::::::::::::::::::<::::<::::<::::::<:::::::::::::::<:::::::::::::::::::::::::::::::<::::::::::<:::::::<::::::::::::::::::::::::::::::::::::::::::<::::<::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<:::::::::::::::::::::<:::::<<:::::<::::::<:<::::::::::::<<<:::<:<::::<<<<:::<<<:<:::::<:::::<::::::<::::::::::::::::::::::::::::<:::::::<<<:::<<<<<::<<<<<<::::<:::::::::::<<<:<<::::<<:::::<<:<::::<::::::<::::::<::::::::::::::::::::::::::::::::::::::::::::<:::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<::::::::::::::::<<:::<<<<<:::::<::::::<:::::::::::<:<<<<::<<<<<::<<<<:::<<<<<<::::<:::::<<<:::::<:<::::::::::::::::::::::::::::::::::<<<::<<<<<::<:<:<<<:::<:::::::::::<:<:<<<:::<<:<::<<<:<::<<<<<::::<:::::::<:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<::::::::::::::<::::::<:::::::::::<<<<<:::<:::<:::<:::::<<:<:<::::<::::::::<::::::::::::::::::::::::::::::::::::::::<::<:::<::::::::<::<:::<::::::::::::::<::<:<::::<:<::::<::<<<<<::::<:::::::<:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<::::::::::::::<:::::::<::::::::::<<<<<<::::::<:::<:::::<<:<:<::::<::::::::<::::::::::::::::::::::::::::::::::::::::<::<:::<::::::<:<::<:::<::::::::::::<:<::<:<::::<:<::::<::<<<<<::::<:::::::<:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<::::::::::::::<::::::<:::::<<::::<::::::<:::<:::<:::::<:::::::::<::::<<<<::::::::::::::::::::::::::::<::::::::::::<::<:::<::::::<:<::<:::<::::::::::::<:<::<:<<::<:::<::<<:::::::::::<::::::<::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<::::::::::::::<:::::::<::::<<:::::<<<:::<<:<<<:::<<<::<<:<::<:<<<<<::::<::::::::::::::::::::::::::::<<:::::::::::<<::<<:::<<<::<<:<<:<:<<<<<:::::::::<<:<::<:::<<<::::<<<<<::<<<:::::<::::::<::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::<::::::<:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::",
+"::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::"
+};
diff --git a/etc/xemacs-enhanced.png b/etc/xemacs-enhanced.png
new file mode 100644 (file)
index 0000000..90c8eb6
Binary files /dev/null and b/etc/xemacs-enhanced.png differ
diff --git a/etc/xemacs-fe.sh b/etc/xemacs-fe.sh
new file mode 100755 (executable)
index 0000000..881ad07
--- /dev/null
@@ -0,0 +1,316 @@
+#! /bin/sh
+# emacs-fe --- front end driver for `emacs' and other programs
+
+# Copyright (C) 1995, 1996 Noah S. Friedman
+
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1995-09-11
+
+# $.Id: emacs-fe,v 1.8 1996/03/07 04:32:33 friedman Exp $
+
+# 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 2, 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, you can either send email to this
+# program's maintainer or write to: The Free Software Foundation,
+# Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA.
+
+# Commentary:
+
+# Inspired by a similar set of scripts by Charles Sandel <sandel@cli.com>,
+# but generalized into this single script.
+
+# Front-end shell script for GNU Emacs, used to manage multiple versions of
+# Emacs and its associated utilities.
+#
+# Strategy: Install this script as "$prefix/bin/[progname]", for each
+# program named [progname], (e.g. "emacs", "ispell", "etags", etc).  These
+# are the commands users would normally execute to run them.
+
+# Give each version of emacs/xemacs/mule/ispell a separate hierarchy under
+# $prefix/[emacs|xemacs|mule|ispell], with the name
+# "[emacs|xemacs|mule|ispell]-NN.NN" where NN.NN is the version number.
+# This script looks at what versions are available, and selects a version,
+# currently whatever is specified by $DEFAULTLVERSION.
+
+# However, users can specify their own choice to force the selection of a
+# particular version by setting the environment variable PROGNAMEVERSION
+# (e.g. EMACSVERSION, MULEVERSION, XEMACSVERSION, etc.) to have a value
+# which is the version number of the program that they want to use (just
+# the numeric value), or to specify either the NEWEST or OLDEST versions.
+
+# Code:
+
+# Name by which this script was invoked.
+progname=`echo "$0" | sed -e 's/[^\/]*\///g'`
+
+# To prevent hairy quoting and escaping later.
+bq='`'
+eq="'"
+
+case "$progname" in
+  emacs-fe-print )
+    case $# in
+      1 ) : ;;
+      * )
+        echo "$progname: Exactly one argument is required." 1>&2
+        exit 1
+       ;;
+    esac
+
+    # sed is more portable than `dirname'
+    dir=`echo "$0" | sed -e 's/\/*$//' -e 's/\/[^\/]*$//'`
+    if test -f "$dir/$1"; then
+      EMACS_FE_PRINT=t
+      export EMACS_FE_PRINT
+      exec "$dir/$1"
+    fi
+
+    echo "$progname: $bq$dir/$1$eq does not seem to exist." 1>&2
+    exit 1
+  ;;
+esac
+
+DEFAULTVERSION="${DEFAULTVERSION-NEWEST}"
+VARIANT="${EMACSVARIANT-emacs}"
+
+if [ "$prefix" = "" ] ; then
+  # root of the GNU installed tree
+  prefix=/usr/local/gnu
+fi
+
+if [ ! -d "$prefix" ] ; then
+  echo "Cannot find root of GNU tree ($prefix)."
+  exit 1
+fi
+
+case "$progname" in
+  emacs | lemacs | xemacs | mule | ispell )
+    if [ "$eprefix" = "" ] ; then
+      # prefix name of the subdirectory
+      eprefix="${progname}/${progname}-"
+    fi
+   ;;
+  * )
+    eprefix="$VARIANT/${VARIANT}-"
+   ;;
+esac
+
+# Find out which versions are available on the system and sort them
+# in numeric order.
+#
+# The largish sed script prefixes all version numbers with a sort key.
+# That key is constructed by padding out any single or double digits to 3
+# digits from the version number, then converting all occurences of `.' to
+# `0', and prefixing and suffixing the entire result with an additional
+# zero.  After sorting, the sort key is stripped from the output.
+# We do all this because `sort' cannot numerically sort decimal numbers and
+# will stop on the first `.'.
+# This may not work correctly if the version number has more than 4 levels
+# of minor versions (e.g. "1.2.3.4.5" may cause problems).
+availversions=`ls -1d $prefix/${eprefix}*/. 2> /dev/null \
+                | sed -n \
+                      -e "s#^$prefix/$eprefix\([0-9.][0-9.]*\)/\.*#\1#" \
+                      -e 'h
+                          s/[^.]*[^0-9.][^.]*\.//g
+                          :0
+                          /[0-9.][0-9.]*\.[0-9.][0-9.]*\.[0-9.][0-9.]*\.[0-9.][0-9.]*/!{
+                            s/$/.0/
+                            b 0
+                          }
+                          s/^/./
+                          s/$/./
+                          :1
+                          s/\.\([0-9]\)\./.00\1./g
+                          s/\.\([0-9][0-9]\)\./.0\1./g
+                          t 1
+                          s/\./0/g
+                          G
+                          s/\n/ /' \
+                       -e 'p' \
+                 | sort -nu \
+                 | sed -e 's/.* //'`
+
+if [ "$availversions" = "" ] ; then
+       echo "No version of $progname found in $prefix/$eprefix*."
+       exit 1
+fi
+
+# This sets `oldest' to the oldest version available, and `newest'
+# to the newest version available.
+# On line 1, we save the original pattern in the hold space and restore it
+# in case it is the only line of input.
+eval `echo "$availversions" \
+       | sed -ne '1{h;s/^/oldest=/p;g;}
+                  ${s/^/newest=/p;}
+                 '`
+
+# The environment variable [progname]VERSION can have a value which specifies
+# a version number, OR it can contain the values "NEWEST" or "OLDEST" to
+# specify the newest or oldest version which was found.
+sed_upcase='y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'
+
+PROGNAME=`echo "$progname" | sed -e "$sed_upcase" -e 's/-/_/g'`
+eval version=\"\$${PROGNAME}VERSION\"
+
+# If there is no ETAGSVERSION, EMACSCLIENTVERSION, etc, then look for
+# EMACSVERSION, XEMACSVERSION, or whatever the current variant is.
+case "$version" in
+  '' )
+    case "$progname" in
+      ispell )
+        # If this is ispell and ISPELLVERSION isn't set, just use 3.1.
+        # We could run this script recursively with a flag indicating to
+        # find the current emacs variant and version and just print it out,
+        # but that is a very pathological case and is a lot of work.
+        version=3.1 ;;
+      * )
+        variant=`echo "$VARIANT" | sed -e "$sed_upcase"`
+        eval version=\"\$${variant}VERSION\"
+        case "$version" in
+          '' ) version="$DEFAULTVERSION" ;;
+        esac
+       ;;
+    esac
+esac
+
+case "$version" in
+  [Oo][Ll][Dd][Ee][Ss][Tt]) version="$oldest" ;;
+  [Nn][Ee][Ww][Ee][Ss][Tt]) version="$newest" ;;
+  '') version="$oldest" ;;
+  *)
+    if [ ! -d "$prefix/$eprefix$version" ] ;  then
+      echo "$progname: $version: Cannot find requested version." 1>&2
+      version=
+    fi
+   ;;
+esac
+
+# If we don't have a version by now, then give up.
+if [ "$version" = "" ] ; then
+  exec 1>&2
+  echo "$progname: Cannot determine which version to use."
+  case "$availversions" in
+    */* )
+      echo "Available versions are:"
+      for f in $availversions; do
+        echo "   $f"
+      done | sort
+     ;;
+    * )
+      echo "Available versions are:" $availversions
+     ;;
+  esac
+  exit 1
+fi
+
+case "$progname" in
+  emacs | lemacs | xemacs | mule )
+    EMACSVARIANT=$progname
+    eval ${PROGNAME}VERSION=$version
+    eval export EMACSVARIANT ${PROGNAME}VERSION
+
+    case "$EMACSVARIANT-$version" in
+      emacs-18* )       ISPELLVERSION=4.0    ;;
+      emacs-19.[0-9] )  ISPELLVERSION=4.0    ;;
+      emacs-19.1[0-9] ) ISPELLVERSION=4.0    ;;
+      emacs-19.2[0-2] ) ISPELLVERSION=4.0    ;;
+      emacs-19.2[3-9] ) ISPELLVERSION=3.1    ;;
+      emacs-* )         ISPELLVERSION=3.1    ;;
+
+      lemacs-19.[0-9] )        ISPELLVERSION=3.0.09 ;;
+      lemacs-19.10 )   ISPELLVERSION=3.1    ;;
+
+      xemacs-* )       ISPELLVERSION=3.1    ;;
+
+      mule-* )          ISPELLVERSION=3.1    ;;
+    esac
+    export ISPELLVERSION
+   ;;
+esac
+
+case "$progname" in
+  xemacs )
+    # xemacs expects to use the keysym database in /usr/openwin, but that
+    # database doesn't define many of the keysyms it uses.  Unless the user
+    # has already defined their own, specify the keysym database in X11.
+    XKEYSYMDB="${XKEYSYMDB-/usr/local/X11/lib/X11/XKeysymDB}"
+    export XKEYSYMDB
+
+    # Some versions of xemacs (e.g. 19.12) are dynamically linked against
+    # the openwin tooltalk library (libtt.so), so add openwin to the
+    # dynamic load path if necessary.
+    case "$LD_LIBRARY_PATH" in
+       *'/usr/openwin/lib'* ) : ;;
+       '' )
+         LD_LIBRARY_PATH=/usr/local/X11R5/lib:/usr/openwin/lib:/lib
+         export LD_LIBRARY_PATH
+        ;;
+       * )
+         LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/openwin/lib"
+         export LD_LIBRARY_PATH
+        ;;
+    esac
+ ;;
+esac
+
+# Set up the MANPATH so that the man pages for this version
+# are searched first
+if [ -d $prefix/$eprefix$version/man ] ; then
+  MANPATH=$prefix/$eprefix$version/man:$MANPATH
+  export MANPATH
+fi
+
+# There is no need to do this, and it can potentially cause problems,
+# especially if a program like `xemacs' exists in that directory and gets
+# run in subshells instead of this script.
+#PATH=$prefix/$eprefix$version/bin:$PATH
+#export PATH
+
+searchdirs=`exec 2> /dev/null
+            cd $prefix/$eprefix$version \
+            && find bin \
+                    libexec/$VARIANT/$version/* \
+                    lib/$VARIANT/$version/* \
+                    lib/$VARIANT-$version/* \
+                    lib/$VARIANT/etc \
+                    lib/etc \
+                 -type d -print`
+
+for dir in $searchdirs ; do
+  for p in $progname-$version $progname ; do
+    prog="$prefix/$eprefix$version/$dir/$p"
+
+    if test -f "$prog" ; then
+      case "${EMACS_FE_PRINT+set}" in
+        set )
+          echo "$prog"
+          exit 0
+         ;;
+      esac
+
+      exec "$prog" ${1+"$@"}
+    fi
+  done
+done
+
+exec 1>&2
+
+echo "$progname: Cannot find $bq$progname-$version$eq or $bq$progname$eq in"
+
+for d in $searchdirs ; do
+  ls -1d $prefix/$eprefix$version/$d 2> /dev/null \
+   | sed -e "s/^/$progname:   /"
+done
+
+exit 1
+
+# emacs-fe ends here
diff --git a/etc/xemacs-icon.xpm b/etc/xemacs-icon.xpm
new file mode 100644 (file)
index 0000000..f67ffc5
--- /dev/null
@@ -0,0 +1,67 @@
+/* XPM */
+static char *Xemacs48_xpm[] = {
+/* width height ncolors chars_per_pixel */
+"48 48 12 1",
+/* colors */
+"a c #ADADADADADAD m white",
+"b c #737373737373 m black",
+"c c #636363636363 m black",
+"d c #424242424242 m black",
+"  c #DEDEDEDEDEDE m white s BgColor",
+"g c #FFFF00000000 m black",
+"h c #949494949494 m black",
+"i c #636363636363 m black",
+"j c #FFFFFFFFFFFF m white",
+"k c #FFFFFFFF0000 m white",
+"l c #DEDEDEDEDEDE m white",
+"m c #BDBDBDBDBDBD m white",
+/* pixels */
+"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjc",
+"j                                             mc",
+"j                                             mc",
+"j                                             mc",
+"j          cccccccccccccccccccccccccccccccci  mc",
+"j          cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjji  mc",
+"j          cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjia mc",
+"j          cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjia mc",
+"j          cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjia mc",
+"j          cjjjjjjjmmmiibiibmmbbmmjjjjjjjjjia mc",
+"j          cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjia mc",
+"j  jjjjjjd cjjjjjjdjjjjjjjjjjjjdjjjjjjjjjjjia mc",
+"j  jgggggd cjgggggdjjggggggggggdiibmmjjjjjjia mc",
+"j   jggggd cjggggdjjjggggggggggdjjjjjjjjjjjia mc",
+"j   jgggggdjgggggdaajggggggggggdaaajjjjjjjjia mc",
+"j    jggggdjggggdaaajgggggddddddaaabbibbmjjia mc",
+"j    jggggggggggdaakjgggggdkkkkakkkkkkkkkjjia mc",
+"j     jggggggggdaaakjgggggdjjjjjkkkkkkkkkjjia mc",
+"j     jggggggggdaaakjggggggggggdaaammkkkkjjia mc",
+"j      jggggggdaaaakjggggggggggdkkkkkkkkkjjia mc",
+"j     jggggggggdaaakjggggggggggdkkkkkkkkkjjia mc",
+"j     jggggggggdaalljgggggddddddaaibbbmmjjjia mc",
+"j    jggggggggggdaaljgggggdaaaaaaaajjjjjjjjia mc",
+"j    jggggddggggdaaljgggggdjjjjjaaajjjjjjjjia mc",
+"j   jgggggdjgggggdaajggggggggggdaaammmjjjjjia mc",
+"j   jggggdaajggggdaajggggggggggdjjjjjjjjjjjia mc",
+"j  jgggggdaajgggggdajggggggggggdiiibbbbbijjia mc",
+"j  dddddddaadddddddaddddddddddddaaajjjjjjjjia mc",
+"j      aaaaacjjjaaaaaajjaaiiiiaaiiibbbbbijjia mc",
+"j      aaaaacjjjaaaaaajjaaaaaaaaaaajjjjjjjjia mc",
+"j           cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjia mc",
+"j           cjjjjjjjjjjjjiimbbbimmbmmjjjjjjia mc",
+"j           cjjjjhghjjjjjjjjjjjjjjjjjjjjjjjia mc",
+"j           cjjjhggghjjjjjjjjjjjjjjjjjjjjjjia mc",
+"j           cjjjgggggmbbbmmibbbmjjjjjjjjjjjia mc",
+"j           cjjjhggghjjjjjjjjjjjjjjjjjjjjjjia mc",
+"j           cjjjjhghjjjjjjjjjjjjjjjjjjjjjjjia mc",
+"j           cjjjjjjjjjjjjjjmbbimaabbbmjjjjjia mc",
+"j           cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjia mc",
+"j           cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjia mc",
+"j           cjjjjjjjjjjjjjjjjjjjjjibbbmmmjjia mc",
+"j           cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjia mc",
+"j           cjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjia mc",
+"j           iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiia mc",
+"j             aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa mc",
+"j                                             mc",
+"jmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmc",
+"cccccccccccccccccccccccccccccccccccccccccccccccc"
+};
diff --git a/etc/xemacs-icon2.xbm b/etc/xemacs-icon2.xbm
new file mode 100644 (file)
index 0000000..bc01e4e
--- /dev/null
@@ -0,0 +1,27 @@
+#define noname_width 50
+#define noname_height 50
+static char noname_bits[] = {
+ 0xff,0xff,0xff,0xff,0xff,0xff,0x03,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0xff,
+ 0xff,0xff,0xff,0xc0,0xe3,0x03,0xff,0xff,0xff,0xff,0xcf,0xe3,0x03,0xff,0xff,
+ 0xff,0xff,0x00,0xe0,0x03,0xff,0xff,0xff,0x7f,0xff,0xe3,0x03,0xff,0xff,0xff,
+ 0xbf,0x01,0xe0,0x03,0xff,0xff,0xff,0xbf,0xfe,0xe3,0x03,0xff,0xff,0xff,0x1f,
+ 0xfc,0xe3,0x03,0xff,0xff,0xff,0xff,0xff,0xe3,0x03,0xff,0xff,0xff,0x7f,0xff,
+ 0xe3,0x03,0xff,0xff,0xff,0xbf,0xff,0xe3,0x03,0xff,0xff,0xff,0xff,0xff,0xe3,
+ 0x03,0xff,0xff,0xff,0x6f,0xfb,0xe3,0x03,0xff,0xff,0xff,0xcf,0xf9,0xe3,0x03,
+ 0xff,0xff,0xff,0x3f,0xfe,0xe3,0x03,0x0f,0x00,0x00,0x00,0x00,0xc0,0x03,0x17,
+ 0x00,0x00,0x00,0x00,0xc0,0x03,0x37,0x00,0x00,0x00,0x00,0xe0,0x03,0x77,0x00,
+ 0x00,0x00,0x00,0xf0,0x03,0x77,0x00,0x00,0x00,0x00,0xf0,0x03,0x7f,0x00,0x00,
+ 0x00,0x00,0xf0,0x03,0x7f,0x00,0x00,0x00,0x00,0xf0,0x03,0x77,0x00,0x00,0x00,
+ 0x00,0xf0,0x03,0x73,0xa2,0x0f,0x00,0x00,0xf0,0x03,0x77,0xa2,0x00,0x00,0x00,
+ 0xf0,0x03,0x7f,0x94,0x60,0x73,0x8c,0xf3,0x03,0x7f,0x88,0xa7,0x4a,0x52,0xf0,
+ 0x03,0x7f,0x94,0xa0,0x4a,0x82,0xf1,0x03,0x7b,0xa2,0x20,0x4a,0x12,0xf2,0x03,
+ 0x73,0xa2,0x2f,0xb2,0xcc,0xf1,0x03,0x77,0x00,0x00,0x00,0x00,0xf0,0x03,0x7f,
+ 0x00,0x00,0x00,0x00,0xf0,0x03,0x7f,0x00,0x00,0x00,0x00,0xf0,0x03,0x7f,0x00,
+ 0x00,0x00,0x00,0xf0,0x03,0x7f,0x00,0x00,0x00,0x00,0xf0,0x03,0xf7,0x00,0x00,
+ 0x00,0x00,0xf8,0x03,0xf7,0x01,0x00,0x00,0x00,0xfc,0x03,0xf3,0xff,0x9f,0xfc,
+ 0xff,0xff,0x03,0xff,0xff,0xbf,0x1e,0xfe,0xff,0x03,0xff,0xff,0xbf,0xee,0xfd,
+ 0xff,0x03,0xff,0xff,0xbf,0x36,0xfb,0xff,0x03,0xff,0xff,0xbf,0xd6,0xfa,0xff,
+ 0x03,0xf7,0xff,0xbf,0xd9,0xfa,0xff,0x03,0xf7,0xff,0x7f,0xef,0xfa,0xff,0x03,
+ 0xeb,0xff,0xff,0xf0,0xfa,0xff,0x03,0xff,0xff,0xff,0xff,0xfa,0xff,0x03,0xff,
+ 0xff,0xff,0xff,0xff,0xff,0x03,0xff,0xff,0xff,0xff,0xff,0xff,0x03,0xff,0xff,
+ 0xff,0xff,0xff,0xff,0x03};
diff --git a/etc/xemacs-icon2.xpm b/etc/xemacs-icon2.xpm
new file mode 100644 (file)
index 0000000..f2361b1
--- /dev/null
@@ -0,0 +1,62 @@
+/* XPM */
+static char * xemacs_xpm[] = {
+/* XEmacs pixmap
+ * width height ncolors chars_per_pixel */
+"50 50 5 1",
+/**/
+"       s None  c None",
+".      m black c darkslategrey",
+"X      m white c orange",
+"o      m black c slate blue",
+"O      m white c white",
+/* pixels */
+"                                                  ",
+"                                                  ",
+"                                ......    ...     ",
+"                                    ..    ...     ",
+"                                .............     ",
+"                               .XXXXXXXXXX...     ",
+"                              .XX............     ",
+"                              .X.         ...     ",
+"                             .....        ...     ",
+"                                          ...     ",
+"                               o          ...     ",
+"                              o           ...     ",
+"                                          ...     ",
+"                            o  o  o       ...     ",
+"                            oo   oo       ...     ",
+"                              ooo         ...     ",
+"    ..........................................    ",
+"   o .........................................    ",
+"   o  .......................................     ",
+"   o   .....................................      ",
+"   o   .....................................      ",
+"       .....................................      ",
+"       .....................................      ",
+"   o   .....................................      ",
+"  oo   ..O...O.OOOOO........................      ",
+"   o   ..O...O.O............................      ",
+"       ...O.O..O.....OO.OO..OOO...OO...OOO..      ",
+"       ....O...OOOO..O.O.O.O..O..O..O.O.....      ",
+"       ...O.O..O.....O.O.O.O..O..O.....OO...      ",
+"  o    ..O...O.O.....O...O.O..O..O..O....O..      ",
+"  oo   ..O...O.OOOOO.O...O..OO.O..OO..OOO...      ",
+"   o   .....................................      ",
+"       .....................................      ",
+"       .....................................      ",
+"       .....................................      ",
+"       .....................................      ",
+"   o    ...................................       ",
+"   o     .................................        ",
+"  oo                 ..X..                        ",
+"                      .X.    ....                 ",
+"                      .X.   .XXXX.                ",
+"                      .X.  .XX..XX.               ",
+"                      .X.  .X.  .X.               ",
+"   o                  .XX..XX.  .X.               ",
+"   o                   .XXXX.   .X.               ",
+"  o o                   ....    .X.               ",
+"                                .X.               ",
+"                                                  ",
+"                                                  ",
+"                                                  "};
diff --git a/etc/xemacs-icon3.xpm b/etc/xemacs-icon3.xpm
new file mode 100644 (file)
index 0000000..539d8ac
--- /dev/null
@@ -0,0 +1,65 @@
+/* XPM */
+static char * xemacs_xpm[] = {
+/* width height num_colors chars_per_pixel */
+"48 48 11 1",
+/* colors */
+"      s None  c none",
+".     c #e5e5e5",
+"X     c #cccccc",
+"o     c #b2b2b2",
+"O     c #999999",
+"+     c #7f7f7f",
+"@     c #666666",
+"#     c #4c4c4c",
+"$     c #323232",
+"%     c #191919",
+"&     c black",
+/* pixels */
+"                                                ",
+"                                                ",
+"                                                ",
+"                 ............     .........     ",
+"                XXXXXXXXXXXX.    XXXXXXXXX.     ",
+"               ooooooooooooX    oooooooooX      ",
+"              OOOOOOOOOOOOo    OOOOOOOOOo       ",
+"             ++++++++++++O    +++++++++O        ",
+"            @@@@@@@@@@@@+..  @@@@@@@@@+         ",
+"           ############@XX. #########@          ",
+"          $$$$$$$$$$$$#ooX.$$$$$$$$$#           ",
+"         %%%%%%%%%%%%$OOoX%%%%%%%%%$            ",
+"        &&&&&&&&&&&&%++Oo&&&&&&&&&%             ",
+"        &&&&&&&&&&&&@@+Oo&&&&&&&&&              ",
+"            &&&&&&$##@+OOoo&&&&Oo               ",
+"            &&&&&%$$#@++OOo&&&+O                ",
+"             &&&&%%$#@@++O&&&@+                 ",
+"             &&&&&%$##@@+&&&#@                  ",
+"             &&&&&%$$##@&&&$#..                 ",
+"             &&&&&%%$$#&&&%$XX.                 ",
+"              &&&&&%%$&&&&%ooX..                ",
+"              &&&&&&%$&&&&OOoXX.                ",
+"               &&&&&%&&&&++OooX..               ",
+"                &&&&&&&&@@+OOoXX.               ",
+"                &&&&&&&##@++OooX.               ",
+"                &&&&&&$$#@@+OOoX..              ",
+"                &&&&&%%$##@++OoXX.              ",
+"                 &&&&&%$$#@@+OooX.              ",
+"                &&&&&&%%$##@+OOoX.              ",
+"               &&&&&&&&%$$#@++OoX..             ",
+"              &&&&&&&&&%%$#@@+OoXX..            ",
+"             &&&&#&&&&&&%$##@+OooXX..           ",
+"            &&&&$o&&&&&&%$$#@+OOooXX...         ",
+"           &&&&%OoX&&&&&%%$#@++OOooXXX          ",
+"          &&&&&+Oooo&&&&&%$#@@++OOooo           ",
+"          &&&&@+OOO &&&&&%$##@@++OOO            ",
+"         +&&&#@+++   &&&&%$$##@@+++             ",
+"        @&&&$#@@@    &&&&%%$$##@@@              ",
+"       #&&&%$###     &&&&&%%$$###               ",
+"      $&&&&%$$$     $&&&&&&%%$$$                ",
+"     %&&&&&%%%     %&&&&&&&&%%%                 ",
+"    &&&&&&&&&     &&&&&&&&&&&&                  ",
+"                                                ",
+"                                                ",
+"                                                ",
+"                                                ",
+"                                                ",
+"                                                "};
diff --git a/etc/xemacs-ja.1 b/etc/xemacs-ja.1
new file mode 100644 (file)
index 0000000..a31a535
--- /dev/null
@@ -0,0 +1,776 @@
+.TH XEMACS 1 "1997 Ç¯ 3 ·î 11 Æü"
+.UC 4
+.SH "̾Á°"
+xemacs \- ¼¡À¤Âå Emacs
+.SH "·Á¼°"
+.B xemacs
+[
+.I <¥³¥Þ¥ó¥É¹Ô¥ª¥×¥·¥ç¥ó>
+] [
+.I <¥Õ¥¡¥¤¥ë̾>...
+]
+.br
+.\"°Ê²¼¡¢bold ¤Ë¤¹¤Ù¤­¥³¥Þ¥ó¥É̾¤Ê¤É¤¬±Ñ¸ì¤Ç¤Ï italic ¤Ë¤Ê¤Ã¤Æ¤¤¤ë¤Î¤Ç¡¢½¤Àµ¡£
+.SH "µ¡Ç½ÀâÌÀ"
+.B XEmacs
+¤Ï¡¢Free Software Foundation ¤Î Richard Stallman ¤Ë¤è¤Ã¤Æ½ñ¤«¤ì¤¿¤â¤Î¤Ç¡¢
+.B Emacs 
+¤È¤Î¸ß´¹À­¤òÊÝ»ý¤·¤¿¤Þ¤Þ¿¤¯¤Î²þÎɤ¬²Ã¤¨¤é¤ì¤¿¥Ð¡¼¥¸¥ç¥ó¤Ç¤¹¡£
+.B "GNU Emacs "
+¥Ð¡¼¥¸¥ç¥ó 19 ¤ÎÁá´ü¥ê¥ê¡¼¥¹¤ò¤â¤È¤Ë³«È¯¤µ¤ì¡¢
+.B "GNU Emacs "
+¤Î¸å³¥ê¥ê¡¼¥¹¤ÈƱ´ü¤¬¤È¤é¤ì¤Æ¤¤¤Þ¤¹¡£
+.PP
+.B XEmacs 
+¤Î¼ç¤Ê¥Þ¥Ë¥å¥¢¥ë¤Ï¡¢
+.B XEmacs 
+¥µ¥Ö¥·¥¹¥Æ¥à¤Î 1 ¤Ä¤Ç¤¢¤ë Info ¤ò»È¤Ã¤Æ¥ª¥ó¥é¥¤¥ó¤Ç»²¾È¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
+´°À®¤µ¤ì¤¿ºÇ¿·¤Î¥Þ¥Ë¥å¥¢¥ë¤Ï¡¢¤½¤Á¤é¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤
+(¤¿¤À¤·¸½»þÅÀ¤Ç¤Ï¡¢Info ·Á¼°¥É¥­¥å¥á¥ó¥È¤Ï±Ñ¸ìÈǤΤߤ¬ÍÑ°Õ¤µ¤ì¤Æ¤¤¤Þ¤¹)¡£
+Emacs Lisp »ÈÍÑÊýË¡¤Ë¤Ä¤¤¤Æ¤Î´°Á´¤Ê¥Þ¥Ë¥å¥¢¥ë¤È¤·¤Æ¤Ï
+¡ØXEmacs Lisp Programmer's Manual¡Ù¤ò¡¢
+¥ª¥ó¥é¥¤¥ó¤Ç»²¾È¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤É¤Á¤é¤Î¥Þ¥Ë¥å¥¢¥ë¤â
+.B TeX
+½ñ¼°¥Ñ¥Ã¥±¡¼¥¸¤ò»ÈÍѤ¹¤ì¤Ð¡¢¤­¤ì¤¤¤Ë°õºþ¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
+.PP
+»ÈÍѤǤ­¤ë
+.B XEmacs
+¤Îµ¡Ç½¤Ï¡¢¤Û¤«¤Î
+.B Emacs
+¥¨¥Ç¥£¥¿¤Ç¤Ç¤­¤ë¤¹¤Ù¤Æ¤Îµ¡Ç½¤¬´Þ¤Þ¤ì¤Æ¤ª¤ê¡¢
+ÊÔ½¸¥³¥Þ¥ó¥É¤Ï Lisp ¤Çµ­½Ò¤µ¤ì¤Æ¤¤¤ë¤¿¤á¡¢Íưפ˳ÈÄ¥¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
+.PP
+.B XEmacs
+¤Ë¤Ï³ÈÄ¥ÂÐÏ÷¿¥Ø¥ë¥×µ¡Ç½¤¬ÍÑ°Õ¤µ¤ì¤Æ¤¤¤Þ¤¹¤¬¡¢¤³¤Îµ¡Ç½¤ò»ÈÍѤ¹¤ë¤Ë¤Ï¡¢
+.B XEmacs
+¥¦¥£¥ó¥É¥¦¤È¥Ð¥Ã¥Õ¥¡¤Ë¤Ä¤¤¤Æ¤Î°·¤¤Êý¤òÃΤäƤ¤¤ë¤³¤È¤¬Á°Äó¤È¤Ê¤ê¤Þ¤¹¡£
+CTRL-h ¤Ç¥Ø¥ë¥×µ¡Ç½¤ò¼Â¹Ô¤·¤Þ¤¹¡£¡ÖXEmacs ¼«½¬½ñ(CTRL-h t)¡×¤Ï¡¢
+½é¿´¼Ô¤¬¿ôʬ´Ö¤Ç
+.B XEmacs
+¤Î´ðÁäòÃΤ뤳¤È¤¬¤Ç¤­¤ëÂÐÏ÷¿¤Î¥Á¥å¡¼¥È¥ê¥¢¥ë¤ò¸Æ¤Ó½Ð¤·¤Þ¤¹¡£
+¡ÖŬÀÚ¸¡º÷...(CTRL-h a)¡×¤Ï¡¢»ØÄꤷ¤¿µ¡Ç½¤ò¼Â¹Ô¤¹¤ë¥³¥Þ¥ó¥É¤ò
+õ¤¹¼ê½õ¤±¤ò¤·¤Þ¤¹¡£
+¡Ö¥­¡¼/¥Þ¥¦¥¹µ­½Ò...(CTRL-h k)¡×¤Ï¡¢»ØÄꤷ¤¿¥­¡¼Áàºî¤Î¼Â¹ÔÆâÍƤòɽ¼¨¤·¤Þ¤¹¡£
+¡Ö´Ø¿ôµ­½Ò...(CTRL-h f)¡×¤Ï¡¢»ØÄꤷ¤¿Ì¾Á°¤Î Lisp ´Ø¿ô¤òɽ¼¨¤·¤Þ¤¹¡£
+¤µ¤é¤Ë¡Ö¥­¡¼/¥Þ¥¦¥¹³ä¤êÅö¤Æ...(CTRL-h CTRL-k)¡×¤ò»ÈÍѤ¹¤ë¤È¡¢
+.B XEmacs 
+¥ê¥Õ¥¡¥ì¥ó¥¹¥Þ¥Ë¥å¥¢¥ë¾å¤Î¥­¡¼Áàºî¤ò»²¾È¤Ç¤­¡¢
+¡ÖElisp ´Ø¿ô...(CTRL-h CTRL-f)¡×¤ò»ÈÍѤ¹¤ë¤È¡¢
+¡ØXEmacs Lisp Programmer's Manual¡Ù¾å¤Î Lisp ´Ø¿ô¤ò»²¾È¤Ç¤­¤Þ¤¹¡£
+¥æ¡¼¥¶¡¼¤¬¥¦¥£¥ó¥É¥¦¥·¥¹¥Æ¥à¤ò»ÈÍѤ·¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢
+¤³¤ì¤é¤Î¥Ø¥ë¥×µ¡Ç½¤Ï¤¹¤Ù¤Æ¥Ø¥ë¥×¥á¥Ë¥å¡¼¤«¤é»ÈÍѤ¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
+.PP
+Ê£¿ô¥Õ¥ì¡¼¥à(¥È¥Ã¥×¥ì¥Ù¥ë¥¦¥£¥ó¥É¥¦)¡¢¥á¥Ë¥å¡¼¥Ð¡¼¡¢¥Ä¡¼¥ë¥Ð¡¼¡¢
+¿åÊ¿¡¦¿âľ¥¹¥¯¥í¡¼¥ë¥Ð¡¼¡¢¥À¥¤¥¢¥í¥°¥Ü¥Ã¥¯¥¹¡¢³ÈÄ¥¥Þ¥¦¥¹µ¡Ç½
+¤Ê¤É¤ò»ý¤Ä X ¤Î¤è¤¦¤Ê¥¦¥£¥ó¥É¥¦¥·¥¹¥Æ¥à´Ä¶­²¼¤Ç¤Ï¡¢
+.B XEmacs
+¤Ï
+³ÈÄ¥ GUI(¥°¥é¥Õ¥£¥«¥ë¥æ¡¼¥¶¡¼¥¤¥ó¥¿¥Õ¥§¡¼¥¹)¤ò¥µ¥Ý¡¼¥È¤·¤Þ¤¹¡£
+.PP
+.B XEmacs 
+¤Ï¡¢Ê£¿ô¤Î¥Õ¥©¥ó¥È¤ä¥«¥é¡¼¡¢²ÄÊÑÉý¥Õ¥©¥ó¥È¡¢²ÄÊѹԴֳ֤ò
+´°Á´¤Ë¥µ¥Ý¡¼¥È¤·¤Æ¤ª¤ê¡¢
+¥Ô¥Ã¥¯¥¹¥Þ¥Ã¥×¤ò¥Ð¥Ã¥Õ¥¡¤Ë¼è¤ê¹þ¤à¤³¤È¤â²Äǽ¤Ç¤¹
+(¤³¤ì¤ÏÆäˡ¢W3 Web ¥Ö¥é¥¦¥¸¥ó¥°¥Ñ¥Ã¥±¡¼¥¸¤ä°ìÉô¤Î
+¥Ç¥Ð¥Ã¥¬¡¢¥¢¥¦¥È¥é¥¤¥óµ¡Ç½¤Î¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ËÍѤ¤¤é¤ì¤Þ¤¹)¡£
+.PP
+.B XEmacs 
+¤Î¡Ö¸µ¤ËÌ᤹¡×¤Ï¡¢¥Ð¥Ã¥Õ¥¡¤ËÈ¿±Ç¤µ¤ì¤¿¿ô¥¹¥Æ¥Ã¥×Á°¤Þ¤Ç¤ÎÊѹ¹¤ò
+¼è¤ê¾Ã¤¹¤³¤È¤¬¤Ç¤­¡¢ÊÔ½¸¤Î¥ß¥¹¤ò´Êñ¤Ë½¤Éü¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
+.PP
+.B XEmacs 
+¤Ë¤Ï¡¢Â¿¤¯¤ÎÀìÍѥѥ屡¼¥¸¤¬ÍÑ°Õ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¥á¡¼¥ë¤ÎÆɤ߽Ф· (VM¡¢MH-E¡¢
+RMail) ¤äȯ¿® (Mail)¡¢¥Í¥Ã¥È¥Ë¥å¡¼¥¹¤ÎÆɤ߽Ф·¤ÈÅêÈ¡ (GNUS)¡¢
+World Wide Web ¤Î¥Ö¥é¥¦¥º (W3)¡¢¤¹¤Ù¤Æ¤Î¼çÍ×¤Ê¥×¥í¥°¥é¥ß¥ó¥°¸À¸ì¤Ë
+¤Ç½ñ¤«¤ì¤¿¥½¡¼¥¹¥³¡¼¥É¤òÊÔ½¸¤¹¤ë¤¿¤á¤ÎÆò½¤µ¤ì¤¿¥â¡¼¥É¡¢
+¿¤¯¤Î¸À¸ìÍѤι½Ê¸¶¯Ä´É½¼¨ (Font-Lock)¡¢¥³¥ó¥Ñ¥¤¥ë (Compile)¡¢
+.B XEmacs
+¥¦¥£¥ó¥É¥¦Æâ¤ÇÆ°ºî¤¹¤ë¥µ¥Ö¥·¥§¥ë (Shell)¡¢¥¢¥¦¥È¥é¥¤¥óÊÔ½¸ (Outline)¡¢
+Lisp ¤Î¡ÖÆɤ߹þ¤ß¡¢É¾²Á¡¢É½¼¨¡×¥ë¡¼¥×¤Î¼Â¹Ô (Lisp-Interaction-Mode)¡¢
+¥²¡¼¥àÀº¿ÀʬÀÏ°å (Doctor) ¤Ê¤É¤Ç¤¹¡£
+.PP
+¾ÜºÙ¤Ê¥ê¥Õ¥¡¥ì¥ó¥¹¥Þ¥Ë¥å¥¢¥ë¤Ï¤¢¤ê¤Þ¤¹¤¬¡¢
+¾¤Î¥Ð¡¼¥¸¥ç¥ó¤Î Emacs ¤ò»ÈÍѤ·¤¿¤³¤È¤¬¤¢¤ì¤Ð¡¢
+¥Þ¥Ë¥å¥¢¥ë¤Ê¤·¤Ç¤âÌäÂê¤Ê¤¯Âбþ¤Ç¤­¤ë¤È»×¤ï¤ì¤Þ¤¹¡£
+½é¤á¤Æ Emacs ¤ò»ÈÍѤ¹¤ë¿Í¤Ç¤â¡¢¥Á¥å¡¼¥È¥ê¥¢¥ë¤ò³Ø½¬¤·¤¿¤ê¼«Æ°
+¥Þ¥Ë¥å¥¢¥ëµ¡Ç½¤òÍøÍѤ¹¤ë¤³¤È¤Ç¡¢¤¹¤°¤Ë´ðËܵ¡Ç½¤ò»È¤¦¤³¤È¤¬¤Ç¤­¤ë¤è¤¦¤Ë
+¤Ê¤ë¤Ç¤·¤ç¤¦¡£
+.PP
+.SM "XEmacs ¥ª¥×¥·¥ç¥ó"
+.PP
+XEmacs ¤Ï¡¢X ¥¦¥£¥ó¥É¥¦¤¬Æ°ºî¤¹¤ë´Ä¶­²¼¤Ç¤Ï¡¢¤¹¤Ù¤Æ¤Îɸ½à X ¥Ä¡¼¥ë¥­¥Ã¥È¤Î
+¥³¥Þ¥ó¥É¥ª¥×¥·¥ç¥ó¤òǧ¼±¤·¤Þ¤¹¡£¤½¤ì¤Ë²Ã¤¨¤Æ¡¢°Ê²¼¤Î¥ª¥×¥·¥ç¥ó¤òǧ¼±
+¤·¤Þ¤¹
+(¥ª¥×¥·¥ç¥ó¤¬°ìÏ¢¤ÎÊ£¿ô¤Î½èÍý¤ò°ÕÌ£¤¹¤ë¾ì¹ç¤Ï¡¢»ØÄꤵ¤ì¤¿½ç¤Ë¼Â¹Ô¤µ¤ì¤Þ¤¹)¡£
+.TP
+.BI \-t " ¥Ç¥Ð¥¤¥¹Ì¾"
+»ÈÍÑÃæ¤Îɸ½àÆþ½ÐÎϤÎÂå¤ï¤ê¤Ë¡¢»ØÄꤵ¤ì¤¿¥Ç¥Ð¥¤¥¹¤ò»È¤¤¤Þ¤¹¡£¤³¤ì¤Ï
+.BR \-nw
+¥ª¥×¥·¥ç¥ó¤ò´Þ°Õ¤·¤Æ¤¤¤Þ¤¹¡£
+.TP
+.BI \-batch
+¥Ð¥Ã¥Á¥â¡¼¥É¤ÇÊÔ½¸¤ò¹Ô¤¤¤Þ¤¹¡£¥¨¥Ç¥£¥¿¤Ïɸ½à½ÐÎϤ˥á¥Ã¥»¡¼¥¸¤òÁ÷½Ð¤·¤Þ¤¹¡£
+¼Â¹Ô¥Õ¥¡¥¤¥ë¤ò»ØÄꤷ¤¿¤ê´Ø¿ô¤ò¸Æ¤Ó½Ð¤¹¾ì¹ç¤Ï¡¢É¬¤º
+.BR \-l
+¡¢
+.BR \-f
+¡¢
+.B \-eval
+¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£
+.TP
+.B \-nw\ 
+¥¦¥£¥ó¥É¥¦¥·¥¹¥Æ¥àÆÃÍ­¤Îɽ¼¨ÍÑ¥³¡¼¥É¤Î»ÈÍѤò¤¹¤Ù¤Æ¶Ø»ß¤·¤Þ¤¹¡£
+¸½ºß¤Î TTY ¤ò»ÈÍѤ·¤Þ¤¹¡£
+.TP
+.B \-debug\-init
+½é´ü²½¥Õ¥¡¥¤¥ë¤ÎÆɤ߹þ¤ßÃæ¤Ë¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç¡¢¥Ç¥Ð¥Ã¥¬¤òµ¯Æ°¤·¤Þ¤¹¡£
+.TP
+.B \-unmapped
+½é´ü¥Õ¥ì¡¼¥à¤ò¥Þ¥Ã¥Ô¥ó¥°¤·¤Þ¤»¤ó¡£
+.TP
+.B \-no\-site\-file
+¥µ¥¤¥È¸ÇÍ­¤Î½é´ü²½¥Õ¥¡¥¤¥ë(site-init.el)¤òÆɤ߹þ¤ß¤Þ¤»¤ó¡£
+.TP
+.BR \-q "¡¢" \-no\-init\-file
+½é´ü²½¥Õ¥¡¥¤¥ë¤òÆɤ߹þ¤ß¤Þ¤»¤ó¡£
+.TP
+.BI \-u " ¥æ¡¼¥¶¡¼Ì¾¡¢" \-user " ¥æ¡¼¥¶¡¼Ì¾"
+»ØÄꤷ¤¿¥æ¡¼¥¶¡¼¸ÇÍ­¤Î½é´ü²½¥Õ¥¡¥¤¥ë¤òÆɤ߹þ¤ß¤Þ¤¹¡£
+.TP
+.I ¥Õ¥¡¥¤¥ë̾ 
+»ØÄꤷ¤¿¥Õ¥¡¥¤¥ë¤òÊÔ½¸¤·¤Þ¤¹¡£
+.TP
+.BI \+ "¹ÔÈÖ¹æ"
+.I ¹ÔÈÖ¹æ 
+¤Ë»ØÄꤷ¤¿¹Ô¤Ë°ÜÆ°¤·¤Þ¤¹
+.br
+(+ Éä¹æ¤È¹ÔÈÖ¹æ¤Î´Ö¤Ë¶õÇòʸ»ú¤ÏÆþ¤ì¤Ê¤¤¤Ç¤¯¤À¤µ¤¤)¡£
+.TP
+.BR \-help "¡¢" \-flags "¡¢" \-?
+¥Ø¥ë¥×¥á¥Ã¥»¡¼¥¸¤ò½ÐÎϤ·¤Æ½ªÎ»¤·¤Þ¤¹¡£
+.TP
+.BR \-V "¡¢" \-version
+¥Ð¡¼¥¸¥ç¥óÈÖ¹æ¤ò½ÐÎϤ·¤Æ½ªÎ»¤·¤Þ¤¹¡£
+.TP
+.BI \-f " ´Ø¿ô̾¡¢ " \-funcall " ´Ø¿ô̾"
+.I "´Ø¿ô̾ "
+¤Ë»ØÄꤷ¤¿ Lisp ´Ø¿ô¤ò¼Â¹Ô¤·¤Þ¤¹¡£
+.TP
+.BI \-l " ¥Õ¥¡¥¤¥ë̾¡¢ " \-load " ¥Õ¥¡¥¤¥ë̾"
+.I ¥Õ¥¡¥¤¥ë̾
+¤Ë»ØÄꤷ¤¿¥Õ¥¡¥¤¥ëÃæ¤Î Lisp ¥³¡¼¥É¤òÆɤ߹þ¤ß¤Þ¤¹¡£
+.TP
+.BI \-eval " ¥Õ¥©¡¼¥à"
+.I ¥Õ¥©¡¼¥à
+¤Ë»ØÄꤷ¤¿ Lisp ¤Î¥Õ¥©¡¼¥à¤òɾ²Á¤·¤Þ¤¹¡£
+.TP
+.BI \-i " ¥Õ¥¡¥¤¥ë̾¡¢" \-insert " ¥Õ¥¡¥¤¥ë̾"
+¸½ºß¤Î¥Ð¥Ã¥Õ¥¡¤Ë¡¢
+.I ¥Õ¥¡¥¤¥ë̾
+¤Ë»ØÄꤷ¤¿¥Õ¥¡¥¤¥ë¤ò¼è¤ê¹þ¤ß¤Þ¤¹¡£
+.TP
+.B \-kill
+.B XEmacs
+¤ò½ªÎ»¤·¤Þ¤¹(
+.BR \-batch 
+¤ÇÍ­¸ú¤Ç¤¹)¡£
+.PP
+.SM "X ¤Ç¤Î XEmacs ¤Î»ÈÍÑ"
+.PP
+.B XEmacs
+¤Ï¡¢X ¥¦¥£¥ó¥É¥¦¥·¥¹¥Æ¥à¾å¤ÇÀµ¤·¤¯Æ°ºî¤¹¤ë¤è¤¦¤Ë³«È¯¤µ¤ì¤Æ¤­¤Þ¤·¤¿¡£
+X ¥¦¥£¥ó¥É¥¦¤Ç
+.B XEmacs
+¤òµ¯Æ°¤¹¤ë¤È¡¢¥Ç¥£¥¹¥×¥ì¥¤Æâ¤ËÆȼ«¤Î X ¥¦¥£¥ó¥É¥¦¤ò³«¤­¤Þ¤¹¡£
+¥æ¡¼¥¶¡¼¤Î¥ª¥ê¥¸¥Ê¥ë¤Î¥¦¥£¥ó¥É¥¦¤ò¤½¤Î¤Þ¤Þ»È¤¤Â³¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¤è¤¦¤Ë¡¢
+¥¨¥Ç¥£¥¿¤Ï¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¤Î¥¸¥ç¥Ö¤È¤·¤Æµ¯Æ°¤·¤¿¤Û¤¦¤¬¤è¤¤¤Ç¤·¤ç¤¦¡£
+.PP
+.B XEmacs
+¤Ï¡¢°Ê²¼¤Îɸ½à X ¥ª¥×¥·¥ç¥ó¤òÉÕ¤±¤Æµ¯Æ°¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
+.TP
+.BI \-geometry " ##x##+##+##"
+½é´ü¥¦¥£¥ó¥É¥¦¤Î¥¸¥ª¥á¥È¥ê¤ò»ØÄꤷ¤Þ¤¹¡£## ¤Ë¤Ï¡¢Éý(ʸ»ú¿ô)¡¢
+¹â¤µ(ʸ»ú¿ô)¡¢X ¥ª¥Õ¥»¥Ã¥È(¥Ô¥¯¥»¥ë¿ô)¡¢Y ¥ª¥Õ¥»¥Ã¥È(¥Ô¥¯¥»¥ë¿ô)
+¤ò¿ô»ú¤Ç»ØÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
+.I ##x##
+¤ä
+.I +##+##
+¤Ê¤É¤Î½ñ¼°¤ÎÉôʬ»ØÄê¤âÍ­¸ú¤Ç¤¹¡£(¥¸¥ª¥á¥È¥ê»ÅÍͤϡ¢É¸½à X ¥Õ¥©¡¼¥Þ¥Ã¥È¤Ë
+½àµò¤·¤Æ¤¤¤Þ¤¹¡£¾ÜºÙ¤Ï
+.BR X (1)
+¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£)
+.TP
+.B \-iconic
+µ¯Æ°»þ¤Î½é´ü¥¦¥£¥ó¥É¥¦¤ò¥¢¥¤¥³¥ó¤Çɽ¼¨¤·¤Þ¤¹¡£
+.TP
+.BI \-name " ¥×¥í¥°¥é¥à̾"
+¥æ¡¼¥¶¡¼¤Î X ¥ê¥½¡¼¥¹Æâ¤Ë¤¢¤ë¥Ç¥Õ¥©¥ë¥È¤ò»²¾È¤¹¤ë¤¿¤á¤Ë»ÈÍѤµ¤ì¤ë
+¥×¥í¥°¥é¥à̾¤ò»ØÄꤷ¤Þ¤¹¡£
+.TP
+.BI \-title " ¥¿¥¤¥È¥ë̾¡¢" \-T " ¥¿¥¤¥È¥ë̾¡¢" \-wn " ¥¿¥¤¥È¥ë̾"
+.B XEmacs
+¥¦¥£¥ó¥É¥¦¤Î¥¿¥¤¥È¥ë̾¤ò»ØÄꤷ¤Þ¤¹¡£
+.TP
+.BI \-d " ¥Ç¥£¥¹¥×¥ì¥¤Ì¾¡¢" \-display " ¥Ç¥£¥¹¥×¥ì¥¤Ì¾"
+.IR ¥Ç¥£¥¹¥×¥ì¥¤Ì¾
+¤Ë»ØÄꤷ¤¿¥Ç¥£¥¹¥×¥ì¥¤¾å¤Ë
+.B XEmacs
+¥¦¥£¥ó¥É¥¦¤òºîÀ®¤·¤Þ¤¹¡£
+¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢¥³¥Þ¥ó¥É¹Ô¤ÇºÇ½é (ÀèƬ) ¤Ë»ØÄꤷ¤Æ¤¯¤À¤µ¤¤¡£
+.TP
+.BI \-font " ¥Õ¥©¥ó¥È̾¡¢" \-fn " ¥Õ¥©¥ó¥È̾"
+.B XEmacs
+¥¦¥£¥ó¥É¥¦¤Î¥Õ¥©¥ó¥È¤È¤·¤Æ¡¢
+.I ¥Õ¥©¥ó¥È̾
+¤Ë»ØÄꤷ¤¿¥Õ¥©¥ó¥È¤ò»ÈÍѤ·¤Þ¤¹¡£X ¥Õ¥©¥ó¥È¤Ï 
+.B "/usr/lib/X11/fonts"
+¥Ç¥£¥ì¥¯¥È¥ê¤«¤éÁªÂò¤·¤Æ¤¯¤À¤µ¤¤¡£
+.B XEmacs
+¤Ï¡¢¸ÇÄêÉý¥Õ¥©¥ó¥È¤È²ÄÊÑÉý¥Õ¥©¥ó¥È¤Î¤É¤Á¤é¤Ç¤âÆ°ºî¤·¤Þ¤¹¤¬¡¢
+¸ÇÄêÉý¥Õ¥©¥ó¥È¤ò»ÈÍѤ¹¤ë¤³¤È¤ò¤ª´«¤á¤·¤Þ¤¹¡£
+.TP
+.BI \-scrollbar\-width " ¥Ô¥¯¥»¥ë¿ô"
+¿âľ¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤ÎÉý¤ò»ØÄꤷ¤Þ¤¹¡£
+.TP
+.BI \-scrollbar\-height " ¥Ô¥¯¥»¥ë¿ô"
+¿åÊ¿¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤Î¹â¤µ¤ò»ØÄꤷ¤Þ¤¹¡£
+.TP
+.BI \-bw " ¥Ô¥¯¥»¥ë¿ô¡¢ " \-borderwidth " ¥Ô¥¯¥»¥ë¿ô"
+.B XEmacs
+¥¦¥£¥ó¥É¥¦¤Î¶­³¦Éý¤ò»ØÄꤷ¤Þ¤¹¡£
+¥¦¥£¥ó¥É¥¦Î¾Â¦¤Î¥Ç¥Õ¥©¥ë¥ÈÃͤϠ1 ¥Ô¥¯¥»¥ë¤Ç¤¹¡£
+.TP
+.BI \-ib " ¥Ô¥¯¥»¥ë¿ô¡¢ " \-internal\-border\-width " ¥Ô¥¯¥»¥ë¿ô"
+¥Õ¥ì¡¼¥à¤Î¶­³¦¤È¥Æ¥­¥¹¥È¤È¤Î´Ö³Ö¤ò»ØÄꤷ¤Þ¤¹¡£
+¥¦¥£¥ó¥É¥¦Î¾Â¦¤Î¥Ç¥Õ¥©¥ë¥ÈÃͤϠ1 ¥Ô¥¯¥»¥ë¤Ç¤¹¡£
+.TP
+.BI \-fg " ¥«¥é¡¼Ì¾¡¢ " \-foreground " ¥«¥é¡¼Ì¾"
+¥Æ¥­¥¹¥È¤Î¿§¤òÀßÄꤷ¤Þ¤¹¡£¥«¥é¡¼Ì¾¤Ë¤Ä¤¤¤Æ¤Ï¡¢
+.B "/usr/lib/X11/rgb.txt"
+¥Õ¥¡¥¤¥ëÃæ¤Î¥ê¥¹¥È¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
+.TP
+.BI \-bg " ¥«¥é¡¼Ì¾¡¢ " \-background " ¥«¥é¡¼Ì¾"
+¥¦¥£¥ó¥É¥¦¤ÎÇطʤ理òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.BI \-bd " ¥«¥é¡¼Ì¾¡¢ " \-bordercolor " ¥«¥é¡¼Ì¾"
+¥¦¥£¥ó¥É¥¦¶­³¦¤Î¿§¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.BI \-mc " ¥«¥é¡¼Ì¾"
+¥Þ¥¦¥¹¥Ý¥¤¥ó¥¿¤Î¿§¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.BI \-cr " ¥«¥é¡¼Ì¾"
+¥Æ¥­¥¹¥È¥«¡¼¥½¥ë¤Î¿§¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.BR \-rv "¡¢" \-reverse
+Á°·Ê¤ÈÇطʤ理òȿž¤·¤Þ¤¹(ȿžɽ¼¨)¡£
+¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ»¤º¤Ë¡¢
+Á°·Ê¿§¤ÈÇØ·Ê¿§¤òÌÀ¼¨Åª¤ËÀßÄꤹ¤ë¤³¤È¤ò¤ª´«¤á¤·¤Þ¤¹¡£
+.TP
+.BI \-xrm " °ú¿ô"
+¥³¥Þ¥ó¥É¹Ô¤ÇǤ°Õ¤Î¥ê¥½¡¼¥¹¤òÀßÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
+.B \.Xresource
+¤ä
+.B \.Xdefaults
+¥Õ¥¡¥¤¥ëÃæ¤Ë»ØÄꤵ¤ì¤ë¤Î¤ÈƱÍͤˡ¢
+.I °ú¿ô
+¤Ë»ØÄꤷ¤¿Ãͤ¬¥ê¥½¡¼¥¹¤È¤·¤Æ²ò¼á¤µ¤ì¤Þ¤¹¡£
+.PP
+¥æ¡¼¥¶¡¼¤Ï¡¢¤¿¤È¤¨¤Ð
+.B \.Xresources
+¤ä
+.B \.Xdefaults
+¥Õ¥¡¥¤¥ë¤Ç¡¢
+.B XEmacs 
+¥¦¥£¥ó¥É¥¦ÍѤΥ꥽¡¼¥¹¤Î¥Ç¥Õ¥©¥ë¥ÈÃͤòÀßÄꤹ¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹(
+.BR xrdb (1)
+»²¾È)¡£
+½ñ¼°¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£
+.IP
+\f3Emacs.\f2¥­¡¼¥ï¡¼¥É\f3:\f2ÃÍ\f1
+.PP
+¤Þ¤¿¤Ï
+.IP
+\f3Emacs*EmacsFrame.\f2¥­¡¼¥ï¡¼¥É\f3:\f2ÃÍ\f1
+.PP
+¤Ç¤¹ (¤É¤Á¤é¤Î·Á¼°¤«¤Ï¡¢¥ê¥½¡¼¥¹¤Ë¤è¤ë)¡£
+.PP
+°Ê²¼¤Î½ñ¼°¤ò»ÈÍѤ·¤Æ¡¢ÆÃÄê¤Î¥Õ¥ì¡¼¥à¤Î¥ê¥½¡¼¥¹¤òÀßÄꤹ¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£
+.IP
+\f3Emacs*\f2¥Õ¥ì¡¼¥à̾\f3.\f2¥­¡¼¥ï¡¼¥É\f3:\f2ÃÍ\f1
+.PP
+(VM ¤Î¤è¤¦¤Ê´°À®¤µ¤ì¤¿¥Ñ¥Ã¥±¡¼¥¸¤Ï¡¢¤½¤ì¤é¤Î¥Õ¥ì¡¼¥à¤Ë¸ÇÍ­¤Î
+¥ê¥½¡¼¥¹Ì¾¤òÍ¿¤¨¤Þ¤¹¡£¤³¤Î¾ì¹ç¤Ï VM ¤Ë¤Ê¤ê¤Þ¤¹¡£)
+.PP
+.B XEmacs
+¤Ç¤Ï¡¢°Ê²¼¤Î¥­¡¼¥ï¡¼¥É¤ËÂФ¹¤ë¥Ç¥Õ¥©¥ë¥ÈÀßÄê¤ò¥æ¡¼¥¶¡¼¤¬¹Ô¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
+.TP
+.B default.attributeFont (\fPclass\fB Face.AttributeFont)
+¥¦¥£¥ó¥É¥¦¤Î¥Æ¥­¥¹¥È¥Õ¥©¥ó¥È¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B default.attributeForeground (\fPclass\fB Face.AttributeForeground)
+¥¦¥£¥ó¥É¥¦¥Æ¥­¥¹¥È¤Î¿§¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B default.attributeBackground (\fPclass\fB Face.AttributeBackground)
+¥¦¥£¥ó¥É¥¦¤ÎÇØ·Ê¿§¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B \fI¥Õ¥§¥¤¥¹\fB.attributeFont (\fPclass\fB Face.AttributeFont)
+¥Õ¥§¥¤¥¹Ì¾¤Î¥Õ¥©¥ó¥È¤òÀßÄꤷ¤Þ¤¹¡£
+¤è¤¯»ÈÍѤµ¤ì¤ë¥Õ¥§¥¤¥¹Ì¾¤ò¡¢°Ê²¼¤Ë¼¨¤·¤Þ¤¹¡£
+.PP
+.in +\w'right-margin'u+12n
+.ta \w'right-margin'u+4n
+.ti -\w'right-margin'u+4n
+¥Õ¥§¥¤¥¹               ÌÜŪ
+.br
+.ti -\w'right-margin'u+4n
+default        Ä̾ï¤Î¥Æ¥­¥¹¥È¡£
+.br
+.ti -\w'right-margin'u+4n
+bold   ¥Ü¡¼¥ë¥É (ÂÀ»ú) ¥Æ¥­¥¹¥È¡£
+.br
+.ti -\w'right-margin'u+4n
+italic ¥¤¥¿¥ê¥Ã¥¯ (¼ÐÂÎ) ¥Æ¥­¥¹¥È¡£
+.br
+.ti -\w'right-margin'u+4n
+bold-italic    ¥Ü¡¼¥ë¥É¥¤¥¿¥ê¥Ã¥¯¥Æ¥­¥¹¥È¡£
+.br
+.ti -\w'right-margin'u+4n
+modeline       ¥â¡¼¥É¹Ô¥Æ¥­¥¹¥È¡£
+.br
+.ti -\w'right-margin'u+4n
+zmacs-region   ¥Þ¥¦¥¹ÁªÂò¤µ¤ì¤¿¥Æ¥­¥¹¥È¡£
+.br
+.ti -\w'right-margin'u+4n
+highlight      ¥Þ¥¦¥¹Ä̲á»þ¤Î¶¯Ä´¥Æ¥­¥¹¥È¡£
+.br
+.ti -\w'right-margin'u+4n
+left-margin    º¸¥Þ¡¼¥¸¥óÆâ¤Î¥Æ¥­¥¹¥È¡£
+.br
+.ti -\w'right-margin'u+4n
+right-margin   ±¦¥Þ¡¼¥¸¥óÆâ¤Î¥Æ¥­¥¹¥È¡£
+.br
+.ti -\w'right-margin'u+4n
+isearch        ¸¡º÷»þ¤Î¶¯Ä´¥Æ¥­¥¹¥È¡£
+.br
+.ti -\w'right-margin'u+4n
+info-node      Info ¥á¥Ë¥å¡¼¤Î¥Æ¥­¥¹¥È¡£
+.br
+.ti -\w'right-margin'u+4n
+info-xref      Info Áê¸ß»²¾È¤Î¥Æ¥­¥¹¥È¡£
+.TP
+.B \fI¥Õ¥§¥¤¥¹\fB.attributeForeground(\f1class\fB Face.AttributeForeground)
+»ØÄê¥Õ¥§¥¤¥¹ÍѤÎÁ°·Ê¿§¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B \fI¥Õ¥§¥¤¥¹\fB.attributeBackground(\f1class\fB Face.AttributeBackground)
+»ØÄê¥Õ¥§¥¤¥¹ÍѤÎÇØ·Ê¿§¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B \fI¥Õ¥§¥¤¥¹\fB.attributeBackgroundPixmap
+.B (\f1class\fB Face.AttributeBackgroundPixmap)\f1
+.br
+»ØÄê¥Õ¥§¥¤¥¹ÍѤÎÇطʥԥ寥¹¥Þ¥Ã¥×¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B \fI¥Õ¥§¥¤¥¹\fB.attributeUnderline (\f1class\fB Face.AttributeUnderline)
+»ØÄê¥Õ¥§¥¤¥¹ÍѤβ¼Àþ¤Î̵ͭ¤ò·è¤á¤Þ¤¹¡£
+.TP
+.B reverseVideo (\f1class\fB ReverseVideo)
+.IR on 
+¤ËÀßÄꤵ¤ì¤¿¾ì¹ç¤Ï¡¢¥¦¥£¥ó¥É¥¦¤Ïȿžɽ¼¨¤·¤Þ¤¹¡£
+¤³¤Î¥ê¥½¡¼¥¹¤ò»ÈÍѤ»¤º¤Ë¡¢Á°·Ê¿§¤ÈÇØ·Ê¿§¤ò
+ÌÀ¼¨Åª¤ËÀßÄꤹ¤ë¤³¤È¤ò¤ª´«¤á¤·¤Þ¤¹¡£
+.TP
+.B borderWidth (\fPclass\fB BorderWidth)
+¥¦¥£¥ó¥É¥¦¤Î¶­³¦Éý¤ò¥Ô¥¯¥»¥ë¿ô¤ÇÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B internalBorderWidth (\fPclass\fB InternalBorderWidth)
+¥¦¥£¥ó¥É¥¦¤ÎÆ⦶­³¦Éý¤ò¥Ô¥¯¥»¥ë¿ô¤ÇÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B borderColor (\fPclass\fB BorderColor)
+¥¦¥£¥ó¥É¥¦¶­³¦¤Î¿§¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B cursorColor (\fPclass\fB Foreground)
+¥¦¥£¥ó¥É¥¦¤Î¥Æ¥­¥¹¥È¥«¡¼¥½¥ë¤Î¿§¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B pointerColor (\fPclass\fB Foreground)
+¥¦¥£¥ó¥É¥¦¤Î¥Þ¥¦¥¹¥«¡¼¥½¥ë¤Î¿§¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B geometry (\fPclass\fB Geometry)
+.B XEmacs
+¥¦¥£¥ó¥É¥¦¤Î¥¸¥ª¥á¥È¥ê¤òÀßÄꤷ¤Þ¤¹(¾å½Ò)¡£
+.TP
+.B iconic (\fPclass\fB Iconic)
+on ¤ËÀßÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢
+.B XEmacs
+¥¦¥£¥ó¥É¥¦¤ÏºÇ½é¤Ë¥¢¥¤¥³¥ó²½¤µ¤ì¤Æɽ¼¨¤µ¤ì¤Þ¤¹¡£
+.TP
+.B menubar (\fPclass\fB Menubar)
+.B XEmacs
+¥¦¥£¥ó¥É¥¦¤Ë¥á¥Ë¥å¡¼¥Ð¡¼¤òɽ¼¨¤µ¤»¤ë¤«¤É¤¦¤«¤òÀßÄꤷ¤Þ¤¹¡£½é´üÃͤϠtrue ¤Ç¤¹¡£
+.TP
+.B initiallyUnmapped (\fPclass\fB InitiallyUnmapped)
+.B XEmacs
+¤¬µ¯Æ°»þ¤Ë¥¢¥ó¥Þ¥Ã¥×¤µ¤ì¤¿½é´ü¥Õ¥ì¡¼¥à¤ò»Ä¤¹¤«¤É¤¦¤«¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B barCursor (\fPclass\fB BarCursor)
+¥«¡¼¥½¥ë¤Î·Á¾õ¤ò¡¢È¢·¿¤Þ¤¿¤Ï¥Ð¡¼¤ËÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B title (\fPclass\fB Title)
+.B XEmacs
+¥¦¥£¥ó¥É¥¦¤Î¥¿¥¤¥È¥ë̾¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B iconName (\fPclass\fB Title)
+.B XEmacs
+¥¦¥£¥ó¥É¥¦¥¢¥¤¥³¥ó¤Î̾Á°¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B scrollBarWidth (\fPclass\fB ScrollBarWidth)
+¿âľ¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤ÎÉý¤ò¥Ô¥¯¥»¥ë¿ô¤ÇÀßÄꤷ¤Þ¤¹¡£
+Ãͤò 0 ¤Ë¤¹¤ë¤È¡¢¿âľ¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤Ïɽ¼¨¤µ¤ì¤Þ¤»¤ó¡£
+.TP
+.B scrollBarHeight (\fPclass\fB ScrollBarHeight)
+¿åÊ¿¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤Î¹â¤µ¤ò¥Ô¥¯¥»¥ë¿ô¤ÇÀßÄꤷ¤Þ¤¹¡£
+Ãͤò 0 ¤Ë¤¹¤ë¤È¡¢¿åÊ¿¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤Ïɽ¼¨¤µ¤ì¤Þ¤»¤ó¡£
+.TP
+.B scrollBarPlacement (\fPclass\fB ScrollBarPlacement)
+¿âľ¡¦¿åÊ¿¥¹¥¯¥í¡¼¥ë¥Ð¡¼¤Î°ÌÃÖ¤òÀßÄꤷ¤Þ¤¹¡£"top-left"¡¢"bottom-left"¡¢ 
+"top-right"¡¢"bottom-right"¤Î¤¤¤º¤ì¤«¤òÁªÂò¤·¤Þ¤¹¡£
+¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢Motif ¤È Lucid ÍѤˤϠ"bottom-right" ¤¬¡¢
+Athena ÍѤˤϠ"buttom-left" ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤Þ¤¹¡£
+.TP
+.B topToolBarHeight (\fPclass\fB TopToolBarHeight)
+¾åÉô¤Î¥Ä¡¼¥ë¥Ð¡¼¤Î¹â¤µ¤ò¥Ô¥¯¥»¥ë¿ô¤ÇÀßÄꤷ¤Þ¤¹¡£
+Ãͤò 0 ¤Ë¤¹¤ë¤È¡¢¥Ä¡¼¥ë¥Ð¡¼¤Ïɽ¼¨¤µ¤ì¤Þ¤»¤ó¡£
+.TP
+.B bottomToolBarHeight (\fPclass\fB BottomToolBarHeight)
+²¼Éô¥Ä¡¼¥ë¥Ð¡¼ ¤Î¹â¤µ¤ò¥Ô¥¯¥»¥ë¿ô¤ÇÀßÄꤷ¤Þ¤¹¡£
+Ãͤò 0 ¤Ë¤¹¤ë¤È¡¢²¼Éô¥Ä¡¼¥ë¥Ð¡¼¤Ïɽ¼¨¤µ¤ì¤Þ¤»¤ó¡£
+.TP
+.B leftToolBarWidth (\fPclass\fB LeftToolBarWidth)
+º¸Â¦¤Î¥Ä¡¼¥ë¥Ð¡¼¤ÎÉý¤ò¥Ô¥¯¥»¥ë¿ô¤ÇÀßÄꤷ¤Þ¤¹¡£
+Ãͤò 0 ¤Ë¤¹¤ë¤È¡¢º¸Â¦¤Î¥Ä¡¼¥ë¥Ð¡¼¤Ïɽ¼¨¤µ¤ì¤Þ¤»¤ó¡£
+.TP
+.B rightToolBarWidth (\fPclass\fB RightToolBarWidth)
+±¦Â¦¤Î¥Ä¡¼¥ë¥Ð¡¼¤ÎÉý¤ò¥Ô¥¯¥»¥ë¿ô¤ÇÀßÄꤷ¤Þ¤¹¡£
+Ãͤò 0 ¤Ë¤¹¤ë¤È¡¢±¦Â¦¤Î¥Ä¡¼¥ë¥Ð¡¼¤Ïɽ¼¨¤µ¤ì¤Þ¤»¤ó¡£
+.TP
+.B topToolBarShadowColor (\fPclass\fB TopToolBarShadowColor)
+¥Ä¡¼¥ë¥Ð¡¼¤Î¾åÉô¥·¥ã¥É¥¦¤Î¿§¤òÀßÄꤷ¤Þ¤¹¡£
+(¤¹¤Ù¤Æ¤Î¥Ä¡¼¥ë¥Ð¡¼¤ËÍ­¸ú¡£¾åÉô¥Ä¡¼¥ë¥Ð¡¼°Ê³°¤Ë¤âÍ­¸ú¤Ç¤¹¡£)
+.TP
+.B bottomToolBarShadowColor (\fPclass\fB BottomToolBarShadowColor)
+¥Ä¡¼¥ë¥Ð¡¼¤Î²¼Éô¥·¥ã¥É¥¦¤Î¿§¤òÀßÄꤷ¤Þ¤¹¡£
+(¤¹¤Ù¤Æ¤Î¥Ä¡¼¥ë¥Ð¡¼¤ËÍ­¸ú¡£¾åÉô¥Ä¡¼¥ë¥Ð¡¼°Ê³°¤Ë¤âÍ­¸ú¤Ç¤¹¡£)
+.TP
+.B topToolBarShadowPixmap (\fPclass\fB TopToolBarShadowPixmap)
+¥Ä¡¼¥ë¥Ð¡¼¤Î¾åÉô¥·¥ã¥É¥¦¤Î¥Ô¥Ã¥¯¥¹¥Þ¥Ã¥×¤òÀßÄꤷ¤Þ¤¹¡£
+(¤¹¤Ù¤Æ¤Î¥Ä¡¼¥ë¥Ð¡¼¤ËÍ­¸ú¡£¾åÉô¥Ä¡¼¥ë¥Ð¡¼°Ê³°¤Ë¤âÍ­¸ú¤Ç¤¹¡£)
+ÀßÄꤵ¤ì¤Æ¤¤¤ì¤Ð¡¢¤³¤Î¥ê¥½¡¼¥¹¤ÏÂбþ¤¹¤ë¥«¥é¡¼¥ê¥½¡¼¥¹¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£
+.TP
+.B bottomToolBarShadowPixmap (\fPclass\fB BottomToolBarShadowPixmap)
+¥Ä¡¼¥ë¥Ð¡¼¤Î²¼Éô¥·¥ã¥É¥¦¤Î¥Ô¥Ã¥¯¥¹¥Þ¥Ã¥×¤òÀßÄꤷ¤Þ¤¹¡£
+(¤¹¤Ù¤Æ¤Î¥Ä¡¼¥ë¥Ð¡¼¤ËÍ­¸ú¡£¾åÉô¥Ä¡¼¥ë¥Ð¡¼°Ê³°¤Ë¤âÍ­¸ú¤Ç¤¹¡£)
+ÀßÄꤵ¤ì¤Æ¤¤¤ì¤Ð¡¢¤³¤Î¥ê¥½¡¼¥¹¤ÏÂбþ¤¹¤ë¥«¥é¡¼¥ê¥½¡¼¥¹¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£
+.TP
+.B toolBarShadowThickness (\fPclass\fB ToolBarShadowThickness)
+¥Ä¡¼¥ë¥Ð¡¼¤ò°Ï¤à¥·¥ã¥É¥¦Ç»ÅÙ¤ò¥Ô¥¯¥»¥ë¿ô¤ÇÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B visualBell (\fPclass\fB VisualBell)
+¥¹¥¯¥ê¡¼¥óÅÀÌǤޤ¿¤Ï¥Ó¡¼¥×²»¤Î¤É¤Á¤é¤ò»ÈÍѤ¹¤ë¤«¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B bellVolume (\fPclass\fB BellVolume)
+¥Ó¡¼¥×²»¤Î²»Î̤òÀßÄꤷ¤Þ¤¹¡£ÀßÄêÈϰϤϠ0 ¤«¤é 100 ¤Ç¤¹¡£
+.TP
+.B useBackingStore (\fPclass\fB UseBackingStore)
+.B XEmacs
+X ¥¦¥£¥ó¥É¥¦¤Î¥Ð¥Ã¥­¥ó¥°¥¹¥È¥¢Â°À­¤òÀßÄꤹ¤ë¤«¤É¤¦¤«¤ò·èÄꤷ¤Þ¤¹¡£
+¤³¤Î°À­¤òÀßÄꤹ¤ë¤È¡¢
+X ¥µ¡¼¥Ð¡¼¤¬»ÈÍѤ¹¤ë¥á¥â¥ê¡¼¤¬Â¿¤¯¤Ê¤ê¤Þ¤¹¤¬¡¢
+¥¹¥¯¥ê¡¼¥ó¤ò¹¹¿·¤¹¤ëºÝ¤Î X ¥È¥é¥Õ¥£¥Ã¥¯¤¬¾¯¤Ê¤¯¤Ê¤ê¤Þ¤¹¡£
+¤Þ¤¿¡¢¥â¥Ç¥àÀܳ¤Î¤è¤¦¤ÊÄ㮲óÀþ¤ò»È¤Ã¤¿
+.I X
+¥µ¡¼¥Ð¡¼¤È¤ÎÀܳ¤ËÍ­¸ú¤Ç¤¹¡£
+.TP
+.B textPointer (\fPclass\fB Cursor)
+¥Æ¥­¥¹¥È¾å¤Ë¥Þ¥¦¥¹¤¬¤¢¤ë¤È¤­¤Ë»ÈÍѤ¹¤ë¥«¡¼¥½¥ë¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B selectionPointer (\fPclass\fB Cursor)
+¥Þ¥¦¥¹ÁªÂò¤µ¤ì¤¿¥Æ¥­¥¹¥ÈÈϰϾå¤Ë¥Þ¥¦¥¹¤¬¤¢¤ë¤È¤­¤Ë»ÈÍѤ¹¤ë
+¥«¡¼¥½¥ë¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B spacePointer (\fPclass\fB Cursor)
+¥Ð¥Ã¥Õ¥¡Æâ¤Î¶õÇò¥¹¥Ú¡¼¥¹¾å¤Ë¥Þ¥¦¥¹¤¬¤¢¤ë¤È¤­¤Ë(¤Ä¤Þ¤ê¡¢
+¹ÔËö¤ä¥Õ¥¡¥¤¥ë¤ÎºÇ¸å¤Ç) »ÈÍѤ¹¤ë¥«¡¼¥½¥ë¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B modeLinePointer (\fPclass\fB Cursor)
+¥â¡¼¥É¥é¥¤¥ó¾å¤Ë¥Þ¥¦¥¹¤¬¤¢¤ë¤È¤­¤Ë»ÈÍѤ¹¤ë¥«¡¼¥½¥ë¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B gcPointer (\fPclass\fB Cursor)
+¥¬¡¼¥Ù¥Ã¥¸¥³¥ì¥¯¥·¥ç¥óÃæ¤Ëɽ¼¨¤¹¤ë¥«¡¼¥½¥ë¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B scrollbarPointer (\fPclass\fB Cursor)
+¥¹¥¯¥í¡¼¥ë¥Ð¡¼¾å¤Ë¥Þ¥¦¥¹¤¬¤¢¤ë¤È¤­¤Ë»ÈÍѤ¹¤ë¥«¡¼¥½¥ë¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B pointerColor (\fPclass\fB Foreground)
+¥Þ¥¦¥¹¥«¡¼¥½¥ë¤ÎÁ°·Ê¿§¤òÀßÄꤷ¤Þ¤¹¡£
+.TP
+.B pointerBackground (\fPclass\fB Background)
+¥Þ¥¦¥¹¥«¡¼¥½¥ë¤ÎÇØ·Ê¿§¤òÀßÄꤷ¤Þ¤¹¡£
+.PP
+.SM "¥Þ¥¦¥¹¤Î»ÈÍÑ"
+.PP
+°Ê²¼¤Î¥ê¥¹¥È¤Ï¡¢X11 ¤Ë¤ª¤±¤ë
+.B XEmacs
+¥¦¥£¥ó¥É¥¦¤Ç¤Î¡¢¥Þ¥¦¥¹¥Ü¥¿¥ó¤Î³ä¤êÅö¤Æ¤Ç¤¹¡£
+
+.in +\w'CTRL-SHIFT-middle'u+4n
+.ta \w'CTRL-SHIFT-middle'u+4n
+.ti -\w'CTRL-SHIFT-middle'u+4n
+¥Þ¥¦¥¹¥Ü¥¿¥ó       µ¡Ç½
+.br
+.ti -\w'CTRL-SHIFT-middle'u+4n
+º¸                 ¥Ý¥¤¥ó¥È¤Î°ÌÃÖ·è¤á¤È¡¢¥Æ¥­¥¹¥È¤ÎÁªÂò¡£
+.br
+.ti -\w'CTRL-SHIFT-middle'u+4n
+Ãæ±û               ¥Æ¥­¥¹¥È¤Î¥Ú¡¼¥¹¥È¡£
+.br
+.ti -\w'CTRL-SHIFT-middle'u+4n
+±¦                 ¥ª¥×¥·¥ç¥ó¥á¥Ë¥å¡¼¤Î¥Ý¥Ã¥×¥¢¥Ã¥×
+.br
+.ti -\w'CTRL-SHIFT-middle'u+4n
+SHIFT-º¸           ÁªÂòÈϰϤγÈÄ¥¡£
+.br
+.ti -\w'CTRL-SHIFT-middle'u+4n
+CTRL-º¸            ÁªÂò¤·¤¿ÆâÍƤò¥Ý¥¤¥ó¥È°ÌÃÖ¤ËÁÞÆþ¡£
+.br
+.ti -\w'CTRL-SHIFT-middle'u+4n
+CTRL-Ãæ±û          ¥Ý¥¤¥ó¥È¤Î°ÌÃÖ·è¤á¤È¤½¤Î°ÌÃ֤ǤΥƥ­¥¹¥È¤ÎÁªÂò¡£
+.br
+.ti -\w'CTRL-SHIFT-middle'u+4n
+CTRL-SHIFT-º¸      ÁªÂò¤·¤¿ÆâÍƤòºï½ü¤·¤½¤ÎÆâÍƤò¥Ý¥¤¥ó¥È°ÌÃÖ¤ËÁÞÆþ¡£
+.br
+.ti -\w'CTRL-SHIFT-middle'u+4n
+META-º¸            È¢·¿ÁªÂò¡£
+.SH "¥Õ¥¡¥¤¥ë"
+.LP
+Lisp ¥³¡¼¥É¤¬¡¢µ¯Æ°»þ¤Ë¥æ¡¼¥¶¡¼¤Î½é´ü²½¥Õ¥¡¥¤¥ë \fB$HOME/.emacs\fP ¤«¤é
+Æɤ߹þ¤Þ¤ì¤Þ¤¹¡£
+.LP
+\f3/usr/local/info\f1
+.br
+Info Ê¸½ñ¥Ö¥é¥¦¥¶
+(
+.BR XEmacs 
+¤Î¥µ¥Ö¥·¥¹¥Æ¥à)¤Î»²¾È¤¹¤ë¥Õ¥¡¥¤¥ë¡£
+¡ØXEmacs Reference Manual¡Ù¤È¡ØXEmacs Lisp Programmer's Manual¡Ù
+¤Î´°Á´¤Ê¥Æ¥­¥¹¥È¤¬¡¢½êÄê¤Î³¬Áع½Â¤¤Ç¼ý¤á¤é¤ì¤Æ¤¤¤Þ¤¹¡£
+.LP
+\f3/usr/local/lib/xemacs-$VERSION/info\f1
+.br
+Info ¥Õ¥¡¥¤¥ë(¤³¤Î°ÌÃ֤ȤϤ«¤®¤é¤Ê¤¤)
+.LP
+\f3/usr/local/lib/xemacs-$VERSION/src\f1
+.br
+C ¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤È¥ª¥Ö¥¸¥§¥¯¥È¥Õ¥¡¥¤¥ë(¸ºß¤·¤Ê¤¤¾ì¹ç¤â¤¢¤ë)
+.LP
+\f3/usr/local/lib/xemacs-$VERSION/lisp/*\f1
+.br
+¿¤¯¤ÎÊÔ½¸¥³¥Þ¥ó¥É¤òÄêµÁ¤¹¤ë Lisp ¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤È¥³¥ó¥Ñ¥¤¥ëºÑ¤ß¥Õ¥¡¥¤¥ë¡£
+¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ïµ¡Ç½¤ä¸Ä¡¹¤Î¥Ñ¥Ã¥±¡¼¥¸Ê̤˥µ¥Ö¥Ç¥£¥ì¥¯¥È¥êÆâ¤Ë
+ʬÎव¤ì¡¢ÃÖ¤«¤ì¤Æ¤¤¤Þ¤¹¡£¤¤¤¯¤Ä¤«¤Î¥Õ¥¡¥¤¥ë¤Ï
+Á°¤â¤Ã¤ÆÆɤ߹þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£¤½¤ì°Ê³°¤Î¤â¤Î¤Ï¡¢»ÈÍÑ»þ¤Ë¤³¤ì¤é¤Î¥Ç¥£¥ì¥¯¥È¥ê¤«¤é¡¢
+¼«Æ°Åª¤ËÆɤ߹þ¤Þ¤ì¤Þ¤¹¡£
+.LP 
+\f3/usr/local/lib/xemacs-$VERSION/etc\f1
+.br
+¤¤¤¯¤Ä¤«¤Î¾ðÊó¥Õ¥¡¥¤¥ë¡¢¥Ô¥Ã¥¯¥¹¥Þ¥Ã¥×¥Õ¥¡¥¤¥ë¡¢
+¥Ñ¥Ã¥±¡¼¥¸¤Ë»ÈÍѤµ¤ì¤ë¥Ç¡¼¥¿¥Õ¥¡¥¤¥ë¤Ê¤É¡£
+.LP
+\f3/usr/local/lib/xemacs-$VERSION/$CONFIGURATION\f1
+.br
+XEmacs ¤Ë»ÈÍѤµ¤ì¤ë¤µ¤Þ¤¶¤Þ¤Ê¥×¥í¥°¥é¥à¥Õ¥¡¥¤¥ë¡£
+.LP
+\f3/usr/local/lib/xemacs-$VERSION/$CONFIGURATION/DOC\f1
+.br
+Lisp ¥×¥ê¥ß¥Æ¥£¥Ö (´ðËÜ´Ø¿ô) ¤È \fBXEmacs\fP ¤Ë¤¢¤é¤«¤¸¤á
+Æɤ߹þ¤Þ¤ì¤¿ Lisp ´Ø¿ô¤Î¥É¥­¥å¥á¥ó¥Èʸ»úÎó¡£
+¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ï¡¢\fBXEmacs\fP ËÜÂΤΥµ¥¤¥º¤ò¸º¤é¤¹¤¿¤á¤Ë¤³¤³¤ËÊÝ´É
+¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
+.LP
+\f3/usr/local/lib/xemacs-$VERSION/etc/SERVICE\f1
+.br
+\fBXEmacs\fP ¥æ¡¼¥¶¡¼¤Î¤¿¤á¤Î¡¢³Ø½¬¡¢Êݼ顢°Ü¿¢¡¢
+¥«¥¹¥¿¥Þ¥¤¥º¤Ê¤É¤Î¤µ¤Þ¤¶¤Þ¤Ê¥µ¡¼¥Ó¥¹¤òÄ󶡤¹¤ë¿Í¡¹¤Ë¤Ä¤¤¤Æ¤Þ¤È¤á¤Æ¤¤¤Þ¤¹¡£
+.LP
+\f3/usr/local/lib/xemacs/lock\f1
+.br
+2 ¿Í¤Î¥æ¡¼¥¶¡¼¤¬ 1 ¤Ä¤Î¥Õ¥¡¥¤¥ë¤òƱ»þ¤Ë¹¹¿·¤Ç¤­¤Ê¤¤¤è¤¦¤Ë¡¢
+.BR XEmacs
+¤Ç¹¹¿·Ãæ¤Î¤¹¤Ù¤Æ¤Î¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ¤Ç¤­¤ë¥í¥Ã¥¯¥Õ¥¡¥¤¥ë¤òÊÝ»ý¤·¤Þ¤¹¡£
+.LP
+\f3/usr/local/lib/xemacs/site-lisp\f1
+.br
+¥í¡¼¥«¥ë¤ËºîÀ®¤¹¤ë Lisp ¥Õ¥¡¥¤¥ë¡£
+.LP
+\f3/usr/lib/X11/rgb.txt\f1
+.br
+Àµ¼°¤Î X ¥«¥é¡¼Ì¾¤¬¥ê¥¹¥È¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
+.PP
+.SH "»ÈÍѾå¤Îα°ÕÅÀ¤ÈÌ䤤¹ç¤ï¤»Àè"
+.B XEmacs
+¤Ë´Ø¤¹¤ë¥Ð¥°¤ä½¤Àµ¤ÎÊó¹ðÀè¤È¤·¤Æ¡¢¤Þ¤¿½õ¸À¤òµá¤á¤ë°¸Àè¤È¤·¤Æ¡¢
+comp.emacs.xemacs ¥Ë¥å¡¼¥¹¥°¥ë¡¼¥×¤¬¤¢¤ê¤Þ¤¹¡£
+¤¿¤À¤·¡¢ÌäÂêÅÀ¤ò¥Ð¥°¤È¤·¤ÆÊó¹ð¤¹¤ëÁ°¤Ë¡¢
+ËÜÅö¤Ë¤½¤ì¤¬¥Ð¥°¤Ç¤¢¤ë¤«¡¢¸í²ò¤ä°Õ¿ÞŪ¤Êµ¡Ç½¤Ç¤Ï¤Ê¤¤¤«
+¤È¤¤¤¦¤³¤È¤ò¤ª³Î¤«¤á¤¯¤À¤µ¤¤¡£¥Ð¥°¥ì¥Ý¡¼¥È¤ÎÊýË¡¤ä»þ´ü¤Ë¤Ä¤¤¤Æ¤Ï¡¢
+¥ê¥Õ¥¡¥ì¥ó¥¹¥Þ¥Ë¥å¥¢¥ë(¤Þ¤¿¤Ï Into ¥·¥¹¥Æ¥à) ¤Î¸åȾ¶á¤¯¤¢¤ë
+¡ÖReporting XEmacs Bugs¡×¤È¤¤¤¦¾Ï¤ò¤ªÆɤߤ¯¤À¤µ¤¤¡£
+¤Þ¤¿¡¢Êó¹ð¤¹¤ë¥Ð¥°¥ì¥Ý¡¼¥È¤Ë¤Ï¡¢Æ°ºîÃæ¤Î
+.B XEmacs
+¤Î¥Ð¡¼¥¸¥ç¥óÈÖ¹æ¤È¤½¤ì¤¬Æ°ºî¤·¤Æ¤¤¤ë¥·¥¹¥Æ¥à¤òµ­Æþ¤·¤Æ¤¯¤À¤µ¤¤¡£
+ºÇ¸å¤Ë¡¢¥Ð¥°¤Î¸¶°ø¤È¤½¤ì¤¬È¯À¸¤·¤¿¾õ¶·¤ò¡¢¤Ç¤­¤ë¤À¤±¤½¤Î¤Þ¤ÞÊݸ¤·¤Æ¤ª¤¤¤Æ
+¤¯¤À¤µ¤¤¡£¤½¤ÎÊݸ¾õÂÖ¤¬Îɤ±¤ì¤Ð´Êñ¤Ë½¤Àµ¤Ç¤­¤ë²ÄǽÀ­¤¬¹â¤¯¤Ê¤ê¤Þ¤¹¡£
+¤Ç¤­¤ë¤À¤±¤´¶¨ÎϤò¤ª´ê¤¤¤·¤Þ¤¹¡£
+
+¤³¤Î¥Ë¥å¡¼¥¹¥°¥ë¡¼¥×¤Ï¡¢xemacs@xemacs.org ¤È¤¤¤¦¥á¡¼¥ë¥ê¥¹¥È¤«¤é¤Îȯ¿®¡¢¼õ¿®¤ò
+ÁÐÊý¸þ¤Ë¹Ô¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¥Í¥Ã¥È¥Ë¥å¡¼¥¹¤Ë´Êñ¤Ë¥¢¥¯¥»¥¹¤Ç¤­¤Ê¤¤¤è¤¦¤Ê¾ì¹ç¤Ï¡¢
+newsgroup ¤ËÂå¤ï¤Ã¤Æ¥á¡¼¥ë¥ê¥¹¥È¤òÆɤळ¤È¤¬¤Ç¤­¤Þ¤¹¡£¥á¡¼¥ë¥ê¥¹¥È¤Ø¤ÎÄɲÃ
+¤´´õ˾¤ÎÊý¤Ï¡¢xemacs-request@xemacs.org ¤Ø¥á¡¼¥ë¤ò¤ªÁ÷¤ê¤¯¤À¤µ¤¤¡£
+(ľÀܥꥹ¥È¤Ë¥á¡¼¥ë¤òÁ÷¿®¤·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£)
+
+.B XEmacs
+¤ÎÊݼéôÅö¼Ô¤Ï¡¢Äê´üŪ¤Ë¥Ë¥å¡¼¥¹¥°¥ë¡¼¥×¤òÆɤó¤Ç¤¤¤Þ¤¹¡£¤½¤·¤ÆÊó¹ð¤µ¤ì¤¿
+¥Ð¥°¤ËÂФ·¤Æ¿×®¤Ë½¤Àµ¤ò¤¹¤ë¤è¤¦¤ËÅؤá¤Æ¤¤¤Þ¤¹¡£¤·¤«¤·¤Ê¤¬¤é¡¢¤¹¤Ù¤Æ¤Î
+¥á¥Ã¥»¡¼¥¸¤¬ÊݼéôÅö¼Ô¤«¤éÊÖÅú¤ò¼õ¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¤ï¤±¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£
+ÊݼéôÅö¼Ô°Ê³°¤Ë¿¿ô¤Î¿Í㤬¥Ë¥å¡¼¥¹¥°¥ë¡¼¥×¤òÆɤó¤Ç¤ª¤ê¡¢Ä̾ïÈà¤é¤«¤é¤â
+½Ð¤¯¤ï¤·¤¿ÌäÂê¤ò²ò·è¤¹¤ë¤¿¤á¤Î½õ¸À¤òÆÀ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
+
+¥Ë¥å¡¼¥¹¥°¥ë¡¼¥×¤«¤éÆÀ¤é¤ì¤ë¾ðÊó°Ê¾å¤Ë¡¢¾ÜºÙ¤Ê¥µ¥Ý¡¼¥È¤¬É¬Íפʾì¹ç¤Ï¡¢
+SERVICE ¥Õ¥¡¥¤¥ë(¾å½Ò)¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
+¤½¤Î¥Õ¥¡¥¤¥ë¤Ë¡¢Ã´Åö¼Ô¤¬¥ê¥¹¥È¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
+
+XEmacs ¤Î¥á¡¼¥ë¥ê¥¹¥È¤Ë¤Ä¤¤¤Æ¤Î¾ÜºÙ¤Ï¡¢
+.B /usr/local/lib/xemacs-$VERSION/etc/MAILINGLISTS
+¤Î¥Õ¥¡¥¤¥ë¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
+.SH "ÈóÀ©Ìó»ö¹à"
+.PP
+.B XEmacs
+¤Ï¡¢¥Õ¥ê¡¼¤Î¥½¥Õ¥È¥¦¥§¥¢¤Ç¤¹¡£
+.B XEmacs 
+General Public License ¤Ë½Ò¤Ù¤é¤ì¤Æ¤¤¤ë¸Â¤ê¤Ë¤ª¤¤¤Æ¡¢¤À¤ì¤Ç¤â
+.B XEmacs 
+¤ä¤½¤ì¤ËÉտ路¤¿¤â¤Î¤Î¥³¥Ô¡¼¡¢¤ª¤è¤Ó¥ê¥Õ¥¡¥ì¥ó¥¹¥Þ¥Ë¥å¥¢¥ë¤Ëɽ¼¨¤µ¤ì¤Æ¤¤¤ë
+ÆâÍƤΥ³¥Ô¡¼¤ò¡¢Ç¤°Õ¤Î¿Í¤ËÄ󶡤¹¤ë¤³¤È¤¬µö¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
+.PP
+.B XEmacs
+¤Ï¡¢UNIX ¥·¥¹¥Æ¥à¤ÎÇÛÉÛʪ¤È¤È¤â¤Ë¥Ñ¥Ã¥±¡¼¥¸¤µ¤ì¤ÆÄ󶡤µ¤ì¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¤¬¡¢
+.B XEmacs
+¤Ï¾ï¤Ë¤½¤ì¤é¤Î¥·¥¹¥Æ¥à¤Ë´Ø¤¹¤ë¥é¥¤¥»¥ó¥¹¤ÎÈϰϳ°¤Ç¤¹¡£¤â¤·
+.B XEmacs 
+¤â¤½¤Î¥é¥¤¥»¥ó¥¹¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ë¤È¤¹¤ì¤Ð¡¢¤½¤ì¤ÏÇÛÉÛµö²ÄÍ×¹à¤ËÈ¿¤·¤Þ¤¹¡£
+¤¤¤«¤Ê¤ë¿Í¤â
+.B XEmacs 
+¤ÎÇÛÉۤ˴ؤ·¤Æ¤Ï²¿¤ÎÀ©Ìó¤â¼õ¤±¤Æ¤Ï¤Ê¤é¤Ê¤¤¡¢¤È¤¤¤¦¤Î¤¬ 
+General Public License ¤ÎËÜÍè¤ÎÌÜŪ¤Ç¤¹¡£
+.SH "´ØÏ¢¹àÌÜ"
+.BR X (1),
+.BR xlsfonts (1),
+.BR xterm (1),
+.BR xrdb (1), 
+.BR emacs (1), 
+.BR vi (1)
+.SH "Ãø¼Ô"
+.PP
+.B XEmacs 
+¤Ï¡¢Chuck Thompson <cthomp@xemacs.org>¡¢Ben Wing <ben@xemacs.org>¡¢
+Jamie Zawinski <jwz@netscape.com>¡¢Richard Mlynarik <mly@adoc.xerox.com>¡¢
+Martin Buchholz <mrb@eng.sun.com> Â¾¡¢¤Ë¤è¤Ã¤Æ½ñ¤«¤ì¤Þ¤·¤¿¡£
+Free Software Foundation ¤Î Richard Stallman ¤Î½ñ¤¤¤¿ 
+.B "GNU Emacs "
+¥Ð¡¼¥¸¥ç¥ó 
+.I 19 
+¤ÎÁá´ü¥Ð¡¼¥¸¥ç¥ó¤ò¤â¤È¤Ë¤·¤Æ¤¤¤Þ¤·¤¿¤¬¡¢
+.B GNU Emacs 
+¤¬»ÈÍѲÄǽ¤È¤Ê¤Ã¤¿¸å¤Ç¤Ï¡¢¤½¤Î¸å³¥ê¥ê¡¼¥¹¤ËƱ´ü¤µ¤ì¤Æ¤¤¤Þ¤¹¡£
+¤â¤È¤â¤È¤Ï¡¢(º£¤ä¸ºß¤·¤Ê¤¤) Lucid, Inc. ¤Ë¤è¤Ã¤Æ½ñ¤«¤ì¤¿¤â¤Î¤Ç¡¢
+.B "Lucid Emacs "
+¤È¸Æ¤Ð¤ì¤Æ¤¤¤Þ¤·¤¿¡£
+.PP
+Chuck Thompson ¤¬
+.B XEmacs
+¤ÎºÆɽ¼¨¤Î´ðËÜÉôʬ¤ò½ñ¤­¡¢
+.B XEmacs
+¤Î FTP ¤È WWW ¥µ¥¤¥È¤òÊÝ»ý¤·¡¢
+¥Ð¡¼¥¸¥ç¥ó 19.11 (
+.B XEmacs 
+¤È¤è¤Ð¤ì¤¿ºÇ½é¤Î¥ê¥ê¡¼¥¹) ¤«¤é¤¹¤Ù¤Æ¤Î
+.B XEmacs 
+¤Îµ¡Ç½¤¬¥ê¥ê¡¼¥¹¤µ¤ì¤Þ¤·¤¿¡£
+Ben Wing ¤Ï¡¢¥¢¥¸¥¢¸À¸ì¤Î¥µ¥Ý¡¼¥È¡¢¥ª¥ó¥é¥¤¥ó¥Þ¥Ë¥å¥¢¥ë (¥Þ¥Ë¥å¥¢¥ë
+¥Ú¡¼¥¸¤È¿¤¯¤Î FAQ ¤ò´Þ¤à)¡¢³°Éô¥¦¥£¥¸¥§¥Ã¥È¥³¡¼¥É¤ò½ñ¤­¡¢Äã¥ì¥Ù¥ë¤À¤Ã¤¿
+.B XEmacs 
+¥µ¥Ö¥·¥¹¥Æ¥à¤Î¿¤¯¤Î´ðËÜÉôʬ¤ò¶¯²½¤·¡¢½ñ¤­Ä¾¤·¤Þ¤·¤¿¡£
+Jamie Zawinski ¤Ï¡¢
+.B "Lucid Emacs "
+¤Î½é´ü¥Ð¡¼¥¸¥ç¥ó (19.0) ¤«¤éºÇ½ª¥Ð¡¼¥¸¥ç¥ó (19.10) ¤Þ¤Ç¤Î¤¹¤Ù¤Æ¤ò
+¥ê¥ê¡¼¥¹¤·¡¢¤³¤ì¤é¤¹¤Ù¤Æ¤Î¥ê¥ê¡¼¥¹¤Î¼ç¥³¡¼¥É¹×¸¥¼Ô¤Ç¤·¤¿¡£
+Richard Mlynarik ¤Ï¡¢
+.B XEmacs 
+Lisp ¥ª¥Ö¥¸¥§¥¯¥È³ä¤êÅö¤Æ¥·¥¹¥Æ¥à¤ò½ñ¤­Ä¾¤·¤È¡¢¥­¡¼¥Þ¥Ã¥×¥³¡¼¥É¤È
+¥ß¥Ë¥Ð¥Ã¥Õ¥¡¥³¡¼¥É¤Î½¤Àµ¡¢¤½¤·¤Æ
+.B XEmacs 
+¤È
+.B GNU Emacs 
+¥Ð¡¼¥¸¥ç¥ó
+.IR 19 
+¤Î½é´ü¤ÎƱ´ü¤ò¹Ô¤¤¤Þ¤·¤¿¡£
+.PP
+¤½¤Î¾¿¤¯¤Î¿Í¤â¡¢Â¿Âç¤Ê¹×¸¥¤ò³¤±¤Æ¤­¤Þ¤·¤¿¡£¾ÜºÙ¤ÊÆâÍÆ(Ê̤δÑÅÀ
+¤«¤é¸«¤¿ \fBXEmacs\fP ¤ÎŤ¤Îò»Ë¤äÁ¯ÌÀ¤Ê²èÁü¡¢\fBXEmacs\fP ¹×¸¥¼Ô¤¿¤Á
+¤Î¿Íʪ¾Ò²ð¤Ê¤É)¤Ë¤Ä¤¤¤Æ¤Ï¡¢
+¥Ø¥ë¥×¥á¥Ë¥å¡¼¤Î¡ÖXEmacs ¤Ë¤Ä¤¤¤Æ¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£
+.SH "ÄɲþðÊó"
+\fBXEmacs\fP ¤ÎÄɲþðÊó¤Ë¤Ä¤¤¤Æ¤Ï¡¢
+¥Ø¥ë¥×¥á¥Ë¥å¡¼¤Î¡ÖXEmacs ¤Ë¤Ä¤¤¤Æ¡×(¾å½Ò)¤ò»²¾È¤¹¤ë¤«¡¢
+.B /usr/local/lib/xemacs-$VERSION/etc/NEWS
+¥Õ¥¡¥¤¥ë¤ò¤ªÆɤߤ¯¤À¤µ¤¤¡£¤Þ¤¿¤Ï Web ¥Ö¥é¥¦¥¶¤Ç
+.PP
+http://www.xemacs.org/
+.PP
+¤ò»ØÄꤷ¤Æ¤¹¤ë¤È¡¢\fBXEmacs\fP ¤Ë¤Ä¤¤¤Æ¤ÎºÇ¿·¾ðÊó¤¬ÆÀ¤é¤ì¤Þ¤¹¡£
+.PP
+.B XEmacs
+¤Ë¤Ä¤¤¤Æ¤Î FAQ (¤è¤¯¿Ò¤Í¤é¤ì¤ë¼ÁÌä) ¤â¡¢¤³¤Î URL ¤Ç¸«¤Ä¤±¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
+\fBXEmacs\fP Æâ¤Î Info ¥·¥¹¥Æ¥à¤«¤é¤Ï¡¢»ÈÍѲÄǽ¤Êµì¥Ð¡¼¥¸¥ç¥ó¤Ë
+¥¢¥¯¥»¥¹¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£
+.PP
+ºÇ¿·¥Ð¡¼¥¸¥ç¥ó¤Î \fBXEmacs\fP ¤Ï¡¢
+.B "ftp://ftp.xemacs.org/pub/xemacs/"
+¤Þ¤¿¤Ï¤ª¶á¤¯¤Î¥ß¥é¡¼¥µ¥¤¥È¤«¤éƿ̾ (anonymous) FTP ¤Ç
+¥À¥¦¥ó¥í¡¼¥É¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£
+°Ê²¼¤Ë¥ß¥é¡¼¥µ¥¤¥È¤Î°ìÍ÷¤òµ­½Ò¤·¤Þ¤¹¡£
+¤¿¤À¤·¡¢¥ß¥é¡¼¥µ¥¤¥È¤¬Êѹ¹¤µ¤ì¤Æ¥¢¥¯¥»¥¹¤Ç¤­¤Ê¤¤¾ì¹ç¤â¤¢¤ê¤Þ¤¹¡£
+.PP
+ftp://ftp.ai.mit.edu/pub/xemacs/
+.br
+ftp://ftp.uu.net/systems/gnu/xemacs/
+.br
+ftp://ftp.sunet.se/pub/gnu/xemacs/
+.br
+ftp://ftp.cenatls.cena.dgac.fr/pub/Emacs/xemacs/
+.br
+ftp://liasun3.epfl.ch/pub/gnu/xemacs/
+.br
+ftp://ftp.th-darmstadt.de/pub/editors/xemacs/
+.br
+ftp://audrey.levels.unisa.edu.au/xemacs/
+.br
+ftp://sunsite.doc.ic.ac.uk/gnu/xemacs/
+.br
+ftp://ftp.ibp.fr/pub/emacs/xemacs/
+.br
+ftp://uiarchive.cso.uiuc.edu/pub/packages/xemacs/
+.br
+ftp://ftp.technion.ac.il/pub/unsupported/gnu/xemacs/
+.br
+ftp://thphys.irb.hr/pub/xemacs/
+.PP
+¥ß¥é¡¼¥µ¥¤¥È¤ÎºÇ¿·¥ê¥¹¥È¤Ë¤Ä¤¤¤Æ¤Ï¡¢Web ¥µ¥¤¥È¤ò¤´Í÷¤¯¤À¤µ¤¤¡£
+
diff --git a/etc/xemacs.1 b/etc/xemacs.1
new file mode 100644 (file)
index 0000000..c07a7af
--- /dev/null
@@ -0,0 +1,791 @@
+.TH XEMACS 1 "1998 January 13"
+.UC 4
+.SH NAME
+xemacs \- Emacs: The Next Generation
+.SH SYNOPSIS
+.B xemacs
+[
+.I command-line switches
+] [
+.I files ...
+]
+.br
+.SH DESCRIPTION
+.I XEmacs
+is a version of
+.IR Emacs ,
+compatible with and containing many improvements over
+.I GNU
+.IR Emacs ,
+written by Richard Stallman of the Free Software Foundation.  It was
+originally based on an early release of
+.I GNU Emacs Version
+.IR 19 ,
+and has tracked subsequent releases of
+.I GNU Emacs
+as they have become available.
+.PP
+The primary documentation of
+.I XEmacs
+is in the
+.I XEmacs Reference
+.IR Manual ,
+which you can read on-line using Info, a subsystem of
+.IR XEmacs .
+Please look there for complete and up-to-date documentation.
+Complete documentation on using Emacs Lisp is available on-line
+through the
+.I XEmacs Lisp Programmer's
+.IR Manual .
+Both manuals also can be printed out nicely using the
+.I TeX
+formatting package.
+.PP
+The user functionality of
+.I XEmacs
+encompasses everything other
+.I Emacs
+editors do, and it is easily extensible since its
+editing commands are written in Lisp.
+.PP
+.I XEmacs
+has an extensive interactive help facility,
+but the facility assumes that you know how to manipulate
+.I XEmacs
+windows and buffers.
+CTRL-h enters the Help facility.  Help Tutorial (CTRL-h t)
+requests an interactive tutorial which can teach beginners the fundamentals
+of
+.I XEmacs
+in a few minutes.
+Help Apropos (CTRL-h a) helps you
+find a command given its functionality, Help Key Binding (CTRL-h k)
+describes a given key sequence's effect, and Help Function (CTRL-h f)
+describes a given Lisp function specified by name.  You can also
+look up key sequences in the
+.I XEmacs Reference Manual
+using Lookup Key Binding (CTRL-h CTRL-k),
+and look up Lisp functions in the
+.I XEmacs Lisp Programmer's Manual
+using Lookup Function (CTRL-h CTRL-f).  All of these help functions,
+and more, are available on the Help menu if you are using a window
+system.
+.PP
+.I XEmacs
+has extensive GUI (graphical user interface) support when running under
+a window system such as
+.IR X ,
+including multiple frames (top-level windows), a menubar, a toolbar,
+horizontal and vertical scrollbars, dialog boxes, and extensive mouse
+support.
+.PP
+.I XEmacs
+has full support for multiple fonts and colors, variable-width fonts,
+and variable-height lines, and allows for pixmaps to be inserted into
+a buffer. (This is used in the W3 web-browsing package and in some
+of the debugger and outlining interfaces, among other things.)
+.PP
+.IR XEmacs 's
+Undo can undo several steps of modification to your buffers, so it is
+easy to recover from editing mistakes.
+.PP
+.IR XEmacs 's
+many special packages handle mail reading (VM, MH-E and RMail) and
+sending (Mail), Usenet news reading and posting (GNUS), World Wide Web
+browsing (W3), specialized modes for editing source code in all common
+programming languages, syntax highlighting for many languages
+(Font-Lock), compiling (Compile), running subshells within
+.I XEmacs
+windows (Shell), outline editing (Outline), running a Lisp read-eval-print
+loop (Lisp-Interaction-Mode), and automated psychotherapy (Doctor).
+.PP
+There is an extensive reference manual, but users of other Emacsen
+should have little trouble adapting even without a copy.  Users new to
+Emacs will be able to use basic features fairly rapidly by studying
+the tutorial and using the self-documentation features.
+.PP
+.SM XEmacs Options
+.PP
+XEmacs accepts all standard X Toolkit command line options when run in
+an X Windows environment.  In addition, the following options are accepted
+(when options imply a sequence of actions to perform, they are
+performed in the order encountered):
+.TP 8
+.BI \-t " file"
+Use specified
+.I file
+as the terminal instead of using stdin/stdout.  This implies
+.BR \-nw \.
+.TP
+.BI \-batch
+Edit in batch mode.  The editor will send messages to stdout.  You
+must use the
+.BR \-l ,
+.BR \-f ,
+and
+.B \-eval
+options to specify files to execute and functions to call.
+.TP
+.B \-nw\
+Inhibit the use of any window-system-specific display code: use the
+current TTY.
+.TP
+.B \-debug\-init
+Enter the debugger if an error occurs loading the init file.
+.TP
+.B \-unmapped
+Do not map the initial frame.
+.TP
+.B \-no\-site\-file
+Do not load the site-specific init file (site-start.el).
+.TP
+.B \-q, \-no\-init\-file
+Do not load an init file.
+.TP
+.B \-no-early-packages
+Do not process the early packages.
+.TP
+.B \-vanilla
+Load no extra files at startup.  Equivalent to the combination of
+.B \-q
+,
+.B \-no-site-file
+, and
+.B \-no-packages
+\.
+.TP
+.BI \-u " user, " \-user " user"
+Load
+.IR user 's
+init file.
+.TP 8
+.I file
+Edit
+.IR file \.
+.TP
+.BI \+ number
+Go to the line specified by
+.I number
+(do not insert a space between the "+" sign and the number).
+.TP
+.B \-help
+Print a help message and exit.
+.TP
+.B \-V, \-version,
+Print the version number and exit.
+.TP
+.BI \-f " function, " \-funcall " function"
+Execute the lisp function
+.IR function \.
+.TP
+.BI \-l " file, " \-load " file"
+Load the Lisp code in the file
+.IR file \.
+.TP
+.BI \-eval " form"
+Evaluate the Lisp form
+.IR form \.
+.TP
+.BI \-i " file, " \-insert " file"
+Insert
+.I file
+into the current buffer.
+.TP
+.B \-kill
+Exit
+.I XEmacs
+(useful with
+.BR \-batch ).
+.PP
+.SM Using XEmacs with X
+.PP
+.I XEmacs
+has been tailored to work well with the X window system.
+If you run
+.I XEmacs
+from under X windows, it will create its own X window to
+display in.  You will probably want to start the editor
+as a background process
+so that you can continue using your original window.
+.PP
+.I XEmacs
+can be started with the following standard X options:
+.TP
+.BI \-geometry " ##x##+##+##"
+Specify the geometry of the initial window.  The ##'s represent a number;
+the four numbers are width (characters), height (characters), X offset
+(pixels), and Y offset (pixels), respectively.  Partial specifications of
+the form
+.I ##x##
+or
+.I +##+##
+are also allowed. (The geometry
+specification is in the standard X format; see
+.IR X (1)
+for more information.)
+.TP
+.B \-iconic
+Specifies that the initial window should initially appear iconified.
+.TP 8
+.BI \-name " name"
+Specifies the program name which should be used when looking up
+defaults in the user's X resources.
+.TP
+.BI \-title " title, " \-T " title, " \-wn " title"
+Specifies the title which should be assigned to the
+.I XEmacs
+window.
+.TP
+.BI \-d " displayname, " \-display " displayname"
+Create the
+.I XEmacs
+window on the display specified by
+.IR displayname .
+Must be the first option specified in the command line.
+.TP
+.BI \-font " font, " \-fn " font"
+Set the
+.I XEmacs
+window's font to that specified by
+.IR font \.
+You will find the various
+.I X
+fonts in the
+.I /usr/lib/X11/fonts
+directory.
+.I XEmacs
+works with either fixed- or variable-width fonts, but will probably
+look better with a fixed-width font.
+.TP
+.BI \-scrollbar\-width " pixels"
+Specify the width of the vertical scrollbars.
+.TP
+.BI \-scrollbar\-height " pixels"
+Specify the height of the horizontal scrollbars.
+.TP
+.BI \-bw " pixels, " \-borderwidth " pixels"
+Set the
+.I XEmacs
+window's border width to the number of pixels specified by
+.IR pixels \.
+Defaults to one pixel on each side of the window.
+.TP
+.BI \-ib " pixels, " \-internal\-border\-width " pixels"
+Specify the width between a frame's border and its text, in pixels.
+Defaults to one pixel on each side of the window.
+.TP
+.BI \-fg " color, " \-foreground " color"
+Sets the color of the text.
+
+See the file
+.I /usr/lib/X11/rgb.txt
+for a list of valid
+color names.
+.TP
+.BI \-bg " color, " \-background " color"
+Sets the color of the window's background.
+.TP
+.BI \-bd " color, " \-bordercolor " color"
+Sets the color of the window's border.
+.TP
+.BI \-mc " color"
+Sets the color of the mouse pointer.
+.TP
+.BI \-cr " color"
+Sets the color of the text cursor.
+.TP
+.B \-rv, \-reverse
+Reverses the foreground and background colors (reverse video).  Consider
+explicitly setting the foreground and background colors instead of using
+this option.
+.TP
+.BI \-xrm " argument"
+This allows you to set an arbitrary resource on the command line.
+.I argument
+should be a resource specification, as might as in your
+.I \.Xresources
+or
+.I \.Xdefaults
+file.
+.PP
+You can also set resources, i.e.
+.I X
+default values, for your
+.I XEmacs
+windows in your
+.I \.Xresources
+or
+.I \.Xdefaults
+file (see
+.IR xrdb (1)).
+Use the following format:
+.IP
+Emacs.keyword:value
+.PP
+or
+.IP
+Emacs*EmacsFrame.keyword:value
+.PP
+where
+.I value
+specifies the default value of
+.IR keyword \.
+(Some resources need the former format; some the latter.)
+.PP
+You can also set resources for a particular frame by using the
+format
+.IP
+Emacs*framename.keyword:value
+.PP
+where
+.I framename
+is the resource name assigned to that particular frame.
+(Certain packages, such as VM, give their frames unique resource
+names, in this case "VM".)
+.PP
+.I XEmacs
+lets you set default values for the following keywords:
+.TP 8
+.B default.attributeFont (\fPclass\fB Face.AttributeFont)
+Sets the window's text font.
+.TP
+.B default.attributeForeground (\fPclass\fB Face.AttributeForeground)
+Sets the window's text color.
+.TP
+.B default.attributeBackground (\fPclass\fB Face.AttributeBackground)
+Sets the window's background color.
+.TP
+.B \fIface\fB.attributeFont (\fPclass\fB Face.AttributeFont)
+Sets the font for
+.IR face ,
+which should be the name of a face.  Common face names are
+.PP
+.in +\w'right-margin'u+12n
+.ta \w'right-margin'u+4n
+.ti -\w'right-margin'u+4n
+FACE           PURPOSE
+.br
+.ti -\w'right-margin'u+4n
+default        Normal text.
+.br
+.ti -\w'right-margin'u+4n
+bold   Bold text.
+.br
+.ti -\w'right-margin'u+4n
+italic Italicized text.
+.br
+.ti -\w'right-margin'u+4n
+bold-italic    Bold and italicized text.
+.br
+.ti -\w'right-margin'u+4n
+modeline       Modeline text.
+.br
+.ti -\w'right-margin'u+4n
+zmacs-region   Text selected with the mouse.
+.br
+.ti -\w'right-margin'u+4n
+highlight      Text highlighted when the mouse passes over.
+.br
+.ti -\w'right-margin'u+4n
+left-margin    Text in the left margin.
+.br
+.ti -\w'right-margin'u+4n
+right-margin   Text in the right margin.
+.br
+.ti -\w'right-margin'u+4n
+isearch        Text highlighted during incremental search.
+.br
+.ti -\w'right-margin'u+4n
+info-node      Text of Info menu items.
+.br
+.ti -\w'right-margin'u+4n
+info-xref      Text of Info cross references.
+.TP 8
+.B \fIface\fB.attributeForeground (\fPclass\fB Face.AttributeForeground)
+Sets the foreground color for
+.IR face \.
+.TP 8
+.B \fIface\fB.attributeBackground (\fPclass\fB Face.AttributeBackground)
+Sets the background color for
+.IR face \.
+.TP 8
+.B \fIface\fB.attributeBackgroundPixmap (\fPclass\fB Face.AttributeBackgroundPixmap)
+Sets the background pixmap (stipple) for
+.IR face \.
+.TP 8
+.B \fIface\fB.attributeUnderline (\fPclass\fB Face.AttributeUnderline)
+Whether
+.I face
+should be underlined.
+.TP
+.B reverseVideo (\fPclass\fB ReverseVideo)
+If set to
+.IR on ,
+the window will be displayed in reverse video.  Consider
+explicitly setting the foreground and background colors instead
+of using this resources.
+.TP
+.B borderWidth (\fPclass\fB BorderWidth)
+Sets the window's border width in pixels.
+.TP
+.B internalBorderWidth (\fPclass\fB InternalBorderWidth)
+Sets the window's internal border width in pixels.
+.TP
+.B borderColor (\fPclass\fB BorderColor)
+Sets the color of the window's border.
+.TP
+.B cursorColor (\fPclass\fB Foreground)
+Sets the color of the window's text cursor.
+.TP
+.B pointerColor (\fPclass\fB Foreground)
+Sets the color of the window's mouse cursor.
+.TP
+.B geometry (\fPclass\fB Geometry)
+Sets the geometry of the
+.I XEmacs
+window (as described above).
+.TP
+.B iconic (\fPclass\fB Iconic)
+If set to on, the
+.I XEmacs
+window will initially appear as an icon.
+.TP
+.B menubar (\fPclass\fB Menubar)
+Whether the
+.I XEmacs
+window will have a menubar.  Defaults to true.
+.TP
+.B initiallyUnmapped (\fPclass\fB InitiallyUnmapped)
+Whether
+.I XEmacs
+will leave the initial frame unmapped when it starts up.
+.TP
+.B barCursor (\fPclass\fB BarCursor)
+Whether the cursor should be a bar instead of the traditional box.
+.TP
+.B title (\fPclass\fB Title)
+Sets the title of the
+.I XEmacs
+window.
+.TP
+.B iconName (\fPclass\fB Title)
+Sets the icon name for the
+.I XEmacs
+window icon.
+.TP
+.B scrollBarWidth (\fPclass\fB ScrollBarWidth)
+Sets the width of the vertical scrollbars, in pixels.  A width of 0
+means no vertical scrollbars.
+.TP
+.B scrollBarHeight (\fPclass\fB ScrollBarHeight)
+Sets the height of the horizontal scrollbars, in pixels.  A height of 0
+means no horizontal scrollbars.
+.TP
+.B scrollBarPlacement (\fPclass\fB ScrollBarPlacement)
+Sets the position of vertical and horizontal scrollbars.   Should be one
+of the strings "top-left", "bottom-left", "top-right", or "bottom-right".
+The default is "bottom-right" for the Motif and Lucid scrollbars and
+"buttom-left" for the Athena scrollbars.
+.TP
+.B topToolBarHeight (\fPclass\fB TopToolBarHeight)
+Sets the height of the top toolbar, in pixels.  0 means no top toolbar.
+.TP
+.B bottomToolBarHeight (\fPclass\fB BottomToolBarHeight)
+Sets the height of the bottom toolbar, in pixels.  0 means no
+bottom toolbar.
+.TP
+.B leftToolBarWidth (\fPclass\fB LeftToolBarWidth)
+Sets the width of the left toolbar, in pixels.  0 means no left toolbar.
+.TP
+.B rightToolBarWidth (\fPclass\fB RightToolBarWidth)
+Sets the width of the right toolbar, in pixels.  0 means no right toolbar.
+.TP
+.B topToolBarShadowColor (\fPclass\fB TopToolBarShadowColor)
+Sets the color of the top shadows for the toolbars. (For all toolbars,
+\fBnot\fR just the toolbar at the top of the frame.)
+.TP
+.B bottomToolBarShadowColor (\fPclass\fB BottomToolBarShadowColor)
+Sets the color of the bottom shadows for the toolbars. (For all toolbars,
+\fBnot\fR just the toolbar at the bottom of the frame.)
+.TP
+.B topToolBarShadowPixmap (\fPclass\fB TopToolBarShadowPixmap)
+Sets the pixmap of the top shadows for the toolbars. (For all toolbars,
+\fBnot\fR just the toolbar at the top of the frame.) If set, this
+resource overrides the corresponding color resource.
+.TP
+.B bottomToolBarShadowPixmap (\fPclass\fB BottomToolBarShadowPixmap)
+Sets the pixmap of the bottom shadows for the toolbars. (For all toolbars,
+\fBnot\fR just the toolbar at the bottom of the frame.) If set, this
+resource overrides the corresponding color resource.
+.TP
+.B toolBarShadowThickness (\fPclass\fB ToolBarShadowThickness)
+Thickness of the shadows around the toolbars, in pixels.
+.TP
+.B visualBell (\fPclass\fB VisualBell)
+Whether XEmacs should flash the screen rather than making an audible beep.
+.TP
+.B bellVolume (\fPclass\fB BellVolume)
+Volume of the audible beep.  Range is 0 through 100.
+.TP
+.B useBackingStore (\fPclass\fB UseBackingStore)
+Whether
+.I XEmacs
+should set the backing-store attribute of the
+.I X
+windows it creates.  This increases the memory usage of the
+.I X
+server but decreases the amount of
+.I X
+traffic necessary to update the screen, and is useful when the
+connection to the
+.I X
+server goes over a low-bandwidth line such as a modem connection.
+.TP
+.B textPointer (\fPclass\fB Cursor)
+The cursor to use when the mouse is over text.
+.TP
+.B selectionPointer (\fPclass\fB Cursor)
+The cursor to use when the mouse is over a mouse-highlighted
+text region.
+.TP
+.B spacePointer (\fPclass\fB Cursor)
+The cursor to use when the mouse is over a blank space in a buffer (that
+is, after the end of a line or after the end-of-file).
+.TP
+.B modeLinePointer (\fPclass\fB Cursor)
+The cursor to use when the mouse is over a mode line.
+.TP
+.B gcPointer (\fPclass\fB Cursor)
+The cursor to display when a garbage-collection is in progress.
+.TP
+.B scrollbarPointer (\fPclass\fB Cursor)
+The cursor to use when the mouse is over the scrollbar.
+.TP
+.B pointerColor (\fPclass\fB Foreground)
+The foreground color of the mouse cursor.
+.TP
+.B pointerBackground (\fPclass\fB Background)
+The background color of the mouse cursor.
+.PP
+.SM Using the Mouse
+.PP
+The following lists the mouse button bindings for the
+.I XEmacs
+window under X11.
+
+.in +\w'CTRL-SHIFT-middle'u+4n
+.ta \w'CTRL-SHIFT-middle'u+4n
+.ti -\w'CTRL-SHIFT-middle'u+4n
+MOUSE BUTTON   FUNCTION
+.br
+.ti -\w'CTRL-SHIFT-middle'u+4n
+left   Set point or make a text selection.
+.br
+.ti -\w'CTRL-SHIFT-middle'u+4n
+middle Paste text.
+.br
+.ti -\w'CTRL-SHIFT-middle'u+4n
+right  Pop up a menu of options.
+.br
+.ti -\w'CTRL-SHIFT-middle'u+4n
+SHIFT-left     Extend a selection.
+.br
+.ti -\w'CTRL-SHIFT-middle'u+4n
+CTRL-left      Make a selection and insert it at point.
+.br
+.ti -\w'CTRL-SHIFT-middle'u+4n
+CTRL-middle    Set point and move selected text there.
+.br
+.ti -\w'CTRL-SHIFT-middle'u+4n
+CTRL-SHIFT-left        Make a selection, delete it, and insert it at point.
+.br
+.ti -\w'CTRL-SHIFT-middle'u+4n
+META-left      Make a rectangular selection.
+.SH FILES
+Lisp code is read at startup from the user's init file,
+\fB$HOME/.emacs\fP.
+
+/usr/local/info - files for the Info documentation browser
+(a subsystem of
+.IR XEmacs )
+to refer to.  The complete text of the
+.I XEmacs Reference Manual
+and the
+.I XEmacs Lisp Programmer's Manual
+is included in a convenient tree structured form.
+
+/usr/local/lib/xemacs-$VERSION/info - the Info files may be here instead.
+
+/usr/local/lib/xemacs-$VERSION/src - C source files and object files.
+(May not be present.)
+
+/usr/local/lib/xemacs-$VERSION/lisp/* - Lisp source files and compiled files
+that define most editing commands.  The files are contained in subdirectories,
+categorized by function or individual package.  Some are preloaded;
+others are autoloaded from these directories when used.
+
+/usr/local/lib/xemacs-$VERSION/etc - some files of information, pixmap
+files, other data files used by certain packages, etc.
+
+/usr/local/lib/xemacs-$VERSION/$CONFIGURATION - various programs that are used
+with XEmacs.
+
+/usr/local/lib/xemacs-$VERSION/$CONFIGURATION/DOC -
+contains the documentation strings for the Lisp primitives and
+preloaded Lisp functions of \fIXEmacs\fP.
+They are stored here to reduce the size of \fIXEmacs\fP proper.
+
+.br
+/usr/local/lib/xemacs-$VERSION/etc/SERVICE - lists people offering
+various services to assist users of \fIXEmacs\fP,
+including education, troubleshooting, porting and customization.
+
+/usr/local/lib/xemacs/lock - holds lock files that are made for all
+files being modified in
+.IR XEmacs ,
+to prevent simultaneous modification of one file by two users.
+
+/usr/local/lib/xemacs/site-lisp - locally-provided Lisp files.
+
+/usr/lib/X11/rgb.txt - list of valid X color names.
+.PP
+.SH BUGS AND HELP
+There is a newsgroup, comp.emacs.xemacs, for reporting
+.I XEmacs
+bugs and fixes and requesting help.  But before reporting something
+as a bug, please try to be sure that it really is a bug, not a
+misunderstanding or a deliberate feature.  We ask you to read the section
+``Reporting XEmacs Bugs'' near the end of the reference manual (or Info
+system) for hints on how and when to report bugs.  Also, include the version
+number of the
+.I XEmacs
+you are running and the system you are running it on
+in \fIevery\fR bug report that you send in.  Finally, the more you can
+isolate the cause of a bug and the conditions it happens under, the more
+likely it is to be fixed, so please take the time to do so.
+
+The newsgroup is bidirectionally gatewayed to and from the mailing list
+xemacs@xemacs.org.  You can read the list instead of the newsgroup if
+you do not have convenient Usenet news access.  To request to be added
+to the mailing list, send mail to xemacs-request@xemacs.org. (Do not
+send mail to the list itself.)
+
+The
+.I XEmacs
+maintainers read the newsgroup regularly and will attempt to
+fix bugs reported in a timely fashion.  However, not every message will
+get a response from one of the maintainers.  Note that there are many
+people other than the maintainers who read the newsgroup, and will usually
+be of assistance in helping with any problems encountered.
+
+If you need more personal assistance than can be provided by the
+newsgroup, look in the SERVICE file (see above) for a list of people
+who offer it.
+
+For more information about XEmacs mailing lists, see the
+file /usr/local/lib/xemacs-$VERSION/etc/MAILINGLISTS.
+.SH UNRESTRICTIONS
+.PP
+.I XEmacs
+is free; anyone may redistribute copies of
+.I XEmacs
+to
+anyone under the terms stated in the
+.I XEmacs
+General Public License,
+a copy of which accompanies each copy of
+.I XEmacs
+and which also
+appears in the reference manual.
+.PP
+Copies of
+.I XEmacs
+may sometimes be received packaged with distributions of Unix systems,
+but it is never included in the scope of any license covering those
+systems.  Such inclusion violates the terms on which distribution
+is permitted.  In fact, the primary purpose of the General Public
+License is to prohibit anyone from attaching any other restrictions
+to redistribution of
+.IR XEmacs \.
+.SH SEE ALSO
+X(1), xlsfonts(1), xterm(1), xrdb(1), emacs(1), vi(1)
+.SH AUTHORS
+.PP
+.I XEmacs
+was written by
+Steve Baur <steve@xemacs.org>,
+Martin Buchholz <martin@xemacs.org>,
+Richard Mlynarik <mly@adoc.xerox.com>,
+Hrvoje Niksic <hniksic@srce.hr>,
+Chuck Thompson <cthomp@xemacs.org>,
+Ben Wing <wing@666.com>,
+Jamie Zawinski <jwz@netscape.com>,
+and many others.
+It was based on an early version of
+.I GNU Emacs Version
+.IR 19 ,
+written by Richard Stallman <rms@gnu.org> of the Free Software
+Foundation, and has tracked subsequent releases of
+.I GNU Emacs
+as they have become available.  It was originally written by Lucid, Inc.
+(now defunct) and was called
+.I Lucid
+.IR Emacs \.
+.PP
+Chuck Thompson wrote the
+.I XEmacs
+redisplay engine, maintains the
+.I XEmacs
+FTP and WWW sites, and has put out all releases of
+.I XEmacs
+since 19.11 (the first release called
+.IR XEmacs ).
+Ben Wing wrote the Asian-language support, the on-line documentation
+(including this man page and much of the FAQ), the external widget code,
+and retooled or rewrote most of the basic, low-level
+.I XEmacs
+subsystems.  Jamie Zawinski put out all releases of
+.I Lucid
+.IR Emacs ,
+from the first (19.0) through the last (19.10), and was the primary
+code contributor for all of these releases.  Richard Mlynarik rewrote
+the
+.I XEmacs
+Lisp-object allocation system, improved the keymap and minibuffer code,
+and did the initial synching of
+.I XEmacs
+with
+.I GNU Emacs Version
+.IR 19 \.
+.PP
+Many others have also contributed significantly.  For more detailed
+information, including a long history of \fIXEmacs\fP from multiple
+viewpoints and pretty pictures and bios of the major \fIXEmacs\fP
+contributors, see the
+.I XEmacs About Page
+(the About XEmacs option on the Help menu).
+.SH MORE INFORMATION
+For more information about \fIXEmacs\fP, see the
+.I XEmacs About Page
+(mentioned above),
+look in the file /usr/local/lib/xemacs-$VERSION/etc/NEWS,
+or point your Web browser at
+.PP
+http://www.xemacs.org/
+.PP
+for up-to-the-minute information about \fIXEmacs\fP.
+.PP
+The
+.I XEmacs
+FAQ (Frequently Asked Questions) can be found at the Web site just listed.
+A possibly out-of-date version is also accessible through the Info system
+inside of \fIXEmacs\fP.
+.PP
+The latest version of \fIXEmacs\fP can be downloaded using anonymous
+FTP from
+.PP
+ftp://ftp.xemacs.org/pub/xemacs/
+.PP
+or from a mirror site near you.  Mirror sites are listed in the file
+etc/FTP in the XEmacs distribution or see the Web site for an up-to-date
+list of mirror sites.
diff --git a/etc/xemacs.xbm b/etc/xemacs.xbm
new file mode 100644 (file)
index 0000000..bf70001
--- /dev/null
@@ -0,0 +1,142 @@
+#define xemacs_width 266
+#define xemacs_height 61
+static unsigned char xemacs_bits[] = {
+ 0x00,0xff,0xff,0x0f,0xf8,0xff,0x07,0xfc,0xff,0xff,0xff,0x7f,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0c,0x00,0xfc,0x60,0x00,0x78,
+ 0x30,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,
+ 0x6f,0x03,0x01,0xbe,0xc1,0x00,0xfe,0x7f,0x00,0x0f,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x40,0x80,0xff,0x0d,0x81,0xff,0x06,0x00,0x76,0xff,0x83,0x37,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xb6,0x16,0xc1,0x56,0x8b,0x01,0xdf,
+ 0xa5,0x86,0xae,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x5f,0xd5,0xe1,
+ 0xbf,0x95,0x00,0xbb,0x5e,0x8b,0xbb,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,
+ 0x00,0xd7,0xd5,0xf0,0xd5,0xea,0x00,0x6f,0xa3,0x8c,0x6f,0x05,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0xbf,0x6a,0xb8,0xaf,0x8a,0x00,0xdf,0xac,0x8a,0xdd,
+ 0x0a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x57,0x35,0xf8,0xb5,0xaa,0x80,
+ 0x6b,0x25,0xc8,0xaf,0x52,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x7e,0x15,
+ 0x6c,0xaf,0xd2,0x80,0xdf,0x55,0xcd,0xba,0x0a,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x02,0xae,0x1a,0xfe,0x55,0x45,0x80,0x6a,0x25,0xc8,0x57,0xa5,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x02,0x7a,0x0d,0xdb,0x2d,0x6a,0xc0,0x9f,0x0a,0xc1,
+ 0x6e,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xdc,0x87,0xff,0x56,0x41,
+ 0xc0,0x77,0x55,0xe0,0xb7,0x26,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0xbc,
+ 0xc3,0x57,0x95,0x64,0xc0,0xda,0x02,0x80,0xad,0x08,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x04,0xf8,0xc1,0xee,0x4a,0x21,0xc0,0x57,0xad,0x00,0xae,0x52,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe8,0xe0,0xbb,0x15,0x22,0xe0,0x6d,0x0d,
+ 0x00,0x70,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xf8,0xf0,0x57,0xaa,
+ 0x28,0x60,0xaf,0x66,0x01,0x80,0x9e,0x80,0x0f,0x00,0x1e,0x00,0x00,0x00,0x1f,
+ 0x70,0x00,0x00,0x80,0x0f,0x00,0x00,0x7e,0x20,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x70,0xb8,0xbd,0x09,0x31,0xe0,0xb5,0xe6,0x01,0xf0,0x07,0xe0,0x00,0x80,0x43,
+ 0x00,0x00,0xe0,0x41,0x1c,0x00,0x00,0xf8,0x60,0x00,0x80,0x03,0x3f,0x00,0x00,
+ 0x00,0x00,0x00,0x10,0x30,0x7c,0xaf,0x52,0x10,0x60,0x5b,0xf3,0x06,0x1e,0xc0,
+ 0x30,0x40,0xc0,0x00,0x00,0x00,0x38,0x00,0x06,0x03,0x00,0x0e,0x00,0x00,0xc0,
+ 0x00,0x80,0x01,0x00,0x00,0x00,0x00,0x10,0x00,0xf6,0x55,0x09,0x11,0xb0,0xad,
+ 0xf3,0x25,0x00,0xc0,0x1b,0xc0,0x61,0x00,0x03,0x00,0x0c,0x7e,0x82,0x0f,0x80,
+ 0x83,0x1f,0x02,0x60,0xf8,0x81,0x07,0x00,0x00,0x00,0x00,0x00,0x00,0xbe,0xaa,
+ 0x44,0x18,0xf0,0xab,0x71,0x2b,0x38,0xe0,0x0f,0x80,0x3e,0x00,0x0e,0x00,0x87,
+ 0xf7,0x80,0x2b,0xe0,0xe0,0x1f,0x0c,0x30,0xb8,0x83,0x16,0x00,0x00,0x00,0x00,
+ 0x20,0x00,0xff,0xad,0x12,0x08,0x70,0xff,0xf8,0x59,0x40,0xe0,0xc7,0x81,0x0f,
+ 0x07,0x36,0x80,0xc1,0x5f,0x81,0xdf,0x30,0x78,0x1d,0x1c,0x10,0xfc,0x86,0x6f,
+ 0x00,0x00,0x00,0x00,0x00,0x80,0xad,0x56,0x04,0x08,0xf0,0x1f,0xd8,0x56,0x63,
+ 0x60,0xf3,0x81,0xc6,0x07,0x5e,0xc0,0xe0,0xeb,0x81,0x6a,0x1d,0xec,0x0f,0xf8,
+ 0x18,0x6c,0x8b,0xb7,0x00,0x00,0x00,0x00,0x40,0xc0,0xdf,0xaa,0x10,0x09,0x00,
+ 0x00,0x78,0xab,0x28,0xf0,0xf9,0x81,0xe7,0x06,0xfa,0x62,0xb0,0xae,0xc1,0xdf,
+ 0x0e,0xbe,0x0a,0xa8,0x08,0xbc,0x8a,0x5a,0x01,0x00,0x00,0x00,0x40,0xc0,0x76,
+ 0x15,0x05,0x0c,0x00,0x00,0xd8,0x5d,0x25,0xf0,0xdc,0xc1,0xf3,0x07,0x5f,0x35,
+ 0xf8,0x5b,0xc1,0xb7,0x06,0xf7,0x0d,0x78,0x0f,0xfc,0xcd,0x5f,0x15,0x00,0x00,
+ 0x00,0x40,0x80,0xdb,0xaa,0x00,0x04,0xf8,0x0f,0x7c,0x2b,0x20,0x70,0xfe,0xc0,
+ 0xb9,0x03,0x6f,0x19,0xbc,0xb5,0xc1,0xaa,0x82,0x5f,0x13,0xfc,0x0c,0x54,0xd3,
+ 0xb5,0x12,0x00,0x00,0x00,0x40,0x80,0x5e,0x15,0x08,0x04,0xbc,0x76,0xec,0xaa,
+ 0x3a,0x30,0xaf,0xc0,0xec,0x02,0xdb,0x0e,0xec,0x5e,0xc1,0xdf,0x83,0xb6,0x0d,
+ 0x6f,0x03,0xf8,0xca,0x5f,0x49,0x00,0x00,0x00,0x60,0x00,0xb7,0xa2,0x02,0x04,
+ 0xec,0x5d,0xbc,0x55,0x11,0x98,0xfd,0x40,0xbe,0x03,0xbf,0x0d,0xbe,0xd5,0xe1,
+ 0xb5,0xc1,0x5f,0x95,0xb7,0x1d,0x50,0xd5,0x6a,0x05,0x00,0x00,0x00,0x30,0x00,
+ 0xaf,0x2a,0x00,0x06,0x7c,0x6b,0xee,0x2e,0x12,0xd8,0xd7,0x60,0xee,0x83,0xae,
+ 0x06,0xf7,0xaa,0x60,0xd7,0xc0,0xd7,0x4a,0xfe,0x16,0xf0,0x16,0xaf,0x52,0x00,
+ 0x00,0x00,0x18,0x00,0xbb,0x08,0x01,0x02,0xac,0x56,0xbe,0x52,0x18,0x48,0x7f,
+ 0x20,0xbb,0x81,0xbb,0x02,0x5f,0xab,0xe0,0xed,0xe0,0x3a,0x11,0xa8,0x09,0xe0,
+ 0xa9,0x58,0x0a,0x00,0x00,0x00,0x0c,0x01,0x7e,0x47,0x00,0x02,0xfe,0x6b,0x6e,
+ 0x97,0x1a,0xe4,0x55,0x80,0x6f,0x81,0xd7,0x83,0xb7,0xd5,0x60,0x77,0xe0,0xd7,
+ 0x4a,0x41,0x16,0xc0,0x16,0x50,0x91,0x00,0x00,0x00,0x06,0x03,0xae,0x08,0x00,
+ 0x03,0x5a,0x55,0xda,0x2a,0x09,0xb4,0x6f,0xd0,0xdd,0x81,0x5d,0x81,0x5d,0x55,
+ 0xb0,0x75,0xb0,0xad,0x12,0x80,0x68,0xc0,0x55,0x41,0x49,0x00,0x00,0x00,0x82,
+ 0x03,0xfa,0x4b,0x00,0x01,0xfe,0x2a,0x7f,0x55,0x08,0xf8,0x75,0xc0,0xb7,0xc1,
+ 0xef,0xc1,0xef,0x6a,0xf0,0x2f,0x70,0xb7,0x44,0x00,0x0a,0x80,0xab,0x04,0x04,
+ 0x00,0x00,0x00,0xc3,0x03,0x5c,0x15,0x00,0x01,0x56,0x17,0xd7,0x4a,0x09,0x68,
+ 0x2f,0x60,0xef,0xc0,0xd6,0xc0,0xad,0x35,0x70,0x35,0xf0,0xad,0x12,0x00,0x10,
+ 0x00,0x2f,0x01,0x10,0x00,0x00,0x80,0xe1,0x06,0x7c,0x45,0x00,0x01,0xff,0x4a,
+ 0x7c,0x2b,0x0c,0xfc,0x35,0xe0,0xab,0xc0,0xfb,0xc0,0x77,0x25,0xd0,0x3b,0xe0,
+ 0xaa,0x04,0x00,0x00,0x01,0x56,0x02,0x00,0x00,0x00,0xc0,0xf0,0x03,0xe8,0x2a,
+ 0x81,0x01,0xab,0xaa,0xa0,0x4a,0x05,0xac,0x2a,0xb0,0xdd,0xc0,0x56,0x60,0xad,
+ 0x3a,0x78,0x1d,0xb8,0x2b,0x91,0x00,0x00,0x00,0x5c,0x11,0x00,0x00,0x00,0x60,
+ 0xd8,0x0e,0xb8,0x15,0x80,0x00,0xbf,0x55,0x00,0x2b,0x04,0xfc,0x37,0x70,0xd7,
+ 0xe0,0x6f,0xe0,0xb7,0x1a,0xf8,0x17,0xf8,0x56,0x09,0x00,0x00,0x00,0x74,0x05,
+ 0x00,0x00,0x00,0x30,0xfc,0x0d,0xf8,0xaa,0x80,0x00,0x5b,0x25,0x02,0x93,0x04,
+ 0xb6,0x1a,0xf8,0x55,0xa0,0x6d,0xa0,0xad,0x0c,0x58,0x19,0xb8,0x2b,0x02,0x00,
+ 0x00,0x04,0x5c,0x09,0x00,0x00,0x00,0x10,0xfe,0x06,0xb0,0x2b,0x80,0x80,0xb7,
+ 0x95,0x80,0x59,0x06,0x7e,0x15,0x68,0x6d,0xe0,0x37,0xf0,0x6b,0x0d,0xfc,0x1e,
+ 0x78,0xad,0x08,0x40,0x00,0x00,0xbc,0x05,0x00,0x00,0x00,0x18,0xae,0x1b,0xf0,
+ 0x96,0xc2,0x80,0xdd,0x4a,0x82,0x78,0x02,0xeb,0x1a,0xf8,0x6b,0x60,0x2d,0x70,
+ 0x9d,0x06,0xec,0x15,0xe8,0x55,0x41,0x60,0x00,0x08,0x78,0x15,0x00,0x00,0x00,
+ 0x0c,0x7f,0x0d,0xe0,0x57,0x40,0x80,0x6f,0x25,0xc0,0xbc,0x03,0x5f,0x1d,0x6c,
+ 0x6d,0xf0,0x37,0xf0,0x6b,0x13,0xbc,0x16,0x78,0x2b,0x02,0x20,0x03,0x00,0xd8,
+ 0x4a,0x00,0x00,0x00,0x86,0xdb,0x32,0xc0,0xaa,0x40,0xc0,0xb6,0x4a,0x61,0xec,
+ 0x03,0xbb,0x0a,0xbc,0x35,0xd0,0x2b,0x50,0x9b,0x09,0xec,0x1d,0xd8,0xaa,0x18,
+ 0x20,0x0f,0x10,0x78,0x2b,0x01,0x00,0x00,0xc3,0xbf,0x2d,0xe0,0x37,0x45,0xc0,
+ 0x5d,0x15,0x30,0x7e,0x81,0xdf,0x0d,0x7c,0x2b,0xf0,0x39,0xf0,0xd6,0x09,0x7c,
+ 0x04,0x78,0x57,0x18,0x20,0x3e,0x10,0xb0,0x55,0x00,0x00,0x80,0x61,0x75,0x15,
+ 0x80,0xad,0x60,0xc0,0xb7,0x4a,0x18,0xba,0x81,0xad,0x0e,0xee,0x2a,0xf8,0x3c,
+ 0xf0,0xed,0x0c,0x3e,0x2f,0xd0,0x8a,0xce,0x20,0xaa,0x10,0xf8,0x8a,0x00,0x00,
+ 0xc0,0xe0,0xaf,0x4a,0xc0,0x57,0x24,0xc0,0xd6,0x22,0x0e,0xee,0x81,0x77,0x05,
+ 0x7a,0x3b,0x68,0x3c,0xb0,0x76,0x0e,0x9a,0x3b,0xf0,0x55,0xe7,0x23,0x7e,0x11,
+ 0x6c,0x2b,0x01,0x00,0x60,0xf0,0xdb,0x6a,0x80,0x5d,0x31,0xc0,0x6f,0x95,0x03,
+ 0xdf,0xc1,0xad,0x06,0xae,0x1a,0x78,0x36,0xe0,0x3d,0x07,0xce,0x1f,0x60,0xab,
+ 0x71,0x2f,0x54,0x1d,0xbc,0x55,0x04,0x00,0x30,0xd0,0x6e,0x65,0x80,0xaf,0x1a,
+ 0xc0,0xab,0xfa,0x00,0xb7,0xc0,0x6f,0x05,0xff,0x15,0x18,0x7f,0xc0,0x8f,0x07,
+ 0xc6,0x76,0xe0,0xee,0xf8,0x2b,0xfc,0x0a,0x7e,0x2d,0x01,0x00,0x1c,0xf0,0x95,
+ 0x32,0x00,0xbb,0x1c,0x80,0xff,0x0f,0x80,0xdf,0x40,0x5b,0x07,0xab,0x1a,0x80,
+ 0x56,0x00,0xc0,0x05,0xe0,0x5b,0x80,0x3f,0xac,0x36,0xa8,0x0e,0xdb,0x93,0x04,
+ 0x00,0x07,0xe0,0x6f,0x1f,0x00,0xdc,0x07,0x00,0x00,0x00,0x80,0xf5,0xc0,0xb7,
+ 0x02,0x7f,0x05,0xc0,0x7f,0x00,0xf0,0x07,0x70,0x57,0x00,0x00,0xff,0x1b,0xe0,
+ 0x83,0x77,0x55,0x01,0x00,0x00,0x00,0x54,0x01,0x00,0xa0,0x00,0x00,0x00,0x00,
+ 0x80,0x5f,0xe0,0xad,0x02,0xab,0x15,0xf0,0xd5,0x00,0xb8,0x03,0xfc,0xad,0x02,
+ 0xc0,0x5b,0x9d,0x03,0xc0,0xdf,0x8a,0x04,0x00,0xfc,0xff,0xaf,0xfc,0xff,0xff,
+ 0xfe,0xff,0xff,0xff,0xff,0x57,0x7f,0x5b,0xf9,0xbf,0x2a,0xbc,0xbe,0x06,0xef,
+ 0x0e,0x6f,0x6b,0x19,0xf8,0xf7,0x8a,0x1e,0xfc,0x56,0x55,0x00,0x00,0x60,0x57,
+ 0xbf,0x62,0x57,0xed,0xfb,0x5d,0x77,0xff,0x7f,0xbd,0xf6,0xad,0x64,0x6d,0x45,
+ 0xdf,0x55,0xf1,0xbf,0xf5,0xbf,0x9d,0xe2,0x5f,0x5f,0xd5,0xfb,0xdf,0xbb,0x2a,
+ 0x05,0x00,0x80,0xfa,0xea,0x88,0xf5,0xb7,0xae,0xee,0xda,0xab,0x56,0x6f,0x51,
+ 0xab,0x82,0xb7,0x2a,0xf4,0xae,0x4a,0x6d,0x9b,0xed,0xaa,0x8a,0xf6,0xaa,0x2a,
+ 0x57,0xf7,0x6e,0x45,0x00,0x00,0x00,0xaa,0xad,0x05,0x9a,0xda,0x2a,0x59,0xab,
+ 0xda,0xea,0xd2,0x4a,0x5b,0x09,0xac,0x88,0x50,0xab,0x24,0xdb,0x2a,0x5a,0x2b,
+ 0x21,0xda,0x55,0xa5,0xac,0x5a,0x55,0x89,0x02,0x00,0x00,0x50,0x55,0x05,0x68,
+ 0x55,0x55,0xa4,0xaa,0xaa,0x2a,0x2d,0x15,0x55,0x15,0x50,0x27,0x80,0xa9,0x12,
+ 0x68,0xab,0xb2,0x55,0x0a,0xb0,0xb6,0x12,0xf0,0x6a,0xab,0x2a,0x08,0x00,0x00,
+ 0x40,0x4a,0x2a,0x80,0xa4,0xa4,0x92,0x94,0xa4,0x54,0x52,0x49,0x90,0x40,0x80,
+ 0x48,0x00,0x96,0x48,0x40,0x55,0x44,0x8a,0x00,0x40,0x95,0x48,0x00,0x49,0x95,
+ 0x48,0x00,0x00,0x00,0x00,0x21,0x01,0x00,0x12,0x22,0x40,0x22,0x12,0x02,0x21,
+ 0x12,0x20,0x15,0x00,0x22,0x02,0x20,0x05,0x80,0x08,0x01,0x52,0x14,0x00,0x49,
+ 0x12,0x00,0x12,0x24,0x05,0x00,0x00,0x00,0x00,0x04,0x24,0x00,0x40,0x88,0x02,
+ 0x88,0x40,0x28,0x04,0x40,0x00,0x00,0x00,0x08,0x00,0x40,0x10,0x00,0x24,0x04,
+ 0x04,0x01,0x00,0x24,0x41,0x02,0x20,0x90,0x10,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x00,0x20,0x00,0x80,0x00,0x00,
+ 0x02,0x00,0x80,0x00,0x50,0x00,0x00,0x00,0x04,0x00,0x80,0x00,0x80,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
+ 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x00,0x00,0x00,
+ 0x00,0x01,0x00,0x00};
diff --git a/etc/xemacs.xpm b/etc/xemacs.xpm
new file mode 100644 (file)
index 0000000..2593990
--- /dev/null
@@ -0,0 +1,177 @@
+/* XPM */
+static char *noname[] = {
+/* width height ncolors chars_per_pixel */
+"388 145 25 1",
+/* colors */
+"` c #787879",
+"a c #686869",
+"b c #A6AAF5",
+"c c #585859",
+"d c #484849",
+"e c #09090B",
+"f c #5256D7",
+"g c #989CEA",
+"h c #363ACC",
+"i c #C7C8CF",
+"j c #282829",
+"k s None c None",
+"l c #13154C",
+"m c #7074DF",
+"n c #D9D9DB",
+"o c #232788",
+"p c #383838",
+"q c #4249D0",
+"r c #B6BAF9",
+"s c #868AEB",
+"t c #A8A8A9",
+"u c #989899",
+"v c #6266DB",
+"w c #888889",
+"x c #B9B9B9",
+/* pixels */
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkknkkkkkkknkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkknikkkknninkkkkkkkkkkknninnnkkkkkkkkkinkkikkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkknknkkkkkkkkkknkkkkkkkknkkkkkknkkkkknkknkkkkkkkkkkkxkkkkkkknkkkkkkknkkkknknkkkkkkknkkkkknknnkkkkkkkkknkkknkkkkknkkkkkkkkkkkkknkkkkkkkkkkkkknkkkkkkkknkkkkkknkkkkknkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkknnkknnnnikkkkkkkkkknnnnkkknnnnnkkkinnikkkkkinnkkkkkkkkkkikkkkkkknkkkkkkknnkkkkkkkkkkkinnnnkkknnnkkkkkkkkkknnninnkknnnnnkkknnninkkinnnnkkkkkkkkkkinnnkkknnnnnkknnnnnkkknkxnkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkknkkknkkniiiinkknkkknkknkkknkknkkkknkknxkkkkkkkkkkkkkkkkkkkkknkkkkkkiinnkkkknkkkknnnnnxkkkkxkkkkniiiinknnknknkknkkkkkknkkkknknnnnnikkiiiiikkknkknkknkkkknkknkkkknkknikkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkknkkkkkkkkkknkkknkknkkkknknkkkknkknnikkkkkkkkkkkkkkkkkkkknkknkkikkknkkkknkkkknnnknnkkkxkikkkkkkkkkknnknknkknkkkknknkkkknkinnnnnkkkkkkkkkknkknkknkkkknkknkkkknkkinnkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkknnkknkkkxkkkkkkkkkknkkknkkinkkikknnkknnkknkkikkkkkkkkkkkkkkkkkkknkknkkikknnkkkknkkkkkxkkkkkkikkkikkkkkkkkknnknknkknnknxkknnkkinkkxkkkkkkkkkkkkkknkknkkkikknikkinkkikkknknnkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkknkknkkninnikkkkkkkknxkkixkkkixxnkkknxxnkkiikkxxkkkkkkkkkkkkkkkknxxxxxkknxxkxnkkixxnkkkkxxikknxiknxnkkkkkkknxikxknnkkixikkkknxikxnkkixikkkkkkkkkkixkkxxkkkixnkkkkixxkkkxnknxikkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkknkkknkkkkkkkkknknkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkknkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkknkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkknkkkkkkkkkkknkkkkkknkkkkkkkkkkkknkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkknkkkkkkkkknkknkkkkkkkkkkkkknkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkknkkkkkkkkkkknkknkkkkkkkkkkkkknkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkknknkkkkkkkkkkkknkkkkkkkkkknkknkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkknkkkkkkkkkknkkkkkkkkkknkknkkkkkkkkkkknkkkkkkkkkkkkkkknkkkkkkkkknkkkknkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkknkkkkkkkkkkkkkknkkkkkkkkkkkknkkkkkkkkkkkkknkkkkkkkkkkkkkknkkkkkkkkknkkkknkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkknknkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknknkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkknknknkkkkknkknkkkkkkkkkkkkkknkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknknkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkknknkkkkkknkknkkkkkkkkkkkkkknknknkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknknkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkknkkkkknkknkkkkkkkknkkkkkkkkkkkkkkkkknkkkknkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkknknkkknkkkkkkknknknkkkkknkknkknkknkknkkkkkkkknkkkkkkkkkkkkkkkkknkkkkkkkknknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkknkkkkknkkknkknkkkkkkkknknknkkkkkkkknkkkkknkknkkkkkkkknkkkkkkkkkkkkkkkkknkkkkkkkknknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkknkknknknkknkkkkkkkkkkkkkkkkkkkkkknkkkknkkkknkknuunnkknkkkknkkknkkkkntkkkkkkkkkkiikkkkkkknkkkkkknkkkknnkkkknnkkknkkkkkkkkkkkkkkkknkknkknkkknknkkkknkkkkkkkkkkkkkkknkknkknkkkkkkknkknkknknkknknkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkknkkkkkkkkkkkknkkkkkkkkkkkkkkkkknkknknkkkknkkkkkknkkkkkkkkkkkkkkknkknkknkkkkkkknkknkknknkknknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkknkknkkkknkkkknkkkkkkkkkkkknkkkkkkkkkknktnkkkkiknkkkknkkkkkkkkkkkkikkkkkkkkkkkinkkknkkkkknkkkknknkkukkkktkknkknkkkkkkknknkknkkkknknknknkkkkkkkkkkkkkkkkkkkknkkkkkkkkkknkknkkkknkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkknkknkkkknkkknknkkknknknkkkkkknknknkknkkkknkknknkknkkkkkkkkkkkkkkkkknkkkkkkkkkknkknkkkknkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkknkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkknknkkkkkknknkkkkkkkknkknkkknkkkkkknkkkkkkkkktkkkknikkknnkixnknininnnkkxkninkkkkiikikknniikkkkknkkkkkkkxnknkkiikkknknkkkkkkknkkkknkknkkkkkknknknkkkkknkknkkknkkkkkknkkkkkkkkkkkkkkkknkknkknkkknkkknkkkkkkkkkkkkkkkkkkkkkknkkkkknkknkkkknkkkkknkkkkknkkkkkkkknkkknkknknkkkkknkknkkkkkknkknkkknkkkkkknkkkkkkkkkkkkkkkknkknkknkkknkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkknkknnknkkknnkkkkkkknkkkkkkkkknkkknkkkkkkknnknkkkxnkkkknixtkkxuxuxxikitxiukkktiiuxkknixxikkkkknkkknkktkkkkkktkkkkkkkkkkknkkknknkkkknknknkkknkkkkkkkknkkkkkkkkknkkknkkkkkkkkkknknknkkknkkknkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkknkknkkkkkknkkkkknkknkknknnkkknkkkkkkkknkkkkkkkkknkkknkkkkkkkkkknknknkkknkkknkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkknkkkkkkkkkkkknkkkkkkkkknknkknkkknkkknknkknknkkkxkkkkkkxknknkiuuukknukxkkxkxnkkktkikkkkxkkktutikknkkknknkkkxknknkkxnknkknknkkkkknkkkknknkkkkknkkkkkkkkkknknkknkkknkkknknkknknkkkkkkkkkkknnkkknkkknkkknkkknkkkkkkkkkkkkkkkkkkkkkkknkknkknkkknknknknkkkkkkknkkkkkknnkkkkkkkknkkknkkkkkkkkknknkknkkknkkknknkknknkkkkkkkkkkknnkkknkkknkkknkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknknkkkkkkkknkkkkkkkkknknkkkkkxkkkknkxknkkntnktnkkwkxkkxkxkkkkxkxkkkkxkkxnknxkkkkkkkkknkkxnkkkkkxkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknknkkkkkkkkknkkkkkkkknkkkkkknkkkkknkkknknkkknkkknkkkkkkknkkkkkkkkkkkkkkkknkkkkkkkkkkknkkknkkkkknkknkkkknkkkkkkkkkknkkkkkkkkkkkkknknkkkkkkkkknkkkkkkkknkkkkkknkkkkknkkknknkkknkkknkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkknnknnkxknkknxkknkxkkkwknkwkxkkxkxunkxnkntkkttkktkkixkkkknkkkknkktkknknnxkknkknknknkkkkkknkkkknknkkkkkkkkkknkkkkkkkkkkkkkkkkkkkknknkknkknkkknkkkkkkkkkknkkkknknkkkknkkkkkkkkkkkkkkkkkkkknkknkknknkkknkkkkkkkkknkknkkkkkkknkkknkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkknknkknkknkkknkkkkkkkkkknkkkknknkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkknkkkkunkkxwwwwikkuwunwkwwktikwnwnwwnkkknwwittkiwwnwnnkkkknkkkkkntkkkktnnkknkkkknknknnnnnnnnnnnnnkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkknnkkkkkknkknnkknkkknkknknkkkknkkkkkkkkkkknknkkkkkknkkkkkkkkkkkknkknknnnknknkkknknknknnkkknknknknkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkknnkkkkkknkknnkknkkknkknknkkkknkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkrrrrrrrrrbrrrrrrbrrrrrrrrrrrrrikinnkkknirrrrrrrrbrbrbrrbrrriknkkkkkkrrrrrrrrrrrrrrbrrrbrbrrrrbrrrrrrrrrrrrrrrrrrssssssgsggbkkkkkkknkkkkkkkkkknknkknkkkkkknkkkkkkknkkkkknknkkkkkkkkknknkkknknknkkkkkkkkknkkknkknknknknknkkknknkkkknknkknkknknkknkknknkkkkkkkkkkkkkknkkkkkkkkkknknkknkkkkkknkkkkkkknkkkkknknkkkkkkkkknknkkknknknkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkrhhhqhhhhhhhhhhhhhhhhhhhhhhhhhhmkkknkkkivhhhhhhhhhhhhhhhhhhhmknknkkkrhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhtnknkkkknnkkkkkkkkkkkkknkkkkkkknkkknkkknknkkkkknknkkkkkkknnnkknkkkknknkkkknkknkkkkkkkkkkkkkknkkknknnkknknkkknkknknkkkkkkkkkkknknnkknkkkknnkkkkkkkkkkkkknkkkkkkknkkknkkknknkkkkknknkkkkkkknnnkkknkkknknkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkknknknkkihhhhhhhhhhhhhhhhhhhhhhhhhhhhhhodknkkkknvhhhhhhhhhhhhhhhhhhhockkkkkkihhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhoenkkknnkkkkknkknknkknkknknnknkkkkkkkkkknkknkknkkkkknknkkkkkknkknknkkkkkkkkkkkkknnkknknknnkknknknkkkknkknknkkkkknkknnnkknnkkknkknknkkknnkkkkknkknkkknknkknnnkkkkkkkkkkkknkknkknkkkkknknkkkkkknkkkknkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkknkkknkkmohhhhhhhhhhhhhhhhhhhhhhhhhoooldkknknkkbhohhhhhhhhhhhhhhhholdnknnkkkmohhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhlcnknknkkkkknkkkkkkknknknknkkkkkkknkknnkkkknkkkknnkkkkkkknknkknkkkkknknnkkkkknkkknnkkkkkknknkknknknknknknknknknkknkkknkkkknnkknknknknknkkkkknkkkkknknkknkkknknkkkknkknnkkkknkkkknnkkkkkkknknknnknkkknknnkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkknkknkkkdpllhhhhhhhhhhhhhhhhhhholeepddwnkknknkkwdddqhhhhhhhhhhooeepwknkkknkkddjeoqhhhhhhhhhhhhhhhhhhleeeeeeelloohhhhhhhhhhhhhhhhl`nnnnknknknknnknknkknkkkkkknkknkkkkkkknknkkkkkkknnnknknkkknnkkknnnkkkkkkknkkkknkkknkkkkkkkknknkkknkkkknkkknkkknknkknnknkkkkkkkknknknkkknknknknknkkkknkkkkkkkkknkkkkkkknknkkkkkkknnnknknkkknkkkknknkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkknkx`fhhhhhhhhhhhhhhhhledtnnknnnnnnnnnkkkknshhhhhhhhhlej`nnnnniknknkkkkknghhhhhhhhhhhhhhhhoel`xnninitwudplohhhhhhhhhhhhheunnnnnnnknknkknkknnnkkknknkkkkkkkkkknkknkknnnkkkkkkkkkkkkkkkknkkkknnknkkkkkkkkkkkkknkkknkkkkkknnkkkknkkknknnnkkkkkkkkknkkknknkkkkkkknkkknknknknknnnnknknnknkkkkkkkkknkknkknnnkkkkkkkkkkkkknknkkknknnknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknknnmhhhhhhhhhhhhhhhlcxxiixixxxxiinnnkkkighhhhhhhheeaxxxxxxxiiinnknkknnivhhhhhhhhhhhhhhhejxxixxxxxxxxxii`dohhhhhhhhhhoetxtxxinnnnknknknknknnnknkknknkkkknkkkknknnkkkkkkkknkkknkknknknknknkknknknnkkkkknkkkknkkknnknknkkknkkkknknkkknknknknkkkknkkkkkknknkkkkkkkkknknknkknknnknkkknknkkknkkkkknknnkkkkkkkknkkknkknkknknkkkkknkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkknkkkkknkkkkkkkkkkkkknirfhhhhhhhhhhhhhhecuuwwuuuuuuutxnnnkkrvhhhhhhoeewuwwwuuuuutxxnnknkknrvhhhhhhhhhhhhhhoewwuwuuuwuuwuwuuuuwdqhhhhhhhhoew`wwwuxnnnkknkkknknknknknkkkkknnkknkkkknknnknnknkkkkknkkkkkkkknknkkkkkkkkknknkkkknkkkkkkknkknkknkkknknkkknnknnnkknkkkknknkkknkkkkknkkkkknkkkknkkknkknnknnkkkkknkknknkkknknnknnknkkkkknkkkkkkkkknnnkkknkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkknknitshhhhhhhhhhhhhhlcccccaaaa``wuxinnkrbhhhhhhoejdccaacacaaa`utxnnkknnrvhhhhhhhhhhhhhhllccaccaaaaaaaaaaaaaaaqhhhhhhhljcdcca`txnkkkkkkknknkkkkkknnnknkknnnknkkkkkkkknkkknnkkknkknknkkkkkknkknnkkkknkknkkkkkkkkkkknkknknnknkknknkknkknknknknkknknkkkknknkkkkkkkkkkkkkkknknnkkkkkknnnknkknnnkkkkkkkkkknkkknnkkknkknknknkkkkkkkknkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkniughhhhhhhhhhhhhhljjpjpppdcaa`utxnnirfhhhhhoeejjpjpjpppddcaaccxnkkinrhhhhhhhhhhhhhhhejjpjppppjpccaccccccddvqhhhhhheejjjjpawxinkkkknkkknknnnnnkknknknkknknnkknkknknknnkknkkkkknkknknkkkkkkuukknkkkkknkkkkkkkknkkknnkkkknkkknknknknkknknknkkkkknkkkkkknknnkkkkknkkkknkkkknknnnkknknknnknknnnkknkknknknnkknkkkkknkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknnituvhhhhhhhhhhhhhoeeejejpdca`wuxinnrmhhhhhoelpjejejejjjdda`ctnkkkkxnrhhhhhhhhhhhhhhoeeeeejejpdpcaaa`aaaccddmhhhhhheeeeejpc`cdannknknkknknxa`cackknknnnnkccnkcaknkkknknkkkknkkknknkkkkkkkkktkkkkkkkkknkkkkkkkkkknkkkknkknkkkkkknknknknkkkknknknkknkkkkkkkkkkkkkknknknknknknknkkkknknknnknknnkkkknkkknknkkkkkkkknknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkniitshhhhhhhhhhhhhheeeejjpc`wutxinnrshhhhhoejcdpeeeeeejpc`aaautnnkttishhhhhhhhhhhhhhleeeeeeljpccwaa`uwwacaacsqhhhhoeeeeeejcwxunknkkkittkkktkntktnknxtinknndknwnkkkknknktitniikkkntxkkkkkxxkxkkkitxkkkknknkknxxxkxnnnkitxknntkttnknknknknnkkknkknkkknknkkkkkkknknkkkkknkkknknknnkknknnknknnknknnkkknkknnkkkknkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkknknnirhhhhhhhhhhhhhheeeeepc`utxxinnighhhhhoepcapjeeeeejjp`wwwatxkknt`rmhhhhhhhhhhhhhhleeeeeejpc`ata`uxxca`ccwwmhhhhleeeeejpawxunkknkktttwnnkkktkkkn`uuu`nknn`cknnnkkkkkkt`xaxuikn`xx`nkk`ttaukk`uxw`nkkkkkkknwuu`xwknntxuiki``ut`xkknkknknnnknkkkkknkkkkkkkknkkkknnkknkknnkkkkkknknnknnnnknknnknnkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkknknnknivhhhhhhhhhhhhhleeejpauxinnnnrbqhhhhoedwiwapjeeejjdjtxinunnnkkktrfhhhhhhhhhhhhhheeeeeeeejwuwctnnni`uuwcutshhhheeeeeejpauxuknnknkua`uknnkktnknn`ttuaxknn`wknkxaaacakkckxkkxkxkkkktktnkkkwki`ttxaxnwaaa`tkttntktkkn`autkktnknkwkknknkkkkkkknknkknkkkkkkkknnnknkknkknknknnkknkknkknknknnnnknknnkkknnkkknkkkkkkkkkkkkkknkkkkkknkkknkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkknkkkkkkkkkkknknknkknknknshhhhhhhhhhhhhoeeejd`uinnkkrrqhhhhhednuxucpejejpda`xinntnkknnkxrhhhhhhhhhhhhhhoeeeeeejpaux`x`nnnx`ttuuiighhhheleeeejp`tiunkntktxnnwkknkntknkx`ttttnnkwxttkkkkkkkkknaktkktktkkkktktknnktkx`ttttnkknkkkkkxxkuntnkunkntkkunknkwnkkknkknknnknknknknkknnknkkknknnnknknnkknknknknknnnknkkkknkkkkkknkkkkknkkkkkkkkkkkkkkkkknkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkknknkkkkkknknknknkbhhhhhhhhhhhhhheeejd`tinknrbqhhhhoejnnu`wdjejjjauxxnnnkuknkknnbshhhhhhhhhhhhhhleeeeeejc`titni`knkcxkniknrhhhoepjeeejd`titnknukwkkn`nknkktkknncxkknkktxnkcnknkkknkkkaktkktkitkkuxkn`knw`nkaxnnnnkkkkkkkktxntntnnukktxkkx`nkuinnnknknknkkkknnkkkknnkkknnknknkknkkkkkknknkkkkknknkkkkkkkknnknkkkkkkkkkkkkkkkkkkkknkknkkknnkknkknkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkknknknnknknkkknnnfhhhhhhhhhhhhhleejd`tnkkibqhhhhheeinnxajjjepdadd`xknwcccwkntarmhhhhhhhhhhhhhheeeeeeepcwx`unkcanknwcwxknrhhhoecpeeepcwwccccaxkicctuwkntcccnnknwa`xkkaakkackkknkknnaakuikakkiacxknknacxwwnnua`xnknkkkkkiawkanxwkuccicxktn`ciknkknknknknknkkkkknkknnnknnknnnnnkknnnkknknknknnnknnknknkkkkkkkkknknknnkkkkkkkkkkkkkkkkknknknkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkknkkknnknkknmhhhhhhhhhhhhhoeejpauxnirfhhhhoeltxnit`cpjpd`utnnkknnnknknkknrqhhhhhhhhhhhhhoeeeeeejpauxknkknnknknknnkkrhhhld`djjjpcwxnnknknnknknknkknkkknkknnnnnkknknkkkknkknkkknkkkkkkkkkkkkkkkkknnnkkknkknkkkkkkkkkkkkkknnnkkkknnktkkknkknnnknnkknkknkknkknkkknkknnkkkknnnnknnnknknkknknknnnknkkkknkkkknkkkkkknkkkkkkkkkkkknkkkkknkknknkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkknkkkkkkknknknnknkknknknbhhhhhhhhhhhhhheeepcuxirvhhhhheliknxtwcpppcawxinknknknnknknknbhhhhhhhhhhhhhhoeeeeeejp`unkkkkkknknknknknghhhe`wcpjjpattnnnnnkknknknknnknkknnkknkkknkkkkkkkknknkknkkknkkkkkkkinknknkknknnnknkknknkkkkkkkkkkknkknknnkknxpctkkkkkkknkknnknnkknnkknknknnnknnnnnkkkkknknkknknkknnkknknknnkkkkkkknknnknkknkkkkkkkknnknkknknknknkkknkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkknkkkknnkkkkkkkknknknnkkkkkiqhhhhhhhhhhhhhleejcwrrvhhhhheennnitwadppc`utxnnnkkknknnknnkrshhhhhhhhhhhhhhleeeeeejdwuxinkknnnnknnknnnnmohetuapjjd`xxnnknnknkknknknknnnkknknknknknnkknknnkknnknknkkkkknkkkknnnknkknnknnknnknkknkkknnknkkkkknnnknknknknnnkkkkkkknnnknnnnnknnnkknkknkknnnnnnnnnkknknnnknnkknknkknkknnkkknnnknknkknkkkkkkkkkkkknknkkkknknkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkknkkkkkkkkknkknkkkknknkkknnnknmhhhhhhhhhhhhhoeejdtrvhhhhhelnnnitwadppd`uxnnnknnnnknnnknkkrvhhhhhhhhhhhhhheeeeeeepcwxinnknrgvbrknnnnknncjlit`dppcwxnnnnknknnnknkknkknknknknnnnkkkknnnnkknnkkknkkknkkknkkkknnnnnnknknnnnknkkkkknknkkkkkkkkkkkknnkknnnnnnnknkkkkkknnnknnkkknknnknnkkkknknkkkknnknkkkknkknnnnninnkkkkknkkkknknknkknkknkknkkkknnnnknkkkknnkknnnkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkknkkkkknghhhhhhhhhhhhhheeesrvhhhhoeeinnxtwadppcawtikkkkkkknkknnknknrhhhhhhhhhhhhhhoeeeeeejp`uxnnnnnrqhhwxknnknnkkkkixwapdauinnknknkkknknnniirnikkknkknnniirrggsgikknnnknnkknkkknirrrgsggnnknkknknkkkkkknkkkknkkkkkkknknknirrbsssbnnnnkkkknnnnniiiikkkkkkkkkkknnknnnkknknnnnnnirrrsssggrnnnkkknkkknknnknknnkknkknrrrbsgsgrnnnkkkknrsgrkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknnkkknnknnhhhhhhhhhhhhhhlewrvhhhhhelinnitwadppdawtinkkkknkkknkknknknghhhhhhhhhhhhhhoeeeeeejd`tiinknrshhhetkkkkkkkkknnxwcdd`uiknknnnnniiirrrssvqsikkkkknkrrgvhhhhhhminknknknknnknrbmqhhhhhhmiknknknknnnknkkknnknkkkkkkkkirrsvhhhhhhqgkknnrrrgssgssvmsnknkkknkkkknnnkkkknknknirbsmqhhhhhhhfsrkkkknkkknknnnkknknnnrbmfhhhhhhhfsrnnknrghhhtkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknknkkkkknnfhhhhhhhhhhhhhoprvhhhhheennnxtwaddpdawxiinkkkkkknknknkknnrmhhhhhhhhhhhhhheeeeeeejcwxinnkirqhhoekkkkkkkkkkknxuaccwxrrrrrrssssvvfhhhhhhlankkkkirgqhhhhhhhhhqxnnknknkknrbmhhhhhhhhhhhgknkknnkkknknnkkkknkkkkkknrrsqhhhhhhhhhhfnkrshhhhhhhhhhdakknkkknkkkknnnknkkknrrgvhhhhhhhhhhhhhhmnknknnknknknnnkknrbmhhhhhhhhhhhhqvsbrgqhhoekkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknknnknknghhhhhhhhhhhhhhrshhhhhelinnitwacppdawxinnnnkkkkkkkkkkknkkrfhhhhhhhhhhhhhheeeeeejpcuxinnirmhhhopkkkkkkkkkkknit`aaugvfhhhhhqhhhhhhhhhhhetnnknrrvhhhhhhhhhhhhhinnnknnnrsqhhhhhhhhhhhhhwknkknknknkknknknkknkkkirsqhhhhhhhhhhhhhdnrfhhhhhhhhhhlakkkknkkknkkkknnnnnirgfhhhhhhhhhhhhhhhhhfnnkkknknnknknknrsqhhhhhhhhhhhhhhhhhhhhhhodkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknknkkrhhhhhhhhhhhhhhshhhhheeinnituadppdawtinkknwctkkkkkkxkkkknrhhhhhhhhhhhhhhoeeeeeejp`uinnnrghhhhlankni`dxkknknixw`wxshhhhhhhhhhhhhhhhhhljnnnnibqhhhhhhhhhhhhhqonntnnirshhhhhhhhhhhhhhhhwcxnknknknknkkkknkknkrbvhhhhhhhhhhhhhhqhurhhhhhhhhhhhexkknxcwkkkkkkkkkknrbmhhhhhhholeedqhhhhhhhqnnnnknknnnnnnrshhhhhhhholeeelhhhhhhhhhhlckkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkknnknnvhhhhhhhhhhhhhhhhhhlexnnixwacdpda`uxnnkkkukknkkkkiwknkkrghhhhhhhhhhhhhhleeeeeejdwxinnrrqhhhhexkniiiiwnkkknnxtutxghhhhhhhhhhhhhhhhhheanknrrqhhhhhhhhhhhhhhho`i`iirvhhhhhhhhhhhhhhhhhlpnknnwdpaknnknkknknrbqhhhhhhhhhoeeehhhhvshhhhhhhhhhoennknnkukkkkkkkknnrsqhhhhhhhlepuxnshhhhhhhhonknnknnknknrgqhhhhhhhledunkiwfhhhhhhhhlwnknnknkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkknknnmhhhhhhhhhhhhhhhhhlecxiitu`ddpdawtxnnkkkkunkknkkk`kkkkkrvhhhhhhhhhhhhhheeeeeeejpwtnxrbqhhhhoeuinxttt`nnnkknnxxixrcllhhhhhhhhhhhhhhhetiurbqhhhhhhhhhhhhhhhhhjtxwrshhhhhhhhhhhhhhhhhhoaxinnnkuknknknxtxnrshhhhhhhhhheecxxumhhvvhhhhhhhhhhljtxiiinwknknnkttirshhhhhhhhledtnirmhhhhhhhhhpxnnitiutnnrqhhhhhhhoewnniituxvhhhhhhheuniixxinknknkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkknknkknkkkkkkkkknkkrhhhhhhhhhhhhhhhhlepwtttu`cpddawuxiinnkkktknkknnkwkkkk`rqhhhhhhhhhhhhhheeeeeeejduxrrsqhhhhhlpudtuw`wainnknknnninxwccashhhhhhhhhhhhoextrbqhhhhhhhhhhhhhhhhhhewurshhhhhhhhhhhhhhhhhhhodttxnnnunknknnuturshhhhhhhhhheedwxtuwfhqhhhhhhhhhhhedacxtttwinnkndubrvhhhhhhhhledw`crbqhhhhhhhhhld`xxaauuwrshhhhhhhhepuiitu`c``qhhhhhhexix`wuuinnininnkkknkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknknnkknkkkkkkniqhhhhhhhhhhhhhhlejd`wuwacdpdawtxinnnnknktknnkknkunnnxibhhhhhhhhhhhhhhoeeeepdcwtrrgfhhhhhhhl`iiaw`awainnnkkkknknknwnnrhhhhhhhhhhhhljubbqhhhoelvhhhhhhhhhhhhecrghhhhoeeqhhhhhhhhhhhhojawutxnuknknkna`rghhhhhhhhhoee``ju```shhhhhhhhhhhhoew`awwwuainnnunirvhhhhhhhhoedwwwprmhhhhhhhhhhopjtxwnnntrqhhhhhhhhetwuww`adccshhhhhoeutu``wttnkikkkkkknkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkknkkkkkknkknkknknknkkkkknshhhhhhhhhhhhhoeeedc``adppda`txinnnkkkkntkknnknnunknuishhhhhhhhhhhhhhsrbrrrsssmvhhhhhhhhhhetitaacc``innknknkkknnnukkrhhhhhhhhhhhhedgrfhhhlectbhhhhhhhhhhhoegbqhhheecitmhhhhhhhhhhhoepcautiwnkunkwirshhhhhhhhhhleaaadacpdshhhhhhhhhhhhlecddccawaxnnntirvhhhhhhhhhedc`aa`rhhhhhhhhhhhoep`u`xnntghhhhhhhhhex``ccdppddwfhhhhoea``ccawunniknkkkknknkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkknkkknkknkkghhhhhhhhhhhhhheeejpccddddawuxinnnnnnkkkukkknnknwnnnnrfhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhoeitcccda``inknknknkkkkkunirhhhhhhhhhhhoecrvhhoeecxirhhhhhhhhhhhocrfhhheexnnbshhhhhhhhhhhlejjdauxwnkuknwrshhhhhhhhhhoejw`adpjlashhhhhhhhhhhhejjjejjd`axnnnrrvhhhhhhhhheexp`wa`shhhhhhhhhhhoepdaaxnnbshhhhhhhhhewdcpjjjjdcamhhhhoedddpdcwunkxkkkkkknkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkknkknknnkkkknkrqhhhhhhhhhhhhhleejjppppdcwtxnknkknkkkkkukkknknnwiknkrhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhlpdjacdpjjpd`kknnnkkkkwcddgshhhhhhhhhhhlershhheedpxtbhhhhhhhhhhhorshhheeuinnrmhhhhhhhhhhhleeejdppddddnkrbqhhhhhhhhhhed`pjejjeewshhhhhhhhhhhheeeeejjejppdnnrvhhhhhhhhhoeutwpjlcshhhhhhhhhhhoejjpjdxtgvhhhhhhhhhljjejljjjpp`ghhhhlepjjejcawnxxknkknkkknkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkknknkknnnkkknnmhhhhhhhhhhhhhoeeeejjjdc`txnnnnnnnnnkkkwunkkkknk`nnrghhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhewuwcdpdauxnnnnkknknnkkkkkimhhhhhhhhhhhegbhhheedwtirshhhhhhhhhhhsghhoeeauxxwrfhhhhhhhhhhheeeejpcwxnnnnirqhhhhhhhhhhlewadjjjeljsvhhhhhhhhhhhleeeeeejdatikkrshhhhhhhhhhepu`adpjpshhhhhhhhhhheeejpc`tirvhhhhhhhhhhjjjeejdawttrfhhhljjjejpdwxnkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkknkkknkkkkghhhhhhhhhhhhhheeeejjpcwuxinknkknknkkkkxuinkknknnnkrmhhhhhhhhhhhhhhlelllloohhhhhhhhhhhhoewwcpjjdatxnkkkkknkkknknkkrvhhhhhhhhhhodrfhheejcwtxrmhhhhhhhhhhhrqhhlejawxtubhhhhhhhhhhhheeeeejd`tnkknrvhhhhhhhhhhoeccdjeeejjpbvhhhhhhhhhhhleeeeeejc`tinrbhhhhhhhhhhoeu`cpjjljahhhhhhhhhhoeeeeepawxivhhhhhhhhhhoeeejpawtxiimhhhejjeeepcwxnkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknknknkknkkkrqhhhhhhhhhhhhhleeejjc`uxnnnknnnnkkkknnnknnkkkknknnrfhhhhhhhhhhhhhheeeeeeeelllhhhhhhhhhol`cpjjjd`tiknnnkkknknknkknrhhhhhhhhhhhorshhlelpauxxrfhhhhhhhhhhmmhhleepcwtxrmhhhhhhhhhhhoeeeeejd`txnnrshhhhhhhhhhhejcpjjeeejpcrqhhhhhhhhhhheeeeeejjcwxnirqhhhhhhhhhhep`cpjeejpdvhhhhhhhhheeeeejjcwtrvhhhhhhhhhhqeeejd`tinnnshhheadjejpcuxnkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkknkkkknkknkkkkkrvhhhhhhhhhhhhhoeeejpauxinnnnkkkknkkkknnnnknkknnnknrhhhhhhhhhhhhhhoeeeeeeepc`uaqhhhhhhhljdpjljjcwxnnkknknkkkkkknnnshhhhhhhhhhhbghhoeejd`uxtbhhhhhhhhhhhshhoeeepcwutrfhhhhhhhhhhhleeeeejpatxnnbqhhhhhhhhhhoedpjeeeejpcurhhhhhhhhhhhoeeeeeeedauinrmhhhhhhhhhhoecdpjejejd`ufhhhhhhhleeeeeejd`tifhhhhhhhhhhhheejcwtinkkkhhoe`cjjepauinkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkknnknknibqhhhhhhhhhhhhhheeejc`tinkkkkkkkkkkknnknknnnnkkknnishhhhhhhhhhhhhhleeeeeeejdawwuvhhhhhhejpeeelpcwxnnknkkknknknknkrmhhhhhhhhhhqrhhheeepcwutrshhhhhhhhhhfqhheeejpawugbhhhhhhhhhhhheeeeeejd`uinrmhhhhhhhhhhhlepjeeeejjd`bshhhhhhhhhhhleeeeeejdwtirbhhhhhhhhhhhlecjjeeejpawxicooooleeeeeeeejd`tishhhhhhhhhhhhpejdwxnnnnkneejwapjjd`tinkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkknkkkkknkkkkkkkkkknknnknkkkkknkkirvhhhhhhhhhhhhhhhleejdwxnnkknkknnkknnnnkknnknknkkkkrvhhhhhhhhhhhhhheeeeeeeejpdaaashhhhhoeeeeeejpauinknknkkknkkkkknrfhhhhhhhhhhmmhhleejdauturvhhhhhhhhhhqhhoeeeepd``tshhhhhhhhhhhheeeeeejp`tirghhhhhhhhhhhoejjeeeeejdauxmhhhhhhhhhhheeeeeeepcwxnrfhhhhhhhhhhhepjleeejpcwxnkkncppleeeeeeeejdwtibhhhhhhhhhhhhhjjd`xnkkkkknnit`dpjd`tnnkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknknkkkkkkrrvhhhhhhhhhhhhhhhhleejd`tnnkkknnknnkkknnkknnnnnnkkkkrqhhhhhhhhhhhhhoeeeeeeejjpdddc`vhhhhleeeeeejd`tnnnkkkknkknknkknrhhhhhhhhhhhshhoeeejdawwwrhhhhhhhhhhhhhoeeeejpda`rfhhhhhhhhhhhleeeeeejdwtirfhhhhhhhhhhhlejeeeeejpawxrvhhhhhhhhhhoeeeeeeepauxrghhhhhhhhhhhlejjeeeejd`uxinnnntwcpeeeeeeejdwxnrhhhhhhhhhhhhhhjp`unnknkknknxucppcwtnnkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkknkkkknkkkkkkknknkkkkirvhhhhhhhhhhhhhhhhhheejp`uinknkknnknnnkknkkknknknnnknbhhhhhhhhhhhhhhoeeeeeeejpdcccc`mhhhhleeeeeepcwtiknknknnkkknkknnshhhhhhhhhhffhheeeepdaw`gghhhhhhhhhhhhhleeeejjdcwbhhhhhhhhhhhhleeeeeepcwxrghhhhhhhhhhhoeleeeeeepc`xxrhhhhhhhhhhhleeeeeejd`tirfhhhhhhhhhhhlejeeeeepcwtinnkinxwcpjeeeeejpawxnnmhhhhhhhhhhhhhhjcwxnkknkknniu`ddcuxnkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkknknkknkkknrvhhhhhhhhhhhhhhhhhhheeepcuinnnkkntknnnknnkkknnknnkknimhhhhhhhhhhhhhhleeeeeeeejcwwwaushhhoeeeeeejepwxnnnknknknnknkkkrvhhhhhhhhhhqhhleeeepca``bmhhhhhhhhhhhhoeeeeejppdbmhhhhhhhhhhhoeeeeeeejawxrfhhhhhhhhhhhleeeeeeejpauxrghhhhhhhhhhheeeeeeejdwtrghhhhhhhhhhhhejeeeeejdauinnknnixuadjeeeejjd`uinkrhhhhhhhhhhhhhhqd`uinkkkkkkitwac`uinnkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkknnknnrshhhhhdfhhhhhhhhhhhhhoeejc`xnnknkainnnnnkkikkkknkknkurvhhhhhhhhhhhhhheeeeeeejdawuttwbshhhoeejeeejdcuxnkknknknkkkknknrqhhhhhhhhhhhhheeeejpcaawrqhhhhhhhhhhhhleeeeeljjarqhhhhhhhhhhhoeeeeeejpaurghhhhhhhhhhhheeeeeeeepcwxirmhhhhhhhhhhheeeeeeepcuxrmhhhhhhhhhhhleeeeeeepdwxinnnkknitwcdjjjjpd`uxinnnmhhhhhhhhhhhhhhqcwxnnnnknnnxu``wtikkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkknkkkkkkkkkknkkkkkkkkkkknrshhhhhljmhhhhhhhhhhhhhoeejdatinknkanknnnuunkkxxknuini`rhhhhhhhhhhhhhhoeeeeeejed`tiiwwishhhljjjeeejdcxinnnkkkkkiuxukuighhhhhhhhhhhhhoeeeeejcaagghhhhhhhhhhhhoeeeeeejjjwghhhhhhhhhhhheeeeeeejd`trfhhhhhhhhhhhoeeeeeeejpauxnrqhhhhhhhhhhleeeeeejd`uirhhhhhhhhhhhhleeeeeejpawxnkknkknnxuwccdddcautinkkkrqhhhhhhhhhhhhhhpauxnknkkknixuutxnnkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkknknknknrshhhhhletrhhhhhhhhhhhhhheeepcuxnkkxxknnkwutwkntwnnutnnsghhhhhhhhhhhhhhoeeeeeeejd`xinuanshhhedppjejpccxnnnnnnnknna`waubmhhhhhhhhhhhhheeeeejepcabmhhhhhhhhhhhhleeeeeejjdbmhhhhhhhhhhhheeeeeeejcwrbhhhhhhhhhhhheeeeeeeejcwtinghhhhhhhhhhhleeeeeejdwtrshhhhhhhhhhhheeeeeeejcatinnkknknnnitu``a`wuxinkkkknghhhhhhhhhhhhhhqp`tinknkkknnxxinnkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkknknknkkkkkknkkkkkknkkrshhhhhleukrqhhhhhhhhhhhhhleejc`tnnkukkknn`da`kknunknuknrmhhhhhhhhhhhhhhleeeeeejpwxinnntishhheuccjjjpacinknwdddd`ktukukrvhhhhhhhhhhhhleeeeeejec`rqhhhhhhhhhhhoeeeeeeelparqhhhhhhhhhhhleeeeeejpawrmhhhhhhhhhhhheeeeeeejpauiirmhhhhhhhhhhheeeeeeejcwxrvhhhhhhhhhhhoeeeeeejpautinknknkknnnnxtttutxinnkkkkkkfhhhhhhhhhhhhhhhd`tnnnknknnnnnnkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknknrbqhhhhleuknnmhhhhhhhhhhhhhheejpauinkuknkkutnnwnknunkkunkrfhhhhhhhhhhhhhheeeeeejjpwxnnnkunmhhlexcapjjd``inkknnnknknutkunrhhhhhhhhhhhhhleeeeejjjcughhhhhhhhhhhhleeeeeeejpgghhhhhhhhhhhhleeeeeejd`trqhhhhhhhhhhhleeeeeeejc`tinrqhhhhhhhhhhoeeeeeejpauirhhhhhhhhhhhhoeeeeeejp`tninnkknknkknnnnxiiinnnnknnknknqhhhhhhhhhhhhhhjawtnknkkkknknkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkknknknkkkkkkknkkkkibqhhhhoe`knnxghhhhhhhhhhhhhheeepcwxiniuknk`kkiaknn`nnuuknrhhhhhhhhhhhhhhoeeeeeejdduinnknukgqhlan``dppcw`irikknnnnnnuuktnshhhhhhhhhhhhoeeeeeejjdabshhhhhhhhhhhheeeeeeeejdbmhhhhhhhhhhhoeeeeeeejc`bghhhhhhhhhhhheeeeeeejpcuxnighhhhhhhhhhhleeeeeejd`uighhhhhhhhhhhhleeeeeejc`tnkknknkknkknkkknnnnnnnnnknknkkrqhhhhhhhhhhhhhhjautnknkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkknrbqhhhhoedniniusfhhhhhhhhhhhhhleepc`tinnakkkidcuwwnnicdxdtishhhhhhhhhhhhhhleeeeeeejjpankucddcadejppjjddjpdbsqmnkkknnxd`kdrmhhhhhhhhhhhhleeeeeeeec`rfhhhhhhhhhhhlleeeeeejd`rqhhhhhhhhhhhoeeeeeeepaurshhhhhhhhhhhheeeeeeejd`tinrmhhhhhhhhhhheeeeeeejc`trshhhhhhhhhhhheeeeeeepcuinnkknkknknnnkkknnknknknnknkkkknshhhhhhhhhhhhhhod`uxnnkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkknknkknkknkibqhhhhoednnixu`amhhhhhhhhhhhhhoeejd`uinnxxnkknknkkkknknknkrvhhhhhhhhhhhhhheeeeeeejcwxnnkkkkkknkknntwcdc`tibqhhcnkkkkknnnkrqhhhhhhhhhhhheeeeeeejpctbhhhhhhhhhhhheeeeeeeepdgghhhhhhhhhhhheeeeeeejdaurfhhhhhhhhhhhoeeeeeeepawxnnbhhhhhhhhhhhoeeeeeejpauirvhhhhhhhhhhhheeeeeejdatinnikknkkkkknknkkkkkknknnkknknknnmhhhhhhhhhhhhhhlc`tinknkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkirvhhhhhedkniiuwcdshhhhhhhhhhhhhheeepauxinnknkkkkknnkknknknnrqhhhhhhhhhhhhhheeeeeejpauxnnnknknkkknnnxwcdawxrvhhoeikkknknknnbhhhhhhhhhhhhleeeeeeejdabshhhhhhhhhhhoeeeeeeejparmhhhhhhhhhhhheeeeeeejcwxrhhhhhhhhhhhhleeeeeejp`uinrshhhhhhhhhhhleeeeeejd`uirvhhhhhhhhhhhheeeeeejdwtiknnnkkkknnknknkkkkkkkkknnnnkkkknnvhhhhhhhhhhhhhljcwtinkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkknkkirvhhhhoejknnxuwcdp`fhhhhhhhhhhhhhleepcwtinnnnnknnkkkkkkknkknghhhhhhhhhhhhhhoeeeeeejd`tinknkkkkkkkknitwacaurshhhlpnknnnknknimhhhhhhhhhhhheeeeeeeepcwrfhhhhhhhhhhhleeeeeejjdwrfhhhhhhhhhhhleeeeeejpaurghhhhhhhhhhhheeeeeeejcwxinrqhhhhhhhhhhheeeeeeejdwtnrhhhhhhhhhhhhoeeeeeejcwxnknkknkkkknnnkkkkkkkknkknknnnnkknnifhhhhhhhhhhhhhedauinnkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkknkkknknkkkrrvhhhhheliknit`adpdcshhhhhhhhhhhhhoeejdwtinnknknknknknknknnnishhhhhhhhhhhhhhleeeeeejdwtnnkkknnkkknknnxw`a`rbqhhhlwnnknnknnnrvhhhhhhhhhhhheeeeeeejdatbhhhhhhhhhhhoeeeeeeljpatbhhhhhhhhhhhheeeeeeeedatishhhhhhhhhhhoeeeeeejpawiirmhhhhhhhhhhhheeeeeeepcwxnrhhhhhhhhhhhhoeeeeejpawxnknnnknkkkkkkkkkknkkkrsrkknknnknknnbqhhhhhhhhhhhhejd`tinkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkknnrvhhhhheennnixuadpdcabhhhhhhhhhhhhhheejdatinnnnknkknknknnnkknrfhhhhhhhhhhhhhheeeeeeepawinnkknknkknnnnnxtw`brfhhhoexknnninnnnrhhhhhhhhhhhhleeeeeeejcwrshhhhhhhhhhhoeeeeeelpcwbshhhhhhhhhhhheeeeedejdwtrmhhhhhhhhhhhoeeeeeejd`uiirqhhhhhhhhhhhoeeeeeejp`txnrhhhhhhhhhhhhoeeeeejd`tnikknkknnrnkkkknknkkknbhhmnkknnknkknishhhhhhhhhhhhljjcwxnnkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkknrmhhhhhllnnnituacpdc`urhhhhhhhhhhhhhhleepcwxnkknnnnkknknkknnnnrhhhhhhhhhhhhhhoeeeeeejpatinkknnkkknkkknnnxtxrvhhhholnknnixxinishhhhhhhhhhhheeeeeeejpaurvhhhhhhhhhhheeeeeeljpaurvhhhhhhhhhhhleeeejrsaawxrvhhhhhhhhhhhleeeeeejc`tnrshhhhhhhhhhhhleeeeedddwtnnrhhhhhhhhhhhhoeeeeejdwxxnnkknnnrghgkkkkknnkkkshhhcnkknnnnknnimhhhhhhhhhhhoejpawinkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknnrshhhhhleunnixwacppc`uxrmhhhhhhhhhhhhhleejd`tinkknknknnnnknknnishhhhhhhhhhhhhhoeeeeeejd`xinkkkknkknnknnnnnrrvhhhhheannnxxtxinrmhhhhhhhhhhhoeeeeeeejc`xrhhhhhhhhhhhheeeeeeljc`trqhhhhhhhhhhheeeeebghhctirvhhhhhhhhhhhleeeeeepauxibqhhhhhhhhhhhheeeeelrsswinkrhhhhhhhhhhhhoeeeeejcwxnnkkknkrbqhhfkkknkkkknshhhenkkkknkkknirqhhhhhhhhhhoeejd`tnnkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkrshhhhhleunnituacpdd`wxnnshhhhhhhhhhhhhheejpauxnnnkkknknnnnkknkimhhhhhhhhhhhhhhleeeeeejcwxnnkknnnkknnknknnirvhhhhhhexnnxuwwuxirfhhhhhhhhhhhleeeeeejjawrshhhhhhhhhhhleeeeeelpawrbhhhhhhhhhhhheeeearqhhl`iivhhhhhhhhhhhleeeeejp`wrrmhhfhhhhhhhhhheeeeegbhhfikkiqhhhhhhhhhhhheeeeejcuxnknkkkirfhhhldkknkkkkimhhhlnnnnkknnnknishhhhhhhhhhoeejpauxnkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkknrshhhhhletnnixwaddpc`wxiknrhhhhhhhhhhhhhheeejcwxnnknknknnnnnnknnrfhhhhhhhhhhhhhheeeeeejpaunnnnnnknkkkknkkkrrvhhhhhhoennxtwaawxibhhhhhhhhhhhheeeeeeejdaurvhhhhhhhhhhheeeeeeejpaurshhhhhhhhhhhoeeejrmhhoeunivhhhhhhhhhhhleeeeejd`trshhmhhhhhhhhhhoeeee`rqhhlcnnnvhhhhhhhhhhhheeeeepawxknnkkirvhhhoe`kkknkkkrvhhhounknnnkknnnnrqhhhhhhhhhoeeejdwxnkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkknrshhhhhoeannixw`cppdauxinkkifhhhhhhhhhhhhhoeejd`txnnnnkknknknknknbhhhhhhhhhhhhhhoeeeeeeedaunnnkknkkkwcxnnirbqhhhhhhhldnitwacawtrghhhhhhhhhhhheeeeeeejcwxrhhhhhhhhhhhheeeeeeejcwtrmhhhhhhhhhhhleeegghhhedinivhhhhhhhhhhhleeeeejcwrbqhhshhhhhhhhhhleeecrvhhoe`kknmhhhhhhhhhhhhoeeejpauinkkknrshhhhepnnkknnnkrfhhhhdniiiinnnknnnshhhhhhhhhleeejpatikkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkknkkkkkkkkkkkkkkkkkkinrshhhhhhejknixu`cpdcawtinknknfhhhhhhhhhhhhhheejpauxnnkknnknknnnknimhhhhhhhhhhhhhhleeeeeejd`tinknnknknkntnrrshhhhhhhhheuitucpdauxrfhhhhhhhhhhhleeeeeejpaurghhhhhhhhhhhoeeeeeelpcwxrvhhhhhhhhhhheeebbqhhleunnnmhhhhhhhhhhhheeeeeparbqhhvmhhhhhhhhhhleepbshhhepnnkkghhhhhhhhhhhhheeeepauxnkkirshhhhlenknnnknnnrhhhhhjixttxinknknnghhhhhhhhheeeeepawxnkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkknkkkkknnnkknrrghhhhhhoeitxxu`ddpdawwuxkkktrshhhhhhhhhhhhhhoeepcwxinkkntxuntinknrfhhhhhhhhhhhhhhleeeeeepcwxnnittnknnnnrrgfhhhhhhhhhoewwuapjjdairhhhhhhhhhhhhleeeeeejd`trmhhhhhhhhhhhleeeeeejdauxrfhhhhhhhhhhheebbqhhoeaxnnkshhhhhhhhhhhhqeeej`rbqhhorvhhhhhhhhhhleprshhhletnknkiqhhhhhhhhhhhhqeejp`tinnirvhhhhleukkniniiinrhhhhhhutuuuxinnnknrhhhhhhhhheeeeejcwxnkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkknnnxkkktnixikirvhhhhhhhopawtu`cppdcwuwuwxnktxshhhhhhhhhhhhhhhjejd`tinnkn`uw`t`nkrghhhhhhhhhhhhhhhleeeeejpcuxikutuwnknirgfhhhhhhhhhhhlj`p`djjpcwrghhhhhhhhhhhheeeeeeejcwxrqhhhhhhhhhhheeeeeeejdwtirhhhhhhhhhhhhvrbqhhoejtnnnirhhhhhhhhhhhhhvmwrrmqhhoerhhhhhhhhhhhfsrshhhleannnnnimhhhhhhhhhhhhhfcppatiirbfhhhhoewnnnixtutxighhhhhhjw`awtnnnnnnrhhhhhhhhleeeeejd`tikkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkknnkkkkininitrbvhhhhhhhhhdxwuwcppdcwtx`cutnnnrshhhhhhhhhhhhhhhqplddpcccwkxtkuntnirfhhhhhhhhhhhhhhhleeeeeejjdtnkwawtirrsfhhhhhhhhhhhhhed`adpjjcwxrmhhhhhhhhhhhoeeeeeejpauighhhhhhhhhhhoeeeeeejpcuxirhhhhhhhhhhhhhvhhhhleaxiknxtvhhhhhhhhhhhhhhvvhhhhheprhhhhhhhhhhhhvfhhhoepxiknnxxxqhhhhhhhhhhhhhqsgrrbsfhhhhhoednnkixww`uxrshhhhhhqaacauinnknighhhhhhhoeeeeeejd`xinkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkknnkkxnnirrgqhhhhhhhhhhmt``cdppc`uxwikntknirfhhhhhhhhhhhhhhhhqscawxnkkkxtktnxrrvhhhhhhhhhhhhhhhhqcpeeejc`xiitrrrbsvhhhhhhhhhhhhhhhoewcjjjjjawxrfhhhhhhhhhhhleeeeeejc`trmhhhhhhhhhhhleeeeeejdatinrhhhhhhhhhhhhhhhhhledwxinxtwshhhhhhhhhhhhhhhhhhhhelirhhhhhhhhhhhhhhhhoejuxinixtuushhhhhhhhhhhhhhhhhhhhhhhhhoecnknitu`aawtrshhhhhhhqddcwxnknnrfhhhhhhhleeeeeejd`tnnkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkknkkxrrgvhhhhhhhhhhhhhfgbuppc`uxiunirrrbsfhhhhhhhhhhhhhhhhhhhfsbrinknxxirrbsqhhhhhhhhhhhhhhhhhhqmsrrrrrrgsgmvqhhhhhhhhhhhhhhhhhhoe`djejejatxbhhhhhhhhhhhheeeeeeejcwtrfhhhhhhhhhhheeeeeeejcwxnnifhhhhhhhhhhhhhhhlejauxiiuw`wqhhhhhhhhhhhhhhhhhhlexkifhhhhhhhhhhhhhhheeauxxixww`wumhhhhhhhhhhhhhhhhhhhhhhhoedkkiixu`cca`trvhhhhhhhhmcd`tnnnrshhhhhhhleeeeeeejd`xnkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkknkkkkniinkkkngqhhhhhhhhhhhhhhhhhhqhpauxnktarvqhhhhhhhhhhhhhhhhhhhhhhhhhhhfskiaurvhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhejejeejjdddgshhhhhhhhhhhoeeeeeejpaurbhhhhhhhhhhhoeeeeeeepcuinknmhhhhhhhhhhhhhhleed`uxitu`awgqhhhhhhhhhhhhhhhhlewnnkmhhhhhhhhhhhhhheep`txxxuwa`wtimhhhhhhhhhhhhhhhhhhhhhlednnkxxu`cccauxrvhhhhhhhhhfgubrrbmhhhhhhhlejjeeeeejdwtnkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkknghhhhhhhhhhhhhhhhhhhhhj`tinkkkrhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhowkkkrhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhejjeeejjcuxrvhhhhhhhhhhhleeeeeejd`tishhhhhhhhhhhleeeeeejd`uxnnknhhhhhhhhhhhhhleejd`uttw`aawxshhhhhhhhhhhhhhheeaxnniiqhhhhhhhhhhhoeeedautttwaawuxinahhhhhhhhhhhhhhhhhhoeeunnnixuwaccawtirqhhhhhhhhhhhhvvfhhhhhhhhlepdjeeeeepcuxnnkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkrhhhhhhhhhhhhhhhhhhhhhewxnkkkkkhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhodnkkkhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhoejjeeejpauxnhhhhhhhhhhhheeeeeeejcwxivhhhhhhhhhhheeeeeeejd`tnnknkrhhhhhhhhhhleeeejdawuw`aawuxiwhhhhhhhhhhhhoeecwttxtuwhhhhhhhhhhleeejpawuw`aa`wtnnnn`ohhhhhhhhhhhhhholejxnnnxtu`cddawuxnrhhhhlllohhhhhhhhhhhhhhlee`wcjeeeejdauinkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkteeeeeeeeeeeeeeeeeeeeewxnnkkknkeeeeeeeeeeeeeeeeeeeeeeeeeeeeeepnnnkkeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeejd`tinneeeeeeeeeeeeeeeeeepauxnkdeeeeeeeeeeeeeeeeepcuxnnknknnoohhhooleeeeeeepcaaaaa`uxnnnxoohhhhhholeeejda`www`adohhhhhhoeeeeeepdaa`acawtxnnnnitplohhhhhhhhoolee`tttttu``ccdc`txinihhhel``dllohhhhhhhholeeaixwdjeeeejcwxikkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkknnnixuwadpeeeeejdwtinnnkkkkkknknnniixwapeeeeeeeeeeeeepc`txinnnnknknnkniiuwcpleeeeeeeeeeelpawxinnnnnnnnixxxxuuw`adpjjeeeeeeepcwtnknknnnniuadleeeeeeejp`tinkkknknixwdjeeeeeeejd`uinnkkknkn`peeeeeeeeeeeejpddccawtiiknniclllleeeeeeeejpccccccccpllleeeeeeeeejpdccca`uiiknknnxwajeelllleeeeepc`wwww`acddda`utnnnnglejxnxwdjeeelllleeed`knit`djeejjdauxnnkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkknknnixuwadjjeeeeejdawtxinnnkknkknnnixtu`cpleeeeeeeeeeeejpc`uuxiinnnknnnixuwapjeeeeeeeeeeeeejc`utxiniixxxxtuuw`acdppjeeeeeeeejpatxikknkkkniuapjeeeeeeejdwtnnkkkkknit`djeeeeeeejd`tnnknnknknniuapeeeeeeeeejjjdcawtinnknnixwcleeeeeeeeeejjpppdcawuucpjeeeeeeeeejjpdc`uxinkkkknitwcpjeeeeeeeeejppdcccddppdc`uxinkkkiuuxnit`djeeljjdc`iinnnnxwcpjeejpawxnnkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkknitw`cpjjeeeeeejjda`wtxnnkkknknixtuw`cpjeeeeeeeeeeeeeejpca`wutinnknnitw`cdjjeeeeeeeeeeeeejpcawwuuuuuwww``acddpjjjeeeeeeeeejd`tinnknkknnxucpeeeeeeejpcwinnkkknkiiuadjeeeeeejjawxnnkkknknknitadjeeeeeeeeejpdcwtinnknkkniu`djeeeeeeeeeeljjpdawttxuadjeeeeeeeejjpc`utinnknkkknitwcpjeeeeeeeeeejjjjjpjpdc`tixnknnnknkkkxtadjjeejpd`wuxxxxxw`djjjjpcwtinkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkknkixuacdjjjejeejejjddaawtinnkkknnxtw`acdpjejeeeeeeeejejjjjpdaa`utinnnitwacdpjjeeeeeeeeeejejjjddcaa`a`aaacccddppjjejejeeeeejjpcwxnknkknnknxwcpjeeeejejd`tinkkkkknnxuapjjeeeejjdauinknkknkkknixwcpeeeeeeeejjpa`txnknknknnnxwadjleeeeeeeejjpdawtiiitwcpeeeeeeeejpcauxinknknknknnxtwcdjjeeeeeeeeejjjjjpcawuxikikknknknnnitapjjjjjppcawuuuuwacpjjjda`txnnknkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkknntw`cdpppjjpjpjppddca`uxnnkkknixu`acddpppjppjpppjpjjjpppddcaawtxnnnxu`acdpppppppppjppjjpjppddccaccacccccddddppppppjppppjpdc`txnkkknkknnxwacpppppppdcwxinkkkknknxuacpppppppdawxinknnkknkknnxuacpjejejjjpcautinknkkknknnxxwadpjeeeejejjpd`wxinnniu`cpjeeeejjpc`utnnknkkkkkknnnxtwacppejeejejeejjpdcawuinnkkknknknkknxu`dppppddddcca```ccdpppcawxxnkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkknnxu`aaaccacccacacaaa`wtinkknkknitw`aaaacaacccccacccaccacaca``wtinnnitw`aaaaacacacaccccccacaaaa````a`aaaaaaaacccacaccdcacaawuxnnkknkknknxuwaaccccaa`wuinknkkkknnitwaaccccacawtinknknknnkknnnxu`cdpppddcawuxinnkkkkkkknnnitw`ddppjjppdda`uxikkknnxu`ddppppdcawuxnnknknnkknkknnnitu`acdppjjjjpppdc`wuxinnknkknkkkkknnit`cccaaaaaccccccacdcccawuxinkkkkkknkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkknixtuuuuuwuuuwuuuuuuttxixkkkknnixttuuuuuwuuuuwuwuuuwuwuwuuuuttxnnnnxattuuuwuuuuudauuutuuwu`uuuuuuwuuuac`cuwuawuuuwuwawwuutxxnnnkkkkknnnnxcwuuuuuuuttinnkkkkkkknnactuuuuu`ctxxii`iwikknkkknnixuw`aaa``wutxinkkkkkkkutkkknixuwaaccccaawutxnw`ikkkixu`acdccawuxinnnkkkkknknki`kknnxxuwaadccccca``wuxinnnkkkkkkknnknkkitu``wuuuuww```aaaaaa`wutxiknkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkknnixxxxxxxxiiiiiiixinnwnkkkkknnnniiiiiixixixxixixiixxxxxxxxiinnknnntiiixxxixxxxpxxixxiii`txxxxiuwixiucupixiiwixixixwiixxiinkkkkkkkkkknnniuxxiiiiuiinnkkkkkknkknntiixiiuxiatnnkdndxkknknkknnnxxtuuuuxxxinnnkknkkkkkxknkkknuxuuwwwwuuxxinnknxkkknnixuuwwuutxnnkkkkkknknkkkkxnknknnittuwawwwuuutxinnnkkkkkkkkkkkkkknnixuttxiixxttuuwwwuuuttxinnkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkknnknnnnnkninnnknnnnnkwkknknxinkntnxxinnxxnxtknnnnttnnnxxxtiknkkixnxnnnnnnnnnnuunnnnknnnwnnnnnnunnnnt`icnnnnunnknknitnnnknkknkkkiinxxknnnxxtnnniwxxxnkxixninnkkkxnnknkxnnnnknkck`nknkkknkknknnniiiiinnnkknkkknkkkkinxnkniwtuwtxututitnnkkkxnkkkknnixiutuxixknkkixnkkknxxnxkknnxxnniix`xxxxiinnnnkkkkkkkkkkkknkkkkkniininnnnnniixxxxxxiinnknkknkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkknkknknkknkknknkkkkkkkkiikkkkxxxtkkxwuxttknu`xx`kkxuxxwnkiwtxtiknxtxuwkkkkknkkknunkkkknkkiiknnnnntknkknukukkkkktkkkkkntkkkkkkkkkkkiuwxxwkkk`xxukknuxxnkkxwxwxtiknkxkkkkkiwinkkkk`kukknkkkkkkkknknnnnnknknkkkkkkkknkkutxtnknutttnntwtwxxtkkkkikkkkkknnnnx`xwxxxkkutxuxnkitxuwkkxuxiwnnnnxxnnnnnnnkkkkkkkkkkkkkkknkknknnnnknkkknknnnnnnnnnnnknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkxkkkkktwutkkktkkktkktkkknxnuixxtukkikkkxkkxkkktnnknkkknkkkkknkknkkxkkkkkkkxkkkkkkkknknkktnkkkkkntkkkkkkkkkkktkkknxnkxkkxkkkxkkkkkkukxkkxkkkxkkkkkkkktikkkknkkkkknknkkkkknkkkkknkknknknknkkkkkikkkxkkxkknnnk`ktkkxkknkxkknkwuwwwikwkxkkiknnkkkxkktkkktkkuiixtukkkkxkkkkkkkkkkkkkkkknkknkkkknkkkknknkkkkknknkkknknknkkknknkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkknkkkkkkkkkxkkkkxnkkxkkktkkkxnktkkknikwiixiinkxkkkxkkxkkkikkkkknkkkkkkkkkkkknikkknknkxknkkknkknkknknukkkkkkwkkkkkkkknkktkkknikkxkkxkkkxknkkkkwkikkxkkkxkkkkkikknxkkkkkkkknkkknknkkkkkkkkkkkkkkkkkkkkkkkkxkknxkkxknkkknwkxkkxnkknxkkkkkkkkknkwkikkikxkkkkxkkxkkkxknuxiixnkkkkxkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkknknkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkknkknikkkxkknukkkwnknxkkutknukkttkkknkkxnnkxkktnkiwkknkkkkkkkkkkkkkkkknxkkknkntkkkkkknkkkknkktkkkkkknnkkkkiukkkkttkntkkkxkkikkktkkknkkukxkkxkkkxkkkkkttxxkkkknknkkknkkkkknknkkkkkkknwiknkknkkkkkkxkkkxkkinknnkkwkikkinkkkxnknkkkkkkkkukikkikktnknxkktnkiwkktxkkknknktkkkkkkknknkkkkkkkkkkkkkknknkkkkkkkknkknkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkktkkknuuixtkkituxkkkinutnkkkiuwiknxuikxukkktuxnwkkknknknkkkknkkkkkkukknkkktnkkkkkknkkkkkkntkkkkkkukkkkiukkkkinutnkkuuknuukkkuwuikuukxnkukxuuwuikkkkiknkkknkkkkkknkknkkkkkkkkkkknunkknkkkkkknxunkuuikkxwuxktuinxkxinwuuutkkkkkkkktuinxkxnkkuuxkkkkuuxnukknuuiknkkukkkkkkkkkkkkkkkkkkkknkkknkkkkknknkkkkkkkkkkkkkkkkkknknkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkknkkkkknnkkkkkkkkkkikkkkkkikkkkknkkkknkkkkkknkkkkkkkknkkkkkkkkkkkkknkkkkkniknknkkxkkkkkkkknknkkknnkkkkkikkkkkkkkkkxkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkknknkkknkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkknkkknkkkkkkkkkkkkkkknknkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkxnkkkkkkkkkkknkkkkkkkkkkkkkknknkknkkkkknkkkkkkkknknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkuwtkkkkxwuknkkknkkkkknkkkkkkkkkkkkkkknkkknkknkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkxwunkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkknknkknkkkkkkkknkkkkkkkknkkkkkkkkkkkknknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkknkkkkkkkkkkkkkkkknkkknkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkknknkkkkkkkkkknknkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkknkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkknknkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkknkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkknkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkknkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkknknknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkknkknkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkknkkkkkkkkkkkkknkkknknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkknknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkknkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkknkknkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkknkkkknkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkknkknkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkknkkkkknkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkknnkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkknkkkknkkkkkkkkkkkkkkknknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkknkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkknknknktixikkkxkkkkkkinkkkkkkkkkkkkkkkkkkknxkkkkkkkkkkkkkkkkkkkkknxnkkkkkkikkkkkixnxkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkktikkkkkkkkkkkkkkkkkkkkktxkkkkknkkkkkkkkkkkkkkkkkkkkkkkkinkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkknkkkkkkkkkkkkkkkkkkxnkkkxixtkkkknkkkkkkikkkkkkkkkkkkkkkkkkkknkkkkkkknkkkkkkkkkkkkkkknkkkkkikkukkkntnukkkkkkkkkkkkkkkkkkkkkkknkkkknkkkknkkkkkknkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkknkkkkkkkikkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkikkkkxnixkkkkikkkkkkiknkkkkkkkkkkkknnnkkknknkkkkninnkkknnnknkkkkknkkkkknkkkkkknxktkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkinikkkninnnkkininnnkkkknkkkkkkkkkkkiniknnkkkknikkkkknnknkkkknkkkkkkikkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkkknnkkknnnnnkkkkknkkkkkkikkkkkkkkkkknxnninkkninnnkkninnkkkinninikkkknkkkkkninkkkkkikikkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkxnnikkninnnkknxnxninkkknkkkkkkkkkkknxnxnnnkkxnnxnkkinnxnkkinniikkkknkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkkikkkkkkikkkkkkkkkkknnnnnxkknkkknkkknkkkkknnknknkkkknkkkkkkkkikkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkknkkknkkkkkkxknkknkkknkkkkkxxxxxkkxknkknknkkkknknkkkknkkinnnikkkknkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkknkkkkkkkikkkkkkkkkkinnnnnkkkkkknkkknkkkkknnknknkkkknkkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkknkkknkkkkkkiknkknkkknkkkkkkkkkkkkiknkknknkkkknknkkkknkkinnnnkkkknkkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkknkkkkkknkkkkkiikkkkikkkkkknkkknkkknkkkkknkkkkkkkkknkkkknninkkkkkkkkkkkkkkkkkkkkkkkkkkkkikkkkkkkkkkkknkknkkknkkkkkkiknkknkkknkkkkkkkkkkkkiknkknknnkknkkknkknnkkxkkkkkkkknkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkkkkkkkkkknkkkkkkknkkkknnkkkkkiinkkknnknnnkkkinnkkinkikknkninnikkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkknikkkkkkkkkkkiikkiikkkninkkiiknnkiknninikkkkkkkkkinknkkikkkiinkkkkinnnnkkniikkkkknkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkknkkkkkknkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk",
+"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk"
+};
diff --git a/info/dir b/info/dir
new file mode 100644 (file)
index 0000000..59cc3ed
--- /dev/null
+++ b/info/dir
@@ -0,0 +1,60 @@
+-*- Text -*-
+
+This is the file .../info/dir, which contains the topmost node of the Info
+hierarchy.  The first time you invoke Info you start off looking at that node,
+which is (dir)Top.
+
+Rather than adding new nodes to this directory (and this file) it is a better
+idea to put them in a site-local directory, and then configure info to search
+in that directory as well.  That way, you won't have to re-edit this file when
+a new release of the editor comes out.
+
+For example, you could add this code to .../lisp/site-start.el, which is
+loaded before ~/.emacs each time the editor starts up:
+
+  ;; find local info nodes
+  (setq Info-directory-list
+        (append Info-directory-list '("/private/info/")))
+
+Then, when you enter info, a dir file like this one will be automatically
+created and saved (provided you have write access to the directory).  The
+contents of that file "/private/info/dir" will be appended to the contents of
+this file.
+
+\1f
+File: dir      Node: Top       This is the top of the INFO tree
+
+  This is Info, the online documentation browsing system.
+  This page (the Directory node) gives a menu of major topics.
+
+  button1 or button2 on a highlighted word follows that cross-reference.
+  button3 anywhere brings up a menu of commands.
+  ? lists additional keyboard commands.
+  h invokes the Info tutorial.
+
+* Menu:
+
+XEmacs 21.2
+===========
+* Info: (info).             Documentation browsing system.
+* XEmacs::          The extensible user-friendly self-documenting text editor.
+                    This manual is for XEmacs 21.2
+* Lispref::         XEmacs Lisp technical reference.
+                    This manual is for XEmacs 21.2.
+* New-Users-Guide::  XEmacs New User's Guide for XEmacs 21.2.
+* XEmacs-FAQ::      XEmacs Frequently Asked Questions for 21.2.
+* Internals::       Guide to the internals of XEmacs.
+
+
+Local Packages:
+
+* CL::                    A Common Lisp compatibility package for Emacs-Lisp.
+* Custom::                Customization Library for Emacs
+* External-Widget::       Use XEmacs as a text widget inside of another program.
+* Standards: (standards).  GNU coding standards.
+* Term::                  A mode to control inferior processes (a comint replacement)
+* Termcap::               The termcap library, which enables application programs
+                          to handle all types of character-display terminals.
+* Texinfo: (texinfo).     The GNU documentation format.
+* Widget::                An Emacs Lisp widget library
+
diff --git a/install.sh b/install.sh
new file mode 100755 (executable)
index 0000000..31420ab
--- /dev/null
@@ -0,0 +1,236 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5.
+#
+# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+#
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+tranformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+    case $1 in
+       -c) instcmd="$cpprog"
+           shift
+           continue;;
+
+       -d) dir_arg=true
+           shift
+           continue;;
+
+       -m) chmodcmd="$chmodprog $2"
+           shift
+           shift
+           continue;;
+
+       -o) chowncmd="$chownprog $2"
+           shift
+           shift
+           continue;;
+
+       -g) chgrpcmd="$chgrpprog $2"
+           shift
+           shift
+           continue;;
+
+       -s) stripcmd="$stripprog"
+           shift
+           continue;;
+
+       -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+           shift
+           continue;;
+
+       -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+           shift
+           continue;;
+
+       *)  if [ x"$src" = x ]
+           then
+               src=$1
+           else
+               # this colon is to work around a 386BSD /bin/sh bug
+               :
+               dst=$1
+           fi
+           shift
+           continue;;
+    esac
+done
+
+if [ x"$src" = x ]
+then
+       echo "install:  no input file specified"
+       exit 1
+else
+       true
+fi
+
+if [ x"$dir_arg" != x ]; then
+       dst=$src
+       src=""
+       
+       if [ -d $dst ]; then
+               instcmd=:
+       else
+               instcmd=mkdir
+       fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad 
+# if $src (and thus $dsttmp) contains '*'.
+
+       if [ -f $src -o -d $src ]
+       then
+               true
+       else
+               echo "install:  $src does not exist"
+               exit 1
+       fi
+       
+       if [ x"$dst" = x ]
+       then
+               echo "install:  no destination specified"
+               exit 1
+       else
+               true
+       fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+       if [ -d $dst ]
+       then
+               dst="$dst"/`basename $src`
+       else
+               true
+       fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+#  this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='   
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+       pathcomp="${pathcomp}${1}"
+       shift
+
+       if [ ! -d "${pathcomp}" ] ;
+        then
+               $mkdirprog "${pathcomp}"
+       else
+               true
+       fi
+
+       pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+       $doit $instcmd $dst &&
+
+       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+       if [ x"$transformarg" = x ] 
+       then
+               dstfile=`basename $dst`
+       else
+               dstfile=`basename $dst $transformbasename | 
+                       sed $transformarg`$transformbasename
+       fi
+
+# don't allow the sed command to completely eliminate the filename
+
+       if [ x"$dstfile" = x ] 
+       then
+               dstfile=`basename $dst`
+       else
+               true
+       fi
+
+# Make a temp file name in the proper directory.
+
+       dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+       $doit $instcmd $src $dsttmp &&
+
+       trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing.  If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+       $doit $rmcmd -f $dstdir/$dstfile &&
+       $doit $mvcmd $dsttmp $dstdir/$dstfile 
+
+fi &&
+
+
+exit 0
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
new file mode 100644 (file)
index 0000000..738fa34
--- /dev/null
@@ -0,0 +1,524 @@
+1998-07-19  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 21.2-beta1 is released.
+
+1998-07-15  SL Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh (ignore_pattern): Add very-early-lisp.el as
+       something to never bytecompile.
+
+1998-07-12  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 21.0-pre5 is released.
+
+1998-07-09  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 21.0-pre4 is released.
+
+1998-06-16  Jan Vroonhof  <vroonhof@math.ethz.ch>
+
+       * gnuclient.c (main): Use disconnect_from_server to read & echo
+       result.
+
+1998-06-15  Andy Piper  <andyp@parallax.co.uk>
+
+       * Makefile.in.in: add xemacs icon to the runemacs executable.
+
+1998-06-12  Jim Radford  <radford@robby.caltech.edu>
+
+       * gnuclient.c (initialize_signals): Don't pass SIGHUP to XEmacs.
+
+1998-06-04  Andy Piper  <andyp@parallax.co.uk>
+
+       * Makefile.in.in (runemacs): add runemacs as a build target if
+       HAVE_MS_WINDOWS is defined. move cpp stuff up slightly so that
+       build targets can benefit from it.
+
+1998-05-31  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * wakeup.c (sleep): Added NT preprocessor quirkfest.
+       (main): Exit when fflush() fails on stdout.
+
+1998-05-30  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * getopt.c: Undefine getpid before redefinition.
+
+       * make-docfile.c: Added <io.h> when compiling on NT
+
+       * movemail.c: Ditto.
+       (main): Declare some auto variables only when DISABLE_DIRECT_ACCESS
+       is undefined, so they are actually used, to supress compilation
+       warnings.
+
+1998-05-16  SL Baur  <steve@altair.xemacs.org>
+
+       * etags.c (C_entries): Avoid short circuiting comparisons on
+       characters that may appear in C++ operator constructs.
+
+       * ootags.c (C_entries): Commentary change.
+
+       * Makefile.in.in (PKG_SCRIPTS): Remove add-little-package.sh.
+
+1998-05-11  Martin Buchholz  <martin@xemacs.org>
+
+       * Makefile.in.in:
+       - Adjust for luser's CDPATH being set to something weird.
+       - Take into account bash 2.02's tendency to print the cwd when
+         using CDPATH.  Always use `cd ./foo' instead of `cd foo'.
+       - fix the run-temacs target to use $(DUMPENV)
+       - fix the run-puremacs target to use $(DUMPENV)
+       - fix the `depend' target to properly $(RM) the right files
+       - Generate a better TAGS file for XEmacs' lisp code using
+         hand-crafted regexps.
+       - Use standard coding conventions for modules/Makefile.in
+
+1998-05-07  Andy Piper  <andyp@parallax.co.uk>
+
+       * update-elc.sh: test x && y loses in the presence of set -e, use
+       if instead.
+
+1998-05-06  SL Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in.in (INSTALLABLES): Add ootags.
+       (ootags): New rule.
+
+       * ootags.c: New file.
+       (C_entries): Annotate changes neeeded for increased OO-Browser
+       context.
+
+1998-05-05  Jeff Miller <jmiller@smart.net>
+
+       * Makefile.in.in: Fix blessmail target.
+
+1998-05-05  SL Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in.in (etags_args): Back out -DOO_BROWSER
+
+       * etags.c: Revert to CVS version 1.11 (pre OO-browser additions).
+
+1998-05-04  SL Baur  <steve@altair.xemacs.org>
+
+       * etags.c (C_entries): Fix order typo.
+       (C_entries): Restore previous test.
+
+Wed Apr 22 12:59:35 1998  Andy Piper  <andyp@parallax.co.uk>
+
+       * installexe.sh: fix to use -f instead of -e file and fix shift
+       typo.
+
+1998-04-22  SL Baur  <steve@altair.xemacs.org>
+
+       * etags.c: Unconditionally define OO_BROWSER.
+
+       * update-elc.sh: Tighten up regexp on uname -r output.
+       From Marcus Thiessel <thiessel@tmbbwtx.bbn.hp.com>
+
+1998-04-19  Jan Vroonhof  <vroonhof@math.ethz.ch>
+
+       * gnuclient.c (main): Read eval from from stdin if just "-batch"
+       is given. 
+       * gnudoit: Support this.
+       * gnuserv.1: Document this behavior.
+
+1998-04-18  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+       * etags.c (C_entries): Add parentheses.
+
+       * etags-vmslib.c: Remove.  It's not needed anymore.
+
+Fri Apr 17 12:59:35 1998  Andy Piper  <andyp@parallax.co.uk>
+
+       * installexe.sh: New file.
+
+1998-04-17  Olivier Galibert  <galibert@pobox.com>
+
+       * etags.c (print_help): Correct typo.
+
+1998-04-16  SL Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in.in: Add -DOO_BROWSER to etags arguments.
+
+       * etags.c: Synch with InfoDock.
+
+       * update-autoloads.sh: Don't attempt to eval `make-special' stuffs
+       anymore.  They are no longer used.
+       * update-custom.sh: Always check in lisp/.
+
+1998-03-18  Jan Vroonhof  <vroonhof@math.ethz.ch>
+
+       * gnuclient.c (main): Do not copy string unnecessary in (too)
+       small buffers.
+
+1998-03-02  SL Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh: Change all -q -no-site-file to -vanilla
+
+1998-02-27  SL Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh (ignore_pattern): Add Installation.el, remove old
+       stuff from 20.4.
+
+Tue Feb 17 12:50:37 1998  Andy Piper  <andyp@parallax.co.uk>
+
+       * lib-src/Makefile.in.in: make sure clean removes msw executables
+
+1998-02-24  SL Baur  <steve@altair.xemacs.org>
+
+       * gnuserv.h: Enable USE_TMPDIR.
+
+1998-02-23  Glynn Clements  <glynn@sensei.co.uk>
+
+       * gnuclient.c (main): initialise variable `tmpdir' from the TMPDIR
+       environment variable.
+
+       * gnuserv.c (various): replace hardcoded references to /tmp with
+       the value of `tmpdir'.
+       (main): initialise variable `tmpdir' from the TMPDIR
+       environment variable.
+
+       * gnuserv.h: include (commented-out) definition of USE_TMPDIR.
+       Add `extern char *tmpdir'.
+
+       * gnuslib.c (various): replace hardcoded references to /tmp with
+       the value of `tmpdir'.
+
+1998-02-15  SL Baur  <steve@altair.xemacs.org>
+
+       * getopt.c (_getopt_internal): Add braces for clarity.
+
+1998-01-13  Martin Buchholz  <martin@xemacs.org>
+
+       * lib-src/add-little-package.sh: 
+       * lib-src/add-big-package.sh: 
+       Use proper paranoid quoting for sh variables.
+       -batch implies -q.
+
+Thu Jan 08 09:42:36 1998    <andyp@parallax.co.uk>
+       
+       * gnuserv.h: only set UNIX_DOMAIN_SOCKETS if HAVE_SYS_UN_H is
+       set.
+
+       * gnuserv.c: tidy up so that it builds when we don't have
+       UNIX_DOMAIN_SOCKETS.
+
+1998-01-07  SL Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh (ignore_pattern): Replace -vanilla with `-q
+       -no-site-file'.
+       * update-autoloads.sh (dirs): Ditto.
+       * update-custom.sh (dirs): Ditto.
+
+1997-12-18  SL Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh (mule_p): Remove skk's special treatment.
+
+1997-12-09  SL Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh (ignore_pattern): Correct paths of files that
+       should not be bytecompiled, and remove dead files.
+
+1997-12-02  SL Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh (mule_p): Update for addition of SKK.
+
+       * update-autoloads.sh (mule_p): Update ignore_dirs for
+       lisp/language and lisp/skk.
+       * update-custom.sh (mule_p): Ditto.
+
+1997-11-29  Jeff Miller <jmiller@smart.net>
+
+       * Makefile.in.in: Changed path to blessmail.el for blessmail target
+         to match new lisp directory layout.
+
+1997-11-27  SL Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh: Obliterate usage of make_special, since nothing
+       requires it any more.
+
+1997-11-23  SL Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh (BYTECOMP): cleantree.el has been moved.
+
+1997-11-18  Colin Rafferty  <craffert@ml.com>
+
+       * update-elc.sh (prune_vc): Made it ignore any directory that
+       starts with a period.
+
+1997-11-16  SL Baur  <steve@altair.xemacs.org>
+
+       * gnuserv.c (main): make return type int.
+       Suggested by Andreas Jaeger <aj@arthur.rhein-neckar.de>
+
+       * fakemail.c (main): Ditto.
+
+1997-11-13  SL Baur  <steve@altair.xemacs.org>
+
+       * pop.c: Add includes from movemail.c so standard functions get
+       declared.
+       (pop_retrieve): Return NULL if falling off the end of the
+       function.
+
+       * movemail.c: Hide declarations of popmail(), mbx_write(),
+       mbc_delimit_begin(), and mbx_delimit_end() behind MAIL_USE_POP
+       guard.
+       (pop_retr): Change 4th parameter to void *.
+
+1997-11-02  SL Baur  <steve@altair.xemacs.org>
+
+       * update-custom.sh (dirs): Remove packaged directories.
+
+       * update-elc.sh (ignore_pattern): Hyperbole, oobr and ilisp are
+       now packaged.
+
+       * update-autoloads.sh (mule_p): Hyperbole and oobr are now
+       packaged.
+
+1997-10-30  SL Baur  <steve@altair.xemacs.org>
+
+       * update-autoloads.sh (mule_p): EFS has been packaged.
+       * update-elc.sh (make_special_commands): Ditto.
+
+       * update-elc.sh: VM has been packaged.
+
+       * update-autoloads.sh: Add directory language
+
+1997-10-23  SL Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh (BYTECOMP): Specify -vanilla
+       * update-autoloads.sh (dirs): Ditto.
+       * update-custom.sh (dirs): Ditto.
+
+1997-10-10  Martin Buchholz  <mrb@eng.sun.com>
+
+       * config.values.in:  Run config.values.sh
+
+1997-10-09  SL Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in.in (PKG_SCRIPTS): Add new package manipulation
+       scripts.
+
+       * add-little-package.sh: New file.  Support script to install
+       single file packages.
+
+       * Makefile.in.in (distclean): Reverse change -- do not remove
+       config.values.in.
+       Suggested by: Martin Buchholz <mrb@Eng.Sun.COM>
+
+1997-10-06  SL Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in.in (distclean): Remove config.values.in.
+       From Martin Buchholz <mrb@Eng.Sun.COM>
+
+1997-10-04  SL Baur  <steve@altair.xemacs.org>
+
+       * update-autoloads.sh (mule_p): W3 is a package now.
+
+1997-09-30  SL Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh (ignore_pattern): Don't attempt bytecompiling
+       lisp/leim/quail/tibetan.el and lisp/language/tibet-util.el.
+
+1997-09-29  SL Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh (mule_p): Ignore mu/latex-math-symbol.el if we're
+       not building with Mule.
+
+1997-09-27  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * update-custom.sh: New file.
+
+       * update-autoloads.sh: Minor fixes.
+
+1997-08-11  Jeff Miller <jmiller@smart.net>
+       * Makefile.in.in:  Added a test for system-type equal to linux to
+       lisp/paths.el.  Mail spool dir should be /var/spool/mail.
+
+       * cleaned up lib-src/Makefile.in.in regarding targets blessmail and
+       maybe-blessmail. Added target do-blessmail.  Makefile.in.in was also
+       missing a variable called "configuration. This messed up archilibdir.
+
+       * Added highlighting to text suggesting to do "make gzip-el" in top
+       level Makefile.in.  Added code to do make maybe-blessmail after a 
+       make install is done.
+
+1997-08-07  Jan Vroonhof  <vroonhof@math.ethz.ch>
+
+       * gnuclient.c (main): Made help string correspond to options.
+
+1997-08-01  SL Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in.in (distclean): Remove config.values here only.
+
+1997-07-27  SL Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in.in (UTILITIES): Add config.values so it can be
+       cleared away by `make distclean'.
+
+1997-07-21  SL Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh (make_special_commands): Remove processing for
+       Gnus and AUCTeX.
+
+1997-07-19  SL Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh (mule_p): Do not attempt to bytecompile
+       char-table.el and chartblxmas.el.
+
+1997-07-08  Steven L Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh (cc-mode): Don't give cc-mode special treatment.
+
+       * update-autoloads.sh (cc-mode): Don't give cc-mode special
+       treatment.
+
+       * rcs2log: Synch with Emacs/Mule zeta.
+
+1997-07-03  Steven L Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh (make_special_commands): Fix building of ilisp so
+       custom-load.elc gets built.
+
+1997-06-27  Steven L Baur  <steve@altair.xemacs.org>
+
+       * update-autoloads.sh:  Major rework.  Avoid looking at MULE
+       directories if not running XEmacs/Mule.
+       - Look into all Mule directories for building autoloads.
+
+       * update-elc.sh (make_special_commands): Fix handling of
+       bytecompilation of AUCTeX to avoid looking at tex-jp.el if not
+       running MULE.
+
+1997-06-24  Steven L Baur  <steve@altair.xemacs.org>
+
+       * gnuattach: Needed executable bit set.
+       Suggested by Kyle Jones <kyle_jones@wonderworks.com>
+
+       * update-elc.sh (ignore_pattern): lisp/language/ethiopic byte
+       compiles now.
+
+1997-06-24  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * update-autoloads.sh: Search lisp/mule/.
+
+1997-06-20  Steven L Baur  <steve@altair.xemacs.org>
+
+       * gnuattach: Readd as warning script.
+
+       * Makefile.in.in (INSTALLABLE_SCRIPTS): Readd Gnuattach.
+       From Hrvoje Niksic <hniksic@srce.hr>
+       
+1997-06-13  Steven L Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh (mule_p): Ignore lisp/language when building
+       non-Mule.
+       (ignore_pattern): Ignore Languages we don't support yet.
+
+1997-06-02  Steven L Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh (ignore_dirs): Handle ported Quail (LEIM).
+
+Tue May 20 23:22:00 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * update-autoloads.sh (dirs): Remove obsolete directory lisp/vms
+       from exclusion list (it doesn't exist any more).  Remove
+       lisp/eterm from exclusion list of directories searched for
+       autoloads.
+
+Thu May  1 15:26:20 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh (mule_p): Test for mule bombs with change in format
+       of new output of featurep.
+
+Fri Apr 25 09:12:04 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * pstogif: Use Martin Buchholz magic to automagically find perl
+       interpreter.
+
+Tue Apr  8 03:08:22 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in.in: C Comment out Make comments.  No snide comments
+       from me, no sir.
+
+Tue Apr  1 12:26:53 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in.in: Added stuff for updated movemail.c.
+
+Sat Mar 29 16:57:01 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * send-pr (GNATS_ADDR): Use xemacs.org as submission address.
+       (DATADIR): Allow for DATADIR to be passed in as an environment
+       variable.
+
+Sun Mar 23 15:57:19 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh (make_special_commands): Use target of x20 for efs.
+
+Wed Mar 19 10:38:04 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in.in (SCRIPTS): Link gzip-el.sh in --srcdir
+       configuration.
+
+Tue Mar 18 17:49:14 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh (EMACS): Removed $XEMACS backdoor.  We will make
+       the .elcs *only* with the freshly built XEmacs.
+
+Mon Mar 17 10:12:03 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in.in (INSTALLABLE_SCRIPTS): Add install-sid and
+       send-pr (from GNATS).
+
+       * update-elc.sh (prune_vc): Use full path to cleantree.el.
+       (NUMTOCOMPILE): Remove useless rule to recompile out-of-date .elcs.
+
+Sun Mar 16 21:13:29 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * install-sid: New file (GNATS integration).
+
+       * send-pr: New file (GNATS integration).
+
+Fri Mar 14 17:59:57 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh (ignore_dirs): Build VM with `make autoload'.
+
+Wed Mar  5 18:07:57 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * gzip-el.sh: New file.  Courtesy of Jeff Miller and Hrvoje Niksic.
+
+       * update-elc.sh (els): Remove out of date .elcs before building.
+
+Tue Mar  4 18:45:10 1997  Martin Buchholz  <mrb@eng.sun.com>
+
+       * update-elc.sh (els): No more special treatment for vm.elc.
+
+Wed Feb 26 18:17:59 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * make-docfile.c (next_extra_elc): New function.
+       (main): Use it.  Implementation of `-i' parameter to pass a list
+       of site-loaded lisp files.
+
+Wed Feb 19 18:24:49 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * update-elc.sh: Added lisp/auctex.
+
+Thu Feb 13 11:32:47 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * Makefile.in.in: Install pstogif script.
+
+Sun Dec 29 17:16:45 1996  Martin Buchholz  <mrb@eng.sun.com>
+
+       * update-elc.sh (make_special_commands): Make ilisp be a little
+       smarter about recompilation.
+
+Wed Dec 18 20:22:55 1996  Martin Buchholz  <mrb@eng.sun.com>
+
+       * mmencode.c: Don't declare index().
+
+       * Makefile.in.in: Documentation changes.
+
+       * update-elc.sh: Portability Fix.
+
+Thu Dec  5 15:41:53 1996  Martin Buchholz  <mrb@Eng.Sun.COM>
+
+       * update-elc.sh: Corrections to protect against too smart /bin/sh'es.
+
diff --git a/lib-src/Makefile.in.in b/lib-src/Makefile.in.in
new file mode 100644 (file)
index 0000000..d7e6831
--- /dev/null
@@ -0,0 +1,363 @@
+##   Makefile for lib-src subdirectory in XEmacs.
+##   Copyright (C) 1985, 1987, 1988, 1993, 1994 Free Software Foundation, Inc.
+##   Copyright (C) 1996, 1997 Sun Microsystems, Inc.
+
+## 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; see the file COPYING.  If not, write to
+## the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+## Boston, MA 02111-1307, USA.
+
+## Note: FSF Makefile.in.in does something weird so that the comments
+## above a certain point in this file are in shell format instead of
+## in C format.  How the hell is this supposed to work? */
+
+## For performance and consistency, no built-in rules
+.SUFFIXES:
+.SUFFIXES: .c .h .o
+## ==================== Things "configure" will edit ====================
+
+@SET_MAKE@
+SHELL = /bin/sh
+RM = rm -f
+pwd = /bin/pwd
+
+CC=@CC@
+CPP=@CPP@
+CFLAGS=@CFLAGS@
+CPPFLAGS=@CPPFLAGS@
+LDFLAGS=@LDFLAGS@
+ALLOCA=@ALLOCA@
+LN_S=@LN_S@
+version=@version@
+
+## This will be the name of the generated binary and is set automatically
+## by configure.
+PROGNAME=@PROGNAME@
+
+## ==================== Where To Install Things ====================
+
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+bindir=@bindir@
+libdir=@libdir@
+srcdir=@srcdir@
+archlibdir=@archlibdir@
+configuration=@configuration@
+## ==================== Utility Programs for the Build =================
+
+INSTALL = @install_pp@ @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+## ========================== Lists of Files ===========================
+
+#define NO_SHORTNAMES
+#define NOT_C_CODE
+#include "../src/config.h"
+
+## Things that a user might actually run,
+## which should be installed in bindir.
+INSTALLABLES_BASE = etags ctags b2m gnuclient ootags
+INSTALLABLE_SCRIPTS = rcs-checkin pstogif install-sid send-pr gnudoit gnuattach
+#ifdef HAVE_MS_WINDOWS
+INSTALLABLES = $(INSTALLABLES_BASE) runemacs
+#else
+INSTALLABLES = $(INSTALLABLES_BASE) 
+#endif
+
+
+## Things that Emacs runs internally, or during the build process,
+## which should not be installed in bindir.
+UTILITIES= make-path wakeup profile make-docfile digest-doc \
+       sorted-doc movemail cvtmail fakemail yow hexl \
+       gnuserv mmencode
+## These need to be conditional on I18N3 make-msgfile make-po
+
+## Like UTILITIES, but they are not system-dependent, and should not be
+## deleted by the distclean target.
+GEN_SCRIPTS = rcs2log vcdiff gzip-el.sh install-sid send-pr
+TM_SCRIPTS = tm-au tm-file tm-html tm-image tm-mpeg tm-plain tm-ps tmdecode
+PKG_SCRIPTS = add-big-package.sh
+SCRIPTS = $(GEN_SCRIPTS) $(TM_SCRIPTS) $(PKG_SCRIPTS)
+
+EXECUTABLES= ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS}
+
+SOURCES = COPYING ChangeLog Makefile.in.in README aixcc.lex emacs.csh \
+       makedoc.com *.[chy] $(SCRIPTS)
+## Additional -D flags for movemail (add to MOVE_FLAGS if desired):
+## MAIL_USE_POP                Support mail retrieval from a POP mailbox.
+## MAIL_USE_MMDF               Support MMDF mailboxes.
+## MAIL_USE_FLOCK      Use flock for file locking (see the comments
+##                     about locking in movemail.c)
+## MAIL_UNLINK_SPOOL   Unlink the user spool mailbox after reading
+##                     it (instead of just emptying it).
+## KERBEROS            Support Kerberized POP.
+## KRB5                        Support Kerberos Version 5 pop instead of
+##                     Version 4 (define this in addition to
+##                     KERBEROS).
+## HESIOD              Support Hesiod lookups of user mailboxes.
+## MAILHOST            A string, the host name of the default POP
+##                     mail host for the site.
+
+MOVE_FLAGS=
+##
+## Additional libraries for movemail:
+## For KERBEROS
+## MOVE_LIBS= -lkrb -ldes -lcom_err
+## For KERBEROS + KRB5
+## MOVE_LIBS= -lkrb5 -lcrypto -lisode -lcom_err
+## Add "-lhesiod" if HESIOD is defined.
+
+MOVE_LIBS=
+
+## ========================== start of cpp stuff =======================
+
+#ifdef USE_GNU_MAKE
+vpath %.c @srcdir@
+vpath %.h @srcdir@
+#else
+VPATH=@srcdir@
+#endif
+
+c_switch_general=@c_switch_general@
+c_switch_all=@c_switch_all@
+ld_switch_general=@ld_switch_general@
+ld_switch_all=@ld_switch_all@
+ld_libs_general=@ld_libs_general@
+
+## We need to #define emacs to get the right versions of some files.
+
+cppflags = -Demacs -I../src $(CPPFLAGS)
+cflags   = $(CFLAGS) $(cppflags) $(c_switch_general)
+ldflags  = $(LDFLAGS) $(ld_switch_general) $(ld_libs_general)
+
+## This is the default compilation command.
+## But we should never rely on it, because some make version
+## failed to find it for getopt.o.
+## Using an explicit command made it work.
+.c.o:
+       ${CC} -c $(cflags) $<
+
+all: ${UTILITIES} ${INSTALLABLES} srcdir-symlink.stamp
+
+## Make symlinks for shell scripts if using --srcdir
+srcdir-symlink.stamp:
+       for f in ${SCRIPTS}; do \
+               if test ! -r $$f; then ${LN_S} ${srcdir}/$$f $$f; fi; \
+       done; \
+       touch $@;
+
+#undef MOVEMAIL_NEEDS_BLESSING
+#if !defined (MAIL_USE_FLOCK) && ! defined (MAIL_USE_LOCKF)
+#define MOVEMAIL_NEEDS_BLESSING
+blessmail = blessmail
+blessmail:
+       ../src/xemacs -batch -l ../lisp/blessmail.el
+       chmod +x $@
+#endif /* movemail needs blessing */
+
+maybe-blessmail: $(blessmail)
+#ifdef MOVEMAIL_NEEDS_BLESSING
+## Do not charge ahead and do it!  Let the installer decide.
+##       ./blessmail ${archlibdir}/movemail
+       @if test `wc -l <blessmail` != 2; then \
+         dir=`sed -n -e 's/echo mail directory = \(.*\)/\1/p' blessmail`; \
+         echo "*************************************************************";\
+         echo "Assuming $$dir is really the mail spool directory, you should";\
+         echo "run  lib-src/blessmail ${archlibdir}/movemail"; \
+         echo "as root, to give  movemail  appropriate permissions."; \
+         echo "Do that after running  make install."; \
+         echo "You can also do  make blessmail. "; \
+         echo "*************************************************************";\
+       fi
+#endif
+
+do-blessmail: $(blessmail)
+#ifdef MOVEMAIL_NEEDS_BLESSING
+       ./blessmail ${archlibdir}/movemail
+#endif
+
+## Install the internal utilities.  Until they are installed, we can
+## just run them directly from lib-src.
+${archlibdir}: all
+       @echo; echo "Installing utilities run internally by XEmacs."
+       ./make-path ${archlibdir}
+       if test "`(cd ${archlibdir} && $(pwd))`" != "`$(pwd)`"; then \
+         for f in ${UTILITIES}; do \
+           (cd .. && $(INSTALL_PROGRAM) lib-src/$$f ${archlibdir}/$$f) ; \
+         done ; \
+       fi
+       if test "`(cd ${archlibdir} && $(pwd))`" \
+            != "`(cd ${srcdir}     && $(pwd))`"; then \
+         for f in ${SCRIPTS}; do \
+           (cd .. && $(INSTALL_PROGRAM) ${srcdir}/$$f ${archlibdir}/$$f); \
+         done ; \
+       fi
+
+## We do not need to install "wakeup" explicitly, because it will be
+## copied when this whole directory is copied.
+.PHONY : all maybe-blessmail install uninstall
+install: ${archlibdir}
+       @echo; echo "Installing utilities for users to run."
+       for file in ${INSTALLABLES} ; do \
+         (cd .. && $(INSTALL_PROGRAM) lib-src/$${file} ${bindir}/$${file}) ; \
+       done
+       for file in ${INSTALLABLE_SCRIPTS} ; do \
+         (cd .. && $(INSTALL_PROGRAM) ${srcdir}/$${file} ${bindir}/$${file}) ; \
+       done
+
+uninstall:
+       (cd ${bindir} && \
+        $(RM) ${INSTALLABLES} ${INSTALLABLE_SCRIPTS})
+       (cd ${archlibdir} && \
+        $(RM) ${UTILITIES} ${INSTALLABLES} ${SCRIPTS} ${INSTALLABLE_SCRIPTS})
+
+.PHONY: mostlyclean clean distclean realclean extraclean
+mostlyclean:
+       $(RM) *.o *.i core
+clean: mostlyclean
+       $(RM) ${INSTALLABLES} ${UTILITIES} *.exe
+distclean: clean
+       $(RM) DOC *.tab.c *.tab.h aixcc.c TAGS
+       $(RM) Makefile Makefile.in blessmail config.values
+realclean: distclean
+extraclean: distclean
+       $(RM) *~ \#*
+
+.PHONY: unlock relock check
+unlock:
+       chmod u+w $(SOURCES)
+relock:
+       chmod u-w $(SOURCES)
+
+## Test the contents of the directory.
+check:
+       @echo "We don't have any tests for XEmacs yet."
+
+TAGS: etags
+       etags *.[ch]
+
+GETOPTOBJS = getopt.o getopt1.o $(ALLOCA)
+GETOPTDEPS = $(GETOPTOBJS) ${srcdir}/getopt.h
+getopt.o: ${srcdir}/getopt.c ${srcdir}/getopt.h
+       ${CC} -c $(cflags) ${srcdir}/getopt.c
+getopt1.o: ${srcdir}/getopt1.c ${srcdir}/getopt.h
+       ${CC} -c $(cflags) ${srcdir}/getopt1.c
+alloca.o: ${srcdir}/../src/alloca.c
+       ${CC} -c $(cflags) ${srcdir}/../src/alloca.c
+
+regex.o: ${srcdir}/../src/regex.c ${srcdir}/../src/regex.h
+       $(CC) -c `echo $(cflags) | sed 's/-Demacs/ /'` \
+               -DINHIBIT_STRING_HEADER ${srcdir}/../src/regex.c
+
+etags_args = -I. $(cflags) -I${srcdir} -I${srcdir}/../src \
+       -DVERSION='"${version}"' ${srcdir}/etags.c \
+       $(GETOPTOBJS) regex.o $(ldflags)
+etags_deps   = ${srcdir}/etags.c $(GETOPTDEPS) regex.o ../src/config.h
+
+etags: ${etags_deps}
+       $(CC) ${etags_args} -o $@
+
+runemacs_args = -I. $(cflags) -I${srcdir} -I${srcdir}/../src \
+       -DVERSION='"${version}"' ${srcdir}/../nt/runemacs.c \
+       $(ldflags) -Wl,--subsystem,windows
+runemacs_deps   = ${srcdir}/../nt/runemacs.c ${srcdir}/../nt/xemacs.ico ../src/config.h
+
+runemacs: ${runemacs_deps}
+       echo "runemacs ICON DISCARDABLE \"../nt/xemacs.ico\"" \
+       | windres -o runemacs_res.o
+       $(CC) runemacs_res.o ${runemacs_args} -o $@
+
+ootags_args = -I. $(cflags) -I${srcdir} -I${srcdir}/../src \
+       -DVERSION='"${version}"' ${srcdir}/ootags.c \
+       $(GETOPTOBJS) regex.o $(ldflags)
+ootags_deps   = ${srcdir}/ootags.c $(GETOPTDEPS) regex.o ../src/config.h
+
+ootags: ${ootags_deps}
+       $(CC) ${ootags_args} -o $@
+
+## ctags depends on etags to assure that parallel makes do not write
+## two etags.o files on top of each other.
+ctags: ${etags_deps} etags
+       $(CC) -DCTAGS ${etags_args} -o $@
+
+wakeup: ${srcdir}/wakeup.c
+       $(CC) $(cflags) ${srcdir}/wakeup.c $(ldflags) -o $@
+
+profile: ${srcdir}/profile.c
+       $(CC) $(cflags) ${srcdir}/profile.c $(ldflags) -o $@
+
+make-docfile: ${srcdir}/make-docfile.c
+       $(CC) $(cflags) ${srcdir}/make-docfile.c $(ldflags) -o $@
+
+digest-doc: ${srcdir}/digest-doc.c
+       $(CC) $(cflags) ${srcdir}/digest-doc.c $(ldflags) -o $@
+
+sorted-doc: ${srcdir}/sorted-doc.c
+       $(CC) $(cflags) ${srcdir}/sorted-doc.c $(ldflags) -o $@
+
+b2m: ${srcdir}/b2m.c ../src/config.h
+       $(CC) $(cflags) ${srcdir}/b2m.c $(ldflags) -o $@
+
+movemail: ${srcdir}/movemail.c ${srcdir}/pop.c ${srcdir}/pop.h ../src/config.h
+       $(CC) $(cflags) ${MOVE_FLAGS} ${srcdir}/movemail.c ${srcdir}/pop.c $(ldflags) ${MOVE_LIBS} -o $@
+
+cvtmail: ${srcdir}/cvtmail.c
+       $(CC) $(cflags) ${srcdir}/cvtmail.c $(ldflags) -o $@
+
+fakemail: ${srcdir}/fakemail.c ../src/config.h
+       $(CC) $(cflags) ${srcdir}/fakemail.c $(ldflags) -o $@
+
+yow: ${srcdir}/yow.c ../src/paths.h
+       $(CC) $(cflags) ${srcdir}/yow.c $(ldflags) -o $@
+
+hexl: ${srcdir}/hexl.c
+       $(CC) $(cflags) ${srcdir}/hexl.c $(ldflags) -o $@
+
+make-msgfile: ${srcdir}/make-msgfile.c
+       $(CC) $(cflags) ${srcdir}/make-msgfile.c $(ldflags) -o $@
+
+make-po: ${srcdir}/make-po.c
+       $(CC) $(cflags) ${srcdir}/make-po.c $(ldflags) -o $@
+
+cflags_gnuserv  = $(CFLAGS) $(cppflags) $(c_switch_all)
+ldflags_gnuserv = $(LDFLAGS) $(ld_switch_all) @libs_xauth@ $(ld_libs_general)
+gnuslib.o: ${srcdir}/gnuslib.c ${srcdir}/gnuserv.h ../src/config.h
+       $(CC) -c $(cflags_gnuserv) ${srcdir}/gnuslib.c
+gnuclient: ${srcdir}/gnuclient.c gnuslib.o ${srcdir}/gnuserv.h
+       $(CC) $(cflags_gnuserv) ${srcdir}/$@.c gnuslib.o ${ldflags_gnuserv} -o $@
+gnuserv: ${srcdir}/gnuserv.c gnuslib.o ${srcdir}/gnuserv.h
+       $(CC) $(cflags_gnuserv) ${srcdir}/$@.c gnuslib.o ${ldflags_gnuserv} -o $@
+
+## mmencode binary is used by tm - but is really part of the metamail package
+## mmencode.c was merged copy of mmencode.c and codes.c of metamail
+mmencode : ${srcdir}/mmencode.c
+       $(CC) $(cflags) ${srcdir}/mmencode.c -o $@
+
+
+## The timer utility (timer.c, getdate.y) is not used in XEmacs
+## because XEmacs provides built-in timer facilities.
+
+make-path: ${srcdir}/make-path.c ../src/config.h
+       $(CC) $(cflags) ${srcdir}/make-path.c -o $@
+
+## These are NOT included in INSTALLABLES or UTILITIES.
+## See ../src/Makefile.in.in.
+aixcc: ${srcdir}/aixcc.c
+       $(CC) $(cflags) ${srcdir}/aixcc.c -o $@
+
+aixcc.c: ${srcdir}/aixcc.lex
+       lex ${srcdir}/aixcc.lex
+       mv lex.yy.c aixcc.c
diff --git a/lib-src/README b/lib-src/README
new file mode 100644 (file)
index 0000000..fa3074e
--- /dev/null
@@ -0,0 +1,3 @@
+This directory contains the source code for the architecture-dependent
+files that go in ../arch-lib.  At present, these are mostly utility
+programs used by Emacs.
diff --git a/lib-src/ad2c b/lib-src/ad2c
new file mode 100755 (executable)
index 0000000..cfedf5f
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/sh
+#
+#      ad2c : Convert app-defaults file to C strings decls.
+#
+#      George Ferguson, ferguson@cs.rcohester.edu, 12 Nov 1990.
+#      19 Mar 1991 : gf
+#              Made it self-contained.
+#      6 Jan 1992 : mycroft@gnu.ai.mit.edu (Charles Hannum)
+#              Removed use of "-n" and ":read" label since Gnu and
+#              IBM sed print pattern space on "n" command. Still works
+#              with Sun sed, of course.
+#      7 Jan 1992: matthew@sunpix.East.Sun.COM (Matthew Stier)
+#              Escape quotes after escaping backslashes.
+#
+# Synched up with: Not in FSF.
+
+sed '
+/^!/d
+/^$/d
+s/\\/\\\\/g
+s/\\$//g
+s/"/\\"/g
+s/^/"/
+: test
+/\\$/b slash
+s/$/",/
+p
+d
+: slash
+n
+/^!/d
+/^$/d
+s/"/\\"/g
+s/\\\\/\\/g
+s/\\n/\\\\n/g
+s/\\t/\\\\t/g
+s/\\f/\\\\f/g
+s/\\b/\\\\b/g
+b test' "$@"
diff --git a/lib-src/add-big-package.sh b/lib-src/add-big-package.sh
new file mode 100755 (executable)
index 0000000..7c8e3e0
--- /dev/null
@@ -0,0 +1,64 @@
+#! /bin/sh
+# add-big-package.sh --- Add multiple file package to Package Lisp Hierarchy
+# Copyright (C) 1997 Free Software Foundation, Inc.
+
+# Author:      SL Baur <steve@altair.xemacs.org>
+# Maintainer:  SL Baur <steve@altair.xemacs.org>
+# Keywords:    packages internal
+
+# 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; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+### Commentary:
+
+## This file copies a single lisp file into an XEmacs package hierarchy and
+## performs the necessary magic so that it will be autoloaded at the next
+## dump.
+
+## Parameters:
+##     $1 -- Full path to an XEmacsen later than 20.3
+##     $2 -- Full path to a lisp package tarball to install
+##     $3 -- Full path to a lisp directory in an XEmacs package hierarchy
+##           This directory will be created if it does not exist.
+##           NOTE: the directory name should *not* end in a trailing slash
+
+
+### Code:
+
+XEMACS="$1"                    # Not used at present
+LISP_FILE="$2"                 # Should be a binary package tarball
+DEST_DIR="$3"                  # Should be a top level package directory
+
+# Test for valid XEmacs executable and valid input file
+if [ ! -f "${LISP_FILE}" -o ! -x "${XEMACS}" ]; then
+       exit 1
+fi
+
+# Test for destination directory, creating if necessary
+test -d "${DEST_DIR}" || mkdir "${DEST_DIR}"
+test -d "${DEST_DIR}" || exit 1;
+
+# Very simple minded extraction for the first cut
+# We'll get more sophisticated later
+cd "${DEST_DIR}"
+gunzip -c "${LISP_FILE}" | tar xvf -
+
+# Need to refresh the info/dir file, I don't know how to do that.
+
+exit 0
+
+### add-big-package.sh ends here
diff --git a/lib-src/b2m.c b/lib-src/b2m.c
new file mode 100644 (file)
index 0000000..dda077d
--- /dev/null
@@ -0,0 +1,263 @@
+/*
+ * b2m - a filter for Babyl -> Unix mail files
+ *
+ * usage:      b2m < babyl > mailbox
+ *
+ * I find this useful whenever I have to use a
+ * system which - shock horror! - doesn't run
+ * Gnu emacs. At least now I can read all my
+ * Gnumacs Babyl format mail files!
+ *
+ * it's not much but it's free!
+ *
+ *   Ed Wilkinson
+ *   E.Wilkinson@massey.ac.nz
+ *   Mon Nov 7 15:54:06 PDT 1988
+ */
+
+/* Made conformant to the GNU coding standards January, 1995
+   by Francesco Potorti` <pot@cnuce.cnr.it>. */
+
+#ifdef HAVE_CONFIG_H
+#include <../src/config.h>
+/* On some systems, Emacs defines static as nothing for the sake
+   of unexec.  We don't want that here since we don't use unexec. */
+#undef static
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <sys/types.h>
+#ifdef MSDOS
+#include <fcntl.h>
+#endif
+
+#undef TRUE
+#define TRUE   1
+#undef FALSE
+#define FALSE  0
+
+/* Exit codes for success and failure.  */
+#ifdef VMS
+#define        GOOD    1
+#define BAD    0
+#else
+#define        GOOD    0
+#define        BAD     1
+#endif
+
+#define streq(s,t)     (strcmp (s, t) == 0)
+#define strneq(s,t,n)  (strncmp (s, t, n) == 0)
+
+typedef int logical;
+
+/*
+ * A `struct linebuffer' is a structure which holds a line of text.
+ * `readline' reads a line from a stream into a linebuffer and works
+ * regardless of the length of the line.
+ */
+struct linebuffer
+{
+  long size;
+  char *buffer;
+};
+
+
+static long *xmalloc (unsigned int);
+static long *xrealloc (void *, unsigned int);
+static char *concat (char *s1, char *s2, char *s3);
+static long readline (struct linebuffer *, FILE *);
+static void fatal (char *);
+
+/*
+ * xnew -- allocate storage.  SYNOPSIS: Type *xnew (int n, Type);
+ */
+#define xnew(n, Type)  ((Type *) xmalloc ((n) * sizeof (Type)))
+
+
+
+char *progname;
+
+int
+main (int argc, char *argv[])
+{
+  logical labels_saved, printing, header;
+  time_t ltoday;
+  char *labels = NULL, *p, *today;
+  struct linebuffer data;
+
+#ifdef MSDOS
+  _fmode = O_BINARY;           /* all of files are treated as binary files */
+#if __DJGPP__ > 1
+  if (!isatty (fileno (stdout)))
+    setmode (fileno (stdout), O_BINARY);
+  if (!isatty (fileno (stdin)))
+    setmode (fileno (stdin), O_BINARY);
+#else /* not __DJGPP__ > 1 */
+  (stdout)->_flag &= ~_IOTEXT;
+  (stdin)->_flag &= ~_IOTEXT;
+#endif /* not __DJGPP__ > 1 */
+#endif
+  progname = argv[0];
+
+  if (argc != 1)
+    {
+      fprintf (stderr, "Usage: %s <babylmailbox >unixmailbox\n", progname);
+      exit (GOOD);
+    }
+  labels_saved = printing = header = FALSE;
+  ltoday = time (0);
+  today = ctime (&ltoday);
+  data.size = 200;
+  data.buffer = xnew (200, char);
+
+  if (readline (&data, stdin) == 0
+      || !strneq (data.buffer, "BABYL OPTIONS:", 14))
+    fatal ("standard input is not a Babyl mailfile.");
+
+  while (readline (&data, stdin) > 0)
+    {
+      if (streq (data.buffer, "*** EOOH ***") && !printing)
+       {
+         printing = header = TRUE;
+         printf ("From \"Babyl to mail by %s\" %s", progname, today);
+         continue;
+       }
+
+      if (data.buffer[0] == '\037')
+       {
+         if (data.buffer[1] == '\0')
+           continue;
+         else if (data.buffer[1] == '\f')
+           {
+             /* Save labels. */
+             readline (&data, stdin);
+             p = strtok (data.buffer, " ,\r\n\t");
+             labels = "X-Babyl-Labels: ";
+
+             while ((p = strtok (NULL, " ,\r\n\t")))
+               labels = concat (labels, p, ", ");
+
+             p = &labels[strlen (labels) - 2];
+             if (*p == ',')
+               *p = '\0';
+             printing = header = FALSE;
+             labels_saved = TRUE;
+             continue;
+           }
+       }
+
+      if ((data.buffer[0] == '\0') && header)
+       {
+         header = FALSE;
+         if (labels_saved)
+           puts (labels);
+       }
+
+      if (printing)
+       puts (data.buffer);
+    }
+  return 0;
+}
+
+
+
+/*
+ * Return a newly-allocated string whose contents
+ * concatenate those of s1, s2, s3.
+ */
+static char *
+concat (char *s1, char *s2, char *s3)
+{
+  int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
+  char *result = xnew (len1 + len2 + len3 + 1, char);
+
+  strcpy (result, s1);
+  strcpy (result + len1, s2);
+  strcpy (result + len1 + len2, s3);
+  result[len1 + len2 + len3] = '\0';
+
+  return result;
+}
+
+/*
+ * Read a line of text from `stream' into `linebuffer'.
+ * Return the number of characters read from `stream',
+ * which is the length of the line including the newline, if any.
+ */
+static long
+readline (struct linebuffer *linebuffer, FILE *stream)
+{
+  char *buffer = linebuffer->buffer;
+  register char *p = linebuffer->buffer;
+  register char *pend;
+  int chars_deleted;
+
+  pend = p + linebuffer->size; /* Separate to avoid 386/IX compiler bug.  */
+
+  while (1)
+    {
+      register int c = getc (stream);
+      if (p == pend)
+       {
+         linebuffer->size *= 2;
+         buffer = (char *) xrealloc (buffer, linebuffer->size);
+         p += buffer - linebuffer->buffer;
+         pend = buffer + linebuffer->size;
+         linebuffer->buffer = buffer;
+       }
+      if (c == EOF)
+       {
+         chars_deleted = 0;
+         break;
+       }
+      if (c == '\n')
+       {
+         if (p[-1] == '\r' && p > buffer)
+           {
+             *--p = '\0';
+             chars_deleted = 2;
+           }
+         else
+           {
+             *p = '\0';
+             chars_deleted = 1;
+           }
+         break;
+       }
+      *p++ = c;
+    }
+
+  return (p - buffer + chars_deleted);
+}
+
+/*
+ * Like malloc but get fatal error if memory is exhausted.
+ */
+static long *
+xmalloc (unsigned int size)
+{
+  long *result = (long *) malloc (size);
+  if (result == NULL)
+    fatal ("virtual memory exhausted");
+  return result;
+}
+
+static long *
+xrealloc (void *ptr, unsigned int size)
+{
+  long *result = (long *) realloc (ptr, size);
+  if (result == NULL)
+    fatal ("virtual memory exhausted");
+  return result;
+}
+
+static void
+fatal (char *message)
+{
+  fprintf (stderr, "%s: %s\n", progname, message);
+  exit (BAD);
+}
+
diff --git a/lib-src/config.values.in b/lib-src/config.values.in
new file mode 100644 (file)
index 0000000..6e2c24b
--- /dev/null
@@ -0,0 +1,125 @@
+;;; Do not edit this file!
+;;; This file was automatically generated, by the config.values.sh script,
+;;; from configure, which was itself automatically generated from configure.in
+;;;
+;;; See lisp/util/config.el for details on how this file is used.
+;;;
+;;; You are trapped in a twisty maze of strange-looking files, all autogenerated...
+
+;;; configure        is created, from configure.in,     by autoconf
+;;; config.values.in is created, from configure,        by config.values.sh
+;;; config.values    is created, from config.values.in, by configure
+;;; config.values    is read by lisp/utils/config.el,
+;;;                  to create the (Lisp object) config-value-hash-table
+
+;;; Variables defined in configure by AC_SUBST follow:
+;;; (These are used in Makefiles)
+
+ALLOCA "@ALLOCA@"
+ARCHLIBDIR "@ARCHLIBDIR@"
+ARCHLIBDIR_USER_DEFINED "@ARCHLIBDIR_USER_DEFINED@"
+CC "@CC@"
+CFLAGS "@CFLAGS@"
+CPP "@CPP@"
+CPPFLAGS "@CPPFLAGS@"
+CXXFLAGS "@CXXFLAGS@"
+DEFS "@DEFS@"
+ETCDIR "@ETCDIR@"
+ETCDIR_USER_DEFINED "@ETCDIR_USER_DEFINED@"
+EXEC_PREFIX "@EXEC_PREFIX@"
+INFODIR "@INFODIR@"
+INFODIR_USER_DEFINED "@INFODIR_USER_DEFINED@"
+INFOPATH "@INFOPATH@"
+INFOPATH_USER_DEFINED "@INFOPATH_USER_DEFINED@"
+INSTALL "@INSTALL@"
+INSTALL_ARCH_DEP_SUBDIR "@INSTALL_ARCH_DEP_SUBDIR@"
+INSTALL_DATA "@INSTALL_DATA@"
+INSTALL_PROGRAM "@INSTALL_PROGRAM@"
+LDFLAGS "@LDFLAGS@"
+LIBS "@LIBS@"
+LISPDIR "@LISPDIR@"
+LISPDIR_USER_DEFINED "@LISPDIR_USER_DEFINED@"
+LN_S "@LN_S@"
+LOCKDIR "@LOCKDIR@"
+LOCKDIR_USER_DEFINED "@LOCKDIR_USER_DEFINED@"
+MAKE_SUBDIR "@MAKE_SUBDIR@"
+PACKAGE_PATH "@PACKAGE_PATH@"
+PACKAGE_PATH_USER_DEFINED "@PACKAGE_PATH_USER_DEFINED@"
+PREFIX "@PREFIX@"
+PROGNAME "@PROGNAME@"
+RANLIB "@RANLIB@"
+RECURSIVE_MAKE "@RECURSIVE_MAKE@"
+SET_MAKE "@SET_MAKE@"
+SRC_SUBDIR_DEPS "@SRC_SUBDIR_DEPS@"
+SUBDIR_MAKEFILES "@SUBDIR_MAKEFILES@"
+X_CFLAGS "@X_CFLAGS@"
+X_EXTRA_LIBS "@X_EXTRA_LIBS@"
+X_LIBS "@X_LIBS@"
+X_PRE_LIBS "@X_PRE_LIBS@"
+YACC "@YACC@"
+archlibdir "@archlibdir@"
+bindir "@bindir@"
+bitmapdir "@bitmapdir@"
+blddir "@blddir@"
+c_switch_all "@c_switch_all@"
+c_switch_general "@c_switch_general@"
+c_switch_window_system "@c_switch_window_system@"
+canonical "@canonical@"
+configuration "@configuration@"
+configure_input "@configure_input@"
+datadir "@datadir@"
+dll_cflags "@dll_cflags@"
+dll_ld "@dll_ld@"
+dll_lflags "@dll_lflags@"
+dll_oflags "@dll_oflags@"
+dnd_objs "@dnd_objs@"
+docdir "@docdir@"
+dynodump_arch "@dynodump_arch@"
+etcdir "@etcdir@"
+exec_prefix "@exec_prefix@"
+extra_objs "@extra_objs@"
+includedir "@includedir@"
+infodir "@infodir@"
+infopath "@infopath@"
+install_pp "@install_pp@"
+internal_makefile_list "@internal_makefile_list@"
+ld "@ld@"
+ld_dynamic_link_flags "@ld_dynamic_link_flags@"
+ld_libs_all "@ld_libs_all@"
+ld_libs_general "@ld_libs_general@"
+ld_libs_window_system "@ld_libs_window_system@"
+ld_switch_all "@ld_switch_all@"
+ld_switch_general "@ld_switch_general@"
+ld_switch_shared "@ld_switch_shared@"
+ld_switch_window_system "@ld_switch_window_system@"
+lib_gcc "@lib_gcc@"
+libdir "@libdir@"
+libexecdir "@libexecdir@"
+libs_xauth "@libs_xauth@"
+lispdir "@lispdir@"
+localstatedir "@localstatedir@"
+lockdir "@lockdir@"
+lwlib_objs "@lwlib_objs@"
+machfile "@machfile@"
+mandir "@mandir@"
+native_sound_lib "@native_sound_lib@"
+oldincludedir "@oldincludedir@"
+opsysfile "@opsysfile@"
+package_path "@package_path@"
+pkgdir "@pkgdir@"
+prefix "@prefix@"
+program_transform_name "@program_transform_name@"
+sbindir "@sbindir@"
+sharedstatedir "@sharedstatedir@"
+sound_cflags "@sound_cflags@"
+srcdir "@srcdir@"
+start_files "@start_files@"
+start_flags "@start_flags@"
+statedir "@statedir@"
+sysconfdir "@sysconfdir@"
+top_srcdir "@top_srcdir@"
+version "@version@"
+
+;;; Variables defined in configure by AC_DEFINE and AC_DEFINE_UNQUOTED follow:
+;;; (These are used in C code)
+
diff --git a/lib-src/config.values.sh b/lib-src/config.values.sh
new file mode 100644 (file)
index 0000000..d755d0c
--- /dev/null
@@ -0,0 +1,76 @@
+#! /bin/sh
+# config.values.sh --- create config.values.in from ../configure
+
+# Author:      Martin Buchholz
+# Maintainer:  Martin Buchholz
+# Keywords:    configure elisp report-xemacs-bugs
+
+# 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; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+### Commentary:
+
+## Extract all the @foo@ configuration symbols from ../configure
+## to make them available to elisp later (see util/config.el)
+## Primarily useful for creating ridiculously verbose bug reports.
+##
+## See lisp/utils/config.el, ../configure.in,
+## and the Autoconf documentation on AC_OUTPUT, for more details.
+##
+## This script needs only to be run occasionally (before a Net release)
+## by an XEmacs Maintainer (consider yourself so blessed, if you are
+## actually reading this commentary).
+##
+if test ! -r ./configure; then
+  cd ..
+  if test ! -r ./configure; then
+    echo "Can't find configure!";
+    exit 1;
+  fi
+fi
+
+exec < ./configure > "lib-src/config.values.in"
+cat <<\EOF
+;;; Do not edit this file!
+;;; This file was automatically generated, by the config.values.sh script,
+;;; from configure, which was itself automatically generated from configure.in
+;;;
+;;; See lisp/util/config.el for details on how this file is used.
+;;;
+;;; You are trapped in a twisty maze of strange-looking files, all autogenerated...
+
+;;; configure        is created, from configure.in,     by autoconf
+;;; config.values.in is created, from configure,        by config.values.sh
+;;; config.values    is created, from config.values.in, by configure
+;;; config.values    is read by lisp/utils/config.el,
+;;;                  to create the (Lisp object) config-value-hash-table
+
+;;; Variables defined in configure by AC_SUBST follow:
+;;; (These are used in Makefiles)
+
+EOF
+sed -n '/^s%@\([A-Za-z_][A-Za-z_]*\)@%\$\1%g$/ {
+  s/^s%@\([A-Za-z_][A-Za-z_]*\)@%\$\1%g$/\1 "@\1@"/
+  p
+}' | \
+sort -u
+cat <<\EOF
+
+;;; Variables defined in configure by AC_DEFINE and AC_DEFINE_UNQUOTED follow:
+;;; (These are used in C code)
+
+EOF
diff --git a/lib-src/cvtmail.c b/lib-src/cvtmail.c
new file mode 100644 (file)
index 0000000..962ec3a
--- /dev/null
@@ -0,0 +1,165 @@
+/* Copyright (C) 1985, 1993, 1994 Free Software Foundation
+This file is part of GNU Emacs.
+
+GNU Emacs 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.
+
+GNU Emacs 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 GNU Emacs; see the file COPYING.  If not, write to
+the Free the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+/* Synched up with: FSF 19.28. */
+
+/* cvtmail:
+ * Program to convert oldstyle goslings emacs mail directories into
+ * gnu-rmail format.  Program expects a directory called Messages to
+ * exist in your home directory, containing individual mail messages in
+ * separate files in the standard gosling emacs mail reader format.
+ *
+ * Program takes one argument: an output file.  THis file will contain
+ * all the messages in Messages directory, in berkeley mail format.
+ * If no output file is mentioned, messages are put in ~/OMAIL.
+ *
+ * In order to get rmail to read the messages, the resulting file must
+ * be mv'ed to ~/mbox, and then have rmail invoked on them.
+ * 
+ * Author: Larry Kolodney, 1985
+ */
+
+
+#include <../src/config.h>
+
+#include <stdio.h>
+#include <string.h>
+
+#if __STDC__ || defined(STDC_HEADERS)
+# include <stdlib.h>
+#else
+char *malloc ();
+char *getenv ();
+#endif
+static void *xmalloc (unsigned int);
+static void *xrealloc (char *ptr, unsigned int);
+static void skip_to_lf (FILE *stream);
+static void fatal (CONST char *s1, CONST char *s2);
+static void error (CONST char *s1, CONST char *s2);
+
+int
+main (argc, argv)
+     int argc;
+     char *argv[];
+{
+  char *hd;
+  char *md;
+  char *mdd;
+  char *mfile;
+  char *cf;
+  int cflen;
+  FILE *mddf;
+  FILE *mfilef;
+  FILE *cff;
+  char pre[10];
+  char name[14];
+  int c;
+
+  hd = (char *) getenv ("HOME");
+
+  md = (char *) xmalloc (strlen (hd) + 10);
+  strcpy (md, hd);
+  strcat (md, "/Messages");
+
+  mdd = (char *) xmalloc (strlen (md) + 11);
+  strcpy (mdd, md);
+  strcat (mdd, "/Directory");
+
+  cflen = 100;
+  cf = (char *) xmalloc (cflen);
+
+  mddf = fopen (mdd, "r");
+  if (argc > 1)
+    mfilef = fopen (argv[1], "w");
+  else
+    {
+      mfile = (char *) xmalloc (strlen (hd) + 7);
+      strcpy (mfile, hd);
+      strcat (mfile, "/OMAIL");
+      mfilef = fopen (mfile, "w");
+    }
+  skip_to_lf (mddf);
+  while (fscanf (mddf, "%4c%14[0123456789]", pre, name) != EOF)
+    {
+      int comp_len = strlen (md) + strlen (name) + 2;
+      if (cflen < comp_len)
+       {
+         cflen = strlen (md) + strlen (name) + 2;
+         cf = (char *) xrealloc (cf, cflen);
+       }
+      strcpy (cf, md);
+      strcat (cf,"/");
+      strcat (cf, name);
+      cff = fopen (cf, "r");
+      while ((c = getc(cff)) != EOF)
+       putc (c, mfilef);
+      putc ('\n', mfilef);
+      skip_to_lf (mddf);
+     fclose (cff);
+    }
+  fclose (mddf);
+  fclose (mfilef);    
+  return 0;
+}
+
+static void
+skip_to_lf (stream)
+     FILE *stream;
+{
+  register int c;
+  while ((c = getc(stream)) != '\n')
+    ;
+}
+
+static void *
+xmalloc (size)
+     unsigned size;
+{
+  char *result = (char *) malloc (size);
+  if (!result)
+    fatal ("virtual memory exhausted", 0);
+  return result;
+}
+
+static void *
+xrealloc (ptr, size)
+     char *ptr;
+     unsigned size;
+{
+  char *result = (char *) realloc (ptr, size);
+  if (!result)
+    fatal ("virtual memory exhausted", 0);
+  return result;
+}
+
+/* Print error message and exit.  */
+
+static void
+fatal (CONST char *s1, CONST char *s2)
+{
+  error (s1, s2);
+  exit (1);
+}
+
+static void
+error (CONST char *s1, CONST char *s2)
+{
+  fprintf (stderr, "cvtmail: ");
+  fprintf (stderr, s1, s2);
+  fprintf (stderr, "\n");
+}
diff --git a/lib-src/digest-doc.c b/lib-src/digest-doc.c
new file mode 100644 (file)
index 0000000..b4f7ca2
--- /dev/null
@@ -0,0 +1,52 @@
+/* Give this program DOCSTR.mm.nn as standard input
+   and it outputs to standard output
+   a file of nroff output containing the doc strings.
+
+   See also sorted-doc.c, which produces similar output
+   but in texinfo format and sorted by function/variable name.  */
+
+#ifdef emacs
+#include <../src/config.h>
+#endif
+#include <stdio.h>
+
+int
+main ()
+{
+  register int ch;
+  register int notfirst = 0;
+
+  printf (".TL\n");
+  printf ("Command Summary for GNU Emacs\n");
+  printf (".AU\nRichard M. Stallman\n");
+  while ((ch = getchar ()) != EOF)
+    {
+      if (ch == '\037')
+       {
+         if (notfirst)
+           printf ("\n.DE");
+         else
+           notfirst = 1;
+
+         printf ("\n.SH\n");
+
+         ch = getchar ();
+         printf (ch == 'F' ? "Function " : "Variable ");
+
+         while ((ch = getchar ()) != '\n')  /* Changed this line */
+           {
+             if (ch != EOF)
+                 putchar (ch);
+             else
+               {
+                 ungetc (ch, stdin);
+                 break;
+               }
+           }
+         printf ("\n.DS L\n");
+       }
+      else
+       putchar (ch);
+    }
+  return 0;
+}
diff --git a/lib-src/ellcc.c b/lib-src/ellcc.c
new file mode 100644 (file)
index 0000000..acc3abe
--- /dev/null
@@ -0,0 +1,681 @@
+/* ellcc.c - front-end for compiling Emacs modules
+Copyright (C) 1998, 1999 J. Kean Johnston.
+
+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; see the file COPYING.  If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+
+Author: J. Kean Johnston (jkj@sco.com).
+Please mail bugs and suggestions to the XEmacs maintainer.
+*/
+
+/*
+Here's the scoop. We would really like this to be a shell script, but
+the various Windows platforms dont have reliable scripting that suits
+our needs. We dont want to reply on perl or some other such language
+so we have to roll our own executable to act as a front-end for the
+compiler.
+
+This program is used to invoke the compiler, the linker and to generate
+the module specific documentation and initialization code.  We assume we
+are in 'compile' mode unless we encounter an argument which tells us
+that we're not.  We take all arguments and pass them on directly to the
+compiler, except for a few which are specific to this program:
+
+  --mode=VALUE      This sets the program mode. VALUE can be one of
+                    compile, link, init or verbose.
+  --mod-name=NAME   Sets the module name to the string NAME.
+  --mod-title=TITLE Sets the module title to the string TITLE.
+  --mod-version=VER Sets the module version to the string VER.
+
+The idea is that Makefiles will use ellcc as the compiler for making
+dynamic Emacs modules, and life should be as simple as:
+
+  make CC=ellcc LD='ellcc --mode=link'
+
+The only additional requirement is an entry in the Makefile to produce
+the module initialization file, which will usually be something along
+the lines of:
+
+  modinit.c: $(SRCS)
+             ellcc --mode=init --mod-name=\"$(MODNAME)\" \
+               --mod-title=\"$(MODTITLE)\" --mod-version=\"$(MODVERSION)\" \
+               -o $@ $(SRCS)
+
+See the samples for more details.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef MSDOS
+# include <fcntl.h>
+# include <sys/param.h>
+# include <io.h>
+# ifndef HAVE_CONFIG_H
+#   define DOS_NT
+#   include <sys/config.h>
+# endif
+#endif /* MSDOS */
+
+#ifdef WINDOWSNT
+# include <stdlib.h>
+# include <fcntl.h>
+# include <string.h>
+# include <io.h>
+# define MAXPATHLEN _MAX_PATH
+# ifdef HAVE_CONFIG_H
+#   undef HAVE_NTGUI
+# else
+#   define DOS_NT
+#   define HAVE_GETCWD
+# endif /* not HAVE_CONFIG_H */
+#endif /* WINDOWSNT */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+  /* On some systems, Emacs defines static as nothing for the sake
+     of unexec.  We don't want that here since we don't use unexec. */
+# undef static
+#endif /* HAVE_CONFIG_H */
+
+#if !defined (WINDOWSNT) && defined (STDC_HEADERS)
+#include <stdlib.h>
+#include <string.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#else
+# ifdef HAVE_GETCWD
+    extern char *getcwd ();
+# endif
+#endif /* HAVE_UNISTD_H */
+
+#include <stdio.h>
+#include <ctype.h>
+#include <errno.h>
+#ifndef errno
+  extern int errno;
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#define EMODULES_GATHER_VERSION
+#include "emodules.h"
+#include "ellcc.h"
+
+#if !defined (S_ISREG) && defined (S_IFREG)
+# define S_ISREG(m)    (((m) & S_IFMT) == S_IFREG)
+#endif
+
+/* Exit codes for success and failure.  */
+#ifdef VMS
+# define       GOOD    1
+# define       BAD     0
+#else
+# define       GOOD    0
+# define       BAD     1
+#endif
+
+#define DEBUG
+
+#ifndef HAVE_SHLIB
+int
+main()
+{
+  fprintf (stderr, "Dynamic modules not supported on this platform\n");
+  return (BAD);
+}
+#else
+
+/*
+ * Try to figure out the commands we need to use to create shared objects,
+ * and how to compile for PIC mode.
+ */
+
+/*
+ *     xnew, xrnew -- allocate, reallocate storage
+ *
+ * SYNOPSIS:   Type *xnew (int n, Type);
+ *             Type *xrnew (OldPointer, int n, Type);
+ */
+#ifdef chkmalloc
+# include "chkmalloc.h"
+# define xnew(n,Type)    ((Type *) trace_malloc (__FILE__, __LINE__, \
+                                                 (n) * sizeof (Type)))
+# define xrnew(op,n,Type) ((Type *) trace_realloc (__FILE__, __LINE__, \
+                                                  (op), (n) * sizeof (Type)))
+#else
+# define xnew(n,Type)    ((Type *) xmalloc ((n) * sizeof (Type)))
+# define xrnew(op,n,Type) ((Type *) xrealloc ((op), (n) * sizeof (Type)))
+#endif
+long *xmalloc (), *xrealloc ();
+void fatal (), pfatal ();
+char *ellcc_strchr (), *ellcc_strrchr ();
+void add_to_argv ();
+void do_compile_mode(), do_link_mode(), do_init_mode();
+
+#define SSTR(S) ((S)?(S):"")
+
+#define ELLCC_COMPILE_MODE      0
+#define ELLCC_LINK_MODE         1
+#define ELLCC_INIT_MODE         2
+
+int ellcc_mode = ELLCC_COMPILE_MODE;
+char *progname;
+char *mod_name = (char *)0, *mod_version = (char *)0, *mod_title = (char *)0;
+char *mod_output = (char *)0;
+int verbose = 0;
+char **exec_argv;
+int exec_argc = 1, *exec_args;
+int real_argc = 0;
+int prog_argc;
+char **prog_argv;
+
+/*
+ * We allow the user to over-ride things in the environment
+ */
+char *ellcc, *ellld, *ellcflags, *ellldflags, *ellpicflags, *elldllflags;
+#define OVERENV(STR,EVAR,DFLT) \
+  STR = getenv(EVAR); \
+  if ((STR) == (char *)0) \
+    STR = DFLT
+
+int
+main (argc, argv)
+     int argc;
+     char *argv[];
+{
+  char *tmp;
+  int i, done_mode = 0;
+
+  prog_argc = argc;
+  prog_argv = argv;
+
+#if defined(MSDOS) || defined(WINDOWSNT)
+  tmp = ellcc_strrchr (argv[0], '\\');
+  if (tmp != (char *)0)
+    tmp++;
+#elif !defined (VMS)
+  tmp = ellcc_strrchr (argv[0], '/');
+  if (tmp != (char *)0)
+    tmp++;
+#else
+  tmp = argv[0];
+#endif
+
+  if (tmp != (char *)0)
+    progname = tmp;
+  else
+    progname = argv[0];
+
+  tmp = &progname[strlen(progname)-2];
+  if (strcmp (tmp, "cc") == 0)
+    ellcc_mode = ELLCC_COMPILE_MODE;
+  else if (strcmp (tmp, "ld") == 0)
+    ellcc_mode = ELLCC_LINK_MODE;
+  else if (strcmp (tmp, "it") == 0)
+    ellcc_mode = ELLCC_INIT_MODE;
+
+  exec_argv = xnew(argc + 20, char *);
+  exec_args = xnew(argc, int);
+  for (i = 0; i < argc; i++)
+    exec_args[i] = -1;
+
+  if (argc < 2)
+    fatal ("too few arguments", (char *)0);
+
+  exec_args[0] = 0;
+
+  for (i = 1; i < argc; i++)
+    {
+      if (strncmp (argv[i], "--mode=", 7) == 0)
+        {
+          char *modeopt = argv[i] + 7;
+
+          if (done_mode && strcmp (modeopt, "verbose"))
+            fatal ("more than one mode specified");
+          if (strcmp (modeopt, "link") == 0)
+            {
+              done_mode++;
+              ellcc_mode = ELLCC_LINK_MODE;
+            }
+          else if (strcmp (modeopt, "compile") == 0)
+            {
+              done_mode++;
+              ellcc_mode = ELLCC_COMPILE_MODE;
+            }
+          else if (strcmp (modeopt, "init") == 0)
+            {
+              done_mode++;
+              ellcc_mode = ELLCC_INIT_MODE;
+            }
+          else if (strcmp (modeopt, "verbose") == 0)
+            verbose += 1;
+        }
+      else if (strcmp (argv[i], "--mod-location") == 0)
+        {
+          printf ("%s\n", ELLCC_MODDIR);
+          return 0;
+        }
+      else if (strcmp (argv[i], "--mod-site-location") == 0)
+        {
+          printf ("%s\n", ELLCC_SITEMODS);
+          return 0;
+        }
+      else if (strcmp (argv[i], "--mod-archdir") == 0)
+        {
+          printf ("%s\n", ELLCC_ARCHDIR);
+          return 0;
+        }
+      else if (strcmp (argv[i], "--mod-config") == 0)
+        {
+          printf ("%s\n", ELLCC_CONFIG);
+          return 0;
+        }
+      else if (strncmp (argv[i], "--mod-name=", 10) == 0)
+        mod_name = argv[i] + 11;
+      else if (strncmp (argv[i], "--mod-title=", 11) == 0)
+        mod_title = argv[i] + 12;
+      else if (strncmp (argv[i], "--mod-version=", 13) == 0)
+        mod_version = argv[i] + 14;
+      else if (strncmp (argv[i], "--mod-output=", 12) == 0)
+        mod_output = argv[i] + 13;
+      else
+        {
+          exec_args[exec_argc] = i;
+          exec_argc++;
+        }
+    }
+
+  if (ellcc_mode == ELLCC_LINK_MODE && mod_output == (char *)0)
+    fatal ("must specify --mod-output when linking", (char *)0);
+  if (ellcc_mode == ELLCC_INIT_MODE && mod_output == (char *)0)
+    fatal ("must specify --mod-output when creating init file", (char *)0);
+  if (ellcc_mode == ELLCC_INIT_MODE && mod_name == (char *)0)
+    fatal ("must specify --mod-name when creating init file", (char *)0);
+
+  /*
+   * We now have the list of arguments to pass to the compiler or
+   * linker (or to process for doc files). We can do the real work
+   * now.
+   */
+  if (verbose)
+    printf ("ellcc driver version %s for EMODULES version %s (%ld)\n",
+            ELLCC_EMACS_VER, EMODULES_VERSION, EMODULES_REVISION);
+#ifdef DEBUG
+  if (verbose >= 2)
+    {
+      printf ("              mode = %d (%s)\n", ellcc_mode,
+              ellcc_mode == ELLCC_COMPILE_MODE ? "compile" :
+              ellcc_mode == ELLCC_LINK_MODE ? "link" : "init");
+      printf ("       module_name = \"%s\"\n", SSTR(mod_name));
+      printf ("      module_title = \"%s\"\n", SSTR(mod_title));
+      printf ("    module_version = \"%s\"\n", SSTR(mod_version));
+
+      printf ("                CC = %s\n", ELLCC_CC);
+      printf ("            CFLAGS = %s\n", ELLCC_CFLAGS);
+      printf ("      CC PIC flags = %s\n", ELLCC_DLL_CFLAGS);
+      printf ("                LD = %s\n", ELLCC_DLL_LD);
+      printf ("           LDFLAGS = %s\n", ELLCC_DLL_LDFLAGS);
+      printf ("      architecture = %s\n", ELLCC_CONFIG);
+      printf (" Include directory = %s/include\n", ELLCC_ARCHDIR);
+      printf ("\n");
+    }
+#endif
+
+  if (exec_argc < 2)
+    fatal ("too few arguments");
+
+  /*
+   * Get the over-rides from the environment
+   */
+  OVERENV(ellcc, "ELLCC", ELLCC_CC);
+  OVERENV(ellld, "ELLLD", ELLCC_DLL_LD);
+  OVERENV(ellcflags, "ELLCFLAGS", ELLCC_CFLAGS);
+  OVERENV(ellldflags, "ELLLDFLAGS", ELLCC_LDFLAGS);
+  OVERENV(elldllflags, "ELLDLLFLAGS", ELLCC_DLL_LDFLAGS);
+  OVERENV(ellpicflags, "ELLPICFLAGS", ELLCC_DLL_CFLAGS);
+
+  if (ellcc_mode == ELLCC_COMPILE_MODE)
+    do_compile_mode();
+  else if (ellcc_mode == ELLCC_LINK_MODE)
+    do_link_mode();
+  else
+    do_init_mode();
+
+  /*
+   * The arguments to pass on to the desired program have now been set
+   * up and we can run the program.
+   */
+  if (verbose)
+    {
+      for (i = 0; i < real_argc; i++)
+        printf ("%s ", exec_argv[i]);
+      printf ("\n");
+      fflush (stdout);
+    }
+  exec_argv[real_argc] = (char *)0; /* Terminate argument list */
+
+  i = execvp (exec_argv[0], exec_argv);
+  if (verbose)
+    printf ("%s exited with status %d\n", exec_argv[0], i);
+  return i;
+}
+
+/* Like malloc but get fatal error if memory is exhausted.  */
+long *
+xmalloc (size)
+     unsigned int size;
+{
+  long *result = (long *) malloc (size);
+  if (result == NULL)
+    fatal ("virtual memory exhausted", (char *)NULL);
+  return result;
+}
+
+long *
+xrealloc (ptr, size)
+     char *ptr;
+     unsigned int size;
+{
+  long *result =  (long *) realloc (ptr, size);
+  if (result == NULL)
+    fatal ("virtual memory exhausted", (char *)NULL);
+  return result;
+}
+
+/* Print error message and exit.  */
+void
+fatal (s1, s2)
+     char *s1, *s2;
+{
+  fprintf (stderr, "%s: ", progname);
+  fprintf (stderr, s1, s2);
+  fprintf (stderr, "\n");
+  exit (BAD);
+}
+
+void
+pfatal (s1)
+     char *s1;
+{
+  perror (s1);
+  exit (BAD);
+}
+
+/*
+ * Return the ptr in sp at which the character c last
+ * appears; NULL if not found
+ *
+ * Identical to System V strrchr, included for portability.
+ */
+char *
+ellcc_strrchr (sp, c)
+     register char *sp, c;
+{
+  register char *r;
+
+  r = NULL;
+  do
+    {
+      if (*sp == c)
+       r = sp;
+  } while (*sp++);
+  return r;
+}
+
+/*
+ * Return the ptr in sp at which the character c first
+ * appears; NULL if not found
+ *
+ * Identical to System V strchr, included for portability.
+ */
+char *
+ellcc_strchr (sp, c)
+     register char *sp, c;
+{
+  do
+    {
+      if (*sp == c)
+       return sp;
+    } while (*sp++);
+  return NULL;
+}
+
+/*
+ * Add a string to the argument vector list that will be passed on down
+ * to the compiler or linker. We need to split individual words into
+ * arguments, taking quoting into account. This can get ugly.
+ */
+void
+add_to_argv (str)
+     CONST char *str;
+{
+  int sm = 0;
+  CONST char *s = (CONST char *)0;
+
+  if ((str == (CONST char *)0) || (str[0] == '\0'))
+    return;
+
+  while (*str)
+    {
+      switch (sm)
+        {
+        case 0: /* Start of case - string leading whitespace */
+          if (isspace (*str))
+            str++;
+          else
+            {
+              sm = 1; /* Change state to non-whitespace */
+              s = str; /* Mark the start of THIS argument */
+            }
+          break;
+
+        case 1: /* Non-whitespace character. Mark the start */
+          if (isspace (*str))
+            {
+              /* Reached the end of the argument. Add it. */
+              int l = str-s;
+              exec_argv[real_argc] = xnew (l+2, char);
+              strncpy (exec_argv[real_argc], s, l);
+              exec_argv[real_argc][l] = '\0';
+              real_argc++;
+              sm = 0; /* Back to start state */
+              s = (CONST char *)0;
+              break;
+            }
+          else if (*str == '\\')
+            {
+              sm = 2; /* Escaped character */
+              str++;
+              break;
+            }
+          else if (*str == '\'')
+            {
+              /* Start of quoted string (single quotes) */
+              sm = 3;
+            }
+          else if (*str == '"')
+            {
+              /* Start of quoted string (double quotes) */
+              sm = 4;
+            }
+          else
+            {
+              /* This was just a normal character. Advance the pointer. */
+              str++;
+            }
+          break;
+
+        case 2: /* Escaped character */
+          str++; /* Preserve the quoted character */
+          sm = 1; /* Go back to gathering state */
+          break;
+
+        case 3: /* Inside single quoted string */
+          if (*str == '\'')
+            sm = 1;
+          str++;
+          break;
+
+        case 4: /* inside double quoted string */
+          if (*str == '"')
+            sm = 1;
+          str++;
+          break;
+        }
+    }
+
+  if (s != (CONST char *)0)
+    {
+      int l = str-s;
+      exec_argv[real_argc] = xnew (l+2, char);
+      strncpy (exec_argv[real_argc], s, l);
+      exec_argv[real_argc][l] = '\0';
+      real_argc++;
+      s = (CONST char *)0;
+    }
+}
+
+/*
+ * For compile mode, things are pretty straight forward. All we need to do
+ * is build up the argument vector and exec() it. We must just make sure
+ * that we get all of the required arguments in place.
+ */
+void
+do_compile_mode()
+{
+  int i;
+  char ts[4096]; /* Plenty big enough */
+
+  add_to_argv (ellcc);
+  add_to_argv (ellcflags);
+  add_to_argv (ellpicflags);
+  add_to_argv ("-DPIC");
+  add_to_argv ("-DEMACS_MODULE");
+#ifdef XEMACS
+  add_to_argv ("-DXEMACS_MODULE"); /* Cover both cases */
+  add_to_argv ("-Dxemacs");
+#endif
+  add_to_argv ("-Demacs");
+  sprintf (ts, "-I%s/include", ELLCC_ARCHDIR);
+  add_to_argv (ts);
+  add_to_argv (ELLCC_CF_ALL);
+  for (i = 1; i < exec_argc; i++)
+    exec_argv[real_argc++] = strdup (prog_argv[exec_args[i]]);
+}
+
+/*
+ * For link mode, things are a little bit more complicated. We need to
+ * insert the linker commands first, replace any occurrence of ELLSONAME
+ * with the desired output file name, insert the output arguments, then
+ * all of the provided arguments, then the final post arguments. Once
+ * all of this has been done, the argument vector is ready to run.
+ */
+void
+do_link_mode()
+{
+  int i,x;
+  char *t, ts[4096]; /* Plenty big enough */
+
+  add_to_argv (ellld);
+  add_to_argv (ellldflags);
+  add_to_argv (elldllflags);
+  add_to_argv (ELLCC_DLL_LDO);
+  add_to_argv (mod_output);
+  for (i = 1; i < exec_argc; i++)
+    exec_argv[real_argc++] = strdup (prog_argv[exec_args[i]]);
+  add_to_argv (ELLCC_DLL_POST);
+
+  /*
+   * Now go through each argument and replace ELLSONAME with mod_output.
+   */
+  for (i = 0; i < real_argc; i++)
+    {
+      x = 0;
+      ts[0] = '\0';
+
+      t = exec_argv[i];
+      while (*t)
+        {
+          if (*t == 'E')
+            {
+              if (strncmp (t, "ELLSONAME", 9) == 0)
+                {
+                  strcat (ts, mod_output);
+                  t += 8;
+                  x += strlen (mod_output);
+                }
+              else
+                {
+                  ts[x] = *t;
+                  x++;
+                  ts[x] = '\0';
+                }
+            }
+          else
+            {
+              ts[x] = *t;
+              x++;
+              ts[x] = '\0';
+            }
+          t++;
+        }
+      free (exec_argv[i]);
+      exec_argv[i] = strdup (ts);
+    }
+}
+
+/*
+ * In init mode, things are a bit easier. We assume that the only things
+ * passed on the command line are the names of source files which the
+ * make-doc program will be processing. We prepare the output file with
+ * the header information first, as make-doc will append to the file by
+ * special dispensation.
+ */
+void
+do_init_mode()
+{
+  int i;
+  char ts[4096]; /* Plenty big enough */
+  char *mdocprog;
+  FILE *mout = fopen (mod_output, "w");
+
+  if (mout == (FILE *)0)
+    fatal ("failed to open output file", mod_output);
+  fprintf (mout, "/* DO NOT EDIT - AUTOMATICALLY GENERATED */\n\n");
+  fprintf (mout, "#include <emodules.h>\n\n");
+  fprintf (mout, "const long emodule_compiler = %ld;\n", EMODULES_REVISION);
+  fprintf (mout, "const char *emodule_name = \"%s\";\n", SSTR(mod_name));
+  fprintf (mout, "const char *emodule_version = \"%s\";\n", SSTR(mod_version));
+  fprintf (mout, "const char *emodule_title = \"%s\";\n", SSTR(mod_title));
+  fprintf (mout, "\n\n");
+  fprintf (mout, "void docs_of_%s()\n", SSTR(mod_name));
+  fclose (mout);
+
+  sprintf (ts, "%s/make-docfile", ELLCC_ARCHDIR);
+  OVERENV(mdocprog, "ELLMAKEDOC", ts);
+  add_to_argv (mdocprog);
+  sprintf (ts, "-E %s", mod_output);
+  add_to_argv (ts);
+  for (i = 1; i < exec_argc; i++)
+    exec_argv[real_argc++] = strdup (prog_argv[exec_args[i]]);
+}
+
+#endif /* HAVE_SHLIB */
+
diff --git a/lib-src/ellcc.h.in b/lib-src/ellcc.h.in
new file mode 100644 (file)
index 0000000..7c3e49d
--- /dev/null
@@ -0,0 +1,33 @@
+/* DO NOT EDIT THIS FILE!!!! */
+
+/* Most of this is required due to a bug in the GCC compiler driver
+   which prevents us from passing this on the command line. It also
+   reduces the compiler command line length, which can be a problem
+   on some systems. */
+
+#ifndef ELLCC_HDR
+#define ELLCC_HDR
+
+#define ELLCC_CC            "@CC@"
+#define ELLCC_CFLAGS        "@CFLAGS@"
+#define ELLCC_CPPFLAGS      "@CPPFLAGS@"
+#define ELLCC_LDFLAGS       "@LDFLAGS@"
+#define ELLCC_CF_GENERAL    "@c_switch_general@"
+#define ELLCC_CF_ALL        "@c_switch_all@"
+#define ELLCC_LF_GENERAL    "@ld_switch_general@"
+#define ELLCC_LF_ALL        "@ld_switch_all@"
+#define ELLCC_LIBS_GENERAL  "@ld_libs_general@"
+#define ELLCC_DLL_CFLAGS    "@dll_cflags@"
+#define ELLCC_DLL_LDFLAGS   "@dll_ldflags@"
+#define ELLCC_DLL_POST      "@dll_post@"
+#define ELLCC_DLL_LD        "@dll_ld@"
+#define ELLCC_DLL_LDO       "@dll_ldo@"
+#define ELLCC_CONFIG        "@configuration@"
+#define ELLCC_EMACS_VER     "@version@"
+#define ELLCC_PROGNAME      "@PROGNAME@"
+#define ELLCC_ARCHDIR       "@ARCHLIBDIR@"
+#define ELLCC_MODDIR        "@MODULEDIR@"
+#define ELLCC_SITEMODS      "@SITEMODULEDIR@"
+
+#endif /* ELLCC_HDR */
+
diff --git a/lib-src/emacs.csh b/lib-src/emacs.csh
new file mode 100644 (file)
index 0000000..f25404e
--- /dev/null
@@ -0,0 +1,25 @@
+# This defines a csh command named `edit' which resumes an
+# existing Emacs or starts a new one if none exists.
+# One way or another, any arguments are passed to Emacs to specify files
+# (provided you have loaded `resume.el').
+# - Michael DeCorte
+
+# These are the possible values of $whichjob
+# 1 = new ordinary emacs (the -nw is so that it doesn't try to do X)
+# 2 = resume emacs
+# 3 = new emacs under X (-i is so that you get a reasonable icon)
+# 4 = resume emacs under X
+# 5 = new emacs under suntools
+# 6 = resume emacs under suntools
+# 7 = new emacs under X and suntools - doesn't make any sense, so use X
+# 8 = resume emacs under X and suntools - doesn't make any sense, so use X
+set EMACS_PATTERN="^\[[0-9]\]  . Stopped ............ $EMACS"
+
+alias edit 'set emacs_command=("emacs -nw \!*" "fg %emacs" "emacs -i \!* &"\
+ "emacsclient \!* &" "emacstool \!* &" "emacsclient \!* &" "emacs -i \!* &"\
+ "emacsclient \!* &") ; \
+ jobs >! $HOME/.jobs; grep "$EMACS_PATTERN" < $HOME/.jobs >& /dev/null; \
+ @ isjob = ! $status; \
+ @ whichjob = 1 + $isjob + $?DISPLAY * 2 + $?WINDOW_PARENT * 4; \
+ test -S ~/.emacs_server && emacsclient \!* \
+ || echo `pwd` \!* >! ~/.emacs_args && eval $emacs_command[$whichjob]'
diff --git a/lib-src/etags.c b/lib-src/etags.c
new file mode 100644 (file)
index 0000000..e9ce59f
--- /dev/null
@@ -0,0 +1,5084 @@
+/* Tags file maker to go with GNU Emacs
+   Copyright (C) 1984, 87, 88, 89, 93, 94, 95, 98
+   Free Software Foundation, Inc. and Ken Arnold
+
+This file is not considered part of GNU Emacs.
+
+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 2 of the License, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/*
+ * Authors:
+ *     Ctags originally by Ken Arnold.
+ *     Fortran added by Jim Kleckner.
+ *     Ed Pelegri-Llopart added C typedefs.
+ *     Gnu Emacs TAGS format and modifications by RMS?
+ *     Sam Kendall added C++.
+ *     Francesco Potorti` reorganised C and C++ based on work by Joe Wells.
+ *     Regexp tags by Tom Tromey.
+ *
+ *     Francesco Potorti` (F.Potorti@cnuce.cnr.it) is the current maintainer.
+ */
+
+char pot_etags_version[] = "@(#) pot revision number is 13.7";
+
+#define        TRUE    1
+#define        FALSE   0
+
+#ifndef DEBUG
+# define DEBUG FALSE
+#endif
+
+#ifdef MSDOS
+# include <fcntl.h>
+# include <sys/param.h>
+# include <io.h>
+# ifndef HAVE_CONFIG_H
+#   define DOS_NT
+#   include <sys/config.h>
+# endif
+#endif /* MSDOS */
+
+#ifdef WINDOWSNT
+# include <stdlib.h>
+# include <fcntl.h>
+# include <string.h>
+# include <io.h>
+# define MAXPATHLEN _MAX_PATH
+# ifdef HAVE_CONFIG_H
+#   undef HAVE_NTGUI
+# else
+#   define DOS_NT
+#   define HAVE_GETCWD
+# endif /* not HAVE_CONFIG_H */
+#endif /* WINDOWSNT */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+  /* On some systems, Emacs defines static as nothing for the sake
+     of unexec.  We don't want that here since we don't use unexec. */
+# undef static
+# define ETAGS_REGEXPS         /* use the regexp features */
+# define LONG_OPTIONS          /* accept long options */
+#endif /* HAVE_CONFIG_H */
+
+#if !defined (WINDOWSNT) && defined (STDC_HEADERS)
+#include <stdlib.h>
+#include <string.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#else
+# ifdef HAVE_GETCWD
+    extern char *getcwd ();
+# endif
+#endif /* HAVE_UNISTD_H */
+
+#include <stdio.h>
+#include <ctype.h>
+#include <errno.h>
+#ifndef errno
+  extern int errno;
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if !defined (S_ISREG) && defined (S_IFREG)
+# define S_ISREG(m)    (((m) & S_IFMT) == S_IFREG)
+#endif
+
+#ifdef LONG_OPTIONS
+# include <getopt.h>
+#else
+# define getopt_long(argc,argv,optstr,lopts,lind) getopt (argc, argv, optstr)
+  extern char *optarg;
+  extern int optind, opterr;
+#endif /* LONG_OPTIONS */
+
+#ifdef ETAGS_REGEXPS
+# include <regex.h>
+#endif /* ETAGS_REGEXPS */
+
+/* Define CTAGS to make the program "ctags" compatible with the usual one.
+ Leave it undefined to make the program "etags", which makes emacs-style
+ tag tables and tags typedefs, #defines and struct/union/enum by default. */
+#ifdef CTAGS
+# undef  CTAGS
+# define CTAGS TRUE
+#else
+# define CTAGS FALSE
+#endif
+
+/* Exit codes for success and failure.  */
+#ifdef VMS
+# define       GOOD    1
+# define       BAD     0
+#else
+# define       GOOD    0
+# define       BAD     1
+#endif
+
+/* C extensions. */
+#define C_PLPL 0x00001         /* C++ */
+#define C_STAR 0x00003         /* C* */
+#define C_JAVA 0x00005         /* JAVA */
+#define YACC   0x10000         /* yacc file */
+
+#define streq(s,t)     ((DEBUG && (s) == NULL && (t) == NULL   \
+                         && (abort (), 1)) || !strcmp (s, t))
+#define strneq(s,t,n)  ((DEBUG && (s) == NULL && (t) == NULL   \
+                         && (abort (), 1)) || !strncmp (s, t, n))
+
+#define lowcase(c)     tolower ((char)c)
+
+#define CHARS 256              /* 2^sizeof(char) */
+#define CHAR(x)                ((unsigned int)x & (CHARS - 1))
+#define        iswhite(c)      (_wht[CHAR(c)]) /* c is white */
+#define notinname(c)   (_nin[CHAR(c)]) /* c is not in a name */
+#define        begtoken(c)     (_btk[CHAR(c)]) /* c can start token */
+#define        intoken(c)      (_itk[CHAR(c)]) /* c can be in token */
+#define        endtoken(c)     (_etk[CHAR(c)]) /* c ends tokens */
+
+
+/*
+ *     xnew, xrnew -- allocate, reallocate storage
+ *
+ * SYNOPSIS:   Type *xnew (int n, Type);
+ *             Type *xrnew (OldPointer, int n, Type);
+ */
+#ifdef chkmalloc
+# include "chkmalloc.h"
+# define xnew(n,Type)    ((Type *) trace_malloc (__FILE__, __LINE__, \
+                                                 (n) * sizeof (Type)))
+# define xrnew(op,n,Type) ((Type *) trace_realloc (__FILE__, __LINE__, \
+                                                  (op), (n) * sizeof (Type)))
+#else
+# define xnew(n,Type)    ((Type *) xmalloc ((n) * sizeof (Type)))
+# define xrnew(op,n,Type) ((Type *) xrealloc ((op), (n) * sizeof (Type)))
+#endif
+
+typedef int bool;
+
+typedef void Lang_function ();
+
+typedef struct
+{
+  char *suffix;
+  int sufflen;
+  char *command;               /* Takes one arg and decompresses to stdout */
+} compressor;
+
+typedef struct
+{
+  char *name;
+  Lang_function *function;
+  char **suffixes;
+  char **interpreters;
+} language;
+
+extern char *getenv ();
+
+/* Many compilers barf on this:
+       Lang_function Asm_labels;
+   so let's write it this way */
+void Asm_labels ();
+void C_entries ();
+void default_C_entries ();
+void plain_C_entries ();
+void Cjava_entries ();
+void Cobol_paragraphs ();
+void Cplusplus_entries ();
+void Cstar_entries ();
+void Erlang_functions ();
+void Fortran_functions ();
+void Yacc_entries ();
+void Lisp_functions ();
+void Pascal_functions ();
+void Perl_functions ();
+void Postscript_functions ();
+void Prolog_functions ();
+void Python_functions ();
+void Scheme_functions ();
+void TeX_functions ();
+void just_read_file ();
+
+compressor *get_compressor_from_suffix ();
+language *get_language_from_name ();
+language *get_language_from_interpreter ();
+language *get_language_from_suffix ();
+int total_size_of_entries ();
+long readline (), readline_internal ();
+#ifdef ETAGS_REGEXPS
+void analyse_regex ();
+void add_regex ();
+void free_patterns ();
+#endif /* ETAGS_REGEXPS */
+void error ();
+void suggest_asking_for_help ();
+void fatal (), pfatal ();
+void add_node ();
+
+void init ();
+void initbuffer ();
+void find_entries ();
+void free_tree ();
+void pfnote (), new_pfnote ();
+void process_file ();
+void put_entries ();
+void takeprec ();
+
+char *concat ();
+char *skip_spaces (), *skip_non_spaces ();
+char *savenstr (), *savestr ();
+char *etags_strchr (), *etags_strrchr ();
+char *etags_getcwd ();
+char *relative_filename (), *absolute_filename (), *absolute_dirname ();
+bool filename_is_absolute ();
+void canonicalize_filename ();
+void grow_linebuffer ();
+long *xmalloc (), *xrealloc ();
+
+\f
+char searchar = '/';           /* use /.../ searches */
+
+char *tagfile;                 /* output file */
+char *progname;                        /* name this program was invoked with */
+char *cwd;                     /* current working directory */
+char *tagfiledir;              /* directory of tagfile */
+FILE *tagf;                    /* ioptr for tags file */
+
+char *curfile;                 /* current input file name */
+language *curlang;             /* current language */
+
+int lineno;                    /* line number of current line */
+long charno;                   /* current character number */
+long linecharno;               /* charno of start of current line */
+char *dbp;                     /* pointer to start of current tag */
+
+typedef struct node_st
+{                              /* sorting structure            */
+  char *name;                  /* function or type name        */
+  char *file;                  /* file name                    */
+  bool is_func;                        /* use pattern or line no       */
+  bool been_warned;            /* set if noticed dup           */
+  int lno;                     /* line number tag is on        */
+  long cno;                    /* character number line starts on */
+  char *pat;                   /* search pattern               */
+  struct node_st *left, *right;        /* left and right sons          */
+} node;
+
+node *head;                    /* the head of the binary tree of tags */
+
+/*
+ * A `linebuffer' is a structure which holds a line of text.
+ * `readline_internal' reads a line from a stream into a linebuffer
+ * and works regardless of the length of the line.
+ * SIZE is the size of BUFFER, LEN is the length of the string in
+ * BUFFER after readline reads it.
+ */
+typedef struct
+{
+  long size;
+  int len;
+  char *buffer;
+} linebuffer;
+
+linebuffer lb;                 /* the current line */
+linebuffer token_name;         /* used by C_entries as a temporary area */
+struct
+{
+  long linepos;
+  linebuffer lb;               /* used by C_entries instead of lb */
+} lbs[2];
+
+/* boolean "functions" (see init)      */
+bool _wht[CHARS], _nin[CHARS], _itk[CHARS], _btk[CHARS], _etk[CHARS];
+char
+  /* white chars */
+  *white = " \f\t\n\r",
+  /* not in a name */
+  *nonam = " \f\t\n\r(=,[;",
+  /* token ending chars */
+  *endtk = " \t\n\r\"'#()[]{}=-+%*/&|^~!<>;,.:?",
+  /* token starting chars */
+  *begtk = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz$~@",
+  /* valid in-token chars */
+  *midtk = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz$0123456789";
+
+bool append_to_tagfile;                /* -a: append to tags */
+/* The following four default to TRUE for etags, but to FALSE for ctags.  */
+bool typedefs;                 /* -t: create tags for C typedefs */
+bool typedefs_and_cplusplus;   /* -T: create tags for C typedefs, level */
+                               /* 0 struct/enum/union decls, and C++ */
+                               /* member functions. */
+bool constantypedefs;          /* -d: create tags for C #define, enum */
+                               /* constants and variables. */
+                               /* -D: opposite of -d.  Default under ctags. */
+bool globals;                  /* create tags for global variables */
+bool members;                  /* create tags for C member variables */
+bool update;                   /* -u: update tags */
+bool vgrind_style;             /* -v: create vgrind style index output */
+bool no_warnings;              /* -w: suppress warnings */
+bool cxref_style;              /* -x: create cxref style output */
+bool cplusplus;                        /* .[hc] means C++, not C */
+bool noindentypedefs;          /* -I: ignore indentation in C */
+
+#ifdef LONG_OPTIONS
+struct option longopts[] =
+{
+  { "append",                  no_argument,       NULL,     'a'   },
+  { "backward-search",         no_argument,       NULL,     'B'   },
+  { "c++",                     no_argument,       NULL,     'C'   },
+  { "cxref",                   no_argument,       NULL,     'x'   },
+  { "defines",                 no_argument,       NULL,     'd'   },
+  { "no-defines",              no_argument,       NULL,     'D'   },
+  { "globals",                 no_argument,       &globals, TRUE  },
+  { "no-globals",              no_argument,       &globals, FALSE },
+  { "help",                    no_argument,       NULL,     'h'   },
+  { "help",                    no_argument,       NULL,     'H'   },
+  { "ignore-indentation",      no_argument,       NULL,     'I'   },
+  { "include",                 required_argument, NULL,     'i'   },
+  { "language",                 required_argument, NULL,     'l'   },
+  { "members",                 no_argument,       &members, TRUE  },
+  { "no-members",              no_argument,       &members, FALSE },
+  { "no-warn",                 no_argument,       NULL,     'w'   },
+  { "output",                  required_argument, NULL,     'o'   },
+#ifdef ETAGS_REGEXPS  
+  { "regex",                   required_argument, NULL,     'r'   },
+  { "no-regex",                        no_argument,       NULL,     'R'   },
+#endif /* ETAGS_REGEXPS */  
+  { "typedefs",                        no_argument,       NULL,     't'   },
+  { "typedefs-and-c++",                no_argument,       NULL,     'T'   },
+  { "update",                  no_argument,       NULL,     'u'   },
+  { "version",                 no_argument,       NULL,     'V'   },
+  { "vgrind",                  no_argument,       NULL,     'v'   },
+  { 0 }
+};
+#endif /* LONG_OPTIONS */
+
+#ifdef ETAGS_REGEXPS
+/* Structure defining a regular expression.  Elements are
+   the compiled pattern, and the name string. */
+typedef struct pattern
+{
+  struct pattern *p_next;
+  language *language;
+  char *regex;
+  struct re_pattern_buffer *pattern;
+  struct re_registers regs;
+  char *name_pattern;
+  bool error_signaled;
+} pattern;
+
+/* Array of all regexps. */
+pattern *p_head = NULL;
+#endif /* ETAGS_REGEXPS */
+
+compressor compressors[] =
+{
+  { "z", 1, "gzip -d -c"},
+  { "Z", 1, "gzip -d -c"},
+  { "gz", 2, "gzip -d -c"},
+  { "GZ", 2, "gzip -d -c"},
+  { "bz2", 3, "bzip2 -d -c" },
+  { NULL }
+};
+
+/*
+ * Language stuff.
+ */
+
+/* Non-NULL if language fixed. */
+language *forced_lang = NULL;
+
+/* Assembly code */
+char *Asm_suffixes [] = { "a", /* Unix assembler */
+                         "asm", /* Microcontroller assembly */
+                         "def", /* BSO/Tasking definition includes  */
+                         "inc", /* Microcontroller include files */
+                         "ins", /* Microcontroller include files */
+                         "s", "sa", /* Unix assembler */
+                         "S",   /* cpp-processed Unix assembler */
+                         "src", /* BSO/Tasking C compiler output */
+                         NULL
+                       };
+
+/* Note that .c and .h can be considered C++, if the --c++ flag was
+   given.  That is why default_C_entries is called here. */
+char *default_C_suffixes [] =
+  { "c", "h", NULL };
+
+char *Cplusplus_suffixes [] =
+  { "C", "H", "c++", "cc", "cpp", "cxx", "h++", "hh", "hpp", "hxx",
+    "M",                       /* Objective C++ */
+    "pdb",                     /* Postscript with C syntax */
+    NULL };
+
+char *Cjava_suffixes [] =
+  { "java", NULL };
+
+char *Cobol_suffixes [] =
+  { "COB", "cob", NULL };
+
+char *Cstar_suffixes [] =
+  { "cs", "hs", NULL };
+
+char *Erlang_suffixes [] =
+  { "erl", "hrl", NULL };
+
+char *Fortran_suffixes [] =
+  { "F", "f", "f90", "for", NULL };
+
+char *Lisp_suffixes [] =
+  { "cl", "clisp", "el", "l", "lisp", "lsp", "ml", NULL };
+
+char *Pascal_suffixes [] =
+  { "p", "pas", NULL };
+
+char *Perl_suffixes [] =
+  { "pl", "pm", NULL };
+char *Perl_interpreters [] =
+  { "perl", "@PERL@", NULL };
+
+char *plain_C_suffixes [] =
+  { "pc",                      /* Pro*C file */
+    "m",                       /* Objective C file */
+    "lm",                      /* Objective lex file */
+     NULL };
+
+char *Postscript_suffixes [] =
+  { "ps", NULL };
+
+char *Prolog_suffixes [] =
+  { "prolog", NULL };
+
+char *Python_suffixes [] =
+  { "py", NULL };
+
+/* Can't do the `SCM' or `scm' prefix with a version number. */
+char *Scheme_suffixes [] =
+  { "SCM", "SM", "oak", "sch", "scheme", "scm", "sm", "ss", "t", NULL };
+
+char *TeX_suffixes [] =
+  { "TeX", "bib", "clo", "cls", "ltx", "sty", "tex", NULL };
+
+char *Yacc_suffixes [] =
+  { "y", "ym", "yy", "yxx", "y++", NULL }; /* .ym is Objective yacc file */
+
+/*
+ * Table of languages.
+ *
+ * It is ok for a given function to be listed under more than one
+ * name.  I just didn't.
+ */
+
+language lang_names [] =
+{
+  { "asm",     Asm_labels,          Asm_suffixes,         NULL              },
+  { "c",       default_C_entries,   default_C_suffixes,   NULL              },
+  { "c++",     Cplusplus_entries,   Cplusplus_suffixes,   NULL              },
+  { "c*",      Cstar_entries,       Cstar_suffixes,       NULL              },
+  { "cobol",   Cobol_paragraphs,    Cobol_suffixes,       NULL              },
+  { "erlang",  Erlang_functions,    Erlang_suffixes,      NULL              },
+  { "fortran", Fortran_functions,   Fortran_suffixes,     NULL              },
+  { "java",    Cjava_entries,       Cjava_suffixes,       NULL              },
+  { "lisp",    Lisp_functions,      Lisp_suffixes,        NULL              },
+  { "pascal",  Pascal_functions,    Pascal_suffixes,      NULL              },
+  { "perl",    Perl_functions,      Perl_suffixes,        Perl_interpreters },
+  { "postscript", Postscript_functions, Postscript_suffixes, NULL           },
+  { "proc",    plain_C_entries,     plain_C_suffixes,     NULL              },
+  { "prolog",  Prolog_functions,    Prolog_suffixes,      NULL              },
+  { "python",  Python_functions,    Python_suffixes,      NULL              },
+  { "scheme",  Scheme_functions,    Scheme_suffixes,      NULL              },
+  { "tex",     TeX_functions,       TeX_suffixes,         NULL              },
+  { "yacc",    Yacc_entries,        Yacc_suffixes,        NULL              },
+  { "auto", NULL },             /* default guessing scheme */
+  { "none", just_read_file },   /* regexp matching only */
+  { NULL, NULL }                /* end of list */
+};
+\f
+void
+print_language_names ()
+{
+  language *lang;
+  char **ext;
+
+  puts ("\nThese are the currently supported languages, along with the\n\
+default file name suffixes:");
+  for (lang = lang_names; lang->name != NULL; lang++)
+    {
+      printf ("\t%s\t", lang->name);
+      if (lang->suffixes != NULL)
+       for (ext = lang->suffixes; *ext != NULL; ext++)
+         printf (" .%s", *ext);
+      puts ("");
+    }
+  puts ("Where `auto' means use default language for files based on file\n\
+name suffix, and `none' means only do regexp processing on files.\n\
+If no language is specified and no matching suffix is found,\n\
+the first line of the file is read for a sharp-bang (#!) sequence\n\
+followed by the name of an interpreter.  If no such sequence is found,\n\
+Fortran is tried first; if no tags are found, C is tried next.\n\
+Compressed files are supported using gzip and bzip2.");
+}
+
+#ifndef VERSION
+# define VERSION "20"
+#endif
+void
+print_version ()
+{
+  printf ("%s (GNU Emacs %s)\n", (CTAGS) ? "ctags" : "etags", VERSION);
+  puts ("Copyright (C) 1996 Free Software Foundation, Inc. and Ken Arnold");
+  puts ("This program is distributed under the same terms as Emacs");
+
+  exit (GOOD);
+}
+
+void
+print_help ()
+{
+  printf ("Usage: %s [options] [[regex-option ...] file-name] ...\n\
+\n\
+These are the options accepted by %s.\n", progname, progname);
+#ifdef LONG_OPTIONS
+  puts ("You may use unambiguous abbreviations for the long option names.");
+#else
+  puts ("Long option names do not work with this executable, as it is not\n\
+linked with GNU getopt.");
+#endif /* LONG_OPTIONS */
+  puts ("A - as file name means read names from stdin (one per line).");
+  if (!CTAGS)
+    printf ("  Absolute names are stored in the output file as they are.\n\
+Relative ones are stored relative to the output file's directory.");
+  puts ("\n");
+
+  puts ("-a, --append\n\
+        Append tag entries to existing tags file.");
+
+  if (CTAGS)
+    puts ("-B, --backward-search\n\
+        Write the search commands for the tag entries using '?', the\n\
+        backward-search command instead of '/', the forward-search command.");
+
+  puts ("-C, --c++\n\
+        Treat files whose name suffix defaults to C language as C++ files.");
+
+  if (CTAGS)
+    puts ("-d, --defines\n\
+        Create tag entries for C #define constants and enum constants, too.");
+  else
+    puts ("-D, --no-defines\n\
+        Don't create tag entries for C #define constants and enum constants.\n\
+       This makes the tags file smaller.");
+
+  if (!CTAGS)
+    {
+      puts ("-i FILE, --include=FILE\n\
+        Include a note in tag file indicating that, when searching for\n\
+        a tag, one should also consult the tags file FILE after\n\
+        checking the current file.");
+      puts ("-l LANG, --language=LANG\n\
+        Force the following files to be considered as written in the\n\
+       named language up to the next --language=LANG option.");
+    }
+
+  if (CTAGS)
+    puts ("--globals\n\
+       Create tag entries for global variables in some languages.");
+  else
+    puts ("--no-globals\n\
+       Do not create tag entries for global variables in some\n\
+       languages.  This makes the tags file smaller.");
+  puts ("--members\n\
+       Create tag entries for member variables in C and derived languages.");
+
+#ifdef ETAGS_REGEXPS
+  puts ("-r /REGEXP/, --regex=/REGEXP/ or --regex=@regexfile\n\
+        Make a tag for each line matching pattern REGEXP in the\n\
+       following files.  regexfile is a file containing one REGEXP\n\
+       per line.  REGEXP is anchored (as if preceded by ^).\n\
+       The form /REGEXP/NAME/ creates a named tag.  For example Tcl\n\
+       named tags can be created with:\n\
+       --regex=/proc[ \\t]+\\([^ \\t]+\\)/\\1/.");
+  puts ("-R, --no-regex\n\
+        Don't create tags from regexps for the following files.");
+#endif /* ETAGS_REGEXPS */
+  puts ("-o FILE, --output=FILE\n\
+        Write the tags to FILE.");
+  puts ("-I, --ignore-indentation\n\
+        Don't rely on indentation quite as much as normal.  Currently,\n\
+        this means not to assume that a closing brace in the first\n\
+        column is the final brace of a function or structure\n\
+        definition in C and C++.");
+
+  if (CTAGS)
+    {
+      puts ("-t, --typedefs\n\
+        Generate tag entries for C typedefs.");
+      puts ("-T, --typedefs-and-c++\n\
+        Generate tag entries for C typedefs, C struct/enum/union tags,\n\
+        and C++ member functions.");
+      puts ("-u, --update\n\
+        Update the tag entries for the given files, leaving tag\n\
+        entries for other files in place.  Currently, this is\n\
+        implemented by deleting the existing entries for the given\n\
+        files and then rewriting the new entries at the end of the\n\
+        tags file.  It is often faster to simply rebuild the entire\n\
+        tag file than to use this.");
+      puts ("-v, --vgrind\n\
+        Generates an index of items intended for human consumption,\n\
+        similar to the output of vgrind.  The index is sorted, and\n\
+        gives the page number of each item.");
+      puts ("-w, --no-warn\n\
+        Suppress warning messages about entries defined in multiple\n\
+        files.");
+      puts ("-x, --cxref\n\
+        Like --vgrind, but in the style of cxref, rather than vgrind.\n\
+        The output uses line numbers instead of page numbers, but\n\
+        beyond that the differences are cosmetic; try both to see\n\
+        which you like.");
+    }
+
+  puts ("-V, --version\n\
+        Print the version of the program.\n\
+-h, --help\n\
+        Print this help message.");
+
+  print_language_names ();
+
+  puts ("");
+  puts ("Report bugs to bug-gnu-emacs@prep.ai.mit.edu");
+
+  exit (GOOD);
+}
+
+\f
+enum argument_type
+{
+  at_language,
+  at_regexp,
+  at_filename
+};
+
+/* This structure helps us allow mixing of --lang and file names. */
+typedef struct
+{
+  enum argument_type arg_type;
+  char *what;
+  language *lang;              /* language of the regexp */
+} argument;
+
+#ifdef VMS                     /* VMS specific functions */
+
+#define        EOS     '\0'
+
+/* This is a BUG!  ANY arbitrary limit is a BUG!
+   Won't someone please fix this?  */
+#define        MAX_FILE_SPEC_LEN       255
+typedef struct {
+  short   curlen;
+  char    body[MAX_FILE_SPEC_LEN + 1];
+} vspec;
+
+/*
+ v1.05 nmm 26-Jun-86 fn_exp - expand specification of list of file names
+ returning in each successive call the next file name matching the input
+ spec. The function expects that each in_spec passed
+ to it will be processed to completion; in particular, up to and
+ including the call following that in which the last matching name
+ is returned, the function ignores the value of in_spec, and will
+ only start processing a new spec with the following call.
+ If an error occurs, on return out_spec contains the value
+ of in_spec when the error occurred.
+
+ With each successive file name returned in out_spec, the
+ function's return value is one. When there are no more matching
+ names the function returns zero. If on the first call no file
+ matches in_spec, or there is any other error, -1 is returned.
+*/
+
+#include       <rmsdef.h>
+#include       <descrip.h>
+#define                OUTSIZE MAX_FILE_SPEC_LEN
+short
+fn_exp (out, in)
+     vspec *out;
+     char *in;
+{
+  static long context = 0;
+  static struct dsc$descriptor_s o;
+  static struct dsc$descriptor_s i;
+  static bool pass1 = TRUE;
+  long status;
+  short retval;
+
+  if (pass1)
+    {
+      pass1 = FALSE;
+      o.dsc$a_pointer = (char *) out;
+      o.dsc$w_length = (short)OUTSIZE;
+      i.dsc$a_pointer = in;
+      i.dsc$w_length = (short)strlen(in);
+      i.dsc$b_dtype = DSC$K_DTYPE_T;
+      i.dsc$b_class = DSC$K_CLASS_S;
+      o.dsc$b_dtype = DSC$K_DTYPE_VT;
+      o.dsc$b_class = DSC$K_CLASS_VS;
+    }
+  if ((status = lib$find_file(&i, &o, &context, 0, 0)) == RMS$_NORMAL)
+    {
+      out->body[out->curlen] = EOS;
+      return 1;
+    }
+  else if (status == RMS$_NMF)
+    retval = 0;
+  else
+    {
+      strcpy(out->body, in);
+      retval = -1;
+    }
+  lib$find_file_end(&context);
+  pass1 = TRUE;
+  return retval;
+}
+
+/*
+  v1.01 nmm 19-Aug-85 gfnames - return in successive calls the
+  name of each file specified by the provided arg expanding wildcards.
+*/
+char *
+gfnames (arg, p_error)
+     char *arg;
+     bool *p_error;
+{
+  static vspec filename = {MAX_FILE_SPEC_LEN, "\0"};
+
+  switch (fn_exp (&filename, arg))
+    {
+    case 1:
+      *p_error = FALSE;
+      return filename.body;
+    case 0:
+      *p_error = FALSE;
+      return NULL;
+    default:
+      *p_error = TRUE;
+      return filename.body;
+    }
+}
+
+#ifndef OLD  /* Newer versions of VMS do provide `system'.  */
+system (cmd)
+     char *cmd;
+{
+  error ("%s", "system() function not implemented under VMS");
+}
+#endif
+
+#define        VERSION_DELIM   ';'
+char *massage_name (s)
+     char *s;
+{
+  char *start = s;
+
+  for ( ; *s; s++)
+    if (*s == VERSION_DELIM)
+      {
+       *s = EOS;
+       break;
+      }
+    else
+      *s = lowcase (*s);
+  return start;
+}
+#endif /* VMS */
+
+\f
+int
+main (argc, argv)
+     int argc;
+     char *argv[];
+{
+  int i;
+  unsigned int nincluded_files;
+  char **included_files;
+  char *this_file;
+  argument *argbuffer;
+  int current_arg, file_count;
+  linebuffer filename_lb;
+#ifdef VMS
+  bool got_err;
+#endif
+
+#ifdef DOS_NT
+  _fmode = O_BINARY;   /* all of files are treated as binary files */
+#endif /* DOS_NT */
+
+  progname = argv[0];
+  nincluded_files = 0;
+  included_files = xnew (argc, char *);
+  current_arg = 0;
+  file_count = 0;
+
+  /* Allocate enough no matter what happens.  Overkill, but each one
+     is small. */
+  argbuffer = xnew (argc, argument);
+
+#ifdef ETAGS_REGEXPS
+  /* Set syntax for regular expression routines. */
+  re_set_syntax (RE_SYNTAX_EMACS | RE_INTERVALS);
+#endif /* ETAGS_REGEXPS */
+
+  /*
+   * If etags, always find typedefs and structure tags.  Why not?
+   * Also default is to find macro constants, enum constants and
+   * global variables. 
+   */
+  if (!CTAGS)
+    {
+      typedefs = typedefs_and_cplusplus = constantypedefs = TRUE;
+      globals = TRUE;
+      members = FALSE;
+    }
+
+  while (1)
+    {
+      int opt;
+      char *optstring;
+
+#ifdef ETAGS_REGEXPS
+      optstring = "-aCdDf:Il:o:r:RStTi:BuvxwVhH";
+#else
+      optstring = "-aCdDf:Il:o:StTi:BuvxwVhH";
+#endif /* ETAGS_REGEXPS */
+
+#ifndef LONG_OPTIONS
+      optstring = optstring + 1;
+#endif /* LONG_OPTIONS */
+
+      opt = getopt_long (argc, argv, optstring, longopts, 0);
+      if (opt == EOF)
+       break;
+
+      switch (opt)
+       {
+       case 0:
+         /* If getopt returns 0, then it has already processed a
+            long-named option.  We should do nothing.  */
+         break;
+
+       case 1:
+         /* This means that a file name has been seen.  Record it. */
+         argbuffer[current_arg].arg_type = at_filename;
+         argbuffer[current_arg].what = optarg;
+         ++current_arg;
+         ++file_count;
+         break;
+
+         /* Common options. */
+       case 'a': append_to_tagfile = TRUE;     break;
+       case 'C': cplusplus = TRUE;             break;
+       case 'd': constantypedefs = TRUE;       break;
+       case 'D': constantypedefs = FALSE;      break;
+       case 'f':               /* for compatibility with old makefiles */
+       case 'o':
+         if (tagfile)
+           {
+             error ("-%c option may only be given once.", opt);
+             suggest_asking_for_help ();
+           }
+         tagfile = optarg;
+         break;
+       case 'I':
+       case 'S':               /* for backward compatibility */
+         noindentypedefs = TRUE;
+         break;
+       case 'l':
+         {
+           language *lang = get_language_from_name (optarg);
+           if (lang != NULL)
+             {
+               argbuffer[current_arg].lang = lang;
+               argbuffer[current_arg].arg_type = at_language;
+               ++current_arg;
+             }
+         }
+         break;
+#ifdef ETAGS_REGEXPS
+       case 'r':
+         argbuffer[current_arg].arg_type = at_regexp;
+         argbuffer[current_arg].what = optarg;
+         ++current_arg;
+         break;
+       case 'R':
+         argbuffer[current_arg].arg_type = at_regexp;
+         argbuffer[current_arg].what = NULL;
+         ++current_arg;
+         break;
+#endif /* ETAGS_REGEXPS */
+       case 'V':
+         print_version ();
+         break;
+       case 'h':
+       case 'H':
+         print_help ();
+         break;
+       case 't':
+         typedefs = TRUE;
+         break;
+       case 'T':
+         typedefs = typedefs_and_cplusplus = TRUE;
+         break;
+#if (!CTAGS)
+         /* Etags options */
+       case 'i':
+         included_files[nincluded_files++] = optarg;
+         break;
+#else /* CTAGS */
+         /* Ctags options. */
+       case 'B': searchar = '?';       break;
+       case 'u': update = TRUE;        break;
+       case 'v': vgrind_style = TRUE;  /*FALLTHRU*/
+       case 'x': cxref_style = TRUE;   break;
+       case 'w': no_warnings = TRUE;   break;
+#endif /* CTAGS */
+       default:
+         suggest_asking_for_help ();
+       }
+    }
+
+  for (; optind < argc; ++optind)
+    {
+      argbuffer[current_arg].arg_type = at_filename;
+      argbuffer[current_arg].what = argv[optind];
+      ++current_arg;
+      ++file_count;
+    }
+
+  if (nincluded_files == 0 && file_count == 0)
+    {
+      error ("no input files specified.", 0);
+      suggest_asking_for_help ();
+    }
+
+  if (tagfile == NULL)
+    tagfile = CTAGS ? "tags" : "TAGS";
+  cwd = etags_getcwd ();       /* the current working directory */
+  if (cwd[strlen (cwd) - 1] != '/')
+    {
+      char *oldcwd = cwd;
+      cwd = concat (oldcwd, "/", "");
+      free (oldcwd);
+    }
+  if (streq (tagfile, "-"))
+    tagfiledir = cwd;
+  else
+    tagfiledir = absolute_dirname (tagfile, cwd);
+
+  init ();                     /* set up boolean "functions" */
+
+  initbuffer (&lb);
+  initbuffer (&token_name);
+  initbuffer (&lbs[0].lb);
+  initbuffer (&lbs[1].lb);
+  initbuffer (&filename_lb);
+
+  if (!CTAGS)
+    {
+      if (streq (tagfile, "-"))
+       {
+         tagf = stdout;
+#ifdef DOS_NT
+         /* Switch redirected `stdout' to binary mode (setting `_fmode'
+            doesn't take effect until after `stdout' is already open). */
+         if (!isatty (fileno (stdout)))
+           setmode (fileno (stdout), O_BINARY);
+#endif /* DOS_NT */
+       }
+      else
+       tagf = fopen (tagfile, append_to_tagfile ? "a" : "w");
+      if (tagf == NULL)
+       pfatal (tagfile);
+    }
+
+  /*
+   * Loop through files finding functions.
+   */
+  for (i = 0; i < current_arg; ++i)
+    {
+      switch (argbuffer[i].arg_type)
+       {
+       case at_language:
+         forced_lang = argbuffer[i].lang;
+         break;
+#ifdef ETAGS_REGEXPS
+       case at_regexp:
+         analyse_regex (argbuffer[i].what);
+         break;
+#endif
+       case at_filename:
+#ifdef VMS
+         while ((this_file = gfnames (argbuffer[i].what, &got_err)) != NULL)
+           {
+             if (got_err)
+               {
+                 error ("can't find file %s\n", this_file);
+                 argc--, argv++;
+               }
+             else
+               {
+                 this_file = massage_name (this_file);
+               }
+#else
+             this_file = argbuffer[i].what;
+#endif
+             /* Input file named "-" means read file names from stdin
+                (one per line) and use them. */
+             if (streq (this_file, "-"))
+               while (readline_internal (&filename_lb, stdin) > 0)
+                 process_file (filename_lb.buffer);
+             else
+               process_file (this_file);
+#ifdef VMS
+           }
+#endif
+         break;
+       }
+    }
+
+#ifdef ETAGS_REGEXPS
+  free_patterns ();
+#endif /* ETAGS_REGEXPS */
+
+  if (!CTAGS)
+    {
+      while (nincluded_files-- > 0)
+       fprintf (tagf, "\f\n%s,include\n", *included_files++);
+
+      fclose (tagf);
+      exit (GOOD);
+    }
+
+  /* If CTAGS, we are here.  process_file did not write the tags yet,
+     because we want them ordered.  Let's do it now. */
+  if (cxref_style)
+    {
+      put_entries (head);
+      free_tree (head);
+      head = NULL;
+      exit (GOOD);
+    }
+
+  if (update)
+    {
+      char cmd[BUFSIZ];
+      for (i = 0; i < current_arg; ++i)
+       {
+         if (argbuffer[i].arg_type != at_filename)
+           continue;
+         sprintf (cmd,
+                  "mv %s OTAGS;fgrep -v '\t%s\t' OTAGS >%s;rm OTAGS",
+                  tagfile, argbuffer[i].what, tagfile);
+         if (system (cmd) != GOOD)
+           fatal ("failed to execute shell command", (char *)NULL);
+       }
+      append_to_tagfile = TRUE;
+    }
+
+  tagf = fopen (tagfile, append_to_tagfile ? "a" : "w");
+  if (tagf == NULL)
+    pfatal (tagfile);
+  put_entries (head);
+  free_tree (head);
+  head = NULL;
+  fclose (tagf);
+
+  if (update)
+    {
+      char cmd[BUFSIZ];
+      sprintf (cmd, "sort %s -o %s", tagfile, tagfile);
+      exit (system (cmd));
+    }
+  return GOOD;
+}
+
+
+
+/*
+ * Return a compressor given the file name.
+ * Idea by Vladimir Alexiev <vladimir@cs.ualberta.ca>
+ */
+compressor *
+get_compressor_from_suffix (file)
+     char *file;
+{
+  compressor *compr;
+  char *suffix;
+
+  suffix = etags_strrchr (file, '.');
+  if (suffix == NULL)
+    return NULL;
+  suffix += 1;
+  for (compr = compressors; compr->suffix != NULL; compr++)
+    if (streq (compr->suffix, suffix))
+      return compr;
+  return NULL;
+}
+
+
+
+/*
+ * Return a language given the name.
+ */
+language *
+get_language_from_name (name)
+     char *name;
+{
+  language *lang;
+
+  if (name == NULL)
+    error ("empty language name", (char *)NULL);
+  else
+    {
+      for (lang = lang_names; lang->name != NULL; lang++)
+       if (streq (name, lang->name))
+         return lang;
+      error ("unknown language \"%s\"", name);
+    }
+
+  return NULL;
+}
+
+
+/*
+ * Return a language given the interpreter name.
+ */
+language *
+get_language_from_interpreter (interpreter)
+     char *interpreter;
+{
+  language *lang;
+  char **iname;
+
+  if (interpreter == NULL)
+    return NULL;
+  for (lang = lang_names; lang->name != NULL; lang++)
+    if (lang->interpreters != NULL)
+      for (iname = lang->interpreters; *iname != NULL; iname++)
+       if (streq (*iname, interpreter))
+           return lang;
+
+  return NULL;
+}
+
+
+
+/*
+ * Return a language given the file name.
+ */
+language *
+get_language_from_suffix (file)
+     char *file;
+{
+  language *lang;
+  char **ext, *suffix;
+
+  suffix = etags_strrchr (file, '.');
+  if (suffix == NULL)
+    return NULL;
+  suffix += 1;
+  for (lang = lang_names; lang->name != NULL; lang++)
+    if (lang->suffixes != NULL)
+      for (ext = lang->suffixes; *ext != NULL; ext++)
+       if (streq (*ext, suffix))
+         return lang;
+  return NULL;
+}
+
+
+
+/*
+ * This routine is called on each file argument.
+ */
+void
+process_file (file)
+     char *file;
+{
+  struct stat stat_buf;
+  FILE *inf;
+  compressor *compr;
+  char *compressed_name, *uncompressed_name;
+  char *real_name;
+
+  canonicalize_filename (file);
+  if (streq (file, tagfile) && !streq (tagfile, "-"))
+    {
+      error ("skipping inclusion of %s in self.", file);
+      return;
+    }
+  if ((compr = get_compressor_from_suffix (file)) == NULL)
+    {
+      compressed_name = NULL;
+      real_name = uncompressed_name = savestr (file);
+    }
+  else
+    {
+      real_name = compressed_name = savestr (file);
+      uncompressed_name = savenstr (file, strlen(file) - compr->sufflen - 1);
+    }
+  if (stat (real_name, &stat_buf) != 0)
+    {
+      /* Reset real_name and try with a different name. */
+      real_name = NULL;
+      if (compressed_name != NULL) /* try with the given suffix */
+       {
+         if (stat (uncompressed_name, &stat_buf) == 0)
+           real_name = uncompressed_name;
+       }
+      else                     /* try all possible suffixes */
+       {
+         for (compr = compressors; compr->suffix != NULL; compr++)
+           {
+             compressed_name = concat (file, ".", compr->suffix);
+             if (stat (compressed_name, &stat_buf) != 0)
+               free (compressed_name);
+             else
+               {
+                 real_name = compressed_name;
+                 break;
+               }
+           }
+       }
+      if (real_name == NULL)
+       {
+         perror (file);
+         goto exit;
+       }
+    } /* try with a different name */
+
+  if (!S_ISREG (stat_buf.st_mode))
+    {
+      error ("skipping %s: it is not a regular file.", real_name);
+      goto exit;
+    }
+  if (real_name == compressed_name)
+    {
+      char *cmd = concat (compr->command, " ", real_name);
+      inf = popen (cmd, "r");
+      free (cmd);
+    }
+  else 
+    inf = fopen (real_name, "r");
+  if (inf == NULL)
+    {
+      perror (real_name);
+      goto exit;
+    }
+
+  find_entries (uncompressed_name, inf);
+
+  if (real_name == compressed_name)
+    pclose (inf);
+  else
+    fclose (inf);
+
+  if (!CTAGS)
+    {
+      char *filename;
+
+      if (filename_is_absolute (uncompressed_name))
+       {
+         /* file is an absolute file name.  Canonicalise it. */
+         filename = absolute_filename (uncompressed_name, cwd);
+       }
+      else
+       {
+         /* file is a file name relative to cwd.  Make it relative
+            to the directory of the tags file. */
+         filename = relative_filename (uncompressed_name, tagfiledir);
+       }
+      fprintf (tagf, "\f\n%s,%d\n", filename, total_size_of_entries (head));
+      free (filename);
+      put_entries (head);
+      free_tree (head);
+      head = NULL;
+    }
+
+ exit:
+  if (compressed_name) free(compressed_name);
+  if (uncompressed_name) free(uncompressed_name);
+  return;
+}
+
+/*
+ * This routine sets up the boolean pseudo-functions which work
+ * by setting boolean flags dependent upon the corresponding character.
+ * Every char which is NOT in that string is not a white char.  Therefore,
+ * all of the array "_wht" is set to FALSE, and then the elements
+ * subscripted by the chars in "white" are set to TRUE.  Thus "_wht"
+ * of a char is TRUE if it is the string "white", else FALSE.
+ */
+void
+init ()
+{
+  register char *sp;
+  register int i;
+
+  for (i = 0; i < CHARS; i++)
+    iswhite(i) = notinname(i) = begtoken(i) = intoken(i) = endtoken(i) = FALSE;
+  for (sp = white; *sp != '\0'; sp++) iswhite (*sp) = TRUE;
+  for (sp = nonam; *sp != '\0'; sp++) notinname (*sp) = TRUE;
+  for (sp = begtk; *sp != '\0'; sp++) begtoken (*sp) = TRUE;
+  for (sp = midtk; *sp != '\0'; sp++) intoken (*sp) = TRUE;
+  for (sp = endtk; *sp != '\0'; sp++) endtoken (*sp) = TRUE;
+  iswhite('\0') = iswhite('\n');
+  notinname('\0') = notinname('\n');
+  begtoken('\0') = begtoken('\n');
+  intoken('\0') = intoken('\n');
+  endtoken('\0') = endtoken('\n');
+}
+
+/*
+ * This routine opens the specified file and calls the function
+ * which finds the function and type definitions.
+ */
+node *last_node = NULL;
+
+void
+find_entries (file, inf)
+     char *file;
+     FILE *inf;
+{
+  char *cp;
+  language *lang;
+  node *old_last_node;
+
+  /* Memory leakage here: the string pointed by curfile is
+     never released, because curfile is copied into np->file
+     for each node, to be used in CTAGS mode.  The amount of
+     memory leaked here is the sum of the lengths of the
+     file names. */
+  curfile = savestr (file);
+
+  /* If user specified a language, use it. */
+  lang = forced_lang;
+  if (lang != NULL && lang->function != NULL)
+    {
+      curlang = lang;
+      lang->function (inf);
+      return;
+    }
+
+  /* Try to guess the language given the file name. */
+  lang = get_language_from_suffix (file);
+  if (lang != NULL && lang->function != NULL)
+    {
+      curlang = lang;
+      lang->function (inf);
+      return;
+    }
+
+  /* Look for sharp-bang as the first two characters. */
+  if (readline_internal (&lb, inf) > 0
+      && lb.len >= 2
+      && lb.buffer[0] == '#'
+      && lb.buffer[1] == '!')
+    {
+      char *lp;
+
+      /* Set lp to point at the first char after the last slash in the
+         line or, if no slashes, at the first nonblank.  Then set cp to
+        the first successive blank and terminate the string. */
+      lp = etags_strrchr (lb.buffer+2, '/');
+      if (lp != NULL)
+       lp += 1;
+      else
+       lp = skip_spaces (lb.buffer + 2);
+      cp = skip_non_spaces (lp);
+      *cp = '\0';
+
+      if (strlen (lp) > 0)
+       {
+         lang = get_language_from_interpreter (lp);
+         if (lang != NULL && lang->function != NULL)
+           {
+             curlang = lang;
+             lang->function (inf);
+             return;
+           }
+       }
+    }
+  /* We rewind here, even if inf may be a pipe.  We fail if the
+     length of the first line is longer than the pipe block size,
+     which is unlikely. */
+  rewind (inf);
+
+  /* Try Fortran. */
+  old_last_node = last_node;
+  curlang = get_language_from_name ("fortran");
+  Fortran_functions (inf);
+
+  /* No Fortran entries found.  Try C. */
+  if (old_last_node == last_node)
+    {
+      /* We do not tag if rewind fails.
+        Only the file name will be recorded in the tags file. */
+      rewind (inf);
+      curlang = get_language_from_name (cplusplus ? "c++" : "c");
+      default_C_entries (inf);
+    }
+  return;
+}
+\f
+/* Record a tag. */
+void
+pfnote (name, is_func, linestart, linelen, lno, cno)
+     char *name;               /* tag name, or NULL if unnamed */
+     bool is_func;             /* tag is a function */
+     char *linestart;          /* start of the line where tag is */
+     int linelen;              /* length of the line where tag is */
+     int lno;                  /* line number */
+     long cno;                 /* character number */
+{
+  register node *np;
+
+  if (CTAGS && name == NULL)
+    return;
+
+  np = xnew (1, node);
+
+  /* If ctags mode, change name "main" to M<thisfilename>. */
+  if (CTAGS && !cxref_style && streq (name, "main"))
+    {
+      register char *fp = etags_strrchr (curfile, '/');
+      np->name = concat ("M", fp == NULL ? curfile : fp + 1, "");
+      fp = etags_strrchr (np->name, '.');
+      if (fp != NULL && fp[1] != '\0' && fp[2] == '\0')
+       fp[0] = '\0';
+    }
+  else
+    np->name = name;
+  np->been_warned = FALSE;
+  np->file = curfile;
+  np->is_func = is_func;
+  np->lno = lno;
+  /* Our char numbers are 0-base, because of C language tradition?
+     ctags compatibility?  old versions compatibility?   I don't know.
+     Anyway, since emacs's are 1-base we expect etags.el to take care
+     of the difference.  If we wanted to have 1-based numbers, we would
+     uncomment the +1 below. */
+  np->cno = cno /* + 1 */ ;
+  np->left = np->right = NULL;
+  if (CTAGS && !cxref_style)
+    {
+      if (strlen (linestart) < 50)
+       np->pat = concat (linestart, "$", "");
+      else
+       np->pat = savenstr (linestart, 50);
+    }
+  else
+    np->pat = savenstr (linestart, linelen);
+
+  add_node (np, &head);
+}
+
+/* Date: Wed, 22 Jan 1997 02:56:31 -0500 [last amended 18 Sep 1997]
+ * From: Sam Kendall <kendall@mv.mv.com>
+ * Subject: Proposal for firming up the TAGS format specification
+ * To: F.Potorti@cnuce.cnr.it
+ *
+ * pfnote should emit the optimized form [unnamed tag] only if:
+ *  1. name does not contain any of the characters " \t\r\n(),;";
+ *  2. linestart contains name as either a rightmost, or rightmost but
+ *     one character, substring;
+ *  3. the character, if any, immediately before name in linestart must
+ *     be one of the characters " \t(),;";
+ *  4. the character, if any, immediately after name in linestart must
+ *     also be one of the characters " \t(),;".
+ *
+ * The real implementation uses the notinname() macro, which recognises
+ * characters slightly different form " \t\r\n(),;".  See the variable
+ * `nonam'.
+ */
+#define traditional_tag_style TRUE
+void
+new_pfnote (name, namelen, is_func, linestart, linelen, lno, cno)
+     char *name;               /* tag name, or NULL if unnamed */
+     int namelen;              /* tag length */
+     bool is_func;             /* tag is a function */
+     char *linestart;          /* start of the line where tag is */
+     int linelen;              /* length of the line where tag is */
+     int lno;                  /* line number */
+     long cno;                 /* character number */
+{
+  register char *cp;
+  bool named;
+
+  named = TRUE;
+  if (!CTAGS)
+    {
+      for (cp = name; !notinname (*cp); cp++)
+       continue;
+      if (*cp == '\0')                         /* rule #1 */
+       {
+         cp = linestart + linelen - namelen;
+         if (notinname (linestart[linelen-1]))
+           cp -= 1;                            /* rule #4 */
+         if (cp >= linestart                   /* rule #2 */
+             && (cp == linestart
+                 || notinname (cp[-1]))        /* rule #3 */
+             && strneq (name, cp, namelen))    /* rule #2 */
+           named = FALSE;      /* use unnamed tag */
+       }
+    }
+  
+  if (named)
+    name = savenstr (name, namelen);
+  else
+    name = NULL;
+  pfnote (name, is_func, linestart, linelen, lno, cno);
+}
+
+/*
+ * free_tree ()
+ *     recurse on left children, iterate on right children.
+ */
+void
+free_tree (np)
+     register node *np;
+{
+  while (np)
+    {
+      register node *node_right = np->right;
+      free_tree (np->left);
+      if (np->name != NULL)
+       free (np->name);
+      free (np->pat);
+      free (np);
+      np = node_right;
+    }
+}
+
+/*
+ * add_node ()
+ *     Adds a node to the tree of nodes.  In etags mode, we don't keep
+ *     it sorted; we just keep a linear list.  In ctags mode, maintain
+ *     an ordered tree, with no attempt at balancing.
+ *
+ *     add_node is the only function allowed to add nodes, so it can
+ *     maintain state.
+ */
+void
+add_node (np, cur_node_p)
+     node *np, **cur_node_p;
+{
+  register int dif;
+  register node *cur_node = *cur_node_p;
+
+  if (cur_node == NULL)
+    {
+      *cur_node_p = np;
+      last_node = np;
+      return;
+    }
+
+  if (!CTAGS)
+    {
+      /* Etags Mode */
+      if (last_node == NULL)
+       fatal ("internal error in add_node", (char *)NULL);
+      last_node->right = np;
+      last_node = np;
+    }
+  else
+    {
+      /* Ctags Mode */
+      dif = strcmp (np->name, cur_node->name);
+
+      /*
+       * If this tag name matches an existing one, then
+       * do not add the node, but maybe print a warning.
+       */
+      if (!dif)
+       {
+         if (streq (np->file, cur_node->file))
+           {
+             if (!no_warnings)
+               {
+                 fprintf (stderr, "Duplicate entry in file %s, line %d: %s\n",
+                          np->file, lineno, np->name);
+                 fprintf (stderr, "Second entry ignored\n");
+               }
+           }
+         else if (!cur_node->been_warned && !no_warnings)
+           {
+             fprintf
+               (stderr,
+                "Duplicate entry in files %s and %s: %s (Warning only)\n",
+                np->file, cur_node->file, np->name);
+             cur_node->been_warned = TRUE;
+           }
+         return;
+       }
+
+      /* Actually add the node */
+      add_node (np, dif < 0 ? &cur_node->left : &cur_node->right);
+    }
+}
+\f
+void
+put_entries (np)
+     register node *np;
+{
+  register char *sp;
+
+  if (np == NULL)
+    return;
+
+  /* Output subentries that precede this one */
+  put_entries (np->left);
+
+  /* Output this entry */
+
+  if (!CTAGS)
+    {
+      if (np->name != NULL)
+       fprintf (tagf, "%s\177%s\001%d,%ld\n",
+                np->pat, np->name, np->lno, np->cno);
+      else
+       fprintf (tagf, "%s\177%d,%ld\n",
+                np->pat, np->lno, np->cno);
+    }
+  else
+    {
+      if (np->name == NULL)
+       error ("internal error: NULL name in ctags mode.", (char *)NULL);
+
+      if (cxref_style)
+       {
+         if (vgrind_style)
+           fprintf (stdout, "%s %s %d\n",
+                    np->name, np->file, (np->lno + 63) / 64);
+         else
+           fprintf (stdout, "%-16s %3d %-16s %s\n",
+                    np->name, np->lno, np->file, np->pat);
+       }
+      else
+       {
+         fprintf (tagf, "%s\t%s\t", np->name, np->file);
+
+         if (np->is_func)
+           {                   /* a function */
+             putc (searchar, tagf);
+             putc ('^', tagf);
+
+             for (sp = np->pat; *sp; sp++)
+               {
+                 if (*sp == '\\' || *sp == searchar)
+                   putc ('\\', tagf);
+                 putc (*sp, tagf);
+               }
+             putc (searchar, tagf);
+           }
+         else
+           {                   /* a typedef; text pattern inadequate */
+             fprintf (tagf, "%d", np->lno);
+           }
+         putc ('\n', tagf);
+       }
+    }
+
+  /* Output subentries that follow this one */
+  put_entries (np->right);
+}
+
+/* Length of a number's decimal representation. */
+int
+number_len (num)
+     long num;
+{
+  int len = 1;
+  while ((num /= 10) > 0)
+    len += 1;
+  return len;
+}
+
+/*
+ * Return total number of characters that put_entries will output for
+ * the nodes in the subtree of the specified node.  Works only if
+ * we are not ctags, but called only in that case.  This count
+ * is irrelevant with the new tags.el, but is still supplied for
+ * backward compatibility.
+ */
+int
+total_size_of_entries (np)
+     register node *np;
+{
+  register int total;
+
+  if (np == NULL)
+    return 0;
+
+  for (total = 0; np != NULL; np = np->right)
+    {
+      /* Count left subentries. */
+      total += total_size_of_entries (np->left);
+
+      /* Count this entry */
+      total += strlen (np->pat) + 1;
+      total += number_len ((long) np->lno) + 1 + number_len (np->cno) + 1;
+      if (np->name != NULL)
+       total += 1 + strlen (np->name); /* \001name */
+    }
+
+  return total;
+}
+\f
+/*
+ * The C symbol tables.
+ */
+enum sym_type
+{
+  st_none,
+  st_C_objprot, st_C_objimpl, st_C_objend,
+  st_C_gnumacro,
+  st_C_ignore,
+  st_C_javastruct,
+  st_C_operator,
+  st_C_struct, st_C_enum, st_C_define, st_C_typedef, st_C_typespec
+};
+
+/* Feed stuff between (but not including) %[ and %] lines to:
+      gperf -c -k 1,3 -o -p -r -t
+%[
+struct C_stab_entry { char *name; int c_ext; enum sym_type type; }
+%%
+@interface,    0,      st_C_objprot
+@protocol,     0,      st_C_objprot
+@implementation,0,     st_C_objimpl
+@end,          0,      st_C_objend
+import,                C_JAVA, st_C_ignore
+package,       C_JAVA, st_C_ignore
+friend,                C_PLPL, st_C_ignore
+extends,       C_JAVA, st_C_javastruct
+implements,    C_JAVA, st_C_javastruct
+interface,     C_JAVA, st_C_struct
+class,         C_PLPL, st_C_struct
+namespace,     C_PLPL, st_C_struct
+domain,        C_STAR, st_C_struct
+union,         0,      st_C_struct
+struct,        0,      st_C_struct
+enum,          0,      st_C_enum
+typedef,       0,      st_C_typedef
+define,        0,      st_C_define
+operator,      C_PLPL, st_C_operator
+bool,          C_PLPL, st_C_typespec
+long,          0,      st_C_typespec
+short,         0,      st_C_typespec
+int,           0,      st_C_typespec
+char,          0,      st_C_typespec
+float,         0,      st_C_typespec
+double,        0,      st_C_typespec
+signed,        0,      st_C_typespec
+unsigned,      0,      st_C_typespec
+auto,          0,      st_C_typespec
+void,          0,      st_C_typespec
+extern,        0,      st_C_typespec
+static,        0,      st_C_typespec
+const,         0,      st_C_typespec
+volatile,      0,      st_C_typespec
+explicit,      C_PLPL, st_C_typespec
+mutable,       C_PLPL, st_C_typespec
+typename,      C_PLPL, st_C_typespec
+# DEFUN used in emacs, the next three used in glibc (SYSCALL only for mach).
+DEFUN,         0,      st_C_gnumacro
+SYSCALL,       0,      st_C_gnumacro
+ENTRY,         0,      st_C_gnumacro
+PSEUDO,                0,      st_C_gnumacro
+# These are defined inside C functions, so currently they are not met.
+# EXFUN used in glibc, DEFVAR_* in emacs.
+#EXFUN,                0,      st_C_gnumacro
+#DEFVAR_,      0,      st_C_gnumacro
+%]
+and replace lines between %< and %> with its output. */
+/*%<*/
+/* C code produced by gperf version 2.5 (GNU C++ version) */
+/* Command-line: gperf -c -k 1,3 -o -p -r -t  */
+struct C_stab_entry { char *name; int c_ext; enum sym_type type; };
+
+#define TOTAL_KEYWORDS 41
+#define MIN_WORD_LENGTH 3
+#define MAX_WORD_LENGTH 15
+#define MIN_HASH_VALUE 20
+#define MAX_HASH_VALUE 136
+/* maximum key range = 117, duplicates = 0 */
+
+static unsigned int
+hash (str, len)
+     register char *str;
+     register int unsigned len;
+{
+  static unsigned char asso_values[] =
+    {
+     137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
+     137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
+     137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
+     137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
+     137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
+     137, 137, 137, 137, 137, 137, 137, 137, 137, 137,
+     137, 137, 137, 137,  58, 137, 137, 137,  38,  37,
+      45, 137, 137, 137, 137, 137, 137, 137, 137, 137,
+      62, 137, 137,  14,  16, 137, 137, 137, 137, 137,
+     137, 137, 137, 137, 137, 137, 137,  26,  16,  51,
+      18,  61,   5,  19, 137,  23, 137, 137,  32,  63,
+      54,  10,  26, 137,  24,  42,  30,  18,  46, 137,
+     137, 137, 137, 137, 137, 137, 137, 137,
+    };
+  return len + asso_values[str[2]] + asso_values[str[0]];
+}
+
+struct C_stab_entry *
+in_word_set (str, len)
+     register char *str;
+     register unsigned int len;
+{
+  static struct C_stab_entry wordlist[] =
+    {
+      {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, 
+      {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, 
+      {"",}, {"",}, 
+      {"float",        0,      st_C_typespec},
+      {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, 
+      {"define",       0,      st_C_define},
+      {"bool",                 C_PLPL, st_C_typespec},
+      {"",}, {"",}, {"",}, 
+      {"friend",               C_PLPL, st_C_ignore},
+      {"SYSCALL",      0,      st_C_gnumacro},
+      {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, 
+      {"double",       0,      st_C_typespec},
+      {"",}, {"",}, {"",}, 
+      {"union",        0,      st_C_struct},
+      {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, 
+      {"import",               C_JAVA, st_C_ignore},
+      {"int",          0,      st_C_typespec},
+      {"short",        0,      st_C_typespec},
+      {"ENTRY",                0,      st_C_gnumacro},
+      {"implements",           C_JAVA, st_C_javastruct},
+      {"auto",         0,      st_C_typespec},
+      {"",}, 
+      {"interface",    C_JAVA, st_C_struct},
+      {"typedef",      0,      st_C_typedef},
+      {"typename",     C_PLPL, st_C_typespec},
+      {"",}, {"",}, 
+      {"signed",       0,      st_C_typespec},
+      {"unsigned",     0,      st_C_typespec},
+      {"",}, {"",}, {"",}, 
+      {"struct",       0,      st_C_struct},
+      {"void",         0,      st_C_typespec},
+      {"static",       0,      st_C_typespec},
+      {"",}, {"",}, {"",}, {"",}, 
+      {"operator",     C_PLPL, st_C_operator},
+      {"",}, 
+      {"char",         0,      st_C_typespec},
+      {"class",        C_PLPL, st_C_struct},
+      {"enum",         0,      st_C_enum},
+      {"package",      C_JAVA, st_C_ignore},
+      {"",}, 
+      {"volatile",     0,      st_C_typespec},
+      {"domain",       C_STAR, st_C_struct},
+      {"DEFUN",                0,      st_C_gnumacro},
+      {"",}, 
+      {"long",         0,      st_C_typespec},
+      {"@protocol",    0,      st_C_objprot},
+      {"",}, {"",}, {"",}, 
+      {"explicit",     C_PLPL, st_C_typespec},
+      {"",}, 
+      {"extern",       0,      st_C_typespec},
+      {"extends",      C_JAVA, st_C_javastruct},
+      {"",}, 
+      {"mutable",      C_PLPL, st_C_typespec},
+      {"",}, {"",}, {"",}, {"",}, 
+      {"PSEUDO",               0,      st_C_gnumacro},
+      {"",}, {"",}, {"",}, {"",}, 
+      {"const",        0,      st_C_typespec},
+      {"",}, {"",}, {"",}, {"",}, {"",}, 
+      {"@end",                 0,      st_C_objend},
+      {"",}, {"",}, {"",}, {"",}, {"",}, 
+      {"@interface",   0,      st_C_objprot},
+      {"",}, {"",}, {"",}, 
+      {"namespace",    C_PLPL, st_C_struct},
+      {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, 
+      {"@implementation", 0,   st_C_objimpl},
+    };
+
+  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+    {
+      register int key = hash (str, len);
+
+      if (key <= MAX_HASH_VALUE && key >= 0)
+        {
+          register char *s = wordlist[key].name;
+
+          if (*s == *str && !strncmp (str + 1, s + 1, len - 1))
+            return &wordlist[key];
+        }
+    }
+  return 0;
+}
+/*%>*/
+
+enum sym_type
+C_symtype (str, len, c_ext)
+     char *str;
+     int len;
+     int c_ext;
+{
+  register struct C_stab_entry *se = in_word_set (str, len);
+
+  if (se == NULL || (se->c_ext && !(c_ext & se->c_ext)))
+    return st_none;
+  return se->type;
+}
+\f
+ /*
+  * C functions and variables are recognized using a simple
+  * finite automaton.  fvdef is its state variable.
+  */
+enum
+{
+  fvnone,                      /* nothing seen */
+  foperator,                   /* func: operator keyword seen (cplpl) */
+  fvnameseen,                  /* function or variable name seen */
+  fstartlist,                  /* func: just after open parenthesis */
+  finlist,                     /* func: in parameter list */
+  flistseen,                   /* func: after parameter list */
+  fignore,                     /* func: before open brace */
+  vignore                      /* var-like: ignore until ';' */
+} fvdef;
+
+
+ /*
+  * typedefs are recognized using a simple finite automaton.
+  * typdef is its state variable.
+  */
+enum
+{
+  tnone,                       /* nothing seen */
+  ttypedseen,                  /* typedef keyword seen */
+  tinbody,                     /* inside typedef body */
+  tend,                                /* just before typedef tag */
+  tignore                      /* junk after typedef tag */
+} typdef;
+
+
+ /*
+  * struct-like structures (enum, struct and union) are recognized
+  * using another simple finite automaton.  `structdef' is its state
+  * variable.
+  */
+enum
+{
+  snone,                       /* nothing seen yet */
+  skeyseen,                    /* struct-like keyword seen */
+  stagseen,                    /* struct-like tag seen */
+  scolonseen,                  /* colon seen after struct-like tag */
+  sinbody                      /* in struct body: recognize member func defs*/
+} structdef;
+
+/*
+ * When structdef is stagseen, scolonseen, or sinbody, structtag is the
+ * struct tag, and structtype is the type of the preceding struct-like
+ * keyword.
+ */
+char *structtag = "<uninited>";
+enum sym_type structtype;
+
+/*
+ * When objdef is different from onone, objtag is the name of the class.
+ */
+char *objtag = "<uninited>";
+
+/*
+ * Yet another little state machine to deal with preprocessor lines.
+ */
+enum
+{
+  dnone,                       /* nothing seen */
+  dsharpseen,                  /* '#' seen as first char on line */
+  ddefineseen,                 /* '#' and 'define' seen */
+  dignorerest                  /* ignore rest of line */
+} definedef;
+
+/*
+ * State machine for Objective C protocols and implementations.
+ * Tom R.Hageman <tom@basil.icce.rug.nl>
+ */
+enum
+{
+  onone,                       /* nothing seen */
+  oprotocol,                   /* @interface or @protocol seen */
+  oimplementation,             /* @implementations seen */
+  otagseen,                    /* class name seen */
+  oparenseen,                  /* parenthesis before category seen */
+  ocatseen,                    /* category name seen */
+  oinbody,                     /* in @implementation body */
+  omethodsign,                 /* in @implementation body, after +/- */
+  omethodtag,                  /* after method name */
+  omethodcolon,                        /* after method colon */
+  omethodparm,                 /* after method parameter */
+  oignore                      /* wait for @end */
+} objdef;
+
+
+/*
+ * Use this structure to keep info about the token read, and how it
+ * should be tagged.  Used by the make_C_tag function to build a tag.
+ */
+typedef struct
+{
+  bool valid;
+  char *str;
+  bool named;
+  int linelen;
+  int lineno;
+  long linepos;
+  char *buffer;
+} token;
+
+token tok;                     /* latest token read */
+
+/*
+ * Set this to TRUE, and the next token considered is called a function.
+ * Used only for GNU emacs's function-defining macros.
+ */
+bool next_token_is_func;
+
+/*
+ * TRUE in the rules part of a yacc file, FALSE outside (parse as C).
+ */
+bool yacc_rules;
+
+/*
+ * methodlen is the length of the method name stored in token_name.
+ */
+int methodlen;
+
+/*
+ * consider_token ()
+ *     checks to see if the current token is at the start of a
+ *     function or variable, or corresponds to a typedef, or
+ *     is a struct/union/enum tag, or #define, or an enum constant.
+ *
+ *     *IS_FUNC gets TRUE iff the token is a function or #define macro
+ *     with args.  C_EXT is which language we are looking at.
+ *
+ * Globals
+ *     fvdef                   IN OUT
+ *     structdef               IN OUT
+ *     definedef               IN OUT
+ *     typdef                  IN OUT
+ *     objdef                  IN OUT
+ *     next_token_is_func      IN OUT
+ */
+
+bool
+consider_token (str, len, c, c_ext, cblev, parlev, is_func_or_var)
+     register char *str;       /* IN: token pointer */
+     register int len;         /* IN: token length */
+     register char c;          /* IN: first char after the token */
+     int c_ext;                        /* IN: C extensions mask */
+     int cblev;                        /* IN: curly brace level */
+     int parlev;               /* IN: parenthesis level */
+     bool *is_func_or_var;     /* OUT: function or variable found */
+{
+  enum sym_type toktype = C_symtype (str, len, c_ext);
+
+  /*
+   * Advance the definedef state machine.
+   */
+  switch (definedef)
+    {
+    case dnone:
+      /* We're not on a preprocessor line. */
+      break;
+    case dsharpseen:
+      if (toktype == st_C_define)
+       {
+         definedef = ddefineseen;
+       }
+      else
+       {
+         definedef = dignorerest;
+       }
+      return FALSE;
+    case ddefineseen:
+      /*
+       * Make a tag for any macro, unless it is a constant
+       * and constantypedefs is FALSE.
+       */
+      definedef = dignorerest;
+      *is_func_or_var = (c == '(');
+      if (!*is_func_or_var && !constantypedefs)
+       return FALSE;
+      else
+       return TRUE;
+    case dignorerest:
+      return FALSE;
+    default:
+      error ("internal error: definedef value.", (char *)NULL);
+    }
+
+  /*
+   * Now typedefs
+   */
+  switch (typdef)
+    {
+    case tnone:
+      if (toktype == st_C_typedef)
+       {
+         if (typedefs)
+           typdef = ttypedseen;
+         fvdef = fvnone;
+         return FALSE;
+       }
+      break;
+    case ttypedseen:
+      switch (toktype)
+       {
+       case st_none:
+       case st_C_typespec:
+         typdef = tend;
+         break;
+       case st_C_struct:
+       case st_C_enum:
+         break;
+       }
+      /* Do not return here, so the structdef stuff has a chance. */
+      break;
+    case tend:
+      switch (toktype)
+       {
+       case st_C_typespec:
+       case st_C_struct:
+       case st_C_enum:
+         return FALSE;
+       }
+      return TRUE;
+    }
+
+  /*
+   * This structdef business is currently only invoked when cblev==0.
+   * It should be recursively invoked whatever the curly brace level,
+   * and a stack of states kept, to allow for definitions of structs
+   * within structs.
+   *
+   * This structdef business is NOT invoked when we are ctags and the
+   * file is plain C.  This is because a struct tag may have the same
+   * name as another tag, and this loses with ctags.
+   */
+  switch (toktype)
+    {
+    case st_C_javastruct:
+      if (structdef == stagseen)
+        structdef = scolonseen;
+      return FALSE;
+    case st_C_struct:
+    case st_C_enum:
+      if (typdef == ttypedseen
+         || (typedefs_and_cplusplus && cblev == 0 && structdef == snone))
+       {
+         structdef = skeyseen;
+         structtype = toktype;
+       }
+      return FALSE;
+    }
+
+  if (structdef == skeyseen)
+    {
+      /* Save the tag for struct/union/class, for functions and variables
+        that may be defined inside. */
+      if (structtype == st_C_struct)
+       structtag = savenstr (str, len);
+      else
+       structtag = "<enum>";
+      structdef = stagseen;
+      return TRUE;
+    }
+
+  /* Avoid entering fvdef stuff if typdef is going on. */
+  if (typdef != tnone)
+    {
+      definedef = dnone;
+      return FALSE;
+    }
+
+  /* Detect GNU macros.
+
+     DEFUN note for writers of emacs C code:
+      The DEFUN macro, used in emacs C source code, has a first arg
+     that is a string (the lisp function name), and a second arg that
+     is a C function name.  Since etags skips strings, the second arg
+     is tagged.  This is unfortunate, as it would be better to tag the
+     first arg.  The simplest way to deal with this problem would be
+     to name the tag with a name built from the function name, by
+     removing the initial 'F' character and substituting '-' for '_'.
+     Anyway, this assumes that the conventions of naming lisp
+     functions will never change.  Currently, this method is not
+     implemented, so writers of emacs code are recommended to put the
+     first two args of a DEFUN on the same line. */
+  if (definedef == dnone && toktype == st_C_gnumacro)
+    {
+      next_token_is_func = TRUE;
+      return FALSE;
+    }
+  if (next_token_is_func)
+    {
+      next_token_is_func = FALSE;
+      fvdef = fignore;
+      *is_func_or_var = TRUE;
+      return TRUE;
+    }
+
+  /* Detect Objective C constructs. */
+  switch (objdef)
+    {
+    case onone:
+      switch (toktype)
+       {
+       case st_C_objprot:
+         objdef = oprotocol;
+         return FALSE;
+       case st_C_objimpl:
+         objdef = oimplementation;
+         return FALSE;
+       }
+      break;
+    case oimplementation:
+      /* Save the class tag for functions or variables defined inside. */
+      objtag = savenstr (str, len);
+      objdef = oinbody;
+      return FALSE;
+    case oprotocol:
+      /* Save the class tag for categories. */
+      objtag = savenstr (str, len);
+      objdef = otagseen;
+      *is_func_or_var = TRUE;
+      return TRUE;
+    case oparenseen:
+      objdef = ocatseen;
+      *is_func_or_var = TRUE;
+      return TRUE;
+    case oinbody:
+      break;
+    case omethodsign:
+      if (parlev == 0)
+       {
+         objdef = omethodtag;
+         methodlen = len;
+         grow_linebuffer (&token_name, methodlen + 1);
+         strncpy (token_name.buffer, str, len);
+         token_name.buffer[methodlen] = '\0';
+         token_name.len = methodlen;
+         return TRUE;
+       }
+      return FALSE;
+    case omethodcolon:
+      if (parlev == 0)
+       objdef = omethodparm;
+      return FALSE;
+    case omethodparm:
+      if (parlev == 0)
+       {
+         objdef = omethodtag;
+         methodlen += len;
+         grow_linebuffer (&token_name, methodlen + 1);
+         strncat (token_name.buffer, str, len);
+         token_name.len = methodlen;
+         return TRUE;
+       }
+      return FALSE;
+    case oignore:
+      if (toktype == st_C_objend)
+       {
+         /* Memory leakage here: the string pointed by objtag is
+            never released, because many tests would be needed to
+            avoid breaking on incorrect input code.  The amount of
+            memory leaked here is the sum of the lengths of the
+            class tags.
+         free (objtag); */
+         objdef = onone;
+       }
+      return FALSE;
+    }
+
+  /* A function, variable or enum constant? */
+  switch (toktype)
+    {
+    case st_C_typespec:
+      if (fvdef != finlist && fvdef != fignore  && fvdef != vignore)
+        fvdef = fvnone;                /* should be useless */
+      return FALSE;
+    case st_C_ignore:
+      fvdef = vignore;
+      return FALSE;
+    case st_C_operator:
+      fvdef = foperator;
+      *is_func_or_var = TRUE;
+      return TRUE;
+    case st_none:
+      if (constantypedefs && structdef == sinbody && structtype == st_C_enum)
+       return TRUE;
+      if (fvdef == fvnone)
+       {
+         fvdef = fvnameseen;   /* function or variable */
+         *is_func_or_var = TRUE;
+         return TRUE;
+       }
+    }
+
+  return FALSE;
+}
+
+/*
+ * C_entries ()
+ *     This routine finds functions, variables, typedefs,
+ *     #define's, enum constants and struct/union/enum definitions in
+ *     #C syntax and adds them to the list.
+ */
+#define current_lb_is_new (newndx == curndx)
+#define switch_line_buffers() (curndx = 1 - curndx)
+
+#define curlb (lbs[curndx].lb)
+#define othlb (lbs[1-curndx].lb)
+#define newlb (lbs[newndx].lb)
+#define curlinepos (lbs[curndx].linepos)
+#define othlinepos (lbs[1-curndx].linepos)
+#define newlinepos (lbs[newndx].linepos)
+
+#define CNL_SAVE_DEFINEDEF()                                           \
+do {                                                                   \
+  curlinepos = charno;                                                 \
+  lineno++;                                                            \
+  linecharno = charno;                                                 \
+  charno += readline (&curlb, inf);                                    \
+  lp = curlb.buffer;                                                   \
+  quotednl = FALSE;                                                    \
+  newndx = curndx;                                                     \
+} while (0)
+
+#define CNL()                                                          \
+do {                                                                   \
+  CNL_SAVE_DEFINEDEF();                                                        \
+  if (savetok.valid)                                                   \
+    {                                                                  \
+      tok = savetok;                                                   \
+      savetok.valid = FALSE;                                           \
+    }                                                                  \
+  definedef = dnone;                                                   \
+} while (0)
+
+
+void
+make_C_tag (isfun)
+     bool isfun;
+{
+  /* This function should never be called when tok.valid is FALSE, but
+     we must protect against invalid input or internal errors. */
+  if (tok.valid)
+    {
+      if (traditional_tag_style)
+       {
+         /* This was the original code.  Now we call new_pfnote instead,
+            which uses the new method for naming tags (see new_pfnote). */
+         char *name = NULL;
+
+         if (CTAGS || tok.named)
+           name = savestr (token_name.buffer);
+         pfnote (name, isfun,
+                 tok.buffer, tok.linelen, tok.lineno, tok.linepos);
+       }
+      else
+       new_pfnote (token_name.buffer, token_name.len, isfun,
+                   tok.buffer, tok.linelen, tok.lineno, tok.linepos);
+      tok.valid = FALSE;
+    }
+  else if (DEBUG)
+    abort ();
+}
+
+
+void
+C_entries (c_ext, inf)
+     int c_ext;                        /* extension of C */
+     FILE *inf;                        /* input file */
+{
+  register char c;             /* latest char read; '\0' for end of line */
+  register char *lp;           /* pointer one beyond the character `c' */
+  int curndx, newndx;          /* indices for current and new lb */
+  register int tokoff;         /* offset in line of start of current token */
+  register int toklen;         /* length of current token */
+  char *qualifier;             /* string used to qualify names */
+  int qlen;                    /* length of qualifier */
+  int cblev;                   /* current curly brace level */
+  int parlev;                  /* current parenthesis level */
+  bool incomm, inquote, inchar, quotednl, midtoken;
+  bool cplpl, cjava;
+  token savetok;               /* token saved during preprocessor handling */
+
+
+  tokoff = toklen = 0;         /* keep compiler quiet */
+  curndx = newndx = 0;
+  lineno = 0;
+  charno = 0;
+  lp = curlb.buffer;
+  *lp = 0;
+
+  fvdef = fvnone; typdef = tnone; structdef = snone;
+  definedef = dnone; objdef = onone;
+  next_token_is_func = yacc_rules = FALSE;
+  midtoken = inquote = inchar = incomm = quotednl = FALSE;
+  tok.valid = savetok.valid = FALSE;
+  cblev = 0;
+  parlev = 0;
+  cplpl = (c_ext & C_PLPL) == C_PLPL;
+  cjava = (c_ext & C_JAVA) == C_JAVA;
+  if (cjava)
+    { qualifier = "."; qlen = 1; }
+  else
+    { qualifier = "::"; qlen = 2; }
+
+  while (!feof (inf))
+    {
+      c = *lp++;
+      if (c == '\\')
+       {
+         /* If we're at the end of the line, the next character is a
+            '\0'; don't skip it, because it's the thing that tells us
+            to read the next line.  */
+         if (*lp == '\0')
+           {
+             quotednl = TRUE;
+             continue;
+           }
+         lp++;
+         c = ' ';
+       }
+      else if (incomm)
+       {
+         switch (c)
+           {
+           case '*':
+             if (*lp == '/')
+               {
+                 c = *lp++;
+                 incomm = FALSE;
+               }
+             break;
+           case '\0':
+             /* Newlines inside comments do not end macro definitions in
+                traditional cpp. */
+             CNL_SAVE_DEFINEDEF ();
+             break;
+           }
+         continue;
+       }
+      else if (inquote)
+       {
+         switch (c)
+           {
+           case '"':
+             inquote = FALSE;
+             break;
+           case '\0':
+             /* Newlines inside strings do not end macro definitions
+                in traditional cpp, even though compilers don't
+                usually accept them. */
+             CNL_SAVE_DEFINEDEF ();
+             break;
+           }
+         continue;
+       }
+      else if (inchar)
+       {
+         switch (c)
+           {
+           case '\0':
+             /* Hmmm, something went wrong. */
+             CNL ();
+             /* FALLTHRU */
+           case '\'':
+             inchar = FALSE;
+             break;
+           }
+         continue;
+       }
+      else
+       switch (c)
+         {
+         case '"':
+           inquote = TRUE;
+           if (fvdef != finlist && fvdef != fignore && fvdef !=vignore)
+             fvdef = fvnone;
+           continue;
+         case '\'':
+           inchar = TRUE;
+           if (fvdef != finlist && fvdef != fignore && fvdef !=vignore)
+             fvdef = fvnone;
+           continue;
+         case '/':
+           if (*lp == '*')
+             {
+               lp++;
+               incomm = TRUE;
+               continue;
+             }
+           else if (/* cplpl && */ *lp == '/')
+             {
+               c = '\0';
+               break;
+             }
+           else
+             break;
+         case '%':
+           if ((c_ext & YACC) && *lp == '%')
+             {
+               /* entering or exiting rules section in yacc file */
+               lp++;
+               definedef = dnone; fvdef = fvnone;
+               typdef = tnone; structdef = snone;
+               next_token_is_func = FALSE;
+               midtoken = inquote = inchar = incomm = quotednl = FALSE;
+               cblev = 0;
+               yacc_rules = !yacc_rules;
+               continue;
+             }
+           else
+             break;
+         case '#':
+           if (definedef == dnone)
+             {
+               char *cp;
+               bool cpptoken = TRUE;
+
+               /* Look back on this line.  If all blanks, or nonblanks
+                  followed by an end of comment, this is a preprocessor
+                  token. */
+               for (cp = newlb.buffer; cp < lp-1; cp++)
+                 if (!iswhite (*cp))
+                   {
+                     if (*cp == '*' && *(cp+1) == '/')
+                       {
+                         cp++;
+                         cpptoken = TRUE;
+                       }
+                     else
+                       cpptoken = FALSE;
+                   }
+               if (cpptoken)
+                 definedef = dsharpseen;
+             } /* if (definedef == dnone) */
+
+           continue;
+         } /* switch (c) */
+
+
+      /* Consider token only if some complicated conditions are satisfied. */
+      if ((definedef != dnone
+          || (cblev == 0 && structdef != scolonseen)
+          || (cblev == 1 && cplpl && structdef == sinbody)
+          || (structdef == sinbody && structtype == st_C_enum))
+         && typdef != tignore
+         && definedef != dignorerest
+         && fvdef != finlist)
+       {
+         if (midtoken)
+           {
+             if (endtoken (c))
+               {
+                 if (c == ':' && cplpl && *lp == ':' && begtoken(*(lp + 1)))
+                   {
+                     /*
+                      * This handles :: in the middle, but not at the
+                      * beginning of an identifier.
+                      */
+                     lp += 2;
+                     toklen += 3;
+                   }
+                 else
+                   {
+                     bool funorvar = FALSE;
+
+                     if (yacc_rules
+                         || consider_token (newlb.buffer + tokoff, toklen, c,
+                                            c_ext, cblev, parlev, &funorvar))
+                       {
+                         tok.named = FALSE;
+                         if (structdef == sinbody
+                             && definedef == dnone
+                             && funorvar)
+                           /* function or var defined in C++ class body */
+                           {
+                             int len;
+                             if (fvdef == foperator)
+                               {
+                                 char *oldlp = lp;
+                                 lp = skip_spaces (lp-1);
+                                 while (*lp != '\0'
+                                        && !isspace (*lp) && *lp != '(')
+                                   lp += 1;
+                                 c = *lp++;
+                                 toklen += lp - oldlp;
+                               }
+
+                             len = strlen (structtag) + qlen + toklen;
+                             grow_linebuffer (&token_name, len + 1);
+                             strcpy (token_name.buffer, structtag);
+                             strcat (token_name.buffer, qualifier);
+                             strncat (token_name.buffer,
+                                      newlb.buffer + tokoff, toklen);
+                             token_name.len = len;
+                             tok.named = TRUE;
+                           }
+                         else if (objdef == ocatseen)
+                           /* Objective C category */
+                           {
+                             int len = strlen (objtag) + 2 + toklen;
+                             grow_linebuffer (&token_name, len + 1);
+                             strcpy (token_name.buffer, objtag);
+                             strcat (token_name.buffer, "(");
+                             strncat (token_name.buffer,
+                                      newlb.buffer + tokoff, toklen);
+                             strcat (token_name.buffer, ")");
+                             token_name.len = len;
+                             tok.named = TRUE;
+                           }
+                         else if (objdef == omethodtag
+                                  || objdef == omethodparm)
+                           /* Objective C method */
+                           {
+                             tok.named = TRUE;
+                           }
+                         else
+                           {
+                             grow_linebuffer (&token_name, toklen + 1);
+                             strncpy (token_name.buffer,
+                                      newlb.buffer + tokoff, toklen);
+                             token_name.buffer[toklen] = '\0';
+                             token_name.len = toklen;
+                             /* Name macros. */
+                             tok.named = (structdef == stagseen
+                                          || typdef == tend
+                                          || (funorvar
+                                              && definedef == dignorerest));
+                           }
+                         tok.lineno = lineno;
+                         tok.linelen = tokoff + toklen + 1;
+                         tok.buffer = newlb.buffer;
+                         tok.linepos = newlinepos;
+                         tok.valid = TRUE;
+
+                         if (definedef == dnone
+                             && (fvdef == fvnameseen
+                                 || fvdef == foperator
+                                 || structdef == stagseen
+                                 || typdef == tend
+                                 || objdef != onone))
+                           {
+                             if (current_lb_is_new)
+                               switch_line_buffers ();
+                           }
+                         else
+                           make_C_tag (funorvar);
+                       }
+                     midtoken = FALSE;
+                   }
+               } /* if (endtoken (c)) */
+             else if (intoken (c))
+               {
+                 toklen++;
+                 continue;
+               }
+           } /* if (midtoken) */
+         else if (begtoken (c))
+           {
+             switch (definedef)
+               {
+               case dnone:
+                 switch (fvdef)
+                   {
+                   case fstartlist:
+                     fvdef = finlist;
+                     continue;
+                   case flistseen:
+                     make_C_tag (TRUE); /* a function */
+                     fvdef = fignore;
+                     break;
+                   case fvnameseen:
+                     fvdef = fvnone;
+                     break;
+                   }
+                 if (structdef == stagseen && !cjava)
+                   structdef = snone;
+                 break;
+               case dsharpseen:
+                 savetok = tok;
+               }
+             if (!yacc_rules || lp == newlb.buffer + 1)
+               {
+                 tokoff = lp - 1 - newlb.buffer;
+                 toklen = 1;
+                 midtoken = TRUE;
+               }
+             continue;
+           } /* if (begtoken) */
+       } /* if must look at token */
+
+
+      /* Detect end of line, colon, comma, semicolon and various braces
+        after having handled a token.*/
+      switch (c)
+       {
+       case ':':
+         if (definedef != dnone)
+           break;
+         switch (objdef)
+           {
+           case  otagseen:
+             objdef = oignore;
+             make_C_tag (TRUE); /* an Objective C class */
+             break;
+           case omethodtag:
+           case omethodparm:
+             objdef = omethodcolon;
+             methodlen += 1;
+             grow_linebuffer (&token_name, methodlen + 1);
+             strcat (token_name.buffer, ":");
+             token_name.len = methodlen;
+             break;
+           }
+         if (structdef == stagseen)
+           structdef = scolonseen;
+         else
+           switch (fvdef)
+             {
+             case fvnameseen:
+               if (yacc_rules)
+                 {
+                   make_C_tag (FALSE); /* a yacc function */
+                   fvdef = fignore;
+                 }
+               break;
+             case fstartlist:
+               fvdef = fvnone;
+               break;
+             }
+         break;
+       case ';':
+         if (definedef != dnone)
+           break;
+         if (cblev == 0)
+           switch (typdef)
+             {
+             case tend:
+               make_C_tag (FALSE); /* a typedef */
+               /* FALLTHRU */
+             default:
+               typdef = tnone;
+             }
+         switch (fvdef)
+           {
+           case fignore:
+             break;
+           case fvnameseen:
+             if ((globals && cblev == 0) || (members && cblev == 1))
+               make_C_tag (FALSE); /* a variable */
+             /* FALLTHRU */
+           default:
+             fvdef = fvnone;
+             /* The following instruction invalidates the token.
+                Probably the token should be invalidated in all
+                other cases  where some state machine is reset. */
+             tok.valid = FALSE;
+           }
+         if (structdef == stagseen)
+           structdef = snone;
+         break;
+       case ',':
+         if (definedef != dnone)
+           break;
+         switch (objdef)
+           {
+           case omethodtag:
+           case omethodparm:
+             make_C_tag (TRUE); /* an Objective C method */
+             objdef = oinbody;
+             break;
+           }
+         switch (fvdef)
+           {
+           case foperator:
+           case finlist:
+           case fignore:
+           case vignore:
+             break;
+           case fvnameseen:
+             if ((globals && cblev == 0) || (members && cblev == 1))
+               make_C_tag (FALSE); /* a variable */
+             break;
+           default:
+             fvdef = fvnone;
+           }
+         if (structdef == stagseen)
+           structdef = snone;
+         break;
+       case '[':
+         if (definedef != dnone)
+           break;
+         if (cblev == 0 && typdef == tend)
+           {
+             typdef = tignore;
+             make_C_tag (FALSE);       /* a typedef */
+             break;
+           }
+         switch (fvdef)
+           {
+           case foperator:
+           case finlist:
+           case fignore:
+           case vignore:
+             break;
+           case fvnameseen:
+             if ((globals && cblev == 0) || (members && cblev == 1))
+               make_C_tag (FALSE); /* a variable */
+             /* FALLTHRU */
+           default:
+             fvdef = fvnone;
+           }
+         if (structdef == stagseen)
+           structdef = snone;
+         break;
+       case '(':
+         if (definedef != dnone)
+           break;
+         if (objdef == otagseen && parlev == 0)
+           objdef = oparenseen;
+         switch (fvdef)
+           {
+           case fvnone:
+             switch (typdef)
+               {
+               case ttypedseen:
+               case tend:
+                 if (tok.valid && *lp != '*')
+                   {
+                     /* This handles constructs like:
+                        typedef void OperatorFun (int fun); */
+                     make_C_tag (FALSE);
+                     typdef = tignore;
+                   }
+                 break;
+               } /* switch (typdef) */
+             break;
+           case foperator:     /* operator() is not handled */
+           case fvnameseen:
+             fvdef = fstartlist;
+             break;
+           case flistseen:
+             fvdef = finlist;
+             break;
+           }
+         parlev++;
+         break;
+       case ')':
+         if (definedef != dnone)
+           break;
+         if (objdef == ocatseen && parlev == 1)
+           {
+             make_C_tag (TRUE); /* an Objective C category */
+             objdef = oignore;
+           }
+         if (--parlev == 0)
+           {
+             switch (fvdef)
+               {
+               case fstartlist:
+               case finlist:
+                 fvdef = flistseen;
+                 break;
+               }
+             if (cblev == 0 && typdef == tend)
+               {
+                 typdef = tignore;
+                 make_C_tag (FALSE); /* a typedef */
+               }
+           }
+         else if (parlev < 0)  /* can happen due to ill-conceived #if's. */
+           parlev = 0;
+         break;
+       case '{':
+         if (definedef != dnone)
+           break;
+         if (typdef == ttypedseen)
+           typdef = tinbody;
+         switch (structdef)
+           {
+           case skeyseen:      /* unnamed struct */
+             structdef = sinbody;
+             structtag = "_anonymous_";
+             break;
+           case stagseen:
+           case scolonseen:    /* named struct */
+             structdef = sinbody;
+             make_C_tag (FALSE);       /* a struct */
+             break;
+           }
+         switch (fvdef)
+           {
+           case flistseen:
+             make_C_tag (TRUE); /* a function */
+             /* FALLTHRU */
+           case fignore:
+             fvdef = fvnone;
+             break;
+           case fvnone:
+             switch (objdef)
+               {
+               case otagseen:
+                 make_C_tag (TRUE); /* an Objective C class */
+                 objdef = oignore;
+                 break;
+               case omethodtag:
+               case omethodparm:
+                 make_C_tag (TRUE); /* an Objective C method */
+                 objdef = oinbody;
+                 break;
+               default:
+                 /* Neutralize `extern "C" {' grot. */
+                 if (cblev == 0 && structdef == snone && typdef == tnone)
+                   cblev = -1;
+               }
+           }
+         cblev++;
+         break;
+       case '*':
+         if (definedef != dnone)
+           break;
+         if (fvdef == fstartlist)
+           fvdef = fvnone;     /* avoid tagging `foo' in `foo (*bar()) ()' */
+         break;
+       case '}':
+         if (definedef != dnone)
+           break;
+         if (!noindentypedefs && lp == newlb.buffer + 1)
+           {
+             cblev = 0;        /* reset curly brace level if first column */
+             parlev = 0;       /* also reset paren level, just in case... */
+           }
+         else if (cblev > 0)
+           cblev--;
+         if (cblev == 0)
+           {
+             if (typdef == tinbody)
+               typdef = tend;
+             /* Memory leakage here: the string pointed by structtag is
+                never released, because I fear to miss something and
+                break things while freeing the area.  The amount of
+                memory leaked here is the sum of the lengths of the
+                struct tags.
+             if (structdef == sinbody)
+               free (structtag); */
+
+             structdef = snone;
+             structtag = "<error>";
+           }
+         break;
+       case '=':
+         if (definedef != dnone)
+           break;
+         switch (fvdef)
+           {
+           case foperator:
+           case finlist:
+           case fignore:
+           case vignore:
+             break;
+           case fvnameseen:
+             if ((globals && cblev == 0) || (members && cblev == 1))
+               make_C_tag (FALSE); /* a variable */
+             /* FALLTHRU */
+           default:
+             fvdef = vignore;
+           }
+         break;
+       case '+':
+       case '-':
+         if (objdef == oinbody && cblev == 0)
+           {
+             objdef = omethodsign;
+             break;
+           }
+         /* FALLTHRU */
+       case '#': case '~': case '&': case '%': case '/': case '|':
+       case '^': case '!': case '<': case '>': case '.': case '?': case ']':
+         if (definedef != dnone)
+           break;
+         /* These surely cannot follow a function tag in C. */
+         switch (fvdef)
+           {
+           case foperator:
+           case finlist:
+           case fignore:
+           case vignore:
+             break;
+           default:
+             fvdef = fvnone;
+           }
+         break;
+       case '\0':
+         if (objdef == otagseen)
+           {
+             make_C_tag (TRUE); /* an Objective C class */
+             objdef = oignore;
+           }
+         /* If a macro spans multiple lines don't reset its state. */
+         if (quotednl)
+           CNL_SAVE_DEFINEDEF ();
+         else
+           CNL ();
+         break;
+       } /* switch (c) */
+
+    } /* while not eof */
+}
+
+/*
+ * Process either a C++ file or a C file depending on the setting
+ * of a global flag.
+ */
+void
+default_C_entries (inf)
+     FILE *inf;
+{
+  C_entries (cplusplus ? C_PLPL : 0, inf);
+}
+
+/* Always do plain ANSI C. */
+void
+plain_C_entries (inf)
+     FILE *inf;
+{
+  C_entries (0, inf);
+}
+
+/* Always do C++. */
+void
+Cplusplus_entries (inf)
+     FILE *inf;
+{
+  C_entries (C_PLPL, inf);
+}
+
+/* Always do Java. */
+void
+Cjava_entries (inf)
+     FILE *inf;
+{
+  C_entries (C_JAVA, inf);
+}
+
+/* Always do C*. */
+void
+Cstar_entries (inf)
+     FILE *inf;
+{
+  C_entries (C_STAR, inf);
+}
+
+/* Always do Yacc. */
+void
+Yacc_entries (inf)
+     FILE *inf;
+{
+  C_entries (YACC, inf);
+}
+\f
+/* A useful macro. */  
+#define LOOP_ON_INPUT_LINES(file_pointer, line_buffer, char_pointer)   \
+  for (lineno = charno = 0;    /* loop initialization */               \
+       !feof (file_pointer)    /* loop test */                         \
+       && (lineno++,           /* instructions at start of loop */     \
+          linecharno = charno,                                         \
+          charno += readline (&line_buffer, file_pointer),             \
+          char_pointer = lb.buffer,                                    \
+          TRUE);                                                       \
+      )
+
+
+/*
+ * Read a file, but do no processing.  This is used to do regexp
+ * matching on files that have no language defined.
+ */
+void
+just_read_file (inf)
+     FILE *inf;
+{
+  register char *dummy;
+
+  LOOP_ON_INPUT_LINES (inf, lb, dummy)
+    continue;
+}
+\f
+/* Fortran parsing */
+
+bool
+tail (cp)
+     char *cp;
+{
+  register int len = 0;
+
+  while (*cp && lowcase(*cp) == lowcase(dbp[len]))
+    cp++, len++;
+  if (*cp == '\0' && !intoken(dbp[len]))
+    {
+      dbp += len;
+      return TRUE;
+    }
+  return FALSE;
+}
+
+void
+takeprec ()
+{
+  dbp = skip_spaces (dbp);
+  if (*dbp != '*')
+    return;
+  dbp++;
+  dbp = skip_spaces (dbp);
+  if (strneq (dbp, "(*)", 3))
+    {
+      dbp += 3;
+      return;
+    }
+  if (!isdigit (*dbp))
+    {
+      --dbp;                   /* force failure */
+      return;
+    }
+  do
+    dbp++;
+  while (isdigit (*dbp));
+}
+
+void
+getit (inf)
+     FILE *inf;
+{
+  register char *cp;
+
+  dbp = skip_spaces (dbp);
+  if (*dbp == '\0')
+    {
+      lineno++;
+      linecharno = charno;
+      charno += readline (&lb, inf);
+      dbp = lb.buffer;
+      if (dbp[5] != '&')
+       return;
+      dbp += 6;
+      dbp = skip_spaces (dbp);
+    }
+  if (!isalpha (*dbp)
+      && *dbp != '_'
+      && *dbp != '$')
+    return;
+  for (cp = dbp + 1; *cp && intoken (*cp); cp++)
+    continue;
+  pfnote (savenstr (dbp, cp-dbp), TRUE,
+         lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
+}
+
+
+void
+Fortran_functions (inf)
+     FILE *inf;
+{
+  LOOP_ON_INPUT_LINES (inf, lb, dbp)
+    {
+      if (*dbp == '%')
+       dbp++;                  /* Ratfor escape to fortran */
+      dbp = skip_spaces (dbp);
+      if (*dbp == '\0')
+       continue;
+      switch (lowcase (*dbp))
+       {
+       case 'i':
+         if (tail ("integer"))
+           takeprec ();
+         break;
+       case 'r':
+         if (tail ("real"))
+           takeprec ();
+         break;
+       case 'l':
+         if (tail ("logical"))
+           takeprec ();
+         break;
+       case 'c':
+         if (tail ("complex") || tail ("character"))
+           takeprec ();
+         break;
+       case 'd':
+         if (tail ("double"))
+           {
+             dbp = skip_spaces (dbp);
+             if (*dbp == '\0')
+               continue;
+             if (tail ("precision"))
+               break;
+             continue;
+           }
+         break;
+       }
+      dbp = skip_spaces (dbp);
+      if (*dbp == '\0')
+       continue;
+      switch (lowcase (*dbp))
+       {
+       case 'f':
+         if (tail ("function"))
+           getit (inf);
+         continue;
+       case 's':
+         if (tail ("subroutine"))
+           getit (inf);
+         continue;
+       case 'e':
+         if (tail ("entry"))
+           getit (inf);
+         continue;
+       case 'p':
+         if (tail ("program") || tail ("procedure"))
+           getit (inf);
+         continue;
+       case 'b':
+         if (tail ("blockdata") || tail ("block data"))
+           {
+             dbp = skip_spaces (dbp);
+             if (*dbp == '\0') /* assume un-named */
+               pfnote (savestr ("blockdata"), TRUE,
+                       lb.buffer, dbp - lb.buffer, lineno, linecharno);
+             else
+               getit (inf);    /* look for name */
+           }
+         continue;
+       }
+    }
+}
+\f
+/*
+ * Bob Weiner, Motorola Inc., 4/3/94
+ * Unix and microcontroller assembly tag handling
+ * look for '^[a-zA-Z_.$][a-zA_Z0-9_.$]*[: ^I^J]'
+ */
+void
+Asm_labels (inf)
+     FILE *inf;
+{
+  register char *cp;
+
+  LOOP_ON_INPUT_LINES (inf, lb, cp)
+    {
+      /* If first char is alphabetic or one of [_.$], test for colon
+        following identifier. */
+      if (isalpha (*cp) || *cp == '_' || *cp == '.' || *cp == '$')
+       {
+         /* Read past label. */
+         cp++;
+         while (isalnum (*cp) || *cp == '_' || *cp == '.' || *cp == '$')
+           cp++;
+         if (*cp == ':' || isspace (*cp))
+           {
+             /* Found end of label, so copy it and add it to the table. */
+             pfnote ((CTAGS) ? savenstr(lb.buffer, cp-lb.buffer) : NULL, TRUE,
+                     lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
+           }
+       }
+    }
+}
+\f
+/*
+ * Perl support by Bart Robinson <lomew@cs.utah.edu>
+ *              enhanced by Michael Ernst <mernst@alum.mit.edu>
+ * Perl sub names: look for /^sub[ \t\n]+[^ \t\n{]+/
+ * Perl variable names: /^(my|local).../
+ */
+void
+Perl_functions (inf)
+     FILE *inf;
+{
+  register char *cp;
+
+  LOOP_ON_INPUT_LINES (inf, lb, cp)
+    {
+      if (*cp++ == 's'
+         && *cp++ == 'u'
+         && *cp++ == 'b' && isspace (*cp++))
+       {
+         cp = skip_spaces (cp);
+         if (*cp != '\0')
+           {
+             char *sp = cp;
+             while (*cp != '\0'
+                    && !isspace (*cp) && *cp != '{' && *cp != '(')
+               cp++;
+             pfnote (savenstr (sp, cp-sp), TRUE,
+                     lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
+           }         
+       }
+       else if (globals                /* only if tagging global vars is enabled */
+               && ((cp = lb.buffer,
+                    *cp++ == 'm'
+                    && *cp++ == 'y')
+                   || (cp = lb.buffer,
+                       *cp++ == 'l'
+                       && *cp++ == 'o'
+                       && *cp++ == 'c'
+                       && *cp++ == 'a'
+                       && *cp++ == 'l'))
+               && (*cp == '(' || isspace (*cp)))
+       {
+         /* After "my" or "local", but before any following paren or space. */
+         char *varname = NULL;
+
+         cp = skip_spaces (cp);
+         if (*cp == '$' || *cp == '@' || *cp == '%')
+           {
+             char* varstart = ++cp;
+             while (isalnum (*cp) || *cp == '_')
+               cp++;
+             varname = savenstr (varstart, cp-varstart);
+           }
+         else
+           {
+             /* Should be examining a variable list at this point;
+                could insist on seeing an open parenthesis. */
+             while (*cp != '\0' && *cp != ';' && *cp != '=' &&  *cp != ')')
+               cp++;
+           }
+         /* Perhaps I should back cp up one character, so the TAGS table
+            doesn't mention (and so depend upon) the following char. */
+         pfnote ((CTAGS) ? savenstr (lb.buffer, cp-lb.buffer) : varname,
+                 FALSE, lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
+       }
+    }
+}
+\f
+/*
+ * Python support by Eric S. Raymond <esr@thyrsus.com>
+ * Look for /^def[ \t\n]+[^ \t\n(:]+/ or /^class[ \t\n]+[^ \t\n(:]+/
+ */
+void
+Python_functions (inf)
+     FILE *inf;
+{
+  register char *cp;
+
+  LOOP_ON_INPUT_LINES (inf, lb, cp)
+    {
+      if (*cp++ == 'd'
+         && *cp++ == 'e'
+         && *cp++ == 'f' && isspace (*cp++))
+       {
+         cp = skip_spaces (cp);
+         while (*cp != '\0' && !isspace (*cp) && *cp != '(' && *cp != ':')
+           cp++;
+         pfnote (NULL, TRUE,
+                 lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
+       }
+
+      cp = lb.buffer;
+      if (*cp++ == 'c'
+         && *cp++ == 'l'
+         && *cp++ == 'a'
+         && *cp++ == 's'
+         && *cp++ == 's' && isspace (*cp++))
+       {
+         cp = skip_spaces (cp);
+         while (*cp != '\0' && !isspace (*cp) && *cp != '(' && *cp != ':')
+           cp++;
+         pfnote (NULL, TRUE,
+                 lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
+       }
+    }
+}
+\f
+/* Idea by Corny de Souza
+ * Cobol tag functions
+ * We could look for anything that could be a paragraph name.
+ * i.e. anything that starts in column 8 is one word and ends in a full stop.
+ */
+void
+Cobol_paragraphs (inf)
+     FILE *inf;
+{
+  register char *bp, *ep;
+
+  LOOP_ON_INPUT_LINES (inf, lb, bp)
+    {
+      if (lb.len < 9)
+       continue;
+      bp += 8;
+
+      /* If eoln, compiler option or comment ignore whole line. */
+      if (bp[-1] != ' ' || !isalnum (bp[0]))
+        continue;
+
+      for (ep = bp; isalnum (*ep) || *ep == '-'; ep++)
+       continue;
+      if (*ep++ == '.')
+       pfnote (savenstr (bp, ep-bp), TRUE,
+               lb.buffer, ep - lb.buffer + 1, lineno, linecharno);
+    }
+}
+\f
+/* Added by Mosur Mohan, 4/22/88 */
+/* Pascal parsing                */
+
+/*
+ *  Locates tags for procedures & functions.  Doesn't do any type- or
+ *  var-definitions.  It does look for the keyword "extern" or
+ *  "forward" immediately following the procedure statement; if found,
+ *  the tag is skipped.
+ */
+void
+Pascal_functions (inf)
+     FILE *inf;
+{
+  linebuffer tline;            /* mostly copied from C_entries */
+  long save_lcno;
+  int save_lineno, save_len;
+  char c, *cp, *namebuf;
+
+  bool                         /* each of these flags is TRUE iff: */
+    incomment,                 /* point is inside a comment */
+    inquote,                   /* point is inside '..' string */
+    get_tagname,               /* point is after PROCEDURE/FUNCTION
+                                  keyword, so next item = potential tag */
+    found_tag,                 /* point is after a potential tag */
+    inparms,                   /* point is within parameter-list */
+    verify_tag;                        /* point has passed the parm-list, so the
+                                  next token will determine whether this
+                                  is a FORWARD/EXTERN to be ignored, or
+                                  whether it is a real tag */
+
+  save_lcno = save_lineno = save_len = 0; /* keep compiler quiet */
+  namebuf = NULL;              /* keep compiler quiet */
+  lineno = 0;
+  charno = 0;
+  dbp = lb.buffer;
+  *dbp = '\0';
+  initbuffer (&tline);
+
+  incomment = inquote = FALSE;
+  found_tag = FALSE;           /* have a proc name; check if extern */
+  get_tagname = FALSE;         /* have found "procedure" keyword    */
+  inparms = FALSE;             /* found '(' after "proc"            */
+  verify_tag = FALSE;          /* check if "extern" is ahead        */
+
+  
+  while (!feof (inf))          /* long main loop to get next char */  
+    {
+      c = *dbp++;
+      if (c == '\0')           /* if end of line */
+       {
+         lineno++;
+         linecharno = charno;
+         charno += readline (&lb, inf);
+         dbp = lb.buffer;
+         if (*dbp == '\0')
+           continue;
+         if (!((found_tag && verify_tag)
+               || get_tagname))
+           c = *dbp++;         /* only if don't need *dbp pointing
+                                  to the beginning of the name of
+                                  the procedure or function */
+       }
+      if (incomment)
+       {
+         if (c == '}')         /* within { } comments */
+           incomment = FALSE;
+         else if (c == '*' && *dbp == ')') /* within (* *) comments */
+           {
+             dbp++;
+             incomment = FALSE;
+           }
+         continue;
+       }
+      else if (inquote)
+       {
+         if (c == '\'')
+           inquote = FALSE;
+         continue;
+       }
+      else
+       switch (c)
+         {
+         case '\'':
+           inquote = TRUE;     /* found first quote */
+           continue;
+         case '{':             /* found open { comment */
+           incomment = TRUE;
+           continue;
+         case '(':
+           if (*dbp == '*')    /* found open (* comment */
+             {
+               incomment = TRUE;
+               dbp++;
+             }
+           else if (found_tag) /* found '(' after tag, i.e., parm-list */
+             inparms = TRUE;
+           continue;
+         case ')':             /* end of parms list */
+           if (inparms)
+             inparms = FALSE;
+           continue;
+         case ';':
+           if (found_tag && !inparms) /* end of proc or fn stmt */
+             {
+               verify_tag = TRUE;
+               break;
+             }
+           continue;
+         }
+      if (found_tag && verify_tag && (*dbp != ' '))
+       {
+         /* check if this is an "extern" declaration */
+         if (*dbp == '\0')
+           continue;
+         if (lowcase (*dbp == 'e'))
+           {
+             if (tail ("extern"))      /* superfluous, really! */
+               {
+                 found_tag = FALSE;
+                 verify_tag = FALSE;
+               }
+           }
+         else if (lowcase (*dbp) == 'f')
+           {
+             if (tail ("forward"))     /*  check for forward reference */
+               {
+                 found_tag = FALSE;
+                 verify_tag = FALSE;
+               }
+           }
+         if (found_tag && verify_tag) /* not external proc, so make tag */
+           {
+             found_tag = FALSE;
+             verify_tag = FALSE;
+             pfnote (namebuf, TRUE,
+                     tline.buffer, save_len, save_lineno, save_lcno);
+             continue;
+           }
+       }
+      if (get_tagname)         /* grab name of proc or fn */
+       {
+         if (*dbp == '\0')
+           continue;
+
+         /* save all values for later tagging */
+         grow_linebuffer (&tline, lb.len + 1);
+         strcpy (tline.buffer, lb.buffer);
+         save_lineno = lineno;
+         save_lcno = linecharno;
+
+         /* grab block name */
+         for (cp = dbp + 1; *cp != '\0' && !endtoken (*cp); cp++)
+           continue;
+         namebuf = savenstr (dbp, cp-dbp);
+         dbp = cp;             /* set dbp to e-o-token */
+         save_len = dbp - lb.buffer + 1;
+         get_tagname = FALSE;
+         found_tag = TRUE;
+         continue;
+
+         /* and proceed to check for "extern" */
+       }
+      else if (!incomment && !inquote && !found_tag)
+       {
+         /* check for proc/fn keywords */
+         switch (lowcase (c))
+           {
+           case 'p':
+             if (tail ("rocedure"))    /* c = 'p', dbp has advanced */
+               get_tagname = TRUE;
+             continue;
+           case 'f':
+             if (tail ("unction"))
+               get_tagname = TRUE;
+             continue;
+           }
+       }
+    }                          /* while not eof */
+
+  free (tline.buffer);
+}
+\f
+/*
+ * lisp tag functions
+ *  look for (def or (DEF, quote or QUOTE
+ */
+int
+L_isdef (strp)
+     register char *strp;
+{
+  return ((strp[1] == 'd' || strp[1] == 'D')
+         && (strp[2] == 'e' || strp[2] == 'E')
+         && (strp[3] == 'f' || strp[3] == 'F'));
+}
+
+int
+L_isquote (strp)
+     register char *strp;
+{
+  return ((*++strp == 'q' || *strp == 'Q')
+         && (*++strp == 'u' || *strp == 'U')
+         && (*++strp == 'o' || *strp == 'O')
+         && (*++strp == 't' || *strp == 'T')
+         && (*++strp == 'e' || *strp == 'E')
+         && isspace (*++strp));
+}
+
+void
+L_getit ()
+{
+  register char *cp;
+
+  if (*dbp == '\'')            /* Skip prefix quote */
+    dbp++;
+  else if (*dbp == '(')
+  {
+    if (L_isquote (dbp))
+      dbp += 7;                        /* Skip "(quote " */
+    else
+      dbp += 1;                        /* Skip "(" before name in (defstruct (foo)) */
+    dbp = skip_spaces (dbp);
+  }
+
+  for (cp = dbp /*+1*/;
+       *cp != '\0' && *cp != '(' && *cp != ' ' && *cp != ')';
+       cp++)
+    continue;
+  if (cp == dbp)
+    return;
+
+  pfnote (savenstr (dbp, cp-dbp), TRUE,
+         lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
+}
+
+void
+Lisp_functions (inf)
+     FILE *inf;
+{
+  LOOP_ON_INPUT_LINES (inf, lb, dbp)
+    {
+      if (dbp[0] == '(')
+       {
+         if (L_isdef (dbp))
+           {
+             dbp = skip_non_spaces (dbp);
+             dbp = skip_spaces (dbp);
+             L_getit ();
+           }
+         else
+           {
+             /* Check for (foo::defmumble name-defined ... */
+             do
+               dbp++;
+             while (*dbp != '\0' && !isspace (*dbp)
+                    && *dbp != ':' && *dbp != '(' && *dbp != ')');
+             if (*dbp == ':')
+               {
+                 do
+                   dbp++;
+                 while (*dbp == ':');
+
+                 if (L_isdef (dbp - 1))
+                   {
+                     dbp = skip_non_spaces (dbp);
+                     dbp = skip_spaces (dbp);
+                     L_getit ();
+                   }
+               }
+           }
+       }
+    }
+}
+\f
+/*
+ * Postscript tag functions
+ * Just look for lines where the first character is '/'
+ * Richard Mlynarik <mly@adoc.xerox.com>
+ */
+void 
+Postscript_functions (inf)
+     FILE *inf;
+{
+  register char *bp, *ep;
+
+  LOOP_ON_INPUT_LINES (inf, lb, bp)
+    {
+      if (bp[0] == '/')
+       {
+         for (ep = bp+1;
+              *ep != '\0' && *ep != ' ' && *ep != '{';
+              ep++)
+           continue;
+         pfnote ((CTAGS) ? savenstr (bp, ep-bp) : NULL, TRUE,
+                 lb.buffer, ep - lb.buffer + 1, lineno, linecharno);
+       }
+    }
+}
+
+\f
+/*
+ * Scheme tag functions
+ * look for (def... xyzzy
+ * look for (def... (xyzzy
+ * look for (def ... ((...(xyzzy ....
+ * look for (set! xyzzy
+ */
+
+void get_scheme ();
+
+void
+Scheme_functions (inf)
+     FILE *inf;
+{
+  LOOP_ON_INPUT_LINES (inf, lb, dbp)
+    {
+      if (dbp[0] == '('
+         && (dbp[1] == 'D' || dbp[1] == 'd')
+         && (dbp[2] == 'E' || dbp[2] == 'e')
+         && (dbp[3] == 'F' || dbp[3] == 'f'))
+       {
+         dbp = skip_non_spaces (dbp);
+         /* Skip over open parens and white space */
+         while (isspace (*dbp) || *dbp == '(')
+           dbp++;
+         get_scheme ();
+       }
+      if (dbp[0] == '('
+         && (dbp[1] == 'S' || dbp[1] == 's')
+         && (dbp[2] == 'E' || dbp[2] == 'e')
+         && (dbp[3] == 'T' || dbp[3] == 't')
+         && (dbp[4] == '!' || dbp[4] == '!')
+         && (isspace (dbp[5])))
+       {
+         dbp = skip_non_spaces (dbp);
+         dbp = skip_spaces (dbp);
+         get_scheme ();
+       }
+    }
+}
+
+void
+get_scheme ()
+{
+  register char *cp;
+
+  if (*dbp == '\0')
+    return;
+  /* Go till you get to white space or a syntactic break */
+  for (cp = dbp + 1;
+       *cp != '\0' && *cp != '(' && *cp != ')' && !isspace (*cp);
+       cp++)
+    continue;
+  pfnote (savenstr (dbp, cp-dbp), TRUE,
+         lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
+}
+\f
+/* Find tags in TeX and LaTeX input files.  */
+
+/* TEX_toktab is a table of TeX control sequences that define tags.
+   Each TEX_tabent records one such control sequence.
+   CONVERT THIS TO USE THE Stab TYPE!! */
+struct TEX_tabent
+{
+  char *name;
+  int len;
+};
+
+struct TEX_tabent *TEX_toktab = NULL;  /* Table with tag tokens */
+
+/* Default set of control sequences to put into TEX_toktab.
+   The value of environment var TEXTAGS is prepended to this.  */
+
+char *TEX_defenv = "\
+:chapter:section:subsection:subsubsection:eqno:label:ref:cite:bibitem\
+:part:appendix:entry:index";
+
+void TEX_mode ();
+struct TEX_tabent *TEX_decode_env ();
+int TEX_Token ();
+
+char TEX_esc = '\\';
+char TEX_opgrp = '{';
+char TEX_clgrp = '}';
+
+/*
+ * TeX/LaTeX scanning loop.
+ */
+void
+TeX_functions (inf)
+     FILE *inf;
+{
+  char *cp, *lasthit;
+  register int i;
+
+  /* Select either \ or ! as escape character.  */
+  TEX_mode (inf);
+
+  /* Initialize token table once from environment. */
+  if (!TEX_toktab)
+    TEX_toktab = TEX_decode_env ("TEXTAGS", TEX_defenv);
+
+  LOOP_ON_INPUT_LINES (inf, lb, cp)
+    {
+      lasthit = cp;
+      /* Look at each esc in line. */
+      while ((cp = etags_strchr (cp, TEX_esc)) != NULL)
+       {
+         if (*++cp == '\0')
+           break;
+         linecharno += cp - lasthit;
+         lasthit = cp;
+         i = TEX_Token (lasthit);
+         if (i >= 0)
+           {
+             /* We seem to include the TeX command in the tag name.
+             register char *p;
+             for (p = lasthit + TEX_toktab[i].len;
+                  *p != '\0' && *p != TEX_clgrp;
+                  p++)
+               continue; */
+             pfnote (/*savenstr (lasthit, p-lasthit)*/ (char *)NULL, TRUE,
+                     lb.buffer, lb.len, lineno, linecharno);
+             break;            /* We only tag a line once */
+           }
+       }
+    }
+}
+
+#define TEX_LESC '\\'
+#define TEX_SESC '!'
+#define TEX_cmt  '%'
+
+/* Figure out whether TeX's escapechar is '\\' or '!' and set grouping
+   chars accordingly. */
+void
+TEX_mode (inf)
+     FILE *inf;
+{
+  int c;
+
+  while ((c = getc (inf)) != EOF)
+    {
+      /* Skip to next line if we hit the TeX comment char. */
+      if (c == TEX_cmt)
+       while (c != '\n')
+         c = getc (inf);
+      else if (c == TEX_LESC || c == TEX_SESC )
+       break;
+    }
+
+  if (c == TEX_LESC)
+    {
+      TEX_esc = TEX_LESC;
+      TEX_opgrp = '{';
+      TEX_clgrp = '}';
+    }
+  else
+    {
+      TEX_esc = TEX_SESC;
+      TEX_opgrp = '<';
+      TEX_clgrp = '>';
+    }
+  /* If the input file is compressed, inf is a pipe, and rewind may fail.
+     No attempt is made to correct the situation. */
+  rewind (inf);
+}
+
+/* Read environment and prepend it to the default string.
+   Build token table. */
+struct TEX_tabent *
+TEX_decode_env (evarname, defenv)
+     char *evarname;
+     char *defenv;
+{
+  register char *env, *p;
+
+  struct TEX_tabent *tab;
+  int size, i;
+
+  /* Append default string to environment. */
+  env = getenv (evarname);
+  if (!env)
+    env = defenv;
+  else
+    {
+      char *oldenv = env;
+      env = concat (oldenv, defenv, "");
+    }
+
+  /* Allocate a token table */
+  for (size = 1, p = env; p;)
+    if ((p = etags_strchr (p, ':')) && *++p != '\0')
+      size++;
+  /* Add 1 to leave room for null terminator.  */
+  tab = xnew (size + 1, struct TEX_tabent);
+
+  /* Unpack environment string into token table. Be careful about */
+  /* zero-length strings (leading ':', "::" and trailing ':') */
+  for (i = 0; *env;)
+    {
+      p = etags_strchr (env, ':');
+      if (!p)                  /* End of environment string. */
+       p = env + strlen (env);
+      if (p - env > 0)
+       {                       /* Only non-zero strings. */
+         tab[i].name = savenstr (env, p - env);
+         tab[i].len = strlen (tab[i].name);
+         i++;
+       }
+      if (*p)
+       env = p + 1;
+      else
+       {
+         tab[i].name = NULL;   /* Mark end of table. */
+         tab[i].len = 0;
+         break;
+       }
+    }
+  return tab;
+}
+
+/* If the text at CP matches one of the tag-defining TeX command names,
+   return the pointer to the first occurrence of that command in TEX_toktab.
+   Otherwise return -1.
+   Keep the capital `T' in `token' for dumb truncating compilers
+   (this distinguishes it from `TEX_toktab' */
+int
+TEX_Token (cp)
+     char *cp;
+{
+  int i;
+
+  for (i = 0; TEX_toktab[i].len > 0; i++)
+    if (strneq (TEX_toktab[i].name, cp, TEX_toktab[i].len))
+      return i;
+  return -1;
+}
+\f
+/*
+ * Prolog support (rewritten) by Anders Lindgren, Mar. 96
+ *
+ * Assumes that the predicate starts at column 0.
+ * Only the first clause of a predicate is added. 
+ */
+int prolog_pred ();
+void prolog_skip_comment ();
+int prolog_atom ();
+
+void
+Prolog_functions (inf)
+     FILE *inf;
+{
+  char *cp, *last;
+  int len;
+  int allocated;
+
+  allocated = 0;
+  len = 0;
+  last = NULL;
+
+  LOOP_ON_INPUT_LINES (inf, lb, cp)
+    {
+      if (cp[0] == '\0')       /* Empty line */
+       continue;
+      else if (isspace (cp[0])) /* Not a predicate */
+       continue;
+      else if (cp[0] == '/' && cp[1] == '*')   /* comment. */
+       prolog_skip_comment (&lb, inf);
+      else if ((len = prolog_pred (cp, last)) > 0)
+       {
+         /* Predicate.  Store the function name so that we only
+            generate a tag for the first clause.  */
+         if (last == NULL)
+           last = xnew(len + 1, char);
+         else if (len + 1 > allocated)
+           last = xrnew (last, len + 1, char);
+         allocated = len + 1;
+         strncpy (last, cp, len);
+         last[len] = '\0';
+       }
+    }
+}
+
+
+void
+prolog_skip_comment (plb, inf)
+     linebuffer *plb;
+     FILE *inf;
+{
+  char *cp;
+
+  do
+    {
+      for (cp = plb->buffer; *cp != '\0'; cp++)
+       if (cp[0] == '*' && cp[1] == '/')
+         return;
+      lineno++;
+      linecharno += readline (plb, inf);
+    }
+  while (!feof(inf));
+}
+
+/*
+ * A predicate definition is added if it matches:
+ *     <beginning of line><Prolog Atom><whitespace>(
+ *
+ * It is added to the tags database if it doesn't match the
+ * name of the previous clause header.
+ *
+ * Return the size of the name of the predicate, or 0 if no header
+ * was found.
+ */
+int
+prolog_pred (s, last)
+     char *s;
+     char *last;               /* Name of last clause. */
+{
+  int pos;
+  int len;
+
+  pos = prolog_atom (s, 0);
+  if (pos < 1)
+    return 0;
+
+  len = pos;
+  pos = skip_spaces (s + pos) - s;
+
+  if ((s[pos] == '(') || (s[pos] == '.'))
+    {
+      if (s[pos] == '(')
+       pos++;
+
+      /* Save only the first clause. */
+      if (last == NULL
+         || len != (int)strlen (last)
+         || !strneq (s, last, len))
+       {
+         pfnote ((CTAGS) ? savenstr (s, len) : NULL, TRUE,
+                 s, pos, lineno, linecharno);
+         return len;
+       }
+    }
+  return 0;
+}
+
+/*
+ * Consume a Prolog atom.
+ * Return the number of bytes consumed, or -1 if there was an error.
+ *
+ * A prolog atom, in this context, could be one of:
+ * - An alphanumeric sequence, starting with a lower case letter.
+ * - A quoted arbitrary string. Single quotes can escape themselves.
+ *   Backslash quotes everything.
+ */
+int
+prolog_atom (s, pos)
+     char *s;
+     int pos;
+{
+  int origpos;
+
+  origpos = pos;
+
+  if (islower(s[pos]) || (s[pos] == '_'))
+    {
+      /* The atom is unquoted. */
+      pos++;
+      while (isalnum(s[pos]) || (s[pos] == '_'))
+       {
+         pos++;
+       }
+      return pos - origpos;
+    }
+  else if (s[pos] == '\'')
+    {
+      pos++;
+
+      while (1) 
+       {
+         if (s[pos] == '\'')
+           {
+             pos++;
+             if (s[pos] != '\'')
+               break;
+             pos++;            /* A double quote */
+           }
+         else if (s[pos] == '\0')
+           /* Multiline quoted atoms are ignored. */
+           return -1;
+         else if (s[pos] == '\\')
+           {
+             if (s[pos+1] == '\0')
+               return -1;
+             pos += 2;
+           }
+         else
+           pos++;
+       }
+      return pos - origpos;
+    }
+  else
+    return -1;
+}
+\f
+/* 
+ * Support for Erlang  --  Anders Lindgren, Feb 1996.
+ *
+ * Generates tags for functions, defines, and records.
+ *
+ * Assumes that Erlang functions start at column 0.
+ */
+int erlang_func ();
+void erlang_attribute ();
+int erlang_atom ();
+
+void
+Erlang_functions (inf)
+     FILE *inf;
+{
+  char *cp, *last;
+  int len;
+  int allocated;
+
+  allocated = 0;
+  len = 0;
+  last = NULL;
+
+  LOOP_ON_INPUT_LINES (inf, lb, cp)
+    {
+      if (cp[0] == '\0')       /* Empty line */
+       continue;
+      else if (isspace (cp[0])) /* Not function nor attribute */
+       continue;
+      else if (cp[0] == '%')   /* comment */
+       continue;
+      else if (cp[0] == '"')   /* Sometimes, strings start in column one */
+       continue;
+      else if (cp[0] == '-')   /* attribute, e.g. "-define" */
+       {
+         erlang_attribute (cp);
+         last = NULL;
+       }
+      else if ((len = erlang_func (cp, last)) > 0)
+       {
+         /* 
+          * Function.  Store the function name so that we only
+          * generates a tag for the first clause.
+          */
+         if (last == NULL)
+           last = xnew (len + 1, char);
+         else if (len + 1 > allocated)
+           last = xrnew (last, len + 1, char);
+         allocated = len + 1;
+         strncpy (last, cp, len);
+         last[len] = '\0';
+       }
+    }
+}
+
+
+/*
+ * A function definition is added if it matches:
+ *     <beginning of line><Erlang Atom><whitespace>(
+ *
+ * It is added to the tags database if it doesn't match the
+ * name of the previous clause header.
+ *
+ * Return the size of the name of the function, or 0 if no function
+ * was found.
+ */
+int
+erlang_func (s, last)
+     char *s;
+     char *last;               /* Name of last clause. */
+{
+  int pos;
+  int len;
+
+  pos = erlang_atom (s, 0);
+  if (pos < 1)
+    return 0;
+
+  len = pos;
+  pos = skip_spaces (s + pos) - s;
+
+  /* Save only the first clause. */
+  if (s[pos++] == '('
+      && (last == NULL
+         || len != (int)strlen (last)
+         || !strneq (s, last, len)))
+       {
+         pfnote ((CTAGS) ? savenstr (s, len) : NULL, TRUE,
+                 s, pos, lineno, linecharno);
+         return len;
+       }
+
+  return 0;
+}
+
+
+/*
+ * Handle attributes.  Currently, tags are generated for defines 
+ * and records.
+ *
+ * They are on the form:
+ * -define(foo, bar).
+ * -define(Foo(M, N), M+N).
+ * -record(graph, {vtab = notable, cyclic = true}).
+ */
+void
+erlang_attribute (s)
+     char *s;
+{
+  int pos;
+  int len;
+
+  if (strneq (s, "-define", 7) || strneq (s, "-record", 7))
+    {
+      pos = skip_spaces (s + 7) - s;
+      if (s[pos++] == '(') 
+       {
+         pos = skip_spaces (s + pos) - s;
+         len = erlang_atom (s, pos);
+         if (len != 0)
+           pfnote ((CTAGS) ? savenstr (& s[pos], len) : NULL, TRUE,
+                   s, pos + len, lineno, linecharno);
+       }
+    }
+  return;
+}
+
+
+/*
+ * Consume an Erlang atom (or variable).
+ * Return the number of bytes consumed, or -1 if there was an error.
+ */
+int
+erlang_atom (s, pos)
+     char *s;
+     int pos;
+{
+  int origpos;
+
+  origpos = pos;
+
+  if (isalpha (s[pos]) || s[pos] == '_')
+    {
+      /* The atom is unquoted. */
+      pos++;
+      while (isalnum (s[pos]) || s[pos] == '_')
+       pos++;
+      return pos - origpos;
+    }
+  else if (s[pos] == '\'')
+    {
+      pos++;
+
+      while (1) 
+       {
+         if (s[pos] == '\'')
+           {
+             pos++;
+             break;
+           }
+         else if (s[pos] == '\0')
+           /* Multiline quoted atoms are ignored. */
+           return -1;
+         else if (s[pos] == '\\')
+           {
+             if (s[pos+1] == '\0')
+               return -1;
+             pos += 2;
+           }
+         else
+           pos++;
+       }
+      return pos - origpos;
+    }
+  else
+    return -1;
+}
+\f
+#ifdef ETAGS_REGEXPS
+
+/* Take a string like "/blah/" and turn it into "blah", making sure
+   that the first and last characters are the same, and handling
+   quoted separator characters.  Actually, stops on the occurrence of
+   an unquoted separator.  Also turns "\t" into a Tab character.
+   Returns pointer to terminating separator.  Works in place.  Null
+   terminates name string. */
+char *
+scan_separators (name)
+     char *name;
+{
+  char sep = name[0];
+  char *copyto = name;
+  bool quoted = FALSE;
+
+  for (++name; *name != '\0'; ++name)
+    {
+      if (quoted)
+       {
+         if (*name == 't')
+           *copyto++ = '\t';
+         else if (*name == sep)
+           *copyto++ = sep;
+         else
+           {
+             /* Something else is quoted, so preserve the quote. */
+             *copyto++ = '\\';
+             *copyto++ = *name;
+           }
+         quoted = FALSE;
+       }
+      else if (*name == '\\')
+       quoted = TRUE;
+      else if (*name == sep)
+       break;
+      else
+       *copyto++ = *name;
+    }
+
+  /* Terminate copied string. */
+  *copyto = '\0';
+  return name;
+}
+
+/* Look at the argument of --regex or --no-regex and do the right
+   thing.  Same for each line of a regexp file. */
+void
+analyse_regex (regex_arg)
+     char *regex_arg;
+{
+  if (regex_arg == NULL)
+    free_patterns ();          /* --no-regex: remove existing regexps */
+
+  /* A real --regexp option or a line in a regexp file. */
+  switch (regex_arg[0])
+    {
+      /* Comments in regexp file or null arg to --regex. */
+    case '\0':
+    case ' ':
+    case '\t':
+      break;
+
+      /* Read a regex file.  This is recursive and may result in a
+        loop, which will stop when the file descriptors are exhausted. */
+    case '@':
+      {
+       FILE *regexfp;
+       linebuffer regexbuf;
+       char *regexfile = regex_arg + 1;
+
+       /* regexfile is a file containing regexps, one per line. */
+       regexfp = fopen (regexfile, "r");
+       if (regexfp == NULL)
+         {
+           pfatal (regexfile);
+           return;
+         }
+       initbuffer (&regexbuf);
+       while (readline_internal (&regexbuf, regexfp) > 0)
+         analyse_regex (regexbuf.buffer);
+       free (regexbuf.buffer);
+       fclose (regexfp);
+      }
+      break;
+
+      /* Regexp to be used for a specific language only. */
+    case '{':
+      {
+       language *lang;
+       char *lang_name = regex_arg + 1;
+       char *cp;
+
+       for (cp = lang_name; *cp != '}'; cp++)
+         if (*cp == '\0')
+           {
+             error ("unterminated language name in regex: %s", regex_arg);
+             return;
+           }
+       *cp = '\0';
+       lang = get_language_from_name (lang_name);
+       if (lang == NULL)
+         return;
+       add_regex (cp + 1, lang);
+      }
+      break;
+
+      /* Regexp to be used for any language. */
+    default:
+      add_regex (regex_arg, NULL);
+      break;
+    }
+}
+
+/* Turn a name, which is an ed-style (but Emacs syntax) regular
+   expression, into a real regular expression by compiling it. */
+void
+add_regex (regexp_pattern, lang)
+     char *regexp_pattern;
+     language *lang;
+{
+  char *name;
+  const char *err;
+  struct re_pattern_buffer *patbuf;
+  pattern *pp;
+
+
+  if (regexp_pattern[strlen(regexp_pattern)-1] != regexp_pattern[0])
+    {
+      error ("%s: unterminated regexp", regexp_pattern);
+      return;
+    }
+  name = scan_separators (regexp_pattern);
+  if (regexp_pattern[0] == '\0')
+    {
+      error ("null regexp", (char *)NULL);
+      return;
+    }
+  (void) scan_separators (name);
+
+  patbuf = xnew (1, struct re_pattern_buffer);
+  patbuf->translate = NULL;
+  patbuf->fastmap = NULL;
+  patbuf->buffer = NULL;
+  patbuf->allocated = 0;
+
+  err = re_compile_pattern (regexp_pattern, strlen (regexp_pattern), patbuf);
+  if (err != NULL)
+    {
+      error ("%s while compiling pattern", err);
+      return;
+    }
+
+  pp = p_head;
+  p_head = xnew (1, pattern);
+  p_head->regex = savestr (regexp_pattern);
+  p_head->p_next = pp;
+  p_head->language = lang;
+  p_head->pattern = patbuf;
+  p_head->name_pattern = savestr (name);
+  p_head->error_signaled = FALSE;
+}
+
+/*
+ * Do the substitutions indicated by the regular expression and
+ * arguments.
+ */
+char *
+substitute (in, out, regs)
+     char *in, *out;
+     struct re_registers *regs;
+{
+  char *result, *t;
+  int size, dig, diglen;
+
+  result = NULL;
+  size = strlen (out);
+
+  /* Pass 1: figure out how much to allocate by finding all \N strings. */
+  if (out[size - 1] == '\\')
+    fatal ("pattern error in \"%s\"", out);
+  for (t = etags_strchr (out, '\\');
+       t != NULL;
+       t = etags_strchr (t + 2, '\\'))
+    if (isdigit (t[1]))
+      {
+       dig = t[1] - '0';
+       diglen = regs->end[dig] - regs->start[dig];
+       size += diglen - 2;
+      }
+    else
+      size -= 1;
+
+  /* Allocate space and do the substitutions. */
+  result = xnew (size + 1, char);
+
+  for (t = result; *out != '\0'; out++)
+    if (*out == '\\' && isdigit (*++out))
+      {
+       /* Using "dig2" satisfies my debugger.  Bleah. */
+       dig = *out - '0';
+       diglen = regs->end[dig] - regs->start[dig];
+       strncpy (t, in + regs->start[dig], diglen);
+       t += diglen;
+      }
+    else
+      *t++ = *out;
+  *t = '\0';
+
+  if (DEBUG && (t > result + size || t - result != (int)strlen (result)))
+    abort ();
+
+  return result;
+}
+
+/* Deallocate all patterns. */
+void
+free_patterns ()
+{
+  pattern *pp;
+  while (p_head != NULL)
+    {
+      pp = p_head->p_next;
+      free (p_head->regex);
+      free (p_head->name_pattern);
+      free (p_head);
+      p_head = pp;
+    }
+  return;
+}
+\f
+#endif /* ETAGS_REGEXPS */
+/* Initialize a linebuffer for use */
+void
+initbuffer (lbp)
+     linebuffer *lbp;
+{
+  lbp->size = 200;
+  lbp->buffer = xnew (200, char);
+}
+
+/*
+ * Read a line of text from `stream' into `lbp', excluding the
+ * newline or CR-NL, if any.  Return the number of characters read from
+ * `stream', which is the length of the line including the newline.
+ *
+ * On DOS or Windows we do not count the CR character, if any, before the
+ * NL, in the returned length; this mirrors the behavior of emacs on those
+ * platforms (for text files, it translates CR-NL to NL as it reads in the
+ * file).
+ */
+long
+readline_internal (lbp, stream)
+     linebuffer *lbp;
+     register FILE *stream;
+{
+  char *buffer = lbp->buffer;
+  register char *p = lbp->buffer;
+  register char *pend;
+  int chars_deleted;
+
+  pend = p + lbp->size;                /* Separate to avoid 386/IX compiler bug.  */
+
+  while (1)
+    {
+      register int c = getc (stream);
+      if (p == pend)
+       {
+         /* We're at the end of linebuffer: expand it. */
+         lbp->size *= 2;
+         buffer = xrnew (buffer, lbp->size, char);
+         p += buffer - lbp->buffer;
+         pend = buffer + lbp->size;
+         lbp->buffer = buffer;
+       }
+      if (c == EOF)
+       {
+         *p = '\0';
+         chars_deleted = 0;
+         break;
+       }
+      if (c == '\n')
+       {
+         if (p > buffer && p[-1] == '\r')
+           {
+             p -= 1;
+#ifdef DOS_NT
+            /* Assume CRLF->LF translation will be performed by Emacs
+               when loading this file, so CRs won't appear in the buffer.
+               It would be cleaner to compensate within Emacs;
+               however, Emacs does not know how many CRs were deleted
+               before any given point in the file.  */
+             chars_deleted = 1;
+#else
+             chars_deleted = 2;
+#endif
+           }
+         else
+           {
+             chars_deleted = 1;
+           }
+         *p = '\0';
+         break;
+       }
+      *p++ = c;
+    }
+  lbp->len = p - buffer;
+
+  return lbp->len + chars_deleted;
+}
+
+/*
+ * Like readline_internal, above, but in addition try to match the
+ * input line against relevant regular expressions.
+ */
+long
+readline (lbp, stream)
+     linebuffer *lbp;
+     FILE *stream;
+{
+  /* Read new line. */
+  long result = readline_internal (lbp, stream);
+#ifdef ETAGS_REGEXPS
+  int match;
+  pattern *pp;
+
+  /* Match against relevant patterns. */
+  if (lbp->len > 0)
+    for (pp = p_head; pp != NULL; pp = pp->p_next)
+      {
+       /* Only use generic regexps or those for the current language. */
+       if (pp->language != NULL && pp->language != curlang)
+         continue;
+
+       match = re_match (pp->pattern, lbp->buffer, lbp->len, 0, &pp->regs);
+       switch (match)
+         {
+         case -2:
+           /* Some error. */
+           if (!pp->error_signaled)
+             {
+               error ("error while matching \"%s\"", pp->regex);
+               pp->error_signaled = TRUE;
+             }
+           break;
+         case -1:
+           /* No match. */
+           break;
+         default:
+           /* Match occurred.  Construct a tag. */
+           if (pp->name_pattern[0] != '\0')
+             {
+               /* Make a named tag. */
+               char *name = substitute (lbp->buffer,
+                                        pp->name_pattern, &pp->regs);
+               if (name != NULL)
+                 pfnote (name, TRUE, lbp->buffer, match, lineno, linecharno);
+             }
+           else
+             {
+               /* Make an unnamed tag. */
+               pfnote ((char *)NULL, TRUE,
+                       lbp->buffer, match, lineno, linecharno);
+             }
+           break;
+         }
+      }
+#endif /* ETAGS_REGEXPS */
+  
+  return result;
+}
+\f
+/*
+ * Return a pointer to a space of size strlen(cp)+1 allocated
+ * with xnew where the string CP has been copied.
+ */
+char *
+savestr (cp)
+     char *cp;
+{
+  return savenstr (cp, strlen (cp));
+}
+
+/*
+ * Return a pointer to a space of size LEN+1 allocated with xnew where
+ * the string CP has been copied for at most the first LEN characters.
+ */
+char *
+savenstr (cp, len)
+     char *cp;
+     int len;
+{
+  register char *dp;
+
+  dp = xnew (len + 1, char);
+  strncpy (dp, cp, len);
+  dp[len] = '\0';
+  return dp;
+}
+
+/*
+ * Return the ptr in sp at which the character c last
+ * appears; NULL if not found
+ *
+ * Identical to System V strrchr, included for portability.
+ */
+char *
+etags_strrchr (sp, c)
+     register char *sp, c;
+{
+  register char *r;
+
+  r = NULL;
+  do
+    {
+      if (*sp == c)
+       r = sp;
+  } while (*sp++);
+  return r;
+}
+
+
+/*
+ * Return the ptr in sp at which the character c first
+ * appears; NULL if not found
+ *
+ * Identical to System V strchr, included for portability.
+ */
+char *
+etags_strchr (sp, c)
+     register char *sp, c;
+{
+  do
+    {
+      if (*sp == c)
+       return sp;
+    } while (*sp++);
+  return NULL;
+}
+
+/* Skip spaces, return new pointer. */
+char *
+skip_spaces (cp)
+     char *cp;
+{
+  while (isspace (*cp))                /* isspace('\0')==FALSE */
+    cp++;
+  return cp;
+}
+
+/* Skip non spaces, return new pointer. */
+char *
+skip_non_spaces (cp)
+     char *cp;
+{
+  while (!iswhite (*cp))       /* iswhite('\0')==TRUE */
+    cp++;
+  return cp;
+}
+
+/* Print error message and exit.  */
+void
+fatal (s1, s2)
+     char *s1, *s2;
+{
+  error (s1, s2);
+  exit (BAD);
+}
+
+void
+pfatal (s1)
+     char *s1;
+{
+  perror (s1);
+  exit (BAD);
+}
+
+void
+suggest_asking_for_help ()
+{
+  fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n",
+          progname,
+#ifdef LONG_OPTIONS
+          "--help"
+#else
+          "-h"
+#endif
+          );
+  exit (BAD);
+}
+
+/* Print error message.  `s1' is printf control string, `s2' is arg for it. */
+void
+error (s1, s2)
+     char *s1, *s2;
+{
+  fprintf (stderr, "%s: ", progname);
+  fprintf (stderr, s1, s2);
+  fprintf (stderr, "\n");
+}
+
+/* Return a newly-allocated string whose contents
+   concatenate those of s1, s2, s3.  */
+char *
+concat (s1, s2, s3)
+     char *s1, *s2, *s3;
+{
+  int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
+  char *result = xnew (len1 + len2 + len3 + 1, char);
+
+  strcpy (result, s1);
+  strcpy (result + len1, s2);
+  strcpy (result + len1 + len2, s3);
+  result[len1 + len2 + len3] = '\0';
+
+  return result;
+}
+\f
+/* Does the same work as the system V getcwd, but does not need to
+   guess the buffer size in advance. */
+char *
+etags_getcwd ()
+{
+#ifdef HAVE_GETCWD
+  int bufsize = 200;
+  char *path = xnew (bufsize, char);
+
+  while (getcwd (path, bufsize) == NULL)
+    {
+      if (errno != ERANGE)
+       pfatal ("getcwd");
+      bufsize *= 2;
+      free (path);
+      path = xnew (bufsize, char);
+    }
+
+  canonicalize_filename (path);
+  return path;
+
+#else /* not HAVE_GETCWD */
+#ifdef MSDOS
+  char *p, path[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS.  */
+
+  getwd (path);
+
+  for (p = path; *p != '\0'; p++)
+    if (*p == '\\')
+      *p = '/';
+    else
+      *p = lowcase (*p);
+
+  return strdup (path);
+#else /* not MSDOS */
+  linebuffer path;
+  FILE *pipe;
+
+  initbuffer (&path);
+  pipe = (FILE *) popen ("pwd 2>/dev/null", "r");
+  if (pipe == NULL || readline_internal (&path, pipe) == 0)
+    pfatal ("pwd");
+  pclose (pipe);
+
+  return path.buffer;
+#endif /* not MSDOS */
+#endif /* not HAVE_GETCWD */
+}
+
+/* Return a newly allocated string containing the file name of FILE
+   relative to the absolute directory DIR (which should end with a slash). */
+char *
+relative_filename (file, dir)
+     char *file, *dir;
+{
+  char *fp, *dp, *afn, *res;
+  int i;
+
+  /* Find the common root of file and dir (with a trailing slash). */
+  afn = absolute_filename (file, cwd);
+  fp = afn;
+  dp = dir;
+  while (*fp++ == *dp++)
+    continue;
+  fp--, dp--;                  /* back to the first differing char */
+  do                           /* look at the equal chars until '/' */
+    fp--, dp--;
+  while (*fp != '/');
+
+  /* Build a sequence of "../" strings for the resulting relative file name. */
+  i = 0;
+  while ((dp = etags_strchr (dp + 1, '/')) != NULL)
+    i += 1;
+  res = xnew (3*i + strlen (fp + 1) + 1, char);
+  res[0] = '\0';
+  while (i-- > 0)
+    strcat (res, "../");
+
+  /* Add the file name relative to the common root of file and dir. */
+  strcat (res, fp + 1);
+  free (afn);
+
+  return res;
+}
+
+/* Return a newly allocated string containing the absolute file name
+   of FILE given DIR (which should end with a slash). */
+char *
+absolute_filename (file, dir)
+     char *file, *dir;
+{
+  char *slashp, *cp, *res;
+
+  if (filename_is_absolute (file))
+    res = savestr (file);
+#ifdef DOS_NT
+  /* We don't support non-absolute file names with a drive
+     letter, like `d:NAME' (it's too much hassle).  */
+  else if (file[1] == ':')
+    fatal ("%s: relative file names with drive letters not supported", file);
+#endif
+  else
+    res = concat (dir, file, "");
+
+  /* Delete the "/dirname/.." and "/." substrings. */
+  slashp = etags_strchr (res, '/');
+  while (slashp != NULL && slashp[0] != '\0')
+    {
+      if (slashp[1] == '.')
+       {
+         if (slashp[2] == '.'
+             && (slashp[3] == '/' || slashp[3] == '\0'))
+           {
+             cp = slashp;
+             do
+               cp--;
+             while (cp >= res && !filename_is_absolute (cp));
+             if (cp < res)
+               cp = slashp;    /* the absolute name begins with "/.." */
+#ifdef DOS_NT
+             /* Under MSDOS and NT we get `d:/NAME' as absolute
+                file name, so the luser could say `d:/../NAME'.
+                We silently treat this as `d:/NAME'.  */
+             else if (cp[0] != '/')
+               cp = slashp;
+#endif
+             strcpy (cp, slashp + 3);
+             slashp = cp;
+             continue;
+           }
+         else if (slashp[2] == '/' || slashp[2] == '\0')
+           {
+             strcpy (slashp, slashp + 2);
+             continue;
+           }
+       }
+
+      slashp = etags_strchr (slashp + 1, '/');
+    }
+  
+  if (res[0] == '\0')
+    return savestr ("/");
+  else
+    return res;
+}
+
+/* Return a newly allocated string containing the absolute
+   file name of dir where FILE resides given DIR (which should
+   end with a slash). */
+char *
+absolute_dirname (file, dir)
+     char *file, *dir;
+{
+  char *slashp, *res;
+  char save;
+
+  canonicalize_filename (file);
+  slashp = etags_strrchr (file, '/');
+  if (slashp == NULL)
+    return savestr (dir);
+  save = slashp[1];
+  slashp[1] = '\0';
+  res = absolute_filename (file, dir);
+  slashp[1] = save;
+
+  return res;
+}
+
+/* Whether the argument string is an absolute file name.  The argument
+   string must have been canonicalized with canonicalize_filename. */
+bool
+filename_is_absolute (fn)
+     char *fn;
+{
+  return (fn[0] == '/'
+#ifdef DOS_NT
+         || (isalpha(fn[0]) && fn[1] == ':' && fn[2] == '/')
+#endif
+         );
+}
+
+/* Translate backslashes into slashes.  Works in place. */
+void
+canonicalize_filename (fn)
+     register char *fn;
+{
+#ifdef DOS_NT
+  for (; *fn != '\0'; fn++)
+    if (*fn == '\\')
+      *fn = '/';
+#else
+  /* No action. */
+  fn = NULL;                   /* shut up the compiler */
+#endif
+}
+
+/* Increase the size of a linebuffer. */
+void
+grow_linebuffer (lbp, toksize)
+     linebuffer *lbp;
+     int toksize;
+{
+  while (lbp->size < toksize)
+    lbp->size *= 2;
+  lbp->buffer = xrnew (lbp->buffer, lbp->size, char);
+}
+
+/* Like malloc but get fatal error if memory is exhausted.  */
+long *
+xmalloc (size)
+     unsigned int size;
+{
+  long *result = (long *) malloc (size);
+  if (result == NULL)
+    fatal ("virtual memory exhausted", (char *)NULL);
+  return result;
+}
+
+long *
+xrealloc (ptr, size)
+     char *ptr;
+     unsigned int size;
+{
+  long *result =  (long *) realloc (ptr, size);
+  if (result == NULL)
+    fatal ("virtual memory exhausted", (char *)NULL);
+  return result;
+}
diff --git a/lib-src/fakemail.c b/lib-src/fakemail.c
new file mode 100644 (file)
index 0000000..22cb1ab
--- /dev/null
@@ -0,0 +1,680 @@
+/* sendmail-like interface to /bin/mail for system V,
+   Copyright (C) 1985, 1994 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs 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.
+
+GNU Emacs 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 GNU Emacs; see the file COPYING.  If not, write to
+the Free the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+/* Synched up with: FSF 19.28. */
+
+#define NO_SHORTNAMES
+#include <../src/config.h>
+
+#if defined (BSD) && !defined (BSD4_1) && !defined (USE_FAKEMAIL)
+/* This program isnot used in BSD, so just avoid loader complaints.  */
+int
+main ()
+{
+  return 0;
+}
+#elif defined (LINUX)
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+  /* Linux /bin/mail, if it exists, is NOT the Unix v7 mail that
+     fakemail depends on!  This causes garbled mail.  Better to
+     output an error message. */
+  fprintf (stderr, "Sorry, fakemail does not work on Linux.\n");
+  fprintf (stderr, "Make sure you have the sendmail program, and\n");
+  fprintf (stderr, "set the Lisp variable `sendmail-program' to point\n");
+  fprintf (stderr, "to the path of the sendmail binary.\n");
+  return 1;
+}
+#else /* not BSD 4.2 (or newer) */
+#ifdef MSDOS
+int
+main ()
+{
+  return 0;
+}
+#else /* not MSDOS */
+/* This conditional contains all the rest of the file.  */
+
+/* These are defined in config in some versions. */
+
+#ifdef static
+#undef static
+#endif
+
+#ifdef read
+#undef read
+#undef write
+#undef open
+#undef close
+#endif
+
+#include <stdio.h>
+#if __STDC__ || defined(STDC_HEADERS)
+#include <stdlib.h>
+#include <unistd.h>
+#endif
+#include <string.h>
+#include <ctype.h>
+#include <time.h>
+#include <pwd.h>
+\f
+/* Type definitions */
+
+#define boolean int
+#define true 1
+#define false 0
+
+/* Various lists */
+
+struct line_record
+{
+  char *string;
+  struct line_record *continuation;
+};
+typedef struct line_record *line_list;
+
+struct header_record
+{
+  line_list text;
+  struct header_record *next;
+  struct header_record *previous;
+};
+typedef struct header_record *header;
+                       
+struct stream_record
+{
+  FILE *handle;
+  int (*action)();
+  struct stream_record *rest_streams;
+};
+typedef struct stream_record *stream_list;
+
+/* A `struct linebuffer' is a structure which holds a line of text.
+ * `readline' reads a line from a stream into a linebuffer
+ * and works regardless of the length of the line.
+ */
+
+struct linebuffer
+{
+  long size;
+  char *buffer;
+};
+
+struct linebuffer lb;
+
+#define new_list()                                     \
+  ((line_list) xmalloc (sizeof (struct line_record)))
+#define new_header()                           \
+  ((header) xmalloc (sizeof (struct header_record)))
+#define new_stream()                           \
+  ((stream_list) xmalloc (sizeof (struct stream_record)))
+#define alloc_string(nchars)                           \
+  ((char *) xmalloc ((nchars) + 1))
+\f
+/* Global declarations */
+
+#define BUFLEN 1024
+#define KEYWORD_SIZE 256
+#define FROM_PREFIX "From"
+#define MY_NAME "fakemail"
+#define NIL ((line_list) NULL)
+#define INITIAL_LINE_SIZE 200
+
+#ifndef MAIL_PROGRAM_NAME
+#define MAIL_PROGRAM_NAME "/bin/mail"
+#endif
+
+static CONST char *my_name;
+static char *the_date;
+static char *the_user;
+static line_list file_preface;
+static stream_list the_streams;
+static boolean no_problems = true;
+
+#if !__STDC__ && !defined(STDC_HEADERS)
+extern FILE *popen ();
+extern int fclose (), pclose ();
+extern char *malloc (), *realloc ();
+#endif
+
+#ifdef CURRENT_USER
+extern struct passwd *getpwuid ();
+extern unsigned short geteuid ();
+static struct passwd *my_entry;
+#define cuserid(s)                             \
+(my_entry = getpwuid (((int) geteuid ())),     \
+ my_entry->pw_name)
+#endif
+\f
+/* Utilities */
+
+/* Print error message.  `s1' is printf control string, `s2' is arg for it. */
+
+static void
+error (CONST char *s1, CONST char *s2)
+{
+  printf ("%s: ", my_name);
+  printf (s1, s2);
+  printf ("\n");
+  no_problems = false;
+}
+
+/* Print error message and exit.  */
+
+static void
+fatal (CONST char *s1, CONST char *s2)
+{
+  error (s1, s2);
+  exit (1);
+}
+
+/* Like malloc but get fatal error if memory is exhausted.  */
+
+static char *
+xmalloc (size)
+     size_t size;
+{
+  char *result = malloc (((unsigned) size));
+  if (result == ((char *) NULL))
+    fatal ("virtual memory exhausted", (char *) 0);
+  return result;
+}
+
+static char *
+xrealloc (ptr, size)
+     char *ptr;
+     size_t size;
+{
+  char *result = realloc (ptr, ((unsigned) size));
+  if (result == ((char *) NULL))
+    fatal ("virtual memory exhausted", (char *) 0);
+  return result;
+}
+\f
+/* Initialize a linebuffer for use */
+
+static void
+init_linebuffer (struct linebuffer *linebuffer)
+{
+  linebuffer->size = INITIAL_LINE_SIZE;
+  linebuffer->buffer = ((char *) xmalloc (INITIAL_LINE_SIZE));
+}
+
+/* Read a line of text from `stream' into `linebuffer'.
+ * Return the length of the line.  
+ */
+
+static long
+readline (struct linebuffer *linebuffer, FILE *stream)
+{
+  char *buffer = linebuffer->buffer;
+  char *p = linebuffer->buffer;
+  char *end = p + linebuffer->size;
+
+  while (true)
+    {
+      int c = getc (stream);
+      if (p == end)
+       {
+         linebuffer->size *= 2;
+         buffer = ((char *) xrealloc ((char *) buffer,
+                                      (size_t) (linebuffer->size)));
+         p = buffer + (p - linebuffer->buffer);
+         end = buffer + linebuffer->size;
+         linebuffer->buffer = buffer;
+       }
+      if (c < 0 || c == '\n')
+       {
+         *p = 0;
+         break;
+       }
+      *p++ = c;
+    }
+
+  return p - buffer;
+}
+\f
+static char *
+get_keyword (register char *field, char **rest)
+{
+  static char keyword[KEYWORD_SIZE];
+  register char *ptr;
+  register char c;
+
+  ptr = &keyword[0];
+  c = *field++;
+  if ((isspace (c)) || (c == ':'))
+    return ((char *) NULL);
+  *ptr++ = ((islower (c)) ? (toupper (c)) : c);
+  while (((c = *field++) != ':') && (!(isspace (c))))
+    *ptr++ = ((islower (c)) ? (toupper (c)) : c);
+  *ptr++ = '\0';
+  while (isspace (c)) c = *field++;
+  if (c != ':') return ((char *) NULL);
+  *rest = field;
+  return &keyword[0];
+}
+
+static boolean
+has_keyword (char *field)
+{
+  char *ignored;
+  return (get_keyword (field, &ignored) != ((char *) NULL));
+}
+
+static char *
+add_field (line_list the_list, register char *field, register char *where)
+{
+  register char c;
+  while (true)
+    {
+      *where++ = ' ';
+      while ((c = *field++) != '\0')
+       {
+         if (c == '(')
+           {
+             while (*field && *field != ')') ++field;
+             if (! (*field++)) break; /* no closer */
+             if (! (*field))   break; /* closerNULL */
+             c = *field;
+           }
+         *where++ = ((c == ','||c=='>'||c=='<') ? ' ' : c);
+       }
+      if (the_list == NIL) break;
+      field = the_list->string;
+      the_list = the_list->continuation;
+    }
+  return where;
+}
+\f
+static line_list
+make_file_preface (void)
+{
+  char *the_string, *temp;
+  long idiotic_interface;
+  long prefix_length;
+  long user_length;
+  long date_length;
+  line_list result;
+
+  prefix_length = strlen (FROM_PREFIX);
+  time (&idiotic_interface);
+  the_date = ctime (&idiotic_interface);
+  /* the_date has an unwanted newline at the end */
+  date_length = strlen (the_date) - 1;
+  the_date[date_length] = '\0';
+  temp = cuserid ((char *) NULL);
+  user_length = strlen (temp);
+  the_user = alloc_string ((size_t) (user_length + 1));
+  strcpy (the_user, temp);
+  the_string = alloc_string ((size_t) (3 + prefix_length +
+                                      user_length +
+                                      date_length));
+  temp = the_string;
+  strcpy (temp, FROM_PREFIX);
+  temp = &temp[prefix_length];
+  *temp++ = ' ';
+  strcpy (temp, the_user);
+  temp = &temp[user_length];
+  *temp++ = ' ';
+  strcpy (temp, the_date);
+  result = new_list ();
+  result->string = the_string;
+  result->continuation = ((line_list) NULL);
+  return result;
+}
+
+static void
+write_line_list (register line_list the_list, FILE *the_stream)
+{
+  for ( ;
+      the_list != ((line_list) NULL) ;
+      the_list = the_list->continuation)
+    {
+      fputs (the_list->string, the_stream);
+      putc ('\n', the_stream);
+    }
+  return;
+}
+\f
+static int
+close_the_streams (void)
+{
+  register stream_list rem;
+  for (rem = the_streams;
+       rem != ((stream_list) NULL);
+       rem = rem->rest_streams)
+    no_problems = (no_problems &&
+                  ((*rem->action) (rem->handle) == 0));
+  the_streams = ((stream_list) NULL);
+  return (no_problems ? 0 : 1);
+}
+
+static void
+add_a_stream (FILE *the_stream, int (*closing_action)())
+{
+  stream_list old = the_streams;
+  the_streams = new_stream ();
+  the_streams->handle = the_stream;
+  the_streams->action = closing_action;
+  the_streams->rest_streams = old;
+  return;
+}
+
+static int
+my_fclose (FILE *the_file)
+{
+  putc ('\n', the_file);
+  fflush (the_file);
+  return fclose (the_file);
+}
+
+static boolean
+open_a_file (char *name)
+{
+  FILE *the_stream = fopen (name, "a");
+  if (the_stream != ((FILE *) NULL))
+    {
+      add_a_stream (the_stream, my_fclose);
+      if (the_user == ((char *) NULL))
+       file_preface = make_file_preface ();
+      write_line_list (file_preface, the_stream);
+      return true;
+    }
+  return false;
+}
+
+static void
+put_string (char *s)
+{
+  register stream_list rem;
+  for (rem = the_streams;
+       rem != ((stream_list) NULL);
+       rem = rem->rest_streams)
+    fputs (s, rem->handle);
+  return;
+}
+
+static void
+put_line (CONST char *string)
+{
+  register stream_list rem;
+  for (rem = the_streams;
+       rem != ((stream_list) NULL);
+       rem = rem->rest_streams)
+    {
+      CONST char *s = string;
+      int column = 0;
+
+      /* Divide STRING into lines.  */
+      while (*s != 0)
+       {
+         CONST char *breakpos;
+
+         /* Find the last char that fits.  */
+         for (breakpos = s; *breakpos && column < 78; ++breakpos)
+           {
+             if (*breakpos == '\t')
+               column += 8;
+             else
+               column++;
+           }
+         /* If we didn't reach end of line, break the line.  */
+         if (*breakpos)
+           {
+             /* Back up to just after the last comma that fits.  */
+             while (breakpos != s && breakpos[-1] != ',') --breakpos;
+
+             if (breakpos == s)
+               {
+                 /* If no comma fits, move past the first address anyway.  */
+                 while (*breakpos != 0 && *breakpos != ',') ++breakpos;
+                 if (*breakpos != 0)
+                   /* Include the comma after it.  */
+                   ++breakpos;
+               }
+           }
+         /* Output that much, then break the line.  */
+         fwrite (s, 1, breakpos - s, rem->handle);
+         column = 8;
+
+         /* Skip whitespace and prepare to print more addresses.  */
+         s = breakpos;
+         while (*s == ' ' || *s == '\t') ++s;
+          if (*s != 0)
+           fputs ("\n\t", rem->handle);
+       }
+      putc ('\n', rem->handle);
+    }
+  return;
+}
+\f
+#define mail_error error
+
+static void
+setup_files (register line_list the_list, register char *field)
+{
+  register char *start;
+  register char c;
+  while (true)
+    {
+      while (((c = *field) != '\0') &&
+            ((c == ' ') ||
+             (c == '\t') ||
+             (c == ',')))
+       field += 1;
+      if (c != '\0')
+       {
+         start = field;
+         while (((c = *field) != '\0') &&
+                (c != ' ') &&
+                (c != '\t') &&
+                (c != ','))
+           field += 1;
+         *field = '\0';
+         if (!open_a_file (start))
+           mail_error ("Could not open file %s", start);
+         *field = c;
+         if (c != '\0') continue;
+       }
+      if (the_list == ((line_list) NULL)) return;
+      field = the_list->string;
+      the_list = the_list->continuation;
+    }
+}
+\f
+static int
+args_size (header the_header)
+{
+  register header old = the_header;
+  register line_list rem;
+  register int size = 0;
+  do
+    {
+      char *field;
+      register char *keyword = get_keyword (the_header->text->string, &field);
+      if ((strcmp (keyword, "TO") == 0) ||
+         (strcmp (keyword, "CC") == 0) ||
+         (strcmp (keyword, "BCC") == 0))
+       {
+         size += 1 + strlen (field);
+         for (rem = the_header->text->continuation;
+              rem != NIL;
+              rem = rem->continuation)
+           size += 1 + strlen (rem->string);
+       }
+      the_header = the_header->next;
+    } while (the_header != old);
+  return size;
+}
+
+static void
+parse_header (header the_header, register char *where)
+{
+  register header old = the_header;
+  do
+    {
+      char *field;
+      register char *keyword = get_keyword (the_header->text->string, &field);
+      if (strcmp (keyword, "TO") == 0)
+       where = add_field (the_header->text->continuation, field, where);
+      else if (strcmp (keyword, "CC") == 0)
+       where = add_field (the_header->text->continuation, field, where);
+      else if (strcmp (keyword, "BCC") == 0)
+       {
+         where = add_field (the_header->text->continuation, field, where);
+         the_header->previous->next = the_header->next;
+         the_header->next->previous = the_header->previous;
+       }
+      else if (strcmp (keyword, "FCC") == 0)
+       setup_files (the_header->text->continuation, field);
+      the_header = the_header->next;
+    } while (the_header != old);
+  *where = '\0';
+  return;
+}
+\f    
+static header
+read_header (void)
+{
+  register header the_header = ((header) NULL);
+  register line_list *next_line = ((line_list *) NULL);
+
+  init_linebuffer (&lb);
+
+  do
+    {
+      long length;
+      register char *line;
+
+      readline (&lb, stdin);
+      line = lb.buffer;
+      length = strlen (line);
+      if (length == 0) break;
+
+      if (has_keyword (line))
+       {
+         register header old = the_header;
+         the_header = new_header ();
+         if (old == ((header) NULL))
+           {
+             the_header->next = the_header;
+             the_header->previous = the_header;
+           }
+         else
+           {
+             the_header->previous = old;
+             the_header->next = old->next;
+             old->next = the_header;
+           }
+         next_line = &(the_header->text);
+       }
+
+      if (next_line == ((line_list *) NULL))
+       {
+         /* Not a valid header */
+         exit (1);
+       }
+      *next_line = new_list ();
+      (*next_line)->string = alloc_string ((size_t) length);
+      strcpy (((*next_line)->string), line);
+      next_line = &((*next_line)->continuation);
+      *next_line = NIL;
+
+    } while (true);
+
+  return the_header->next;
+}
+\f
+static void
+write_header (header the_header)
+{
+  register header old = the_header;
+  do
+    {
+      register line_list the_list;
+      for (the_list = the_header->text;
+          the_list != NIL;
+          the_list = the_list->continuation)
+       put_line (the_list->string);
+      the_header = the_header->next;
+    } while (the_header != old);
+  put_line ("");
+  return;
+}
+\f
+int
+main (argc, argv)
+     int argc;
+     char **argv;
+{
+  char *command_line;
+  header the_header;
+  long name_length;
+  char *mail_program_name;
+  char buf[BUFLEN + 1];
+  register int size;
+  FILE *the_pipe;
+
+#if !(__STDC__ || defined(STDC_HEADERS))
+  extern char *getenv ();
+#endif
+
+  mail_program_name = getenv ("FAKEMAILER");
+  if (!(mail_program_name && *mail_program_name))
+    mail_program_name = (char *) MAIL_PROGRAM_NAME;
+  name_length = strlen (mail_program_name);
+
+  my_name = MY_NAME;
+  the_streams = ((stream_list) NULL);
+  the_date = ((char *) NULL);
+  the_user = ((char *) NULL);
+
+  the_header = read_header ();
+  command_line = alloc_string ((size_t) (name_length +
+                                        args_size (the_header)));
+  strcpy (command_line, mail_program_name);
+  parse_header (the_header, &command_line[name_length]);
+  
+  the_pipe = popen (command_line, "w");
+  if (the_pipe == ((FILE *) NULL))
+    fatal ("cannot open pipe to real mailer", (char *) 0);
+
+  add_a_stream (the_pipe, pclose);
+
+  write_header (the_header);
+
+  /* Dump the message itself */
+
+  while (!feof (stdin))
+    {
+      size = fread (buf, 1, BUFLEN, stdin);
+      buf[size] = '\0';
+      put_string (buf);
+    }
+
+  return close_the_streams ();
+}
+
+#endif /* not MSDOS */
+#endif /* not BSD 4.2 (or newer) */
diff --git a/lib-src/getopt.c b/lib-src/getopt.c
new file mode 100644 (file)
index 0000000..dd5cc71
--- /dev/null
@@ -0,0 +1,1032 @@
+/* Getopt for GNU.
+   NOTE: getopt is now part of the C library, so if you don't know what
+   "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu
+   before changing it!
+
+   Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97
+       Free Software Foundation, Inc.
+
+NOTE: The canonical source of this file is maintained with the GNU C Library.
+Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+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 2, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+USA.  */
+\f
+/* This tells Alpha OSF/1 not to define a getopt prototype in <stdio.h>.
+   Ditto for AIX 3.2 and <stdlib.h>.  */
+#ifndef _NO_PROTO
+#define _NO_PROTO
+#endif
+
+#ifdef HAVE_CONFIG_H
+#include <../src/config.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+/* Comment out all this code if we are using the GNU C Library, and are not
+   actually compiling the library itself.  This code is part of the GNU C
+   Library, but also included in many other GNU distributions.  Compiling
+   and linking in this code is a waste when using the GNU C library
+   (especially if it is a shared library).  Rather than having every GNU
+   program understand `configure --with-gnu-libc' and omit the object files,
+   it is simpler to just do this in the source for each such file.  */
+
+#define GETOPT_INTERFACE_VERSION 2
+#if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2
+#include <gnu-versions.h>
+#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
+#define ELIDE_CODE
+#endif
+#endif
+
+#ifndef ELIDE_CODE
+
+
+/* This needs to come after some library #include
+   to get __GNU_LIBRARY__ defined.  */
+#ifdef __GNU_LIBRARY__
+/* Don't include stdlib.h for non-GNU C libraries because some of them
+   contain conflicting prototypes for getopt.  */
+#include <stdlib.h>
+#include <unistd.h>
+#endif /* GNU C library.  */
+
+#ifdef VMS
+#include <unixlib.h>
+#if HAVE_STRING_H - 0
+#include <string.h>
+#endif
+#endif
+
+#if defined (WIN32) && !defined (__CYGWIN32__)
+/* It's not Unix, really.  See?  Capital letters.  */
+#include <windows.h>
+#undef getpid
+#define getpid() GetCurrentProcessId()
+#endif
+
+#ifndef _
+/* This is for other GNU distributions with internationalized messages.
+   When compiling libc, the _ macro is predefined.  */
+#ifdef HAVE_LIBINTL_H
+# include <libintl.h>
+# define _(msgid)      gettext (msgid)
+#else
+# define _(msgid)      (msgid)
+#endif
+#endif
+
+/* This version of `getopt' appears to the caller like standard Unix `getopt'
+   but it behaves differently for the user, since it allows the user
+   to intersperse the options with the other arguments.
+
+   As `getopt' works, it permutes the elements of ARGV so that,
+   when it is done, all the options precede everything else.  Thus
+   all application programs are extended to handle flexible argument order.
+
+   Setting the environment variable POSIXLY_CORRECT disables permutation.
+   Then the behavior is completely standard.
+
+   GNU application programs can use a third alternative mode in which
+   they can distinguish the relative order of options and other arguments.  */
+
+#include "getopt.h"
+
+/* For communication from `getopt' to the caller.
+   When `getopt' finds an option that takes an argument,
+   the argument value is returned here.
+   Also, when `ordering' is RETURN_IN_ORDER,
+   each non-option ARGV-element is returned here.  */
+
+char *optarg = NULL;
+
+/* Index in ARGV of the next element to be scanned.
+   This is used for communication to and from the caller
+   and for communication between successive calls to `getopt'.
+
+   On entry to `getopt', zero means this is the first call; initialize.
+
+   When `getopt' returns -1, this is the index of the first of the
+   non-option elements that the caller should itself scan.
+
+   Otherwise, `optind' communicates from one call to the next
+   how much of ARGV has been scanned so far.  */
+
+/* 1003.2 says this must be 1 before any call.  */
+int optind = 1;
+
+/* Formerly, initialization of getopt depended on optind==0, which
+   causes problems with re-calling getopt as programs generally don't
+   know that. */
+
+int __getopt_initialized = 0;
+
+/* The next char to be scanned in the option-element
+   in which the last option character we returned was found.
+   This allows us to pick up the scan where we left off.
+
+   If this is zero, or a null string, it means resume the scan
+   by advancing to the next ARGV-element.  */
+
+static char *nextchar;
+
+/* Callers store zero here to inhibit the error message
+   for unrecognized options.  */
+
+int opterr = 1;
+
+/* Set to an option character which was unrecognized.
+   This must be initialized on some systems to avoid linking in the
+   system's own getopt implementation.  */
+
+int optopt = '?';
+
+/* Describe how to deal with options that follow non-option ARGV-elements.
+
+   If the caller did not specify anything,
+   the default is REQUIRE_ORDER if the environment variable
+   POSIXLY_CORRECT is defined, PERMUTE otherwise.
+
+   REQUIRE_ORDER means don't recognize them as options;
+   stop option processing when the first non-option is seen.
+   This is what Unix does.
+   This mode of operation is selected by either setting the environment
+   variable POSIXLY_CORRECT, or using `+' as the first character
+   of the list of option characters.
+
+   PERMUTE is the default.  We permute the contents of ARGV as we scan,
+   so that eventually all the non-options are at the end.  This allows options
+   to be given in any order, even with programs that were not written to
+   expect this.
+
+   RETURN_IN_ORDER is an option available to programs that were written
+   to expect options and other ARGV-elements in any order and that care about
+   the ordering of the two.  We describe each non-option ARGV-element
+   as if it were the argument of an option with character code 1.
+   Using `-' as the first character of the list of option characters
+   selects this mode of operation.
+
+   The special argument `--' forces an end of option-scanning regardless
+   of the value of `ordering'.  In the case of RETURN_IN_ORDER, only
+   `--' can cause `getopt' to return -1 with `optind' != ARGC.  */
+
+static enum
+{
+  REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
+} ordering;
+
+/* Value of POSIXLY_CORRECT environment variable.  */
+static char *posixly_correct;
+\f
+#ifdef __GNU_LIBRARY__
+/* We want to avoid inclusion of string.h with non-GNU libraries
+   because there are many ways it can cause trouble.
+   On some systems, it contains special magic macros that don't work
+   in GCC.  */
+#include <string.h>
+#define        my_index        strchr
+#else
+
+/* Avoid depending on library functions or files
+   whose names are inconsistent.  */
+
+char *getenv ();
+
+static char *
+my_index (const char *str, int chr)
+{
+  while (*str)
+    {
+      if (*str == chr)
+       return (char *) str;
+      str++;
+    }
+  return 0;
+}
+
+/* If using GCC, we can safely declare strlen this way.
+   If not using GCC, it is ok not to declare it.  */
+#ifdef __GNUC__
+/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h.
+   That was relevant to code that was here before.  */
+#if !defined (__STDC__) || !__STDC__
+/* gcc with -traditional declares the built-in strlen to return int,
+   and has done so at least since version 2.4.5. -- rms.  */
+extern int strlen (const char *);
+#endif /* not __STDC__ */
+#endif /* __GNUC__ */
+
+#endif /* not __GNU_LIBRARY__ */
+\f
+/* Handle permutation of arguments.  */
+
+/* Describe the part of ARGV that contains non-options that have
+   been skipped.  `first_nonopt' is the index in ARGV of the first of them;
+   `last_nonopt' is the index after the last of them.  */
+
+static int first_nonopt;
+static int last_nonopt;
+
+#ifdef _LIBC
+/* Bash 2.0 gives us an environment variable containing flags
+   indicating ARGV elements that should not be considered arguments.  */
+
+/* Defined in getopt_init.c  */
+extern char *__getopt_nonoption_flags;
+
+static int nonoption_flags_max_len;
+static int nonoption_flags_len;
+
+static int original_argc;
+static char *const *original_argv;
+
+extern pid_t __libc_pid;
+
+/* Make sure the environment variable bash 2.0 puts in the environment
+   is valid for the getopt call we must make sure that the ARGV passed
+   to getopt is that one passed to the process.  */
+static void
+__attribute__ ((unused))
+store_args_and_env (int argc, char *const *argv)
+{
+  /* XXX This is no good solution.  We should rather copy the args so
+     that we can compare them later.  But we must not use malloc(3).  */
+  original_argc = argc;
+  original_argv = argv;
+}
+text_set_element (__libc_subinit, store_args_and_env);
+
+# define SWAP_FLAGS(ch1, ch2) \
+  if (nonoption_flags_len > 0)                                               \
+    {                                                                        \
+      char __tmp = __getopt_nonoption_flags[ch1];                            \
+      __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2];         \
+      __getopt_nonoption_flags[ch2] = __tmp;                                 \
+    }
+#else  /* !_LIBC */
+# define SWAP_FLAGS(ch1, ch2)
+#endif /* _LIBC */
+
+/* Exchange two adjacent subsequences of ARGV.
+   One subsequence is elements [first_nonopt,last_nonopt)
+   which contains all the non-options that have been skipped so far.
+   The other is elements [last_nonopt,optind), which contains all
+   the options processed since those non-options were skipped.
+
+   `first_nonopt' and `last_nonopt' are relocated so that they describe
+   the new indices of the non-options in ARGV after they are moved.  */
+
+#if defined (__STDC__) && __STDC__
+static void exchange (char **);
+#endif
+
+static void
+exchange (char **argv)
+{
+  int bottom = first_nonopt;
+  int middle = last_nonopt;
+  int top = optind;
+  char *tem;
+
+  /* Exchange the shorter segment with the far end of the longer segment.
+     That puts the shorter segment into the right place.
+     It leaves the longer segment in the right place overall,
+     but it consists of two parts that need to be swapped next.  */
+
+#ifdef _LIBC
+  /* First make sure the handling of the `__getopt_nonoption_flags'
+     string can work normally.  Our top argument must be in the range
+     of the string.  */
+  if (nonoption_flags_len > 0 && top >= nonoption_flags_max_len)
+    {
+      /* We must extend the array.  The user plays games with us and
+        presents new arguments.  */
+      char *new_str = malloc (top + 1);
+      if (new_str == NULL)
+       nonoption_flags_len = nonoption_flags_max_len = 0;
+      else
+       {
+         memcpy (new_str, __getopt_nonoption_flags, nonoption_flags_max_len);
+         memset (&new_str[nonoption_flags_max_len], '\0',
+                 top + 1 - nonoption_flags_max_len);
+         nonoption_flags_max_len = top + 1;
+         __getopt_nonoption_flags = new_str;
+       }
+    }
+#endif
+
+  while (top > middle && middle > bottom)
+    {
+      if (top - middle > middle - bottom)
+       {
+         /* Bottom segment is the short one.  */
+         int len = middle - bottom;
+         register int i;
+
+         /* Swap it with the top part of the top segment.  */
+         for (i = 0; i < len; i++)
+           {
+             tem = argv[bottom + i];
+             argv[bottom + i] = argv[top - (middle - bottom) + i];
+             argv[top - (middle - bottom) + i] = tem;
+             SWAP_FLAGS (bottom + i, top - (middle - bottom) + i);
+           }
+         /* Exclude the moved bottom segment from further swapping.  */
+         top -= len;
+       }
+      else
+       {
+         /* Top segment is the short one.  */
+         int len = top - middle;
+         register int i;
+
+         /* Swap it with the bottom part of the bottom segment.  */
+         for (i = 0; i < len; i++)
+           {
+             tem = argv[bottom + i];
+             argv[bottom + i] = argv[middle + i];
+             argv[middle + i] = tem;
+             SWAP_FLAGS (bottom + i, middle + i);
+           }
+         /* Exclude the moved top segment from further swapping.  */
+         bottom += len;
+       }
+    }
+
+  /* Update records for the slots the non-options now occupy.  */
+
+  first_nonopt += (optind - last_nonopt);
+  last_nonopt = optind;
+}
+
+/* Initialize the internal data when the first call is made.  */
+
+#if defined (__STDC__) && __STDC__
+static const char *_getopt_initialize (int, char *const *, const char *);
+#endif
+static const char *
+_getopt_initialize (int argc, char *const *argv, const char *optstring)
+{
+  /* Start processing options with ARGV-element 1 (since ARGV-element 0
+     is the program name); the sequence of previously skipped
+     non-option ARGV-elements is empty.  */
+
+  first_nonopt = last_nonopt = optind;
+
+  nextchar = NULL;
+
+  posixly_correct = getenv ("POSIXLY_CORRECT");
+
+  /* Determine how to handle the ordering of options and nonoptions.  */
+
+  if (optstring[0] == '-')
+    {
+      ordering = RETURN_IN_ORDER;
+      ++optstring;
+    }
+  else if (optstring[0] == '+')
+    {
+      ordering = REQUIRE_ORDER;
+      ++optstring;
+    }
+  else if (posixly_correct != NULL)
+    ordering = REQUIRE_ORDER;
+  else
+    ordering = PERMUTE;
+
+#ifdef _LIBC
+  if (posixly_correct == NULL
+      && argc == original_argc && argv == original_argv)
+    {
+      if (nonoption_flags_max_len == 0)
+       {
+         if (__getopt_nonoption_flags == NULL
+             || __getopt_nonoption_flags[0] == '\0')
+           nonoption_flags_max_len = -1;
+         else
+           {
+             const char *orig_str = __getopt_nonoption_flags;
+             int len = nonoption_flags_max_len = strlen (orig_str);
+             if (nonoption_flags_max_len < argc)
+               nonoption_flags_max_len = argc;
+             __getopt_nonoption_flags =
+               (char *) malloc (nonoption_flags_max_len);
+             if (__getopt_nonoption_flags == NULL)
+               nonoption_flags_max_len = -1;
+             else
+               {
+                 memcpy (__getopt_nonoption_flags, orig_str, len);
+                 memset (&__getopt_nonoption_flags[len], '\0',
+                         nonoption_flags_max_len - len);
+               }
+           }
+       }
+      nonoption_flags_len = nonoption_flags_max_len;
+    }
+  else
+    nonoption_flags_len = 0;
+#endif
+
+  return optstring;
+}
+\f
+/* Scan elements of ARGV (whose length is ARGC) for option characters
+   given in OPTSTRING.
+
+   If an element of ARGV starts with '-', and is not exactly "-" or "--",
+   then it is an option element.  The characters of this element
+   (aside from the initial '-') are option characters.  If `getopt'
+   is called repeatedly, it returns successively each of the option characters
+   from each of the option elements.
+
+   If `getopt' finds another option character, it returns that character,
+   updating `optind' and `nextchar' so that the next call to `getopt' can
+   resume the scan with the following option character or ARGV-element.
+
+   If there are no more option characters, `getopt' returns -1.
+   Then `optind' is the index in ARGV of the first ARGV-element
+   that is not an option.  (The ARGV-elements have been permuted
+   so that those that are not options now come last.)
+
+   OPTSTRING is a string containing the legitimate option characters.
+   If an option character is seen that is not listed in OPTSTRING,
+   return '?' after printing an error message.  If you set `opterr' to
+   zero, the error message is suppressed but we still return '?'.
+
+   If a char in OPTSTRING is followed by a colon, that means it wants an arg,
+   so the following text in the same ARGV-element, or the text of the following
+   ARGV-element, is returned in `optarg'.  Two colons mean an option that
+   wants an optional arg; if there is text in the current ARGV-element,
+   it is returned in `optarg', otherwise `optarg' is set to zero.
+
+   If OPTSTRING starts with `-' or `+', it requests different methods of
+   handling the non-option ARGV-elements.
+   See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
+
+   Long-named options begin with `--' instead of `-'.
+   Their names may be abbreviated as long as the abbreviation is unique
+   or is an exact match for some defined option.  If they have an
+   argument, it follows the option name in the same ARGV-element, separated
+   from the option name by a `=', or else the in next ARGV-element.
+   When `getopt' finds a long-named option, it returns 0 if that option's
+   `flag' field is nonzero, the value of the option's `val' field
+   if the `flag' field is zero.
+
+   The elements of ARGV aren't really const, because we permute them.
+   But we pretend they're const in the prototype to be compatible
+   with other systems.
+
+   LONGOPTS is a vector of `struct option' terminated by an
+   element containing a name which is zero.
+
+   LONGIND returns the index in LONGOPT of the long-named option found.
+   It is only valid when a long-named option has been found by the most
+   recent call.
+
+   If LONG_ONLY is nonzero, '-' as well as '--' can introduce
+   long-named options.  */
+
+int
+_getopt_internal (int argc, char *const *argv, const char *optstring,
+                 const struct option *longopts, int *longind, int long_only)
+{
+  optarg = NULL;
+
+  if (optind == 0 || !__getopt_initialized)
+    {
+      if (optind == 0)
+       optind = 1;     /* Don't scan ARGV[0], the program name.  */
+      optstring = _getopt_initialize (argc, argv, optstring);
+      __getopt_initialized = 1;
+    }
+
+  /* Test whether ARGV[optind] points to a non-option argument.
+     Either it does not have option syntax, or there is an environment flag
+     from the shell indicating it is not an option.  The later information
+     is only used when the used in the GNU libc.  */
+#ifdef _LIBC
+#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0'       \
+                    || (optind < nonoption_flags_len                         \
+                        && __getopt_nonoption_flags[optind] == '1'))
+#else
+#define NONOPTION_P (argv[optind][0] != '-' || argv[optind][1] == '\0')
+#endif
+
+  if (nextchar == NULL || *nextchar == '\0')
+    {
+      /* Advance to the next ARGV-element.  */
+
+      /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
+        moved back by the user (who may also have changed the arguments).  */
+      if (last_nonopt > optind)
+       last_nonopt = optind;
+      if (first_nonopt > optind)
+       first_nonopt = optind;
+
+      if (ordering == PERMUTE)
+       {
+         /* If we have just processed some options following some non-options,
+            exchange them so that the options come first.  */
+
+         if (first_nonopt != last_nonopt && last_nonopt != optind)
+           exchange ((char **) argv);
+         else if (last_nonopt != optind)
+           first_nonopt = optind;
+
+         /* Skip any additional non-options
+            and extend the range of non-options previously skipped.  */
+
+         while (optind < argc && NONOPTION_P)
+           optind++;
+         last_nonopt = optind;
+       }
+
+      /* The special ARGV-element `--' means premature end of options.
+        Skip it like a null option,
+        then exchange with previous non-options as if it were an option,
+        then skip everything else like a non-option.  */
+
+      if (optind != argc && !strcmp (argv[optind], "--"))
+       {
+         optind++;
+
+         if (first_nonopt != last_nonopt && last_nonopt != optind)
+           exchange ((char **) argv);
+         else if (first_nonopt == last_nonopt)
+           first_nonopt = optind;
+         last_nonopt = argc;
+
+         optind = argc;
+       }
+
+      /* If we have done all the ARGV-elements, stop the scan
+        and back over any non-options that we skipped and permuted.  */
+
+      if (optind == argc)
+       {
+         /* Set the next-arg-index to point at the non-options
+            that we previously skipped, so the caller will digest them.  */
+         if (first_nonopt != last_nonopt)
+           optind = first_nonopt;
+         return -1;
+       }
+
+      /* If we have come to a non-option and did not permute it,
+        either stop the scan or describe it to the caller and pass it by.  */
+
+      if (NONOPTION_P)
+       {
+         if (ordering == REQUIRE_ORDER)
+           return -1;
+         optarg = argv[optind++];
+         return 1;
+       }
+
+      /* We have found another option-ARGV-element.
+        Skip the initial punctuation.  */
+
+      nextchar = (argv[optind] + 1
+                 + (longopts != NULL && argv[optind][1] == '-'));
+    }
+
+  /* Decode the current option-ARGV-element.  */
+
+  /* Check whether the ARGV-element is a long option.
+
+     If long_only and the ARGV-element has the form "-f", where f is
+     a valid short option, don't consider it an abbreviated form of
+     a long option that starts with f.  Otherwise there would be no
+     way to give the -f short option.
+
+     On the other hand, if there's a long option "fubar" and
+     the ARGV-element is "-fu", do consider that an abbreviation of
+     the long option, just like "--fu", and not "-f" with arg "u".
+
+     This distinction seems to be the most useful approach.  */
+
+  if (longopts != NULL
+      && (argv[optind][1] == '-'
+         || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1])))))
+    {
+      char *nameend;
+      const struct option *p;
+      const struct option *pfound = NULL;
+      int exact = 0;
+      int ambig = 0;
+      int indfound = -1;
+      int option_index;
+
+      for (nameend = nextchar; *nameend && *nameend != '='; nameend++)
+       /* Do nothing.  */ ;
+
+      /* Test all long options for either exact match
+        or abbreviated matches.  */
+      for (p = longopts, option_index = 0; p->name; p++, option_index++)
+       if (!strncmp (p->name, nextchar, nameend - nextchar))
+         {
+           if ((unsigned int) (nameend - nextchar)
+               == (unsigned int) strlen (p->name))
+             {
+               /* Exact match found.  */
+               pfound = p;
+               indfound = option_index;
+               exact = 1;
+               break;
+             }
+           else if (pfound == NULL)
+             {
+               /* First nonexact match found.  */
+               pfound = p;
+               indfound = option_index;
+             }
+           else
+             /* Second or later nonexact match found.  */
+             ambig = 1;
+         }
+
+      if (ambig && !exact)
+       {
+         if (opterr)
+           fprintf (stderr, _("%s: option `%s' is ambiguous\n"),
+                    argv[0], argv[optind]);
+         nextchar += strlen (nextchar);
+         optind++;
+         optopt = 0;
+         return '?';
+       }
+
+      if (pfound != NULL)
+       {
+         option_index = indfound;
+         optind++;
+         if (*nameend)
+           {
+             /* Don't test has_arg with >, because some C compilers don't
+                allow it to be used on enums.  */
+             if (pfound->has_arg)
+               optarg = nameend + 1;
+             else
+               {
+                 if (opterr) {
+                  if (argv[optind - 1][1] == '-')
+                   /* --option */
+                   fprintf (stderr,
+                    _("%s: option `--%s' doesn't allow an argument\n"),
+                    argv[0], pfound->name);
+                  else
+                   /* +option or -option */
+                   fprintf (stderr,
+                    _("%s: option `%c%s' doesn't allow an argument\n"),
+                    argv[0], argv[optind - 1][0], pfound->name);
+                 }
+                 nextchar += strlen (nextchar);
+
+                 optopt = pfound->val;
+                 return '?';
+               }
+           }
+         else if (pfound->has_arg == 1)
+           {
+             if (optind < argc)
+               optarg = argv[optind++];
+             else
+               {
+                 if (opterr)
+                   fprintf (stderr,
+                          _("%s: option `%s' requires an argument\n"),
+                          argv[0], argv[optind - 1]);
+                 nextchar += strlen (nextchar);
+                 optopt = pfound->val;
+                 return optstring[0] == ':' ? ':' : '?';
+               }
+           }
+         nextchar += strlen (nextchar);
+         if (longind != NULL)
+           *longind = option_index;
+         if (pfound->flag)
+           {
+             *(pfound->flag) = pfound->val;
+             return 0;
+           }
+         return pfound->val;
+       }
+
+      /* Can't find it as a long option.  If this is not getopt_long_only,
+        or the option starts with '--' or is not a valid short
+        option, then it's an error.
+        Otherwise interpret it as a short option.  */
+      if (!long_only || argv[optind][1] == '-'
+         || my_index (optstring, *nextchar) == NULL)
+       {
+         if (opterr)
+           {
+             if (argv[optind][1] == '-')
+               /* --option */
+               fprintf (stderr, _("%s: unrecognized option `--%s'\n"),
+                        argv[0], nextchar);
+             else
+               /* +option or -option */
+               fprintf (stderr, _("%s: unrecognized option `%c%s'\n"),
+                        argv[0], argv[optind][0], nextchar);
+           }
+         nextchar = (char *) "";
+         optind++;
+         optopt = 0;
+         return '?';
+       }
+    }
+
+  /* Look at and handle the next short option-character.  */
+
+  {
+    char c = *nextchar++;
+    char *temp = my_index (optstring, c);
+
+    /* Increment `optind' when we start to process its last character.  */
+    if (*nextchar == '\0')
+      ++optind;
+
+    if (temp == NULL || c == ':')
+      {
+       if (opterr)
+         {
+           if (posixly_correct)
+             /* 1003.2 specifies the format of this message.  */
+             fprintf (stderr, _("%s: illegal option -- %c\n"),
+                      argv[0], c);
+           else
+             fprintf (stderr, _("%s: invalid option -- %c\n"),
+                      argv[0], c);
+         }
+       optopt = c;
+       return '?';
+      }
+    /* Convenience. Treat POSIX -W foo same as long option --foo */
+    if (temp[0] == 'W' && temp[1] == ';')
+      {
+       char *nameend;
+       const struct option *p;
+       const struct option *pfound = NULL;
+       int exact = 0;
+       int ambig = 0;
+       int indfound = 0;
+       int option_index;
+
+       /* This is an option that requires an argument.  */
+       if (*nextchar != '\0')
+         {
+           optarg = nextchar;
+           /* If we end this ARGV-element by taking the rest as an arg,
+              we must advance to the next element now.  */
+           optind++;
+         }
+       else if (optind == argc)
+         {
+           if (opterr)
+             {
+               /* 1003.2 specifies the format of this message.  */
+               fprintf (stderr, _("%s: option requires an argument -- %c\n"),
+                        argv[0], c);
+             }
+           optopt = c;
+           if (optstring[0] == ':')
+             c = ':';
+           else
+             c = '?';
+           return c;
+         }
+       else
+         /* We already incremented `optind' once;
+            increment it again when taking next ARGV-elt as argument.  */
+         optarg = argv[optind++];
+
+       /* optarg is now the argument, see if it's in the
+          table of longopts.  */
+
+       for (nextchar = nameend = optarg; *nameend && *nameend != '='; nameend++)
+         /* Do nothing.  */ ;
+
+       /* Test all long options for either exact match
+          or abbreviated matches.  */
+       for (p = longopts, option_index = 0; p->name; p++, option_index++)
+         if (!strncmp (p->name, nextchar, nameend - nextchar))
+           {
+             if ((unsigned int) (nameend - nextchar) == strlen (p->name))
+               {
+                 /* Exact match found.  */
+                 pfound = p;
+                 indfound = option_index;
+                 exact = 1;
+                 break;
+               }
+             else if (pfound == NULL)
+               {
+                 /* First nonexact match found.  */
+                 pfound = p;
+                 indfound = option_index;
+               }
+             else
+               /* Second or later nonexact match found.  */
+               ambig = 1;
+           }
+       if (ambig && !exact)
+         {
+           if (opterr)
+             fprintf (stderr, _("%s: option `-W %s' is ambiguous\n"),
+                      argv[0], argv[optind]);
+           nextchar += strlen (nextchar);
+           optind++;
+           return '?';
+         }
+       if (pfound != NULL)
+         {
+           option_index = indfound;
+           if (*nameend)
+             {
+               /* Don't test has_arg with >, because some C compilers don't
+                  allow it to be used on enums.  */
+               if (pfound->has_arg)
+                 optarg = nameend + 1;
+               else
+                 {
+                   if (opterr)
+                     fprintf (stderr, _("\
+%s: option `-W %s' doesn't allow an argument\n"),
+                              argv[0], pfound->name);
+
+                   nextchar += strlen (nextchar);
+                   return '?';
+                 }
+             }
+           else if (pfound->has_arg == 1)
+             {
+               if (optind < argc)
+                 optarg = argv[optind++];
+               else
+                 {
+                   if (opterr)
+                     fprintf (stderr,
+                              _("%s: option `%s' requires an argument\n"),
+                              argv[0], argv[optind - 1]);
+                   nextchar += strlen (nextchar);
+                   return optstring[0] == ':' ? ':' : '?';
+                 }
+             }
+           nextchar += strlen (nextchar);
+           if (longind != NULL)
+             *longind = option_index;
+           if (pfound->flag)
+             {
+               *(pfound->flag) = pfound->val;
+               return 0;
+             }
+           return pfound->val;
+         }
+         nextchar = NULL;
+         return 'W';   /* Let the application handle it.   */
+      }
+    if (temp[1] == ':')
+      {
+       if (temp[2] == ':')
+         {
+           /* This is an option that accepts an argument optionally.  */
+           if (*nextchar != '\0')
+             {
+               optarg = nextchar;
+               optind++;
+             }
+           else
+             optarg = NULL;
+           nextchar = NULL;
+         }
+       else
+         {
+           /* This is an option that requires an argument.  */
+           if (*nextchar != '\0')
+             {
+               optarg = nextchar;
+               /* If we end this ARGV-element by taking the rest as an arg,
+                  we must advance to the next element now.  */
+               optind++;
+             }
+           else if (optind == argc)
+             {
+               if (opterr)
+                 {
+                   /* 1003.2 specifies the format of this message.  */
+                   fprintf (stderr,
+                          _("%s: option requires an argument -- %c\n"),
+                          argv[0], c);
+                 }
+               optopt = c;
+               if (optstring[0] == ':')
+                 c = ':';
+               else
+                 c = '?';
+             }
+           else
+             /* We already incremented `optind' once;
+                increment it again when taking next ARGV-elt as argument.  */
+             optarg = argv[optind++];
+           nextchar = NULL;
+         }
+      }
+    return c;
+  }
+}
+
+int
+getopt (int argc, char *const *argv, const char *optstring)
+{
+  return _getopt_internal (argc, argv, optstring,
+                          (const struct option *) 0,
+                          (int *) 0,
+                          0);
+}
+
+#endif /* Not ELIDE_CODE.  */
+\f
+#ifdef TEST
+
+/* Compile with -DTEST to make an executable for use in testing
+   the above definition of `getopt'.  */
+
+int
+main (int argc, char **argv)
+{
+  int c;
+  int digit_optind = 0;
+
+  while (1)
+    {
+      int this_option_optind = optind ? optind : 1;
+
+      c = getopt (argc, argv, "abc:d:0123456789");
+      if (c == -1)
+       break;
+
+      switch (c)
+       {
+       case '0':
+       case '1':
+       case '2':
+       case '3':
+       case '4':
+       case '5':
+       case '6':
+       case '7':
+       case '8':
+       case '9':
+         if (digit_optind != 0 && digit_optind != this_option_optind)
+           printf ("digits occur in two different argv-elements.\n");
+         digit_optind = this_option_optind;
+         printf ("option %c\n", c);
+         break;
+
+       case 'a':
+         printf ("option a\n");
+         break;
+
+       case 'b':
+         printf ("option b\n");
+         break;
+
+       case 'c':
+         printf ("option c with value `%s'\n", optarg);
+         break;
+
+       case '?':
+         break;
+
+       default:
+         printf ("?? getopt returned character code 0%o ??\n", c);
+       }
+    }
+
+  if (optind < argc)
+    {
+      printf ("non-option ARGV-elements: ");
+      while (optind < argc)
+       printf ("%s ", argv[optind++]);
+      printf ("\n");
+    }
+
+  exit (0);
+}
+
+#endif /* TEST */
diff --git a/lib-src/getopt.h b/lib-src/getopt.h
new file mode 100644 (file)
index 0000000..69256fd
--- /dev/null
@@ -0,0 +1,133 @@
+/* Declarations for getopt.
+   Copyright (C) 1989,90,91,92,93,94,96,97 Free Software Foundation, Inc.
+
+NOTE: The canonical source of this file is maintained with the GNU C Library.
+Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+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 2, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+USA.  */
+
+#ifndef _GETOPT_H
+#define _GETOPT_H 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* For communication from `getopt' to the caller.
+   When `getopt' finds an option that takes an argument,
+   the argument value is returned here.
+   Also, when `ordering' is RETURN_IN_ORDER,
+   each non-option ARGV-element is returned here.  */
+
+extern char *optarg;
+
+/* Index in ARGV of the next element to be scanned.
+   This is used for communication to and from the caller
+   and for communication between successive calls to `getopt'.
+
+   On entry to `getopt', zero means this is the first call; initialize.
+
+   When `getopt' returns -1, this is the index of the first of the
+   non-option elements that the caller should itself scan.
+
+   Otherwise, `optind' communicates from one call to the next
+   how much of ARGV has been scanned so far.  */
+
+extern int optind;
+
+/* Callers store zero here to inhibit the error message `getopt' prints
+   for unrecognized options.  */
+
+extern int opterr;
+
+/* Set to an option character which was unrecognized.  */
+
+extern int optopt;
+
+/* Describe the long-named options requested by the application.
+   The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
+   of `struct option' terminated by an element containing a name which is
+   zero.
+
+   The field `has_arg' is:
+   no_argument         (or 0) if the option does not take an argument,
+   required_argument   (or 1) if the option requires an argument,
+   optional_argument   (or 2) if the option takes an optional argument.
+
+   If the field `flag' is not NULL, it points to a variable that is set
+   to the value given in the field `val' when the option is found, but
+   left unchanged if the option is not found.
+
+   To have a long-named option do something other than set an `int' to
+   a compiled-in constant, such as set a value from `optarg', set the
+   option's `flag' field to zero and its `val' field to a nonzero
+   value (the equivalent single-letter option character, if there is
+   one).  For long options that have a zero `flag' field, `getopt'
+   returns the contents of the `val' field.  */
+
+struct option
+{
+#if defined (__STDC__) && __STDC__
+  const char *name;
+#else
+  char *name;
+#endif
+  /* has_arg can't be an enum because some compilers complain about
+     type mismatches in all the code that assumes it is an int.  */
+  int has_arg;
+  int *flag;
+  int val;
+};
+
+/* Names for the values of the `has_arg' field of `struct option'.  */
+
+#define        no_argument             0
+#define required_argument      1
+#define optional_argument      2
+
+#if defined (__STDC__) && __STDC__
+#ifdef __GNU_LIBRARY__
+/* Many other libraries have conflicting prototypes for getopt, with
+   differences in the consts, in stdlib.h.  To avoid compilation
+   errors, only prototype getopt for the GNU C library.  */
+extern int getopt (int argc, char *const *argv, const char *shortopts);
+#else /* not __GNU_LIBRARY__ */
+extern int getopt ();
+#endif /* __GNU_LIBRARY__ */
+extern int getopt_long (int argc, char *const *argv, const char *shortopts,
+                       const struct option *longopts, int *longind);
+extern int getopt_long_only (int argc, char *const *argv,
+                            const char *shortopts,
+                            const struct option *longopts, int *longind);
+
+/* Internal only.  Users should not call this directly.  */
+extern int _getopt_internal (int argc, char *const *argv,
+                            const char *shortopts,
+                            const struct option *longopts, int *longind,
+                            int long_only);
+#else /* not __STDC__ */
+extern int getopt ();
+extern int getopt_long ();
+extern int getopt_long_only ();
+
+extern int _getopt_internal ();
+#endif /* __STDC__ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GETOPT_H */
diff --git a/lib-src/getopt1.c b/lib-src/getopt1.c
new file mode 100644 (file)
index 0000000..1492066
--- /dev/null
@@ -0,0 +1,171 @@
+/* getopt_long and getopt_long_only entry points for GNU getopt.
+   Copyright (C) 1987,88,89,90,91,92,93,94,96,97 Free Software Foundation, Inc.
+
+NOTE: The canonical source of this file is maintained with the GNU C Library.
+Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+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 2, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+USA.  */
+\f
+#ifdef HAVE_CONFIG_H
+#include <../src/config.h>
+#endif
+
+#include "getopt.h"
+
+#include <stdio.h>
+
+/* Comment out all this code if we are using the GNU C Library, and are not
+   actually compiling the library itself.  This code is part of the GNU C
+   Library, but also included in many other GNU distributions.  Compiling
+   and linking in this code is a waste when using the GNU C library
+   (especially if it is a shared library).  Rather than having every GNU
+   program understand `configure --with-gnu-libc' and omit the object files,
+   it is simpler to just do this in the source for each such file.  */
+
+#define GETOPT_INTERFACE_VERSION 2
+#if !defined (_LIBC) && defined (__GLIBC__) && __GLIBC__ >= 2
+#include <gnu-versions.h>
+#if _GNU_GETOPT_INTERFACE_VERSION == GETOPT_INTERFACE_VERSION
+#define ELIDE_CODE
+#endif
+#endif
+
+#ifndef ELIDE_CODE
+
+
+/* This needs to come after some library #include
+   to get __GNU_LIBRARY__ defined.  */
+#ifdef __GNU_LIBRARY__
+#include <stdlib.h>
+#endif
+
+#ifndef        NULL
+#define NULL 0
+#endif
+
+int
+getopt_long (int argc, char *const *argv, const char *options,
+            const struct option *long_options, int *opt_index)
+{
+  return _getopt_internal (argc, argv, options, long_options, opt_index, 0);
+}
+
+/* Like getopt_long, but '-' as well as '--' can indicate a long option.
+   If an option that starts with '-' (not '--') doesn't match a long option,
+   but does match a short option, it is parsed as a short option
+   instead.  */
+
+int
+getopt_long_only (int argc, char *const *argv, const char *options,
+                 const struct option *long_options, int *opt_index)
+{
+  return _getopt_internal (argc, argv, options, long_options, opt_index, 1);
+}
+
+
+#endif /* Not ELIDE_CODE.  */
+\f
+#ifdef TEST
+
+#include <stdio.h>
+
+int
+main (int argc, char **argv)
+{
+  int c;
+  int digit_optind = 0;
+
+  while (1)
+    {
+      int this_option_optind = optind ? optind : 1;
+      int option_index = 0;
+      static struct option long_options[] =
+      {
+       {"add", 1, 0, 0},
+       {"append", 0, 0, 0},
+       {"delete", 1, 0, 0},
+       {"verbose", 0, 0, 0},
+       {"create", 0, 0, 0},
+       {"file", 1, 0, 0},
+       {0, 0, 0, 0}
+      };
+
+      c = getopt_long (argc, argv, "abc:d:0123456789",
+                      long_options, &option_index);
+      if (c == -1)
+       break;
+
+      switch (c)
+       {
+       case 0:
+         printf ("option %s", long_options[option_index].name);
+         if (optarg)
+           printf (" with arg %s", optarg);
+         printf ("\n");
+         break;
+
+       case '0':
+       case '1':
+       case '2':
+       case '3':
+       case '4':
+       case '5':
+       case '6':
+       case '7':
+       case '8':
+       case '9':
+         if (digit_optind != 0 && digit_optind != this_option_optind)
+           printf ("digits occur in two different argv-elements.\n");
+         digit_optind = this_option_optind;
+         printf ("option %c\n", c);
+         break;
+
+       case 'a':
+         printf ("option a\n");
+         break;
+
+       case 'b':
+         printf ("option b\n");
+         break;
+
+       case 'c':
+         printf ("option c with value `%s'\n", optarg);
+         break;
+
+       case 'd':
+         printf ("option d with value `%s'\n", optarg);
+         break;
+
+       case '?':
+         break;
+
+       default:
+         printf ("?? getopt returned character code 0%o ??\n", c);
+       }
+    }
+
+  if (optind < argc)
+    {
+      printf ("non-option ARGV-elements: ");
+      while (optind < argc)
+       printf ("%s ", argv[optind++]);
+      printf ("\n");
+    }
+
+  exit (0);
+}
+
+#endif /* TEST */
diff --git a/lib-src/gnuattach b/lib-src/gnuattach
new file mode 100755 (executable)
index 0000000..07aef4d
--- /dev/null
@@ -0,0 +1,23 @@
+#! /bin/sh
+
+# This file is part of XEmacs.
+
+# Copyright (C) 1997  Free Software Foundation, Inc.
+
+# 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; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+echo "$0: Please use \`gnuclient -nw' instead." >&2
+exit 1
diff --git a/lib-src/gnuclient.c b/lib-src/gnuclient.c
new file mode 100644 (file)
index 0000000..a89641f
--- /dev/null
@@ -0,0 +1,659 @@
+/* -*-C-*-
+ Client code to allow local and remote editing of files by XEmacs.
+ Copyright (C) 1989 Free Software Foundation, Inc.
+ Copyright (C) 1995 Sun Microsystems, Inc.
+ Copyright (C) 1997 Free Software Foundation, Inc.
+
+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; see the file COPYING.  If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+
+ Author: Andy Norman (ange@hplb.hpl.hp.com), based on
+         'etc/emacsclient.c' from the GNU Emacs 18.52 distribution.
+
+ Please mail bugs and suggestions to the XEmacs maintainer.
+*/
+
+/*
+ * This file incorporates new features added by Bob Weiner <weiner@mot.com>,
+ * Darrell Kindred <dkindred@cmu.edu> and Arup Mukherjee <arup@cmu.edu>.
+ * GNUATTACH support added by Ben Wing <wing@xemacs.org>.
+ * Please see the note at the end of the README file for details.
+ *
+ * (If gnuserv came bundled with your emacs, the README file is probably
+ * ../etc/gnuserv.README relative to the directory containing this file)
+ */
+
+#if 0
+/* Hand-munged RCS header */
+static char rcsid [] = "!Header: gnuclient.c,v 2.2 95/12/12 01:39:21 wing nene !";
+#endif
+
+#include "gnuserv.h"
+#include "getopt.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif /* HAVE_STRING_H */
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+#include <signal.h>
+
+#if !defined(SYSV_IPC) && !defined(UNIX_DOMAIN_SOCKETS) && \
+    !defined(INTERNET_DOMAIN_SOCKETS)
+int
+main (int argc, char *argv[])
+{
+  fprintf (stderr, "Sorry, the Emacs server is only "
+          "supported on systems that have\n");
+  fprintf (stderr, "Unix Domain sockets, Internet Domain "
+          "sockets or System V IPC.\n");
+  exit (1);
+} /* main */
+#else /* SYSV_IPC || UNIX_DOMAIN_SOCKETS || INTERNET_DOMAIN_SOCKETS */
+
+static char cwd[MAXPATHLEN+2]; /* current working directory when calculated */
+static char *cp = NULL;                /* ptr into valid bit of cwd above */
+
+static pid_t emacs_pid;                        /* Process id for emacs process */
+
+void initialize_signals (void);
+
+static void
+tell_emacs_to_resume (int sig)
+{
+  char buffer[GSERV_BUFSZ+1];
+  int s;                       /* socket / msqid to server */
+  int connect_type;            /* CONN_UNIX, CONN_INTERNET, or
+                                  ONN_IPC */
+
+  /* Why is SYSV so retarded? */
+  /* We want emacs to realize that we are resuming */
+  signal(SIGCONT, tell_emacs_to_resume);
+
+  connect_type = make_connection (NULL, (u_short) 0, &s);
+
+  sprintf(buffer,"(gnuserv-eval '(resume-pid-console %d))", (int)getpid());
+  send_string(s, buffer);
+
+#ifdef SYSV_IPC
+  if (connect_type == (int) CONN_IPC)
+    disconnect_from_ipc_server (s, msgp, FALSE);
+#else /* !SYSV_IPC */
+  if (connect_type != (int) CONN_IPC)
+    disconnect_from_server (s, FALSE);
+#endif /* !SYSV_IPC */
+}
+
+static void
+pass_signal_to_emacs (int sig)
+{
+  if (kill (emacs_pid, sig) == -1)
+    {
+      fprintf (stderr, "gnuattach: Could not pass signal to emacs process\n");
+      exit (1);
+    }
+  initialize_signals ();
+}
+
+void
+initialize_signals ()
+{
+  /* Set up signal handler to pass relevant signals to emacs process.
+     We used to send SIGSEGV, SIGBUS, SIGPIPE, SIGILL and others to
+     Emacs, but I think it's better not to.  I can see no reason why
+     Emacs should SIGSEGV whenever gnuclient SIGSEGV-s, etc.  */
+  signal (SIGQUIT, pass_signal_to_emacs);
+  signal (SIGINT, pass_signal_to_emacs);
+#ifdef SIGWINCH
+  signal (SIGWINCH, pass_signal_to_emacs);
+#endif
+
+  /* We want emacs to realize that we are resuming */
+  signal (SIGCONT, tell_emacs_to_resume);
+}
+
+
+/*
+  get_current_working_directory -- return the cwd.
+*/
+static char *
+get_current_working_directory (void)
+{
+  if (cp == NULL)
+    {                          /* haven't calculated it yet */
+#ifdef BSD
+      if (getwd (cwd) == 0)
+#else /* !BSD */
+      if (getcwd (cwd,MAXPATHLEN) == NULL)
+#endif /* !BSD */
+       {
+         perror (progname);
+         fprintf (stderr, "%s: unable to get current working directory\n",
+                  progname);
+         exit (1);
+       } /* if */
+
+      /* on some systems, cwd can look like '@machine/' ... */
+      /* ignore everything before the first '/' */
+      for (cp = cwd; *cp && *cp != '/'; ++cp)
+       ;
+
+    } /* if */
+
+  return cp;
+
+} /* get_current_working_directory */
+
+
+/*
+  filename_expand -- try to convert the given filename into a fully-qualified
+                    pathname.
+*/
+static void
+filename_expand (char *fullpath, char *filename)
+  /* fullpath - returned full pathname */
+  /* filename - filename to expand */
+{
+  int len;
+
+  fullpath[0] = '\0';
+
+  if (filename[0] && filename[0] != '/')
+    {  /* relative filename */
+      strcat (fullpath, get_current_working_directory ());
+      len = strlen (fullpath);
+
+      if (len > 0 && fullpath[len-1] == '/')   /* trailing slash already? */
+       ;                                       /* yep */
+      else
+       strcat (fullpath, "/");         /* nope, append trailing slash */
+    } /* if */
+
+  strcat (fullpath,filename);
+
+} /* filename_expand */
+
+/* Encase the string in quotes, escape all the backslashes and quotes
+   in string.  */
+static char *
+clean_string (CONST char *s)
+{
+  int i = 0;
+  char *p, *res;
+
+  {
+    CONST char *const_p;
+    for (const_p = s; *const_p; const_p++, i++)
+      {
+       if (*const_p == '\\' || *const_p == '\"')
+         ++i;
+       else if (*const_p == '\004')
+         i += 3;
+      }
+  }
+
+  p = res = (char *) malloc (i + 2 + 1);
+  *p++ = '\"';
+  for (; *s; p++, s++)
+    {
+      switch (*s)
+       {
+       case '\\':
+         *p++ = '\\';
+         *p = '\\';
+         break;
+       case '\"':
+         *p++ = '\\';
+         *p = '\"';
+         break;
+       case '\004':
+         *p++ = '\\';
+         *p++ = 'C';
+         *p++ = '-';
+         *p = 'd';
+         break;
+       default:
+         *p = *s;
+       }
+    }
+  *p++ = '\"';
+  *p = '\0';
+  return res;
+}
+
+#define GET_ARGUMENT(var, desc) do {                                      \
+ if (*(p + 1)) (var) = p + 1;                                             \
+   else                                                                           \
+     {                                                                    \
+       if (!argv[++i])                                                    \
+         {                                                                \
+           fprintf (stderr, "%s: `%s' must be followed by an argument\n",  \
+                   progname, desc);                                       \
+          exit (1);                                                       \
+         }                                                                \
+      (var) = argv[i];                                                    \
+    }                                                                     \
+  over = 1;                                                               \
+} while (0)
+
+/* A strdup immitation. */
+static char *
+my_strdup (CONST char *s)
+{
+  char *new = malloc (strlen (s) + 1);
+  if (new)
+    strcpy (new, s);
+  return new;
+}
+
+int
+main (int argc, char *argv[])
+{
+  int starting_line = 1;       /* line to start editing at */
+  char command[MAXPATHLEN+50]; /* emacs command buffer */
+  char fullpath[MAXPATHLEN+1]; /* full pathname to file */
+  char *eval_form = NULL;      /* form to evaluate with `-eval' */
+  char *eval_function = NULL;  /* function to evaluate with `-f' */
+  char *load_library = NULL;   /* library to load */
+  int quick = 0;               /* quick edit, don't wait for user to
+                                  finish */
+  int batch = 0;               /* batch mode */
+  int view = 0;                        /* view only. */
+  int nofiles = 0;
+  int errflg = 0;              /* option error */
+  int s;                       /* socket / msqid to server */
+  int connect_type;            /* CONN_UNIX, CONN_INTERNET, or
+                                * CONN_IPC */
+  int suppress_windows_system = 0;
+  char *display = NULL;
+#ifdef INTERNET_DOMAIN_SOCKETS
+  char *hostarg = NULL;                /* remote hostname */
+  char *remotearg;
+  char thishost[HOSTNAMSZ];    /* this hostname */
+  char remotepath[MAXPATHLEN+1]; /* remote pathname */
+  char *path;
+  int rflg = 0;                        /* pathname given on cmdline */
+  char *portarg;
+  u_short port = 0;            /* port to server */
+#endif /* INTERNET_DOMAIN_SOCKETS */
+#ifdef SYSV_IPC
+  struct msgbuf *msgp;         /* message */
+#endif /* SYSV_IPC */
+  char *tty = NULL;
+  char buffer[GSERV_BUFSZ + 1];        /* buffer to read pid */
+  char result[GSERV_BUFSZ + 1];
+  int i;
+
+#ifdef INTERNET_DOMAIN_SOCKETS
+  memset (remotepath, 0, sizeof (remotepath));
+#endif /* INTERNET_DOMAIN_SOCKETS */
+
+  progname = strrchr (argv[0], '/');
+  if (progname)
+    ++progname;
+  else
+    progname = argv[0];
+
+#ifdef USE_TMPDIR
+  tmpdir = getenv ("TMPDIR");
+#endif
+  if (!tmpdir)
+    tmpdir = "/tmp";
+
+  display = getenv ("DISPLAY");
+  if (display)
+    display = my_strdup (display);
+#ifndef HAVE_MS_WINDOWS
+  else
+    suppress_windows_system = 1;
+#endif
+
+  for (i = 1; argv[i] && !errflg; i++)
+    {
+      if (*argv[i] != '-')
+       break;
+      else if (*argv[i] == '-'
+              && (*(argv[i] + 1) == '\0'
+                  || (*(argv[i] + 1) == '-' && *(argv[i] + 2) == '\0')))
+       {
+         /* `-' or `--' */
+         ++i;
+         break;
+       }
+
+      if (!strcmp (argv[i], "-batch") || !strcmp (argv[i], "--batch"))
+       batch = 1;
+      else if (!strcmp (argv[i], "-eval") || !strcmp (argv[i], "--eval"))
+       {
+         if (!argv[++i])
+           {
+             fprintf (stderr, "%s: `-eval' must be followed by an argument\n",
+                      progname);
+             exit (1);
+           }
+         eval_form = argv[i];
+       }
+      else if (!strcmp (argv[i], "-display") || !strcmp (argv[i], "--display"))
+       {
+         suppress_windows_system = 0;
+         if (!argv[++i])
+           {
+             fprintf (stderr,
+                      "%s: `-display' must be followed by an argument\n",
+                      progname);
+             exit (1);
+           }
+         if (display)
+           free (display);
+         /* no need to strdup. */
+         display = argv[i];
+       }
+      else if (!strcmp (argv[i], "-nw"))
+       suppress_windows_system = 1;
+      else
+       {
+         /* Iterate over one-letter options. */
+         char *p;
+         int over = 0;
+         for (p = argv[i] + 1; *p && !over; p++)
+           {
+             switch (*p)
+               {
+               case 'q':
+                 quick = 1;
+                 break;
+               case 'v':
+                 view = 1;
+                 break;
+               case 'f':
+                 GET_ARGUMENT (eval_function, "-f");
+                 break;
+               case 'l':
+                 GET_ARGUMENT (load_library, "-l");
+                 break;
+#ifdef INTERNET_DOMAIN_SOCKETS
+               case 'h':
+                 GET_ARGUMENT (hostarg, "-h");
+                 break;
+               case 'p':
+                 GET_ARGUMENT (portarg, "-p");
+                 port = atoi (portarg);
+                 break;
+               case 'r':
+                 GET_ARGUMENT (remotearg, "-r");
+                 strcpy (remotepath, remotearg);
+                 rflg = 1;
+                 break;
+#endif /* INTERNET_DOMAIN_SOCKETS */
+               default:
+                 errflg = 1;
+               }
+           } /* for */
+       } /* else */
+    } /* for */
+
+  if (errflg)
+    {
+      fprintf (stderr,
+#ifdef INTERNET_DOMAIN_SOCKETS
+              "usage: %s [-nw] [-display display] [-q] [-v] [-l library]\n"
+               "       [-batch] [-f function] [-eval form]\n"
+              "       [-h host] [-p port] [-r remote-path] [[+line] file] ...\n",
+#else /* !INTERNET_DOMAIN_SOCKETS */
+              "usage: %s [-nw] [-q] [-v] [-l library] [-f function] [-eval form] "
+              "[[+line] path] ...\n",
+#endif /* !INTERNET_DOMAIN_SOCKETS */
+              progname);
+      exit (1);
+    }
+  if (batch && argv[i])
+    {
+      fprintf (stderr, "%s: Cannot specify `-batch' with file names\n",
+              progname);
+      exit (1);
+    }
+  if (suppress_windows_system && hostarg)
+    {
+      fprintf (stderr, "%s: Remote editing is available only on X\n",
+              progname);
+      exit (1);
+    }
+
+  *result = '\0';
+  if (eval_function || eval_form || load_library)
+    {
+#if defined(INTERNET_DOMAIN_SOCKETS)
+      connect_type = make_connection (hostarg, port, &s);
+#else
+      connect_type = make_connection (NULL, (u_short) 0, &s);
+#endif
+      sprintf (command, "(gnuserv-eval%s '(progn ", quick ? "-quickly" : "");
+      send_string (s, command);
+      if (load_library)
+       {
+         send_string (s , "(load-library ");
+         send_string (s, clean_string(load_library));
+         send_string (s, ") ");
+       }
+      if (eval_form)
+       {
+         send_string (s, eval_form);
+       }
+      if (eval_function)
+       {
+         send_string (s, "(");
+         send_string (s, eval_function);
+         send_string (s, ")");
+       }
+      send_string (s, "))");
+      /* disconnect already sends EOT_STR */
+#ifdef SYSV_IPC
+      if (connect_type == (int) CONN_IPC)
+       disconnect_from_ipc_server (s, msgp, batch && !quick);
+#else /* !SYSV_IPC */
+      if (connect_type != (int) CONN_IPC)
+       disconnect_from_server (s, batch && !quick);
+#endif /* !SYSV_IPC */
+    } /* eval_function || eval_form || load_library */
+  else if (batch)
+    {
+      /* no sexp on the command line, so read it from stdin */
+      int nb;
+
+#if defined(INTERNET_DOMAIN_SOCKETS)
+      connect_type = make_connection (hostarg, port, &s);
+#else
+      connect_type = make_connection (NULL, (u_short) 0, &s);
+#endif
+      sprintf (command, "(gnuserv-eval%s '(progn ", quick ? "-quickly" : "");
+      send_string (s, command);
+
+      while ((nb = read(fileno(stdin), buffer, GSERV_BUFSZ-1)) > 0)
+       {
+         buffer[nb] = '\0';
+         send_string(s, buffer);
+       }
+      send_string(s,"))");
+      /* disconnect already sends EOT_STR */
+#ifdef SYSV_IPC
+      if (connect_type == (int) CONN_IPC)
+       disconnect_from_ipc_server (s, msgp, batch && !quick);
+#else /* !SYSV_IPC */
+      if (connect_type != (int) CONN_IPC)
+       disconnect_from_server (s, batch && !quick);
+#endif /* !SYSV_IPC */
+    }
+
+  if (!batch)
+    {
+      if (suppress_windows_system)
+       {
+         tty = ttyname (0);
+         if (!tty)
+           {
+             fprintf (stderr, "%s: Not connected to a tty", progname);
+             exit (1);
+           }
+#if defined(INTERNET_DOMAIN_SOCKETS)
+         connect_type = make_connection (hostarg, port, &s);
+#else
+         connect_type = make_connection (NULL, (u_short) 0, &s);
+#endif
+         send_string (s, "(gnuserv-eval '(emacs-pid))");
+         send_string (s, EOT_STR);
+
+         if (read_line (s, buffer) == 0)
+           {
+             fprintf (stderr, "%s: Could not establish Emacs procces id\n",
+                      progname);
+             exit (1);
+           }
+      /* Don't do disconnect_from_server becasue we have already read
+        data, and disconnect doesn't do anything else. */
+#ifndef INTERNET_DOMAIN_SOCKETS
+         if (connect_type == (int) CONN_IPC)
+           disconnect_from_ipc_server (s, msgp, FALSE);
+#endif /* !SYSV_IPC */
+
+         emacs_pid = (pid_t)atol(buffer);
+         initialize_signals();
+       } /* suppress_windows_system */
+
+#if defined(INTERNET_DOMAIN_SOCKETS)
+      connect_type = make_connection (hostarg, port, &s);
+#else
+      connect_type = make_connection (NULL, (u_short) 0, &s);
+#endif
+
+#ifdef INTERNET_DOMAIN_SOCKETS
+      if (connect_type == (int) CONN_INTERNET)
+       {
+         char *ptr;
+         gethostname (thishost, HOSTNAMSZ);
+         if (!rflg)
+           {                           /* attempt to generate a path
+                                        * to this machine */
+             if ((ptr = getenv ("GNU_NODE")) != NULL)
+               /* user specified a path */
+               strcpy (remotepath, ptr);
+           }
+#if 0  /* This is really bogus... re-enable it if you must have it! */
+#if defined (hp9000s300) || defined (hp9000s800)
+         else if (strcmp (thishost,hostarg))
+           {   /* try /net/thishost */
+             strcpy (remotepath, "/net/");             /* (this fails using internet
+                                                          addresses) */
+             strcat (remotepath, thishost);
+           }
+#endif
+#endif
+       }
+      else
+       {                       /* same machines, no need for path */
+         remotepath[0] = '\0'; /* default is the empty path */
+       }
+#endif /* INTERNET_DOMAIN_SOCKETS */
+
+#ifdef SYSV_IPC
+      if ((msgp = (struct msgbuf *)
+          malloc (sizeof *msgp + GSERV_BUFSZ)) == NULL)
+       {
+         fprintf (stderr, "%s: not enough memory for message buffer\n", progname);
+         exit (1);
+       } /* if */
+
+      msgp->mtext[0] = '\0';                   /* ready for later strcats */
+#endif /* SYSV_IPC */
+
+      if (suppress_windows_system)
+       {
+         char *term = getenv ("TERM");
+         if (!term)
+           {
+             fprintf (stderr, "%s: unknown terminal type\n", progname);
+             exit (1);
+           }
+         sprintf (command, "(gnuserv-edit-files '(tty %s %s %d) '(",
+                  clean_string (tty), clean_string (term), (int)getpid ());
+       }
+      else /* !suppress_windows_system */
+       {
+         if (display)
+           sprintf (command, "(gnuserv-edit-files '(x %s) '(",
+                    clean_string (display));
+#ifdef HAVE_MS_WINDOWS
+         else
+           sprintf (command, "(gnuserv-edit-files '(mswindows nil) '(");
+#endif
+       } /* !suppress_windows_system */
+      send_string (s, command);
+
+      if (!argv[i])
+       nofiles = 1;
+
+      for (; argv[i]; i++)
+       {
+         if (i < argc - 1 && *argv[i] == '+')
+           starting_line = atoi (argv[i++]);
+         else
+           starting_line = 1;
+         /* If the last argument is +something, treat it as a file. */
+         if (i == argc)
+           {
+             starting_line = 1;
+             --i;
+           }
+         filename_expand (fullpath, argv[i]);
+#ifdef INTERNET_DOMAIN_SOCKETS
+         path = malloc (strlen (remotepath) + strlen (fullpath) + 1);
+         sprintf (path, "%s%s", remotepath, fullpath);
+#else
+         path = my_strdup (fullpath);
+#endif
+         sprintf (command, "(%d . %s)", starting_line, clean_string (path));
+         send_string (s, command);
+         free (path);
+       } /* for */
+
+      sprintf (command, ")%s%s",
+              (quick || (nofiles && !suppress_windows_system)) ? " 'quick" : "",
+              view ? " 'view" : "");
+      send_string (s, command);
+      send_string (s, ")");
+
+#ifdef SYSV_IPC
+      if (connect_type == (int) CONN_IPC)
+       disconnect_from_ipc_server (s, msgp, FALSE);
+#else /* !SYSV_IPC */
+      if (connect_type != (int) CONN_IPC)
+       disconnect_from_server (s, FALSE);
+#endif /* !SYSV_IPC */
+    } /* not batch */
+
+
+  return 0;
+
+} /* main */
+
+#endif /* SYSV_IPC || UNIX_DOMAIN_SOCKETS || INTERNET_DOMAIN_SOCKETS */
diff --git a/lib-src/gnudepend.pl b/lib-src/gnudepend.pl
new file mode 100755 (executable)
index 0000000..7b85080
--- /dev/null
@@ -0,0 +1,46 @@
+#!/usr/local/bin/perl
+
+while (<>)
+{
+    if (/\\$/)
+    {
+        chop;
+        $foo .= $_;
+    }
+    else
+    {
+        @foo = split (/[ \\:]+/, $foo);
+        $filename = $foo[0];
+       if (($filename =~ /^unex/) ||
+           ($filename =~ /^sgiplay/) ||
+           ($filename =~ /^Extern/) ||
+           ($filename =~ /^extw/))
+       {
+           $foo = "";
+           next;
+       }
+        @foo = grep (!/\.c$/, @foo);
+        @foo = grep ((s/\/.*lwlib\//\$(LWLIBSRCDIR)\//, 1), @foo);
+        @foo = grep (!/lisp\.h/, @foo);
+       @foo = grep (!/lisp\.h/, @foo);
+       @foo = grep (!/lisp-union\.h/, @foo);
+       @foo = grep (!/lisp-disunion\.h/, @foo);
+       @foo = grep (!/lrecord\.h/, @foo);
+       @foo = grep (!/emacsfns\.h/, @foo);
+       @foo = grep (!/symeval\.h/, @foo);
+       @foo = grep (!/symsinit\.h/, @foo);
+       @foo = grep (!/syssignal\.h/, @foo);
+       @foo = grep (!/intl\.h/, @foo);
+       @foo = grep (!/tt_c\.h/, @foo);
+       @foo = grep (!/descrip\.h/, @foo);
+        shift @foo;
+        foreach $i (0 .. $#foo)
+       {
+            $foo[$i] = $filename . ": " . $foo[$i];
+       }
+       print $filename . ": config.h\n";
+        print join ("\n", @foo);
+        print "\n";
+        $foo = "";
+    }
+}
diff --git a/lib-src/gnudoit b/lib-src/gnudoit
new file mode 100755 (executable)
index 0000000..a60c412
--- /dev/null
@@ -0,0 +1,36 @@
+#! /bin/sh
+
+# This file is part of XEmacs.
+
+# Copyright (C) 1997  Free Software Foundation, Inc.
+
+# 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; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+if [ x"$1" = x-q ]
+then
+    quick=-q
+    shift
+fi
+
+if [ $# -eq 0 ]
+then
+    exec gnuclient $quick -batch 
+else
+# I use "$*" instead of "$@" intentionally -- I don't want to have the
+# arguments split.
+    exec gnuclient $quick -batch -eval "$*"
+fi
+
diff --git a/lib-src/gnuserv.c b/lib-src/gnuserv.c
new file mode 100644 (file)
index 0000000..39f9147
--- /dev/null
@@ -0,0 +1,915 @@
+/* -*-C-*-
+ Server code for handling requests from clients and forwarding them
+ on to the GNU Emacs process.
+
+ This file is part of GNU Emacs.
+
+ Copying is permitted under those conditions described by the GNU
+ General Public License.
+
+ Copyright (C) 1989 Free Software Foundation, Inc.
+
+ Author: Andy Norman (ange@hplb.hpl.hp.com), based on 'etc/server.c'
+         from the 18.52 GNU Emacs distribution.
+
+ Please mail bugs and suggestions to the author at the above address.
+*/
+
+/* HISTORY 
+ * 11-Nov-1990         bristor@simba   
+ *    Added EOT stuff.
+ */
+
+/*
+ * This file incorporates new features added by Bob Weiner <weiner@mot.com>,
+ * Darrell Kindred <dkindred@cmu.edu> and Arup Mukherjee <arup@cmu.edu>.
+ * Please see the note at the end of the README file for details.
+ *
+ * (If gnuserv came bundled with your emacs, the README file is probably
+ * ../etc/gnuserv.README relative to the directory containing this file)
+ */
+
+#if 0
+static char rcsid [] = "!Header: gnuserv.c,v 2.1 95/02/16 11:58:27 arup alpha !";
+#endif
+
+#include "gnuserv.h"
+
+#ifdef USE_LITOUT
+#ifdef linux
+#include <bsd/sgtty.h>
+#else
+#include <sgtty.h>
+#endif
+#endif
+
+#ifdef AIX
+#include <sys/select.h>
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif /* HAVE_STRING_H */
+
+#if !defined(SYSV_IPC) && !defined(UNIX_DOMAIN_SOCKETS) && \
+    !defined(INTERNET_DOMAIN_SOCKETS)
+main ()
+{
+  fprintf (stderr,"Sorry, the Emacs server is only supported on systems that have\n");
+  fprintf (stderr,"Unix Domain sockets, Internet Domain sockets or System V IPC\n");
+  exit (1);
+} /* main */
+#else /* SYSV_IPC || UNIX_DOMAIN_SOCKETS || INTERNET_DOMAIN_SOCKETS */
+
+#ifdef SYSV_IPC
+
+int ipc_qid = 0;               /* ipc message queue id */
+int ipc_wpid = 0;              /* watchdog task pid */
+
+
+/*
+  ipc_exit -- clean up the queue id and queue, then kill the watchdog task
+              if it exists. exit with the given status.
+*/
+void
+ipc_exit (int stat)
+{
+  msgctl (ipc_qid,IPC_RMID,0);
+  
+  if  (ipc_wpid != 0)
+    kill (ipc_wpid, SIGKILL);
+
+  exit (stat);
+} /* ipc_exit */
+
+
+/*
+  ipc_handle_signal -- catch the signal given and clean up.
+*/
+void
+ipc_handle_signal(int sig)
+{
+  ipc_exit (0);
+} /* ipc_handle_signal */
+
+
+/* 
+  ipc_spawn_watchdog -- spawn a watchdog task to clean up the message queue should the
+                       server process die.
+*/
+void
+ipc_spawn_watchdog (void)
+{
+  if ((ipc_wpid = fork ()) == 0)
+    { /* child process */
+      int ppid = getppid ();   /* parent's process id */
+
+      setpgrp();               /* gnu kills process group on exit */
+
+      while (1)
+       {
+         if (kill (ppid, 0) < 0) /* ppid is no longer valid, parent
+                                    may have died */
+           {
+             ipc_exit (0);
+           } /* if */
+
+         sleep(10);            /* have another go later */
+       } /* while */
+    } /* if */
+
+} /* ipc_spawn_watchdog */
+
+
+/*
+  ipc_init -- initialize server, setting the global msqid that can be listened on.
+*/
+void
+ipc_init (struct msgbuf **msgpp)
+{
+  key_t key;                   /* messge key */
+  char buf[GSERV_BUFSZ];       /* pathname for key */
+
+  sprintf (buf,"%s/gsrv%d",tmpdir,(int)geteuid ());
+  creat (buf,0600);
+  key = ftok (buf,1);
+
+  if ((ipc_qid = msgget (key,0600|IPC_CREAT)) == -1)
+    {
+      perror (progname);
+      fprintf (stderr, "%s: unable to create msg queue\n", progname);
+      ipc_exit (1);
+    } /* if */
+
+  ipc_spawn_watchdog ();
+
+  signal (SIGTERM,ipc_handle_signal);
+  signal (SIGINT,ipc_handle_signal);
+
+  if ((*msgpp = (struct msgbuf *)
+       malloc (sizeof **msgpp + GSERV_BUFSZ)) == NULL)
+    {
+      fprintf (stderr,
+              "%s: unable to allocate space for message buffer\n", progname);
+      ipc_exit(1);
+    } /* if */
+} /* ipc_init */
+
+
+/*
+  handle_ipc_request -- accept a request from a client, pass the request on
+                       to the GNU Emacs process, then wait for its reply and
+                       pass that on to the client.
+*/
+void
+handle_ipc_request (struct msgbuf *msgp)
+{
+  struct msqid_ds msg_st;      /* message status */
+  char buf[GSERV_BUFSZ];
+  int len;                     /* length of message / read */
+  int s, result_len;            /* tag fields on the response from emacs */
+  int offset = 0;
+  int total = 1;                /* # bytes that will actually be sent off */
+
+  if ((len = msgrcv (ipc_qid, msgp, GSERV_BUFSZ - 1, 1, 0)) < 0)
+    {
+      perror (progname);
+      fprintf (stderr, "%s: unable to receive\n", progname);
+      ipc_exit (1);
+    } /* if */
+
+  msgctl (ipc_qid, IPC_STAT, &msg_st);
+  strncpy (buf, msgp->mtext, len);
+  buf[len] = '\0';             /* terminate */
+  
+  printf ("%d %s", ipc_qid, buf);
+  fflush (stdout);
+
+  /* now for the response from gnu */
+  msgp->mtext[0] = '\0';
+
+#if 0
+  if ((len = read(0,buf,GSERV_BUFSZ-1)) < 0)
+    {
+      perror (progname);
+      fprintf (stderr, "%s: unable to read\n", progname);
+      ipc_exit (1);
+  } /* if */
+
+  sscanf (buf, "%d:%[^\n]\n", &junk, msgp->mtext);
+#else
+
+  /* read in "n/m:" (n=client fd, m=message length) */
+
+  while (offset < (GSERV_BUFSZ-1) && 
+        ((len = read (0, buf + offset, 1)) > 0) &&
+        buf[offset] != ':')
+    {
+      offset += len;
+    }
+
+  if (len < 0)
+    {
+      perror (progname);
+      fprintf (stderr, "%s: unable to read\n", progname);
+      exit(1);
+    }
+
+  /* parse the response from emacs, getting client fd & result length */
+  buf[offset] = '\0';
+  sscanf (buf, "%d/%d", &s, &result_len);
+
+  while (result_len > 0)
+    {
+      if ((len = read(0, buf, min2 (result_len, GSERV_BUFSZ - 1))) < 0)
+       {
+         perror (progname);
+         fprintf (stderr, "%s: unable to read\n", progname);
+         exit (1);
+       }
+
+      /* Send this string off, but only if we have enough space */ 
+
+      if (GSERV_BUFSZ > total)
+       {
+         if (total + len <= GSERV_BUFSZ)
+           buf[len] = 0;
+         else
+           buf[GSERV_BUFSZ - total] = 0;
+
+         send_string(s,buf);
+         total += strlen(buf);
+       }
+
+      result_len -= len;
+    }
+
+  /* eat the newline */
+  while ((len = read (0,buf,1)) == 0)
+    ;
+  if (len < 0)
+    {
+      perror(progname);
+      fprintf (stderr,"%s: unable to read\n", progname);
+      exit (1);
+    }
+  if (buf[0] != '\n')
+    {
+      fprintf (stderr,"%s: garbage after result [%c]\n", progname, buf[0]);
+      exit (1);
+    }
+#endif
+
+  /* Send a response back to the client. */
+
+  msgp->mtype = msg_st.msg_lspid;
+  if (msgsnd (ipc_qid,msgp,strlen(msgp->mtext)+1,0) < 0)
+    perror ("msgsend(gnuserv)");
+
+} /* handle_ipc_request */
+#endif /* SYSV_IPC */
+
+
+#if defined(INTERNET_DOMAIN_SOCKETS) || defined(UNIX_DOMAIN_SOCKETS)
+/*
+  echo_request -- read request from a given socket descriptor, and send the information
+                  to stdout (the gnu process).
+*/
+static void
+echo_request (int s)
+{
+  char buf[GSERV_BUFSZ];
+  int len;
+
+  printf("%d ",s);
+  
+  /* read until we get a newline or no characters */
+  while ((len = recv(s,buf,GSERV_BUFSZ-1,0)) > 0) {
+    buf[len] = '\0';
+    printf("%s",buf);
+
+    if (buf[len-1] == EOT_CHR) {
+      fflush(stdout);
+      break;                   /* end of message */
+    }
+
+  } /* while */
+
+  if (len < 0) {
+    perror(progname);
+    fprintf(stderr,"%s: unable to recv\n",progname);
+    exit(1);
+  } /* if */
+  
+} /* echo_request */
+
+
+/*
+  handle_response -- accept a response from stdin (the gnu process) and pass the
+                     information on to the relevant client.
+*/
+static void
+handle_response (void)
+{
+  char buf[GSERV_BUFSZ+1];
+  int offset=0;
+  int s;
+  int len;
+  int result_len;
+
+  /* read in "n/m:" (n=client fd, m=message length) */
+  while (offset < GSERV_BUFSZ && 
+        ((len = read(0,buf+offset,1)) > 0) &&
+        buf[offset] != ':') {
+    offset += len;
+  }
+
+  if (len < 0) {
+    perror(progname);
+    fprintf(stderr,"%s: unable to read\n",progname);
+    exit(1);
+  }
+      
+  /* parse the response from emacs, getting client fd & result length */
+  buf[offset] = '\0';
+  sscanf(buf,"%d/%d", &s, &result_len);
+
+  while (result_len > 0) {
+    if ((len = read(0,buf,min2(result_len,GSERV_BUFSZ))) < 0) {
+      perror(progname);
+      fprintf(stderr,"%s: unable to read\n",progname);
+      exit(1);
+    }
+    buf[len] = '\0';
+    send_string(s,buf);
+    result_len -= len;
+  }
+
+  /* eat the newline */
+  while ((len = read(0,buf,1)) == 0)
+    ;
+  if (len < 0)
+    {
+      perror(progname);
+      fprintf(stderr,"%s: unable to read\n",progname);
+      exit(1);
+    }
+  if (buf[0] != '\n')
+    {
+      fprintf(stderr,"%s: garbage after result\n",progname);
+      exit(1);
+    }
+  /* send the newline */
+  buf[1] = '\0';
+  send_string(s,buf);
+  close(s); 
+
+} /* handle_response */
+#endif /* INTERNET_DOMAIN_SOCKETS || UNIX_DOMAIN_SOCKETS */
+
+
+#ifdef INTERNET_DOMAIN_SOCKETS
+struct entry {
+  u_long host_addr;
+  struct entry *next;
+};
+
+struct entry *permitted_hosts[TABLE_SIZE];
+
+#ifdef AUTH_MAGIC_COOKIE
+# include <X11/X.h>
+# include <X11/Xauth.h>
+
+static Xauth *server_xauth = NULL;
+#endif 
+
+static int 
+timed_read (int fd, char *buf, int max, int timeout, int one_line)
+{
+  fd_set rmask;
+  struct timeval tv; /* = {timeout, 0}; */
+  char c = 0;
+  int nbytes = 0;
+  int r;
+  
+  tv.tv_sec = timeout;
+  tv.tv_usec = 0;
+
+  FD_ZERO(&rmask);
+  FD_SET(fd, &rmask);
+  
+  do
+    {
+      r = select(fd + 1, &rmask, NULL, NULL, &tv);
+
+      if (r > 0)
+       {
+         if (read (fd, &c, 1) == 1 )
+           {
+             *buf++ = c;
+             ++nbytes;
+           }
+         else
+           {
+             printf ("read error on socket\004\n");
+             return -1;
+           }
+       }
+      else if (r == 0)
+       {
+         printf ("read timed out\004\n");
+         return -1;
+       }
+      else
+       {
+         printf ("error in select\004\n");
+         return -1;
+       }
+    } while ((nbytes < max) &&  !(one_line && (c == '\n')));
+
+  --buf;
+  if (one_line && *buf == '\n')
+    {
+      *buf = 0;
+    }
+
+  return nbytes;
+}
+       
+       
+
+/*
+  permitted -- return whether a given host is allowed to connect to the server.
+*/
+static int
+permitted (u_long host_addr, int fd)
+{
+  int key;
+  struct entry *entry;
+
+  char auth_protocol[128]; 
+  char buf[1024];
+  int  auth_data_len;
+
+  if (fd > 0)
+    {
+      /* we are checking permission on a real connection */
+
+      /* Read auth protocol name */
+  
+      if (timed_read(fd, auth_protocol, AUTH_NAMESZ, AUTH_TIMEOUT, 1) <= 0)
+       return FALSE;
+
+      if (strcmp (auth_protocol, DEFAUTH_NAME) &&
+         strcmp (auth_protocol, MCOOKIE_NAME))
+       {
+         printf ("authentication protocol (%s) from client is invalid...\n", 
+                 auth_protocol);
+         printf ("... Was the client an old version of gnuclient/gnudoit?\004\n");
+      
+         return FALSE;
+       }
+
+      if (!strcmp(auth_protocol, MCOOKIE_NAME))
+       {
+
+         /*
+          * doing magic cookie auth
+          */
+
+         if (timed_read(fd, buf, 10, AUTH_TIMEOUT, 1) <= 0)
+           return FALSE;
+
+         auth_data_len = atoi(buf);
+
+         if (timed_read(fd, buf, auth_data_len, AUTH_TIMEOUT, 0) != auth_data_len)
+           return FALSE;
+      
+#ifdef AUTH_MAGIC_COOKIE
+         if (server_xauth && server_xauth->data &&
+             !memcmp(buf, server_xauth->data, auth_data_len))
+           {
+             return TRUE;
+           }
+#else 
+         printf ("client tried Xauth, but server is not compiled with Xauth\n");
+#endif
+      
+      /*
+       * auth failed, but allow this to fall through to the GNU_SECURE
+       * protocol....
+       */
+
+         printf ("Xauth authentication failed, trying GNU_SECURE auth...\004\n");
+
+       }
+    
+      /* Other auth protocols go here, and should execute only if the
+       * auth_protocol name matches.
+       */
+
+    }
+
+
+  /* Now, try the old GNU_SECURE stuff... */
+  
+  /* First find the hash key */
+  key = HASH(host_addr) % TABLE_SIZE;
+  
+  /* Now check the chain for that hash key */
+  for(entry=permitted_hosts[key]; entry != NULL; entry=entry->next)
+    if (host_addr == entry->host_addr) 
+      return(TRUE);
+  
+  return(FALSE);
+
+} /* permitted */
+
+
+/* 
+  add_host -- add the given host to the list of permitted hosts, provided it isn't
+              already there.
+*/     
+static void
+add_host (u_long host_addr)
+{
+  int key;
+  struct entry *new_entry;
+  
+  if (!permitted(host_addr, -1))
+    {
+      if ((new_entry = (struct entry *) malloc(sizeof(struct entry))) == NULL) {
+       fprintf(stderr,"%s: unable to malloc space for permitted host entry\n",
+               progname);
+       exit(1);
+      } /* if */
+
+      new_entry->host_addr = host_addr;
+      key = HASH(host_addr) % TABLE_SIZE;
+      new_entry->next = permitted_hosts[key];
+      permitted_hosts[key] = new_entry;
+    } /* if */
+
+} /* add_host */
+
+
+/*
+  setup_table -- initialise the table of hosts allowed to contact the server,
+                 by reading from the file specified by the GNU_SECURE
+                environment variable
+                 Put in the local machine, and, if a security file is specifed,
+                 add each host that is named in the file.
+                Return the number of hosts added.
+*/
+static int
+setup_table (void)
+{
+  FILE *host_file;
+  char *file_name;
+  char hostname[HOSTNAMSZ];
+  u_int host_addr;
+  int i, hosts=0;
+  
+  /* Make sure every entry is null */
+  for (i=0; i<TABLE_SIZE; i++)
+    permitted_hosts[i] = NULL;
+
+  gethostname(hostname,HOSTNAMSZ);
+
+  if ((host_addr = internet_addr(hostname)) == -1)
+    {
+      fprintf(stderr,"%s: unable to find %s in /etc/hosts or from YP", 
+             progname,hostname);
+      exit(1);
+    } /* if */
+
+#ifdef AUTH_MAGIC_COOKIE
+  
+  server_xauth = XauGetAuthByAddr (FamilyInternet, 
+                                  sizeof(host_addr), (char *)&host_addr,
+                                  strlen(MCOOKIE_SCREEN), MCOOKIE_SCREEN, 
+                                  strlen(MCOOKIE_X_NAME), MCOOKIE_X_NAME);
+  hosts++;
+
+#endif /* AUTH_MAGIC_COOKIE */
+  
+
+#if 0 /* Don't even want to allow access from the local host by default */
+  add_host(host_addr);                                 /* add local host */
+#endif 
+
+  if (((file_name = getenv("GNU_SECURE")) != NULL &&    /* security file  */
+       (host_file = fopen(file_name,"r")) != NULL))    /* opened ok */
+    {
+      while ((fscanf(host_file,"%s",hostname) != EOF)) /* find a host */
+       if ((host_addr = internet_addr(hostname)) != -1)/* get its addr */
+         {
+           add_host(host_addr);                                /* add the addr */
+           hosts++;
+         }
+      fclose(host_file);
+    } /* if */
+
+  return hosts;
+} /* setup_table */
+
+
+/*
+  internet_init -- initialize server, returning an internet socket that can
+                    be listened on.
+*/
+static int
+internet_init (void)
+{
+  int ls;                      /* socket descriptor */
+  struct servent *sp;          /* pointer to service information */
+  struct sockaddr_in server;   /* for local socket address */
+  char *ptr;                   /* ptr to return from getenv */
+
+  if (setup_table() == 0) 
+    return -1;
+
+  /* clear out address structure */
+  memset((char *)&server,0,sizeof(struct sockaddr_in));
+  
+  /* Set up address structure for the listen socket. */
+  server.sin_family = AF_INET;
+  server.sin_addr.s_addr = INADDR_ANY;
+
+  /* Find the information for the gnu server
+   * in order to get the needed port number.
+   */
+  if ((ptr=getenv("GNU_PORT")) != NULL)
+    server.sin_port = htons(atoi(ptr));
+  else if ((sp = getservbyname ("gnuserv", "tcp")) == NULL)
+    server.sin_port = htons(DEFAULT_PORT+getuid());
+  else
+    server.sin_port = sp->s_port;
+  
+  /* Create the listen socket. */
+  if ((ls = socket (AF_INET,SOCK_STREAM, 0)) == -1)
+    {
+      perror(progname);
+      fprintf(stderr,"%s: unable to create socket\n",progname);
+      exit(1);
+    } /* if */
+  
+  /* Bind the listen address to the socket. */
+  if (bind(ls,(struct sockaddr *) &server,sizeof(struct sockaddr_in)) == -1)
+    {
+      perror(progname);
+      fprintf(stderr,"%s: unable to bind socket\n",progname);
+      exit(1);
+    } /* if */
+
+  /* Initiate the listen on the socket so remote users
+   * can connect. 
+   */
+  if (listen(ls,20) == -1)
+    {
+      perror(progname);
+      fprintf(stderr,"%s: unable to listen\n",progname);
+      exit(1);
+    } /* if */
+
+  return(ls);
+
+} /* internet_init */
+
+
+/*
+  handle_internet_request -- accept a request from a client and send the information
+                             to stdout (the gnu process).
+*/
+static void
+handle_internet_request (int ls)
+{
+  int s;
+  size_t addrlen = sizeof(struct sockaddr_in);
+  struct sockaddr_in peer;     /* for peer socket address */
+
+  memset((char *)&peer,0,sizeof(struct sockaddr_in));
+
+  if ((s = accept(ls,(struct sockaddr *)&peer, (void *) &addrlen)) == -1)
+    {
+      perror(progname);
+      fprintf(stderr,"%s: unable to accept\n",progname);
+      exit(1);
+    } /* if */
+    
+  /* Check that access is allowed - if not return crud to the client */
+  if (!permitted(peer.sin_addr.s_addr, s))
+    {
+      send_string(s,"gnudoit: Connection refused\ngnudoit: unable to connect to remote");
+      close(s);
+
+      printf("Refused connection from %s\004\n", inet_ntoa(peer.sin_addr));
+      return;
+    } /* if */
+
+  echo_request(s);
+  
+} /* handle_internet_request */
+#endif /* INTERNET_DOMAIN_SOCKETS */
+
+
+#ifdef UNIX_DOMAIN_SOCKETS
+/*
+  unix_init -- initialize server, returning an unix-domain socket that can
+               be listened on.
+*/
+static int
+unix_init (void)
+{
+  int ls;                      /* socket descriptor */
+  struct sockaddr_un server;   /* unix socket address */
+  int bindlen;
+
+  if ((ls = socket(AF_UNIX,SOCK_STREAM, 0)) < 0)
+    {
+      perror(progname);
+      fprintf(stderr,"%s: unable to create socket\n",progname);
+      exit(1);
+    } /* if */
+
+  /* Set up address structure for the listen socket. */
+#ifdef HIDE_UNIX_SOCKET
+  sprintf(server.sun_path,"%s/gsrvdir%d",tmpdir,(int)geteuid());
+  if (mkdir(server.sun_path, 0700) < 0)
+    {
+      /* assume it already exists, and try to set perms */
+      if (chmod(server.sun_path, 0700) < 0)
+       {
+         perror(progname);
+         fprintf(stderr,"%s: can't set permissions on %s\n",
+                 progname, server.sun_path);
+         exit(1);
+       }
+    }
+  strcat(server.sun_path,"/gsrv");
+  unlink(server.sun_path);     /* remove old file if it exists */
+#else /* HIDE_UNIX_SOCKET */
+  sprintf(server.sun_path,"%s/gsrv%d",tmpdir,(int)geteuid());
+  unlink(server.sun_path);     /* remove old file if it exists */
+#endif /* HIDE_UNIX_SOCKET */
+
+  server.sun_family = AF_UNIX;
+#ifdef HAVE_SOCKADDR_SUN_LEN
+  /* See W. R. Stevens "Advanced Programming in the Unix Environment"
+     p. 502 */
+  bindlen = (sizeof (server.sun_len) + sizeof (server.sun_family)
+            + strlen (server.sun_path) + 1);
+  server.sun_len = bindlen;
+#else
+  bindlen = strlen (server.sun_path) + sizeof (server.sun_family);
+#endif
+  if (bind(ls,(struct sockaddr *)&server,bindlen) < 0)
+    {
+      perror(progname);
+      fprintf(stderr,"%s: unable to bind socket\n",progname);
+      exit(1);
+    } /* if */
+
+  chmod(server.sun_path,0700); /* only this user can send commands */
+
+  if (listen(ls,20) < 0) {
+    perror(progname);
+    fprintf(stderr,"%s: unable to listen\n",progname);
+    exit(1);
+  } /* if */
+
+  /* #### there are also better ways of dealing with this when
+     sigvec() is present. */
+#if  defined (HAVE_SIGPROCMASK)
+  {                                            
+  sigset_t _mask;
+  sigemptyset (&_mask);
+  sigaddset (&_mask, SIGPIPE);
+  sigprocmask (SIG_BLOCK, &_mask, NULL);
+  }
+#else
+  signal(SIGPIPE,SIG_IGN);     /* in case user kills client */
+#endif
+
+  return(ls);
+
+} /* unix_init */
+
+
+/*
+  handle_unix_request -- accept a request from a client and send the information
+                         to stdout (the gnu process).
+*/
+static void
+handle_unix_request (int ls)
+{
+  int s;
+  size_t len = sizeof(struct sockaddr_un);
+  struct sockaddr_un server;   /* for unix socket address */
+
+  server.sun_family = AF_UNIX;
+
+  if ((s = accept(ls,(struct sockaddr *)&server, (void *)&len)) < 0)
+    {
+      perror(progname);
+      fprintf(stderr,"%s: unable to accept\n",progname);
+    } /* if */
+
+  echo_request(s);
+  
+} /* handle_unix_request */
+#endif /* UNIX_DOMAIN_SOCKETS */
+
+
+int
+main(argc,argv)
+     int argc;
+     char *argv[];
+{
+  int chan;                    /* temporary channel number */
+#ifdef SYSV_IPC
+  struct msgbuf *msgp;         /* message buffer */
+#else
+  int ils = -1;                        /* internet domain listen socket */
+  int uls = -1;                        /* unix domain listen socket */
+#endif /* SYSV_IPC */
+
+  progname = argv[0];
+
+  for(chan=3; chan < _NFILE; close(chan++)) /* close unwanted channels */
+    ;
+
+#ifdef USE_TMPDIR
+  tmpdir = getenv("TMPDIR");
+#endif
+  if (!tmpdir)
+    tmpdir = "/tmp";
+#ifdef USE_LITOUT
+  {
+    /* this is to allow ^D to pass to emacs */
+    int d = LLITOUT;
+    (void) ioctl(fileno(stdout), TIOCLBIS, &d);
+  }
+#endif
+
+#ifdef SYSV_IPC
+  ipc_init(&msgp);             /* get a msqid to listen on, and a message buffer */
+#endif /* SYSV_IPC */
+
+#ifdef INTERNET_DOMAIN_SOCKETS
+  ils = internet_init();       /* get a internet domain socket to listen on */
+#endif /* INTERNET_DOMAIN_SOCKETS */
+
+#ifdef UNIX_DOMAIN_SOCKETS
+  uls = unix_init();           /* get a unix domain socket to listen on */
+#endif /* UNIX_DOMAIN_SOCKETS */
+
+  while (1) {
+#ifdef SYSV_IPC
+    handle_ipc_request(msgp);
+#else /* NOT SYSV_IPC */
+    fd_set rmask;
+    FD_ZERO(&rmask);
+    FD_SET(fileno(stdin), &rmask);
+    if (uls >= 0)
+      FD_SET(uls, &rmask);
+    if (ils >= 0)
+      FD_SET(ils, &rmask);
+    
+    if (select(max2(fileno(stdin),max2(uls,ils)) + 1, &rmask, 
+              (fd_set *)NULL, (fd_set *)NULL, (struct timeval *)NULL) < 0)
+      {
+       perror(progname);
+       fprintf(stderr,"%s: unable to select\n",progname);
+       exit(1);
+      } /* if */
+
+#ifdef UNIX_DOMAIN_SOCKETS
+    if (uls > 0 && FD_ISSET(uls, &rmask))
+      handle_unix_request(uls);
+#endif
+
+#ifdef INTERNET_DOMAIN_SOCKETS
+    if (ils > 0 && FD_ISSET(ils, &rmask))
+      handle_internet_request(ils);
+#endif /* INTERNET_DOMAIN_SOCKETS */
+
+    if (FD_ISSET(fileno(stdin), &rmask))      /* from stdin (gnu process) */
+      handle_response();
+#endif /* NOT SYSV_IPC */
+  } /* while */
+
+  return 0;
+} /* main */
+
+#endif /* SYSV_IPC || UNIX_DOMAIN_SOCKETS || INTERNET_DOMAIN_SOCKETS */
diff --git a/lib-src/gnuserv.h b/lib-src/gnuserv.h
new file mode 100644 (file)
index 0000000..9fb3edd
--- /dev/null
@@ -0,0 +1,225 @@
+/* -*-C-*-
+
+ Header file for the GNU Emacs server and client C code.
+
+ This file is part of GNU Emacs.
+
+ Copying is permitted under those conditions described by the GNU
+ General Public License.
+
+ Copyright (C) 1989 Free Software Foundation, Inc.
+
+ Author: Andy Norman (ange@hplb.hpl.hp.com), based on 
+         'etc/server.c' and 'etc/emacsclient.c' from the 18.52 GNU
+         Emacs distribution.
+
+ Please mail bugs and suggestions to the author at the above address.
+*/
+
+/* HISTORY 
+ * 11-Nov-1990         bristor@simba   
+ *    Added EOT stuff.
+ */
+
+/*
+ * This file incorporates new features added by Bob Weiner <weiner@mot.com>,
+ * Darrell Kindred <dkindred@cmu.edu> and Arup Mukherjee <arup@cmu.edu>.
+ * Please see the note at the end of the README file for details.
+ *
+ * (If gnuserv came bundled with your emacs, the README file is probably
+ * ../etc/gnuserv.README relative to the directory containing this file)
+ */
+
+#if 0
+static char header_rcsid [] = "!Header: gnuserv.h,v 2.4 95/02/16 11:58:11 arup alpha !";
+#endif
+
+#define USE_TMPDIR
+
+#define NO_SHORTNAMES
+
+#define PATCHLEVEL 2
+
+#define NO_SHORTNAMES
+/* gnuserv should not be compiled using SOCKS */
+#define DO_NOT_SOCKSIFY
+#include <../src/config.h>
+#undef read
+#undef write
+#undef open
+#undef close
+#undef signal
+
+/* Define the communication method between server and clients:
+ *   You can have either or both kinds of sockets, but you can't mix
+ *   sockets with sysv ipc
+ */
+
+
+#define INTERNET_DOMAIN_SOCKETS
+#ifdef HAVE_SYS_UN_H
+#define UNIX_DOMAIN_SOCKETS 
+/* #define SYSV_IPC  */
+#endif
+
+/*
+ * Define additional authentication protocols to be used. These methods will
+ * be tried before falling back to the default gnuserv protocol (based on
+ * the GNU_SECURE environment variable). Currently, only MIT-MAGIC-COOKIE-1
+ * is also supported.
+ *
+ * Comment out the next line(s) if you don't want to enable the
+ * appropriate authentication protocol.
+ */
+
+#if defined (HAVE_XAUTH)
+#define AUTH_MAGIC_COOKIE
+#endif /* HAVE_XAUTH */
+
+/*
+ * stuff related to supporting MIT-MAGIC-COOKIE-1
+ */
+
+#define MCOOKIE_SCREEN "999"     /* screen # to use as the gnuserv cookie */
+#define MCOOKIE_NAME   "MAGIC-1" /* authentication protocol name */
+#define MCOOKIE_X_NAME "MIT-MAGIC-COOKIE-1"  /* as needed by X */
+
+
+#define DEFAUTH_NAME "GNU-SECURE"  /* name of default auth protocol */
+#define AUTH_TIMEOUT  15           /* # seconds to wait for auth data */
+#define AUTH_NAMESZ   15           /* max allows auth protocol name size */
+
+
+/*
+ * Pick a default communication scheme, if none was specified.
+ */
+
+#if !defined(SYSV_IPC) && !defined(UNIX_DOMAIN_SOCKETS) && !defined(INTERNET_DOMAIN_SOCKETS)
+
+#ifdef HAVE_SYSVIPC
+#define SYSV_IPC               /* SYSV systems use SYSV IPC by default */
+#endif /* HAVE_SYSVIPC */
+
+#ifdef BSD
+#define UNIX_DOMAIN_SOCKETS    /* BSD systems use Unix Domain sockets by default */
+#endif /* BSD */
+
+#endif /* No communication method pre-defined */
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <signal.h>
+#include <errno.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
+/*
+ * If you are using SYSV_IPC, you might want to make the buffer size bigger
+ * since it limits the size of requests and responses. Don't make it bigger
+ * than your system's max message size though (usually a couple of k) or else
+ * msgsend will start failing. For sockets, using the system BUFSIZ is usually
+ * what you want. 
+ */
+
+# define GSERV_BUFSZ BUFSIZ
+
+
+#ifdef SYSV_IPC
+#include <sys/ipc.h>
+#include <sys/msg.h>
+
+#define send_string(s,str) \
+  if (strlen(msgp->mtext) + strlen(str) < GSERV_BUFSZ) \
+     strcat(msgp->mtext,str); \
+  else \
+  { \
+    fprintf(stderr,"%s: not enough message buffer space\n",progname); \
+     exit(1); \
+  } \
+
+#endif /* SYSV_IPC */
+
+#if defined(INTERNET_DOMAIN_SOCKETS) || defined(UNIX_DOMAIN_SOCKETS)
+#include <sys/socket.h>
+#endif /* INTERNET_DOMAIN_SOCKETS || UNIX_DOMAIN_SOCKETS */
+
+#ifdef INTERNET_DOMAIN_SOCKETS
+#include <netdb.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#define TABLE_SIZE 101         /* The number of entries in the hash table */
+#define HASH(host) host                /* Rather simplistic hash function */
+#define DEFAULT_PORT 21490     /* default port number to use is
+                                * DEFAULT_PORT + uid */
+#endif /* INTERNET_DOMAIN_SOCKETS */
+
+#ifdef UNIX_DOMAIN_SOCKETS
+#include <sys/un.h>
+#define HIDE_UNIX_SOCKET       /* put the unix socket in a protected dir */
+#endif /* UNIX_DOMAIN_SOCKETS */
+
+/* On some platforms, we need to do the equivalent of "stty litout" to get
+ * characters like ^D to pass through to emacs.  This problem has only
+ * been observed under emacs18; fsf19 and lemacs are probably okay without it.
+ */
+#ifndef DONT_USE_LITOUT
+#if !defined(HAVE_TERMIO) && !defined(HAVE_TERMIOS) && !defined(VMS)
+#if !defined(MSDOS) && !defined(BSD4_1)
+#define USE_LITOUT
+#endif
+#endif
+#endif
+
+
+#define HOSTNAMSZ 255          /* max size of a hostname */
+#define REPLYSIZ 300           /* max size of reply from server to client */
+#undef FALSE
+#define FALSE 0
+#undef TRUE
+#define TRUE 1
+
+extern char *optarg;
+extern int optind;
+extern char *progname;
+extern char *tmpdir;
+
+/* The casts shut Sun's compiler up and are safe in the context these
+   are actually used. */
+#define max2(x,y) (((int) (x) > (int) (y)) ? (x) : (y))
+#define min2(x,y) (((int) (x) < (int) (y)) ? (x) : (y))
+
+#ifndef _NFILE            /* rough guess at maximum number of open files */
+#define _NFILE 20
+#endif
+
+#define EOT_STR "\004"
+#define EOT_CHR '\004'
+
+/* connection types */
+#define CONN_UNIX     0
+#define CONN_INTERNET 1
+#define CONN_IPC      2
+
+/* function declarations */
+int make_connection (char *hostarg, int portarg, int *s);
+#ifdef SYSV_IPC
+void disconnect_from_ipc_server();
+#endif
+#if defined(INTERNET_DOMAIN_SOCKETS) || defined(UNIX_DOMAIN_SOCKETS)
+void send_string (int s, CONST char *msg);
+void disconnect_from_server (int s, int echo);
+int read_line (int s, char *dest);
+#endif
+#ifdef INTERNET_DOMAIN_SOCKETS
+int internet_addr (char *host);
+#endif
diff --git a/lib-src/gnuslib.c b/lib-src/gnuslib.c
new file mode 100644 (file)
index 0000000..a30f9f9
--- /dev/null
@@ -0,0 +1,456 @@
+/* -*-C-*-
+ Common library code for the GNU Emacs server and client.
+
+ This file is part of GNU Emacs.
+
+ Copying is permitted under those conditions described by the GNU
+ General Public License.
+
+ Copyright (C) 1989 Free Software Foundation, Inc.
+
+ Author: Andy Norman (ange@hplb.hpl.hp.com), based on 
+         'etc/server.c' and 'etc/emacsclient.c' from the 18.52 GNU
+         Emacs distribution.
+
+ Please mail bugs and suggestions to the author at the above address.
+*/
+
+/* HISTORY 
+ * 11-Nov-1990         bristor@simba   
+ *    Added EOT stuff.
+ */
+
+/*
+ * This file incorporates new features added by Bob Weiner <weiner@mot.com>,
+ * Darrell Kindred <dkindred@cmu.edu> and Arup Mukherjee <arup@cmu.edu>.
+ * Please see the note at the end of the README file for details.
+ *
+ * (If gnuserv came bundled with your emacs, the README file is probably
+ * ../etc/gnuserv.README relative to the directory containing this file)
+ */
+
+#if 0
+static char rcsid [] = "!Header: gnuslib.c,v 2.4 95/02/16 11:57:37 arup alpha !";
+#endif
+
+#include "gnuserv.h"
+#include <errno.h>
+
+#ifdef SYSV_IPC
+static int connect_to_ipc_server (void);
+#endif
+#ifdef UNIX_DOMAIN_SOCKETS
+static int connect_to_unix_server (void);
+#endif
+#ifdef INTERNET_DOMAIN_SOCKETS
+static int connect_to_internet_server (char *serverhost, u_short port);
+#endif
+
+/* On some systems, e.g. DGUX, inet_addr returns a 'struct in_addr'. */
+#ifdef HAVE_BROKEN_INET_ADDR
+# define IN_ADDR struct in_addr
+# define NUMERIC_ADDR_ERROR (numeric_addr.s_addr == -1)
+#else
+# if (LONGBITS > 32)
+#  define IN_ADDR unsigned int
+# else
+#  define IN_ADDR unsigned long
+# endif
+# define NUMERIC_ADDR_ERROR (numeric_addr == (IN_ADDR) -1)
+#endif
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#ifdef HAVE_STRING_H
+#include <string.h>
+#endif /* HAVE_STRING_H */
+
+#include <arpa/inet.h>
+
+char *tmpdir = NULL;
+
+char *progname = NULL;
+
+int make_connection(hostarg, portarg, s)
+     char *hostarg;
+     int portarg;
+     int *s;
+{
+#ifdef INTERNET_DOMAIN_SOCKETS
+  char *ptr;
+  if (hostarg == NULL)
+    hostarg = getenv("GNU_HOST");
+  if (portarg == 0 && (ptr=getenv("GNU_PORT")) != NULL)
+    portarg = atoi(ptr);
+#endif
+
+  if (hostarg != NULL) {
+    /* hostname was given explicitly, via cmd line arg or GNU_HOST, 
+     * so obey it. */
+#ifdef UNIX_DOMAIN_SOCKETS
+    if (!strcmp(hostarg, "unix")) {
+      *s = connect_to_unix_server();
+      return (int) CONN_UNIX;
+    } 
+#endif /* UNIX_DOMAIN_SOCKETS */
+#ifdef INTERNET_DOMAIN_SOCKETS
+    *s = connect_to_internet_server(hostarg, portarg);
+    return (int) CONN_INTERNET;
+#endif
+#ifdef SYSV_IPC
+    return -1;              /* hostarg should always be NULL for SYSV_IPC */
+#endif
+  } else {
+    /* no hostname given.  Use unix-domain/sysv-ipc, or
+     * internet-domain connection to local host if they're not available. */
+#if   defined(UNIX_DOMAIN_SOCKETS)
+    *s = connect_to_unix_server();
+    return (int) CONN_UNIX;
+#elif defined(SYSV_IPC)
+    *s = connect_to_ipc_server();
+    return (int) CONN_IPC;
+#elif defined(INTERNET_DOMAIN_SOCKETS)
+    {
+      char localhost[HOSTNAMSZ];
+      gethostname(localhost,HOSTNAMSZ);          /* use this host by default */    
+      *s = connect_to_internet_server(localhost, portarg);
+      return (int) CONN_INTERNET;
+    }
+#endif /* IPC type */
+  }
+}
+
+#ifdef SYSV_IPC
+/*
+  connect_to_ipc_server -- establish connection with server process via SYSV IPC
+                          Returns msqid for server if successful.
+*/
+static int connect_to_ipc_server (void)
+{
+  int s;                       /* connected msqid */
+  key_t key;                   /* message key */
+  char buf[GSERV_BUFSZ+1];             /* buffer for filename */
+
+  sprintf(buf,"%s/gsrv%d",tmpdir,(int)geteuid());
+  creat(buf,0600);
+  if ((key = ftok(buf,1)) == -1) {
+    perror(progname);
+    fprintf(stderr, "%s: unable to get ipc key from %s\n",
+           progname, buf);
+    exit(1);
+  }
+
+  if ((s = msgget(key,0600)) == -1) {
+    perror(progname);
+    fprintf(stderr,"%s: unable to access msg queue\n",progname);
+    exit(1);
+  }; /* if */
+
+  return(s);
+
+} /* connect_to_ipc_server */
+
+
+/*
+  disconnect_from_ipc_server -- inform the server that sending has finished,
+                                and wait for its reply.
+*/
+void disconnect_from_ipc_server(s,msgp,echo)
+     int s;
+     struct msgbuf *msgp;
+     int echo;
+{
+  int len;                     /* length of received message */
+
+  send_string(s,EOT_STR);      /* EOT terminates this message */
+  msgp->mtype = 1;
+
+  if(msgsnd(s,msgp,strlen(msgp->mtext)+1,0) < 0) {
+    perror(progname);
+    fprintf(stderr,"%s: unable to send message to server\n",progname);
+    exit(1);
+  }; /* if */
+  
+  if((len = msgrcv(s,msgp,GSERV_BUFSZ,getpid(),0)) < 0) {
+    perror(progname);
+    fprintf(stderr,"%s: unable to receive message from server\n",progname);
+    exit(1);
+  }; /* if */
+
+  if (echo) {
+    msgp->mtext[len] = '\0';   /* string terminate message */
+    fputs(msgp->mtext, stdout);
+    if (msgp->mtext[len-1] != '\n') putchar ('\n');
+  }; /* if */
+
+} /* disconnect_from_ipc_server */  
+#endif /* SYSV_IPC */
+
+
+#if defined(INTERNET_DOMAIN_SOCKETS) || defined(UNIX_DOMAIN_SOCKETS)
+/*
+  send_string -- send string to socket.
+*/
+void send_string(s,msg)
+     int s;
+     CONST char *msg;
+{
+#if 0
+  if (send(s,msg,strlen(msg),0) < 0) {
+    perror(progname);
+    fprintf(stderr,"%s: unable to send\n",progname);
+    exit(1);
+  }; /* if */ 
+#else  
+  int len, left=strlen(msg);
+  while (left > 0) {
+    if ((len=write(s,msg,min2(left,GSERV_BUFSZ))) < 0) {
+       /* XEmacs addition: robertl@arnet.com */
+       if (errno == EPIPE) {
+       return ;
+       }
+      perror(progname);
+      fprintf(stderr,"%s: unable to send\n",progname);
+      exit(1);
+    }; /* if */
+    left -= len;
+    msg += len;
+  }; /* while */ 
+#endif
+} /* send_string */
+
+/*
+  read_line -- read a \n terminated line from a socket
+*/
+int read_line(int s, char *dest)
+{
+  int length;
+  int offset=0;
+  char buffer[GSERV_BUFSZ+1];
+
+  while ((length=read(s,buffer+offset,1)>0) && buffer[offset]!='\n'
+        && buffer[offset] != EOT_CHR) {
+    offset += length;
+    if (offset >= GSERV_BUFSZ) 
+      break;
+  }
+  buffer[offset] = '\0';
+  strcpy(dest,buffer);
+  return 1;
+} /* read_line */
+#endif /* INTERNET_DOMAIN_SOCKETS || UNIX_DOMAIN_SOCKETS */
+
+
+#ifdef UNIX_DOMAIN_SOCKETS
+/*
+  connect_to_unix_server -- establish connection with server process via a unix-
+                           domain socket. Returns socket descriptor for server
+                           if successful.
+*/
+static int connect_to_unix_server (void)
+{
+  int s;                       /* connected socket descriptor */
+  struct sockaddr_un server;   /* for unix connections */
+
+  if ((s = socket(AF_UNIX,SOCK_STREAM,0)) < 0) {
+    perror(progname);
+    fprintf(stderr,"%s: unable to create socket\n",progname);
+    exit(1);
+  }; /* if */
+  
+  server.sun_family = AF_UNIX;
+#ifdef HIDE_UNIX_SOCKET
+  sprintf(server.sun_path,"%s/gsrvdir%d/gsrv",tmpdir,(int)geteuid());
+#else  /* HIDE_UNIX_SOCKET */
+  sprintf(server.sun_path,"%s/gsrv%d",tmpdir,(int)geteuid());
+#endif /* HIDE_UNIX_SOCKET */
+  if (connect(s,(struct sockaddr *)&server,strlen(server.sun_path)+2) < 0) {
+    perror(progname);
+    fprintf(stderr,"%s: unable to connect to local\n",progname);
+    exit(1);
+  }; /* if */
+
+  return(s);
+
+} /* connect_to_unix_server */
+#endif /* UNIX_DOMAIN_SOCKETS */
+
+
+#ifdef INTERNET_DOMAIN_SOCKETS
+/*
+  internet_addr -- return the internet addr of the hostname or
+                   internet address passed. Return -1 on error.
+*/
+int internet_addr(host)
+     char *host;
+{
+  struct hostent *hp;          /* pointer to host info for remote host */
+  IN_ADDR numeric_addr;                /* host address */
+
+  numeric_addr = inet_addr(host);
+  if (!NUMERIC_ADDR_ERROR)
+    return numeric_addr;
+  else if ((hp = gethostbyname(host)) != NULL)
+    return ((struct in_addr *)(hp->h_addr))->s_addr;
+  else
+    return -1;
+
+} /* internet_addr */
+
+#ifdef AUTH_MAGIC_COOKIE
+# include <X11/X.h>
+# include <X11/Xauth.h>
+
+static Xauth *server_xauth = NULL;
+#endif
+
+/*
+  connect_to_internet_server -- establish connection with server process via 
+                               an internet domain socket. Returns socket
+                               descriptor for server if successful.
+*/
+static int connect_to_internet_server (char *serverhost, u_short port)
+{
+  int s;                               /* connected socket descriptor */
+  struct servent *sp;                  /* pointer to service information */
+  struct sockaddr_in peeraddr_in;      /* for peer socket address */
+  char buf[512];                        /* temporary buffer */
+
+  /* clear out address structures */
+  memset((char *)&peeraddr_in,0,sizeof(struct sockaddr_in));
+  
+  /* Set up the peer address to which we will connect. */
+  peeraddr_in.sin_family = AF_INET;
+
+  /* look up the server host's internet address */
+  if ((peeraddr_in.sin_addr.s_addr = internet_addr(serverhost)) == -1) {
+    fprintf(stderr,"%s: unable to find %s in /etc/hosts or from YP\n",
+           progname,serverhost);
+    exit(1);
+  }; /* if */
+  
+  if (port == 0) {
+    if ((sp = getservbyname ("gnuserv","tcp")) == NULL)
+      peeraddr_in.sin_port = htons(DEFAULT_PORT+getuid());
+    else
+      peeraddr_in.sin_port = sp->s_port;
+  } /* if */
+  else
+    peeraddr_in.sin_port = htons(port);
+  
+  /* Create the socket. */
+  if ((s = socket (AF_INET,SOCK_STREAM, 0))== -1) {
+    perror(progname);
+    fprintf(stderr,"%s: unable to create socket\n",progname);
+    exit(1);
+  }; /* if */
+  
+  /* Try to connect to the remote server at the address
+   * which was just built into peeraddr.
+   */
+  if (connect(s, (struct sockaddr *)&peeraddr_in,
+             sizeof(struct sockaddr_in)) == -1) {
+    perror(progname);
+    fprintf(stderr, "%s: unable to connect to remote\n",progname);
+    exit(1);
+  }; /* if */
+
+#ifdef AUTH_MAGIC_COOKIE
+
+  /* send credentials using MIT-MAGIC-COOKIE-1 protocol */
+  
+  server_xauth = 
+    XauGetAuthByAddr(FamilyInternet, 
+                    sizeof(peeraddr_in.sin_addr.s_addr), 
+                    (char *) &peeraddr_in.sin_addr.s_addr,
+                    strlen(MCOOKIE_SCREEN), MCOOKIE_SCREEN,
+                    strlen(MCOOKIE_X_NAME), MCOOKIE_X_NAME);
+
+  if (server_xauth && server_xauth->data) {
+    sprintf(buf, "%s\n%d\n", MCOOKIE_NAME, server_xauth->data_length);
+    write (s, buf, strlen(buf));
+    write (s, server_xauth->data, server_xauth->data_length);
+
+    return (s);
+  }
+
+#endif /* AUTH_MAGIC_COOKIE */
+
+  sprintf (buf, "%s\n", DEFAUTH_NAME);
+  write (s, buf, strlen(buf));
+
+  return(s);
+
+} /* connect_to_internet_server */
+#endif /* INTERNET_DOMAIN_SOCKETS */
+
+
+#if defined(INTERNET_DOMAIN_SOCKETS) || defined(UNIX_DOMAIN_SOCKETS)
+/*
+  disconnect_from_server -- inform the server that sending has finished, and wait for
+                            its reply.
+*/
+void disconnect_from_server(s,echo)
+     int s;
+     int echo;
+{
+#if 0
+  char buffer[REPLYSIZ+1];
+#else
+  char buffer[GSERV_BUFSZ+1];
+#endif
+  int add_newline = 1;
+  int length;
+
+  send_string(s,EOT_STR);              /* make sure server gets string */
+
+#if !defined (linux)  && !defined (_SCO_DS) 
+  /*
+   * shutdown is completely hozed under linux. If s is a unix domain socket,
+   * you'll get EOPNOTSUPP back from it. If s is an internet socket, you get
+   * a broken pipe when you try to read a bit later. The latter
+   * problem is fixed for linux versions >= 1.1.46, but the problem
+   * with unix sockets persists. Sigh.
+   */
+
+  if (shutdown(s,1) == -1) {
+     perror(progname);
+     fprintf(stderr, "%s: unable to shutdown socket\n",progname);
+     exit(1);
+  }; /* if */
+#endif
+
+#if 0
+  while((length = recv(s,buffer,REPLYSIZ,0)) > 0) {
+    buffer[length] = '\0';
+    if (echo) fputs(buffer,stdout);
+    add_newline = (buffer[length-1] != '\n');
+  }; /* while */
+#else
+  while ((length = read(s,buffer,GSERV_BUFSZ)) > 0 ||
+      (length == -1 && errno == EINTR)) {
+    if (length) {
+      buffer[length] = '\0';
+      if (echo) {
+       fputs(buffer,stdout);
+       add_newline = (buffer[length-1] != '\n');
+      }; /* if */
+    }; /* if */
+  }; /* while */
+#endif
+  
+  if (echo && add_newline) putchar('\n');
+
+  if(length < 0) {
+    perror(progname);
+    fprintf(stderr,"%s: unable to read the reply from the server\n",progname);
+    exit(1);
+  }; /* if */
+
+} /* disconnect_from_server */  
+#endif /* INTERNET_DOMAIN_SOCKETS || UNIX_DOMAIN_SOCKETS */
diff --git a/lib-src/gzip-el.sh b/lib-src/gzip-el.sh
new file mode 100755 (executable)
index 0000000..9d1563a
--- /dev/null
@@ -0,0 +1,37 @@
+#! /bin/sh
+### gzip-el.sh --- compress superfluous installed source lisp
+
+# Author:      Jeff Miller <jmiller@smart.net>
+# Author:      Hrvoje Niksic <hniksic@srce.hr>
+# Maintainer:  Steve Baur <steve@altair.xemacs.org>
+# Created:     13 Feb 1997
+# Version:     1.0
+# Keywords:    internal
+
+# 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; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+#
+#
+echo Compressing .el files in "$1"...
+
+find "$1" -type f -name "*.el" -print |
+       while read file; do
+               [ -s "${file}c" ] && echo "$file" && gzip -f9 "$file"
+       done
+
+echo Compressing .el files in "$1"...done.
diff --git a/lib-src/hexl.c b/lib-src/hexl.c
new file mode 100644 (file)
index 0000000..58855a0
--- /dev/null
@@ -0,0 +1,252 @@
+/* Synched up with: FSF 19.28. */
+
+#include <../src/config.h>
+
+#include <stdio.h>
+#include <ctype.h>
+#ifdef MSDOS
+#include <fcntl.h>
+#endif
+
+#if __STDC__ || defined(STDC_HEADERS)
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#endif
+
+#define DEFAULT_GROUPING       0x01
+#define DEFAULT_BASE           16
+
+#undef TRUE
+#undef FALSE
+#define TRUE  (1)
+#define FALSE (0)
+
+int base = DEFAULT_BASE, un_flag = FALSE, iso_flag = FALSE, endian = 1;
+int group_by = DEFAULT_GROUPING;
+char *progname;
+
+void usage (void);
+
+int
+main(argc, argv)
+     int argc;
+     char *argv[];
+{
+  register long address;
+  char string[18];
+  FILE *fp;
+  
+  progname = *argv++; --argc;
+  
+  /*
+  ** -hex              hex dump
+  ** -oct              Octal dump
+  ** -group-by-8-bits
+  ** -group-by-16-bits
+  ** -group-by-32-bits
+  ** -group-by-64-bits
+  ** -iso              iso character set.
+  ** -big-endian       Big Endian
+  ** -little-endian    Little Endian
+  ** -un || -de        from hexl format to binary.
+  ** --                End switch list.
+  ** <filename>        dump filename
+  ** -         (as filename == stdin)
+  */
+    
+  while (*argv && *argv[0] == '-' && (*argv)[1])
+    {
+      /* A switch! */
+      if (!strcmp (*argv, "--"))
+       {
+         --argc; argv++;
+         break;
+       }
+      else if (!strcmp (*argv, "-un") || !strcmp (*argv, "-de"))
+       {
+         un_flag = TRUE;
+         --argc; argv++;
+       }
+      else if (!strcmp (*argv, "-hex"))
+       {
+         base = 16;
+         --argc; argv++;
+       }
+      else if (!strcmp (*argv, "-iso"))
+       {
+         iso_flag = TRUE;
+         --argc; argv++;
+       }
+      else if (!strcmp (*argv, "-oct"))
+       {
+         base = 8;
+         --argc; argv++;
+       }
+      else if (!strcmp (*argv, "-big-endian"))
+       {
+         endian = 1;
+         --argc; argv++;
+       }
+      else if (!strcmp (*argv, "-little-endian"))
+       {
+         endian = 0;
+         --argc; argv++;
+       }
+      else if (!strcmp (*argv, "-group-by-8-bits"))
+       {
+         group_by = 0x00;
+         --argc; argv++;
+       }
+      else if (!strcmp (*argv, "-group-by-16-bits"))
+       {
+         group_by = 0x01;
+         --argc; argv++;
+       }
+      else if (!strcmp (*argv, "-group-by-32-bits"))
+       {
+         group_by = 0x03;
+         --argc; argv++;
+       }
+      else if (!strcmp (*argv, "-group-by-64-bits"))
+       {
+         group_by = 0x07;
+         endian = 0;
+         --argc; argv++;
+       }
+      else
+       {
+         (void) fprintf (stderr, "%s: invalid switch: \"%s\".\n", progname,
+                  *argv);
+         usage ();
+       }
+    }
+
+  do
+    {
+      if (*argv == NULL)
+       fp = stdin;
+      else
+       {
+         char *filename = *argv++;
+
+         if (!strcmp (filename, "-"))
+           fp = stdin;
+         else if ((fp = fopen (filename, "r")) == NULL)
+           {
+             perror (filename);
+             continue;
+           }
+       }
+
+      if (un_flag)
+       {
+         char buf[18];
+
+#ifdef MSDOS
+         (stdout)->_flag &= ~_IOTEXT; /* print binary */
+         _setmode (fileno (stdout), O_BINARY);
+#endif
+         for (;;)
+           {
+             register int i, c, d;
+
+#define hexchar(x) (isdigit (x) ? x - '0' : x - 'a' + 10)
+
+             fread (buf, 1, 10, fp); /* skip 10 bytes */
+
+             for (i=0; i < 16; ++i)
+               {
+                 if ((c = getc (fp)) == ' ' || c == EOF)
+                   break;
+
+                 d = getc (fp);
+                 c = hexchar (c) * 0x10 + hexchar (d);
+                 putchar (c);
+
+                 if ((i&group_by) == group_by)
+                   getc (fp);
+               }
+
+             if (c == ' ')
+               {
+                 while ((c = getc (fp)) != '\n' && c != EOF)
+                   ;
+
+                 if (c == EOF)
+                   break;
+               }
+             else
+               {
+                 if (i < 16)
+                   break;
+
+                 fread (buf, 1, 18, fp); /* skip 18 bytes */
+               }
+           }
+       }
+      else
+       {
+#ifdef MSDOS
+         (fp)->_flag &= ~_IOTEXT; /* read binary */
+         _setmode (fileno (fp), O_BINARY);
+#endif
+         address = 0;
+         string[0] = ' ';
+         string[17] = '\0';
+         for (;;)
+           {
+             register int i, c;
+
+             for (i=0; i < 16; ++i)
+               {
+                 if ((c = getc (fp)) == EOF)
+                   {
+                     if (!i)
+                       break;
+
+                     fputs ("  ", stdout);
+                     string[i+1] = '\0';
+                   }
+                 else
+                   {
+                     if (!i)
+                       (void) printf ("%08lx: ", address);
+
+                     if (iso_flag)
+                       string[i+1] =
+                         (c < 0x20 || (c >= 0x7F && c < 0xa0)) ? '.' :c;
+                     else
+                       string[i+1] = (c < 0x20 || c >= 0x7F) ? '.' : c;
+
+                     (void) printf ("%02x", c);
+                   }
+
+                 if ((i&group_by) == group_by)
+                   putchar (' ');
+               }
+
+             if (i)
+               puts (string);
+
+             if (c == EOF)
+               break;
+
+             address += 0x10;
+
+           }
+       }
+
+      if (fp != stdin)
+       (void) fclose (fp);
+
+    } while (*argv != NULL);
+  return 0;
+}
+
+void
+usage ()
+{
+  (void) fprintf (stderr, "usage: %s [-de] [-iso]\n", progname);
+  exit (1);
+}
diff --git a/lib-src/installexe.sh b/lib-src/installexe.sh
new file mode 100644 (file)
index 0000000..2c1849a
--- /dev/null
@@ -0,0 +1,21 @@
+#!sh
+
+install_prog=$1
+shift
+
+tstr=""
+while [ $# -gt 0 ]
+do
+  if [ -f $1.exe ]
+  then
+    tstr="$tstr$1.exe $2.exe"
+    shift 2
+  else
+    tstr="$tstr$1 "
+  fi
+  shift
+done
+echo "$install_prog $tstr"
+eval "$install_prog $tstr"
+exit
+
diff --git a/lib-src/leditcfns.c b/lib-src/leditcfns.c
new file mode 100644 (file)
index 0000000..adb0caf
--- /dev/null
@@ -0,0 +1,20 @@
+/* Synched up with: FSF 19.28. */
+
+#include <sgtty.h>
+#include <signal.h>
+#define STRLEN 100
+static char str[STRLEN+1] = "%?emacs"; /* extra char for the null */
+
+switch_to_proc(){
+    char *ptr = str;
+    while (*ptr) ioctl(0, TIOCSTI, ptr++);
+    ioctl(0, TIOCSTI, "\n");
+    kill(getpid(), SIGTSTP);
+    }
+
+set_proc_str(ptr) char *ptr; {
+    if (strlen(ptr) <= STRLEN)
+       strcpy(str, ptr);
+    else
+       printf("string too long for set-proc-str: %s\n", ptr);
+    }
diff --git a/lib-src/make-docfile.c b/lib-src/make-docfile.c
new file mode 100644 (file)
index 0000000..2db8dc8
--- /dev/null
@@ -0,0 +1,1063 @@
+/* Generate doc-string file for XEmacs from source files.
+   Copyright (C) 1985, 1986, 1992, 1993, 1994 Free Software Foundation, Inc.
+   Copyright (C) 1995 Board of Trustees, University of Illinois
+
+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; see the file COPYING.  If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+/* Synched up with: FSF 19.30. */
+
+/* The arguments given to this program are all the C and Lisp source files
+ of XEmacs.  .elc and .el and .c files are allowed.
+ A .o file can also be specified; the .c file it was made from is used.
+ This helps the makefile pass the correct list of files.
+
+ The results, which go to standard output or to a file
+ specified with -a or -o (-a to append, -o to start from nothing),
+ are entries containing function or variable names and their documentation.
+ Each entry starts with a ^_ character.
+ Then comes F for a function or V for a variable.
+ Then comes the function or variable name, terminated with a newline.
+ Then comes the documentation for that function or variable.
+
+ Added 19.15/20.1:  `-i site-packages' allow installer to dump extra packages
+ without modifying Makefiles, etc.
+ */
+
+#define NO_SHORTNAMES   /* Tell config not to load remap.h */
+#include <../src/config.h>
+
+#include <stdio.h>
+#include <errno.h>
+#if __STDC__ || defined(STDC_HEADERS)
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <ctype.h>
+#endif
+
+#include <sys/param.h>
+
+#if defined(MSDOS) || defined(__CYGWIN32__)
+#include <fcntl.h>
+#endif /* MSDOS */
+#ifdef WINDOWSNT
+#include <direct.h>
+#include <fcntl.h>
+#include <io.h>
+#include <stdlib.h>
+#endif /* WINDOWSNT */
+
+#if defined(DOS_NT) || defined(__CYGWIN32__)
+#define READ_TEXT "rt"
+#define READ_BINARY "rb"
+#define WRITE_BINARY "wb"
+#define APPEND_BINARY "ab"
+#else  /* not DOS_NT */
+#define READ_TEXT "r"
+#define READ_BINARY "r"
+#define WRITE_BINARY "w"
+#define APPEND_BINARY "a"
+#endif /* not DOS_NT */
+
+#ifdef MSDOS
+/* s/msdos.h defines this as sys_chdir, but we're not linking with the
+   file where that function is defined.  */
+#undef chdir
+#endif
+
+/* Stdio stream for output to the DOC file.  */
+static FILE *outfile;
+
+enum
+{
+  el_file,
+  elc_file,
+  c_file
+} Current_file_type;
+
+static int scan_file (CONST char *filename);
+static int read_c_string (FILE *, int, int);
+static void write_c_args (FILE *out, CONST char *func, char *buf, int minargs,
+                         int maxargs);
+static int scan_c_file (CONST char *filename, CONST char *mode);
+static void skip_white (FILE *);
+static void read_lisp_symbol (FILE *, char *);
+static int scan_lisp_file (CONST char *filename, CONST char *mode);
+
+#define C_IDENTIFIER_CHAR_P(c) \
+ (('A' <= c && c <= 'Z') || \
+  ('a' <= c && c <= 'z') || \
+  ('0' <= c && c <= '9') || \
+  (c == '_'))
+
+/* Name this program was invoked with.  */
+char *progname;
+
+/* Print error message.  `s1' is printf control string, `s2' is arg for it. */
+
+static void
+error (CONST char *s1, CONST char *s2)
+{
+  fprintf (stderr, "%s: ", progname);
+  fprintf (stderr, s1, s2);
+  fprintf (stderr, "\n");
+}
+
+/* Print error message and exit.  */
+
+static void
+fatal (CONST char *s1, CONST char *s2)
+{
+  error (s1, s2);
+  exit (1);
+}
+
+/* Like malloc but get fatal error if memory is exhausted.  */
+
+static long *
+xmalloc (unsigned int size)
+{
+  long *result = (long *) malloc (size);
+  if (result == NULL)
+    fatal ("virtual memory exhausted", 0);
+  return result;
+}
+
+static char *
+next_extra_elc(char *extra_elcs)
+{
+  static FILE *fp = NULL;
+  static char line_buf[BUFSIZ];
+  char *p = line_buf+1;
+
+  if (!fp) {
+    if (!extra_elcs) {
+      return NULL;
+    } else if (!(fp = fopen(extra_elcs, READ_BINARY))) {
+      /* It is not an error if this file doesn't exist. */
+      /*fatal("error opening site package file list", 0);*/
+      return NULL;
+    }
+    fgets(line_buf, BUFSIZ, fp);
+  }
+
+again:
+  if (!fgets(line_buf, BUFSIZ, fp)) {
+    fclose(fp);
+    fp = NULL;
+    return NULL;
+  }
+  line_buf[0] = '\0';
+  if (strlen(p) <= 2 || strlen(p) >= (BUFSIZ - 5)) {
+    /* reject too short or too long lines */
+    goto again;
+  }
+  p[strlen(p) - 2] = '\0';
+  strcat(p, ".elc");
+
+  return p;
+}
+
+\f
+int
+main (int argc, char **argv)
+{
+  int i;
+  int err_count = 0;
+  int first_infile;
+  char *extra_elcs = NULL;
+
+  progname = argv[0];
+
+  outfile = stdout;
+
+  /* Don't put CRs in the DOC file.  */
+#ifdef MSDOS
+  _fmode = O_BINARY;
+#if 0  /* Suspicion is that this causes hanging.
+         So instead we require people to use -o on MSDOS.  */
+  (stdout)->_flag &= ~_IOTEXT;
+  _setmode (fileno (stdout), O_BINARY);
+#endif
+  outfile = 0;
+#endif /* MSDOS */
+#ifdef WINDOWSNT
+  _fmode = O_BINARY;
+  _setmode (fileno (stdout), O_BINARY);
+#endif /* WINDOWSNT */
+
+  /* If first two args are -o FILE, output to FILE.  */
+  i = 1;
+  if (argc > i + 1 && !strcmp (argv[i], "-o"))
+    {
+      outfile = fopen (argv[i + 1], WRITE_BINARY);
+      i += 2;
+    }
+  if (argc > i + 1 && !strcmp (argv[i], "-a"))
+    {
+      outfile = fopen (argv[i + 1], APPEND_BINARY);
+      i += 2;
+    }
+  if (argc > i + 1 && !strcmp (argv[i], "-d"))
+    {
+      chdir (argv[i + 1]);
+      i += 2;
+    }
+
+  if (argc > (i + 1) && !strcmp(argv[i], "-i")) {
+    extra_elcs = argv[i + 1];
+    i += 2;
+  }
+
+  if (outfile == 0)
+    fatal ("No output file specified", "");
+
+  first_infile = i;
+  for (; i < argc; i++)
+    {
+      int j;
+      /* Don't process one file twice.  */
+      for (j = first_infile; j < i; j++)
+       if (! strcmp (argv[i], argv[j]))
+         break;
+      if (j == i)
+       /* err_count seems to be {mis,un}used */
+       err_count += scan_file (argv[i]);
+    }
+
+  if (extra_elcs) {
+    char *p;
+
+    while ((p = next_extra_elc(extra_elcs)) != NULL) {
+      err_count += scan_file(p);
+    }
+  }
+
+  putc ('\n', outfile);
+#ifndef VMS
+  exit (err_count > 0);
+#endif /* VMS */
+  return err_count > 0;
+}
+
+/* Read file FILENAME and output its doc strings to outfile.  */
+/* Return 1 if file is not found, 0 if it is found.  */
+
+static int
+scan_file (CONST char *filename)
+{
+  int len = strlen (filename);
+  if (len > 4 && !strcmp (filename + len - 4, ".elc"))
+    {
+      Current_file_type = elc_file;
+      return scan_lisp_file (filename, READ_BINARY);
+    }
+  else if (len > 3 && !strcmp (filename + len - 3, ".el"))
+    {
+      Current_file_type = el_file;
+      return scan_lisp_file (filename, READ_TEXT);
+    }
+  else
+    {
+      Current_file_type = c_file;
+      return scan_c_file (filename, READ_TEXT);
+    }
+}
+\f
+char buf[128];
+
+/* Skip a C string from INFILE,
+ and return the character that follows the closing ".
+ If printflag is positive, output string contents to outfile.
+ If it is negative, store contents in buf.
+ Convert escape sequences \n and \t to newline and tab;
+ discard \ followed by newline.  */
+
+static int
+read_c_string (FILE *infile, int printflag, int c_docstring)
+{
+  register int c;
+  char *p = buf;
+  int start = -1;
+
+  c = getc (infile);
+  while (c != EOF)
+    {
+      while ((c_docstring || c != '"') && c != EOF)
+       {
+         if (start)
+           {
+             if (c == '*')
+               {
+                 int cc = getc (infile);
+                 if (cc == '/')
+                   break;
+                 else
+                   ungetc (cc, infile);
+               }
+
+             if (start != -1)
+               {
+                 if (printflag > 0)
+                   putc ('\n', outfile);
+                 else if (printflag < 0)
+                   *p++ = '\n';
+               }
+           }
+
+         if (c == '\\')
+           {
+             c = getc (infile);
+             if (c == '\n')
+               {
+                 c = getc (infile);
+                 start = 1;
+                 continue;
+               }
+             if (!c_docstring && c == 'n')
+               c = '\n';
+             if (c == 't')
+               c = '\t';
+           }
+         if (c == '\n')
+           start = 1;
+         else
+           {
+             start = 0;
+             if (printflag > 0)
+               putc (c, outfile);
+             else if (printflag < 0)
+               *p++ = c;
+           }
+         c = getc (infile);
+       }
+      /* look for continuation of string */
+      if (Current_file_type == c_file)
+       {
+         while (isspace (c = getc (infile)))
+           ;
+         if (c != '"')
+           break;
+       }
+      else
+       {
+         c = getc (infile);
+         if (c != '"')
+           break;
+         /* If we had a "", concatenate the two strings.  */
+       }
+      c = getc (infile);
+    }
+
+  if (printflag < 0)
+    *p = 0;
+
+  return c;
+}
+\f
+/* Write to file OUT the argument names of function FUNC, whose text is in BUF.
+   MINARGS and MAXARGS are the minimum and maximum number of arguments.  */
+
+static void
+write_c_args (FILE *out, CONST char *func, char *buff, int minargs,
+             int maxargs)
+{
+  register char *p;
+  int in_ident = 0;
+  int just_spaced = 0;
+#if 0
+  int need_space = 1;
+
+  fprintf (out, "(%s", func);
+#else
+  /* XEmacs - "arguments:" is for parsing the docstring.  FSF's help system
+     doesn't parse the docstring for arguments like we do, so we're also
+     going to omit the function name to preserve compatibility with elisp
+     that parses the docstring.  Finally, not prefixing the arglist with
+     anything is asking for trouble because it's not uncommon to have an
+     unescaped parenthesis at the beginning of a line. --Stig */
+  fprintf (out, "arguments: (");
+#endif
+
+  if (*buff == '(')
+    ++buff;
+
+  for (p = buff; *p; p++)
+    {
+      char c = *p;
+      int ident_start = 0;
+
+      /* Add support for ANSI prototypes. Hop over
+        "Lisp_Object" string (the only C type allowed in DEFUNs) */
+      static char lo[] = "Lisp_Object";
+      if ((C_IDENTIFIER_CHAR_P (c) != in_ident) && !in_ident &&
+         (strncmp (p, lo, sizeof (lo) - 1) == 0) &&
+         isspace(*(p + sizeof (lo) - 1)))
+       {
+         p += (sizeof (lo) - 1);
+         while (isspace (*p))
+           p++;
+         c = *p;
+       }
+
+      /* Notice when we start printing a new identifier.  */
+      if (C_IDENTIFIER_CHAR_P (c) != in_ident)
+       {
+         if (!in_ident)
+           {
+             in_ident = 1;
+             ident_start = 1;
+#if 0
+             /* XEmacs - This goes along with the change above. */
+             if (need_space)
+               putc (' ', out);
+#endif
+             if (minargs == 0 && maxargs > 0)
+               fprintf (out, "&optional ");
+             just_spaced = 1;
+
+             minargs--;
+             maxargs--;
+           }
+         else
+           in_ident = 0;
+       }
+
+      /* Print the C argument list as it would appear in lisp:
+        print underscores as hyphens, and print commas as spaces.
+        Collapse adjacent spaces into one. */
+      if (c == '_') c = '-';
+      if (c == ',') c = ' ';
+
+      /* If the C argument name ends with `_', change it to ' ',
+        to allow use of C reserved words or global symbols as Lisp args. */
+      if (c == '-' && ! C_IDENTIFIER_CHAR_P (p[1]))
+       {
+         in_ident = 0;
+         just_spaced = 0;
+       }
+      else if (c != ' ' || ! just_spaced)
+       {
+         if (c >= 'a' && c <= 'z')
+           /* Upcase the letter.  */
+           c += 'A' - 'a';
+         putc (c, out);
+       }
+
+      just_spaced = (c == ' ');
+#if 0
+      need_space = 0;
+#endif
+    }
+  putc ('\n', out); /* XEmacs addition */
+}
+\f
+/* Read through a c file.  If a .o file is named,
+   the corresponding .c file is read instead.
+   Looks for DEFUN constructs such as are defined in ../src/lisp.h.
+   Accepts any word starting DEF... so it finds DEFSIMPLE and DEFPRED.  */
+
+static int
+scan_c_file (CONST char *filename, CONST char *mode)
+{
+  FILE *infile;
+  register int c;
+  register int commas;
+  register int defunflag;
+  register int defvarperbufferflag = 0;
+  register int defvarflag;
+  int minargs, maxargs;
+  int l = strlen (filename);
+  char f[MAXPATHLEN];
+
+  if (l > sizeof (f))
+  {
+#ifdef ENAMETOOLONG
+    errno = ENAMETOOLONG;
+#else
+    errno = EINVAL;
+#endif
+    return (0);
+  }
+
+  strcpy (f, filename);
+  if (f[l - 1] == 'o')
+    f[l - 1] = 'c';
+  infile = fopen (f, mode);
+
+  /* No error if non-ex input file */
+  if (infile == NULL)
+    {
+      perror (f);
+      return 0;
+    }
+
+  c = '\n';
+  while (!feof (infile))
+    {
+      if (c != '\n')
+       {
+         c = getc (infile);
+         continue;
+       }
+      c = getc (infile);
+      if (c == ' ')
+       {
+         while (c == ' ')
+           c = getc (infile);
+         if (c != 'D')
+           continue;
+         c = getc (infile);
+         if (c != 'E')
+           continue;
+         c = getc (infile);
+         if (c != 'F')
+           continue;
+         c = getc (infile);
+         if (c != 'V')
+           continue;
+         c = getc (infile);
+         if (c != 'A')
+           continue;
+         c = getc (infile);
+         if (c != 'R')
+           continue;
+         c = getc (infile);
+         if (c != '_')
+           continue;
+
+         defvarflag = 1;
+         defunflag = 0;
+
+         c = getc (infile);
+         /* Note that this business doesn't apply under XEmacs.
+            DEFVAR_BUFFER_LOCAL in XEmacs behaves normally. */
+         defvarperbufferflag = (c == 'P');
+
+         c = getc (infile);
+       }
+      else if (c == 'D')
+       {
+         c = getc (infile);
+         if (c != 'E')
+           continue;
+         c = getc (infile);
+         if (c != 'F')
+           continue;
+         c = getc (infile);
+         defunflag = (c == 'U');
+         defvarflag = 0;
+         c = getc (infile);
+       }
+      else continue;
+
+      while (c != '(')
+       {
+         if (c < 0)
+           goto eof;
+         c = getc (infile);
+       }
+
+      c = getc (infile);
+      if (c != '"')
+       continue;
+      c = read_c_string (infile, -1, 0);
+
+      if (defunflag)
+       commas = 4;
+      else if (defvarperbufferflag)
+       commas = 2;
+      else if (defvarflag)
+       commas = 1;
+      else  /* For DEFSIMPLE and DEFPRED */
+       commas = 2;
+
+      while (commas)
+       {
+         if (c == ',')
+           {
+             commas--;
+             if (defunflag && (commas == 1 || commas == 2))
+               {
+                 do
+                   c = getc (infile);
+                 while (c == ' ' || c == '\n' || c == '\t')
+                   ;
+                 if (c < 0)
+                   goto eof;
+                 ungetc (c, infile);
+                 if (commas == 2) /* pick up minargs */
+                   fscanf (infile, "%d", &minargs);
+                 else /* pick up maxargs */
+                   if (c == 'M' || c == 'U') /* MANY || UNEVALLED */
+                     maxargs = -1;
+                   else
+                     fscanf (infile, "%d", &maxargs);
+               }
+           }
+         if (c < 0)
+           goto eof;
+         c = getc (infile);
+       }
+      while (c == ' ' || c == '\n' || c == '\t')
+       c = getc (infile);
+      if (c == '"')
+       c = read_c_string (infile, 0, 0);
+      if (defunflag | defvarflag)
+       {
+         while (c != '/')
+           c = getc (infile);
+         c = getc (infile);
+         while (c == '*')
+           c = getc (infile);
+       }
+      else
+       {
+         while (c != ',')
+           c = getc (infile);
+         c = getc (infile);
+       }
+      while (c == ' ' || c == '\n' || c == '\t')
+       c = getc (infile);
+      if (defunflag | defvarflag)
+       ungetc (c, infile);
+
+      if (defunflag || defvarflag || c == '"')
+       {
+         putc (037, outfile);
+         putc (defvarflag ? 'V' : 'F', outfile);
+         fprintf (outfile, "%s\n", buf);
+         c = read_c_string (infile, 1, (defunflag || defvarflag));
+
+         /* If this is a defun, find the arguments and print them.  If
+            this function takes MANY or UNEVALLED args, then the C source
+            won't give the names of the arguments, so we shouldn't bother
+            trying to find them.  */
+         if (defunflag && maxargs != -1)
+           {
+             char argbuf[1024], *p = argbuf;
+#if 0 /* For old DEFUN's only */
+             while (c != ')')
+               {
+                 if (c < 0)
+                   goto eof;
+                 c = getc (infile);
+               }
+#endif
+             /* Skip into arguments.  */
+             while (c != '(')
+               {
+                 if (c < 0)
+                   goto eof;
+                 c = getc (infile);
+               }
+             /* Copy arguments into ARGBUF.  */
+             *p++ = c;
+             do
+               *p++ = c = getc (infile);
+             while (c != ')');
+             *p = '\0';
+             /* Output them.  */
+             fprintf (outfile, "\n\n");
+             write_c_args (outfile, buf, argbuf, minargs, maxargs);
+           }
+       }
+    }
+ eof:
+  fclose (infile);
+  return 0;
+}
+\f
+/* Read a file of Lisp code, compiled or interpreted.
+ Looks for
+  (defun NAME ARGS DOCSTRING ...)
+  (defmacro NAME ARGS DOCSTRING ...)
+  (autoload (quote NAME) FILE DOCSTRING ...)
+  (defvar NAME VALUE DOCSTRING)
+  (defconst NAME VALUE DOCSTRING)
+  (fset (quote NAME) (make-byte-code ... DOCSTRING ...))
+  (fset (quote NAME) #[... DOCSTRING ...])
+  (defalias (quote NAME) #[... DOCSTRING ...])
+ starting in column zero.
+ (quote NAME) may appear as 'NAME as well.
+
+ We also look for #@LENGTH CONTENTS^_ at the beginning of the line.
+ When we find that, we save it for the following defining-form,
+ and we use that instead of reading a doc string within that defining-form.
+
+ For defun, defmacro, and autoload, we know how to skip over the arglist.
+ For defvar, defconst, and fset we skip to the docstring with a kludgy
+ formatting convention: all docstrings must appear on the same line as the
+ initial open-paren (the one in column zero) and must contain a backslash
+ and a double-quote immediately after the initial double-quote.  No newlines
+ must appear between the beginning of the form and the first double-quote.
+ The only source file that must follow this convention is loaddefs.el; aside
+ from that, it is always the .elc file that we look at, and they are no
+ problem because byte-compiler output follows this convention.
+ The NAME and DOCSTRING are output.
+ NAME is preceded by `F' for a function or `V' for a variable.
+ An entry is output only if DOCSTRING has \ newline just after the opening "
+ */
+
+static void
+skip_white (FILE *infile)
+{
+  char c = ' ';
+  while (c == ' ' || c == '\t' || c == '\n')
+    c = getc (infile);
+  ungetc (c, infile);
+}
+
+static void
+read_lisp_symbol (FILE *infile, char *buffer)
+{
+  char c;
+  char *fillp = buffer;
+
+  skip_white (infile);
+  while (1)
+    {
+      c = getc (infile);
+      if (c == '\\')
+       /* FSF has *(++fillp), which is wrong. */
+       *fillp++ = getc (infile);
+      else if (c == ' ' || c == '\t' || c == '\n' || c == '(' || c == ')')
+       {
+         ungetc (c, infile);
+         *fillp = 0;
+         break;
+       }
+      else
+       *fillp++ = c;
+    }
+
+  if (! buffer[0])
+    fprintf (stderr, "## expected a symbol, got '%c'\n", c);
+
+  skip_white (infile);
+}
+
+static int
+scan_lisp_file (CONST char *filename, CONST char *mode)
+{
+  FILE *infile;
+  register int c;
+  char *saved_string = 0;
+
+  infile = fopen (filename, mode);
+  if (infile == NULL)
+    {
+      perror (filename);
+      return 0;                                /* No error */
+    }
+
+  c = '\n';
+  while (!feof (infile))
+    {
+      char buffer[BUFSIZ];
+      char type;
+
+      if (c != '\n')
+       {
+         c = getc (infile);
+         continue;
+       }
+      c = getc (infile);
+      /* Detect a dynamic doc string and save it for the next expression.  */
+      if (c == '#')
+       {
+         c = getc (infile);
+         if (c == '@')
+           {
+             int length = 0;
+             int i;
+
+             /* Read the length.  */
+             while ((c = getc (infile),
+                     c >= '0' && c <= '9'))
+               {
+                 length *= 10;
+                 length += c - '0';
+               }
+
+             /* The next character is a space that is counted in the length
+                but not part of the doc string.
+                We already read it, so just ignore it.  */
+             length--;
+
+             /* Read in the contents.  */
+             if (saved_string != 0)
+               free (saved_string);
+             saved_string = (char *) xmalloc (length);
+             for (i = 0; i < length; i++)
+               saved_string[i] = getc (infile);
+             /* The last character is a ^_.
+                That is needed in the .elc file
+                but it is redundant in DOC.  So get rid of it here.  */
+             saved_string[length - 1] = 0;
+             /* Skip the newline.  */
+             c = getc (infile);
+             while (c != '\n')
+               c = getc (infile);
+           }
+         continue;
+       }
+
+      if (c != '(')
+       continue;
+
+      read_lisp_symbol (infile, buffer);
+
+      if (! strcmp (buffer, "defun") ||
+         ! strcmp (buffer, "defmacro"))
+       {
+         type = 'F';
+         read_lisp_symbol (infile, buffer);
+
+         /* Skip the arguments: either "nil" or a list in parens */
+
+         c = getc (infile);
+         if (c == 'n') /* nil */
+           {
+             if ((c = getc (infile)) != 'i' ||
+                 (c = getc (infile)) != 'l')
+               {
+                 fprintf (stderr, "## unparsable arglist in %s (%s)\n",
+                          buffer, filename);
+                 continue;
+               }
+           }
+         else if (c != '(')
+           {
+             fprintf (stderr, "## unparsable arglist in %s (%s)\n",
+                      buffer, filename);
+             continue;
+           }
+         else
+           while (c != ')')
+             c = getc (infile);
+         skip_white (infile);
+
+         /* If the next three characters aren't `dquote bslash newline'
+            then we're not reading a docstring.
+          */
+         if ((c = getc (infile)) != '"' ||
+             (c = getc (infile)) != '\\' ||
+             (c = getc (infile)) != '\n')
+           {
+#ifdef DEBUG
+             fprintf (stderr, "## non-docstring in %s (%s)\n",
+                      buffer, filename);
+#endif
+             continue;
+           }
+       }
+
+      else if (! strcmp (buffer, "defvar") ||
+              ! strcmp (buffer, "defconst"))
+       {
+         char c1 = 0, c2 = 0;
+         type = 'V';
+         read_lisp_symbol (infile, buffer);
+
+         if (saved_string == 0)
+           {
+
+             /* Skip until the first newline; remember the two previous chars. */
+             while (c != '\n' && c >= 0)
+               {
+                 /* ### Kludge -- Ignore any ESC x x ISO2022 sequences */
+                 if (c == 27)
+                   {
+                     getc (infile);
+                     getc (infile);
+                     goto nextchar;
+                   }
+
+                 c2 = c1;
+                 c1 = c;
+               nextchar:
+                 c = getc (infile);
+               }
+
+             /* If two previous characters were " and \,
+                this is a doc string.  Otherwise, there is none.  */
+             if (c2 != '"' || c1 != '\\')
+               {
+#ifdef DEBUG
+                 fprintf (stderr, "## non-docstring in %s (%s)\n",
+                          buffer, filename);
+#endif
+                 continue;
+               }
+           }
+       }
+
+      else if (! strcmp (buffer, "fset") || ! strcmp (buffer, "defalias"))
+       {
+         char c1 = 0, c2 = 0;
+         type = 'F';
+
+         c = getc (infile);
+         if (c == '\'')
+           read_lisp_symbol (infile, buffer);
+         else
+           {
+             if (c != '(')
+               {
+                 fprintf (stderr, "## unparsable name in fset in %s\n",
+                          filename);
+                 continue;
+               }
+             read_lisp_symbol (infile, buffer);
+             if (strcmp (buffer, "quote"))
+               {
+                 fprintf (stderr, "## unparsable name in fset in %s\n",
+                          filename);
+                 continue;
+               }
+             read_lisp_symbol (infile, buffer);
+             c = getc (infile);
+             if (c != ')')
+               {
+                 fprintf (stderr,
+                          "## unparsable quoted name in fset in %s\n",
+                          filename);
+                 continue;
+               }
+           }
+
+         if (saved_string == 0)
+           {
+             /* Skip until the first newline; remember the two previous chars. */
+             while (c != '\n' && c >= 0)
+               {
+                 c2 = c1;
+                 c1 = c;
+                 c = getc (infile);
+               }
+
+             /* If two previous characters were " and \,
+                this is a doc string.  Otherwise, there is none.  */
+             if (c2 != '"' || c1 != '\\')
+               {
+#ifdef DEBUG
+                 fprintf (stderr, "## non-docstring in %s (%s)\n",
+                          buffer, filename);
+#endif
+                 continue;
+               }
+           }
+       }
+
+      else if (! strcmp (buffer, "autoload"))
+       {
+         type = 'F';
+         c = getc (infile);
+         if (c == '\'')
+           read_lisp_symbol (infile, buffer);
+         else
+           {
+             if (c != '(')
+               {
+                 fprintf (stderr, "## unparsable name in autoload in %s\n",
+                          filename);
+                 continue;
+               }
+             read_lisp_symbol (infile, buffer);
+             if (strcmp (buffer, "quote"))
+               {
+                 fprintf (stderr, "## unparsable name in autoload in %s\n",
+                          filename);
+                 continue;
+               }
+             read_lisp_symbol (infile, buffer);
+             c = getc (infile);
+             if (c != ')')
+               {
+                 fprintf (stderr,
+                          "## unparsable quoted name in autoload in %s\n",
+                          filename);
+                 continue;
+               }
+           }
+         skip_white (infile);
+         if ((c = getc (infile)) != '\"')
+           {
+             fprintf (stderr, "## autoload of %s unparsable (%s)\n",
+                      buffer, filename);
+             continue;
+           }
+         read_c_string (infile, 0, 0);
+         skip_white (infile);
+
+         if (saved_string == 0)
+           {
+             /* If the next three characters aren't `dquote bslash newline'
+                then we're not reading a docstring.  */
+             if ((c = getc (infile)) != '"'  ||
+                 (c = getc (infile)) != '\\' ||
+                 (c = getc (infile)) != '\n')
+               {
+#ifdef DEBUG
+                 fprintf (stderr, "## non-docstring in %s (%s)\n",
+                          buffer, filename);
+#endif
+                 continue;
+               }
+           }
+       }
+
+#if 0 /* causes crash */
+      else if (! strcmp (buffer, "if") ||
+              ! strcmp (buffer, "byte-code"))
+       ;
+#endif
+
+      else
+       {
+#ifdef DEBUG
+         fprintf (stderr, "## unrecognised top-level form, %s (%s)\n",
+                  buffer, filename);
+#endif
+         continue;
+       }
+
+      /* At this point, we should either use the previous
+        dynamic doc string in saved_string
+        or gobble a doc string from the input file.
+
+        In the latter case, the opening quote (and leading
+        backslash-newline) have already been read.  */
+      putc ('\n', outfile); /* XEmacs addition */
+      putc (037, outfile);
+      putc (type, outfile);
+      fprintf (outfile, "%s\n", buffer);
+      if (saved_string)
+       {
+         fputs (saved_string, outfile);
+         /* Don't use one dynamic doc string twice.  */
+         free (saved_string);
+         saved_string = 0;
+       }
+      else
+       read_c_string (infile, 1, 0);
+    }
+  fclose (infile);
+  return 0;
+}
diff --git a/lib-src/make-msgfile.c b/lib-src/make-msgfile.c
new file mode 100644 (file)
index 0000000..118dd1f
--- /dev/null
@@ -0,0 +1,480 @@
+/* 
+   
+   
+   PROPOSAL FOR HOW THIS ALL OUGHT TO WORK
+   this isn't implemented yet, but this is the plan-in-progress
+
+   
+   In general, it's accepted that the best way to internationalize is for all
+   messages to be referred to by a symbolic name (or number) and come out of a
+   table or tables, which are easy to change.
+
+   However, with Emacs, we've got the task of internationalizing a huge body
+   of existing code, which already contains messages internally.
+
+   For the C code we've got two options:
+
+    - Use a Sun-like gettext() form, which takes an "english" string which
+      appears literally in the source, and uses that as a hash key to find
+      a translated string;
+    - Rip all of the strings out and put them in a table.
+
+   In this case, it's desirable to make as few changes as possible to the C
+   code, to make it easier to merge the code with the FSF version of emacs
+   which won't ever have these changes made to it.  So we should go with the
+   former option.
+
+   The way it has been done (between 19.8 and 19.9) was to use gettext(), but
+   *also* to make massive changes to the source code.  The goal now is to use
+   gettext() at run-time and yet not require a textual change to every line
+   in the C code which contains a string constant.  A possible way to do this
+   is described below.
+
+   (gettext() can be implemented in terms of catgets() for non-Sun systems, so
+   that in itself isn't a problem.)
+
+   For the Lisp code, we've got basically the same options: put everything in
+   a table, or translate things implicitly.
+
+   Another kink that lisp code introduces is that there are thousands of third-
+   party packages, so changing the source for all of those is simply not an
+   option.
+
+   Is it a goal that if some third party package displays a message which is
+   one we know how to translate, then we translate it?  I think this is a
+   worthy goal.  It remains to be seen how well it will work in practice.
+
+   So, we should endeavor to minimize the impact on the lisp code.  Certain
+   primitive lisp routines (the stuff in lisp/prim/, and especially in
+   cmdloop.el and minibuf.el) may need to be changed to know about translation,
+   but that's an ideologically clean thing to do because those are considered
+   a part of the emacs substrate.
+
+   However, if we find ourselves wanting to make changes to, say, RMAIL, then
+   something has gone wrong.  (Except to do things like remove assumptions
+   about the order of words within a sentence, or how pluralization works.)
+
+   There are two parts to the task of displaying translated strings to the 
+   user: the first is to extract the strings which need to be translated from
+   the sources; and the second is to make some call which will translate those
+   strings before they are presented to the user.
+   
+   The old way was to use the same form to do both, that is, GETTEXT() was both
+   the tag that we searched for to build a catalog, and was the form which did
+   the translation.  The new plan is to separate these two things more: the
+   tags that we search for to build the catalog will be stuff that was in there
+   already, and the translation will get done in some more centralized, lower
+   level place.
+
+   This program (make-msgfile.c) addresses the first part, extracting the 
+   strings.
+   
+   For the emacs C code, we need to recognise the following patterns:
+   
+     message ("string" ... )
+     error ("string")
+     report_file_error ("string" ... )
+     signal_simple_error ("string" ... )
+     signal_simple_error_2 ("string" ... )
+     
+     build_translated_string ("string")
+     #### add this and use it instead of build_string() in some places.
+     
+     yes_or_no_p ("string" ... )
+     #### add this instead of funcalling Qyes_or_no_p directly.
+
+     barf_or_query_if_file_exists      #### restructure this
+     check all callers of Fsignal      #### restructure these
+     signal_error (Qerror ... )                #### change all of these to error()
+     
+     And we also parse out the `interactive' prompts from DEFUN() forms.
+     
+     #### When we've got a string which is a candidate for translation, we
+     should ignore it if it contains only format directives, that is, if
+     there are no alphabetic characters in it that are not a part of a `%'
+     directive.  (Careful not to translate either "%s%s" or "%s: ".)
+
+   For the emacs Lisp code, we need to recognise the following patterns:
+   
+     (message "string" ... )
+     (error "string" ... )
+     (format "string" ... )
+     (read-from-minibuffer "string" ... )
+     (read-shell-command "string" ... )
+     (y-or-n-p "string" ... )
+     (yes-or-no-p "string" ... )
+     (read-file-name "string" ... )
+     (temp-minibuffer-message "string")
+     (query-replace-read-args "string" ... )
+     
+   I expect there will be a lot like the above; basically, any function which
+   is a commonly used wrapper around an eventual call to `message' or
+   `read-from-minibuffer' needs to be recognised by this program.
+
+
+     (dgettext "domain-name" "string")         #### do we still need this?
+     
+     things that should probably be restructured:
+       `princ' in cmdloop.el
+       `insert' in debug.el
+       face-interactive
+       help.el, syntax.el all messed up
+     
+
+   Menu descriptors: one way to extract the strings in menu labels would be
+   to teach this program about "^(defvar .*menu\n" forms; that's probably
+   kind of hard, though, so perhaps a better approach would be to make this
+   program recognise lines of the form
+
+     "string" ... ;###translate
+
+   where the magic token ";###translate" on a line means that the string 
+   constant on this line should go into the message catalog.  This is analagous
+   to the magic ";###autoload" comments, and to the magic comments used in the
+   EPSF structuring conventions.
+
+  -----
+  So this program manages to build up a catalog of strings to be translated.
+  To address the second part of the problem, of actually looking up the
+  translations, there are hooks in a small number of low level places in
+  emacs.
+
+  Assume the existence of a C function gettext(str) which returns the 
+  translation of `str' if there is one, otherwise returns `str'.
+
+  - message() takes a char* as its argument, and always filters it through
+    gettext() before displaying it.
+
+  - errors are printed by running the lisp function `display-error' which
+    doesn't call `message' directly (it princ's to streams), so it must be
+    carefully coded to translate its arguments.  This is only a few lines
+    of code.
+
+  - Fread_minibuffer_internal() is the lowest level interface to all minibuf
+    interactions, so it is responsible for translating the value that will go
+    into Vminibuf_prompt.
+
+  - Fpopup_menu filters the menu titles through gettext().
+
+    The above take care of 99% of all messages the user ever sees.
+
+  - The lisp function temp-minibuffer-message translates its arg.
+
+  - query-replace-read-args is funny; it does
+      (setq from (read-from-minibuffer (format "%s: " string) ... ))
+      (setq to (read-from-minibuffer (format "%s %s with: " string from) ... ))
+
+    What should we do about this?  We could hack query-replace-read-args to
+    translate its args, but might this be a more general problem?  I don't
+    think we ought to translate all calls to format.  We could just change
+    the calling sequence, since this is odd in that the first %s wants to be
+    translated but the second doesn't.
+
+
+  Solving the "translating too much" problem:
+  The concern has been raised that in this situation:
+   - "Help" is a string for which we know a translation;
+   - someone visits a file called Help, and someone does something 
+     contrived like (error buffer-file-name)
+  then we would display the translation of Help, which would not be correct.
+  We can solve this by adding a bit to Lisp_String objects which identifies
+  them as having been read as literal constants from a .el or .elc file (as
+  opposed to having been constructed at run time as it would in the above 
+  case.)  To solve this:
+
+    - Fmessage() takes a lisp string as its first argument.
+      If that string is a constant, that is, was read from a source file
+      as a literal, then it calls message() with it, which translates.
+      Otherwise, it calls message_no_translate(), which does not translate.
+
+    - Ferror() (actually, Fsignal() when condition is Qerror) works similarly.
+*/
+
+
+
+
+/* Scan specified C and Lisp files, extracting the following messages:
+
+     C files:
+       GETTEXT (...)
+       DEFER_GETTEXT (...)
+       DEFUN interactive prompts
+     Lisp files:
+       (gettext ...)
+       (dgettext "domain-name" ...)
+       (defer-gettext ...)
+       (interactive ...)
+
+  The arguments given to this program are all the C and Lisp source files
+  of GNU Emacs.  .el and .c files are allowed.  There is no support for .elc
+  files at this time, but they may be specified; the corresponding .el file
+  will be used.  Similarly, .o files can also be specified, and the corresponding
+  .c file will be used.  This helps the makefile pass the correct list of files.
+
+  The results, which go to standard output or to a file specified with -a or -o
+  (-a to append, -o to start from nothing), are quoted strings wrapped in
+  gettext(...).  The results can be passed to xgettext to produce a .po message
+  file.
+*/
+
+#include <stdio.h>
+#include <string.h>
+
+#define LINESIZE 256
+#define GET_LINE       fgets (line, LINESIZE, infile)
+#define CHECK_EOL(p)   if (*(p) == '\0')  (p) = GET_LINE
+#define SKIP_BLANKS(p) while ((*p) == ' ' || (*p) == '\t')  (p)++
+
+enum filetype { C_FILE, LISP_FILE, INVALID_FILE };
+/* some brain-dead headers define this ... */
+#undef FALSE
+#undef TRUE
+enum boolean { FALSE, TRUE };
+
+FILE *infile;
+FILE *outfile;
+char line[LINESIZE];
+
+
+void scan_file (char *filename);
+void process_C_file (void);
+void process_Lisp_file (void);
+char *copy_up_to_paren (register char *p);
+char *copy_quoted_string (register char *p);
+enum boolean no_interactive_prompt (register char *q);
+char *skip_blanks (register char *p);
+
+
+main (int argc, char *argv[])
+{
+  register int i;
+
+  outfile = stdout;
+
+  /* If first two args are -o FILE, output to FILE. */
+  i = 1;
+  if (argc > i + 1 && strcmp (argv[i], "-o") == 0) {
+    outfile = fopen (argv[++i], "w");
+    ++i;
+  }
+  /* ...Or if args are -a FILE, append to FILE. */
+  if (argc > i + 1 && strcmp (argv[i], "-a") == 0) {
+    outfile = fopen (argv[++i], "a");
+    ++i;
+  }
+  if (!outfile) {
+    fprintf (stderr, "Unable to open output file %s\n", argv[--i]);
+    return;
+  }
+
+  for (; i < argc; i++)
+    scan_file (argv[i]);
+
+  return 0;
+}
+
+
+void scan_file (char *filename)
+{
+  enum filetype type = INVALID_FILE;
+  register char *p = filename + strlen (filename);
+
+  if (strcmp (p - 4, ".elc") == 0) {
+    *--p = '\0';                               /* Use .el file instead */
+    type = LISP_FILE;
+  } else if (strcmp (p - 3, ".el") == 0)
+    type = LISP_FILE;
+  else if (strcmp (p - 2, ".o") == 0) {
+    *--p = 'c';                                        /* Use .c file instead */
+    type = C_FILE;
+  } else if (strcmp (p - 2, ".c") == 0)
+    type = C_FILE;
+
+  if (type == INVALID_FILE) {
+    fprintf (stderr, "File %s being ignored\n", filename);
+    return;
+  }
+  infile = fopen (filename, "r");
+  if (!infile) {
+    fprintf (stderr, "Unable to open input file %s\n", filename);
+    return;
+  }
+
+  fprintf (outfile, "/* %s */\n", filename);
+  if (type == C_FILE)
+    process_C_file ();
+  else
+    process_Lisp_file ();
+  fputc ('\n', outfile);
+  
+  fclose (infile);
+}
+
+
+void process_C_file (void)
+{
+  register char *p;
+  char *gettext, *defun;
+
+  while (p = GET_LINE) {
+    gettext = strstr (p, "GETTEXT");
+    defun = strstr (p, "DEFUN");
+    if (gettext || defun) {
+      if (gettext) {
+       p = gettext;
+       p += 7;                 /* Skip over "GETTEXT" */
+      }
+      else if (defun) {
+       p = defun;
+       p += 5;                 /* Skip over "DEFUN" */
+      }
+
+      p = skip_blanks (p);
+      if (*p++ != '(')
+       continue;
+
+      if (defun) {
+       register int i;
+
+       for (i = 0; i < 5; i++) /* Skip over commas to doc string */
+         while (*p++ != ',')
+           CHECK_EOL (p);
+       if (*p == '\n')
+         p = GET_LINE;
+      }
+
+      p = skip_blanks (p);
+      if (*p != '\"')          /* Make sure there is a quoted string */
+       continue;
+
+      if (defun && no_interactive_prompt (p))
+       continue;
+
+      fprintf (outfile, "gettext(");
+      if (gettext)
+       p = copy_up_to_paren (p);
+      else
+       p = copy_quoted_string (p);
+      fprintf (outfile, ")\n");
+    }
+  }
+}
+
+
+void process_Lisp_file (void)
+{
+  register char *p;
+  char *gettext, *interactive;
+  enum boolean dgettext = FALSE;
+
+  while (p = GET_LINE) {
+    gettext = strstr (p, "gettext");
+    interactive = strstr (p, "(interactive");
+    if (gettext || interactive) {
+      if (!interactive)
+       p = gettext;
+      else if (!gettext)
+       p = interactive;
+      else if (gettext < interactive) {
+       p = gettext;
+       interactive = NULL;
+      } else {
+       p = interactive;
+       gettext = NULL;
+      }
+
+      if (gettext) {
+       if (p > line && *(p-1) == 'd')
+         dgettext = TRUE;
+       p += 7;         /* Skip over "gettext" */
+      } else
+       p += 12;        /* Skip over "(interactive" */
+
+      p = skip_blanks (p);
+      if (*p != '\"')          /* Make sure there is a quoted string */
+       continue;
+
+      if (dgettext) {          /* Skip first quoted string (domain name) */
+       while (*++p != '"')
+         ;  /* null statement */
+       ++p;
+       p = skip_blanks (p);
+       if (*p != '\"')         /* Check for second quoted string (message) */
+         continue;
+      }
+
+      if (interactive && no_interactive_prompt (p))
+       continue;
+
+      fprintf (outfile, "gettext(");
+      p = copy_up_to_paren (p);
+      fprintf (outfile, ")\n");
+    }
+  }
+}
+
+
+/* Assuming p points to some character beyond an opening parenthesis, copy
+   everything to outfile up to but not including the closing parenthesis.
+*/
+char *copy_up_to_paren (register char *p)
+{
+  for (;;) {
+    SKIP_BLANKS (p);   /* We don't call skip_blanks() in order to */
+    CHECK_EOL (p);     /* preserve blanks at the beginning of the line */
+    if (*p == ')')
+      break;
+
+    if (*p == '\"')
+      p = copy_quoted_string (p);
+    else
+      fputc (*p++, outfile);
+  }
+  return p;
+}
+
+
+/* Assuming p points to a quote character, copy the quoted string to outfile.
+*/
+char *copy_quoted_string (register char *p)
+{
+  do {
+    if (*p == '\\')
+      fputc (*p++, outfile);
+    fputc (*p++, outfile);
+    CHECK_EOL (p);
+  } while (*p != '\"');
+
+  fputc (*p++, outfile);
+  return p;
+}
+
+
+/* Return TRUE if the interactive specification consists only
+   of code letters and no prompt.
+*/
+enum boolean no_interactive_prompt (register char *q)
+{
+  while (++q, *q == '*' || *q == '@')
+    ; /* null statement */
+  if (*q == '\"')
+    return TRUE;
+ skip_code_letter:
+  if (*++q == '\"')
+    return TRUE;
+  if (*q == '\\' && *++q == 'n') {
+    ++q;
+    goto skip_code_letter;
+  }
+  return FALSE;
+}
+
+
+char *skip_blanks (register char *p)
+{
+  while (*p == ' ' || *p == '\t' || *p == '\n') {
+    p++;
+    CHECK_EOL (p);
+  }
+  return p;
+}
diff --git a/lib-src/make-msgfile.lex b/lib-src/make-msgfile.lex
new file mode 100644 (file)
index 0000000..957a8b5
--- /dev/null
@@ -0,0 +1,681 @@
+%{
+
+/* This is a Lex file. */
+
+/* Localizable-message snarfing.
+   Copyright (C) 1994, 1995 Amdahl Corporation.
+
+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; see the file COPYING.  If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+/* Written by Ben Wing, November 1994.  Some code based on earlier
+   make-msgfile.c. */
+
+/* Note: there is still much work to be done on this.
+
+   1) Definition of Arg below won't handle a generalized argument
+      as might appear in a function call.  This is fine for DEFUN
+      and friends, because only simple arguments appear there; but
+      it might run into problems if Arg is used for other sorts
+      of functions.
+   2) snarf() should be modified so that it doesn't output null
+      strings and non-textual strings (see the comment at the top
+      of make-msgfile.c).
+   3) parsing of (insert) should snarf all of the arguments.
+   4) need to add set-keymap-prompt and deal with gettext of that.
+   5) parsing of arguments should snarf all strings anywhere within
+      the arguments, rather than just looking for a string as the
+      argument.  This allows if statements as arguments to get parsed.
+   6) begin_paren_counting() et al. should handle recursive entry.
+   7) handle set-window-buffer and other such functions that take
+      a buffer as the other-than-first argument.
+   8) there is a fair amount of work to be done on the C code.
+      Look through the code for #### comments associated with
+      '#ifdef I18N3' or with an I18N3 nearby.
+   9) Deal with `get-buffer-process' et al.
+   10) Many of the changes in the Lisp code marked
+       'rewritten for I18N3 snarfing' should be undone once (5) is
+       implemented.
+   11) Go through the Lisp code in prim and make sure that all
+       strings are gettexted as necessary.  This may reveal more
+       things to implement.
+   12) Do the equivalent of (8) for the Lisp code.
+   13) Deal with parsing of menu specifications.
+
+       --ben
+   
+*/
+
+/* Long comment from jwz:
+
+   (much of this comment is outdated, and a lot of it is actually
+   implemented)
+   
+   
+   PROPOSAL FOR HOW THIS ALL OUGHT TO WORK
+   this isn't implemented yet, but this is the plan-in-progress
+
+   
+   In general, it's accepted that the best way to internationalize is for all
+   messages to be referred to by a symbolic name (or number) and come out of a
+   table or tables, which are easy to change.
+
+   However, with Emacs, we've got the task of internationalizing a huge body
+   of existing code, which already contains messages internally.
+
+   For the C code we've got two options:
+
+    - Use a Sun-like gettext() form, which takes an "english" string which
+      appears literally in the source, and uses that as a hash key to find
+      a translated string;
+    - Rip all of the strings out and put them in a table.
+
+   In this case, it's desirable to make as few changes as possible to the C
+   code, to make it easier to merge the code with the FSF version of emacs
+   which won't ever have these changes made to it.  So we should go with the
+   former option.
+
+   The way it has been done (between 19.8 and 19.9) was to use gettext(), but
+   *also* to make massive changes to the source code.  The goal now is to use
+   gettext() at run-time and yet not require a textual change to every line
+   in the C code which contains a string constant.  A possible way to do this
+   is described below.
+
+   (gettext() can be implemented in terms of catgets() for non-Sun systems, so
+   that in itself isn't a problem.)
+
+   For the Lisp code, we've got basically the same options: put everything in
+   a table, or translate things implicitly.
+
+   Another kink that lisp code introduces is that there are thousands of third-
+   party packages, so changing the source for all of those is simply not an
+   option.
+
+   Is it a goal that if some third party package displays a message which is
+   one we know how to translate, then we translate it?  I think this is a
+   worthy goal.  It remains to be seen how well it will work in practice.
+
+   So, we should endeavor to minimize the impact on the lisp code.  Certain
+   primitive lisp routines (the stuff in lisp/prim/, and especially in
+   cmdloop.el and minibuf.el) may need to be changed to know about translation,
+   but that's an ideologically clean thing to do because those are considered
+   a part of the emacs substrate.
+
+   However, if we find ourselves wanting to make changes to, say, RMAIL, then
+   something has gone wrong.  (Except to do things like remove assumptions
+   about the order of words within a sentence, or how pluralization works.)
+
+   There are two parts to the task of displaying translated strings to the 
+   user: the first is to extract the strings which need to be translated from
+   the sources; and the second is to make some call which will translate those
+   strings before they are presented to the user.
+   
+   The old way was to use the same form to do both, that is, GETTEXT() was both
+   the tag that we searched for to build a catalog, and was the form which did
+   the translation.  The new plan is to separate these two things more: the
+   tags that we search for to build the catalog will be stuff that was in there
+   already, and the translation will get done in some more centralized, lower
+   level place.
+
+   This program (make-msgfile.c) addresses the first part, extracting the 
+   strings.
+   
+   For the emacs C code, we need to recognise the following patterns:
+   
+     message ("string" ... )
+     error ("string")
+     report_file_error ("string" ... )
+     signal_simple_error ("string" ... )
+     signal_simple_error_2 ("string" ... )
+     
+     build_translated_string ("string")
+     #### add this and use it instead of build_string() in some places.
+     
+     yes_or_no_p ("string" ... )
+     #### add this instead of funcalling Qyes_or_no_p directly.
+
+     barf_or_query_if_file_exists      #### restructure this
+     check all callers of Fsignal      #### restructure these
+     signal_error (Qerror ... )                #### change all of these to error()
+     
+     And we also parse out the `interactive' prompts from DEFUN() forms.
+     
+     #### When we've got a string which is a candidate for translation, we
+     should ignore it if it contains only format directives, that is, if
+     there are no alphabetic characters in it that are not a part of a `%'
+     directive.  (Careful not to translate either "%s%s" or "%s: ".)
+
+   For the emacs Lisp code, we need to recognise the following patterns:
+   
+     (message "string" ... )
+     (error "string" ... )
+     (format "string" ... )
+     (read-from-minibuffer "string" ... )
+     (read-shell-command "string" ... )
+     (y-or-n-p "string" ... )
+     (yes-or-no-p "string" ... )
+     (read-file-name "string" ... )
+     (temp-minibuffer-message "string")
+     (query-replace-read-args "string" ... )
+     
+   I expect there will be a lot like the above; basically, any function which
+   is a commonly used wrapper around an eventual call to `message' or
+   `read-from-minibuffer' needs to be recognised by this program.
+
+
+     (dgettext "domain-name" "string")         #### do we still need this?
+     
+     things that should probably be restructured:
+       `princ' in cmdloop.el
+       `insert' in debug.el
+       face-interactive
+       help.el, syntax.el all messed up
+     
+   BPW: (format) is a tricky case.  If I use format to create a string
+   that I then send to a file, I probably don't want the string translated.
+   On the other hand, If the string gets used as an argument to (y-or-n-p)
+   or some such function, I do want it translated, and it needs to be
+   translated before the %s and such are replaced.  The proper solution
+   here is for (format) and other functions that call gettext but don't
+   immediately output the string to the user to add the translated (and
+   formatted) string as a string property of the object, and have
+   functions that output potentially translated strings look for a
+   "translated string" property.  Of course, this will fail if someone
+   does something like
+
+      (y-or-n-p (concat (if you-p "Do you " "Does he ")
+                       (format "want to delete %s? " filename))))
+
+   But you shouldn't be doing things like this anyway.
+
+   BPW: Also, to avoid excessive translating, strings should be marked
+   as translated once they get translated, and further calls to gettext
+   don't do any more translating.  Otherwise, a call like
+
+      (y-or-n-p (format "Delete %s? " filename))
+
+   would cause translation on both the pre-formatted and post-formatted
+   strings, which could lead to weird results in some cases (y-or-n-p
+   has to translate its argument because someone could pass a string to
+   it directly).  Note that the "translating too much" solution outlined
+   below could be implemented by just marking all strings that don't
+   come from a .el or .elc file as already translated.
+
+   Menu descriptors: one way to extract the strings in menu labels would be
+   to teach this program about "^(defvar .*menu\n" forms; that's probably
+   kind of hard, though, so perhaps a better approach would be to make this
+   program recognise lines of the form
+
+     "string" ... ;###translate
+
+   where the magic token ";###translate" on a line means that the string 
+   constant on this line should go into the message catalog.  This is analagous
+   to the magic ";###autoload" comments, and to the magic comments used in the
+   EPSF structuring conventions.
+
+  -----
+  So this program manages to build up a catalog of strings to be translated.
+  To address the second part of the problem, of actually looking up the
+  translations, there are hooks in a small number of low level places in
+  emacs.
+
+  Assume the existence of a C function gettext(str) which returns the 
+  translation of `str' if there is one, otherwise returns `str'.
+
+  - message() takes a char* as its argument, and always filters it through
+    gettext() before displaying it.
+
+  - errors are printed by running the lisp function `display-error' which
+    doesn't call `message' directly (it princ's to streams), so it must be
+    carefully coded to translate its arguments.  This is only a few lines
+    of code.
+
+  - Fread_minibuffer_internal() is the lowest level interface to all minibuf
+    interactions, so it is responsible for translating the value that will go
+    into Vminibuf_prompt.
+
+  - Fpopup_menu filters the menu titles through gettext().
+
+    The above take care of 99% of all messages the user ever sees.
+
+  - The lisp function temp-minibuffer-message translates its arg.
+
+  - query-replace-read-args is funny; it does
+      (setq from (read-from-minibuffer (format "%s: " string) ... ))
+      (setq to (read-from-minibuffer (format "%s %s with: " string from) ... ))
+
+    What should we do about this?  We could hack query-replace-read-args to
+    translate its args, but might this be a more general problem?  I don't
+    think we ought to translate all calls to format.  We could just change
+    the calling sequence, since this is odd in that the first %s wants to be
+    translated but the second doesn't.
+
+
+  Solving the "translating too much" problem:
+  The concern has been raised that in this situation:
+   - "Help" is a string for which we know a translation;
+   - someone visits a file called Help, and someone does something 
+     contrived like (error buffer-file-name)
+  then we would display the translation of Help, which would not be correct.
+  We can solve this by adding a bit to Lisp_String objects which identifies
+  them as having been read as literal constants from a .el or .elc file (as
+  opposed to having been constructed at run time as it would in the above 
+  case.)  To solve this:
+
+    - Fmessage() takes a lisp string as its first argument.
+      If that string is a constant, that is, was read from a source file
+      as a literal, then it calls message() with it, which translates.
+      Otherwise, it calls message_no_translate(), which does not translate.
+
+    - Ferror() (actually, Fsignal() when condition is Qerror) works similarly.
+*/
+
+/* Some notes:
+
+-- {Arg} below could get confused by commas inside of quotes.
+-- {LispToken} below can match some things that are not tokens (e.g.
+   numbers) but for all practical purposes it should be fine.
+*/
+
+#include <stdio.h>
+
+int snarf_return_state;
+
+%}
+
+%p 6000
+%e 2000
+%n 1000
+%a 4000
+%s C_QUOTE C_COMMENT LQUO LCOM
+%s CSNARF LSNARF
+%s DO_C DO_LISP DEFUN
+%s DEFUN2 DEFUN3 LDEF
+
+W      [ \t\n]
+Any    (.|"\n")
+Q      "\""
+NQ     [^"]
+NT     [^A-Za-z_0-9]
+LP     "("
+RP     ")"
+BS     "\\"
+Esc    ({BS}{Any})
+Wh     ({W}*)
+LCom   (";"({Esc}|.)*)
+LWh    (({W}|{Lcom})*)
+Open   ({Wh}{LP})
+OpWQ   ({Open}{Wh}{Q})
+String ({Q}({Esc}|{NQ})*{Q})
+Arg    ([^,]*",")
+StringArg      ({Wh}{String}{Wh}",")
+OpenString     ({Open}{StringArg})
+LispToken      (({Esc}|[-A-Za-z0-9!@$%^&*_=+|{}`~,<.>/?])+)
+%%
+
+<DO_C>{NT}"GETTEXT"{OpWQ} { snarf (); }
+<DO_C>{NT}"DEFER_GETTEXT"{OpWQ} { snarf (); }
+<DO_C>{NT}"build_translated_string"{OpWQ} { snarf (); }
+<DO_C>{NT}"insert_string"{OpWQ} { snarf (); }
+<DO_C>{NT}"message"{OpWQ} { snarf (); }
+<DO_C>{NT}"warn_when_safe"{OpWQ} { snarf (); }
+<DO_C>{NT}"error"{OpWQ} { snarf (); }
+<DO_C>{NT}"continuable_error"{OpWQ} { snarf (); }
+<DO_C>{NT}"signal_simple_error"{OpWQ} { snarf (); }
+<DO_C>{NT}"signal_simple_error_2"{OpWQ} { snarf (); }
+<DO_C>{NT}"signal_simple_continuable_error"{OpWQ} { snarf (); }
+<DO_C>{NT}"signal_simple_continuable_error_2"{OpWQ} { snarf (); }
+<DO_C>{NT}"report_file_error"{OpWQ} { snarf (); }
+<DO_C>{NT}"signal_file_error"{OpWQ} { snarf (); }
+<DO_C>{NT}"signal_double_file_error"{OpWQ} { snarf (); }
+<DO_C>{NT}"signal_double_file_error_2"{OpWQ} { snarf (); }
+<DO_C>{NT}"syntax_error"{OpWQ} { snarf (); }
+<DO_C>{NT}"continuable_syntax_error"{OpWQ} { snarf (); }
+<DO_C>{NT}"CTB_ERROR"{OpWQ} { snarf (); }
+<DO_C>{NT}"fatal"{OpWQ} { snarf (); }
+<DO_C>{NT}"stdout_out"{OpWQ} { snarf (); }
+<DO_C>{NT}"stderr_out"{OpWQ} { snarf (); }
+<DO_C>{NT}"with_output_to_temp_buffer"{OpWQ} { snarf (); }
+
+<DO_C>{NT}"DEFVAR_BOOL"{OpenString}{Arg}{Wh}{Q} { snarf (); }
+<DO_C>{NT}"DEFVAR_LISP"{OpenString}{Arg}{Wh}{Q} { snarf (); }
+<DO_C>{NT}"DEFVAR_SPECIFIER"{OpenString}{Arg}{Wh}{Q} { snarf (); }
+<DO_C>{NT}"DEFVAR_INT"{OpenString}{Arg}{Wh}{Q} { snarf (); }
+<DO_C>{NT}"DEFVAR_BUFFER_LOCAL"{OpenString}{Arg}{Wh}{Q} { snarf (); }
+<DO_C>{NT}"DEFVAR_BUFFER_DEFAULTS"{OpenString}{Arg}{Wh}{Q} { snarf (); }
+<DO_C>{NT}"deferror"{Open}{Arg}{StringArg}{Wh}{Q} { snarf (); }
+
+<DO_C>{NT}"barf_or_query_if_file_exists"{Open}{Arg}{Wh}{Q} {
+  /* #### see comment above about use of Arg */
+  snarf ();
+}
+
+<DO_C>{NT}"DEFUN"{Open} { BEGIN DEFUN; }
+
+<DO_C>"/*" {
+  /* This is hateful, but doc strings are sometimes put inside of comments
+     (to get around limits in cpp), so we can't ignore stuff inside of
+     comments. */
+  /* BEGIN C_COMMENT; */
+}
+<DO_C>{Q} { BEGIN C_QUOTE; }
+<DO_C>{Any} { }
+
+<DEFUN>{StringArg}{Arg}{Arg}{Arg}{Arg}{Wh} { BEGIN DEFUN2; }
+<DEFUN>{Any} { bad_c_defun (); }
+
+<DEFUN2>{Q} {
+  /* We found an interactive specification. */
+  snarf_return_state = DEFUN3;
+  snarf ();
+}
+<DEFUN2>[^,]* {
+  /* This function doesn't have an interactive specification.
+     Don't use {Arg} in the specification because DEFUN3 looks
+     for the comma. */
+  BEGIN DEFUN3;
+}
+
+<DEFUN3>{Wh}","{Wh}{Q} {
+  snarf_return_state = DO_C;
+  snarf ();
+}
+<DEFUN3>{Any} { bad_c_defun (); }
+
+<C_QUOTE>{Esc} { }
+<C_QUOTE>{Q} { BEGIN DO_C; }
+<C_QUOTE>{Any} { }
+
+<C_COMMENT>"*/" { BEGIN DO_C; }
+<C_COMMENT>{Any} { }
+
+<DO_LISP>{LP}{LWh}"gettext"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"purecopy"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"interactive"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"message"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"error"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"warn"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"format"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"substitute-command-keys"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"temp-minibuffer-message"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"momentary-string-display"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"princ"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"prin1"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"prin1-to-string"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"print"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"insert"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"insert-before-markers"{LWh}{Q} { inc_paren (); snarf (); }
+
+<DO_LISP>{LP}{LWh}"get-buffer"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"get-buffer-create"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"generate-new-buffer-name"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"rename-buffer"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"set-buffer"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"switch-to-buffer"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"pop-to-buffer"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"with-output-to-temp-buffer"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"buffer-enable-undo"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"buffer-disable-undo"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"get-buffer-window"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"delete-windows-on"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"replace-buffer-in-windows"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"display-buffer"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"other-buffer"{LWh}{Q} { inc_paren (); snarf (); }
+
+<DO_LISP>{LP}{LWh}"read-from-minibuffer"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"read-shell-command"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"read-file-name"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"read-buffer"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"read-variable"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"read-command"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"read-function"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"read-directory-name"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"read-string"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"read-number"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"read-minibuffer"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"read-quoted-char"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"read-face-name"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"read-itimer"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"completing-read"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"y-or-n-p"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"yes-or-no-p"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"query-replace-read-args"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"eval-minibuffer"{LWh}{Q} { inc_paren (); snarf (); }
+<DO_LISP>{LP}{LWh}"edit-and-eval-command"{LWh}{Q} { inc_paren (); snarf (); }
+
+<DO_LISP>{LP}{LWh}"defvar"{LWh}{LispToken}{LWh} {
+  inc_paren (); begin_paren_counting (LDEF);
+}
+<DO_LISP>{LP}{LWh}"defconst"{LWh}{LispToken}{LWh} {
+  inc_paren (); begin_paren_counting (LDEF);
+}
+<DO_LISP>{LP}{LWh}"defun"{LWh}{LispToken}{LWh} {
+  inc_paren (); begin_paren_counting (LDEF);
+}
+<DO_LISP>{LP}{LWh}"defmacro"{LWh}{LispToken}{LWh} {
+  inc_paren (); begin_paren_counting (LDEF);
+}
+<DO_LISP>{LP}{LWh}"defsubst"{LWh}{LispToken}{LWh} {
+  inc_paren (); begin_paren_counting (LDEF);
+}
+
+<DO_LISP>{Q} { BEGIN LQUO; }
+<DO_LISP>";" { BEGIN LCOM; }
+<DO_LISP>{LP} { inc_paren (); }
+<DO_LISP>{RP} { dec_paren (); }
+<DO_LISP>{Esc} { }
+<DO_LISP>{W} { lisp_whitespace (); }
+<DO_LISP>{Any} { }
+
+<LQUO>{Esc} { }
+<LQUO>{Q} { BEGIN DO_LISP; }
+<LQUO>{Any} { }
+
+<LCOM>"\n" { BEGIN DO_LISP; }
+<LCOM>{Any} { }
+
+<LDEF>{LWh}{Q} { snarf (); }
+<LDEF>{Any} { BEGIN DO_LISP; }
+
+<CSNARF>{Esc} { ECHO; }
+<CSNARF>{Q} { ECHO; fprintf (yyout, ")\n"); BEGIN snarf_return_state; }
+<CSNARF>{Any} { ECHO; }
+
+<LSNARF>{Esc} { ECHO; }
+<LSNARF>"\n" { fprintf (yyout, "\\n\\\n"); }
+<LSNARF>{Q} { ECHO; fprintf (yyout, ")\n"); BEGIN snarf_return_state; }
+<LSNARF>{Any} { ECHO; }
+
+%%
+
+enum filetype { C_FILE, LISP_FILE, INVALID_FILE };
+/* some brain-dead headers define this ... */
+#undef FALSE
+#undef TRUE
+enum boolean { FALSE, TRUE };
+
+void scan_file (char *filename);
+void process_C_file (void);
+void process_Lisp_file (void);
+
+int in_c;
+int in_paren_counting, paren_count;
+int paren_return_state;
+
+snarf ()
+{
+  fprintf (yyout, "gettext(\"");
+  if (in_c)
+    BEGIN CSNARF;
+  else
+    BEGIN LSNARF;
+}
+
+bad_c_defun ()
+{
+  fprintf (stderr, "Warning: Invalid DEFUN encountered in C, line %d.\n",
+          yylineno);
+  snarf_return_state = DO_C;
+  BEGIN DO_C;
+  /* REJECT; Sun's lex is broken!  Use Flex! */
+}
+
+bad_lisp_def ()
+{
+  fprintf (stderr,
+          "Warning: Invalid defmumble encountered in Lisp, line %d.\n",
+          yylineno);
+  snarf_return_state = DO_LISP;
+  BEGIN DO_LISP;
+  /* REJECT; Sun's lex is broken!  Use Flex! */
+}
+
+inc_paren ()
+{
+  if (in_paren_counting)
+    paren_count++;
+}
+
+dec_paren ()
+{
+  if (in_paren_counting)
+    {
+      /* If we find a right paren without a matching left paren, it usually
+        just indicates a statement like
+
+        (defvar foo-mumble nil)
+
+        where 'nil' is the sexp we are skipping over, and there's no
+        doc string. */
+      if (paren_count > 0)
+       paren_count--;
+      else
+       unput (')');    
+      if (paren_count == 0)
+       {
+         in_paren_counting = 0;
+         BEGIN paren_return_state;
+       }
+    }
+}
+
+/* #### begin_paren_counting () does not handle recursive entries */
+
+begin_paren_counting (int return_state)
+{
+  in_paren_counting = 1;
+  paren_count = 0;
+  paren_return_state = return_state;
+}
+
+lisp_whitespace ()
+{
+  if (in_paren_counting && !paren_count)
+    {
+      /* We got to the end of a token and we're not in a parenthesized
+        expression, so we're at the end of an sexp. */
+      in_paren_counting = 0;
+      BEGIN paren_return_state;
+    }
+}
+
+yywrap ()
+{
+  return 1;
+}
+
+main (int argc, char *argv[])
+{
+  register int i;
+
+  yyout = stdout;
+
+  /* If first two args are -o FILE, output to FILE. */
+  i = 1;
+  if (argc > i + 1 && strcmp (argv[i], "-o") == 0) {
+    yyout = fopen (argv[++i], "w");
+    ++i;
+  }
+  /* ...Or if args are -a FILE, append to FILE. */
+  if (argc > i + 1 && strcmp (argv[i], "-a") == 0) {
+    yyout = fopen (argv[++i], "a");
+    ++i;
+  }
+  if (!yyout) {
+    fprintf (stderr, "Unable to open output file %s\n", argv[--i]);
+    return;
+  }
+
+  for (; i < argc; i++)
+    scan_file (argv[i]);
+
+  return 0;
+}
+
+
+void scan_file (char *filename)
+{
+  enum filetype type = INVALID_FILE;
+  register char *p = filename + strlen (filename);
+
+  if (strcmp (p - 4, ".elc") == 0) {
+    *--p = '\0';                               /* Use .el file instead */
+    type = LISP_FILE;
+  } else if (strcmp (p - 3, ".el") == 0)
+    type = LISP_FILE;
+  else if (strcmp (p - 2, ".o") == 0) {
+    *--p = 'c';                                        /* Use .c file instead */
+    type = C_FILE;
+  } else if (strcmp (p - 2, ".c") == 0)
+    type = C_FILE;
+
+  if (type == INVALID_FILE) {
+    fprintf (stderr, "File %s being ignored\n", filename);
+    return;
+  }
+  yyin = fopen (filename, "r");
+  if (!yyin) {
+    fprintf (stderr, "Unable to open input file %s\n", filename);
+    return;
+  }
+
+  fprintf (yyout, "/* %s */\n", filename);
+  if (type == C_FILE)
+    process_C_file ();
+  else
+    process_Lisp_file ();
+  fputc ('\n', yyout);
+  
+  fclose (yyin);
+}
+
+void process_C_file ()
+{
+  snarf_return_state = DO_C;
+  in_c = 1;
+  BEGIN DO_C;
+  yylex ();
+}
+
+void process_Lisp_file ()
+{
+  snarf_return_state = DO_LISP;
+  in_c = 0;
+  BEGIN DO_LISP;
+  yylex ();
+}
+
diff --git a/lib-src/make-path.c b/lib-src/make-path.c
new file mode 100644 (file)
index 0000000..b3de190
--- /dev/null
@@ -0,0 +1,91 @@
+/* Make all the directories along a path.
+   Copyright (C) 1992 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs 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.
+
+GNU Emacs 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 GNU Emacs; see the file COPYING.  If not, write to
+the Free the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+/* Synched up with: FSF 19.28. */
+
+/* This program works like mkdir, except that it generates
+   intermediate directories if they don't exist.  This is just like
+   the `mkdir -p' command on most systems; unfortunately, the mkdir
+   command on some of the purer BSD systems (like Mt. Xinu) don't have
+   that option. */
+
+#ifdef emacs
+#include <../src/config.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <stdio.h>
+#include <errno.h>
+
+extern int errno;
+
+char *prog_name;
+
+static int touchy_mkdir (char *path)
+{
+  struct stat buf;
+
+  /* If PATH already exists and is a directory, return success.  */
+  if (stat (path, &buf) >= 0
+      && (buf.st_mode & S_IFMT) == S_IFDIR)
+    return 0;
+
+  /* Otherwise, try to make it.  If PATH exists but isn't a directory,
+     this will signal an error.  */
+  if (mkdir (path, 0777) < 0)
+    {
+      fprintf (stderr, "%s: ", prog_name);
+      perror (path);
+      return 1;
+    }
+
+  return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+  prog_name = *argv;
+
+  for (argc--, argv++; argc > 0; argc--, argv++)
+    {
+      char *path = *argv;
+      int i;
+
+      /* Stop at each slash in path and try to create the directory.
+        Skip any initial slash.  */
+      for (i = (path[0] == '/') ? 1 : 0; path[i]; i++)
+       if (path[i] == '/')
+         {
+           path[i] = '\0';
+           if (touchy_mkdir (path) < 0)
+             goto next_pathname;
+           path[i] = '/';
+         }
+
+      touchy_mkdir (path);
+
+    next_pathname:
+      ;
+    }
+
+  return 0;
+}
diff --git a/lib-src/make-po.c b/lib-src/make-po.c
new file mode 100644 (file)
index 0000000..3db1189
--- /dev/null
@@ -0,0 +1,301 @@
+/* Generate .po file from doc-string file.
+
+   Scan specified doc-string file, creating .po format messages for processing
+   with msgfmt.  The results go to standard output or to a file specified
+   with -a or -o (-a to append, -o to start from nothing).
+
+   Kludge to make up for shortcoming in make-docfile and Snarf-documentation:
+   If arg before input filename is -p, we are scanning an add-on
+   package, which requires slightly different processing.
+*/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifndef EXIT_SUCCESS
+#define EXIT_SUCCESS 0
+#define EXIT_FAILURE 1
+#endif
+
+/* #define BUFSIZE    8192 */
+#define BUFSIZE    16384
+#define NEWSTRING  31      /* Character signalling start of new doc string */
+#define LINEEND    "\\n"
+#define ENDSTRING  "\"\n"
+#define LINEBEGIN  "       \""
+#define LINEBREAK  ENDSTRING LINEBEGIN
+
+/* some brain-dead headers define this ... */
+#undef FALSE
+#undef TRUE
+enum boolean { FALSE, TRUE };
+
+
+/***********************/
+/* buffer pseudo-class */
+/***********************/
+
+typedef struct _buffer
+{
+  size_t index;  /* current position in buf[] */
+  size_t size;   /* size of buf */
+  char *buf;
+} buffer_struct;
+
+#define BUF_NULL  {0, 0, NULL}
+
+int  buf_init  (buffer_struct *buffer, size_t size);
+void buf_free  (buffer_struct *buffer);
+void buf_clear (buffer_struct *buffer);
+int  buf_putc  (buffer_struct *buffer, int c);
+int  buf_print (buffer_struct *buffer, const char *s);
+
+
+/********************/
+/* global variables */
+/********************/
+
+FILE *infile  = NULL;
+FILE *outfile = NULL;
+buffer_struct buf = BUF_NULL;
+
+
+void scan_file (enum boolean package);
+void initialize (void);
+void clean_exit (int status);
+void buf_putc_safe (int c);
+void buf_print_safe (const char *s);
+void terminate_string (void);
+
+main (int argc, char *argv[])
+{
+  register int i;
+  enum boolean package = FALSE;  /* TRUE if scanning add-on package */
+
+  initialize ();
+
+  outfile = stdout;
+
+  /* If first two args are -o FILE, output to FILE. */
+  i = 1;
+  if (argc > i + 1 && strcmp (argv[i], "-o") == 0) {
+    outfile = fopen (argv[++i], "w");
+    ++i;
+  }
+  /* ...Or if args are -a FILE, append to FILE. */
+  if (argc > i + 1 && strcmp (argv[i], "-a") == 0) {
+    outfile = fopen (argv[++i], "a");
+    ++i;
+  }
+  if (!outfile) {
+    fprintf (stderr, "Unable to open output file %s\n", argv[--i]);
+    return 1;
+  }
+
+  if (argc > i && !strcmp (argv[i], "-p")) {
+    package = TRUE;
+    ++i;
+  }
+
+  infile = fopen (argv[i], "r");
+  if (!infile) {
+    fprintf (stderr, "Unable to open input file %s\n", argv[i]);
+    return 1;
+  }
+
+  scan_file (package);
+  clean_exit (EXIT_SUCCESS);
+}
+
+
+void scan_file (enum boolean package)
+{
+  register int c;   /* Character read in */
+
+  fprintf (outfile, "###############\n");
+  fprintf (outfile, "# DOC strings #\n");
+  fprintf (outfile, "###############\n");
+
+  while (c = getc (infile), !feof (infile)) {
+    if (c == NEWSTRING) {
+      /* If a string was being processed, terminate it. */
+      if (buf.index > 0)
+       terminate_string ();
+
+      /* Skip function or variable name. */
+      while (c != '\n')
+       c = getc (infile);
+      c = getc (infile);
+
+      /* Begin a new string. */
+      fprintf (outfile, "msgid  \"");
+      buf_print_safe ("msgstr \"");
+    }
+
+    if (c == '\n') {
+      /* Peek at next character. */
+      c = getc (infile);
+      ungetc (c, infile);
+
+      /* For add-on (i.e., non-preloaded) documentation, ignore the last
+        carriage return of a string. */
+      if (!(package && c == NEWSTRING)) {
+       fprintf (outfile, LINEEND);
+       buf_print_safe (LINEEND);
+      }
+
+      /* If not end of string, continue it on the next line. */
+      if (c != NEWSTRING) {
+       fprintf (outfile, LINEBREAK);
+       buf_print_safe (LINEBREAK);
+      }
+    }
+    else {
+
+      /* If character is \ or ", precede it by a backslash. */
+      if (c == '\\' || c == '\"') {
+       putc ('\\', outfile);
+       buf_putc_safe ('\\');
+      }
+
+      putc (c, outfile);
+      buf_putc_safe (c);
+    }
+  }
+  terminate_string ();
+}
+
+
+/* initialize sets up the global variables.
+*/
+void initialize (void)
+{
+  if (buf_init (&buf, BUFSIZE) != 0)
+    clean_exit (EXIT_FAILURE);
+}
+
+
+/* clean_exit returns any resources and terminates the program.
+   An error message is printed if status is EXIT_FAILURE.
+*/
+void clean_exit (int status)
+{
+  if (buf.size > 0)
+    buf_free (&buf);
+  if (outfile)
+    fclose (outfile);
+  if (infile)
+    fclose (infile);
+
+  if (status == EXIT_FAILURE)
+    fprintf (stderr, "make-po abnormally terminated\n");
+  exit (status);
+}
+
+
+/* buf_putc_safe writes the character c on the global buffer buf,
+   checking to make sure that the operation was successful.
+*/
+void buf_putc_safe (int c)
+{
+  register int status;
+  
+  status = buf_putc (&buf, c);
+  if (status == EOF)
+    clean_exit (EXIT_FAILURE);
+}
+
+
+/* buf_putc_safe writes the string s on the global buffer buf,
+   checking to make sure that the operation was successful.
+*/
+void buf_print_safe (const char *s)
+{
+  register int status;
+
+  status = buf_print (&buf, s);
+  if (status < 0)
+    clean_exit (EXIT_FAILURE);
+}
+
+
+/* terminate_string terminates the current doc string and outputs the buffer.
+*/
+void terminate_string (void)
+  {
+    fprintf (outfile, ENDSTRING);
+
+    /* Make the "translation" different from the original string. */
+    buf_print_safe ("_X");
+
+    buf_print_safe (ENDSTRING);
+    fprintf (outfile, "%s", buf.buf);
+    buf_clear (&buf);
+  }
+
+
+/*********************************/
+/* buffer pseudo-class functions */
+/*********************************/
+
+/* buf_init initializes a buffer to the specified size.
+   It returns non-zero if the attempt fails.
+*/
+int buf_init (buffer_struct *buffer, size_t size)
+{
+  buffer->buf = malloc (size);
+  if (buffer->buf == NULL)
+    return 1;
+
+  buffer->size = size;
+  buf_clear (buffer);
+  return 0;
+}
+
+
+/* buf_free releases the memory allocated for the buffer.
+*/
+void buf_free (buffer_struct *buffer)
+{
+  free (buffer->buf);
+  buffer->size = 0;
+}
+
+
+/* buf_clear resets a buffer to an empty string.
+*/
+void buf_clear (buffer_struct *buffer)
+{
+  buffer->index = 0;
+  buffer->buf[0] = '\0';
+}
+
+
+/* buf_putc writes the character c on the buffer.
+   It returns the character written, or EOF for error.
+*/
+int buf_putc (buffer_struct *buffer, int c)
+{
+  if (buffer->index >= buffer->size)
+    return EOF;
+
+  buffer->buf[buffer->index++] = c;
+  return c;
+}
+
+
+/* buf_print writes the string s on the buffer.
+   It returns the number of characters written, or negative if an error occurred.
+*/
+int buf_print (buffer_struct *buffer, const char *s)
+{
+  register int len;
+
+  len = strlen (s);
+  if (buffer->index + len >= buffer->size)
+    return -1;
+
+  sprintf (&(buffer->buf[buffer->index]), s);
+  buffer->index += len;
+  return len;
+}
diff --git a/lib-src/mmencode.c b/lib-src/mmencode.c
new file mode 100644 (file)
index 0000000..8ba79d4
--- /dev/null
@@ -0,0 +1,522 @@
+/*
+Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
+
+Permission to use, copy, modify, and distribute this material 
+for any purpose and without fee is hereby granted, provided 
+that the above copyright notice and this permission notice 
+appear in all copies, and that the name of Bellcore not be 
+used in advertising or publicity pertaining to this 
+material without the specific, prior written permission 
+of an authorized representative of Bellcore.  BELLCORE 
+MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY 
+OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS", 
+WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
+*/
+
+#define NEWLINE_CHAR '\n'
+#include <stdlib.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+
+static void
+output64chunk(int c1, int c2, int c3, int pads, FILE *outfile);
+
+static signed char basis_64[] =
+   "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
+
+static signed char index_64[128] = {
+    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,62, -1,-1,-1,63,
+    52,53,54,55, 56,57,58,59, 60,61,-1,-1, -1,-1,-1,-1,
+    -1, 0, 1, 2,  3, 4, 5, 6,  7, 8, 9,10, 11,12,13,14,
+    15,16,17,18, 19,20,21,22, 23,24,25,-1, -1,-1,-1,-1,
+    -1,26,27,28, 29,30,31,32, 33,34,35,36, 37,38,39,40,
+    41,42,43,44, 45,46,47,48, 49,50,51,-1, -1,-1,-1,-1
+};
+
+#define char64(c)  (((c) < 0 || (c) > 127) ? -1 : index_64[(c)])
+
+/*
+char64(c)
+char c;
+{
+    char *s = (char *) strchr(basis_64, c);
+    if (s) return(s-basis_64);
+    return(-1);
+}
+*/
+
+/* the following gets a character, but fakes it properly into two chars if there's a newline character */
+static int InNewline=0;
+
+static int
+nextcharin(infile, PortableNewlines)
+FILE *infile;
+int PortableNewlines;
+{
+    int c;
+
+#ifndef NEWLINE_CHAR
+    return(getc(infile));
+#else
+    if (!PortableNewlines) return(getc(infile));
+    if (InNewline) {
+        InNewline = 0;
+        return(10); /* LF */
+    }
+    c = getc(infile);
+    if (c == NEWLINE_CHAR) {
+        InNewline = 1;
+        return(13); /* CR */
+    }
+    return(c);
+#endif
+}
+
+static void
+to64(FILE *infile, FILE *outfile, int PortableNewlines) 
+{
+    int c1, c2, c3, ct=0;
+    InNewline = 0; /* always reset it */
+    while ((c1 = nextcharin(infile, PortableNewlines)) != EOF) {
+        c2 = nextcharin(infile, PortableNewlines);
+        if (c2 == EOF) {
+            output64chunk(c1, 0, 0, 2, outfile);
+        } else {
+            c3 = nextcharin(infile, PortableNewlines);
+            if (c3 == EOF) {
+                output64chunk(c1, c2, 0, 1, outfile);
+            } else {
+                output64chunk(c1, c2, c3, 0, outfile);
+            }
+        }
+        ct += 4;
+        if (ct > 71) {
+            putc('\n', outfile);
+            ct = 0;
+        }
+    }
+    if (ct) putc('\n', outfile);
+    fflush(outfile);
+}
+
+static void
+output64chunk(int c1, int c2, int c3, int pads, FILE *outfile)
+{
+    putc(basis_64[c1>>2], outfile);
+    putc(basis_64[((c1 & 0x3)<< 4) | ((c2 & 0xF0) >> 4)], outfile);
+    if (pads == 2) {
+        putc('=', outfile);
+        putc('=', outfile);
+    } else if (pads) {
+        putc(basis_64[((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6)], outfile);
+        putc('=', outfile);
+    } else {
+        putc(basis_64[((c2 & 0xF) << 2) | ((c3 & 0xC0) >>6)], outfile);
+        putc(basis_64[c3 & 0x3F], outfile);
+    }
+}
+
+static int
+PendingBoundary(char *s, char **Boundaries, int *BoundaryCt)
+{
+    int i, len;
+
+    if (s[0] != '-' || s[1] != '-') return(0);
+
+
+    for (i=0; i < *BoundaryCt; ++i) {
+       len = strlen(Boundaries[i]);
+        if (!strncmp(s, Boundaries[i], len)) {
+            if (s[len] == '-' && s[len+1] == '-') *BoundaryCt = i;
+            return(1);
+        }
+    }
+    return(0);
+}
+
+/* If we're in portable newline mode, we have to convert CRLF to the 
+    local newline convention on output */
+
+static int CRpending = 0;
+
+#ifdef NEWLINE_CHAR
+static void
+almostputc(int c, FILE *outfile, int PortableNewlines)
+{
+    if (CRpending) {
+        if (c == 10) {
+            putc(NEWLINE_CHAR, outfile);
+            CRpending = 0;
+        } else {
+            putc(13, outfile);
+           if (c != 13) {
+               putc(c, outfile);
+               CRpending = 0;
+           }
+        }
+    } else {
+        if (PortableNewlines && c == 13) {
+            CRpending = 1;
+        } else {
+            putc(c, outfile);
+        }
+    }
+}
+#else
+static void
+almostputc(int c, FILE *outfile, int PortableNewlines)
+{
+    putc(c, outfile);
+}
+#endif
+
+static void
+from64(FILE *infile, FILE *outfile,
+       char **boundaries, int *boundaryct, int PortableNewlines) 
+{
+    int c1, c2, c3, c4;
+    int newline = 1, DataDone = 0;
+
+    /* always reinitialize */
+    CRpending = 0;
+    while ((c1 = getc(infile)) != EOF) {
+        if (isspace(c1)) {
+            if (c1 == '\n') {
+                newline = 1;
+            } else {
+                newline = 0;
+            }
+            continue;
+        }
+        if (newline && boundaries && c1 == '-') {
+            char Buf[200];
+            /* a dash is NOT base 64, so all bets are off if NOT a boundary */
+            ungetc(c1, infile);
+            fgets(Buf, sizeof(Buf), infile);
+            if (boundaries
+                 && (Buf[0] == '-')
+                 && (Buf[1] == '-')
+                 && PendingBoundary(Buf, boundaries, boundaryct)) {
+                return;
+            }
+            fprintf(stderr, "Ignoring unrecognized boundary line: %s\n", Buf);
+            continue;
+        }
+        if (DataDone) continue;
+        newline = 0;
+        do {
+            c2 = getc(infile);
+        } while (c2 != EOF && isspace(c2));
+        do {
+            c3 = getc(infile);
+        } while (c3 != EOF && isspace(c3));
+        do {
+            c4 = getc(infile);
+        } while (c4 != EOF && isspace(c4));
+        if (c2 == EOF || c3 == EOF || c4 == EOF) {
+            fprintf(stderr, "Warning: base64 decoder saw premature EOF!\n");
+            return;
+        }
+        if (c1 == '=' || c2 == '=') {
+            DataDone=1;
+            continue;
+        }
+        c1 = char64(c1);
+        c2 = char64(c2);
+        almostputc(((c1<<2) | ((c2&0x30)>>4)), outfile, PortableNewlines);
+        if (c3 == '=') {
+            DataDone = 1;
+        } else {
+            c3 = char64(c3);
+            almostputc((((c2&0XF) << 4) | ((c3&0x3C) >> 2)), outfile, PortableNewlines);
+            if (c4 == '=') {
+                DataDone = 1;
+            } else {
+                c4 = char64(c4);
+                almostputc((((c3&0x03) <<6) | c4), outfile, PortableNewlines);
+            }
+        }
+    }
+    if (CRpending) putc(13, outfile); /* Don't drop a lone trailing char 13 */
+}
+
+static signed char basis_hex[] = "0123456789ABCDEF";
+static signed char index_hex[128] = {
+    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+     0, 1, 2, 3,  4, 5, 6, 7,  8, 9,-1,-1, -1,-1,-1,-1,
+    -1,10,11,12, 13,14,15,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+    -1,10,11,12, 13,14,15,-1, -1,-1,-1,-1, -1,-1,-1,-1,
+    -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1, -1,-1,-1,-1
+};
+
+/* The following version generated complaints on Solaris. */
+/* #define hexchar(c)  (((c) < 0 || (c) > 127) ? -1 : index_hex[(c)])  */
+/*  Since we're no longer ever calling it with anything signed, this should work: */
+#define hexchar(c)  (((c) > 127) ? -1 : index_hex[(c)])
+
+/*
+hexchar(c)
+char c;
+{
+    char *s;
+    if (islower(c)) c = toupper(c);
+    s = (char *) strchr(basis_hex, c);
+    if (s) return(s-basis_hex);
+    return(-1);
+}
+*/
+
+static void
+toqp(FILE *infile, FILE *outfile) 
+{
+    int c, ct=0, prevc=255;
+    while ((c = getc(infile)) != EOF) {
+        if ((c < 32 && (c != '\n' && c != '\t'))
+             || (c == '=')
+             || (c >= 127)
+             /* Following line is to avoid single periods alone on lines,
+               which messes up some dumb smtp implementations, sigh... */
+             || (ct == 0 && c == '.')) {
+            putc('=', outfile);
+            putc(basis_hex[c>>4], outfile);
+            putc(basis_hex[c&0xF], outfile);
+            ct += 3;
+            prevc = 'A'; /* close enough */
+        } else if (c == '\n') {
+            if (prevc == ' ' || prevc == '\t') {
+                putc('=', outfile); /* soft & hard lines */
+                putc(c, outfile);
+            }
+            putc(c, outfile);
+            ct = 0;
+            prevc = c;
+        } else {
+            if (c == 'F' && prevc == '\n') {
+                /* HORRIBLE but clever hack suggested by MTR for sendmail-avoidance */
+                c = getc(infile);
+                if (c == 'r') {
+                    c = getc(infile);
+                    if (c == 'o') {
+                        c = getc(infile);
+                        if (c == 'm') {
+                            c = getc(infile);
+                            if (c == ' ') {
+                                /* This is the case we are looking for */
+                                fputs("=46rom", outfile);
+                                ct += 6;
+                            } else {
+                                fputs("From", outfile);
+                                ct += 4;
+                            }
+                        } else {
+                            fputs("Fro", outfile);
+                            ct += 3;
+                        }
+                    } else {
+                        fputs("Fr", outfile);
+                        ct += 2;
+                    }
+                } else {
+                    putc('F', outfile);
+                    ++ct;
+                }
+                ungetc(c, infile);
+                prevc = 'x'; /* close enough -- printable */
+            } else { /* END horrible hack */
+                putc(c, outfile);
+                ++ct;
+                prevc = c;
+            }
+        }
+        if (ct > 72) {
+            putc('=', outfile);
+            putc('\n', outfile);
+            ct = 0;
+            prevc = '\n';
+        }
+    }
+    if (ct) {
+        putc('=', outfile);
+        putc('\n', outfile);
+    }
+}
+
+static void
+fromqp(FILE *infile, FILE *outfile, char **boundaries, int *boundaryct) 
+{
+    unsigned int c1, c2;
+    int sawnewline = 1, neednewline = 0;
+    /* The neednewline hack is necessary because the newline leading into 
+      a multipart boundary is part of the boundary, not the data */
+
+    while ((c1 = getc(infile)) != EOF) {
+        if (sawnewline && boundaries && (c1 == '-')) {
+            char Buf[200];
+            unsigned char *s;
+
+            ungetc(c1, infile);
+            fgets(Buf, sizeof(Buf), infile);
+            if (boundaries
+                 && (Buf[0] == '-')
+                 && (Buf[1] == '-')
+                 && PendingBoundary(Buf, boundaries, boundaryct)) {
+                return;
+            }
+            /* Not a boundary, now we must treat THIS line as q-p, sigh */
+            if (neednewline) {
+                putc('\n', outfile);
+                neednewline = 0;
+            }
+            for (s=(unsigned char *) Buf; *s; ++s) {
+                if (*s == '=') {
+                    if (!*++s) break;
+                    if (*s == '\n') {
+                        /* ignore it */
+                        sawnewline = 1;
+                    } else {
+                        c1 = hexchar(*s);
+                        if (!*++s) break;
+                        c2 = hexchar(*s);
+                        putc(c1<<4 | c2, outfile);
+                    }
+                } else {
+#ifdef MSDOS
+                    if (*s == '\n')
+                        putc('\r', outfile);   /* insert CR for binary-mode write */
+#endif
+                    putc(*s, outfile);
+                }
+            }
+        } else {
+            if (neednewline) {
+                putc('\n', outfile);
+                neednewline = 0;
+            }
+            if (c1 == '=') {
+                sawnewline = 0;
+                c1 = getc(infile);
+                if (c1 == '\n') {
+                    /* ignore it */
+                    sawnewline = 1;
+                } else {
+                    c2 = getc(infile);
+                    c1 = hexchar(c1);
+                    c2 = hexchar(c2);
+                    putc(c1<<4 | c2, outfile);
+                    if (c2 == '\n') sawnewline = 1;
+                }
+            } else {
+                if (c1 == '\n') {
+                    sawnewline = 1;
+                    neednewline = 1;
+                } else {
+                    sawnewline = 0;
+                    putc(c1, outfile);
+                }
+            }
+        }
+    }
+    if (neednewline) {
+        putc('\n', outfile);
+        neednewline = 0;
+    }    
+}
+
+
+/*
+Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
+
+Permission to use, copy, modify, and distribute this material 
+for any purpose and without fee is hereby granted, provided 
+that the above copyright notice and this permission notice 
+appear in all copies, and that the name of Bellcore not be 
+used in advertising or publicity pertaining to this 
+material without the specific, prior written permission 
+of an authorized representative of Bellcore.  BELLCORE 
+MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY 
+OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS", 
+WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
+*/
+#ifdef MSDOS
+#include <fcntl.h>
+#endif
+
+#define BASE64 1
+#define QP 2 /* quoted-printable */
+
+int main(int argc, char *argv[])
+{
+    int encode = 1, which = BASE64, i, portablenewlines = 0;
+    FILE *fp = stdin;
+    FILE *fpo = stdout;
+
+    for (i=1; i<argc; ++i) {
+        if (argv[i][0] == '-') {
+           switch (argv[i][1]) {
+               case 'o':
+                   if (++i >= argc) {
+                       fprintf(stderr, "mimencode: -o requires a file name.\n");
+                       exit(-1);
+                   }
+                   fpo = fopen(argv[i], "w");
+                   if (!fpo) {
+                       perror(argv[i]);
+                       exit(-1);
+                   }
+                   break;
+                case 'u':
+                    encode = 0;
+                    break;
+                case 'q':
+                    which = QP;
+                    break;
+                case 'p':
+                    portablenewlines = 1;
+                    break;
+                case 'b':
+                    which = BASE64;
+                    break;
+               default:
+                    fprintf(stderr,
+                       "Usage: mmencode [-u] [-q] [-b] [-p] [-o outputfile] [file name]\n");
+                    exit(-1);
+            }
+        } else {
+#ifdef MSDOS
+            if (encode)
+                fp = fopen(argv[i], "rb");
+            else
+            {
+                fp = fopen(argv[i], "rt");
+                setmode(fileno(fpo), O_BINARY);
+            } /* else */
+#else
+            fp = fopen(argv[i], "r");
+#endif /* MSDOS */
+            if (!fp) {
+                perror(argv[i]);
+                exit(-1);
+            }
+        }
+    }
+#ifdef MSDOS
+    if (fp == stdin) setmode(fileno(fp), O_BINARY);
+#endif /* MSDOS */
+    if (which == BASE64) {
+        if (encode) {
+            to64(fp, fpo, portablenewlines);
+        } else {
+            from64(fp,fpo, (char **) NULL, (int *) 0, portablenewlines);
+        }
+    } else {
+        if (encode) toqp(fp, fpo); else fromqp(fp, fpo, NULL, 0);
+    }
+    return(0);
+}
+
diff --git a/lib-src/movemail.c b/lib-src/movemail.c
new file mode 100644 (file)
index 0000000..0419719
--- /dev/null
@@ -0,0 +1,696 @@
+/* movemail foo bar -- move file foo to file bar,
+   locking file foo the way /bin/mail respects.
+   Copyright (C) 1986, 1992, 1993, 1994, 1996 Free Software Foundation, Inc.
+
+This file is part of GNU Emacs.
+
+GNU Emacs 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.
+
+GNU Emacs 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 GNU Emacs; see the file COPYING.  If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+/* Important notice: defining MAIL_USE_FLOCK or MAIL_USE_LOCKF *will
+   cause loss of mail* if you do it on a system that does not normally
+   use flock as its way of interlocking access to inbox files.  The
+   setting of MAIL_USE_FLOCK and MAIL_USE_LOCKF *must agree* with the
+   system's own conventions.  It is not a choice that is up to you.
+
+   So, if your system uses lock files rather than flock, then the only way
+   you can get proper operation is to enable movemail to write lockfiles there.
+   This means you must either give that directory access modes
+   that permit everyone to write lockfiles in it, or you must make movemail
+   a setuid or setgid program.  */
+
+/*
+ * Modified January, 1986 by Michael R. Gretzinger (Project Athena)
+ *
+ * Added POP (Post Office Protocol) service.  When compiled -DMAIL_USE_POP
+ * movemail will accept input filename arguments of the form
+ * "po:username".  This will cause movemail to open a connection to
+ * a pop server running on $MAILHOST (environment variable).  Movemail
+ * must be setuid to root in order to work with POP.
+ * 
+ * New module: popmail.c
+ * Modified routines:
+ *     main - added code within #ifdef MAIL_USE_POP; added setuid (getuid ())
+ *             after POP code. 
+ * New routines in movemail.c:
+ *     get_errmsg - return pointer to system error message
+ *
+ * Modified August, 1993 by Jonathan Kamens (OpenVision Technologies)
+ *
+ * Move all of the POP code into a separate file, "pop.c".
+ * Use strerror instead of get_errmsg.
+ *
+ */
+
+#define NO_SHORTNAMES   /* Tell config not to load remap.h */
+#include <../src/config.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/file.h>
+#include <stdio.h>
+#include <errno.h>
+#include "../src/syswait.h"
+#include "../src/systime.h"
+#include <stdlib.h>
+#include <string.h>
+#ifdef MAIL_USE_POP
+#include "pop.h"
+#endif
+
+#ifndef HAVE_STRERROR
+static char * strerror (int errnum);
+#endif /* HAVE_STRERROR */
+
+#ifdef MSDOS
+#undef access
+#endif /* MSDOS */
+
+#ifndef DIRECTORY_SEP
+#define DIRECTORY_SEP '/'
+#endif
+#ifndef IS_DIRECTORY_SEP
+#define IS_DIRECTORY_SEP(_c_) ((_c_) == DIRECTORY_SEP)
+#endif
+
+#ifdef WINDOWSNT
+#undef access
+#undef unlink
+#define fork() 0
+#define sys_wait(var) (*(var) = 0)
+/* Unfortunately, Samba doesn't seem to properly lock Unix files even
+   though the locking call succeeds (and indeed blocks local access from
+   other NT programs).  If you have direct file access using an NFS
+   client or something other than Samba, the locking call might work
+   properly - make sure it does before you enable this! */
+#define DISABLE_DIRECT_ACCESS
+#include <io.h>
+#endif /* WINDOWSNT */
+
+#if defined (HAVE_UNISTD_H) || defined (USG)
+#include <unistd.h>
+#endif /* unistd.h */
+#ifndef F_OK
+#define F_OK 0
+#define X_OK 1
+#define W_OK 2
+#define R_OK 4
+#endif /* No F_OK */
+
+#if defined (HAVE_FCNTL_H) || defined (USG)
+#include <fcntl.h>
+#endif /* fcntl.h */
+
+#if defined (XENIX) || defined (WINDOWSNT)
+#include <sys/locking.h>
+#endif
+
+#ifdef MAIL_USE_LOCKF
+#define MAIL_USE_SYSTEM_LOCK
+#endif
+
+#ifdef MAIL_USE_FLOCK
+#define MAIL_USE_SYSTEM_LOCK
+#endif
+
+#ifdef MAIL_USE_MMDF
+extern int lk_open (), lk_close ();
+#endif
+
+/* Cancel substitutions made by config.h for Emacs.  */
+#undef open
+#undef read
+#undef write
+#undef close
+
+static void fatal (char *, char*);
+static void error (char *, char *, char *);
+static void pfatal_with_name (char *);
+static void pfatal_and_delete (char *);
+static char *concat (char *, char *, char *);
+static long *xmalloc (unsigned int);
+#ifdef MAIL_USE_POP
+static int popmail (char *, char *, char *);
+static int pop_retr (popserver server, int msgno, int (*action)(), void *arg);
+static int mbx_write (char *, FILE *);
+static int mbx_delimit_begin (FILE *);
+static int mbx_delimit_end (FILE *);
+#endif
+
+/* Nonzero means this is name of a lock file to delete on fatal error.  */
+char *delete_lockname;
+
+int
+main (int argc, char *argv[])
+{
+  char *inname, *outname;
+#ifndef DISABLE_DIRECT_ACCESS
+  int indesc, outdesc;
+  int nread;
+  int status;
+#endif
+
+#ifndef MAIL_USE_SYSTEM_LOCK
+  struct stat st;
+  long now;
+  int tem;
+  char *lockname, *p;
+  char *tempname;
+  int desc;
+#endif /* not MAIL_USE_SYSTEM_LOCK */
+
+  delete_lockname = 0;
+
+  if (argc < 3)
+    {
+      fprintf (stderr, "Usage: movemail inbox destfile [POP-password]\n");
+      exit(1);
+    }
+
+  inname = argv[1];
+  outname = argv[2];
+
+#ifdef MAIL_USE_MMDF
+  mmdf_init (argv[0]);
+#endif
+
+  if (*outname == 0)
+    fatal ("Destination file name is empty", 0);
+
+  /* Check access to output file.  */
+  if (access (outname, F_OK) == 0 && access (outname, W_OK) != 0)
+    pfatal_with_name (outname);
+
+  /* Also check that outname's directory is writable to the real uid.  */
+  {
+    char *buf = (char *) xmalloc (strlen (outname) + 1);
+    char *cp;
+    strcpy (buf, outname);
+    cp = buf + strlen (buf);
+    while (cp > buf && !IS_DIRECTORY_SEP (cp[-1]))
+      *--cp = 0;
+    if (cp == buf)
+      *cp++ = '.';
+    if (access (buf, W_OK) != 0)
+      pfatal_with_name (buf);
+    free (buf);
+  }
+
+#ifdef MAIL_USE_POP
+  if (!strncmp (inname, "po:", 3))
+    {
+      int retcode = popmail (inname + 3, outname, argc > 3 ? argv[3] : NULL);
+      exit (retcode);
+    }
+
+  setuid (getuid ());
+#endif /* MAIL_USE_POP */
+
+#ifndef DISABLE_DIRECT_ACCESS
+
+  /* Check access to input file.  */
+  if (access (inname, R_OK | W_OK) != 0)
+    pfatal_with_name (inname);
+
+#ifndef MAIL_USE_MMDF
+#ifndef MAIL_USE_SYSTEM_LOCK
+  /* Use a lock file named after our first argument with .lock appended:
+     If it exists, the mail file is locked.  */
+  /* Note: this locking mechanism is *required* by the mailer
+     (on systems which use it) to prevent loss of mail.
+
+     On systems that use a lock file, extracting the mail without locking
+     WILL occasionally cause loss of mail due to timing errors!
+
+     So, if creation of the lock file fails
+     due to access permission on the mail spool directory,
+     you simply MUST change the permission
+     and/or make movemail a setgid program
+     so it can create lock files properly.
+
+     You might also wish to verify that your system is one
+     which uses lock files for this purpose.  Some systems use other methods.
+
+     If your system uses the `flock' system call for mail locking,
+     define MAIL_USE_SYSTEM_LOCK in config.h or the s-*.h file
+     and recompile movemail.  If the s- file for your system
+     should define MAIL_USE_SYSTEM_LOCK but does not, send a bug report
+     to bug-gnu-emacs@prep.ai.mit.edu so we can fix it.  */
+
+  lockname = concat (inname, ".lock", "");
+  tempname = (char *) xmalloc (strlen (inname) + strlen ("EXXXXXX") + 1);
+  strcpy (tempname, inname);
+  p = tempname + strlen (tempname);
+  while (p != tempname && !IS_DIRECTORY_SEP (p[-1]))
+    p--;
+  *p = 0;
+  strcpy (p, "EXXXXXX");
+  mktemp (tempname);
+  unlink (tempname);
+
+  while (1)
+    {
+      /* Create the lock file, but not under the lock file name.  */
+      /* Give up if cannot do that.  */
+      desc = open (tempname, O_WRONLY | O_CREAT | O_EXCL, 0666);
+      if (desc < 0)
+       {
+         char *message = (char *) xmalloc (strlen (tempname) + 50);
+         sprintf (message, "%s--see source file lib-src/movemail.c",
+                  tempname);
+         pfatal_with_name (message);
+       }
+      close (desc);
+
+      tem = link (tempname, lockname);
+      unlink (tempname);
+      if (tem >= 0)
+       break;
+      sleep (1);
+
+      /* If lock file is five minutes old, unlock it.
+        Five minutes should be good enough to cope with crashes
+        and wedgitude, and long enough to avoid being fooled
+        by time differences between machines.  */
+      if (stat (lockname, &st) >= 0)
+       {
+         now = time (0);
+         if (st.st_ctime < now - 300)
+           unlink (lockname);
+       }
+    }
+
+  delete_lockname = lockname;
+#endif /* not MAIL_USE_SYSTEM_LOCK */
+#endif /* not MAIL_USE_MMDF */
+
+  if (fork () == 0)
+    {
+      setuid (getuid ());
+
+#ifndef MAIL_USE_MMDF
+#ifdef MAIL_USE_SYSTEM_LOCK
+      indesc = open (inname, O_RDWR);
+#else  /* if not MAIL_USE_SYSTEM_LOCK */
+      indesc = open (inname, O_RDONLY);
+#endif /* not MAIL_USE_SYSTEM_LOCK */
+#else  /* MAIL_USE_MMDF */
+      indesc = lk_open (inname, O_RDONLY, 0, 0, 10);
+#endif /* MAIL_USE_MMDF */
+
+      if (indesc < 0)
+       pfatal_with_name (inname);
+
+#if defined (BSD) || defined (XENIX)
+      /* In case movemail is setuid to root, make sure the user can
+        read the output file.  */
+      /* This is desirable for all systems
+        but I don't want to assume all have the umask system call */
+      umask (umask (0) & 0333);
+#endif /* BSD or Xenix */
+      outdesc = open (outname, O_WRONLY | O_CREAT | O_EXCL, 0666);
+      if (outdesc < 0)
+       pfatal_with_name (outname);
+#ifdef MAIL_USE_SYSTEM_LOCK
+#ifdef MAIL_USE_LOCKF
+      if (lockf (indesc, F_LOCK, 0) < 0) pfatal_with_name (inname);
+#else /* not MAIL_USE_LOCKF */
+#ifdef XENIX
+      if (locking (indesc, LK_RLCK, 0L) < 0) pfatal_with_name (inname);
+#else
+#ifdef WINDOWSNT
+      if (locking (indesc, LK_RLCK, -1L) < 0) pfatal_with_name (inname);
+#else
+      if (flock (indesc, LOCK_EX) < 0) pfatal_with_name (inname);
+#endif
+#endif
+#endif /* not MAIL_USE_LOCKF */
+#endif /* MAIL_USE_SYSTEM_LOCK */
+
+      {
+       char buf[1024];
+
+       while (1)
+         {
+           nread = read (indesc, buf, sizeof buf);
+           if (nread != write (outdesc, buf, nread))
+             {
+               int saved_errno = errno;
+               unlink (outname);
+               errno = saved_errno;
+               pfatal_with_name (outname);
+             }
+           if (nread < sizeof buf)
+             break;
+         }
+      }
+
+#ifdef BSD
+      if (fsync (outdesc) < 0)
+       pfatal_and_delete (outname);
+#endif
+
+      /* Check to make sure no errors before we zap the inbox.  */
+      if (close (outdesc) != 0)
+       pfatal_and_delete (outname);
+
+#ifdef MAIL_USE_SYSTEM_LOCK
+#if defined (STRIDE) || defined (XENIX) || defined (WINDOWSNT)
+      /* Stride, xenix have file locking, but no ftruncate.  This mess will do. */
+      close (open (inname, O_CREAT | O_TRUNC | O_RDWR, 0666));
+#else
+      ftruncate (indesc, 0L);
+#endif /* STRIDE or XENIX */
+#endif /* MAIL_USE_SYSTEM_LOCK */
+
+#ifdef MAIL_USE_MMDF
+      lk_close (indesc, 0, 0, 0);
+#else
+      close (indesc);
+#endif
+
+#ifndef MAIL_USE_SYSTEM_LOCK
+      /* Delete the input file; if we can't, at least get rid of its
+        contents.  */
+#ifdef MAIL_UNLINK_SPOOL
+      /* This is generally bad to do, because it destroys the permissions
+        that were set on the file.  Better to just empty the file.  */
+      if (unlink (inname) < 0 && errno != ENOENT)
+#endif /* MAIL_UNLINK_SPOOL */
+       creat (inname, 0600);
+#endif /* not MAIL_USE_SYSTEM_LOCK */
+
+      exit (0);
+    }
+
+  wait (&status);
+  if (!WIFEXITED (status))
+    exit (1);
+  else if (WEXITSTATUS (status) != 0)
+    exit (WEXITSTATUS (status));
+
+#if !defined (MAIL_USE_MMDF) && !defined (MAIL_USE_SYSTEM_LOCK)
+  unlink (lockname);
+#endif /* not MAIL_USE_MMDF and not MAIL_USE_SYSTEM_LOCK */
+
+#endif /* ! DISABLE_DIRECT_ACCESS */
+
+  return 0;
+}
+\f
+/* Print error message and exit.  */
+
+static void
+fatal (char *s1, char *s2)
+{
+  if (delete_lockname)
+    unlink (delete_lockname);
+  error (s1, s2, NULL);
+  exit (1);
+}
+
+/* Print error message.  `s1' is printf control string, `s2' is arg for it. */
+
+static void
+error (char *s1, char *s2, char *s3)
+{
+  fprintf (stderr, "movemail: ");
+  fprintf (stderr, s1, s2, s3);
+  fprintf (stderr, "\n");
+}
+
+static void
+pfatal_with_name (char *name)
+{
+  char *s = concat ("", strerror (errno), " for %s");
+  fatal (s, name);
+}
+
+static void
+pfatal_and_delete (char *name)
+{
+  char *s = concat ("", strerror (errno), " for %s");
+  unlink (name);
+  fatal (s, name);
+}
+
+/* Return a newly-allocated string whose contents concatenate those of s1, s2, s3.  */
+
+static char *
+concat (char *s1, char *s2, char *s3)
+{
+  int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
+  char *result = (char *) xmalloc (len1 + len2 + len3 + 1);
+
+  strcpy (result, s1);
+  strcpy (result + len1, s2);
+  strcpy (result + len1 + len2, s3);
+  *(result + len1 + len2 + len3) = 0;
+
+  return result;
+}
+
+/* Like malloc but get fatal error if memory is exhausted.  */
+
+static long *
+xmalloc (unsigned int size)
+{
+  long *result = (long *) malloc (size);
+  if (!result)
+    fatal ("virtual memory exhausted", 0);
+  return result;
+}
+\f
+/* This is the guts of the interface to the Post Office Protocol.  */
+
+#ifdef MAIL_USE_POP
+
+#ifndef WINDOWSNT
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#else
+#undef _WINSOCKAPI_
+#include <winsock.h>
+#endif
+#include <stdio.h>
+#include <pwd.h>
+
+#define NOTOK (-1)
+#define OK 0
+#define DONE 1
+
+char *progname;
+FILE *sfi;
+FILE *sfo;
+char ibuffer[BUFSIZ];
+char obuffer[BUFSIZ];
+char Errmsg[80];
+
+static int
+popmail (char *user, char *outfile, char *password)
+{
+  int nmsgs, nbytes;
+  register int i;
+  int mbfi;
+  FILE *mbf;
+  popserver server;
+
+  server = pop_open (0, user, password, POP_NO_GETPASS);
+  if (! server)
+    {
+      error (pop_error, NULL, NULL);
+      return (1);
+    }
+
+  if (pop_stat (server, &nmsgs, &nbytes))
+    {
+      error (pop_error, NULL, NULL);
+      return (1);
+    }
+
+  if (!nmsgs)
+    {
+      pop_close (server);
+      return (0);
+    }
+
+  mbfi = open (outfile, O_WRONLY | O_CREAT | O_EXCL, 0666);
+  if (mbfi < 0)
+    {
+      pop_close (server);
+      error ("Error in open: %s, %s", strerror (errno), outfile);
+      return (1);
+    }
+#ifndef __CYGWIN32__
+  fchown (mbfi, getuid (), -1);
+#endif
+
+  if ((mbf = fdopen (mbfi, "wb")) == NULL)
+    {
+      pop_close (server);
+      error ("Error in fdopen: %s", strerror (errno), NULL);
+      close (mbfi);
+      unlink (outfile);
+      return (1);
+    }
+
+  for (i = 1; i <= nmsgs; i++)
+    {
+      mbx_delimit_begin (mbf);
+      if (pop_retr (server, i, mbx_write, mbf) != OK)
+       {
+         error (Errmsg, NULL, NULL);
+         close (mbfi);
+         return (1);
+       }
+      mbx_delimit_end (mbf);
+      fflush (mbf);
+      if (ferror (mbf))
+       {
+         error ("Error in fflush: %s", strerror (errno), NULL);
+         pop_close (server);
+         close (mbfi);
+         return (1);
+       }
+    }
+
+  /* On AFS, a call to write only modifies the file in the local
+   *     workstation's AFS cache.  The changes are not written to the server
+   *      until a call to fsync or close is made.  Users with AFS home
+   *      directories have lost mail when over quota because these checks were
+   *      not made in previous versions of movemail. */
+
+#ifdef BSD
+  if (fsync (mbfi) < 0)
+    {
+      error ("Error in fsync: %s", strerror (errno), NULL);
+      return (1);
+    }
+#endif
+
+  if (close (mbfi) == -1)
+    {
+      error ("Error in close: %s", strerror (errno), NULL);
+      return (1);
+    }
+
+  for (i = 1; i <= nmsgs; i++)
+    {
+      if (pop_delete (server, i))
+       {
+         error (pop_error, NULL, NULL);
+         pop_close (server);
+         return (1);
+       }
+    }
+
+  if (pop_quit (server))
+    {
+      error (pop_error, NULL, NULL);
+      return (1);
+    }
+    
+  return (0);
+}
+
+static int
+pop_retr (popserver server, int msgno, int (*action)(), void *arg)
+{
+  char *line;
+  int ret;
+
+  if (pop_retrieve_first (server, msgno, &line))
+    {
+      strncpy (Errmsg, pop_error, sizeof (Errmsg));
+      Errmsg[sizeof (Errmsg)-1] = '\0';
+      return (NOTOK);
+    }
+
+  while (! (ret = pop_retrieve_next (server, &line)))
+    {
+      if (! line)
+       break;
+
+      if ((*action)(line, arg) != OK)
+       {
+         strcpy (Errmsg, strerror (errno));
+         pop_close (server);
+         return (NOTOK);
+       }
+    }
+
+  if (ret)
+    {
+      strncpy (Errmsg, pop_error, sizeof (Errmsg));
+      Errmsg[sizeof (Errmsg)-1] = '\0';
+      return (NOTOK);
+    }
+
+  return (OK);
+}
+
+/* Do this as a macro instead of using strcmp to save on execution time. */
+#define IS_FROM_LINE(a) ((a[0] == 'F') \
+                        && (a[1] == 'r') \
+                        && (a[2] == 'o') \
+                        && (a[3] == 'm') \
+                        && (a[4] == ' '))
+
+static int
+mbx_write (char *line, FILE *mbf)
+{
+  if (IS_FROM_LINE (line))
+    {
+      if (fputc ('>', mbf) == EOF)
+       return (NOTOK);
+    }
+  if (fputs (line, mbf) == EOF) 
+    return (NOTOK);
+  if (fputc (0x0a, mbf) == EOF)
+    return (NOTOK);
+  return (OK);
+}
+
+static int
+mbx_delimit_begin (FILE *mbf)
+{
+  if (fputs ("\f\n0, unseen,,\n", mbf) == EOF)
+    return (NOTOK);
+  return (OK);
+}
+
+static int
+mbx_delimit_end (FILE *mbf)
+{
+  if (putc ('\037', mbf) == EOF)
+    return (NOTOK);
+  return (OK);
+}
+
+#endif /* MAIL_USE_POP */
+\f
+#ifndef HAVE_STRERROR
+static char *
+strerror (int errnum)
+{
+  extern char *sys_errlist[];
+  extern int sys_nerr;
+
+  if (errnum >= 0 && errnum < sys_nerr)
+    return sys_errlist[errnum];
+  return (char *) "Unknown error";
+}
+
+#endif /* ! HAVE_STRERROR */
diff --git a/lib-src/ootags.c b/lib-src/ootags.c
new file mode 100644 (file)
index 0000000..8a9d0c3
--- /dev/null
@@ -0,0 +1,5432 @@
+/* Tags file maker to go with GNU Emacs
+   Copyright (C) 1984, 87, 88, 89, 93, 94, 95
+   Free Software Foundation, Inc. and Ken Arnold
+
+This file is not considered part of GNU Emacs.
+
+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 2 of the License, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+
+/*
+ * Authors:
+ *     Ctags originally by Ken Arnold.
+ *     Fortran added by Jim Kleckner.
+ *     Ed Pelegri-Llopart added C typedefs.
+ *     Gnu Emacs TAGS format and modifications by RMS?
+ *     Sam Kendall added C++.
+ *     Francesco Potorti` reorganised C and C++ based on work by Joe Wells.
+ *     Regexp tags by Tom Tromey.
+ *
+ *     Francesco Potorti` (F.Potorti@cnuce.cnr.it) is the current maintainer.
+ */
+
+char pot_etags_version[] = "@(#) pot revision number is 12.28";
+
+/* Prototyping magic snarfed from gmalloc.c */
+#if defined (__cplusplus) || defined (__STDC__)
+#undef PP
+#define        PP(args)        args
+#undef __ptr_t
+#define        __ptr_t         void *
+#else /* Not C++ or ANSI C.  */
+#undef PP
+#define        PP(args)        ()
+#undef const
+#define        const
+#undef __ptr_t
+#define        __ptr_t         char *
+#endif /* C++ or ANSI C.  */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+  /* On some systems, Emacs defines static as nothing for the sake
+     of unexec.  We don't want that here since we don't use unexec. */
+# undef static
+# define ETAGS_REGEXPS         /* use the regexp features */
+# define LONG_OPTIONS          /* accept long options */
+#endif /* HAVE_CONFIG_H */
+
+#define        TRUE    1
+#define        FALSE   0
+
+#ifndef DEBUG
+# define DEBUG FALSE
+#endif
+
+#ifdef MSDOS
+# include <fcntl.h>
+# include <sys/param.h>
+# include <io.h>
+# ifndef HAVE_CONFIG_H
+#   define DOS_NT
+#   include <sys/config.h>
+# endif
+#endif /* MSDOS */
+
+#ifdef WINDOWSNT
+# include <stdlib.h>
+# include <fcntl.h>
+# include <string.h>
+# include <io.h>
+# define MAXPATHLEN _MAX_PATH
+# ifdef HAVE_CONFIG_H
+#   undef HAVE_NTGUI
+# else
+#   define DOS_NT
+#   define HAVE_GETCWD
+# endif /* not HAVE_CONFIG_H */
+#endif /* WINDOWSNT */
+
+#if !defined (WINDOWSNT) && defined (STDC_HEADERS)
+#include <stdlib.h>
+#include <string.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#else
+# ifdef HAVE_GETCWD
+    extern char *getcwd ();
+# endif
+#endif /* HAVE_UNISTD_H */
+
+#include <stdio.h>
+#include <ctype.h>
+#include <errno.h>
+#ifndef errno
+  extern int errno;
+#endif
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if !defined (S_ISREG) && defined (S_IFREG)
+# define S_ISREG(m)    (((m) & S_IFMT) == S_IFREG)
+#endif
+
+#ifdef LONG_OPTIONS
+# include <getopt.h>
+#else
+# define getopt_long(argc,argv,optstr,lopts,lind) getopt (argc, argv, optstr)
+  extern char *optarg;
+  extern int optind, opterr;
+#endif /* LONG_OPTIONS */
+
+#ifdef ETAGS_REGEXPS
+# include <regex.h>
+#endif /* ETAGS_REGEXPS */
+
+/* Define CTAGS to make the program "ctags" compatible with the usual one.
+ Leave it undefined to make the program "etags", which makes emacs-style
+ tag tables and tags typedefs, #defines and struct/union/enum by default. */
+#ifdef CTAGS
+# undef  CTAGS
+# define CTAGS TRUE
+#else
+# define CTAGS FALSE
+#endif
+
+/* Exit codes for success and failure.  */
+#ifdef VMS
+# define       GOOD    1
+# define       BAD     0
+#else
+# define       GOOD    0
+# define       BAD     1
+#endif
+
+/* C extensions. */
+#define C_PLPL 0x00001         /* C++ */
+#define C_STAR 0x00003         /* C* */
+#define C_JAVA 0x00005         /* JAVA */
+#define YACC   0x10000         /* yacc file */
+
+#define streq(s,t)     ((DEBUG && (s) == NULL && (t) == NULL   \
+                         && (abort (), 1)) || !strcmp (s, t))
+#define strneq(s,t,n)  ((DEBUG && (s) == NULL && (t) == NULL   \
+                         && (abort (), 1)) || !strncmp (s, t, n))
+
+#define lowcase(c)     tolower ((char)c)
+
+#define CHARS 256              /* 2^sizeof(char) */
+#define CHAR(x)                ((unsigned int)x & (CHARS - 1))
+#define        iswhite(c)      (_wht[CHAR(c)]) /* c is white */
+#define notinname(c)   (_nin[CHAR(c)]) /* c is not in a name */
+#define        begtoken(c)     (_btk[CHAR(c)]) /* c can start token */
+#define        intoken(c)      (_itk[CHAR(c)]) /* c can be in token */
+#define        endtoken(c)     (_etk[CHAR(c)]) /* c ends tokens */
+
+/*#ifdef INFODOCK*/
+/*#undef OO_BROWSER*/
+/* Due to the way this file is constructed, this unfortunately doesn't */
+/* work except for documentation purposes. -slb */
+#define OO_BROWSER 1
+/*#endif*/
+
+#ifdef OO_BROWSER
+#define set_construct(construct) \
+  if (!oo_browser_construct) oo_browser_construct = construct
+void oo_browser_clear_all_globals();
+void oo_browser_clear_some_globals();
+void oo_browser_check_and_clear_structtype();
+#endif
+
+/*
+ *     xnew, xrnew -- allocate, reallocate storage
+ *
+ * SYNOPSIS:   Type *xnew (int n, Type);
+ *             Type *xrnew (OldPointer, int n, Type);
+ */
+#ifdef chkmalloc
+# include "chkmalloc.h"
+# define xnew(n,Type)    ((Type *) trace_malloc (__FILE__, __LINE__, \
+                                                 (n) * sizeof (Type)))
+# define xrnew(op,n,Type) ((Type *) trace_realloc (__FILE__, __LINE__, \
+                                                  (op), (n) * sizeof (Type)))
+#else
+# define xnew(n,Type)    ((Type *) xmalloc ((n) * sizeof (Type)))
+# define xrnew(op,n,Type) ((Type *) xrealloc ((op), (n) * sizeof (Type)))
+#endif
+
+typedef int bool;
+
+typedef void Lang_function ();
+
+typedef struct
+{
+  char *name;
+  Lang_function *function;
+  char **suffixes;
+  char **interpreters;
+} language;
+
+typedef struct node_st
+{                              /* sorting structure            */
+  char *name;                  /* function or type name        */
+#ifdef OO_BROWSER
+  short int construct;         /* Construct type for the OO-Browser */
+#endif
+  char *file;                  /* file name                    */
+  bool is_func;                        /* use pattern or line no       */
+  bool been_warned;            /* set if noticed dup           */
+  int lno;                     /* line number tag is on        */
+  long cno;                    /* character number line starts on */
+  char *pat;                   /* search pattern               */
+  struct node_st *left, *right;        /* left and right sons          */
+} node;
+
+#ifdef OO_BROWSER
+/* If you add to this array, you must add a corresponding entry to the
+   following enum. */
+static char *oo_browser_default_classes[] =
+  /* Lack of square brackets around some of these entries are intentional. */
+  {"null", "class", "method", "[constant]", "[enumeration]", "[enum_label]",
+   "extern", "[function]", "[macro]", "objc", "[structure]", "[type]",
+   "[union]", "[variable]"};
+
+/* If you add to this enum, you must add a corresponding entry to the
+   preceding array. */
+enum oo_browser_constructs {C_NULL, C_CLASS, C_METHOD, C_CONSTANT, C_ENUMERATION,
+                            C_ENUM_LABEL, C_EXTERN, C_FUNCTION, C_MACRO,
+                            C_OBJC, C_STRUCTURE, C_TYPE, C_UNION, C_VARIABLE};
+
+enum oo_browser_constructs oo_browser_construct = C_NULL;
+#endif
+
+/*
+ * A `linebuffer' is a structure which holds a line of text.
+ * `readline_internal' reads a line from a stream into a linebuffer
+ * and works regardless of the length of the line.
+ * SIZE is the size of BUFFER, LEN is the length of the string in
+ * BUFFER after readline reads it.
+ */
+typedef struct
+{
+  long size;
+  int len;
+  char *buffer;
+} linebuffer;
+
+extern char *getenv PP ((const char *envvar));
+
+/* Many compilers barf on this:
+       Lang_function Asm_labels;
+   so let's write it this way */
+void Asm_labels PP ((FILE *inf));
+void C_entries PP ((int c_ext, FILE *inf));
+void default_C_entries PP ((FILE *inf));
+void plain_C_entries PP ((FILE *inf));
+void Cjava_entries PP ((FILE *inf));
+void Cplusplus_entries PP ((FILE *inf));
+void Yacc_entries PP ((FILE *inf));
+void Cobol_paragraphs PP ((FILE *inf));
+void Cstar_entries PP ((FILE *inf));
+void Erlang_functions PP ((FILE *inf));
+void Fortran_functions PP ((FILE *inf));
+void Lisp_functions PP ((FILE *inf));
+void Pascal_functions PP ((FILE *inf));
+void Perl_functions PP ((FILE *inf));
+void Postscript_functions PP ((FILE *inf));
+void Prolog_functions PP ((FILE *inf));
+void Python_functions PP ((FILE *inf));
+void Scheme_functions PP ((FILE *inf));
+void TeX_functions PP ((FILE *inf));
+void just_read_file PP ((FILE *inf));
+
+void print_language_names PP ((void));
+void print_version PP ((void));
+void print_help PP ((void));
+
+language *get_language_from_name PP ((char *name));
+language *get_language_from_interpreter PP ((char *interpreter));
+language *get_language_from_suffix PP ((char *suffix));
+int total_size_of_entries PP ((node *np));
+long readline PP ((linebuffer *lbp, FILE *stream));
+long readline_internal PP ((linebuffer *lbp, FILE *stream));
+#ifdef ETAGS_REGEXPS
+void analyse_regex PP ((char *regex_arg));
+void add_regex PP ((char *regexp_pattern, language *lang));
+void free_patterns PP ((void));
+#endif /* ETAGS_REGEXPS */
+void error PP ((const char *s1, const char *s2));
+void suggest_asking_for_help PP ((void));
+void fatal PP ((char *s1, char *s2));
+void pfatal PP ((char *s1));
+void add_node PP ((node *np, node **cur_node_p));
+
+void init PP ((void));
+void initbuffer PP ((linebuffer *lbp));
+void find_entries PP ((char *file, FILE *inf));
+void free_tree PP ((node *np));
+void pfnote PP ((char *name, bool is_func, char *linestart, int linelen, int lno, long cno));
+void new_pfnote PP ((char *name, int namelen, bool is_func, char *linestart, int linelen, int lno, long cno));
+void process_file PP ((char *file));
+void put_entries PP ((node *np));
+void takeprec PP ((void));
+
+char *concat PP ((char *s1, char *s2, char *s3));
+char *skip_spaces PP ((char *cp));
+char *skip_non_spaces PP ((char *cp));
+char *savenstr PP ((char *cp, int len));
+char *savestr PP ((char *cp));
+char *etags_strchr PP ((char *sp, int c));
+char *etags_strrchr PP ((char *sp, int c));
+char *etags_getcwd PP ((void));
+char *relative_filename PP ((char *file, char *dir));
+char *absolute_filename PP ((char *file, char *dir));
+char *absolute_dirname PP ((char *file, char *dir));
+bool filename_is_absolute PP ((char *fn));
+void canonicalize_filename PP ((char *fn));
+void grow_linebuffer PP ((linebuffer *lbp, int toksize));
+long *xmalloc PP ((unsigned int size));
+long *xrealloc PP ((char *ptr, unsigned int size));
+
+\f
+char searchar = '/';           /* use /.../ searches */
+
+char *tagfile;                 /* output file */
+char *progname;                        /* name this program was invoked with */
+char *cwd;                     /* current working directory */
+char *tagfiledir;              /* directory of tagfile */
+FILE *tagf;                    /* ioptr for tags file */
+
+char *curfile;                 /* current input file name */
+language *curlang;             /* current language */
+
+int lineno;                    /* line number of current line */
+long charno;                   /* current character number */
+long linecharno;               /* charno of start of current line */
+char *dbp;                     /* pointer to start of current tag */
+node *head;                    /* the head of the binary tree of tags */
+
+linebuffer lb;                 /* the current line */
+linebuffer token_name;         /* used by C_entries as a temporary area */
+struct
+{
+  long linepos;
+  linebuffer lb;               /* used by C_entries instead of lb */
+} lbs[2];
+
+/* boolean "functions" (see init)      */
+bool _wht[CHARS], _nin[CHARS], _itk[CHARS], _btk[CHARS], _etk[CHARS];
+char
+  /* white chars */
+  *white = " \f\t\n\r",
+  /* not in a name */
+  *nonam = " \f\t\n\r(=,[;",
+  /* token ending chars */
+  *endtk = " \t\n\r\"'#()[]{}=-+%*/&|^~!<>;,.:?",
+  /* token starting chars */
+  *begtk = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz$~@",
+  /* valid in-token chars */
+  *midtk = "ABCDEFGHIJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyz$0123456789";
+
+bool append_to_tagfile;                /* -a: append to tags */
+/* The following four default to TRUE for etags, but to FALSE for ctags.  */
+bool typedefs;                 /* -t: create tags for C typedefs */
+bool typedefs_and_cplusplus;   /* -T: create tags for C typedefs, level */
+                               /* 0 struct/enum/union decls, and C++ */
+                               /* member functions. */
+bool constantypedefs;          /* -d: create tags for C #define, enum */
+                               /* constants and variables. */
+                               /* -D: opposite of -d.  Default under ctags. */
+bool globals;                  /* create tags for global variables */
+bool members;                  /* create tags for C member variables */
+bool update;                   /* -u: update tags */
+bool vgrind_style;             /* -v: create vgrind style index output */
+bool no_warnings;              /* -w: suppress warnings */
+bool cxref_style;              /* -x: create cxref style output */
+bool cplusplus;                        /* .[hc] means C++, not C */
+bool noindentypedefs;          /* -I: ignore indentation in C */
+#ifdef OO_BROWSER
+bool oo_browser_format;                /* -O: OO-Browser tags format */
+#endif
+
+#ifdef LONG_OPTIONS
+struct option longopts[] =
+{
+  { "append",                  no_argument,       NULL,     'a'   },
+  { "backward-search",         no_argument,       NULL,     'B'   },
+  { "c++",                     no_argument,       NULL,     'C'   },
+  { "cxref",                   no_argument,       NULL,     'x'   },
+  { "defines",                 no_argument,       NULL,     'd'   },
+  { "no-defines",              no_argument,       NULL,     'D'   },
+  { "globals",                 no_argument,       &globals, TRUE  },
+  { "no-globals",              no_argument,       &globals, FALSE },
+  { "help",                    no_argument,       NULL,     'h'   },
+  { "help",                    no_argument,       NULL,     'H'   },
+  { "ignore-indentation",      no_argument,       NULL,     'I'   },
+  { "include",                 required_argument, NULL,     'i'   },
+  { "language",                 required_argument, NULL,     'l'   },
+  { "members",                 no_argument,       &members, TRUE  },
+  { "no-members",              no_argument,       &members, FALSE },
+  { "no-warn",                 no_argument,       NULL,     'w'   },
+  { "output",                  required_argument, NULL,     'o'   },
+#ifdef OO_BROWSER
+  { "oo-browser",              no_argument,       NULL,     'O'   },
+#endif
+#ifdef ETAGS_REGEXPS  
+  { "regex",                   required_argument, NULL,     'r'   },
+  { "no-regex",                        no_argument,       NULL,     'R'   },
+#endif /* ETAGS_REGEXPS */  
+  { "typedefs",                        no_argument,       NULL,     't'   },
+  { "typedefs-and-c++",                no_argument,       NULL,     'T'   },
+  { "update",                  no_argument,       NULL,     'u'   },
+  { "version",                 no_argument,       NULL,     'V'   },
+  { "vgrind",                  no_argument,       NULL,     'v'   },
+  { 0 }
+};
+#endif /* LONG_OPTIONS */
+
+#ifdef ETAGS_REGEXPS
+/* Structure defining a regular expression.  Elements are
+   the compiled pattern, and the name string. */
+typedef struct pattern
+{
+  struct pattern *p_next;
+  language *language;
+  char *regex;
+  struct re_pattern_buffer *pattern;
+  struct re_registers regs;
+  char *name_pattern;
+  bool error_signaled;
+} pattern;
+
+/* Array of all regexps. */
+pattern *p_head = NULL;
+#endif /* ETAGS_REGEXPS */
+
+/*
+ * Language stuff.
+ */
+
+/* Non-NULL if language fixed. */
+language *forced_lang = NULL;
+
+/* Assembly code */
+char *Asm_suffixes [] = { "a", /* Unix assembler */
+                         "asm", /* Microcontroller assembly */
+                         "def", /* BSO/Tasking definition includes  */
+                         "inc", /* Microcontroller include files */
+                         "ins", /* Microcontroller include files */
+                         "s", "sa", /* Unix assembler */
+                         "src", /* BSO/Tasking C compiler output */
+                         NULL
+                       };
+
+/* Note that .c and .h can be considered C++, if the --c++ flag was
+   given.  That is why default_C_entries is called here. */
+char *default_C_suffixes [] =
+  { "c", "h", NULL };
+
+char *Cplusplus_suffixes [] =
+  { "C", "H", "c++", "cc", "cpp", "cxx", "h++", "hh", "hpp", "hxx",
+    "M",                       /* Objective C++ */
+    "pdb",                     /* Postscript with C syntax */
+    NULL };
+
+char *Cjava_suffixes [] =
+  { "java", NULL };
+
+char *Cobol_suffixes [] =
+  { "COB", "cob", NULL };
+
+char *Cstar_suffixes [] =
+  { "cs", "hs", NULL };
+
+char *Erlang_suffixes [] =
+  { "erl", "hrl", NULL };
+
+char *Fortran_suffixes [] =
+  { "F", "f", "f90", "for", NULL };
+
+char *Lisp_suffixes [] =
+  { "cl", "clisp", "el", "l", "lisp", "lsp", "ml", NULL };
+
+char *Pascal_suffixes [] =
+  { "p", "pas", NULL };
+
+char *Perl_suffixes [] =
+  { "pl", "pm", NULL };
+char *Perl_interpreters [] =
+  { "perl", "@PERL@", NULL };
+
+char *plain_C_suffixes [] =
+  { "pc",                      /* Pro*C file */
+    "m",                       /* Objective C file */
+    "lm",                      /* Objective lex file */
+     NULL };
+
+char *Postscript_suffixes [] =
+  { "ps", NULL };
+
+char *Prolog_suffixes [] =
+  { "prolog", NULL };
+
+char *Python_suffixes [] =
+  { "py", NULL };
+
+/* Can't do the `SCM' or `scm' prefix with a version number. */
+char *Scheme_suffixes [] =
+  { "SCM", "SM", "oak", "sch", "scheme", "scm", "sm", "ss", "t", NULL };
+
+char *TeX_suffixes [] =
+  { "TeX", "bib", "clo", "cls", "ltx", "sty", "tex", NULL };
+
+char *Yacc_suffixes [] =
+  { "y", "ym", NULL };         /* .ym is Objective yacc file */
+
+/*
+ * Table of languages.
+ *
+ * It is ok for a given function to be listed under more than one
+ * name.  I just didn't.
+ */
+
+language lang_names [] =
+{
+  { "asm",     Asm_labels,          Asm_suffixes,         NULL              },
+  { "c",       default_C_entries,   default_C_suffixes,   NULL              },
+  { "c++",     Cplusplus_entries,   Cplusplus_suffixes,   NULL              },
+  { "c*",      Cstar_entries,       Cstar_suffixes,       NULL              },
+  { "cobol",   Cobol_paragraphs,    Cobol_suffixes,       NULL              },
+  { "erlang",  Erlang_functions,    Erlang_suffixes,      NULL              },
+  { "fortran", Fortran_functions,   Fortran_suffixes,     NULL              },
+  { "java",    Cjava_entries,       Cjava_suffixes,       NULL              },
+  { "lisp",    Lisp_functions,      Lisp_suffixes,        NULL              },
+  { "pascal",  Pascal_functions,    Pascal_suffixes,      NULL              },
+  { "perl",    Perl_functions,      Perl_suffixes,        Perl_interpreters },
+  { "postscript", Postscript_functions, Postscript_suffixes, NULL           },
+  { "proc",    plain_C_entries,     plain_C_suffixes,     NULL              },
+  { "prolog",  Prolog_functions,    Prolog_suffixes,      NULL              },
+  { "python",  Python_functions,    Python_suffixes,      NULL              },
+  { "scheme",  Scheme_functions,    Scheme_suffixes,      NULL              },
+  { "tex",     TeX_functions,       TeX_suffixes,         NULL              },
+  { "yacc",    Yacc_entries,        Yacc_suffixes,        NULL              },
+  { "auto", NULL },             /* default guessing scheme */
+  { "none", just_read_file },   /* regexp matching only */
+  { NULL, NULL }                /* end of list */
+};
+
+\f
+void
+print_language_names ()
+{
+  language *lang;
+  char **ext;
+
+  puts ("\nThese are the currently supported languages, along with the\n\
+default file name suffixes:");
+  for (lang = lang_names; lang->name != NULL; lang++)
+    {
+      printf ("\t%s\t", lang->name);
+      if (lang->suffixes != NULL)
+       for (ext = lang->suffixes; *ext != NULL; ext++)
+         printf (" .%s", *ext);
+      puts ("");
+    }
+  puts ("Where `auto' means use default language for files based on file\n\
+name suffix, and `none' means only do regexp processing on files.\n\
+If no language is specified and no matching suffix is found,\n\
+the first line of the file is read for a sharp-bang (#!) sequence\n\
+followed by the name of an interpreter.  If no such sequence is found,\n\
+Fortran is tried first; if no tags are found, C is tried next.");
+}
+
+#ifndef VERSION
+# define VERSION "20"
+#endif
+void
+print_version ()
+{
+  printf ("%s (GNU Emacs %s)\n", (CTAGS) ? "ctags" : "etags", VERSION);
+  puts ("Copyright (C) 1996 Free Software Foundation, Inc. and Ken Arnold");
+  puts ("This program is distributed under the same terms as Emacs");
+
+  exit (GOOD);
+}
+
+void
+print_help ()
+{
+  printf ("Usage: %s [options] [[regex-option ...] file-name] ...\n\
+\n\
+These are the options accepted by %s.\n", progname, progname);
+#ifdef LONG_OPTIONS
+  puts ("You may use unambiguous abbreviations for the long option names.");
+#else
+  puts ("Long option names do not work with this executable, as it is not\n\
+linked with GNU getopt.");
+#endif /* LONG_OPTIONS */
+  puts ("A - as file name means read names from stdin (one per line).");
+  if (!CTAGS)
+    printf ("  Absolute names are stored in the output file as they are.\n\
+Relative ones are stored relative to the output file's directory.");
+  puts ("\n");
+
+  puts ("-a, --append\n\
+        Append tag entries to existing tags file.");
+
+  if (CTAGS)
+    puts ("-B, --backward-search\n\
+        Write the search commands for the tag entries using '?', the\n\
+        backward-search command instead of '/', the forward-search command.");
+
+  puts ("-C, --c++\n\
+        Treat files whose name suffix defaults to C language as C++ files.");
+
+  if (CTAGS)
+    puts ("-d, --defines\n\
+        Create tag entries for C #define constants and enum constants, too.");
+  else
+    puts ("-D, --no-defines\n\
+        Don't create tag entries for C #define constants and enum constants.\n\
+       This makes the tags file smaller.");
+
+  if (!CTAGS)
+    {
+      puts ("-i FILE, --include=FILE\n\
+        Include a note in tag file indicating that, when searching for\n\
+        a tag, one should also consult the tags file FILE after\n\
+        checking the current file.");
+      puts ("-l LANG, --language=LANG\n\
+        Force the following files to be considered as written in the\n\
+       named language up to the next --language=LANG option.");
+    }
+
+  if (CTAGS)
+    puts ("--globals\n\
+       Create tag entries for global variables in some languages.");
+  else
+    puts ("--no-globals\n\
+       Do not create tag entries for global variables in some\n\
+       languages.  This makes the tags file smaller.");
+  puts ("--members\n\
+       Create tag entries for member variables in C and derived languages.");
+
+#ifdef ETAGS_REGEXPS
+  puts ("-r /REGEXP/, --regex=/REGEXP/ or --regex=@regexfile\n\
+        Make a tag for each line matching pattern REGEXP in the\n\
+       following files.  regexfile is a file containing one REGEXP\n\
+       per line.  REGEXP is anchored (as if preceded by ^).\n\
+       The form /REGEXP/NAME/ creates a named tag.  For example Tcl\n\
+       named tags can be created with:\n\
+       --regex=/proc[ \\t]+\\([^ \\t]+\\)/\\1/.");
+  puts ("-R, --no-regex\n\
+        Don't create tags from regexps for the following files.");
+#endif /* ETAGS_REGEXPS */
+  puts ("-o FILE, --output=FILE\n\
+        Write the tags to FILE.");
+#ifdef OO_BROWSER
+  puts ("-O, --oo-browser\n\
+       Generate a specialized tags format used only by the Altrasoft OO-Browser.");
+#endif
+  puts ("-I, --ignore-indentation\n\
+        Don't rely on indentation quite as much as normal.  Currently,\n\
+        this means not to assume that a closing brace in the first\n\
+        column is the final brace of a function or structure\n\
+        definition in C and C++.");
+
+  if (CTAGS)
+    {
+      puts ("-t, --typedefs\n\
+        Generate tag entries for C typedefs.");
+      puts ("-T, --typedefs-and-c++\n\
+        Generate tag entries for C typedefs, C struct/enum/union tags,\n\
+        and C++ member functions.");
+      puts ("-u, --update\n\
+        Update the tag entries for the given files, leaving tag\n\
+        entries for other files in place.  Currently, this is\n\
+        implemented by deleting the existing entries for the given\n\
+        files and then rewriting the new entries at the end of the\n\
+        tags file.  It is often faster to simply rebuild the entire\n\
+        tag file than to use this.");
+      puts ("-v, --vgrind\n\
+        Generates an index of items intended for human consumption,\n\
+        similar to the output of vgrind.  The index is sorted, and\n\
+        gives the page number of each item.");
+      puts ("-w, --no-warn\n\
+        Suppress warning messages about entries defined in multiple\n\
+        files.");
+      puts ("-x, --cxref\n\
+        Like --vgrind, but in the style of cxref, rather than vgrind.\n\
+        The output uses line numbers instead of page numbers, but\n\
+        beyond that the differences are cosmetic; try both to see\n\
+        which you like.");
+    }
+
+  puts ("-V, --version\n\
+        Print the version of the program.\n\
+-h, --help\n\
+        Print this help message.");
+
+  print_language_names ();
+
+  puts ("");
+  puts ("Report bugs to bug-gnu-emacs@prep.ai.mit.edu");
+
+  exit (GOOD);
+}
+
+\f
+enum argument_type
+{
+  at_language,
+  at_regexp,
+  at_filename
+};
+
+/* This structure helps us allow mixing of --lang and file names. */
+typedef struct
+{
+  enum argument_type arg_type;
+  char *what;
+  language *lang;
+} argument;
+
+#ifdef VMS                     /* VMS specific functions */
+
+#define        EOS     '\0'
+
+/* This is a BUG!  ANY arbitrary limit is a BUG!
+   Won't someone please fix this?  */
+#define        MAX_FILE_SPEC_LEN       255
+typedef struct {
+  short   curlen;
+  char    body[MAX_FILE_SPEC_LEN + 1];
+} vspec;
+
+/*
+ v1.05 nmm 26-Jun-86 fn_exp - expand specification of list of file names
+ returning in each successive call the next file name matching the input
+ spec. The function expects that each in_spec passed
+ to it will be processed to completion; in particular, up to and
+ including the call following that in which the last matching name
+ is returned, the function ignores the value of in_spec, and will
+ only start processing a new spec with the following call.
+ If an error occurs, on return out_spec contains the value
+ of in_spec when the error occurred.
+
+ With each successive file name returned in out_spec, the
+ function's return value is one. When there are no more matching
+ names the function returns zero. If on the first call no file
+ matches in_spec, or there is any other error, -1 is returned.
+*/
+
+#include       <rmsdef.h>
+#include       <descrip.h>
+#define                OUTSIZE MAX_FILE_SPEC_LEN
+short
+fn_exp (out, in)
+     vspec *out;
+     char *in;
+{
+  static long context = 0;
+  static struct dsc$descriptor_s o;
+  static struct dsc$descriptor_s i;
+  static bool pass1 = TRUE;
+  long status;
+  short retval;
+
+  if (pass1)
+    {
+      pass1 = FALSE;
+      o.dsc$a_pointer = (char *) out;
+      o.dsc$w_length = (short)OUTSIZE;
+      i.dsc$a_pointer = in;
+      i.dsc$w_length = (short)strlen(in);
+      i.dsc$b_dtype = DSC$K_DTYPE_T;
+      i.dsc$b_class = DSC$K_CLASS_S;
+      o.dsc$b_dtype = DSC$K_DTYPE_VT;
+      o.dsc$b_class = DSC$K_CLASS_VS;
+    }
+  if ((status = lib$find_file(&i, &o, &context, 0, 0)) == RMS$_NORMAL)
+    {
+      out->body[out->curlen] = EOS;
+      return 1;
+    }
+  else if (status == RMS$_NMF)
+    retval = 0;
+  else
+    {
+      strcpy(out->body, in);
+      retval = -1;
+    }
+  lib$find_file_end(&context);
+  pass1 = TRUE;
+  return retval;
+}
+
+/*
+  v1.01 nmm 19-Aug-85 gfnames - return in successive calls the
+  name of each file specified by the provided arg expanding wildcards.
+*/
+char *
+gfnames (arg, p_error)
+     char *arg;
+     bool *p_error;
+{
+  static vspec filename = {MAX_FILE_SPEC_LEN, "\0"};
+
+  switch (fn_exp (&filename, arg))
+    {
+    case 1:
+      *p_error = FALSE;
+      return filename.body;
+    case 0:
+      *p_error = FALSE;
+      return NULL;
+    default:
+      *p_error = TRUE;
+      return filename.body;
+    }
+}
+
+#ifndef OLD  /* Newer versions of VMS do provide `system'.  */
+system (cmd)
+     char *cmd;
+{
+  error ("%s", "system() function not implemented under VMS");
+}
+#endif
+
+#define        VERSION_DELIM   ';'
+char *massage_name (s)
+     char *s;
+{
+  char *start = s;
+
+  for ( ; *s; s++)
+    if (*s == VERSION_DELIM)
+      {
+       *s = EOS;
+       break;
+      }
+    else
+      *s = lowcase (*s);
+  return start;
+}
+#endif /* VMS */
+
+\f
+int
+main (argc, argv)
+     int argc;
+     char *argv[];
+{
+  int i;
+  unsigned int nincluded_files;
+  char **included_files;
+  char *this_file;
+  argument *argbuffer;
+  int current_arg, file_count;
+  linebuffer filename_lb;
+#ifdef VMS
+  bool got_err;
+#endif
+
+#ifdef DOS_NT
+  _fmode = O_BINARY;   /* all of files are treated as binary files */
+#endif /* DOS_NT */
+
+  progname = argv[0];
+  nincluded_files = 0;
+  included_files = xnew (argc, char *);
+  current_arg = 0;
+  file_count = 0;
+
+  /* Allocate enough no matter what happens.  Overkill, but each one
+     is small. */
+  argbuffer = xnew (argc, argument);
+
+#ifdef ETAGS_REGEXPS
+  /* Set syntax for regular expression routines. */
+  re_set_syntax (RE_SYNTAX_EMACS | RE_INTERVALS);
+#endif /* ETAGS_REGEXPS */
+
+  /*
+   * If etags, always find typedefs and structure tags.  Why not?
+   * Also default is to find macro constants, enum constants and
+   * global variables. 
+   */
+  if (!CTAGS)
+    {
+      typedefs = typedefs_and_cplusplus = constantypedefs = TRUE;
+      globals = TRUE;
+      members = FALSE;
+    }
+
+  while (1)
+    {
+      int opt;
+      char *optstring;
+
+#ifdef ETAGS_REGEXPS
+#ifndef OO_BROWSER
+      optstring = "-aCdDf:Il:o:r:RStTi:BuvxwVhH";
+#else
+      optstring = "-aCdDf:Il:o:r:RStTi:BOuvxwVhH";
+#endif
+#else
+#ifndef OO_BROWSER
+      optstring = "-aCdDf:Il:o:StTi:BuvxwVhH";
+#else
+      optstring = "-aCdDf:Il:o:StTi:BOuvxwVhH";
+#endif
+#endif /* ETAGS_REGEXPS */
+
+#ifndef LONG_OPTIONS
+      optstring = optstring + 1;
+#endif /* LONG_OPTIONS */
+
+      opt = getopt_long (argc, argv, optstring, longopts, 0);
+      if (opt == EOF)
+       break;
+
+      switch (opt)
+       {
+       case 0:
+         /* If getopt returns 0, then it has already processed a
+            long-named option.  We should do nothing.  */
+         break;
+
+       case 1:
+         /* This means that a file name has been seen.  Record it. */
+         argbuffer[current_arg].arg_type = at_filename;
+         argbuffer[current_arg].what = optarg;
+         ++current_arg;
+         ++file_count;
+         break;
+
+         /* Common options. */
+       case 'a': append_to_tagfile = TRUE;     break;
+       case 'C': cplusplus = TRUE;             break;
+       case 'd': constantypedefs = TRUE;       break;
+       case 'D': constantypedefs = FALSE;      break;
+       case 'f':               /* for compatibility with old makefiles */
+       case 'o':
+         if (tagfile)
+           {
+             /* convert char to string, to call error with */
+             char buf[2];
+             sprintf (buf, "%c", opt);
+             error ("-%s option may only be given once.", buf);
+             suggest_asking_for_help ();
+           }
+         tagfile = optarg;
+         break;
+#ifdef OO_BROWSER
+       case 'O':
+         oo_browser_format = TRUE;
+         break;
+#endif
+       case 'I':
+       case 'S':               /* for backward compatibility */
+         noindentypedefs = TRUE;
+         break;
+       case 'l':
+         {
+           language *lang = get_language_from_name (optarg);
+           if (lang != NULL)
+             {
+               argbuffer[current_arg].lang = lang;
+               argbuffer[current_arg].arg_type = at_language;
+               ++current_arg;
+             }
+         }
+         break;
+#ifdef ETAGS_REGEXPS
+       case 'r':
+         argbuffer[current_arg].arg_type = at_regexp;
+         argbuffer[current_arg].what = optarg;
+         ++current_arg;
+         break;
+       case 'R':
+         argbuffer[current_arg].arg_type = at_regexp;
+         argbuffer[current_arg].what = NULL;
+         ++current_arg;
+         break;
+#endif /* ETAGS_REGEXPS */
+       case 'V':
+         print_version ();
+         break;
+       case 'h':
+       case 'H':
+         print_help ();
+         break;
+       case 't':
+         typedefs = TRUE;
+         break;
+       case 'T':
+         typedefs = typedefs_and_cplusplus = TRUE;
+         break;
+#if (!CTAGS)
+         /* Etags options */
+       case 'i':
+         included_files[nincluded_files++] = optarg;
+         break;
+#else /* CTAGS */
+         /* Ctags options. */
+       case 'B': searchar = '?';       break;
+       case 'u': update = TRUE;        break;
+       case 'v': vgrind_style = TRUE;  /*FALLTHRU*/
+       case 'x': cxref_style = TRUE;   break;
+       case 'w': no_warnings = TRUE;   break;
+#endif /* CTAGS */
+       default:
+         suggest_asking_for_help ();
+       }
+    }
+
+  for (; optind < argc; ++optind)
+    {
+      argbuffer[current_arg].arg_type = at_filename;
+      argbuffer[current_arg].what = argv[optind];
+      ++current_arg;
+      ++file_count;
+    }
+
+  if (nincluded_files == 0 && file_count == 0)
+    {
+      error ("no input files specified.", 0);
+      suggest_asking_for_help ();
+    }
+
+  if (tagfile == NULL)
+    tagfile = CTAGS ? "tags" : "TAGS";
+  cwd = etags_getcwd ();       /* the current working directory */
+  if (cwd[strlen (cwd) - 1] != '/')
+    {
+      char *oldcwd = cwd;
+      cwd = concat (oldcwd, "/", "");
+      free (oldcwd);
+    }
+  if (streq (tagfile, "-"))
+    tagfiledir = cwd;
+  else
+    tagfiledir = absolute_dirname (tagfile, cwd);
+
+  init ();                     /* set up boolean "functions" */
+
+  initbuffer (&lb);
+  initbuffer (&token_name);
+  initbuffer (&lbs[0].lb);
+  initbuffer (&lbs[1].lb);
+  initbuffer (&filename_lb);
+
+  if (!CTAGS)
+    {
+      if (streq (tagfile, "-"))
+       {
+         tagf = stdout;
+#ifdef DOS_NT
+         /* Switch redirected `stdout' to binary mode (setting `_fmode'
+            doesn't take effect until after `stdout' is already open). */
+         if (!isatty (fileno (stdout)))
+           setmode (fileno (stdout), O_BINARY);
+#endif /* DOS_NT */
+       }
+      else
+       tagf = fopen (tagfile, append_to_tagfile ? "a" : "w");
+      if (tagf == NULL)
+       pfatal (tagfile);
+    }
+
+  /*
+   * Loop through files finding functions.
+   */
+  for (i = 0; i < current_arg; ++i)
+    {
+      switch (argbuffer[i].arg_type)
+       {
+       case at_language:
+         forced_lang = argbuffer[i].lang;
+         break;
+#ifdef ETAGS_REGEXPS
+       case at_regexp:
+         analyse_regex (argbuffer[i].what);
+         break;
+#endif
+       case at_filename:
+#ifdef VMS
+         while ((this_file = gfnames (argbuffer[i].what, &got_err)) != NULL)
+           {
+             if (got_err)
+               {
+                 error ("can't find file %s\n", this_file);
+                 argc--, argv++;
+               }
+             else
+               {
+                 this_file = massage_name (this_file);
+               }
+#else
+             this_file = argbuffer[i].what;
+#endif
+#ifdef OO_BROWSER
+             oo_browser_clear_all_globals();
+#endif
+             /* Input file named "-" means read file names from stdin
+                (one per line) and use them. */
+             if (streq (this_file, "-"))
+               while (readline_internal (&filename_lb, stdin) > 0)
+#ifdef OO_BROWSER
+                 {
+                   oo_browser_clear_some_globals();
+#endif
+                 process_file (filename_lb.buffer);
+#ifdef OO_BROWSER
+                 }
+#endif
+             else
+               process_file (this_file);
+#ifdef VMS
+           }
+#endif
+         break;
+       }
+    }
+
+#ifdef ETAGS_REGEXPS
+  free_patterns ();
+#endif /* ETAGS_REGEXPS */
+
+  if (!CTAGS)
+    {
+      while (nincluded_files-- > 0)
+       fprintf (tagf, "\f\n%s,include\n", *included_files++);
+
+      fclose (tagf);
+      exit (GOOD);
+    }
+
+  /* If CTAGS, we are here.  process_file did not write the tags yet,
+     because we want them ordered.  Let's do it now. */
+  if (cxref_style)
+    {
+      put_entries (head);
+      exit (GOOD);
+    }
+
+  if (update)
+    {
+      char cmd[BUFSIZ];
+      for (i = 0; i < current_arg; ++i)
+       {
+         if (argbuffer[i].arg_type != at_filename)
+           continue;
+         sprintf (cmd,
+                  "mv %s OTAGS;fgrep -v '\t%s\t' OTAGS >%s;rm OTAGS",
+                  tagfile, argbuffer[i].what, tagfile);
+         if (system (cmd) != GOOD)
+           fatal ("failed to execute shell command", (char *)NULL);
+       }
+      append_to_tagfile = TRUE;
+    }
+
+  tagf = fopen (tagfile, append_to_tagfile ? "a" : "w");
+  if (tagf == NULL)
+    pfatal (tagfile);
+  put_entries (head);
+  fclose (tagf);
+
+  if (update)
+    {
+      char cmd[BUFSIZ];
+      sprintf (cmd, "sort %s -o %s", tagfile, tagfile);
+      exit (system (cmd));
+    }
+  return GOOD;
+}
+
+
+/*
+ * Return a language given the name.
+ */
+language *
+get_language_from_name (name)
+     char *name;
+{
+  language *lang;
+
+  if (name == NULL)
+    error ("empty language name", (char *)NULL);
+  else
+    {
+      for (lang = lang_names; lang->name != NULL; lang++)
+       if (streq (name, lang->name))
+         return lang;
+      error ("unknown language \"%s\"", name);
+    }
+
+  return NULL;
+}
+
+
+/*
+ * Return a language given the interpreter name.
+ */
+language *
+get_language_from_interpreter (interpreter)
+     char *interpreter;
+{
+  language *lang;
+  char **iname;
+
+  if (interpreter == NULL)
+    return NULL;
+  for (lang = lang_names; lang->name != NULL; lang++)
+    if (lang->interpreters != NULL)
+      for (iname = lang->interpreters; *iname != NULL; iname++)
+       if (streq (*iname, interpreter))
+           return lang;
+
+  return NULL;
+}
+
+
+
+/*
+ * Return a language given the file suffix.
+ */
+language *
+get_language_from_suffix (suffix)
+     char *suffix;
+{
+  language *lang;
+  char **ext;
+
+  if (suffix == NULL)
+    return NULL;
+  for (lang = lang_names; lang->name != NULL; lang++)
+    if (lang->suffixes != NULL)
+      for (ext = lang->suffixes; *ext != NULL; ext++)
+       if (streq (*ext, suffix))
+           return lang;
+
+  return NULL;
+}
+
+
+/*
+ * This routine is called on each file argument.
+ */
+void
+process_file (file)
+     char *file;
+{
+  struct stat stat_buf;
+  FILE *inf;
+
+  canonicalize_filename (file);
+  if (stat (file, &stat_buf) == 0 && !S_ISREG (stat_buf.st_mode))
+    {
+      error ("skipping %s: it is not a regular file.", file);
+      return;
+    }
+  if (streq (file, tagfile) && !streq (tagfile, "-"))
+    {
+      error ("skipping inclusion of %s in self.", file);
+      return;
+    }
+  inf = fopen (file, "r");
+  if (inf == NULL)
+    {
+      perror (file);
+      return;
+    }
+
+  find_entries (file, inf);
+
+  if (!CTAGS)
+    {
+      char *filename;
+
+      if (filename_is_absolute (file))
+       {
+         /* file is an absolute file name.  Canonicalise it. */
+         filename = absolute_filename (file, cwd);
+       }
+      else
+       {
+         /* file is a file name relative to cwd.  Make it relative
+            to the directory of the tags file. */
+         filename = relative_filename (file, tagfiledir);
+       }
+#ifdef OO_BROWSER
+      if (oo_browser_format)
+       fprintf (tagf, "\f\n%s\n", filename);
+      else
+#endif
+      fprintf (tagf, "\f\n%s,%d\n", filename, total_size_of_entries (head));
+      free (filename);
+      put_entries (head);
+      free_tree (head);
+      head = NULL;
+    }
+}
+
+/*
+ * This routine sets up the boolean pseudo-functions which work
+ * by setting boolean flags dependent upon the corresponding character.
+ * Every char which is NOT in that string is not a white char.  Therefore,
+ * all of the array "_wht" is set to FALSE, and then the elements
+ * subscripted by the chars in "white" are set to TRUE.  Thus "_wht"
+ * of a char is TRUE if it is the string "white", else FALSE.
+ */
+void
+init ()
+{
+  register char *sp;
+  register int i;
+
+  for (i = 0; i < CHARS; i++)
+    iswhite(i) = notinname(i) = begtoken(i) = intoken(i) = endtoken(i) = FALSE;
+  for (sp = white; *sp != '\0'; sp++) iswhite (*sp) = TRUE;
+  for (sp = nonam; *sp != '\0'; sp++) notinname (*sp) = TRUE;
+  for (sp = begtk; *sp != '\0'; sp++) begtoken (*sp) = TRUE;
+  for (sp = midtk; *sp != '\0'; sp++) intoken (*sp) = TRUE;
+  for (sp = endtk; *sp != '\0'; sp++) endtoken (*sp) = TRUE;
+  iswhite('\0') = iswhite('\n');
+  notinname('\0') = notinname('\n');
+  begtoken('\0') = begtoken('\n');
+  intoken('\0') = intoken('\n');
+  endtoken('\0') = endtoken('\n');
+}
+
+/*
+ * This routine opens the specified file and calls the function
+ * which finds the function and type definitions.
+ */
+node *last_node = NULL;
+
+void
+find_entries (file, inf)
+     char *file;
+     FILE *inf;
+{
+  char *cp;
+  language *lang;
+  node *old_last_node;
+
+  curfile = savestr (file);
+
+  /* If user specified a language, use it. */
+  lang = forced_lang;
+  if (lang != NULL && lang->function != NULL)
+    {
+      curlang = lang;
+      lang->function (inf);
+      free (curfile);
+      fclose (inf);
+      return;
+    }
+
+  cp = etags_strrchr (file, '.');
+  if (cp != NULL)
+    {
+      cp += 1;
+      lang = get_language_from_suffix (cp);
+      if (lang != NULL && lang->function != NULL)
+       {
+         curlang = lang;
+         lang->function (inf);
+         free (curfile);
+         fclose (inf);
+         return;
+       }
+    }
+
+  /* Look for sharp-bang as the first two characters. */
+  if (readline_internal (&lb, inf) > 0
+      && lb.len >= 2
+      && lb.buffer[0] == '#'
+      && lb.buffer[1] == '!')
+    {
+      char *lp;
+
+      /* Set lp to point at the first char after the last slash in the
+         line or, if no slashes, at the first nonblank.  Then set cp to
+        the first successive blank and terminate the string. */
+      lp = etags_strrchr (lb.buffer+2, '/');
+      if (lp != NULL)
+       lp += 1;
+      else
+       lp = skip_spaces (lb.buffer + 2);
+      cp = skip_non_spaces (lp);
+      *cp = '\0';
+
+      if (strlen (lp) > 0)
+       {
+         lang = get_language_from_interpreter (lp);
+         if (lang != NULL && lang->function != NULL)
+           {
+             curlang = lang;
+             lang->function (inf);
+             fclose (inf);
+             free (curfile);
+             return;
+           }
+       }
+    }
+  rewind (inf);
+
+  /* Try Fortran. */
+  old_last_node = last_node;
+  curlang = get_language_from_name ("fortran");
+  Fortran_functions (inf);
+
+  /* No Fortran entries found.  Try C. */
+  if (old_last_node == last_node)
+    {
+      rewind (inf);
+      curlang = get_language_from_name (cplusplus ? "c++" : "c");
+      default_C_entries (inf);
+    }
+  free (curfile);
+  fclose (inf);
+  return;
+}
+\f
+/* Record a tag. */
+void
+pfnote (name, is_func, linestart, linelen, lno, cno)
+     char *name;               /* tag name, or NULL if unnamed */
+     bool is_func;             /* tag is a function */
+     char *linestart;          /* start of the line where tag is */
+     int linelen;              /* length of the line where tag is */
+     int lno;                  /* line number */
+     long cno;                 /* character number */
+{
+  register node *np;
+
+  if (CTAGS && name == NULL)
+    return;
+
+  np = xnew (1, node);
+
+  /* If ctags mode, change name "main" to M<thisfilename>. */
+  if (CTAGS && !cxref_style && streq (name, "main"))
+    {
+      register char *fp = etags_strrchr (curfile, '/');
+      np->name = concat ("M", fp == 0 ? curfile : fp + 1, "");
+      fp = etags_strrchr (np->name, '.');
+      if (fp && fp[1] != '\0' && fp[2] == '\0')
+       fp[0] = 0;
+    }
+  else
+    np->name = name;
+  np->been_warned = FALSE;
+  np->file = curfile;
+  np->is_func = is_func;
+  np->lno = lno;
+  /* Our char numbers are 0-base, because of C language tradition?
+     ctags compatibility?  old versions compatibility?   I don't know.
+     Anyway, since emacs's are 1-base we expect etags.el to take care
+     of the difference.  If we wanted to have 1-based numbers, we would
+     uncomment the +1 below. */
+  np->cno = cno /* + 1 */ ;
+  np->left = np->right = NULL;
+  if (CTAGS && !cxref_style)
+    {
+      if (strlen (linestart) < 50)
+       np->pat = concat (linestart, "$", "");
+      else
+       np->pat = savenstr (linestart, 50);
+    }
+  else
+    np->pat = savenstr (linestart, linelen);
+
+#ifdef OO_BROWSER
+  if (oo_browser_format)
+    np->construct = oo_browser_construct;
+  oo_browser_construct = C_NULL;
+  oo_browser_check_and_clear_structtype();
+#endif
+
+  add_node (np, &head);
+}
+
+/* Date: Wed, 22 Jan 1997 02:56:31 -0500 [last amended 18 Sep 1997]
+ * From: Sam Kendall <kendall@mv.mv.com>
+ * Subject: Proposal for firming up the TAGS format specification
+ * To: F.Potorti@cnuce.cnr.it
+ *
+ * pfnote should emit the optimized form [unnamed tag] only if:
+ *  1. name does not contain any of the characters " \t\r\n(),;";
+ *  2. linestart contains name as either a rightmost, or rightmost but
+ *     one character, substring;
+ *  3. the character, if any, immediately before name in linestart must
+ *     be one of the characters " \t(),;";
+ *  4. the character, if any, immediately after name in linestart must
+ *     also be one of the characters " \t(),;".
+ *
+ * The real implementation uses the notinname() macro, which recognises
+ * characters slightly different form " \t\r\n(),;".  See the variable
+ * `nonam'.
+ */
+#define traditional_tag_style TRUE
+void
+new_pfnote (name, namelen, is_func, linestart, linelen, lno, cno)
+     char *name;               /* tag name, or NULL if unnamed */
+     int namelen;              /* tag length */
+     bool is_func;             /* tag is a function */
+     char *linestart;          /* start of the line where tag is */
+     int linelen;              /* length of the line where tag is */
+     int lno;                  /* line number */
+     long cno;                 /* character number */
+{
+  register char *cp;
+  bool named;
+
+  named = TRUE;
+  if (!CTAGS)
+    {
+      for (cp = name; !notinname (*cp); cp++)
+       continue;
+      if (*cp == '\0')                         /* rule #1 */
+       {
+         cp = linestart + linelen - namelen;
+         if (notinname (linestart[linelen-1]))
+           cp -= 1;                            /* rule #4 */
+#ifdef OO_BROWSER
+         if (!oo_browser_format
+             && cp >= linestart                /* rule #2 */
+#else
+         if (cp >= linestart                   /* rule #2 */
+#endif
+             && (cp == linestart
+                 || notinname (cp[-1]))        /* rule #3 */
+             && strneq (name, cp, namelen))    /* rule #2 */
+           named = FALSE;      /* use unnamed tag */
+       }
+    }
+  
+  if (named)
+    name = savenstr (name, namelen);
+  else
+    name = NULL;
+  pfnote (name, is_func, linestart, linelen, lno, cno);
+}
+
+/*
+ * free_tree ()
+ *     recurse on left children, iterate on right children.
+ */
+void
+free_tree (np)
+     register node *np;
+{
+  while (np)
+    {
+      register node *node_right = np->right;
+      free_tree (np->left);
+      if (np->name != NULL)
+       free (np->name);
+      free (np->pat);
+      free (np);
+      np = node_right;
+    }
+}
+
+/*
+ * add_node ()
+ *     Adds a node to the tree of nodes.  In etags mode, we don't keep
+ *     it sorted; we just keep a linear list.  In ctags mode, maintain
+ *     an ordered tree, with no attempt at balancing.
+ *
+ *     add_node is the only function allowed to add nodes, so it can
+ *     maintain state.
+ */
+void
+add_node (np, cur_node_p)
+     node *np, **cur_node_p;
+{
+  register int dif;
+  register node *cur_node = *cur_node_p;
+
+  if (cur_node == NULL)
+    {
+      *cur_node_p = np;
+      last_node = np;
+      return;
+    }
+
+  if (!CTAGS)
+    {
+      /* Etags Mode */
+      if (last_node == NULL)
+       fatal ("internal error in add_node", (char *)NULL);
+      last_node->right = np;
+      last_node = np;
+    }
+  else
+    {
+      /* Ctags Mode */
+      dif = strcmp (np->name, cur_node->name);
+
+      /*
+       * If this tag name matches an existing one, then
+       * do not add the node, but maybe print a warning.
+       */
+      if (!dif)
+       {
+         if (streq (np->file, cur_node->file))
+           {
+             if (!no_warnings)
+               {
+                 fprintf (stderr, "Duplicate entry in file %s, line %d: %s\n",
+                          np->file, lineno, np->name);
+                 fprintf (stderr, "Second entry ignored\n");
+               }
+           }
+         else if (!cur_node->been_warned && !no_warnings)
+           {
+             fprintf
+               (stderr,
+                "Duplicate entry in files %s and %s: %s (Warning only)\n",
+                np->file, cur_node->file, np->name);
+             cur_node->been_warned = TRUE;
+           }
+         return;
+       }
+
+      /* Actually add the node */
+      add_node (np, dif < 0 ? &cur_node->left : &cur_node->right);
+    }
+}
+\f
+#ifdef OO_BROWSER
+/* Default class name for the current OO-Browser tag. */
+static char *oo_browser_class;
+/* Prefix character to use in OO-Browser listings for the current tag. */
+static char oo_browser_prefix;
+#endif
+
+void
+put_entries (np)
+     register node *np;
+{
+  register char *sp;
+
+  if (np == NULL)
+    return;
+
+  /* Output subentries that precede this one */
+  put_entries (np->left);
+
+  /* Output this entry */
+
+  if (!CTAGS)
+    {
+#ifdef OO_BROWSER
+      if (oo_browser_format)
+        {
+          /* Omit C++ `class' and `method' entries as well as Objective-C
+             entries from this OO-Browser tags file since the browser handles
+             them independently of this file.  Omit `extern' variable declarations
+             as they are unused by the OO-Browser. */
+          if (np->construct != C_CLASS
+              && np->construct != C_METHOD
+              && np->construct != C_EXTERN
+              && np->construct != C_OBJC)
+            {
+              oo_browser_class = oo_browser_default_classes[np->construct];
+              switch (np->construct)
+                {
+                case C_CONSTANT:
+                case C_ENUMERATION:
+                case C_ENUM_LABEL:
+                case C_STRUCTURE:
+                case C_TYPE:
+                case C_UNION:
+                case C_VARIABLE:
+                  oo_browser_prefix = '=';
+                  break;
+                case C_FUNCTION:
+                case C_MACRO:
+                  oo_browser_prefix = '-';
+                  break;
+                }
+              if (np->name != NULL)
+                fprintf (tagf, "%s@%c %s@%s\n",
+                         oo_browser_class, oo_browser_prefix,
+                         np->name, np->pat);
+              else
+                fprintf (tagf, "%s@%c ???@%s\n",
+                         oo_browser_class, oo_browser_prefix, np->pat);
+            }
+        }
+      else
+        {
+#endif
+      if (np->name != NULL)
+       fprintf (tagf, "%s\177%s\001%d,%ld\n",
+                np->pat, np->name, np->lno, np->cno);
+      else
+       fprintf (tagf, "%s\177%d,%ld\n",
+                np->pat, np->lno, np->cno);
+#ifdef OO_BROWSER
+       }
+#endif
+    }
+  else
+    {
+      if (np->name == NULL)
+       error ("internal error: NULL name in ctags mode.", (char *)NULL);
+
+      if (cxref_style)
+       {
+         if (vgrind_style)
+           fprintf (stdout, "%s %s %d\n",
+                    np->name, np->file, (np->lno + 63) / 64);
+         else
+           fprintf (stdout, "%-16s %3d %-16s %s\n",
+                    np->name, np->lno, np->file, np->pat);
+       }
+      else
+       {
+         fprintf (tagf, "%s\t%s\t", np->name, np->file);
+
+         if (np->is_func)
+           {                   /* a function */
+             putc (searchar, tagf);
+             putc ('^', tagf);
+
+             for (sp = np->pat; *sp; sp++)
+               {
+                 if (*sp == '\\' || *sp == searchar)
+                   putc ('\\', tagf);
+                 putc (*sp, tagf);
+               }
+             putc (searchar, tagf);
+           }
+         else
+           {                   /* a typedef; text pattern inadequate */
+             fprintf (tagf, "%d", np->lno);
+           }
+         putc ('\n', tagf);
+       }
+    }
+
+  /* Output subentries that follow this one */
+  put_entries (np->right);
+}
+
+/* Length of a number's decimal representation. */
+int number_len PP ((long num));
+int
+number_len (num)
+     long num;
+{
+  int len = 1;
+  while ((num /= 10) > 0)
+    len += 1;
+  return len;
+}
+
+/*
+ * Return total number of characters that put_entries will output for
+ * the nodes in the subtree of the specified node.  Works only if
+ * we are not ctags, but called only in that case.  This count
+ * is irrelevant with the new tags.el, but is still supplied for
+ * backward compatibility.
+ */
+int
+total_size_of_entries (np)
+     register node *np;
+{
+  register int total;
+
+  if (np == NULL)
+    return 0;
+
+  for (total = 0; np != NULL; np = np->right)
+    {
+      /* Count left subentries. */
+      total += total_size_of_entries (np->left);
+
+      /* Count this entry */
+      total += strlen (np->pat) + 1;
+      total += number_len ((long) np->lno) + 1 + number_len (np->cno) + 1;
+      if (np->name != NULL)
+       total += 1 + strlen (np->name); /* \001name */
+    }
+
+  return total;
+}
+\f
+/*
+ * The C symbol tables.
+ */
+enum sym_type
+{
+  st_none,
+  st_C_objprot, st_C_objimpl, st_C_objend,
+  st_C_gnumacro,
+  st_C_ignore,
+  st_C_javastruct,
+  st_C_struct, st_C_enum, st_C_define, st_C_typedef, st_C_typespec,
+  st_C_const
+#ifdef OO_BROWSER
+  , st_C_union, st_C_class, st_C_extern, st_C_inline
+#endif
+};
+
+/* Feed stuff between (but not including) %[ and %] lines to:
+      gperf -c -k 1,3 -o -p -r -t
+%[
+struct C_stab_entry { char *name; int c_ext; enum sym_type type; }
+%%
+@interface,    0,      st_C_objprot
+@protocol,     0,      st_C_objprot
+@implementation,0,     st_C_objimpl
+@end,          0,      st_C_objend
+import,                C_JAVA, st_C_ignore
+package,       C_JAVA, st_C_ignore
+friend,                C_PLPL, st_C_ignore
+extends,       C_JAVA, st_C_javastruct
+implements,    C_JAVA, st_C_javastruct
+interface,     C_JAVA, st_C_struct
+class,         C_PLPL, st_C_class
+namespace,     C_PLPL, st_C_struct
+domain,        C_STAR, st_C_struct
+union,         0,      st_C_union
+struct,        0,      st_C_struct
+enum,          0,      st_C_enum
+typedef,       0,      st_C_typedef
+define,        0,      st_C_define
+inline,                0,      st_C_inline
+bool,          C_PLPL, st_C_typespec
+long,          0,      st_C_typespec
+short,         0,      st_C_typespec
+int,           0,      st_C_typespec
+char,          0,      st_C_typespec
+float,         0,      st_C_typespec
+double,        0,      st_C_typespec
+signed,        0,      st_C_typespec
+unsigned,      0,      st_C_typespec
+auto,          0,      st_C_typespec
+void,          0,      st_C_typespec
+extern,        0,      st_C_extern
+static,        0,      st_C_typespec
+const,         0,      st_C_const
+volatile,      0,      st_C_typespec
+explicit,      C_PLPL, st_C_typespec
+mutable,       C_PLPL, st_C_typespec
+typename,      C_PLPL, st_C_typespec
+# DEFUN used in emacs, the next three used in glibc (SYSCALL only for mach).
+DEFUN,         0,      st_C_gnumacro
+SYSCALL,       0,      st_C_gnumacro
+ENTRY,         0,      st_C_gnumacro
+PSEUDO,                0,      st_C_gnumacro
+# These are defined inside C functions, so currently they are not met.
+# EXFUN used in glibc, DEFVAR_* in emacs.
+#EXFUN,                0,      st_C_gnumacro
+#DEFVAR_,      0,      st_C_gnumacro
+%]
+and replace lines between %< and %> with its output. */
+/*%<*/
+/* C code produced by gperf version 2.5 (GNU C++ version) */
+/* Command-line: gperf -c -k 1,3 -o -p -r -t  */
+struct C_stab_entry { char *name; int c_ext; enum sym_type type; };
+
+#define TOTAL_KEYWORDS 41
+#define MIN_WORD_LENGTH 3
+#define MAX_WORD_LENGTH 15
+#define MIN_HASH_VALUE 13
+#define MAX_HASH_VALUE 129
+/* maximum key range = 117, duplicates = 0 */
+
+static unsigned int
+hash (str, len)
+     register char *str;
+     register int unsigned len;
+{
+  static unsigned char asso_values[] =
+    {
+     130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
+     130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
+     130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
+     130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
+     130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
+     130, 130, 130, 130, 130, 130, 130, 130, 130, 130,
+     130, 130, 130, 130,  13, 130, 130, 130,  33,  32,
+      47, 130, 130, 130, 130, 130, 130, 130, 130, 130,
+       5, 130, 130,  20,  32, 130, 130, 130, 130, 130,
+     130, 130, 130, 130, 130, 130, 130,  47,  55,   8,
+      15,  33,  61,  38, 130,  60, 130, 130,   2,   9,
+      10,  62,  59, 130,  28,  27,  50,  19,   3, 130,
+     130, 130, 130, 130, 130, 130, 130, 130,
+    };
+  return len + asso_values[str[2]] + asso_values[str[0]];
+}
+
+struct C_stab_entry *
+in_word_set (str, len)
+     register char *str;
+     register unsigned int len;
+{
+  static struct C_stab_entry wordlist[] =
+    {
+      {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, 
+      {"",}, {"",}, {"",}, {"",}, 
+      {"volatile",     0,      st_C_typespec},
+      {"",}, {"",}, 
+      {"long",         0,      st_C_typespec},
+      {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, 
+      {"const",        0,      st_C_const},
+      {"",}, {"",}, {"",}, 
+      {"@end",                 0,      st_C_objend},
+      {"namespace",    C_PLPL, st_C_struct},
+      {"",}, 
+      {"domain",       C_STAR, st_C_struct},
+      {"",}, {"",}, 
+      {"@interface",   0,      st_C_objprot},
+      {"",}, {"",}, {"",}, 
+      {"@implementation", 0,   st_C_objimpl},
+      {"",}, {"",}, 
+      {"double",       0,      st_C_typespec},
+      {"",}, {"",}, 
+      {"PSEUDO",               0,      st_C_gnumacro},
+      {"",}, {"",}, {"",}, 
+      {"SYSCALL",      0,      st_C_gnumacro},
+      {"",}, {"",}, 
+      {"@protocol",    0,      st_C_objprot},
+      {"",}, {"",}, {"",}, 
+      {"unsigned",     0,      st_C_typespec},
+      {"",}, 
+      {"enum",         0,      st_C_enum},
+      {"",}, {"",}, 
+      {"char",         0,      st_C_typespec},
+      {"class",        C_PLPL, st_C_class},
+      {"struct",       0,      st_C_struct},
+      {"",}, {"",}, {"",}, {"",}, 
+      {"mutable",      C_PLPL, st_C_typespec},
+      {"void",         0,      st_C_typespec},
+      {"inline",               0,      st_C_inline},
+      {"ENTRY",                0,      st_C_gnumacro},
+      {"",}, 
+      {"signed",       0,      st_C_typespec},
+      {"",}, {"",}, 
+      {"package",      C_JAVA, st_C_ignore},
+      {"",}, {"",}, {"",}, {"",}, {"",}, 
+      {"static",       0,      st_C_typespec},
+      {"",}, 
+      {"define",       0,      st_C_define},
+      {"",}, 
+      {"union",        0,      st_C_union},
+      {"DEFUN",                0,      st_C_gnumacro},
+      {"",}, {"",}, {"",}, 
+      {"extern",       0,      st_C_extern},
+      {"extends",      C_JAVA, st_C_javastruct},
+      {"",}, {"",}, {"",}, 
+      {"short",        0,      st_C_typespec},
+      {"",}, {"",}, {"",}, {"",}, {"",}, 
+      {"explicit",     C_PLPL, st_C_typespec},
+      {"auto",         0,      st_C_typespec},
+      {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, {"",}, 
+      {"",}, {"",}, 
+      {"int",          0,      st_C_typespec},
+      {"",}, {"",}, 
+      {"typedef",      0,      st_C_typedef},
+      {"typename",     C_PLPL, st_C_typespec},
+      {"",}, 
+      {"interface",    C_JAVA, st_C_struct},
+      {"",}, 
+      {"bool",                 C_PLPL, st_C_typespec},
+      {"",}, {"",}, {"",}, 
+      {"import",               C_JAVA, st_C_ignore},
+      {"",}, 
+      {"friend",               C_PLPL, st_C_ignore},
+      {"float",        0,      st_C_typespec},
+      {"implements",           C_JAVA, st_C_javastruct},
+    };
+
+  if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH)
+    {
+      register int key = hash (str, len);
+
+      if (key <= MAX_HASH_VALUE && key >= 0)
+        {
+          register char *s = wordlist[key].name;
+
+          if (*s == *str && !strncmp (str + 1, s + 1, len - 1))
+            return &wordlist[key];
+        }
+    }
+  return 0;
+}
+/*%>*/
+
+enum sym_type C_symtype PP ((char *str, int len, int c_ext));
+enum sym_type
+C_symtype (str, len, c_ext)
+     char *str;
+     int len;
+     int c_ext;
+{
+  register struct C_stab_entry *se = in_word_set (str, len);
+
+  if (se == NULL || (se->c_ext && !(c_ext & se->c_ext)))
+    return st_none;
+  return se->type;
+}
+\f
+ /*
+  * C functions and variables are recognized using a simple
+  * finite automaton.  fvdef is its state variable.
+  */
+enum
+{
+  fvnone,                      /* nothing seen */
+  fvnameseen,                  /* function or variable name seen */
+  fstartlist,                  /* func: just after open parenthesis */
+  finlist,                     /* func: in parameter list */
+  flistseen,                   /* func: after parameter list */
+  fignore,                     /* func: before open brace */
+  vignore                      /* var-like: ignore until ';' */
+} fvdef;
+
+
+ /*
+  * typedefs are recognized using a simple finite automaton.
+  * typdef is its state variable.
+  */
+enum
+{
+  tnone,                       /* nothing seen */
+  ttypedseen,                  /* typedef keyword seen */
+  tinbody,                     /* inside typedef body */
+  tend,                                /* just before typedef tag */
+  tignore                      /* junk after typedef tag */
+} typdef;
+
+
+ /*
+  * struct-like structures (enum, struct and union) are recognized
+  * using another simple finite automaton.  `structdef' is its state
+  * variable.
+  */
+enum
+{
+  snone,                       /* nothing seen yet */
+  skeyseen,                    /* struct-like keyword seen */
+  stagseen,                    /* struct-like tag seen */
+  scolonseen,                  /* colon seen after struct-like tag */
+  sinbody                      /* in struct body: recognize member func defs*/
+} structdef;
+
+/*
+ * When structdef is stagseen, scolonseen, or sinbody, structtag is the
+ * struct tag, and structtype is the type of the preceding struct-like
+ * keyword.
+ */
+char *structtag = "<uninited>";
+enum sym_type structtype;
+
+#ifdef OO_BROWSER
+void
+oo_browser_check_and_clear_structtype()
+{
+  /* Allow for multiple enum_label tags. */
+  if (structtype != st_C_enum)
+    structtype = st_none;
+}
+#endif
+
+/*
+ * When objdef is different from onone, objtag is the name of the class.
+ */
+char *objtag = "<uninited>";
+
+/*
+ * Yet another little state machine to deal with preprocessor lines.
+ */
+enum
+{
+  dnone,                       /* nothing seen */
+  dsharpseen,                  /* '#' seen as first char on line */
+  ddefineseen,                 /* '#' and 'define' seen */
+  dignorerest                  /* ignore rest of line */
+} definedef;
+
+/*
+ * State machine for Objective C protocols and implementations.
+ * Tom R.Hageman <tom@basil.icce.rug.nl>
+ */
+enum
+{
+  onone,                       /* nothing seen */
+  oprotocol,                   /* @interface or @protocol seen */
+  oimplementation,             /* @implementations seen */
+  otagseen,                    /* class name seen */
+  oparenseen,                  /* parenthesis before category seen */
+  ocatseen,                    /* category name seen */
+  oinbody,                     /* in @implementation body */
+  omethodsign,                 /* in @implementation body, after +/- */
+  omethodtag,                  /* after method name */
+  omethodcolon,                        /* after method colon */
+  omethodparm,                 /* after method parameter */
+  oignore                      /* wait for @end */
+} objdef;
+
+/*
+ * Use this structure to keep info about the token read, and how it
+ * should be tagged.  Used by the make_C_tag function to build a tag.
+ */
+typedef struct
+{
+  bool valid;
+  char *str;
+  bool named;
+  int linelen;
+  int lineno;
+  long linepos;
+  char *buffer;
+} token;
+
+token tok;                     /* latest token read */
+
+/*
+ * Set this to TRUE, and the next token considered is called a function.
+ * Used only for GNU emacs's function-defining macros.
+ */
+bool next_token_is_func;
+
+/*
+ * TRUE in the rules part of a yacc file, FALSE outside (parse as C).
+ */
+bool yacc_rules;
+
+/*
+ * methodlen is the length of the method name stored in token_name.
+ */
+int methodlen;
+
+#ifdef OO_BROWSER
+void
+oo_browser_clear_all_globals()
+{
+  /* Initialize globals so there is no carry over between files. */
+  oo_browser_construct = C_NULL;
+  fvdef = fvnone; typdef = tnone; structdef = snone;
+  definedef = dnone; objdef = onone;
+  structtype = st_none;
+  next_token_is_func = yacc_rules = FALSE;
+}
+
+void
+oo_browser_clear_some_globals()
+{
+  oo_browser_construct = C_NULL;
+  structtype = st_none;
+}
+#endif
+
+/*
+ * consider_token ()
+ *     checks to see if the current token is at the start of a
+ *     function or variable, or corresponds to a typedef, or
+ *     is a struct/union/enum tag, or #define, or an enum constant.
+ *
+ *     *IS_FUNC gets TRUE iff the token is a function or #define macro
+ *     with args.  C_EXT is which language we are looking at.
+ *
+ *     In the future we will need some way to adjust where the end of
+ *     the token is; for instance, implementing the C++ keyword
+ *     `operator' properly will adjust the end of the token to be after
+ *     whatever follows `operator'.
+ *
+ * Globals
+ *     fvdef                   IN OUT
+ *     structdef               IN OUT
+ *     definedef               IN OUT
+ *     typdef                  IN OUT
+ *     objdef                  IN OUT
+ *     next_token_is_func      IN OUT
+ */
+bool consider_token PP ((char *str, int len, int c, int c_ext,
+                        int cblev, int parlev, bool *is_func_or_var));
+bool
+consider_token (str, len, c, c_ext, cblev, parlev, is_func_or_var)
+     register char *str;       /* IN: token pointer */
+     register int len;         /* IN: token length */
+     register int c;           /* IN: first char after the token */
+     int c_ext;                        /* IN: C extensions mask */
+     int cblev;                        /* IN: curly brace level */
+     int parlev;               /* IN: parenthesis level */
+     bool *is_func_or_var;     /* OUT: function or variable found */
+{
+  enum sym_type toktype = C_symtype (str, len, c_ext);
+
+#ifdef OO_BROWSER
+  switch (toktype)
+    {
+      case st_C_struct:
+        set_construct(C_STRUCTURE);
+        break;
+      case st_C_union:
+        set_construct(C_UNION);
+        break;
+      case st_C_class:
+        set_construct(C_CLASS);
+        break;
+      case st_C_enum:
+        set_construct(C_ENUMERATION);
+        break;
+      case st_C_typedef:
+        set_construct(C_TYPE);
+        break;
+      case st_C_extern:
+        set_construct(C_EXTERN);
+        break;
+      case st_C_inline:
+        set_construct(C_FUNCTION);
+        break;
+    }
+#endif
+
+  /*
+   * Advance the definedef state machine.
+   */
+  switch (definedef)
+    {
+    case dnone:
+      /* We're not on a preprocessor line. */
+      break;
+    case dsharpseen:
+      if (toktype == st_C_define)
+       {
+         definedef = ddefineseen;
+       }
+      else
+       {
+         definedef = dignorerest;
+       }
+      return FALSE;
+    case ddefineseen:
+      /*
+       * Make a tag for any macro, unless it is a constant
+       * and constantypedefs is FALSE.
+       */
+      definedef = dignorerest;
+#ifndef OO_BROWSER
+      *is_func_or_var = (c == '(');
+#else
+      {
+        char *p = str + len * sizeof(char);
+
+        if (*p == '(')
+          /* This must be a macro since there is no
+             whitespace between the opening parenthesis
+             and the definition name. */
+          *is_func_or_var = TRUE;
+        else
+          {
+            *is_func_or_var = FALSE;
+
+            /* Handle possible whitespace between macro tag and opening
+               parenthesis and ensure this is an actual macro.
+               -- Bob Weiner, Altrasoft, 11/19/1997 */
+            while (*p && isspace(*p)) p++;
+            if (*p) c = *p;
+
+            /* Skip over nested parentheses. */
+            if (c == '(')
+              {
+                short depth = 1;
+
+                while (*++p && depth > 0 && *p != '\n')
+                  {
+                    switch (*p)
+                      {
+                      case '(':
+                        depth++; break;
+                      case ')':
+                        depth--; break;
+                      }
+                  }
+
+                /* If this is a macro, we have just passed
+                   the arguments and there will be more on
+                   the line before the NULL character that marks
+                   the end of the line token. */
+                while (*p == ' ' || *p == '\t') p++;
+                if (*p) *is_func_or_var = TRUE;
+              }
+          }
+      }
+
+      set_construct((*is_func_or_var) ? C_MACRO : C_CONSTANT);
+#endif
+      if (!*is_func_or_var && !constantypedefs)
+       return FALSE;
+      else
+       return TRUE;
+    case dignorerest:
+      return FALSE;
+    default:
+      error ("internal error: definedef value.", (char *)NULL);
+    }
+
+  /*
+   * Now typedefs
+   */
+  switch (typdef)
+    {
+    case tnone:
+      if (toktype == st_C_typedef)
+       {
+         if (typedefs)
+           typdef = ttypedseen;
+         fvdef = fvnone;
+         return FALSE;
+       }
+      break;
+    case ttypedseen:
+      switch (toktype)
+       {
+       case st_C_const:
+          set_construct(C_CONSTANT);
+          /* fall through */
+       case st_none:
+       case st_C_typespec:
+#ifdef OO_BROWSER
+       case st_C_extern:
+#endif
+         typdef = tend;
+         break;
+       case st_C_struct:
+       case st_C_enum:
+#ifdef OO_BROWSER
+       case st_C_union:
+       case st_C_class:
+#endif
+         break;
+       }
+      /* Do not return here, so the structdef stuff has a chance. */
+      break;
+    case tend:
+      switch (toktype)
+       {
+       case st_C_const:
+          set_construct(C_CONSTANT);
+          /* fall through */
+       case st_C_typespec:
+       case st_C_struct:
+       case st_C_enum:
+#ifdef OO_BROWSER
+       case st_C_extern:
+       case st_C_union:
+       case st_C_class:
+#endif
+         return FALSE;
+       }
+      return TRUE;
+    }
+
+  /*
+   * This structdef business is currently only invoked when cblev==0.
+   * It should be recursively invoked whatever the curly brace level,
+   * and a stack of states kept, to allow for definitions of structs
+   * within structs.
+   *
+   * This structdef business is NOT invoked when we are ctags and the
+   * file is plain C.  This is because a struct tag may have the same
+   * name as another tag, and this loses with ctags.
+   */
+  switch (toktype)
+    {
+    case st_C_javastruct:
+      if (structdef == stagseen)
+        structdef = scolonseen;
+      return FALSE;
+    case st_C_struct:
+    case st_C_enum:
+#ifdef OO_BROWSER
+    case st_C_union:
+    case st_C_class:
+    case st_C_extern:
+#endif
+      if (typdef == ttypedseen
+         || (typedefs_and_cplusplus && cblev == 0 && structdef == snone))
+       {
+         structdef = skeyseen;
+         structtype = toktype;
+       }
+      return FALSE;
+    }
+
+  if (structdef == skeyseen)
+    {
+      /* Save the tag for struct/union/class, for functions and variables
+        that may be defined inside. */
+#ifndef OO_BROWSER
+      if (structtype == st_C_struct)
+#else
+      if (structtype == st_C_struct
+         || structtype == st_C_union
+         || structtype == st_C_class)
+#endif
+       structtag = savenstr (str, len);
+      else
+       structtag = "<enum>";
+      structdef = stagseen;
+      return TRUE;
+    }
+
+  /* Avoid entering fvdef stuff if typdef is going on. */
+  if (typdef != tnone)
+    {
+      definedef = dnone;
+      return FALSE;
+    }
+
+  /* Detect GNU macros.
+
+     DEFUN note for writers of emacs C code:
+      The DEFUN macro, used in emacs C source code, has a first arg
+     that is a string (the lisp function name), and a second arg that
+     is a C function name.  Since etags skips strings, the second arg
+     is tagged.  This is unfortunate, as it would be better to tag the
+     first arg.  The simplest way to deal with this problem would be
+     to name the tag with a name built from the function name, by
+     removing the initial 'F' character and substituting '-' for '_'.
+     Anyway, this assumes that the conventions of naming lisp
+     functions will never change.  Currently, this method is not
+     implemented, so writers of emacs code are recommended to put the
+     first two args of a DEFUN on the same line. */
+  if (definedef == dnone && toktype == st_C_gnumacro)
+    {
+      next_token_is_func = TRUE;
+      return FALSE;
+    }
+  if (next_token_is_func)
+    {
+      next_token_is_func = FALSE;
+      fvdef = fignore;
+      *is_func_or_var = TRUE;
+      return TRUE;
+    }
+
+  /* Detect Objective C constructs. */
+  switch (objdef)
+    {
+    case onone:
+      switch (toktype)
+       {
+       case st_C_objprot:
+#ifdef OO_BROWSER
+         set_construct(C_OBJC);
+#endif
+         objdef = oprotocol;
+         return FALSE;
+       case st_C_objimpl:
+#ifdef OO_BROWSER
+         set_construct(C_OBJC);
+#endif
+         objdef = oimplementation;
+         return FALSE;
+       }
+      break;
+    case oimplementation:
+      /* Save the class tag for functions or variables defined inside. */
+      objtag = savenstr (str, len);
+      objdef = oinbody;
+      return FALSE;
+    case oprotocol:
+      /* Save the class tag for categories. */
+      objtag = savenstr (str, len);
+      objdef = otagseen;
+      *is_func_or_var = TRUE;
+      return TRUE;
+    case oparenseen:
+      objdef = ocatseen;
+      *is_func_or_var = TRUE;
+      return TRUE;
+    case oinbody:
+      break;
+    case omethodsign:
+      if (parlev == 0)
+       {
+         objdef = omethodtag;
+         methodlen = len;
+         grow_linebuffer (&token_name, methodlen + 1);
+         strncpy (token_name.buffer, str, len);
+         token_name.buffer[methodlen] = '\0';
+         token_name.len = methodlen;
+         return TRUE;
+       }
+      return FALSE;
+    case omethodcolon:
+      if (parlev == 0)
+       objdef = omethodparm;
+      return FALSE;
+    case omethodparm:
+      if (parlev == 0)
+       {
+         objdef = omethodtag;
+         methodlen += len;
+         grow_linebuffer (&token_name, methodlen + 1);
+         strncat (token_name.buffer, str, len);
+         token_name.len = methodlen;
+         return TRUE;
+       }
+      return FALSE;
+    case oignore:
+      if (toktype == st_C_objend)
+       {
+         /* Memory leakage here: the string pointed by objtag is
+            never released, because many tests would be needed to
+            avoid breaking on incorrect input code.  The amount of
+            memory leaked here is the sum of the lengths of the
+            class tags.
+         free (objtag); */
+         objdef = onone;
+       }
+      return FALSE;
+    }
+
+  /* A function, variable or enum constant? */
+  switch (toktype)
+    {
+    case st_C_const:
+      set_construct(C_CONSTANT);
+      /* fall through */
+    case st_C_typespec:
+#ifdef OO_BROWSER
+    case st_C_extern:
+#endif
+      if (fvdef != finlist && fvdef != fignore  && fvdef != vignore)
+        fvdef = fvnone;                /* should be useless */
+      return FALSE;
+    case st_C_ignore:
+      fvdef = vignore;
+      return FALSE;
+    case st_none:
+      if (constantypedefs && structdef == sinbody && structtype == st_C_enum)
+#ifdef OO_BROWSER
+        {
+         oo_browser_construct = C_ENUM_LABEL;
+#endif
+       return TRUE;
+#ifdef OO_BROWSER
+       }
+#endif
+      if (fvdef == fvnone)
+       {
+         fvdef = fvnameseen;   /* function or variable */
+         *is_func_or_var = TRUE;
+         return TRUE;
+       }
+    }
+
+  return FALSE;
+}
+
+/*
+ * C_entries ()
+ *     This routine finds functions, variables, typedefs,
+ *     #define's, enum constants and struct/union/enum definitions in
+ *     #C syntax and adds them to the list.
+ */
+#define current_lb_is_new (newndx == curndx)
+#define switch_line_buffers() (curndx = 1 - curndx)
+
+#define curlb (lbs[curndx].lb)
+#define othlb (lbs[1-curndx].lb)
+#define newlb (lbs[newndx].lb)
+#define curlinepos (lbs[curndx].linepos)
+#define othlinepos (lbs[1-curndx].linepos)
+#define newlinepos (lbs[newndx].linepos)
+
+#define CNL_SAVE_DEFINEDEF()                                           \
+do {                                                                   \
+  curlinepos = charno;                                                 \
+  lineno++;                                                            \
+  linecharno = charno;                                                 \
+  charno += readline (&curlb, inf);                                    \
+  lp = curlb.buffer;                                                   \
+  quotednl = FALSE;                                                    \
+  newndx = curndx;                                                     \
+} while (0)
+
+#define CNL()                                                          \
+do {                                                                   \
+  CNL_SAVE_DEFINEDEF();                                                        \
+  if (savetok.valid)                                                   \
+    {                                                                  \
+      tok = savetok;                                                   \
+      savetok.valid = FALSE;                                           \
+    }                                                                  \
+  definedef = dnone;                                                   \
+} while (0)
+
+
+void make_C_tag PP ((bool isfun));
+void
+make_C_tag (isfun)
+     bool isfun;
+{
+  /* This function should never be called when tok.valid is FALSE, but
+     we must protect against invalid input or internal errors. */
+  if (tok.valid)
+    {
+      if (traditional_tag_style)
+       {
+         /* This was the original code.  Now we call new_pfnote instead,
+            which uses the new method for naming tags (see new_pfnote). */
+         char *name = NULL;
+
+         if (CTAGS || tok.named)
+           name = savestr (token_name.buffer);
+         pfnote (name, isfun,
+                 tok.buffer, tok.linelen, tok.lineno, tok.linepos);
+       }
+      else
+       new_pfnote (token_name.buffer, token_name.len, isfun,
+                   tok.buffer, tok.linelen, tok.lineno, tok.linepos);
+      tok.valid = FALSE;
+    }
+  else if (DEBUG)
+    abort ();
+}
+
+
+void
+C_entries (c_ext, inf)
+     int c_ext;                        /* extension of C */
+     FILE *inf;                        /* input file */
+{
+  register char c;             /* latest char read; '\0' for end of line */
+  register char *lp;           /* pointer one beyond the character `c' */
+  int curndx, newndx;          /* indices for current and new lb */
+  register int tokoff;         /* offset in line of start of current token */
+  register int toklen;         /* length of current token */
+  char *qualifier;             /* string used to qualify names */
+  int qlen;                    /* length of qualifier */
+  int cblev;                   /* current curly brace level */
+  int parlev;                  /* current parenthesis level */
+  bool incomm, inquote, inchar, quotednl, midtoken;
+  bool cplpl, cjava;
+  token savetok;               /* token saved during preprocessor handling */
+
+
+  tokoff = toklen = 0;         /* keep compiler quiet */
+  curndx = newndx = 0;
+  lineno = 0;
+  charno = 0;
+  lp = curlb.buffer;
+  *lp = 0;
+
+  fvdef = fvnone; typdef = tnone; structdef = snone;
+  definedef = dnone; objdef = onone;
+  next_token_is_func = yacc_rules = FALSE;
+  midtoken = inquote = inchar = incomm = quotednl = FALSE;
+  tok.valid = savetok.valid = FALSE;
+  cblev = 0;
+  parlev = 0;
+  cplpl = (c_ext & C_PLPL) == C_PLPL;
+  cjava = (c_ext & C_JAVA) == C_JAVA;
+  if (cjava)
+    { qualifier = "."; qlen = 1; }
+  else
+    { qualifier = "::"; qlen = 2; }
+
+  while (!feof (inf))
+    {
+      c = *lp++;
+      if (c == '\\')
+       {
+         /* If we're at the end of the line, the next character is a
+            '\0'; don't skip it, because it's the thing that tells us
+            to read the next line.  */
+         if (*lp == '\0')
+           {
+             quotednl = TRUE;
+             continue;
+           }
+         lp++;
+         c = ' ';
+       }
+      else if (incomm)
+       {
+         switch (c)
+           {
+           case '*':
+             if (*lp == '/')
+               {
+                 c = *lp++;
+                 incomm = FALSE;
+               }
+             break;
+           case '\0':
+             /* Newlines inside comments do not end macro definitions in
+                traditional cpp. */
+             CNL_SAVE_DEFINEDEF ();
+             break;
+           }
+         continue;
+       }
+      else if (inquote)
+       {
+         switch (c)
+           {
+           case '"':
+             inquote = FALSE;
+             break;
+           case '\0':
+             /* Newlines inside strings do not end macro definitions
+                in traditional cpp, even though compilers don't
+                usually accept them. */
+             CNL_SAVE_DEFINEDEF ();
+             break;
+           }
+         continue;
+       }
+      else if (inchar)
+       {
+         switch (c)
+           {
+           case '\0':
+             /* Hmmm, something went wrong. */
+             CNL ();
+             /* FALLTHRU */
+           case '\'':
+             inchar = FALSE;
+             break;
+           }
+         continue;
+       }
+      else
+       switch (c)
+         {
+         case '"':
+           inquote = TRUE;
+           if (fvdef != finlist && fvdef != fignore && fvdef !=vignore)
+             fvdef = fvnone;
+           continue;
+         case '\'':
+           inchar = TRUE;
+           if (fvdef != finlist && fvdef != fignore && fvdef !=vignore)
+             fvdef = fvnone;
+           continue;
+         case '/':
+           if (*lp == '*')
+             {
+               lp++;
+               incomm = TRUE;
+               continue;
+             }
+           else if (/* cplpl && */ *lp == '/')
+             {
+               c = '\0';
+               break;
+             }
+           else
+             break;
+         case '%':
+           if ((c_ext & YACC) && *lp == '%')
+             {
+               /* entering or exiting rules section in yacc file */
+               lp++;
+               definedef = dnone; fvdef = fvnone;
+               typdef = tnone; structdef = snone;
+               next_token_is_func = FALSE;
+               midtoken = inquote = inchar = incomm = quotednl = FALSE;
+               cblev = 0;
+               yacc_rules = !yacc_rules;
+               continue;
+             }
+           else
+             break;
+         case '#':
+           if (definedef == dnone)
+             {
+               char *cp;
+               bool cpptoken = TRUE;
+
+               /* Look back on this line.  If all blanks, or nonblanks
+                  followed by an end of comment, this is a preprocessor
+                  token. */
+               for (cp = newlb.buffer; cp < lp-1; cp++)
+                 if (!iswhite (*cp))
+                   {
+                     if (*cp == '*' && *(cp+1) == '/')
+                       {
+                         cp++;
+                         cpptoken = TRUE;
+                       }
+                     else
+                       cpptoken = FALSE;
+                   }
+               if (cpptoken)
+                 definedef = dsharpseen;
+             } /* if (definedef == dnone) */
+
+           continue;
+         } /* switch (c) */
+
+
+      /* Consider token only if some complicated conditions are satisfied. */
+      if ((definedef != dnone
+          || (cblev == 0 && structdef != scolonseen)
+          || (cblev == 1 && cplpl && structdef == sinbody)
+          || (structdef == sinbody && structtype == st_C_enum))
+         && typdef != tignore
+         && definedef != dignorerest
+         && fvdef != finlist)
+       {
+         if (midtoken)
+           {
+             if (endtoken (c))
+               {
+                 if (c == ':' && cplpl && *lp == ':' && begtoken(*(lp + 1)))
+                   {
+                     /*
+                      * This handles :: in the middle, but not at the
+                      * beginning of an identifier.
+                      */
+                     lp += 2;
+                     toklen += 3;
+#ifdef OO_BROWSER
+                     set_construct(C_METHOD);
+#endif
+                   }
+                 else
+                   {
+                     bool funorvar = FALSE;
+
+                     if (yacc_rules
+                         || consider_token (newlb.buffer + tokoff, toklen, c,
+                                            c_ext, cblev, parlev, &funorvar))
+                       {
+                         tok.named = FALSE;
+                         if (structdef == sinbody
+                             && definedef == dnone
+                             && funorvar)
+                           /* function or var defined in C++ class body */
+                           {
+                             int len = strlen (structtag) + qlen + toklen;
+                             grow_linebuffer (&token_name, len + 1);
+                             strcpy (token_name.buffer, structtag);
+                             strcat (token_name.buffer, qualifier);
+                             strncat (token_name.buffer,
+                                      newlb.buffer + tokoff, toklen);
+                             token_name.len = len;
+                             tok.named = TRUE;
+#ifdef OO_BROWSER
+                             oo_browser_construct = C_METHOD;
+#endif
+                           }
+                         else if (objdef == ocatseen)
+                           /* Objective C category */
+                           {
+                             int len = strlen (objtag) + 2 + toklen;
+                             grow_linebuffer (&token_name, len + 1);
+                             strcpy (token_name.buffer, objtag);
+                             strcat (token_name.buffer, "(");
+                             strncat (token_name.buffer,
+                                      newlb.buffer + tokoff, toklen);
+                             strcat (token_name.buffer, ")");
+                             token_name.len = len;
+                             tok.named = TRUE;
+#ifdef OO_BROWSER
+                             oo_browser_construct = C_OBJC;
+#endif
+                           }
+                         else if (objdef == omethodtag
+                                  || objdef == omethodparm)
+                           /* Objective C method */
+                           {
+                             tok.named = TRUE;
+#ifdef OO_BROWSER
+                             oo_browser_construct = C_OBJC;
+#endif
+                           }
+                         else
+                           {
+                             grow_linebuffer (&token_name, toklen + 1);
+                             strncpy (token_name.buffer,
+                                      newlb.buffer + tokoff, toklen);
+                             token_name.buffer[toklen] = '\0';
+                             token_name.len = toklen;
+                             /* Name macros. */
+                             tok.named
+                                = (structdef == stagseen
+                                   || typdef == tend
+#ifdef OO_BROWSER
+                                   /* Also name #define constants,
+                                      enumerations and enum_labels.
+                                      Conditionalize `funorvar' reference
+                                      here or #defines will appear without
+                                      their #names.
+                                      -- Bob Weiner, Altrasoft, 4/25/1998 */
+                                   || ((oo_browser_format || funorvar)
+                                       && definedef == dignorerest)
+                                   || (oo_browser_format
+                                       && (oo_browser_construct == C_ENUMERATION
+                                           || oo_browser_construct == C_ENUM_LABEL))
+#else
+                                   || (funorvar
+                                       && definedef == dignorerest)
+#endif
+                                   );
+                           }
+                         tok.lineno = lineno;
+                         tok.linelen = tokoff + toklen + 1;
+                         tok.buffer = newlb.buffer;
+                         tok.linepos = newlinepos;
+                         tok.valid = TRUE;
+
+                         if (definedef == dnone
+                             && (fvdef == fvnameseen
+                                 || structdef == stagseen
+                                 || typdef == tend
+                                 || objdef != onone))
+                           {
+                             if (current_lb_is_new)
+                               switch_line_buffers ();
+                           }
+                         else
+                           make_C_tag (funorvar);
+                       }
+                     midtoken = FALSE;
+                   }
+               } /* if (endtoken (c)) */
+             else if (intoken (c))
+               {
+                 toklen++;
+                 continue;
+               }
+           } /* if (midtoken) */
+         else if (begtoken (c))
+           {
+             switch (definedef)
+               {
+               case dnone:
+                 switch (fvdef)
+                   {
+                   case fstartlist:
+                     fvdef = finlist;
+                     continue;
+                   case flistseen:
+#ifdef OO_BROWSER
+                     set_construct(C_MACRO);
+#endif
+                     make_C_tag (TRUE); /* a function */
+                     fvdef = fignore;
+                     break;
+                   case fvnameseen:
+                     fvdef = fvnone;
+                     break;
+                   }
+                 if (structdef == stagseen && !cjava)
+                   structdef = snone;
+                 break;
+               case dsharpseen:
+                 savetok = tok;
+               }
+             if (!yacc_rules || lp == newlb.buffer + 1)
+               {
+                 tokoff = lp - 1 - newlb.buffer;
+                 toklen = 1;
+                 midtoken = TRUE;
+               }
+             continue;
+           } /* if (begtoken) */
+       } /* if must look at token */
+
+
+      /* Detect end of line, colon, comma, semicolon and various braces
+        after having handled a token.*/
+      switch (c)
+       {
+       case ':':
+         if (definedef != dnone)
+           break;
+         switch (objdef)
+           {
+           case  otagseen:
+             objdef = oignore;
+             make_C_tag (TRUE); /* an Objective C class */
+             break;
+           case omethodtag:
+           case omethodparm:
+             objdef = omethodcolon;
+             methodlen += 1;
+             grow_linebuffer (&token_name, methodlen + 1);
+             strcat (token_name.buffer, ":");
+             token_name.len = methodlen;
+             break;
+           }
+         if (structdef == stagseen)
+           structdef = scolonseen;
+         else
+           switch (fvdef)
+             {
+             case fvnameseen:
+               if (yacc_rules)
+                 {
+                   make_C_tag (FALSE); /* a yacc function */
+                   fvdef = fignore;
+                 }
+               break;
+             case fstartlist:
+               fvdef = fvnone;
+               break;
+             }
+         break;
+       case ';':
+         if (definedef != dnone)
+           break;
+         if (cblev == 0)
+           switch (typdef)
+             {
+             case tend:
+#ifdef OO_BROWSER
+               set_construct(C_TYPE);
+#endif
+               make_C_tag (FALSE); /* a typedef */
+               /* FALLTHRU */
+             default:
+               typdef = tnone;
+             }
+         switch (fvdef)
+           {
+           case fignore:
+             break;
+           case fvnameseen:
+             if ((globals && cblev == 0) || (members && cblev == 1))
+#ifndef OO_BROWSER
+               make_C_tag (FALSE); /* a variable */
+#else
+/*           if (constantypedefs && structdef == snone)*/
+               {
+                 tok.named = TRUE;
+                 switch (structtype)
+                   {
+                     case st_C_enum:
+                       set_construct(C_ENUMERATION);
+                       break;
+                     case st_C_class:
+                       set_construct(C_CLASS);
+                       break;
+                     default:
+                       set_construct(C_VARIABLE);
+                       break;
+                   }
+                 make_C_tag (FALSE);
+                 /* Force reset of st_C_enum structtype value. */
+                 structtype = st_none;
+               }
+#endif
+             /* FALLTHRU */
+           default:
+             fvdef = fvnone;
+             /* The following instruction invalidates the token.
+                Probably the token should be invalidated in all
+                other cases  where some state machine is reset. */
+             tok.valid = FALSE;
+           }
+         if (structdef == stagseen)
+           structdef = snone;
+         break;
+       case ',':
+         if (definedef != dnone)
+           break;
+         switch (objdef)
+           {
+           case omethodtag:
+           case omethodparm:
+             make_C_tag (TRUE); /* an Objective C method */
+             objdef = oinbody;
+             break;
+           }
+         switch (fvdef)
+           {
+           case finlist:
+           case fignore:
+           case vignore:
+             break;
+           case fvnameseen:
+             if ((globals && cblev == 0) || (members && cblev == 1))
+               make_C_tag (FALSE); /* a variable */
+             break;
+           default:
+             fvdef = fvnone;
+           }
+         if (structdef == stagseen)
+           structdef = snone;
+         break;
+       case '[':
+         if (definedef != dnone)
+           break;
+         if (cblev == 0 && typdef == tend)
+           {
+#ifdef OO_BROWSER
+             set_construct(C_TYPE);
+#endif
+             typdef = tignore;
+             make_C_tag (FALSE);       /* a typedef */
+             break;
+           }
+         switch (fvdef)
+           {
+           case finlist:
+           case fignore:
+           case vignore:
+             break;
+           case fvnameseen:
+#ifndef OO_BROWSER
+             if ((globals && cblev == 0) || (members && cblev == 1))
+               make_C_tag (FALSE); /* a variable */
+#else
+             if (constantypedefs && structdef == snone)
+               {
+                 tok.named = TRUE;
+                 switch (structtype)
+                   {
+                     case st_C_enum:
+                       set_construct(C_ENUMERATION);
+                       break;
+                     case st_C_class:
+                       set_construct(C_CLASS);
+                       break;
+                     default:
+                       set_construct(C_VARIABLE);
+                       break;
+                   }
+                 make_C_tag (FALSE);
+                 /* Force reset of st_C_enum structtype value. */
+                 structtype = st_none;
+               }
+#endif
+             /* FALLTHRU */
+           default:
+             fvdef = fvnone;
+           }
+         if (structdef == stagseen)
+           structdef = snone;
+         break;
+       case '(':
+         if (definedef != dnone)
+           break;
+         if (objdef == otagseen && parlev == 0)
+           objdef = oparenseen;
+         switch (fvdef)
+           {
+           case fvnone:
+             switch (typdef)
+               {
+               case ttypedseen:
+               case tend:
+                 if (tok.valid && *lp != '*')
+                   {
+                     /* This handles constructs like:
+                        typedef void OperatorFun (int fun); */
+                     typdef = tignore;
+#ifdef OO_BROWSER
+                     set_construct(C_TYPE);
+#endif
+                     make_C_tag (FALSE);
+                   }
+                 break;
+               } /* switch (typdef) */
+             break;
+           case fvnameseen:
+             fvdef = fstartlist;
+             break;
+           case flistseen:
+             fvdef = finlist;
+             break;
+           }
+         parlev++;
+         break;
+       case ')':
+         if (definedef != dnone)
+           break;
+         if (objdef == ocatseen && parlev == 1)
+           {
+             make_C_tag (TRUE); /* an Objective C category */
+             objdef = oignore;
+           }
+         if (--parlev == 0)
+           {
+             switch (fvdef)
+               {
+               case fstartlist:
+               case finlist:
+                 fvdef = flistseen;
+                 break;
+               }
+             if (cblev == 0 && typdef == tend)
+               {
+#ifdef OO_BROWSER
+                 set_construct(C_TYPE);
+#endif
+                 typdef = tignore;
+                 make_C_tag (FALSE); /* a typedef */
+               }
+           }
+         else if (parlev < 0)  /* can happen due to ill-conceived #if's. */
+           parlev = 0;
+         break;
+       case '{':
+         if (definedef != dnone)
+           break;
+         if (typdef == ttypedseen)
+           typdef = tinbody;
+         switch (structdef)
+           {
+           case skeyseen:      /* unnamed struct */
+             structdef = sinbody;
+             structtag = "_anonymous_";
+             break;
+           case stagseen:
+           case scolonseen:    /* named struct */
+             structdef = sinbody;
+             make_C_tag (FALSE);       /* a struct */
+             break;
+           }
+         switch (fvdef)
+           {
+           case flistseen:
+#ifdef OO_BROWSER
+             set_construct(C_FUNCTION);
+             /* Ensure function name is recorded.
+                -- Bob Weiner, Altrasoft */
+             tok.named = TRUE;
+#endif
+             make_C_tag (TRUE); /* a function */
+             /* FALLTHRU */
+           case fignore:
+             fvdef = fvnone;
+             break;
+           case fvnone:
+             switch (objdef)
+               {
+               case otagseen:
+                 make_C_tag (TRUE); /* an Objective C class */
+                 objdef = oignore;
+                 break;
+               case omethodtag:
+               case omethodparm:
+                 make_C_tag (TRUE); /* an Objective C method */
+                 objdef = oinbody;
+                 break;
+               default:
+                 /* Neutralize `extern "C" {' grot. */
+                 if (cblev == 0 && structdef == snone && typdef == tnone)
+                   cblev = -1;
+               }
+           }
+         cblev++;
+         break;
+       case '*':
+         if (definedef != dnone)
+           break;
+         if (fvdef == fstartlist)
+           fvdef = fvnone;     /* avoid tagging `foo' in `foo (*bar()) ()' */
+         break;
+       case '}':
+         if (definedef != dnone)
+           break;
+         if (!noindentypedefs && lp == newlb.buffer + 1)
+           {
+             cblev = 0;        /* reset curly brace level if first column */
+             parlev = 0;       /* also reset paren level, just in case... */
+           }
+         else if (cblev > 0)
+           cblev--;
+         if (cblev == 0)
+           {
+             if (typdef == tinbody)
+               typdef = tend;
+             /* Memory leakage here: the string pointed by structtag is
+                never released, because I fear to miss something and
+                break things while freeing the area.  The amount of
+                memory leaked here is the sum of the lengths of the
+                struct tags.
+             if (structdef == sinbody)
+               free (structtag); */
+
+             structdef = snone;
+             structtag = "<error>";
+#ifdef OO_BROWSER
+             /* Next line added to avoid any state carryover between
+                functions. -- Bob Weiner, Altrasoft, 11/19/1997 */
+             fvdef = fvnone; oo_browser_construct = C_NULL;
+#endif
+           }
+         break;
+       case '=':
+         if (definedef != dnone)
+           break;
+#ifdef OO_BROWSER
+         {
+           int is_method = 0;
+#endif
+         switch (fvdef)
+           {
+           case finlist:
+           case fignore:
+           case vignore:
+             break;
+           case fvnameseen:
+             if ((globals && cblev == 0) || (members && cblev == 1))
+#ifndef OO_BROWSER
+               make_C_tag (FALSE); /* a variable */
+#else
+               {
+                 tok.named = TRUE;
+                  switch (structtype)
+                    {
+                      case st_C_enum:
+                        set_construct(C_ENUMERATION);
+                        break;
+                      case st_C_class:
+                        set_construct(C_CLASS);
+                        break;
+                      default:
+                        /* a global variable */
+                        set_construct(C_VARIABLE);
+                        break;
+                    }
+
+                  /* ootags categorizes each tag found whereas etags doesn't.
+                     Set the is_method flag if this tag has been marked as
+                     such by an earlier section of code.
+                     -- Steve Baur, Altrasoft, 5/7/1998 */
+                 is_method = (oo_browser_construct == C_METHOD);
+
+                 make_C_tag (FALSE);
+                  /* Force reset of st_C_enum structtype value. */
+                  structtype = st_none;
+               }
+#endif
+             /* FALLTHRU */
+           default:
+#ifdef OO_BROWSER
+             fvdef = is_method ? fignore : vignore;
+#else
+             fvdef = vignore;
+#endif
+           }
+#ifdef OO_BROWSER
+         }
+#endif
+         break;
+       case '+':
+       case '-':
+         if (objdef == oinbody && cblev == 0)
+           {
+             objdef = omethodsign;
+             break;
+           }
+         /* FALLTHRU */
+       case '#': case '~': case '&': case '%': case '/': case '|':
+       case '^': case '!': case '<': case '>': case '.': case '?': case ']':
+         if (definedef != dnone)
+           break;
+#ifdef OO_BROWSER
+         if (!cplpl)
+           {
+#endif
+              /* The above characters cannot follow a function tag in C, so
+                 unmark this as a function entry.  For C++, these characters
+                 may follow an `operator' function construct, so skip the
+                 unmarking conditional below.
+                 -- Steve Baur, Altrasoft, 5/7/1998 */
+              if (fvdef != finlist && fvdef != fignore && fvdef != vignore)
+                fvdef = fvnone;
+#ifdef OO_BROWSER
+           }
+#endif
+         break;
+       case '\0':
+         if (objdef == otagseen)
+           {
+             make_C_tag (TRUE); /* an Objective C class */
+             objdef = oignore;
+           }
+         /* If a macro spans multiple lines don't reset its state. */
+         if (quotednl)
+           CNL_SAVE_DEFINEDEF ();
+         else
+           CNL ();
+         break;
+       } /* switch (c) */
+
+    } /* while not eof */
+}
+
+/*
+ * Process either a C++ file or a C file depending on the setting
+ * of a global flag.
+ */
+void
+default_C_entries (inf)
+     FILE *inf;
+{
+  C_entries (cplusplus ? C_PLPL : 0, inf);
+}
+
+/* Always do plain ANSI C. */
+void
+plain_C_entries (inf)
+     FILE *inf;
+{
+  C_entries (0, inf);
+}
+
+/* Always do C++. */
+void
+Cplusplus_entries (inf)
+     FILE *inf;
+{
+  C_entries (C_PLPL, inf);
+}
+
+/* Always do Java. */
+void
+Cjava_entries (inf)
+     FILE *inf;
+{
+  C_entries (C_JAVA, inf);
+}
+
+/* Always do C*. */
+void
+Cstar_entries (inf)
+     FILE *inf;
+{
+  C_entries (C_STAR, inf);
+}
+
+/* Always do Yacc. */
+void
+Yacc_entries (inf)
+     FILE *inf;
+{
+  C_entries (YACC, inf);
+}
+\f
+/* A useful macro. */  
+#define LOOP_ON_INPUT_LINES(file_pointer, line_buffer, char_pointer)   \
+  for (lineno = charno = 0;    /* loop initialization */               \
+       !feof (file_pointer)    /* loop test */                         \
+       && (lineno++,           /* instructions at start of loop */     \
+          linecharno = charno,                                         \
+          charno += readline (&line_buffer, file_pointer),             \
+          char_pointer = lb.buffer,                                    \
+          TRUE);                                                       \
+      )
+
+
+/*
+ * Read a file, but do no processing.  This is used to do regexp
+ * matching on files that have no language defined.
+ */
+void
+just_read_file (inf)
+     FILE *inf;
+{
+  register char *dummy;
+
+  LOOP_ON_INPUT_LINES (inf, lb, dummy)
+    continue;
+}
+\f
+/* Fortran parsing */
+
+bool tail PP ((char *cp));
+bool
+tail (cp)
+     char *cp;
+{
+  register int len = 0;
+
+  while (*cp && lowcase(*cp) == lowcase(dbp[len]))
+    cp++, len++;
+  if (*cp == '\0' && !intoken(dbp[len]))
+    {
+      dbp += len;
+      return TRUE;
+    }
+  return FALSE;
+}
+
+void
+takeprec ()
+{
+  dbp = skip_spaces (dbp);
+  if (*dbp != '*')
+    return;
+  dbp++;
+  dbp = skip_spaces (dbp);
+  if (strneq (dbp, "(*)", 3))
+    {
+      dbp += 3;
+      return;
+    }
+  if (!isdigit (*dbp))
+    {
+      --dbp;                   /* force failure */
+      return;
+    }
+  do
+    dbp++;
+  while (isdigit (*dbp));
+}
+
+void getit PP ((FILE *inf));
+void
+getit (inf)
+     FILE *inf;
+{
+  register char *cp;
+
+  dbp = skip_spaces (dbp);
+  if (*dbp == '\0')
+    {
+      lineno++;
+      linecharno = charno;
+      charno += readline (&lb, inf);
+      dbp = lb.buffer;
+      if (dbp[5] != '&')
+       return;
+      dbp += 6;
+      dbp = skip_spaces (dbp);
+    }
+  if (!isalpha (*dbp)
+      && *dbp != '_'
+      && *dbp != '$')
+    return;
+  for (cp = dbp + 1; *cp && intoken (*cp); cp++)
+    continue;
+  pfnote ((CTAGS) ? savenstr (dbp, cp-dbp) : NULL, TRUE,
+         lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
+}
+
+
+void
+Fortran_functions (inf)
+     FILE *inf;
+{
+  LOOP_ON_INPUT_LINES (inf, lb, dbp)
+    {
+      if (*dbp == '%')
+       dbp++;                  /* Ratfor escape to fortran */
+      dbp = skip_spaces (dbp);
+      if (*dbp == '\0')
+       continue;
+      switch (lowcase (*dbp))
+       {
+       case 'i':
+         if (tail ("integer"))
+           takeprec ();
+         break;
+       case 'r':
+         if (tail ("real"))
+           takeprec ();
+         break;
+       case 'l':
+         if (tail ("logical"))
+           takeprec ();
+         break;
+       case 'c':
+         if (tail ("complex") || tail ("character"))
+           takeprec ();
+         break;
+       case 'd':
+         if (tail ("double"))
+           {
+             dbp = skip_spaces (dbp);
+             if (*dbp == '\0')
+               continue;
+             if (tail ("precision"))
+               break;
+             continue;
+           }
+         break;
+       }
+      dbp = skip_spaces (dbp);
+      if (*dbp == '\0')
+       continue;
+      switch (lowcase (*dbp))
+       {
+       case 'f':
+         if (tail ("function"))
+           getit (inf);
+         continue;
+       case 's':
+         if (tail ("subroutine"))
+           getit (inf);
+         continue;
+       case 'e':
+         if (tail ("entry"))
+           getit (inf);
+         continue;
+       case 'p':
+         if (tail ("program"))
+           {
+             getit (inf);
+             continue;
+           }
+         if (tail ("procedure"))
+           getit (inf);
+         continue;
+       }
+    }
+}
+\f
+/*
+ * Bob Weiner, Motorola Inc., 4/3/94
+ * Unix and microcontroller assembly tag handling
+ * look for '^[a-zA-Z_.$][a-zA_Z0-9_.$]*[: ^I^J]'
+ */
+void
+Asm_labels (inf)
+     FILE *inf;
+{
+  register char *cp;
+
+  LOOP_ON_INPUT_LINES (inf, lb, cp)
+    {
+      /* If first char is alphabetic or one of [_.$], test for colon
+        following identifier. */
+      if (isalpha (*cp) || *cp == '_' || *cp == '.' || *cp == '$')
+       {
+         /* Read past label. */
+         cp++;
+         while (isalnum (*cp) || *cp == '_' || *cp == '.' || *cp == '$')
+           cp++;
+         if (*cp == ':' || isspace (*cp))
+           {
+             /* Found end of label, so copy it and add it to the table. */
+             pfnote ((CTAGS) ? savenstr(lb.buffer, cp-lb.buffer) : NULL, TRUE,
+                     lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
+           }
+       }
+    }
+}
+\f
+/*
+ * Perl support by Bart Robinson <lomew@cs.utah.edu>
+ *              enhanced by Michael Ernst <mernst@alum.mit.edu>
+ * Perl sub names: look for /^sub[ \t\n]+[^ \t\n{]+/
+ * Perl variable names: /^(my|local).../
+ */
+void
+Perl_functions (inf)
+     FILE *inf;
+{
+  register char *cp;
+
+  LOOP_ON_INPUT_LINES (inf, lb, cp)
+    {
+      if (*cp++ == 's'
+         && *cp++ == 'u'
+         && *cp++ == 'b' && isspace (*cp++))
+       {
+         cp = skip_spaces (cp);
+         if (*cp != '\0')
+           {
+             while (*cp != '\0'
+                    && !isspace (*cp) && *cp != '{' && *cp != '(')
+               cp++;
+             pfnote ((CTAGS) ? savenstr(lb.buffer, cp-lb.buffer) : NULL, TRUE,
+                     lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
+           }         
+       }
+       else if (globals                /* only if tagging global vars is enabled */
+               && ((cp = lb.buffer,
+                    *cp++ == 'm'
+                    && *cp++ == 'y')
+                   || (cp = lb.buffer,
+                       *cp++ == 'l'
+                       && *cp++ == 'o'
+                       && *cp++ == 'c'
+                       && *cp++ == 'a'
+                       && *cp++ == 'l'))
+               && (*cp == '(' || isspace (*cp)))
+       {
+         /* After "my" or "local", but before any following paren or space. */
+         char *varname = NULL;
+
+         cp = skip_spaces (cp);
+         if (*cp == '$' || *cp == '@' || *cp == '%')
+           {
+             char* varstart = ++cp;
+             while (isalnum (*cp) || *cp == '_')
+               cp++;
+             varname = savenstr (varstart, cp-varstart);
+           }
+         else
+           {
+             /* Should be examining a variable list at this point;
+                could insist on seeing an open parenthesis. */
+             while (*cp != '\0' && *cp != ';' && *cp != '=' &&  *cp != ')')
+               cp++;
+           }
+         /* Perhaps I should back cp up one character, so the TAGS table
+            doesn't mention (and so depend upon) the following char. */
+         pfnote ((CTAGS) ? savenstr (lb.buffer, cp-lb.buffer) : varname,
+                 FALSE, lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
+       }
+    }
+}
+\f
+/*
+ * Python support by Eric S. Raymond <esr@thyrsus.com>
+ * Look for /^def[ \t\n]+[^ \t\n(:]+/ or /^class[ \t\n]+[^ \t\n(:]+/
+ */
+void
+Python_functions (inf)
+     FILE *inf;
+{
+  register char *cp;
+
+  LOOP_ON_INPUT_LINES (inf, lb, cp)
+    {
+      if (*cp++ == 'd'
+         && *cp++ == 'e'
+         && *cp++ == 'f' && isspace (*cp++))
+       {
+         cp = skip_spaces (cp);
+         while (*cp != '\0' && !isspace (*cp) && *cp != '(' && *cp != ':')
+           cp++;
+         pfnote ((char *) NULL, TRUE,
+                 lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
+       }
+
+      cp = lb.buffer;
+      if (*cp++ == 'c'
+         && *cp++ == 'l'
+         && *cp++ == 'a'
+         && *cp++ == 's'
+         && *cp++ == 's' && isspace (*cp++))
+       {
+         cp = skip_spaces (cp);
+         while (*cp != '\0' && !isspace (*cp) && *cp != '(' && *cp != ':')
+           cp++;
+         pfnote ((char *) NULL, TRUE,
+                 lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
+       }
+    }
+}
+\f
+/* Idea by Corny de Souza
+ * Cobol tag functions
+ * We could look for anything that could be a paragraph name.
+ * i.e. anything that starts in column 8 is one word and ends in a full stop.
+ */
+void
+Cobol_paragraphs (inf)
+     FILE *inf;
+{
+  register char *bp, *ep;
+
+  LOOP_ON_INPUT_LINES (inf, lb, bp)
+    {
+      if (lb.len < 9)
+       continue;
+      bp += 8;
+
+      /* If eoln, compiler option or comment ignore whole line. */
+      if (bp[-1] != ' ' || !isalnum (bp[0]))
+        continue;
+
+      for (ep = bp; isalnum (*ep) || *ep == '-'; ep++)
+       continue;
+      if (*ep++ == '.')
+       pfnote ((CTAGS) ? savenstr (bp, ep-bp) : NULL, TRUE,
+               lb.buffer, ep - lb.buffer + 1, lineno, linecharno);
+    }
+}
+\f
+/* Added by Mosur Mohan, 4/22/88 */
+/* Pascal parsing                */
+
+/*
+ *  Locates tags for procedures & functions.  Doesn't do any type- or
+ *  var-definitions.  It does look for the keyword "extern" or
+ *  "forward" immediately following the procedure statement; if found,
+ *  the tag is skipped.
+ */
+void
+Pascal_functions (inf)
+     FILE *inf;
+{
+  linebuffer tline;            /* mostly copied from C_entries */
+  long save_lcno;
+  int save_lineno, save_len;
+  char c, *cp, *namebuf;
+
+  bool                         /* each of these flags is TRUE iff: */
+    incomment,                 /* point is inside a comment */
+    inquote,                   /* point is inside '..' string */
+    get_tagname,               /* point is after PROCEDURE/FUNCTION
+                                  keyword, so next item = potential tag */
+    found_tag,                 /* point is after a potential tag */
+    inparms,                   /* point is within parameter-list */
+    verify_tag;                        /* point has passed the parm-list, so the
+                                  next token will determine whether this
+                                  is a FORWARD/EXTERN to be ignored, or
+                                  whether it is a real tag */
+
+  save_lcno = save_lineno = save_len = 0; /* keep compiler quiet */
+  namebuf = NULL;              /* keep compiler quiet */
+  lineno = 0;
+  charno = 0;
+  dbp = lb.buffer;
+  *dbp = '\0';
+  initbuffer (&tline);
+
+  incomment = inquote = FALSE;
+  found_tag = FALSE;           /* have a proc name; check if extern */
+  get_tagname = FALSE;         /* have found "procedure" keyword    */
+  inparms = FALSE;             /* found '(' after "proc"            */
+  verify_tag = FALSE;          /* check if "extern" is ahead        */
+
+  
+  while (!feof (inf))          /* long main loop to get next char */  
+    {
+      c = *dbp++;
+      if (c == '\0')           /* if end of line */
+       {
+         lineno++;
+         linecharno = charno;
+         charno += readline (&lb, inf);
+         dbp = lb.buffer;
+         if (*dbp == '\0')
+           continue;
+         if (!((found_tag && verify_tag)
+               || get_tagname))
+           c = *dbp++;         /* only if don't need *dbp pointing
+                                  to the beginning of the name of
+                                  the procedure or function */
+       }
+      if (incomment)
+       {
+         if (c == '}')         /* within { } comments */
+           incomment = FALSE;
+         else if (c == '*' && *dbp == ')') /* within (* *) comments */
+           {
+             dbp++;
+             incomment = FALSE;
+           }
+         continue;
+       }
+      else if (inquote)
+       {
+         if (c == '\'')
+           inquote = FALSE;
+         continue;
+       }
+      else
+       switch (c)
+         {
+         case '\'':
+           inquote = TRUE;     /* found first quote */
+           continue;
+         case '{':             /* found open { comment */
+           incomment = TRUE;
+           continue;
+         case '(':
+           if (*dbp == '*')    /* found open (* comment */
+             {
+               incomment = TRUE;
+               dbp++;
+             }
+           else if (found_tag) /* found '(' after tag, i.e., parm-list */
+             inparms = TRUE;
+           continue;
+         case ')':             /* end of parms list */
+           if (inparms)
+             inparms = FALSE;
+           continue;
+         case ';':
+           if (found_tag && !inparms) /* end of proc or fn stmt */
+             {
+               verify_tag = TRUE;
+               break;
+             }
+           continue;
+         }
+      if (found_tag && verify_tag && (*dbp != ' '))
+       {
+         /* check if this is an "extern" declaration */
+         if (*dbp == '\0')
+           continue;
+         if (lowcase (*dbp == 'e'))
+           {
+             if (tail ("extern"))      /* superfluous, really! */
+               {
+                 found_tag = FALSE;
+                 verify_tag = FALSE;
+               }
+           }
+         else if (lowcase (*dbp) == 'f')
+           {
+             if (tail ("forward"))     /*  check for forward reference */
+               {
+                 found_tag = FALSE;
+                 verify_tag = FALSE;
+               }
+           }
+         if (found_tag && verify_tag) /* not external proc, so make tag */
+           {
+             found_tag = FALSE;
+             verify_tag = FALSE;
+             pfnote (namebuf, TRUE,
+                     tline.buffer, save_len, save_lineno, save_lcno);
+             continue;
+           }
+       }
+      if (get_tagname)         /* grab name of proc or fn */
+       {
+         if (*dbp == '\0')
+           continue;
+
+         /* save all values for later tagging */
+         grow_linebuffer (&tline, lb.len + 1);
+         strcpy (tline.buffer, lb.buffer);
+         save_lineno = lineno;
+         save_lcno = linecharno;
+
+         /* grab block name */
+         for (cp = dbp + 1; *cp != '\0' && !endtoken (*cp); cp++)
+           continue;
+         namebuf = (CTAGS) ? savenstr (dbp, cp-dbp) : NULL;
+         dbp = cp;             /* set dbp to e-o-token */
+         save_len = dbp - lb.buffer + 1;
+         get_tagname = FALSE;
+         found_tag = TRUE;
+         continue;
+
+         /* and proceed to check for "extern" */
+       }
+      else if (!incomment && !inquote && !found_tag)
+       {
+         /* check for proc/fn keywords */
+         switch (lowcase (c))
+           {
+           case 'p':
+             if (tail ("rocedure"))    /* c = 'p', dbp has advanced */
+               get_tagname = TRUE;
+             continue;
+           case 'f':
+             if (tail ("unction"))
+               get_tagname = TRUE;
+             continue;
+           }
+       }
+    }                          /* while not eof */
+
+  free (tline.buffer);
+}
+\f
+/*
+ * lisp tag functions
+ *  look for (def or (DEF, quote or QUOTE
+ */
+int L_isdef PP ((char *strp));
+int
+L_isdef (strp)
+     register char *strp;
+{
+  return ((strp[1] == 'd' || strp[1] == 'D')
+         && (strp[2] == 'e' || strp[2] == 'E')
+         && (strp[3] == 'f' || strp[3] == 'F'));
+}
+int L_isquote PP ((char *strp));
+int
+L_isquote (strp)
+     register char *strp;
+{
+  return ((*++strp == 'q' || *strp == 'Q')
+         && (*++strp == 'u' || *strp == 'U')
+         && (*++strp == 'o' || *strp == 'O')
+         && (*++strp == 't' || *strp == 'T')
+         && (*++strp == 'e' || *strp == 'E')
+         && isspace (*++strp));
+}
+
+void L_getit PP ((void));
+void
+L_getit ()
+{
+  register char *cp;
+
+  if (*dbp == '\'')            /* Skip prefix quote */
+    dbp++;
+  else if (*dbp == '(')
+  {
+    if (L_isquote (dbp))
+      dbp += 7;                        /* Skip "(quote " */
+    else
+      dbp += 1;                        /* Skip "(" before name in (defstruct (foo)) */
+    dbp = skip_spaces (dbp);
+  }
+
+  for (cp = dbp /*+1*/;
+       *cp != '\0' && *cp != '(' && *cp != ' ' && *cp != ')';
+       cp++)
+    continue;
+  if (cp == dbp)
+    return;
+
+  pfnote ((CTAGS) ? savenstr (dbp, cp-dbp) : NULL, TRUE,
+         lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
+}
+
+void
+Lisp_functions (inf)
+     FILE *inf;
+{
+  LOOP_ON_INPUT_LINES (inf, lb, dbp)
+    {
+      if (dbp[0] == '(')
+       {
+         if (L_isdef (dbp))
+           {
+             dbp = skip_non_spaces (dbp);
+             dbp = skip_spaces (dbp);
+             L_getit ();
+           }
+         else
+           {
+             /* Check for (foo::defmumble name-defined ... */
+             do
+               dbp++;
+             while (*dbp != '\0' && !isspace (*dbp)
+                    && *dbp != ':' && *dbp != '(' && *dbp != ')');
+             if (*dbp == ':')
+               {
+                 do
+                   dbp++;
+                 while (*dbp == ':');
+
+                 if (L_isdef (dbp - 1))
+                   {
+                     dbp = skip_non_spaces (dbp);
+                     dbp = skip_spaces (dbp);
+                     L_getit ();
+                   }
+               }
+           }
+       }
+    }
+}
+\f
+/*
+ * Postscript tag functions
+ * Just look for lines where the first character is '/'
+ * Richard Mlynarik <mly@adoc.xerox.com>
+ */
+void 
+Postscript_functions (inf)
+     FILE *inf;
+{
+  register char *bp, *ep;
+
+  LOOP_ON_INPUT_LINES (inf, lb, bp)
+    {
+      if (bp[0] == '/')
+       {
+         for (ep = bp+1;
+              *ep != '\0' && *ep != ' ' && *ep != '{';
+              ep++)
+           continue;
+         pfnote ((CTAGS) ? savenstr (bp, ep-bp) : NULL, TRUE,
+                 lb.buffer, ep - lb.buffer + 1, lineno, linecharno);
+       }
+    }
+}
+
+\f
+/*
+ * Scheme tag functions
+ * look for (def... xyzzy
+ * look for (def... (xyzzy
+ * look for (def ... ((...(xyzzy ....
+ * look for (set! xyzzy
+ */
+
+void get_scheme PP ((void));
+
+void
+Scheme_functions (inf)
+     FILE *inf;
+{
+  LOOP_ON_INPUT_LINES (inf, lb, dbp)
+    {
+      if (dbp[0] == '('
+         && (dbp[1] == 'D' || dbp[1] == 'd')
+         && (dbp[2] == 'E' || dbp[2] == 'e')
+         && (dbp[3] == 'F' || dbp[3] == 'f'))
+       {
+         dbp = skip_non_spaces (dbp);
+         /* Skip over open parens and white space */
+         while (isspace (*dbp) || *dbp == '(')
+           dbp++;
+         get_scheme ();
+       }
+      if (dbp[0] == '('
+         && (dbp[1] == 'S' || dbp[1] == 's')
+         && (dbp[2] == 'E' || dbp[2] == 'e')
+         && (dbp[3] == 'T' || dbp[3] == 't')
+         && (dbp[4] == '!' || dbp[4] == '!')
+         && (isspace (dbp[5])))
+       {
+         dbp = skip_non_spaces (dbp);
+         dbp = skip_spaces (dbp);
+         get_scheme ();
+       }
+    }
+}
+
+void
+get_scheme ()
+{
+  register char *cp;
+
+  if (*dbp == '\0')
+    return;
+  /* Go till you get to white space or a syntactic break */
+  for (cp = dbp + 1;
+       *cp != '\0' && *cp != '(' && *cp != ')' && !isspace (*cp);
+       cp++)
+    continue;
+  pfnote ((CTAGS) ? savenstr (dbp, cp-dbp) : NULL, TRUE,
+         lb.buffer, cp - lb.buffer + 1, lineno, linecharno);
+}
+\f
+/* Find tags in TeX and LaTeX input files.  */
+
+/* TEX_toktab is a table of TeX control sequences that define tags.
+   Each TEX_tabent records one such control sequence.
+   CONVERT THIS TO USE THE Stab TYPE!! */
+struct TEX_tabent
+{
+  char *name;
+  int len;
+};
+
+struct TEX_tabent *TEX_toktab = NULL;  /* Table with tag tokens */
+
+/* Default set of control sequences to put into TEX_toktab.
+   The value of environment var TEXTAGS is prepended to this.  */
+
+char *TEX_defenv = "\
+:chapter:section:subsection:subsubsection:eqno:label:ref:cite:bibitem\
+:part:appendix:entry:index";
+
+void TEX_mode PP ((FILE *inf));
+struct TEX_tabent *TEX_decode_env PP ((char *evarname, char *defenv));
+int TEX_Token PP ((char *cp));
+
+char TEX_esc = '\\';
+char TEX_opgrp = '{';
+char TEX_clgrp = '}';
+
+/*
+ * TeX/LaTeX scanning loop.
+ */
+void
+TeX_functions (inf)
+     FILE *inf;
+{
+  char *cp, *lasthit;
+  register int i;
+
+  /* Select either \ or ! as escape character.  */
+  TEX_mode (inf);
+
+  /* Initialize token table once from environment. */
+  if (!TEX_toktab)
+    TEX_toktab = TEX_decode_env ("TEXTAGS", TEX_defenv);
+
+  LOOP_ON_INPUT_LINES (inf, lb, cp)
+    {
+      lasthit = cp;
+      /* Look at each esc in line. */
+      while ((cp = etags_strchr (cp, TEX_esc)) != NULL)
+       {
+         if (*++cp == '\0')
+           break;
+         linecharno += cp - lasthit;
+         lasthit = cp;
+         i = TEX_Token (lasthit);
+         if (i >= 0)
+           {
+             /* We seem to include the TeX command in the tag name.
+             register char *p;
+             for (p = lasthit + TEX_toktab[i].len;
+                  *p != '\0' && *p != TEX_clgrp;
+                  p++)
+               continue; */
+             pfnote (/*savenstr (lasthit, p-lasthit)*/ (char *)NULL, TRUE,
+                     lb.buffer, lb.len, lineno, linecharno);
+             break;            /* We only tag a line once */
+           }
+       }
+    }
+}
+
+#define TEX_LESC '\\'
+#define TEX_SESC '!'
+#define TEX_cmt  '%'
+
+/* Figure out whether TeX's escapechar is '\\' or '!' and set grouping
+   chars accordingly. */
+void
+TEX_mode (inf)
+     FILE *inf;
+{
+  int c;
+
+  while ((c = getc (inf)) != EOF)
+    {
+      /* Skip to next line if we hit the TeX comment char. */
+      if (c == TEX_cmt)
+       while (c != '\n')
+         c = getc (inf);
+      else if (c == TEX_LESC || c == TEX_SESC )
+       break;
+    }
+
+  if (c == TEX_LESC)
+    {
+      TEX_esc = TEX_LESC;
+      TEX_opgrp = '{';
+      TEX_clgrp = '}';
+    }
+  else
+    {
+      TEX_esc = TEX_SESC;
+      TEX_opgrp = '<';
+      TEX_clgrp = '>';
+    }
+  rewind (inf);
+}
+
+/* Read environment and prepend it to the default string.
+   Build token table. */
+struct TEX_tabent *
+TEX_decode_env (evarname, defenv)
+     char *evarname;
+     char *defenv;
+{
+  register char *env, *p;
+
+  struct TEX_tabent *tab;
+  int size, i;
+
+  /* Append default string to environment. */
+  env = getenv (evarname);
+  if (!env)
+    env = defenv;
+  else
+    {
+      char *oldenv = env;
+      env = concat (oldenv, defenv, "");
+      free (oldenv);
+    }
+
+  /* Allocate a token table */
+  for (size = 1, p = env; p;)
+    if ((p = etags_strchr (p, ':')) && *++p != '\0')
+      size++;
+  /* Add 1 to leave room for null terminator.  */
+  tab = xnew (size + 1, struct TEX_tabent);
+
+  /* Unpack environment string into token table. Be careful about */
+  /* zero-length strings (leading ':', "::" and trailing ':') */
+  for (i = 0; *env;)
+    {
+      p = etags_strchr (env, ':');
+      if (!p)                  /* End of environment string. */
+       p = env + strlen (env);
+      if (p - env > 0)
+       {                       /* Only non-zero strings. */
+         tab[i].name = savenstr (env, p - env);
+         tab[i].len = strlen (tab[i].name);
+         i++;
+       }
+      if (*p)
+       env = p + 1;
+      else
+       {
+         tab[i].name = NULL;   /* Mark end of table. */
+         tab[i].len = 0;
+         break;
+       }
+    }
+  return tab;
+}
+
+/* If the text at CP matches one of the tag-defining TeX command names,
+   return the pointer to the first occurrence of that command in TEX_toktab.
+   Otherwise return -1.
+   Keep the capital `T' in `token' for dumb truncating compilers
+   (this distinguishes it from `TEX_toktab' */
+int
+TEX_Token (cp)
+     char *cp;
+{
+  int i;
+
+  for (i = 0; TEX_toktab[i].len > 0; i++)
+    if (strneq (TEX_toktab[i].name, cp, TEX_toktab[i].len))
+      return i;
+  return -1;
+}
+\f
+/*
+ * Prolog support (rewritten) by Anders Lindgren, Mar. 96
+ *
+ * Assumes that the predicate starts at column 0.
+ * Only the first clause of a predicate is added. 
+ */
+int prolog_pred PP ((char *s, char *last));
+void prolog_skip_comment PP ((linebuffer *plb, FILE *inf));
+int prolog_atom PP ((char *s, int pos));
+
+void
+Prolog_functions (inf)
+     FILE *inf;
+{
+  char *cp, *last;
+  int len;
+  int allocated;
+
+  allocated = 0;
+  len = 0;
+  last = NULL;
+
+  LOOP_ON_INPUT_LINES (inf, lb, cp)
+    {
+      if (cp[0] == '\0')       /* Empty line */
+       continue;
+      else if (isspace (cp[0])) /* Not a predicate */
+       continue;
+      else if (cp[0] == '/' && cp[1] == '*')   /* comment. */
+       prolog_skip_comment (&lb, inf);
+      else if ((len = prolog_pred (cp, last)) > 0)
+       {
+         /* Predicate.  Store the function name so that we only
+            generate a tag for the first clause.  */
+         if (last == NULL)
+           last = xnew(len + 1, char);
+         else if (len + 1 > allocated)
+           last = xrnew (last, len + 1, char);
+         allocated = len + 1;
+         strncpy (last, cp, len);
+         last[len] = '\0';
+       }
+    }
+}
+
+
+void
+prolog_skip_comment (plb, inf)
+     linebuffer *plb;
+     FILE *inf;
+{
+  char *cp;
+
+  do
+    {
+      for (cp = plb->buffer; *cp != '\0'; cp++)
+       if (cp[0] == '*' && cp[1] == '/')
+         return;
+      lineno++;
+      linecharno += readline (plb, inf);
+    }
+  while (!feof(inf));
+}
+
+/*
+ * A predicate definition is added if it matches:
+ *     <beginning of line><Prolog Atom><whitespace>(
+ *
+ * It is added to the tags database if it doesn't match the
+ * name of the previous clause header.
+ *
+ * Return the size of the name of the predicate, or 0 if no header
+ * was found.
+ */
+int
+prolog_pred (s, last)
+     char *s;
+     char *last;               /* Name of last clause. */
+{
+  int pos;
+  int len;
+
+  pos = prolog_atom (s, 0);
+  if (pos < 1)
+    return 0;
+
+  len = pos;
+  pos = skip_spaces (s + pos) - s;
+
+  if ((s[pos] == '(') || (s[pos] == '.'))
+    {
+      if (s[pos] == '(')
+       pos++;
+
+      /* Save only the first clause. */
+      if (last == NULL
+         || len != strlen (last)
+         || !strneq (s, last, len))
+       {
+         pfnote ((CTAGS) ? savenstr (s, len) : NULL, TRUE,
+                 s, pos, lineno, linecharno);
+         return len;
+       }
+    }
+  return 0;
+}
+
+/*
+ * Consume a Prolog atom.
+ * Return the number of bytes consumed, or -1 if there was an error.
+ *
+ * A prolog atom, in this context, could be one of:
+ * - An alphanumeric sequence, starting with a lower case letter.
+ * - A quoted arbitrary string. Single quotes can escape themselves.
+ *   Backslash quotes everything.
+ */
+int
+prolog_atom (s, pos)
+     char *s;
+     int pos;
+{
+  int origpos;
+
+  origpos = pos;
+
+  if (islower(s[pos]) || (s[pos] == '_'))
+    {
+      /* The atom is unquoted. */
+      pos++;
+      while (isalnum(s[pos]) || (s[pos] == '_'))
+       {
+         pos++;
+       }
+      return pos - origpos;
+    }
+  else if (s[pos] == '\'')
+    {
+      pos++;
+
+      while (1) 
+       {
+         if (s[pos] == '\'')
+           {
+             pos++;
+             if (s[pos] != '\'')
+               break;
+             pos++;            /* A double quote */
+           }
+         else if (s[pos] == '\0')
+           /* Multiline quoted atoms are ignored. */
+           return -1;
+         else if (s[pos] == '\\')
+           {
+             if (s[pos+1] == '\0')
+               return -1;
+             pos += 2;
+           }
+         else
+           pos++;
+       }
+      return pos - origpos;
+    }
+  else
+    return -1;
+}
+\f
+/* 
+ * Support for Erlang  --  Anders Lindgren, Feb 1996.
+ *
+ * Generates tags for functions, defines, and records.
+ *
+ * Assumes that Erlang functions start at column 0.
+ */
+int erlang_func PP ((char *s, char *last));
+void erlang_attribute PP ((char *s));
+int erlang_atom PP ((char *s, int pos));
+
+void
+Erlang_functions (inf)
+     FILE *inf;
+{
+  char *cp, *last;
+  int len;
+  int allocated;
+
+  allocated = 0;
+  len = 0;
+  last = NULL;
+
+  LOOP_ON_INPUT_LINES (inf, lb, cp)
+    {
+      if (cp[0] == '\0')       /* Empty line */
+       continue;
+      else if (isspace (cp[0])) /* Not function nor attribute */
+       continue;
+      else if (cp[0] == '%')   /* comment */
+       continue;
+      else if (cp[0] == '"')   /* Sometimes, strings start in column one */
+       continue;
+      else if (cp[0] == '-')   /* attribute, e.g. "-define" */
+       {
+         erlang_attribute (cp);
+         last = NULL;
+       }
+      else if ((len = erlang_func (cp, last)) > 0)
+       {
+         /* 
+          * Function.  Store the function name so that we only
+          * generates a tag for the first clause.
+          */
+         if (last == NULL)
+           last = xnew (len + 1, char);
+         else if (len + 1 > allocated)
+           last = xrnew (last, len + 1, char);
+         allocated = len + 1;
+         strncpy (last, cp, len);
+         last[len] = '\0';
+       }
+    }
+}
+
+
+/*
+ * A function definition is added if it matches:
+ *     <beginning of line><Erlang Atom><whitespace>(
+ *
+ * It is added to the tags database if it doesn't match the
+ * name of the previous clause header.
+ *
+ * Return the size of the name of the function, or 0 if no function
+ * was found.
+ */
+int
+erlang_func (s, last)
+     char *s;
+     char *last;               /* Name of last clause. */
+{
+  int pos;
+  int len;
+
+  pos = erlang_atom (s, 0);
+  if (pos < 1)
+    return 0;
+
+  len = pos;
+  pos = skip_spaces (s + pos) - s;
+
+  /* Save only the first clause. */
+  if (s[pos++] == '('
+      && (last == NULL
+         || len != strlen (last)
+         || !strneq (s, last, len)))
+       {
+         pfnote ((CTAGS) ? savenstr (s, len) : NULL, TRUE,
+                 s, pos, lineno, linecharno);
+         return len;
+       }
+
+  return 0;
+}
+
+
+/*
+ * Handle attributes.  Currently, tags are generated for defines 
+ * and records.
+ *
+ * They are on the form:
+ * -define(foo, bar).
+ * -define(Foo(M, N), M+N).
+ * -record(graph, {vtab = notable, cyclic = true}).
+ */
+void
+erlang_attribute (s)
+     char *s;
+{
+  int pos;
+  int len;
+
+  if (strneq (s, "-define", 7) || strneq (s, "-record", 7))
+    {
+      pos = skip_spaces (s + 7) - s;
+      if (s[pos++] == '(') 
+       {
+         pos = skip_spaces (s + pos) - s;
+         len = erlang_atom (s, pos);
+         if (len != 0)
+           pfnote ((CTAGS) ? savenstr (& s[pos], len) : NULL, TRUE,
+                   s, pos + len, lineno, linecharno);
+       }
+    }
+  return;
+}
+
+
+/*
+ * Consume an Erlang atom (or variable).
+ * Return the number of bytes consumed, or -1 if there was an error.
+ */
+int
+erlang_atom (s, pos)
+     char *s;
+     int pos;
+{
+  int origpos;
+
+  origpos = pos;
+
+  if (isalpha (s[pos]) || s[pos] == '_')
+    {
+      /* The atom is unquoted. */
+      pos++;
+      while (isalnum (s[pos]) || s[pos] == '_')
+       pos++;
+      return pos - origpos;
+    }
+  else if (s[pos] == '\'')
+    {
+      pos++;
+
+      while (1) 
+       {
+         if (s[pos] == '\'')
+           {
+             pos++;
+             break;
+           }
+         else if (s[pos] == '\0')
+           /* Multiline quoted atoms are ignored. */
+           return -1;
+         else if (s[pos] == '\\')
+           {
+             if (s[pos+1] == '\0')
+               return -1;
+             pos += 2;
+           }
+         else
+           pos++;
+       }
+      return pos - origpos;
+    }
+  else
+    return -1;
+}
+\f
+#ifdef ETAGS_REGEXPS
+
+/* Take a string like "/blah/" and turn it into "blah", making sure
+   that the first and last characters are the same, and handling
+   quoted separator characters.  Actually, stops on the occurrence of
+   an unquoted separator.  Also turns "\t" into a Tab character.
+   Returns pointer to terminating separator.  Works in place.  Null
+   terminates name string. */
+char * scan_separators PP ((char *name));
+char *
+scan_separators (name)
+     char *name;
+{
+  char sep = name[0];
+  char *copyto = name;
+  bool quoted = FALSE;
+
+  for (++name; *name != '\0'; ++name)
+    {
+      if (quoted)
+       {
+         if (*name == 't')
+           *copyto++ = '\t';
+         else if (*name == sep)
+           *copyto++ = sep;
+         else
+           {
+             /* Something else is quoted, so preserve the quote. */
+             *copyto++ = '\\';
+             *copyto++ = *name;
+           }
+         quoted = FALSE;
+       }
+      else if (*name == '\\')
+       quoted = TRUE;
+      else if (*name == sep)
+       break;
+      else
+       *copyto++ = *name;
+    }
+
+  /* Terminate copied string. */
+  *copyto = '\0';
+  return name;
+}
+
+/* Look at the argument of --regex or --no-regex and do the right
+   thing.  Same for each line of a regexp file. */
+void
+analyse_regex (regex_arg)
+     char *regex_arg;
+{
+  if (regex_arg == NULL)
+    free_patterns ();          /* --no-regex: remove existing regexps */
+
+  /* A real --regexp option or a line in a regexp file. */
+  switch (regex_arg[0])
+    {
+      /* Comments in regexp file or null arg to --regex. */
+    case '\0':
+    case ' ':
+    case '\t':
+      break;
+
+      /* Read a regex file.  This is recursive and may result in a
+        loop, which will stop when the file descriptors are exhausted. */
+    case '@':
+      {
+       FILE *regexfp;
+       linebuffer regexbuf;
+       char *regexfile = regex_arg + 1;
+
+       /* regexfile is a file containing regexps, one per line. */
+       regexfp = fopen (regexfile, "r");
+       if (regexfp == NULL)
+         {
+           pfatal (regexfile);
+           return;
+         }
+       initbuffer (&regexbuf);
+       while (readline_internal (&regexbuf, regexfp) > 0)
+         analyse_regex (regexbuf.buffer);
+       free (regexbuf.buffer);
+       fclose (regexfp);
+      }
+      break;
+
+      /* Regexp to be used for a specific language only. */
+    case '{':
+      {
+       language *lang;
+       char *lang_name = regex_arg + 1;
+       char *cp;
+
+       for (cp = lang_name; *cp != '}'; cp++)
+         if (*cp == '\0')
+           {
+             error ("unterminated language name in regex: %s", regex_arg);
+             return;
+           }
+       *cp = '\0';
+       lang = get_language_from_name (lang_name);
+       if (lang == NULL)
+         return;
+       add_regex (cp + 1, lang);
+      }
+      break;
+
+      /* Regexp to be used for any language. */
+    default:
+      add_regex (regex_arg, NULL);
+      break;
+    }
+}
+
+/* Turn a name, which is an ed-style (but Emacs syntax) regular
+   expression, into a real regular expression by compiling it. */
+void
+add_regex (regexp_pattern, lang)
+     char *regexp_pattern;
+     language *lang;
+{
+  char *name;
+  const char *err;
+  struct re_pattern_buffer *patbuf;
+  pattern *pp;
+
+
+  if (regexp_pattern[strlen(regexp_pattern)-1] != regexp_pattern[0])
+    {
+      error ("%s: unterminated regexp", regexp_pattern);
+      return;
+    }
+  name = scan_separators (regexp_pattern);
+  if (regexp_pattern[0] == '\0')
+    {
+      error ("null regexp", (char *)NULL);
+      return;
+    }
+  (void) scan_separators (name);
+
+  patbuf = xnew (1, struct re_pattern_buffer);
+  patbuf->translate = NULL;
+  patbuf->fastmap = NULL;
+  patbuf->buffer = NULL;
+  patbuf->allocated = 0;
+
+  err = re_compile_pattern (regexp_pattern, strlen (regexp_pattern), patbuf);
+  if (err != NULL)
+    {
+      error ("%s while compiling pattern", err);
+      return;
+    }
+
+  pp = p_head;
+  p_head = xnew (1, pattern);
+  p_head->regex = savestr (regexp_pattern);
+  p_head->p_next = pp;
+  p_head->language = lang;
+  p_head->pattern = patbuf;
+  p_head->name_pattern = savestr (name);
+  p_head->error_signaled = FALSE;
+}
+
+/*
+ * Do the substitutions indicated by the regular expression and
+ * arguments.
+ */
+char * substitute PP ((char *in, char *out, struct re_registers *regs));
+char *
+substitute (in, out, regs)
+     char *in, *out;
+     struct re_registers *regs;
+{
+  char *result, *t;
+  int size, dig, diglen;
+
+  result = NULL;
+  size = strlen (out);
+
+  /* Pass 1: figure out how much to allocate by finding all \N strings. */
+  if (out[size - 1] == '\\')
+    fatal ("pattern error in \"%s\"", out);
+  for (t = etags_strchr (out, '\\');
+       t != NULL;
+       t = etags_strchr (t + 2, '\\'))
+    if (isdigit (t[1]))
+      {
+       dig = t[1] - '0';
+       diglen = regs->end[dig] - regs->start[dig];
+       size += diglen - 2;
+      }
+    else
+      size -= 1;
+
+  /* Allocate space and do the substitutions. */
+  result = xnew (size + 1, char);
+
+  for (t = result; *out != '\0'; out++)
+    if (*out == '\\' && isdigit (*++out))
+      {
+       /* Using "dig2" satisfies my debugger.  Bleah. */
+       dig = *out - '0';
+       diglen = regs->end[dig] - regs->start[dig];
+       strncpy (t, in + regs->start[dig], diglen);
+       t += diglen;
+      }
+    else
+      *t++ = *out;
+  *t = '\0';
+
+  if (DEBUG && (t > result + size || t - result != strlen (result)))
+    abort ();
+
+  return result;
+}
+
+/* Deallocate all patterns. */
+void
+free_patterns ()
+{
+  pattern *pp;
+  while (p_head != NULL)
+    {
+      pp = p_head->p_next;
+      free (p_head->regex);
+      free (p_head->name_pattern);
+      free (p_head);
+      p_head = pp;
+    }
+  return;
+}
+\f
+#endif /* ETAGS_REGEXPS */
+/* Initialize a linebuffer for use */
+void
+initbuffer (lbp)
+     linebuffer *lbp;
+{
+  lbp->size = 200;
+  lbp->buffer = xnew (200, char);
+}
+
+/*
+ * Read a line of text from `stream' into `lbp', excluding the
+ * newline or CR-NL, if any.  Return the number of characters read from
+ * `stream', which is the length of the line including the newline.
+ *
+ * On DOS or Windows we do not count the CR character, if any, before the
+ * NL, in the returned length; this mirrors the behavior of emacs on those
+ * platforms (for text files, it translates CR-NL to NL as it reads in the
+ * file).
+ */
+long
+readline_internal (lbp, stream)
+     linebuffer *lbp;
+     register FILE *stream;
+{
+  char *buffer = lbp->buffer;
+  register char *p = lbp->buffer;
+  register char *pend;
+  int chars_deleted;
+
+  pend = p + lbp->size;                /* Separate to avoid 386/IX compiler bug.  */
+
+  while (1)
+    {
+      register int c = getc (stream);
+      if (p == pend)
+       {
+         /* We're at the end of linebuffer: expand it. */
+         lbp->size *= 2;
+         buffer = xrnew (buffer, lbp->size, char);
+         p += buffer - lbp->buffer;
+         pend = buffer + lbp->size;
+         lbp->buffer = buffer;
+       }
+      if (c == EOF)
+       {
+         *p = '\0';
+         chars_deleted = 0;
+         break;
+       }
+      if (c == '\n')
+       {
+         if (p > buffer && p[-1] == '\r')
+           {
+             p -= 1;
+#ifdef DOS_NT
+            /* Assume CRLF->LF translation will be performed by Emacs
+               when loading this file, so CRs won't appear in the buffer.
+               It would be cleaner to compensate within Emacs;
+               however, Emacs does not know how many CRs were deleted
+               before any given point in the file.  */
+             chars_deleted = 1;
+#else
+             chars_deleted = 2;
+#endif
+           }
+         else
+           {
+             chars_deleted = 1;
+           }
+         *p = '\0';
+         break;
+       }
+      *p++ = c;
+    }
+  lbp->len = p - buffer;
+
+  return lbp->len + chars_deleted;
+}
+
+/*
+ * Like readline_internal, above, but in addition try to match the
+ * input line against relevant regular expressions.
+ */
+long
+readline (lbp, stream)
+     linebuffer *lbp;
+     FILE *stream;
+{
+  /* Read new line. */
+  long result = readline_internal (lbp, stream);
+#ifdef ETAGS_REGEXPS
+  int match;
+  pattern *pp;
+
+  /* Match against relevant patterns. */
+  if (lbp->len > 0)
+    for (pp = p_head; pp != NULL; pp = pp->p_next)
+      {
+       /* Only use generic regexps or those for the current language. */
+       if (pp->language != NULL && pp->language != curlang)
+         continue;
+
+       match = re_match (pp->pattern, lbp->buffer, lbp->len, 0, &pp->regs);
+       switch (match)
+         {
+         case -2:
+           /* Some error. */
+           if (!pp->error_signaled)
+             {
+               error ("error while matching \"%s\"", pp->regex);
+               pp->error_signaled = TRUE;
+             }
+           break;
+         case -1:
+           /* No match. */
+           break;
+         default:
+           /* Match occurred.  Construct a tag. */
+           if (pp->name_pattern[0] != '\0')
+             {
+               /* Make a named tag. */
+               char *name = substitute (lbp->buffer,
+                                        pp->name_pattern, &pp->regs);
+               if (name != NULL)
+                 pfnote (name, TRUE, lbp->buffer, match, lineno, linecharno);
+             }
+           else
+             {
+               /* Make an unnamed tag. */
+               pfnote ((char *)NULL, TRUE,
+                       lbp->buffer, match, lineno, linecharno);
+             }
+           break;
+         }
+      }
+#endif /* ETAGS_REGEXPS */
+  
+  return result;
+}
+\f
+/*
+ * Return a pointer to a space of size strlen(cp)+1 allocated
+ * with xnew where the string CP has been copied.
+ */
+char *
+savestr (cp)
+     char *cp;
+{
+  return savenstr (cp, strlen (cp));
+}
+
+/*
+ * Return a pointer to a space of size LEN+1 allocated with xnew where
+ * the string CP has been copied for at most the first LEN characters.
+ */
+char *
+savenstr (cp, len)
+     char *cp;
+     int len;
+{
+  register char *dp;
+
+  dp = xnew (len + 1, char);
+  strncpy (dp, cp, len);
+  dp[len] = '\0';
+  return dp;
+}
+
+/*
+ * Return the ptr in sp at which the character c last
+ * appears; NULL if not found
+ *
+ * Identical to System V strrchr, included for portability.
+ */
+char *
+etags_strrchr (sp, c)
+     register char *sp;
+     register int c;
+{
+  register char *r;
+
+  r = NULL;
+  do
+    {
+      if (*sp == c)
+       r = sp;
+  } while (*sp++);
+  return r;
+}
+
+
+/*
+ * Return the ptr in sp at which the character c first
+ * appears; NULL if not found
+ *
+ * Identical to System V strchr, included for portability.
+ */
+char *
+etags_strchr (sp, c)
+     register char *sp;
+     register int c;
+{
+  do
+    {
+      if (*sp == c)
+       return sp;
+    } while (*sp++);
+  return NULL;
+}
+
+/* Skip spaces, return new pointer. */
+char *
+skip_spaces (cp)
+     char *cp;
+{
+  while (isspace (*cp))                /* isspace('\0')==FALSE */
+    cp++;
+  return cp;
+}
+
+/* Skip non spaces, return new pointer. */
+char *
+skip_non_spaces (cp)
+     char *cp;
+{
+  while (!iswhite (*cp))       /* iswhite('\0')==TRUE */
+    cp++;
+  return cp;
+}
+
+/* Print error message and exit.  */
+void
+fatal (s1, s2)
+     char *s1, *s2;
+{
+  error (s1, s2);
+  exit (BAD);
+}
+
+void
+pfatal (s1)
+     char *s1;
+{
+  perror (s1);
+  exit (BAD);
+}
+
+void
+suggest_asking_for_help ()
+{
+  fprintf (stderr, "\tTry `%s %s' for a complete list of options.\n",
+          progname,
+#ifdef LONG_OPTIONS
+          "--help"
+#else
+          "-h"
+#endif
+          );
+  exit (BAD);
+}
+
+/* Print error message.  `s1' is printf control string, `s2' is arg for it. */
+void
+error (s1, s2)
+     const char *s1, *s2;
+{
+  fprintf (stderr, "%s: ", progname);
+  fprintf (stderr, s1, s2);
+  fprintf (stderr, "\n");
+}
+
+/* Return a newly-allocated string whose contents
+   concatenate those of s1, s2, s3.  */
+char *
+concat (s1, s2, s3)
+     char *s1, *s2, *s3;
+{
+  int len1 = strlen (s1), len2 = strlen (s2), len3 = strlen (s3);
+  char *result = xnew (len1 + len2 + len3 + 1, char);
+
+  strcpy (result, s1);
+  strcpy (result + len1, s2);
+  strcpy (result + len1 + len2, s3);
+  result[len1 + len2 + len3] = '\0';
+
+  return result;
+}
+\f
+/* Does the same work as the system V getcwd, but does not need to
+   guess the buffer size in advance. */
+char *
+etags_getcwd ()
+{
+#ifdef HAVE_GETCWD
+  int bufsize = 200;
+  char *path = xnew (bufsize, char);
+
+  while (getcwd (path, bufsize) == NULL)
+    {
+      if (errno != ERANGE)
+       pfatal ("getcwd");
+      bufsize *= 2;
+      free (path);
+      path = xnew (bufsize, char);
+    }
+
+  canonicalize_filename (path);
+  return path;
+
+#else /* not HAVE_GETCWD */
+#ifdef MSDOS
+  char *p, path[MAXPATHLEN + 1]; /* Fixed size is safe on MSDOS.  */
+
+  getwd (path);
+
+  for (p = path; *p != '\0'; p++)
+    if (*p == '\\')
+      *p = '/';
+    else
+      *p = lowcase (*p);
+
+  return strdup (path);
+#else /* not MSDOS */
+  linebuffer path;
+  FILE *pipe;
+
+  initbuffer (&path);
+  pipe = (FILE *) popen ("pwd 2>/dev/null", "r");
+  if (pipe == NULL || readline_internal (&path, pipe) == 0)
+    pfatal ("pwd");
+  pclose (pipe);
+
+  return path.buffer;
+#endif /* not MSDOS */
+#endif /* not HAVE_GETCWD */
+}
+
+/* Return a newly allocated string containing the file name of FILE
+   relative to the absolute directory DIR (which should end with a slash). */
+char *
+relative_filename (file, dir)
+     char *file, *dir;
+{
+  char *fp, *dp, *afn, *res;
+  int i;
+
+  /* Find the common root of file and dir (with a trailing slash). */
+  afn = absolute_filename (file, cwd);
+  fp = afn;
+  dp = dir;
+  while (*fp++ == *dp++)
+    continue;
+  fp--, dp--;                  /* back to the first differing char */
+  do                           /* look at the equal chars until '/' */
+    fp--, dp--;
+  while (*fp != '/');
+
+  /* Build a sequence of "../" strings for the resulting relative file name. */
+  i = 0;
+  while ((dp = etags_strchr (dp + 1, '/')) != NULL)
+    i += 1;
+  res = xnew (3*i + strlen (fp + 1) + 1, char);
+  res[0] = '\0';
+  while (i-- > 0)
+    strcat (res, "../");
+
+  /* Add the file name relative to the common root of file and dir. */
+  strcat (res, fp + 1);
+  free (afn);
+
+  return res;
+}
+
+/* Return a newly allocated string containing the absolute file name
+   of FILE given DIR (which should end with a slash). */
+char *
+absolute_filename (file, dir)
+     char *file, *dir;
+{
+  char *slashp, *cp, *res;
+
+  if (filename_is_absolute (file))
+    res = savestr (file);
+#ifdef DOS_NT
+  /* We don't support non-absolute file names with a drive
+     letter, like `d:NAME' (it's too much hassle).  */
+  else if (file[1] == ':')
+    fatal ("%s: relative file names with drive letters not supported", file);
+#endif
+  else
+    res = concat (dir, file, "");
+
+  /* Delete the "/dirname/.." and "/." substrings. */
+  slashp = etags_strchr (res, '/');
+  while (slashp != NULL && slashp[0] != '\0')
+    {
+      if (slashp[1] == '.')
+       {
+         if (slashp[2] == '.'
+             && (slashp[3] == '/' || slashp[3] == '\0'))
+           {
+             cp = slashp;
+             do
+               cp--;
+             while (cp >= res && !filename_is_absolute (cp));
+             if (cp < res)
+               cp = slashp;    /* the absolute name begins with "/.." */
+#ifdef DOS_NT
+             /* Under MSDOS and NT we get `d:/NAME' as absolute
+                file name, so the luser could say `d:/../NAME'.
+                We silently treat this as `d:/NAME'.  */
+             else if (cp[0] != '/')
+               cp = slashp;
+#endif
+             strcpy (cp, slashp + 3);
+             slashp = cp;
+             continue;
+           }
+         else if (slashp[2] == '/' || slashp[2] == '\0')
+           {
+             strcpy (slashp, slashp + 2);
+             continue;
+           }
+       }
+
+      slashp = etags_strchr (slashp + 1, '/');
+    }
+  
+  if (res[0] == '\0')
+    return savestr ("/");
+  else
+    return res;
+}
+
+/* Return a newly allocated string containing the absolute
+   file name of dir where FILE resides given DIR (which should
+   end with a slash). */
+char *
+absolute_dirname (file, dir)
+     char *file, *dir;
+{
+  char *slashp, *res;
+  char save;
+
+  canonicalize_filename (file);
+  slashp = etags_strrchr (file, '/');
+  if (slashp == NULL)
+    return savestr (dir);
+  save = slashp[1];
+  slashp[1] = '\0';
+  res = absolute_filename (file, dir);
+  slashp[1] = save;
+
+  return res;
+}
+
+/* Whether the argument string is an absolute file name.  The argument
+   string must have been canonicalized with canonicalize_filename. */
+bool
+filename_is_absolute (fn)
+     char *fn;
+{
+  return (fn[0] == '/'
+#ifdef DOS_NT
+         || (isalpha(fn[0]) && fn[1] == ':' && fn[2] == '/')
+#endif
+         );
+}
+
+/* Translate backslashes into slashes.  Works in place. */
+void
+canonicalize_filename (fn)
+     register char *fn;
+{
+#ifdef DOS_NT
+  for (; *fn != '\0'; fn++)
+    if (*fn == '\\')
+      *fn = '/';
+#else
+  /* No action. */
+#endif
+}
+
+/* Increase the size of a linebuffer. */
+void
+grow_linebuffer (lbp, toksize)
+     linebuffer *lbp;
+     int toksize;
+{
+  while (lbp->size < toksize)
+    lbp->size *= 2;
+  lbp->buffer = xrnew (lbp->buffer, lbp->size, char);
+}
+
+/* Like malloc but get fatal error if memory is exhausted.  */
+long *
+xmalloc (size)
+     unsigned int size;
+{
+  long *result = (long *) malloc (size);
+  if (result == NULL)
+    fatal ("virtual memory exhausted", (char *)NULL);
+  return result;
+}
+
+long *
+xrealloc (ptr, size)
+     char *ptr;
+     unsigned int size;
+{
+  long *result =  (long *) realloc (ptr, size);
+  if (result == NULL)
+    fatal ("virtual memory exhausted", (char *)NULL);
+  return result;
+}
diff --git a/lib-src/pop.c b/lib-src/pop.c
new file mode 100644 (file)
index 0000000..728d1ca
--- /dev/null
@@ -0,0 +1,1504 @@
+/* pop.c: client routines for talking to a POP3-protocol post-office server
+   Copyright (c) 1991, 1993, 1996 Free Software Foundation, Inc.
+   Written by Jonathan Kamens, jik@security.ov.com.
+
+This file is part of GNU Emacs.
+
+GNU Emacs 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.
+
+GNU Emacs 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 GNU Emacs; see the file COPYING.  If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#ifdef HAVE_CONFIG_H
+#define NO_SHORTNAMES  /* Tell config not to load remap.h */
+#include <../src/config.h>
+#else
+#define MAIL_USE_POP
+#endif
+
+#ifdef MAIL_USE_POP
+
+#ifdef HAVE_CONFIG_H
+/* Cancel these substitutions made in config.h */
+#undef open
+#undef read
+#undef write
+#undef close
+#endif
+
+#include <sys/types.h>
+#ifdef WINDOWSNT
+#include "ntlib.h"
+#include <winsock.h>
+#undef SOCKET_ERROR
+#define RECV(s,buf,len,flags) recv(s,buf,len,flags)
+#define SEND(s,buf,len,flags) send(s,buf,len,flags)
+#define CLOSESOCKET(s) closesocket(s)
+#else
+#include <netinet/in.h>
+#include <sys/socket.h>
+#define RECV(s,buf,len,flags) read(s,buf,len)
+#define SEND(s,buf,len,flags) write(s,buf,len)
+#define CLOSESOCKET(s) close(s)
+#endif
+#include "pop.h"
+
+#ifdef sun
+#include <malloc.h>
+#endif /* sun */
+
+#ifdef HESIOD
+#include <hesiod.h>
+/*
+ * It really shouldn't be necessary to put this declaration here, but
+ * the version of hesiod.h that Athena has installed in release 7.2
+ * doesn't declare this function; I don't know if the 7.3 version of
+ * hesiod.h does.
+ */
+extern struct servent *hes_getservbyname (/* char *, char * */);
+#endif
+
+#include <pwd.h>
+#include <netdb.h>
+#include <errno.h>
+#include <stdio.h>
+
+#include <unistd.h>
+#include <sys/stat.h>
+#include <sys/file.h>
+#include "../src/syswait.h"
+#include "../src/systime.h"
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef KERBEROS
+#ifndef KRB5
+#include <des.h>
+#include <krb.h>
+#else /* KRB5 */
+#include <krb5/krb5.h>
+#include <krb5/ext-proto.h>
+#include <ctype.h>
+#endif /* KRB5 */
+#endif /* KERBEROS */
+
+#ifdef KERBEROS
+#ifndef KRB5
+extern int krb_sendauth (/* long, int, KTEXT, char *, char *, char *,
+                           u_long, MSG_DAT *, CREDENTIALS *, Key_schedule,
+                           struct sockaddr_in *, struct sockaddr_in *,
+                           char * */);
+extern char *krb_realmofhost (/* char * */);
+#endif /* ! KRB5 */
+#endif /* KERBEROS */
+
+#ifndef WINDOWSNT
+#if !defined(HAVE_H_ERRNO) || !defined(HAVE_CONFIG_H)
+extern int h_errno;
+#endif
+#endif
+
+static int socket_connection (char *, int);
+static char *pop_getline (popserver);
+static int sendline (popserver, char *);
+static int fullwrite (int, char *, int);
+static int getok (popserver);
+#if 0
+static int gettermination (popserver);
+#endif
+static void pop_trash (popserver);
+static char *find_crlf (char *);
+
+#define ERROR_MAX 80           /* a pretty arbitrary size */
+#define POP_PORT 110
+#define KPOP_PORT 1109
+#if defined(WINDOWSNT) || defined(__CYGWIN32__)
+#define POP_SERVICE "pop3"     /* we don't want the POP2 port! */
+#else
+#define POP_SERVICE "pop"
+#endif
+#ifdef KERBEROS
+#ifdef KRB5
+#define KPOP_SERVICE "k5pop";
+#else
+#define KPOP_SERVICE "kpop"
+#endif
+#endif
+
+char pop_error[ERROR_MAX];
+int pop_debug = 0;
+
+#ifndef min
+#define min(a,b) (((a) < (b)) ? (a) : (b))
+#endif
+
+/*
+ * Function: pop_open (char *host, char *username, char *password,
+ *                    int flags)
+ *
+ * Purpose: Establishes a connection with a post-office server, and
+ *     completes the authorization portion of the session.
+ *
+ * Arguments:
+ *     host    The server host with which the connection should be
+ *             established.  Optional.  If omitted, internal
+ *             heuristics will be used to determine the server host,
+ *             if possible.
+ *     username
+ *             The username of the mail-drop to access.  Optional.
+ *             If omitted, internal heuristics will be used to
+ *             determine the username, if possible.
+ *     password
+ *             The password to use for authorization.  If omitted,
+ *             internal heuristics will be used to determine the
+ *             password, if possible.
+ *     flags   A bit mask containing flags controlling certain
+ *             functions of the routine.  Valid flags are defined in
+ *             the file pop.h
+ *
+ * Return value: Upon successful establishment of a connection, a
+ *     non-null popserver will be returned.  Otherwise, null will be
+ *     returned, and the string variable pop_error will contain an
+ *     explanation of the error.
+ */
+popserver
+pop_open (char *host, char *username, char *password, int flags)
+{
+  int sock;
+  popserver server;
+
+  /* Determine the user name */
+  if (! username)
+    {
+      username = getenv ("USER");
+      if (! (username && *username))
+       {
+         username = getlogin ();
+         if (! (username && *username))
+           {
+             struct passwd *passwd;
+             passwd = getpwuid (getuid ());
+             if (passwd && passwd->pw_name && *passwd->pw_name)
+               {
+                 username = passwd->pw_name;
+               }
+             else
+               {
+                 strcpy (pop_error, "Could not determine username");
+                 return (0);
+               }
+           }
+       }
+    }
+
+  /*
+   *  Determine the mail host.
+   */
+
+  if (! host)
+    {
+      host = getenv ("MAILHOST");
+    }
+
+#ifdef HESIOD
+  if ((! host) && (! (flags & POP_NO_HESIOD)))
+    {
+      struct hes_postoffice *office;
+      office = hes_getmailhost (username);
+      if (office && office->po_type && (! strcmp (office->po_type, "POP"))
+         && office->po_name && *office->po_name && office->po_host
+         && *office->po_host)
+       {
+         host = office->po_host;
+         username = office->po_name;
+       }
+    }
+#endif
+
+#ifdef MAILHOST
+  if (! host)
+    {
+      host = MAILHOST;
+    }
+#endif
+
+  if (! host)
+    {
+      strcpy (pop_error, "Could not determine POP server");
+      return (0);
+    }
+
+  /* Determine the password */
+#ifdef KERBEROS
+#define DONT_NEED_PASSWORD (! (flags & POP_NO_KERBEROS))
+#else
+#define DONT_NEED_PASSWORD 0
+#endif
+  if ((! password) && (! DONT_NEED_PASSWORD))
+    {
+      if (! (flags & POP_NO_GETPASS))
+       {
+         password = getpass ("Enter POP password:");
+       }
+      if (! password)
+       {
+         strcpy (pop_error, "Could not determine POP password");
+         return (0);
+       }
+    }
+  if (password)
+    flags |= POP_NO_KERBEROS;
+  else
+    password = username;
+
+  sock = socket_connection (host, flags);
+  if (sock == -1)
+    return (0);
+
+  server = (popserver) malloc (sizeof (struct _popserver));
+  if (! server)
+    {
+      strcpy (pop_error, "Out of memory in pop_open");
+      return (0);
+    }
+  server->buffer = (char *) malloc (GETLINE_MIN);
+  if (! server->buffer)
+    {
+      strcpy (pop_error, "Out of memory in pop_open");
+      free ((char *) server);
+      return (0);
+    }
+         
+  server->file = sock;
+  server->data = 0;
+  server->buffer_index = 0;
+  server->buffer_size = GETLINE_MIN;
+  server->in_multi = 0;
+  server->trash_started = 0;
+
+  if (getok (server))
+    return (0);
+
+  /*
+   * I really shouldn't use the pop_error variable like this, but....
+   */
+  if (strlen (username) > ERROR_MAX - 6)
+    {
+      pop_close (server);
+      strcpy (pop_error,
+             "Username too long; recompile pop.c with larger ERROR_MAX");
+      return (0);
+    }
+  sprintf (pop_error, "USER %s", username);
+
+  if (sendline (server, pop_error) || getok (server))
+    {
+      return (0);
+    }
+
+  if (strlen (password) > ERROR_MAX - 6)
+    {
+      pop_close (server);
+      strcpy (pop_error,
+             "Password too long; recompile pop.c with larger ERROR_MAX");
+      return (0);
+    }
+  sprintf (pop_error, "PASS %s", password);
+
+  if (sendline (server, pop_error) || getok (server))
+    {
+      return (0);
+    }
+
+  return (server);
+}
+
+/*
+ * Function: pop_stat
+ *
+ * Purpose: Issue the STAT command to the server and return (in the
+ *     value parameters) the number of messages in the maildrop and
+ *     the total size of the maildrop.
+ *
+ * Return value: 0 on success, or non-zero with an error in pop_error
+ *     in failure.
+ *
+ * Side effects: On failure, may make further operations on the
+ *     connection impossible.
+ */
+int
+pop_stat (popserver server, int *count, int *size)
+{
+  char *fromserver;
+
+  if (server->in_multi)
+    {
+      strcpy (pop_error, "In multi-line query in pop_stat");
+      return (-1);
+    }
+     
+  if (sendline (server, "STAT") || (! (fromserver = pop_getline (server))))
+    return (-1);
+
+  if (strncmp (fromserver, "+OK ", 4))
+    {
+      if (0 == strncmp (fromserver, "-ERR", 4))
+       {
+         strncpy (pop_error, fromserver, ERROR_MAX);
+       }
+      else
+       {
+         strcpy (pop_error,
+                 "Unexpected response from POP server in pop_stat");
+         pop_trash (server);
+       }
+      return (-1);
+    }
+
+  *count = atoi (&fromserver[4]);
+     
+  fromserver = strchr (&fromserver[4], ' ');
+  if (! fromserver)
+    {
+      strcpy (pop_error,
+             "Badly formatted response from server in pop_stat");
+      pop_trash (server);
+      return (-1);
+    }
+
+  *size = atoi (fromserver + 1);
+
+  return (0);
+}
+
+/*
+ * Function: pop_list
+ *
+ * Purpose: Performs the POP "list" command and returns (in value
+ *     parameters) two malloc'd zero-terminated arrays -- one of
+ *     message IDs, and a parallel one of sizes.
+ *
+ * Arguments:
+ *     server  The pop connection to talk to.
+ *     message The number of the one message about which to get
+ *             information, or 0 to get information about all
+ *             messages.
+ *
+ * Return value: 0 on success, non-zero with error in pop_error on
+ *     failure.
+ *
+ * Side effects: On failure, may make further operations on the
+ *     connection impossible.
+ */
+int
+pop_list (popserver server, int message, int **IDs, int **sizes)
+{
+  int how_many, i;
+  char *fromserver;
+
+  if (server->in_multi)
+    {
+      strcpy (pop_error, "In multi-line query in pop_list");
+      return (-1);
+    }
+
+  if (message)
+    how_many = 1;
+  else
+    {
+      int count, size;
+      if (pop_stat (server, &count, &size))
+       return (-1);
+      how_many = count;
+    }
+
+  *IDs = (int *) malloc ((how_many + 1) * sizeof (int));
+  *sizes = (int *) malloc ((how_many + 1) * sizeof (int));
+  if (! (*IDs && *sizes))
+    {
+      strcpy (pop_error, "Out of memory in pop_list");
+      return (-1);
+    }
+
+  if (message)
+    {
+      sprintf (pop_error, "LIST %d", message);
+      if (sendline (server, pop_error))
+       {
+         free ((char *) *IDs);
+         free ((char *) *sizes);
+         return (-1);
+       }
+      if (! (fromserver = pop_getline (server)))
+       {
+         free ((char *) *IDs);
+         free ((char *) *sizes);
+         return (-1);
+       }
+      if (strncmp (fromserver, "+OK ", 4))
+       {
+         if (! strncmp (fromserver, "-ERR", 4))
+           strncpy (pop_error, fromserver, ERROR_MAX);
+         else
+           {
+             strcpy (pop_error,
+                     "Unexpected response from server in pop_list");
+             pop_trash (server);
+           }
+         free ((char *) *IDs);
+         free ((char *) *sizes);
+         return (-1);
+       }
+      (*IDs)[0] = atoi (&fromserver[4]);
+      fromserver = strchr (&fromserver[4], ' ');
+      if (! fromserver)
+       {
+         strcpy (pop_error,
+                 "Badly formatted response from server in pop_list");
+         pop_trash (server);
+         free ((char *) *IDs);
+         free ((char *) *sizes);
+         return (-1);
+       }
+      (*sizes)[0] = atoi (fromserver);
+      (*IDs)[1] = (*sizes)[1] = 0;
+      return (0);
+    }
+  else
+    {
+      if (pop_multi_first (server, "LIST", &fromserver))
+       {
+         free ((char *) *IDs);
+         free ((char *) *sizes);
+         return (-1);
+       }
+      for (i = 0; i < how_many; i++)
+       {
+         if (pop_multi_next (server, &fromserver))
+           {
+             free ((char *) *IDs);
+             free ((char *) *sizes);
+             return (-1);
+           }
+         (*IDs)[i] = atoi (fromserver);
+         fromserver = strchr (fromserver, ' ');
+         if (! fromserver)
+           {
+             strcpy (pop_error,
+                     "Badly formatted response from server in pop_list");
+             free ((char *) *IDs);
+             free ((char *) *sizes);
+             pop_trash (server);
+             return (-1);
+           }
+         (*sizes)[i] = atoi (fromserver);
+       }
+      if (pop_multi_next (server, &fromserver))
+       {
+         free ((char *) *IDs);
+         free ((char *) *sizes);
+         return (-1);
+       }
+      else if (fromserver)
+       {
+         strcpy (pop_error,
+                 "Too many response lines from server in pop_list");
+         free ((char *) *IDs);
+         free ((char *) *sizes);
+         return (-1);
+       }
+      (*IDs)[i] = (*sizes)[i] = 0;
+      return (0);
+    }
+}
+
+/*
+ * Function: pop_retrieve
+ *
+ * Purpose: Retrieve a specified message from the maildrop.
+ *
+ * Arguments:
+ *     server  The server to retrieve from.
+ *     message The message number to retrieve.
+ *     markfrom
+ *             If true, then mark the string "From " at the beginning
+ *             of lines with '>'.
+ * 
+ * Return value: A string pointing to the message, if successful, or
+ *     null with pop_error set if not.
+ *
+ * Side effects: May kill connection on error.
+ */
+char *
+pop_retrieve (popserver server, int message, int markfrom)
+{
+  int *IDs, *sizes, bufsize, fromcount = 0, cp = 0;
+  char *ptr, *fromserver;
+  int ret;
+
+  if (server->in_multi)
+    {
+      strcpy (pop_error, "In multi-line query in pop_retrieve");
+      return (0);
+    }
+
+  if (pop_list (server, message, &IDs, &sizes))
+    return (0);
+
+  if (pop_retrieve_first (server, message, &fromserver))
+    {
+      return (0);
+    }
+
+  /*
+   * The "5" below is an arbitrary constant -- I assume that if
+   * there are "From" lines in the text to be marked, there
+   * probably won't be more than 5 of them.  If there are, I
+   * allocate more space for them below.
+   */
+  bufsize = sizes[0] + (markfrom ? 5 : 0);
+  ptr = (char *)malloc (bufsize);
+  free ((char *) IDs);
+  free ((char *) sizes);
+
+  if (! ptr)
+    {
+      strcpy (pop_error, "Out of memory in pop_retrieve");
+      pop_retrieve_flush (server);
+      return (0);
+    }
+
+  while (! (ret = pop_retrieve_next (server, &fromserver)))
+    {
+      int linesize;
+
+      if (! fromserver)
+       {
+         ptr[cp] = '\0';
+         return (ptr);
+       }
+      if (markfrom && fromserver[0] == 'F' && fromserver[1] == 'r' &&
+         fromserver[2] == 'o' && fromserver[3] == 'm' &&
+         fromserver[4] == ' ')
+       {
+         if (++fromcount == 5)
+           {
+             bufsize += 5;
+             ptr = (char *)realloc (ptr, bufsize);
+             if (! ptr)
+               {
+                 strcpy (pop_error, "Out of memory in pop_retrieve");
+                 pop_retrieve_flush (server);
+                 return (0);
+               }
+             fromcount = 0;
+           }
+         ptr[cp++] = '>';
+       }
+      linesize = strlen (fromserver);
+      memcpy (&ptr[cp], fromserver, linesize);
+      cp += linesize;
+      ptr[cp++] = '\n';
+    }
+
+  if (ret)
+    {
+      free (ptr);
+      /* return (0); */
+    }
+  /* This function used to fall off the end, but that doesn't make any sense */
+  return (0);
+}     
+
+int
+pop_retrieve_first (popserver server, int message, char **response)
+{
+  sprintf (pop_error, "RETR %d", message);
+  return (pop_multi_first (server, pop_error, response));
+}
+
+int
+pop_retrieve_next (popserver server, char **line)
+{
+  return (pop_multi_next (server, line));
+}
+
+int
+pop_retrieve_flush (popserver server)
+{
+  return (pop_multi_flush (server));
+}
+
+int
+pop_top_first (popserver server, int message, int lines, char **response)
+{
+  sprintf (pop_error, "TOP %d %d", message, lines);
+  return (pop_multi_first (server, pop_error, response));
+}
+
+int
+pop_top_next (popserver server, char **line)
+{
+  return (pop_multi_next (server, line));
+}
+
+int
+pop_top_flush (popserver server)
+{
+  return (pop_multi_flush (server));
+}
+
+int
+pop_multi_first (popserver server, char *command, char **response)
+{
+  if (server->in_multi)
+    {
+      strcpy (pop_error,
+             "Already in multi-line query in pop_multi_first");
+      return (-1);
+    }
+
+  if (sendline (server, command) || (! (*response = pop_getline (server))))
+    {
+      return (-1);
+    }
+
+  if (0 == strncmp (*response, "-ERR", 4))
+    {
+      strncpy (pop_error, *response, ERROR_MAX);
+      return (-1);
+    }
+  else if (0 == strncmp (*response, "+OK", 3))
+    {
+      for (*response += 3; **response == ' '; (*response)++) /* empty */;
+      server->in_multi = 1;
+      return (0);
+    }
+  else
+    {
+      strcpy (pop_error,
+             "Unexpected response from server in pop_multi_first");
+      return (-1);
+    }
+}
+
+int
+pop_multi_next (popserver server, char **line)
+{
+  char *fromserver;
+
+  if (! server->in_multi)
+    {
+      strcpy (pop_error, "Not in multi-line query in pop_multi_next");
+      return (-1);
+    }
+
+  fromserver = pop_getline (server);
+  if (! fromserver)
+    {
+      return (-1);
+    }
+
+  if (fromserver[0] == '.')
+    {
+      if (! fromserver[1])
+       {
+         *line = 0;
+         server->in_multi = 0;
+         return (0);
+       }
+      else
+       {
+         *line = fromserver + 1;
+         return (0);
+       }
+    }
+  else
+    {
+      *line = fromserver;
+      return (0);
+    }
+}
+
+int
+pop_multi_flush (popserver server)
+{
+  char *line;
+
+  if (! server->in_multi)
+    {
+      return (0);
+    }
+
+  while (! pop_multi_next (server, &line))
+    {
+      if (! line)
+       {
+         return (0);
+       }
+    }
+
+  return (-1);
+}
+
+/* Function: pop_delete
+ *
+ * Purpose: Delete a specified message.
+ *
+ * Arguments:
+ *     server  Server from which to delete the message.
+ *     message Message to delete.
+ *
+ * Return value: 0 on success, non-zero with error in pop_error
+ *     otherwise.
+ */
+int
+pop_delete (popserver server, int message)
+{
+  if (server->in_multi)
+    {
+      strcpy (pop_error, "In multi-line query in pop_delete");
+      return (-1);
+    }
+
+  sprintf (pop_error, "DELE %d", message);
+
+  if (sendline (server, pop_error) || getok (server))
+    return (-1);
+
+  return (0);
+}
+
+/*
+ * Function: pop_noop
+ *
+ * Purpose: Send a noop command to the server.
+ *
+ * Argument:
+ *     server  The server to send to.
+ *
+ * Return value: 0 on success, non-zero with error in pop_error
+ *     otherwise.
+ *
+ * Side effects: Closes connection on error.
+ */
+int
+pop_noop (popserver server)
+{
+  if (server->in_multi)
+    {
+      strcpy (pop_error, "In multi-line query in pop_noop");
+      return (-1);
+    }
+
+  if (sendline (server, "NOOP") || getok (server))
+    return (-1);
+
+  return (0);
+}
+
+/*
+ * Function: pop_last
+ *
+ * Purpose: Find out the highest seen message from the server.
+ *
+ * Arguments:
+ *     server  The server.
+ *
+ * Return value: If successful, the highest seen message, which is
+ *     greater than or equal to 0.  Otherwise, a negative number with
+ *     the error explained in pop_error.
+ *
+ * Side effects: Closes the connection on error.
+ */
+int
+pop_last (popserver server)
+{
+  char *fromserver;
+     
+  if (server->in_multi)
+    {
+      strcpy (pop_error, "In multi-line query in pop_last");
+      return (-1);
+    }
+
+  if (sendline (server, "LAST"))
+    return (-1);
+
+  if (! (fromserver = pop_getline (server)))
+    return (-1);
+
+  if (! strncmp (fromserver, "-ERR", 4))
+    {
+      strncpy (pop_error, fromserver, ERROR_MAX);
+      return (-1);
+    }
+  else if (strncmp (fromserver, "+OK ", 4))
+    {
+      strcpy (pop_error, "Unexpected response from server in pop_last");
+      pop_trash (server);
+      return (-1);
+    }
+  else
+    {
+      return (atoi (&fromserver[4]));
+    }
+}
+
+/*
+ * Function: pop_reset
+ *
+ * Purpose: Reset the server to its initial connect state
+ *
+ * Arguments:
+ *     server  The server.
+ *
+ * Return value: 0 for success, non-0 with error in pop_error
+ *     otherwise.
+ *
+ * Side effects: Closes the connection on error.
+ */
+int
+pop_reset (popserver server)
+{
+  if (pop_retrieve_flush (server))
+    {
+      return (-1);
+    }
+
+  if (sendline (server, "RSET") || getok (server))
+    return (-1);
+
+  return (0);
+}
+
+/*
+ * Function: pop_quit
+ *
+ * Purpose: Quit the connection to the server,
+ *
+ * Arguments:
+ *     server  The server to quit.
+ *
+ * Return value: 0 for success, non-zero otherwise with error in
+ *     pop_error.
+ *
+ * Side Effects: The popserver passed in is unusable after this
+ *     function is called, even if an error occurs.
+ */
+int
+pop_quit (popserver server)
+{
+  int ret = 0;
+
+  if (server->file >= 0)
+    {
+      if (pop_retrieve_flush (server))
+       {
+         ret = -1;
+       }
+
+      if (sendline (server, "QUIT") || getok (server))
+       {
+         ret = -1;
+       }
+
+      close (server->file);
+    }
+
+  if (server->buffer)
+    free (server->buffer);
+  free ((char *) server);
+
+  return (ret);
+}
+
+#ifdef WINDOWSNT
+static int have_winsock = 0;
+#endif
+
+/*
+ * Function: socket_connection
+ *
+ * Purpose: Opens the network connection with the mail host, without
+ *     doing any sort of I/O with it or anything.
+ *
+ * Arguments:
+ *     host    The host to which to connect.
+ *     flags   Option flags.
+ *     
+ * Return value: A file descriptor indicating the connection, or -1
+ *     indicating failure, in which case an error has been copied
+ *     into pop_error.
+ */
+static int
+socket_connection (char *host, int flags)
+{
+  struct hostent *hostent;
+  struct servent *servent;
+  struct sockaddr_in addr;
+  char found_port = 0;
+  char *service;
+  int sock;
+#ifdef KERBEROS
+#ifdef KRB5
+  krb5_error_code rem;
+  krb5_ccache ccdef;
+  krb5_principal client, server;
+  krb5_error *err_ret;
+  register char *cp;
+#else
+  KTEXT ticket;
+  MSG_DAT msg_data;
+  CREDENTIALS cred;
+  Key_schedule schedule;
+  int rem;
+#endif /* KRB5 */
+#endif /* KERBEROS */
+
+  int try_count = 0;
+
+#ifdef WINDOWSNT
+  {
+    WSADATA winsockData;
+    if (WSAStartup (0x101, &winsockData) == 0)
+      have_winsock = 1;
+  }
+#endif
+
+  do
+    {
+      hostent = gethostbyname (host);
+      try_count++;
+      if ((! hostent) 
+#ifndef BROKEN_CYGWIN    
+         && ((h_errno != TRY_AGAIN) || (try_count == 5))
+#endif
+         )
+       {
+         strcpy (pop_error, "Could not determine POP server's address");
+         return (-1);
+       }
+    } while (! hostent);
+
+  memset (&addr, 0, sizeof (addr));
+  addr.sin_family = AF_INET;
+
+#ifdef KERBEROS
+  service = (flags & POP_NO_KERBEROS) ? POP_SERVICE : KPOP_SERVICE;
+#else
+  service = POP_SERVICE;
+#endif
+
+#ifdef HESIOD
+  if (! (flags & POP_NO_HESIOD))
+    {
+      servent = hes_getservbyname (service, "tcp");
+      if (servent)
+       {
+         addr.sin_port = servent->s_port;
+         found_port = 1;
+       }
+    }
+#endif
+  if (! found_port)
+    {
+      servent = getservbyname (service, "tcp");
+      if (servent)
+       {
+         addr.sin_port = servent->s_port;
+       }
+      else
+       {
+#ifdef KERBEROS
+         addr.sin_port = htons ((flags & POP_NO_KERBEROS) ?
+                               POP_PORT : KPOP_PORT);
+#else
+         addr.sin_port = htons (POP_PORT);
+#endif
+       }
+    }
+
+#define SOCKET_ERROR "Could not create socket for POP connection: "
+
+  sock = socket (PF_INET, SOCK_STREAM, 0);
+  if (sock < 0)
+    {
+      strcpy (pop_error, SOCKET_ERROR);
+      strncat (pop_error, strerror (errno),
+              ERROR_MAX - sizeof (SOCKET_ERROR));
+      return (-1);
+         
+    }
+
+  while (*hostent->h_addr_list)
+    {
+      memcpy (&addr.sin_addr, *hostent->h_addr_list, hostent->h_length);
+      if (! connect (sock, (struct sockaddr *) &addr, sizeof (addr)))
+       break;
+      hostent->h_addr_list++;
+    }
+
+#define CONNECT_ERROR "Could not connect to POP server: "
+     
+  if (! *hostent->h_addr_list)
+    {
+      CLOSESOCKET (sock);
+      strcpy (pop_error, CONNECT_ERROR);
+      strncat (pop_error, strerror (errno),
+              ERROR_MAX - sizeof (CONNECT_ERROR));
+      return (-1);
+         
+    }
+
+#ifdef KERBEROS
+#define KRB_ERROR "Kerberos error connecting to POP server: "
+  if (! (flags & POP_NO_KERBEROS))
+    {
+#ifdef KRB5
+      krb5_init_ets ();
+
+      if (rem = krb5_cc_default (&ccdef))
+       {
+       krb5error:
+         strcpy (pop_error, KRB_ERROR);
+         strncat (pop_error, error_message (rem),
+                  ERROR_MAX - sizeof(KRB_ERROR));
+         CLOSESOCKET (sock);
+         return (-1);
+       }
+
+      if (rem = krb5_cc_get_principal (ccdef, &client))
+       {
+         goto krb5error;
+       }
+
+      for (cp = hostent->h_name; *cp; cp++)
+       {
+         if (isupper (*cp))
+           {
+             *cp = tolower (*cp);
+           }
+       }
+
+      if (rem = krb5_sname_to_principal (hostent->h_name, POP_SERVICE,
+                                        FALSE, &server))
+       {
+         goto krb5error;
+       }
+
+      rem = krb5_sendauth ((krb5_pointer) &sock, "KPOPV1.0", client, server,
+                         AP_OPTS_MUTUAL_REQUIRED,
+                         0,    /* no checksum */
+                         0,    /* no creds, use ccache instead */
+                         ccdef,
+                         0,    /* don't need seq # */
+                         0,    /* don't need subsession key */
+                         &err_ret,
+                         0);   /* don't need reply */
+      krb5_free_principal (server);
+      if (rem)
+       {
+         if (err_ret && err_ret->text.length)
+           {
+             strcpy (pop_error, KRB_ERROR);
+             strncat (pop_error, error_message (rem),
+                      ERROR_MAX - sizeof (KRB_ERROR));
+             strncat (pop_error, " [server says '",
+                      ERROR_MAX - strlen (pop_error) - 1);
+             strncat (pop_error, err_ret->text.data,
+                      min (ERROR_MAX - strlen (pop_error) - 1,
+                           err_ret->text.length));
+             strncat (pop_error, "']",
+                      ERROR_MAX - strlen (pop_error) - 1);
+           }
+         else
+           {
+             strcpy (pop_error, KRB_ERROR);
+             strncat (pop_error, error_message (rem),
+                      ERROR_MAX - sizeof (KRB_ERROR));
+           }
+         if (err_ret)
+           krb5_free_error (err_ret);
+
+         CLOSESOCKET (sock);
+         return (-1);
+       }
+#else  /* ! KRB5 */      
+      ticket = (KTEXT) malloc (sizeof (KTEXT_ST));
+      rem = krb_sendauth (0L, sock, ticket, "pop", hostent->h_name,
+                         (char *) krb_realmofhost (hostent->h_name),
+                         (unsigned long) 0, &msg_data, &cred, schedule,
+                         (struct sockaddr_in *) 0,
+                         (struct sockaddr_in *) 0,
+                         "KPOPV0.1");
+      free ((char *) ticket);
+      if (rem != KSUCCESS)
+       {
+         strcpy (pop_error, KRB_ERROR);
+         strncat (pop_error, krb_err_txt[rem],
+                  ERROR_MAX - sizeof (KRB_ERROR));
+         CLOSESOCKET (sock);
+         return (-1);
+       }
+#endif /* KRB5 */
+    }
+#endif /* KERBEROS */
+
+  return (sock);
+} /* socket_connection */
+
+/*
+ * Function: pop_getline
+ *
+ * Purpose: Get a line of text from the connection and return a
+ *     pointer to it.  The carriage return and linefeed at the end of
+ *     the line are stripped, but periods at the beginnings of lines
+ *     are NOT dealt with in any special way.
+ *
+ * Arguments:
+ *     server  The server from which to get the line of text.
+ *
+ * Returns: A non-null pointer if successful, or a null pointer on any
+ *     error, with an error message copied into pop_error.
+ *
+ * Notes: The line returned is overwritten with each call to pop_getline.
+ *
+ * Side effects: Closes the connection on error.
+ */
+static char *
+pop_getline (popserver server)
+{
+#define GETLINE_ERROR "Error reading from server: "
+
+  int ret;
+  int search_offset = 0;
+
+  if (server->data)
+    {
+      char *cp = find_crlf (server->buffer + server->buffer_index);
+      if (cp)
+       {
+         int found;
+         int data_used;
+
+         found = server->buffer_index;
+         data_used = (cp + 2) - server->buffer - found;
+              
+         *cp = '\0';           /* terminate the string to be returned */
+         server->data -= data_used;
+         server->buffer_index += data_used;
+
+         if (pop_debug)
+           fprintf (stderr, "<<< %s\n", server->buffer + found);
+         return (server->buffer + found);
+       }
+      else
+       {
+         memcpy (server->buffer,
+                 server->buffer + server->buffer_index,
+                 server->data);
+         /* Record the fact that we've searched the data already in
+             the buffer for a CRLF, so that when we search below, we
+             don't have to search the same data twice.  There's a "-
+             1" here to account for the fact that the last character
+             of the data we have may be the CR of a CRLF pair, of
+             which we haven't read the second half yet, so we may have
+             to search it again when we read more data. */
+         search_offset = server->data - 1;
+         server->buffer_index = 0;
+       }
+    }
+  else
+    {
+      server->buffer_index = 0;
+    }
+
+  while (1)
+    {
+      /* There's a "- 1" here to leave room for the null that we put
+         at the end of the read data below.  We put the null there so
+         that find_crlf knows where to stop when we call it. */
+      if (server->data == server->buffer_size - 1)
+       {
+         server->buffer_size += GETLINE_INCR;
+         server->buffer = (char *)realloc (server->buffer, server->buffer_size);
+         if (! server->buffer)
+           {
+             strcpy (pop_error, "Out of memory in pop_getline");
+             pop_trash (server);
+             return (0);
+           }
+       }
+      ret = RECV (server->file, server->buffer + server->data,
+                 server->buffer_size - server->data - 1, 0);
+      if (ret < 0)
+       {
+         strcpy (pop_error, GETLINE_ERROR);
+         strncat (pop_error, strerror (errno),
+                  ERROR_MAX - sizeof (GETLINE_ERROR));
+         pop_trash (server);
+         return (0);
+       }
+      else if (ret == 0)
+       {
+         strcpy (pop_error, "Unexpected EOF from server in pop_getline");
+         pop_trash (server);
+         return (0);
+       }
+      else
+       {
+         char *cp;
+         server->data += ret;
+         server->buffer[server->data] = '\0';
+              
+         cp = find_crlf (server->buffer + search_offset);
+         if (cp)
+           {
+             int data_used = (cp + 2) - server->buffer;
+             *cp = '\0';
+             server->data -= data_used;
+             server->buffer_index = data_used;
+
+             if (pop_debug)
+               fprintf (stderr, "<<< %s\n", server->buffer);
+             return (server->buffer);
+           }
+         search_offset += ret;
+       }
+    }
+
+  /* NOTREACHED */
+}
+
+/*
+ * Function: sendline
+ *
+ * Purpose: Sends a line of text to the POP server.  The line of text
+ *     passed into this function should NOT have the carriage return
+ *     and linefeed on the end of it.  Periods at beginnings of lines
+ *     will NOT be treated specially by this function.
+ *
+ * Arguments:
+ *     server  The server to which to send the text.
+ *     line    The line of text to send.
+ *
+ * Return value: Upon successful completion, a value of 0 will be
+ *     returned.  Otherwise, a non-zero value will be returned, and
+ *     an error will be copied into pop_error.
+ *
+ * Side effects: Closes the connection on error.
+ */
+static int
+sendline (popserver server, char *line)
+{
+#define SENDLINE_ERROR "Error writing to POP server: "
+  int ret;
+
+  ret = fullwrite (server->file, line, strlen (line));
+  if (ret >= 0)
+    {                          /* 0 indicates that a blank line was written */
+      ret = fullwrite (server->file, "\r\n", 2);
+    }
+
+  if (ret < 0)
+    {
+      pop_trash (server);
+      strcpy (pop_error, SENDLINE_ERROR);
+      strncat (pop_error, strerror (errno),
+              ERROR_MAX - sizeof (SENDLINE_ERROR));
+      return (ret);
+    }
+
+  if (pop_debug)
+    fprintf (stderr, ">>> %s\n", line);
+
+  return (0);
+}
+
+/*
+ * Procedure: fullwrite
+ *
+ * Purpose: Just like write, but keeps trying until the entire string
+ *     has been written.
+ *
+ * Return value: Same as write.  Pop_error is not set.
+ */
+static int
+fullwrite (int fd, char *buf, int nbytes)
+{
+  char *cp;
+  int ret;
+
+  cp = buf;
+  while ((ret = SEND (fd, cp, nbytes, 0)) > 0)
+    {
+      cp += ret;
+      nbytes -= ret;
+    }
+
+  return (ret);
+}
+
+/*
+ * Procedure getok
+ *
+ * Purpose: Reads a line from the server.  If the return indicator is
+ *     positive, return with a zero exit status.  If not, return with
+ *     a negative exit status.
+ *
+ * Arguments:
+ *     server  The server to read from.
+ * 
+ * Returns: 0 for success, else for failure and puts error in pop_error.
+ *
+ * Side effects: On failure, may make the connection unusable.
+ */
+static int
+getok (popserver server)
+{
+  char *fromline;
+
+  if (! (fromline = pop_getline (server)))
+    {
+      return (-1);
+    }
+
+  if (! strncmp (fromline, "+OK", 3))
+    return (0);
+  else if (! strncmp (fromline, "-ERR", 4))
+    {
+      strncpy (pop_error, fromline, ERROR_MAX);
+      pop_error[ERROR_MAX-1] = '\0';
+      return (-1);
+    }
+  else
+    {
+      strcpy (pop_error,
+             "Unexpected response from server; expecting +OK or -ERR");
+      pop_trash (server);
+      return (-1);
+    }
+}        
+
+#if 0
+/*
+ * Function: gettermination
+ *
+ * Purpose: Gets the next line and verifies that it is a termination
+ *     line (nothing but a dot).
+ *
+ * Return value: 0 on success, non-zero with pop_error set on error.
+ *
+ * Side effects: Closes the connection on error.
+ */
+static int
+gettermination (popserver server)
+{
+  char *fromserver;
+
+  fromserver = pop_getline (server);
+  if (! fromserver)
+    return (-1);
+
+  if (strcmp (fromserver, "."))
+    {
+      strcpy (pop_error,
+             "Unexpected response from server in gettermination");
+      pop_trash (server);
+      return (-1);
+    }
+
+  return (0);
+}
+#endif
+
+/*
+ * Function pop_close
+ *
+ * Purpose: Close a pop connection, sending a "RSET" command to try to
+ *     preserve any changes that were made and a "QUIT" command to
+ *     try to get the server to quit, but ignoring any responses that
+ *     are received.
+ *
+ * Side effects: The server is unusable after this function returns.
+ *     Changes made to the maildrop since the session was started (or
+ *     since the last pop_reset) may be lost.
+ */
+void 
+pop_close (popserver server)
+{
+  pop_trash (server);
+  free ((char *) server);
+
+  return;
+}
+
+/*
+ * Function: pop_trash
+ *
+ * Purpose: Like pop_close or pop_quit, but doesn't deallocate the
+ *     memory associated with the server.  It is legal to call
+ *     pop_close or pop_quit after this function has been called.
+ */
+static void
+pop_trash (popserver server)
+{
+  if (server->file >= 0)
+    {
+      /* avoid recursion; sendline can call pop_trash */
+      if (server->trash_started)
+       return;
+      server->trash_started = 1;
+
+      sendline (server, "RSET");
+      sendline (server, "QUIT");
+
+      CLOSESOCKET (server->file);
+      server->file = -1;
+      if (server->buffer)
+       {
+         free (server->buffer);
+         server->buffer = 0;
+       }
+    }
+
+#ifdef WINDOWSNT
+  if (have_winsock)
+    WSACleanup ();
+#endif
+}
+
+/* Return a pointer to the first CRLF in IN_STRING,
+   or 0 if it does not contain one.  */
+
+static char *
+find_crlf (char *in_string)
+{
+  while (1)
+    {
+      if (! *in_string)
+       return (0);
+      else if (*in_string == '\r')
+       {
+         if (*++in_string == '\n')
+           return (in_string - 1);
+       }
+      else
+       in_string++;
+    }
+  /* NOTREACHED */
+}
+
+#endif /* MAIL_USE_POP */
diff --git a/lib-src/pop.h b/lib-src/pop.h
new file mode 100644 (file)
index 0000000..9121425
--- /dev/null
@@ -0,0 +1,82 @@
+/* pop.h: Header file for the "pop.c" client POP3 protocol.
+   Copyright (c) 1991,1993 Free Software Foundation, Inc.
+   Written by Jonathan Kamens, jik@security.ov.com.
+
+This file is part of GNU Emacs.
+
+GNU Emacs 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.
+
+GNU Emacs 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 GNU Emacs; see the file COPYING.  If not, write to
+the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#include <stdio.h>
+
+#define GETLINE_MIN 1024       /* the getline buffer starts out this */
+                               /* size */
+#define GETLINE_INCR 1024      /* the getline buffer is grown by this */
+                               /* size when it needs to grow */
+
+extern char pop_error[];
+extern int pop_debug;
+
+struct _popserver
+{
+  int file, data;
+  char *buffer;
+  int buffer_size, buffer_index;
+  int in_multi;
+  int trash_started;
+};
+
+typedef struct _popserver *popserver;
+
+/*
+ * Valid flags for the pop_open function.
+ */
+
+#define POP_NO_KERBEROS        (1<<0)
+#define POP_NO_HESIOD  (1<<1)
+#define POP_NO_GETPASS         (1<<2)
+
+#ifdef __STDC__
+#define _ARGS(a) a
+#else
+#define _ARGS(a) ()
+#endif
+
+extern popserver pop_open _ARGS((char *host, char *username, char *password,
+                                int flags));
+extern int pop_stat _ARGS((popserver server, int *count, int *size));
+extern int pop_list _ARGS((popserver server, int message, int **IDs,
+                          int **size));
+extern char *pop_retrieve _ARGS((popserver server, int message, int markfrom));
+extern int pop_retrieve_first _ARGS((popserver server, int message,
+                                    char **response));
+extern int pop_retrieve_next _ARGS((popserver server, char **line));
+extern int pop_retrieve_flush _ARGS((popserver server));
+extern int pop_top_first _ARGS((popserver server, int message, int lines,
+                               char **response));
+extern int pop_top_next _ARGS((popserver server, char **line));
+extern int pop_top_flush _ARGS((popserver server));
+extern int pop_multi_first _ARGS((popserver server, char *command,
+                                 char **response));
+extern int pop_multi_next _ARGS((popserver server, char **line));
+extern int pop_multi_flush _ARGS((popserver server));
+extern int pop_delete _ARGS((popserver server, int message));
+extern int pop_noop _ARGS((popserver server));
+extern int pop_last _ARGS((popserver server));
+extern int pop_reset _ARGS((popserver server));
+extern int pop_quit _ARGS((popserver server));
+extern void pop_close _ARGS((popserver));
+
+#undef _ARGS
diff --git a/lib-src/profile.c b/lib-src/profile.c
new file mode 100644 (file)
index 0000000..5644d21
--- /dev/null
@@ -0,0 +1,96 @@
+/* profile.c --- generate periodic events for profiling of Emacs Lisp code.
+ Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+ Author: Boaz Ben-Zvi <boaz@lcs.mit.edu>
+
+ This file is part of GNU Emacs.
+
+ GNU Emacs 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.
+
+ GNU Emacs 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 GNU Emacs; see the file COPYING.  If not, write to
+ the Free the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+/* Synched up with: FSF 19.28. */
+/* #### Not sure if this is needed for XEmacs. */
+
+/**
+ **  To be run as an emacs process. Input string that starts with:
+ **    'z' -- resets the watch (to zero).
+ **    'p' -- return time (on stdout) as string with format <sec>.<micro-sec>
+ **    'q' -- exit.
+ **
+ **  abstraction : a stopwatch
+ **  operations: reset_watch, get_time
+ */
+#include <../src/config.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "../src/systime.h"
+
+static struct timeval TV1, TV2;
+static int watch_not_started = 1; /* flag */
+static char time_string[30];
+
+/* Reset the stopwatch to zero.  */
+
+static void
+reset_watch (void)
+{
+  EMACS_GET_TIME (TV1);
+  watch_not_started = 0;
+}
+
+/* This call returns the time since the last reset_watch call.  The time
+   is returned as a string with the format  <seconds>.<micro-seconds> 
+   If reset_watch was not called yet, exit.  */
+
+static char *
+get_time (void)
+{
+  if (watch_not_started)
+    exit (1);  /* call reset_watch first ! */
+  EMACS_GET_TIME (TV2);
+  if (TV1.tv_usec > TV2.tv_usec)
+    {
+      TV2.tv_usec += 1000000;
+      TV2.tv_sec--;
+    }
+  sprintf (time_string, "%lu.%06lu",
+         (unsigned long) TV2.tv_sec - TV1.tv_sec,
+         (unsigned long) TV2.tv_usec - TV1.tv_usec);
+  return time_string;
+}
+
+int
+main (int argc, char *argv[])
+{
+  int c;
+  while ((c = getchar ()) != EOF)
+    {
+      switch (c)
+       {
+       case 'z':
+         reset_watch ();
+         break;
+       case 'p':
+         puts (get_time ());
+         break;
+       case 'q':
+         exit (0);
+       }
+      /* Anything remaining on the line is ignored.  */
+      while (c != '\n' && c != EOF)
+       c = getchar ();
+    }
+  return 1;
+}
diff --git a/lib-src/pstogif b/lib-src/pstogif
new file mode 100755 (executable)
index 0000000..9ff1cbf
--- /dev/null
@@ -0,0 +1,189 @@
+: # -*-Perl-*-
+eval 'exec perl -w -S $0 ${1+"$@"}' # Portability kludge
+    if 0;
+# 
+# pstogif.pl v1.0, July 1994, by Nikos Drakos <nikos@cbl.leeds.ac.uk>
+# Computer Based Learning Unit, University of Leeds.
+#
+# Accompanies LaTeX2HTML Version 96.1
+#
+# Script to convert an arbitrary PostScript image to a cropped GIF image
+# suitable for incorporation into HTML documents as inlined images to be
+# viewed with WWW browsers.
+#
+# This is based on the pstoepsi script 
+# by Doug Crabill dgc@cs.purdue.edu
+#
+# Please note the following:
+# - The source PostScript file must end
+#   in a .ps extention.  This is a GhostScript requirement, not mine...
+# - The -density argument has no effect unless the 
+#   color depth (set with the -depth argument) is equal to 1.
+# - Valid arguments for -depth are 1,8, or 24.
+#  
+# This software is provided as is without any guarantee.
+#
+# Nikos Drakos (ND), nikos@cbl.leeds.ac.uk
+# Computer Based Learning Unit, University of Leeds.
+#
+# 15 Jan 96 HS Call ppmquant only if needed.  Fixed bug relative to
+#    V 95.3 .
+#
+# 15 Dec 95 HS (Herbert Swan <dprhws.edp.Arco.com> Added support for
+#    the flip=option.  This allows images to be oriented differently
+#    in the paper versus the electronic media
+#
+# 1 Nov 95 jmn - modified for use with gs ppm driver - from jhrg's patches
+#    note that ppmtops.ps and ppmtops3.ps are no longer needed
+#
+# 20 JUL 94 ND Converted to Perl and made several changes eg it now accepts 
+#    parameters from environment variables or from command line or will use 
+#    default ones. 
+#      
+# 1  APR 94 ND Changed the suffixes of multi-page files from xbm to gif (oops!)
+#
+# 
+
+#####################################################################
+$| =1;
+&read_args;
+
+### You may need to specify some pathnames here if you want to
+### run the script without LaTeX2HTML
+
+# Ghostscript
+$GS= $ENV{'GS'} || 'gs';
+
+# Comes with LaTeX2HTML (For ghostscript versions greater than 3.0 
+# you need the newer pstoppm.ps)
+#$PSTOPPM= $ENV{'PSTOPPM'} ||
+#    'pstoppm.ps';
+
+# Available in the PBMPLUS libary         
+$PNMCROP=$ENV{'PNMCROP'} || 'pnmcrop' ;
+
+# Also in PBMPLUS
+$PNMFLIP=$ENV{'PNMFLIP'} || 'pnmflip' ;
+
+# Also in PBMPPLUS       
+$PPMTOGIF=$ENV{'PPMTOGIF'} || 'ppmtogif' ;
+
+# Also in PBMPPLUS       
+$REDUCE_COLOR=$ENV{'PPMQUANT'} || 'ppmquant 256' ;
+$OUTFILE = $ENV{'OUTFILE'} || $out;
+                       
+# Valid choices for $COLOR_DEPTH are 1, 8 or 24. 
+$DEPTH = $ENV{'DEPTH'} || $depth || 24;
+
+#Default density is 72
+$DENSITY = $ENV{'DENSITY'} || $density || 72;
+    
+# Valid choices are any numbers greater than zero
+# Useful choices are numbers between 0.1 - 5
+# Large numbers may generate very large intermediate files
+# and will take longer to process
+$SCALE = $ENV{'SCALE'} || $scale; # No default value
+
+$PAPERSIZE = $ENV{'PAPERSIZE'} || $papersize; # No default value;
+
+$DEBUG = $ENV{'DEBUG'} || $DEBUG || 0;
+
+######################################################################
+
+&main;
+
+sub read_args {
+    local($_);
+    local($color);
+    while ($ARGV[0] =~ /^-/) {
+       $_ = shift @ARGV;
+       if (/^-h(elp)?$/) {
+           &usage; exit}
+        elsif (/^-out$/) {
+            $out = shift @ARGV;
+       }
+       elsif (/^-(.*)$/) {
+           eval "\$$1 = shift \@ARGV"; # Create and set a flag $<name>
+           }
+    }
+}               
+
+sub main {
+    local($base, $outfile, $i, $j);
+    $base = &test_args;
+    $outfile = $OUTFILE || "$base.gif";
+    open(STDERR, ">/dev/null") unless $DEBUG;
+    &convert($base);
+    if (-f "$base.ppm") {
+       &crop_scale_etc("$base.ppm", $outfile);
+    }
+    else {
+       foreach $i (<$base.[1-9]*ppm>) {
+       $j = $i; 
+       $j =~ s/\.(.*)ppm/$1.gif/;
+       &crop_scale_etc($i, $j)}
+    }                          
+    &cleanup($base);
+}
+
+sub crop_scale_etc {
+    local($in, $out) = @_;
+    local($tmp) = $in . ".tmp";
+    open(STDERR, ">/dev/null") unless $DEBUG;
+
+    if ($flip) {
+       rename($tmp, $in) unless system("$PNMFLIP -$flip $in > $tmp");
+       }
+    system("$PNMCROP $in > $tmp");
+
+    if (system("$PPMTOGIF $tmp > $out")) {
+       print "Running ppmquant for $out\n";
+       system("$REDUCE_COLOR < $tmp|$PPMTOGIF - > $out");
+       }
+    unlink $tmp;
+    print "Writing $out\n";
+}
+
+sub test_args {
+    local($file) = $ARGV[0];
+    if (! ($file =~ s/\.ps$//)) {
+       print "The name of the input file must end in '.ps'\n";
+       exit}
+    elsif (! ( -f "$file.ps")) {
+       print "Cannot find file $file.ps\n.";
+       exit}
+    elsif (! ($DEPTH =~ /^(1|8|24)$/)) {
+       print "The color depth must be 1 or 8 or 24. You specified $DEPTH\n";
+       exit                    
+       }
+    if (defined $SCALE) {
+       if ($SCALE > 0) {
+           $DENSITY = int($SCALE * $DENSITY)}
+       else {
+           print "Error: The scale must be greater than 0.\n" .
+               "You specified $SCALE\n";
+           exit}
+    }
+    $file;
+}
+   
+sub convert {
+    local($base) = @_;
+    local($paperopt) = "-sPAPERSIZE=$PAPERSIZE" if $PAPERSIZE;
+    local($ppmtype) = join('', "ppm",$DEPTH,"run");
+    local($density) = "-r$DENSITY" if ($DENSITY != 72);
+    open (GS, "|$GS -q -dNOPAUSE -dNO_PAUSE -sDEVICE=ppmraw $density -sOutputFile=$base.ppm $paperopt $base.ps");
+    close GS;
+}
+
+sub cleanup {
+    local($base) = @_;
+    unlink <$base[0-9.]*ppm>;
+}
+
+sub usage {
+    print "Usage: pstogif [-h(elp)] [-out <output file>] [-depth <color depth 1, 8 or 24>]  [-flip <Flip_code>] [-density <pixel density>] <file>.ps\n\n";
+}
+
+
diff --git a/lib-src/qsort.c b/lib-src/qsort.c
new file mode 100644 (file)
index 0000000..ff8ef60
--- /dev/null
@@ -0,0 +1,237 @@
+/* Plug-compatible replacement for UNIX qsort.
+   Copyright (C) 1989 Free Software Foundation, Inc.
+   Written by Douglas C. Schmidt (schmidt@ics.uci.edu)
+
+This file is part of GNU CC.
+
+GNU QSORT 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.
+
+GNU QSORT 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 GNU QSORT; see the file COPYING.  If not, write to
+the Free the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+/* Synched up with: FSF 19.28. */
+
+#ifdef sparc
+#include <alloca.h>
+#endif
+
+/* Invoke the comparison function, returns either 0, < 0, or > 0. */
+#define CMP(A,B) ((*cmp)((A),(B)))
+
+/* Byte-wise swap two items of size SIZE. */
+#define SWAP(A,B,SIZE) do {int sz = (SIZE); char *a = (A); char *b = (B); \
+    do { char _temp = *a;*a++ = *b;*b++ = _temp;} while (--sz);} while (0)
+
+/* Copy SIZE bytes from item B to item A. */
+#define COPY(A,B,SIZE) {int sz = (SIZE); do { *(A)++ = *(B)++; } while (--sz); }
+
+/* This should be replaced by a standard ANSI macro. */
+#define BYTES_PER_WORD 8
+
+/* The next 4 #defines implement a very fast in-line stack abstraction. */
+#define STACK_SIZE (BYTES_PER_WORD * sizeof (long))
+#define PUSH(LOW,HIGH) do {top->lo = LOW;top++->hi = HIGH;} while (0)
+#define POP(LOW,HIGH)  do {LOW = (--top)->lo;HIGH = top->hi;} while (0)
+#define STACK_NOT_EMPTY (stack < top)                
+
+/* Discontinue quicksort algorithm when partition gets below this size.
+   This particular magic number was chosen to work best on a Sun 4/260. */
+#define MAX_THRESH 4
+
+/* Stack node declarations used to store unfulfilled partition obligations. */
+typedef struct 
+{
+  char *lo;
+  char *hi;
+} stack_node;
+
+/* Order size using quicksort.  This implementation incorporates
+   four optimizations discussed in Sedgewick:
+   
+   1. Non-recursive, using an explicit stack of pointer that store the 
+      next array partition to sort.  To save time, this maximum amount 
+      of space required to store an array of MAX_INT is allocated on the 
+      stack.  Assuming a 32-bit integer, this needs only 32 * 
+      sizeof (stack_node) == 136 bits.  Pretty cheap, actually.
+
+   2. Chose the pivot element using a median-of-three decision tree.
+      This reduces the probability of selecting a bad pivot value and 
+      eliminates certain extraneous comparisons.
+
+   3. Only quicksorts TOTAL_ELEMS / MAX_THRESH partitions, leaving
+      insertion sort to order the MAX_THRESH items within each partition.  
+      This is a big win, since insertion sort is faster for small, mostly
+      sorted array segments.
+   
+   4. The larger of the two sub-partitions is always pushed onto the
+      stack first, with the algorithm then concentrating on the
+      smaller partition.  This *guarantees* no more than log (n)
+      stack size is needed (actually O(1) in this case)! */
+      
+int 
+qsort (base_ptr, total_elems, size, cmp)
+     char *base_ptr;
+     int total_elems;
+     int size;
+     int (*cmp)();
+{
+  /* Allocating SIZE bytes for a pivot buffer facilitates a better 
+     algorithm below since we can do comparisons directly on the pivot. */
+  char *pivot_buffer = (char *) alloca (size);
+  int   max_thresh   = MAX_THRESH * size;
+
+  if (total_elems > MAX_THRESH)
+    {
+      char       *lo = base_ptr;
+      char       *hi = lo + size * (total_elems - 1);
+      stack_node stack[STACK_SIZE]; /* Largest size needed for 32-bit int!!! */
+      stack_node *top = stack + 1;
+
+      while (STACK_NOT_EMPTY)
+        {
+          char *left_ptr;
+          char *right_ptr;
+          {
+            char *pivot = pivot_buffer;
+            {
+              /* Select median value from among LO, MID, and HI. Rearrange
+                 LO and HI so the three values are sorted. This lowers the 
+                 probability of picking a pathological pivot value and 
+                 skips a comparison for both the LEFT_PTR and RIGHT_PTR. */
+
+              char *mid = lo + size * ((hi - lo) / size >> 1);
+
+              if (CMP (mid, lo) < 0)
+                SWAP (mid, lo, size);
+              if (CMP (hi, mid) < 0)
+                SWAP (mid, hi, size);
+              else 
+                goto jump_over;
+              if (CMP (mid, lo) < 0)
+                SWAP (mid, lo, size);
+            jump_over:
+              COPY (pivot, mid, size);
+              pivot = pivot_buffer;
+            }
+            left_ptr  = lo + size;
+            right_ptr = hi - size; 
+
+            /* Here's the famous ``collapse the walls'' section of quicksort.  
+               Gotta like those tight inner loops!  They are the main reason 
+               that this algorithm runs much faster than others. */
+            do 
+              {
+                while (CMP (left_ptr, pivot) < 0)
+                  left_ptr += size;
+
+                while (CMP (pivot, right_ptr) < 0)
+                  right_ptr -= size;
+
+                if (left_ptr < right_ptr) 
+                  {
+                    SWAP (left_ptr, right_ptr, size);
+                    left_ptr += size;
+                    right_ptr -= size;
+                  }
+                else if (left_ptr == right_ptr) 
+                  {
+                    left_ptr += size;
+                    right_ptr -= size;
+                    break;
+                  }
+              } 
+            while (left_ptr <= right_ptr);
+
+          }
+
+          /* Set up pointers for next iteration.  First determine whether
+             left and right partitions are below the threshold size. If so, 
+             ignore one or both.  Otherwise, push the larger partition's
+             bounds on the stack and continue sorting the smaller one. */
+
+          if ((right_ptr - lo) <= max_thresh)
+            {
+              if ((hi - left_ptr) <= max_thresh) /* Ignore both small partitions. */
+                POP (lo, hi); 
+              else              /* Ignore small left partition. */  
+                lo = left_ptr;
+            }
+          else if ((hi - left_ptr) <= max_thresh) /* Ignore small right partition. */
+            hi = right_ptr;
+          else if ((right_ptr - lo) > (hi - left_ptr)) /* Push larger left partition indices. */
+            {                   
+              PUSH (lo, right_ptr);
+              lo = left_ptr;
+            }
+          else                  /* Push larger right partition indices. */
+            {                   
+              PUSH (left_ptr, hi);
+              hi = right_ptr;
+            }
+        }
+    }
+
+  /* Once the BASE_PTR array is partially sorted by quicksort the rest
+     is completely sorted using insertion sort, since this is efficient 
+     for partitions below MAX_THRESH size. BASE_PTR points to the beginning 
+     of the array to sort, and END_PTR points at the very last element in
+     the array (*not* one beyond it!). */
+
+#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
+
+  {
+    char *end_ptr = base_ptr + size * (total_elems - 1);
+    char *run_ptr;
+    char *tmp_ptr = base_ptr;
+    char *thresh  = MIN (end_ptr, base_ptr + max_thresh);
+
+    /* Find smallest element in first threshold and place it at the
+       array's beginning.  This is the smallest array element,
+       and the operation speeds up insertion sort's inner loop. */
+
+    for (run_ptr = tmp_ptr + size; run_ptr <= thresh; run_ptr += size)
+      if (CMP (run_ptr, tmp_ptr) < 0)
+        tmp_ptr = run_ptr;
+
+    if (tmp_ptr != base_ptr)
+      SWAP (tmp_ptr, base_ptr, size);
+
+    /* Insertion sort, running from left-hand-side up to `right-hand-side.' 
+       Pretty much straight out of the original GNU qsort routine. */
+
+    for (run_ptr = base_ptr + size; (tmp_ptr = run_ptr += size) <= end_ptr; )
+      {
+
+        while (CMP (run_ptr, tmp_ptr -= size) < 0)
+          ;
+
+        if ((tmp_ptr += size) != run_ptr)
+          {
+            char *trav;
+
+            for (trav = run_ptr + size; --trav >= run_ptr;)
+              {
+                char c = *trav;
+                char *hi, *lo;
+
+                for (hi = lo = trav; (lo -= size) >= tmp_ptr; hi = lo)
+                  *hi = *lo;
+                *hi = c;
+              }
+          }
+
+      }
+  }
+  return 1;
+}
+
diff --git a/lib-src/rcs-checkin b/lib-src/rcs-checkin
new file mode 100755 (executable)
index 0000000..f954e54
--- /dev/null
@@ -0,0 +1,98 @@
+#! /bin/sh
+
+# This script accepts any number of file arguments and checks them into RCS.
+#
+# Arguments which are detectably either RCS masters (with names ending in ,v)
+# or Emacs version files  (with names of the form foo.~<number>~) are ignored.
+# For each file foo, the script looks for Emacs version files related to it.
+# These files are checked in as deltas, oldest first, so that the contents of
+# the file itself becomes the latest revision in the master.
+#
+# The first line of each file is used as its description text.  The file itself
+# is not deleted, as under VC with vc-keep-workfiles at its default of t, but
+# all the version files are.
+#
+# If an argument file is already version-controlled under RCS, any version 
+# files are added to the list of deltas and deleted, and then the workfile
+# is checked in again as the latest version.  This is probably not quite
+# what was wanted, and is the main reason VC doesn't simply call this to
+# do checkins.
+#
+# This script is intended to be used to convert files with an old-Emacs-style
+# version history for use with VC (the Emacs 19 version-control interface),
+# which likes to use RCS as its back end.  It was written by Paul Eggert
+# and revised/documented for use with VC by Eric S. Raymond, Mar 19 1993.
+
+case $# in
+0)
+       echo "rcs-checkin: usage: rcs-checkin file ..."
+       echo "rcs-checkin: function: checks file.~*~ and file into a new RCS file"
+       echo "rcs-checkin: function: uses the file's first line for the description"
+esac
+
+# expr pattern to extract owner from ls -l output
+ls_owner_pattern='[^ ][^ ]*  *[^ ][^ ]*  *\([^ ][^ ]*\)'
+
+for file
+do
+       # Make it easier to say `rcs-checkin *'
+       # by ignoring file names that already contain `~', or end in `,v'.
+       case $file in
+       *~* | *,v) continue
+       esac
+       # Ignore non-files too.
+       test -f "$file" || continue
+
+       # Check that file is readable.
+       test -r "$file" || exit
+
+       # If the RCS file does not already exist,
+       # initialize it with a description from $file's first line.
+       rlog -R "$file" >/dev/null 2>&1 ||
+       rcs -i -q -t-"`sed 1q $file`" "$file" || exit
+
+       # Get list of old files.
+       oldfiles=`
+               ls $file.~[0-9]*~ 2>/dev/null |
+               sort -t~ -n +1
+       `
+
+       # Check that they are properly sorted by date.
+       case $oldfiles in
+       ?*)
+               oldfiles_by_date=`ls -rt $file $oldfiles`
+               test " $oldfiles
+$file" = " $oldfiles_by_date" || {
+                       echo >&2 "rcs-checkin: skipping $file, because its mod times are out of order.
+
+Sorted by mod time:
+$oldfiles_by_date
+
+Sorted by name:
+$oldfiles
+$file"
+                       continue
+               }
+       esac
+
+       echo >&2 rcs-checkin: checking in: $oldfiles $file
+
+       # Save $file as $file.~-~ temporarily.
+       mv "$file" "$file.~-~" || exit
+
+       # Rename each old file to $file, and check it in.
+       for oldfile in $oldfiles
+       do
+               mv "$oldfile" "$file" || exit
+               ls_l=`ls -l "$file"` || exit
+               owner=-w`expr " $ls_l" : " $ls_owner_pattern"` || owner=
+               echo "Formerly ${oldfile}" | ci -d -l -q $owner "$file" || exit
+       done
+
+       # Bring $file back from $file.~-~, and check it in.
+       mv "$file.~-~" "$file" || exit
+       ls_l=`ls -l "$file"` || exit
+       owner=-w`expr " $ls_l" : " $ls_owner_pattern"` || owner=
+       ci -d -q -u $owner -m"entered into RCS" "$file" || exit
+done
+
diff --git a/lib-src/rcs2log b/lib-src/rcs2log
new file mode 100755 (executable)
index 0000000..8fa12d9
--- /dev/null
@@ -0,0 +1,650 @@
+#! /bin/sh
+
+# RCS to ChangeLog generator
+
+# Generate a change log prefix from RCS files (perhaps in the CVS repository)
+# and the ChangeLog (if any).
+# Output the new prefix to standard output.
+# You can edit this prefix by hand, and then prepend it to ChangeLog.
+
+# Ignore log entries that start with `#'.
+# Clump together log entries that start with `{topic} ',
+# where `topic' contains neither white space nor `}'.
+
+Help='The default FILEs are the files registered under the working directory.
+Options:
+
+  -c CHANGELOG  Output a change log prefix to CHANGELOG (default ChangeLog).
+  -h HOSTNAME  Use HOSTNAME in change log entries (default current host).
+  -i INDENT  Indent change log lines by INDENT spaces (default 8).
+  -l LENGTH  Try to limit log lines to LENGTH characters (default 79).
+  -R  If no FILEs are given and RCS is used, recurse through working directory.
+  -r OPTION  Pass OPTION to subsidiary log command.
+  -t TABWIDTH  Tab stops are every TABWIDTH characters (default 8).
+  -u "LOGIN<tab>FULLNAME<tab>MAILADDR"  Assume LOGIN has FULLNAME and MAILADDR.
+  -v  Append RCS revision to file names in log lines.
+  --help  Output help.
+  --version  Output version number.
+
+Report bugs to <bug-gnu-emacs@prep.ai.mit.edu>.'
+
+Id='$Id: rcs2log,v 1.2 1997/07/09 04:31:03 steve Exp $'
+
+# Copyright 1992, 1993, 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+
+# 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 2, 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; see the file COPYING.  If not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+Copyright='Copyright 1997 Free Software Foundation, Inc.
+This program comes with NO WARRANTY, to the extent permitted by law.
+You may redistribute copies of this program
+under the terms of the GNU General Public License.
+For more information about these matters, see the files named COPYING.
+Author: Paul Eggert <eggert@twinsun.com>'
+
+tab='  '
+nl='
+'
+
+# Parse options.
+
+# defaults
+: ${AWK=awk}
+: ${TMPDIR=/tmp}
+changelog=ChangeLog # change log file name
+datearg= # rlog date option
+hostname= # name of local host (if empty, will deduce it later)
+indent=8 # indent of log line
+length=79 # suggested max width of log line
+logins= # login names for people we know fullnames and mailaddrs of
+loginFullnameMailaddrs= # login<tab>fullname<tab>mailaddr triplets
+logTZ= # time zone for log dates (if empty, use local time)
+recursive= # t if we want recursive rlog
+revision= # t if we want revision numbers
+rlog_options= # options to pass to rlog
+tabwidth=8 # width of horizontal tab
+
+while :
+do
+       case $1 in
+       -c)     changelog=${2?}; shift;;
+       -i)     indent=${2?}; shift;;
+       -h)     hostname=${2?}; shift;;
+       -l)     length=${2?}; shift;;
+       -[nu])  # -n is obsolescent; it is replaced by -u.
+               case $1 in
+               -n)     case ${2?}${3?}${4?} in
+                       *"$tab"* | *"$nl"*)
+                               echo >&2 "$0: -n '$2' '$3' '$4': tabs, newlines not allowed"
+                               exit 1
+                       esac
+                       loginFullnameMailaddrs=$loginFullnameMailaddrs$nl$2$tab$3$tab$4
+                       shift; shift; shift;;
+               -u)
+                       # If $2 is not tab-separated, use colon for separator.
+                       case ${2?} in
+                       *"$nl"*)
+                               echo >&2 "$0: -u '$2': newlines not allowed"
+                               exit 1;;
+                       *"$tab"*)
+                               t=$tab;;
+                       *)
+                               t=:
+                       esac
+                       case $2 in
+                       *"$t"*"$t"*"$t"*)
+                               echo >&2 "$0: -u '$2': too many fields"
+                               exit 1;;
+                       *"$t"*"$t"*)
+                               ;;
+                       *)
+                               echo >&2 "$0: -u '$2': not enough fields"
+                               exit 1
+                       esac
+                       loginFullnameMailaddrs=$loginFullnameMailaddrs$nl$2
+                       shift
+               esac
+               logins=$logins$nl$login
+               ;;
+       -r)     rlog_options=$rlog_options$nl${2?}; shift;;
+       -R)     recursive=t;;
+       -t)     tabwidth=${2?}; shift;;
+       -v)     revision=t;;
+       --version)
+               set $Id
+               rcs2logVersion=$3
+               echo >&2 "rcs2log (GNU Emacs) $rcs2logVersion$nl$Copyright"
+               exit 0;;
+       -*)     echo >&2 "Usage: $0 [OPTION]... [FILE ...]$nl$Help"
+               case $1 in
+               --help) exit 0;;
+               *) exit 1
+               esac;;
+       *)      break
+       esac
+       shift
+done
+
+month_data='
+       m[0]="Jan"; m[1]="Feb"; m[2]="Mar"
+       m[3]="Apr"; m[4]="May"; m[5]="Jun"
+       m[6]="Jul"; m[7]="Aug"; m[8]="Sep"
+       m[9]="Oct"; m[10]="Nov"; m[11]="Dec"
+'
+
+
+# Put rlog output into $rlogout.
+
+# If no rlog options are given,
+# log the revisions checked in since the first ChangeLog entry.
+# Since ChangeLog is only by date, some of these revisions may be duplicates of
+# what's already in ChangeLog; it's the user's responsibility to remove them.
+case $rlog_options in
+'')
+       if test -s "$changelog"
+       then
+               e='
+                       /^[0-9]+-[0-9][0-9]-[0-9][0-9]/{
+                               # ISO 8601 date
+                               print $1
+                               exit
+                       }
+                       /^... ... [ 0-9][0-9] [ 0-9][0-9]:[0-9][0-9]:[0-9][0-9] [0-9]+ /{
+                               # old-fashioned date and time (Emacs 19.31 and earlier)
+                               '"$month_data"'
+                               year = $5
+                               for (i=0; i<=11; i++) if (m[i] == $2) break
+                               dd = $3
+                               printf "%d-%02d-%02d\n", year, i+1, dd
+                               exit
+                       }
+               '
+               d=`$AWK "$e" <"$changelog"` || exit
+               case $d in
+               ?*) datearg="-d>$d"
+               esac
+       fi
+esac
+
+# Use TZ specified by ChangeLog local variable, if any.
+if test -s "$changelog"
+then
+       extractTZ='
+               /^.*change-log-time-zone-rule['"$tab"' ]*:['"$tab"' ]*"\([^"]*\)".*/{
+                       s//\1/; p; q
+               }
+               /^.*change-log-time-zone-rule['"$tab"' ]*:['"$tab"' ]*t.*/{
+                       s//UTC0/; p; q
+               }
+       '
+       logTZ=`tail "$changelog" | sed -n "$extractTZ"`
+       case $logTZ in
+       ?*) TZ=$logTZ; export TZ
+       esac
+fi
+
+# If CVS is in use, examine its repository, not the normal RCS files.
+if test ! -f CVS/Repository
+then
+       rlog=rlog
+       repository=
+else
+       rlog='cvs -q log'
+       repository=`sed 1q <CVS/Repository` || exit
+       test ! -f CVS/Root || CVSROOT=`cat <CVS/Root` || exit
+       case $CVSROOT in
+       *:/*)
+               # remote repository
+               ;;
+       *)
+               # local repository
+               case $repository in
+               /*) ;;
+               *) repository=${CVSROOT?}/$repository
+               esac
+               if test ! -d "$repository"
+               then
+                       echo >&2 "$0: $repository: bad repository (see CVS/Repository)"
+                       exit 1
+               fi
+       esac
+fi
+
+# Use $rlog's -zLT option, if $rlog supports it.
+case `$rlog -zLT 2>&1` in
+*' option'*) ;;
+*) rlog_options=-zLT$nl$rlog_options
+esac
+
+# With no arguments, examine all files under the RCS directory.
+case $# in
+0)
+       case $repository in
+       '')
+               oldIFS=$IFS
+               IFS=$nl
+               case $recursive in
+               t)
+                       RCSdirs=`find . -name RCS -type d -print`
+                       filesFromRCSfiles='s|,v$||; s|/RCS/|/|; s|^\./||'
+                       files=`
+                               {
+                                       case $RCSdirs in
+                                       ?*) find $RCSdirs \
+                                                       -type f \
+                                                       ! -name '*_' \
+                                                       ! -name ',*,' \
+                                                       ! -name '.*_' \
+                                                       ! -name .rcsfreeze.log \
+                                                       ! -name .rcsfreeze.ver \
+                                                       -print
+                                       esac
+                                       find . -name '*,v' -print
+                               } |
+                               sort -u |
+                               sed "$filesFromRCSfiles"
+                       `;;
+               *)
+                       files=
+                       for file in RCS/.* RCS/* .*,v *,v
+                       do
+                               case $file in
+                               RCS/. | RCS/.. | RCS/,*, | RCS/*_) continue;;
+                               RCS/.rcsfreeze.log | RCS/.rcsfreeze.ver) continue;;
+                               RCS/.\* | RCS/\* | .\*,v | \*,v) test -f "$file" || continue
+                               esac
+                               files=$files$nl$file
+                       done
+                       case $files in
+                       '') exit 0
+                       esac
+               esac
+               set x $files
+               shift
+               IFS=$oldIFS
+       esac
+esac
+
+llogout=$TMPDIR/rcs2log$$l
+rlogout=$TMPDIR/rcs2log$$r
+trap exit 1 2 13 15
+trap "rm -f $llogout $rlogout; exit 1" 0
+
+case $datearg in
+?*) $rlog $rlog_options "$datearg" ${1+"$@"} >$rlogout;;
+'') $rlog $rlog_options ${1+"$@"} >$rlogout
+esac || exit
+
+
+# Get the full name of each author the logs mention, and set initialize_fullname
+# to awk code that initializes the `fullname' awk associative array.
+# Warning: foreign authors (i.e. not known in the passwd file) are mishandled;
+# you have to fix the resulting output by hand.
+
+initialize_fullname=
+initialize_mailaddr=
+
+case $loginFullnameMailaddrs in
+?*)
+       case $loginFullnameMailaddrs in
+       *\"* | *\\*)
+               sed 's/["\\]/\\&/g' >$llogout <<EOF || exit
+$loginFullnameMailaddrs
+EOF
+               loginFullnameMailaddrs=`cat $llogout`
+       esac
+
+       oldIFS=$IFS
+       IFS=$nl
+       for loginFullnameMailaddr in $loginFullnameMailaddrs
+       do
+               case $loginFullnameMailaddr in
+               *"$tab"*) IFS=$tab;;
+               *) IFS=:
+               esac
+               set x $loginFullnameMailaddr
+               login=$2
+               fullname=$3
+               mailaddr=$4
+               initialize_fullname="$initialize_fullname
+                       fullname[\"$login\"] = \"$fullname\""
+               initialize_mailaddr="$initialize_mailaddr
+                       mailaddr[\"$login\"] = \"$mailaddr\""
+       done
+       IFS=$oldIFS
+esac
+
+case $llogout in
+?*) sort -u -o $llogout <<EOF || exit
+$logins
+EOF
+esac
+output_authors='/^date: / {
+       if ($2 ~ /^[0-9]*[-\/][0-9][0-9][-\/][0-9][0-9]$/ && $3 ~ /^[0-9][0-9]:[0-9][0-9]:[0-9][0-9][-+0-9:]*;$/ && $4 == "author:" && $5 ~ /^[^;]*;$/) {
+               print substr($5, 1, length($5)-1)
+       }
+}'
+authors=`
+       $AWK "$output_authors" <$rlogout |
+       case $llogout in
+       '') sort -u;;
+       ?*) sort -u | comm -23 - $llogout
+       esac
+`
+case $authors in
+?*)
+       cat >$llogout <<EOF || exit
+$authors
+EOF
+       initialize_author_script='s/["\\]/\\&/g; s/.*/author[\"&\"] = 1/'
+       initialize_author=`sed -e "$initialize_author_script" <$llogout`
+       awkscript='
+               BEGIN {
+                       alphabet = "abcdefghijklmnopqrstuvwxyz"
+                       ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+                       '"$initialize_author"'
+               }
+               {
+                       if (author[$1]) {
+                               fullname = $5
+                               if (fullname ~ /[0-9]+-[^(]*\([0-9]+\)$/) {
+                                       # Remove the junk from fullnames like "0000-Admin(0000)".
+                                       fullname = substr(fullname, index(fullname, "-") + 1)
+                                       fullname = substr(fullname, 1, index(fullname, "(") - 1)
+                               }
+                               if (fullname ~ /,[^ ]/) {
+                                       # Some sites put comma-separated junk after the fullname.
+                                       # Remove it, but leave "Bill Gates, Jr" alone.
+                                       fullname = substr(fullname, 1, index(fullname, ",") - 1)
+                               }
+                               abbr = index(fullname, "&")
+                               if (abbr) {
+                                       a = substr($1, 1, 1)
+                                       A = a
+                                       i = index(alphabet, a)
+                                       if (i) A = substr(ALPHABET, i, 1)
+                                       fullname = substr(fullname, 1, abbr-1) A substr($1, 2) substr(fullname, abbr+1)
+                               }
+
+                               # Quote quotes and backslashes properly in full names.
+                               # Do not use gsub; traditional awk lacks it.
+                               quoted = ""
+                               rest = fullname
+                               for (;;) {
+                                       p = index(rest, "\\")
+                                       q = index(rest, "\"")
+                                       if (p) {
+                                               if (q && q<p) p = q
+                                       } else {
+                                               if (!q) break
+                                               p = q
+                                       }
+                                       quoted = quoted substr(rest, 1, p-1) "\\" substr(rest, p, 1)
+                                       rest = substr(rest, p+1)
+                               }
+
+                               printf "fullname[\"%s\"] = \"%s%s\"\n", $1, quoted, rest
+                               author[$1] = 0
+                       }
+               }
+       '
+
+       initialize_fullname=`
+               (
+                       cat /etc/passwd
+                       for author in $authors
+                       do nismatch $author passwd.org_dir
+                       done
+                       ypmatch $authors passwd
+               ) 2>/dev/null |
+               $AWK -F: "$awkscript"
+       `$initialize_fullname
+esac
+
+
+# Function to print a single log line.
+# We don't use awk functions, to stay compatible with old awk versions.
+# `Log' is the log message (with \n replaced by \r).
+# `files' contains the affected files.
+printlogline='{
+
+       # Following the GNU coding standards, rewrite
+       #       * file: (function): comment
+       # to
+       #       * file (function): comment
+       if (Log ~ /^\([^)]*\): /) {
+               i = index(Log, ")")
+               files = files " " substr(Log, 1, i)
+               Log = substr(Log, i+3)
+       }
+
+       # If "label: comment" is too long, break the line after the ":".
+       sep = " "
+       if ('"$length"' <= '"$indent"' + 1 + length(files) + index(Log, CR)) sep = "\n" indent_string
+
+       # Print the label.
+       printf "%s*%s:", indent_string, files
+
+       # Print each line of the log, transliterating \r to \n.
+       while ((i = index(Log, CR)) != 0) {
+               logline = substr(Log, 1, i-1)
+               if (logline ~ /[^'"$tab"' ]/) {
+                       printf "%s%s\n", sep, logline
+               } else {
+                       print ""
+               }
+               sep = indent_string
+               Log = substr(Log, i+1)
+       }
+}'
+
+# Pattern to match the `revision' line of rlog output.
+rlog_revision_pattern='^revision [0-9]+\.[0-9]+(\.[0-9]+\.[0-9]+)*(['"$tab"' ]+locked by: [^'"$tab"' $,.0-9:;@]*[^'"$tab"' $,:;@][^'"$tab"' $,.0-9:;@]*;)?['"$tab"' ]*$'
+
+case $hostname in
+'')
+       hostname=`(
+               hostname || uname -n || uuname -l || cat /etc/whoami
+       ) 2>/dev/null` || {
+               echo >&2 "$0: cannot deduce hostname"
+               exit 1
+       }
+
+       case $hostname in
+       *.*) ;;
+       *)
+               domainname=`(domainname) 2>/dev/null` &&
+               case $domainname in
+               *.*) hostname=$hostname.$domainname
+               esac
+       esac
+esac
+
+
+# Process the rlog output, generating ChangeLog style entries.
+
+# First, reformat the rlog output so that each line contains one log entry.
+# Transliterate \n to \r so that multiline entries fit on a single line.
+# Discard irrelevant rlog output.
+$AWK <$rlogout '
+       BEGIN { repository = "'"$repository"'" }
+       /^RCS file:/ {
+               if (repository != "") {
+                       filename = $3
+                       if (substr(filename, 1, length(repository) + 1) == repository "/") {
+                               filename = substr(filename, length(repository) + 2)
+                       }
+                       if (filename ~ /,v$/) {
+                               filename = substr(filename, 1, length(filename) - 2)
+                       }
+                       if (filename ~ /(^|\/)Attic\/[^\/]*$/) {
+                               i = length(filename)
+                               while (substr(filename, i, 1) != "/") i--
+                               filename = substr(filename, 1, i - 6) substr(filename, i + 1)
+                       }
+               }
+               rev = "?"
+       }
+       /^Working file:/ { if (repository == "") filename = $3 }
+       /'"$rlog_revision_pattern"'/, /^(-----------*|===========*)$/ {
+               if ($0 ~ /'"$rlog_revision_pattern"'/) {
+                       rev = $2
+                       next
+               }
+               if ($0 ~ /^date: [0-9][- +\/0-9:]*;/) {
+                       date = $2
+                       if (date ~ /\//) {
+                               # This is a traditional RCS format date YYYY/MM/DD.
+                               # Replace "/"s with "-"s to get ISO format.
+                               newdate = ""
+                               while ((i = index(date, "/")) != 0) {
+                                       newdate = newdate substr(date, 1, i-1) "-"
+                                       date = substr(date, i+1)
+                               }
+                               date = newdate date
+                       }
+                       time = substr($3, 1, length($3) - 1)
+                       author = substr($5, 1, length($5)-1)
+                       printf "%s %s %s %s %s %c", filename, rev, date, time, author, 13
+                       rev = "?"
+                       next
+               }
+               if ($0 ~ /^branches: /) { next }
+               if ($0 ~ /^(-----------*|===========*)$/) { print ""; next }
+               if ($0 == "Initial revision" || $0 ~ /^file .+ was initially added on branch .+\.$/) {
+                       $0 = "New file."
+        }
+               printf "%s%c", $0, 13
+       }
+' |
+
+# Now each line is of the form
+# FILENAME REVISION YYYY-MM-DD HH:MM:SS[+-TIMEZONE] AUTHOR \rLOG
+#      where \r stands for a carriage return,
+#      and each line of the log is terminated by \r instead of \n.
+# Sort the log entries, first by date+time (in reverse order),
+# then by author, then by log entry, and finally by file name and revision
+# (just in case).
+sort +2 -4r +4 +0 |
+
+# Finally, reformat the sorted log entries.
+$AWK '
+       BEGIN {
+               logTZ = "'"$logTZ"'"
+               revision = "'"$revision"'"
+
+               # Some awk variants do not understand "\r" or "\013", so we have to
+               # put a carriage return directly in the file.
+               CR="\r" # <-- There is a single CR between the " chars here.
+
+               # Initialize the fullname and mailaddr associative arrays.
+               '"$initialize_fullname"'
+               '"$initialize_mailaddr"'
+
+               # Initialize indent string.
+               indent_string = ""
+               i = '"$indent"'
+               if (0 < '"$tabwidth"')
+                       for (;  '"$tabwidth"' <= i;  i -= '"$tabwidth"')
+                               indent_string = indent_string "\t"
+               while (1 <= i--)
+                       indent_string = indent_string " "
+       }
+
+       {
+               newlog = substr($0, 1 + index($0, CR))
+
+               # Ignore log entries prefixed by "#".
+               if (newlog ~ /^#/) { next }
+
+               if (Log != newlog || date != $3 || author != $5) {
+
+                       # The previous log and this log differ.
+
+                       # Print the old log.
+                       if (date != "") '"$printlogline"'
+
+                       # Logs that begin with "{clumpname} " should be grouped together,
+                       # and the clumpname should be removed.
+                       # Extract the new clumpname from the log header,
+                       # and use it to decide whether to output a blank line.
+                       newclumpname = ""
+                       sep = "\n"
+                       if (date == "") sep = ""
+                       if (newlog ~ /^\{[^'"$tab"' }]*}['"$tab"' ]/) {
+                               i = index(newlog, "}")
+                               newclumpname = substr(newlog, 1, i)
+                               while (substr(newlog, i+1) ~ /^['"$tab"' ]/) i++
+                               newlog = substr(newlog, i+1)
+                               if (clumpname == newclumpname) sep = ""
+                       }
+                       printf sep
+                       clumpname = newclumpname
+
+                       # Get ready for the next log.
+                       Log = newlog
+                       if (files != "")
+                               for (i in filesknown)
+                                       filesknown[i] = 0
+                       files = ""
+               }
+               if (date != $3  ||  author != $5) {
+                       # The previous date+author and this date+author differ.
+                       # Print the new one.
+                       date = $3
+                       time = $4
+                       author = $5
+
+                       zone = ""
+                       if (logTZ && ((i = index(time, "-")) || (i = index(time, "+"))))
+                               zone = " " substr(time, i)
+
+                       # Print "date[ timezone]  fullname  <email address>".
+                       # Get fullname and email address from associative arrays;
+                       # default to author and author@hostname if not in arrays.
+                       if (fullname[author])
+                               auth = fullname[author]
+                       else
+                               auth = author
+                       printf "%s%s  %s  ", date, zone, auth
+                       if (mailaddr[author])
+                               printf "<%s>\n\n", mailaddr[author]
+                       else
+                               printf "<%s@%s>\n\n", author, "'"$hostname"'"
+               }
+               if (! filesknown[$1]) {
+                       filesknown[$1] = 1
+                       if (files == "") files = " " $1
+                       else files = files ", " $1
+                       if (revision && $2 != "?") files = files " " $2
+               }
+       }
+       END {
+               # Print the last log.
+               if (date != "") {
+                       '"$printlogline"'
+                       printf "\n"
+               }
+       }
+' &&
+
+
+# Exit successfully.
+
+exec rm -f $llogout $rlogout
+
+# Local Variables:
+# tab-width:4
+# End:
diff --git a/lib-src/run.c b/lib-src/run.c
new file mode 100644 (file)
index 0000000..f3830ed
--- /dev/null
@@ -0,0 +1,712 @@
+/* run -- Wrapper program for console mode programs under Windows(TM)
+ * Copyright (C) 1998  Charles S. Wilson
+ *
+ * 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 2
+ * of the License, 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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ */
+
+/*
+ * This program is based on the runemacs.c distributed with XEmacs 21.0
+ *
+ * Simple program to start gnu-win32 X11 programs (and native XEmacs) 
+ * with its console window hidden.
+ *
+ * This program is provided purely for convenience, since most users will
+ * use XEmacs in windowing (GUI) mode, and will not want to have an extra
+ * console window lying around. Ditto for desktop shortcuts to gnu-win32 
+ * X11 executables.
+ */
+
+
+#define WIN32
+
+#include <windows.h>
+#include <string.h>
+#include <malloc.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+
+#include "run.h"
+
+#if defined(__CYGWIN__)
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/cygwin.h>
+ #include <sys/unistd.h>
+WinMainCRTStartup() { mainCRTStartup(); }
+#else
+ #include <direct.h>
+#endif
+
+
+char buffer[1024];
+
+int WINAPI
+WinMain (HINSTANCE hSelf, HINSTANCE hPrev, LPSTR cmdline, int nShow)
+{
+   int wait_for_child = FALSE;
+   int compact_invocation = FALSE;
+   DWORD ret_code = 0;
+
+
+   char execname[FILENAME_MAX];
+   char execpath[MAX_PATH];
+   char* argv[MAX_ARGS+1]; /* leave extra slot for compact_invocation argv[0] */
+   int argc;
+   int i,j;
+   char exec[MAX_PATH + FILENAME_MAX + 100];
+   char cmdline2[MAX_ARGS * MAX_PATH];
+
+   compact_invocation = get_exec_name_and_path(execname,execpath);
+
+   if (compact_invocation)
+   {
+      argv[0] = execname;
+      argc = parse_cmdline_to_arg_array(&(argv[1]),cmdline);
+      argc++;
+   }
+   else
+   {
+      argc = parse_cmdline_to_arg_array(argv,cmdline);
+      if (argc >= 1)
+         strcpy(execname,argv[0]);
+   }
+   /* at this point, execpath is defined, as are argv[] and execname */   
+#ifdef DEBUG
+   j = sprintf(buffer,"\nexecname : %s\nexecpath : %s\n",execname,execpath);
+   for (i = 0; i < argc; i++)
+      j += sprintf(buffer+j,"argv[%d]\t: %s\n",i,argv[i]);
+   Trace((buffer));
+#endif
+
+   if (execname == NULL)
+      error("you must supply a program name to run");
+
+#if defined(__CYGWIN__)
+   /* this insures that we search for symlinks before .exe's */
+   if (compact_invocation)
+      strip_exe(execname);
+#endif
+
+   process_execname(exec,execname,execpath);
+   Trace(("exec\t%s\nexecname\t%s\nexecpath\t%s\n",
+         exec,execname,execpath));
+
+   wait_for_child = build_cmdline(cmdline2,exec,argc,argv);
+   Trace((cmdline2));
+
+   xemacs_special(exec);
+   ret_code = start_child(cmdline2,wait_for_child);
+   if (compact_invocation)
+      for (i = 1; i < argc; i++) // argv[0] was not malloc'ed
+         free(argv[i]);
+   else
+      for (i = 0; i < argc; i++)
+         free(argv[i]);
+   return (int) ret_code;
+}
+int start_child(char* cmdline, int wait_for_child)
+{
+   STARTUPINFO start;
+   SECURITY_ATTRIBUTES sec_attrs;
+   SECURITY_DESCRIPTOR sec_desc;
+   PROCESS_INFORMATION child;
+   int retval;
+
+   memset (&start, 0, sizeof (start));
+   start.cb = sizeof (start);
+   start.dwFlags = STARTF_USESHOWWINDOW;
+   start.wShowWindow = SW_HIDE;
+      
+   sec_attrs.nLength = sizeof (sec_attrs);
+   sec_attrs.lpSecurityDescriptor = NULL;
+   sec_attrs.bInheritHandle = FALSE;
+
+   if (CreateProcess (NULL, cmdline, &sec_attrs, NULL, TRUE, 0,
+                      NULL, NULL, &start, &child))
+   {
+      if (wait_for_child)
+      {
+         WaitForSingleObject (child.hProcess, INFINITE);
+         GetExitCodeProcess (child.hProcess, &retval);
+      }
+      CloseHandle (child.hThread);
+      CloseHandle (child.hProcess);
+   }
+   else
+      error("could not start %s",cmdline);
+   return retval;
+}
+void xemacs_special(char* exec)
+{
+  /*
+   * if we're trying to run xemacs, AND this file was in %emacs_dir%\bin,
+   * then set emacs_dir environment variable 
+   */
+   char* p;
+   char* p2;
+   char exec2[MAX_PATH + FILENAME_MAX + 100];
+   char tmp[MAX_PATH + FILENAME_MAX + 100];
+   strcpy(exec2,exec);
+   /* this depends on short-circuit evaluation */
+   if ( ((p = strrchr(exec2,'\\')) && stricmp(p,"\\xemacs") == 0) ||
+        ((p = strrchr(exec2,'/')) && stricmp(p,"/xemacs") == 0) ||
+        ((p = strrchr(exec2,'\\')) && stricmp(p,"\\xemacs.exe") == 0) ||
+        ((p = strrchr(exec2,'/')) && stricmp(p,"/xemacs.exe") == 0) )
+   {
+      if ( ((p2 = strrchr(p, '\\')) && stricmp(p2, "\\bin") == 0) ||
+           ((p2 = strrchr(p, '/')) && stricmp(p2, "/bin") == 0) )
+      {
+         *p2 = '\0';   
+#if defined(__CYGWIN__)
+         CYGWIN_CONV_TO_POSIX_PATH((exec2,tmp));
+         strcpy(exec2,tmp);
+#else /* NATIVE xemacs DOS-style paths with forward slashes */
+         for (p = exec2; *p; p++)
+            if (*p == '\\') *p = '/';
+#endif
+         SetEnvironmentVariable ("emacs_dir", exec2);
+      }
+   }
+}
+int build_cmdline(char* new_cmdline, char* exec, int argc, char* argv[])
+{
+   int retval = FALSE;
+   int first_arg = 1;
+   int i;
+   int char_cnt = 0;
+   /*
+    * look for "-wait" as first true argument; we'll apply that ourselves
+    */
+   if ((argc >= 2) && (stricmp(argv[1],"-wait") == 0))
+   {
+      retval = TRUE;
+      first_arg++;
+   }
+
+   char_cnt = strlen(exec);
+   for (i = first_arg; i < argc; i++)
+      char_cnt += strlen(argv[i]);
+   if (char_cnt > MAX_ARGS*MAX_PATH) /* then we ran out of room */
+      error("command line too long -\n%s",new_cmdline);
+   
+   strcpy(new_cmdline,exec);
+   for (i = first_arg; i < argc; i++)
+   {
+      strcat(new_cmdline," ");
+      strcat(new_cmdline,argv[i]);
+   }
+   return retval;
+}
+/* process exec_arg : if it
+ * NATIVE:
+ *  1) starts with '\\' or '/', it's a root-path and leave it alone
+ *  2) starts with 'x:\\' or 'x:/', it's a root-path and leave it alone
+ *  3) starts with '.\\' or './', two possible meanings:
+ *       1) exec is in the current directory
+ *       2) exec in same directory as this program
+ *  4) otherwise, search path (and _prepend_ "." to the path!!!)
+ *  5) convert all '/' to '\\'
+ * CYGWIN
+ *  1) starts with '\\' or '/', it's a root-path and leave it alone
+ *  2) starts with 'x:\\' or 'x:/', it's a root-path and leave it alone
+ *  3) starts with '.\\' or './', two possible meanings:
+ *       1) exec is in the current directory
+ *       2) exec in same directory as this program
+ *  4) otherwise, search path (and _prepend_ "." to the path!!!)
+ *  5) convert to cygwin-style path to resolve symlinks within the pathspec
+ *  6) check filename: if it's a symlink, resolve it by peeking inside
+ *  7) convert to win32-style path+filename since we're using Windows 
+ *       createProcess() to launch
+ */
+void process_execname(char *exec, const char* execname,const char* execpath )
+{
+   char* orig_pathlist;
+   char* pathlist;
+   char exec_tmp[MAX_PATH + FILENAME_MAX + 100];
+   char exec_tmp2[MAX_PATH + FILENAME_MAX + 100];
+   char buf[MAX_PATH + FILENAME_MAX + 100];
+   int i,j;
+
+   int len = 0;
+   /* 
+    * STARTS WITH / or \ 
+    * execpath NOT used
+    */
+   if ((execname[0] == '\\') || (execname[0] == '/'))
+   {
+#if defined(__CYGWIN__)
+      strcpy(exec_tmp,execname);
+#else    
+      exec_tmp[0] = ((char) (_getdrive() + ((int) 'A') - 1));
+      exec_tmp[1] = ':';
+      exec_tmp[2] = '\0';
+      strcat(exec_tmp,execname);
+#endif
+      Trace(("/ -\nexec_tmp\t%s\nexecname\t%s\nexecpath\t%s\n",
+             exec_tmp,execname,execpath));
+      if (! fileExistsMulti(exec_tmp2,NULL,exec_tmp,exts,NUM_EXTENSIONS) )
+      {
+          j = 0;
+          for (i = 0; i < NUM_EXTENSIONS; i++)
+              j += sprintf(buf + j," [%d]: %s\n",i+1,exts[i]);
+          error("Couldn't locate %s\nI tried appending the following "
+                "extensions: \n%s",exec_tmp,buf);
+      }
+      Trace((exec_tmp2));
+   }
+   /* 
+    * STARTS WITH x:\ or x:/
+    * execpath NOT used
+    */
+    else if ((strlen(execname) > 3) && // avoid boundary errors
+       (execname[1] == ':') &&
+       ((execname[2] == '\\') || (execname[2] == '/')))
+   {
+      strcpy(exec_tmp,execname);       
+      Trace(("x: -\nexec_tmp\t%s\nexecname\t%s\nexecpath\t%s\n",
+             exec_tmp,execname,execpath));
+      if (! fileExistsMulti(exec_tmp2,NULL,exec_tmp,exts,NUM_EXTENSIONS) )
+      {
+          j = 0;
+          for (i = 0; i < NUM_EXTENSIONS; i++)
+              j += sprintf(buf + j," [%d]: %s\n",i+1,exts[i]);
+          error("Couldn't locate %s\nI tried appending the following "
+                "extensions: \n%s",exec_tmp,buf);
+      }
+      Trace((exec_tmp2));
+   }
+   /* 
+    * STARTS WITH ./ or .\
+    */
+   else if ((execname[0] == '.') &&
+            ((execname[1] == '\\') || (execname[1] == '/')))
+   {
+      if (((char*) getcwd(exec_tmp,MAX_PATH))==NULL)
+         error("can't find current working directory");
+      if (! fileExistsMulti(exec_tmp2,exec_tmp,&(execname[2]),
+                            exts,NUM_EXTENSIONS) )
+          if (! fileExistsMulti(exec_tmp2,execpath,&(execname[2]),
+                                exts,NUM_EXTENSIONS) )
+          {
+              j = 0;
+              for (i = 0; i < NUM_EXTENSIONS; i++)
+                  j += sprintf(buf + j," [%d]: %s\n",i+1,exts[i]);
+              error("Couldn't locate %s\n"
+                    "I looked in the following directories:\n [1]: %s\n [2]: %s\n"
+                    "I also tried appending the following "
+                    "extensions: \n%s",execname,exec_tmp,execpath,buf);
+          }
+      Trace((exec_tmp2));
+   }
+   /*
+    * OTHERWISE, SEARCH PATH (prepend '.' and run.exe's directory)
+    * can't use fileExistsMulti because we want to search entire path
+    * for exts[0], then for exts[1], etc.
+    */
+   else
+   {
+      orig_pathlist = getenv("PATH");
+      if ((pathlist = malloc (strlen(orig_pathlist)
+                              + strlen(".") 
+                              + strlen(execpath)+ 3)) == NULL)
+         error("internal error - out of memory");
+      strcpy(pathlist,".");
+      strcat(pathlist,SEP_CHARS);
+      strcat(pathlist,execpath);
+      strcat(pathlist,SEP_CHARS);
+      strcat(pathlist,orig_pathlist);
+
+      Trace((pathlist));
+      for (i = 0; i < NUM_EXTENSIONS; i++)
+      {
+          strcpy(exec_tmp,execname);
+          strcat(exec_tmp,exts[i]);
+          pfopen(exec_tmp2,exec_tmp,pathlist);
+          if (fileExists(NULL,NULL,exec_tmp2))
+              break;
+          exec_tmp2[0] = '\0';
+      }
+      Trace(("exec_tmp\t%s\npathlist\t%s\n",exec_tmp2,pathlist));
+
+      free(pathlist);
+      if (exec_tmp2[0] == '\0')
+      {
+          j = 0;
+          for (i = 0; i < NUM_EXTENSIONS; i++)
+              j += sprintf(buf + j," [%d]: %s\n",i+1,exts[i]);
+          error("Couldn't find %s anywhere.\n"
+                "I even looked in the PATH \n"
+                "I also tried appending the following "
+                "extensions: \n%s",execname,buf);
+      }
+   }
+/*
+ * At this point, we know that exec_tmp2 contains a filename
+ * and we know that exec_tmp2 exists.
+ */
+#if defined(__CYGWIN__)
+   {
+      struct stat stbuf;
+      char sym_link_name[MAX_PATH+1];
+      char real_name[MAX_PATH+1];
+      char dummy[MAX_PATH+1];
+
+      strcpy(exec_tmp,exec_tmp2);
+
+      CYGWIN_CONV_TO_POSIX_PATH((exec_tmp,sym_link_name));
+      Trace((sym_link_name));
+      
+      if (lstat(sym_link_name, &stbuf) == 0)
+      {
+         if ((stbuf.st_mode & S_IFLNK) == S_IFLNK)
+         {
+           if (readlink(sym_link_name, real_name, sizeof(real_name)) == -1)
+               error("problem reading symbolic link for %s",exec_tmp);
+            else
+            {
+                // if realname starts with '/' it's a rootpath 
+                if (real_name[0] == '/')
+                    strcpy(exec_tmp2,real_name);
+                else // otherwise, it's relative to the symlink's location
+                {
+                   CYGWIN_SPLIT_PATH((sym_link_name,exec_tmp2,dummy));
+                   if (!endsWith(exec_tmp2,PATH_SEP_CHAR_STR))
+                      strcat(exec_tmp2,PATH_SEP_CHAR_STR);
+                   strcat(exec_tmp2,real_name);
+                }
+            }
+         }
+         else /* NOT a symlink */
+            strcpy(exec_tmp2, sym_link_name);
+      }
+      else
+         error("can't locate executable - %s",sym_link_name);
+   }
+   CYGWIN_CONV_TO_FULL_WIN32_PATH((exec_tmp2,exec));
+#else                                  
+   strcpy (exec, exec_tmp2);
+#endif  
+}
+int endsWith(const char* s1, const char* s2)
+{
+    int len1;
+    int len2;
+    int retval = FALSE;
+    len1 = strlen(s1);
+    len2 = strlen(s2);
+    if (len1 - len2 >= 0)
+        if (stricmp(&(s1[len1-len2]),s2) == 0)
+            retval = TRUE;
+    return retval;
+}void strip_exe(char* s)
+{
+   if ((strlen(s) > 4) && // long enough to have .exe extension
+       // second part not evaluated (short circuit) if exec_arg too short
+       (stricmp(&(s[strlen(s)-4]),".exe") == 0))
+      s[strlen(s)-4] = '\0';
+}
+void error(char* fmt, ...)
+{
+   char buf[4096];
+   int j;
+   va_list args;
+   va_start(args, fmt);
+   j =   sprintf(buf,    "Error: ");
+   j += vsprintf(buf + j,fmt,args);
+   j +=  sprintf(buf + j,"\n");
+   va_end(args);
+   MessageBox(NULL, buf, "Run.exe", MB_ICONSTOP);
+   exit(1);
+}
+void message(char* fmt, ...)
+{
+   char buf[10000];
+   int j;
+   va_list args;
+   va_start(args, fmt);
+   j = vsprintf(buf,fmt,args);
+   j +=  sprintf(buf + j,"\n");
+   va_end(args);
+   MessageBox(NULL, buf, "Run.exe Message", MB_ICONSTOP);
+}
+void Trace_(char* fmt, ...)
+{
+   char buf[10000];
+   int j;
+   va_list args;
+   va_start(args, fmt);
+   j = vsprintf(buf,fmt,args);
+   j +=  sprintf(buf + j,"\n");
+   va_end(args);
+   MessageBox(NULL, buf, "Run.exe DEBUG", MB_ICONSTOP);
+}
+/*
+ * Uses system info to determine the path used to invoke run
+ * Also attempts to deduce the target execname if "compact_invocation"
+ * method was used.
+ *
+ * returns TRUE if compact_invocation method was used
+ *   (and target execname was deduced successfully)
+ * otherwise returns FALSE, and execname == run or run.exe
+ */
+int get_exec_name_and_path(char* execname, char* execpath)
+{
+   char modname[MAX_PATH];
+   char* tmp_execname;
+   char* p;
+   int retval = FALSE;
+
+   if (!GetModuleFileName (NULL, modname, MAX_PATH))
+      error("internal error - can't find my own name");
+   if ((p = strrchr (modname, '\\')) == NULL)
+      error("internal error - my own name has no path\n%s",modname);
+   tmp_execname = p + 1;
+   p[0] = '\0';
+   // if invoked by a name like "runxemacs" then strip off
+   // the "run" and let "xemacs" be execname.
+   // To check for this, make that:
+   //   1) first three chars are "run"
+   //   2) but the string doesn't end there, or start ".exe"
+   // Also, set "compact_invocation" TRUE
+   if ( ((tmp_execname[0] == 'r') || (tmp_execname[0] == 'R')) &&
+        ((tmp_execname[1] == 'u') || (tmp_execname[1] == 'U')) &&
+        ((tmp_execname[2] == 'n') || (tmp_execname[2] == 'N')) &&
+        ((tmp_execname[3] != '.') && (tmp_execname[3] != '\0')) )
+   {
+      tmp_execname += 3;
+      retval = TRUE;
+   }
+   else
+      tmp_execname = NULL;
+
+   if (tmp_execname == NULL)
+      strcpy(execname,"");
+   else
+      strcpy(execname,tmp_execname);
+#if defined(__CYGWIN__)
+   CYGWIN_CONV_TO_POSIX_PATH((modname,execpath));
+#else
+   strcpy(execpath,modname);
+#endif
+   return retval;
+}
+/*
+ * works like strtok, but:
+ * double quotes (") suspends tokenizing until closing " reached
+ * CYGWIN ONLY:
+ *   additionally, backslash escapes next character, even if that
+ *   next character is a delimiter. Or a double quote.
+ *   WARNING: this means that backslash may NOT be a delimiter 
+ */
+char* my_strtok(char* s, const char* delim, char** lasts)
+{
+   char *spanp;
+   int c, sc;
+   char *tok;
+   
+   if ((s == NULL) && ((s = *lasts) == NULL))
+      return NULL;
+   /* Skip leading delimiters */
+cont:
+   c = *s++;
+   for (spanp = (char *)delim; (sc = *spanp++) != 0;) {
+      if (c == sc)
+         goto cont;
+   }
+   if (c == 0) {               /* no non-delimiter characters */
+      *lasts = NULL;
+      return (NULL);
+   }
+   tok = s - 1;
+   /*
+    * Scan token (scan for delimiters: s += strcspn(s, delim), sort of).
+    * Note that delim must have one NUL; we stop if we see that, too.
+    * If we see a double quote, continue until next double quote, then
+    *   start scanning for delimiters again.
+    * CYGWIN ONLY: if we see a backslash, just copy next character -
+    *   don't consider it as a delimiter even if it is in delim string.
+    */
+   for (;;) {
+      /* if this c is ", then scan until we find next " */
+      if (c == '\"')
+         while ((c = *s++) != '\"')
+            if (c == 0) /* oops, forgot to close the ", clean up & return */
+            {
+               s = NULL;
+               *lasts = s;
+               return (tok);
+            }
+#if defined(__CYGWIN__)
+      if (c == '\\')
+      {
+         c = *s++; /* skip the backslash */
+         if (c == 0) /* if escaped character is end-of-string, clean up & return */
+         {
+            s = NULL;
+            *lasts = s;
+            return (tok);
+         }
+         c = *s++; /* otherwise, skip the escaped character */
+      }
+#endif   
+      spanp = (char *)delim;
+      do {
+         if ((sc = *spanp++) == c) {
+            if (c == 0)
+               s = NULL;
+            else
+               s[-1] = 0;
+            *lasts = s;
+            return (tok);
+         }
+      } while (sc != 0);
+      c = *s++;
+   }
+   /* NOTREACHED */
+}
+int parse_cmdline_to_arg_array(char* argv[MAX_ARGS], char* cmdline)
+{
+   char seps[] = " \t\n";
+   char* token;
+   int argc = 0;
+   char* lasts;
+
+   token = my_strtok(cmdline, seps, &lasts);
+   while ((token != NULL) && (argc < MAX_ARGS))
+   {
+      if ((argv[argc] = malloc(strlen(token)+1)) == NULL)
+      {
+         error("internal error - out of memory");
+      }
+      strcpy(argv[argc++],token);
+      token = my_strtok(NULL,seps,&lasts);
+   }
+   if (argc >= MAX_ARGS)
+      error("too many arguments on commandline\n%s",cmdline);
+   return argc;
+}
+/* Taken from pfopen.c by David Engel (5-Jul-97).
+ * Original comments appear below. Superseded by next comment block.
+ *
+ *  Written and released to the public domain by David Engel.
+ *
+ *  This function attempts to open a file which may be in any of
+ *  several directories.  It is particularly useful for opening
+ *  configuration files.  For example, PROG.EXE can easily open
+ *  PROG.CFG (which is kept in the same directory) by executing:
+ *
+ *      cfg_file = pfopen("PROG.CFG", "r", getenv("PATH"));
+ *
+ *  NULL is returned if the file can't be opened.
+ */
+
+/*
+ * This function attempts to locate a file which may be in any of
+ * several directories. Unlike the original pfopen, it does not
+ * return a FILE pointer to the opened file, but rather returns
+ * the fully-qualified filename of the first match found. Returns
+ * empty string if not found.
+ */
+char *pfopen(char *retval, const char *name, const char *dirs)
+{
+    char *ptr;
+    char *tdirs;
+    char returnval[MAX_PATH + FILENAME_MAX + 100];
+    char *recursive_name;
+    int foundit = FALSE;
+    
+    returnval[0] = '\0';
+
+    if (dirs == NULL || dirs[0] == '\0')
+        return NULL;
+
+    if ((tdirs = malloc(strlen(dirs)+1)) == NULL)
+        return NULL;
+
+    strcpy(tdirs, dirs);
+
+    for (ptr = strtok(tdirs, SEP_CHARS); (foundit == FALSE) && ptr != NULL;
+         ptr = strtok(NULL, SEP_CHARS))
+    {
+       foundit = fileExists(returnval,ptr,name);
+    }
+
+    free(tdirs);
+    if (!foundit)
+        retval[0] = '\0';
+    else
+        strcpy(retval,returnval);
+    return retval;
+}
+int fileExistsMulti(char* fullname, const char* path, 
+                    const char* name_noext, const char* exts[],
+                    const int extcnt)
+{
+    char tryName[MAX_PATH + FILENAME_MAX];
+    int i = 0;
+    int retval = FALSE;
+    fullname[0] = '\0';
+    for (i = 0; i < extcnt; i++)
+    {
+        strcpy(tryName,name_noext);
+        strcat(tryName,exts[i]);
+        if (fileExists(fullname, path, tryName) == TRUE)
+        {
+            retval = TRUE;
+            break;
+        }
+        fullname[0] = '\0';
+    }
+    return retval;
+}
+int fileExists(char* fullname, const char* path, const char* name)
+{
+   int retval = FALSE;
+   FILE* file;
+   size_t len;
+   char work[FILENAME_MAX];
+   char work2[MAX_PATH + FILENAME_MAX + 100];
+   if (path != NULL)
+   {
+      strcpy(work, path);
+      len = strlen(work);
+      if (len && work[len-1] != '/' && work[len-1] != '\\')
+         strcat(work, PATH_SEP_CHAR_STR);
+   }
+   else
+      work[0]='\0';
+   
+   strcat(work, name);
+#if defined(__CYGWIN__)
+   CYGWIN_CONV_TO_POSIX_PATH((work, work2)); 
+#else
+   strcpy(work2,work);
+#endif
+
+#ifdef DEBUGALL
+   Trace(("looking for...\t%s\n",work2));
+#endif
+
+   file = fopen(work2, "rb");
+   if (file != NULL)
+   {
+      if (fullname != NULL)
+         strcpy(fullname,work2);
+      retval = TRUE;
+      fclose(file);
+   }
+   return retval;
+}
diff --git a/lib-src/sorted-doc.c b/lib-src/sorted-doc.c
new file mode 100644 (file)
index 0000000..89ecafd
--- /dev/null
@@ -0,0 +1,270 @@
+/* Give this program DOCSTR.mm.nn as standard input
+   and it outputs to standard output
+   a file of texinfo input containing the doc strings.
+   
+   This version sorts the output by function name.
+   */
+
+/* Synched up with: FSF 19.28. */
+
+#include <../src/config.h>
+
+#include <stdio.h>
+#include <ctype.h>
+#if __STDC__ || defined(STDC_HEADERS)
+# include <stdlib.h> /* for qsort() and malloc() */
+# include <string.h>
+static void *xmalloc (int);
+# ifndef CONST
+#  define CONST const
+# endif
+#else
+extern char *malloc ();
+static void *xmalloc ();
+# ifndef CONST
+#  define CONST
+# endif
+#endif
+
+#define NUL    '\0'
+#define MARKER '\037'
+
+#define DEBUG 0
+
+typedef struct line LINE;
+
+struct line
+{
+  LINE *next;                  /* ptr to next or NULL */
+  char *line;                  /* text of the line */
+};
+
+typedef struct docstr DOCSTR;
+
+struct docstr                  /* Allocated thing for an entry. */
+{
+  DOCSTR *next;                        /* next in the chain */
+  char *name;                  /* name of the function or var */
+  LINE *first;                 /* first line of doc text. */
+  char type;                   /* 'F' for function, 'V' for variable */
+};
+
+\f
+/* Print error message.  `s1' is printf control string, `s2' is arg for it. */
+
+static void
+error (char *s1, char *s2)
+{
+  fprintf (stderr, "sorted-doc: ");
+  fprintf (stderr, s1, s2);
+  fprintf (stderr, "\n");
+}
+
+/* Print error message and exit.  */
+
+static void
+fatal (char *s1, char *s2)
+{
+  error (s1, s2);
+  exit (1);
+}
+
+/* Like malloc but get fatal error if memory is exhausted.  */
+
+static void *
+xmalloc (int size)
+{
+  char *result = malloc ((unsigned)size);
+  if (result == NULL)
+    fatal ("%s", "virtual memory exhausted");
+  return result;
+}
+
+static char *
+strsav (char *str)
+{
+  char *buf = xmalloc (strlen (str) + 1);
+  (void) strcpy (buf, str);
+  return (buf);
+}
+
+/* Comparison function for qsort to call.  */
+
+static int
+cmpdoc (DOCSTR **a, DOCSTR **b)
+{
+  register int val = strcmp ((*a)->name, (*b)->name);
+  if (val) return val;
+  return (*a)->type - (*b)->type;
+}
+
+
+enum state
+{
+  WAITING, BEG_NAME, NAME_GET, BEG_DESC, DESC_GET
+};
+
+CONST char *states[] =
+{
+  "WAITING", "BEG_NAME", "NAME_GET", "BEG_DESC", "DESC_GET"
+};
+    
+int
+main (int argc, char *argv[])
+{
+  register DOCSTR *dp = NULL;  /* allocated DOCSTR */
+  register LINE *lp = NULL;    /* allocated line */
+  register char *bp = 0;       /* ptr inside line buffer */
+  /* int notfirst = 0;         / * set after read something */
+  register enum state state = WAITING; /* state at start */
+  int cnt = 0;                 /* number of DOCSTRs read */
+
+  DOCSTR *docs = 0;            /* chain of allocated DOCSTRS */
+  char buf[512];               /* line buffer */
+    
+  while (1)                    /* process one char at a time */
+    {
+      /* this char from the DOCSTR file */
+      register int ch = getchar ();
+
+      /* Beginnings */
+
+      if (state == WAITING)
+       {
+         if (ch == MARKER)
+           state = BEG_NAME;
+       }
+      else if (state == BEG_NAME)
+       {
+         cnt++;
+         if (dp == NULL)       /* first dp allocated */
+           {
+             docs = dp = (DOCSTR*) xmalloc (sizeof (DOCSTR));
+           }
+         else                  /* all the rest */
+           {
+             dp->next = (DOCSTR*) xmalloc (sizeof (DOCSTR));
+             dp = dp->next;
+           }
+         lp = NULL;
+         dp->next = NULL;
+         bp = buf;
+         state = NAME_GET;
+         /* Record whether function or variable.  */
+         dp->type = ch;
+         ch = getchar ();
+       }
+      else if (state == BEG_DESC)
+       {
+         if (lp == NULL)       /* first line for dp */
+           {
+             dp->first = lp = (LINE*)xmalloc (sizeof (LINE));
+           }
+         else                  /* continuing lines */
+           {
+             lp->next = (LINE*)xmalloc (sizeof (LINE));
+             lp = lp->next;
+           }
+         lp->next = NULL;
+         bp = buf;
+         state = DESC_GET;
+       }
+       
+      /* process gets */
+
+      if (state == NAME_GET || state == DESC_GET)
+       {
+         if (ch != MARKER && ch != '\n' && ch != EOF)
+           {
+             *bp++ = ch;
+           }
+         else                  /* saving and changing state */
+           {
+             *bp = NUL;
+             bp = strsav (buf);
+
+             if (state == NAME_GET)
+               dp->name = bp;
+             else
+               lp->line = bp;
+
+             bp = buf;
+             state =  (ch == MARKER) ? BEG_NAME : BEG_DESC;
+           }
+       }                       /* NAME_GET || DESC_GET */
+      if (ch == EOF)
+       break;
+    }
+
+  {
+    DOCSTR **array;
+    register int i;            /* counter */
+
+    /* build array of ptrs to DOCSTRs */
+
+    array = (DOCSTR**)xmalloc (cnt * sizeof (*array));
+    for (dp = docs, i = 0; dp != NULL ; dp = dp->next)
+      array[i++] = dp;
+
+    /* sort the array by name; within each name, by type */
+
+    qsort ((char*)array, cnt, sizeof (DOCSTR*),
+          /* was cast to (int (*)(CONST void *, CONST void *))
+             but that loses on HP because CONST_IS_LOSING. */
+          /* This one loses too: (int (*)()) */
+          /* Ok, so let's try const instead of CONST.  Fuck me!!! */
+          (int (*)(const void *, const void *))
+          cmpdoc);
+
+    /* write the output header */
+
+    printf ("\\input texinfo  @c -*-texinfo-*-\n");
+    printf ("@setfilename ../info/summary\n");
+    printf ("@settitle Command Summary for GNU Emacs\n");
+    printf ("@unnumbered Command Summary for GNU Emacs\n");
+    printf ("@table @asis\n");
+    printf ("\n");
+    printf ("@let@ITEM@item\n");
+    printf ("@def@item{@filbreak@vskip5pt@ITEM}\n");
+    printf ("@font@tensy cmsy10 scaled @magstephalf\n");
+    printf ("@font@teni cmmi10 scaled @magstephalf\n");
+    printf ("@def\\{{@tensy@char110}}\n"); /* this backslash goes with cmr10 */
+    printf ("@def|{{@tensy@char106}}\n");
+    printf ("@def@{{{@tensy@char102}}\n");
+    printf ("@def@}{{@tensy@char103}}\n");
+    printf ("@def<{{@teni@char62}}\n");
+    printf ("@def>{{@teni@char60}}\n");
+    printf ("@chardef@@64\n");
+    printf ("@catcode43=12\n");
+    printf ("@tableindent-0.2in\n");
+
+    /* print each function from the array */
+
+    for (i = 0; i < cnt; i++)
+      {
+       printf ("\n@item %s @code{%s}\n@display\n",
+               array[i]->type == 'F' ? "Function" : "Variable",
+               array[i]->name);
+
+       for (lp = array[i]->first; lp != NULL ; lp = lp->next)
+         {
+           for (bp = lp->line; *bp; bp++)
+             {
+               /* the characters "@{}" need special treatment */
+               if (*bp == '@' || *bp == '{' || *bp == '}')
+                 {
+                   putchar('@');
+                 }
+               putchar(*bp);
+             }
+           putchar ('\n');
+         }
+       printf("@end display\n");
+      }
+
+    printf ("@end table\n");
+    printf ("@bye\n");
+  }
+
+  return 0;
+}
diff --git a/lib-src/srcdir-symlink.stamp b/lib-src/srcdir-symlink.stamp
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lib-src/tcp.c b/lib-src/tcp.c
new file mode 100644 (file)
index 0000000..a2fa050
--- /dev/null
@@ -0,0 +1,236 @@
+/*
+ * TCP/IP stream emulation for GNU Emacs.
+ * Copyright (C) 1988, 1989, 1992, 1993 Free Software Foundation, Inc.
+
+ * Author: Masanobu Umeda
+ * Maintainer: umerin@mse.kyutech.ac.jp
+
+This file is part of GNU Emacs.
+
+GNU Emacs 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.
+
+GNU Emacs 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 GNU Emacs; see the file COPYING.  If not, write to
+the Free the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+
+ *
+ * Yasunari, Itoh at PFU limited contributed for Fujitsu UTS and SX/A.
+ *
+ * Thu Apr  6 13:47:37 JST 1989
+ * USG fixes by Sakaeda <saka@mickey.trad.pf.fujitsu.junet>
+ *
+ * For Fujitsu UTS compile with:
+ *     cc -O -o tcp tcp.c -DFUJITSU_UTS -lu -lsocket
+ */
+
+#include <stdio.h>
+#include <fcntl.h>
+#include <ctype.h>
+#include <sys/types.h>
+
+#ifdef FUJITSU_UTS
+#define USG
+#include <sys/ucbtypes.h>
+#include <sys/tisp/socket.h>
+#include <netdb.h>
+#include <sys/tisp/in.h>
+#else
+#include <sys/socket.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#endif
+
+#ifdef USG
+#include <sys/stat.h>
+#include <signal.h>
+#endif
+
+#ifdef USG
+int selectable = 1;
+
+sigout ()
+{
+  fcntl (fileno (stdin), F_SETFL, 0);
+  exit (-1);
+}
+#endif
+
+main (argc, argv)
+     int argc;
+     char *argv[];
+{
+  struct hostent       *host;
+  struct sockaddr_in   sockin, sockme;
+  struct servent       *serv;
+  char *hostname = NULL;
+  char *service = "nntp";
+  int  port;
+  int  readfds;
+  int   writefds;
+  int  server;                 /* NNTP Server */
+  int  emacsIn = fileno (stdin); /* Emacs intput */
+  int  emacsOut = fileno (stdout); /* Emacs output */
+  char buffer[1024];
+  int  nbuffer;                /* Number of bytes in buffer */
+  int   wret;
+  char  *retry;                        /* retry bufferp */
+  int   false = 0;             /* FALSE flag for setsockopt () */
+
+  if (argc < 2)
+    {
+      fprintf (stderr, "Usage: %s HOST [SERVICE]\n", argv[0]);
+      exit (1);
+    }
+  if (argc >= 2)
+    hostname = argv[1];
+  if (argc >= 3)
+    service = argv[2];
+
+  if ((host = gethostbyname (hostname)) == NULL)
+    {
+      perror ("gethostbyname");
+      exit (1);
+    }
+  if (isdigit (service[0]))
+    port = atoi (service);
+  else
+    {
+      serv = getservbyname (service, "tcp");
+      if (serv == NULL)
+       {
+         perror ("getservbyname");
+         exit (1);
+       }
+      port = serv->s_port;
+    }
+
+  memset (&sockin, 0, sizeof (sockin));
+  sockin.sin_family = host->h_addrtype;
+  memcpy (&sockin.sin_addr, host->h_addr, host->h_length);
+  sockin.sin_port = port;
+  if ((server = socket (AF_INET, SOCK_STREAM, 0)) < 0)
+    {
+      perror ("socket");
+      exit (1);
+    }
+  if (setsockopt (server, SOL_SOCKET, SO_REUSEADDR, &false, sizeof (false)))
+    {
+      perror ("setsockopt");
+      exit (1);
+    }
+  memset (&sockme, 0, sizeof (sockme));
+  sockme.sin_family = sockin.sin_family;
+  sockme.sin_addr.s_addr = INADDR_ANY;
+  if (bind (server, &sockme, sizeof (sockme)) < 0)
+    {
+      perror ("bind");
+      exit (1);
+    }
+  if (connect (server, &sockin, sizeof (sockin)) < 0)
+    {
+      perror ("connect");
+      close (server);
+      exit (1);
+    }
+
+#ifdef O_NDELAY
+  fcntl (server, F_SETFL, O_NDELAY);
+
+#ifdef USG
+  /* USG pipe cannot not select emacsIn */
+  {
+    struct stat statbuf;
+    fstat (emacsIn, &statbuf);
+    if (statbuf.st_mode & 010000)
+      selectable = 0;
+    if (!selectable)
+      {
+       signal (SIGINT, sigout);
+       fcntl (emacsIn, F_SETFL, O_NDELAY);
+      }
+  }
+#endif
+#endif
+
+  /* Connection established. */
+  while (1)
+    {
+      readfds = (1 << server) | (1 << emacsIn);
+      if (select (32, &readfds, NULL, NULL, (struct timeval *)NULL) == -1)
+       {
+         perror ("select");
+         exit (1);
+       }
+      if (readfds & (1 << emacsIn))
+       {
+         /* From Emacs */
+         nbuffer = read (emacsIn, buffer, sizeof buffer -1);
+
+#ifdef USG
+         if (selectable && nbuffer == 0)
+           {
+             goto finish;
+           }
+         else if (!(readfds & (1 << server)) && nbuffer == 0)
+           {
+             sleep (1);
+           }
+         else 
+#else
+           if (nbuffer == 0)
+             goto finish;
+#endif
+         for (retry = buffer; nbuffer > 0; nbuffer -= wret, retry += wret)
+           {
+             writefds = 1 << server;
+             if (select (server+1, NULL, &writefds, NULL, (struct timeval*)NULL) == -1)
+               {
+                 perror ("select");
+                 exit (1);
+               }
+             wret = write (server, retry, nbuffer);
+             if (wret < 0) goto finish;
+           }
+       }
+      if (readfds & (1 << server))
+       {
+         /* From NNTP server */
+         nbuffer = read (server, buffer, sizeof buffer -1);
+         if (nbuffer == 0)
+           goto finish;
+         for (retry = buffer; nbuffer > 0; nbuffer -= wret, retry += wret)
+           {
+             writefds = 1 << emacsOut;
+#ifdef USG
+             if (selectable)
+#endif
+               if (select (emacsOut+1, NULL, &writefds, NULL, (struct timeval*)NULL) == -1)
+                 {
+                   perror ("select");
+                   exit (1);
+                 }
+             wret = write (emacsOut, retry, nbuffer);
+             if (wret < 0) goto finish;
+           }
+       }
+    }
+
+  /* End of communication. */
+ finish:
+  close (server);
+#ifdef USG
+  if (!selectable) fcntl (emacsIn, F_SETFL, 0);
+#endif
+  close (emacsIn);
+  close (emacsOut);
+  exit (0);
+}
diff --git a/lib-src/update-autoloads.sh b/lib-src/update-autoloads.sh
new file mode 100644 (file)
index 0000000..6af202c
--- /dev/null
@@ -0,0 +1,127 @@
+#!/bin/sh
+### update-autoloads.sh --- update auto-autoloads.el as necessary
+
+# Author: Jamie Zawinski, Ben Wing, Martin Buchholz, Steve Baur
+# Maintainer: Steve Baur
+# Keywords: internal
+
+# 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; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+### Commentary:
+
+### Code:
+
+set -eu
+
+# This means we're running in a Sun workspace
+test -d ../era-specific && cd ../editor
+
+# get to the right directory
+test ! -d ./lisp -a -d ../lisp && cd ..
+if test ! -d ./lisp ; then
+       echo $0: neither ./lisp/ nor ../lisp/ exist
+       exit 1
+fi
+
+test -z "$EMACS" && EMACS="./src/xemacs"
+echo " (using $EMACS)"
+
+export EMACS
+
+REAL=`cd \`dirname $EMACS\` ; pwd | sed 's|^/tmp_mnt||'`/`basename $EMACS`
+
+echo "Rebuilding autoloads in `pwd|sed 's|^/tmp_mnt||'`"
+echo "          with $REAL..."
+
+if [ "`uname -r | sed 's/\(.\).*/\1/'`" -gt 4 ]; then
+  echon()
+  {    
+    /bin/echo $* '\c'
+  }
+else
+  echon()
+  {
+    echo -n $*
+  }
+fi
+
+# Compute patterns to ignore when searching for files
+# These directories don't have autoloads or are partially broken.
+ignore_dirs="egg eos ilisp its locale mel mu sunpro term tooltalk"
+
+# Prepare for autoloading directories with directory-specific instructions
+make_special_commands=''
+make_special () {
+       dir="$1"; shift;
+       ignore_dirs="$ignore_dirs $dir"
+       make_special_commands="$make_special_commands \
+               (cd \"lisp/$dir\" && ${MAKE:-make} EMACS=$REAL ${1+$*});"
+}
+
+# Only use Mule XEmacs to build Mule-specific autoloads & custom-loads.
+echon "Checking for Mule support..."
+lisp_prog='(princ (featurep (quote mule)))'
+mule_p="`$EMACS -batch -q -no-site-file -eval \"$lisp_prog\"`"
+if test "$mule_p" = nil ; then
+       echo No
+       ignore_dirs="$ignore_dirs mule leim language skk"
+else
+       echo Yes
+fi
+
+## AUCTeX is a Package now
+# if test "$mule_p" = nil ; then
+#      make_special auctex autoloads
+# else
+#      make_special auctex autoloads MULE_EL=tex-jp.elc
+# fi
+#make_special cc-mode autoloads
+# EFS is now packaged
+#make_special efs autoloads
+#make_special eos autoloads # EOS doesn't have custom or autoloads
+# Hyperbole is now packaged
+# make_special hyperbole autoloads
+# make_special ilisp autoloads
+# oobr is now packaged
+# make_special oobr HYPB_ELC='' autoloads
+## W3 is a package now
+##make_special w3 autoloads
+
+dirs=
+for dir in lisp/*; do
+       if test -d $dir \
+               -a $dir != lisp/CVS \
+               -a $dir != lisp/SCCS; then
+               for ignore in $ignore_dirs; do
+                       if test $dir = lisp/$ignore; then
+                               continue 2
+                       fi
+               done
+               dirs="$dirs $dir"
+       fi
+done
+
+$EMACS -batch -q -no-site-file -eval '(setq autoload-package-name "Standard")' \
+       -l autoload -f batch-update-directory lisp
+
+# set -x
+for dir in $dirs; do
+       $EMACS -batch -q -no-site-file -l autoload -f batch-update-directory $dir
+done
+
+# eval "$make_special_commands"
diff --git a/lib-src/update-custom.sh b/lib-src/update-custom.sh
new file mode 100755 (executable)
index 0000000..7e0a2ea
--- /dev/null
@@ -0,0 +1,100 @@
+#!/bin/sh
+### update-custom.sh --- update Customize group dependencies
+
+# Author: Hrvoje Niksic, based on update-autoloads.el by
+#   Jamie Zawinski, Ben Wing, Martin Buchholz, and Steve Baur
+# Maintainer: Hrvoje Niksic
+# Keywords: internal
+
+# 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; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+### Commentary:
+
+# This is much simpler than update-autoloads.el.  All we need to do is
+# compute a list of directories we want to use, and feed it to
+# Custom-make-dependencies.  End of story.
+
+### Code:
+
+set -eu
+
+# get to the right directory
+test ! -d ./lisp -a -d ../lisp && cd ..
+if test ! -d ./lisp ; then
+       echo $0: neither ./lisp/ nor ../lisp/ exist
+       exit 1
+fi
+
+test -z "$EMACS" && EMACS="./src/xemacs"
+echo " (using $EMACS)"
+
+export EMACS
+
+REAL=`cd \`dirname $EMACS\` ; pwd | sed 's|^/tmp_mnt||'`/`basename $EMACS`
+
+echo "Rebuilding custom-loads with $REAL..."
+
+if [ "`uname -r | sed 's/\(.\).*/\1/'`" -gt 4 ]; then
+  echon()
+  {    
+    /bin/echo $* '\c'
+  }
+else
+  echon()
+  {
+    echo -n $*
+  }
+fi
+
+# Compute patterns to ignore when searching for files
+# These directories don't have customizations, or are partially broken.
+# If some of the packages listed here are customized, don't forget to
+#  remove the directory!
+ignore_dirs="cl egg eos its language locale sunpro term \
+tooltalk iso electric \
+hm--html-menus gnats pcl-cvs vm"
+
+# Only use Mule XEmacs to build Mule-specific autoloads & custom-loads.
+echon "Checking for Mule support..."
+lisp_prog='(princ (featurep (quote mule)))'
+mule_p="`$EMACS -batch -q -no-site-file -eval \"$lisp_prog\"`"
+if test "$mule_p" = nil ; then
+       echo No
+       ignore_dirs="$ignore_dirs mule leim skk"
+else
+       echo Yes
+fi
+
+echon "Checking directories..."
+dirs=lisp/
+for dir in lisp/*; do
+       if test -d $dir \
+               -a $dir != lisp/CVS \
+               -a $dir != lisp/SCCS; then
+               for ignore in $ignore_dirs; do
+                       if test $dir = lisp/$ignore; then
+                               continue 2
+                       fi
+               done
+               rm -f "$dir/custom-load.elc"
+               dirs="$dirs $dir"
+       fi
+done
+echo done
+
+$EMACS -batch -q -no-site-file -l cus-dep -f Custom-make-dependencies $dirs
diff --git a/lib-src/update-elc.sh b/lib-src/update-elc.sh
new file mode 100644 (file)
index 0000000..f0cfc45
--- /dev/null
@@ -0,0 +1,183 @@
+#!/bin/sh
+# update-elc.sh --- recompile all missing or out-of-date .elc files
+
+# Author:      Jamie Zawinski, Ben Wing, Martin Buchholz
+# Maintainer:  Martin Buchholz
+# Keywords:    recompile byte-compile .el .elc
+
+# 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; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+### Commentary:
+##  Recompile all .elc files that need recompilation.  Requires a
+##  working version of "xemacs".  Correctly handles the case where the
+##  .elc files are missing; thus you can execute "rm lisp/*/*.elc"
+##  before running this script.  Run this from the parent of the
+##  "lisp" directory, or another nearby directory.
+
+set -e
+
+# Try to find the lisp directory in several places.
+# (Sun workspaces have an "editor" directory)
+for dir in  .  ..  ../..  editor  ../editor  ; do
+  if test -d $dir/lisp/. ; then cd $dir ; break ; fi
+done
+
+if test ! -d lisp/. ; then
+  echo "$0: Cannot find the \"lisp\" directory."
+  exit 1
+fi
+
+if test -z "$EMACS"; then EMACS="./src/xemacs"; fi
+export EMACS
+
+echo " (using $EMACS)"
+
+# fuckin' sysv, man...
+if [ "`uname -r | sed 's/[^0-9]*\([0-9]*\).*/\1/'`" -gt 4 ]; then
+  echon()
+  {    
+    /bin/echo $* '\c'
+  }
+else
+  echon()
+  {
+    echo -n $*
+  }
+fi
+
+REAL=`cd \`dirname $EMACS\` ; pwd | sed 's|^/tmp_mnt||'`/`basename $EMACS`
+BYTECOMP="$REAL -batch -vanilla "
+echo "Recompiling in `pwd|sed 's|^/tmp_mnt||'`"
+echo "          with $REAL..."
+
+$EMACS -batch -vanilla -l `pwd`/lisp/cleantree -f batch-remove-old-elc lisp
+
+prune_vc="( -name '.*' -o -name SCCS -o -name RCS -o -name CVS ) -prune -o"
+
+# $els  is a list of all .el  files
+# $elcs is a list of all .elc files
+els=/tmp/update-elc-1.$$ elcs=/tmp/update-elc-2.$$
+rm -f $els $elcs
+trap "rm -f $els $elcs" 0 1 2 3 15
+find lisp/. $prune_vc -name '*.el'  -print                    | sort > $els
+find lisp/. $prune_vc -name '*.elc' -print | sed 's/elc$/el/' | sort > $elcs
+
+
+echon "Deleting .elc files without .el files..."
+comm -13 $els $elcs | sed -e '\!/vm.el!d' -e 's/el$/elc/' | \
+ while read file ; do echo rm "$file" ; rm "$file" ; done
+echo done.
+
+
+# Compute patterns to ignore when searching for files
+ignore_dirs=""
+ignore_pattern=''
+
+# Only use Mule XEmacs to compile Mule-specific elisp dirs
+echon "Checking for Mule support..."
+lisp_prog='(princ (featurep (quote mule)))'
+mule_p="`$EMACS -batch -vanilla -eval \"$lisp_prog\"`"
+if test "$mule_p" = nil ; then
+       echo No
+       ignore_dirs="$ignore_dirs its egg mule language leim skk"
+       ignore_pattern='\!/tl/char-table.el$!d
+\!/tl/chartblxmas.el$!d
+\!/mu/latex-math-symbol.el$!d
+'
+else
+  echo Yes
+fi
+
+# first recompile the byte-compiler, so that the other compiles take place
+# with the latest version (assuming we're compiling the lisp dir of the emacs
+# we're running, which might not be the case, but often is.)
+#echo "Checking the byte compiler..."
+#$BYTECOMP -f batch-byte-recompile-directory lisp/bytecomp
+
+# Prepare for byte-compiling directories with directory-specific instructions
+# Not necessary any more, but I want to keep the text current to cut & paste
+# into the package lisp maintenance tree.
+#make_special_commands=''
+#make_special () {
+#  dir="$1"; shift;
+#  ignore_dirs="$ignore_dirs $dir"
+#  make_special_commands="$make_special_commands \
+#echo \"Compiling in lisp/$dir\"; \
+#(cd \"lisp/$dir\" && ${MAKE:-make} EMACS=$REAL ${1+$*}); \
+#echo \"lisp/$dir done.\";"
+#}
+
+#if test "$mule_p" != nil; then
+#      make_special skk all
+#fi
+
+## AUCTeX is a package now
+# if test "$mule_p" = nil ; then
+#      make_special auctex some
+# else
+#      make_special auctex some MULE_ELC=tex-jp.elc
+# fi
+#make_special cc-mode all
+# EFS is now packaged
+# make_special efs x20
+#make_special eos -k           # not strictly necessary...
+## make_special gnus  some     # Now this is a package.
+# hyperbole is now packaged
+# make_special hyperbole elc
+# We're not ready for the following, yet.
+#make_special ilisp XEmacsELC=custom-load.elc elc
+# ilisp is now packaged
+# make_special ilisp elc
+# oobr is now packaged
+# make_special oobr HYPB_ELC='' elc
+## W3 is a package now.
+#make_special w3 xemacs-w3
+
+for dir in $ignore_dirs ; do
+  ignore_pattern="${ignore_pattern}/\\/$dir\\//d
+/\\/$dir\$/d
+"
+done
+
+# Other special-case filenames that don't get byte-compiled
+ignore_pattern="$ignore_pattern"'
+\!/,!d
+\!/paths.el$!d
+\!/loadup.el$!d
+\!/loadup-el.el$!d
+\!/update-elc.el$!d
+\!/dumped-lisp.el$!d
+\!/make-docfile.el$!d
+\!/site-start.el$!d
+\!/site-load.el$!d
+\!/site-init.el$!d
+\!/version.el$!d
+\!/very-early-lisp.el$!d
+\!/Installation.el$!d
+'
+
+echo "Compiling files without .elc..."
+NUMTOCOMPILE=20                        # compile this many files with each invocation
+comm -23 $els $elcs | \
+ sed "$ignore_pattern" | \
+ xargs -t -n$NUMTOCOMPILE $BYTECOMP -f batch-byte-compile
+echo "Compiling files without .elc... Done"
+
+#if test "$mule_p" != nil; then
+#      eval "$make_special_commands"
+#fi
diff --git a/lib-src/vcdiff b/lib-src/vcdiff
new file mode 100755 (executable)
index 0000000..3ebee50
--- /dev/null
@@ -0,0 +1,106 @@
+#!/bin/sh
+#
+# Enhanced sccs diff utility for use with vc mode.
+# This version is more compatible with rcsdiff(1).
+#
+#      !Id: vcdiff,v 1.4 1993/12/03 09:29:18 eggert Exp !
+#
+# Modified by: vladimir@Eng.Sun.COM on 95-06-07
+# * Made sure that file arguments are specifed as s.<filename>.
+# * Switched the assignments to $f inside the 3rd and 4th case statements of
+#   the first for-loop
+# * Removed the incorrect initialization of sid1 before the first for-loop.
+#
+
+DIFF="diff"
+usage="$0: Usage: vcdiff [--brief] [-q] [-r<sid1>] [-r<sid2>] [diffopts] sccsfile..."
+
+PATH=$PATH:/usr/ccs/bin:/usr/sccs # common SCCS hangouts
+
+echo=
+sid1= sid2=
+
+for f
+do
+       case $f in
+       -*)
+               case $f in
+               --brief)
+                       DIFF=cmp;;
+               -q)
+                       echo=:;;
+               -r?*)
+                       case $sid1 in
+                       -r*)
+                               sid2=$f
+                               ;;
+                       *) 
+                               case $sid2 in
+                                 ?*) echo "$usage" >&2; exit 2 ;;
+                               esac
+                               sid1=$f
+                               ;;
+                       esac
+                       ;;
+               *)
+                       options="$options $f"
+                       ;;
+               esac
+               shift
+               ;;
+       *)
+               break
+               ;;
+       esac
+done
+
+case $# in
+0)
+       echo "$usage" >&2
+       exit 2
+esac
+
+
+rev1= rev2= status=0
+trap 'status=2; exit' 1 2 13 15
+trap 'rm -f $rev1 $rev2 || status=2; exit $status' 0
+
+for f
+do
+  s=2
+
+  # For files under SCCS control, fixup the file name to be the s. filename
+  if [ -d SCCS ]; then
+    if [ $f = `echo $f | sed -e 's|SCCS/s.||'` ]; then
+      f="SCCS/s.$f"
+    fi
+  fi 
+
+       case $f in
+       s.* | */s.*)
+               if
+                       rev1=/tmp/geta$$
+                       get -s -p -k $sid1 "$f" > $rev1 &&
+                       case $sid2 in
+                       '')
+                               workfile=`expr " /$f" : '.*/s.\(.*\)'`
+                               ;;
+                       *)
+                               rev2=/tmp/getb$$
+                               get -s -p -k $sid2 "$f" > $rev2
+                               workfile=$rev2
+                       esac
+               then
+                       $echo $DIFF $options $sid1 $sid2 $workfile >&2
+                       $DIFF $options $rev1 $workfile
+                       s=$?
+               fi
+               ;;
+       *)
+               echo "$0: $f is not an SCCS file" >&2
+       esac
+
+       if test $status -lt $s
+       then status=$s
+       fi
+done
diff --git a/lib-src/wakeup.c b/lib-src/wakeup.c
new file mode 100644 (file)
index 0000000..979bd82
--- /dev/null
@@ -0,0 +1,63 @@
+/* Program to produce output at regular intervals.  */
+
+#include <../src/config.h>
+
+#if __STDC__ || defined(STDC_HEADERS)
+#include <stdlib.h>
+#include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+
+#ifdef WINDOWSNT
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#undef sleep
+#define sleep(t) Sleep ((t) * 1000)
+#define getppid() (0)
+#undef HAVE_SYS_TIME_H
+#endif /* WINDOWSNT */
+
+#ifdef TIME_WITH_SYS_TIME
+#include <sys/time.h>
+#include <time.h>
+#else
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+#endif
+
+int
+main (int argc, char *argv[])
+{
+  int period = 60;
+
+  if (argc > 1)
+    period = atoi (argv[1]);
+
+  while (1)
+    {
+      /* Make sure wakeup stops when Emacs goes away.  */
+      if (getppid () == 1)
+       return 0;
+      printf ("Wake up!\n");
+      /* If fflush fails, then our stdout pipe is broken. */
+      if (fflush (stdout) != 0)
+       return 0;
+      /* If using a period of 60, produce the output when the minute
+        changes. */
+      if (period == 60)
+       {
+         time_t when;
+         struct tm *tp;
+         time (&when);
+         tp = localtime (&when);
+         sleep (60 - tp->tm_sec);
+       }
+      else
+       sleep (period);
+    }
+}
diff --git a/lib-src/yow.c b/lib-src/yow.c
new file mode 100644 (file)
index 0000000..f5b7410
--- /dev/null
@@ -0,0 +1,178 @@
+/*
+ * yow.c
+ * 
+ * Print a quotation from Zippy the Pinhead.
+ * Qux <Kaufman-David@Yale> March 6, 1986
+ * 
+ * With dynamic memory allocation.
+ */
+
+/* Synched up with: FSF 19.28. */
+
+#include <../src/config.h>
+
+#include <stdio.h>
+#include <ctype.h>
+#include <../src/paths.h>      /* For PATH_DATA.  */
+
+#if __STDC__ || defined(STDC_HEADERS)
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <time.h> /* for time() */
+#endif
+
+#define BUFSIZE  80
+#define SEP      '\0'
+
+#ifndef YOW_FILE
+#define YOW_FILE "yow.lines"
+#endif
+
+void yow (FILE *fp);
+void setup_yow (FILE *fp);
+
+#ifdef MSDOS
+#define rootrelativepath(rel) \
+({\
+    static char res[BUFSIZE], *p;\
+    strcpy (res, argv[0]);\
+    p = res + strlen (res);\
+    while (p != res && *p != '/' && *p != '\\' && *p != ':') p--;\
+    strcpy (p + 1, "../");\
+    strcpy (p + 4, rel);\
+    &res;})
+#endif
+
+int
+main (int argc, char *argv[])
+{
+  FILE *fp;
+  char file[BUFSIZ];
+
+  if (argc > 2 && !strcmp (argv[1], "-f"))
+    strcpy (file, argv[2]);
+  else
+#ifdef PATH_DATA
+#ifdef vms
+    sprintf (file, "%s%s", PATH_DATA, YOW_FILE);
+#else
+    sprintf (file, "%s/%s", PATH_DATA, YOW_FILE);
+#endif
+#else /* !PATH_DATA */
+  {
+    fprintf (stderr,
+     "%s: the location of the \"%s\" file was not supplied at compile-time.\n\
+        You must supply it with the -f command-line option.\n",
+             argv[0], YOW_FILE);
+    exit (1);
+  }
+#endif
+
+  if ((fp = fopen(file, "r")) == NULL) {
+    perror(file);
+    exit(1);
+  }
+
+  /* initialize random seed */
+  srand((int) (getpid() + time((time_t *) 0)));
+
+  setup_yow(fp);
+  yow(fp);
+  fclose(fp);
+  return 0;
+}
+
+static long len = -1;
+static long header_len;
+
+#define AVG_LEN 40             /* average length of a quotation */
+
+/* Sets len and header_len */
+void
+setup_yow(fp)
+     FILE *fp;
+{
+  int c;
+
+  /* Get length of file */
+  /* Because the header (stuff before the first SEP) can be very long,
+   * thus biasing our search in favor of the first quotation in the file,
+   * we explicitly skip that. */
+  while ((c = getc(fp)) != SEP) {
+    if (c == EOF) {
+      fprintf(stderr, "File contains no separators.\n");
+      exit(2);
+    }
+  }
+  header_len = ftell(fp);
+  if (header_len > AVG_LEN)
+    header_len -= AVG_LEN;     /* allow the first quotation to appear */
+       
+  if (fseek(fp, 0L, 2) == -1) {
+    perror("fseek 1");
+    exit(1);
+  }
+  len = ftell(fp) - header_len;
+}
+
+
+/* go to a random place in the file and print the quotation there */
+void
+yow (fp)
+     FILE *fp;
+{
+  long offset;
+  int c, i = 0;
+  char *buf;
+  unsigned int bufsize;
+
+  offset = rand() % len + header_len;
+  if (fseek(fp, offset, 0) == -1) {
+    perror("fseek 2");
+    exit(1);
+  }
+
+  /* Read until SEP, read next line, print it.
+     (Note that we will never print anything before the first separator.)
+     If we hit EOF looking for the first SEP, just recurse. */
+  while ((c = getc(fp)) != SEP)
+    if (c == EOF) {
+      yow(fp);
+      return;
+    }
+
+  /* Skip leading whitespace, then read in a quotation.
+     If we hit EOF before we find a non-whitespace char, recurse. */
+  while (isspace(c = getc(fp)))
+    ;
+  if (c == EOF) {
+    yow(fp);
+    return;
+  }
+
+  bufsize = BUFSIZE;
+  buf = (char *) malloc(bufsize);
+  if (buf == (char *)0) {
+    fprintf(stderr, "can't allocate any memory\n");
+    exit (3);
+  }
+
+  buf[i++] = c;
+  while ((c = getc(fp)) != SEP && c != EOF) {
+    buf[i++] = c;
+       
+    if (i == bufsize-1) {
+      /* Yow! Is this quotation too long yet? */
+      bufsize *= 2;
+      buf = (char *)realloc(buf, bufsize);
+      if (buf == (char *)0) {
+       fprintf(stderr, "can't allocate more memory\n");
+       exit (3);
+      }
+    }
+  }
+  buf[i++] = 0;
+  printf("%s\n", buf);
+}
+
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
new file mode 100644 (file)
index 0000000..c2f1b30
--- /dev/null
@@ -0,0 +1,3205 @@
+1998-07-19  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 21.2-beta1 is released.
+
+1998-07-12  Oscar Figueiredo  <Oscar.Figueiredo@di.epfl.ch>
+
+       * ldap.el (ldap-search): Doc string change
+
+1998-07-16  Colin Rafferty   <colin@xemacs.org>
+
+       * menubar-items.el (default-menubar): Removed references to
+       `data-directory', and use `locate-data-file' instead, and made 
+       then greyed out if they don't exist.
+
+1998-07-14  Oscar Figueiredo  <Oscar.Figueiredo@di.epfl.ch>
+
+       * keymap.el (events-to-keys): Use `format' instead of `concat'
+       since the latter does not accept integer args anymore
+
+1998-07-15  SL Baur  <steve@altair.xemacs.org>
+
+       * dumped-lisp.el (preloaded-file-list): Usage of Lisp read-time
+       macros replaced.
+
+1998-07-14  SL Baur  <steve@altair.xemacs.org>
+
+       * make-docfile.el: Get first initialization from very-early-lisp.el
+       * update-elc.el: Ditto.
+       * loadup.el (really-early-error-handler): Ditto.
+
+       * packages.el (packages-unbytecompiled-lisp): Add new file,
+       very-early-lisp.el.
+
+       * very-early-lisp.el: New file.
+
+1998-07-14  SL Baur  <steve@altair.xemacs.org>
+
+       * Symbols that have been obsolete for at least 3 years removed (II).
+
+       * obsolete.el (eval-current-buffer): Make compatible.
+       (byte-code-function-p): Ditto.
+       (send-string): Removed.
+       (send-region): Removed.
+       (screen-scrollbar-width): Removed.
+       (set-screen-scrollbar-width): Removed.
+       (set-screen-left-margin-width): Removed.
+       (set-screen-right-margin-width): Removed.
+       (screen-left-margin-width): Removed.
+       (screen-right-margin-width): Removed.
+       (set-buffer-left-margin-width): Removed.
+       (set-buffer-right-margin-width): Removed.
+       (buffer-left-margin-width): Removed.
+       (buffer-right-margin-width): Removed.
+       (x-set-frame-icon-pixmap): Removed.
+       (x-set-screen-icon-pixmap): Removed.
+       (pixel-name): Removed.
+       (make-pixmap): Removed.
+       (make-cursor): Removed.
+       (pixmap-width): Removed.
+       (pixmap-contributes-to-line-height-p): Removed.
+       (set-pixmap-contributes-to-line-height): Removed.
+
+1998-07-13  SL Baur  <steve@altair.xemacs.org>
+
+       * obsolete.el (popup-menu-up-p): removed.
+       (read-no-blanks-input): Removed.
+       (wholenump): Removed.
+       (ring-mod): Removed (what was ring-mod?).
+       (current-time-seconds): Removed.
+       (run-special-hook-with-args): Removed.
+       (dot): Removed.
+       (dot-marker): Removed.
+       (dot-min): Removed.
+       (dot-max): Removed.
+       (window-dot): Removed.
+       (set-window-dot): Removed.
+
+       * bytecomp.el: Remove bytecompiler support for `dot', `dot-max' and
+       `dot-min'.
+
+       * minibuf.el: (read-no-blanks-input): remove commented-out copy.
+
+       * code-files.el (insert-file-contents): Rename
+       run-special-hook-with-args to run-hook-with-args-until-success.
+       (write-region): Ditto.
+
+1998-07-12  SL Baur  <steve@altair.xemacs.org>
+
+       * about.el: Fix typos, update release date.
+
+       * Symbols that have been obsolete for at least 3 years removed.
+
+       * cl-macs.el (cl-parse-loop-clause): Delete obsolete references to 
+       screen- functions.
+       (toplevel): remove setf methods for screen functions.
+       * cl-macs.el (extent-data): defsetf removed.
+       * obsolete.el (lisp-indent-hook): Make compatible, it's used too
+       many places to remove.
+       (comment-indent-hook): Ditto.
+       * obsolete.el (get-screen-for-buffer-default-screen-name): Remove.
+       (buffer-dedicated-screen): Ditto.
+       (deiconify-screen): Ditto.
+       (delete-screen): Ditto.
+       (event-screen): Ditto.
+       (find-file-other-screen): Ditto.
+       (find-file-read-only-other-screen): Ditto.
+       (live-screen-p): Ditto.
+       (screen-height): Ditto.
+       (screen-iconified-p): Ditto.
+       (screen-list): Ditto.
+       (screen-live-p): Ditto.
+       (screen-name): Ditto.
+       (screen-parameters): Ditto.
+       (screen-pixel-height): Ditto.
+       (screen-pixel-width): Ditto.
+       (screen-root-window): Ditto.
+       (screen-selected-window): Ditto.
+       (screen-totally-visible-p): Ditto.
+       (screen-visible-p): Ditto.
+       (screen-width): Ditto.
+       (screenp): Ditto.
+       (get-screen-for-buffer): Ditto.
+       (get-screen-for-buffer-noselect): Ditto.
+       (get-other-screen): Ditto.
+       (iconify-screen): Ditto.
+       (lower-screen): Ditto.
+       (mail-other-screen): Ditto.
+       (make-screen): Ditto.
+       (make-screen-invisible): Ditto.
+       (make-screen-visible): Ditto.
+       (modify-screen-parameters): Ditto.
+       (new-screen): Ditto.
+       (next-screen): Ditto.
+       (next-multiscreen-window): Ditto.
+       (other-screen): Ditto.
+       (previous-screen): Ditto.
+       (previous-multiscreen-window): Ditto.
+       (raise-screen): Ditto.
+       (redraw-screen): Ditto.
+       (select-screen): Ditto.
+       (selected-screen): Ditto.
+       (set-buffer-dedicated-screen): Ditto.
+       (set-screen-height): Ditto.
+       (set-screen-position): Ditto.
+       (set-screen-size): Ditto.
+       (set-screen-width): Ditto.
+       (show-temp-buffer-in-current-screen): Ditto.
+       (switch-to-buffer-other-screen): Ditto.
+       (visible-screen-list): Ditto.
+       (window-screen): Ditto.
+       (x-set-screen-pointer): Ditto.
+       (x-set-frame-pointer): Ditto.
+       (screen-title-format): Ditto.
+       (screen-icon-title-format): Ditto.
+       (terminal-screen): Ditto.
+       (delete-screen-hook): Ditto.
+       (create-screen-hook): Ditto.
+       (mouse-enter-screen-hook): Ditto.
+       (mouse-leave-screen-hook): Ditto.
+       (map-screen-hook): Ditto.
+       (unmap-screen-hook): Ditto.
+       (default-screen-alist): Ditto.
+       (default-screen-name): Ditto.
+       (x-screen-defaults): Ditto.
+       (x-create-screen): Ditto.
+       * obsolete.el: meta-flag removed.
+       baud-rate removed.
+       sleep-for-millisecs removed.
+       extent-data removed.
+       set-extent-data removed.
+       set-extent-attribute removed.
+       extent-glyph removed.
+       extent-layout removed.
+       set-extent-layout removed.
+       list-faces-display removed.
+       list-faces removed.
+       trim-versions-without-asking removed.
+       after-write-file-hooks removed.
+       truename removed.
+       auto-fill-hook removed.
+       blink-paren-hook removed.
+       select-screen-hook, deselect-screen-hook removed.
+       auto-raise-screen, auto-lower-screen removed.
+
+       * msw-mouse.el: Global change resource -> mswindows-resource.
+
+       * XEmacs 21.0-pre5 is released.
+
+1998-07-11  SL Baur  <steve@altair.xemacs.org>
+
+       * about.el (about-hackers): Credits update.
+
+1998-07-11  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * register.el (insert-register): Don't activate the region.
+
+1998-07-10  SL Baur  <steve@altair.xemacs.org>
+
+       * select.el: Restore x-* symbols for backwards compatibility:
+       x-copy-primary-selection, x-kill-primary-selection,
+       x-delete-primary-selection, x-select-make-extent-for-selection,
+       x-valid-simple-selection-, x-cut-copy-clear-internal.
+
+1998-07-09  SL Baur  <steve@altair.xemacs.org>
+
+       * XEmacs 21.0-pre4 is released.
+
+1998-06-28  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * menubar-items.el (default-menubar): Use `report-emacs-bug' for
+       reporting bugs.
+       (maybe-add-init-button): Fix semantics under Windows.  Use
+       `expand-file-name' rather than `concat'.
+
+       * help.el (print-messages): New function.
+
+1998-07-05  Oscar Figueiredo  <Oscar.Figueiredo@di.epfl.ch>
+
+       * ldap.el (ldap-host-parameters-alist): Docstring fixes
+
+1998-07-04  Jonathan Harris  <jhar@tardis.ed.ac.uk>
+
+       * about.el: Tweaked my entry in about-hackers.
+
+       * find-paths.el (paths-emacs-root-p):
+         Relaxed emacs-root checking of an in-place installation to
+         also accomodate the flat layout used on MS Windows.
+
+1998-06-29  John Jones  <jj@asu.edu>
+
+       * package-get.el: calls to package-get-update-all will only
+         update packages which are already installed.
+
+1998-07-05  Andy Piper  <andyp@parallax.co.uk>
+
+       * faces.el (xpm-color-symbols): remove hardcoded defaults these
+       are handled by the gui-element face fallbacks now.
+       
+       * x-faces.el: default gui-element face to "background" as well as
+       the default face.
+
+       * msw-faces.el (mswindows-init-device-faces): remove gui-element
+       and default face settings since these are set as fallbacks now in
+       the appropriate domain.
+
+1998-07-02  SL Baur  <steve@altair.xemacs.org>
+
+       * text-mode.el (text-mode): Reorder regexp so the OR part
+       corresponding to `page-delim' goes first and the hack in
+       `forward-paragraph' will work.
+       With bug analysis from Bob Weiner <weiner@altrasoft.com>
+       
+1998-06-29  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * subr.el (remove-hook): When checking the hook value
+         with functionp, don't apply car to it.
+
+1998-06-24  Jonathan Harris  <jhar@tardis.ed.ac.uk>
+
+       * package-get.el (package-get-remote-filename):
+         Don't use file-name-as-directory because the local directory
+         separator conventions might not be the same as ftp's.
+
+1998-06-27  Oscar Figueiredo  <Oscar.Figueiredo@di.epfl.ch>
+
+       * ldap.el (ldap-host-parameters-alist): New name of
+       `ldap-host-parameters-plist'
+
+1998-06-26  Adrian Aichner  <aichner@ecf.teradyne.com>
+
+       * package-get.el: Using (require 'package-get-base), now that it
+       provides itself.  Consequently removed all instances of (load
+       "package-get-base.el").
+
+1998-06-29  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * subr.el (remove-hook): Don't treat the hook value as a 
+         list unless it is both consp and not functionp.
+
+1998-06-29  SL Baur  <steve@altair.xemacs.org>
+
+       * about.el: Email address for Ben Wing is ben@xemacs.org.
+       * auto-show.el: Ditto.
+       * bytecomp.el: Ditto.
+       * faces.el: Ditto.
+       * x-scrollbar.el: Ditto.
+       * x-misc.el: Ditto.
+       * tty-init.el: Ditto.
+       * toolbar-items.el: Ditto.
+       * symbol-syntax.el: Ditto.
+       * specifier.el: Ditto.
+       * objects.el: Ditto.
+       * hyper-apropos.el: Ditto.
+       * glyphs.el: Ditto.
+
+1998-06-27  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * mouse.el (drag-window-divider): vertical-divider-draggable-p ->
+       vertical-divider-always-visible-p.
+       (default-mouse-motion-handler): Ditto.
+
+1998-06-21  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * scrollbar.el (scrollbars-visible-p): Simplify.  Always set the
+       global value.
+
+1998-06-21  Oliver Graf <ograf@fga.de>
+
+       * build-reports.el: changed receiver to xemacs-build-reports list
+
+1998-06-19  Jonathan Harris  <jhar@tardis.ed.ac.uk>
+
+       * font.el: Split font-family-mappings into X and
+         mswindows-specific versions.
+         mswindows-font-create-[object|name]: Treat supplied size
+         as a pointsize. Added underline and strikethru handling.
+
+       * msw-faces.el: changed default mswindows charset to western.
+
+       * msw-glyphs.el: removed space in border-glyph font string that
+         was inserted to get round bugs in the mswindows C font code.
+
+1998-06-27  SL Baur  <steve@altair.xemacs.org>
+
+       * about.el (about-hackers): Credits update.
+
+       * help-nomule.el (tutorial-supported-languages): Add Romanian
+       TUTORIAL.
+
+       * code-files.el (file-coding-system-alist): Hardwire TUTORIAL.ro
+       to ISO-8859-2.
+
+1998-06-19  Jonathan Harris  <jhar@tardis.ed.ac.uk>
+
+       * font.el: Split font-family-mappings into X and
+         mswindows-specific versions.
+         mswindows-font-create-[object|name]: Treat supplied size
+         as a pointsize. Added underline and strikethru handling.
+
+       * msw-faces.el: changed default mswindows charset to western.
+
+       * msw-glyphs.el: removed space in border-glyph font string that
+         was inserted to get round bugs in the mswindows C font code.
+
+1998-06-15  Jonathan Harris  <jhar@tardis.ed.ac.uk>
+
+       * minibuf.el: make read-color-completion-table call 
+         (mswindows-color-list for mswindows devices.
+
+1998-06-18  Sam Mikes  <smikes@alumni.hmc.edu>
+
+       * lisp/font-lock.el
+       (font-lock-match-c++-style-declaration-item-and-skip-to-next):
+       Let declaration items contain non-word symbol characters.
+
+1998-06-15  Adrian Aichner  <aichner@ecf.teradyne.com>
+
+       * package-get.el (package-get-package-provider): Added autoload
+       cookie.  Loading "package-get-base.el" in ALL functions that use
+       it.  Fixed some (interactive ...) with multiple argument specs
+       again.  Cosmetic indentation changes.
+
+1998-05-27  Glynn Clements  <glynn@sensei.co.uk>
+
+       * info.el (Info-insert-dir): Don't use nreverse on variables
+       that you want to use later.
+
+1998-06-17  Glynn Clements  <glynn@sensei.co.uk>
+
+       * x-mouse.el (x-set-point-and-move-selection): Replace call
+       to x-kill-primary-selection with kill-primary-selection
+
+1998-06-12  Martin Buchholz  <martin@xemacs.org>
+
+       * simple.el (what-cursor-position): Make cursor position reported
+       use value of column-number-start-at-one
+
+1998-06-17  SL Baur  <steve@altair.xemacs.org>
+
+       * about.el (xemacs-hackers): Fix Jareth's email address.
+
+1998-06-16  SL Baur  <steve@altair.xemacs.org>
+
+       * startup.el (startup-splash-frame): Remove
+       `xemacs-startup-logo-function'.
+
+1998-06-15  SL Baur  <steve@altair.xemacs.org>
+
+       * about.el (about-hackers): Update credits list.
+
+1998-06-06  Jeff Miller <jmiller@smart.net>
+
+       * lisp/sound.el: Update sound-ext to allow filenames with
+         extensions to be found by load-sound-file
+
+1998-06-14  Oscar Figueiredo  <Oscar.Figueiredo@di.epfl.ch>
+
+       * info.el (Info-rebuild-outdated-dir): Removed variable
+       (Info-auto-generate-directory): New variable
+       (Info-save-auto-generated-dir): New variable
+       (Info-maybe-update-dir): Use `Info-auto-generate-directory'
+       (Info-build-dir-anew): Second parameter removed.  Use
+       `Info-save-auto-generated-dir' 
+       (Info-rebuild-dir): Ditto
+
+1998-06-02  Christoph Wedler  <wedler@fmi.uni-passau.de>
+
+       * list-mode.el (next-list-mode-item): Would not recognize
+       border between directly neighbored items.
+
+1998-06-12  Andy Piper  <andyp@parallax.co.uk>
+
+       * package-get.el: add autoloads for some functions.
+
+1998-06-10  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * specifier.el (let-specifier): Tiny docfixes.
+
+1998-06-12  Andy Piper  <andyp@parallax.co.uk>
+
+       * msw-mouse.el: set selection-pointer-glyph to Normal.
+
+1998-06-09  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * wid-edit.el (widget-specify-secret): New function.
+       (widget-after-change): Use it.
+       (widget-specify-field): Use it.
+
+1998-06-08  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * mouse.el (drag-window-divider): Use `(not done)' instead of
+       `doit'; reuse result of `window-pixel-edges'.
+
+       * modeline.el (drag-modeline-event-lag): Rename to
+       drag-divider-event-lag.
+
+1998-06-07  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * specifier.el (let-specifier): Rewritten not to generate needless
+       `let's; clarified documentation; support TAG-SET and HOW-TO-ADD
+       arguments.
+
+1998-05-28  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * minibuf.el (read-file-name-1): Setup buffer-local value of
+       `completion-ignore-case' in completions buffer under Windows.
+
+1998-06-06  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * about.el (about-maintainer-glyph): Fix support for not
+       compressed images.
+
+1998-06-04  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * cmdloop.el (cancel-mode-internal): Defined this do-nothing function.
+
+       * mouse.el (mouse-track): Cancel selection if misc-user event with
+       `cancel-mode-internal' function is fetched.
+
+1998-06-03  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * files.el (save-some-buffers-1): Fixed return value.
+
+1998-06-01  Oliver Graf <ograf@fga.de>
+
+       * dragdrop.el: added experimental
+
+1998-05-26  Stephen J. Turnbull  <turnbull@sk.tsukuba.ac.jp>
+
+       * startup.el (after-init-hook, init-file-user,
+       user-init-directory, load-user-init-file):  Purge references
+       to "~/.xemacs/init.el" from docstrings.
+
+       (load-user-init-file) Use paths-construct-path to construct
+       paths to user init files.  Go directly to ~/.emacs, do not
+       search ~/.xemacs/, do not load `default-custom-file'.
+
+1998-06-03  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * files.el (interpreter-mode-alist): Catch wish and tclsh before
+       general *sh.
+       (inhibit-first-line-modes-regexps): Added `.tar.gz'.
+
+1998-06-03  Andy Piper  <andyp@parallax.co.uk>
+
+       * menubar-items.el (default-menubar): add Update Packages to customize
+       menu.
+
+1998-06-02  Andy Piper  <andyp@parallax.co.uk>
+
+       * faces.el: use toolbar face as a fallback for toolbar properties
+       in xpm-color-symbols instead of default.
+
+       * msw-faces.el: rename 3d-object -> gui-element face.
+
+1998-06-06  SL Baur  <steve@altair.xemacs.org>
+
+       * startup.el (xemacs-startup-logo-function): New variable.
+       (startup-splash-frame): Use it.
+
+1998-06-02  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * files.el (save-some-buffers): Would wait 1 second.
+       (save-some-buffers-1): Delete other windows here instead of in
+       `save-some-buffers'.
+       (save-some-buffers): Force redisplay only if windows were deleted.
+
+1998-06-02  Didier Verna  <verna@inf.enst.fr>
+
+       * cus-face.el (custom-face-attributes): generalized the use of
+       toggle buttons for boolean attributes. 
+       Re-ordered the items a bit.
+
+1998-06-01  SL Baur  <steve@altair.xemacs.org>
+
+       * sound.el (default-sound-directory): Use `locate-data-directory'
+       to find the sounds directory.
+
+1998-05-29  Andy Piper  <andyp@parallax.co.uk>
+
+       * sound.el: default sound-ext to .wav under mswindows, .au
+       otherwise. load-default sounds without extensions.
+
+1998-05-27  Bjrn Torkelsson  <torkel@hpc2n.umu.se>
+
+       * menubar-items.el (default-menubar): Dim out "Submit Bug Report"
+       if send-pr is not bound.
+
+1998-06-01  Andy Piper  <andyp@parallax.co.uk>
+
+       * files.el: grok idl files in auto-mode-alist.
+1998-06-01  Jeff Miller  <jmiller@smart.net>
+
+       * minibuf.el (exact-minibuffer-completion-p): check for nil before
+       calling `upcase'.
+
+1998-05-30  Andy Piper  <andyp@parallax.co.uk>
+
+       * msw-glyphs.el: add xbm to the list of image types supported.
+
+1998-05-30  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * msw-init.el (init-post-mswindows-win): Load InfoDock toolbar
+       instead of XEmacs one when dumping InfoDock.
+
+1998-05-30  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * obsolete.el (has-modeline-p): Added obsolete alias `has-modeline-p'
+       for `modeline-visible-p'
+
+       * winnt.el (nt-quote-process-args): Fix for duplicating argv[0].
+
+1998-05-29  Andy Piper  <andyp@parallax.co.uk>
+
+       * msw-select.el (mswindows-cut-copy-clear-clipboard): deleted
+       since it's not used anymore. doc string fixes.
+
+       * package-get.el (package-get-file-installed-p): new function. use
+       instead of file-installed-p which is in an external package.
+
+1998-05-28  Oliver Graf <ograf@fga.de>
+
+       * dragdrop.el (dragdrop-drop-url-default): dropped pop-to-buffer in
+       favor of select-window/switch-to-buffer
+
+Wed May 27, 1998  Darryl Okahata  <darrylo@sr.hp.com>
+
+       * startup.el: changed (getenv "HOME") to (user-home-directory)
+
+1998-05-25  Oliver Graf <ograf@fga.de>
+
+       * frame.el (cde-start-drag) moved to dragdrop.el
+       (offix-start-drag-region) moved to dragdrop.el
+       (offix-start-drag) moved to dragdrop.el
+       * dragdrop.el (cde-start-drag) moved from frame.el
+       (offix-start-drag-region) moved from frame.el
+       (offix-start-drag) moved from frame.el
+       (cde-start-drag-region) cde drag regions
+       * mouse.el (mouse-drag-or-yank) will now call cde-start-drag-region
+
+1998-05-26  Oliver Graf <ograf@fga.de>
+
+       * dragdrop.el: created dragdrop-drag prototypes
+       (cde-start-drag-region) fixed typo
+
+1998-05-28  SL Baur  <steve@altair.xemacs.org>
+
+       * simple.el (after-init-hook): Remove reader macro.
+
+       * packages.el (packages-hardcoded-lisp): Get rid of reader
+       macros.  Update DOC string.
+
+1998-05-25  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * mouse.el (drag-window-divider): Ditto.
+
+       * modeline.el (mouse-drag-modeline): Use it.
+
+       * lisp-mode.el (let-specifier): Specify indentation.
+
+       * specifier.el (let-specifier): Renamed from
+       `with-specifier-instance'.
+
+1998-05-27  Andy Piper  <andyp@parallax.co.uk>
+
+       * x-faces.el:
+       * faces.el: move definition of xpm-color-symbols from x-faces.el
+       to faces. Predicate x-get-resource on the presence of x.
+
+       * msw-faces.el: set 3d-object face rather than modeline. Specifiy
+       faces as specfier defaults.
+
+       * package-get.el: don't use package-admin-add-single-file-package.
+
+1998-05-25  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * toolbar-items.el: Fixup tooltips.
+       (toolbar-gnus): Don't use obsolete variable
+       toolbar-news-frame-properties.
+       (toolbar-news-reader): Default to `gnus' instead of
+       `not-configured'.
+
+       * files.el (auto-mode-alist): Correctly recognize `.emacs' under
+       Windows.
+
+1998-05-25  Andy Piper  <andyp@parallax.co.uk>
+
+       * package-get.el: rename -installedp -> -installed-p.
+
+1998-05-23  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * glyphs.el (init-glyphs): Created `border-glyph' face, with no
+       attributes, and assinged it to continuation, truncation and
+       hscroll glyphs.
+
+       * msw-glyphs.el: Assigned WinDings font to `border-glyph' face,
+       and made continuation, truncation and hscroll glyphs arrow
+       characters out of that font.
+
+1998-05-22  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * minibuf.el (minibuffer-electric-separator): Play nicely with
+       directory-sep-char being \.
+       (minibuffer-electric-tilde): Ditto.
+       (read-file-name-map): Ditto.
+
+1998-05-22  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * mouse.el (default-mouse-track-maybe-own-selection): Pause only
+       on X devices.
+       (default-mouse-track-deal-with-down-event): Avoid
+       `x-disown-selection'; use `disown-selection' instead.
+
+1998-05-21  Andy Piper  <andyp@parallax.co.uk>
+
+       * select.el:
+       * x-select.el: selection cleanup. (x-cut-copy-clear-internal)
+       moved to (cut-copy-clear-internal) in select.el. Ditto for
+       (x-delete-primary-selection) (x-kill-primary-selection)
+       (x-copy-primary-selection). 
+       (own-clipboard): new function.
+
+       * msw-select.el: use the new kill/delete/copy/cut-copy-clear
+       functions in select.el. remove old ones.
+       (mswindows-own-clipboard): new function.
+
+1998-05-21  Andy Piper  <andyp@parallax.co.uk>
+
+       * gnuserv.el: allow connections from mswindows type devices.
+
+1998-05-20  Andy Piper  <andyp@parallax.co.uk>
+
+       * msw-glyphs.el: change image type used from cursor to resource.
+
+1998-05-20  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * x-scrollbar.el (x-init-scrollbar-from-resources): Added support
+       for {top,bottom}-{left,right} values in addition to
+       {top,bottom}_{left,right}.
+       Use x-get-resource instead of x-get-resource-and-bogosity-check.
+
+1998-05-20  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * cl-macs.el (specifier-instance): Undefine its setf method.
+
+       * specifier.el (with-specifier-instance): Added docstring.
+
+       * mouse.el (drag-window-divider): Ditto.
+
+       * modeline.el (mouse-drag-modeline): Use it.
+
+       * lisp-mode.el (with-specifier-instance): Define its indentation
+       level.
+
+       * specifier.el (with-specifier-instance): New macro.
+
+1998-05-19  Andy Piper  <andyp@parallax.co.uk>
+
+       * package-get.el (package-get-create-custom): new function to
+       auto-generate package-get-custom.el from package-get-base.el.
+       * (package-get-ever-installedp): new function.
+       * (package-get-custom): new function to get all packages specified
+       by customize.
+
+1998-05-19  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * cus-edit.el (custom-file): Revert to `~/.emacs'.
+
+1998-05-23  SL Baur  <steve@altair.xemacs.org>
+
+       * cl-extra.el: Reverse previous float change.
+
+1998-05-17  Andy Piper  <andyp@parallax.co.uk>
+
+       * x-faces.el:
+       * faces.el (try-font-name): moved from x-faces.el since it is
+       required by w3 under mswindows as well X.
+
+1998-05-18  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * winnt.el: Removed evil (setq completion-ignore-case t)
+       clause, one more overlookef fsfism.
+       (nt-quote-args-functions-alist): End sentences with double space.
+
+1998-05-18  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * window-xemacs.el (push-window-configuration): Remove kludgery of
+       recaching default-toolbar specifier.
+       (pop-window-configuration): Ditto.
+       (unpop-window-configuration): Ditto.
+
+1998-05-16  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * modeline.el (modeline-minor-mode-menu): Don't use :menu-tag.
+
+1998-05-17  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * winnt.el (nt-quote-args-verbatim): Added function.
+       (nt-quote-args-prefix-quote): Added function.
+       (nt-quote-args-backslash-quote): Added function.
+       (nt-quote-args-double-quote): Added function.
+       (nt-quote-args-functions-alist): New variable.
+       (nt-quote-process-args): Added function. This is the main quoting
+       work horse called from process-nt.c
+
+1998-05-16  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * winnt.el: Removed duplicate definitions for backspace,
+       delete, M-backspace and C-M-backspace.
+       (file-name-buffer-file-type-alist): Removed this variable.
+       (find-buffer-file-type): Removed function.
+       (find-file-binary):  Removed function.
+       (find-file-text): Removed function.
+       (find-file-not-found-set-buffer-file-type): Removed function.
+       (save-to-unix-hook): Removed function.
+       (revert-from-unix-hook): Removed function.
+       (using-unix-filesystems): Removed function.
+       (original-make-auto-save-file-name): DEFSUBR to avoid doc snarf
+       warning.
+       (x-set-selection): Removed function.
+       (x-get-selection): Removed function.
+       Removed commented FSFisms.
+       Replaced copyright notice (this file is not part of GNU Emacs).
+       (nt-shell-mode-hook): Moved here from a lambda expression. Added
+       comint-process-echoes setting to t.
+
+1998-05-17  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+       
+       * packages.el (packages-no-package-hierarchy-regexp): Introduced
+       and used following the interface change of
+       `paths-find-recursive-path'.
+
+       * find-paths.el (paths-find-recursive-path): Exclusion is now by a
+       regexp instead of a list of base names.
+       (paths-version-control-filename-regexp):
+       (paths-lisp-filename-regexp): (paths-no-lisp-directory-regexp):
+       Introduced and used following the interface change of
+       `paths-find-recursive-path'.
+
+1998-05-16  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * simple.el (delete-forward-p): Make it a defun; do X garbage only 
+       on X devices, rather than on all non-TTY devices.
+
+1998-05-16  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * msw-mouse.el: New file. Sets up cursor shapes for Windows.
+
+       * dumped-lisp.el (preloaded-file-list): Added msw-mouse.el
+
+1998-05-17  Adrian Aichner  <aichner@ecf.teradyne.com>
+
+       * itimer.el (activate-itimer): Fixed usage of integers
+       as argument to `concat'.
+
+1998-05-17  Glynn Clements  <glynn@sensei.co.uk>
+
+       * itimer.el (start-itimer): replace the use of `concat' with
+       `format'
+
+1998-05-16  SL Baur  <steve@altair.xemacs.org>
+
+       * mode-motion.el (mode-motion-hook): Clarify docstring.
+       From Bob Weiner <weiner@altrasoft.com>
+
+       * loadhist.el (symbol-file): Supply prompt string when used
+       interactively.
+       From Bob Weiner <weiner@altrasoft.com>
+
+1998-05-16  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * loadup.el (really-early-error-handler): Ditto.
+
+       * update-elc.el: Ditto.
+
+       * setup-paths.el (paths-construct-exec-path): Ditto.
+
+       * make-docfile.el: Ditto.
+
+       * find-paths.el (paths-decode-directory-path): Use split-path
+       instead of decode-path.
+
+       * files.el (parse-colon-path): Update docstring reference.
+
+1998-05-15  Jonathan Harris  <jhar@tardis.ed.ac.uk>
+
+       * msw-init.el:
+       * x-init.el:
+       Bind cut'n'paste keys to non window-system specific functions.
+
+       * msw-select.el: New function mswindows-clear-clipboard.
+       mswindows-cut-copy-clipboard extended to handle clearing of the
+       selection and renamed to mswindows-cut-copy-clear-clipboard.
+
+       * select.el: on mswindows devices delete-primary-selection
+       calls mswindows-clear-clipboard.
+
+1998-05-15  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * simple.el (quoted-insert): Inhibit quit when using read-char.
+
+       * cmdloop.el (read-char): Don't inhibit quit.
+       (read-char-exclusive): Ditto.
+       (read-char): Signal quit if quit-char was pressed.
+       (read-char-exclusive): Ditto.
+       (read-quoted-char): Return a character, not integer.
+
+       * menubar-items.el (default-popup-menu): Use Andy's generic
+       selection code.
+       (default-popup-menu): Fix code.
+
+1998-05-14  Oliver Graf <ograf@fga.de>
+
+       * dragdrop.el (dragdrop-function-widget): this time it's done
+
+1998-05-13  Oliver Graf <ograf@fga.de>
+
+       * dumped-lisp.el: dragdrop.el now based on dragdrop-api feature
+
+1998-05-15  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * device.el (device-pixel-width): 
+       (device-pixel-height): 
+       (device-mm-width): 
+       (device-mm-height): 
+       (device-bitplanes): 
+       (device-color-cells): Swapped parameters to device-system-metric
+       according to the interface change.
+
+1998-05-14  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * mouse.el (default-mouse-motion-handler): Use new name of the
+       function event-over-vertical-divider-p.
+       Do not set E-W arrow cursor over the divider if
+       vertical-divider-draggable-p is nil in the window.
+       ([top-level]): Use new name for the variable
+       vertical-divider-map.
+       (drag-window-divider): Respect vertical-divider-draggable-p.
+       Variable name typo fixes.
+
+1998-05-14  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * keymap.el (kbd): Define here; handle string constants and
+       others...
+
+1998-05-15  Christian Nyb <chr@mediascience.no>
+
+       * simple.el (zap-up-to-char): New function.  Behaves like `zap-to-char'
+       in Emacs 18.
+
+1998-05-13  Didier Verna  <verna@inf.enst.fr>
+
+       * mouse.el (drag-window-divider): give the vertical divider a
+       pressed look when dragging it.
+
+1998-05-13  Andy Piper  <andyp@parallax.co.uk>
+
+       * faces.el: predicate some more face operations on x or mswindows
+       not just x.
+
+       * modeline.el: enable modeline coloring for mswindows.
+
+1998-05-13  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * minibuf.el (minibuffer-default): Added variable; compatible with
+       FSF Emacs.
+       (next-history-element): Used `minibuffer-default'.
+
+1998-05-12  Oliver Graf <ograf@fga.de>
+
+       * dragdrop.el (dragdrop-function-widget): button and mods ok
+       arguments still look a bit strange
+       (dragdrop-compare-mods) created
+       (dragdrop-drop-do-functions) correctly checks for buttons and
+       modifiers
+
+1998-05-14  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * setup-paths.el (paths-default-info-directories): Replace
+       path-separator with directory-sep-char.
+
+       * files.el (path-separator): Don't define it here.
+
+1998-05-14  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * update-elc.el: Ditto.
+
+       * setup-paths.el (paths-construct-exec-path): Ditto.
+
+       * make-docfile.el: Ditto.
+
+       * loadup.el (really-early-error-handler): Ditto.
+
+       * find-paths.el (paths-decode-directory-path): Use decode-path
+       instead of decode-path-internal.
+
+       * files.el (parse-colon-path): Update docstring.
+
+1998-05-13  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * subr.el (get-buffer-window-list): Make BUFFER optional.
+
+       * window-xemacs.el (windows-of-buffer): Defalias to
+       get-buffer-window-list.
+
+1998-05-12  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * disass.el: Fix maintainer keyword.
+
+       * bytecomp.el (byte-compile-and-load-file): Autoload.
+       (byte-compile-buffer): Ditto.
+
+       * lisp-mode.el (eval-last-sexp): Skip ` in `variable' so that the
+       value is returned, not the name.
+       (lisp-imenu-generic-expression): Enable it.
+       (lisp-mode-variables): Ditto.
+       (lisp-indent-offset): Change defconst to defvar.
+       (lisp-indent-function): Ditto.
+       (lisp-body-indent): Ditto.
+
+1998-05-12  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * modeline.el: Use zap-last-kbd-macro-event.
+
+       * lisp-mode.el (eval-interactive): If eval-interactive-verbose is
+       nil, don't attempt to do anything with messages.
+       (eval-last-sexp): Use `letf' for clarity.
+
+1998-05-12  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * startup.el: It's still `.emacs', not yet `.xemacs/init.el'.
+
+1998-05-11  Martin Buchholz  <martin@xemacs.org>
+
+       * buff-menu.el:
+       * lisp-mode.el:
+       * obsolete.el:
+       Change empty docstrings into no doc strings at all.
+       Fix bogus FSF-format docstrings.
+       * etags.el: Fix docstring.
+
+1998-05-11  Jan Vroonhof  <vroonhof@math.ethz.ch>
+
+       * package-get.el (package-get): Use internal md5
+
+1998-05-13  SL Baur  <steve@altair.xemacs.org>
+
+       * about.el (about-xemacs): Correct abuse of concat.
+
+1998-05-11  SL Baur  <steve@altair.xemacs.org>
+
+       * info.el (Info-mode): Use easymenu.
+
+1998-05-12  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * apropos.el (apropos): Don't use concat with integers.
+
+       * cmdloop.el (describe-last-error): Handle the case when no error
+       was seen gracefully.
+
+       * apropos.el (apropos-print): Use with-displaying-help-buffer as
+       defun.
+       (apropos-describe-plist): Ditto.
+
+       * help.el (with-displaying-help-buffer): Revert to a defun.
+       (describe-key): Use it as defun.
+       (describe-mode): Ditto.
+       (describe-bindings): Ditto.
+       (describe-prefix-bindings): Ditto.
+       (describe-installation): Ditto.
+       (view-lossage): Ditto.
+       (describe-function): Ditto.
+       (describe-variable): Ditto.
+       (describe-syntax): Ditto.
+
+1998-05-11  Oliver Graf <ograf@fga.de>
+
+       * dragdrop.el: changed order of require/provide
+       (dragdrop-drop-mime-default) changed to new calling conventions
+       (dragdrop-drop-do-functions) changed to new calling conventions
+       (dragdrop-function-widget) this one needs more work...
+
+1998-05-10  Oliver Graf <ograf@fga.de>
+
+       * about.el: another small change in my entry
+       * dragdrop.el (dragdrop-drop-log-function): logging added
+       plus customizations
+       changed interface to handler functions. now called with event
+       and object
+
+1998-05-12  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * glyphs.el (divider-pointer-glyph): Declared new glyph,
+       E-W arrow pointer displayed over draggable dividers.
+
+       * mouse.el (default-mouse-motion-handler): Show it when
+       appropriate.
+       (drag-window-divider): Added.
+       ([top-level]): Initialized window-divider-map with a keymap
+       binding the above function to left button down event.
+
+       * x-mouse.el (x-init-pointer-shape): Initialize
+       divider-pointer-glyph from Cursor.dividerPointer, or use default
+       E-W double arrow.
+
+1998-04-30  Gunnar Evermann  <Gunnar.Evermann@nats.informatik.uni-hamburg.de>
+
+       * toolbar-items.el (toolbar-compile): respect should-use-dialog-box-p
+
+1998-05-11  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * simple.el (count-words-buffer): Don't query for buffer.
+       (count-lines-buffer): Ditto.
+
+1998-05-11  Jan Vroonhof <vroonhof@math.ethz.ch>
+
+       * help.el (where-is): add optional insert argument.
+
+1998-05-11  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * help.el (describe-key-briefly): New argument INSERT.
+
+       * simple.el (eval-expression): New optional argument; synch with
+       FSF 20.3.
+
+       * keydefs.el (global-map): Add new register bindings.
+
+       * register.el: Synched with FSF 20.3.
+
+1998-05-11  Jan Vroonhof <vroonhof@math.ethz.ch>
+
+       * window-xemacs.el (recenter): all arguments are optional.
+
+1998-05-10  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * device.el: (device-pixel-width): Reflected name/parameters
+       change to device-system-metric. 
+       (device-pixel-height): Ditto. 
+       (device-mm-width): Ditto.
+       (device-mm-height): Ditto.
+       (device-bitplanes): Ditto.
+       (device-color-cells): Ditto.
+
+1998-05-10  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * cl-extra.el (cl-float-limits): Removed; move code to top-level.
+
+       * cl.el (most-positive-fixnum): Document.
+       (most-negative-fixnum): Ditto.
+
+       * cus-dep.el: Updated comment.
+
+       * cus-load.el: Use most-positive-fixnum as the gc-inhibiting
+       constant.
+
+       * cus-load.el (custom-put): Removed.
+
+       * files.el (after-find-file): Just resignal quit instead of
+       signaling "canceled".
+
+1998-05-10  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * frame.el (other-frame): Use `focus-frame' instead of
+       select-frame kludges.
+
+       * lisp-mode.el: Update lisp-indent-function for
+       save-selected-frame and with-selected-frame.
+
+       * frame.el (save-selected-frame): New macro.
+       (with-selected-frame): Ditto.
+       (other-frame): Use `set-frame-focus'.
+
+1998-05-06  Oliver Graf <ograf@fga.de>
+
+       * dragdrop.el (dragdrop-drop-dispatch): changed to new list concept
+       (dragdrop-drop-url-default) default handler for URL drops created
+       (dragdrop-drop-mime-default) default handler for MIME drops created
+       (dragdrop-drop-functions) default custom for handling drops created
+       (dragdrop-drop-do-functions) helper for drgadrop-drop-dispatch
+
+1998-05-05  Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+       * mouse.el: Removed redundant mouse-mswindows-drop function.
+
+1998-05-05  Oliver Graf <ograf@fga.de>
+
+       * about.el: changed some text in my entry
+       * dragdrop.el: added customs
+
+1998-05-04  Oliver Graf <ograf@fga.de>
+
+       * mouse.el: killed global drop key bindings
+       (mouse-offix-drop) removed
+       * dragdrop.el: created
+       * dumped-lisp.el: inclusion of dragdrop.el for window-systems
+
+1998-05-09  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * x-scrollbar.el (x-init-scrollbar-from-resources): Initialize
+       scrollbar-on-{left,top}-p from *scrollBarPlacement resources.
+
+       * x-misc.el (x-get-resource-and-maybe-bogosity-check): Removed
+       obsolete comment.
+
+       * scrollbar.el (scrollbars-visible-p): Use new
+       {vertical,horizontal}-scrollbar-visible-p specifiers.
+
+1998-04-18  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * device.el (device-pixel-height): 
+       (device-pixel-width): 
+       (device-mm-width): 
+       (device-mm-height): 
+       (device-bitplanes): 
+       (device-color-cells): Moved these 6 functions from device.c; they
+       all use single (device-system-metrics) call.
+
+1998-05-09  SL Baur  <steve@altair.xemacs.org>
+
+       * dumped-lisp.el (preloaded-file-list): x-menubar.el and x-toolbar.el
+       were renamed.
+
+       * menubar-items.el: 
+       * toolbar-items.el: Renamed from x-menubar/x-toolbar.
+       Suggested by Hrvoje Niksic <hniksic@srce.hr>
+
+       * help.el (help-map): Remove Hyperbole keybinding logic.
+       Suggested by: Michael Ernst <mernst@cs.washington.edu>
+
+1998-05-08  SL Baur  <steve@altair.xemacs.org>
+
+       * x-menubar.el (default-menubar): Enable 'mail-user-agent' feature.
+       From SAKIYAMA Nobuo <nobuo@db3.so-net.or.jp>
+
+1998-05-07  Andy Piper  <andyp@parallax.co.uk>
+
+       * msw-glyphs.el: use nicer icon3 from the frame icon.
+
+1998-05-07  SL Baur  <steve@altair.xemacs.org>
+
+       * version.el (emacs-version): Remove InfoDock conditionals.
+
+       * startup.el (startup-splash-frame): Change ID logo name.
+
+1998-05-06  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * files.el (after-find-file): If the user presses C-g on
+       directory-creation prompt, kill the buffer.
+
+1998-05-06  SL Baur  <steve@altair.xemacs.org>
+
+       * simple.el (count-words-region): Reverse previous change.
+
+1998-05-05  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * replace.el (query-replace): Just call perform-replace.
+       (query-replace-regexp): Ditto.
+       (perform-replace): Move region handling here.
+       (perform-replace): Use the new arg to match-data.
+
+1998-03-08  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * x-init.el: Install X specific display table that
+         displays char 0240 as a space to avoid whatever it is
+         that screws up display of that character code.
+
+1998-05-03  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * help.el (function-arglist): If no arguments are documented for a 
+       subr, print nothing rather than incorrect output.
+
+1998-05-05  SL Baur  <steve@altair.xemacs.org>
+
+       * cmdloop.el (command-error): Update bail-out error message to use 
+       `emacs-program-name'.
+
+       * lib-complete.el: Remove reader macro cruft.
+
+       * dumped-lisp.el (preloaded-file-list): Phase I:  remove InfoDock
+       cruft.
+
+       * simple.el (count-words-region): Drop interactive-p check on the
+       message.
+
+1998-05-04  Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+       * font.el
+       * msw-faces.el
+       Correct spelling of mswindows-font-canonicalize-name.
+
+1998-05-03 Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
+
+       * ldap.el (ldap-host-parameters-alist): Replaced with
+       `ldap-host-parameters-plist'
+       (ldap-search): Adapt to previous change
+
+1998-05-02  SL Baur  <steve@altair.xemacs.org>
+
+       * about.el (about-hackers): Update Bob Weiner bio.
+       (about-maintainer-info): Ditto.
+
+1998-05-02  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * simple.el (display-warning-minimum-level): Docfix.
+
+1998-04-04  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * widget.el (:default-get): New keyword.
+       * wid-edit.el (default, widget-default-default-get): Define it.
+       (group, widget-group-default-get): Define it.
+       (menu-choice, widget-choice-default-get): Define it.
+       (widget-default-get): New function.
+       (widget-choice-action): Call it.
+       (widget-editable-list-entry-create): Call it.
+
+1998-05-01  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * byte-optimize.el (byte-boolean-vars): Removed.
+       (byte-optimize-lapcode): Use `built-in-variable-type' instead of
+       lookup through `byte-boolean-vars'.
+
+1998-05-01  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * x-scrollbar.el (x-init-scrollbar-from-resources): Stuff
+       resource-provided values into ghost specs for scrollbar-height and
+       scrollbar-width.
+
+1998-05-01  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * byte-optimize.el: Don't attempt to optimize /=.
+
+       * bytecomp.el (byte-compile-one-ore-more-args): New function.
+       (byte-compile-/=): Ditto.
+
+1998-05-02  SL Baur  <steve@altair.xemacs.org>
+
+       * apropos.el: Use `with-displaying-help-buffer'.
+       (apropos-print): Remove explicit mentions of "*Apropos*" buffer.
+       Use `with-displaying-help-buffer'.
+       (apropos-follow): Do not give special treatment to buffer cursor
+       was in prior to a mouse click.
+       (apropos-describe-plist): Use `with-displaying-help-buffer'.
+       (apropos-print-doc): Set correct buffer for setting text
+       properties.
+
+1998-05-01  SL Baur  <steve@altair.xemacs.org>
+
+       * help.el (help-buffer-prefix-string): New variable.
+       (help-buffer-name): Use it.
+
+       * modeline.el (modeline-minor-mode-menu): Alphabetize the minor
+       mode menu.
+
+1998-04-30  Greg Klanderman  <greg@alphatech.com>
+
+       * frame.el (other-frame): Work even when focus-follows-mouse is true.
+
+1998-05-01  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * files.el (find-file-noselect): Update docstring.
+       (find-file-noselect): Signal an error if found an unreadable file.
+       (file-chase-links): Save the match data.
+       (normal-mode): Use `lwarn' and `error-message-string'.
+       (interpreter-mode-alist): Change defconst to defvar.
+       (inhibit-first-line-modes-regexps): Ditto.
+       (inhibit-first-line-modes-regexps): Added .tgz.
+       (inhibit-first-line-modes-suffixes): Change defconst to defvar.
+       (change-major-mode-with-file-name): New user-option.
+       (set-visited-file-name): Synched with FSF.
+       (file-name-extension): New function, from FSF 20.3.
+       (file-relative-name): Synched with FSF.
+       (save-some-buffers): Support the C-r feature.
+       (recover-session): Synched with FSF.
+       (kill-some-buffers): Ditto.
+       (set-auto-mode): New argument JUST-FROM-FILE-NAME.
+
+1998-04-30  SL Baur  <steve@altair.xemacs.org>
+
+       * files.el (insert-file): Undo previous change and reenable use of
+       format.el.
+
+1998-04-30  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * window-xemacs.el (recenter): Define.
+
+1998-04-29  Andy Piper  <andyp@parallax.co.uk>
+
+       * font.el (mswindows-font-create-name)
+       (mswindows-font-create-object): new functions for mswindows type
+       fonts.
+
+       * msw-faces.el (mswindows-font-canicolize-name): fix so that
+       strings are parsed as well as font objects.
+
+1998-04-30  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * modeline.el (defining-kbd-macro): Restore modeline indication of 
+       kbd-macro being recorded.
+       (add-minor-mode): Simplify docstring.
+       (modeline-minor-mode-menu): Remove stuff.
+
+1998-04-29  Andy Piper  <andyp@parallax.co.uk>
+
+       * code-process.el (call-process): dynamically decide process
+       coding type. 
+
+1998-04-29  Jim Radford  <radford@robby.caltech.edu>
+
+       * modeline.el: Add line-number-mode, column-number-mode to
+       the modeline minor-mode menu.  Button2 on the line number does
+       goto-line.
+
+1998-04-29  Andy Piper  <andyp@parallax.co.uk>
+
+       * mouse.el: move x-selection-owner-p type things to
+       selection-owner-p.
+
+       * msw-init.el: copy zmacs stuff from x-init.el
+
+       * msw-select.el (mswindows-own-selection)
+       (mswindows-disown-selection) (mswindows-selection-owner-p): new
+       functions. Very simple minded implementation of selectio
+       ownership.
+
+       * select.el (own-selection) (disown-selection)
+       (activate-region-as-selection) (select-make-extent-for-selection)
+       (valid-simple-selection-p): functions moved from x-select.el for
+       generalized selection.
+
+       * x-select.el: see select.el changes.
+
+       * x-toolbar.el: use new selection functions.
+
+1998-04-28  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * packages.el (packages-find-package-directories): Fixed bug that
+       would pick up multiple site-package directories.
+       (package-locations): Added "xemacs-packages" as a late package
+       location.
+
+       * find-paths.el: Now uses `emacs-program-name' and
+       `emacs-program-version'.
+       Additions to enforce version-specific directories in
+       `paths-find-version-directory'.
+
+1998-04-29  SL Baur  <steve@altair.xemacs.org>
+
+       * default.el: Removed.
+       * site-start.el: Removed.
+
+1998-04-29  Didier Verna  <verna@inf.enst.fr>
+
+       * minibuf.el (minibuffer-history-minimum-string-length): Default
+       to nil.
+
+1998-04-28  SL Baur  <steve@altair.xemacs.org>
+
+       * find-paths.el (paths-program-name): Rename.
+       (paths-emacs-root-p): Ditto.
+       (paths-find-site-directory): Ditto.
+
+1998-04-26  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * lisp-mode.el (emacs-lisp-mode-popup-menu-1): Add menu entry for
+       `emacs-lisp-byte-compile-and-load'.
+
+1998-04-26  Oscar Figueiredo  <Oscar.Figueiredo@di.epfl.ch>
+
+       * ldap.el (ldap-search): Fixed additional parameter passing to
+       `ldap-open'
+
+1998-04-27  Andy Piper  <andyp@parallax.co.uk>
+
+       * select.el (kill-primary-selection) (selection-owner-p)
+       (copy-primary-selection) (yank-clipboard-selection)
+       (selection-exists-p) (delete-primary-selection): new file and
+       functions that do the right thing for the selected device.
+
+       * x-menubar.el: use generalised selection functions.
+
+       * dumped-lisp.el: dump select.el.
+
+1998-04-27  SL Baur  <steve@altair.xemacs.org>
+
+       * find-paths.el (paths-progname): New variable.
+       (paths-emacs-root-p): Use it.
+       (paths-find-site-directory): Ditto.
+
+1998-04-26  SL Baur  <steve@altair.xemacs.org>
+
+       * loadup.el ((member "dump" command-line-args)): Dump as
+       `infodock' if InfoDock.
+
+1998-04-25  SL Baur  <steve@altair.xemacs.org>
+
+       * find-paths.el (construct-emacs-version): Simplify, include
+       program name in the return value.
+       * (paths-find-version-directory): Use it.
+
+1998-04-25  Oscar Figueiredo  <Oscar.Figueiredo@di.epfl.ch>
+
+       * info.el (Info-parse-dir-entries): Fixed regexp
+       (Info-build-dir-anew): Remove full suffix and capitalize info file 
+       name for files with no @direntry
+       (Info-batch-rebuild-dir): New function
+       (Info-suffixed-file): Check for regular files instead of simple
+       file existence (could catch directories before)
+
+1998-04-25  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * setup-paths.el, find-paths.el: Removed uses of `not' which
+       temacs doesn't have.
+
+       * find-paths.el (paths-find-emacs-roots): Included exec-prefix
+       into root searching.
+
+1998-04-24  Martin Buchholz  <martin@xemacs.org>
+
+       * subr.el: Remove definition of `not'.
+
+Sat Apr 24 1998  Andy Piper  <andyp@parallax.co.uk>
+
+       * msw-glyphs.el: enable graphics support.
+
+1998-04-23  Didier Verna  <verna@inf.enst.fr>
+
+       * x-menubar.el (default-menubar): restored the line-number-mode
+       option.
+
+       * misc doc string updates related to the options menu.
+
+1998-04-24  SL Baur  <steve@altair.xemacs.org>
+
+       * setup-paths.el (paths-construct-load-path): Fix typo.
+
+1998-04-23  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * x-menubar.el (default-menubar): font-menu-this-frame-only-p and
+       font-menu-ignore-scaled-fonts don't have to be bound now; this
+       gets us one step further towards making --no-autoloads work.
+
+       * startup.el (normal-top-level): Load auto-autoloads only if
+       lisp-directory is non-nil.
+
+       * setup-paths.el (paths-construct-load-path): Made it robust
+       against nil lisp-directory.
+
+       * startup.el (startup-setup-paths-warning): Added `lisp-directory'
+       to the list of variables that cause a warning when nil.
+
+       * toolbar.el (init-toolbar-location): Now works even when there's
+       no toolbar icon directory.
+
+1998-04-23  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * help.el (view-lossage): Recognize it.
+
+       * simple.el (log-message): Mark multiline messages.
+
+1998-04-22  SL Baur  <steve@altair.xemacs.org>
+
+       * info.el (Info-exit): `toolbar-info-frame' doesn't necessarily exist.
+
+1998-4-20  Stephen J. Turnbull  <turnbull@sk.tsukuba.ac.jp>
+
+       * package-get.el (package-get-all):  add `\n' separator to
+       interactive specification so that both variables are read
+
+1998-04-22  Didier Verna  <verna@inf.enst.fr>
+
+       * x-menubar.el: ported the options menu to Custom.
+       Moved the "read only" toggle button to the buffers menu.
+       Corrected some missing ;;;###autoload or defcustom.
+
+       * scrollbar.el (scrollbars-visible-p): defcustom wrapper around
+       the scrollbar-visible specifier for options menu handling.
+
+       * toolbar.el (toolbar-visible-p)
+                    (toolbar-captioned-p)
+                    (default-toolbar-position): defcustom wrappers around
+       the toolbar specifiers for options menu handling.
+
+       * frame.el (get-frame-for-buffer-default-instance-limit):
+       defcustom it for options menu handling.
+
+       * font-lock.el (font-lock-mode): defcustom and autolaod the variable
+       font-lock-mode for options menu handling.
+
+       * cus-start.el: added Custom properties to overwrite-mode for
+       options menu handling.
+
+Wed Apr 22 12:59:35 1998  Andy Piper  <andyp@parallax.co.uk>
+
+       * about.el: shameless self-promotion.
+
+1998-04-21  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * simple.el (raw-append-message): Slightly optimize.
+       (remove-message): Use `push' for clarity.
+       (append-message): Ditto.
+       (display-warning): Dito.
+       (raw-append-message): Send the message to the appropriate device.
+
+1998-04-22  SL Baur  <steve@altair.xemacs.org>
+
+       * auto-save.el (auto-save-cyclic-hash-14): De-ebolification.
+       From Sean MacLennan <Sean.MacLennan@pika.ca>
+
+1998-04-18  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * setup-paths.el: Changed `directory-sep-char' to
+       `path-separator', following a change in GNU Emacs.
+
+1998-04-19  Oscar Figueiredo  <Oscar.Figueiredo@di.epfl.ch>
+
+       * info.el (Info-maybe-update-dir): Bug fix in `conservative' behaviour
+       (Info-build-dir-anew): Add a final newline.  
+       (Info-build-dir-anew): Do not issue warning when rebuilding policy 
+       is `always'
+       (Info-rebuild-dir): Ditto
+       
+       * dumped-lisp.el (preloaded-file-list): Added ldap.el
+
+1998-04-21  SL Baur  <steve@altair.xemacs.org>
+
+       * simple.el (count-words-buffer): Retain zmacs region.
+       (count-words-region): Ditto.
+       * simple.el: (what-line): Expanded line counts.
+       (count-lines): New parameter to conditionalize whether collapsed
+       lines get counted.
+       From Bob Weiner <weiner@altrasoft.com>
+
+1998-04-19  SL Baur  <steve@altair.xemacs.org>
+
+       * packages.el (package-locations): infodock-packages must override 
+       mule-packages and packages.
+
+1998-04-19  Jonathan Harris <jhar@tardis.ed.a.uk>
+
+       * wid-edit.el:
+       remove rude messages from widget-activation-widget-mapper
+       and widget-activation-glyph-mapper
+
+1998-04-17  Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+       * toolbar.el: Remove (featurep 'x) test from
+       toolbar-make-button-list
+
+1998-04-17  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * gnuserv.el (gnuserv-edit): Switch to the next gnuserv buffer
+       only if in the same frame.
+
+1998-04-17  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * packages.el (package-locations): Added site-packages hierarchy.
+
+       * setup-paths.el (paths-default-info-directories): Introduced and
+       used.
+
+       * packages.el, setup-paths.el: Set various path searching depths
+       to 1.
+
+       * packages.el (packages-hierarchy-depth): 
+       (packages-load-path-depth): Introduced and used.
+
+       * setup-paths.el (paths-load-path-depth): Introduced and used.
+
+       * find-paths.el (paths-find-recursive-path): Added max-depth
+       parameter.
+
+1998-04-15  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * setup-paths.el (paths-construct-info-path): Removed 
+       dependency on behavior of (file-name-as-directory "").
+
+1998-04-09  Oscar Figueiredo  <Oscar.Figueiredo@di.epfl.ch>
+
+       * ldap.el (ldap-search): Adapt to the new low-level API using ldap 
+       lisp objects
+
+1998-04-14  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * dump-paths.el, startup.el: Added handling for --debug-paths.
+
+1998-04-15  William M. Perry  <wmperry@aventail.com>
+
+       * wid-edit.el: We cannot just set the help-echo or balloon-help
+         properties for an extent based on the :help-echo widget
+         property, since help-echo and balloon-help cause an EXTENT to
+         get passed in, where :help-echo functions are expecting a WIDGET 
+
+1998-04-15  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * scrollbar.el (init-scrollbar-from-resources): Call
+       mswindows-init-scrollbar-metrics when appropriate.
+
+Thu Apr 16 12:59:35 1998  Andy Piper  <andyp@parallax.co.uk>
+
+       * dumped-lisp.el: dump x-toolbar for window system
+
+       * msw-init.el (init-post-mswindows-win): enable toolbars if we
+       have support and xpm.
+
+1998-04-16  SL Baur  <steve@altair.xemacs.org>
+
+       * files.el (toggle-read-only): Fix docstring.
+       From Didier Verna <verna@inf.enst.fr>
+
+1998-04-14  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * startup.el (normal-top-level): Load autoload-file-name without
+       specifying an extension---some people only auto-autoload.el.gz.
+
+1998-04-06  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * files.el (backup-enable-predicate): Don't bomb on NAME being
+       nil.
+
+1998-04-13  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * find-paths.el, packages.el: Now prefers configure'd paths.
+       This shouldn't cause any of the originally anticipated problems as
+       the current paths architecture will not define the various
+       configure-xxx variables if they're not specified on the configure
+       command line.
+
+       * find-paths.el, setup-paths.el, packages.el: Removed all
+       mentionings of "/" as a path separator.
+       Used paths-construct-path throughout.
+
+       * find-paths.el (paths-construct-path): Created to assemble paths
+       from directory components.
+
+       * setup-paths.el, packages.el: Used paths-decode-directory-path
+       instead of decode-path-internal.
+
+       * find-paths.el: Removed unused (and bogus) paths-find-emacs-path
+       and associates.
+       (paths-decode-directory-path) Created.
+
+       * setup-paths.el: Changed configure-exec-path to
+       configure-exec-directory.
+
+1998-04-11  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * packages.el (packages-find-packages): Fixed decoding of
+       EMACSPACKAGEPATH.
+
+       * startup.el: -no-packages -> -no-early-packages.
+
+       (packages-load-package-lisps): Fixed loading of auto-autoload
+       files.
+
+       * startup.el (normal-top-level): Fixed loading of core
+       auto-autoload.
+
+       * obsolete.el: Un-obsoleted site-directory.  Sigh.
+
+       * startup.el, packages.el, dump-paths.el: Added proper settings
+       for site-directory and lisp-directory variables.
+
+       * startup.el, loadup.el: Renamed inhibit-update-autoloads to
+       inhibit-package-autoloads and fixed handling of it.
+
+       * startup.el, packages.el, dump-paths.el, loadup.el: Fixed
+       handling of former inhibit-package-init, now
+       inhibit-early-packages, to make -vanilla etc. work.
+
+1998-04-10  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * code-process.el (start-process): Fallback to 'undecided instead
+       of 'binary for process input coding stream.
+
+       * process.el (start-process): Docstring fix.
+
+1998-04-09  Oscar Figueiredo  <Oscar.Figueiredo@di.epfl.ch>
+
+       * info.el (Info-insert-dir): Do not insert temporary dir files
+       in Info-dir-file-attributes
+       (Info-build-dir-anew): Ensure temporary buffer is not read-only
+       (Info-rebuild-dir): Ditto.
+
+1998-04-09  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * obsolete.el: Added obsoleteness declarations for
+       `site-directory' and `Info-default-directory-list'.
+
+1998-04-08  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * find-paths.el (paths-find-emacs-root): Only look at the
+       executable at the end of the symlink chain for determining the
+       Emacs root.
+
+1998-04-07  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * setup-paths.el (paths-construct-info-path): Changed construction
+       to cater to gone default in configure.
+
+       * find-paths.el (paths-uniq-append): Added.
+
+       * packages.el: Rewritten package path construction once again.
+
+       * dump-paths.el, startup.el: Removed package-path as a global
+       variable.
+
+       * package-admin.el (package-admin-add-single-file-package): 
+       (package-admin-add-binary-package): Changed package-path to
+       late-packages.
+
+       * packages.el (packages-split-path): Split path at "/" rather than
+       nil according to change in emacs.c.
+
+1998-04-06  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * setup-paths.el (paths-construct-info-path): Changed info path
+       order so that directories come out right.
+       (paths-find-lock-directory): Fixed bug: It used to think
+       configure-lock-directory is a path.
+
+1998-04-06  Jeff Miller <jmiller@smart.net>
+
+       * x-toolbar.el:  Added toolbar-vector-xxxxxx defvars.  Modified
+       initial-toolbar-spec to use new toolbar-vector-xxxxxx defvars.  This
+       eases the use of toolbar-add/kill-item functions. 
+
+1998-04-07  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * code-files.el (file-coding-system-alist): Commented out
+       loaddefs.el magical treatment.
+
+1998-04-06  Oscar Figueiredo  <Oscar.Figueiredo@di.epfl.ch>
+
+       * info.el (Info-rebuild-outdated-dir): Added new option
+       `conservative' and made it the default
+       (Info-rebuild-dir): Appropriately parse multi-line description
+       strings, and multi-section dir files. Issue warning when dir
+       is rebuilt as temporary
+       (Info-build-dir-anew): Issue warning when dir is built as 
+       temporary
+
+1998-04-04  Kirill M. Katsnelson  <kkm@kis.ru>
+       * list-mode.el (list-mode-map): Bind highlight motion commands to
+       standard keys left, right, C-b and C-f.
+
+1998-03-29  Karl M. Hegbloom  <karlheg@bittersweet.inetarena.com>
+
+       * files.el (auto-mode-alist): allow .sc for Scheme->C
+
+1998-04-06  SL Baur  <steve@altair.xemacs.org>
+
+       * loadup.el (pureload): Don't quote (garbage-collect).
+
+1998-04-04  SL Baur  <steve@altair.xemacs.org>
+
+       * package-get-base.el: Updated.
+
+1998-04-04  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * isearch-mode.el (isearch-just-started): New variable.
+       (isearch-mode): Set it.
+       (isearch-repeat): Advance one character forward only if the search 
+       was successful, and was not just started.
+       (isearch-repeat): Clear isearch-just-started.
+
+1998-04-02  SL Baur  <steve@altair.xemacs.org>
+
+       * finder.el (finder-compile-keywords): Don't eval new finder-inf
+       if running -batch.
+
+1998-03-26  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * subr.el (listify-key-sequence): Removed.
+
+1998-03-31  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * bytecomp.el (byte-compile-print-gensym): New option.
+       (byte-compile-output-file-form): Use it.
+       (byte-compile-output-docform): Ditto.
+       (byte-compile-compiled-obj-to-list): Ditto.
+
+Sun Mar 29 1998  Andy Piper  <andyp@parallax.co.uk>
+
+       * msw-glyphs.el: set frame icon if xpm support.
+
+1998-03-30  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * help.el: Code that pretty prints variable values
+         removed.
+
+1998-04-02  SL Baur  <steve@altair.xemacs.org>
+
+       * find-paths.el (paths-emacs-root-p): Correct test for installation
+       directory.
+       From Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+1998-03-30  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * loaddefs.el: Don't set debug-ignored-errors; leave 
+         its default value set to nil.
+
+1998-03-29  Damon Lipparelli  <lipp@primus.com>
+
+       * info.el (Info-rebuild-dir): fixed mis-spelling.
+
+1998-03-29  Oscar Figueiredo  <Oscar.Figueiredo@di.epfl.ch>
+
+       * info.el (Info-rebuild-outdated-dir): New custom var
+       (Info-insert-node): Create/update dir file when needed, ie when it 
+       does not exist or is older than some info files in directory
+
+1998-04-01  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * setup-paths.el, dump-paths.el, startup.el, packages.el: Allowed
+       for last packages, mainly for using a 20.4 package base.
+
+       * packages.el (late-packages): Typo fix.  It was called
+       early-packages.
+
+       * find-paths.el (paths-find-emacs-root): Bug fix: it now chases
+       relative symlinks correctly.
+       (paths-find-emacs-roots): More rigorous checking for plausible
+       configuration-time root.
+
+       * startup.el (normal-top-level): Added a warning if XEmacs cannot
+       find its roots.
+
+1998-03-27  Martin Buchholz  <martin@xemacs.org>
+
+       * faces.el: Fix docstrings.
+       * glyphs.el: Fix docstrings.
+       * mouse.el: Fix docstrings.
+
+       * frame.el: Change phrase `current frame' to `selected frame'.
+
+       * faces.el (face-spec-set-match-display): Make FRAME arg optional.
+
+       * bytecomp.el (displaying-byte-compile-warnings): Rewrite some
+       macros using backquote to make them infinitely more readable.
+
+1998-03-30  SL Baur  <steve@altair.xemacs.org>
+
+       * packages.el (packages-find-package-path): Hardcoded specialized
+       InfoDock support until we can clean this up.
+
+       * help.el (describe-bindings-1): Return the value of the bindings
+       help buffer created.
+       (describe-bindings): Ditto.
+
+       * simple.el (set-variable): Restore previous behavior of not
+       bombing if the variable to set is not boundp.
+
+1998-03-30  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * packages.el (packages-handle-package-dumped-lisps): Allow for
+       non-local files to be loaded off the package-lisp variable.
+
+1998-03-27  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * x-faces.el: Global X resources should override
+         specs for all device classes (color, grayscale, mono);
+         code currently doesn't override any of them.  Fixed by
+         calling remove-specifier with '(x default) as the tag
+         set and allowing inexact matches.
+
+1998-03-27  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * faces.el: Separated face intializations based on
+         device classes into device type specific (tag set,
+         instantiator) pairs.
+
+1998-03-09  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * wid-edit.el (widget-choice-action): Remember user's explicit
+       choice.
+       (widget-choice-value-create): Respect it.
+       From Richard Stallman <rms@gnu.org>
+
+1998-03-26  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * setup-paths.el (paths-construct-info-path): Always append
+       existing directories from configure-time info path.
+
+       * startup.el (startup-setup-paths): Renamed misnamed info-path to
+       Info-directory-list.
+
+       * info.el: Removed Info-default-directory-list which was broken by
+       design.
+       Removed bogus initialization of Info-directory-list---startup.el
+       can do a much better job.
+       Added autoload of Info-directory-list.
+
+       * setup-paths.el (paths-construct-load-path): Fixed a bug pointed
+       out by Martin Buchholz <martin@xemacs.org>: EMACSLOADPATH used to
+       be exclusive; now it's merely given precedence, just like in the
+       old days.
+
+1998-03-25  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * find-paths.el (paths-find-architecture-directory): Fix bug with
+       finding; it used to default too early.
+
+1998-03-25  Martin Buchholz <martin@xemacs.org>
+
+       * packages.el (packages-split-path): Fix a bug; it used to fail
+       for paths that weren't split.
+
+1998-03-26  SL Baur  <steve@altair.xemacs.org>
+
+       * finder.el (finder-compile-keywords): trap on errors.
+
+1998-03-24  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * x-faces.el (remove-specifier-specs-matching-tag-set-cdrs): Pass
+         fourth argument of t so that only the specs exactly
+         matching the tag lists are removed.
+
+1998-03-25  SL Baur  <steve@altair.xemacs.org>
+
+       * make-docfile.el: Don't discard the BOOTSTRAPLOADPATH.
+
+1998-03-23  SL Baur  <steve@altair.xemacs.org>
+
+       * minibuf.el (mouse-read-file-name-1): If a default directory was
+       specified, use it for generating the completions.
+
+1998-03-23  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * update-elc.el: Now respects inhibit-package-init and
+       inhibit-site-lisp.
+       Now does path construction with loadup-paths.
+
+       * startup.el (normal-top-level, startup-setup-paths): Now respects
+       inhibit-package-init and inhibit-site-lisp.
+
+       * packages.el (packages-find-package-path): Extended package path
+       by version-specific hierarchies.
+       (packages-find-packages): Now respects inhibit flag and
+       inhibit-site-lisp.
+       Moved path setup to loadup-paths.
+
+       * make-docfile.el: Now respects inhibit-package-init and
+       inhibit-site-lisp.
+       Now does path construction with loadup-paths.
+
+       * loadup.el: Now respects inhibit-package-init and
+       inhibit-site-lisp.
+
+       * dumped-lisp.el (preloaded-file-list): Added loadup-paths.
+
+       * loadup-paths.el: New file: setup load-path to encompass
+       packages.
+
+1998-03-22  SL Baur  <steve@altair.xemacs.org>
+
+       * auto-show.el: load-gc renamed to pureload.
+       * site-load.el: Ditto.
+       * packages.el (toplevel): Ditto.
+       * loadup.el (really-early-error-handler): Ditto.
+       * dumped-lisp.el (preloaded-file-list): Ditto.
+       * cus-face.el (custom-declare-face): Ditto.
+
+1998-03-22  Michael Sperber [Mr. Preprocessor]  <sperber@informatik.uni-tuebingen.de>
+
+       * <Today>: The Big Path Searching Overhaul.
+
+       * find-paths.el: New file: find and assemble paths in the
+       installation hierarchy.
+
+       * setup-paths.el: New file: global layout of paths and directories
+       within the XEmacs hierarchy.
+
+       * packages.el: Replaced everything related to path searching and
+       startup by code in terms of find-paths.
+
+       * loadup.el, make-docfile.el, update-elc.el, startup.el: Now calls
+       the new path searching engine.
+
+       * dumped-lisp.el (preloaded-file-list): Added new files find-paths
+       and setup-paths.
+
+1998-03-22  SL Baur  <steve@altair.xemacs.org>
+
+       * dumped-lisp.el (preloaded-file-list): Load setup-paths.elc not
+       setup-paths.el.
+
+1998-03-20  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * msw-glyphs.el: Added check for 'mswindows feature, so the file
+       compiles identically in any configuration.
+       Removed irrelevant commentary.
+
+1998-03-20  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * simple.el (set-variable): Allow setting specifiers.
+
+1998-03-19  SL Baur  <steve@altair.xemacs.org>
+
+       * lisp.el (forward-sexp): Revert previous change.
+
+1998-03-18  SL Baur  <steve@altair.xemacs.org>
+
+       * frame.el (frame-initialize): Use `delete-console' instead of
+       `delete-device' to delete the stream console to match the usage in 
+       Fkill_emacs.
+
+1998-03-16  SL Baur  <steve@altair.xemacs.org>
+
+       * files.el (cdpath-previous): New variable.
+       (cd): Use it.
+       From Bob Weiner <weiner@wave.altrasoft.com>
+
+1998-03-15  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * keydefs.el: Changed keybindings of forward-char,
+         backward, scroll-up and scroll-down to point to their
+         -command counterparts.
+
+       * simple.el: New functions: forwarc-char-command,
+         backwrad-char-command, scroll-up-command,
+         scroll-down-command which work liek their counterparts
+         except that they honor the variable
+         signal-error-on-buffer-boundary.
+
+         Definition of signal-error-on-buffer-boundary received
+         from src/cmds.c.
+
+         defvar declaration added for word-across-newline to avoid
+         byte-compiler warning about the free variable reference.
+
+1998-03-14  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * winnt.el: Removed "%t" from the beginning of
+       modeline-format. From now on, there's no nt-specifics in the modeline.
+
+1998-03-14  SL Baur  <steve@altair.xemacs.org>
+
+       * setup-paths.el (paths-setup-paths-warning): Replace occurrences
+       of `when' with `if'.
+
+1998-03-03  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * msw-glyphs.el: New file. Defines TTY-style glyphs for
+       mswindows. Must be reworked along with glyphs.el, or 
+       merged into it, after there is images support.
+
+       * dumped-lisp.el (preloaded-file-list): Dump msw-glyphs.el when
+       'mswindows. 
+
+1998-03-13  SL Baur  <steve@altair.xemacs.org>
+
+       * faces.el: fix for text cursor initialization.
+       Suggested by Kyle Jones <kyle_jones@wonderworks.com>
+       From Andy Piper <andyp@parallax.co.uk>
+
+1998-03-11  Pete Ware  <ware@cis.ohio-state.edu>
+
+       * files.el (set-auto-mode): If a mode is not fboundp, check to see 
+       if there is an existing package that handles it and warn the user
+       about that mode.
+
+1998-03-02  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * x-menubar.el (default-menubar): Greyed out "Help / Basics /
+       Installation" menu item when Installation-string is not bound.
+
+1998-03-11  SL Baur  <steve@altair.xemacs.org>
+
+       * lisp.el (forward-sexp): Fix for test for balanced sexp.
+       From Jeremiah W. James <jerry@cs.ucsb.edu>
+
+1998-03-10  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * msw-faces.el:
+       * faces.el: Fix face initialization.
+
+1998-03-10  Glynn Clements  <glynn@sensei.co.uk>
+
+       * files.el (backup-enable-predicate): fix breakage introduced 
+       by TMPDIR patch.
+
+1998-03-09  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * x-faces.el (x-init-face-from-resources): The
+         TTY face property retrieval functions don't return
+         specifiers, so use face-property instead.
+
+1998-03-09  SL Baur  <steve@altair.xemacs.org>
+
+       * mwheel.el (mwheel-install): Use portable keysyms and syntax.
+
+1998-03-09  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * x-menubar.el: Expanded documentation for
+         option-save-faces.  Changed Options -> Browse Faces
+         menu entry to invoke customize-face.
+
+1998-03-09  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * faces.el: Most face initialization moved out of
+         init-other-random-faces to the top level so that the
+         initialization happens before Xemacs is dumped.  Much
+         of the fascist "face-differs-from-default-p or FROB!"
+         code has been retired in favor of letting the user do
+         what they want to do.  Face initialization code changed
+         to use `default' specifier tag so that the settings can
+         be overridden later if the user wishes it.
+
+1998-03-08  SL Baur  <steve@altair.xemacs.org>
+
+       * about.el (about-hackers): Update contributors list.
+
+1998-03-07  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * specifier.el: Define new specifier tag `default'.
+
+       * modeline.el: Initialize faces using `default' tag.
+
+       * x-faces.el (x-init-face-from-resources): Remove
+         specifier specs containing the `default' tag before
+         adding new specs.
+
+1998-03-02  John Jones  <jj@asu.edu>
+
+       * package-get.el (package-get-all): fixed arguments on call to
+       package-admin-add-single-file-package.
+       * package-get.el (package-get-installedp): fixed to match
+       advertised behavior.
+       * package-get.el: added function package-get-update-all which
+       installs newest versions of all the current packages (if they are
+       not already installed).
+
+1998-03-04  Jens-Ulrik Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * files.el (find-file-noselect): Uncommented `truename' binding in
+       `let*' and use it later to set `buffer-file-truename' iff it's
+       still nil, as happens for example when finding a compressed
+       file with "jka-compr".
+
+Wed Mar 04 08:55:12 1998  Andy Piper  <andyp@parallax.co.uk>
+
+       * faces.el: in make-face-* type functions do the operation for all
+       window systems, not just the first one found.
+
+       * font.el: call mswindows-list-fonts for mswindows.
+
+1998-03-02  Glynn Clements  <glynn@sensei.co.uk>
+
+       * code-process.el (call-process-region):
+       * process.el (call-process-region):
+       * package-get.el (package-get-dir):
+       * files.el (backup-enable-predicate):
+       * gnuserv.el (gnuserv-temp-file-regexp):
+       Use temp-directory in place of `/tmp'.
+
+Fri Feb 20 21:22:34 1998  Darryl Okahata  <darrylo@sr.hp.com>
+
+       * "Fast" dired-in-C enhancements for Windows 95/NT:
+
+       * files.el: Added function, `wildcard-to-regexp', from GNU
+         Emacs.
+
+       * files.el (insert-directory): Modified to use special
+         dired-in-C enhancements if present.
+
+Mon Mar 02 11:37:36 1998  Andy Piper  <andyp@parallax.co.uk>
+
+       * code-files.el: make default coding no-conversion.
+
+1998-03-02  SL Baur  <steve@altair.xemacs.org>
+
+       * dumped-lisp.el (preloaded-file-list): Find Installation.el from
+       the load-path.
+
+       * update-elc.el: Strip directory when testing for files not to
+       bytecompile.
+
+1998-03-02  Aki Vehtari  <Aki.Vehtari@hut.fi>
+
+       * lisp-mode.el: Use recommended form for menus.
+
+       * info.el (Info-construct-menu): Use recommended form for menus.
+
+       * gnuserv.el (gnuserv-edit-files): Use recommended form for menu
+       entry.
+
+1998-02-28  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * frame.el: Resurrect get-frame-for-buffer-default-to-current.
+         (get-frame-for-buffer-noselect): Always return frames
+         in the not-this-window-p cond clause.
+
+1998-02-27  SL Baur  <steve@altair.xemacs.org>
+
+       * help.el (describe-installation): New function.
+
+       * x-menubar.el (default-menubar): Add describe-installation to
+       Help menu.
+
+       * packages.el (packages-unbytecompiled-lisp): Installation.el
+       should not be bytecompiled.
+
+       * dumped-lisp.el (preloaded-file-list): Dump Installation with
+       XEmacs.
+
+       * x-menubar.el (default-menubar): Use correct guard for VM menu
+       entry.
+
+       * coding.el: Add coding systems for iso-8859-[12] for No-Mule + file
+       coding.
+       From Andy Piper <andyp@parallax.co.uk>
+
+1998-02-26  Oscar Figueiredo  <Oscar.Figueiredo@di.epfl.ch>
+
+       * ldap.el: Do not require ldap-internal at compile time.
+
+Tue Feb 17 12:50:37 1998  Andy Piper  <andyp@parallax.co.uk>
+
+       * code-files.el: new file. a virtual copy of mule-files.el
+       but without charset
+       dependencies. (toggle-buffer-file-ocding-system) new function for
+       changing the eol type for the current buffer.
+
+       * code-process.el: new file. a copy of
+       mule-process.el. mule-process.el will disappear when things have
+       settled.
+
+       * coding.el: new file. a virtual copy of mule-files.el but
+       without charset dependencies. (coding-system-base) new function
+       for getting the parent coding system of a coding system with eol
+       type set.
+
+       * dumped-lisp.el: add above files for the non-mule case.
+
+1998-02-25  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * window-xemacs.el (display-buffer): If no explicit
+         frame is specified, search for a window that displays
+         the buffer on the currently selected frame, before
+         searching other frames.
+
+1998-02-25  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * frame.el (get-frame-for-buffer): If not-this-window-p
+         is non-nil, use window on the selected frame if it is not
+         also the selected window.  When defaulting, search for
+         windows on the currently selected fgrame before searching
+         other frames.
+
+1998-02-25  Didier Verna  <verna@inf.enst.fr>
+
+       * modeline.el (modeline-swap-buffers): originally named
+       `mouse-release-modeline'. Whether to actually swap the buffers is
+       decided in `mouse-drag-modeline'.
+       (mouse-drag-modeline): A button release event is considered a
+       mouse click is both X (modeline scroll) and Y (modeline drag) pos
+       stay unchanged. 
+
+1998-02-25  SL Baur  <steve@altair.xemacs.org>
+
+       * x-menubar.el: Put redo on the menubar.
+       From Aki Vehtari <Aki.Vehtari@hut.fi>
+
+1998-02-22  Greg Klanderman  <greg@alphatech.com>
+
+       * bytecomp.el (displaying-byte-compile-warnings): if
+       temp-buffer-show-function is set, use it to display current set of
+       warnings in the "*Compile-Log-Show*" buffer.
+
+       * simple.el (display-warning-buffer): if temp-buffer-show-function
+       is set, use it to display current set of warnings in the
+       "*Warnings-Show*" buffer.
+
+1998-02-20  Karl M. Hegbloom  <karlheg@bittersweet.inetarena.com>
+
+       * cl-extra.el (equalp): Make (equalp ?A ?a) return t as in
+       Common Lisp.
+
+1998-02-23  Aki Vehtari  <Aki.Vehtari@hut.fi>
+
+       * menubar.el: Allow button descriptors at least 2 long.
+
+       * x-menubar.el (default-menubar): Use recommended forms.
+       (file-menu-filter): Remove.
+       (edit-menu-filter): Remove.
+
+1998-02-24  SL Baur  <steve@altair.xemacs.org>
+
+       * about.el (about-hackers): Updated.
+
+1998-02-22  Greg Klanderman  <greg@alphatech.com>
+
+       * help.el (help-max-help-buffers): new variable
+       (help-register-and-maybe-prune-excess): new function
+       (help-buffer-name): use help-max-help-buffers.
+       (with-displaying-help-buffer): use
+       help-register-and-maybe-prune-excess.
+
+       * help.el (help-maybe-pretty-print-value): if the value fits on
+       one line, let it.
+
+1998-02-21  Greg Klanderman  <greg@alphatech.com>
+
+       * (with-displaying-help-buffer): there is no need to kill the buffer
+       if it exists, becasuse with-output-to-temp-buffer will clear it.
+       further, killing the buffer violates the rule that
+       temp-buffer-show-function, if set, has the full responsibility of
+       showing the temp buffer.  killing the buffer fucks with the window 
+       configuration, hosing temp-buffer-show-function.
+
+
+1998-02-23  Didier Verna  <verna@inf.enst.fr>
+
+       * modeline.el (mouse-drag-modeline): 
+       - Always scroll the modeline that was originally clicked on.
+       - Use x pixels instead of x characters (which doesn't work anyway) 
+       as horizontal reference for modeline dragging. This allows us to
+       keep on dragging the modeline even if the motion event occurs in
+       another window. 
+
+1998-02-23  Didier Verna  <verna@inf.enst.fr>
+
+       * x-mouse.el (x-init-pointer-shape): use a crossed-arrows cursor
+       glyph on the modeline to indicate that dragging the mouse has an
+       effect both horizontally and vertically.
+
+1998-02-24  SL Baur  <steve@altair.xemacs.org>
+
+       * about.el (about-xemacs): Get rid of redundant visible version
+       number.
+
+1998-02-19  SL Baur  <steve@altair.xemacs.org>
+
+       * about.el (about-hackers): Update credits.
+
+1997-12-22  Christoph Wedler  <wedler@fmi.uni-passau.de>
+
+       * prim/register.el (view-register): Show register type file-query.
+
+1998-02-17  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * mode-motion.el (mode-motion-highlight-internal):
+         save-excursion inside save-window-exucrsion form to
+         hide buffer point changes from save-window-excursion.
+         Prevents display flickering when the mouse pointer
+         moves.
+
+1998-02-17  Didier Verna  <verna@inf.enst.fr>
+
+       * mouse.el (default-mouse-track-set-point-in-window): rewrote this
+       function to handle correctly the case of a toolbar one side of the 
+       window: scrolling will not necessarily happen.
+
+1998-02-17  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * files.el (after-find-file): Restore missing argument
+         to format that provides filename for "... consider M-x
+         recover-file" message.  Also call `message' with "%s"
+         as the first arg instead of an arbitrary string.
+
+1998-02-18  SL Baur  <steve@altair.xemacs.org>
+
+       * about.el (about-hackers): Various additions.
+
+1998-02-15  SL Baur  <steve@altair.xemacs.org>
+
+       * autoload.el (generate-file-autoloads-1): Don't force an extra
+       line out when copying on-the-same line autoloads.
+
+       * x-menubar.el (default-menubar): Add Sokoban to the menubar if it 
+       is installed.
+
+1998-02-14  Martin Buchholz  <martin@xemacs.org>
+
+       * x11/x-win-xfree86.el (x-win-init-xfree86): 
+       * x11/x-win-sun.el (x-win-init-sun): 
+       * x11/x-init.el (x-initialize-compose): 
+       * prim/simple.el:
+       (backward-or-forward-kill-sexp): 
+       (backward-or-forward-kill-sentence): 
+       (backward-or-forward-kill-word): 
+       (backward-or-forward-delete-char): 
+       * prim/isearch-mode.el (isearch-help-or-delete-char): 
+       Use x-keysym-on-keyboard-sans-modifiers-p instead of
+       x-keysym-on-keyboard-p to detect backspace.
+       Use symbols instead of strings (now deprecated) with x-keysym-*-p.
+       Clean up symbols used with dead keys, checking Linux and solaris
+       keysyms.
+       Simplify x-win-*.el using above methods.
+       Change documentation for x-keysym-*-p functions.
+
+1998-02-14  SL Baur  <steve@altair.xemacs.org>
+
+       * about.el (about-hackers): Restore entries for Michael Sperber and
+       Vinnie Shelton.
+       From Vinnie Shelton <acs@acm.org>
+
+1998-02-14  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * simple.el (count-words-region): Ditto.
+
+1998-02-12  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * simple.el (count-words-buffer): Document.  Don't print anything
+       if non-interactive.
+
+1998-02-12  SL Baur  <steve@altair.xemacs.org>
+
+       * packages.el (packages-hardcoded-lisp): easymenu.el is in
+       multiple files in InfoDock.
+
+1998-02-11  SL Baur  <steve@altair.xemacs.org>
+
+       * packages.el (packages-hardcoded-lisp): id-vers.elc is loaded
+       from version.el in InfoDock.
+
+       * dumped-lisp.el (preloaded-file-list): Don't treat InfoDock
+       specially.
+
+1998-02-09  Karl M. Hegbloom  <karlheg@bittersweet.inetarena.com>
+
+       * bytecomp-runtime.el (proclaim-inline): Single quotes around
+       variable name in docstring.
+
+1998-02-10  Andreas Jaeger  <aj@arthur.rhein-neckar.de>
+
+       * menubar.h: Include "gui.h".
+
+1998-02-10  SL Baur  <steve@altair.xemacs.org>
+
+       * site-load.el: Fix documentation.
+
+1998-02-09  SL Baur  <steve@altair.xemacs.org>
+
+       * package-get-base.el (package-get-base): Updated.
+
+       * keymap.el: PC-ize.
+
+1998-02-08  Karl M. Hegbloom  <karlheg@bittersweet.inetarena.com>
+
+       * hyper-apropos.el (hyper-apropos-get-doc): Print the `loaded
+       from' on a fresh line.
+
+1998-02-08  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * help.el (help-maybe-pretty-print-value): prin1, not princ the
+       object.
+
+1998-02-09  SL Baur  <steve@altair.xemacs.org>
+
+       * undo-stack.el: PC-ize.
+
+       * cmdloop.el: PC-ize.
+
+1998-02-08  SL Baur  <steve@altair.xemacs.org>
+
+       * bytecomp-runtime.el: PC-ize.
+
+       * byte-optimize.el: Prolog fixup.  PC-ize.
+
+       * cus-dep.el: Spelling fix.
+
+       * text-mode.el: Synch with Emacs 20.2.  (Original ChangeLog
+       entries follow).
+
+1997-08-29  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
+
+       * text-mode.el (text-mode-hook-identify): New function,
+       put on text-mode-hook.  Set text-mode-variant here.
+       (text-mode): Don't set it here.
+
+1997-08-27  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
+
+       * text-mode.el (text-mode-hook): New defvar.
+       (text-mode-variant): New variable.
+       (text-mode): Set that variable locally.
+       (toggle-text-mode-auto-fill): New command.
+
+1997-06-15  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
+
+       * text-mode.el (text-mode): Let all-white lines separate paragraphs.
+       
+1997-06-11  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
+
+       * text-mode.el (paragraph-indent-text-mode):
+       Renamed from spaced-text-mode.
+       (text-mode-map): Bind TAB to indent-relative.
+       (indented-text-mode-map): Variable deleted.
+       (indented-text-mode): Now an alias for text-mode.
+
+1998-02-05  SL Baur  <steve@altair.xemacs.org>
+
+       * loadup.el: test-atoms debugging stuffs removed.
+
+1998-02-03  Martin Buchholz  <Martin Buchholz <martin@xemacs.org>>
+
+       * lisp/loaddefs.el (completion-ignored-extensions): Add ".class"
+
+1997-12-30  Colin Rafferty  <colin@xemacs.org>
+
+       * help.el (describe-beta): Made it use `locate-data-file'.
+       (describe-distribution): Ditto.
+       (describe-copying): Ditto.
+       (describe-project): Ditto.
+       (view-emacs-news): Ditto.
+
+       * help-nomule.el (help-with-tutorial): Made it use
+       `locate-data-file' to find tutorial.
+
+1998-01-28  Jonathon Harris  <jhar@tardis.ed.ac.uk>
+
+       * about.el: Corrected my email address.
+
+       * mouse.el: Added 'mouse-mswindows-drop' similar to
+       'mouse-offix-drop'.
+
+1998-01-27  SL Baur  <steve@altair.xemacs.org>
+
+       * loadup.el (running-xemacs): Spelling fix.
+
+1998-01-26  Colin Rafferty  <colin@xemacs.org>
+
+       * packages.el (packages-find-packages-1): Don't allow a backwards
+       compatible lisp tree to overwrite `preloaded-file-list'.
+
+1998-01-26  SL Baur  <steve@altair.xemacs.org>
+
+       * loadup.el: Don't delete "xemacs" prior to dumping.
+
+1998-01-24  SL Baur  <steve@altair.xemacs.org>
+
+       * package-info.el (pi-last-mod-date): New function.
+       (pi-author-version): New function.
+       (batch-update-package-info): Use them.
+
+1998-01-23  Colin Rafferty  <colin@xemacs.org>
+
+       * frame.el (get-frame-for-buffer-default-to-current): Create.
+       (get-frame-for-buffer-noselect): Allow user to use current frame
+       with `get-frame-for-buffer-default-to-current'.
+
+1998-01-22  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * bytecomp.el (byte-compile-output-file-form): Set print-gensym.
+       (byte-compile-output-docform): Ditto.
+       (byte-compile-compiled-obj-to-list): Ditto.
+
+1998-01-22  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * startup.el (command-line-1): Removed code that ran
+         buffer-menu.
+
+1998-01-21  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * help-macro.el (make-help-screen): Bind `help-read-key' via flet.
+
+1998-01-17  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * frame.el (suspend-emacs-or-iconify-frame): Check using
+       `device-on-window-system-p' instead of explicitly checking for X,
+       so that the same logic works for MS Windows.
+       (suspend-or-iconify-emacs): Ditto.
+
+1998-01-14  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * about.el (about-maintainer-info): Andy Piper is back.
+       (xemacs-hackers): Updated Andy Piper's email address.
+       (about-hackers): Added Jonathan Harris.
+       (about-hackers): Updated Tibor Polgar's email address.
+
+1998-01-18  SL Baur  <steve@altair.xemacs.org>
+
+       * about.el: Add xemacs.org email manager.
+
+       * package-get-base.el (package-get-base): Updated with most recent 
+       package updates.
+
+1998-01-14  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * help.el (function-arglist): Use `indirect-function' instead of
+       `symbol-function' so that aliases are treated correctly.
+
+1998-01-13  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * help.el (help-map): Add f1 binding to `help-for-help'.
+       Suggested by Karl M. Hegbloom <karlheg@inetarena.com>.
+       (describe-key-briefly): Use `princ' "%s" to print object.
+       (with-displaying-help-buffer): Kill buffer if it exists, again.
+       (describe-key): Use `princ' "%s" to print object.
+       (describe-function-1): Use `princ' "%s" to print object.
+       Commented out alias lines removed.
+       (help-pretty-print-limit): New variable to control pretty-printing 
+       of variable values.
+       (help-maybe-pretty-print-value): Steve wins!  Renamed back from
+       `help-pretty-print-value' again.  Only print-print when OBJECT is
+       list of length less than `help-pretty-print-limit'.
+       (describe-variable): Use `help-maybe-pretty-print-value' again.
+
+1998-01-18  SL Baur  <steve@altair.xemacs.org>
+
+       * simple.el (blink-matching-open): Remove C++ kludge.
+       Suggested by Bob Weiner <weiner@wave.altrasoft.com>
+
+1998-01-14  Karl M. Hegbloom  <karlheg@bittersweet.inetarena.com>
+
+       * info.el (Info-default-directory-list): Made the documentation
+       more explanitory.
+
+1998-01-13  Martin Buchholz  <martin@xemacs.org>
+
+       * lisp/packages.el: 
+       * lisp/package-admin.el: 
+       * lisp/build-report.el: 
+       Fix typos.
+
+1998-01-14  Christoph Wedler  <wedler@fmi.uni-passau.de>
+
+       * Patches/font-lock.el (java-font-lock-keywords-*): Would produce
+       warnings in Java buffers without final newline and editing the
+       last line.
+
+1998-01-17  SL Baur  <steve@altair.xemacs.org>
+
+       * packages.el (packages-find-packages-1): Don't allow a backwards
+       compatible lisp tree to overwrite `preloaded-file-list'.
+       Suggested by Colin Rafferty  <colin@xemacs.org>
+
+       * mouse.el (mouse-offix-drop): Set undo-boundary.
+       From Oliver Graf <ograf@fga.de>
+
+1998-01-13  SL Baur  <steve@altair.xemacs.org>
+
+       * loadup.el (load-gc): rewrite as defun.
+       Print something sensical if a required dump-time file isn't found.
+
+1998-01-12  SL Baur  <steve@altair.xemacs.org>
+
+       * menubar.el (check-menu-syntax): Emergency dirty fix -- the 0 plist
+       bug strikes a menudescriptor.
+
+       * package-get-base.el (package-get-base): Updated.
+
+       * package-info.el (batch-update-package-info): Derive REQUIRES
+       from the Makefile.
+
+1998-01-13  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * files.el (save-some-buffers): Don't play games with deleting
+       other windows if we are in the minibuffer window.
+
+1998-01-08  Karl M. Hegbloom  <karlheg@bittersweet.inetarena.com>
+
+       * modeline.el (modeline-minor-mode-menu): Add support for :active
+       (add-minor-mode): Document :active property to TOGGLE.
+
+1998-01-07  Karl M. Hegbloom  <karlheg@bittersweet.inetarena.com>
+
+       * modeline.el (modeline-minor-mode-menu): Add support for an
+       `:included' predicate in the `toggle-sym' plist.
+       (add-minor-mode): Document the :included property, format
+       docstring some more.
+       (modeline-minor-mode-menu): Documentation string added.
+
+1998-01-02  Karl M. Hegbloom  <karlheg@bittersweet.inetarena.com>
+
+       * modeline.el (modeline-minor-mode-menu): genmenlab the menu
+       labels from the symbol-names by thwacking off the overly redundant
+       and overused "mode", parenthesizing "minor", and capitalizing the
+       resultant strings.  Also shortened the menu's title by eliminating
+       the redundant buffer name.
+       (add-minor-mode): Beautified the docstring, added mention of the
+       `:menu-tag' property of TOGGLE.
+       (modeline-minor-mode-menu): Frinked the `:menu-tag' property on
+       `toggle-sym' to beatify the mode-life menus.
+       * (abbrev-mode):  (put)'ed a `:menu-tag' on it and
+       `auto-fill-function'.
+
+1998-01-02  Karl M. Hegbloom  <<karlheg@bittersweet.inetarena.com>>
+
+       * modeline.el (modeline-minor-mode-menu): Changed the string-only
+       menus to :style 'toggle.
+
+1997-12-10  Markus Linnala  <maage@cs.tut.fi>
+
+       * simple.el: Use mh-user-agent-compose as mh-e-user-agent.
+
+1997-12-11  Christoph Wedler  <wedler@fmi.uni-passau.de>
+
+       * packages/hyper-apropos.el (hyper-apropos-insert-face): Would
+       only recognize first hyperlink.
+       (hyper-apropos-highlightify): Deletia, this is already done by
+       `hyper-apropos-insert-face'.
+       (hyper-apropos-help-mode): Don't call `hyper-apropos-highlightify.
+
+1998-01-09  SL Baur  <steve@altair.xemacs.org>
+
+       * x-toolbar.el (toolbar-ispell-internal): Use ispell-message for
+       mail.
+       (toolbar-mail-reader): Add support for `send'.
+       From Jonathan Marten <jonathan.marten@UK.Sun.COM>
+
+1998-01-05  Karl M. Hegbloom  <<karlheg@bittersweet.inetarena.com>>
+
+       * info.el (Info-emacs-info-file-name): Add defvar for
+       `Info-emacs-info-file-name' so that `Info-goto-emacs-command-node'
+       will function properly.
+
+1998-01-05  Gary D. Foster  <gfoster@ragesoft.com>
+
+       * simple.el: make the backwards delete function called by
+       `backward-or-forward-delete-char' user configurable.
+
+1998-01-09  Karl M. Hegbloom  <karlheg@bittersweet.inetarena.com>
+
+       * hyper-apropos.el (hyper-apropos-get-doc): Print where a byte
+       compiled function got loaded from.
+
+1998-01-09  SL Baur  <steve@altair.xemacs.org>
+
+       * term/apollo.el: Synched up with InfoDock 3.6.2.
+
+1998-01-08  SL Baur  <steve@altair.xemacs.org>
+
+       * startup.el (load-init-file): Load autoloads earlier.
+       (startup-splash-frame): Handle InfoDock logo.
+
+       * x-init.el (init-post-x-win): Don't call init-x-toolbar in
+       InfoDock.
+       (x-init-toolbar-from-resources): Move from x-toolbar.el.
+
+       * toolbar.el (init-toolbar-from-resources): InfoDock x-toolbar.el
+       doesn't have this function.
+
+       * packages.el (locate-data-file): Fix to call `locate-file'.
+
+1998-01-07  SL Baur  <steve@altair.xemacs.org>
+
+       * dumped-lisp.el (preloaded-file-list): InfoDock uses its own
+       version of version.el.
+       (preloaded-file-list): Ditto for x-menubar.el and x-toolbar.el.
+
+       * x-menubar.el (default-menubar): Guard reference to
+       `gnuserv-frame'.
+       (default-menubar): Guard references to `font-lock-mode'.
+       (default-menubar): Guard references to font-menu-this-frame-only-p'.
+       (default-menubar): Guard references to `font-menu-ignore-scaled-fonts'.
+
+       * make-docfile.el: Don't snarf doc strings from autoloads.
+
+       * startup.el (load-init-file): Use algorithm from loaddefs.el for
+       loading auto-autoloads files.
+
+       * loaddefs.el: Disable dumping autoloads.
+
+1998-01-05  SL Baur  <steve@altair.xemacs.org>
+
+       * lisp-mnt.el: Synch to Emacs 20.2.
+
+       * help.el: Remove manual autoload of `finder-by-keyword'.
+
+       * finder.el (finder-by-keyword): Autoload.
+
+       * help.el: Conditionalize hyperbole setup.
+
+1998-01-04  SL Baur  <steve@altair.xemacs.org>
+
+       * packages.el (package-require): Update to reflect new data format.
+
+1998-01-02  Didier Verna  <verna@inf.enst.fr>
+
+       * x-menubar.el (default-menubar): make the tutorials available
+       through the menubar. (Plus some compilation warnings cleanup).
+
+1998-01-04  SL Baur  <steve@altair.xemacs.org>
+
+       * check-features.el: New file.  Perform sanity check after build.
+
+       * dumped-lisp.el (preloaded-file-list): Move tooltalk dumped lisp
+       files to tooltalk package.
+       (preloaded-file-list): Moved sparcworks dumped lisp files to Sun
+       package.
+
+       * package-admin.el (package-admin-xemacs): Use better default for
+       location of XEmacs binary.
+
+1998-01-03  Aki Vehtari  <Aki.Vehtari@hut.fi>
+
+       * x-menubar.el (buffers-menu-submenus-for-groups-p): Replace const
+       tag with sexp and add value tag with value `t'.
+
+1998-01-03  SL Baur  <steve@altair.xemacs.org>
+
+       * package-get.el: Changes to work with real data.
+       From Pete Ware <ware@cis.ohio-state.edu>
+
+       * packages.el (packages-reload-autoloads): Guard load for the time 
+       being.
+
+       * update-elc.el ("packages.el"): Force loading packages.el instead 
+       of possibly out-of-date packges.elc.
+       * make-docfile.el ("packages.el"): Ditto.
+
+1998-01-02  Colin Rafferty  <colin@xemacs.org>
+
+       * build-report.el (build-report-delete-regexp): Added a rule for
+       the main tarball shadowing anything past it.
+
+1998-01-02  SL Baur  <steve@altair.xemacs.org>
+
+       * packages.el (package-provide): Delete a previous provide.
+
+       * package-info.el: New file.
+
+       * package-get.el: New file.
+       From Pete Ware <ware@cis.ohio-state.edu>
+       (package-get): Fix md5 computation to work with Mule.
+
+1997-12-11  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * simple.el (log-message-*): Quote symbols in docstrings properly.
+
+1998-01-01  SL Baur  <steve@altair.xemacs.org>
+
+       * packages.el (packages-new-autoloads): Ignore symbolic links.
+
+       * cus-face.el (face-custom-attributes-get): Fix typo.
+       From Jens-Ulrik Holger Petersen <petersen@kurims.kyoto-u.ac.jp>
+
+1997-12-31  SL Baur  <steve@altair.xemacs.org>
+
+       * startup.el (load-init-file): Reload new or changed autoloads
+       unless inhibited.  Reload modified dumped lisp (stubbed).
+
+       * packages.el (packages-new-autoloads): New function.
+       (packages-reload-autoloads): New function.
+       (packages-reload-dumped-lisp): New (stub) function.
+
+       * loadup.el: Inhibit reloading dumped files when running temacs.
+
+       * loadhist.el (file-provides): Extend to handle variant
+       extensions.
+
+       * replace.el (query-replace): Fix typo.
+
+1997-12-30  SL Baur  <steve@altair.xemacs.org>
+
+       * make-docfile.el: list-autoloads-path has been renamed.
+       * update-elc.el: list-autoloads has been renamed.
+
+       * packages.el (packages-list-autoloads): Renamed.
+       (packages-list-autoloads-path): Ditto.
+
+1997-12-29  Colin Rafferty  <colin@xemacs.org>
+
+       * packages.el (packages-find-packages-1): Made it signal a warning 
+       for an error in an auto-autoload.el file.
+
+1997-12-30  SL Baur  <steve@altair.xemacs.org>
+
+       * x-menubar.el (buffers-menu-submenus-for-groups-p): Replace sexp
+       tag with const.
+       From Aki Vehtari <Aki.Vehtari@hut.fi>
+
+       * dumped-lisp.el (preloaded-file-list): Dump loadhist with XEmacs.
+
+       * loadhist.el (unload-feature): Remove autoload.
+
+1997-12-28  SL Baur  <steve@altair.xemacs.org>
+
+       * loadhist.el: Unpackaged.
+
+       * help.el (describe-symbol-find-file): Rename
+       `describe-function-find-file' and make old name obsolete.
+       (describe-function-1): Use it.
+       (describe-function-1): Guard reference to
+       `compiled-function-annotation'.
+
+1997-12-27  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * help.el (help-mode-bury): Now a call to `help-mode-quit' with
+       argument.
+       (help-mode-quit): New optional arg to control whether it kills or
+       buries.  Tidied up.
+       (with-displaying-help-buffer): Don't kill buffer initially, even
+       if it exists: it is erased by `with-output-to-temp-buffer' anyway.
+       (help-pretty-print-value): Rename back from
+       `help-maybe-pretty-print-value'!  If `pp-internal' is available
+       use it, otherwise use dumped `cl-prettyprint'.
+       (describe-variable): Use `help-pretty-print-value' again.
+       (find-func): Removed reference to "find-func" at end.
+
+1997-12-26  Kirill M. Katsnelson  <kkm@kis.ru>
+
+       * dumped-lisp.el: x-menubar.el dumped along with mswindows native
+         GUI XEmacs. Rename? x-menubar is rather window system
+         independant, except for a couple of items.
+
+1997-12-26  SL Baur  <steve@altair.xemacs.org>
+
+       * x-menubar.el (default-menubar): Remove hyperbole and oobr
+       entries as they will no longer be distributed with XEmacs.
+
+       * format.el (format-alist): Fix image/tiff regexps.
+       From P. E. Jareth Hein <jareth@camelot-soft.com>
+
+       * help.el (help-maybe-pretty-print-value): Rename.
+       (describe-variable): Use it.
+       (describe-variable): Add trailing linefeed.
+
+1997-12-26  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * help.el (describe-function-1): Don't output anything for
+         arglist of autoload functions.
+
+1997-12-26  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * help.el (describe-function-1): Don't output anything for
+         arglist of autoload functions.
+
+1997-12-26  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * help.el (help-mode-map): New bindings for `help-mode-bury',
+       `describe-function-at-point', `describe-variable-at-point',
+       `Info-elisp-ref', `customize-variable', `help-next-section' and
+       `help-prev-section'.
+       (help-next-section): New function.
+       (help-prev-section): New function.
+       (help-mode-quit): Changed to kill the help buffer.
+       (help-mode-bury): Formerly `help-mode-quit'.  Bury buffer
+       correctly.
+       (help-buffer-name): New function to generate the name of help
+       buffers.
+       (with-displaying-help-buffer): Is now a macro.  Takes an new first
+       argument giving the name of the help buffer.
+       (describe-key): Use `with-displaying-help-buffer' with name.
+       (describe-mode): Ditto.
+       (describe-bindings): Ditto.
+       (describe-prefix-bindings): Ditto.
+       (view-lossage): Ditto.
+       (with-syntax-table): New macro.
+       (function-called-at-point): Use `ignore-errors' and
+       `with-syntax-table'.
+       (function-at-point): Ditto.
+       (describe-function): Use `with-displaying-help-buffer' with name.
+       (function-arglist): Extracted from `describe-function-1'.  Returns
+       function's arglist as string.
+       (function-documentation): Extracted from `describe-function-1'.
+       Returns function's docstring.
+       (describe-function-1): Remove all the "stream" garbage, including
+       the stream argument.  Use `function-arglist' and
+       `function-documentation'.
+       (describe-function-arglist): Just use `function-arglist'.
+       (variable-at-point): Use `ignore-errors' and `with-syntax-table'.
+       (help-pretty-print-value): New function to help with
+       pretty-printing variable values.  Knows about `#<...>'.  Needs
+       `pp-internal'.
+       (describe-variable): Use `with-displaying-help-buffer' with name.
+       Formatting improved.  Display file where variable is defined, if
+       known.  Use `help-pretty-print-value'.
+       (describe-syntax): Use `with-displaying-help-buffer' with name.
+       (list-processes): Remove "stream" garbage.
+
+1997-12-25  SL Baur  <steve@altair.xemacs.org>
+
+       * x-init.el (x-initialize-keyboard): Don't load x-win*.el files,
+       call a dumped routine instead.
+
+       * x-win-xfree86.el: Wrap file in defun.
+       * x-win-sun.el: Ditto.
+
+1997-12-23  SL Baur  <steve@altair.xemacs.org>
+
+       * help.el (view-emacs-news): Remove usage of outl-mouse which
+       advises functions and does other evil things.
+
+1997-12-22  SL Baur  <steve@altair.xemacs.org>
+
+       * format.el (format-alist): Add `image/tiff'.
+       From P. E. Jareth Hein <jareth@camelot-soft.com>
+
+1997-12-21  SL Baur  <steve@altair.xemacs.org>
+
+       * about.el (about-hackers): More names added.
+
+       * make-docfile.el: Remove superfluous package path search.
+
+       * loaddefs.el: Commentary changes.  Removal of VM autoloads.
+
+1997-12-20  SL Baur  <steve@altair.xemacs.org>
+
+       * shadow.el (find-emacs-lisp-shadows): Add _pkg to the list of
+       ignored shadows.
+
+1997-12-18  SL Baur  <steve@altair.xemacs.org>
+
+       * startup.el (set-default-load-path): Make sure lisp and site-lisp 
+       get trailing slashes when added to the load-path.
+
+       * x-init.el (init-x-win): Locate where XEmacs X localization files 
+       are.
+
+1997-12-18  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * x-faces.el: Added support for foregroundToolBarColor
+         to xpm-color-symbols.
+
+1997-12-17  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * etags.el (tags-remove-duplicates): Removed.
+       (buffer-tag-table-list): Use `delete-duplicates'.
+
+       * cl-extra.el (coerce): Coerce to bit-vector and weak-list
+       correctly.
+       (get*): Defalias to `get'.
+
+       * cl.el (eql): Compare integers with `eq'.
+       (cl-map-extents): Check for `map-extents' first.
+
+1997-12-17  Didier Verna  <verna@inf.enst.fr>
+
+       * leim/quail/latin-pre.el ("french-prefix"): doc string cleanup +
+       added the 'numero', 'copyright' and 'trademark' symbols.
+
+       * leim/quail/latin-post.el ("french-postfix"): see above.
+
+1997-12-15  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * widget.el (define-widget): Check the arguments.
+
+       * cus-edit.el (customize-face): Use `check-argument-type'.
+       (custom-variable-value-create): Use `signal' to signal error.
+       (custom-variable-reset-saved): Ditto.
+       (custom-variable-reset-standard): Ditto.
+       (custom-face-reset-saved): Ditto.
+
+       * wid-edit.el (widget-prompt-value): Use `signal' to signal error.
+       (widget-default-format-handler): Ditto.
+       (widget-checklist-add-item): Ditto.
+       (widget-radio-add-item): Ditto.
+       (widget-editable-list-entry-create): Ditto.
+       (widget-sexp-prompt-value): Ditto.
+
+       * custom.el (custom-declare-variable): Signal errors better.
+       (custom-handle-keyword): Ditto.
+       (custom-declare-group): Ditto.
+
+       * window-xemacs.el (windows): Ditto.
+
+       * menubar.el (menu): Ditto.
+
+       * keydefs.el (keyboard): Ditto.
+
+       * minibuf.el (minibuffer): Ditto.
+
+       * process.el (execute): Ditto.
+
+       * fill.el (fill): Ditto.
+
+       * modeline.el (modeline): Ditto.
+
+       * help.el (help): Ditto.
+
+       * faces.el (faces): Ditto.
+
+       * files.el (files): Ditto.
+
+       * x-init.el (x): Ditto.
+
+       * lisp-mode.el (lisp): Ditto.
+
+       * process.el (processes): Ditto.
+
+       * mouse.el (mouse): Ditto.
+
+       * abbrev.el (abbrev): Moved from cus-edit.
+
+       * font-lock.el (lisp-font-lock-keywords-1): Recognize `defcustom'
+       as variable declaration.
+
+1997-12-15  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * menubar.el (find-menu-item): Use `check-argument-type'.
+       (find-menu-item): Cosmetic changes.
+
+1997-12-18  SL Baur  <steve@altair.xemacs.org>
+
+       * x-menubar.el (default-menubar): Guard usage of lpr-switches.
+
+1997-12-17  SL Baur  <steve@altair.xemacs.org>
+
+       * startup.el (set-default-load-path): Only search package-path
+       when not running temacs.
+
+       * dumped-lisp.el (preloaded-file-list): Remove Egg/Its dumped lisp 
+       files.
+
+       * loadup.el: Correct commentary.  Reformatting.
+       (really-early-error-handler): Use absolute path to the 
+       first dumped-lisp.el file.
+       (really-early-error-handler): Print full path name of
+       each dumped lisp file (inherited from InfoDock).
+
+       * shadow.el (find-emacs-lisp-shadows): Ignore multiple
+       dumped-lisp.el files.
+
+       * make-docfile.el (preloaded-file-list): Reorder when the
+       package-path is searched.
+       * update-elc.el: Ditto.
+
+       * lisp-mode.el (call-with-condition-handler): Treat the same as
+       `condition-case' for indentation.
+
+       * about.el (about-xemacs): Update release date.
+
+1997-12-17  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * cl-macs.el (case): Signal error if `t' or `otherwise' are seen
+       anywhere but at the last clause.
+       (ecase): Disallow `t' and `otherwise'.
+
+1997-12-16  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * cus-edit.el (custom-buffer-create-buttons): New function
+       from stuff moved out of `custom-buffer-create-internal'.
+       (custom-novice): New variable.  Default t.
+       (custom-display-global-buttons): Ditto.  Default `top'.
+       (custom-buffer-create-internal): Only display help if
+       `custom-novice' is non-nil.  Display global buttons according to
+       `custom-display-global-buttons'.
+
+1997-12-15  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * menubar.el (find-menu-item): Use `check-argument-type'.
+       (find-menu-item): Cosmetic changes.
+
+1997-12-15  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * modeline.el (mouse-drag-modeline): Give the modeline a "pressed" 
+       look.
+
+1997-12-16  Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
+
+       * format.el (format-deannotate-region):  Bug fix.
+       Deannotating a region containing unknown tags would fail
+       (causing decoding of text/enriched to fail at user level)
+
+1997-12-16  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * minibuf.el (read-directory-name): Support sixth
+         arg, HISTORY, as already documented.
+
+1997-12-17  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * etags.el (get-tag-table-buffer): Use explicit lists as arguments 
+       to `ecase'.
+
+1997-12-14  SL Baur  <steve@altair.xemacs.org>
+
+       * skk/skk-leim.el (skk-auto-fill-activate): Synch with
+       skk-activate.
+
+1997-12-13  SL Baur  <steve@altair.xemacs.org>
+
+       * dumped-lisp.el (preloaded-file-list): Remove debugging statement.
diff --git a/lisp/ChangeLog.1 b/lisp/ChangeLog.1
new file mode 100644 (file)
index 0000000..f72e3c1
--- /dev/null
@@ -0,0 +1,8056 @@
+1997-12-13  SL Baur  <steve@altair.xemacs.org>
+
+       * help.el (describe-function-arglist): Restore.
+       (describe-function-1): Correct typo.
+       From Jamie Zawinski <jwz@netscape.com>
+
+1997-12-13  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * cus-dep.el (Custom-make-dependencies): Cut a newline.
+
+       * cus-edit.el (customize-changed-options): Handle output more nicely.
+       (customize-changed-options): Mention `:version' instead of `:new'.
+       (customize-changed-options): Use `push'.
+
+1997-12-12  Colin Rafferty  <colin@xemacs.org>
+
+       * window.el (shrink-window-if-larger-than-buffer): Modified the
+       algorithm so that is calculates the amount it can shrink the
+       buffer by shrinking the buffer itself first.
+
+1997-12-10  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * undo-stack.el (trunc-stack-bottom): Don't terminate error
+       message with a period.
+
+       * cus-start.el: Synch quoter with `custom-quote'.
+
+       * custom.el (custom-add-load): Update custom-group-hash-table.
+
+1997-12-12  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * mouse.el (mouse-track-run-hook): Understand `make-local-hook'
+       convention.
+
+       * custom.el (custom-add-version): New function, from FSF.
+       (custom-handle-keyword): Use it.
+
+       * cus-edit.el (custom-variable-prompt): Require match.
+       (customize-changed-options): New function, from FSF.
+       (customize-version-lessp): Ditto.
+
+       * cus-edit.el (custom-quote): Defalias to `quote-maybe'.
+       (customize-set-variable): Use `quote-maybe'.
+       (customize-save-variable): Ditto.
+       (custom-variable-value-create): Ditto.
+       (custom-variable-set): Ditto.
+       (custom-variable-save): Ditto.
+
+       * cus-start.el: Use `quote-maybe'.
+
+1997-12-11  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * simple.el (fsf:do-auto-fill): Comment out.
+
+       * simple.el (set-goal-column): Be careful about the format
+       argument to message.
+
+       * cl-macs.el: New setf methods for: buffer-dedicated-frame,
+       console-type-image-conversion-list, default-toolbar-position,
+       device-class, extent-begin-glyph, extent-begin-glyph-layout,
+       extent-end-glyph, extent-end-glyph-layout, extent-keymap,
+       extent-parent, extent-properties, frame-selected-window,
+       itimer-function, itimer-function-arguments, itimer-is-idle,
+       itimer-recorded-run-time, itimer-restart, itimer-uses-arguments,
+       itimer-value, keymap-parents, marker-insertion-type,
+       mouse-pixel-position, trunc-stack-length, trunc-stack-stack,
+       undoable-stack-max and weak-list-list.
+
+1997-12-12  SL Baur  <steve@altair.xemacs.org>
+
+       * keydefs.el (global-map): Import C-x M-: keybinding for
+       `repeat-complex-command' from Emacs 20.
+
+1997-12-11  Christoph Wedler  <wedler@fmi.uni-passau.de>
+
+       * mule/mule-debug.el (list-charsets): Make it work.  Better
+       formatting.
+
+1997-12-11  SL Baur  <steve@altair.xemacs.org>
+
+       * files.el (insert-file): Don't use format.el settings.
+
+       * format.el (format-decode): Update docstring.
+
+1997-12-09  SL Baur  <steve@altair.xemacs.org>
+
+       * make-docfile.el (package-path): Set load-path from package path
+       before collecting the files to dump.
+       * update-elc.el (package-path): Ditto.
+
+       * loadup.el: Comment changes, cleanup.
+
+1997-12-09  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * etags.el (tags-loop-continue): Avoid giant `progn' in while test.
+       (next-file): Use `pop'.
+
+1997-12-08  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * etags.el (find-tag-internal): Set the initial fuzz offset to 100
+       instead of 1000.
+       (find-tag-internal): Use `letf'.
+       (tags-delete): Removed -- was unused.
+       (set-buffer-tag-table): Use `expland-file-name'.
+       (get-tag-table-buffer): Use `ecase'.
+       (add-to-tag-completion-table): Mark the filename messages with
+       progress.
+       (add-to-tag-completion-table): Use `char-after' instead of
+       `following-char'.
+       (add-to-tag-completion-table): Use `match-string'.
+       (complete-symbol): Use `error' instead of message+ding.
+       (complete-symbol): Use `skip-syntax-forward'.
+       (tag-complete-symbol): Autoload.
+       (pop-mark-from-stack): Use `buffer-live-p'.
+       (pop-tag-mark): Autoload the `M-*' binding.
+       (list-tags): Made it work.
+
+1997-12-09  SL Baur  <steve@altair.xemacs.org>
+
+       * x-toolbar.el (toolbar-news): Fix typo.
+
+1997-12-06  Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+       * dumped-lisp.el, emacs.c, symsinit.h, msw-init.el,       nt/xemacs.mak
+         Created files: msw-select.el, select-msw.c
+         Copy and paste 8-bit text to/from mswindows clipboard.
+
+       * msw-faces.el: mswindows-make-font-bold[-italic]
+         Try to make the bold font the same width as the non-bold font.
+
+1997-12-07  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * wid-edit.el (widget-prettyprint-to-string): Nix cl-prettyprint's 
+       newlines.
+
+1997-12-06  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * x-toolbar.el (toolbar-not-configured): Use `error'.
+       (toolbar-compile): Restore `toolbar-already-run' feature from
+       19.15.
+       (toolbar-news): Use `eval' on non-symbols.
+       (toolbar-info-frame-plist): Use the new `plist' widget.
+       (toolbar-news-frame-plist): Ditto.
+
+       * font-lock.el (font-lock-fontify-buffer-function): New variable,
+       synched with FSF Emacs 20.
+       (font-lock-unfontify-buffer-function): Ditto.
+       (font-lock-fontify-region-function): Ditto.
+       (font-lock-unfontify-region-function): Ditto.
+       (font-lock-inhibit-thing-lock): Ditto.
+
+1997-12-07  SL Baur  <steve@altair.xemacs.org>
+
+       * egg/egg-cwnn-leim.el (egg-pinyin-activate): New file.  Interface 
+       to Chinese Wnn server.
+
+       * egg/egg-kwnn-leim.el: New file.  Interface to Korean Wnn
+       server.
+
+       * dumped-lisp.el (preloaded-file-list): Dump LEIM integration
+       files for kWnn and cWnn.
+
+1997-11-30  Adrian Aichner  <aichner@ecf.teradyne.com>
+
+       * build-report.el:
+       Making better use of `custom'-features to represent various
+       `build-report' variables.
+       build-report-*-regexp have become lists which are or-ed together
+       internally.
+       customized group `build-report' is now a child of group `build' which is
+       not release as of this version.
+       Including comment now into build-report stating wheter all or just the
+       most recent ./configure output is being inserted.
+
+1997-12-01  Jonathon Harris <jhar@tardis.ed.ac.uk>
+
+       * msw-init.el: Provide default bindings for cut, paste, copy and undo
+
+1997-12-05  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * wid-edit.el: Ditto.
+       (widget-prettyprint-to-string): Use `cl-prettyprint'.
+       (widget-sexp-value-to-internal): Handle printed object beginning
+       with newline.
+
+       * cus-edit.el: Avoid `pp-to-string'.
+
+1997-12-04  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * simple.el (display-warning): Use `with-current-buffer'.
+
+       * font-lock.el (font-lock-mode): Use `lmessage'.
+       (font-lock-fontify-buffer): Ditto.
+       (font-lock-unfontify-region): Ditto.
+       (font-lock-fontify-syntactically-region): Ditto.
+       (font-lock-fontify-keywords-region): Ditto.
+       (font-lock-fontify-keywords-region): Ditto.
+
+       * simple.el (raw-append-message): Use `with-current-buffer'.
+       (log-message-filter): Place `save-match-data' outside the loop.
+       (log-message): Use `with-current-buffer'.
+       (remove-message): Use `lwarn' to warn about the hook error.
+
+       * lisp-mode.el: Indent `lmessage' and `lwarn' properly.
+
+       * simple.el (lmessage): New function.
+       (lwarn): Ditto.
+       (kill-region): Use `lmessage' instead of `display-message'.
+       (set-comment-column): Ditto.
+       (set-fill-column): Ditto.
+
+       * faces.el (get-custom-frame-properties): Don't use
+       `default-custom-frame-properties'.
+
+       * font-lock.el: Customized variables.
+
+       * font-lock.el: Customized faces.
+
+       * font-lock.el: (font-lock-maximum-decoration): Default to t.
+
+       * cus-edit.el (vms): Removed.
+
+1997-12-03  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * cus-start.el: Ditto.
+
+       * gui.el (dialog-frame-plist): Ditto.
+
+       * gnuserv.el (gnuserv-frame-plist): Ditto.
+
+       * frame.el: Use the `plist' widget type in defcustoms.
+
+       * cus-edit.el (plist): New widget type.
+       (custom-plist-convert-widget): New function.
+       (custom-quote): Vectors and bit-vectors are also self-printable.
+
+1997-12-05  Mark Borges  <mdb@cdc.noaa.gov>
+
+       * mail/mail-extr.el (all-top-level-domains):
+       Two letter country codes synched with 
+         http://www.iana.org/in-notes/iana/assignments/country-codes
+       as updated by the RIPE Network Coordination Centre.
+       Source: ISO 3166 Maintenance Agency 
+       Latest change: Thu Aug  7 17:59:51 MET DST 1997
+
+1997-12-03  Eric Eide  <eeide@cs.utah.edu>
+
+       * files.el (set-auto-mode): Don't invoke
+         `hack-local-variables-prop-line' if `enable-local-variables'
+          is nil.
+
+       * files.el (hack-local-variables-prop-line): Don't invoke
+         `hack-local-variables-p' for mode-only or empty -*- lines.
+         Don't test `enable-local-variables' before setting the mode;
+         instead, just verify that the specified major mode isn't the
+         current major mode.
+
+1997-12-03  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * startup.el (load-init-file): Use a warning buffer in case of
+       error.
+
+1997-12-05  SL Baur  <steve@altair.xemacs.org>
+
+       * buffer.el (switch-to-buffer): Update docstring.
+       Suggested by Adrian Aichner <aichner@ecf.teradyne.com>
+
+1997-12-01  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * cus-edit.el (custom-unlispify-remove-prefixes): Reference to
+       related variables added.
+       (custom-variable-default-form): New variable controlling default
+       display form for customization of variables.
+       (custom-variable): widget `:form' is nil before initialization.
+       (custom-variable-value-create): Initialize `:form' to
+       `custom-variable-default-form'.
+       (custom-face-default-form): New variable controlling default
+       display form for customization of faces.
+       (custom-face): widget `:form' is nil before initialization.
+       (custom-face-value-create): Initialize `:form' to
+       `custom-face-default-form'.
+
+1997-11-28  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * misc/mic-paren.el: Define faces with `defface'.  Colors
+       given for both dark and light backgrounds.  Keep face
+       variables for backward compatibility.
+
+1997-12-03  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * simple.el (temporary-goal-column): Made buffer-local.
+
+1997-12-01  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * cus-edit.el (Custom-move-and-invoke): Removed.
+       (custom-mode): Ditto for doc.
+
+1997-12-02  SL Baur  <steve@altair.xemacs.org>
+
+       * egg/egg-sj3-client.el (sj3-command-reset): Initial port to XEmacs.
+
+       * egg/egg-sj3.el: Initial port to XEmacs.
+
+       * egg/egg-leim.el (egg-activate): Define
+       `egg-default-startup-file'.
+
+       * language/japanese.el (japanese): Remove definition of
+       `egg-default-startup-file'.
+
+       * dumped-lisp.el (preloaded-file-list): Dump egg-sj3 and skk LEIM
+       support.
+
+       * egg/egg-sj3-leim.el: New file -- Add Egg/SJ3 support to LEIM.
+
+1997-12-01  SL Baur  <steve@altair.xemacs.org>
+
+       * locale/ja/locale-start.el (startup-splash-frame-body): Fix typo
+       on advertised-undo.
+       Suggested by: Hajime Saitou
+       - Comment cleanup.
+
+1997-11-30  SL Baur  <steve@altair.xemacs.org>
+
+       * help-macro.el (help-read-key): Autoload.
+
+1997-11-29  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * etags.el (buffer-tag-table-list): Check for `../TAGS'.
+       (visit-tags-table): Disallow setting `tags-file-name' to a
+       nonexistent file.
+
+1997-11-29  SL Baur  <steve@altair.xemacs.org>
+
+       * update-elc.el ((preloaded-file-list site-load-packages)): Modify 
+       error message to be more build-report.el friendly.
+
+       * dumped-lisp.el (preloaded-file-list): Remove tooltalk/ prefix
+       from tooltalk dumped files.
+
+       * symbol-syntax.el: Modify comments.
+
+1997-11-29  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * etags.el (find-tag-default): Use symbol-near-point
+         instead of thing-symbol to remove the dependency on
+         thing.el.
+
+1997-11-29  SL Baur  <steve@altair.xemacs.org>
+
+       * symbol-syntax.el: Unpackaged.
+       * disp-table.el: Unpackaged.
+       * picture.el: Unpackaged.
+       * rect.el: Unpackaged.
+       * lisp-mnt.el: Unpackaged.
+
+       * mule/canna.el: Don't require emu.
+       (canna:enter-canna-mode): Inline code for compatibility function
+       `minibuffer-prompt-width'.
+
+       * info.el (Info-find-node): Guard call to browse-url.
+       * wid-edit.el (widget-url-link-action): Ditto.
+
+       * hyper-apropos.el (hyper-apropos-get-doc): Use cl-prettyprint
+       instead of pp.
+       (hyper-apropos-disassemble): Ditto.
+
+       * x-menubar.el (default-menubar): Disable WWW items in help menu
+       if no browse-url.
+
+       * help.el (xemacs-www-page): Print error message intead of bombing 
+       if not browse-url.
+       (xemacs-www-faq): Ditto.
+
+       * files.el (recover-session): Print error message instead of
+       bombing if no dired.
+       (file-remote-p): Return nil if no ange-ftp and no efs.
+
+       * format.el (format-encode-run-method): `shell-command-on-region'
+       called with wrong number of args.
+       (format-decode-run-method): Ditto.
+
+       * buff-menu.el (Buffer-menu-toggle-read-only): Call
+       modeline-toggle-read-only.
+
+       * register.el (copy-rectangle-to-register): Check for rectangle
+       functions.
+       (insert-register): Ditto.
+
+       * x-toolbar.el (pending-delete): Don't (require 'pending-del).
+       * x-menubar.el (pending-delete): Don't (require 'pending-del).
+
+       * x-menubar.el (bookmark-menu-filter): Add guards against bookmark 
+       package not being loaded.
+
+       * mule/char-table.el: Imported from tm.
+       * mule/chartblxmas.el: Ditto.
+       * alist.el: Ditto.
+       * overlay.el: Unpackaged for Quail.
+       
+       * x-menubar.el (default-menubar): Put guard on evaluation of
+       `ps-paper-type'.
+       (default-menubar): Put guard on `paren-mode'.
+       - Put guard on `mouse-avoidance-mode'.
+       - Guard `font-lock' stuffs.
+       - Guard browse-url stuffs.
+       - Clean up old deprecated syntax.
+       - Put guards on File, Edit, Apps, and Tools menus.
+
+1997-11-28  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * x-toolbar.el (toolbar-news-frame-properties): Made customizable.
+
+1997-11-27  Christoph Wedler  <wedler@fmi.uni-passau.de>
+
+       * lazy-shot.el (lazy-shot-stealth-timer): `defvar'.  Would
+       bug out when setting `lazy-shot-stealth-time' to nil and visiting
+       a buffer smaller than `lazy-shot-minimum-size'.
+       (font-lock-mode-hook): Option is turn-on-lazy-shot.
+
+1997-11-27  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * etags.el: Support new `include'
+         directive.  Search for exact tag matches and then
+         inexact matches.
+
+1997-11-26  SL Baur  <steve@altair.xemacs.org>
+
+       * packages.el (packages-useful-lisp): advice.el is a package.
+
+       * x-menubar.el (default-menubar): Make `Options ... Color Printing' 
+       a toggle.
+
+1997-11-26  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * toolbar.el (init-toolbar-from-resrouces): Fix
+         parens to make valid if-expression.
+
+1997-11-21  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * x-toolbar.el (toolbar-gnus): Respect
+       `toolbar-news-use-separate-frame'.
+
+1997-11-22  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * x-menubar.el (default-menubar): Use `bookmark-menu-filter'
+       for the Bookmarks menu.
+       (bookmark-menu-filter): Handle inactive submenus.
+
+1997-11-25  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom.el (custom-declare-variable): Attach the symbol to 
+       load history.
+
+1997-11-23  SL Baur  <steve@altair.xemacs.org>
+
+       * startup.el (find-emacs-root-internal-1): Erase references to
+       prim.
+
+       * blessmail.el: dumped-lisp.el has been moved.
+       * font.el: ditto.
+       * make-docfile.el: ditto.
+       * package-admin.el: ditto.
+       * update-elc.el: ditto.
+
+       * about.el: Moved.
+       * cleantree.el: ditto.
+       * dumped-lisp.el: ditto.
+       * sound.el: ditto.
+       * winnt.el: ditto.
+
+1997-11-22  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * faces.el: Don't set global background pixmap
+         property of the modeline face to [nothing], as that
+         the attributeBackgroundPixmap X resource.
+
+1997-11-21  SL Baur  <steve@altair.xemacs.org>
+
+       * autoload.el: Moved.
+       * config.el: ditto.
+       * etags.el: ditto.
+       * font-lock.el: ditto.
+       * fontl-hooks.el: ditto.
+       * gnuserv.el: ditto.
+       * info.el: ditto.
+       * shadow.el: ditto.
+       * view-less.el: ditto.
+
+1997-11-18  Colin Rafferty  <craffert@ml.com>
+
+       * packages.el (packages-find-packages): Modified to allow `nil'
+       entry in the `package-path'.  All entries before the nil will be
+       prepended to the paths (as before).  All entries after nil will be
+       appended.
+
+       * packages.el (locate-data-file): Implemented similar to
+       locate-data-directory.
+
+1997-11-20  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * x-faces.el: Add expression to xpm-color-symbols to
+         look for the global background resource when supporting
+         the backgroundToolBarColor XPM symbolic name.
+
+1997-11-17 Marc Paquette   <marcpa@cam.org>
+
+       * efs/dired.el: Removed special case for windows-nt in
+       dired-get-filename(); no longer needed because we now do 
+       CRLF->LF conversion upstream.
+
+1997-11-18  Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+       * msw-faces.el: Actually does something.
+
+1997-11-18  Christoph Wedler  <wedler@fmi.uni-passau.de>
+
+       * packages/font-lock.el (font-lock-fontify-anchored-keywords):
+       Sync'd with FSF 20.2.
+       (font-lock-keywords): Docstring partly sync'd with FSF 20.2.
+
+1997-11-18  SL Baur  <steve@altair.xemacs.org>
+
+       * egg/egg-leim.el (egg-activate): Call normal language setup
+       function.
+       - Call egg-mode
+       - require egg-wnn
+
+       * egg/egg-wnn.el (set-wnn-host-name): Use localhost as a fallback.
+       (set-cwnn-host-name): Ditto.
+       (set-kwnn-host-name): Ditto.
+       (open-wnn-if-disconnected): Ditto.
+
+1997-11-18  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/about.el (about-maintainer-info): Corrected typo.
+
+       * x-toolbar.el (toolbar-mail): Use `eval' to evaluate forms.
+
+       * cus-edit.el (customize-browse): Call `widget-add-change'.
+
+1997-11-18  SL Baur  <steve@altair.xemacs.org>
+
+       * utils/uniquify.el (uniquify-buffer-name-style): Fix typo.
+       Suggested by: Michael Sperber <sperber@informatik.uni-tuebingen.de>
+
+1997-11-18  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/about.el (about-news): Announce a way to leave the buffer.
+
+1997-11-17  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * x-toolbar.el (x-init-toolbar-from-resources):
+         Initialize the toolbar border width specifiers.
+
+1997-11-17  SL Baur  <steve@altair.xemacs.org>
+
+       * mule/mule-files.el: Add TUTORIAL.pl to
+       `file-coding-system-alist'.
+       * language/european.el: Add Polish language environment.
+
+       * loadup.el: set inhibit-package-init when running from temacs.
+
+1997-11-16  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/options.el: Fix comment typo.
+       From Peter Pezaris <pez@dwwc.com>
+
+1997-11-16  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * prim/minibuf.el (reset-buffer): Make inhibit-read-only
+         local to the current buffer and set it to t to prevent
+         read-only text from permanently wedging the minibuffer.
+
+1997-11-16  SL Baur  <steve@altair.xemacs.org>
+
+       * packages/emacsbug.el (report-xemacs-bug): Handle case where
+       ` *Message-Log*' buffer has not already been created.
+       * prim/help.el (view-lossage): Ditto.
+       * prim/simple.el (show-message-log): Ditto.
+
+1997-11-15  SL Baur  <steve@altair.xemacs.org>
+
+       * packages.el (list-autoloads): Fix doubleslash problem.
+
+1997-11-14  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/wid-edit.el (widget-before-change): Check for inactive
+       editable fields.
+
+1997-11-13  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/about.el (about-xemacs): Update maintainers.
+
+1997-11-12  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/cus-edit.el (custom-face-save): Save the face.
+
+1997-11-13  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * packages/font-lock.el (font-lock-fontify-keywords-region):
+         If not fontifying a MATCH-ANCHORED style keyword,
+         backtrack to just after the end of the keyword before
+         doing the next search.
+
+1997-11-13  Olivier Galibert  <olivier.galibert@mines.u-nancy.fr>
+
+       * language/vietnamese.el: Synched ccl with FSF 20.2.
+
+       * language/cyrillic.el: Synched ccl with FSF 20.2.
+
+       * language/chinese.el: Synched ccl with FSF 20.2.
+
+       * mule/mule-ccl.el: Synched with FSF 20.2.
+
+1997-11-12  SL Baur  <steve@altair.xemacs.org>
+
+       * leim/quail.el (quail-translation-keymap): Guard against
+       meta-prefix-char being -1 (documented as disabling it :-().
+       (quail-simple-translation-keymap): Ditto.
+       (quail-conversion-keymap): Ditto.
+
+1997-11-11  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/cus-face.el (custom-face-attributes): Use
+       `set-face-stipple' instead of `set-face-background-pixmap'.
+
+       * prim/faces.el (set-face-stipple): Search through
+       x-bitmap-file-path.
+
+1997-11-09  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * speedbar/speedbar.el (speedbar-needed-height): New function.
+       (speedbar-frame-mode): Use it.
+
+1997-11-07  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * speedbar/speedbar.el: Various docfixes.
+
+1997-11-12  SL Baur  <steve@altair.xemacs.org>
+
+       * pcl-cvs/pcl-cvs-xemacs.el: Fix emerge menu item.
+       From Jens Krinke <krinke@ips.cs.tu-bs.de>
+
+       * mule/mule-cmds.el (set-language-info): Don't add mule menu if
+       menubars haven't been compiled in.
+
+1997-11-10  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * custom/cus-edit.el (custom-file): Use `user-init-directory'
+       instead of `emacs-user-extension-dir'.
+
+1997-11-12  SL Baur  <steve@altair.xemacs.org>
+
+       * modes/image-mode.el: Add command to enter xpm mode when viewing XPM
+       image.
+       From:  Jens Krinke <krinke@ips.cs.tu-bs.de>
+
+1997-11-12  Greg Klanderman  <greg@alphatech.com>
+
+       * packages/compile.el (compilation-build-compilation-error-regexp-alist): 
+       Added documentation for this function.
+       
+       ** (compilation-error-regexp-systems-list): Update documentation
+       to note that `compilation-build-compilation-error-regexp-alist'
+       must be called after changing the value.  Update customization to
+       add a set method which automatically calls
+       `compilation-build-compilation-error-regexp-alist' when the value
+       is set by custom.  Move declaration below declarations that it now
+       depends upon.
+
+       ** (compilation-mouse-motion-initiate-parsing): Default to nil.
+
+1997-11-12  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * help.el (help-for-help): Use `make-help-screen'.
+       * help-macro.el:  New file.
+
+1997-11-10  SL Baur  <steve@altair.xemacs.org>
+
+       * x-menubar.el (options-menu-saved-forms):
+       `current-language-environment' is a variable now.
+
+       * packages/add-log.el (TopLevel): Require 'fortran only if it is
+       available.
+
+       * modes/lazy-shot.el (lazy-shot-unstall): Add guard on removing
+       the timer because the timer may not have been installed first.
+
+1997-11-10  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/frame.el (default-deselect-frame-hook): Dehighlight the
+       currently highlighted extent.
+
+1997-11-09  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/help.el (describe-variable): Add proper spacing.
+
+1997-11-10  SL Baur  <steve@altair.xemacs.org>
+
+       * utils/browse-url.el (TopLevel): Guard against term not being in
+       the load path.
+       (browse-url-lynx-emacs): Attach guards against term not being in
+       the load path.
+
+1997-11-09  SL Baur  <steve@altair.xemacs.org>
+
+       * packages/autoinsert.el: Fix bottom of lisp file template.
+
+1997-11-09  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * gui.el: For gui-button-face, set
+         foreground/background colors only on X devices.
+         Previously they were set for all devices.
+
+1997-11-09  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/extents.el (extent-keymap): New function.
+
+1997-11-09  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * specifier.el: Define specifier tags for the
+         device types that do not have compiled in support.
+         This allows device type specific properties to be set
+         in specifiers even if the device type isn't supported
+         in the current binary.
+
+1997-11-07  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/wid-edit.el (widget-glyph-pointer-glyph): New variable.
+       (widget-glyph-insert-glyph): Use it.
+
+1997-11-09  SL Baur  <steve@altair.xemacs.org>
+
+       * files.el (find-file-noselect): Guard against dired not being
+       available.
+
+1997-11-09  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * gui.el: Set the reverse-p property on
+         gui-button-face so that it will likely look different
+         than the default face on ttys.
+
+1997-11-09  SL Baur  <steve@altair.xemacs.org>
+
+       * x-menubar.el (default-menubar): Strokes has been packaged.
+
+1997-11-08  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/about.el (about-hackers): New entries.
+
+       * utils/shadow.el (list-load-path-shadows): Supress message when
+       no shadowings are found.
+
+       * loadup.el: Modify algorithm for finding initial lisp directories 
+       since the search now starts from lisp/ not lisp/prim/.
+       * update-elc.el: Ditto.
+       * make-docfile.el: Ditto.
+
+1997-11-07  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/dumped-lisp.el: "lib-complete" is not dumped with InfoDock.
+       * utils/finder.el (finder-known-keywords): New keyword -- `dumped'.
+
+       * version.el:  Cleaned up Lisp comments.
+       * paths.el: Ditto.
+       * x-menubar.el: Ditto.
+       * x-faces.el: Ditto.
+       * x-iso8859-1.el: Ditto.
+       * x-mouse.el: Ditto.
+       * x-select.el: Ditto.
+       * x-scrollbar.el: Ditto.
+       * x-misc.el: Ditto.
+       * x-init.el: Ditto.
+       * x-toolbar.el: Ditto.
+
+       * backquote.el: Moved to top-level.  Cleaned up Lisp comments.
+       * packages.el: Ditto.
+       * subr.el: Ditto.
+       * replace.el: Ditto.
+       * cl.el: Ditto.
+       * cl-extra.el: Ditto.
+       * cl-seq.el: Ditto.
+       * widget.el: Ditto.
+       * custom.el: Ditto.
+       * cus-start.el: Ditto.
+       * cmdloop.el: Ditto.
+       * keymap.el: Ditto.
+       * syntax.el: Ditto.
+       * device.el: Ditto.
+       * console.el: Ditto.
+       * obsolete.el: Ditto.
+       * specifier.el: Ditto.
+       * faces.el: Ditto.
+       * glyphs.el: Ditto.
+       * objects.el: Ditto.
+       * extents.el: Ditto.
+       * events.el: Ditto.
+       * text-props.el: Ditto.
+       * process.el: Ditto.
+       * frame.el: Ditto.
+       * map-ynp.el: Ditto.
+       * simple.el: Ditto.
+       * keydefs.el: Ditto.
+       * abbrev.el: Ditto.
+       * derived.el: Ditto.
+       * minibuf.el: Ditto.
+       * list-mode.el: Ditto.
+       * modeline.el: Ditto.
+       * startup.el: Ditto.
+       * misc.el: Ditto.
+       * help-nomule.el: Ditto.
+       * help.el: Ditto.
+       * files-nomule.el: Ditto.
+       * files.el: Ditto.
+       * lib-complete.el: Ditto.
+       * format.el: Ditto.
+       * indent.el: Ditto.
+       * isearch-mode.el: Ditto.
+       * buffer.el: Ditto.
+       * buff-menu.el: Ditto.
+       * undo-stack.el: Ditto.
+       * window.el: Ditto.
+       * window-xemacs.el: Ditto.
+       * lisp.el: Ditto.
+       * page.el: Ditto.
+       * register.el: Ditto.
+       * iso8859-1.el: Ditto.
+       * paragraphs.el: Ditto.
+       * easymenu.el: Ditto.
+       * lisp-mode.el: Ditto.
+       * text-mode.el: Ditto.
+       * fill.el: Ditto.
+       * auto-save.el: Ditto.
+       * float-sup.el: Ditto.
+       * itimer.el: Ditto.
+       * itimer-autosave.el: Ditto.
+       * toolbar.el: Ditto.
+       * scrollbar.el: Ditto.
+       * menubar.el: Ditto.
+       * dialog.el: Ditto.
+       * gui.el: Ditto.
+       * mode-motion.el: Ditto.
+       * mouse.el: Ditto.
+       * tty-init.el: Ditto.
+       * auto-show.el: Ditto.
+
+1997-11-07  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * modes/abbrev.el (abbrev-prefix-mark): Instead of
+         inserting a dash to indicate the start of the abbrev,
+         add an extent with a begin-glyph that contains a dash.
+
+Wed Nov 05 23:40:00 1997 Jonathan Harris <jhar@tardis.ed.ac.uk>
+
+       * faces.el: init-other-random-faces
+         Reinstated code that uses (mono x) as a specifer tag, but
+         conditioned it on (featurep 'x) because x is not a valid
+         specifier tag under native-win32.
+       
+       * Added file headers to:
+         w32-faces.el, w32-init.el
+
+1997-11-06  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * facemenu.el (facemenu-insert-menu-entry): Check for
+       menubar availability.
+
+       * easymenu.el (easy-menu-change): Check for menubar
+       availability.
+
+       * wid-edit.el (widget-echo-help): Use `help-echo' as label
+       for help-echo messages.
+
+Sun Nov 01 12:00:00 1997 Jonathan Harris  <jhar@tardis.ed.ac.uk>
+
+       * make-docfile.el: Fixed typo when dumped file does not exist.
+
+       * device.el: make-w32-device added.
+
+       * dumped-lisp: added w32-faces and w32-init to list.
+
+       * faces.el:
+         - make-face-*: Added calls to appropriate w32 functions
+           conditioned on (featurep 'w32). Made existing X calls
+           conditioned on (featurep 'x).
+         - init-other-random-faces: Hacked out a piece of code which used
+           (mono x) as a specifier because it made w32 unhappy.
+
+       * New files:
+         w32-faces.el, w32-init.el
+
+1997-11-07  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/mouse.el (default-mouse-motion-handler): When over
+       modeline, correctly dehighlight the last extent.
+
+1997-11-07  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/minibuf.el (mouse-read-file-name-1): Ditto.
+
+       * packages/balloon-help.el (balloon-help-make-help-frame): Ditto.
+
+       * games/life.el (life-setup): Check for scrollbars before using
+       them.
+
+1997-11-07  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * hm--html-menus/hm--html-mode.el (hm--html-minor-mode): Ditto.
+
+       * hm--html-menus/hm--html-menu.el ((adapt-xemacsp)): Ditto.
+
+       * comint/gud.el (gdb-install-menubar): Ditto.
+
+       * calendar/calendar.el (calendar-mode): Ditto.
+
+       * auctex/bib-cite.el (bib-cite-initialize): Ditto.
+
+       * utils/floating-toolbar.el (floating-toolbar): Ditto.
+
+       * utils/edit-toolbar.el (edit-toolbar-mode): Ditto.
+
+       * utils/browse-cltl2.el (cltl2-lisp-mode-install): Ditto.
+
+       * modes/view-process-xemacs.el
+       (View-process-install-pulldown-menu): Ditto.
+
+       * modes/verilog-mode.el (verilog-mode): Ditto.
+
+       * modes/tcl.el (tcl-mode): Ditto.
+
+       * modes/f90.el (f90-mode): Ditto.
+
+       * packages/emerge.el (emerge-set-keys): Ditto.
+
+       * packages/tar-mode.el (tar-mode): Check for menubars.
+
+1997-11-07  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * prim/modeline.el (mouse-drag-modeline): Don't
+         allow the window size to shrink to a size that is not a 
+         multiple of the height of the default face's font.
+
+       * prim/modeline.el (mouse-drag-modeline): Don't
+         discard timeout events.
+
+1997-11-07  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/simple.el (universal-argument-minus): Retain zmacs region.
+
+1997-11-07  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * packages/hyper-apropos.el (hyper-apropos-grok-functions): Ignore
+       errors when fetching documentation.
+
+       * prim/about.el (about-maintainer-glyph): Handle not having XPM or
+       XBM gracefully.
+
+       * custom/wid-edit.el (widget-glyph-find): Allow glyphs without
+       window-system, when TAG is nil.
+
+1997-11-05  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * mule/mule-cmds.el (set-default-coding-systems): Make
+       add-hook to `comint-exec-hook' be an append, for when the user 
+       changes language environment say.
+
+1997-11-05  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/winnt.el: Use a cleaner method for getting Text/Binary file 
+       type in the mode-line for MS Windows.
+
+1997-11-06  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/mouse.el: Removed "junk me" functions.
+
+       * prim/mouse.el (default-mouse-motion-handler): Make events over
+       modeline invalidate `point'.
+
+       * prim/mouse.el (mouse-line-length): Use point-at-eol and
+       point-at-bol.
+       (default-mouse-track-normalize-point): Highlight the whole symbol
+       only if the mouse is on a symbol-constituent.
+
+       * custom/wid-edit.el (widget-specify-field): Make sure the extent
+       is end-open.
+
+       * prim/keymap.el (next-key-event): Use `next-command-event'.
+
+1997-11-05  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * utils/easymenu.el (easy-menu-add): Check with `equal' whether
+       the menu already belongs to all-popups.
+
+1997-11-05  Jan Vroonhof  <vroonhof@math.ethz.ch>
+
+       * packages/font-lock.el (font-lock-thing-lock-cleanup):
+       Provisionally add lazy-shot
+
+       * modes/lazy-shot.el (lazy-shot-mode): Unstall lazy-shot only if
+       needed.
+       (lazy-shot-fontify-internal): Functionality put in seperate function.
+       (lazy-shot-lock-extent): Use it.
+       (lazy-shot-fontify-region): Dumb implementation added.
+       (lazy-shot-unstall-after-fontify): Needed to disable lazy
+       fontifying after fontify-buffer.
+       (lazy-shot-unstall): Make sure buffer is left in a fontified state if
+       needed. Take optional argument.
+       
+
+       * packages/ps-print.el (ps-print-ensure-fontified): Added
+       temporary support for lazy-shot.
+
+1997-11-05  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * utils/text-props.el (set-text-properties): Updated docstring.
+
+1997-11-04  Didier Verna  <verna@inf.enst.fr>
+
+       * mule/mule-cmds.el (set-default-coding-systems): 
+       The coding-system argument to comint-exec-hook wasn't evaluated 
+       before building the lambda expression.
+
+1997-11-04  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * packages/time.el: Change all occurences of ballon to balloon.
+
+1997-11-04  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * prim/help.el (function-at-point-function): Remove this variable.
+       (function-at-point): Remove use of `function-at-point-function'.
+
+       * packages/info.el (Info-elisp-ref): Change call to
+       `find-function-function' to `function-at-point'.
+
+1997-11-04  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * packages/info.el (Info-elisp-ref): Really change call to
+       `find-function-function' to `function-at-point'.
+
+1997-11-04  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * packages/auto-save.el: Updated commentary; changed default
+       autosave fallback to "~/.autosave".  Minor changes to compile
+       without warnings.
+
+1997-11-03  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/subr.el (function-interactive): New function.
+
+1997-11-03  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/dumped-lisp.el: Dump auto-save with XEmacs.
+
+       * prim/loadup.el: Make sure top level lisp directory gets a
+       trailing slash when added to load-path.
+       * prim/make-docfile.el:  Ditto.
+
+1997-11-03  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * prim/simple.el (interprogram-cut-function,
+       interprogram-paste-function): New variable (imported from Emacs
+       20.2).
+       (kill-new): Use `interprogram-cut-function' if it is not nil.
+       (current-kill): Use `interprogram-paste-function' if it is not
+       nil.
+
+1997-11-03  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * locale/ja/locale-start.el (startup-splash-frame-body): Modify to
+       be more natural Japanese.
+
+       * x11/x-menubar.el: Delete "language environment" menu of
+       "Options" menu.
+
+1997-11-02  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * language/korean.el: Rename TUTORIAL.kr -> TUTORIAL.ko to fit
+       with ISO 639 (two letter language code).
+
+       * prim/dumped-lisp.el: Don't dump language/vietnamese.el because
+       language/viet-util.el was removed temporary.
+
+       * language/japanese.el: Rename TUTORIAL.jp -> TUTORIAL.ja to fit
+       with ISO 639 (two letter language code).
+
+1997-10-31  Pete Ware  <ware@cis.ohio-state.edu>
+
+       * shell.el (shell-chdrive-regexp): New for DOS/NT
+       (shell-mode): Added shell-font-lock-keywrods
+       (shell-mode): Use $PWD for ksh
+       (shell-directory-tracker): Use dirs and dirtrack-toggle.  This may 
+               cause problems at is interferes with "dired"
+       (shell-snarf-envar): NEW
+       (shell-copy-environment-variable): NEW
+
+1997-10-30  Pete Ware  <ware@cis.ohio-state.edu>
+
+       * comint.el (comint-mode-map): Rearranged menus so they have a
+                 meaningful name.
+
+1997-10-30  Pete Ware  <ware@cis.ohio-state.edu>
+
+       * comint.el (comint-find-source-file-hook):
+       (comint-goto-source-line-hook):
+       (comint-find-source-code):
+       (comint-default-find-source-file):
+       (comint-fixup-source-file-name):
+       (comint-default-goto-source-line):  Removed.  compile.el does a
+               better job of this stuff.
+
+       * comint.el
+       (comint-file-name-chars): Support for msdos/nt
+       - Let easymenu deal with whether menubar is available.
+       - Use ^d for delchar or maybe eof.
+       - Use "dumb" as the terminal type if on a system using terminfo
+       (comint-output-filter): Removed replacement of ^M -- use filter
+       (comint-dynamic-complete-as-filename): Don't set
+               file-name-handler-alist to nil.  This makes remote path
+               completion work!
+
+1997-11-02  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/advocacy.el (xemacs-praise-sound-file): Don't default to
+       using a hardcoded directory.
+
+       * eterm/term.el (term-is-xemacs): Match against XEmacs instead of
+       Lucid.
+
+       * eos/sun-eos-toolbar.el (eos::toolbar-icon-directory): Use
+       `locate-data-directory' instead of data-directory.
+       * eterm/term.el (term-exec-1): Ditto.
+       * packages/time.el (display-time-icons-dir): Ditto.
+       * prim/advocacy.el (praise-be-unto-xemacs): Ditto.
+       * prim/sound.el (default-sound-directory): Ditto.
+       * prim/toolbar.el (init-toolbar-location): Ditto.
+
+1997-10-31  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/wid-edit.el (widget-color-complete): Use
+       `read-color-completion-table' directly.
+
+       * prim/subr.el (rplaca): Warn against the return value.
+       (replace-in-string): Use `wrong-type-argument'.  Use standard
+       error message.
+       (functionp): Would bug out on certain types of objects; synch with
+       FSF.
+       (with-output-to-string): Use new-style backquotes.
+       (with-temp-buffer): Update docstring references.
+
+       * prim/minibuf.el (reset-buffer): Use `with-current-buffer'.
+       (read-color-completion-table): Ditto.
+       (read-color-completion-table): Complete TTY colors on TTY devices.
+
+       * custom/cus-start.el: Customize `scroll-conservatively'.
+       Customize `help-char' correctly.
+
+1997-11-02  SL Baur  <steve@altair.xemacs.org>
+
+       * packages/desktop.el (toplevel): Don't require dired or reporter
+       when byte compiling.
+
+1997-11-02  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/keymap.el (synthesize-keysym): Collect a list of
+       characters, instead of consing a string each time.
+       (synthesize-keysym): Better error checking.
+
+       * prim/keymap.el (synthesize-keysym): Don't bug out when reading a 
+       non-character event.
+
+1997-11-02  Tomasz Cholewo  <tjchol01@mecca.spd.louisville.edu>
+
+       * prim/keymap.el (synthesize-keysym): New function bound to C-x @ k.
+
+1997-11-02  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * modes/sendmail.el: Don't (require 'vm-misc).  Change
+         mail-do-fcc-vm-internal to not compile the chunk of code
+         that uses VM internal macros.  This prevents the byte
+         compiler from compiling such references into function
+         calls that Fbyte_code will complain about later when it
+         discovers that the references are macros.
+
+       * modes/sendmail.el: added defvars for
+         rmail-summary-buffer and rmail-total-messages to get
+         rid of compiler warnings.
+1997-11-01  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/subr.el (lambda): Moved from `packages.el'.
+
+       * prim/packages.el: Updated commentary.
+       (packages-useful-lisp): Added `cl-macs'.
+
+1997-10-27  Didier Verna  <verna@inf.enst.fr>
+
+       * prim/help-nomule.el (help-with-tutorial): The 'didactic' blank
+       lines message is now taken directly from each tutorial, and thus
+       can appear in different languages.
+
+       * mule/mule-help.el (help-with-tutorial): idem
+
+1997-10-26  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * utils/shadowfile.el (shadow-clusters): Customized.
+       (shadow-read-files): replace obsolete `eval-current-buffer'
+       (shadow-parse-fullpath): `efs-ftp-name' doesn't exist.  change to
+       `efs-ftp-path'
+
+1997-11-01  SL Baur  <steve@altair.xemacs.org>
+
+       * x11/x-menubar.el:  Change Viper menu item to use
+       `toggle-viper-mode'.
+       Suggested by Michael Kifer <kifer@CS.SunySB.EDU>
+
+       * mule/mule-init.el:  Remove `help-with-tutorial-for-mule'.
+       Suggested by Didier Verna <verna@inf.enst.fr>
+
+       * Disable Cyrillic CCL until CCL engine gets fixed.
+       From: Martin Buchholz <mrb@Eng.Sun.COM>
+
+1997-10-30  Colin Rafferty  <craffert@ml.com>
+
+       * prim/startup.el (command-line-early): Made it recognize
+       --vanilla and --no-packages, as is already done in emacs.c.
+
+1997-10-30  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * modes/cperl-mode.el: Add Commentary and Code statements to
+       comment header for finder.
+
+1997-10-30  SL Baur  <steve@altair.xemacs.org>
+
+       * vm/vm-vars.el (vm-image-directory): Use locate-data-directory if 
+       it exists.
+
+       * language/european.el: Remove erroneous references to
+       `Serbo-Croatian'.
+       * language/cyril-util.el: Ditto.
+       * leim/quail/cyrillic.el: Ditto.
+
+       * comint.el:  reverse previous patch
+
+1997-10-29  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * mule/mule-init.el (init-mule): Load locale-start even if lang is
+       not exactly matched.
+
+       * mule/mule-init.el (auto-language-alist): Modify for new language
+       environment feature.
+       (init-mule): Modify for new language environment feature.
+
+1997-10-29  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * language/korean.el (setup-korean-environment): Modify for
+       XEmacs.
+
+       * language/greek.el: Modify setting about language environment.
+
+       * language/european.el: Fix setting for Croatian language
+       environment.
+
+       * language/vietnamese.el: Fix setting about language environment.
+
+       * language/viet-util.el (setup-vietnamese-environment): Modify for
+       XEmacs.
+
+       * language/cyril-util.el (setup-cyrillic-iso-environment): Modify
+       for XEmacs.
+       (setup-cyrillic-koi8-environment): Modify for XEmacs.
+       (setup-cyrillic-alternativnyj-environment): Modify for XEmacs.
+
+1997-10-28  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * language/hebrew.el (setup-hebrew-environment): Modify for
+       XEmacs.
+
+       * mule/mule-cmds.el (set-default-coding-systems): New function.
+       (set-language-info): Fix about menu.
+       (read-input-method-name, toggle-input-method): Sync with Emacs
+       20.2.
+
+       * language/cyril-util.el: Modify header.
+
+       * language/cyril-util.el
+       (setup-cyrillic-alternativnyj-environment): Modify for XEmacs.
+
+       * language/cyril-util.el: New file; imported from Emacs 20.2.
+
+       * language/japan-util.el (setup-japanese-environment): Use
+       `set-default-coding-systems'.
+
+       * language/european.el (setup-8-bit-environment): Modify for
+       XEmacs.
+
+       * language/english.el (setup-english-environment): Use
+       `set-default-coding-systems'.
+
+       * language/chinese.el: Modify for XEmacs.
+
+       * language/china-util.el (setup-chinese-gb-environment,
+       setup-chinese-big5-environment): Use `set-default-coding-systems'.
+
+       * mule/mule-files.el (file-coding-system-alist): Fix typo.
+
+1997-10-28  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * prim/dumped-lisp.el: Abolish Thai support temporary.
+
+       * language/thai.el, language/thai-util.el: Delete Thai specific
+       files because composite character features don't work in XEmacs.
+
+       * language/japan-util.el: Modify header.
+
+       * language/chinese.el: Abolish `Chinese-CNS' environment
+       temporary.
+
+       * language/china-util.el: Abolish `setup-chinese-cns-environment'
+       temporary.
+
+       * language/china-util.el (setup-chinese-big5-environment): Modify
+       for XEmacs.
+
+       * language/china-util.el (setup-chinese-gb-environment): Modify
+       for XEmacs.
+
+       * language/chinese.el: Delete set-coding-category-system for big5.
+
+       * language/japan-util.el (setup-japanese-environment): Modify for
+       XEmacs.
+
+       * language/japanese.el: Delete set-coding-category-system for
+       shift-jis.
+
+       * language/english.el (setup-english-environment): Modify for
+       XEmacs.
+
+1997-10-28  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * language/auto-autoloads.el: New file.
+
+       * mule/mule-files.el (file-coding-system-alist): Add setting for
+       TUTORIAL.hr to iso-8859-2.
+
+       * leim/quail/tibetan.el, leim/quail/ethiopic.el,
+       leim/quail/japanese.el, leim/quail/lao.el, leim/quail/lrt.el,
+       leim/quail/devanagari.el: Delete broken features temporary.
+
+       * language/tibetan.el, language/indian.el, language/lao-util.el,
+       language/lao.el, language/tibet-util.el, language/ethio-util.el,
+       language/ethiopic.el, language/devanagari.el: Delete broken
+       features temporary.
+
+       * mule/mule-cmds.el (universal-coding-system-argument): New
+       function; imported from Emacs 20.2.
+
+1997-10-27  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * language/korean.el, language/thai.el, language/vietnamese.el,
+       language/chinese.el, language/japanese.el, language/arabic.el,
+       language/ethiopic.el: Abolish setting for old language
+       environment.
+
+       * language/hebrew.el: Modify for XEmacs.
+
+       * Use language/hebrew.el instead of mule/hebrew-hooks.el; abolish
+       mule/hebrew-hooks.el.
+
+       * mule/mule-misc.el: Abolish old language environment features.
+
+       * mule/mule-init.el: Delete old language environment specific
+       features temporary.
+
+       * prim/dumped-lisp.el: Use language/hebrew.el instead of
+       hebrew-hooks.el.
+
+       * mule/mule-cmds.el (describe-language-environment): Modify for
+       XEmacs because `coding-system-mnemonic' returns string instead of
+       character in XEmacs.
+
+       * mule/mule-cmds.el: Sync with Emacs 20.2 about language
+       environment.
+
+       * mule/mule-cmds.el: Don't use `mule-prefix'.
+
+1997-10-26  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * language/ethiopic.el (ccl-encode-ethio-font): Modify to sync
+       with Emacs 20.2.
+
+1997-10-26  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * mule-diag.el (list-coding-systems): Modify for XEmacs.
+
+1997-10-26  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * mule/mule-files.el (find-coding-system-magic-cookie): Regard top
+       line magic.
+       (load): Use `find-file-coding-system-for-read-from-filename'.
+
+       * language/arabic-util.el: Use iso-2022-7bit.
+
+1997-10-26  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * mule-diag.el (describe-designation): Moved from mule-debug.el.
+       (describe-coding-system): Use `describe-designation'.
+
+       * mule-debug.el: Move function `describe-designation' to
+       mule-diag.el; Abolish function `describe-coding-system' because of
+       using it in mule-diag.el.
+
+       * mule-coding.el (keyboard-coding-system): New inline function.
+       (terminal-coding-system): New inline function.
+
+       * mule-cmds.el: Bind `describe-coding-system' to C-h C instead of
+       `describe-current-coding-system' to sync with Emacs 20.2.
+
+       * mule-diag.el: Abolish `print-designation' because it does not
+       work in XEmacs.
+
+       (describe-coding-system): Modify for XEmacs.
+       (print-coding-system-briefly): Modify for XEmacs.
+       (describe-current-coding-system): Modify for XEmacs.
+
+       * mule-coding.el: Abolish function `coding-system-charset'
+       (defined as builtin function).
+
+       * mule-diag.el: New file; imported from Emacs 20.2.
+
+       * mule-misc.el (set-buffer-process-coding-system): New function;
+       imported from mule.el of Emacs 20.2.
+
+       * mule-cmds.el: Bind `set-buffer-process-coding-system' to C-x C-m
+       p and abolish C-x C-m P.
+
+       * mule-files.el (load): Use `binary' instead of `no-conversion'.
+
+1997-10-28  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * modes/enriched.el (enriched-face-ans): Use
+         color-name instead of color-instance-name.
+         color-instance-name will not handle the specifiers that 
+         are passed as arguments.
+
+1997-10-28  Tomasz Cholewo  <tjchol01@mecca.spd.louisville.edu>
+
+       * prim/find-func.el (find-function-noselect): Fix nil argument
+       handling and add support for dumped macros.
+
+1997-10-28  SL Baur  <steve@altair.xemacs.org>
+
+       * pcl-cvs/pcl-cvs-xemacs.el: Add `cvs-mode-update-no-prompt' to menu.
+       From Stig Bjorlykke <stigb@tihlde.hist.no>
+
+1997-10-28  Didier Verna  <verna@inf.enst.fr>
+
+       * packages/man.el (manual-entry): corrected the `when'
+       form to include 'section' in the buffer name.
+
+1997-10-28  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/packages (packages-find-pacakges): Fix test on 
+       inhibit-package-init
+
+1997-10-27  Tomasz Cholewo  <tjchol01@mecca.spd.louisville.edu>
+
+       * prim/keymap.el (event-apply-modifier): Fix the return type and
+       scan the function-key-map.
+       (next-key-event): New function.
+       (key-sequence-list-description): Ditto.
+
+1997-10-27  SL Baur  <steve@altair.xemacs.org>
+
+       * x11/x-menubar.el: Turn off `popup-menubar-menu' keybinding.
+
+       * prim/dumped-lisp.el (preloaded-file-list): Dump canna-leim and
+       egg-leim with XEmacs.
+
+       * mule/canna-leim.el: Clean up file for dumping with XEmacs.
+       * egg/egg-leim.el: Ditto.
+
+1997-10-27  Stephen J. Turnbull <turnbull@sk.tsukuba.ac.jp>
+
+       * mule/canna-leim.el: Register Canna with LEIM when loaded
+
+       * mule/canna.el (canna): Bind `canna-toggle-japanese-mode' to
+       "\C-o" only if LEIM is not present
+
+       * egg/egg-leim.el: Registers EGG/Wnn with LEIM when loaded
+
+       * egg/egg.el: Bind `toggle-egg-mode' to "\C-\" only if LEIM is
+       not present when loaded 
+
+1997-10-27  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/about.el: Update entries
+
+1997-10-26  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/startup.el (startup-message-timeout): Startup message
+       timeout is too short.
+
+       * mule/canna.el (canna): Move canna-toggle-japanese-mode
+       keybinding to C-\.
+
+       * emulators/edt-mapper.el (edt-lucid-emacs19-p): Test for XEmacs
+       instead of Lucid in `emacs-version'.
+
+1997-10-25  SL Baur  <steve@altair.xemacs.org>
+
+       * mule/mule-cmds.el: describe-language-support,
+       describe-language-support-internal removed.
+
+Fri Aug  8 12:58:00 1997  David Byers  <davby@sen2.ida.liu.se>
+
+       * fill.el (fill-region-as-paragraph): When justifying, check for
+       end-of-buffer at the end of whitespace point is sitting in, and
+       delete the trailing whitespace if we are on the last line.
+
+1997-10-24  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/about.el (about-finish-buffer): Kill the buffer, when
+       button documents so.
+
+1997-10-24  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * pcl-cvs.el (cvs-parse-stderr): Ignore ssh-askpass message.
+
+1997-10-20  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/packages.el (locate-library): Make NOSUFFIX not affect
+       compression.
+
+1997-10-24  SL Baur  <steve@altair.xemacs.org>
+
+       * modes/c-comment.el:  Create c-comment-edit-map.
+       (c-comment-edit): Fix docstring, use new keymap.
+       Suggested by Chris Felaco <felaco@iatcmail.ed.ray.com>
+
+       * prim/help-nomule.el (tutorial-supported-languages): Add
+       Norwegian.
+
+       * prim/simple.el (assoc-ignore-case): Synch with Emacs 20.1.
+
+       * mule/mule-cmds.el (set-language-info): Forgot to set any data
+       values in language-alist.
+       (read-multilingual-string): Fix call to `read-string'.
+
+1997-10-22  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * packages/backup-dir.el (bkup-backup-directory-info): customized,
+       with :require so it loads automagicly if you've set it.  Docstring
+       updated to reflect that, and reformatted for easier reading.
+
+       * packages/jka-compr.el (jka-compr-compression-info-list):
+       Docstring clarification: what does the append flag do?
+
+       * prim/minibuf.el (minibuffer-electric-slash): leave efs prefix
+       and ~\(blah\)? when / is pressed.
+
+1997-10-24  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * efs/dired.el (dired-create-files): Get mark-char thing working
+       again: replace `integerp' by `characterp'.
+       (dired-add-entry): Ditto.
+       (dired-add-entry-do-indentation): Ditto.
+
+1997-10-24  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * x11/x-faces.el (*try-oblique-before-italic-fonts*): Customized.
+
+1997-10-23  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/startup.el (command-line-do-help): Add Documentation for
+       -vanilla and -no-packages.
+       (command-line-early): Implement them.
+
+       * prim/packages.el (inhibit-package-init): New variable.
+       (packages-find-packages): Use it.
+
+
+       * packages/jka-compr.el (jka-compr-compression-info-list):
+       Add bzip2 extensions.
+       From Tomasz Cholewo <tjchol01@mecca.spd.louisville.edu>
+
+1997-10-22  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * comint/comint.el (comint-scroll-show-maximum-output): fixups to
+       docstring, and to :type to allow numbers.
+       (comint-postoutput-scroll-to-bottom): Added window arg to
+       `recenter' call to fix the horrid flash and global recentering,
+       and uncommented the code allowing numeric values for
+       `comint-scroll-show-maximum-output'.
+
+1997-10-23  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * packages/info.el (Info-mode): Don't initialize faces.
+
+       * packages/info.el: Use `defface' to initialize faces.
+
+1997-10-23  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * modes/cperl-mode.el (cperl-here-face): fix the horrible invisible
+       green default face.
+
+1997-10-23  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/wid-edit.el (widget-choose): Acknowledge aborted choice
+       with a `Canceled' message, even if C-g wasn't pressed explicitly.
+
+1997-10-23  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * custom/cus-edit.el (hook): Use `widget-group-match' instead of
+       `widget-editable-list-match'. 
+
+1997-10-23  SL Baur  <steve@altair.xemacs.org>
+
+       * modes/c-comment.el (c-comment-edit): Fixed autoload cookie.
+       Reformatted Lisp comments.
+
+1997-10-22  SL Baur  <steve@altair.xemacs.org>
+
+       * psgml/psgml-charent.el (sgml-display-char-list-filename): Use
+       locate-data-directory instead of data-directory.
+       * psgml.el (sgml-data-directory): Ditto.
+
+1997-10-20  Jan Vroonhof  <vroonhof@math.ethz.ch>
+
+       * extents.c: Renamed shot property to initial-redisplay-function
+       (extent_fragment_update): Changed the bookkeeping whether an event 
+       has been spawned. The initial-redisplay-function property is no
+       longer set to nil.
+
+1997-10-21  SL Baur  <steve@altair.xemacs.org>
+
+       * custom/cus-dep.el (Custom-make-dependencies): Ditch the time
+       stamp.
+
+1997-10-22  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * comint/gdb.el (gdb-with-core): Fixed autoload cookie.
+
+1997-10-22  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/startup.el (command-line-1): Run term-setup-hook regardless 
+       of `input-pending-p'.
+
+       * custom/cus-edit.el (custom-split-regexp-maybe): Use `split-string'.
+
+       * custom/cus-start.el (custom-start-quote): Synch with
+       `custom-quote'.
+
+       * prim/subr.el (functionp): Synched docstring with Emacs 20.2.
+
+       * custom/cus-edit.el (custom-quote): Use `keywordp'; use
+       `car-safe'; don't conditionalize on having `characterp'.
+
+1997-10-21  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/wid-edit.el (radio-button): Use "radio0" as inactive
+       glyph.
+       (widget-visibility-value-create): Use new semantics of
+       `widget-glyph-insert'.
+
+       * custom/cus-edit.el (custom-buffer-create-internal): Setup
+       tag-down-glyphs with list.
+       (custom-group-value-create): Ditto.
+
+       * custom/wid-edit.el (widget-glyph-click): Check whether the
+       extent was detached/killed.
+       (widget-push-button-value-create): Removed crufty XPM contrast
+       hack.
+       (widget-default-create): Make the markers point nowhere after
+       using them.
+       (widget-default-create): Use `point-min-marker'/`point-max-marker'.
+       (widget-glyph-find): Disallow list.
+       (widget-glyph-insert): Allow IMAGE to be a list.
+
+1997-10-20  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/featurep.el (featurep): Handle `not' correctly.
+
+1997-10-21  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/about.el (about-maintainer-glyph): Pictures have been moved 
+       to photos subdirectory.
+
+1997-10-21  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * x11/x-menubar.el (options-menu-saved-forms): Check whether
+       `pending-delete' is bound before accessing it.
+
+1997-10-21  SL Baur  <steve@altair.xemacs.org>
+
+       * x11/x-menubar.el (default-menubar): Conditionalize games menu.
+
+1997-10-21  Colin Rafferty  <craffert@ml.com>
+
+       * x11/x-menubar.el (default-menubar): Made it use lazy-shot
+       instead of lazy-lock in "Syntax Highlighting->Lazy".  
+       (options-menu-saved-forms): Made it save lazy-shot instead of
+       lazy-lock in the options.
+
+1997-10-21  SL Baur  <steve@altair.xemacs.org>
+
+       * mule/mule-help.el (help-with-tutorial): New file.
+
+       * prim/dumped-lisp.el (preloaded-file-list): New entries for
+       help-nomule and mule-help.
+
+       * prim/help.el: Remove `help-with-tutorial'.
+
+       * prim/help-nomule.el: New file.
+
+1997-10-19  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/subr.el: Moved int-char and char-int definitions from
+       obsolete.el.
+
+1997-10-18  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/wid-edit.el (widget-push-button-value-create): Require
+       `xpm-button'.
+       (widget-push-button-value-create): Use :tag-down-glyph and
+       :tag-inactive-glyph.
+       (widget-default-create): Use :tag-inactive-glyph.
+       (widget-button-click): Correctly merge faces.
+
+       * custom/cus-edit.el (custom-variable-action): Don't redraw
+       magic.
+
+       * custom/wid-edit.el (widget-glyph-insert): Return glyph.
+       (widget-default-create): Insert :button-prefix and :button-suffix
+       only if a glyph is not used.
+       (widget-glyph-click): Respect :mouse-down-action.
+       (widget-specify-insert): Document for edebug.
+       (widget-default-create): Use markers to keep track of stuff.
+
+       * custom/cus-edit.el (custom-group-value-create): Ditto.
+
+       * custom/wid-edit.el (widget-default-create): Use :tag-down-glyph.
+
+       * custom/cus-edit.el (custom-group-value-create): Use image.
+
+       * prim/glyphs.el (init-glyphs): Minor fixups.
+
+1997-10-17  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/wid-edit.el (widget-field-value-get): Use `cond'.
+       (default): Use :button-keymap.
+       (widget-specify-button): Ditto.
+       (widget-glyph-insert-glyph): Ditto.
+       (widget-activation-glyph-mapper): Renamed from
+       `widget-activation-glyphs-mapper'.
+
+       * custom/cus-edit.el (Custom-mode-menu): Go to `Easy
+       Customization' node.
+       (boolean): Don't use nested backquotes.
+
+       * custom/wid-edit.el (widget-field-action): Check whether the new
+       value is valid before using it.
+
+1997-10-16  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/wid-edit.el (character): Use [\0-\377] instead of . in
+       :valid-regexp.
+       (widget-color-notify): Use `valid-color-name-p'.
+       (widget-activation-widget-mapper): New function.
+       (widget-specify-inactive): Use it.
+       (widget-specify-active): Ditto.
+       (widget-setup): Ditto.
+       (radio-button): Added :inactive-glyph spec.
+       (widget-toggle-value-create): Use it.
+       (widget-color-sample-face-get): Check for color before setting it.
+       (widget-color-sample-face-get): Store the face object, not its
+       name.
+
+1997-10-18  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * help.el (function-at-point): Use `function-at-point-function'.
+       (function-at-point-function): New variable, formerly
+       `find-function-function'. 
+       (describe-function): Use `function-at-point'.
+       (where-is): Ditto.
+
+       * find-func.el (find-function-read-function): Use
+       `function-at-point'. 
+
+       * packages/info.el (Info-elisp-ref): Use `function-at-point'.
+
+       * packages/hyper-apropos.el (hyper-apropos-read-function-symbol):
+       Use `function-at-point'.
+
+       * packages/etags.el (emacs-lisp-default-tag): Use
+       `function-at-point'.
+
+       * prim/obsolete.el (function-called-at-point): Make it
+         obsolete.
+
+1997-10-09  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * prim/files.el (switch-to-buffer-other-frame): Remove call to
+       `select-frame'.
+
+1997-10-17  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/packages.el (packages-find-packages-1): New argument:
+       `user-package' non-nil when searching user packages.
+       - Load any autoloads found in user packages.
+       
+1997-10-17  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * packages/info.el (Info-insert-dir): Also kill the localdir temp
+       buffers.
+
+1997-10-17  SL Baur  <steve@altair.xemacs.org>
+
+       * utils/facemenu.el: autoload the `facemenu-keymap' properly.
+
+       * mule/mule-cmds.el (read-language-name): Fix typo.
+       From Didier Verna <verna@inf.enst.fr>
+
+1997-10-15  Adrian Aichner  <aichner@ecf.teradyne.com>
+
+       * utils/build-report.el: Leaving point at begin of composed mail now.
+       Using mime-edit-content-beginning to determine file-begin of
+       Installation file.
+       Introduced the according alias for SEMI/TM compatibility.
+
+       * utils/build-report.el:
+       Corrected backward search for begin of last configuration in
+       Installation file.
+
+       * utils/build-report.el:
+       Incorporated `xemacs-build-report-installation-insert-all' feature
+       suggested by Didier Verna.
+       Composing mail parts (with-temp-buffer ...) to simplify implementing
+       future features.
+       Eliminated use of mail-mode -specific function `mail-text'.
+
+1997-10-14  Adrian Aichner  <aichner@ecf.teradyne.com>
+
+       * utils/build-report.el:
+       Incorporated fix for SEMI/TM compatibility suggested by Jens-Ulrik
+       Holger Petersen <petersen@kurims.kyoto-u.ac.jp>.  If SEMI symbols are
+       not fboundp, alias them to corresponding TM symbols.
+
+1997-10-13  Adrian Aichner  <aichner@ecf.teradyne.com>
+
+       * utils/build-report.el:
+       Changed to (mime-edit-insert-tag "text" "plain" ...) from
+       "application" "octet-stream" due to complaint from
+       Kazuyoshi Furutaka in
+       Message-Id: <19971013102132V.furutaka@Flux.tokai.jaeri.go.jp>
+
+1997-10-13  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * utils/facemenu.el: Autoload `facemenu-keymap' function definition.
+       (facemenu-color-defined-p): Nuked.
+       (facemenu-find-face): Ditto.
+       (facemenu-region-active-p): Ditto.
+       (facemenu-sized-face): Declare `prefix'.
+       (facemenu-read-color): Aliased to `read-color'.
+       (facemenu-face-attributes): Use `mapvector'.
+
+       * utils/facemenu.el: Customized and synched with FSF 20.2.
+
+1997-10-17  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * cl/cl-macs.el (extent-properties): Remove old setf method.
+
+1997-10-16  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * prim/files.el (revert-without-query): changed from boolean to
+       list of regexp as documented in NEWS and its docstring.
+
+1997-10-16  SL Baur  <steve@altair.xemacs.org>
+
+       * utils/floating-toolbar.el: (TopLevel): Don't unconditionally
+       require the feature `toolbar' it causes breakage only at
+       bytecompile time.  Don't do any initialization if toolbar support
+       is not available.
+       (floating-toolbar): Whine if no run-time toolbar support is
+       available.
+
+        * custom/wid-edit.el (widget-change-glyphs-mapper): cosmetic changes.
+        From Hrvoje Niksic <hniksic@srce.hr>
+
+       * prim/glyphs.el (init-glyphs): Use different logo for beta XEmacsen.
+       From Didier Verna <verna@inf.enst.fr>
+
+1997-10-15  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * cl/cl-macs.el (extent-property): Updated SETF methods for `get'
+       and `extent-property'.
+
+       * custom/wid-edit.el (widget-field-value-create): Revert to using
+       two markers.
+       (widget-setup): Ditto.
+       (widget-color-sample-face-get): Get only a unique face per widget.
+       (widget-color-notify): Change the color of the face instead of
+       creating a new one.
+
+       * packages/add-log.el (add-change-log-entry): Push window
+       configuration.
+       (change-log-exit): New function.
+       (change-log-cancel): Ditto.
+       (change-log-mode-map): Bind them.
+
+       * custom/wid-edit.el (widget-specify-inactive): Make glyphs look
+       inactive.
+       (widget-change-glyphs-mapper): New function.
+       (widget-glyph-click): Disallow operations on inactive glyphs.
+
+1997-10-14  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/wid-edit.el: (widget-glyph-insert-glyph): Use
+       `widget-mouse-help' if necessary.
+       (widget-documentation-string-value-create): Don't coerce help-echo 
+       WIDGET to widget.
+       (widget-button-keymap): New keymap.
+       (widget-specify-button): Use it.
+       (widget-glyph-insert-glyph): Ditto.
+       (widget-glyph-click): Dispatch events during the loop.
+       (widget-glyph-click): Use `unwind-protect' to ensure that the
+       glyph stays in up position.
+       (widget-keymap): Don't bind buttons and RET.
+       (widget-button-keymap): Bind mouse buttons and RET.
+       (widget-field-activate): Use `widget-field-find'.
+
+       * custom/wid-edit.el (widget-button-click): Visually "release" the
+       button *before* doing the buttonup action.
+       (widget-button-click): Reworked.
+       (widget-echo-help): Accept extent.
+
+       * custom/cus-edit.el (custom-face-value-create): Use `make-face'.
+
+       * custom/wid-edit.el (widget-restore-tabable): New function.
+       (widget-deactivate-widget-extent): New function.
+       (widget-reactivate-widget-extent): New function.
+       (widget-specify-inactive): Use `widget-deactivate-widget-extent'.
+       (widget-setup): Ditto.
+       (widget-specify-active): Use `widget-reactivate-widget-extent'.
+       (widget-move): Don't stop within inactive range.
+
+1997-10-14  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * language/japan-util.el: Copied from Emacs 20.2.
+
+       * mule/mule-cmds.el (char-code-property-table): New variable.
+       (get-char-code-property): New function.
+       (put-char-code-property): New function.
+
+1997-10-10  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * language/vietnamese.el: Use language/viet-util.el instead of
+       mule/mule-vietnamese.el; abolish mule/mule-vietnamese.el.
+
+1997-10-09  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * mule/mule-coding.el: Rename `automatic-conversion' ->
+       `undecided' to sync with Emacs 20.2; define coding-system
+       `automatic-conversion' as an alias for `undecided'.
+
+       mule/mule-files.el (buffer-file-coding-system-for-read,
+       convert-mbox-coding-system, insert-file-contents),
+       language/japanese.el, language/chinese.el, language/korean.el:
+       Rename `automatic-conversion' -> `undecided' to sync with Emacs
+       20.2.
+
+1997-10-08  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * language/viet-chars.el: New file; moved from
+       mule/vietnamese-hooks-1.el.
+
+       * language/vietnamese.el: Merge mule/vietnamese-hooks-2.el;
+       abolish mule/vietnamese-hooks-2.el.
+
+       * prim/dumped-lisp.el: Use language/viet-chars and
+       language/vietnamese instead of mule/vietnamese-hooks-{1|2}.
+
+1997-10-07  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * mule/mule-misc.el (split-char): New function.
+
+1997-10-14  SL Baur  <steve@altair.xemacs.org>
+
+       * default.el: New file.
+       * site-start.el: New file.  XEmacs starts faster if dummy versions 
+       of these files are found early in the `load-path'.
+       Suggested by Kyle Jones <kyle_jones@wonderworks.com>
+
+1997-10-14  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/wid-edit.el (widget-field-find): Use `map-extents'.
+       (widget-transpose-chars): Check for empty fields, and point at
+       beginning of field.
+       (widget-documentation-string-value-create): `insert-char' handles
+       0 gracefully, so no need to protect.
+       (widget-specify-inactive): Detach the button extents.
+       (widget-specify-active): Reattach the button extents.
+       (widget-make-field-untabable): New function.
+       (widget-specify-inactive): Make the fields non-tabable; use
+       `widget-make-field-untabable'.
+       (widget-type): Revert to defsubst.
+
+1997-10-13  Adrian Aichner  <aichner@ecf.teradyne.com>
+
+       * utils/xemacs-build-report.el:
+       Switched from (mail ...) to (compose-mail ...) upon suggestion by
+       Hrvoje Niksic.
+       Extended xemacs-build-report-keep-regexp.
+       Changed xemacs-build-report-make-output-file value to beta.err
+       Shortend and bracketed xemacs-build-report-subject.
+       Improved (I hope) tm-edit to SEMI aliasing logic.
+
+1997-10-09  Adrian Aichner  <aichner@ecf.teradyne.com>
+
+       * utils/xemacs-build-report.el:
+       Restored RCS keywords and updated comment for `xemacs-build-report-version'.
+
+       * utils/xemacs-build-report.el:
+       Separated the Spaghetti code into separate functions to do the following:
+       xemacs-build-report-insert-header
+       xemacs-build-report-insert-make-output
+       xemacs-build-report-insert-installation-file
+
+1997-10-13  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/cus-load.el: Disable gc while loading `custom-load'
+       files.
+       (custom-put): Added docstring; ignore PROPERTY.
+
+       * custom/wid-edit.el (widget-previous-button-or-field): If the
+       point is within a button or field, return the beginning position
+       of the field.
+
+       * prim/frame.el (frame-list): Use `nconc' instead of `append'.
+       (set-frame-configuration): Use `mapc'.
+       (delete-other-frames): Ditto.
+
+       * prim/faces.el: Use the CL macro at top-level.
+
+       * prim/faces.el (face-spec-set-match-display): Use `case'.
+       (set-face-stipple): Use backquotes.
+
+       * custom/wid-edit.el (widget-glyph-find): Use `laxputf'.
+       (widget-push-button-value-create): Ditto.
+
+       * custom/cus-face.el (custom-face-attributes): Support
+       inverse-video for TTY-s.
+
+       * prim/cmdloop.el (keyboard-escape-quit): Abort recursive edit, as 
+       documented.
+
+1997-10-12  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/simple.el (zmacs-deactivate-region): Use `mapc' instead of
+       `mapcar'.
+       (zmacs-make-extent-for-region): Ditto.
+
+       * custom/cus-dep.el: Updated comments.
+
+       * custom/cus-edit.el (custom-variable-prompt): Prompt with
+       `variable'.
+
+1997-10-12  Karl Hegbloom  <karlheg@inetarena.com>
+
+       * custom/cus-edit.el (custom-guess-name-alist): Allow `-hooks'
+       instead of `hook'.
+
+1997-10-12  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/profile.el (profile-results): Use %-*s format.
+       (profile-align): Nuked.
+
+       * packages/gnuserv.el (gnuserv-frame-plist): New variable.
+       (gnuserv-special-frame-function): Use it.
+       (gnuserv-edit-files): Ditto.
+
+1997-10-12  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/package-admin.el (package-admin-add-binary-package):
+       Correctly deal with package-paths with a single directory.
+
+1997-10-11  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/startup.el (set-default-load-path): Look for `packages'
+       directory too.
+       (set-default-load-path): Initialize Info-default-directory-list
+       from the environment variable INFOPATH.
+       (set-default-load-path): Initialize Info-default-diretory-list
+       from the configure variable `infopath'.
+
+1997-10-10  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * prim/startup.el: (set-default-load-path): loop over the `Info-
+       default-directory-list' and collect those that are `file-
+       directory-p'.
+
+       * '': various doc string corrections.
+
+       * '': changed `auto-saves-file-prefix' to "~/.xemacs/saves-"
+
+       * '' Added toplevel block (when (fboundp 'load-gc) ...to init the
+       Info-def..list from the environment variable INFOPATH at dump time.
+       
+       * prim/packages.el (packages-find-packages-1): append the list of
+       packages info directories to `Info-default-directory-list' rather
+       than prepending them.  Don't add them if they're already in the
+       list.
+
+       * packages/info.el (Info-directory-list): various fixes to the
+       directory list handling.
+       * (Info-localdir-heading-regexp) added.
+       
+       * '' removed the unrequired defcustom of `Info-default-directory-
+       list'
+
+1997-10-11  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/about.el: New faces, new entries.
+
+       * prim/profile.el (profile-results): Rename.
+       (pretty-print-profiling-info): Ditto.
+       From Kyle Jones <kyle_jones@wonderworks.com>
+
+1997-10-10  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * custom/wid-edit.el (variable-link): New widget.
+       (widget-variable-link-action): New function.
+       (function-link): New widget.
+       (widget-function-link-action): New function.
+
+1997-10-10  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * prim/modeline.el (modeline-minor-mode-menu): menus are toggles
+       not strings now.
+
+1997-10-10  SL Baur  <steve@altair.xemacs.org>
+
+       * psgml/psgml-html.el (html-quote-region): Grow bounds when performing
+       substitutions.
+       From Adrian Aichner <aichner@ecf.teradyne.com>
+
+1997-10-10  SL Baur  <steve@altair.xemacs.org>
+
+       * utils/highlight-headers.el (highlight-headers-citation-header-regexp):
+       Correct doc string.
+       From Kazuyoshi Furutaka <furutaka@Flux.tokai.jaeri.go.jp>
+
+1997-10-10  Martin Buchholz  <mrb@eng.sun.com>
+
+       * packages/bookmark.el:
+       * packages/iswitchb.el:
+       * utils/speedbar.el:
+       * utils/xemacs-build-report.el: 
+         - change Xemacs --> XEmacs
+
+1997-10-09  Colin Rafferty  <craffert@ml.com>
+
+       * modes/lazy-shot.el (lazy-shot-shot-function): Undid a breakage.
+
+1997-10-09  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * prim/help.el (function-called-at-point): Added docstring.
+       (function-at-point): Ditto.
+       (describe-function-arglist): Commented out -- seems unused.
+       (find-function): ALL find-function stuff moved to "find-func.el"
+
+       * prim/find-func.el: new file created from functions previously in 
+       "help.el".
+
+1997-10-09  SL Baur  <steve@altair.xemacs.org>
+
+       * pcl-cvs/pcl-cvs.el (cvs-changelog-ours-p): Grok new ChangeLog
+       format.
+
+       * prim/startup.el (user-init-directory): New name for
+       `emacs-user-extension-dir'.
+       (load-user-init-file): Use it.
+
+Mon Oct  6 19:12:51 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/Release 5.19
+
+Mon Oct  6 19:09:17 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-engine.el (c-guess-basic-syntax):
+       CASE 5F: extern-lang-close relpos should be
+       element 0 of inclass-p, not element 1.
+
+       * cc-mode/cc-cmds.el (c-progress-init, c-progress-fini):
+       Be silent if c-progress-interval
+       is nil.
+
+       * cc-mode/cc-vars.el (c-progress-interval): Document new semantics
+
+Fri Oct  3 23:10:04 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-engine.el (c-beginning-of-statement-1):
+       Watch out for keywords which have a
+       preceding underscore.
+
+Fri Sep 26 23:30:58 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-menus.el: Patches to Imenu support given by 
+       "Masatake (jet) YAMATO" <masata-y@is.aist-nara.ac.jp>.
+       (Jan Dubois) jan.dubois@ibm.net
+
+       * cc-mode/cc-cmds.el (c-comment-line-break-function):
+       Fix for when comment starts at
+       comment-column and there is non-whitespace preceding this on the
+       current line.
+
+       * cc-mode/cc-mode.el (c-submit-bug-report): Remove
+       c-recognize-knr-p.  Add c-comment-continuation-stars.
+
+Mon Sep 22 15:47:02 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-styles.el (c-initialize-builtin-style):
+       Only use copy-tree if it is
+       funcall-able.  This is the right patch, and was given by Erik Naggum
+       <erik@naggum.no>
+
+1997-10-08  SL Baur  <steve@altair.xemacs.org>
+
+       * x11/x-menubar.el (file-menu-filter): Reverse sense of bounds
+       test.
+       From: Didier Verna <verna@inf.enst.fr>
+
+       * prim/format.el (format-annotate-function): Reverse sync to Emacs 
+       19.
+
+1997-10-08  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/profile.el (profile-align): New function.
+
+       * prim/help.el (describe-function): Use `buffer-string' with a
+       BUFFER argument, instead of `save-excursion'+`buffer-string'.
+       (describe-variable): Ditto.
+       (describe-variable): Use `when'.
+
+       * modes/lisp-mode.el: Indent `display-message' and
+       `display-warning' better.
+
+       * prim/help.el: Customized find-function stuff.
+       (help-with-tutorial): Use point-at-{bol,eol}.
+       (with-displaying-help-buffer): Use `with-current-buffer'.
+
+       * prim/keymap.el (event-apply-modifier): Use `vconcat'.
+       (define-prefix-command): Use the NAME argument to
+       `make-sparse-keymap'.
+       (suppress-keymap): Use `incf'.
+
+       * prim/help.el (key-or-menu-binding): Document it.
+
+       * prim/keymap.el (insert-key-binding): Use `key-or-menu-binding'
+       from help.el.
+
+       * prim/help.el (built-in-variable-doc): Use `case'.
+       (describe-function-1): Assign to `file-name' instead of `home'.
+
+       * prim/profile.el (profiling-results): Handle strings correctly.
+
+       * prim/profile.el (profile): Expand FORMS only once.
+
+1997-10-08  Colin Rafferty  <craffert@ml.com>
+
+       * prim/lisp-file-db.el (lookup-lisp-file-db): Made it stop on
+       failure.
+
+1997-10-08  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/lisp-file-db.el: New file.
+       From Raymond Toy <toy@rtp.ericsson.se>
+
+1997-10-08  Colin Rafferty  <craffert@ml.com>
+
+       * modes/lazy-shot.el: Customified.  Made it handle long lines
+       better.
+
+1997-10-08  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/startup.el (load-user-init-file): Remove reference to
+       .xemacs as a file.
+
+1997-10-07  SL Baur  <steve@altair.xemacs.org>
+
+       * utils/thing.el (thing-filename): Deal with point at end of
+       buffer.
+
+1997-10-07  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * psgml/psgml.el (sgml-mode-map): modify defin-key statements to
+       use the new and improved key designator syntax. Rebound
+       'sgml-split-element to a similar key as the global 'split-line
+       binding.
+
+1997-10-07  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * utils/thing.el (thing-symbol): Return nil if `end' is nil.
+
+1997-10-07  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * modes/cperl-mode.el: Fixed the help toggle menuitem, and added
+       an autoload cookie.
+       * modes/perl-mode.el: ditch the autoload in favor of cperl-mode.
+
+1997-10-07  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * packages/etags.el (add-to-tag-completion-table): Better support
+       for Scheme code.  Parse scheme definitions and identifiers
+       with colons correctly.
+
+1997-10-07  SL Baur  <steve@altair.xemacs.org>
+
+       * mule/mule-cmds.el (read-input-method-name): Use a default if
+       available.
+       From Didier Verna <verna@inf.enst.fr>
+
+       * prim/about.el (about-url-alist): Update jwz's home page.
+
+1997-10-07  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * x11/x-menubar.el (default-menubar): Handle pending-delete
+       correctly.
+
+1997-10-06  SL Baur  <steve@altair.xemacs.org>
+
+       * utils/font.el: Don't need devices.el on XEmacs.
+
+1997-10-05  SL Baur  <steve@altair.xemacs.org>
+
+       * utils/mail-utils.el (rmail-dont-reply-to-names): Snarf from
+       rmail.el.
+
+1997-10-04  SL Baur  <steve@altair.xemacs.org>
+
+       * efs/dired.el (dired-mail-reader): Default to VM instead of old,
+       broken rmail.
+
+1997-09-29  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * prim/files.el (auto-mode-alist): make `.cl' a lisp-mode
+       extension for Franz Allegro CL.
+
+1997-10-05  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/simple.el: Minor docstring and comment changes.  Customized 
+       some more.
+
+1997-10-04  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * utils/xemacs-build-report.el (xemacs-build-report): Placed to
+       maintenance group.
+       (xemacs-create-build-report): Added an autoload cookie.
+
+       * prim/profile.el (profiling-results): Renamed from
+       `pretty-print-profiling-info'.
+
+1997-10-03  Karl M. Hegbloom  <Karl M. Hegbloom <karlheg@inetarena.com>>
+
+       * custom/cus-edit.el (custom-save-all): Bind `auto-mode-alist' to
+       nil around the init file handling to prevent unnecessary automagic
+       processing.
+
+1997-10-03  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/faces.el (face-spec-set): Invoke `init-face-from-resources'.
+
+       * custom/cus-face.el (custom-set-faces): Revert to using
+       `make-empty-face'.
+       (custom-declare-face): Ditto.
+
+1997-10-04  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/modeline.el (modeline-modified-map): Call wrapper function
+       over `vc-toggle-read-only'.
+       (modeline-toggle-read-only): New function.
+
+       * prim/files.el (basic-save-buffer): Put guard on call to
+       `vc-after-save' since someone may wish not to install the vc
+       package.
+
+       * prim/fill.el (sentence-end-double-space): Fix docstring.
+
+       * cl/cl-seq.el (remq): Reformat and add doc-string.
+       Suggested by: Karl M. Hegbloom <karlheg@inetarena.com>
+       
+1997-10-03  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * packages/func-menu.el: change the countups from message's to
+       display-message 'progress's so they don't dump in the lossage
+       buffer.
+
+1997-10-03  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * psgml/psgml.el (sgml-mode-map): Bind (meta backspace) to
+       'backward-kill-word so it works as expected. "\e\C-h" will still
+       do 'sgml-mark-current-element.
+
+1997-08-13  Yves BLUSSEAU  <hk444@cleveland.freenet.edu>
+
+       * efs/efs.el (efs-set-file-modes): Fix a bug that cause an error
+       when using the efs-set-file-modes function on a remote station with
+       a FTP daemon that don't support the QUOTE function.
+
+1997-10-02  Colin Rafferty  <craffert@ml.com>
+
+       * prim/frame.el (default-drag-and-drop-functions): Fixed a typo
+                 that was calling `data' rather than looking at it.
+
+1997-10-04  SL Baur  <steve@altair.xemacs.org>
+
+       * cl/cl-seq.el (remove): Add docstring.
+       Suggested by Karl M Hegbloom <karlheg@inetarena.com>
+
+1997-10-02  Colin Rafferty  <craffert@ml.com>
+
+       * prim/simple.el (set-fill-column): Used format to create the
+                 string for `display-message'.
+
+1997-10-03  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/cus-face.el (custom-set-faces): Make the face, if
+       necessary.
+
+1997-10-02  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/cus-face.el (custom-declare-face): Use `make-face'
+       instead of `make-empty-face'.
+       (custom-declare-face): Don't invoke init-face-from-resources
+       explicitly.
+
+       * prim/profile.el (pretty-print-profiling-info): When interactive, 
+       use a separate buffer instead of current-buffer.
+       (pretty-print-profiling-info): Prettified output.
+
+1997-10-01  SL Baur  <steve@altair.xemacs.org>
+
+       * custom/cus-dep.el (cus-face): Remove unneeded dependency on
+       cus-edit.
+
+1997-09-30  SL Baur  <steve@altair.xemacs.org>
+
+       * utils/finder.el (finder-known-keywords): Fix typo.
+
+1997-09-30  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/dumped-lisp.el (preloaded-file-list): Load
+       cl/auto-autoloads early.
+
+1997-10-01  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/cus-edit.el (custom-save-delete): Bind `find-file-hooks'
+       to nil.
+
+       * custom/wid-edit.el (widget-next-button-or-field): Use the
+       `start-open' flag to `map-extents'.
+       (widget-previous-button-or-field): Ditto.
+
+       * custom/cus-edit.el (custom-face-value-create): Use
+       `face-custom-attributes'.
+
+       * packages/font-lock.el: Defcustomed some variables.
+
+1997-09-30  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/cus-face.el: Big changes.  Most of the functionality
+       moved to faces.el.  Internal functions renamed not to start with
+       `custom-'.
+
+       * custom/cus-face.el (face-spec-set): Use `reset-face'.
+
+       * prim/faces.el (reset-face): Accept LOCALE, TAG-SET and EXACT-P.
+
+       * custom/cus-face.el (face-spec-set): Use `remove-specifier'.
+       (get-frame-background-mode): Cache background modes of frames.
+
+       * prim/minibuf.el (input-error): Add a `display-error' property.
+
+       * custom/cus-face.el (initialize-face-resources): Check for
+       `make-face-x-resource-internal' before using it.
+       (custom-get-frame-properties): Use `set-frame-property'.
+
+1997-09-29  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/wid-edit.el (widget-specify-button): Set the `tabable'
+       property.
+       (widget-specify-field): Ditto.
+       (widget-next-button-or-field): Use it.
+       (widget-previous-button-or-field): Ditto.
+
+1997-09-29  Martin Buchholz  <mrb@eng.sun.com>
+
+       * sunpro/sunpro-init.el:  Fix initialization failure if
+       compile/debug toolbar buttons are LAST on the toolbar.
+
+1997-09-29  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * prim/help.el (find-function-noselect): Now finds libraries
+       explicitly loaded from outside `load-path' as it should.
+
+1997-09-29  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/help.el(describe-function-1): Fix for compiled macros.
+       From Hrvoje Niksic <hniksic@srce.hr>
+
+Mon Sep 29 01:30:45 1997  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * prim/startup.el: Added defvars for lock-directory
+         and superlock-file to quiet the byte-compiler.
+
+         (normal-top-level): Removed call to init-glyphs; it now
+         runs at dump time from lisp/prim/glyphs.el.
+
+         (splash-frame-present): Call splash-hack-version-string
+         once after all the strings have been inserted, instead
+         of once per string insertion.
+
+       * prim/glyphs.el (init-glyphs): Replaced references
+         to data-directory with "../etc/" which is the data
+         directory at dump time.  This is likely a lose for
+         those who CANNOT_DUMP.  I don't know what the right
+         answer is in that case.
+
+         Run init-glyphs at dump time.
+
+       * prim/faces.el (init-other-random-faces): Don't set
+         colors for the text cursor if we're initializating a
+         tty device, since it does nothing on a tty.
+
+         Removed modeline-buffer-id, modeline-mousable and
+         modeline-mousable-minor-mode-code face initialization; this
+         code is now run at dump time in lisp/prim/modeline.el.
+
+       * prim/faces.el: Set reverse-p property on tty devices
+         for the primary-selection face.  Set underline-p property
+         on tty devices for the secondary-selection face.  Both of
+         these actions are to prevent init-other-random-faces from
+         considering these faces the same as the default face on
+         ttys and applying useless color specs to them.
+
+       * prim/modeline.el: Initialize modeline-buffer-id,
+         modeline-mousable and modeline-mousable-minor-mode
+         faces in this file at dump time.
+
+         Added (defvar place) to quiet the byte-compiler.
+
+Mon Sep 29 02:11:35 1997  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * packages/vc-hooks.el: Move menu installation off
+         before-init-hook and do it at dump time.
+
+       * ediff/ediff-hook.el: Move menu installation off
+         before-init-hook and do it at dump time.
+
+1997-09-29  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * prim/help.el (describe-function-1): If the function is not yet
+       loaded, print the autoload file-name.  If function is loaded,
+       print the library name in `load-history' or from
+       `compiled-function-annotation'.
+
+1997-09-28  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * prim/help.el (find-function-noselect): remove reference to
+       `path' from the (let* ((path find... since &optional path is no
+       longer an argument to this function.  Cures "Signaling:
+       (void-variable path)" error when using {M-x find-function}.
+
+1997-09-27  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * utils/regexp-opt.el: Add support for the shy grouping "\\(?:"
+                 that came along with the new regexp syntax.
+
+1997-09-29  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * x11/x-toolbar.el: Minor fixes.
+
+1997-09-28  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/wid-edit.el (color): Buttonify the tag.
+       (widget-color-action): Use `read-color' unconditionally.
+
+       * utils/edmacro.el: Use append/vconcat instead of mapcar/mapvector
+       with `identity'.
+       (format-kbd-macro): Use `indirect-function' instead of
+       `symbol-function'.
+       (read-kbd-macro): Fix docstring.
+       (edmacro-finish-edit): Use `match-string'.
+       (edmacro-parse-keys): Ditto.
+       (edmacro-parse-word): Use `dotimes' instead of `loop'.
+       (edmacro-format-keys): Ditto.
+
+       * custom/cus-face.el (custom-face-attributes): Use
+       `set-face-background-pixmap', instead of `set-face-stipple'.
+
+       * custom/cus-edit.el (custom-group-menu-create): Check whether
+       `custom-menu-create' returned a list.
+
+1997-09-28  SL Baur  <steve@altair.xemacs.org>
+
+       * utils/finder.el (finder-known-keywords): Ignore mule entry when
+       built without Mule.
+
+1997-09-27  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * quail.el (quail-execute-non-quail-command): `keylist' is not
+       list of characters.
+       (quail-update-translation): Don't use `quail-delete-region'
+       because overlay emulation of XEmacs can not regard 0 length
+       overlay.
+       (quail-show-kbd-layout): Must convert character(code) to event.
+
+1997-09-26  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * quail.el: sync with Emacs 20.2.
+
+1997-09-27  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * mule-init.el (init-mule): Load leim-list.el (to sync with Emacs
+       20.2).
+
+       * mule-cmds.el: Change key binding for `select-input-method' to
+       sync with Emacs 20.2.
+
+       (get-language-info, set-language-info, set-language-info-alist,
+       read-language-name): Modify to sync with Emacs 20.2.
+
+       (leim-list-file-name): New constant (imported from Emacs 20.2).
+       (leim-list-header, leim-list-entry-regexp,
+       update-leim-list-functions): New variable (imported from Emacs
+       20.2).
+       (update-leim-list-file): New function (imported from Emacs 20.2).
+
+       (current-input-method, current-input-method-title): Modify
+       DOC-string to sync with Emacs 20.2.
+       (default-input-method): Use `defcustom' (to sync with Emacs 20.2).
+       (input-method-history): New variable (imported from Emacs 20.2).
+
+       (inactivate-current-input-method-function): Modify DOC-string to
+       sync with Emacs 20.2.
+
+       (input-method-alist): New variable (imported from Emacs 20.2).
+       (register-input-method, read-input-method-name,
+       activate-input-method, inactivate-input-method): New function
+       (imported from Emacs 20.2).
+       (select-input-method, toggle-input-method, describe-input-method,
+       describe-current-input-method, read-multilingual-string): Modify
+       to sync with Emacs 20.2.
+       (input-method-verbose-flag): New variable; abolish
+       `input-method-tersely-flag'; to sync with Emacs 20.2.
+       (input-method-highlight-flag): New variable (imported from Emacs
+       20.2).
+
+       (input-method-activate-hook, input-method-inactivate-hook): Modify
+       DOC-string to sync with Emacs 20.2.
+       (input-method-exit-on-invalid-key): New variable (imported from
+       Emacs 20.2).
+
+       * mule-coding.el (check-coding-system): New alias.
+       (modify-coding-system-alist): New function (imported from Emacs
+       20.2).
+
+       Rename coding-system `iso-2022-7' -> `iso-2022-7bit' to sync with
+       Emacs 20.2; define alias `iso-2022-7' for compatibility.
+
+       * mule-process.el (network-coding-system-alist): New variable.
+       (open-network-stream): Refer it.
+
+1997-09-27  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * viet-util.el: New file; Imported from Emacs 20.2.
+
+       * tibet-util.el: New file; Imported from Emacs 20.2.
+
+       * hebrew.el, lao.el, lao-util.el, vietnamese.el, tibetan.el:
+       Imported from Emacs 20.2.
+
+       * greek.el, european.el, ethiopic.el, english.el, cyrillic.el,
+       chinese.el, korean.el, japanese.el, thai.el, misc-lang.el: Modify
+       to sync with Emacs 20.2.
+
+1997-09-24  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * mule-process.el (start-process): Refer
+       `process-coding-system-alist'.
+
+       * mule-process.el (call-process-region): Refer
+       `process-coding-system-alist'.
+
+       * mule-process.el (process-coding-system-alist): New variable.
+       (call-process): Refer it.
+
+       * mule-init.el: Rename `pathname-coding-system' to
+       `file-name-coding-system' to sync with Emacs 20.2.
+
+       * mule-coding.el: Rename `pathname-coding-system' to
+       `file-name-coding-system' to sync with Emacs 20.2; define
+       `pathname-coding-system' as an obsolete variable.
+
+1997-09-03  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * mule/mule-files.el: Implement `file-coding-system-alist' of
+       Emacs 20.0.97 to sync; abolish variable
+       `buffer-file-coding-system-alist'.
+
+       (find-file-coding-system-for-read-from-filename): Renamed from
+       `find-buffer-file-coding-system-from-filename'; modify for new
+       `file-coding-system-alist'.
+
+       (find-file-coding-system-for-write-from-filename): New function.
+
+       (insert-file-contents): Modify for new `file-coding-system-alist'.
+
+       (write-region): Use
+       `find-file-coding-system-for-write-from-filename'.
+
+1997-09-27  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/obsolete.el (define-widget-keywords): Make it obsolete.
+
+       * custom/widget.el (define-widget-keywords): Restore superfluous
+       function `define-widget-keywords'.
+
+       * modes/sh-script.el (sh-script): Restore correct feature.
+
+1997-09-27  Tomasz Cholewo  <tjchol01@mecca.spd.louisville.edu>
+
+       * prim/isearch-mode.el (isearch-help-or-delete-char): New function.
+
+1997-09-27  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/cus-dep.el (Custom-make-dependencies): Minor fixes.
+
+1997-09-27  SL Baur  <steve@altair.xemacs.org>
+
+       * packages/completion.el: Remove keybinding of M-return for
+       hyperbole.
+       (completion-kill-region): The version of this function in InfoDock
+       4.0pre was very broken for XEmacs due to active region handling
+       and because it didn't set the `this-command' variable properly
+       when doing a kill.
+       From:  Bob Weiner <weiner@altrasoft.com>
+
+1997-09-26  SL Baur  <steve@altair.xemacs.org>
+
+       * utils/autoload.el: Removed code dealing with customization.
+       (update-file-autoloads): Fix typo in DOC string, remove custom code.
+       (update-autoloads-from-directory): Remove custom code.
+       (batch-update-autoloads): Fix DOC string, remove custom code.
+       (batch-update-directory): Fix DOC string, remove custom code.
+
+1997-09-26  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * prim/help.el (describe-function-at-point): new function.
+       (describe-variable-at-point): ditto.
+       (help-next-symbol): ditto.
+       (help-prev-symbol): ditto.
+       (describe-function): Mention `find-function-function' in
+       docstring.  Use `function-history' in completing-read.
+       (describe-function-1): Only print one filename, even if we know
+       two!  Use `variable-history' in completing-read.
+       (where-is): Mention `find-function-function' in docstring.
+       (find-function-function): improve docstring.
+       (find-function-noselect): Remove optional arg.  Search also for
+       cl's defun*.  Return a pair instead of a list.
+       (find-function-read-function): use `function-history'.
+       (find-function-do-it): new function.
+       (find-function): Remove optional arg.  Use `find-function-do-it'.
+       (find-function-other-window): ditto.
+       (find-function-other-frame): ditto.
+       (find-function-at-point): new function.
+
+1997-09-26  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/cus-edit.el: Issue a message about loading customization
+       dependencies.
+
+       * custom/wid-edit.el (widget-map-buttons): Fixed typo.
+
+1997-09-25  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/files.el (after-find-file): Revert synch to Emacs 20 and
+       restore old directory creation behavior.
+
+1997-09-25  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/wid-edit.el (widget-button-or-field-extent): New
+       function.
+       (widget-next-button-or-field): Use it.
+       (widget-previous-button-or-field): Ditto.
+       (widget-move): Don't signal an error when there is only one widget
+       in the buffer.
+       (widget-push-button-value-create): Cache glyphs themselves,
+       instead of instantiators.
+       (widget-documentation-string-value-create): Better help echo
+       (widget-mouse-help): Use `functionp'.
+       (widget-echo-help): Ditto.
+
+1997-09-25  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/glyphs.el (init-glyphs): Fix jpeg signature.
+
+1997-09-24  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * modes/lazy-shot.el (lazy-shot-shot-function): make the message
+       be displayed as progress.
+
+1997-09-25  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * comint/telnet.el: Minor custom changes.
+
+       * custom/wid-edit.el (widget-field-action): Edit the value in the
+       minibuffer.
+
+       * custom/cus-edit.el (custom-group-value-create): Renamed `Go to
+       Group' tag to `Open'.
+
+       * custom/wid-edit.el (widget-shadow-subrs): New variable.
+       (widget-url-link-help-echo): New function.
+       (url-link): Use it.
+       (widget-emacs-library-link-help-echo): New function.
+       (emacs-library-link): Use it.
+
+1997-09-24  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/wid-edit.el (widget-glyph-insert-glyph): Encode the
+       widget information to extent, not to the glyph.
+       (widget-glyph-click): Extract the widget from the extent, not the
+       glyph.
+       (widget-glyph-find): Set up a glyph cache.
+
+       * prim/about.el: Use :button-prefix and :button-suffix instead of
+       the variables.
+
+       * custom/wid-edit.el (widget-field-keymap): Bind Sh-TAB to
+       `widget-backward'.
+       (widget-specify-field): Use extents, not overlays.
+       (widget-specify-button): Ditto.
+       (widget-specify-sample): Ditto.
+       (widget-specify-inactive): Ditto.
+       (widget-button-click): Ditto.
+       (widget-field-value-create): Ditto.
+       (widget-field-value-delete): Ditto.
+       (widget-color-notify): Ditto.
+       (widget-setup): Ditto.
+       (widget-map-buttons): Use `map-extents'.
+       (widget-keymap): Made `global-map' its parent.
+       (widget-next-button-or-field): New function.
+       (widget-previous-button-or-field): Ditto.
+       (widget-move): Use them.
+
+       * custom/custom.el (custom-group-hash-table): Use
+       `make-hashtable', with initial size 300.
+       (custom-add-to-group): Update hash-table unconditionally.
+
+1997-09-24  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/packages.el (packages-useful-lisp): Arrange to bytecompile
+       shadow.elc early.
+
+1997-09-22  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * x11/x-toolbar.el (Info-frame-plist): Added.
+       (toolbar-info) Use new plist variable to make-frame.
+
+1997-09-24  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/wid-edit.el (widget-button1-click): Would bug out on
+       events with no bindings.
+
+       * custom/cus-edit.el (custom-group-value-create): Update members
+       after loading the widget.
+       (custom-group-link-help-echo): New function.
+       (custom-group-link): Use it.
+
+       * prim/cus-load.el (custom-put): Update
+       `custom-parent-hash-table'.
+
+       * custom/cus-edit.el (custom-add-parent-links): Use
+       `custom-group-hash-table' to map the groups.
+
+       * custom/custom.el (custom-parent-hash-table): New variable.
+       (custom-add-to-group): Use it.
+
+       * prim/cus-load.el: Don't issue message for every loaded file.
+
+       * custom/cus-edit.el (custom-group-prompt): New function.
+       (customize): Use it.
+       (customize-other-window): Ditto.
+
+       * custom/wid-edit.el (widget-field-keymap): Bind TAB to
+       `widget-forward'.
+
+1997-09-23  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/cus-edit.el: Use `display-message' to indicate progress
+       messages.
+       (customize-set-variable): Use the third argument to `get'.
+       (customize-save-variable): Ditto.
+       (custom-variable-value-create): Ditto.
+       (custom-variable-state-set): Ditto.
+       (custom-variable-set): Ditto.
+       (custom-variable-save): Ditto.
+       (custom-variable-reset-saved): Ditto.
+       (custom-variable-reset-standard): Ditto.
+
+       * custom/cus-edit.el: Removed C-coded routines.
+
+       * custom/cus-edit.el (custom-buffer-create-internal): Print a
+       limited number of messages.
+       (custom-group-value-create): Ditto.
+
+       * custom/wid-edit.el (widget-editable-list-value-get): Revert to
+       `append'.
+
+1997-09-22  Colin Rafferty  <craffert@ml.com>
+
+       * modes/lazy-shot.el (lazy-shot-shot-function): Made it do its
+                 work in the correct buffer.  Also, changed obsolete
+                 function call to non-obsolete version.
+
+1997-09-22  Colin Rafferty  <craffert@ml.com>
+
+       * utils/shadow.el (find-emacs-lisp-shadows): Removed extra slash
+                 between directory and filename.
+
+1997-09-23  SL Baur  <steve@altair.xemacs.org>
+
+       * ilisp/Makefile (SHELL): Remove dependency on /bin/csh.
+
+1997-09-23  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/wid-edit.el (widget-move): Use `incf'.
+       (widget-after-change): Ditto.
+       (widget-field-value-get): Ditto.
+       (widget-info-link-help-echo): New function.
+       (info-link): Use it.
+
+       * custom/cus-edit.el (custom-last): Removed.
+       (custom-buffer-create-internal): Use `incf'.
+       (custom-group-value-create): Ditto.
+
+       * packages/auto-save.el: Minor custom fixes.
+
+       * prim/cus-dep.el (Custom-make-dependencies): Generate correct
+       output wrt `custom-put'.
+
+       * custom/wid-edit.el (widget-tabable-at): Use `widget-at'.
+
+       * custom/cus-edit.el (custom-group-value-create): Use
+       `custom-group-visibility' instead of `group-visibility'.
+
+       * prim/help.el (help-map): Bound `C-h C' to `customize'.
+
+       * custom/wid-edit.el (widget-princ-to-string): Don't use `let'.
+       (widget-clear-undo): Removed current-buffer argument.
+       (widget-choose): Use minibuffer when there are more than 10 items.
+
+1997-09-22  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/cus-edit.el (custom-button-face): Made it bold.
+       (custom-group-value-create): Change outlook of buffer.
+       (custom-buffer-create-internal): Ditto.
+       (custom-menu-nesting): Removed -- was unused by XEmacs.
+       (custom-menu-create): Don't use `custom-menu-nesting'.
+       (custom-group-menu-create): Define unconditionally.
+       (customize-menu-create): Ditto.
+       (custom-unlispify-menu-entry): Use `with-current-buffer'.
+
+       * custom/wid-edit.el (widget-checklist-match-inline): Revert to
+       `append'.
+       (widget-checklist-value-get): Ditto.
+       (widget-editable-list-match-inline): Ditto.
+       (widget-group-match-inline): Ditto.
+       (widget-glyph-find): Removed compatibility checks; use
+       `locate-data-directory'.
+       (widget-glyph-find): Use backquotes.
+       (widget-push-button-value-create): Ditto.
+       (widget-choice-mouse-down-action): Don't use `window-system'.
+       (widget-transpose-chars): New function.
+       (widget-text-keymap): Use it.
+       (widget-princ-to-string): Use `with-current-buffer'.
+       (widget-map-buttons): Ditto.
+       (widget-push-button-gui): Set to value of `widget-glyph-enable' by 
+       default.
+       (widget-push-button-value-create): Call `widget-specify-button'.
+
+       * utils/mail-extr.el: Customized.
+
+1997-09-21  SL Baur  <steve@altair.xemacs.org>
+
+       * packages/man.el: Reverse manual prefix patch.
+
+1997-09-21  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * packages/man.el: Got rid of the `stars', and hard coded a prefix
+                 of "Man: " for manual-entry buffers.
+
+1997-09-21  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * custom/cus-face.el (frame-background-mode): Renamed from
+       `custom-background-mode'.
+       (frame-background-mode): Rewritten.
+
+       * x11/x-menubar.el: Customized.
+
+       * custom/cus-face.el (face-spec-set-match-display): Use `warn' for 
+       warnings.
+
+       * x11/x-font-menu.el: Customized.
+
+       * modes/reftex.el: Add prefixes to customization groups.
+
+       * custom/cus-edit.el (customize): Accept GROUP.
+       (customize-group): Defalias to `customize'.
+       (customize-other-window): New function.
+       (customize-group-other-window): Alias to `customize-other-window'.
+
+       * custom/wid-edit.el (widget-choose): Now works with
+       `widget-menu-minibuffer-flag' set to nil.
+       (widget-menu-minibuffer-flag): Default to nil.
+       (widget-specify-insert): Use new blackquote syntax.
+       (widget-checklist-value-get): Ditto.
+       (widget-map-buttons): Ditto.
+       (widget-checklist-match-inline): Ditto.
+       (widget-editable-list-match-inline): Ditto.
+       (widget-group-match-inline): Ditto.
+       (widget-checklist-match-inline): Use `nconc'.
+       (widget-keymap): Bind `M-tab' to `widget-backward'.
+
+       * prim/help.el (find-function-noselect): `locate-library' is
+       compression-aware; don't duplicate the work.
+
+       * prim/packages.el (packages-hardcoded-lisp): Remove "cl-defs".
+
+       * custom/wid-edit.el: Use `remove-if'.
+       (widget-glyph-directory): Use `locate-data-directory'.
+
+       * custom/cus-edit.el (custom-unlispify-remove-prefixes): Default
+       to t.
+
+       * custom/wid-edit.el: Removed *lots* of compatibility stuff.
+
+       * custom/wid-edit.el: (widget-editable-list-value-get): Apply
+       `nconc' instead of `append'.
+
+       * custom/wid-edit.el: Ditto.
+
+       * custom/cus-edit.el: Ditto.
+
+       * custom/custom.el: Use `mapc' instead of `mapcar', where
+       appropriate.
+
+       * custom/wid-edit.el: Ditto.
+
+       * custom/cus-edit.el: Ditto.
+
+       * custom/custom.el: Ditto.
+
+       * custom/widget.el: Don't define widget keywords.
+
+1997-09-21  Joel Peterson  <tarzan@aosi.com>
+
+       * prim/menubar.el: use normalize-menu-item-name instead of downcase
+       to compare menu item names.
+
+1997-09-20  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * packages/etags.el: Lots of changes.
+
+1997-09-20  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/faces.el (Top Level): Back out use of the loop macro.  It now
+       isn't defined until loaddefs gets loaded.
+
+1997-09-20  Tomasz Cholewo  <tjchol01@mecca.spd.louisville.edu>
+
+       * prim/help.el (help-for-help): Make menu items style more uniform.
+
+1997-09-20  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * modes/sendmail.el: Don't define keys to mail etc.
+
+       * prim/keydefs.el: Add bindings to `compose-mail'.
+
+       * prim/simple.el: Synch mail stuff with Emacs 20.
+
+       * utils/reporter.el: Removed mail-user-agent stuff.
+
+       * x11/x-menubar.el (default-menubar): Use new semantics for
+       `gnuserv-frame'.
+
+       * prim/obsolete.el (string-to-sequence): Wouldn't work with TYPE
+       `vector'.
+
+1997-09-19  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * cl/cl.el: Don't load cl-defs.
+
+       * cl/cl-macs.el: Added autoload cookies.
+
+1997-09-19  SL Baur  <steve@altair.xemacs.org>
+
+       * packages/man.el (Manual-buffers-have-prefix): New function.
+       (manual-entry): Use it.
+       From Remek Trzaska <remek@postoffice.npac.syr.edu>
+
+1997-09-18  Colin Rafferty  <craffert@ml.com>
+
+       * prim/novice.el (disable-command): Made it modify `custom-file'
+                 instead of `user-init-file'.
+
+                 Stop multiple disable/enable-command calls from adding
+                         extra newlines.
+
+1997-09-19  Tomasz Cholewo  <tjchol01@mecca.spd.louisville.edu>
+
+       * prim/make-docfile.el: Use null, not not.
+
+1997-09-18  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * prim/isearch-mode.el (isearch-message): Display-message as
+       progress (this way isearch message won't appear in the message 
+       log).
+
+1997-09-18  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * packages/info.el (Info-elisp-ref): Use `find-function-function'.
+
+1997-09-18  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * packages/lazy-lock.el (lazy-lock-pre-idle-fontify-windows):
+       Don't do lazy-lock'ing if we're in the minibuffer.
+
+1997-09-17  SL Baur  <steve@altair.xemacs.org>
+
+       * oobr/Makefile (autoloads): Fix target.
+
+       * hyperbole/Makefile (autoloads): Fix target.
+
+       * utils/autoload.el (batch-update-autoloads): Obey
+       `autoload-package-name' setting.
+
+       * efs/Makefile: Correct autoloads target.
+
+       * prim/packages.el (locate-library): Simplify regexp for
+       compression suffixes.
+       Suggested by: Hrvoje Niksic <hniksic@srce.hr>
+       
+1997-09-17  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * ilisp/ilisp-out.el (ilisp-scroll-output): bind `scroll-in-place'
+                 to nil around the call to #'scroll-up so that {C-c v}
+                 will properly scroll the *output* buffer.
+
+1997-09-17  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * ilisp/ilisp-out.el (ilisp-needed-window-height): make window one
+                 line bigger
+
+1997-09-15  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * packages/info.el (Info-mouse-track-double-click-hook): follow
+       the top menu item when double click in bottom 1/4 and middle 1/3
+
+1997-09-16  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/about.el (about-hackers): Add new entry.
+
+Tue Sep 16 19:23:24 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/Release 5.18
+
+Tue Sep 16 23:17:15 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-menus.el (cc-imenu-c-prototype-macro-regexp): New
+       variable.
+
+       (cc-imenu-c++-generic-expression): Patches to better match C++ code.
+       Given by jan.dubois@ibm.net (Jan Dubois)
+
+       * cc-mode/cc-menus.el (cc-imenu-java-generic-expression):
+       Removed test for declaration
+       statements.  Patch given by Ake Stenhoff <etxaksf@aom.ericsson.se>, as
+       forwarded to me by RMS.
+
+       * cc-mode/cc-menus.el:
+       Imenu support for Objective-C given by Masatake (jet) YAMATO.
+
+       * cc-mode/cc-mode.el (objc-mode): Bind imenu-create-index-function to
+       cc-imenu-objc-function to enable Imenu support for Objective-C.
+       Contributed by Masatake (jet) YAMATO.
+
+Mon Sep 15 23:21:51 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-styles.el (c-initialize-builtin-style):
+       Use existing copy-tree if it's defined.
+
+       copy-sequence doesn't work; the
+       c-offsets-alist must be copied recursively.  Use copy-tree solution
+       given by Simon Marshall.
+
+Fri Sep  5 04:47:03 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-cmds.el (c-beginning-of-statement):
+       Fixes in sentence movement to properly
+       handle M-e moving forward into a comment when looking at preceding
+       whitespace, and M-a moving backward into comment when looking at
+       following whitespace.
+
+       Uncommented the looking-at call in the
+       sentence-flag clause so that moving by forward-sentence when looking
+       at the beginning of a comment works again.  A previous log message in
+       cc-mode.el indicates this was commented out "because
+       c-beginning-of-statement-1 should do the right thing", but clearly it
+       doesn't.
+
+       I don't know if this breaks something else, because I can't figure out
+       why it was commented out in the first place.
+       
+       * cc-mode/cc-langs.el:
+       Define `/' in c-mode-base-map since all modes now support
+       c-electric-slash.
+
+       Define C-c C-e in mode-specific maps instead of c-mode-base-map since
+       c-expand-macro is meaningless in Java and IDL.
+
+       * cc-mode/cc-engine.el (c-end-of-statement-1):
+       Wrap backward-up-list in a c-safe call so no
+       error results when buffer contains only a comment and point is at
+       eob.
+
+1997-09-15  SL Baur  <steve@altair.xemacs.org>
+
+       * utils/autoload.el (customized-symbols): Use a hash table.
+
+       * prim/cus-load.el (custom-put): Restore.
+       Adapted from code by Hrvoje Niksic  <hniksic@srce.hr>
+
+       * x11/x-toolbar.el (initial-toolbar-spec): Remove news and mail
+       icons from default toolbar.
+
+1997-09-14  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/packages.el (locate-data-directory): Return nil when
+       directory not found.
+       (locate-library): Reimplemented using `locate-file'.
+
+1997-09-14  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/cus-dep.el: Provide `cus-dep'.
+
+       * packages/time.el (display-time-insinuate): New function; don't
+       insinuate upon loading.
+       (display-time): Use it.
+
+       * prim/loadup.el: Use it.
+
+       * prim/dumped-lisp.el (dumped-lisp-packages): Renamed to
+       `preloaded-file-list'.
+
+       * prim/cus-load.el: Updated the comment.
+
+       * prim/cus-dep.el (custom-make-dependencies): Unjunkify.
+
+       * modes/lisp-mode.el: Declare indentation of `with-temp-buffer'.
+
+       * prim/cus-dep.el (custom-make-dependencies): Allow optional
+       parameter; don't kill Emacs.
+
+       * modes/cl-indent.el: Minor customize changes.
+
+       * modes/asm-mode.el: Minor customize changes.
+
+       * modes/arc-mode.el: Customized.
+
+       * modes/ada-stmt.el: New file.
+
+       * modes/ada-mode.el: Synched with FSF (customized, etc.)
+
+1997-09-13  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/files.el (switch-to-buffer-other-frame): Undo previous
+       change when focus-follows-mouse policy is in effect.
+
+1997-09-14  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * packages/recent-files.el: Minor customize changes.
+
+       * packages/man.el: Minor customize changes.
+       (Manual-use-rosetta-man): Moved the extensive info from docstring.
+
+       * packages/makeinfo.el: Minor customize changes.
+
+       * packages/info.el: Minor customize changes.
+
+       * packages/gopher.el: Minor customize changes.
+
+       * packages/func-menu.el: Minor customize changes.
+
+       * packages/etags.el (tags-delete): Use builtin `delete'.
+       (tags-remove-duplicates): Don't recurse.
+       Fixup customizations.
+
+       * packages/emerge.el: Use `with-current-buffer' instead of
+       `emerge-eval-in-buffer'; reindent.
+
+       * packages/compile.el: Minor customize changes.
+
+       * packages/bookmark.el: Customized.
+
+       * packages/avoid.el (mouse-avoidance-mode): Customized properly.
+
+       * packages/autoinsert.el: Customized.
+
+       * modes/xrdb-mode.el: Minor customize changes.
+
+       * modes/vrml-mode.el: Minor customize changes.
+
+       * modes/vhdl-mode.el: Customized.
+       (vhdl-emacs-features): Recognize XEmacs 20 correctly.
+
+       * modes/vhdl-mode.el: Require elp when compiling.
+
+       * modes/texinfo.el: Minor customize changes.
+
+       * modes/tcl.el: Minot customize changes.
+
+       * modes/strokes.el: Small fixes.
+       (strokes-mode): Don't signal error without window system; issue a
+       warning.
+       (strokes-insinuate): New function.  Don't defadvice upon loading.
+       (strokes-mode): Use it.
+       (strokes-char-face): Use `defface'.
+
+       * modes/simula.el: Customized.
+
+       * modes/scribe.el: Customized.
+       (scribe-envelop-word): Don't bind `noparens' (unused).
+
+       * modes/rsz-minibuf.el: Remove old lemacs support,
+       e.g. screen-vs-frame, etc.
+       (resize-minibuffer-min): Removed.
+
+       * modes/rsz-minibuf.el: Fix customizations.
+
+       * prim/subr.el: Moved string-to-foo functions to obsolete.el.
+
+       * prim/obsolete.el: Comments.
+
+1997-09-13  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * packages/filladapt.el: Added `:require' to filladapt-mode
+       customization.
+
+       * modes/whitespace-mode.el: Customize better.
+
+       * modes/hideshow.el: Customize.
+
+       * packages/icomplete.el: Don't turn on by default; customize
+       correctly.
+
+       * utils/uniquify.el: Don't invade Emacs by default.
+       (uniquify-buffer-name-style): Default to nil.
+
+       * utils/uniquify.el: Removed support for Emacs 18.
+
+       * packages/pending-del.el: Customize `pending-delete-mode'.
+
+       * modes/sh-script.el: Renamed `sh-script' customization group to `sh'.
+
+       * packages/balloon-help.el: Customize `balloon-help-mode'.
+
+       * packages/paren.el: Don't invade Emacs by default.
+       Finished customizing.
+
+1997-09-13  SL Baur  <steve@altair.xemacs.org>
+
+       * x11/x-toolbar.el (toolbar-paste-function): Remove reference to
+       x-yank-primary-selection.
+       Suggested by: Hrvoje Niksic <hniksic@srce.hr>
+
+       * prim/about.el (about-xemacs): Update release date with worst
+       case.
+       (about-maintainer-info): Sync entry with 19.16.
+
+1997-09-11  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * packages/vc.el (vc-default-init-version): Make the default value 
+       be `nil'.  Improve the docstring.
+
+1997-09-12  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/make-docfile.el: Spawn make-docfile to csh on next-mach as
+       well as BSD.
+
+1997-09-13  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * mule/mule-util.el: Clean of Emacs-ported things.
+
+1997-09-12  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * packages/etags.el (tags-file-pattern): Allow `,' in file names.
+
+       * prim/startup.el (initial-scratch-message): Converted to defcustom.
+
+1997-09-11  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * packages/tar-mode.el: Customize; use cl.el instead of
+       home-brewed extensions.
+
+1997-09-10  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/subr.el (mapc-internal): Define for backward compatibility.
+
+       * cl/cl-extra.el: Don't define `mapc'.
+
+1997-09-07  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/startup.el (initial-scratch-message): Cosmetic change.
+
+Fri Sep  5 00:50:41 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/Release 5.17
+
+Fri Sep  5 04:47:03 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-cmds.el (c-beginning-of-statement):
+       Fixes in sentence movement to properly
+       handle M-e moving forward into a comment when looking at preceding
+       whitespace, and M-a moving backward into comment when looking at
+       following whitespace.
+
+       * cc-mode/cc-langs.el:
+       Define `/' in c-mode-base-map since all modes now support
+       c-electric-slash.
+
+       Define C-c C-e in mode-specific maps instead of c-mode-base-map since
+       c-expand-macro is meaningless in Java and IDL.
+
+       * cc-mode/cc-engine.el (c-end-of-statement-1):
+       Wrap backward-up-list in a c-safe call so no error results when
+       buffer contains only a comment and point is at eob.
+
+       * cc-mode/cc-cmds.el (c-beginning-of-statement):
+       Uncommented the looking-at call in the
+       sentence-flag clause so that moving by forward-sentence when looking
+       at the beginning of a comment works again.  A previous log message in
+       cc-mode.el indicates this was commented out "because
+       c-beginning-of-statement-1 should do the right thing", but clearly it
+       doesn't.
+
+       I don't know if this breaks something else, because I can't figure out
+       why it was commented out in the first place.
+
+Tue Aug 26 22:31:55 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-styles.el (c-style-alist): "python" style,
+       knr-argdecl-intro == +
+
+Mon Aug 25 17:25:12 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-engine.el (c-inside-bracelist-p):
+       Add a test to the enum list test so that the
+       following code won't erroneously recognize as inside a brace list:
+
+       static PyObject **
+       unpack_sequence(v, argcnt, why)
+            PyObject **v;
+            int argcnt;
+            enum *why_code;
+       {
+               int i;
+
+       Otherwise, the `enum' in the K&R decl trips this code up.
+
+       * cc-mode/cc-styles.el (c-style-alist): "python" style,
+       fill-column = 78
+
+Fri Aug 22 20:25:57 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-cmds.el (c-comment-line-break-function):
+       Don't break line in the middle of a string.
+
+Mon Aug 18 17:37:24 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-styles.el (c-style-alist):
+       "python" style change: arglist-intro <= +
+       "python" style change: inextern-lang <= 0
+
+Fri Aug 15 18:39:10 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-styles.el (c-style-alist):
+       "python" style requires c-comment-continuation-stars
+       to be "".
+
+1997-09-09  SL Baur  <steve@altair.xemacs.org>
+
+       * utils/autoload.el: One too many -autoload suffixes.
+
+1997-09-07  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/startup.el (initial-scratch-message): Cosmetic grammar
+       fixup in startup *scratch* message.
+
+1997-09-09  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * packages/vc.el (vc-register): make the second option arg COMMENT 
+       do something
+
+       * packages/vc.el (vc-register): Make the default initial
+       version be `vc-default-init-version', a new variable
+       defaulting to "0.1".
+
+1997-09-08  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/packages.el (packages-find-packages): Reverse package path.
+       From Colin Rafferty <craffert@ml.com>
+
+1997-09-07  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * utils/edmacro.el (edmacro-parse-word): Accept ^foo (would signal 
+       error).
+       (edmacro-format-1): Add SPC after ^.
+
+1997-09-03  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/make-docfile.el (Top Level): Ensure `load-path' always has
+       directory names ending in '/'.
+
+       * prim/packages.el (list-autoloads-path): Assume `load-path'
+       always has directories ending with trailing `/'s.
+
+       * version.el (emacs-version): Preserve previous matching info.
+       From Didier Verna <verna@inf.enst.fr>
+
+Wed Sep  3 13:53:10 1997  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/loadup.el:  *Never* add directories to the load-path
+       without trailing slashes.
+
+1997-09-03  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/packages.el (packages-find-packages): New argument:
+       `suppress-user' to allow suppression of searching package
+       hierarchies beginning with "~".
+       (Top Level): Suppress searching user directories at dump time.
+
+1997-08-30  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * packages/info.el (Info-mouse-track-double-click-hook): Added,
+       and placed an `add-hook' into (Info-mode)
+
+1997-08-29  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * packages/hyper-apropos.el (hyper-apropos-help-map): add
+       keybinding to `hyper-apropos-find-function'.
+       (hyper-apropos-map): removed unnecessary double binding to
+       `hyper-apropos-set-variable'.
+       (hyper-apropos-find-function): new function.
+       (hyper-apropos-popup-menu): if in the help mode, look for symbol
+       at top of the buffer if necessary.  Added menu entry for
+       `hyper-apropos-find-function'.
+
+1997-08-29  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+
+       * prim/files.el (switch-to-buffer-other-frame): make it select-frame
+
+1997-09-01  SL Baur  <steve@altair.xemacs.org>
+
+       * x11/x-menubar.el (default-menubar): Put tetris in the game menu, 
+       and move it and the mine game to the top of the menu.
+
+1997-08-29  SL Baur  <steve@altair.xemacs.org>
+
+       * packages/lpr.el: Clone message-flatten-list.
+
+1997-08-25  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * apel/emu-x20.el (mime-charset-coding-system-alist):
+       iso-2022-jp-2 is defined as coding-system.
+
+       * mule/mule-coding.el: Rename `iso-2022-ss2-{7|8}' ->
+       `iso-2022-{7|8}bit-ss2' to sync with Emacs 20.0.96.
+
+       (iso-2022-jp-2): New coding system.
+
+1997-08-23  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * prim/about.el (about-maintainer-glyph): Fix problem with
+       jka-compr.el.
+
+1997-08-25  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/help.el (find-function): ff-read-function was renamed.
+       (find-function-other-window): Ditto.
+       (find-function-other-frame): Ditto.
+
+1997-08-21  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/packages.el (packages-find-packages-1): Append trailing
+       slash to directories added to the load-path.
+
+1997-08-17  SL Baur  <steve@altair.xemacs.org>
+
+       * utils/autoload.el (fixup-autoload-buffer): Replace lost guard
+       statement.
+
+       * prim/make-docfile.el: Remove BOGUS redefinition of
+       find-file-hooks.
+       * prim/update-elc.el: Ditto.
+
+       * prim/packages.el (locate-library): Put guard on usage of
+       `find-file-hooks' (it doesn't exist when temacs is being run).
+
+Fri Aug 15 17:26:05 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/Release 5.16
+
+Fri Aug 15 18:39:10 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-styles.el (c-style-alist):
+       "python" style requires c-comment-continuation-stars
+       to be "".
+
+       * cc-mode/cc-engine.el (c-end-of-statement-1):
+       Eliminate false hits on important characters
+       inside literals (strings, comments).
+
+Tue Aug 12 21:47:18 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-cmds.el (c-comment-line-break-function):
+       In this function, and the defadvice,
+       call indent-new-comment-line if not in a comment.
+
+       * cc-mode/cc-vars.el (c-buffer-is-cc-mode): Definition moved to
+       cc-mode.el
+
+       * cc-mode/cc-mode.el (c-buffer-is-cc-mode):
+       Definition moved here from cc-vars.el.  Also,
+       put permanent-local property on variable so it's value won't get
+       killed by kill-all-local-variables.  This makes it easier for non-CC
+       Mode derived modes to be initialized correctly.
+
+       * cc-mode/cc-cmds.el (c-electric-brace):
+       In preserve-p test, don't test char-before when at
+       bobp.  Open brace at bobp is illegal in most modes, but not awk-mode,
+       which depends on CC Mode.
+
+Mon Aug 11 15:37:04 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-mode.el (c++-mode, java-mode, objc-mode, idl-mode):
+       Remove obsolete variable c-double-slash-is-comments-p.
+
+       * cc-mode/cc-langs.el (c-double-slash-is-comments-p): Remove
+       obsolete variable.
+
+       * cc-mode/cc-cmds.el (c-fill-paragraph):
+       Remove conditional on obsolete variable
+       c-double-slash-is-comments-p.
+
+       * cc-mode/cc-styles.el (c-style-alist):
+       Conform comment settings to RMS's preferences.
+
+Thu Aug  7 19:21:32 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-styles.el (c-set-offset): Added autoload cookie.
+
+1997-08-15  SL Baur  <steve@altair.xemacs.org>
+
+       * cl/cl-macs.el (cl-make-type-test): De-ebolify type test for
+       'character.
+
+1997-08-12  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * packages/man.el (Manual-mouseify-xrefs): Skip the top line of
+       manual entries so to not get the all-caps pseudo xrefs in the
+       heading in our list of manuals.
+       (Manual-buffers-have-stars): new customize option.
+       (manual-entry): Fix to utilize the new variable, and to not put
+       stars around manual names put in the minibuffer history.
+
+1997-08-12  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * packages/info.el (Info-directory-list): reverse the
+       `Info-default-directory-list' when using it to initialize the
+       `Info-directory-list'.
+       (Info-insert-dir): make it so the insertion of a locadir file at a
+       "^[ \t]*Local.*\n[ \t]*[-=]+" line works correctly.
+
+Mon Aug 11 17:35:35 1997  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/loaddefs.el (((dir load-path))): Ignore all errors.
+
+       * utils/autoload.el (fixup-autoload-buffer): Wrapping autoloads
+       files with a guard produces invalid bytecode.
+
+       * prim/make-docfile.el (package-path): Look in the package path
+       for autoloads files.
+
+       * prim/packages.el (packages-find-packages-1): Don't append
+       trailing "/" when adding a top-level Lisp directory.
+       (list-autoloads-path): New function.  Use existing precomputed
+       load-path instead of doing the old broken computation.
+
+1997-08-11  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/startup.el (command-line-1): Allow setting of
+       `initial-scratch-message' to nil to turn it off.
+       Suggested by Gary D. Foster <Gary.Foster@Corp.Sun.COM>
+
+1997-08-09  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * packages/info.el: (info::toolbar) swap next and prev buttons to
+       match the order of the node headings in info files.
+
+1997-08-09  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * packages/info.el: (Info-fontify-node) will now split top line
+       that spans 3 lines.  (Info-extract-pointer) adjust to match.
+
+1997-08-08  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * packages/info.el: (Info-extract-pointer) make it move forward
+       one more line so when the top line has been split, the toolbar
+       arrows, u, and p will find the link they need.
+
+Thu Aug  7 18:13:12 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/Release 5.15
+
+Thu Aug  7 19:21:32 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-styles.el (c-set-offset): Added autoload cookie.
+
+       * cc-mode/cc-langs.el (c++-mode-syntax-table, java-mode-syntax-table,
+       objc-mode-syntax-table, idl-mode-syntax-table): Added autoload
+       cookies. c-mode-syntax-table already has one.
+
+Wed Aug  6 21:50:08 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-mode.el (c-initialize-cc-mode):
+       Check all cc-mode-19 interface requirements.
+
+Tue Aug  5 21:56:02 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-align.el (c-lineup-java-throws):
+       Change the `when' clause to an `if-progn' :-(
+
+       * cc-mode/cc-langs.el (c-common-init):
+       Make comment-line-break-function buffer local iff it's boundp.
+
+       * cc-mode/cc-cmds.el:
+       defadvice for indent-new-comment-line keys off of c-buffer-is-cc-mode
+       instead of an explicit major-mode list.  this means non-CC Mode
+       derived modes will work properly
+
+       * cc-mode/cc-mode.el (c-initialize-cc-mode): Set
+       c-buffer-is-cc-mode to t.
+
+       * cc-mode/cc-vars.el (c-buffer-is-cc-mode): New variable
+
+       * cc-mode/cc-mode.el (c-initialize-cc-mode):
+       Give in to the pressure.  require 'cc-mode-19
+       if functionp is not bound.  Too many novice errors without this.
+
+       * cc-mode/cc-cmds.el:
+       Added advice for indent-new-comment-line so older Emacsen work if they
+       don't have the variable comment-line-break-function.
+
+Mon Aug  4 14:55:40 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-langs.el (c-mode-base-map, c++-mode-map):
+       Move `/' as an electric character
+       from c++-mode-map to c-mode-base-map for all languages.
+
+       * cc-mode/cc-cmds.el (c-electric-slash):
+       Make this work as the final slash in a */ block
+       oriented comment closing token.
+
+       * cc-mode/cc-vars.el (c-comment-continuation-stars):
+       Can take a nil value.  Also, the default value is "* ".
+
+       * cc-mode/cc-cmds.el (c-comment-line-break-function): nil value for
+       c-comment-continuation-stars means use old semantics
+
+Fri Aug  1 22:44:49 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-cmds.el (c-comment-line-break-function):
+       Added optional soft argument
+
+       * cc-mode/cc-langs.el (c-common-init): Set comment-multi-line and
+       comment-line-break-function here for all modes.
+
+       * cc-mode/cc-mode.el (c-mode, c++-mode, objc-mode, java-mode,
+       idl-mode):
+       Don't set comment-multi-line here.
+
+       * cc-mode/cc-vars.el (c-comment-continuation-stars): New variable
+
+       * cc-mode/cc-cmds.el (c-comment-line-break-function): New function
+       for proposed mode-specific comment-line-break-function variable.
+
+       * cc-mode/cc-mode.el (c-mode): comment-multi-line => nil
+
+       * cc-mode/cc-langs.el (c-C-comment-start-regexp): Obsolete.
+
+       (c-comment-start-regexp): Initialize from c-C++-comment-start-regexp.
+
+       (c-populate-syntax-table, c-setup-dual-comments): Merge both functions
+       into c-populate-syntax-table.  With the new 9X draft C standard, both
+       line and block oriented comments are supported in all modes, so always
+       set up the syntax tables to support both comment styles.
+
+       (c-mode-syntax-table, c++-mode-syntax-table, java-mode-syntax-table,
+       objc-mode-syntax-table, idl-mode-syntax-table): Use the new syntax
+       table initialization idioms.
+
+       (c-enable-//-in-c-mode): Obsolete.
+
+       * cc-mode/cc-mode.el (c-mode):
+       c-comment-start-regexp uses c-C++-comment-start-regexp to
+       support line oriented comments.
+
+Wed Jul 30 00:01:45 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-engine.el (c-guess-basic-syntax):
+       CASE 5D.4: template argument continuation
+       lines are now analyzed as template-args-cont.
+
+       * cc-mode/cc-styles.el (c-offsets-alist):
+       Added template-args-cont syntactic symbol
+
+Sat Jul 26 16:03:33 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-styles.el (c-styles-alist):
+       In "java" style, set c-hanging-comment-starter-p to
+       nil to preserve Javadoc starter lines.
+
+1997-08-08  Jan Vroonhof  <vroonhof@math.ethz.ch>
+
+       * prim/obsolete.el (define-obsolete-variable-alias): If the
+       obsolete variable was setq'ed before the code was loaded we want
+       that value.
+
+1997-08-06  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * packages/man.el: Several modifications
+
+               * (manual-entry) buffers are named without *'s, when
+               `buffers-menu-submenus-for-groups-p' is t, so they show up
+               in a subsection of the Buffer's menu now, rather than
+               lumped under *Misc*.
+
+               * (Manual-mode) added a local `kill-buffer-hook' to remove
+               a killed manual from the `Manual-page-history'
+
+               * (Manual-last-page) begun rewrite of manuvering and
+               viewing mode code
+
+               * (Manual-mouseify-xrefs) hyphenated xrefs are highlighted
+               now, and properly handled when the second line is
+               indented.  They end up on the menus too.
+
+               * (Manual-popup-menu) made the far button popup menus look
+               better by removing the prefix string and adding a title.
+
+1997-08-06  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * packages/info.el: (Info-highlight-region) Fixed it to not
+       highlight the indention spaces in xrefs split across lines with
+       indention on the second line.
+
+1997-08-06  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * packages/info.el: Numerous modifications, including:
+
+               * support for "dir" merging 'ala Emacs-19.34, with
+               fallback to cheap localdir files in the secondary info
+               directories.
+       
+               * changed default `Info-annotations-path' from
+               ~/.infonotes to ~/.xemacs/info.notes
+       
+               * added `Info-additional-directory-list'
+       
+               * changed a call to w3-fetch to browse-url
+       
+               * added new variables and functions from GNU Emacs 19.34:
+               `Info-dir-contents', `Info-dir-contents-directory',
+               `Info-dir-file-attributes', and the function
+               `Info-insert-dir'
+       
+               * rewrote `Info-suffixed-file' to a cond block rather than
+               nested if's for aesthetic reasons.
+       
+               * made the top line get split if it's longer than 79
+               characters and tweaked fontification to handle that.
+       
+               * changed the look of the pop-up mouse menus by utilizing
+               the "--:etchedThing" dividers.
+       
+               * several docstring reformats and typo fixes, a few
+               comments deleted.
+
+       * info/dir: deleted the Locals: line.  I think it's obsolete since
+       the "dir" merge can put things from like-named nodes in separated
+       "dir" files all under one menu, which is more versatile than just
+       a "Locals:" section.  If you still want a "Locals:" section, make
+       yourself a node for it.
+
+1997-08-07  SL Baur  <steve@altair.xemacs.org>
+
+       * egg/egg.el (hiragana-region): Ebola cleanup.
+       (katakana-region): Ditto.
+
+1997-08-02  Jens-Ulrik Holger Petersen  <petersen@kurims.kyoto-u.ac.jp>
+       * prim/files.el (save-buffers-kill-emacs):
+       If there are active processes, then list them before querying if
+       it is ok to exit emacs.
+
+1997-08-01  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+        * efs/dired.el (dired-get-filename) Move the skipping of the
+        ending carriage return on NT to inside the setq so `and' won't
+        fail on Unix.
+
+1997-07-30  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/startup.el (find-emacs-root-internal-1): Remove diagnostic.
+
+       * prim/packages.el (packages-find-packages): Remove diagnostic.
+
+1997-07-27  SL Baur  <steve@altair.xemacs.org>
+
+       * utils/config.el (config-value-hash-table): Only store the first
+       occurrence of a symbol.
+
+       * modes/make-mode.el: Remove imenu stuffs.
+
+Sat Jul 26 12:24:20 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/  Release 5.14
+
+Sat Jul 26 16:03:33 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-styles.el (c-styles-alist):
+       In "java" style, set c-hanging-comment-starter-p to
+       nil to preserve Javadoc starter lines.
+
+Fri Jul 25 22:17:07 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-engine.el (c-beginning-of-statement-1):
+       When checking for bare semi, don't match
+       on a semi following a close brace, otherwise the following legal code
+       fails:
+
+       void foo()
+       {
+           static struct Pattern nums
+               = {1, 2, 3};
+
+           int j = 2;
+       }
+
+       This might break some bare semi idioms but those are probably more
+       rare than static initializers.
+
+       * cc-mode/cc-vars.el (idl-mode-hook): New variable.
+
+       * cc-mode/cc-mode.el (idl-mode): Support for CORBA's IDL language.
+
+       * cc-mode/idl-font-lock.el: Unsupported font-lock definitions for IDL.
+       This should be merged in with font-lock.el
+
+       * cc-mode/cc-mode.el (c-initialize-cc-mode):
+       move the calling of c-make-styles-buffer-local
+       into c-initialize-builtin-style.
+
+       * cc-mode/cc-styles.el (c-set-style-2):
+       Fixed broken implementation of inherited styles.
+
+       * cc-mode/cc-mode.el (c-initialize-cc-mode):
+       Run the c-initialization-hook, but only once
+       per Emacs session.
+
+       * cc-mode/cc-vars.el (c-initialization-hook): New variable.
+
+       * cc-mode/cc-engine.el (c-guess-basic-syntax):
+       CASE 5I: When adding 'inclass syntax, use the
+       relpos pointing to the class opening brace, unless that hangs on the
+       right side, in which case, use the start of the class/struct keyword.
+
+Thu Jul 17 03:36:22 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-langs.el (c-symbol-key):
+       first character must be a letter or underscore
+
+1997-07-25  SL Baur  <steve@altair.xemacs.org>
+
+       * packages/vc.el (vc-version-diff): Autoload for the menu.
+       Suggested by Karl M. Hegbloom <karlheg+xemacs@inetarena.com>
+
+1997-07-24  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/make-docfile.el (docfile-out-of-date): Workaround for NEWOS 
+       process exit handling bug.
+       Suggested by Katsumi Yamaoka <yamaoka@ga.sony.co.jp>
+
+1997-07-23  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * packages/info.el: (Info-fontify-node) Allow colons in menu
+       names.  There must be whitespace following the menu ending colon.
+
+1997-07-23  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/faces.el (invert-face): Make interactive.
+       Suggested by David Bakhash <cadet@sst.ll.mit.edu>
+
+1997-07-21  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * modes/view-process-system-specific.el added
+       `View-process-field-name-descriptions-linux', transcribed from
+       man 7 ps_fields.  Linux signals fixed to match <asm/signal.h>.
+
+1997-07-22  SL Baur  <steve@altair.xemacs.org>
+
+       * x11/x-toolbar.el (toolbar-paste-function): Add default as
+       option.
+
+       * prim/minibuf.el (force-dialog-box-use): Fix typo.
+       From Pekka Marjola <pema@iki.fi>
+
+1997-07-21  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/packages.el (locate-data-directory): New function to search 
+       for directories in the data-directory-list.
+
+1997-07-21  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * prim/minibuf.el: New customize variable:
+       `minibuffer-history-uniquify'
+       (read-from-minibuffer) Only remove histval from list if
+       minibuffer-history-uniquify is t.
+
+       * custom/custom.el: Fix typo in (defgroup) docstring.
+
+1997-07-21  SL Baur  <steve@altair.xemacs.org>
+
+       * prim/startup.el (set-default-load-path): Initialize package
+       paths as final step if everything else went O.K.
+
+       * prim/help.el: Removed locate-library (moved to packages.el).
+
+       * prim/subr.el: Removed lamda macro (moved to packages.el).
+
+       * prim/packages.el (package-find-packages): New function.  Search
+       package hierarchies for interesting directories.
+       (package-find-packages-1): Helper function for the above.  Do the
+       searching in exactly 1 directory.
+
+       * packages/vc.el: Add ClearCase maintainer.
+
+1997-07-21  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * modes/whitespace-mode.el (toplevel) Install toolbar button using
+       `toolbar-add-item' rather than redefining the whole default
+       toolbar.  If the button is already there, does nothing, so a
+       custom toolbar containing a whitespace button can made with
+       `edit-toolbar' once it's been installed the first time.
+
+1997-07-20  SL Baur  <steve@altair.xemacs.org>
+
+       * utils/speedbar.el:
+       (speedbar-frame-mode): Autoload.
+       (speedbar-get-focus): Autoload.
+       (speedbar): Autoload (correctly).
+
+       (speedbar-frame-width): Test liveness of frame 
+       too.
+       (speedbar-frame-mode): Avoid some Emacs 20 code.
+       From Markus Linnala <maage@cs.tut.fi>
+
+       * prim/startup.el (find-emacs-root-internal): Search
+       prefix-directory directly for XEmacs installed stuffs.
+
+       * utils/smtpmail.el (smtpmail-send-it): Autoload.
+
+       * prim/startup.el (command-line): Put advisory text in *scratch*
+       at startup.
+
+       * packages/info.el (Info-exit): Guard against deletion of only
+       frame.
+       From David Bakhash <cadet@MIT.EDU>
+
+1997-07-19  SL Baur  <steve@altair.xemacs.org>
+
+       * utils/elp.el: Spelling correction.
+       From karlheg+xemacs@inetarena.com (Karl M. Hegbloom)
+
+1997-07-19  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/about.el: Sundry changes.
+
+1997-07-18  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/crypt.el (crypt-inhibit-formats): New variable.
+       (crypt-encoded-p): Use it.
+       Based on a patch by Tkil <tkil@scrye.com>
+
+       * utils/ring.el (ring-p): Make compatible, not obsolete.
+
+1997-07-16  Steven L Baur  <steve@altair.xemacs.org>
+
+       * utils/crontab.el (crontab-get): Check for `no crontab for' as an 
+       error return.
+       Suggested by Jeff Miller <jmiller@smart.net>
+
+       * modes/arc-mode.el: Clean up comment.
+
+       * packages/tar-mode.el: Clean up comments.
+
+Wed Jul 16 23:56:58 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/:  Release 5.13.
+
+Thu Jul 17 03:36:22 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-langs.el (c-symbol-key):
+       first character must be a letter or underscore
+
+Mon Jul 14 23:43:33 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-langs.el (c-make-inherited-keymap): Change to a defun
+
+       * cc-mode/cc-langs.el:
+       Added (require 'cc-defs) to pick up the definition of c-emacs-features.
+
+       * cc-mode/README: Simplified instructions
+
+       * cc-mode/cc-make.el: New file to aid in byte-compiling in older
+       Emacsen.
+
+Sun Jul 13 21:24:37 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-cmds.el: cc-defs is required to pick up the
+       c-add-syntax macro
+
+       * cc-mode/cc-langs.el (c-mode-menu):
+       Added uncomment region and slight rearrangement of
+       items
+
+       * cc-mode/cc-cmds.el (c-electric-backspace):
+       Must get 'supercede property values to work
+       with delsel and pending-del.
+
+Thu Jul 10 20:46:09 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-engine.el (c-maybe-labelp):
+       defvar this to shut up the byte compiler
+
+Wed Jul  9 22:08:58 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-styles.el (c-initialize-builtin-style):
+       use copy-sequence instead of copy-tree
+       so the cl module isn't necessary.
+
+       * cc-mode/cc-cmds.el (c-electric-brace):
+       fix ebola eradication consequence in the
+       preserve-p test.
+
+1997-07-15  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/about.el (xemacs-hackers): Add info about IENAGA Kazuyuki.
+       (about-url-alist): Ditto.
+       (about-maintainer-info): Ditto.
+
+       * prim/modeline.el (add-minor-mode): Update docstring.
+
+1997-07-15  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * packages/pending-del.el (pending-delete-mode): Use the option
+       symbol as argument to add-minor-mode, not its value.
+
+1997-07-14  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * packages/pending-del.el (pending-delete-modeline-string): New
+       option.
+
+1997-07-14  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/files.el (auto-mode-alist): Readd objective c mode.
+       From Barry A. Warsaw <bwarsaw@CNRI.Reston.Va.US>
+
+       * prim/make-docfile.el: Print more informative message when
+       attempting to create docfile and all dumped .elcs do not exist.
+
+1997-07-13  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/files.el (save-some-buffers): Guard call to
+       `delete-other-windows'.
+
+1997-07-13  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * prim/minibuf.el: (read-from-minibuffer) Corrected indentation,
+       History lists don't contain dups anymore, newest is put on top and
+       removed from the cdr.
+
+1997-07-13  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * packages/man.el: (manual-entry) Added `Manual-page-
+       minibuffer-history', and added it to the read-string statement.
+       Added #\: to `fmh' so that manuals named like MIME::Parser(3) are
+       found at point.
+       (Manual-mouseify-xrefs) Fixed it so now it will mousify the manual
+       entry on the first line of an apropos listing.
+
+1997-07-10  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * packages/info.el: Added `Info-minibuffer-history', and made it
+       the minibuffer history variable in the `completing-read' calls.
+
+       * utils/savehist.el: Added `Info-minibuffer-history' to default
+       value of `savehist-history-variables'.
+
+1997-07-13  Steven L Baur  <steve@altair.xemacs.org>
+
+       * modes/lisp-mode.el: Restore verbosity as an option.
+       From Hrvoje Niksic <hniksic@srce.hr>
+
+1997-07-11  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/cmdloop.el (execute-extended-command): Use
+       `sorted-key-descriptions'.
+
+       * prim/help.el (sorted-key-descriptions): New function.
+       (where-is): Use it.
+       (where-is): Use `read-command'.
+
+       * prim/macros.el (kbd-macro-query): Use `read-char-exclusive'
+       instead of `read-char'.
+
+       * prim/cmdloop.el (read-char): Correctly inhibit quit.
+
+       * prim/files.el: Use `files' group.
+
+       * prim/disp-table.el (describe-display-table): Made it work; don't 
+       use `describe-vector'.
+
+       * prim/gui.el: Customized.
+
+       * utils/edmacro.el (insert-kbd-macro): Move to macros.el.
+
+       * prim/macros.el: Synch with FSF 19.34.
+
+       * prim/featurep.el: Comment addition.
+
+       * prim/cus-start.el: Add variables from replace.el.
+
+       * prim/replace.el (case-replace): Use `defvar', not `defconst'.
+
+       * utils/crontab.el: Customized.
+
+       * utils/highlight-headers.el: Define -faces as a separate group;
+       customize the variables.
+
+       * utils/uniquify.el: Hide from the Customize tree; the package
+       changes state of XEmacs on load.
+
+       * packages/igrep.el: Don't insinuate XEmacs when loading.
+       (igrep-insinuate): New function.
+
+       * packages/blink-cursor.el (blink-cursor-callback): Don't blink on 
+       TTY-s.
+
+       * prim/console.el (resume-pid-console): Use `eql'.
+
+       * prim/profile.el (profile): Restore old profiling state, instead
+       of blindly turning off profiling.
+
+       * packages/add-log.el (add-log-c-like-modes): Add java-mode.
+
+       * packages/add-log.el: Require fortran when compiling.
+
+       * prim/device.el (device-list): Use `nconc' instead of `append'.
+
+1997-07-13  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/files.el (save-some-buffers): Only delete other windows the
+       first time through.
+       Based on code from Hrvoje Niksic <hniksic@srce.hr>
+
+1997-07-12  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/modeline.el (mouse-drag-modeline): Don't queue dummy eval
+       events.
+       From Kyle Jones <kyle_jones@wonderworks.com>
+
+1997-07-10  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * packages/gnuserv.el (gnuserv-edit-files): Operate on this
+       buffer's menubar.
+
+1997-07-11  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/gnuserv.el: Add done button.
+       From Hrvoje Niksic <hniksic@srce.hr>
+
+1997-07-10  Steven L Baur  <steve@altair.xemacs.org>
+
+       * utils/edit-toolbar.el: (edit-toolbar-file-name): Use
+       `emacs-user-extension-dir'.
+       (edit-toolbar-add-initialization): Ditto.
+       (edit-toolbar-prompt-for-initialization): Ditto.
+
+       * utils/edit-toolbar.el: New file.
+       From Peter Pezaris <pez@dwwc.com>
+
+       * utils/toolbar-utils.el: New file.
+       From Jeff Miller <jmiller@smart.net>
+
+1997-07-10  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * packages/add-log.el (change-log-font-lock-keywords): Don't
+       fontify closing paren.
+
+       * packages/pending-del.el: Some renamings, synch with Emacs 19.34.
+
+1997-07-10  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/hyper-apropos.el (hyper-apropos-get-doc): Don't
+       autoload, there is very little point.
+
+       * prim/obsolete.el (frame-first-window): Make compatible, not
+       obsolete.
+
+1997-07-10  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * packages/pending-del.el (pending-delete-pre-hook): Don't quote
+       lambda.
+       (pending-delete-pre-hook): Use `error-message-string'.
+       (pending-delete): Treat as minor mode; define the standard turn-on 
+       and turn-off functions.
+       (delete-active-region): Simplified.
+
+       * packages/pending-del.el: Don't turn on by default.
+
+1997-07-09  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/pending-del.el: Correct typo in Hrvoje's upgrade.
+
+       * mel/mel-u.el (uuencode-external-decode-region): Force
+       buffer-read-only nil because it gets changed magically to t during 
+       the call to `insert-file-contents'.
+
+       * tm/tm-image.el (mime-preview/filter-for-image): Comment out test 
+       for invalid glyph.  It appears to be non-functional.
+
+       * modes/lisp-mode.el (lisp-interaction-mode-popup-menu-1): Add
+       entry for debug on signal.
+
+       * packages/supercite.el (sc-attribs-%@-addresses): + is valid in
+       an Email address.
+       (sc-attribs-<>-addresses): Ditto.
+       (sc-get-address): Ditto.
+
+       * cc-mode/cc-cmds.el (c-electric-brace): Fix Ebola infection.
+
+       * prim/dumped-lisp.el (dumped-lisp-packages): Tweak dump order
+       so "startup" is loaded before the autoloads.
+
+       * custom/cus-edit.el (custom-file): Use same logic as startup.el
+
+j1997-07-08  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/simple.el (log-message-ignore-regexps): Reduced
+       significantly.
+
+Tue Jul  8 23:47:47 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/Release 5.12
+
+Mon Jul  7 23:47:02 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-styles.el, cc-mode/cc-mode.el, cc-mode/cc-menus.el,
+       cc-mode/cc-langs.el, cc-mode/cc-engine.el, cc-mode/cc-compat.el,
+       cc-mode/cc-cmds.el, cc-mode/cc-align.el:
+       Reorganization to support byte-recompile-directory.
+
+       * cc-mode/Release: Don't put release number in tar file
+
+Thu Jul  3 22:54:03 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-langs.el (c-mode-base-map):
+       Proper binding of c-electric-backspace and
+       c-electric-delete, based on the policy of the various maintainers.
+       Thank goodness for delete-key-deletes-forward!
+
+       * cc-mode/cc-vars.el (c-tab-always-indent, c-hanging-braces-alist):
+       Minor changes to the cutomize format.
+
+       * cc-mode/cc-mode-19.el: Initial revision
+
+       * cc-mode/cc-menus.el, cc-mode/cc-engine.el, cc-mode/cc-compat.el,
+       cc-mode/cc-cmds.el, cc-mode/cc-align.el:
+       Major Ebola eradication.
+
+Wed Jul  2 21:33:04 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-engine.el (c-crosses-statement-barrier-p,
+       c-guess-basic-syntax): Ebola eradication.
+
+       * cc-mode/cc-cmds.el (c-indent-region):
+       Call c-echo-parsing-error to echo last parsing
+       error that may have occurred.
+
+       * cc-mode/cc-engine.el (c-echo-parsing-error): New function.
+
+       * cc-mode/cc-engine.el (c-parsing-error): new variable
+
+       (c-parse-state): When an unbalanced close brace is discovered, don't
+       raise an error (prevents insertion of character).  Insert the
+       character, display a warning message, and set c-parsing-error so
+       syntax echoing will be disabled.
+
+       (c-show-syntactic-information, c-indent-line): Suppress syntax echoing
+       if c-parsing-error is non-nil.
+
+       * cc-styles.el: Added require of cl to pick up definition of copy-tree.
+
+Mon Jun 30 21:41:00 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-langs.el, cc-mode/cc-mode.el (c-mode-map,
+       c++-mode-map, objc-mode-map, java-mode-map):
+       Moved
+       defvars from cc-langs.el to cc-mode.el for use in c-mode, c++-mode,
+       objc-mode, and java-mode docstrings.  Actual population of these mode
+       maps remains in cc-langs.el.
+
+       * cc-mode/cc-mode.el:
+       Require cc-langs at top level, so as to get the definitions for
+       c-mode-map, et al. that are used in the *-mode docstrings.
+
+Fri Jun 27 17:33:32 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-langs.el (c-mode-syntax-table):
+       Added autoload cookie for gdb-mode.
+
+Thu Jun 26 21:12:56 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-engine.el (c-guess-basic-syntax):
+       CASE 5H: Whack one ebola infection (e.g. using
+       memq with the results of following-char in XEmacs 20).
+
+       * cc-mode/cc-styles.el:
+       Added two require's that make autoload call of (c-set-style) work.
+
+Sun Jun 22 16:40:30 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-cmds.el (c-electric-delete):
+       Don't call c-electric-backspace interactively.
+
+Fri Jun 20 20:40:33 1997  Barry A. Warsaw  <cc-mode-help@python.org>
+
+       * cc-mode/cc-mode.el (c-mode, c++-mode, objc-mode, java-mode):
+       Make sure to call
+       c-update-modeline after the hooks are run, so that the modeline
+       accurately reflects auto-newline and delete-key minor modes if the
+       hooks set c-hungry-delete-key or c-auto-newline directly.
+
+       * cc-align.el (c-lineup-java-throws): Fixed some regressions.
+1997-07-08  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/func-menu.el: Don't enable Makefile mode function menu
+       by default.
+       From Martin Buchholz <mrb@Eng.Sun.COM>
+
+       * x11/x-menubar.el (file-menu-filter): Delete Frame should be
+       active when multiple frames span multiple devices.
+       From Aki Vehtari <Aki.Vehtari@hut.fi>
+
+1997-07-08  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * packages/gnuserv.el: Remove RCS ID keywords.
+
+       * utils/savehist.el: Cosmetic changes.  Hopefully, not
+       user-visible.
+
+       * prim/debug.el (debug-convert-byte-code): Use compiled-function
+       accessor functions.
+
+1997-07-08  Steven L Baur  <steve@altair.xemacs.org>
+
+       * modes/hideif.el (hide-ifdef-mode): Include modemap in call to
+       `add-minor-mode'.
+
+1997-07-08  Tomasz Cholewo  <tjchol01@mecca.spd.louisville.edu>
+
+       * packages/add-log.el: Require add-log for accessing
+       add-log-mailing-address and add-log-full-name variables.
+
+1997-07-08  Steven L Baur  <steve@altair.xemacs.org>
+
+       * bytecomp/disass.el (disassemble-1): Use functional interface
+       instead of indexing into vector.
+       From Hrvoje Niksic <hniksic@srce.hr>
+
+       * prim/startup.el (emacs-user-extension-dir): New variable.
+       (load-user-init-file): Use it.  .xemacs and .xemacs-custom are
+       moved into `emacs-user-extension-dir' and renamed to init.el and
+       options.el respectively.
+
+       * prim/packages.el (packages-hardcoded-lisp): Remove "startup"
+       since it is mentioned in dumped-lisp.el.
+
+       * cl/cl-macs.el (keymap-name): New defsetf.
+       (keymap-prompt): Ditto.
+       (keymap-default-binding): Ditto.
+       From Hrvoje Niksic <hniksic@srce.hr>
+
+1997-07-07  Karl M. Hegbloom  <karlheg@inetarena.com>
+
+       * packages/dabbrev.el: replace `buffer-substring' with
+       `buffer-substring-no-properties' so that unwanted text
+       properties (like read-only) are stripped from inserted
+       dabbrev expansions.
+
+1997-07-08  Steven L Baur  <steve@altair.xemacs.org>
+
+       * comint/comint.el (comint-replace-by-expanded-history): Change
+       buggy history test regexp.
+       From Simon Marshall  <simon@spiff.gnu.ai.mit.edu> (Emacs/Mule zeta)
+
+1997-07-07  Steven L Baur  <steve@altair.xemacs.org>
+
+       * oobr/br-clos-ft.el (clos-scan-routine-arglist): Don't reference
+       bytecode object as vector.
+
+       * hypberbole/hact.el (action:commandp): Don't reference bytecode
+       objects as vectors.
+       (action:params): Ditto.
+       
+       * hyperbole/hypb.el (hypb:function-copy): Don't reference byte
+       code objects as vectors.
+       (hypb:function-symbol-replace): Document as broken.  The
+       substition cannot be done without some thinking I'm not in the
+       mood for.
+
+       * efs/efs-ovwrt.el (efs-overwrite-fn): Attempt to correctly deal
+       with the interactive spec.
+
+       * packages/apropos.el (apropos-safe-documentation): Use
+       `compiled-function-doc-string' instead of referencing a bytecode
+       object as an array.
+
+       * prim/subr.el (buffer-substring-no-properties): Undo previous
+       change removing extents.  set-text-properties works now.
+       From Hrvoje Niksic <hniksic@srce.hr>
+
+       * packages/hyper-apropos.el (hyper-apropos-get-doc): Get the
+       argument list through a function instead of indexing into
+       bytecode.
+
+       * utils/easymenu.el (easy-menu-add): Oops, wrong sense in
+       comparison.
+
+       * comint/gdb.el (gdb-mode-syntax-table): New variable.  Initialize 
+       with the logic currently in CC Mode 5.11.
+       (gdb-mode): Use it.
+
+       * modes/hideif.el (hide-ifdef-mode-submap): Correctly specify the
+       current local map.
+
+1997-07-08  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * language/english.el: Add quail-british for British.
+
+       * language/european.el: Register input-method for various non
+       quail-latin-1 methods.
+
+1997-07-06  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/cmdloop.el (errors-deactivate-region): Default to no error
+       behavior for beta testing.
+
+       * prim/dumped-lisp.el (dumped-lisp-packages): Reenable dumping
+       winnt.elc with MS Windows NT version of XEmacs.
+
+1997-07-05  Steven L Baur  <steve@altair.xemacs.org>
+
+       * comint/shell.el ((not shell-mode-map)): M-RET conflicts with
+       Hyperbole binding.
+
+       * comint/comint.el (comint-mode): Use easymenu for making menus.
+       (comint-popup-menu): Use mode-popup menu instead of private menu.
+
+       * efs/dired.el (toplevel): Do not string test version against
+       "Lucid".
+
+       * prim/obsolete.el (add-menu): Don't make obsolete.
+
+       * utils/easymenu.el (easy-menu-remove): Do something neater when
+       only one buffer menu is in effect.
+       (easy-menu-add): Ditto.
+
+       * prim/dumped-lisp.el (dumped-lisp-packages): easymenu will be
+       dumped with XEmacs.
+
+       * utils/easymenu.el (easy-menu-define): Don't autoload.
+
+       * modes/lisp-mode.el (toplevel): Rename menu descriptors.
+       (emacs-lisp-mode): Use easy-menu-define/easy-menu-add to add menus.
+       (lisp-interaction-mode): Ditto.
+
+1997-07-04  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/cmdloop.el (errors-deactivate-region): Default to existing
+       behavior.
+
+       * leim/quail.el (quail-mode): Correct addition of quail minor mode 
+       info to minor-mode-map-alist.
+       (top-level):  Ditto.
+
+1997-06-30  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * modes/abbrev.el (define-mode-abbrev): Call `define-abbrev' with
+       correct arguments.
+
+1997-07-04  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/minibuf.el (read-from-minibuffer): Initialize
+       `current-minibuffer-contents', `current-minibuffer-point', and
+       `initial-minibuffer-history-position'.
+       (next-history-element): Use them.
+       (previous-matching-history-element): Ditto.
+
+1997-07-04  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/cus-load.el (custom-put): New alias for overloadable
+       function.
+
+1997-07-03  Steven L Baur  <steve@altair.xemacs.org>
+
+       * utils/autoload.el (batch-update-directory): Fix typo.
+       (update-autoloads-from-directory): Avoid scanning custom-load.el
+       and auto-autoload.el files.
+       (batch-update-autoloads): Remove duplicate status message.
+       (autoload-snarf-defcustom): Keep track of what symbols we have
+       attached property lists to.
+
+       * ilisp/Makefile (autoloads): Add autoloads dependencies.
+
+       * hyperbole/Makefile: Add autoloads dependencies.
+
+       * utils/autoload.el (batch-update-autoloads): Load custom-load
+       prior to updating autoloads.
+
+       * cc-mode/Makefile (autoloads): New targets to automatically
+       rebuild autoloads and custom-loads.
+
+1997-07-02  Steven L Baur  <steve@altair.xemacs.org>
+
+       * auctex/Makefile (autoloads): New targets to automatically
+       rebuild autoloads and custom-loads.
+
+       * utils/autoload.el (batch-update-autoloads): Add new parameter,
+       update DOC string.
+
+       * comint/gdb.el (gdb-mode): Semantics of c-mode-syntax-table have
+       changed.
+
+1997-07-01  Steven L Baur  <steve@altair.xemacs.org>
+
+       * x11/x-menubar.el: bookmark submenu beautification -- This will
+       make it look better (and will prevent some consing, but that's
+       being anal).
+       From Hrvoje Niksic <hniksic@srce.hr>
+       
+       * prim/simple.el (delete-key-deletes-forward): Mark docstring as
+       an user option.
+       From Gary D. Foster <Gary.Foster@Corp.Sun.COM>
+
+       * mel/mel-q.el (q-encoding-encode-string): Fix Ebola-ified
+       comparison.
+
+       * efs/efs-ovwrt.el (efs-overwrite-fn): efs is manufacturing its
+       own byte code.  Whee.
+       * utils/advice.el (ad-interactive-form): Don't treat bytecode as a 
+       vector if it can be avoided.
+       From Kyle Jones <kyle_jones@wonderworks.com>
+       
+1997-06-30  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/files.el (auto-mode-alist): Don't set image-mode by default
+       on xpms.
+
+Sun Jun 29 20:57:15 1997  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * prim/simple.el: bind inhibit-read-only to t before 
+         trying to erase or otherwise modify the echo area buffer.
+
+1997-07-01  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * modes/image-mode.el: Add `image-maybe-restore' to
+       `change-major-mode-hook'.
+
+       * modes/image-mode.el (image-maybe-restore): New function.
+
+1997-06-29  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * modes/abbrev.el (define-mode-abbrev): Would ignore EXPANSION.
+
+1997-06-28  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * modes/abbrev.el (define-abbrev): If NAME contains a non-word
+       character, intern a ` ' symbol in the obarray.
+
+1997-06-29  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/files.el (auto-mode-alist): Set image-mode for various
+       image file names (JPEG, GIF, PNG, and xpm).
+
+Sun Jun 29 03:02:10 1997  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * src/undo.c (record_extent):
+         If the extent's object is a string, just return.  We
+         can't record undo information for strings, and it is
+         very bad to reference through a string pointer as if it 
+         were a buffer pointer.
+
+1997-06-28  Steven L Baur  <steve@altair.xemacs.org>
+
+       * utils/delbs.el: Removed as obsolete.
+       Suggested by Gary D. Foster <Gary.Foster@Corp.Sun.COM>
+
+       * packages/hyper-apropos.el (hyper-apropos-documentation): Remove
+       obsolete alias.
+       (hyper-apropos-hyperlink): Ditto.
+       (hyper-apropos-major-heading): Ditto.
+       (hyper-apropos-section-heading): Ditto.
+       (hyper-apropos-heading): Ditto.
+       (hyper-apropos-warning): Ditto.
+       From Hrvoje Niksic <hniksic@srce.hr>
+
+       * prim/simple.el (show-message-log): Restore an oldie-but
+       prematurely-retired-goodie.
+
+       * x11/x-menubar.el (default-menubar): Restore Show Message Log
+       command in Edit menu.
+
+       * mule/mule-util.el: Change defsubst to defun for
+       string-to-sequence, string-to-list, string-to-vector,
+       nested-alist-p to shut up build time diagnostics.
+
+       * prim/loadup.el (Top level): Added instrumentation to diagnose
+       where the 0 property list is getting added at dump.  Naturally, I
+       cannot reproduce the problem now.
+
+       * modes/abbrev.el (define-abbrev): Trap nil tables (which might
+       cause bogus plists to get put into obarray).
+       Fix docstring.
+
+1997-06-27  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * modes/auto-show.el:  Customized.
+
+1997-06-27  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/make-docfile.el: [oops] Check auto-autoloads.elc for
+       out-of-dated-ness too.
+
+       * utils/autoload.el (batch-update-directory): Kill command line
+       args when done.
+       (autoload-save-customization): Print a warning message with the
+       offending symbol when we run across the elusive malformed property 
+       list ((0 0)).
+
+1997-06-26  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/profile.el (profile-key-sequence): New function.
+       (pretty-print-profiling-info): Allow interactive calls.
+
+       * prim/overlay.el: Make more FSF compatible.
+       
+1997-06-27  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/loaddefs.el (debug-ignored-errors): Fix regexps.
+       From Hrvoje Niksic <hniksic@srce.hr>
+
+       * hyperbole/wrolo-menu.el (TopLevel): Fix tests so that W3's
+       id-menubar simulation doesn't bollux up feature tests.
+
+       * prim/about.el (about-xemacs): Adjust planned release date.
+
+1997-06-26  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/cus-load.el: Use correct load name.
+       - Silence the load messages.
+
+       * mule/mule-util.el (string-to-sequence): Spelling correction.
+
+       * prim/make-docfile.el: Don't overwrite DOC file when it is
+       up-to-date.
+
+1997-06-29  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * language/chinese.el: Add chinese-isoir165 (CCITT Extended GB).
+
+       * language/chinese.el: Modify charset DOC-strings for CNS 11643 to
+       be more detailed.
+
+       * language/arabic.el: (require 'language/arabic-util) instead
+       of (require 'arabic) for Arabic environment.
+
+       * language/arabic-util.el: Provide `language/arabic-util' instead
+       of `arabic'.
+
+       * language/arabic.el: Rename `arabic-0', `arabic-1' and `arabic-2'
+       to `arabic-digit', `arabic-1-column' and `arabic-2-column' to sync
+       with Emacs/mule-19.34.94-zeta.
+
+       * tl/char-table.el (char-position-to-string): Use `defsubst'.
+       (char-table-1): New implementation.
+
+       Use BOX DRAWINGS characters of JIS X0208.
+
+1997-06-28  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * apel/richtext.el: Add autoload comments for `richtext-encode'
+       and `richtext-decode'.
+
+       * prim/format.el (format-alist): Add `text/richtext'.
+
+       * modes/image-mode.el (image-decode): Display description for some
+       commands when XEmacs cannot decodes current buffer as inline
+       image.
+
+       * tl/chartblxmas.el: New file.
+
+       * tl/char-table.el (view-charset): Use `view-buffer'.
+
+       * x11/x-menubar.el (default-menubar): Add "Show character table"
+       for MULE menu.
+
+       * apel/emu.el: Check richtext.el is bundled.
+
+       * tl/char-table.el: Use `charset-doc-string' directly.
+
+       * tl/char-table.el (view-charset): New command.
+
+       * tl/char-table.el: `show-char-table' -> `insert-charset-table'.
+
+       * tl/char-table.el: `show-96x96-table' ->
+       `insert-96x96-charset-table'.
+
+       * tl/char-table.el: `show-94x94-table' ->
+       `insert-94x94-charset-table'.
+
+       * tl/char-table.el: `show-96-table' -> `insert-96-charset-table'.
+
+       * tl/char-table.el: `show-94-table' -> `insert-94-charset-table'.
+
+       * tl/char-table.el: Use `insert'.
+
+       * packages/hexl.el (hexl-mode-exit): Run `hexl-mode-exit-hook'.
+
+       * x11/x-menubar.el (default-menubar): Fix "Describe language
+       support" and "Set language environment" of mule menu.
+
+       * apel/file-detect.el: Add autoload comments for function
+       `add-path', `add-latest-path', `get-latest-path',
+       `file-installed-p', `exec-installed-p', `module-installed-p' and
+       variable `exec-suffix-list'.
+
+       * prim/format.el (format-alist): Add image/jpeg, image/gif,
+       image/png and image/x-xpm.
+
+       * modes/image-mode.el: New file.
+
+1997-06-27  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm/tm-ew-e.el (tm-eword::encode-string-1): avoid infinite loop
+       caused by long non-encoded-word element. (cf. [tm-en:1356])
+
+       (mime/field-encoding-method-alist): Add "Message-ID" as ignored.
+
+1997-06-25  Steven L Baur  <steve@altair.xemacs.org>
+
+       * x11/x-menubar.el(default-menubar): Comment out changes to the
+       Mule menu because they bombed after recompilation.
+
+       * packages/hyper-apropos.el
+       (hyper-apropos-toggle-programming-flag): Use `with-current-buffer' 
+       instead of `eval-in-buffer'.
+
+       * term/sun-mouse.el: Remove bogus redefinition of
+       `eval-in-buffer'.
+       (sun-mouse-handler): Use with-current-buffer instead of
+       `eval-in-buffer'.
+
+       * prim/make-docfile.el: Use princ not print.
+       Suggested by Hrvoje Niksic.
+
+       * packages/info.el (Info-select-node): Desensitive case search for 
+       Note:.
+       (Info-next-reference): Ditto.
+       * prim/simple.el (kill-region): Adjust endpoints of extent to
+       test and deal with case of the end being less than the beginning.
+       * prim/cmdloop.el (teach-extended-commands-timeout): Bump value to 4.
+       From Hrvoje Niksic <hniksic@srce.hr>
+
+       * prim/subr.el (eval-in-buffer): Make obsolete.
+       Suggested by Hrvoje Niksic.
+
+       * packages/hyper-apropos.el (hyper-apropos-faces): Change group to 
+       'faces.
+       Suggested by Per Abrahamsen.
+
+1997-06-23  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/cmdloop.el (execute-extended-command): Print message after
+       the command finishes, and restore old echo-area contents.
+
+       - Get keybinding before command is executed.
+       Suggested by Kyle Jones and Steve Baur.
+       
+1997-06-24  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/gnuserv.el: Make old symbols Obsolete.
+       From Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/cmdloop.el (keyboard-quit): Don't kill zmacs-region in
+       minibuffer.
+       * prim/minibuf.el (minibuffer-keyboard-quit): Ditto.
+       From Hrvoje Niksic  <hniksic@srce.hr>
+       
+       * prim/help.el (help-mode-quit): Bury buffer when quitting.
+       From Hrvoje Niksic  <hniksic@srce.hr>
+
+1997-06-24  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/cmdloop.el: Customize `teach-extended-commands-p' and
+       `teach-extended-commands-timeout'.
+
+1997-06-23  Steven L Baur  <steve@altair.xemacs.org>
+
+       * version.el (emacs-version): Synch with InfoDock 4.0.
+       (emacs-version): Ditto.
+
+Mon Jun 23 12:33:52 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * about.el (about-show-linked-info): Use empty strings for
+       `widget-link-prefix' and `widget-link-suffix'.
+
+1997-06-22  Gary D. Foster  <Gary.Foster@corp.Sun.COM>
+
+       * x11/x-menubar.el: Added `bookmark-menu-filter', changed
+         bookmark submenu from a popup to a cascading submenu.
+       * packages/bookmark.el: Added an autoload cookie for
+         `bookmark-all-names' (by Steve Baur)
+
+1997-06-23  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * packages/info.el (Info-next-reference): Fix up for M-TAB to work 
+       correctly.
+
+       * utils/live-icon.el (live-icon-one-frame): Don't set glyphs to
+       balloon-help frames.
+
+       * packages/balloon-help.el (balloon-help-make-help-frame): Set the
+       `balloon-help' property to the newly created frame.
+
+       * prim/profile.el (profile): New macro.
+
+       * prim/files.el (auto-mode-alist): Add winmgr-mode.
+
+       * modes/winmgr-mode.el: Customize.
+
+1997-06-23  Steven L Baur  <steve@altair.xemacs.org>
+
+       * utils/autoload.el (generate-file-autoloads-1): Remove warning
+       about 900 character lines.
+
+       * x11/x-toolbar.el (toolbar-mail-commands-alist): Correction for
+       calling Netscape mail.
+       From Hrvoje Niksic <hniksic@srce.hr>
+
+1997-06-22  Steven L Baur  <steve@altair.xemacs.org>
+
+       * x11/x-menubar.el (default-menubar): Make `Jump to bookmark' menu 
+       dynamic.
+       From Gary D. Foster <Gary.Foster@Corp.Sun.COM>
+
+       * prim/dumped-lisp.el (dumped-lisp-packages): Sparcworks dumps
+       comint and ring.
+
+1997-06-24  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * language/arabic.el: moved from mule/arabic-hooks.el.
+
+       * mh-e/mh-e.el (mh-get-new-mail): Decode output as
+       `mh-folder-coding-system'.
+
+1997-06-24  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * language/ethio-util.el: imported from Emacs/mule-19.34.94-zeta.
+
+       * language/arabic-util.el: moved from mule/arabic.el; repair
+       Arabic characters.
+
+1997-06-24  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * x11/x-menubar.el: Fix "Describe language support" and "Set
+       language environment" of Mule menu.
+
+       * language/visual-mode.el: moved from mule/.
+
+       * language/ethiopic.el: Modify for XEmacs.
+
+       * language/cyrillic.el: Modify DOC-string of koi8-r; Fixed problem
+       of setting for `language-info-alist' about koi8-r.
+
+       * mule/auto-autoloads.el: Enable auto-autoloads.el for mule/.
+
+       * mule/mule-util.el: New file (imported from
+       Emacs/mule-19.34.94-zeta).
+
+       * mule/mule-misc.el: Function `truncate-string-to-width' was moved
+       to mule-util.el.
+
+       * prim/dumped-lisp.el, mule/mule-load.el: mule/arabic-hooks.el was
+       moved to language/arabic.el; mule/arabic.el was moved to
+       language/arabic-util.el; Use language/ethiopic.el instead of
+       mule/ethiopic-hooks.el; Use language/ethio-util.el instead of
+       mule/ethiopic.el.
+
+       * mule/mule-coding.el (coding-system-docstring): New alias (to
+       emulate Emacs/mule-19.34.94-zeta function).
+
+       * mule/mule-cmds.el: modified to sync with
+       Emacs/mule-19.34.94-zeta (mule-prefix was changed to "C-x C-m")
+
+       (set-language-info): Add to "Describe Language Support" and "Set
+       Language Environment" menu.
+
+       * mule/mule-charset.el: Function `compose-region' and
+       `decompose-region' were moved to mule-util.el.
+
+       * leim/quail.el: modify to sync with latest quail.el of Emacs/mule
+       in ETL.
+
+       (quail-toggle-mode-temporarily): check `quail-conv-overlay'.
+
+       (quail-map-p): Use `characterp' instead of `integerp'.
+
+1997-06-21  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/tabify.el (untabify): Return nil.
+       From contributor name lost.
+
+       * prim/packages.el (packages-hardcoded-lisp): startup.elc needs to 
+       be scanned for docstrings.
+
+1997-06-21  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * packages/bookmark.el (bookmark-menu-popup-paned-menu): Change
+       title to name.
+       * prim/overlay.el (overlay-put): Support `local-map'.
+       (overlay-get): Support `category'.
+
+1997-06-21  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/startup.el (load-user-init-file): Load custom-file if it
+       has not changed from the default.
+
+1997-06-21  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/overlay.el (make-overlay): Avoid temporary variable.
+       (move-overlay): Ditto.
+       (overlays-in): Use `mapcar-extents'.
+       (next-overlay-change): Avoid consing; use `map-extents'.
+       (previous-overlay-change): Ditto.
+       (overlay-lists): Ditto.
+       (overlay-lists): Call `overlay-recenter' with correct value.
+
+1997-06-20  Steven L Baur  <steve@altair.xemacs.org>
+
+       * utils/autoload.el (fixup-autoload-buffer): New function.  Insert 
+       guards so a (load "auto-autoloads") works the same as require.
+       (batch-update-directory): Use it.
+
+       * prim/update-elc.el: Allow for specification of packages that
+       must not be bytecompiled.  Better error diagnostics if a package
+       is not found.
+
+       * prim/window.el, prim/window-xemacs.el, prim/simple.el:
+       * prim/lisp.el, prim/frame.el:
+       Customizations/synch to Emacs 20.1.
+       * packages/hyper-apropos.el: Massive update.
+       From Hrvoje Niksic <hniksic@srce.hr>
+
+       * tm/tm-vm.el (vm-menu-mail-menu): Fix typo.
+
+       * packages/font-lock.el (lisp-font-lock-keywords-2): Add some new
+       functions.
+       From Karl M. Hegbloom <karlheg@inetarena.com>
+
+       * prim/files.el (save-some-buffers-query-display-buffer): New
+       user variable.
+       (save-some-buffers): Use it.
+       From David Bakhash <cadet@MIT.EDU>
+       - Customization patches from Hrvoje Niksic.
+
+       * prim/simple.el (kill-region): Undo sorting region limits patch.
+
+1997-06-20  Mike Scheidler  <c23mts@eng.delcoelect.com>
+
+       * prim/tabify.el: Fixed 'untabify' to return 'nil value.
+
+1997-06-18  Steven L Baur  <steve@altair.xemacs.org>
+
+       * efs/dired-xemacs.el (dired-do-interactive-chmod): Advance point
+       after not failure.
+       From <rritchie@britannia-life.co.uk>
+
+       * utils/edmacro.el (edmacro-parse-word): make (kbd "M-123"), (kbd
+       "M--256") and such behave as documented.
+       From Hrvoje Niksic <hniksic@srce.hr>
+
+       * prim/cus-start.el: Various additions to built-in variable list.
+       From Hrvoje Niksic <hniksic@srce.hr>
+
+       * prim/subr.el: Remove mapvector.
+       (with-output-to-string): Use with-current-buffer.
+       (with-string-as-buffer-contents): Ditto.
+       From Hrvoje Niksic <hniksic@srce.hr>
+
+       * modes/arc-mode.el (archive-quit): New function.
+       From Karl M. Hegbloom <karlheg@inetarena.com>
+       (archive-mode-map): Bind it to `q'.
+
+       * utils/autoload.el (cusload-file-name): Default to custom-load.el 
+       for each individual file.
+
+       * prim/minibuf.el (minibuffer-max-depth-exceeded): Use
+       `custom-file' as a location for saving enable multiple minibuffers 
+       option.
+
+       * packages/man.el (manual-entry): Don't leave empty buffer if
+       error occurs.
+       From Glynn Clements <glynn@sensei.co.uk>
+
+       * modes/arc-mode.el (archive-arc-summarize): De-ebolify.
+       (archive-lzh-summarize): Ditto.
+       (archive-zip-summarize): Ditto.
+       (archive-zip-chmod-entry): Ditto.
+
+1997-06-17  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/update-elc.el: Total rework for dynamic dumped .elc finding.
+
+1997-06-18  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/loaddefs.el (debug-ignored-errors): Initialize it.
+
+1997-06-17  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/files.el (auto-mode-alist): Add /app-defaults/ as candidate 
+       for xrdb-mode.
+       Suggested by Karl Hegbloom, Regexp by David Moore.
+
+       * version.el: Remove variables emacs-version, emacs-major-version, 
+       and emacs-minor-version.
+
+       * tooltalk/tooltalk-load.el: Comment as obsolete and move contents 
+       to dumped-lisp.el.
+
+       * prim/make-docfile.el: New file.
+
+1997-06-16  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/startup.el (load-user-init-file): Look for ~[user]/.xemacs
+       before loading .emacs.
+
+       * modes/xrdb-mode.el (xrdb-mode): Autoload.
+
+       * prim/files.el (auto-mode-alist): Add defaults for xrdb-mode.
+
+       * leim/quail.el (quail-toggle-mode-temporarily): Guard against
+       possibility of quail-conv-overlay not being an overlay.
+
+1997-06-15  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/loadup.el: Remove most but not all of the hardcoded dumped
+       lisp file names.
+
+       * prim/dumped-lisp.el: New file.
+
+       * prim/update-elc.el (toplevel): Rework using a better function to 
+       determine autoload file locations.
+
+       * prim/packages.el: New file.
+
+       * prim/update-elc.el: Determine location and count of
+       auto-autoloads files at run-time.
+
+       * prim/loaddefs.el (((dir load-path))): Generalize load of
+       auto-autoloads.
+
+       * utils/autoload.el (autoload-file-name): New variable.
+       (autoload-target-directory): New variable.
+       (generated-autoload-file): Use them.
+       (cusload-file-name): New variable.
+       (generated-custom-file): Use it.
+       (batch-update-directory): New function.
+
+1997-06-14  Steven L Baur  <steve@altair.xemacs.org>
+
+       * mule/canna.el: Guard call to function dynamic-link, which
+       doesn't exist in XEmacs/Mule.
+
+       * bytecomp/bytecomp.el (byte-compile-file): Suppress unavoidable
+       Ebola notices.
+
+1997-06-13  Steven L Baur  <steve@altair.xemacs.org>
+
+       * bytecomp/bytecomp.el (batch-byte-compile): Suppress unavoidable
+       Ebola notices.
+       (batch-byte-recompile-directory): Ditto.
+
+       * utils/lib-complete.el (read-library): Look for .el.gz if not
+       using Mule.
+       (get-library-path): Ditto.
+       Suggested by Jonathan Doughty <jwd@mitre.org>
+
+       * packages/add-log.el: Restore backwards compatible date behavior
+       as an option.
+       Eliminate XEmacs specific autoloads.
+       From Hrvoje Niksic <hniksic@srce.hr>
+       
+       * efs/dired.el (dired-save-excursion): Ebola cleanup.
+
+       * packages/hyper-apropos.el: Massive cleanup, Customize.
+       From Hrvoje Niksic <hniksic@srce.hr> 
+
+Fri Jun 13 13:20:39 1997  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * prim/syntax.el (symbol-near-point):
+         Check for bobp and avoid (char-syntax (char-before)) if 
+         there.
+
+1997-06-13  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/rect.el (operate-on-rectangle): Correct boundary error.
+       From Bob Weiner <weiner@altrasoft.com>
+
+1997-06-12  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/ispell.el (ispell-command-loop): De-Ebolify.
+
+       * x11/x-iso8859-1.el: Added Grave keysym.
+       From Heiko Muenkel <muenkel@tnt.uni-hannover.de>
+
+       * modes/make-mode.el (makefile-browse): Shouldn't be interactive.
+       From Hrvoje Niksic <hniksic@srce.hr>
+
+       * prim/files.el (interpreter-mode-alist): ksh-mode is obsoleted by 
+       sh-script.
+       From Hrvoje Niksic <hniksic@srce.hr>
+
+1997-06-11  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/subr.el (with-current-buffer): New macro.
+       (with-temp-file): Ditto.
+
+       * bytecomp/byte-optimize.el (byte-optimize-form-code-walker): Test 
+       for `save-current-buffer'.
+
+       * bytecomp/bytecomp.el: Recognize `save-current-buffer'.
+
+       * edebug/edebug.el: Register with-current-buffer and others.
+
+       * modes/lisp-mode.el: Added specs for save-current-buffer,
+       with-output-to-string, with-current-buffer, with-temp-file and
+       with-output-to-temp-buffer.
+
+1997-06-13  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * gnus/smiley.el (smiley-deformed-regexp-alist): Modify regexp for
+       horizontal smiley faces.
+       (smiley-nosey-regexp-alist): Add horizontal smiley faces.
+
+1997-06-13  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * leim/quail.el (quail-get-translation): Don't use
+       `string-to-vector' for XEmacs.
+
+1997-06-11  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/help.el (function-called-at-point): Use char-(after|before)
+       instead of (following|preceding)-char.
+       (variable-at-point): Ditto.
+
+       * prim/simple.el (delete-indentation): Use char-(after|before)
+       instead of (following|preceding)-char.
+       (just-one-space): Ditto.
+       (backward-delete-char-untabify): Ditto.
+       (do-auto-fill): Ditto.
+
+       * prim/paragraphs.el (end-of-paragraph-text): Use char-before
+       instead of preceding-char.
+
+       * prim/misc.el (copy-from-above-command): Use char-(after|before)
+       instead of (following|preceding)-char.
+
+       * prim/obsolete.el (preceding-char): Correct a typo.
+
+       * prim/minibuf.el (minibuffer-electric-slash): Use char-(after|before)
+       instead of (following|preceding)-char.
+       (minibuffer-electric-tilde): Ditto.
+
+       * prim/lisp.el (insert-parentheses): Use char-(after|before)
+       instead of (following|preceding)-char.
+
+       * prim/indent.el (tab-to-tab-stop): Use char-(after|before)
+       instead of (following|preceding)-char.
+       (move-to-tab-stop): Ditto.
+
+       * prim/fill.el (fill-end-of-sentence-p): Use
+       char-after/char-before instead of following-char/preceding-char.
+       (canonically-space-region): Ditto.
+       (fill-region-as-paragraph): Ditto.
+       (fill-region): Change (= char char) to (eq char char).
+
+       * prim/debug.el (debugger-frame-number): Use char-after not
+       following-char.
+       (debugger-frame): Ditto.
+       (debugger-frame-clear): Ditto.
+
+       * prim/case-table.el (invert-case): Use char-after not
+       following-char.
+       Clean up comments.
+
+       * prim/syntax.el (symbol-near-point): Use char-before not
+       preceding-char.
+
+       * prim/window.el (window-list): Update DOCstring.
+       From Noah Friedman <friedman@splode.com>
+
+       * utils/uniquify.el (toplevel): Make version test match XEmacs v20.
+
+       * tm/tm-ew-e.el: Clean up Ebola infection.
+
+       * x11/x-compose.el: Various corrections
+       From Heiko Muenkel <muenkel@tnt.uni-hannover.de>
+
+1997-06-10  Gary D. Foster  <Gary.Foster@corp.sun.com>
+       
+       * modes/view-less.el: Changed \177 bindings to 'delete
+       * modes/help.el: Changed \177 bindings to 'delete
+
+1997-06-10  Gary D. Foster  <Gary.Foster@corp.sun.com>
+
+       * prim/keydefs.el: Changed all 'delete key bindings to point to
+         the `backward-or-forward-foo' functions.
+       * prim/simple.el:
+       - Renamed `delete-erases-forward' to `delete-key-deletes-forward'.
+       - Removed `backspace-or-delete-hook'
+       - Renamed `backspace-or-delete' to `backward-or-forward-delete-char'
+       - Added functions: `backward-or-forward-kill-word'
+        `backward-or-forward-kill-sentence'
+        `backward-or-forward-kill-sexp'
+       - Removed the zmacs hacks from all the `b-or-f-foo' functions and
+         began playing nicely with pending-del.
+       * modes/cc-mode.el:
+       * modes/cperl-mode.el: Fixed references to delete functions
+         to use the new names.
+       
+1997-06-11  Karl M Hegbloom  <karlheg@inetarena.com>
+
+       * ilisp/ilisp-def.el (toplevel):  Changed `ilisp-prefix' from
+       "C-z" to "C-c" because of conflict with global key binding for
+       `iconify-frame'.
+
+1997-06-11  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/window.el (window-list): New function.
+       Suggested by Noah Friedman <friedman@splode.com>
+       Modified by Hrvoje Niksic <hniksic@srce.hr>
+
+       * utils/mail-extr.el (mail-extract-address-components): Replace
+       preceding-char with char-before.
+
+       * utils/passwd.el (read-passwd-map): Clean up Ebola BS.
+
+1997-06-10  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/supercite.el (sc-attribs-extract-namestring): Clean up
+       Ebola -- replace literal 32 with `?\ '.
+
+       * utils/mail-extr.el (mail-extr-voodoo): Clean up Ebola -- replace
+       `following-char' with `char-after'.
+
+1997-06-10  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/subr.el (split-string): Make PATTERN optional.
+
+1997-06-11  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * mule/language/misc-lang.el, mule/mule-load.el,
+       mule/ipa-hooks.el: Use lisp/mule/language/misc-lang.el instead of
+       lisp/mule/ipa-hooks.el; mule/ipa-hooks.el was deleted.
+
+1997-06-10  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * mule/language/thai-util.el, mule/thai.el: Use
+       lisp/mule/language/thai-util.el instead of lisp/mule/thai.el;
+       lisp/mule/thai.el was deleted.
+
+       * custom/wid-edit.el: Add widget `coding-system' for mule.
+
+       * mule/thai-hooks.el, mule/mule-load.el: Use
+       lisp/mule/language/thai.el instead of lisp/mule/thai-hooks.el;
+       lisp/mule/thai-hooks.el was deleted.
+
+       * mule/language/thai.el: modified for XEmacs.
+
+1997-06-09  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * mule/language/misc-lang.el, mule/language/thai-util.el,
+       mule/language/thai.el, mule/language/tibetan.el,
+       mule/language/vietnamese.el, mule/language/japan-util.el,
+       mule/language/japanese.el, mule/language/korean.el,
+       mule/language/lao-util.el, mule/language/lao.el,
+       mule/language/english.el, mule/language/ethiopic.el,
+       mule/language/european.el, mule/language/greek.el,
+       mule/language/hebrew.el, mule/language/indian.el,
+       mule/language/chinese.el, mule/language/cyrillic.el,
+       mule/language/devanagari.el, mule/language/china-util.el: imported
+       from Emacs/mule-19.34.94-zeta.
+
+       * mule/mule-load.el, mule/chinese-hooks.el, mule/chinese.el,
+       mule/cyrillic-hooks.el, mule/european-hooks.el,
+       mule/greek-hooks.el, mule/japanese-hooks.el, mule/korean-hooks.el:
+       chinese-hooks.el, chinese.el, cyrillic-hooks.el,
+       european-hooks.el, greek-hooks.el, japanese-hooks.el and
+       korean-hooks.el were deleted.
+
+1997-06-08  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * apel/emu-x20.el (mime-charset-coding-system-alist): iso-8859-1,
+       hz-gb-2312, cn-gb-2312, gb2312, cn-big5 and koi8-r were defined as
+       coding-system.
+
+1997-06-09  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/keydefs.el, modes/cc-mode.el, modes/cperl-mode.el,
+       vm/vm-vars.el:
+       Change usage of \177 to use keysym 'delete.
+       From  Gary D. Foster <Gary.Foster@Corp.Sun.COM>
+
+       * packages/etags.el (tags-loop-scan): Don't pass a straight string 
+       to error as a format string.
+       Reported by Miles Duke <mduke@erdas.com>
+
+       * its/its-kata.el ((require 'egg)): Needed for bytecompilation.
+
+       * its/its-hira.el ((require 'egg)): Needed for bytecompilation.
+
+       * bytecomp/bytecomp.el (byte-compile-two-args-19->20): Correct an
+       ebolifaction.
+       From Kyle Jones <kyle_jones@wonderworks.com>
+
+1997-06-08  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/files.el (auto-mode-alist): Restore  bash regexps.
+       From "Barry A. Warsaw" <bwarsaw@CNRI.Reston.VA.US>
+
+1997-06-05  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/jka-compr.el (jka-compr-write-region): Use 'binary
+       coding-system for compression.
+       Suggested by Katsumi Yamaoka <yamaoka@ga.sony.co.jp>
+
+1997-06-04  Gary D. Foster  <Gary.Foster@corp.sun.com>
+
+       * modes/cc-mode.el: Modified `c-electric-delete' to honor the 
+         desired delete direction in both normal and "hungry" modes.
+       * modes/cperl-mode.el: Modified `cperl-electric-backspace' to 
+         honor the desired delete direction.
+
+1997-06-03  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * x11/x-menubar.el (default-menubar): Add menu for Mule.
+
+       * mule/mule-cmds.el: Menu for XEmacs were moved to
+       x11/x-menubar.el.
+
+1997-06-03  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * leim/quail.el: to avoid compiling warnings about overlay.el.
+
+1997-05-16  Gary D. Foster  <Gary.Foster@corp.sun.com>
+
+       * prim/simple.el: Created `backspace-or-delete' function and
+         `backspace-or-delete-hook'
+       * prim/keydefs.el: Changed \177 bindings to point to new
+         delete function.
+       * modes/*.el: Removed conflicting \177 bindings.
+       * modes/cc-mode.el: Modified `c-electric-delete' to use new
+         delete bindings.
+       * modes/cperl-mode.el: Modified `cperl-electric-backspace' to 
+         use new delete bindings.
+       
+1997-06-03  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * leim/quail.el: to sync with quail.el of Emacs-19.34.94-epsilon.
+
+       * leim/quail/ziranma.el, leim/quail/tonepy.el, leim/quail/py.el,
+       leim/quail/qj.el, leim/quail/sw.el, leim/quail/ccdospy.el,
+       leim/quail/punct.el, leim/quail/4corner.el,
+       leim/quail/symbol-ksc.el, leim/quail/ethiopic.el,
+       leim/quail/hanja.el, leim/quail/quick-cns.el,
+       leim/quail/tsangchi-cns.el, leim/quail/lrt.el,
+       leim/quail/tsangchi-b5.el, leim/quail/devanagari.el,
+       leim/quail/japanese.el, leim/quail/quick-b5.el,
+       leim/quail/punct-b5.el, leim/quail/qj-b5.el, leim/quail/py-b5.el,
+       leim/quail/ctlau.el, leim/quail/ctlaub.el, leim/quail/ecdict.el,
+       leim/quail/array30.el, leim/quail/hangul3.el,
+       leim/quail/hanja-jis.el, leim/quail/cyrillic.el,
+       leim/quail/etzy.el, leim/quail/greek.el, leim/quail/ipa.el,
+       leim/quail/lao.el, leim/quail/zozy.el, leim/quail/viqr.el,
+       leim/quail/latin.el, leim/quail/thai.el, leim/quail/hangul.el:
+       quail of LEIM for Emacs-19.34.94-epsilon.
+
+1997-06-04  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/about.el: Installed new version 2.1.
+       From Hrvoje Niksic <hniksic@srce.hr>
+       
+       * prim/profile.el (pretty-print-profiling-info): Autoload don't
+       dump.
+       Clean up comments.
+
+       * prim/update-elc.el: Comment cleanup.
+
+       * modes/cperl-mode.el (cperl-mode-map): Restore previous
+       definition.
+       (cperl-electric-backspace): Use backspace-or-delete if it exists.
+
+       * bytecomp/bytecomp-runtime.el (eval-when-feature): New macro.
+       From Roland McGrath <roland@frob.com>
+
+       * prim/glyphs.el (init-glyphs): Add xbm instantiator for 'x
+       consoles.
+       Suggested by Hrvoje Niksic <hniksic@srce.hr>.
+
+       * utils/passwd.el: Eliminate obsolete Lucid emacs usage.
+
+       * utils/timezone.el (timezone-make-date-arpa-standard): Correct
+       docstring.
+       (timezone-make-date-sortable): Ditto.
+
+       * utils/passwd.el (passwd-invert-frame-when-keyboard-grabbed):
+       Change default for InfoDock.
+
+       * utils/highlight-headers.el
+       (highlight-headers-follow-url-function): Correct docstring.
+
+       * utils/finder.el (finder-known-keywords): Cleanup keyword
+       documentation.
+
+       * prim/startup.el (command-line-do-help): Use emacs-name function
+       for printing the editor name.
+
+       * prim/simple.el: Disable for InfoDock.
+       (display-warning): Disable for InfoDock.
+       (emacs-name): New function.
+
+       * prim/toolbar.el (press-toolbar-button): Allow mouse presses on
+       blank portions of the toolbar to do something.
+       (release-and-activate-toolbar-button): Handle arbitrary functions
+       as toolbar callbacks.
+       From weiner@altrasoft.com
+
+       * prim/mouse.el (default-mouse-track-cleanup-extent): Correct test 
+       on dead-func extent.
+
+       * prim/help.el (view-emacs-news): outl-mouse turned off in
+       InfoDock.
+
+       * packages/tar-mode.el (tar-mode-map): InfoDock doesn't like the
+       mouse bindings.
+
+       * packages/makesum.el (make-command-summary): Output correct
+       program name.
+       (double-column): Remove unused variable.
+
+       * packages/hyper-apropos.el (hypropos-popup-menu): Synch with
+       infodock.  Initialize command-p to either t or nil.
+
+       * eterm/term.el (make-term): Fix docstring.
+
+       * comint/shell.el: Correct comment.
+
+       * comint/comint.el (comint-mode-map): Infodock doesn't like the
+       button3 assignment.
+
+1997-06-03  Steven L Baur  <steve@altair.xemacs.org>
+
+       * modes/lisp-mode.el (eval-interactive): Treat defcustom like
+       defvar (turn into an effective defconst).
+
+       * cl/cl-macs.el (widget-get): Add defsetf method.
+       (widget-value): Add defsetf method.
+       From Hrvoje Niksic <hniksic@srce.hr>
+
+1997-06-02  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/obsolete.el (insert-and-inherit): Make 'compatible not
+       'obsolete.
+       Suggested by Hrvoje Niksic <hniksic@srce.hr>
+       (insert-before-markers-and-inherit): Ditto.
+
+1997-06-02  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * mule/korean.el was abolished because it seems not to be used.
+
+       * mule/japanese.el was abolished because it seems not to be used.
+
+1997-06-01  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * tm/gnus-mime-old.el was abolished because XEmacs 20.3 has Gnus
+       5.4.
+
+       * tm/tm-edit.el: updated to 7.108.
+
+       * tm/tm-view.el: updated to 7.83.
+
+       * leim/quail.el: modified for XEmacs.
+
+       * mule/mule-load.el, lisp/mule/mule-process.el: delete
+       mule-process.el because it is not used.
+
+       * mule/european.el was abolished because it seems not to be used.
+
+       * mule/mule-load.el: must load mule-cmds before setting for
+       language-environment.
+
+       * mule/mule-cmds.el, lisp/mule/european-hooks.el: Modified
+       for LEIM.
+
+       * mule/mule-cmds.el: Uncomment key definition for
+       `toggle-input-method'.
+
+       * mule/mule-init.el: Comment out about `mule-keymap' (moved to
+       mule-cmds.el).
+
+       * mule/mule-cmds.el: Uncomment about `mule-keymap' (moved from
+       mule-init.el).
+
+       * tl/tl-atype.el: Don't require tl-str.
+
+       * tl/tl-atype.el: Use atype.el of APEL.
+
+       * tl/tl-list.el: Use alist.el of APEL.
+
+1997-05-31  MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * tl/richtext.el, tl/emu-x20.el, tl/emu-xemacs.el,
+       lisp/tl/emu.el, lisp/tl/emu-e19.el: moved to lisp/apel/.
+
+       * tl/file-detect.el, tl/filename.el: replaced by APEL's.
+
+       * mu/std11-parse.el, mu/std11.el: moved to lisp/apel/.
+
+       * leim/quail.el: Add new quail.el (imported from Emacs
+       19.34.94-epsilon).
+
+       * leim/skk/skkdic.el: delete skkdic.el temporary because XEmacs
+       can not compile it.
+
+       * leim/skk/skkdic.el, leim/quail/zozy.el, leim/quail/ziranma.el,
+       leim/quail/viqr.el, leim/quail/tsangchi-cns.el,
+       leim/quail/tsangchi-b5.el, leim/quail/symbol-ksc.el,
+       leim/quail/thai.el, leim/quail/tonepy.el, leim/quail/quick-cns.el,
+       leim/quail/sw.el, leim/quail/qj-b5.el, leim/quail/qj.el,
+       leim/quail/quick-b5.el, leim/quail/py-b5.el, leim/quail/py.el,
+       leim/quail/lao.el, leim/quail/latin.el, leim/quail/lrt.el,
+       leim/quail/punct-b5.el, leim/quail/punct.el,
+       leim/quail/hanja-jis.el, leim/quail/hanja.el, leim/quail/ipa.el,
+       leim/quail/japanese.el, leim/quail/hangul3.el, leim/quail/etzy.el,
+       leim/quail/greek.el, leim/quail/hangul.el, leim/quail/ethiopic.el,
+       leim/quail/devanagari.el, leim/quail/ecdict.el,
+       leim/quail/ctlau.el, leim/quail/ctlaub.el, leim/quail/cyrillic.el,
+       leim/quail/array30.el, leim/quail/ccdospy.el,
+       leim/quail/4corner.el: Add LEIM elisp files.
+
+       * mule/mule-load.el, mule/mule-cmds.el: Add mule-cmds.el.
+
+       * prim/simple.el (assoc-ignore-case): New function; imported
+       from Emacs/mule-19.34.94-epsilon.
+
+1997-06-02  Steven L Baur  <steve@altair.xemacs.org>
+
+       * modes/hideshow.el: Make it work again.
+       From Pete Ware <ware@cis.ohio-state.edu>
+
+Sat May 31 09:00:14 1997  David Moore  <dmoore@ucsd.edu>
+
+       * utils/text-props.el (set-text-properties): Was exiting
+       map-extents too early.
+
+1997-06-02  Steven L Baur  <steve@altair.xemacs.org>
+
+       * cl/cl-macs.el (frame-parameters): Tweaking frame configuration
+       defsetf's.
+       From Hrvoje Niksic <hniksic@srce.hr>
+
+       * modes/vhdl-mode.el (vhdl-emacs-features): Allow recognition of
+       major version 20.
+
+       * prim/simple.el (kill-region): Sort beginning and ending
+       endpoints to simplify logic.
+       From Hrvoje Niksic <hniksic@srce.hr>
+
+Tue May 27 13:42:57 1997  Ken Manheimer  <klm@python.org>
+
+       * packages/icomplete.el:
+       * Updated my email address - klm@python.org instead of klm@nist.gov.
+
+       * Icomplete no longer installs itself when you load the package -
+         you have to invoke `icomplete-mode'.  (Since it's autoloaded in
+         both emacs, you can just invoke the function.)
+
+       * Integrated Emacs 19.34 and XEmacs 19.15 corrections (typos,
+         style, command revisions, etc).
+
+       * Integrated immediate keybindings display.  See
+         `icomplete-show-key-bindings', `icomplete-get-keys', and
+         `icomplete-completions'.
+
+       * `icomplete-get-keys': Return keys bound in prior buffer to func name.
+
+       * Added icomplete delay behavior, so completions don't intrude as
+         quickly for short input, with customization variables:
+
+         `icomplete-max-delay-chars' - Maximum number of initial chars to
+         apply icomplete compute delay.
+       
+         `icomplete-compute-delay' - Completions-computation stall, used
+         only with large-number completions
+
+         `icomplete-delay-completions-threshold' Pending-completions
+         number over which to apply icomplete-compute-delay
+
+       * Provided `icomplete-exhibit' on `icomplete-minibuffer-setup-hook'
+          so icomplete behaves well with XEmacs GNUS.
+
+Fri May 30 18:39:01 1997  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/glyphs.el (init-glyphs): Minor regexp cleanup.
+
+1997-05-30  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/simple.el (fsf:do-auto-fill): Remove unused variable.
+       (indent-for-comment): Use comment-indent-function instead of
+       obsolete variant.  This is dumped with XEmacs!
+
+       * packages/generic-sc.el (sc-next-operation): Remove unused
+       variable.
+       (sccs-insert-c-header): Ditto.
+       (ccase-new-revision-p): Ditto.
+       (sc-sensitize-menu): Ditto.
+
+       * modes/auto-show.el (TopLevel): Tighten check on
+       dump-time initialization.
+
+1997-05-29  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/format.el (format-alist): Change defconst to defvar.
+       From Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>
+
+       (format-encode-region): Reduce bytecompiler warnings for bound but
+       unused variables.
+       (format-deannotate-region): Ditto.
+       (format-annotate-region): Ditto.
+       (format-annotate-single-property-change) Ditto.
+
+       * utils/lib-complete.el: Clean up documentation in header.
+
+       * prim/glyphs.el: Eliminate bytecompiler warnings.
+       (define-obsolete-pointer-glyph): Mark as 'compatible not 'obsolete.
+
+       * prim/keydefs.el (ctl-x-map): Bind narrow-to-defun to `C-x n d'.
+
+       * prim/lisp.el (narrow-to-defun): Narrow to the same defun that
+       `mark-defun' would make the region.
+       (insert-parentheses): Let a negative argument enclose preceding
+       sexps.
+       From Erik Naggum  <erik@naggum.no>
+       
+       * prim/window-xemacs.el: New file, split from window.el with
+       XEmacs-specific stuff.
+
+       * prim/window.el (display-buffer): Remove unused variable.
+
+       * prim/keydefs.el (ctl-x-4-map): Add binding for
+       `kill-buffer-and-window'.
+
+       * prim/window.el (kill-buffer-and-window): New command.
+       Bind it to C-x 4 0.
+       From Richard Stallman  <rms@whiz-bang.gnu.ai.mit.edu>
+       
+       * prim/window.el (split-window-vertically): Don't change point in old
+       window if both the original point and the end of the buffer are
+       visible after splitting, when split-window-keep-point is nil.
+       From Noah Friedman  <friedman@prep.ai.mit.edu>
+       
+       * prim/files.el (revert-buffer-internal-hook): Declare.
+
+       * utils/map-ynp.el: Synch with Emacs 19.34.94.
+       (map-y-or-n-p): Clean up bytecompiler warnings.
+
+       * packages/generic-sc.el: Restored to distribution, comment
+       cleanup.
+
+       * prim/simple.el (message-log-max): Add compatible variable alias
+       for `log-message-max-size'.
+
+       * comint/background.el (background): Autoload.
+
+       * prim/process.el (shell-command): background.el is now
+       autoloaded.
+
+       * prim/minibuf.el: Clean up file header.
+
+       * packages/bookmark.el (bookmark-menu-popup-paned-menu): Naive
+       port to XEmacs.
+       (bookmark-bmenu-other-window-with-mouse): Naive port to XEmacs.
+
+       * utils/autoload.el (generated-custom-file): custom-load.el
+       renamed to cus-load.el.
+
+       * prim/loadup.el: Don't preload custom-load.elc.
+
+Thu May 29 19:03:52 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * x11/x-menubar.el (default-menubar): Updated customize entries.
+
+1997-05-29  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/about.el (about-xemacs-xref): Update contributors list.
+
+1997-05-28  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/minibuf.el (mouse-file-display-completion-list): Protect
+       against bogus directory becoming default.
+       (mouse-directory-display-completion-list): Ditto.
+
+       From Per Abrahamsen <abraham@dina.kvl.dk>
+       * bytecomp/bytecomp.el
+       (byte-compile-file-form-custom-declare-variable): New function.
+       (custom-declare-variable): Use it.
+
+       * packages/vc.el (vc-directory): dirname typo'ed as dir.
+
+       * packages/vc-hooks.el (vc-menu): Remove vc-file-status.
+       (Toplevel): Remove key definition for vc-file-status.
+
+1997-05-27  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/cus-start.el (Toplevel): Rename factory-value to
+       standard-value for Custom-1.98.
+
+1997-05-26  Steven L Baur  <steve@altair.xemacs.org>
+       
+       * prim/help.el (view-lossage-key-count): New variable.
+       (view-lossage-message-count): New variable.
+       (view-lossage): Use them.
+
+       From Hrvoje Niksic
+       * prim/help.el (view-lossage): Use new argument to `recent-keys'.
+
+       * cl/cl-macs.el (recent-keys-ring-size): New setf method.
+
+1997-05-26  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/process.el (shell-command-to-string): Alias exec-to-string
+       to more logical name.
+
+1997-05-23  Steven L Baur  <steve@altair.xemacs.org>
+
+       * tm/tm-view.el (mime/content-decoding-condition): Add image/png
+       mime type.
+
+       * tm/tm-image.el (toplevel): Add image/png mime type.
+
+       * tm/tm-edit.el (mime-file-types): Add png handling.
+       (mime-content-types): Ditto.
+
+Thu May 22 04:19:09 1997  Martin Buchholz  <mrb@eng.sun.com>
+
+       * prim/files.el (auto-mode-alist): Reorg.  Support
+       pre-processed fortran files.  *.m4 files now default to autoconf mode.
+
+       * prim/about.el: Promote Hrvoje.  Picture still needed...
+
+       * modes/ksh-mode.el:  _ has symbol syntax.
+       * modes/m4-mode.el:  _ has symbol syntax.
+       * modes/pascal.el:  _ has symbol syntax.
+       * modes/f90.el:  _ has symbol syntax.
+       * modes/cperl-mode.el:  _ has symbol syntax.
+       * modes/autoconf-mode.el: _ has symbol syntax.
+
+1997-05-22  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/files.el (save-buffer): From Hrvoje Niksic.  Don't clear
+       zmacs region.
+
+       * packages/func-menu.el: Update for David Hughes' new email
+       address.
+
+1997-05-21  Noah Friedman  <friedman@prep.ai.mit.edu>
+
+       * eldoc.el (eldoc-message-commands): Move docstring into comments,
+       since this isn't a user variable.
+       (eldoc-message-commands-table-size, eldoc-use-idle-timer-p,
+       eldoc-function-argstring-from-docstring-method-table): Use defvar,
+       not defconst.
+       (eldoc-last-data): Use cons explicitly; don't rely on dotted pair
+       read syntax.  I'm worried the latter might get compiled as
+       read-only data someday.
+       (eldoc-docstring-message): If truncating symbol name, show ending
+       of name rather than beginning.  The former is generally more unique.
+       (eldoc-function-argstring-from-docstring-method-table): Handle
+       pathological `save-restriction' case.
+       [top level]: Add `indent-for-tab-command' to eldoc-message-commands.
+
+1997-05-21  Steven L Baur  <steve@altair.xemacs.org>
+
+       * x11/x-menubar.el (default-menubar): strokes added to mouse
+       menu.
+
+Wed May 21 17:12:28 1997  Per Bothner  <bothner@deneb.cygnus.com>
+
+       * eterm/term.el (term-send-raw):  Better XEmacs character event
+       handling.
+       * eterm/term.el (term-char-mode): Re-do Meta-handling by temporarily
+       setting meta-prefix-char to -1 while building keymaps.
+       (term-send-raw-meta):  Removed.
+
+Tue Mar 11 20:15:26 1997  Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>
+
+       * eterm/term.el (term-completion-addsuffix): Doc fix.
+       (term-dynamic-complete-as-filename): Support the case where
+       term-completion-addsuffix is a (DIRSUFFIX . FILESUFFIX) cons
+       pair.
+
+Tue Jun  4 10:15:54 1996  Per Bothner  <bothner@deneb.cygnus.com>
+
+       * eterm/term.el:  Add kd, kl, kr, du capabilities.
+       * eterm/e/eterm.ti:  Add kcub1, kcuf1, kcuu1, kcud1 capabilities.
+
+Wed May 15 14:38:45 1996  Per Bothner  <bothner@deneb.cygnus.com>
+
+       * eterm/term.el (term-send-raw-string):  send-string ->
+       process-send-string.
+       * eterm/term.el (term-arguments):  Remove unused local 'values'.
+       * eterm/term.el (term-handle-deferred-scroll):  Fix off-by-one bug,
+
+       * eterm/term.el:  Merge changes from FSF (mostly typos).
+
+Mon Sep 25 17:19:51 1995  Per Bothner  <bothner@kalessin.cygnus.com>
+
+       * eterm/term.el (term-emulate-terminal): On CR, set
+       term-current-column to term-start-line-column, not 0.
+
+1997-05-21  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/add-log.el (change-log-font-lock-keywords): Tweak
+       font-lock-keywords.
+
+1997-05-21  Erik Naggum  <erik@naggum.no>
+
+       * add-log.el (add-log-lisp-like-modes, add-log-c-like-modes,
+       add-log-tex-like-modes): New variables.
+       (add-log-current-defun): Use them instead of constant lists.
+
+1997-05-21  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/add-log.el: Synch to Emacs 20.0.
+
+       * prim/obsolete.el (read-minibuffer): Make compatible not obsolete.
+       (read-input): Ditto.
+
+Tue May 20 20:32:59 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/subr.el (buffer-substring-no-properties): Clean out extents 
+       too.
+
+Mon May 19 19:48:35 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/process.el (shell-command-on-region): Remove region active
+       test (which played havoc with the hack in call-interactively to
+       place explicit calls to region-beginning and region-end in
+       interactive specs in the command history).
+
+Mon May 19 18:13:50 1997  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * utils/easymenu.el (easy-menu-add): Check for existing, before
+       entering MENU to `easy-menu-all-popups'.
+
+Sun May 18 09:11:50 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/files.el (revert-buffer): Add optional third parameter to
+       preserve buffer modes (from Emacs 19.34.94).
+       (after-find-file): Add optional fifth parameter to preserve buffer 
+       modes (from Emacs 19.34.94).
+
+       * packages/vc.el: Synch with Emacs 19.34.94 because our version was 
+       hopeless.
+       (vc-checkout): Autoload.
+       (vc-find-binary): Ditto.
+
+       * prim/files.el (find-buffer-visiting): Restore because FSF vc.el
+       needs it.
+
+Fri Apr 25 13:21:46 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * apropos.el (apropos): Add support for customization groups. 
+       (apropos-print): Ditto.
+
+Sat May 17 19:56:31 1997  Glynn Clements <glynn@sensei.co.uk>
+
+       * packages/man.el (manual-entry):  Strip out stderr output.
+
+Sun May 11 18:24:25 1997  Kyle Jones  <kyle@crystal.WonderWorks.COM>
+
+       * prim/modeline.el: new mouse-drag-modeline function.
+       Allows bottommost modeline to be dragged.
+
+Sat May 17 03:41:11 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * cl/cl-macs.el: A whole bunch of XEmacs specific setf methods
+       from Hrvoje Niksic.
+
+       * prim/files.el (auto-mode-alist): Don't copy to purespace.
+       (interpreter-mode-alist): Ditto.
+
+Fri May 16 21:43:35 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/info.el (Info-button1-follows-hyperlink): New variable.
+       (Info-maybe-follow-clicked-node): Use it.
+
+       * prim/simple.el (transpose-preceding-chars): New function.
+
+Fri May 16 20:37:35 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * version.el: Update minor version number.
+
+Mon May 12 13:47:37 1997  Oscar Figueiredo  <Oscar.Figueiredo@di.epfl.ch>
+
+       * tm/tm-vm.el: Provide for vm-unsaved-message having been removed
+       in recent versions of VM.
+       
+Fri May  9 10:41:44 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * iso/iso-acc.el (iso-accents-compose): Fix XEmacs 19.14
+       compatibility (patch suggested by Hrvoje Niksic).
+
+       * packages/man.el (manual-entry): (Patch from Soren Dayton) Allow
+       subchapters not to be trimmed on Solaris.
+
+       * prim/itimer.el (itimer-edit-mode): Correct use of obsolete
+       function.
+
+       * prim/startup.el: Update copyright notice.
+
+Thu May  8 14:35:34 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * hm--html-menus/hm--html.el: Define obsolete aliases for the
+       previous function spellings.
+
+       * hm--html-menus/hm--html-keys.el: Define obsolete aliases for the 
+       previous variable spellings.
+
+       * prim/obsolete.el (define-obsolete-variable-alias): Fix docstring 
+       spelling.
+       (define-compatible-variable-alias): Ditto.
+
+       * tm/tm-vm.el (vm-unsaved-message): Symbol doesn't exist any
+       more.
+
+Tue May  6 21:33:19 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * mule/mule-files.el (write-region): Correct docstring.
+
+       * prim/files-nomule.el (write-region): Correct docstring.
+
+Mon May  5 12:26:41 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/about.el (about-xemacs-xref): Infodock Associates is now
+       Altrasoft.
+
+Sat May  3 16:32:47 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * efs/dired.el (dired-chown-program): chown program is in /bin on
+       Linux.
+
+Fri May  2 20:04:35 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * egg/egg.el: paren.el needed at bytecompile time for
+       `pos-visible-in-window-safe' defsubst.
+
+       * pcl-cvs/pcl-cvs.el (cvs-update): Inhibit dialog box usage in
+       call to cvs-do-update as this bombs when this function is invoked
+       from a menu.
+
+Wed Apr 30 18:06:35 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/loadup.el: Put features.elc in the dump list.
+
+       * prim/about.el (about-xemacs): Change date.
+
+Tue Apr 29 18:51:31 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * mule/mule-files.el (buffer-file-coding-system-alist): Regexp for 
+       handling info files didn't match the right pattern.
+
+Sun Apr 27 18:09:48 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/sound.el (load-sound-file): Fix typo.
+
+Sat Apr 26 16:25:49 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * utils/lib-complete.el: Make conformant to Lisp coding standards
+       MULE-ize by allowing for coding system argument.
+
+Fri Apr 25 08:39:50 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * modes/sh-script.el (sh-indent-line): Deal with pathological case 
+       of indenting a first line containing a `#' as first non-white
+       space character.
+
+Thu Apr 24 18:40:32 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * comint/telnet.el (telnet-mode-map): Correct Emacs synch typo.
+
+       * rmail/rmail.el (rmail-get-new-mail): display-time-string is not
+       necessarily a string.
+
+Thu Apr 24 11:08:28 1997  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * packages/balloon-help.el:
+       - default background color now grey80 to match XEmacs default.
+       - default border width is now 1.
+       - default font is now "variable"
+       - balloon-help can now handle variable width fonts.
+       - loading balooon-help no longer turns on balloon-help-mode.
+       - new `balloon-help' command.
+       - changes to the font/background/foreground variables now affect
+         the help frame at next display.
+       - help frame should now pop up on the correct display if XEmacs
+         is running with multiple devices open.
+       - Customized, courtesy of Hrvoje.
+       - don't use the padding lines that were needed for 19.12.
+         Compatibility with older XEmacs versions is hereby disavowed.
+       - xclock frame name hack is gone.
+
+Wed Apr 23 10:56:05 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/files.el (hack-local-variables-prop-line): Mistakenly
+       returned t when enable-local-variables was nil.
+
+       * psgml/psgml-charent.el (sgml-display-char-list-filename): Move
+       iso88591.map to a proper location.
+
+       * prim/sound.el (load-sound-file): Make sure sound files are read
+       as binary files.
+
+Tue Apr 22 02:05:38 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/vc.el (vc-directory): Set text properties.
+
+       * psgml/psgml-xemacs.el (sgml-xemacs-get-popup-value): Allow for
+       interactive commands.
+
+Mon Apr 21 15:15:12 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/minibuf.el (input-error): New error type.
+       (read-from-minibuffer): Use it.
+
+       * comint/comint.el (comint-exec-hook): Do not Customize due to
+       interactions with setting language environment in MULE.
+
+Sun Apr 20 09:36:19 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/info.el (Info-footnote-tag): Changing the footnote tag
+       from the default "Note" is broken.
+
+Tue Apr 22 07:01:20 1997  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/keydefs.el (global-map): Bind it to `C-z'.
+
+       * prim/frame.el (suspend-emacs-or-iconify-frame): New function.
+
+Fri Apr 18 16:45:07 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * utils/skeleton.el (skeleton-pair-insert-maybe): Guard test with
+       existence check on mark-active too.
+       (skeleton-proxy): Ditto.
+       (skeleton-proxy-new): Ditto.
+
+Fri Apr 18 09:26:24 1997  Dave Gillespie <daveg@synaptics.com>
+
+       * cl/cl-macs.el (values): New setf-method.
+
+Thu Apr 17 21:29:57 1997  Bob Weiner <weiner@infodock.com>
+
+       * packages/avoid.el (mouse-avoidance-kbd-command): Correct
+       detection of keypress.
+
+Thu Apr 17 21:20:04 1997  Michael McNamara  <mac@silicon-sorcery.com>
+
+       * modes/verilog-mode.el: Changes to 2.25
+       1) Autoindent a new declaration according to the previous
+          declaration, if any. Only use the previous one, don't try to re
+          line things up.
+       2) Include "Customize Verilog-Mode" in the Verilog menu bar. Make it
+          safe to do so, even if the underlying emacs does not yet support
+          custom.
+       3) Include keybinding C-c C-b for reporting bugs.
+       4) Include keybinding C-c i for reindenting declarations.
+
+       * modes/verilog-mode.el: Changes to 2.24
+       Cleaned up menubar items; added submit bug report there, for
+       example.
+
+       * modes/verilog-mode.el: Changes to 2.23
+       1) Support custom (XEmacs) or defvar method of customization.
+       2) fix verilog-pretty declarations
+       3) add support so folks turning up the complexity of commenting don't
+          get errors (they don't get any more complexity either)
+
+       * modes/verilog-mode.el: Changes to 2.22
+       1) Moved installation hints to the web page.
+       2) Added support for XEmacs's custom variable setting package.
+       3) Added variables to separatly control indentation of
+               module level items (always, initial. etc)
+               declarations
+               behavorial (the begin in the task & function declaration
+       4) Attempted to shorten comments and lisp so that the %@* NT
+          mailers won't turn long comments into extra code.
+       5) Used make-regexp to optimize many regular expressions so that they
+          are no longer backtrack.
+       6) fixed bugs
+        a) a newline on a blank line no longer generates two new lines.
+        b) a semicolon on a comment no longer auto indents
+        c) lines like ''else if (a) begin''
+           no longer confuse auto commenter
+        d) a number of other bugs which fail to come to mind...
+       7) Added support for menu pulldowns on FSF and XEmacs
+       8) Added support for XEmacs v20
+       9) Changed verilog-comment-region to insert comments that Verilog-XL
+          doesn't b*tch about.
+       10) Eliminated auto lineup of declarations upon typing newline of
+          semicolon. (Cheers all around) Now instead there is a command, and
+          also a menu pulldown, which lines up indentations around point.
+       11) Added verilog-submit-bug-report
+
+Mon Apr 14 13:06:10 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * utils/autoload.el (generate-file-autoloads-1): Turn off local
+       variable processing.
+
+       * prim/files.el (hack-local-variables-prop-line): Respect setting
+       of enable-local-variables.
+
+       * vm/vm-startup.el (vm-session-initialization): Remove for
+       production version.
+
+       * utils/smtpmail.el (smtpmail-send-it): Forgot quote.
+       (smtpmail-deduce-address-list): case-fold-search mistakenly set
+       before buffer change.
+
+Sun Apr 13 14:49:34 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * x11/x-menubar.el (default-menubar): Added `send-pr' to Help
+       menu.
+
+       * modes/make-mode.el (makefile-font-lock-keywords): Correct old,
+       restored :-( 19.14 makefile-space-face lossage.
+
+Sat Apr 12 23:20:31 1997  David Moore  <dmoore@ucsd.edu>
+
+       * packages/font-lock.el (c-font-lock-keywords-1): Performance
+       tuned regexps.
+
+Sat Apr 12 21:32:37 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/about.el (about-xemacs): Update printed release date.
+
+       * calendar/appt.el (install-display-time-hook): Friends don't let
+       Friends quote lambda functions.
+
+Fri Apr 11 11:50:14 1997  Oscar Figueiredo  <Oscar.Figueiredo@di.epfl.ch>
+
+       * tm/tm-vm.el: tm-vm/use-original-url-button:
+         - Default is now t (principle of least surprise).
+       (tm-vm/build-preview-buffer):
+         - Bind vm-message-pointer in Preview-buffer.
+         - X-Face was not displayed for a certain set of enabling variables.
+       Calls to (vm-xemacs-p) were removed.
+
+Sat Apr 12 05:27:56 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * modes/list-mode.el (list-mode-item-mouse-selected): Sometimes
+       event-closest-point returns nil.
+
+       * comint/telnet.el (telnet-check-software-type-initialize):
+       Restore 19.14 initialization of telnet-prompt-pattern for Unix.
+       (rsh): Allow a way to get back old password-less behavior.
+
+       * edebug/edebug.el (edebug-read-and-maybe-wrap-form): Protect
+       against pathological recursive calls.
+
+       * prim/loadup.el: add cus-start as dumped package.
+
+       * packages/vc.el (vc-directory): Dired requires a list not a
+       string of space separated names.
+
+       * utils/live-icon.el (live-icon-colour-name-from-face): `face' may 
+       be a list of faces since it is generated by `extent-face'.
+
+Fri Apr 11 21:12:57 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/ispell.el: Don't attempt creation of the menubar unless 
+       XEmacs has been compiled with menubars.
+
+       * prim/simple.el (yank-pop): mark-marker needs optional force
+       parameter to activate the region (suggested by Jamie Zawinski).
+
+Fri Apr 11 17:47:26 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * packages/apropos.el (apropos): Add support for faces, widgets,
+       and user options.
+       (apropos-print): Ditto.
+
+Fri Apr 11 01:23:45 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/loadup.el (running-xemacs): Declare.  This variable is the
+       new canonical way of determining whether you're running under
+       XEmacs.
+
+Thu Apr 10 13:23:14 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/font-lock.el (font-lock-apply-highlight): Remove
+       support for back to back font hack (and restore correct
+       fontification of `int a, b, c;').  Patch from Anders Lindgren.
+
+       * prim/about.el (about-xemacs-xref): Forgot to link David Moore's
+       picture (oops).
+
+Thu Apr 10 12:30:29 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * efs/dired-faces.el (dired): Move to environment group.
+
+Wed Apr  9 19:45:46 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * x11/x-menubar.el (default-menubar): Inline definition of
+       customize menu.
+
+Wed Apr  9 10:45:54 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/about.el (about-xemacs-xref): Add Jan Vroonhof to list of
+       contributors.
+       (about-xemacs-xref): Add MORIOKA Tomohiko's bio.
+       (about-xemacs-xref): Add Per Abrahamsen.
+
+Tue Apr  8 12:57:05 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * modes/lisp-mode.el (eval-defun): Evaluate defcustom in defconst
+       style instead of defvar style (patch derived from Emacs 19.35/Lars 
+       Magne Ingebrigtsen).
+
+Mon Apr  7 16:38:43 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/frame.el (temp-buffer-shrink-to-fit): Default to nil since
+       this feature has gotten broken.
+
+Sun Apr  6 06:56:03 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * modes/outl-mouse.el (outline-down-arrow-mask): Set up arrow
+       glyphs to display on when no X11 support is available.
+
+       * modes/outline.el (outline-install-menubar): short circuit if no
+       menubars are available.
+
+       * x11/x-menubar.el (default-menubar): Use xmine not mine.
+
+       * prim/help.el (describe-variable): Some doc strings weren't being 
+       terminated with a newline.
+
+Sat Apr  5 20:20:00 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/about.el (about-xemacs-xref): Correct Jareth Hein's links.
+
+Sat Apr  5 13:18:05 1997  Tomasz J. Cholewo  <t.cholewo@ieee.org>
+
+       * packages/etags.el (tags-query-replace): Fixed DELIMITED argument 
+       bug.  `with-caps-disable-folding' moved to isearch-mode.el.
+
+       * packages/info.el (Info-search): Use `with-caps-disable-folding'.
+
+Sat Apr  5 09:32:43 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * utils/finder-inf.el: Regenerated.
+
+       * utils/finder.el (finder-known-keywords): Add mule keyword.
+
+Tue Apr  1 14:08:04 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/winnt.el: New file.  Derived from Emacs 19.34, adapted by
+       Marc Paquette.
+
+       * prim/faces.el (set-face-stipple): Allow usage of a pixmap
+       (suggested by Per Abrahamsen).
+
+       * mule/canna.el (running-xemacs): Move to the top.
+
+       * prim/cmdloop.el (y-or-n-p-minibuf): Add protection in case user
+       hits something that can't be bound to a key.
+
+Tue Apr  1 11:25:33 1997  Martin Buchholz  <mrb@Eng.Sun.COM>
+
+       * bytecomp/bytecomp.el (char-after): Correct coding of calling
+       sequence.
+
+Mon Mar 31 21:36:47 1997  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * prim/faces.el (set-face-stipple): New function.
+
+Sat Mar 29 14:52:02 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * gnats/send-pr.el (send-pr:submit-pr): Pass send-pr:datadir in
+       the environment to send-pr.
+       (send-pr::insert-template): Ditto.
+       (send-pr:default-site): Default submission address is at xemacs.org.
+
+Fri Jul 19 12:01:51 1996  Christoph Wedler  <wedler@fmi.uni-passau.de>
+
+       * packages/info.el (Info-elisp-ref): Look first in lispref, then
+       elisp.
+
+       * packages/func-menu.el (fume-function-name-regexp-bibtex): `,'
+       isn't allowed.
+
+       * packages/etags.el (list-tags): Interactive argument should be an
+       existing file name.
+
+Wed Mar 26 22:33:40 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * Remove ns lisp directory.
+       * Remove vms lisp directory.
+
+Tue Mar 25 12:22:57 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/files.el (file-remote-p): Update doc string.
+
+       * packages/terminal.el (te-stty-string): Fix definition for Linux.
+
+Mon Mar 24 23:43:53 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/files.el (file-remote-p): Correct documentation and allow
+       for `allow-remote-paths' to control loading of efs.
+
+Sun Mar 23 16:58:08 1997  Tomasz J. Cholewo  <t.cholewo@ieee.org>
+
+       * packages/etags.el (with-caps-disable-folding): New macro.
+       (find-tag-internal): Use it.
+       (tags-search): Use it.
+       (tags-query-replace): Use it.  Case bug corrected.
+
+Mon Mar 24 00:47:38 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * x11/x-menubar.el (popup-mode-menu): Change guard when stripping
+       keywords to be more robust.
+
+Sun Mar 23 00:26:53 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/startup.el (splash-hack-version-string): Correct for case
+       of hosts with '-' in the names.
+
+Sat Mar 22 14:25:47 1997  Tomasz J. Cholewo  <t.cholewo@ieee.org>
+
+       * modes/sendmail.el (user-mail-address): Require cus-edit.
+       Fix when scope.
+
+Sat Mar 22 14:25:47 1997  Tomasz J. Cholewo  <t.cholewo@ieee.org>
+
+       * calendar/diary-lib.el (diary-countdown): New function.
+       (fancy-diary-display): Use modeline-buffer-identification.
+
+       * calendar/appt.el (appt-diary-entries): Do not display diary.
+       (appt-check): Display diary buffer at midnight.  
+       
+Fri Mar 21 19:16:46 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * mule/mule-coding.el (enable-multibyte-characters): MULE
+       compatible variable.
+
+Thu Mar 20 13:28:17 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * bytecomp/bytecomp.el (byte-compile-output-docform): Ebola fix.
+       (byte-compile-lambda): Ebola fix.
+
+       * prim/obsolete.el (following-char): Make this turkey obsolete.
+       (preceding-char): Ditto.  (Suggested by Richard Mlynarik).
+
+Wed Mar 19 10:12:09 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * modes/sendmail.el (sendmail-send-it): Use function for
+       user-mail-address.
+       (user-mail-address): Autoload.
+
+       * pcl-cvs/pcl-cvs.el (cvs-changelog-ours-p): Use function for
+       user-mail-address.
+
+       * prim/startup.el (load-init-file): Only set user-mail-address if
+       non-interactive.
+
+       * utils/smtpmail.el (smtpmail-send-it): Use function for
+       user-mail-address.
+       (smtpmail-via-smtp): Ditto.
+
+       * packages/add-log.el (add-log-mailing-address): Use new function
+       to obtaion email address.
+       (add-change-log-entry): Ditto.
+
+       * prim/device.el (device-pixel-depth): New alias for
+       `device-bitplanes'.
+
+       * comint/comint-xemacs.el (comint): Fix typo in defgroup.
+
+Tue Mar 18 11:16:28 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/loadup.el: ls-lisp doesn't exist now.
+
+       * comint/comint-xemacs.el (comint): Touch up fixes from Per
+       Abrahamsen.
+
+       * prim/glyphs.el (subwindow-image-instance-p): Change doc string
+       to reflect unimplemented status.
+
+Mon Mar 17 15:34:06 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * comint/comint.el (comint-input-setup): Require comint-xemacs.
+
+       * utils/autoload.el (autoload-snarf-defcustom): Don't snarf from
+       auto-autoloads.el.
+
+       * comint/comint-xemacs.el: New file.  Contains face declarations
+       for comint.
+
+       * comint/comint.el: Remove inline defface.
+
+Sat Mar 15 15:14:06 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/loadup.el: Add prim/auto-customize.elc to dumped files.
+
+       * utils/autoload.el (generated-custom-file): New variable.
+       (autoload-snarf-defcustom): New function.  Grab Customization as
+       we look for autoload cookies. (based on code by Per Abrahamsen).
+       (update-file-autoloads): Use it.
+       (autoload-save-customization): New function (based on code by Per
+       Abrahamsen).
+       (batch-update-autoloads): Use it.
+
+Fri Mar 14 19:59:36 1997  Bob Weiner  <weiner@infodock.com>
+
+       * packages/jka-compr.el (jka-compr-installed-p): Simplify.
+
+Fri Mar 14 17:24:30 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * modes/sendmail.el: Correct vm macro hack.
+       (query-user-mail-address): New customizable variable.
+       (user-mail-address): New function, use it.  (Courtesy of Per
+       Abrahamsen <abraham@dina.kvl.dk>).
+
+Thu Mar 13 18:49:50 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * x11/x-menubar.el (popup-mode-menu): Do something more correct
+       when combining a global popup menu and a local mode menu.
+
+Thu Mar 13 08:36:35 1997  Adrian Aichner <aichner@ecf.teradyne.com>
+
+       * packages/crypt.el (crypt-unix-to-dos-region): Correct DOC string.
+
+Wed Mar 12 13:46:21 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/obsolete.el (char=): Make alias for common lisp
+       compatibility.
+
+Mon Mar 10 09:44:05 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/simple.el (set-fill-column): Clean up docstring.
+
+       * x11/x-menubar.el (save-options-non-customized-face-list): Allow
+       save-options to save faces declared with defface macro.
+
+       * packages/vc.el: diff-switches is autoloaded again in diff.el.
+
+       * packages/diff.el (diff-switches): Default to "-c".
+
+Sun Mar  9 18:44:59 1997  Tomasz J. Cholewo  <tjchol01@mecca.spd.louisville.edu>
+
+       * prim/help.el (describe-function-1): Add missing stream arguments
+       to terpri and princ.
+
+Sun Mar  9 15:38:29 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/modeline.el (modeline-minor-mode-menu): Evaluate minor
+       modes in context of correct buffer.
+
+       * prim/help.el (locate-library): Synched with Emacs 19.35.
+
+       * packages/icomplete.el (icomplete-get-keys): Make it work.
+
+       * prim/about.el: Add Jens Lautenbacher's picture.
+
+Sun Mar  9 12:38:53 1997  Noah Friedman  <friedman@prep.ai.mit.edu>
+
+       * utils/eldoc.el (eldoc-pre-command-refresh-echo-area): Use
+       eldoc-display-message-p, not eldoc-display-message-no-interference-p.
+       
+Sat Mar  8 11:20:47 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/startup.el (startup-splash-frame-body): More text tweaking.
+
+       * x11/x-faces.el (*try-oblique-before-italic-fonts*): New user
+       variable.  Allow trying oblique fonts ahead of italic fonts (from
+       Raymond Toy).
+       (x-make-font-italic): Use it.
+
+       * prim/obsolete.el (window-system): Make it compatible not
+       obsolete.
+
+Fri Oct 11 14:21:05 1996  Christoph Wedler  <wedler@fmi.uni-passau.de>
+
+       * packages/hyper-apropos.el (hypropos-get-doc): Put font names etc in
+       parentheses if instantiation uses fallback.
+       (hypropos-face-history): New variable.
+       (hyper-describe-face): New function.
+       (hyper-where-is): New command.
+       (hypropos-read-function-symbol): New function.
+       (hyper-describe-key): New command.
+       (hyper-describe-key-briefly): New command.
+       (hypropos-read-variable-symbol): New function.
+       (hyper-set-variable): New command.
+       (hypropos-set-variable): Changed to work with buffer-locals.
+
+Fri Jul 19 12:01:51 1996  Christoph Wedler  <wedler@fmi.uni-passau.de>
+
+       * packages/hyper-apropos.el: Massive changes--the original knew nothing
+       about buffer-locals and local-bindings.
+       (hypropos-shrink-window): New user option.
+       (hypropos-ref-buffer): New variable.
+       (hypropos-regexp-history): New variable.
+       (hyper-apropos): Better interactive version.
+       (hypropos-grok-variables): Omit OBSOLETE stuff.
+       (hyper-describe-variable): Additional ARG, better interactive
+       version.
+       (hyper-describe-function): Ditto.
+       (hypropos-last-help): Without prefix arg, just display buffer.
+       (hypropos-insert-face): New function.
+       (hypropos-insert-keybinding): New function.
+       (hypropos-get-doc): Additional ARG, display documentation for
+       faces, complete change.
+       (hypropos-this-symbol): Using better regexp.
+
+Fri Mar  7 10:44:48 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * x11/x-menubar.el (default-menubar): Reorganize again undoing
+       previous change.  Customize submenu moved to top of options menu.
+       Edit faces restored to edit-faces and renamed to Browse faces.
+       
+Thu Mar  6 08:43:27 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * x11/x-menubar.el (options-menu): New variable.
+       (default-menubar): Use it.
+
+       * prim/about.el (view-less): Explicit require.
+
+Wed Mar  5 18:03:02 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/cleantree.el: New file based on suggestion by David Moore,
+       and derived from Gnus nnml code.
+
+Tue Mar  4 01:19:37 1997  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * edebug/edebug.el (edebug-compute-previous-result): Don't treat
+       numbers as chars.
+
+Wed Mar  5 10:11:55 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/startup.el (splash-hack-version-string): New function to
+       narrow the output of (emacs-version) for the splash screen.
+       (splash-frame-present): Use it.
+
+Tue Mar  4 19:52:10 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/supercite.el (sc-name-filter-alist): (Idea from Bob
+       Weiner).  Update to handle names like Michael Sperber
+       [Mr. Preprocessor].
+
+Mon Mar  3 17:50:04 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * prim/faces.el (init-face-from-resources): New variable.
+       (init-face-from-resources): Use it.
+       (init-device-faces): Use it.
+       (init-frame-faces): Use it.
+       (make-empty-face): New function.
+
+       * x11/x-faces.el (x-init-face-from-resources): Made second
+       argument optional, and added a third argument.
+       (make-face-x-resource-internal): New alias.
+
+Mon Mar  3 14:45:16 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/loadup.el: Remove custom.elc.
+
+       * prim/simple.el (newline): Attempt to not add newline to a
+       previous end-open extent.
+
+Sun Mar  2 10:10:31 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * hm--html-menus/tmpl-minor-mode.el (tmpl-sign): Remove nul byte.
+
+       * site-load.el: Move site-packages to the top level.
+
+Sun Mar  2 01:37:04 1997  Hrvoje Niksic  <hniksic@srce.hr>
+       * utils/mail-extr.el (all-top-level-domains): Added "hr" domain.
+
+       * packages/ps-print.el (ps-print-color-p): Default to nil.
+
+       * x11/x-menubar.el (default-menubar): Changed menubar entry for
+       color printing.
+
+       * prim/faces.el (init-other-random-faces): Use gray65 for
+       zmacs-region and primary-selection background.
+
+       * x11/x-faces.el (x-init-global-faces): New default background
+       gray80.
+
+Sat Mar  1 14:38:14 1997  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * packages/diff.el: (diff): Autoload.
+       (diff-backup): Autoload.
+       (diff-switches): Autoload.
+
+Sat Mar  1 01:09:08 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/tar-mode.el (tar-mode-map): Removed extraneous C-c
+       binding of tar-copy.
+
+       * prim/keydefs.el: Don't disable upcase-region and
+       downcase-region.
+
+Fri Feb 28 11:22:29 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/obsolete.el (char-to-int): Define as alias to `char-int'.
+
+       * prim/help.el (describe-function-1): Show annotation contents if
+       they exist.
+
+       * packages/man.el (Manual-mode): Don't turn off scrollbars if
+       XEmacs doesn't have them to begin with.
+
+       * prim/keydefs.el: Don't disable eval-expression by default now
+       that it is harder to type.
+
+Thu Feb 27 13:06:41 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/subr.el (with-string-as-buffer-contents): Moved from
+       mule/mule-coding.el.
+
+       * mule/mule-coding.el: Remove with-string-as-buffer-contents.
+
+       * prim/format.el (format-insert-file): Correct wrong order of args
+       passed to format-decode.
+
+       * prim/startup.el (load-user-init-file): Allow XEmacs to read a
+       bytecompiled .emacs if it exists.
+
+Thu Feb 27 17:41:57 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * subr.el (eval-after-load): Enable.
+       (eval-next-after-load): Ditto.
+
+Thu Feb 27 10:59:05 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/subr.el (with-temp-buffer): New function from Emacs 19.35,
+       courtesy of Erik Naggum  <erik@naggum.no>.
+
+Fri Feb 28 22:17:03 1997  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/isearch-mode.el: Added "_" to the `interactive' forms of
+       most functions.
+       (isearch-mode-map): Define M-y.
+       (isearch-yank-kill): New function.
+
+       * prim/keydefs.el: Don't bind `C-x C-n' to `set-goal-column';
+       don't disable `set-goal-column'.
+
+       * mule/mule-init.el (ctl-x-map): Use `C-x C-n' as mule-prefix,
+       instead of `C-x C-k'.
+
+Wed Feb 26 18:09:56 1997  Andreas Jaeger <aj@arthur.pfalz.de>
+
+       * x11/x-menubar.el (default-menubar): `FAQ' should be `FAQ
+       (local)' in Help menu.
+
+Mon Feb 24 18:33:38 1997  Martin Buchholz  <mrb@eng.sun.com>
+
+       * mule/mule-debug.el (describe-coding-system): Ported from
+       Mule to XEmacs.
+
+       * mule/mule-x-init.el (x-use-halfwidth-roman-font): New
+       function:
+        "Maybe set charset registry of the 'ascii charset to ROMAN-REGISTRY.
+
+       Do this only if:
+        - the current display is an X device
+        - the displayed width of FULLWIDTH-CHARSET is twice the displayed
+          width of the 'ascii charset, but only when using ROMAN-REGISTRY.
+
+       Traditionally, Asian characters have been displayed so that they
+       occupy exactly twice the screen space of ASCII (`halfwidth')
+       characters.  On many systems, e.g. Sun CDE systems, this can only be
+       achieved by using a national variant roman font to display ASCII."
+
+Sun Feb 23 12:56:28 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * edebug/edebug.el: Synch up with Emacs 19.34.
+
+       * prim/itimer-autosave.el (auto-save-timeout): Increase to 960.
+
+Sat Feb 22 17:11:31 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/loadup.el:  Dump new file itimer-autosave.el.
+
+Sat Feb 22 17:06:32 1997  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * prim/itimer.el: Cleanup, removal of autosave cruft.
+
+Fri Feb 21 09:41:44 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/simple.el (line-move-ignore-invisible): Reverse previous
+       change to make this default to nil again.
+
+Thu Feb 20 14:30:50 1997  Jamie Zawinski  <jwz@netscape.com>
+
+       * prim/files.el (hack-local-variables-prop-line): New version.
+
+Thu Feb 20 11:14:22 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/files.el: Delete definition of dired-kept-versions.
+
+       * prim/about.el (about-xemacs-xref): Added Kyle's picture. :-)
+
+Wed Feb 19 15:47:47 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/vc.el (diff-switches): Restore since this global
+       variable went away with the passing of ange-ftp.
+
+       * utils/autoload.el (generate-file-autoloads-1): Don't let
+       find-file-hooks be run.
+       (update-file-autoloads): Ditto.
+       (update-autoloads-from-directory): Ditto.
+
+       * x11/x-menubar.el (default-menubar): Correct unguarded reference
+       to fast-lock-mode variable.
+
+Wed Feb 19 08:04:02 1997  Noah Friedman  <friedman@prep.ai.mit.edu>
+
+       * utils/eldoc.el (eldoc-message-commands): Doc fixes.
+       (eldoc-message): Make function, not macro.
+
+       * utils/eldoc.el (eldoc-last-message): New internal variable.
+       (eldoc-mode): Initialize it to nil.
+       (eldoc-message): Use it.
+       (eldoc-print-current-symbol-info): Use it.
+
+       * utils/eldoc.el (eldoc-pre-command-refresh-echo-area): New function.
+       (eldoc-mode): Put it on pre-command-hook if in XEmacs or using
+       idle timers in Emacs.
+
+       * utils/eldoc.el (eldoc-message-commands-table-size): New constant.
+       (eldoc-add-command): Use it to initialize eldoc-message-commands.
+
+       * utils/eldoc.el (eldoc-display-message-no-interference-p): New
+       function.
+       (eldoc-display-message-p): Use it.
+
+       * utils/eldoc.el (eldoc-print-fnsym-args, eldoc-print-var-docstring):
+       Arg sym no longer optional.
+       Do not initialize arg if nil.
+
+       * utils/eldoc.el (eldoc-forward-sexp-safe): Function deleted.
+       (eldoc-beginning-of-sexp): New function.
+       (eldoc-fnsym-in-current-sexp): Use eldoc-beginning-of-sexp.
+       Use eldoc-current-symbol to get symbol at point.
+
+       * utils/eldoc.el
+       (eldoc-function-argstring-from-docstring-method-table): Forge
+       docstrings for `and', `or', `list', `+', and `-'.
+
+       * utils/eldoc.el (eldoc-add-command-completions): New function.
+       (eldoc-add-command): Take list of args.
+       No longer interactive.
+       (eldoc-remove-command-completions): New function.
+       (eldoc-remove-command): Take list of args.
+       No longer interactive.
+
+       * utils/eldoc.el: Initialize eldoc-message-commands using
+       eldoc-add-command-completions.
+
+       * utils/eldoc.el (eldoc-display-message-p): New function.
+       Return nil if cursor-in-echo-area, or using idle timers and a
+       command is still active.
+       (eldoc-print-current-symbol-info): Use eldoc-display-message-p.
+
+Tue Feb 18 14:20:01 1997  David Byers  <davby@ida.liu.se>
+
+       * packages/paren.el (paren-highlight): Minor typo correction.
+
+Tue Feb 18 13:05:33 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/loadup.el: Dump new file custom-xmas.
+
+Mon Feb 17 21:01:38 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/help.el (function-compatible-p): New function.
+       (function-compatibility-doc): New function.
+       (describe-function-1): Use them.
+       (variable-compatible-p): New function.
+       (variable-compatibility-doc): New function.
+       (describe-variable): Use them.
+
+Mon Feb 17 19:12:55 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * prim/obsolete.el (x-color-values): Added for Emacs
+       compatibility.
+
+Mon Feb 17 18:11:24 1997  Michael Kifer  <kifer@CS.SunySB.EDU>
+
+       * prim/files.el (file-remote-p): Force load of EFS if not already
+       loaded.
+
+Mon Feb 17 17:45:23 1997  Bob Weiner  <weiner@infodock.com>
+
+       * modes/lisp-mode.el (eval-last-sexp): Do something special if
+       evaluating (interactive ...).
+
+Sun Feb 16 21:49:18 1997  Bjorn Victor  <Bjorn.Victor@DoCS.UU.SE>
+
+       * utils/facemenu.el (facemenu-adjust-face-sizes): Strip size when
+       face is neither nil nor cons.
+
+Sun Feb 16 14:26:03 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/loadup.el: Try not dumping font.elc.
+
+       * prim/obsolete.el (display-column-mode): Remove column.el and
+       leave a forwarding address.
+
+Sat Feb 15 23:21:11 1997  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * prim/minibuf.el (read-from-minibuffer): Don't put evaluated
+       expressions in the minibuffer history list.
+
+Sat Feb 15 22:57:11 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/scroll-in-place.el (scroll-signal-boundary-error):
+       Allow user to suspend error signals.
+
+Sat Feb 15 21:43:49 1997  John Turner  <turner@branagh.ta52.lanl.gov>
+
+       * packages/column.el (current-line): Correct defaults for starting
+       at 1, remove an obsolete variable.
+
+Sat Feb 15 20:17:46 1997  Hal Peterson  <hrp@netstar.com>
+
+       * packages/vc.el (vc-backend-print-log): Change `cvs rlog' to
+       `cvs log'
+
+Mon Feb 17 02:01:27 1997  Hrvoje Niksic  <hniksic@bjesomar.srce.hr>
+
+       * utils/edmacro.el (edmacro-format-keys): Would bug out on empty
+       macro.
+
+Mon Feb 17 02:01:27 1997  Hrvoje Niksic  <hniksic@bjesomar.srce.hr>
+
+       * utils/edmacro.el (edmacro-format-keys): Would bug out on empty
+       macro.
+       (edmacro-fix-menu-commands): Would bug out on 'control, etc.
+       (edmacro-events-to-keys): New function.
+       (edmacro-format-keys): Use it.
+       (edmacro-finish-edit): Compare to macros, not strings.
+       (edmacro-fkeys): New function.
+       (edmacro-format-keys): Use it.
+       (edit-kbd-macro): Tweak.
+
+Sat Feb 15 13:58:14 1997  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * packages/info.el: Don't call switch-to-buffer if the Info frame
+       is being deleted.
+
+Sat Feb 15 12:07:46 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/simple.el (previous-line): Allow escape from signaled error
+       on buffer boundary.
+       (next-line): Ditto.
+
+Sat Feb 15 11:05:29 1997  Kyle Jones  <kyle_jones@wonderworks.com>
+       * utils/redo.el: made before and after status messages so that
+       the user is aware if a long action is still being processed.
+       
+       rolled version number up to 1.00, since the package seems to be
+       stable.
+
+       cosmetic changes so the file could be included in the XEmacs
+       distribution.
+       
+Sat Feb 15 11:13:05 1997  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * prim/simple.el (line-move-ignore-invisible): Change default to
+       t.
+
+Sat Feb 15 01:04:21 1997  Hrvoje Niksic  <hniksic@bjesomar.srce.hr>
+
+       * prim/macros.el: Removed.  Superseded by new version in
+       edmacro.el.
+
+Fri Feb 14 23:29:16 1997  Adrian Aichner  <aichner@ecf.teradyne.com>
+
+       * modes/executable.el (executable-set-magic): Correct for the #!
+       getting lost.
+
+Fri Feb 14 23:10:58 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/modeline.el (modeline-modified-map): Call
+       vc-toggle-read-only instead of toggle-read-only to be consistent
+       with override of `C-x C-q'.
+
+Fri Feb 14 16:11:10 1997  Jonathon Edwards  <edwards@intranet.com>
+
+       * packages/blink-cursor.el (blink-cursor-post-command-hook): stop
+       cursor blink momentarily after receiving user input.
+
+Fri Feb 14 15:26:38 1997  Jacques Duthen  <duthen@club-internet.fr>
+
+       * x11/x-menubar.el (default-menubar): mine goes into games menu.
+
+Thu Feb 13 22:16:09 1997  Michael Sperber  <sperber@informatik.uni-tuebingen.de>
+
+       * prim/files.el (recover-session-finish): Modify for efs.
+
+Thu Feb 13 21:23:07 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/files.el (file-remote-p): New function.
+
+       * sunpro/sunpro-load.el: Do not dump mime-setup under any
+       circumstances.
+
+Thu Feb 13 17:58:09 1997  Richard Mlynarik  <mly@adoc.xerox.com>
+
+       * prim/obsolete.el (insert-before-markers-and-inherit): Correct
+       typo.
+
+Wed Feb 12 17:48:59 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * comint/gdb.el (gdb-control-c-subjob): Nuke this loser.
+
+Wed Feb 12 13:58:01 1997  Hrvoje Niksic  <hniksic@bjesomar.srce.hr>
+
+       * utils/edmacro.el: New file.
+
+Wed Feb 12 09:00:48 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/sound.el (load-sound-file): Update documentation of
+       restrictions on what machines XEmacs can play sound on.
+
+Tue Feb 11 09:39:25 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/glyphs.el (init-glyphs): Correct autodetection to find
+       GIF89.  Look for PNG.
+
+Mon Feb 10 21:37:54 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/frame.el (show-temp-buffer-in-current-frame): Conditional
+       shrink-to-fit behavior on `temp-buffer-shrink-to-fit'.
+
+       * packages/apropos.el (apropos-print): Ditto.
+
+       * prim/lisp.el (lisp-complete-symbol): Ditto.
+
+       * prim/help.el (with-displaying-help-buffer): Ditto.
+
+Mon Feb 10 20:58:19 1997  Hrvoje Niksic  <hniksic@bjesomar.srce.hr>
+
+       * x11/x-toolbar.el: Allow customization of toolbar functions by
+       customizable variables.
+
+Mon Feb 10 14:58:05 1997  Greg Klanderman  <greg@alphatech.com>
+
+       * comint/gdb.el (gdb-mode): Correct setting of obsolete hook.
+
+Sun Feb  9 19:55:03 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/obsolete.el (define-compatible-variable-alias): New function.
+       (define-compatible-variable-alias): New function.
+       .*mode-line.*, frame-parameters, modify-frame-parameters,
+       x-display-.* all made compatible not obsolete.
+
+       * bytecomp/bytecomp.el (byte-compile-variable-ref): Warn for
+       compatibility symbols.
+       (byte-compile-compatible): New function.
+
+       * bytecomp/bytecomp-runtime.el (make-compatible): New function.
+       (make-compatible-variable): New function.
+
+Sun Feb  9 19:14:25 1997  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * utils/redo.el: New file.
+
+       * utils/floating-toolbar.el: New file.
+
+Sun Feb  9 15:19:46 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * custom/custom.el: Remove ;;;###autoloads since this file is
+       dumped with XEmacs.
+
+Sun Feb  9 00:28:20 1997  Per Abrahamsen  <abraham@dina.kvl.dk>
+
+       * custom/widget.el: New file.
+
+       * custom/widget-example.el: New file.
+
+       * custom/widget-edit.el: New file.
+
+       * custom/custom.el: New file.
+
+       * custom/custom-edit.el: New file.
+
+Fri Feb  7 03:09:32 1997  Alastair Burt <burt@dfki.uni-sb.de>
+
+       * bytecomp/bytecomp.el (byte-compile-insert-header): Correct
+       typo.
+
+Thu Feb  6 17:14:32 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/font-lock.el (font-lock-fontify-keywords-region):
+       Correct bounds checking in case the keywords regexp is not
+       properly anchored.
+
+       * packages/ps-print.el: Update maintainer address.
+
+Thu Feb  6 12:35:39 1997  Bill Dubuque  <wgd@martigny.ai.mit.edu>
+       
+       * cl/cl-macs.el (cl-do-proclaim): Correct addition of bound
+       variables to `byte-compile-bound-variables'.
+
+Thu Feb  6 01:07:56 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * bytecomp/bytecomp.el (byte-compile-warn-about-unused-variables):
+       Reverse previous patch.
+
+       * prim/minibuf.el (use-dialog-box): Rename from
+       should-use-dialog-box.
+       (should-use-dialog-box-p): Use it.
+
+       * bytecomp/bytecomp.el (byte-compile-warn-about-unused-variables):
+       cell is not a cons when the cl declare macro is used.
+
+Wed Feb  5 21:37:13 1997  Hrvoje Niksic  <hniksic@bjesomar.srce.hr>
+
+       * modes/cperl-mode.el: Provide 'cperl-mode.
+
+Tue Feb  4 11:51:25 1997  Greg Klanderman  <greg@alphatech.com>
+
+       * modes/make-mode.el: Remove `makefile-runtime-macros-list' from
+       `makefile-macro-table'.
+
+Tue Feb  4 11:06:33 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/metamail.el (metamail-region): *junet* coding system
+       name changed to 'junet.
+
+Mon Feb  3 22:34:09 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+       * iso/iso-acc.el: Critical Bug fix.
+       Add ISO-8859-3 support to iso-acc.el, as suggested by Dale
+       Gulledge.
+
+Mon Feb  3 17:11:21 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * modes/make-mode.el (makefile-browser-format-macro-line): Remove
+       redundant (and wrong) format statement.
+
+Fri Jan 31 21:38:47 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * psgml/psgml-html.el (html-auto-sgml-entity-conversion): Allow
+       user control over automatic sgml entity to ISO-8859-1 conversion.
+
+Fri Jan 31 09:50:51 1997  Hrvoje Niksic <hniksic@srce.hr>
+
+       * x11/x-toolbar.el (toolbar-mail-commands-alist): Updated with a
+       lot of new mailer possiblities.
+       
+Fri Jan 31 09:28:49 1997  Martin Buchholz  <mrb@eng.sun.com>
+
+       * x11/x-font-menu.el (reset-device-font-menus): Correct guard on
+       charset-registry call.
+
+Fri Jan 31 00:21:07 1997  Darrell Kindred  <dkindred@cmu.edu>
+
+       * packages/font-lock.el (font-lock-mode): Don't remove the
+       `font-lock-pre-idle-hook' from `pre-idle-hook'.
+
+Thu Jan 30 22:43:43 1997  David Moore  <dmoore@UCSD.EDU>
+
+       * packages/compile.el:  Speed up regexps.
+       (compilation-parse-errors): replace re-search-forward with
+       something faster.
+       
+Thu Jan 30 20:33:56 1997  Hvoje Niksic  <hniksic@srce.hr>
+
+       * x11/x-toolbar.el
+       (toolbar-open,toolbar-dired,toolbar-save,toolbar-print,toolbar-cut,toolbar-copy,toolbar-paste,toolbar-undo,toolbar-replace):
+       New functions.
+       (toolbar-news): Allow running without separate frame.
+       (toolbar-mail-commands-alist): New variable.
+       (toolbar-mail-reader): Ditto.
+       (toolbar-mail): Use them.
+       
+       * x11/x-menubar.el: Shorten help menu item names.
+
+Thu Jan 30 17:22:15 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
+
+       * iso/iso-acc.el: Accept accents in isearch.
+
+Wed Jan 29 22:25:38 1997  Tomasz J. Cholewo <tjchol01@mecca.spd.louisville.edu>
+
+       * packages/ps-print.el: Make postscript files generated by
+       ps-print conformant to Adobe DSC specification.
+
+Mon Jan 27 21:45:17 1997  Tomasz J. Cholewo  <tjchol01@mecca.spd.louisville.edu>
+
+       * dired/ange-ftp.el (ange-ftp-write-region): Changes for jka-compr.
+
+       * packages/jka-compr.el (jka-compr-write-region): Convert to 20.0
+       write-region interface.
+
+Mon Jan 27 19:09:28 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/about.el (about-xemacs): Updated to reflect change of
+       management.
+
+Mon Jan 27 13:25:17 1997  William M. Perry <wmperry@aventail.com>
+
+       * packages/man.el (Manual-entry-switches): Don't default to -s.
+
+Sun Jan 26 16:27:49 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * bytecomp/byte-optimize.el (byte-compile-inline-expand):
+       Correctly refresh the pointer to a symbol being autoloaded prior
+       to inline.
+
+Sun Jan 26 13:57:22 1997  Bob Weiner <weiner@infodock.com>
+
+       * prim/about.el (about-xemacs-xref): Update bio.
+
+Sat Jan 25 22:58:15 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * x11/x-menubar.el (default-menubar): Update ps-paper-type options
+       for new ps-print.el.
+
+Thu Jan 23 01:40:53 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * psgml/psgml-html.el (html-mode): Set up friendlier syntax
+       table.
+
+       * psgml/psgml.el (sgml-running-xemacs): Remove
+       sgml-mode-syntax-table since it has been superseded.
+
+Thu Jan  9 13:32:01 1997  Jacques Duthen Prestataire  <duthen@cegelec-red.fr>
+
+       * ps-print.el: Merge patch from [simon] Oct 8, 1996 Simon Marshall
+       <simon@gnu.ai.mit.edu>
+       (ps-print-version): Fix value.
+       (cl lisp-float-type): Require them.
+       (ps-number-of-columns ps-*-font-size): Try to select defaults
+       better suited when `ps-landscape-mode' is non-nil. 
+       (ps-*-faces): Change default for Font Lock mode faces when
+       `ps-print-color-p' is nil. 
+       (ps-right-header): Replace `time-stamp-yy/mm/dd'
+       by `time-stamp-mon-dd-yyyy'. 
+       (ps-end-file ps-begin-page): Fix bug in page count for Ghostview. 
+       (ps-generate-postscript-with-faces): Replace `ps-sorter' by
+       `car-less-than-car'.  
+       (ps-plot ps-generate): Replace `%d' by `%3d'.  
+
+Wed Jan 22 15:32:39 1997  Greg Klanderman  <greg@alphatech.com>
+
+       * modes/rsz-minibuf.el (resize-minibuffer-setup): Resize the
+       minibuffer earlier than the first received event.
+
+Wed Jan 22 15:29:08 1997  Barry A. Warsaw  <bwarsaw@CNRI.Reston.VA.US>
+
+       * modes/imenu.el (imenu-add-to-menubar): Don't attempt anything if
+       menu-bar lookup fails.
+
+Wed Jan 22 01:03:42 1997  Martin Buchholz  <mrb@eng.sun.com>
+
+       * x11/x-font-menu.el: Make font menus work better in a
+       Japanese environment.
+
+Tue Jan 21 19:56:26 1997  Martin Buchholz  <mrb@eng.sun.com>
+
+       * mule/mule-init.el (init-mule): Get Japanese man pages working.
+
+Fri Jan 17 17:22:54 1997  Hrvoje Niksic  <hniksic@bjesomar.srce.hr>
+       * man.el (Manual-mode): Don't mess with scrollbars if they aren't
+       present.
+
+Tue Jan 21 19:52:45 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * utils/timezone.el (timezone-parse-date): Fix Y2K bug.
+
+Tue Jan 21 19:32:44 1997  Barry A. Warsaw  <bwarsaw@anthem.cnri.reston.va.us>
+
+       * prim/files.el (hack-local-variables-prop-line): XEmacs should
+       not query to set local variables in the -*- line if there aren't
+       any to set!
+
+Thu Jan 16 18:24:20 1997  Steven L Baur  <steve@miranova.com>
+
+       * psgml/psgml.el: Use newer interface form for nsgmls.
+
+Thu Jan 16 04:06:24 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * comint/telnet.el (rsh): (Mostly) correct dealing with detection
+       of password prompt at login.
+
+Thu Jan 16 03:28:25 1997  Martin Buchholz  <mrb@eng.sun.com>
+
+       * modes/view.el (View-scroll-lines-forward): Correct format typo.
+
+Mon Jan 13 22:50:23 1997  David Moore  <dmoore@UCSD.EDU>
+
+       * packages/compile.el: Clean up regexps.
+
+Sun Jan 12 20:50:08 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * modes/m4-mode.el: Changed m4-program to point to /usr/bin/m4.
+
+Sun Jan 12 18:49:30 1997   \e$B<i2,\e(B \e$BCNI'\e(B/MORIOKA Tomohiko  <morioka@jaist.ac.jp>
+
+       * mule/mule-misc.el: `-columns' -> `-width' and define `-columns'
+       alias
+       Import definition of `truncate-string-to-width' from Emacs/mule-delta.
+
+Sun Jan 12 13:57:11 1997  Kyle Jones  <kyle_jones@wonderworks.com>
+
+       * prim/window.el (shrink-window-if-larger-than-buffer): Don't let
+       readjusted window change the buffer order stack.
+
+Sat Jan 11 20:12:47 1997  Vinnie Shelton  <shelton@icd.teradyne.com>
+
+       * utils/finder.el (finder-insert-at-column): Correct off-by-one
+       error affecting long file names.
+
+Fri Jan 10 22:27:58 1997  Shane Holder  <holder@rsn.hp.com>
+
+       * utils/bench.el:  New version.
+
+Fri Jan 10 13:22:26 1997  Christoph Wedler  <wedler@fmi.uni-passau.de>
+
+       * packages/man.el (Manual-entry-switches): New variable.
+       (Manual-apropos-switches): New variable.
+       (Manual-run-formatter): Use them.
+
+Thu Jan  9 22:04:42 1997  Greg Klanderman  <greg@alphatech.com>
+
+       * modes/make-mode.el: Allow disabling of suspicious line warnings
+       allow macro pickup when a macro is entered normally
+       add the runtime macros to the completion list so confirmation is
+       not necessary when minibuffer-confirm-incomplete is t.
+       (these last two only in effect when makefile-electric-keys=t)
+
+Thu Jan  9 11:44:11 1997  Martin Buchholz  <mrb@eng.sun.com>
+
+       * mule/mule-files.el (file-coding-system-alist): Default to 8 bit
+       on .el and .info files.
+
+Wed Jan  8 20:57:16 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/help.el (help-mode-quit): Correct typo in docstring.
+       (help-mode-quit): Bury help buffer before restoring previous
+       window configuration.
+
+Wed Jan  8 20:20:01 1997  Joe Nuspl  <nuspl@nvwls.cc.purdue.edu>
+
+       * x11/x-menubar.el (default-menubar): Include enriched.doc in the
+       samples in the help menu.
+
+Wed Jan  8 20:09:32 1997  Jens Krinke  <krinke@ips.cs.tu-bs.de>
+
+       * x11/x-toolbar.el (toolbar-news-frame-properties): New variable.
+       (toolbar-news): Use it.
+
+Wed Jan  8 10:11:35 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * x11/x-compose.el (global-map): Keysyms use `-' not `_'.
+
+Mon Jan  6 18:19:03 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * comint/telnet.el (telnet-initial-filter): Enable
+       case-fold-search.
+       (telnet-maximum-count): Bump up to 6, since 4 does not always
+       appear to be enough.
+
+Mon Jan  6 08:30:55 1997  Andrew Cohen  <cohen@andy.bu.edu>
+
+       * psgml/psgml-parse.el (sgml-compile-dtd): noconv coding system
+       has been renamed to no-conversion.
+       (sgml-bdtd-merge): Ditto.
+       (sgml-push-to-entity): Ditto.
+
+Sun Jan  5 14:35:30 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * utils/loadhist.el (symbol-file): Make interactive.
+
+Sun Jan  5 00:40:02 1997  Bob Weiner  <weiner@infodock.com>
+
+       * packages/avoid.el (mouse-avoidance-mode): autoload.
+
+       * x11/x-menubar.el (options-menu-saved-forms): Mouse avoidance
+       mode option.
+
+Sat Jan  4 12:25:34 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/faces.el (init-other-random-faces): Guard against adding
+       modeline buffer tty face if no tty support.
+
+Fri Jan  3 23:15:22 1997  Greg Klanderman  <greg@alphatech.com>
+
+       * packages/backup-dir.el: Added to distribution.
+
+Fri Jan  3 16:20:42 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * gnus/gnus-setup.el: Updated to gracefully handle installed
+       auxilliary packages like tm, and handle eventual integration of
+       Red Gnus/Gnus 5.4.
+
+Fri Jan  3 14:32:07 1997  Vinnie Shelton  <shelton@icd.teradyne.com>
+
+       * packages/gnuserv.el (gnuserv-frame): Autoload.
+
+       * x11/x-menubar.el (default-menubar): Add option to control gnuserv
+       creating a new frame.
+       (options-menu-saved-forms): Ditto.
+
+Fri Jan  3 12:18:41 1997  Martin Buchholz  <mrb@eng.sun.com>
+
+       * x11/x-mouse.el: Protect creation of scrollbar-pointer-glyph with
+       feature test on 'scrollbar.
+
+Fri Jan  3 10:37:48 1997  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/mic-paren.el (paren-activate): Update to v1.2.
+
+Fri Jan  3 10:21:58 1997  Pete Ware  <ware@cis.ohio-state.edu>
+
+       * x11/x-menubar.el (default-menubar): Add require-final-newline
+       and next-line-add-newlines as options in the options menu.
+       (options-menu-saved-forms): Ditto.
+
+Thu Jan  2 18:52:32 1997  Joel Peterson  <tarzan@aosi.com>
+
+       * prim/simple.el (blink-matching-open): Make sure point is visible
+       when blinking.
+
+Thu Jan  2 11:25:05 1997  Vinnie Shelton  <shelton@icd.teradyne.com>
+
+       * prim/replace.el (occur-mode-mouse-goto): Fix typo in Emacs 19.34
+       synch up.
+       (occur-mode-map): Ditto.
+
+Wed Nov 20 19:40:05 1996  Lennart Staflin  <lenst@lysator.liu.se>
+
+       * psgml-parse.el (sgml-modify-dtd): set sgml-current-tree to
+       sgml-top-tree. Needed by sgml-open-element.
+
+Mon Nov 11 01:50:40 1996  Lennart Staflin  <lenst@lysator.liu.se>
+
+       * Version 1.0 released.
+
+Sun Sep 15 14:07:24 1996  Lennart Staflin  <lenst@lysator.liu.se>
+
+       * psgml.el (sgml-mode): modify mode-line-format with subst, don't
+       replicate the whole format in the code.
+
+Thu Sep 12 20:27:38 1996  Lennart Staflin  <lenst@lysator.liu.se>
+
+       * psgml-parse.el (sgml-external-file): Try to find system
+       identifiers using the sgml-public-map
+       if sgml-system-identifiers-are-preferred; this way that flag will
+       have effect even if the sgml-public-map contains `%s'.
+       (sgml-final): moved to be defined before use.
+
+       * psgml-dtd.el (sgml-parse-parameter-literal): Try to handle
+       character references to character number above 255 by leaving a
+       character reference in then parsed entity text.
+
+Thu Sep  5 14:11:00 1996  Dave Love  <d.love@dl.ac.uk>
+
+       * psgml-other.el (sgml-set-face-for): Nullify
+       {after,before}-change-functions as well as (obsolete)
+       {after,before}-change-function.
+
+Tue Dec 31 11:34:37 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * comint/gdb.el (gdb-mode): Require 'cc-mode if not already loaded
+       prior to starting gdb.
+
+Mon Dec 30 17:59:48 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * comint/telnet.el (telnet-check-software-type-initialize): Remove
+       default in cond (which allows special treatment of password prompt
+       to work).
+
+Mon Dec 30 09:36:04 1996  Valdis Kletnieks  <Valdis.Kletnieks@vt.edu>
+
+       * packages/gnuserv.el (server-edit): Add option to allow killing
+       last visible frame.
+
+Sun Dec 29 21:36:44 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/files-nomule.el: Add trailing newline.
+
+Sun Dec 29 18:45:34 1996  James LewisMoss  <dres@dres.elam.org>
+
+       * modes/perl-mode.el: Add (provide 'perl-mode).
+
+Sun Dec 29 17:15:57 1996  Martin Buchholz  <mrb@eng.sun.com>
+
+       * ilisp/Makefile (elc): Be a little smarter about recompilation.
+
+Sun Dec 29 17:14:27 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * tm/tm-edit-tipgp.el: Don't unconditionally require tinypgpa.el.
+
+Sat Dec 28 11:15:55 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * x11/x-menubar.el (default-menubar): Move Frame-local font menu
+       option to Frame Appearance submenu.
+
+Fri Dec 27 20:30:00 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * x11/x-font-menu.el (font-menu-this-frame-only-p): Default to
+       nil, because everyone was confused by it defaulting to t.
+
+Fri Dec 27 12:30:37 1996  Richard Mlynarik  <mly@adoc.xerox.com>
+
+       * prim/sort.el (sort-subr): Document use of `sort-fold-case'.
+       (sort-lines): Ditto.
+       (sort-paragraphs): Ditto.
+       (sort-pages): Ditto.
+       (sort-regexp-fields): Ditto.
+       (sort-numeric-fields): Ditto.
+       (sort-regexp-fields): Ditto.
+       (sort-columns): Ditto.
+       (sort-regexp-fields): Use compare-buffer-substrings if available.
+
+Fri Dec 27 12:09:23 1996  Noah Friedman  <friedman@gnu.ai.mit.edu>
+
+       * modes/mail-abbrevs.el (mail-abbrev-expand-hook): Prevent abbrev
+       expansion from happening multiple times.
+
+Fri Dec 27 02:31:15 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/help.el (help-for-help): Don't confuse help character `b'
+       with scrolling character `b' in view-less help buffer.
+
+       * packages/scroll-in-place.el: Synch with 19.15.
+
+Thu Dec 26 15:25:09 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * x11/x-menubar.el (xemacs-splash-buffer): New function.
+       (default-menubar): Use it.
+       (default-menubar): Reorganize help menus.
+
+       * prim/startup.el (startup-message-timeout): More or less disable
+       the timeout of the splash screen.
+
+       * packages/man.el (Manual-use-rosetta-man): For Neal Becker's
+       Rosetta Man patch.
+       (Manual-nuke-nroff-bs): Use it.
+
+Tue Dec 24 12:46:22 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/frame.el (show-temp-buffer-in-current-frame): Shrink temp
+       buffer to fit.
+
+Mon Dec 23 15:44:49 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * utils/delbackspace.el: Correct rebindings so they work properly
+       when cc-mode is not dumped with XEmacs.
+
+       * packages/apropos.el (apropos-print): Minimize size of *Apropos*
+       window if it is small.
+
+       * prim/lisp.el (lisp-complete-symbol): Minimize size of
+       *Completions* window.
+
+       * prim/help.el (with-displaying-help-buffer): (Based on an idea
+       from Sudish Joseph) minimize size of displayed help window.
+
+       * modes/fortran.el (fortran-window-create-momentarily): Fix
+       lossage from synch with Emacs 19.34.
+       (fortran-abbrev-start): Ditto.
+
+Sun Dec 22 15:33:25 1996  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * x11/x-toolbar.el (toolbar-news): Check whether this is the last
+       frame before deleting it.
+
+Sun Dec 22 00:37:42 1996  Sudish Joseph  <sudish@mindspring.com>
+
+       * eterm/tgud.el (tgud-gdb-complete-filter): Match carriage returns
+       as well as linefeeds.
+
+       * eterm/term.el (term-dynamic-list-completions): Correct Emacsism
+       in setting unread-command-events.
+
+Sat Dec 21 23:37:02 1996  Bob Weiner  <weiner@infodock.com>
+
+       * packages/font-lock.el: Update Java support.
+
+Sat Dec 21 22:48:59 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/fontl-hooks.el: Add provide (synch with 19.15).
+
+       * x11/x-toolbar.el: Don't quote lambda macro.
+
+       * packages/session.el: Removed from distribution.
+
+Sat Dec 21 22:37:37 1996  Neal Becker  <neal@ctd.comsat.com>
+
+       * pcl-cvs/pcl-cvs.el: Synched with pcl-cvs.el from cvs-1.9.
+
+Fri Dec 20 15:19:36 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/compile.el (compilation-error-regexp-alist): Complete
+       fix for lossage on bad regexps.
+
+       * prim/loadup.el: Remove cc-mode as a dumped package.
+
+       * prim/glyphs.el (init-glyphs): hscroll-glyph is now builtin.
+
+       * prim/minibuf.el (minibuffer-complete-word): Correct an ebola
+       infection that caused incorrect interpretation of SPC in the
+       minibuffer.
+
+Thu Dec 19 22:16:47 1996  Heiko Muenkel  <muenkel@tnt.uni-hannover.de>
+
+       * modes/outl-mouse.el (outline-glyph-menu): Remove Hide body item,
+       Add Show all item.
+
+Thu Dec 19 00:37:59 1996  Bart Robinson <lomew@cs.utah.edu>
+
+       * prim/files.el: Make enable-local-variables 'ask-me behave sanely.
+
+Wed Dec 18 23:10:15 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/simple.el (next-line-add-newlines): Now defaults to nil.
+
+Wed Dec 18 22:56:48 1996  Hrvoje Niksic  <hniksic@srce.hr>
+
+       * utils/bench.el (bench-mark-13): Added.
+
+Wed Dec 18 20:26:10 1996  Martin Buchholz  <mrb@eng.sun.com>
+
+       * mule/mule-coding.el: Change charset names.
+
+       * mule/japanese-hooks.el: Change charset names.
+
+       * mule/hebrew-hooks.el: Change charset names.
+       Remove quail hooks.
+
+       * mule/greek-hooks.el: Change charset names.
+       Remove quail hooks.
+
+       * mule/european-hooks.el ((make-char 'latin-iso8859-1 32)): Change
+       charset names.
+       Remove quail hooks.
+
+       * mule/cyrillic-hooks.el (cyrillic-iso8859-5): Use instead of cyrillic.
+       Remove quail hooks.
+
+       * mule/chinese-hooks.el (chinese-gb2312): Fix chinese syntax tables.
+       Use chinese-gb2312.
+       Remove quail hooks.
+       (chinese): Comment out code for egg.
+
+       * mule/thai-hooks.el: Use thai-tis620.
+       (thai): Prefer macro definition of lambda.
+
+       * sunpro/sunpro-init.el (sunpro-startup): Guard against Sun
+       censorship.
+
+       * prim/obsolete.el (wholenump): New obsolete alias.
+
+       * prim/simple.el (comment-indent-function): Use macro definition
+       of (lambda () ...).
+
+       * prim/replace.el (list-matching-lines): Remove redundant
+       (message (format ...))
+
+       * modes/cc-mode.el: Readd autoloads (prior to removing cc-mode as
+       a dumped package).
+
+Wed Dec 18 11:09:45 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * comint/telnet.el: Synch up to 19.15 & Emacs 19.34.
+       (telnet-check-software-type-initialize): Cleanup from Synch.
+
+Sat Dec 14 17:39:17 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/buff-menu.el (list-buffers-directory): autoload.
+
+Fri Dec 13 16:53:14 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * electric/ebuff-menu.el (electric-buffer-list): Restore behavior
+       of using prefix argument.
+
+       * emulators/crisp.el (crisp-mode-map): Rename kp_.* keysyms to
+       kp-\1.
+
+       * emulators/tpu-edt.el: Ditto.
+
+       * x11/x-win-sun.el: Ditto.
+
+       * x11/x-iso8859-1.el: Ditto.
+
+       * term/tvi970.el: Ditto.
+
+       * term/news.el: Ditto.
+
+       * term/lk201.el: Ditto.
+
+       * term/linux.el: Ditto.
+
+       * prim/keydefs.el: Ditto.
+
+       * prim/events.el: Ditto.
+
+       * packages/icomplete.el (icomplete-get-keys): Ditto.
+
+       * games/gomoku.el (gomoku-mode-map): Ditto.
+
+       * games/blackbox.el (blackbox-mode-map): Ditto.
+
+Fri Dec 13 09:40:27 1996  Sudish Joseph  <sudish@mindspring.com>
+
+       * prim/minibuf.el (next-history-element): Remove kludge test on
+       minibuffer-history-sexp-flag.
+
+       * x11/x-init.el (init-post-x-win): Fix hooks for gnuattached ttys
+       on XEmacsen started on X displays.
+
+Thu Dec 12 16:05:53 1996  Raymond Toy  <toy@rtp.ericsson.se>
+
+       * ilisp/ilisp-out.el (ilisp-find-lower-window): Correct XEmacs
+       version check to look at major numbers.
+       (ilisp-find-top-left-most-window): Ditto.
+
+Thu Dec 12 15:21:43 1996  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+       * utils/mail-extr.el (mail-extract-address-components): Don't
+       automatically downcase extracted elements.  It violates standards.
+
+Thu Dec 12 14:46:47 1996  Christoph Wedler  <wedler@fmi.uni-passau.de>
+
+       * x11/x-menubar.el (buffers-menu-filter): The buffer menu was
+       shortened to `buffers-menu-max-size' items even if
+       `buffers-menu-submenus-for-groups-p' is non-nil.
+
+       Let `buffers-menu-submenus-for-groups-p' be an integer : if there
+       are more buffers than this value, use submenus, otherwise not.
+       
+       * packages/vc.el (vc-rename-this-file): New function (was missing,
+       but referred to on the menubar).
+
+       * packages/compile.el (compilation-font-lock-keywords): `defvar'
+       instead of `defconst'!
+
+       * prim/mouse.el (default-mouse-track-normalize-point): Double
+       click mouse-1 on sexpr selects the sexpr.
+
+       * x11/x-menubar.el (options-menu-saved-forms): Fix bug in
+       `save-options-menu-settings'.
+
+Thu Dec 12 14:25:21 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/simple.el (forward-to-indentation): Do not deactivate zmacs
+       region on usage.
+       (backward-to-indentation): Ditto.
+
+Thu Dec 12 14:22:55 1996  Christoph Wedler  <wedler@fmi.uni-passau.de>
+
+       * prim/lisp.el (backward-up-list): Do not deactivate zmacs region
+       on usage.
+
+Wed Dec 11 20:26:21 1996  Barry A. Warsaw  <bwarsaw@CNRI.Reston.VA.US>
+
+       * prim/files.el (set-auto-mode): Require a #! signature to set
+       mode based on interpreter.
+
+Wed Dec 11 13:25:50 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/man.el (Manual-use-rosetta-man): Restore Neal Becker's
+       Rosetta Man Patch.
+       (Man-cleanup-manpage): Use it.
+
+       * prim/simple.el (yank): Corrected a mistaken synch with Emacs
+       19.34.
+
+       * modes/eiffel3.el (eiffel-mode-syntax-table): Quote the semicolon
+       syntax entry so update-autoloads doesn't barf.
+
+       * packages/buff-menu.el (Buffer-menu-mode-map): Correct mouse key
+       bindings.
+
+Tue Dec 10 21:24:04 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/ps-print.el (ps-do-despool): Allow dynamic expansion of
+       `ps-lpr-switches'.
+
+       * packages/lpr.el (print-region-1): Allow dynamic expansion of
+       `lpr-switches'.
+
+Tue Dec 10 18:30:01 1996  Rod Whitby  <rwhitby@asc.sps.mot.com>
+
+       * modes/vhdl-mode.el: New File.
+
+Tue Dec 10 17:59:35 1996  Shane Holder  <holder@rsn.hp.com>
+
+       * utils/bench.el: New file.  Utility for benchmarking emacs
+       performance.
+
+Tue Dec 10 10:11:55 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * electric/ebuff-menu.el (electric-buffer-menu-mode-map): Correct
+       bad 19.34 synch patch.
+       
+       * utils/pretty-print.el: New File.
+
+Sun Dec  8 13:59:40 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/files-nomule.el: Documentation corrections.
+
+       * prim/files.el: Synch to 19.15/Emacs 19.34.
+
+Sat Dec  7 18:48:34 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * packages/hexl.el (hexl-mode-map): Corrected obsolescent key
+       names introduced in 19.15-b2.
+
+Fri Dec  6 20:17:47 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * games/yow.el: Sync to GNU Emacs 19.34.
+
+       * games/studly.el: Documentation fixes.
+
+       * games/spook.el: Sync to GNU Emacs 19.34.
+
+       * games/mpuz.el: Sync to GNU Emacs 19.34.
+
+       * games/life.el: Sync to GNU Emacs 19.34.
+
+       * games/hanoi.el: Sync to GNU Emacs 19.34.
+
+       * games/flame.el: Documentation fixes.
+
+       * games/dunnet.el: Sync to GNU Emacs 19.34.
+
+       * games/doctor.el: Sync to GNU Emacs 19.34.
+
+       * games/dissociate.el: Sync to GNU Emacs 19.34.
+
+       * games/cookie1.el: Sync to GNU Emacs 19.34.
+
+       * games/conx.el: Documentation fixes.
+
+       * games/blackbox.el: Sync to GNU Emacs 19.34.
+
+       * games/NeXTify.el: Documentation fixes.
+
+       * packages/man.el: New file/replacement from Emacs 19.34.
+
+       * packages/man-xref.el: New file from Emacs 19.35.
+
+       * utils/smtpmail.el: New file from Emacs 19.34.
+
+Fri Dec  6 09:28:04 1996  \e$B<i2,\e(B \e$BCNI'\e(B/MORIOKA Tomohiko <morioka@jaist.ac.jp>
+
+       * prim/startup.el (set-default-load-path): Set default-load-path
+       dynamically since file-detect.el is dumped with XEmacs.
+
+Thu Dec  5 20:37:32 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * emulators/tpu-mapper.el: Total replacement with version in GNU
+       Emacs 19.34.
+
+       * emulators/tpu-extras.el: Total replacement with version in GNU
+       Emacs 19.34.
+
+       * emulators/tpu-edt.el: Total replacement with version in GNU Emacs
+       19.34.
+
+       * comint/history.el: Documentation fixes.
+
+       * comint/gdb.el: Documentation fixes.
+
+       * comint/dbx.el: Documentation fixes.
+
+       * comint/background.el: Documentation fixes.
+
+       * rmail/rmail-xemacs.el: Documentation fixes.
+
+       * rmail/rmail-kill.el: Documentation fixes.
+
+       * emulators/ws-mode.el: Synch up to Emacs 19.34.
+
+       * emulators/teco.el: Documentation cleanup.
+
+       * emulators/mlsupport.el: Synch up to Emacs 19.34.
+
+       * emulators/mlconvert.el: Synch up to Emacs 19.34.
+
+       * emulators/edt-vt100.el: New file from Emacs 19.34.
+
+       * emulators/edt-pc.el: New file from Emacs 19.34.
+
+       * emulators/edt-mapper.el: New file from Emacs 19.34.
+
+       * emulators/edt-lk201.el: New file from Emacs 19.34.
+
+       * emulators/edt.el: Synched up to Emacs 19.34.
+
+Thu Dec  5 12:09:19 1996  Lars Magne Ingebrigtsen  <larsi@ifi.uio.no>
+
+       * prim/replace.el (match-string): Use a function instead of a
+       macro to be compatible with .elc files compiled under Emacs.
+
+Thu Dec  5 09:50:12 1996  Bob Weiner <weiner@infodock.com>
+
+       * utils/id-select.el: New file -- Version 1.4.3.
+
+Thu Dec  5 09:17:53 1996  Gary D. Foster  <Gary.Foster@corp.sun.com>
+
+       * emulators/crisp.el: New file.
+
+       * emulators/scroll-lock.el: New file.
+
+Thu Dec  5 00:15:59 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * prim/help.el: A callable library-type function should not
+       contain an unprotected print statement.  This change implements my
+       version of Erik Naggum's statement about locate-library being less
+       chatty in Emacs 19.35.
+
+Wed Dec  4 22:00:49 1996  Steven L Baur  <steve@altair.xemacs.org>
+
+       * utils/flow-ctrl.el: Synch up to Emacs 19.34.
+
+       * utils/forms.el: Synch up to Emacs 19.34.
+
+       * packages/column.el: Allow column numbers to start at one.
+
+       * prim/userlock.el: Synch up to Emacs 19.34.
+
+       * prim/paragraphs.el: Synch up to Emacs 19.34.
+
+       * prim/page.el: Synch up to Emacs 19.34.
+
+       * prim/options.el: Synch up to Emacs 19.34.
+
+       * prim/novice.el: Synch up to Emacs 19.34.
+
+       * prim/rect.el: Sync up to Emacs 19.34.
+
+       * prim/reposition.el: Synch up to Emacs 19.34.
+
+       * prim/replace.el: Synch up to Emacs 19.34.
+
+       * prim/register.el: Synch up to Emacs 19.34.
+
+       * prim/indent.el: Synch up to Emacs 19.34.
+
+       * prim/subr.el: Synch up to Emacs 19.34.
+
+       * prim/simple.el: Synch up to Emacs 19.34.
+
+       * prim/debug.el: Synch up to Emacs 19.34.
+
+       * edebug/cl-specs.el: Comment formatting changes.
+
+       * edebug/cl-read.el: Protect advisement of eval-region from being
+       evaluated more than once.
+
+       Comment formatting changes.
+       
+       * edebug/advise-eval-region.el: New File.  Separate out advise for
+       eval-region so it is only evaluated once.
+
+       * packages/icomplete.el: Fix a bug in locating command bound to key.
+
+       icomplete-exhibit needs to be called in the setup-hook.
+
+       * packages/apropos.el: Correct a typo in button binding. 
+
+       Fixes the bug where if apropos-label-face is actually defined as
+       face, apropos bombs with an error
+
+       Do a (provide 'apropos), like all packages should.
+
+       Provides an apropos-mode-hook for Apropos Mode buffers (otherwise
+       customization is unnecessarily painful).
+
+       Redefines the default faces for the various apropos faces so they
+       come out in color by default (defaults are based on various
+       standard font-lock faces).
+       
+       * version.el: Bumped up to b31.
+       
+
diff --git a/lisp/README b/lisp/README
new file mode 100644 (file)
index 0000000..0edcbc2
--- /dev/null
@@ -0,0 +1,52 @@
+The files in this directory contain source code for the XEmacs
+facilities written in Emacs Lisp.  *.el files are Elisp source, and
+*.elc files are byte-compiled versions of the corresponding *.el
+files.  Byte-compiled files are architecture-independent.
+
+#### Someone please update this.
+
+bogus> When XEmacs starts up, it adds all subdirectories of the
+bogus> site-lisp directory.  The site-lisp directory normally exists
+bogus> only in installation trees.  For more information about the
+bogus> site-lisp directory see the NEWS file.
+
+bogus> After XEmacs adds all subdirectories of the site-lisp
+bogus> directory, it adds all subdirectories of this directory to the
+bogus> load-path (the list of directories to be searched when loading
+bogus> files.)  To speed up this process, this directory has been
+bogus> rearranged to have very few files at the top-level, so that
+bogus> emacs doesn't have to stat() several hundred files to find the
+bogus> dozen or so which are actually subdirectories.
+
+bogus> Directories whose names begin with "-" or "." are not added to
+bogus> the default load-path.
+
+The only files which remain at top-level are those which you might
+reasonably want to alter when installing or customizing XEmacs at your
+site.  The files which may appear at top level are:
+
+       paths.el        You may need to change the default pathnames here,
+                       but probably not.  This is loaded before XEmacs is
+                       dumped.
+
+       site-init.el    To pre-load additional libraries into XEmacs and dump
+                       them in the executable, load them from this file.
+                       Read the instructions in this file for a description
+                       of how to do this.
+
+       site-load.el    This is like site-init.el, but if you want the 
+                       docstrings of your preloaded libraries to be kept in
+                       the DOC file instead of in the executable, you should
+                       load them from this file instead.  To do this, you must
+                       also cause them to be scanned when the DOC file is
+                       generated by editing ../src/Makefile.in.in and
+                       rerunning configure.
+
+       site-start.el   This is loaded each time XEmacs starts up, before the
+                       user's .emacs file.
+
+       default.el      This is loaded each time XEmacs starts up, after the
+                       user's .emacs file, unless .emacs sets the variable
+                       inhibit-default-init to t.
+
+       version.el      This contains the version information for XEmacs.
diff --git a/lisp/abbrev.el b/lisp/abbrev.el
new file mode 100644 (file)
index 0000000..dec62a1
--- /dev/null
@@ -0,0 +1,544 @@
+;;; abbrev.el --- abbrev mode commands for Emacs
+
+;; Copyright (C) 1985, 1986, 1987, 1992, 1997 Free Software Foundation, Inc.
+
+;; Maintainer: XEmacs Development Team
+;; Keywords: abbrev, dumped
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: FSF 19.34 (With some additions)
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; This facility is documented in the Emacs Manual.
+
+;;; Code:
+
+(defgroup abbrev nil
+  "Abbreviation handling, typing shortcuts, macros."
+  :tag "Abbreviations"
+  :group 'editing)
+
+(defgroup abbrev-mode nil
+  "Word abbreviations mode."
+  :group 'abbrev)
+
+;jwz: this is preloaded so don't ;;;###autoload
+(defcustom only-global-abbrevs nil "\
+*Non-nil means user plans to use global abbrevs only.
+Makes the commands to define mode-specific abbrevs define global ones instead."
+  :type 'boolean
+  :group 'abbrev)
+
+;;; XEmacs: the following block of code is not in FSF
+(defvar abbrev-table-name-list '()
+  "List of symbols whose values are abbrev tables.")
+
+(defvar abbrevs-changed nil
+  "Set non-nil by defining or altering any word abbrevs.
+This causes `save-some-buffers' to offer to save the abbrevs.")
+
+(defun make-abbrev-table ()
+  "Return a new, empty abbrev table object."
+  (make-vector 59 0)) ; 59 is prime
+
+(defun clear-abbrev-table (table)
+  "Undefine all abbrevs in abbrev table TABLE, leaving it empty."
+  (fillarray table 0)
+  (setq abbrevs-changed t)
+  nil)
+
+
+(defun define-abbrev-table (name defs)
+  "Define TABNAME (a symbol) as an abbrev table name.
+Define abbrevs in it according to DEFINITIONS, which is a list of elements
+of the form (ABBREVNAME EXPANSION HOOK USECOUNT)."
+  (let ((table (and (boundp name) (symbol-value name))))
+    (cond ((vectorp table))
+          ((not table)
+           (setq table (make-abbrev-table))
+           (set name table)
+           (setq abbrev-table-name-list (cons name abbrev-table-name-list)))
+          (t
+           (setq table (signal 'wrong-type-argument (list 'vectorp table)))
+           (set name table)))
+    (while defs
+      (apply (function define-abbrev) table (car defs))
+      (setq defs (cdr defs)))))
+
+(defun define-abbrev (table name &optional expansion hook count)
+  "Define an abbrev in TABLE named NAME, to expand to EXPANSION or call HOOK.
+NAME and EXPANSION are strings.  Hook is a function or `nil'.
+To undefine an abbrev, define it with an expansion of `nil'."
+  (or (not expansion)
+      (stringp expansion)
+      (setq expansion (signal 'wrong-type-argument
+                              (list 'stringp expansion))))
+  (or (not count)
+      (integerp count)
+      (setq count (signal 'wrong-type-argument
+                          (list 'fixnump count))))
+  (or (vectorp table)
+      (setq table (signal 'wrong-type-argument
+                         (list 'vectorp table))))
+  (let* ((sym (intern name table))
+         (oexp (and (boundp sym) (symbol-value sym)))
+         (ohook (and (fboundp sym) (symbol-function sym))))
+    (unless (and (equal ohook hook)
+                (stringp oexp)
+                (stringp expansion)
+                (string-equal oexp expansion))
+      (setq abbrevs-changed t)
+      ;; If there is a non-word character in the string, set the flag.
+      (if (string-match "\\W" name)
+         (set (intern " " table) nil)))
+    (set sym expansion)
+    (fset sym hook)
+    (setplist sym (or count 0))
+    name))
+
+
+;; Fixup stuff from bootstrap def of define-abbrev-table in subr.el
+(let ((l abbrev-table-name-list))
+  (while l
+    (let ((fixup (car l)))
+      (if (consp fixup)
+          (progn
+            (setq abbrev-table-name-list (delq fixup abbrev-table-name-list))
+            (define-abbrev-table (car fixup) (cdr fixup))))
+      (setq l (cdr l))))
+  ;; These are no longer initialized by C code
+  (if (not global-abbrev-table)
+      (progn
+        (setq global-abbrev-table (make-abbrev-table))
+        (setq abbrev-table-name-list (cons 'global-abbrev-table
+                                           abbrev-table-name-list))))
+  (if (not fundamental-mode-abbrev-table)
+      (progn
+        (setq fundamental-mode-abbrev-table (make-abbrev-table))
+        (setq abbrev-table-name-list (cons 'fundamental-mode-abbrev-table
+                                           abbrev-table-name-list))))
+  (and (eq major-mode 'fundamental-mode)
+       (not local-abbrev-table)
+       (setq local-abbrev-table fundamental-mode-abbrev-table)))
+
+
+(defun define-global-abbrev (name expansion)
+  "Define ABBREV as a global abbreviation for EXPANSION."
+  (interactive "sDefine global abbrev: \nsExpansion for %s: ")
+  (define-abbrev global-abbrev-table
+                 (downcase name) expansion nil 0))
+
+(defun define-mode-abbrev (name expansion)
+  "Define ABBREV as a mode-specific abbreviation for EXPANSION."
+  (interactive "sDefine mode abbrev: \nsExpansion for %s: ")
+  (define-abbrev (or local-abbrev-table
+                     (error "Major mode has no abbrev table"))
+                (downcase name) expansion nil 0))
+
+(defun abbrev-symbol (abbrev &optional table)
+  "Return the symbol representing abbrev named ABBREV.
+This symbol's name is ABBREV, but it is not the canonical symbol of that name;
+it is interned in an abbrev-table rather than the normal obarray.
+The value is nil if that abbrev is not defined.
+Optional second arg TABLE is abbrev table to look it up in.
+The default is to try buffer's mode-specific abbrev table, then global table."
+  (let ((frob (function (lambda (table)
+                (let ((sym (intern-soft abbrev table)))
+                  (if (and (boundp sym)
+                           (stringp (symbol-value sym)))
+                      sym
+                      nil))))))
+    (if table
+        (funcall frob table)
+        (or (and local-abbrev-table
+                 (funcall frob local-abbrev-table))
+            (funcall frob global-abbrev-table)))))
+
+(defun abbrev-expansion (abbrev &optional table)
+  "Return the string that ABBREV expands into in the current buffer.
+Optionally specify an abbrev table as second arg;
+then ABBREV is looked up in that table only."
+  (let ((sym (abbrev-symbol abbrev table)))
+    (if sym
+        (symbol-value sym)
+        nil)))
+
+(defun unexpand-abbrev ()
+  "Undo the expansion of the last abbrev that expanded.
+This differs from ordinary undo in that other editing done since then
+is not undone."
+  (interactive)
+  (if (or (< last-abbrev-location (point-min))
+          (> last-abbrev-location (point-max))
+          (not (stringp last-abbrev-text)))
+      nil
+    (let* ((opoint (point))
+           (val (symbol-value last-abbrev))
+           (adjust (length val)))
+      ;; This isn't correct if (symbol-function last-abbrev-text)
+      ;;  was used to do the expansion
+      (goto-char last-abbrev-location)
+      (delete-region last-abbrev-location (+ last-abbrev-location adjust))
+      (insert last-abbrev-text)
+      (setq adjust (- adjust (length last-abbrev-text)))
+      (setq last-abbrev-text nil)
+      (if (< last-abbrev-location opoint)
+          (goto-char (- opoint adjust))
+          (goto-char opoint)))))
+
+\f
+
+(defun insert-abbrev-table-description (name human-readable)
+  "Insert before point a full description of abbrev table named NAME.
+NAME is a symbol whose value is an abbrev table.
+If optional 2nd arg HUMAN is non-nil, insert a human-readable description.
+Otherwise the description is an expression,
+a call to `define-abbrev-table', which would
+define the abbrev table NAME exactly as it is currently defined."
+  (let ((table (symbol-value name))
+        (stream (current-buffer)))
+    (message "Abbrev-table %s..." name)
+    (if human-readable
+        (progn
+          (prin1 (list name) stream)
+          ;; Need two terpri's or cretinous edit-abbrevs blows out
+          (terpri stream)
+          (terpri stream)
+          (mapatoms (function (lambda (sym)
+                      (if (symbol-value sym)
+                          (let* ((n (prin1-to-string (symbol-name sym)))
+                                 (pos (length n)))
+                            (princ n stream)
+                            (while (< pos 14)
+                              (write-char ?\  stream)
+                              (setq pos (1+ pos)))
+                            (princ (format " %-5S " (symbol-plist sym))
+                                   stream)
+                            (if (not (symbol-function sym))
+                                (prin1 (symbol-value sym) stream)
+                              (progn
+                                (setq n (prin1-to-string (symbol-value sym))
+                                      pos (+ pos 6 (length n)))
+                                (princ n stream)
+                                (while (< pos 45)
+                                  (write-char ?\  stream)
+                                  (setq pos (1+ pos)))
+                                (prin1 (symbol-function sym) stream)))
+                            (terpri stream)))))
+                    table)
+          (terpri stream))
+        (progn
+          (princ "\(define-abbrev-table '" stream)
+          (prin1 name stream)
+          (princ " '\(\n" stream)
+          (mapatoms (function (lambda (sym)
+                      (if (symbol-value sym)
+                          (progn
+                            (princ "    " stream)
+                            (prin1 (list (symbol-name sym)
+                                         (symbol-value sym)
+                                         (symbol-function sym)
+                                         (symbol-plist sym))
+                                   stream)
+                            (terpri stream)))))
+                    table)
+          (princ "    \)\)\n" stream)))
+    (terpri stream))
+  (message ""))
+;;; End code not in FSF
+
+(defun abbrev-mode (arg)
+  "Toggle abbrev mode.
+With argument ARG, turn abbrev mode on iff ARG is positive.
+In abbrev mode, inserting an abbreviation causes it to expand
+and be replaced by its expansion."
+  (interactive "P")
+  (setq abbrev-mode
+       (if (null arg) (not abbrev-mode)
+         (> (prefix-numeric-value arg) 0)))
+  ;; XEmacs change
+  (redraw-modeline))
+
+\f
+(defvar edit-abbrevs-map nil
+  "Keymap used in edit-abbrevs.")
+(if edit-abbrevs-map
+    nil
+  (setq edit-abbrevs-map (make-sparse-keymap))
+  ;; XEmacs change
+  (set-keymap-name edit-abbrevs-map 'edit-abbrevs-map)
+  (define-key edit-abbrevs-map "\C-x\C-s" 'edit-abbrevs-redefine)
+  (define-key edit-abbrevs-map "\C-c\C-c" 'edit-abbrevs-redefine))
+
+(defun kill-all-abbrevs ()
+  "Undefine all defined abbrevs."
+  (interactive)
+  (let ((tables abbrev-table-name-list))
+    (while tables
+      (clear-abbrev-table (symbol-value (car tables)))
+      (setq tables (cdr tables)))))
+
+(defun insert-abbrevs ()
+  "Insert after point a description of all defined abbrevs.
+Mark is set after the inserted text."
+  (interactive)
+  (push-mark
+   (save-excursion
+    (let ((tables abbrev-table-name-list))
+      (while tables
+       (insert-abbrev-table-description (car tables) t)
+       (setq tables (cdr tables))))
+    (point))))
+
+(defun list-abbrevs ()
+  "Display a list of all defined abbrevs."
+  (interactive)
+  (display-buffer (prepare-abbrev-list-buffer)))
+
+(defun prepare-abbrev-list-buffer ()
+  (save-excursion
+    (set-buffer (get-buffer-create "*Abbrevs*"))
+    (erase-buffer)
+    (let ((tables abbrev-table-name-list))
+      (while tables
+       (insert-abbrev-table-description (car tables) t)
+       (setq tables (cdr tables))))
+    (goto-char (point-min))
+    (set-buffer-modified-p nil)
+    (edit-abbrevs-mode))
+  (get-buffer-create "*Abbrevs*"))
+
+(defun edit-abbrevs-mode ()
+  "Major mode for editing the list of abbrev definitions.
+\\{edit-abbrevs-map}"
+  (interactive)
+  (setq major-mode 'edit-abbrevs-mode)
+  (setq mode-name "Edit-Abbrevs")
+  (use-local-map edit-abbrevs-map))
+
+(defun edit-abbrevs ()
+  "Alter abbrev definitions by editing a list of them.
+Selects a buffer containing a list of abbrev definitions.
+You can edit them and type \\<edit-abbrevs-map>\\[edit-abbrevs-redefine] to redefine abbrevs
+according to your editing.
+Buffer contains a header line for each abbrev table,
+ which is the abbrev table name in parentheses.
+This is followed by one line per abbrev in that table:
+NAME   USECOUNT   EXPANSION   HOOK
+where NAME and EXPANSION are strings with quotes,
+USECOUNT is an integer, and HOOK is any valid function
+or may be omitted (it is usually omitted)."
+  (interactive)
+  (switch-to-buffer (prepare-abbrev-list-buffer)))
+
+(defun edit-abbrevs-redefine ()
+  "Redefine abbrevs according to current buffer contents."
+  (interactive)
+  (define-abbrevs t)
+  (set-buffer-modified-p nil))
+
+(defun define-abbrevs (&optional arg)
+  "Define abbrevs according to current visible buffer contents.
+See documentation of `edit-abbrevs' for info on the format of the
+text you must have in the buffer.
+With argument, eliminate all abbrev definitions except
+the ones defined from the buffer now."
+  (interactive "P")
+  (if arg (kill-all-abbrevs))
+  (save-excursion
+   (goto-char (point-min))
+   (while (and (not (eobp)) (re-search-forward "^(" nil t))
+     (let* ((buf (current-buffer))
+           (table (read buf))
+           abbrevs name hook exp count)
+       (forward-line 1)
+       (while (progn (forward-line 1)
+                    (not (eolp)))
+        (setq name (read buf) count (read buf) exp (read buf))
+        (skip-chars-backward " \t\n\f")
+        (setq hook (if (not (eolp)) (read buf)))
+        (skip-chars-backward " \t\n\f")
+        (setq abbrevs (cons (list name exp hook count) abbrevs)))
+       (define-abbrev-table table abbrevs)))))
+
+(defun read-abbrev-file (&optional file quietly)
+  "Read abbrev definitions from file written with `write-abbrev-file'.
+Optional argument FILE is the name of the file to read;
+it defaults to the value of `abbrev-file-name'.
+Optional second argument QUIETLY non-nil means don't print anything."
+  (interactive "fRead abbrev file: ")
+  (load (if (and file (> (length file) 0)) file abbrev-file-name)
+       nil quietly)
+  (setq save-abbrevs t abbrevs-changed nil))
+
+(defun quietly-read-abbrev-file (&optional file)
+  "Read abbrev definitions from file written with write-abbrev-file.
+Optional argument FILE is the name of the file to read;
+it defaults to the value of `abbrev-file-name'.
+Does not print anything."
+  ;(interactive "fRead abbrev file: ")
+  (read-abbrev-file file t))
+
+(defun write-abbrev-file (file)
+  "Write all abbrev definitions to a file of Lisp code.
+The file written can be loaded in another session to define the same abbrevs.
+The argument FILE is the file name to write."
+  (interactive
+   (list
+    (read-file-name "Write abbrev file: "
+                   (file-name-directory (expand-file-name abbrev-file-name))
+                   abbrev-file-name)))
+  (or (and file (> (length file) 0))
+      (setq file abbrev-file-name))
+  (save-excursion
+   (set-buffer (get-buffer-create " write-abbrev-file"))
+   (erase-buffer)
+   (let ((tables abbrev-table-name-list))
+     (while tables
+       (insert-abbrev-table-description (car tables) nil)
+       (setq tables (cdr tables))))
+   (write-region 1 (point-max) file)
+   (erase-buffer)))
+\f
+(defun add-mode-abbrev (arg)
+  "Define mode-specific abbrev for last word(s) before point.
+Argument is how many words before point form the expansion;
+or zero means the region is the expansion.
+A negative argument means to undefine the specified abbrev.
+Reads the abbreviation in the minibuffer.
+
+Don't use this function in a Lisp program; use `define-abbrev' instead."
+  ;; XEmacs change:
+  (interactive "P")
+  (add-abbrev
+   (if only-global-abbrevs
+       global-abbrev-table
+     (or local-abbrev-table
+        (error "No per-mode abbrev table")))
+   "Mode" arg))
+
+(defun add-global-abbrev (arg)
+  "Define global (all modes) abbrev for last word(s) before point.
+The prefix argument specifies the number of words before point that form the
+expansion; or zero means the region is the expansion.
+A negative argument means to undefine the specified abbrev.
+This command uses the minibuffer to read the abbreviation.
+
+Don't use this function in a Lisp program; use `define-abbrev' instead."
+  ;; XEmacs change:
+  (interactive "P")
+  (add-abbrev global-abbrev-table "Global" arg))
+
+(defun add-abbrev (table type arg)
+  ;; XEmacs change:
+  (if (and (not arg) (region-active-p)) (setq arg 0)
+    (setq arg (prefix-numeric-value arg)))
+  (let ((exp (and (>= arg 0)
+                 (buffer-substring
+                  (point)
+                  (if (= arg 0) (mark)
+                    (save-excursion (forward-word (- arg)) (point))))))
+       name)
+    (setq name
+         (read-string (format (if exp "%s abbrev for \"%s\": "
+                                "Undefine %s abbrev: ")
+                              type exp)))
+    (set-text-properties 0 (length name) nil name)
+    (if (or (null exp)
+           (not (abbrev-expansion name table))
+           (y-or-n-p (format "%s expands to \"%s\"; redefine? "
+                             name (abbrev-expansion name table))))
+       (define-abbrev table (downcase name) exp))))
+
+(defun inverse-add-mode-abbrev (arg)
+  "Define last word before point as a mode-specific abbrev.
+With prefix argument N, defines the Nth word before point.
+This command uses the minibuffer to read the expansion.
+Expands the abbreviation after defining it."
+  (interactive "p")
+  (inverse-add-abbrev
+   (if only-global-abbrevs
+       global-abbrev-table
+     (or local-abbrev-table
+        (error "No per-mode abbrev table")))
+   "Mode" arg))
+
+(defun inverse-add-global-abbrev (arg)
+  "Define last word before point as a global (mode-independent) abbrev.
+With prefix argument N, defines the Nth word before point.
+This command uses the minibuffer to read the expansion.
+Expands the abbreviation after defining it."
+  (interactive "p")
+  (inverse-add-abbrev global-abbrev-table "Global" arg))
+
+(defun inverse-add-abbrev (table type arg)
+  (let (name nameloc exp)
+    (save-excursion
+     (forward-word (- arg))
+     (setq name (buffer-substring (point) (progn (forward-word 1)
+                                              (setq nameloc (point))))))
+    (set-text-properties 0 (length name) nil name)
+    (setq exp (read-string (format "%s expansion for \"%s\": "
+                                  type name)))
+    (if (or (not (abbrev-expansion name table))
+           (y-or-n-p (format "%s expands to \"%s\"; redefine? "
+                             name (abbrev-expansion name table))))
+       (progn
+        (define-abbrev table (downcase name) exp)
+        (save-excursion
+         (goto-char nameloc)
+         (expand-abbrev))))))
+
+(defun abbrev-prefix-mark (&optional arg)
+  "Mark current point as the beginning of an abbrev.
+Abbrev to be expanded starts here rather than at beginning of word.
+This way, you can expand an abbrev with a prefix: insert the prefix,
+use this command, then insert the abbrev."
+  (interactive "P")
+  (or arg (expand-abbrev))
+  (setq abbrev-start-location (point-marker)
+       abbrev-start-location-buffer (current-buffer))
+  (let ((e (make-extent (point) (point))))
+    (set-extent-begin-glyph e (make-glyph [string :data "-"]))))
+
+(defun expand-region-abbrevs (start end &optional noquery)
+  "For abbrev occurrence in the region, offer to expand it.
+The user is asked to type y or n for each occurrence.
+A prefix argument means don't query; expand all abbrevs.
+If called from a Lisp program, arguments are START END &optional NOQUERY."
+  (interactive "r\nP")
+  (save-excursion
+    (goto-char start)
+    (let ((lim (- (point-max) end))
+         pnt string)
+      (while (and (not (eobp))
+                 (progn (forward-word 1)
+                        (<= (setq pnt (point)) (- (point-max) lim))))
+       (if (abbrev-expansion
+            (setq string
+                  (buffer-substring
+                   (save-excursion (forward-word -1) (point))
+                   pnt)))
+           (if (or noquery (y-or-n-p (format "Expand `%s'? " string)))
+               (expand-abbrev)))))))
+
+;;; abbrev.el ends here
diff --git a/lisp/about.el b/lisp/about.el
new file mode 100644 (file)
index 0000000..e2f0176
--- /dev/null
@@ -0,0 +1,1519 @@
+;;; about.el --- the About The Authors page (shameless self promotion).
+
+;; Copyright (c) 1997 Free Software Foundation, Inc.
+
+;; Keywords: extensions
+;; Version: 2.4
+;; Maintainer: Hrvoje Niksic <hniksic@srce.hr>
+
+;; 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; see the file COPYING.  If not, write to the
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not in FSF.
+
+;; Original code: Jamie Zawinski <jwz@netscape.com>
+;; Text: Ben Wing <ben@xemacs.org>, Jamie Zawinski <jwz@netscape.com>
+;; Hard: Amiga 1000, Progressive Peripherals Frame Grabber.
+;; Soft: FG 2.0, DigiPaint 3.0, pbmplus (dec 91), xv 3.0.
+;; Modified for 19.11 by Eduardo Pelegri-Llopart <pelegri@eng.sun.com>
+;;                   and Chuck Thompson <cthomp@xemacs.org>
+;; More hacking for 19.12 by Chuck Thompson and Ben Wing.
+;; 19.13 and 19.14 updating done by Chuck Thompson.
+;; 19.15 and 20.0 updating done by Steve Baur and Martin Buchholz.
+
+;; Completely rewritten for 20.3 by Hrvoje Niksic <hniksic@srce.hr>.
+;; The original had no version numbers; I numbered the rewrite as 2.0.
+
+;; Many things in this file are to gag.  Ideally, we should just use
+;; HTML (or some other extension, e.g. info) for this sort of thing.
+;; However, W3 loads too long and is too large to be dumped with
+;; XEmacs.
+
+;; If you think this is ugly now -- o boy, you should have seen it
+;; before.
+
+(require 'wid-edit)
+
+;; People in this list have their individual links from the main page,
+;; or from the `Legion' page.  If they have an image, it should be
+;; named after the CAR of the list element (baw -> baw.xpm).
+;;
+;; If you add to this list, you'll want to update
+;; `about-maintainer-info' (and maybe `about-hackers'.
+(defvar xemacs-hackers
+  '((ajc      "Andrew Cosgriff"   "ajc@bing.wattle.id.au")
+    (baw      "Barry Warsaw"      "bwarsaw@python.org")
+    (bw       "Bob Weiner"        "weiner@altrasoft.com")
+    (cthomp   "Chuck Thompson"    "cthomp@xemacs.org")
+    (dmoore   "David Moore"       "dmoore@ucsd.edu")
+    (dkindred "Darrell Kindred"          "dkindred@cmu.edu")
+    (dv       "Didier Verna"      "verna@inf.enst.fr")
+    (hniksic  "Hrvoje Niksic"     "hniksic@srce.hr")
+    (jareth   "Jareth Hein"       "jareth@camelot.co.jp")
+    (jason    "Jason Mastaler"   "jason@mastaler.com")
+    (jens     "Jens Lautenbacher" "jens@lemcbed.lem.uni-karlsruhe.de")
+    (jmiller  "Jeff Miller"       "jmiller@smart.net")
+    (juhp     "Jens-Ulrik Holger Petersen" "petersen@kurims.kyoto-u.ac.jp")
+    (jwz      "Jamie Zawinski"    "jwz@netscape.com")
+    (kazz     "IENAGA Kazuyuki"   "ienaga@jsys.co.jp")
+    (kyle     "Kyle Jones"        "kyle_jones@wonderworks.com")
+    (larsi    "Lars Magne Ingebrigtsen" "larsi@gnus.org")
+    (marcpa   "Marc Paquette"    "marcpa@CAM.ORG")
+    (mcook    "Michael R. Cook"   "mcook@cognex.com")
+    (mly      "Richard Mlynarik"  "mly@adoc.xerox.com")
+    (morioka  "MORIOKA Tomohiko"  "morioka@jaist.ac.jp")
+    (martin   "Martin Buchholz"   "martin@xemacs.org")
+    (ograf    "Oliver Graf"       "ograf@fga.de")
+    (pez      "Peter Pezaris"    "pez@dwwc.com")
+    (piper    "Andy Piper"        "andyp@parallax.co.uk")
+    (rickc    "Rick Campbell"     "rickc@lehman.com")
+    (rossini  "Anthony Rossini"          "rossini@stat.sc.edu")
+    (vin      "Vin Shelton"      "acs@acm.org")
+    (sperber  "Michael Sperber"   "sperber@informatik.uni-tuebingen.de")
+    (slb      "SL Baur"           "steve@xemacs.org")
+    (stig     "Jonathan Stigelman" "stig@hackvan.com")
+    (stigb    "Stig Bjorlykke"   "stigb@tihlde.hist.no")
+    (thiessel "Marcus Thiessel"   "thiessel@rhrk.uni-kl.de")
+    (vladimir "Vladimir Ivanovic" "vladimir@mri.com")
+    (wing     "Ben Wing"          "ben@xemacs.org")
+    (wmperry  "William Perry"     "wmperry@aventail.com"))
+  "Alist of XEmacs hackers.")
+
+;; The CAR of alist elements is a valid argument to `about-url-link'.
+;; It is preferred to a simple string, because it makes maintenance
+;; easier.  Please add new URLs to this list.
+(defvar about-url-alist
+  '((ajc       . "http://www-personal.monash.edu.au/~ajc/")
+    (altrasoft . "http://www.altrasoft.com/")
+    (baw       . "http://www.python.org/~bwarsaw/")
+    (cc-mode   . "http://www.python.org/ftp/emacs/")
+    (dkindred  . "http://www.cs.cmu.edu/People/dkindred/me.html")
+    (dmoore    . "http://oj.egbt.org/dmoore/")
+    (jason     . "http://www.mastaler.com/")
+    (juhp      . "http://www.kurims.kyoto-u.ac.jp/~petersen/")
+    (jwz       . "http://people.netscape.com/jwz/")
+    (kazz      . "http://www.imasy.or.jp/~kazz/")
+    (kyle      . "http://www.wonderworks.com/kyle/")
+    (larsi     . "http://www.ifi.uio.no/~larsi/")
+    (marcpa    . "http://www.positron911.com/products/power.htm")
+    (ograf     . "http://www.fga.de/~ograf/")
+    (pez       . "http://www.dwwc.com/")
+    (piper     . "http://www.parallax.co.uk/~andyp")
+    (vin       . "http://www.upa.org/")
+    (stigb     . "http://www.tihlde.hist.no/~stigb/")
+    (wget      . "ftp://gnjilux.cc.fer.hr/pub/unix/util/wget/")
+    (xemacs    . "http://www.xemacs.org/"))
+  "Some of the more important URLs.")
+
+(defvar about-left-margin 3)
+
+;; Insert a URL link to the buffer.
+(defun about-url-link (what &optional echo)
+  (or (stringp what)
+      (setq what (cdr (assq what about-url-alist))))
+  (assert what)
+  (widget-create 'url-link
+                :button-prefix ""
+                :button-suffix ""
+                :help-echo echo
+                what))
+
+;; Attach a face to a string, in order to be inserted into the buffer.
+;; Make sure that the extent is duplicable, but unique.  Returns the
+;; string.
+(defun about-with-face (string face)
+  (let ((ext (make-extent 0 (length string) string)))
+    (set-extent-property ext 'duplicable t)
+    (set-extent-property ext 'unique t)
+    (set-extent-property ext 'start-open t)
+    (set-extent-property ext 'end-open t)
+    (set-extent-face ext face))
+  string)
+
+;; Switch to buffer NAME.  If it doesn't exist, make it and switch to it.
+(defun about-get-buffer (name)
+  (cond ((get-buffer name)
+        (switch-to-buffer name)
+        (delete-other-windows)
+        (goto-char (point-min))
+        name)
+       (t
+        (switch-to-buffer name)
+        (delete-other-windows)
+        (buffer-disable-undo)
+        (set-specifier left-margin-width about-left-margin (current-buffer))
+        nil)))
+
+;; Set up the stuff needed by widget.  Allowed types are `bury' and
+;; `kill'.
+(defun about-finish-buffer (&optional type)
+  (or type (setq type 'bury))
+  (widget-insert "\n")
+  (if (eq type 'bury)
+      (widget-create 'link :help-echo "Bury buffer"
+                    :action (lambda (&rest ignore)
+                              (bury-buffer))
+                    "Remove")
+    (widget-create 'link :help-echo "Kill buffer"
+                  :action (lambda (&rest ignore)
+                            (kill-buffer (current-buffer)))
+                  "Kill"))
+  (widget-insert " this buffer.\n")
+  (use-local-map (make-sparse-keymap))
+  (set-keymap-parent (current-local-map) widget-keymap)
+  (if (eq type 'bury)
+      (progn
+       (local-set-key "q" 'bury-buffer)
+       (local-set-key "l" 'bury-buffer))
+    (let ((dispose (lambda () (interactive) (kill-buffer (current-buffer)))))
+      (local-set-key "q" dispose)
+      (local-set-key "l" dispose)))
+  (local-set-key " " 'scroll-up)
+  (local-set-key "\177" 'scroll-down)
+  (widget-setup)
+  (goto-char (point-min))
+  (toggle-read-only 1)
+  (set-buffer-modified-p nil))
+
+;; Make the appropriate number of spaces.
+(defun about-center (string-or-glyph)
+  (let ((n (- (startup-center-spaces string-or-glyph) about-left-margin)))
+    (make-string (if (natnump n) n 0) ?\ )))
+
+;; Main entry page.
+
+;;;###autoload
+(defun about-xemacs ()
+  "Describe the True Editor and its minions."
+  (interactive)
+  (unless (about-get-buffer "*About XEmacs*")
+    (widget-insert (about-center xemacs-logo))
+    (widget-create 'default
+                  :format "%t"
+                  :tag-glyph xemacs-logo)
+    (widget-insert "\n")
+    (let* ((emacs-short-version (format "%d.%d"
+                                       emacs-major-version
+                                       emacs-minor-version))
+          (emacs-about-version (format "version %s; Apr 1998"
+                                       emacs-short-version)))
+      (widget-insert (about-center emacs-about-version))
+      (widget-create 'link :help-echo "The latest NEWS of XEmacs"
+                    :action 'about-news
+                    emacs-about-version))
+
+    (widget-insert
+     "\n\n"
+     (about-with-face "XEmacs" 'italic)
+     " (formerly known as "
+     (about-with-face "Lucid Emacs" 'italic)
+     ") is a powerful, extensible text
+editor with full GUI support, initially based on an early version of\n"
+     (about-with-face "GNU Emacs 19" 'italic)
+     " from the Free Software Foundation and since kept up to
+date with recent versions of that product.  XEmacs stems from a\n")
+    (widget-create 'link :help-echo "An XEmacs history lesson"
+                  :action 'about-collaboration
+                  :button-prefix ""
+                  :button-suffix ""
+                  "collaboration")
+    (widget-insert
+     " of Lucid, Inc. with Sun Microsystems, Inc. and the
+University of Illinois with additional support having been provided by
+Amdahl Corporation, INS Engineering Corporation, and a huge amount of
+volunteer effort.
+
+XEmacs provides a great number of ")
+    (widget-create 'link :help-echo "See a list of the new features"
+                  :action 'about-features
+                  :button-prefix ""
+                  :button-suffix ""
+                  "new features")
+    (widget-insert ".  More details on
+XEmacs's functionality, including bundled packages, can be obtained
+through the ")
+    (widget-create 'info-link
+                  :help-echo "Browse the info system"
+                  :button-prefix ""
+                  :button-suffix ""
+                  :tag "info"
+                  "(dir)")
+
+    (widget-insert
+     " on-line information system.\n
+The XEmacs web page can be browsed, using any WWW browser at\n
+\t\t    ")
+    (about-url-link 'xemacs "Visit XEmacs WWW page")
+    (widget-insert "\n
+Note that W3 (XEmacs's own browser), might need customization (due to
+firewalls) in order to work correctly.
+
+XEmacs is the result of the time and effort of many people.  The
+developers responsible for this release are:\n\n")
+
+    (flet ((setup-person (who)
+           (widget-insert "\t* ")
+           (let* ((entry (assq who xemacs-hackers))
+                  (name (cadr entry))
+                  (address (caddr entry)))
+             (widget-create 'link
+                            :help-echo (concat "Find out more about " name)
+                            :button-prefix ""
+                            :button-suffix ""
+                            :action 'about-maintainer
+                            :tag name
+                            :value who)
+             (widget-insert (format "  <%s>\n" address)))))
+      ;; Setup persons responsible for this release.
+      (mapc 'setup-person '(slb hniksic kyle martin))
+      (widget-insert "\n\t* ")
+      (widget-create 'link :help-echo "A legion of XEmacs hackers"
+                    :action 'about-hackers
+                    :button-prefix ""
+                    :button-suffix ""
+                    "And many other contributors...")
+      (widget-insert "\n
+Chuck Thompson was Mr. XEmacs from 19.11 through 19.14.  Ben Wing was
+crucial to each of these releases.\n\n")
+      (setup-person 'cthomp)
+      (setup-person 'wing)
+      (widget-insert "
+Jamie Zawinski was Mr. Lucid Emacs from 19.0 through 19.10, the last
+release actually named Lucid Emacs.  A lot of work has been done by
+Richard Mlynarik.\n\n")
+      (setup-person 'jwz)
+      (setup-person 'mly))
+    (about-finish-buffer)))
+
+;; View news
+(defun about-news (&rest ignore)
+  (view-emacs-news)
+  (message "%s" (substitute-command-keys
+                "Press \\[kill-buffer] to exit this buffer")))
+
+(defun about-collaboration (&rest ignore)
+  (unless (about-get-buffer "*About Collaboration*")
+    (let ((title "Why Another Version of Emacs"))
+      (widget-insert
+       "\n"
+       (about-center title)
+       (about-with-face title 'bold)))
+    (widget-insert
+     "\n\n"
+     (about-with-face "The Lucid, Inc. Point of View"
+                     'italic)
+     " (quite outdated)\n
+At the time of the inception of Lucid Emacs (the former name of
+XEmacs), Lucid's latest product was Energize, a C/C++ development
+environment.  Rather than invent (and force our users to learn) a new
+user interface, we chose to build part of our environment on top of
+the world's best editor, GNU Emacs.  (Though our product is
+commercial, the work we did on GNU Emacs is free software, and is
+useful in its own right.)
+
+We needed a version of Emacs with mouse-sensitive regions, multiple
+fonts, the ability to mark sections of a buffer as read-only, the
+ability to detect which parts of a buffer have been modified, and many
+other features.
+
+For our purposes, the existing version of Epoch was not sufficient; it
+did not allow us to put arbitrary pixmaps/icons in buffers, `undo' did
+not restore changes to regions, regions did not overlap and merge
+their attributes in the way we needed, and several other things.
+
+We could have devoted our time to making Epoch do what we needed (and,
+in fact, we spent some time doing that in 1990) but, since the FSF
+planned to include Epoch-like features in their version 19, we decided
+that our efforts would be better spent improving Emacs 19 instead of
+Epoch.
+
+Our original hope was that our changes to Emacs would be incorporated
+into the \"official\" v19.  However, scheduling conflicts arose, and
+we found that, given the amount of work still remaining to be done, we
+didn't have the time or manpower to do the level of coordination that
+would be necessary to get our changes accepted by the FSF.
+Consequently, we released our work as a forked branch of Emacs,
+instead of delaying any longer.
+
+Roughly a year after Lucid Emacs 19.0 was released, a beta version of
+the FSF branch of Emacs 19 was released.  The FSF version is better in
+some areas, and worse in others, as reflects the differing focus of
+our development efforts.
+
+We plan to continue developing and supporting Lucid Emacs, and merging
+in bug fixes and new features from the FSF branch as appropriate; we
+do not plan to discard any of the functionality that we implemented
+which RMS has chosen not to include in his version.
+
+Certain elements of Lucid Emacs, or derivatives of them, have been
+ported to the FSF version.  We have not been doing work in this
+direction, because we feel that Lucid Emacs has a cleaner and more
+extensible substrate, and that any kind of merger between the two
+branches would be far easier by merging the FSF changes into our
+version than the other way around.
+
+We have been working closely with the Epoch developers to merge in the
+remaining Epoch functionality which Lucid Emacs does not yet have.
+Epoch and Lucid Emacs will soon be one and the same thing.  Work is
+being done on a compatibility package which will allow Epoch 4 code to
+run in XEmacs with little or no change.\n\n"
+     (about-with-face "The Sun Microsystems, Inc. Point of View"
+                     'italic)
+     "\n
+Emacs 18 has been around for a long, long time.  Version 19 was
+supposed to be the successor to v18 with X support.  It was going to
+be available \"real soon\" for a long time (some people remember
+hearing about v19 as early as 1984!), but it never came out.  v19
+development was going very, very slowly, and from the outside it
+seemed that it was not moving at all.  In the meantime other people
+gave up waiting for v19 and decided to build their own X-aware
+Emacsen.  The most important of these was probably Epoch, which came
+from the University of Illinois (\"UofI\") and was based on v18.
+
+Around 1990, the Developer Products group within Sun Microsystems
+Inc., decided that it wanted an integrated editor.  (This group is now
+known as DevPro.  It used to be known as SunPro - the name was changed
+in mid-1994.)  They contracted with the University of Illinois to
+provide a number of basic enhancements to the functionality in Epoch.
+UofI initially was planning to deliver this on top of Epoch code.
+
+In the meantime, (actually some time before they talked with UofI)
+Lucid had decided that it also wanted to provide an integrated
+environment with an integrated editor.  Lucid decided that the Version
+19 base was a better one than Version 18 and thus decided not to use
+Epoch but instead to work with Richard Stallman, the head of the Free
+Software Foundation and principal author of Emacs, on getting v19 out.
+At some point Stallman and Lucid parted ways.  Lucid kept working and
+got a v19 out that they called Lucid Emacs 19.
+
+After Lucid's v19 came out it became clear to us (the UofI and Sun)
+that the right thing to do was to push for an integration of both
+Lucid Emacs and Epoch, and to get the deliverables that Sun was asking
+from the University of Illinois on top of this integrated platform.
+Until 1994, Sun and Lucid both actively supported XEmacs as part of
+their product suite and invested a comparable amount of effort into
+it.  Substantial portions of the current code have originated under
+the support of Sun, either directly within Sun, or at UofI but paid
+for by Sun.  This code was kept away from Lucid for a while, but later
+was made available to them.  Initially Lucid didn't know that Sun was
+supporting UofI, but later Sun was open about it.
+
+Around 1992 DevPro-originated code started showing up in Lucid Emacs,
+starting with the infusion of the Epoch redisplay code.  The separate
+code bases at Lucid, Sun, and the University of Illinois were merged,
+allowing a single XEmacs to evolve from that point on.
+
+Sun originally called the integrated product ERA, for \"Emacs
+Rewritten Again\".  SunPro and Lucid eventually came to an agreement
+to find a name for the product that was not specific to either
+company.  An additional constraint that Lucid placed on the name was
+that it must contain the word \"Emacs\" in it -- thus \"ERA\" was not
+acceptable.  The tentatively agreed-upon name was \"XEmacs\", and this
+has been the name of the program since version 19.11.)
+
+As of 1997, Sun is shipping XEmacs as part of its Developer Products
+integrated programming environment \"Sun WorkShop\".  Sun is
+continuing to support XEmacs development, with focus on
+internationalization and quality improvement.\n\n"
+     (about-with-face "Lucid goes under" 'italic)
+     "\n
+Around mid-'94, Lucid went out of business.  Lucid founder Richard
+Gabriel's book \"Patterns of Software\", which is highly recommended
+reading in any case, documents the demise of Lucid and suggests
+lessons to be learned for the whole software development community.
+
+Development on XEmacs, however, has continued unabated under the
+auspices of Sun Microsystems and the University of Illinois, with help
+from Amdahl Corporation and INS Engineering Corporation.  Sun plans to
+continue to support XEmacs into the future.\n\n"
+     (about-with-face "The Amdahl Corporation point of view"
+                     'italic)
+     "\n
+Amdahl Corporation's Storage Products Group (SPG) uses XEmacs as the
+focal point of a environment for development of the microcode used in
+Amdahl's large-scale disk arrays, or DASD's.  SPG has joint ventures
+with Japanese companies, and decided in late 1994 to contract out for
+work on XEmacs in order to hasten the development of Mule support
+\(i.e. support for Japanese, Chinese, etc.) in XEmacs and as a gesture
+of goodwill towards the XEmacs community for all the work they have
+done on making a powerful, modern, freely available text editor.
+Through this contract, Amdahl provided a large amount of work in
+XEmacs in the form of rewriting the basic text-processing mechanisms
+to allow for Mule support and writing a large amount of the support
+for multiple devices.
+
+Although Amdahl is no longer hiring a full-time contractor, they are
+still funding part-time work on XEmacs and providing resources for
+further XEmacs development.\n\n"
+     (about-with-face "The INS Engineering point of view"
+                     'italic)
+     "\n
+INS Engineering Corporation, based in Tokyo, bought rights to sell
+Energize when Lucid went out of business.  Unhappy with the
+performance of the Japanese support in XEmacs 19.11, INS also
+contributed to the XEmacs development from late 1994 to early
+1995.\n")
+    (about-finish-buffer)))
+
+(defun about-features (&rest ignore)
+  (unless (about-get-buffer "*About Features*")
+    (let ((title "New features in XEmacs"))
+      (widget-insert
+       "\n"
+       (about-center title)
+       (about-with-face title 'bold)))
+    (widget-insert
+     "\n
+* MULE (Multi-Lingual Emacs) support.  Simultaneous display of
+  multiple character sets is now possible.
+
+* Support for arbitrary pixmaps in a buffer.
+
+* A real toolbar.
+
+* Horizontal and vertical scrollbars in all windows.
+
+* Support for variable-width and variable height fonts.
+
+* Support for display on multiple simultaneous X and/or TTY devices.
+
+* Face support on TTY's, including color.
+
+* Support for overlapping regions (or extents) and efficient handling
+  of a large number of such extents in a single buffer.
+
+* Powerful, flexible control over the display characteristics of most
+  of the visual aspects of XEmacs through the use of specifiers, which
+  allow separate values to be specified for individual buffers,
+  windows, frames, devices, device classes, and device types.
+
+* A clean interface to the menubar, window-system events, and key
+  combinations.
+
+* Proper integration with Xt and Motif (including Motif menubars and
+  scrollbars).  Motif look-alike menubars and scrollbars are provided
+  for those systems without real Motif support.
+
+* Text for complex languages can be entered using the XIM mechanism.
+
+* Localization of menubar text for the Japanese locale.
+
+* Access to the ToolTalk API.
+
+* Support for using XEmacs frames as Xt widgets.\n\n")
+    (about-finish-buffer)))
+
+(defvar about-glyphs nil
+  "Cached glyphs")
+
+;; Return a maintainer's glyph
+(defun about-maintainer-glyph (who)
+  (let ((glyph (cdr (assq who about-glyphs))))
+    (unless glyph
+      (let ((file (expand-file-name
+                  (concat (symbol-name who)
+                          (if (memq (device-class)
+                                    '(color grayscale))
+                              "" "m")
+                          ".xpm")
+                  (locate-data-directory "photos")))
+           (data nil))
+       (unless (file-exists-p file)
+         ;; Maybe the file is compressed?
+         (setq file (concat file ".Z"))
+         (if (file-exists-p file)
+             ;; Decompress it.
+             (condition-case nil
+                 (let ((buffer (get-buffer-create " *image*")))
+                   (unwind-protect
+                       (save-excursion
+                         (message "Uncompressing image...")
+                         (set-buffer buffer)
+                         (erase-buffer)
+                         (let ((coding-system-for-read 'binary)
+                               (coding-system-for-write 'binary))
+                           (insert-file-contents-literally file)
+                           (call-process-region (point-min) (point-max)
+                                                "zcat" t t nil)
+                           (setq data
+                                 (buffer-substring (point-min) (point-max))))
+                         (message "Uncompressing image... done"))
+                     (kill-buffer buffer)))
+               (error (setq data 'error)))
+           (setq file nil)))
+       (setq glyph
+             (cond ((stringp data)
+                    (make-glyph
+                     (if (featurep 'xpm)
+                         `([xpm :data ,data]
+                           [string :data "[Image]"])
+                       `([string :data "[Image]"]))))
+                   ((eq data 'error)
+                    (make-glyph [string :data "[Error]"]))
+                   (file
+                    (make-glyph
+                     (if (featurep 'xpm)
+                         `([xpm :file ,file]
+                           [string :data "[Image]"])
+                       `([string :data "[Image]"]))))
+                   (t
+                    (make-glyph [nothing]))))
+       (set-glyph-property glyph 'baseline 100)
+       ;; Cache the glyph
+       (push (cons who glyph) about-glyphs)))
+    glyph))
+
+;; Insert info about a maintainer.  Add the maintainer-specific info
+;; here.
+(defun about-maintainer-info (entry)
+  (ecase (car entry)
+    (slb
+     (widget-insert "\
+I took over the maintenance of XEmacs in November of 1996 (it
+seemed like a good idea at the time ...).  In real life I am a
+network administrator and Unix systems programmer for Calag.com,
+Inc. a small, but growing ISP in California.
+
+My main hobby while not maintaining XEmacs or working is ...
+you have got to be kidding ...")
+     (widget-insert ".\n"))
+    (martin
+     (widget-insert "\
+Martin was the XEmacs guy at DevPro, a part of Sun Microsystems.
+Martin used to do XEmacs as a `hobby' while at IBM, and was crazy
+enough to try to make a living doing it at Sun.
+
+Martin starting using Emacs originally not to edit files, but to get
+the benefit of shell mode. He actually used to run nothing but a shell
+buffer, and use `xterm -e vi' to edit files.  But then he saw the
+light.  He dreams of rewriting shell mode from scratch.  Stderr should
+show up in red!!
+
+Martin is no longer doing XEmacs for a living, and is Just Another
+Volunteer.\n"))
+    (hniksic
+     (widget-insert "\
+Hrvoje is currently a student at the Faculty of Electrical
+Engineering and Computing in Zagreb, Croatia.  He works part-time
+at SRCE, where he helps run the network machines.  In his free time he
+is helping develop free software (especially XEmacs, as well as GNU
+software) and is writing his own -- he has written a small network
+mirroring utility Wget, see ")
+     (about-url-link 'wget "Download Wget")
+     (widget-insert ".\n"))
+    (wing
+     (widget-insert
+      "\
+I'm not a thug -- I just play one on video.
+My roommate says I'm a San Francisco \"Mission Critter\".\n\n"
+      (about-with-face "Gory stuff follows:" 'italic)
+      "\n
+In 1992 I left a stuffy East-Coast university, set out into the real
+world, and ended up a co-founder of Pearl Software.  As part of this
+company, I became the principal architect of Win-Emacs, a port of
+Lucid Emacs to Microsoft Windows and Windows NT (for more info, e-mail
+to info@pearlsoft.com).
+
+Since April 1993, I've worked on XEmacs as a contractor for various
+companies, changing hats faster than Ronald Reagan's hair color (oops,
+did I just show my age?).  My main contributions to XEmacs include
+rewriting large parts of the internals and the gory Xt/Xlib
+interfacing, adding the Mule support, implementing the external client
+widget, improving the documentation (especially the Emacs Lisp
+manual), and being a general nuisance ... er, brainstormer for many of
+the new features of XEmacs.
+
+Recently I took a job at Dimension X, where I'm working on a
+Java-based toolkit for developing VRML applications.\n"))
+    (cthomp
+     (widget-insert "\
+Chuck, through being in the wrong place at the right time, has gotten
+stuck with being Jamie's replacement as the primary maintainer of
+XEmacs.  This has caused his hair to begin falling out and quadrupled
+his daily coffee dosage.  Though he works at and for the University of
+Illinois his funding for XEmacs work actually came from Sun
+Microsystems.
+
+He has worked on XEmacs since November 1992, which fact occasionally
+gives him nightmares.  As of October 1995, he no longer works
+full-time on XEmacs, though he does continue as an active maintainer.
+His main contributions have been the greatly enhanced redisplay
+engine, scrollbar support, the toolbars, configure support and
+numerous other features and fixes.
+
+Rumors that Chuck is aka Black Francis aka Frank Black are completely
+unfounded.\n"))
+    (jwz
+     (widget-insert
+      "\t"
+      (about-with-face "\"So much to do, so little time.\"" 'italic)
+      "\n
+Jamie Zawinski was primarily to blame for Lucid Emacs from its
+inception in 1991, to 1994 when Lucid Inc. finally died.  He is now to
+be found at Netscape Communications, hacking on Netscape Navigator (he
+did the first Unix version and the mail and news reader).  Thankfully
+his extensive sleep deprivation experiments conducted during 1994 and
+1995 are now a thing of the past, but his predilection for dark,
+Gothic music remains unabated.
+
+Come visit his glorified .plan file at\n\n")
+     (about-url-link 'jwz "Visit Jamie's home page")
+     (widget-insert "\n"))
+    (mly
+     (widget-insert "Cars are evil.  Ride a bike.\n"))
+    (vladimir
+     (widget-insert "\
+Former technical lead for XEmacs at Sun.  He is now with Microtec
+Research Inc., working on embedded systems development tools.\n"))
+    (stig
+     (widget-insert "\
+Stig is sort of a tool fetishist.  He has a hate/love relationship
+with computers and he hacks on XEmacs because it's a good tool that
+makes computers somewhat less of a nuisance.  Besides XEmacs, Stig
+especially likes his Leatherman, his Makita, and his lockpicks.  Stig
+wants a MIG welder and air tools.
+
+Stig likes to perch, hang from the ceiling, and climb on the walls.
+Stig has a cool van.  Stig would like to be able to telecommute from,
+say, the north rim of the Grand Canyon or the midst of Baja.\n"))
+    (stigb
+     (widget-insert "\
+Currently studying computer science in Trondheim, Norway.  Full time
+Linux user and proud of it.  XEmacs hacker light.  Maintainer of the
+RPM package.
+
+See:\t")
+     (about-url-link 'stigb "Visit Stig's home page"))
+    (baw
+     (widget-insert
+       "\
+Author of CC Mode, for C, C++, Objective-C and Java editing, and
+Supercite for mail and news citing.  Also various and sundry other
+Emacs utilities, fixes, enhancements and kludgery as whimsy, boredom,
+and ToT dictate (but not necessarily in that order).  See also:\n\n\t")
+     (about-url-link 'baw "Visit Barry's home page")
+     (widget-insert "\n\nand:\n\n\t")
+     (about-url-link 'cc-mode "Visit the CC Mode distribution")
+     (widget-insert "\n
+Daddy
+\(C) 1994 Warsaw
+===============
+Drive me Daddy, drive me quick
+Push my pedal, shift my stick
+Fill me up with golden gas
+My rubber squeals, I go real fast
+
+Milk me Daddy, milk me now
+Milk me like a big ol' cow
+I've got milk inside my udder
+Churn it up and make some butter\n"))
+    (piper
+     (widget-insert "\
+Author of the original \"fake\" XEmacs toolbar, outl-mouse for mouse
+gesture based outlining, the original CDE drag-n-drop support, the
+cygwin port of XEmacs including unexec, glyphs under MS-Windows,
+toolbars under MS-Windows. My home page is here:\n")
+     (about-url-link 'piper "Visit andy's home page")
+     (widget-insert "\n
+Andy has recently rejoined the XEmacs team to help port XEmacs to
+MS Windows operating systems.\n"))
+    (bw
+     (widget-insert "\
+Author of the Hyperbole everyday information management hypertext
+system and the OO-Browser multi-language code browser.  He also
+designed the Altrasoft InfoDock integrated development environment
+for software engineers.  It runs atop XEmacs and is available from
+his firm, Altrasoft, which offers distributions, custom development,
+support, and training packages for corporate users of XEmacs, GNU
+Emacs and InfoDock.  See ")
+     (about-url-link 'altrasoft "Visit Altrasoft WWW page")
+     (widget-insert ".
+
+His interests include user interfaces, information management,
+CASE tools, communications and enterprise integration.\n"))
+    (wmperry
+     (widget-insert "\
+Author of Emacs-w3, the builtin web browser that comes with XEmacs,
+and various additions to the C code (e.g. the database support, the
+PNG support, some of the GIF/JPEG support, the strikethru face
+attribute support).
+
+He is currently working at Aventail, Corp. on SOCKS v5 servers.\n"))
+    (kyle
+     (widget-insert "\
+Author of VM, a mail-reading package that is included in the standard
+XEmacs distribution, and contributor of many improvements and bug
+fixes.  Unlike RMAIL and MH-E, VM uses the standard UNIX mailbox
+format for its folders; thus, you can use VM concurrently with other
+UNIX mail readers such as Berkeley Mail and ELM.  See\n")
+     (about-url-link 'kyle "Visit Kyle's Home page")
+     (widget-insert ".\n"))
+    (larsi
+     (widget-insert "\
+Author of Gnus the Usenet news and Mail reading package in the
+standard XEmacs distribution, and contributor of various enhancements
+and portability fixes.  Lars is a student at the Institute of
+Informatics at the University of Oslo.  He is currently plumbing away
+at his majors work at the Institute of Physics, working on an SCI
+project connected with CASCADE and CERN and stuff.
+
+See ")
+     (about-url-link 'larsi "Visit the Larsissistic pages")
+     (widget-insert ".\n"))
+    (marcpa
+     (widget-insert "\
+I work for Positron Industries Inc., Public Safety Division.
+I'm part of the team producing POWER 911, a 911 emergency response
+system written in Modula3:\n")
+     (about-url-link 'marcpa "Visit POWER 911")
+     (widget-insert "\
+Previously, I worked at Softimage Inc., now a Microsoft company
+\(eeekkk!), as a UNIX system administrator.  This is where I've been
+converted to NT.
+
+In a previous life, I was a programmer/sysadmin at CRIM (Centre de
+Recherche Informatique de Montreal) for the speech recognition group.\n"))
+    (jens
+     (widget-insert "\
+Jens did the artwork for graphics added to XEmacs 20.2 and 19.15.
+
+I'm currently working at the University of Karlsruhe, Germany on
+getting my diploma thesis on Supersymmetry (uuh, that's physics) done.
+After that (and all the remaining exams) I'm looking forward to make a
+living out of my hobbies -- computers (and graphics). But because I
+have no deadline for the exams and XEmacs betas are released at a high
+rate this may take some time...\n"))
+    (jareth
+     (widget-insert "\
+Jareth Hein is a mountain boy who abandoned his home state of Colorado
+for the perpetual state of chaos known as Tokyo in a failed attempt to
+become a cel-animator, and a more successful one to become a
+computer-game programmer. As he happens to be bilingual (guess which
+two?) he's been doing quite a bit of MULE hacking. He's also getting
+his hands dirty in the graphics areas as well.\n"))
+    (morioka
+     (widget-insert "\
+I am the author of tm-view (general MIME Viewer for GNU Emacs) and
+major author and maintainer of tm (Tools for MIME; general MIME
+package for GNU Emacs).  In addition, I am working to unify MULE API
+for Emacs and XEmacs.  In XEmacs, I have ported many mule features.
+
+I am a doctoral student at School of Information Science of JAIST
+\(Japan Advanced Institute of Science and Technology, Hokuriku).  I'm
+interested in Natural Language, Affordance and writing systems.\n"))
+    (dmoore
+     (widget-insert "\
+David has contributed greatly to the quest to speed up XEmacs.  He is
+a student in the Computer Systems Laboratory at UCSD.  When he manages
+to have free time, he usually spends it on 200 mile bicycle rides,
+learning german or showing people the best mail & news environment
+he's found in 10 years.  (That'd be XEmacs, Gnus and bbdb, of course.)
+He can be found at `druidmuck.egbt.org 4201' at various hours of the
+day.
+
+He has a page at ")
+     (about-url-link 'dmoore "Visit David's home page")
+     (widget-insert ".\n"))
+    (thiessel
+     (widget-insert "\
+On May 1, 1996 he started working at University of Kaiserslautern in
+the field of computer aided analog circuit design. His
+responsibilities include the development and design of a CAD-Tool for
+analog integrated circuits with special emphasis on distributed
+software concepts.
+
+When all the daily hacking is done he tries to take care of XEmacs
+website at ")
+     (about-url-link 'xemacs "Visit XEmacs web site")
+     (widget-insert ".\n"))
+    (sperber
+     (widget-insert "\
+Mike ported EFS to XEmacs 20 and integrated EFS into XEmacs.  He's
+also responsible for the ports of facemenu.el and enriched.el.  When
+Mike isn't busy putting together patches for free software he has just
+installed or changing his hairstyle, he does research in modern
+programming languages and their implementation, and hopes that one day
+XEmacs will speak Scheme.\n"))
+    (vin
+     (widget-insert "\
+Vin maintains the XEmacs patch pages in order to bring a more
+stable XEmacs.  (Actually, he does it 'cause it's fun and he's been
+using emacs for a long, long time.)  Vin also contributed the detached
+minibuffer code as well as a few minor enhancements to the menubar
+options.
+
+I own and operate my own consulting firm, EtherSoft.  Shhh, don't
+tell anyone, but it's named after an Ultimate team I used to play
+with in Austin, Texas - the Ether Bunnies.  I'm getting too old
+to play competitive Ultimate any more, so now I've gotten roped
+into serving on the board of directors of the Ultimate Players
+Association.  See ")
+     (about-url-link 'vin "Visit the UPA homepage")
+     (widget-insert ".\n"))
+    (ajc
+     (widget-insert "\
+When not helping maintain the XEmacs website, Andrew is a Network
+Software Engineer(tm) for Monash University in Australia, maintaining
+webservers and doing random other things.  As well as spending spare
+time being an Eager Young Space Cadet and fiddling with XEmacs/Gnus
+et. al., he spends his time pursuing, among other things, a Life.
+Some of this currently involves doing an A-Z (by country) of
+restaurants with friends, and has, in the past, involved dyeing his
+hair various colours (see ")
+     (about-url-link 'ajc "Visit Andrew's home page")
+     (widget-insert ".\n"))
+    (rickc
+     (widget-insert "\
+The hacker formerly known as Rick Busdiecker develops and maintains
+libraries for financial applications at Lehman Brothers during
+daylight hours.  In the evenings he maintains three children, and
+when he ought to be sleeping he co-maintains ILISP, builds XEmacs
+betas, and tinkers with various personal hacking projects..\n"))
+    (kazz
+     (widget-insert "\
+Kazz is the XEmacs lead on BSD (especially FreeBSD).
+His main workspace is, probably, the latest stable version of
+FreeBSD and it makes him comfortable and not.
+His *mission* is to make XEmacs runs on FreeBSD without
+any problem.
+
+In real life, he is working on a PDM product based on CORBA,
+and doing consultation, design and implemention.
+He loves to play soccer, yes football!
+See also:")
+     (about-url-link 'kazz "Visit Kazz's home page")
+     (widget-insert ".\n"))
+    (dkindred
+     (widget-insert "\
+Darrell tends to come out of the woodwork a couple of weeks
+before a new release with a flurry of fixes for bugs that
+annoy him.  He hopes he's spared you from a core dump or two.
+
+Darrell is currently a doctoral student in computer science at
+Carnegie Mellon University, but he's trying hard to kick that
+habit.
+
+See ")
+     (about-url-link 'dkindred "Visit Darrell's WWW page")
+     (widget-insert ".\n"))
+    (pez
+     (widget-insert "\
+Author of SQL Mode, edit-toolbar, mailtool-mode, and various other
+small packages with varying degrees of usefulness.  Peter has
+recently left Wall Street to start Daedalus World Wide Corporation,
+a software development firm.  See ")
+     (about-url-link 'pez "Daedalus on the web")
+     (widget-insert ".\n"))
+    (dv
+     (widget-insert "\
+I'm currently working (Ph.D.) on the cognitive aspects of
+Human-Machine Interaction in Virtual Environments, and especialy on
+the possibility of adding (artificial) intelligence between the system
+and the operator, in order to detect the intentions of the latter.
+
+Otherwise, I'm, say, 35.82% professional Jazz guitar player,
+which means that's not the way I earn my crust, but things may very
+well reverse in the future ...\n"))
+    (rossini
+     (widget-insert "\
+Author of the first XEmacs FAQ, as well as minor priest in the
+movement to get every statistician in the world to use XEmacs for
+statistical programming and data analysis.  Current development lead
+for ESS (Emacs Speaks Statistics), a mode and inferior mode for
+statistical programming and data analysis for SAS, S, S-PLUS, R,
+XLispStat; configurable for nearly any other statistical
+language/package one might want.  In spare time, acts as a
+Ph.D. (bio)statistician for money and amusement.  Current position:
+Assistant Professor of Statistics at the University of South Carolina.\n"))
+    (ograf
+     (widget-insert "\
+I'm a student of computer sciences at the University of Koblenz. My
+major is computational linguistics (human language generation and
+analysis).
+
+I make my living as a managing director of a small but fine company
+which I started two years ago with one of my friends. We provide
+business network solutions based on linux servers and various other
+networking products.
+
+Most of my spare time I spent on the development of the XEmacs
+Drag'n'Drop API, a enhanced version of Tk called TkStep (better looks,
+also Drag'n'Drop, and more), and various other hacks: ISDN-tools,
+cd players, python, etc...
+
+To see some of these have a look at ")
+     (about-url-link 'ograf "one of my homepages")
+     (widget-insert ".\n"))
+    (juhp
+     (widget-insert "\
+I started using XEmacs-20 as my work-environment in June 1997.  I
+became a beta developer shortly after that (\"it seems like a good
+idea at the time...\" :-), so far contributing mainly bug fixes,
+\"find-func.el\" and improvements to \"help.el\".
+
+My current dreams for XEmacs: move to using guile as the Lisp engine
+and gtk as the default X toolkit.
+
+I have been a postdoctoral researcher at the Research Institute for
+Mathematical Sciences, Kyoto University, since August 1994, doing
+research in mathematical physics (representation theory of quantum
+groups).  Though now I seem to be heading for other things.
+
+My homepage is ")
+     (about-url-link 'juhp "Visit Jens' homepage")
+     (widget-insert ".\n"))
+    (jason
+     (widget-insert "\
+Beta tester and manager of the various XEmacs mailing lists.
+Originator and maintainer of the gnus.org domain.
+
+Jason resides in Albuquerque, New Mexico where he keeps himself
+busy with studies at the university and consulting work.
+
+See: ")
+      (about-url-link 'jason "Visit Jason's homepage")
+      (widget-insert ".\n"))
+    (jmiller
+     (widget-insert "\
+Jeff grew up in Indiana and is a country boy at heart.  He currently lives
+in, of all places, Millersville Maryland.  He spends a lot of his free
+time tinkering with Linux and hacking on XEmacs and loves it when he finds
+new cool features in either.  When he's not doing that, he enjoys downhill
+skiing, puzzles, and sci-fi.  Jeff is also really interested in classical
+Roman history and enjoys making trips to Italy, where he was born, and
+seeing the sights")
+     (widget-insert ".\n"))
+))
+
+;; Setup the buffer for a maintainer.
+(defun about-maintainer (widget &optional event)
+  (let* ((entry (assq (widget-value widget) xemacs-hackers))
+        (who (car entry))
+        (name (cadr entry))
+        (address (caddr entry))
+        (bufname (format "*About %s*" name)))
+    (unless (about-get-buffer bufname)
+      ;; Display the glyph and name
+      (widget-insert "\n")
+      (widget-create 'default :format "%t"
+                    :tag-glyph (about-maintainer-glyph who))
+      (widget-insert
+       "  " (about-with-face (format "%s" name) 'bold)
+       " <" address ">\n\n")
+      ;; Display the actual info
+      (about-maintainer-info entry)
+      (widget-insert "\n")
+      (about-finish-buffer 'kill)
+      (forward-line 2))))
+
+(defsubst about-tabs (str)
+  (let ((x (length str)))
+    (cond ((>= x 24) " ")
+         ((>= x 16) "\t")
+         ((>= x 8) "\t\t")
+         (t "\t\t\t"))))
+
+(defun about-show-linked-info (who shortinfo)
+  (let* ((entry (assq who xemacs-hackers))
+        (name (cadr entry))
+        (address (caddr entry)))
+    (widget-create 'link :help-echo (concat "Find out more about " name)
+                  :action 'about-maintainer
+                  :button-prefix ""
+                  :button-suffix ""
+                  :tag name
+                  :value who)
+    (widget-insert (about-tabs name)
+                  (format "<%s>\n%s\n" address shortinfo))))
+
+(defun about-hackers (&rest ignore)
+  (unless (about-get-buffer "*About Hackers*")
+    (let ((title "Other Contributors to XEmacs"))
+      (widget-insert
+       (about-center title)
+       (about-with-face title 'bold)))
+    (widget-insert
+     "\n
+Like most free software, XEmacs is a collaborative effort.  These are
+some of the contributors.  We have no doubt forgotten someone; we
+apologize!  You can see some of our faces under the links.\n\n")
+    (about-show-linked-info 'vladimir "\
+Former technical lead for XEmacs at Sun Microsystems.  He is now with
+Microtec Research Inc., working on embedded systems development tools.\n")
+    (about-show-linked-info 'stig "\
+Peripatetic uninominal Emacs hacker.  Stig sometimes operates out of a
+big white van set up for nomadic living and hacking.  Implemented the
+faster stay-up Lucid menus and hyper-apropos.  Contributor of many
+dispersed improvements in the core Lisp code, and back-seat
+contributor for several of its major packages.\n")
+    (about-show-linked-info 'baw "\
+Author of CC Mode for C, C++, Objective-C and Java editing, and
+Supercite for mail and news citing.  Also various and sundry other
+Emacs utilities, fixes, enhancements and kludgery as whimsy, boredom,
+and ToT dictate (but not necessarily in that order).\n")
+    (about-show-linked-info 'piper "\
+Created the prototype for the toolbars.  Has been the first to make
+use of many of the new XEmacs graphics features. Has implemented many
+of XEmacs' graphics features under MS-Windows and has ported XEmacs
+to cygwin under MS-Windows.\n")
+    (about-show-linked-info 'bw "\
+Author of the Hyperbole everyday information management hypertext
+system and the OO-Browser multi-language code browser.  He also
+designed the Altrasoft InfoDock integrated development environment
+for software engineers.  It runs atop XEmacs and is available from
+his firm, Altrasoft, which offers custom development and support packages
+for corporate users of XEmacs, GNU Emacs and InfoDock.  His interests
+include user interfaces, information management, CASE tools,
+communications and enterprise integration.\n")
+    (about-show-linked-info 'wmperry "\
+Author of Emacs-w3, the builtin web browser that comes with XEmacs,
+and various additions to the C code (e.g. the database support, the
+PNG support, some of the GIF/JPEG support, the strikethru face
+attribute support).\n")
+    (about-show-linked-info 'kyle "\
+Author of VM, a mail-reading package that is included in the standard
+XEmacs distribution, and contributor of many improvements and bug
+fixes.  Unlike RMAIL and MH-E, VM uses the standard UNIX mailbox
+format for its folders; thus, you can use VM concurrently with other
+UNIX mail readers such as Berkeley Mail and ELM.\n")
+    (about-show-linked-info 'larsi "\
+Author of Gnus the Usenet news and Mail reading package in the
+standard XEmacs distribution, and contributor of various enhancements
+and portability fixes.  Lars is a student at the Institute of
+Informatics at the University of Oslo.  He is currently plumbing away
+at his majors work at the Institute of Physics, working on an SCI
+project connected with CASCADE and CERN and stuff.\n")
+    (about-show-linked-info 'jens "\
+I'm currently working at the University of Karlsruhe, Germany on
+getting my diploma thesis on Supersymmetry (uuh, that's physics) done.
+After that (and all the remaining exams) I'm looking forward to make a
+living out of my hobbies -- computers (and graphics). But because I
+have no deadline for the exams and XEmacs betas are released at a high
+rate this may take some time...\n")
+    (about-show-linked-info 'jareth "\
+Jareth Hein is a mountain boy who abandoned his home state of Colorado
+for the perpetual state of chaos known as Tokyo in a failed attempt to
+become a cel-animator, and a more successful one to become a
+computer-game programmer. As he happens to be bilingual (guess which
+two?) he's been doing quite a bit of MULE hacking. He's also getting
+his hands dirty in the graphics areas as well.\n")
+    (about-show-linked-info 'morioka "\
+I am the author of tm-view (general MIME Viewer for GNU Emacs) and
+major author and maintainer of tm (Tools for MIME; general MIME
+package for GNU Emacs).  In addition, I am working to unify MULE API
+for Emacs and XEmacs.  In XEmacs, I have ported many mule features.
+
+I am a doctoral student at School of Information Science of JAIST
+\(Japan Advanced Institute of Science and Technology, Hokuriku).  I'm
+interested in Natural Language, Affordance and writing systems.\n")
+    (about-show-linked-info 'dmoore "\
+David has contributed greatly to the quest to speed up XEmacs.  He is
+a student in the Computer Systems Laboratory at UCSD.  When he manages
+to have free time, he usually spends it on 200 mile bicycle rides,
+learning german or showing people the best mail & news environment
+he's found in 10 years.  (That'd be XEmacs, Gnus and bbdb, of course.)
+He can be found at `druidmuck.egbt.org 4201' at various hours of the
+day.\n")
+    (about-show-linked-info 'sperber "\
+Mike ported EFS to XEmacs 20 and integrated EFS into XEmacs.  He's
+also responsible for the ports of facemenu.el and enriched.el.  When
+Mike isn't busy putting together patches for free software he has just
+installed or changing his hairstyle, he does research in modern
+programming languages and their implementation, and hopes that one day
+XEmacs will speak Scheme.\n")
+    (about-show-linked-info 'vin "\
+Vin helps maintain the older, more mature (read: moldy) versions of
+XEmacs.  Vin has maintained the official XEmacs patch pages.\n")
+    (about-show-linked-info 'thiessel "\
+On May 1, 1996 he started working at University of Kaiserslautern in
+the field of computer aided analog circuit design. His
+responsibilities include the development and design of a CAD-Tool for
+analog integrated circuits with special emphasis on distributed
+software concepts.
+
+When all the daily hacking is done he tries to take care of XEmacs
+website at <http://www.xemacs.org>.\n")
+    (about-show-linked-info 'ajc "\
+When not helping maintain the XEmacs website, Andrew is a Network
+Software Engineer(tm) for Monash University in Australia, maintaining
+webservers and doing random other things.  As well as spending spare
+time being an Eager Young Space Cadet and fiddling with XEmacs/Gnus
+et. al., he spends his time pursuing, among other things, a Life.
+Some of this currently involves doing an A-Z (by country) of
+restaurants with friends, and has, in the past, involved dyeing his
+hair various colours.\n")
+    (about-show-linked-info 'kazz "\
+IENAGA Kazuyuki is the XEmacs technical lead on BSD, particularly
+FreeBSD.\n")
+    (about-show-linked-info 'dkindred "\
+Darrell tends to come out of the woodwork a couple of weeks
+before a new release with a flurry of fixes for bugs that
+annoy him.  He hopes he's spared you from a core dump or two.
+
+Darrell is currently a doctoral student in computer science at
+Carnegie Mellon University, but he's trying hard to kick that
+habit.\n")
+    (about-show-linked-info 'dv "\
+I'm currently working (Ph.D.) on the cognitive aspects of
+Human-Machine Interaction in Virtual Environments, and especialy on
+the possibility of adding (artificial) intelligence between the system
+and the operator, in order to detect the intentions of the latter.
+
+Otherwise, I'm, say, 35.82% professional Jazz guitar player,
+which means that's not the way I earn my crust, but things may very
+well reverse in the future ...\n")
+    (about-show-linked-info 'marcpa "\
+I work for Positron Industries Inc., Public Safety Division.\n")
+    (about-show-linked-info 'pez "\
+Author of SQL Mode, edit-toolbar, mailtool-mode, and various other
+small packages with varying degrees of usefulness.\n")
+    (about-show-linked-info 'rickc "\
+The hacker formerly known as Rick Busdiecker, maintainer of ILISP.\n")
+    (about-show-linked-info 'rossini "\
+Author of the first XEmacs FAQ, as well as minor priest in the
+movement to get every statistician in the world to use XEmacs for
+statistical programming and data analysis.  Current development lead
+for ESS (Emacs Speaks Statistics), a mode and inferior mode for
+statistical programming and data analysis for SAS, S, S-PLUS, R,
+XLispStat; configurable for nearly any other statistical
+language/package one might want.  In spare time, acts as a
+Ph.D. (bio)statistician for money and amusement.  Current position:
+Assistant Professor of Statistics at the University of South Carolina.\n")
+    (about-show-linked-info 'stigb "\
+Currently studying computer science in Trondheim, Norway.  Full time
+Linux user and proud of it.  XEmacs hacker light.  Maintainer of the
+RPM package.\n")
+    (about-show-linked-info 'ograf "\
+Author of the XEmacs Drag'n'Drop API.\n")
+    (about-show-linked-info 'juhp "\
+Author of \"find-func.el\".\n")
+    (about-show-linked-info 'jason "\
+Beta tester and manager of the various XEmacs mailing lists.
+Originator and maintainer of the gnus.org domain.\n")
+    (about-show-linked-info 'jmiller "\
+Beta tester and last hacker of calendar.\n")
+    (flet ((print-short (name addr &optional shortinfo)
+            (concat (about-with-face name 'italic)
+                    (about-tabs name)
+                    "<" addr ">\n"
+                    (if shortinfo (concat shortinfo "\n") ""))))
+      (widget-insert
+       (print-short "Eduardo Pelegri-Llopart" "pelegri@eng.sun.com" "\
+Author of EOS, a package included in the standard XEmacs distribution
+that integrates XEmacs with the SPARCworks development environment
+from Sun.  Past lead for XEmacs at Sun; advocated the validity of
+using Epoch, and later Lemacs, at Sun through several early
+prototypes.\n")
+       (print-short "Matthieu Devin" "devin@rs.com" "\
+Part of the original (pre-19.0) Lucid Emacs development team.
+Matthieu wrote the initial Energize interface, designed the
+toolkit-independent Lucid Widget library, and fixed enough redisplay
+bugs to last a lifetime.  The features in Lucid Emacs were largely
+inspired by Matthieu's initial prototype of an Energize interface
+using Epoch.\n")
+       (print-short "Harlan Sexton" "hbs@odi.com" "\
+Part of the original (pre-19.0) Lucid Emacs development team.  Harlan
+designed and implemented many of the low level data structures which
+are original to the Lucid version of Emacs, including extents and hash
+tables.\n")
+       (print-short "Eric Benson" "eb@kaleida.com" "\
+Also part of the original Lucid Emacs development team.  Eric played a
+big part in the design of many aspects of the system, including the
+new command loop and keymaps, fixed numerous bugs, and has been a
+reliable beta tester ever since.\n")
+       (print-short "John Rose" "john.rose@sun.com" "\
+Author of many extensions to the `extents' code, including the initial
+implementation of `duplicable' properties.\n")
+       (print-short "Hans Muller" "hmuller@eng.sun.com" "\
+Author of the code used to connect XEmacs with ToolTalk, and of an
+early client of the external Emacs widget.\n")
+       (print-short "David hobley" "david.hobley@usa.net" "\
+I used to do real work, but now I am a Project Manager for one of the
+Telco's in Australia. In my spare time I like to get back to basics and
+muck around with things. As a result I started the NT port. Hopefully I
+will get to finish it sometime sooner rather than later. I do vaguely
+remember University where it seems like I had more spare time that I can
+believe now. Oh well, such is life.\n")
+       (print-short "Jonathan Harris" "jhar@tardis.ed.ac.uk" "\
+Manages the team responsible for the EPOC kernel at Symbian Ltd. Started
+the mswindows native-GUI port of XEmacs because he felt lost using
+Microsoft Windows without a real editor.\n")
+       (print-short "Michael R. Cook" "mcook@cognex.com" "\
+Author of the \"shy groups\" and minimal matching regular expression
+extensions.\n")
+       (print-short "Darryl Okahata" "darrylo@sr.hp.com" "\
+Perennial Emacs hacker since 1986 or so, when he first started on GNU
+Emacs 17.something.  Over the years, he's developed \"OEmacs\", the first
+version of GNU Emacs 19 for MSDOS, and \"bigperl\", a 32-bit version of
+Perl4 for MSDOS.  In recent years, reality has intruded and he no longer 
+has much time for playing with cool programs.  What little time he has
+now goes to XEmacs hacking, where he's worked on speeding up dired under 
+MS Windows, and to feeding his two cats.\n")
+       "\n\
+In addition to those just mentioned, the following people have spent a
+great deal of effort providing feedback, testing beta versions of
+XEmacs, providing patches to the source code, or doing all of the
+above.  We couldn't have done it without them.\n\n"
+       (print-short "Nagi M. Aboulenein" "aboulene@ponder.csci.unt.edu")
+       (print-short "Per Abrahamsen" "abraham@dina.kvl.dk")
+       (print-short "Gary Adams" "gra@zeppo.East.Sun.COM")
+       (print-short "Gennady Agranov" "agranov@csa.CS.Technion.Ac.IL")
+       (print-short "Adrian Aichner" "aichner@ecf.teradyne.com")
+       (print-short "Mark Allender" "allender@vnet.IBM.COM")
+       (print-short "Stephen R. Anderson" "sra@bloch.ling.yale.edu")
+       (print-short "Butch Anton" "butch@zaphod.uchicago.edu")
+       (print-short "Fred Appelman" "Fred.Appelman@cv.ruu.nl")
+       (print-short "Erik \"The Pope\" Arneson" "lazarus@mind.net")
+       (print-short "Tor Arntsen" "tor@spacetec.no")
+       (print-short "Marc Aurel" "4-tea-2@bong.saar.de")
+       (print-short "Larry Auton" "lda@control.att.com")
+       (print-short "Larry Ayers" "layers@marktwain.net")
+       (print-short "Oswald P. Backus IV" "backus@altagroup.com")
+       (print-short "Mike Battaglia" "mbattagl@dsccc.com")
+       (print-short "Neal Becker" "neal@ctd.comsat.com")
+       (print-short "Paul Bibilo" "peb@delcam.com")
+       (print-short "Leonard Blanks" "ltb@haruspex.demon.co.uk")
+       (print-short "Jan Borchers" "job@tk.uni-linz.ac.at")
+       (print-short "Mark Borges" "mdb@cdc.noaa.gov")
+       (print-short "David P. Boswell" "daveb@tau.space.thiokol.com")
+       (print-short "Tim Bradshaw" "tfb@edinburgh.ac.uk")
+       (print-short "Rick Braumoeller" "rickb@mti.sgi.com")
+       (print-short "Matthew J. Brown" "mjb@doc.ic.ac.uk")
+       (print-short "Alastair Burt" "burt@dfki.uni-kl.de")
+       (print-short "David Bush" "david.bush@adn.alcatel.com")
+       (print-short "Richard Caley" "rjc@cstr.edinburgh.ac.uk")
+       (print-short "Stephen Carney" "carney@gvc.dec.com")
+       (print-short "Lorenzo M. Catucci" "lorenzo@argon.roma2.infn.it")
+       (print-short "Philippe Charton" "charton@lmd.ens.fr")
+       (print-short "Peter Cheng" "peter.cheng@sun.com")
+       (print-short "Jin S. Choi" "jin@atype.com")
+       (print-short "Tomasz J. Cholewo" "tjchol01@mecca.spd.louisville.edu")
+       (print-short "Serenella Ciongoli" "czs00@ladybug.oes.amdahl.com")
+       (print-short "Glynn Clements" "glynn@sensei.co.uk")
+       (print-short "Richard Cognot" "cognot@ensg.u-nancy.fr")
+       (print-short "Andy Cohen" "cohen@andy.bu.edu")
+       (print-short "Richard Coleman" "coleman@math.gatech.edu")
+       (print-short "Mauro Condarelli" "MC5686@mclink.it")
+       (print-short "Andrew J Cosgriff" "ajc@bing.wattle.id.au")
+       (print-short "Nick J. Crabtree" "nickc@scopic.com")
+       (print-short "Christopher Davis" "ckd@kei.com")
+       (print-short "Soren Dayton" "csdayton@cs.uchicago.edu")
+       (print-short "Chris Dean" "ctdean@cogit.com")
+       (print-short "Michael Diers" "mdiers@logware.de")
+       (print-short "William G. Dubuque" "wgd@martigny.ai.mit.edu")
+       (print-short "Steve Dunham" "dunham@dunham.tcimet.net")
+       (print-short "Samuel J. Eaton" "samuele@cogs.susx.ac.uk")
+       (print-short "Carl Edman" "cedman@Princeton.EDU")
+       (print-short "Dave Edmondson" "davided@sco.com")
+       (print-short "Jonathan Edwards" "edwards@intranet.com")
+       (print-short "Eric Eide" "eeide@asylum.cs.utah.edu")
+       (print-short "EKR" "ekr@terisa.com")
+       (print-short "Gunnar Evermann" "Gunnar.Evermann@nats.informatik.uni-hamburg.de")
+       (print-short "Oscar Figueiredo" "Oscar.Figueiredo@di.epfl.ch")
+       (print-short "David Fletcher" "frodo@tsunami.com")
+       (print-short "Paul Flinders" "ptf@delcam.co.uk")
+       (print-short "Jered J Floyd" "jered@mit.edu")
+       (print-short "Gary D. Foster" "Gary.Foster@Corp.Sun.COM")
+       (print-short "Jerry Frain" "jerry@sneffels.tivoli.com")
+       (print-short "Holger Franz" "hfranz@physik.rwth-aachen.de")
+       (print-short "Benjamin Fried" "bf@morgan.com")
+       (print-short "Barry Friedman" "friedman@nortel.ca")
+       (print-short "Noah Friedman" "friedman@splode.com")
+       (print-short "Kazuyoshi Furutaka" "furutaka@Flux.tokai.jaeri.go.jp")
+       (print-short "Lew Gaiter III" "lew@StarFire.com")
+       (print-short "Olivier Galibert" "Olivier.Galibert@mines.u-nancy.fr")
+       (print-short "Itay Gat" "itay@cs.huji.ac.il")
+       (print-short "Tim Geisler" "Tim.Geisler@informatik.uni-muenchen.de")
+       (print-short "Dave Gillespie" "daveg@synaptics.com")
+       (print-short "Christian F. Goetze" "cg@bigbook.com")
+       (print-short "Yusuf Goolamabbas" "yusufg@iss.nus.sg")
+       (print-short "Wolfgang Grieskamp" "wg@cs.tu-berlin.de")
+       (print-short "John Griffith" "griffith@sfs.nphil.uni-tuebingen.de")
+       (print-short "James Grinter" "jrg@demon.net")
+       (print-short "Ben Gross" "bgross@uiuc.edu")
+       (print-short "Dirk Grunwald" "grunwald@foobar.cs.Colorado.EDU")
+       (print-short "Michael Guenther" "michaelg@igor.stuttgart.netsurf.de")
+       (print-short "Dipankar Gupta" "dg@hplb.hpl.hp.com")
+       (print-short "Markus Gutschke" "gutschk@GOEDEL.UNI-MUENSTER.DE")
+       (print-short "Kai Haberzettl" "khaberz@privat.circular.de")
+       (print-short "Adam Hammer" "hammer@cs.purdue.edu")
+       (print-short "Magnus Hammerin" "magnush@epact.se")
+       (print-short "ChangGil Han" "cghan@phys401.phys.pusan.ac.kr")
+       (print-short "Derek Harding" "dharding@lssec.bt.co.uk")
+       (print-short "Michael Harnois" "mharnois@sbt.net")
+       (print-short "John Haxby" "J.Haxby@isode.com")
+       (print-short "Karl M. Hegbloom" "karlheg@inetarena.com")
+       (print-short "Benedikt Heinen" "beh@icemark.thenet.ch")
+       (print-short "Stephan Herrmann" "sh@first.gmd.de")
+       (print-short "August Hill" "awhill@inlink.com")
+       (print-short "Mike Hill" "mikehill@hgeng.com")
+       (print-short "Charles Hines" "chuck_hines@VNET.IBM.COM")
+       (print-short "Shane Holder" "holder@rsn.hp.com")
+       (print-short "Chris Holt" "xris@migraine.stanford.edu")
+       (print-short "Tetsuya HOYANO" "hoyano@ari.bekkoame.or.jp")
+       (print-short "David Hughes" "djh@harston.cv.com")
+       (print-short "Tudor Hulubei" "tudor@cs.unh.edu")
+       (print-short "Tatsuya Ichikawa" "ichikawa@hv.epson.co.jp")
+       (print-short "Andrew Innes" "andrewi@harlequin.co.uk")
+       (print-short "Andreas Jaeger" "aj@arthur.rhein-neckar.de")
+       (print-short "Markku Jarvinen" "Markku.Jarvinen@simpukka.funet.fi")
+       (print-short "Robin Jeffries" "robin.jeffries@sun.com")
+       (print-short "Philip Johnson" "johnson@uhics.ics.Hawaii.Edu")
+       (print-short "J. Kean Johnston" "jkj@paradigm-sa.com")
+       (print-short "John W. Jones" "jj@asu.edu")
+       (print-short "Andreas Kaempf" "andreas@sccon.com")
+       (print-short "Yoshiaki Kasahara" "kasahara@nc.kyushu-u.ac.jp")
+       (print-short "Kirill M. Katsnelson" "kkm@kis.ru")
+       (print-short "Amir Katz" "amir@ndsoft.com")
+       (print-short "Doug Keller" "dkeller@vnet.ibm.com")
+       (print-short "Hunter Kelly" "retnuh@corona")
+       (print-short "Gregor Kennedy" "gregork@dadd.ti.com")
+       (print-short "Michael Kifer" "kifer@cs.sunysb.edu")
+       (print-short "Yasuhiko Kiuchi" "kiuchi@dsp.ksp.fujixerox.co.jp")
+       (print-short "Greg Klanderman" "greg@alphatech.com")
+       (print-short "Valdis Kletnieks" "Valdis.Kletnieks@vt.edu")
+       (print-short "Rob Kooper" "kooper@cc.gatech.edu")
+       (print-short "Peter Skov Knudsen" "knu@dde.dk")
+       (print-short "Jens Krinke" "krinke@ips.cs.tu-bs.de")
+       (print-short "Maximilien Lincourt" "max@toonboom.com")
+       (print-short "Mats Larsson" "Mats.Larsson@uab.ericsson.se")
+       (print-short "Simon Leinen" "simon@instrumatic.ch")
+       (print-short "Carsten Leonhardt" "leo@arioch.tng.oche.de")
+       (print-short "James LewisMoss" "moss@cs.sc.edu")
+       (print-short "Mats Lidell" "mats.lidell@contactor.se")
+       (print-short "Matt Liggett" "mliggett@seven.ucs.indiana.edu")
+       (print-short "Christian Limpach" "Christian.Limpach@nice.ch")
+       (print-short "Maximilien Lincourt" "max@toonboom.com")
+       (print-short "Markus Linnala" "maage@b14b.tupsu.ton.tut.fi")
+       (print-short "Robert Lipe" "robertl@arnet.com")
+       (print-short "Derrell Lipman" "derrell@vis-av.com")
+       (print-short "Damon Lipparelli" "lipp@aa.net")
+       (print-short "Hamish Macdonald" "hamish@bnr.ca")
+       (print-short "Ian MacKinnon" "imackinnon@telia.co.uk")
+       (print-short "Patrick MacRoberts" "macro@hpcobr30.cup.hp.com")
+       (print-short "Tonny Madsen" "Tonny.Madsen@netman.dk")
+       (print-short "Ketil Z Malde" "ketil@ii.uib.no")
+       (print-short "Steve March" "smarch@quaver.urbana.mcd.mot.com")
+       (print-short "Ricardo Marek" "ricky@ornet.co.il")
+       (print-short "Pekka Marjola" "pema@iki.fi")
+       (print-short "Simon Marshall" "simon@gnu.ai.mit.edu")
+       (print-short "Dave Mason" "dmason@plg.uwaterloo.ca")
+       (print-short "Jaye Mathisen" "mrcpu@cdsnet.net")
+       (print-short "Jason McLaren" "mclaren@math.mcgill.ca")
+       (print-short "Michael McNamara" "mac@silicon-sorcery.com")
+       (print-short "Michael Meissner" "meissner@osf.org")
+       (print-short "David M. Meyer" "meyer@ns.uoregon.edu")
+       (print-short "John Mignault" "jbm@panix.com")
+       (print-short "Brad Miller" "bmiller@cs.umn.edu")
+       (print-short "John Morey" "jmorey@crl.com")
+       (print-short "Rob Mori" "rob.mori@sun.com")
+       (print-short "Heiko Muenkel" "muenkel@tnt.uni-hannover.de")
+       (print-short "Arup Mukherjee" "arup+@cs.cmu.edu")
+       (print-short "Colas Nahaboo" "Colas.Nahaboo@sophia.inria.fr")
+       (print-short "Lynn D. Newton" "lynn@ives.phx.mcd.mot.com")
+       (print-short "Casey Nielson" "knielson@joule.elee.calpoly.edu")
+       (print-short "Georg Nikodym" "Georg.Nikodym@canada.sun.com")
+       (print-short "Andy Norman" "ange@hplb.hpl.hp.com")
+       (print-short "Joe Nuspl" "nuspl@sequent.com")
+       (print-short "Kim Nyberg" "kny@tekla.fi")
+       (print-short "Christian Nybø" "chr@mediascience.no")
+       (print-short "Kevin Oberman" "oberman@es.net")
+       (print-short "David Ofelt" "ofelt@getalife.Stanford.EDU")
+       (print-short "Alexandre Oliva" "oliva@dcc.unicamp.br")
+       (print-short "Tore Olsen" "toreo@colargol.idb.hist.no")
+       (print-short "Greg Onufer" "Greg.Onufer@eng.sun.com")
+       (print-short "Achim Oppelt" "aoppelt@theorie3.physik.uni-erlangen.de")
+       (print-short "Rebecca Ore" "rebecca.ore@op.net")
+       (print-short "Sudeep Kumar Palat" "palat@idt.unit.no")
+       (print-short "Joel Peterson" "tarzan@aosi.com")
+       (print-short "Thomas A. Peterson" "tap@src.honeywell.com")
+       (print-short "Tibor Polgar" "tibor@alteon.com")
+       (print-short "Fabrice POPINEAU" "popineau@esemetz.ese-metz.fr")
+       (print-short "Frederic Poncin" "fp@info.ucl.ac.be")
+       (print-short "E. Rehmi Post" "rehmi@asylum.sf.ca.us")
+       (print-short "Martin Pottendorfer" "Martin.Pottendorfer@aut.alcatel.at")
+       (print-short "Colin Rafferty" "craffert@ml.com")
+       (print-short "Rick Rankin" "Rick_Rankin-P15254@email.mot.com")
+       (print-short "Paul M Reilly" "pmr@pajato.com")
+       (print-short "Jack Repenning" "jackr@sgi.com")
+       (print-short "Daniel Rich" "drich@cisco.com")
+       (print-short "Roland Rieke" "rol@darmstadt.gmd.de")
+       (print-short "Art Rijos" "art.rijos@SNET.com")
+       (print-short "Russell Ritchie" "ritchier@britannia-life.co.uk")
+       (print-short "Roland" "rol@darmstadt.gmd.de")
+       (print-short "Mike Russell" "mjruss@rchland.vnet.ibm.com")
+       (print-short "Hajime Saitou" "hajime@jsk.t.u-tokyo.ac.jp")
+       (print-short "Jan Sandquist" "etxquist@iqa.ericsson.se")
+       (print-short "Marty Sasaki" "sasaki@spdcc.com")
+       (print-short "SATO Daisuke" "densuke@ga2.so-net.or.jp")
+       (print-short "Kenji Sato" "ken@ny.kdd.com")
+       (print-short "Mike Scheidler" "c23mts@eng.delcoelect.com")
+       (print-short "Daniel Schepler" "daniel@shep13.wustl.edu")
+       (print-short "Holger Schauer" "schauer@coling.uni-freiburg.de")
+       (print-short "Darrel Schneider" "darrel@slc.com")
+       (print-short "Hayden Schultz" "haydens@ll.mit.edu")
+       (print-short "Cotton Seed" "cottons@cybercom.net")
+       (print-short "Axel Seibert" "seiberta@informatik.tu-muenchen.de")
+       (print-short "Odd-Magne Sekkingstad" "oddms@ii.uib.no")
+       (print-short "Justin Sheehy" "justin@linus.mitre.org")
+       (print-short "John Shen" "zfs60@cas.org")
+       (print-short "Murata Shuuichirou" "mrt@mickey.ai.kyutech.ac.jp")
+       (print-short "Matt Simmons" "simmonmt@acm.org")
+       (print-short "Dinesh Somasekhar" "somasekh@ecn.purdue.edu")
+       (print-short "Jeffrey Sparkes" "jsparkes@bnr.ca")
+       (print-short "Manoj Srivastava" "srivasta@pilgrim.umass.edu")
+       (print-short "Francois Staes" "frans@kiwi.uia.ac.be")
+       (print-short "Anders Stenman" "stenman@isy.liu.se")
+       (print-short "Jason Stewart" "jasons@cs.unm.edu")
+       (print-short "Rick Tait" "rickt@gnu.ai.mit.edu")
+       (print-short "TANAKA Hayashi" "tanakah@mxa.mesh.ne.jp")
+       (print-short "Samuel Tardieu" "sam@inf.enst.fr")
+       (print-short "James Thompson" "thompson@wg2.waii.com")
+       (print-short "Nobu Toge" "toge@accad1.kek.jp")
+       (print-short "Raymond L. Toy" "toy@rtp.ericsson.se")
+       (print-short "Remek Trzaska" "remek@npac.syr.edu")
+       (print-short "TSUTOMU Nakamura" "tsutomu@rs.kyoto.omronsoft.co.jp")
+       (print-short "Stefanie Teufel" "s.teufel@ndh.net")
+       (print-short "Gary Thomas" "g.thomas@opengroup.org")
+       (print-short "Stephen Turnbull" "turnbull@sk.tsukuba.ac.jp")
+       (print-short "John Turner" "turner@xdiv.lanl.gov")
+       (print-short "UENO Fumihiro" "7m2vej@ritp.ye.IHI.CO.JP")
+       (print-short "Aki Vehtari" "Aki.Vehtari@hut.fi")
+       (print-short "Juan E. Villacis" "jvillaci@cs.indiana.edu")
+       (print-short "Jan Vroonhof" "vroonhof@math.ethz.ch")
+       (print-short "Vladimir Vukicevic" "vladimir@intrepid.com")
+       (print-short "Charles G. Waldman" "cgw@pgt.com")
+       (print-short "David Walte" "djw18@cornell.edu")
+       (print-short "Peter Ware" "ware@cis.ohio-state.edu")
+       (print-short "Christoph Wedler" "wedler@fmi.uni-passau.de")
+       (print-short "Yoav Weiss" "yoav@zeus.datasrv.co.il")
+       (print-short "Peter B. West" "p.west@uq.net.au")
+       (print-short "Rod Whitby" "rwhitby@asc.corp.mot.com")
+       (print-short "Rich Williams" "rdw@hplb.hpl.hp.com")
+       (print-short "Peter Windle" "peterw@SDL.UG.EDS.COM")
+       (print-short "David C Worenklein" "dcw@gcm.com")
+       (print-short "Takeshi Yamada" "yamada@sylvie.kecl.ntt.jp")
+       (print-short "Katsumi Yamaoka" "yamaoka@ga.sony.co.jp")
+       (print-short "Jason Yanowitz" "yanowitz@eternity.cs.umass.edu")
+       (print-short "La Monte Yarroll" "piggy@hilbert.maths.utas.edu.au")
+       (print-short "Blair Zajac" "blair@olympia.gps.caltech.edu")
+       (print-short "Daniel Zivkovic" "daniel@canada.sun.com")
+       (print-short "Karel Zuiderveld" "Karel.Zuiderveld@cv.ruu.nl")
+       "\n"))
+    (about-finish-buffer)))
+
+;;; about.el ends here
diff --git a/lisp/alist.el b/lisp/alist.el
new file mode 100644 (file)
index 0000000..6ee8b03
--- /dev/null
@@ -0,0 +1,101 @@
+;;; alist.el --- utility functions about assoc-list
+
+;; Copyright (C) 1993,1994,1995,1996 Free Software Foundation, Inc.
+
+;; Author: MORIOKA Tomohiko <morioka@jaist.ac.jp>
+;; Version:
+;;     $Id: alist.el,v 1.1 1997/11/29 20:37:43 steve Exp $
+;; Keywords: alist
+
+;; This file is part of SEMI (SEMI is Emacs MIME Interfaces).
+
+;; 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 2, 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Code:
+
+(defun put-alist (item value alist)
+  "Modify ALIST to set VALUE to ITEM.
+If there is a pair whose car is ITEM, replace its cdr by VALUE.
+If there is not such pair, create new pair (ITEM . VALUE) and
+return new alist whose car is the new pair and cdr is ALIST.
+\[tomo's ELIS like function]"
+  (let ((pair (assoc item alist)))
+    (if pair
+       (progn
+         (setcdr pair value)
+         alist)
+      (cons (cons item value) alist)
+      )))
+
+(defun del-alist (item alist)
+  "If there is a pair whose key is ITEM, delete it from ALIST.
+\[tomo's ELIS emulating function]"
+  (if (equal item (car (car alist)))
+      (cdr alist)
+    (let ((pr alist)
+         (r (cdr alist))
+         )
+      (catch 'tag
+       (while (not (null r))
+         (if (equal item (car (car r)))
+             (progn
+               (rplacd pr (cdr r))
+               (throw 'tag alist)))
+         (setq pr r)
+         (setq r (cdr r))
+         )
+       alist))))
+
+(defun set-alist (symbol item value)
+  "Modify a alist indicated by SYMBOL to set VALUE to ITEM."
+  (or (boundp symbol)
+      (set symbol nil)
+      )
+  (set symbol (put-alist item value (symbol-value symbol)))
+  )
+
+(defun remove-alist (symbol item)
+  "Remove ITEM from the alist indicated by SYMBOL."
+  (and (boundp symbol)
+       (set symbol (del-alist item (symbol-value symbol)))
+       ))
+
+(defun modify-alist (modifier default)
+  "Modify alist DEFAULT into alist MODIFIER."
+  (mapcar (function
+          (lambda (as)
+            (setq default (put-alist (car as)(cdr as) default))
+            ))
+         modifier)
+  default)
+
+(defun set-modified-alist (sym modifier)
+  "Modify a value of a symbol SYM into alist MODIFIER.
+The symbol SYM should be alist. If it is not bound,
+its value regard as nil."
+  (if (not (boundp sym))
+      (set sym nil)
+    )
+  (set sym (modify-alist modifier (eval sym)))
+  )
+
+
+;;; @ end
+;;;
+
+(provide 'alist)
+
+;;; alist.el ends here
diff --git a/lisp/apropos.el b/lisp/apropos.el
new file mode 100644 (file)
index 0000000..c7857dd
--- /dev/null
@@ -0,0 +1,690 @@
+;;; apropos.el --- apropos commands for users and programmers.
+
+;; Copyright (C) 1989, 1994, 1995 Free Software Foundation, Inc.
+
+;; Author: Joe Wells <jbw@bigbird.bu.edu>
+;; Rewritten: Daniel.Pfeiffer@Informatik.START.dbp.de, fax (+49 69) 7588-2389
+;; Maintainer: SL Baur <steve@altair.xemacs.org>
+;; Keywords: help
+
+;; 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 GNU Emacs; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Last synched with FSF 19.34, diverged since.
+
+;;; Commentary:
+
+;; The ideas for this package were derived from the C code in
+;; src/keymap.c and elsewhere.  The functions in this file should
+;; always be byte-compiled for speed.  Someone should rewrite this in
+;; C (as part of src/keymap.c) for speed.
+
+;; The idea for super-apropos is based on the original implementation
+;; by Lynn Slater <lrs@esl.com>.
+
+;;; ChangeLog:
+
+;; Fixed bug, current-local-map can return nil.
+;; Change, doesn't calculate key-bindings unless needed.
+;; Added super-apropos capability, changed print functions.
+;;; Made fast-apropos and super-apropos share code.
+;;; Sped up fast-apropos again.
+;; Added apropos-do-all option.
+;;; Added fast-command-apropos.
+;; Changed doc strings to comments for helping functions.
+;;; Made doc file buffer read-only, buried it.
+;; Only call substitute-command-keys if do-all set.
+
+;; Optionally use configurable faces to make the output more legible.
+;; Differentiate between command, function and macro.
+;; Apropos-command (ex command-apropos) does cmd and optionally user var.
+;; Apropos shows all 3 aspects of symbols (fn, var and plist)
+;; Apropos-documentation (ex super-apropos) now finds all it should.
+;; New apropos-value snoops through all values and optionally plists.
+;; Reading DOC file doesn't load nroff.
+;; Added hypertext following of documentation, mouse-2 on variable gives value
+;;   from buffer in active window.
+
+;;; Code:
+
+;; I see a degradation of maybe 10-20% only.
+;; [sb -- FSF protects the face declarations with `if window-system'
+;;  I see no reason why we should do so]
+(defvar apropos-do-all nil
+  "*Whether the apropos commands should do more.
+Slows them down more or less.  Set this non-nil if you have a fast machine.")
+
+;; XEmacs addition
+(defvar apropos-symbol-face (if (boundp 'font-lock-keyword-face)
+                               font-lock-keyword-face
+                             'bold)
+  "*Face for symbol name in apropos output or `nil'.
+This looks good, but slows down the commands several times.")
+
+;; XEmacs addition
+(defvar apropos-keybinding-face (if (boundp 'font-lock-string-face)
+                                   font-lock-string-face
+                                 'underline)
+  "*Face for keybinding display in apropos output or `nil'.
+This looks good, but slows down the commands several times.")
+
+;; XEmacs addition
+(defvar apropos-label-face (if (boundp 'font-lock-comment-face)
+                              font-lock-comment-face
+                            'italic)
+  "*Face for label (Command, Variable ...) in apropos output or `nil'.
+If this is `nil' no mouse highlighting occurs.
+This looks good, but slows down the commands several times.
+When this is a face name, as it is initially, it gets transformed to a
+text-property list for efficiency.")
+
+;; XEmacs addition
+(defvar apropos-property-face (if (boundp 'font-lock-variable-name-face)
+                                 font-lock-variable-name-face
+                               'bold-italic)
+  "*Face for property name in apropos output or `nil'.
+This looks good, but slows down the commands several times.")
+
+(defvar apropos-match-face 'secondary-selection
+  "*Face for matching part in apropos-documentation/value output or `nil'.
+This looks good, but slows down the commands several times.")
+
+
+(defvar apropos-mode-map
+  (let ((map (make-sparse-keymap)))
+    (define-key map [(control m)] 'apropos-follow)
+    (define-key map [(button2up)] 'apropos-mouse-follow)
+    (define-key map [(button2)] 'undefined)
+    map)
+  "Keymap used in Apropos mode.")
+
+
+(defvar apropos-regexp nil
+  "Regexp used in current apropos run.")
+
+(defvar apropos-files-scanned ()
+  "List of elc files already scanned in current run of `apropos-documentation'.")
+
+(defvar apropos-accumulator ()
+  "Alist of symbols already found in current apropos run.")
+
+(defvar apropos-item ()
+  "Current item in or for apropos-accumulator.")
+\f
+(defvar apropos-mode-hook nil) ; XEmacs
+
+(defun apropos-mode ()
+  "Major mode for following hyperlinks in output of apropos commands.
+
+\\{apropos-mode-map}"
+  (interactive)
+  (kill-all-local-variables)
+  (use-local-map apropos-mode-map)
+  (setq major-mode 'apropos-mode
+       mode-name "Apropos")
+  (run-hooks 'apropos-mode-hook)) ; XEmacs
+
+
+;; For auld lang syne:
+;;;###autoload
+(fset 'command-apropos 'apropos-command)
+
+;;;###autoload
+(defun apropos-command (apropos-regexp &optional do-all)
+  "Shows commands (interactively callable functions) that match REGEXP.
+With optional prefix ARG or if `apropos-do-all' is non-nil, also show
+variables."
+  ;; XEmacs: All code related to special treatment of buffer has been removed
+  (interactive (list (read-string (concat "Apropos command "
+                                         (if (or current-prefix-arg
+                                                 apropos-do-all)
+                                             "or variable ")
+                                         "(regexp): "))
+                    current-prefix-arg))
+  (or do-all (setq do-all apropos-do-all))
+  (setq apropos-accumulator
+       (apropos-internal apropos-regexp
+                         (if do-all
+                             (lambda (symbol) (or (commandp symbol)
+                                                  (user-variable-p symbol)))
+                           'commandp)))
+  (apropos-print
+   t
+   (lambda (p)
+     (let (doc symbol)
+       (while p
+        (setcar p (list
+                   (setq symbol (car p))
+                   (if (commandp symbol)
+                       (if (setq doc
+                                 ;; XEmacs change: if obsolete,
+                                 ;; only mention that.
+                                 (or (function-obsoleteness-doc symbol)
+                                     (documentation symbol t)))
+                           (substring doc 0 (string-match "\n" doc))
+                         "(not documented)"))
+                   (and do-all
+                        (user-variable-p symbol)
+                        (if (setq doc
+                                  (or
+                                   ;; XEmacs change: if obsolete,
+                                   ;; only mention that.
+                                   (variable-obsoleteness-doc symbol)
+                                   (documentation-property
+                                    symbol 'variable-documentation t)))
+                            (substring doc 0
+                                           (string-match "\n" doc))))))
+        (setq p (cdr p)))))
+   nil))
+
+
+;;;###autoload
+(defun apropos (apropos-regexp &optional do-all)
+  "Show all bound symbols whose names match REGEXP.
+With optional prefix ARG or if `apropos-do-all' is non-nil, also show unbound
+symbols and key bindings, which is a little more time-consuming.
+Returns list of symbols and documentation found."
+  (interactive "sApropos symbol (regexp): \nP")
+  ;; XEmacs change: hitting ENTER by mistake is a common mess-up and
+  ;; shouldn't make Emacs hang for a long time trying to list all symbols.
+  (or (> (length apropos-regexp) 0)
+      (error "Must pass non-empty regexp to `apropos'"))
+  (setq apropos-accumulator
+       (apropos-internal apropos-regexp
+                         (and (not do-all)
+                              (not apropos-do-all)
+                              (lambda (symbol)
+                                (or (fboundp symbol)
+                                    (boundp symbol)
+                                    (find-face symbol)
+                                    (symbol-plist symbol))))))
+  (apropos-print
+   (or do-all apropos-do-all)
+   (lambda (p)
+     (let (symbol doc)
+       (while p
+        (setcar p (list
+                   (setq symbol (car p))
+                   (if (fboundp symbol)
+                       (if (setq doc
+                                 ;; XEmacs change: if obsolete,
+                                 ;; only mention that.
+                                 (or (function-obsoleteness-doc symbol)
+                                     (documentation symbol t)))
+                           (substring doc 0 (string-match "\n" doc))
+                         "(not documented)"))
+                   (if (boundp symbol)
+                       (if (setq doc
+                                 (or
+                                  ;; XEmacs change: if obsolete,
+                                  ;; only mention that.
+                                  (variable-obsoleteness-doc symbol)
+                                  (documentation-property
+                                   symbol 'variable-documentation t)))
+                           (substring doc 0
+                                      (string-match "\n" doc))
+                         "(not documented)"))
+                   (if (setq doc (symbol-plist symbol))
+                       (if (eq (/ (length doc) 2) 1)
+                           (format "1 property (%s)" (car doc))
+                         (format "%d properties" (/ (length doc) 2))))
+                   (if (get symbol 'widget-type)
+                       (if (setq doc (documentation-property
+                                      symbol 'widget-documentation t))
+                           (substring doc 0
+                                      (string-match "\n" doc))
+                         "(not documented)"))
+                   (if (find-face symbol)
+                       (if (setq doc (face-doc-string symbol))
+                           (substring doc 0
+                                      (string-match "\n" doc))
+                         "(not documented)"))
+                   (when (get symbol 'custom-group)
+                     (if (setq doc (documentation-property
+                                    symbol 'group-documentation t))
+                         (substring doc 0
+                                    (string-match "\n" doc))
+                       "(not documented)"))))
+        (setq p (cdr p)))))
+   nil))
+
+
+;;;###autoload
+(defun apropos-value (apropos-regexp &optional do-all)
+  "Show all symbols whose value's printed image matches REGEXP.
+With optional prefix ARG or if `apropos-do-all' is non-nil, also looks
+at the function and at the names and values of properties.
+Returns list of symbols and values found."
+  (interactive "sApropos value (regexp): \nP")
+  (or do-all (setq do-all apropos-do-all))
+  (setq apropos-accumulator ())
+   (let (f v p)
+     (mapatoms
+      (lambda (symbol)
+       (setq f nil v nil p nil)
+       (or (memq symbol '(apropos-regexp do-all apropos-accumulator
+                                         symbol f v p))
+           (setq v (apropos-value-internal 'boundp symbol 'symbol-value)))
+       (if do-all
+           (setq f (apropos-value-internal 'fboundp symbol 'symbol-function)
+                 p (apropos-format-plist symbol "\n    " t)))
+       (if (or f v p)
+           (setq apropos-accumulator (cons (list symbol f v p)
+                                           apropos-accumulator))))))
+  (apropos-print nil nil t))
+
+
+;;;###autoload
+(defun apropos-documentation (apropos-regexp &optional do-all)
+  "Show symbols whose documentation contain matches for REGEXP.
+With optional prefix ARG or if `apropos-do-all' is non-nil, also use
+documentation that is not stored in the documentation file and show key
+bindings.
+Returns list of symbols and documentation found."
+  (interactive "sApropos documentation (regexp): \nP")
+  (or do-all (setq do-all apropos-do-all))
+  (setq apropos-accumulator () apropos-files-scanned ())
+  (let ((standard-input (get-buffer-create " apropos-temp"))
+       f v)
+    (unwind-protect
+       (save-excursion
+         (set-buffer standard-input)
+         (apropos-documentation-check-doc-file)
+         (if do-all
+             (mapatoms
+              (lambda (symbol)
+                (setq f (apropos-safe-documentation symbol)
+                      v (get symbol 'variable-documentation))
+                (if (integerp v) (setq v))
+                (setq f (apropos-documentation-internal f)
+                      v (apropos-documentation-internal v))
+                (if (or f v)
+                    (if (setq apropos-item
+                              (cdr (assq symbol apropos-accumulator)))
+                        (progn
+                          (if f
+                              (setcar apropos-item f))
+                          (if v
+                              (setcar (cdr apropos-item) v)))
+                      (setq apropos-accumulator
+                            (cons (list symbol f v)
+                                  apropos-accumulator)))))))
+         (apropos-print nil nil t))
+      (kill-buffer standard-input))))
+
+\f
+(defun apropos-value-internal (predicate symbol function)
+  (if (funcall predicate symbol)
+      (progn
+       (setq symbol (prin1-to-string (funcall function symbol)))
+       (if (string-match apropos-regexp symbol)
+           (progn
+             (if apropos-match-face
+                 (put-text-property (match-beginning 0) (match-end 0)
+                                    'face apropos-match-face
+                                    symbol))
+             symbol)))))
+
+(defun apropos-documentation-internal (doc)
+  (if (consp doc)
+      (apropos-documentation-check-elc-file (car doc))
+    (and doc
+        (string-match apropos-regexp doc)
+        (progn
+          (if apropos-match-face
+              (put-text-property (match-beginning 0)
+                                 (match-end 0)
+                                 'face apropos-match-face
+                                 (setq doc (copy-sequence doc))))
+          doc))))
+
+(defun apropos-format-plist (pl sep &optional compare)
+  (setq pl (symbol-plist pl))
+  (let (p p-out)
+    (while pl
+      (setq p (format "%s %S" (car pl) (nth 1 pl)))
+      (if (or (not compare) (string-match apropos-regexp p))
+         (if apropos-property-face
+             (put-text-property 0 (length (symbol-name (car pl)))
+                                'face apropos-property-face p))
+       (setq p nil))
+      (if p
+         (progn
+           (and compare apropos-match-face
+                (put-text-property (match-beginning 0) (match-end 0)
+                                   'face apropos-match-face
+                                   p))
+           (setq p-out (concat p-out (if p-out sep) p))))
+      (setq pl (nthcdr 2 pl)))
+    p-out))
+
+
+;; Finds all documentation related to APROPOS-REGEXP in internal-doc-file-name.
+
+(defun apropos-documentation-check-doc-file ()
+  (let (type symbol (sepa 2) sepb beg end)
+    (princ ?\^_)
+    (backward-char)
+    (insert-file-contents (concat doc-directory internal-doc-file-name))
+    (forward-char)
+    (while (save-excursion
+            (setq sepb (search-forward "\^_"))
+            (not (eobp)))
+      (beginning-of-line 2)
+      (if (save-restriction
+           (narrow-to-region (point) (1- sepb))
+           (re-search-forward apropos-regexp nil t))
+         (progn
+           (setq beg (match-beginning 0)
+                 end (point))
+           (goto-char (1+ sepa))
+           (or (setq type (if (eq ?F (preceding-char))
+                              1        ; function documentation
+                            2)         ; variable documentation
+                     symbol (read)
+                     beg (- beg (point) 1)
+                     end (- end (point) 1)
+                     doc (buffer-substring (1+ (point)) (1- sepb))
+                     apropos-item (assq symbol apropos-accumulator))
+               (setq apropos-item (list symbol nil nil)
+                     apropos-accumulator (cons apropos-item
+                                               apropos-accumulator)))
+           (if apropos-match-face
+               (put-text-property beg end 'face apropos-match-face doc))
+           (setcar (nthcdr type apropos-item) doc)))
+      (setq sepa (goto-char sepb)))))
+
+(defun apropos-documentation-check-elc-file (file)
+  (if (member file apropos-files-scanned)
+      nil
+    (let (symbol doc beg end this-is-a-variable)
+      (setq apropos-files-scanned (cons file apropos-files-scanned))
+      (erase-buffer)
+      (insert-file-contents file)
+      (while (search-forward "\n#@" nil t)
+       ;; Read the comment length, and advance over it.
+       (setq end (read)
+             beg (1+ (point))
+             end (+ (point) end -1))
+       (forward-char)
+       (if (save-restriction
+             ;; match ^ and $ relative to doc string
+             (narrow-to-region beg end)
+             (re-search-forward apropos-regexp nil t))
+           (progn
+             (goto-char (+ end 2))
+             (setq doc (buffer-substring beg end)
+                   end (- (match-end 0) beg)
+                   beg (- (match-beginning 0) beg)
+                   this-is-a-variable (looking-at "(def\\(var\\|const\\) ")
+                   symbol (progn
+                            (skip-chars-forward "(a-z")
+                            (forward-char)
+                            (read))
+                   symbol (if (consp symbol)
+                              (nth 1 symbol)
+                            symbol))
+             (if (if this-is-a-variable
+                     (get symbol 'variable-documentation)
+                   (and (fboundp symbol) (apropos-safe-documentation symbol)))
+                 (progn
+                   (or (setq apropos-item (assq symbol apropos-accumulator))
+                       (setq apropos-item (list symbol nil nil)
+                             apropos-accumulator (cons apropos-item
+                                                       apropos-accumulator)))
+                   (if apropos-match-face
+                       (put-text-property beg end 'face apropos-match-face
+                                          doc))
+                   (setcar (nthcdr (if this-is-a-variable 2 1)
+                                   apropos-item)
+                           doc)))))))))
+
+
+
+(defun apropos-safe-documentation (function)
+  "Like documentation, except it avoids calling `get_doc_string'.
+Will return nil instead."
+  (while (and function (symbolp function))
+    (setq function (if (fboundp function)
+                      (symbol-function function))))
+  (if (eq (car-safe function) 'macro)
+      (setq function (cdr function)))
+  ;; XEmacs change from: (setq function (if (byte-code-function-p function)
+  (setq function (if (compiled-function-p function)
+                    (if (fboundp 'compiled-function-doc-string)
+                        (compiled-function-doc-string function)
+                      (if (> (length function) 4)
+                          (aref function 4)))
+                  (if (eq (car-safe function) 'autoload)
+                      (nth 2 function)
+                    (if (eq (car-safe function) 'lambda)
+                        (if (stringp (nth 2 function))
+                            (nth 2 function)
+                          (if (stringp (nth 3 function))
+                              (nth 3 function)))))))
+  (if (integerp function)
+      nil
+    function))
+
+
+
+(defun apropos-print (do-keys doc-fn spacing)
+  "Output result of various apropos commands with `apropos-regexp'.
+APROPOS-ACCUMULATOR is a list.  Optional DOC-FN is called for each element
+of apropos-accumulator and may modify it resulting in (symbol fn-doc
+var-doc [plist-doc]).  Returns sorted list of symbols and documentation
+found."
+  (if (null apropos-accumulator)
+      (message "No apropos matches for `%s'" apropos-regexp)
+    (if doc-fn
+       (funcall doc-fn apropos-accumulator))
+    (setq apropos-accumulator
+         (sort apropos-accumulator (lambda (a b)
+                                     (string-lessp (car a) (car b)))))
+    (and apropos-label-face
+        (or (symbolp apropos-label-face)
+            (facep apropos-label-face)) ; XEmacs
+        (setq apropos-label-face `(face ,apropos-label-face
+                                        mouse-face highlight)))
+    (let ((help-buffer-prefix-string "Apropos"))
+      (with-displaying-help-buffer
+       (lambda ()
+        (with-current-buffer standard-output
+          (run-hooks 'apropos-mode-hook)
+          (let ((p apropos-accumulator)
+                (old-buffer (current-buffer))
+                symbol item point1 point2)
+            ;; XEmacs change from (if window-system
+            (if (device-on-window-system-p)
+                (progn
+                  (princ "If you move the mouse over text that changes color,\n")
+                  (princ (substitute-command-keys
+                          "you can click \\[apropos-mouse-follow] to get more information.\n"))))
+            (princ (substitute-command-keys
+                    "Type \\[apropos-follow] in this buffer to get full documentation.\n\n"))
+            (while (consp p)
+              (or (not spacing) (bobp) (terpri))
+              (setq apropos-item (car p)
+                    symbol (car apropos-item)
+                    p (cdr p)
+                    point1 (point))
+              (princ symbol)           ; print symbol name
+              (setq point2 (point))
+              ;; Calculate key-bindings if we want them.
+              (and do-keys
+                   (commandp symbol)
+                   (indent-to 30 1)
+                   (if (let ((keys
+                              (save-excursion
+                                (set-buffer old-buffer)
+                                (where-is-internal symbol)))
+                             filtered)
+                         ;; Copy over the list of key sequences,
+                         ;; omitting any that contain a buffer or a frame.
+                         (while keys
+                           (let ((key (car keys))
+                                 (i 0)
+                                 loser)
+                             (while (< i (length key))
+                               (if (or (framep (aref key i))
+                                       (bufferp (aref key i)))
+                                   (setq loser t))
+                               (setq i (1+ i)))
+                             (or loser
+                                 (setq filtered (cons key filtered))))
+                           (setq keys (cdr keys)))
+                         (setq item filtered))
+                       ;; Convert the remaining keys to a string and insert.
+                       (princ
+                        (mapconcat
+                         (lambda (key)
+                           (setq key (key-description key))
+                           (if apropos-keybinding-face
+                               (put-text-property 0 (length key)
+                                                  'face apropos-keybinding-face
+                                                  key))
+                           key)
+                         item ", "))
+                     (princ "Type ")
+                     (princ "M-x")
+                     (put-text-property (- (point) 3) (point)
+                                        'face apropos-keybinding-face)
+                     (princ (format " %s " (symbol-name symbol)))
+                     (princ "RET")
+                     (put-text-property (- (point) 3) (point)
+                                        'face apropos-keybinding-face)))
+              (terpri)
+              ;; only now so we don't propagate text attributes all over
+              (put-text-property point1 point2 'item
+                                 (if (eval `(or ,@(cdr apropos-item)))
+                                     (car apropos-item)
+                                   apropos-item))
+              (if apropos-symbol-face
+                  (put-text-property point1 point2 'face apropos-symbol-face))
+              (apropos-print-doc 'describe-function 1
+                                 (if (commandp symbol)
+                                     "Command"
+                                   (if (apropos-macrop symbol)
+                                       "Macro"
+                                     "Function"))
+                                 do-keys)
+              (if (get symbol 'custom-type)
+                  (apropos-print-doc 'customize-variable-other-window 2
+                                     "User Option" do-keys)
+                (apropos-print-doc 'describe-variable 2
+                                   "Variable" do-keys))
+              (apropos-print-doc 'customize-other-window 6 "Group" do-keys)
+              (apropos-print-doc 'customize-face-other-window 5 "Face" do-keys)
+              (apropos-print-doc 'widget-browse-other-window 4 "Widget" do-keys)
+              (apropos-print-doc 'apropos-describe-plist 3
+                                 "Plist" nil)))))
+       apropos-regexp))
+    (prog1 apropos-accumulator
+      (setq apropos-accumulator ())))) ; permit gc
+
+
+(defun apropos-macrop (symbol)
+  "Return t if SYMBOL is a Lisp macro."
+  (and (fboundp symbol)
+       (consp (setq symbol
+                   (symbol-function symbol)))
+       (or (eq (car symbol) 'macro)
+          (if (eq (car symbol) 'autoload)
+              (memq (nth 4 symbol)
+                    '(macro t))))))
+
+
+(defun apropos-print-doc (action i str do-keys)
+  (with-current-buffer standard-output
+    (if (stringp (setq i (nth i apropos-item)))
+       (progn
+         (insert "  ")
+         (put-text-property (- (point) 2) (1- (point))
+                            'action action)
+         (insert str ": ")
+         (if apropos-label-face
+             (add-text-properties (- (point) (length str) 2)
+                                  (1- (point))
+                                  apropos-label-face))
+         (add-text-properties (- (point) (length str) 2)
+                              (1- (point))
+                              (list 'keymap apropos-mode-map))
+         (insert (if do-keys (substitute-command-keys i) i))
+         (or (bolp) (terpri))))))
+
+(defun apropos-mouse-follow (event)
+  (interactive "e")
+  ;; XEmacs change:  We're using the standard help buffer code now, don't
+  ;; do special tricks about trying to preserve current-buffer about mouse
+  ;; clicks.
+
+  (save-excursion
+    ;; XEmacs change from:
+    ;; (set-buffer (window-buffer (posn-window (event-start event))))
+    ;; (goto-char (posn-point (event-start event)))
+    (set-buffer (event-buffer event))
+    (goto-char (event-closest-point event))
+    ;; XEmacs change: following code seems useless
+    ;;(or (and (not (eobp)) (get-text-property (point) 'mouse-face))
+    ;;   (and (not (bobp)) (get-text-property (1- (point)) 'mouse-face))
+    ;;   (error "There is nothing to follow here"))
+    (apropos-follow)))
+
+
+(defun apropos-follow (&optional other)
+  (interactive)
+  (let* (;; Properties are always found at the beginning of the line.
+        (bol (save-excursion (beginning-of-line) (point)))
+        ;; If there is no `item' property here, look behind us.
+        (item (get-text-property bol 'item))
+        (item-at (if item nil (previous-single-property-change bol 'item)))
+        ;; Likewise, if there is no `action' property here, look in front.
+        (action (get-text-property bol 'action))
+        (action-at (if action nil (next-single-property-change bol 'action))))
+    (and (null item) item-at
+        (setq item (get-text-property (1- item-at) 'item)))
+    (and (null action) action-at
+        (setq action (get-text-property action-at 'action)))
+    (if (not (and item action))
+       (error "There is nothing to follow here"))
+    (if (consp item) (error "There is nothing to follow in `%s'" (car item)))
+    (if other (set-buffer other))
+    (funcall action item)))
+
+
+
+(defun apropos-describe-plist (symbol)
+  "Display a pretty listing of SYMBOL's plist."
+  (let ((help-buffer-prefix-string "Apropos-plist"))
+    (with-displaying-help-buffer
+     (lambda ()
+       (run-hooks 'apropos-mode-hook)
+       (princ "Symbol ")
+       (prin1 symbol)
+       (princ "'s plist is\n (")
+       (with-current-buffer standard-output
+        (if apropos-symbol-face
+            (put-text-property 8 (- (point) 14) 'face apropos-symbol-face)))
+       (princ (apropos-format-plist symbol "\n  "))
+       (princ ")")
+       (terpri)
+       (print-help-return-message))
+     (symbol-name symbol))))
+
+(provide 'apropos) ; XEmacs
+
+;;; apropos.el ends here
diff --git a/lisp/auto-autoloads.el b/lisp/auto-autoloads.el
new file mode 100644 (file)
index 0000000..55a4534
--- /dev/null
@@ -0,0 +1,1575 @@
+;;; DO NOT MODIFY THIS FILE
+(if (featurep 'Standard-autoloads) (error "Already loaded"))
+\f
+;;;### (autoloads nil "abbrev" "lisp/abbrev.el")
+
+;;;***
+\f
+;;;### (autoloads (about-xemacs) "about" "lisp/about.el")
+
+(autoload 'about-xemacs "about" "\
+Describe the True Editor and its minions." t nil)
+
+;;;***
+\f
+;;;### (autoloads (apropos-documentation apropos-value apropos apropos-command) "apropos" "lisp/apropos.el")
+
+(fset 'command-apropos 'apropos-command)
+
+(autoload 'apropos-command "apropos" "\
+Shows commands (interactively callable functions) that match REGEXP.
+With optional prefix ARG or if `apropos-do-all' is non-nil, also show
+variables." t nil)
+
+(autoload 'apropos "apropos" "\
+Show all bound symbols whose names match REGEXP.
+With optional prefix ARG or if `apropos-do-all' is non-nil, also show unbound
+symbols and key bindings, which is a little more time-consuming.
+Returns list of symbols and documentation found." t nil)
+
+(autoload 'apropos-value "apropos" "\
+Show all symbols whose value's printed image matches REGEXP.
+With optional prefix ARG or if `apropos-do-all' is non-nil, also looks
+at the function and at the names and values of properties.
+Returns list of symbols and values found." t nil)
+
+(autoload 'apropos-documentation "apropos" "\
+Show symbols whose documentation contain matches for REGEXP.
+With optional prefix ARG or if `apropos-do-all' is non-nil, also use
+documentation that is not stored in the documentation file and show key
+bindings.
+Returns list of symbols and documentation found." t nil)
+
+;;;***
+\f
+;;;### (autoloads (batch-update-directory batch-update-autoloads update-autoloads-from-directory update-autoloads-here update-file-autoloads generate-file-autoloads) "autoload" "lisp/autoload.el")
+
+(autoload 'generate-file-autoloads "autoload" "\
+Insert at point a loaddefs autoload section for FILE.
+autoloads are generated for defuns and defmacros in FILE
+marked by `generate-autoload-cookie' (which see).
+If FILE is being visited in a buffer, the contents of the buffer
+are used." t nil)
+
+(autoload 'update-file-autoloads "autoload" "\
+Update the autoloads for FILE in `generated-autoload-file'
+\(which FILE might bind in its local variables).
+This functions refuses to update autoloads files." t nil)
+
+(autoload 'update-autoloads-here "autoload" "\
+Update sections of the current buffer generated by `update-file-autoloads'." t nil)
+
+(autoload 'update-autoloads-from-directory "autoload" "\
+Update `generated-autoload-file' with all the current autoloads from DIR.
+This runs `update-file-autoloads' on each .el file in DIR.
+Obsolete autoload entries for files that no longer exist are deleted." t nil)
+
+(autoload 'batch-update-autoloads "autoload" "\
+Update the autoloads for the files or directories on the command line.
+Runs `update-file-autoloads' on files and `update-directory-autoloads'
+on directories.  Must be used only with -batch, and kills Emacs on completion.
+Each file will be processed even if an error occurred previously.
+For example, invoke `xemacs -batch -f batch-update-autoloads *.el'.
+The directory to which the auto-autoloads.el file must be the first parameter
+on the command line." nil nil)
+
+(autoload 'batch-update-directory "autoload" "\
+Update the autoloads for the directory on the command line.
+Runs `update-file-autoloads' on each file in the given directory, must
+be used only with -batch and kills XEmacs on completion." nil nil)
+
+;;;***
+\f
+;;;### (autoloads nil "buff-menu" "lisp/buff-menu.el")
+
+(defvar list-buffers-directory nil)
+
+(make-variable-buffer-local 'list-buffers-directory)
+
+;;;***
+\f
+;;;### (autoloads (batch-byte-recompile-directory batch-byte-recompile-directory-norecurse batch-byte-compile display-call-tree byte-compile-sexp byte-compile compile-defun byte-compile-buffer byte-compile-and-load-file byte-compile-file byte-recompile-file byte-recompile-directory byte-force-recompile) "bytecomp" "lisp/bytecomp.el")
+
+(autoload 'byte-force-recompile "bytecomp" "\
+Recompile every `.el' file in DIRECTORY that already has a `.elc' file.
+Files in subdirectories of DIRECTORY are processed also." t nil)
+
+(autoload 'byte-recompile-directory "bytecomp" "\
+Recompile every `.el' file in DIRECTORY that needs recompilation.
+This is if a `.elc' file exists but is older than the `.el' file.
+Files in subdirectories of DIRECTORY are processed also unless argument
+NORECURSION is non-nil.
+
+If the `.elc' file does not exist, normally the `.el' file is *not* compiled.
+But a prefix argument (optional second arg) means ask user,
+for each such `.el' file, whether to compile it.  Prefix argument 0 means
+don't ask and compile the file anyway.
+
+A nonzero prefix argument also means ask about each subdirectory.
+
+If the fourth argument FORCE is non-nil,
+recompile every `.el' file that already has a `.elc' file." t nil)
+
+(autoload 'byte-recompile-file "bytecomp" "\
+Recompile a file of Lisp code named FILENAME if it needs recompilation.
+This is if the `.elc' file exists but is older than the `.el' file.
+
+If the `.elc' file does not exist, normally the `.el' file is *not*
+compiled.  But a prefix argument (optional second arg) means ask user
+whether to compile it.  Prefix argument 0 don't ask and recompile anyway." t nil)
+
+(autoload 'byte-compile-file "bytecomp" "\
+Compile a file of Lisp code named FILENAME into a file of byte code.
+The output file's name is made by appending `c' to the end of FILENAME.
+With prefix arg (noninteractively: 2nd arg), load the file after compiling." t nil)
+
+(autoload 'byte-compile-and-load-file "bytecomp" "\
+Compile a file of Lisp code named FILENAME into a file of byte code,
+and then load it.  The output file's name is made by appending \"c\" to
+the end of FILENAME." t nil)
+
+(autoload 'byte-compile-buffer "bytecomp" "\
+Byte-compile and evaluate contents of BUFFER (default: the current buffer)." t nil)
+
+(autoload 'compile-defun "bytecomp" "\
+Compile and evaluate the current top-level form.
+Print the result in the minibuffer.
+With argument, insert value in current buffer after the form." t nil)
+
+(autoload 'byte-compile "bytecomp" "\
+If FORM is a symbol, byte-compile its function definition.
+If FORM is a lambda or a macro, byte-compile it as a function." nil nil)
+
+(autoload 'byte-compile-sexp "bytecomp" "\
+Compile and return SEXP." nil nil)
+
+(autoload 'display-call-tree "bytecomp" "\
+Display a call graph of a specified file.
+This lists which functions have been called, what functions called
+them, and what functions they call.  The list includes all functions
+whose definitions have been compiled in this Emacs session, as well as
+all functions called by those functions.
+
+The call graph does not include macros, inline functions, or
+primitives that the byte-code interpreter knows about directly (eq,
+cons, etc.).
+
+The call tree also lists those functions which are not known to be called
+\(that is, to which no calls have been compiled), and which cannot be
+invoked interactively." t nil)
+
+(autoload 'batch-byte-compile "bytecomp" "\
+Run `byte-compile-file' on the files remaining on the command line.
+Use this from the command line, with `-batch';
+it won't work in an interactive Emacs.
+Each file is processed even if an error occurred previously.
+For example, invoke \"xemacs -batch -f batch-byte-compile $emacs/ ~/*.el\"" nil nil)
+
+(autoload 'batch-byte-recompile-directory-norecurse "bytecomp" "\
+Same as `batch-byte-recompile-directory' but without recursion." nil nil)
+
+(autoload 'batch-byte-recompile-directory "bytecomp" "\
+Runs `byte-recompile-directory' on the dirs remaining on the command line.
+Must be used only with `-batch', and kills Emacs on completion.
+For example, invoke `xemacs -batch -f batch-byte-recompile-directory .'." nil nil)
+
+;;;***
+\f
+;;;### (autoloads (compiler-macroexpand define-compiler-macro ignore-errors assert check-type typep deftype cl-struct-setf-expander defstruct define-modify-macro callf2 callf letf* letf rotatef shiftf remf cl-do-pop psetf setf get-setf-method defsetf define-setf-method declare the locally multiple-value-setq multiple-value-bind lexical-let* lexical-let symbol-macrolet macrolet labels flet progv psetq do-all-symbols do-symbols dotimes dolist do* do loop return-from return block etypecase typecase ecase case load-time-value eval-when destructuring-bind function* defmacro* defun* gentemp gensym cl-compile-time-init) "cl-macs" "lisp/cl-macs.el")
+
+(autoload 'cl-compile-time-init "cl-macs" nil nil nil)
+
+(autoload 'gensym "cl-macs" "\
+Generate a new uninterned symbol.
+The name is made by appending a number to PREFIX, default \"G\"." nil nil)
+
+(autoload 'gentemp "cl-macs" "\
+Generate a new interned symbol with a unique name.
+The name is made by appending a number to PREFIX, default \"G\"." nil nil)
+
+(autoload 'defun* "cl-macs" "\
+(defun* NAME ARGLIST [DOCSTRING] BODY...): define NAME as a function.
+Like normal `defun', except ARGLIST allows full Common Lisp conventions,
+and BODY is implicitly surrounded by (block NAME ...)." nil 'macro)
+
+(autoload 'defmacro* "cl-macs" "\
+(defmacro* NAME ARGLIST [DOCSTRING] BODY...): define NAME as a macro.
+Like normal `defmacro', except ARGLIST allows full Common Lisp conventions,
+and BODY is implicitly surrounded by (block NAME ...)." nil 'macro)
+
+(autoload 'function* "cl-macs" "\
+(function* SYMBOL-OR-LAMBDA): introduce a function.
+Like normal `function', except that if argument is a lambda form, its
+ARGLIST allows full Common Lisp conventions." nil 'macro)
+
+(autoload 'destructuring-bind "cl-macs" nil nil 'macro)
+
+(autoload 'eval-when "cl-macs" "\
+(eval-when (WHEN...) BODY...): control when BODY is evaluated.
+If `compile' is in WHEN, BODY is evaluated when compiled at top-level.
+If `load' is in WHEN, BODY is evaluated when loaded after top-level compile.
+If `eval' is in WHEN, BODY is evaluated when interpreted or at non-top-level." nil 'macro)
+
+(autoload 'load-time-value "cl-macs" "\
+Like `progn', but evaluates the body at load time.
+The result of the body appears to the compiler as a quoted constant." nil 'macro)
+
+(autoload 'case "cl-macs" "\
+(case EXPR CLAUSES...): evals EXPR, chooses from CLAUSES on that value.
+Each clause looks like (KEYLIST BODY...).  EXPR is evaluated and compared
+against each key in each KEYLIST; the corresponding BODY is evaluated.
+If no clause succeeds, case returns nil.  A single atom may be used in
+place of a KEYLIST of one atom.  A KEYLIST of `t' or `otherwise' is
+allowed only in the final clause, and matches if no other keys match.
+Key values are compared by `eql'." nil 'macro)
+
+(autoload 'ecase "cl-macs" "\
+(ecase EXPR CLAUSES...): like `case', but error if no case fits.
+`otherwise'-clauses are not allowed." nil 'macro)
+
+(autoload 'typecase "cl-macs" "\
+(typecase EXPR CLAUSES...): evals EXPR, chooses from CLAUSES on that value.
+Each clause looks like (TYPE BODY...).  EXPR is evaluated and, if it
+satisfies TYPE, the corresponding BODY is evaluated.  If no clause succeeds,
+typecase returns nil.  A TYPE of `t' or `otherwise' is allowed only in the
+final clause, and matches if no other keys match." nil 'macro)
+
+(autoload 'etypecase "cl-macs" "\
+(etypecase EXPR CLAUSES...): like `typecase', but error if no case fits.
+`otherwise'-clauses are not allowed." nil 'macro)
+
+(autoload 'block "cl-macs" "\
+(block NAME BODY...): define a lexically-scoped block named NAME.
+NAME may be any symbol.  Code inside the BODY forms can call `return-from'
+to jump prematurely out of the block.  This differs from `catch' and `throw'
+in two respects:  First, the NAME is an unevaluated symbol rather than a
+quoted symbol or other form; and second, NAME is lexically rather than
+dynamically scoped:  Only references to it within BODY will work.  These
+references may appear inside macro expansions, but not inside functions
+called from BODY." nil 'macro)
+
+(autoload 'return "cl-macs" "\
+(return [RESULT]): return from the block named nil.
+This is equivalent to `(return-from nil RESULT)'." nil 'macro)
+
+(autoload 'return-from "cl-macs" "\
+(return-from NAME [RESULT]): return from the block named NAME.
+This jump out to the innermost enclosing `(block NAME ...)' form,
+returning RESULT from that form (or nil if RESULT is omitted).
+This is compatible with Common Lisp, but note that `defun' and
+`defmacro' do not create implicit blocks as they do in Common Lisp." nil 'macro)
+
+(autoload 'loop "cl-macs" "\
+(loop CLAUSE...): The Common Lisp `loop' macro.
+Valid clauses are:
+  for VAR from/upfrom/downfrom NUM to/upto/downto/above/below NUM by NUM,
+  for VAR in LIST by FUNC, for VAR on LIST by FUNC, for VAR = INIT then EXPR,
+  for VAR across ARRAY, repeat NUM, with VAR = INIT, while COND, until COND,
+  always COND, never COND, thereis COND, collect EXPR into VAR,
+  append EXPR into VAR, nconc EXPR into VAR, sum EXPR into VAR,
+  count EXPR into VAR, maximize EXPR into VAR, minimize EXPR into VAR,
+  if COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...],
+  unless COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...],
+  do EXPRS..., initially EXPRS..., finally EXPRS..., return EXPR,
+  finally return EXPR, named NAME." nil 'macro)
+
+(autoload 'do "cl-macs" "\
+The Common Lisp `do' loop.
+Format is: (do ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" nil 'macro)
+
+(autoload 'do* "cl-macs" "\
+The Common Lisp `do*' loop.
+Format is: (do* ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)" nil 'macro)
+
+(autoload 'dolist "cl-macs" "\
+(dolist (VAR LIST [RESULT]) BODY...): loop over a list.
+Evaluate BODY with VAR bound to each `car' from LIST, in turn.
+Then evaluate RESULT to get return value, default nil." nil 'macro)
+
+(autoload 'dotimes "cl-macs" "\
+(dotimes (VAR COUNT [RESULT]) BODY...): loop a certain number of times.
+Evaluate BODY with VAR bound to successive integers from 0, inclusive,
+to COUNT, exclusive.  Then evaluate RESULT to get return value, default
+nil." nil 'macro)
+
+(autoload 'do-symbols "cl-macs" "\
+(dosymbols (VAR [OBARRAY [RESULT]]) BODY...): loop over all symbols.
+Evaluate BODY with VAR bound to each interned symbol, or to each symbol
+from OBARRAY." nil 'macro)
+
+(autoload 'do-all-symbols "cl-macs" nil nil 'macro)
+
+(autoload 'psetq "cl-macs" "\
+(psetq SYM VAL SYM VAL ...): set SYMs to the values VALs in parallel.
+This is like `setq', except that all VAL forms are evaluated (in order)
+before assigning any symbols SYM to the corresponding values." nil 'macro)
+
+(autoload 'progv "cl-macs" "\
+(progv SYMBOLS VALUES BODY...): bind SYMBOLS to VALUES dynamically in BODY.
+The forms SYMBOLS and VALUES are evaluated, and must evaluate to lists.
+Each SYMBOL in the first list is bound to the corresponding VALUE in the
+second list (or made unbound if VALUES is shorter than SYMBOLS); then the
+BODY forms are executed and their result is returned.  This is much like
+a `let' form, except that the list of symbols can be computed at run-time." nil 'macro)
+
+(autoload 'flet "cl-macs" "\
+(flet ((FUNC ARGLIST BODY...) ...) FORM...): make temporary function defns.
+This is an analogue of `let' that operates on the function cell of FUNC
+rather than its value cell.  The FORMs are evaluated with the specified
+function definitions in place, then the definitions are undone (the FUNCs
+go back to their previous definitions, or lack thereof)." nil 'macro)
+
+(autoload 'labels "cl-macs" "\
+(labels ((FUNC ARGLIST BODY...) ...) FORM...): make temporary func bindings.
+This is like `flet', except the bindings are lexical instead of dynamic.
+Unlike `flet', this macro is fully complaint with the Common Lisp standard." nil 'macro)
+
+(autoload 'macrolet "cl-macs" "\
+(macrolet ((NAME ARGLIST BODY...) ...) FORM...): make temporary macro defns.
+This is like `flet', but for macros instead of functions." nil 'macro)
+
+(autoload 'symbol-macrolet "cl-macs" "\
+(symbol-macrolet ((NAME EXPANSION) ...) FORM...): make symbol macro defns.
+Within the body FORMs, references to the variable NAME will be replaced
+by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...)." nil 'macro)
+
+(autoload 'lexical-let "cl-macs" "\
+(lexical-let BINDINGS BODY...): like `let', but lexically scoped.
+The main visible difference is that lambdas inside BODY will create
+lexical closures as in Common Lisp." nil 'macro)
+
+(autoload 'lexical-let* "cl-macs" "\
+(lexical-let* BINDINGS BODY...): like `let*', but lexically scoped.
+The main visible difference is that lambdas inside BODY will create
+lexical closures as in Common Lisp." nil 'macro)
+
+(autoload 'multiple-value-bind "cl-macs" "\
+(multiple-value-bind (SYM SYM...) FORM BODY): collect multiple return values.
+FORM must return a list; the BODY is then executed with the first N elements
+of this list bound (`let'-style) to each of the symbols SYM in turn.  This
+is analogous to the Common Lisp `multiple-value-bind' macro, using lists to
+simulate true multiple return values.  For compatibility, (values A B C) is
+a synonym for (list A B C)." nil 'macro)
+
+(autoload 'multiple-value-setq "cl-macs" "\
+(multiple-value-setq (SYM SYM...) FORM): collect multiple return values.
+FORM must return a list; the first N elements of this list are stored in
+each of the symbols SYM in turn.  This is analogous to the Common Lisp
+`multiple-value-setq' macro, using lists to simulate true multiple return
+values.  For compatibility, (values A B C) is a synonym for (list A B C)." nil 'macro)
+
+(autoload 'locally "cl-macs" nil nil 'macro)
+
+(autoload 'the "cl-macs" nil nil 'macro)
+
+(autoload 'declare "cl-macs" nil nil 'macro)
+
+(autoload 'define-setf-method "cl-macs" "\
+(define-setf-method NAME ARGLIST BODY...): define a `setf' method.
+This method shows how to handle `setf's to places of the form (NAME ARGS...).
+The argument forms ARGS are bound according to ARGLIST, as if NAME were
+going to be expanded as a macro, then the BODY forms are executed and must
+return a list of five elements: a temporary-variables list, a value-forms
+list, a store-variables list (of length one), a store-form, and an access-
+form.  See `defsetf' for a simpler way to define most setf-methods." nil 'macro)
+
+(autoload 'defsetf "cl-macs" "\
+(defsetf NAME FUNC): define a `setf' method.
+This macro is an easy-to-use substitute for `define-setf-method' that works
+well for simple place forms.  In the simple `defsetf' form, `setf's of
+the form (setf (NAME ARGS...) VAL) are transformed to function or macro
+calls of the form (FUNC ARGS... VAL).  Example: (defsetf aref aset).
+Alternate form: (defsetf NAME ARGLIST (STORE) BODY...).
+Here, the above `setf' call is expanded by binding the argument forms ARGS
+according to ARGLIST, binding the value form VAL to STORE, then executing
+BODY, which must return a Lisp form that does the necessary `setf' operation.
+Actually, ARGLIST and STORE may be bound to temporary variables which are
+introduced automatically to preserve proper execution order of the arguments.
+Example: (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))." nil 'macro)
+
+(autoload 'get-setf-method "cl-macs" "\
+Return a list of five values describing the setf-method for PLACE.
+PLACE may be any Lisp form which can appear as the PLACE argument to
+a macro like `setf' or `incf'." nil nil)
+
+(autoload 'setf "cl-macs" "\
+(setf PLACE VAL PLACE VAL ...): set each PLACE to the value of its VAL.
+This is a generalized version of `setq'; the PLACEs may be symbolic
+references such as (car x) or (aref x i), as well as plain symbols.
+For example, (setf (cadar x) y) is equivalent to (setcar (cdar x) y).
+The return value is the last VAL in the list." nil 'macro)
+
+(autoload 'psetf "cl-macs" "\
+(psetf PLACE VAL PLACE VAL ...): set PLACEs to the values VALs in parallel.
+This is like `setf', except that all VAL forms are evaluated (in order)
+before assigning any PLACEs to the corresponding values." nil 'macro)
+
+(autoload 'cl-do-pop "cl-macs" nil nil nil)
+
+(autoload 'remf "cl-macs" "\
+(remf PLACE TAG): remove TAG from property list PLACE.
+PLACE may be a symbol, or any generalized variable allowed by `setf'.
+The form returns true if TAG was found and removed, nil otherwise." nil 'macro)
+
+(autoload 'shiftf "cl-macs" "\
+(shiftf PLACE PLACE... VAL): shift left among PLACEs.
+Example: (shiftf A B C) sets A to B, B to C, and returns the old A.
+Each PLACE may be a symbol, or any generalized variable allowed by `setf'." nil 'macro)
+
+(autoload 'rotatef "cl-macs" "\
+(rotatef PLACE...): rotate left among PLACEs.
+Example: (rotatef A B C) sets A to B, B to C, and C to A.  It returns nil.
+Each PLACE may be a symbol, or any generalized variable allowed by `setf'." nil 'macro)
+
+(autoload 'letf "cl-macs" "\
+(letf ((PLACE VALUE) ...) BODY...): temporarily bind to PLACEs.
+This is the analogue of `let', but with generalized variables (in the
+sense of `setf') for the PLACEs.  Each PLACE is set to the corresponding
+VALUE, then the BODY forms are executed.  On exit, either normally or
+because of a `throw' or error, the PLACEs are set back to their original
+values.  Note that this macro is *not* available in Common Lisp.
+As a special case, if `(PLACE)' is used instead of `(PLACE VALUE)',
+the PLACE is not modified before executing BODY." nil 'macro)
+
+(autoload 'letf* "cl-macs" "\
+(letf* ((PLACE VALUE) ...) BODY...): temporarily bind to PLACEs.
+This is the analogue of `let*', but with generalized variables (in the
+sense of `setf') for the PLACEs.  Each PLACE is set to the corresponding
+VALUE, then the BODY forms are executed.  On exit, either normally or
+because of a `throw' or error, the PLACEs are set back to their original
+values.  Note that this macro is *not* available in Common Lisp.
+As a special case, if `(PLACE)' is used instead of `(PLACE VALUE)',
+the PLACE is not modified before executing BODY." nil 'macro)
+
+(autoload 'callf "cl-macs" "\
+(callf FUNC PLACE ARGS...): set PLACE to (FUNC PLACE ARGS...).
+FUNC should be an unquoted function name.  PLACE may be a symbol,
+or any generalized variable allowed by `setf'." nil 'macro)
+
+(autoload 'callf2 "cl-macs" "\
+(callf2 FUNC ARG1 PLACE ARGS...): set PLACE to (FUNC ARG1 PLACE ARGS...).
+Like `callf', but PLACE is the second argument of FUNC, not the first." nil 'macro)
+
+(autoload 'define-modify-macro "cl-macs" "\
+(define-modify-macro NAME ARGLIST FUNC): define a `setf'-like modify macro.
+If NAME is called, it combines its PLACE argument with the other arguments
+from ARGLIST using FUNC: (define-modify-macro incf (&optional (n 1)) +)" nil 'macro)
+
+(autoload 'defstruct "cl-macs" "\
+(defstruct (NAME OPTIONS...) (SLOT SLOT-OPTS...)...): define a struct type.
+This macro defines a new Lisp data type called NAME, which contains data
+stored in SLOTs.  This defines a `make-NAME' constructor, a `copy-NAME'
+copier, a `NAME-p' predicate, and setf-able `NAME-SLOT' accessors." nil 'macro)
+
+(autoload 'cl-struct-setf-expander "cl-macs" nil nil nil)
+
+(autoload 'deftype "cl-macs" "\
+(deftype NAME ARGLIST BODY...): define NAME as a new data type.
+The type name can then be used in `typecase', `check-type', etc." nil 'macro)
+
+(autoload 'typep "cl-macs" "\
+Check that OBJECT is of type TYPE.
+TYPE is a Common Lisp-style type specifier." nil nil)
+
+(autoload 'check-type "cl-macs" "\
+Verify that FORM is of type TYPE; signal an error if not.
+STRING is an optional description of the desired type." nil 'macro)
+
+(autoload 'assert "cl-macs" "\
+Verify that FORM returns non-nil; signal an error if not.
+Second arg SHOW-ARGS means to include arguments of FORM in message.
+Other args STRING and ARGS... are arguments to be passed to `error'.
+They are not evaluated unless the assertion fails.  If STRING is
+omitted, a default message listing FORM itself is used." nil 'macro)
+
+(autoload 'ignore-errors "cl-macs" "\
+Execute FORMS; if an error occurs, return nil.
+Otherwise, return result of last FORM." nil 'macro)
+
+(autoload 'define-compiler-macro "cl-macs" "\
+(define-compiler-macro FUNC ARGLIST BODY...): Define a compiler-only macro.
+This is like `defmacro', but macro expansion occurs only if the call to
+FUNC is compiled (i.e., not interpreted).  Compiler macros should be used
+for optimizing the way calls to FUNC are compiled; the form returned by
+BODY should do the same thing as a call to the normal function called
+FUNC, though possibly more efficiently.  Note that, like regular macros,
+compiler macros are expanded repeatedly until no further expansions are
+possible.  Unlike regular macros, BODY can decide to \"punt\" and leave the
+original function call alone by declaring an initial `&whole foo' parameter
+and then returning foo." nil 'macro)
+
+(autoload 'compiler-macroexpand "cl-macs" nil nil nil)
+
+;;;***
+\f
+;;;### (autoloads (batch-remove-old-elc) "cleantree" "lisp/cleantree.el")
+
+(autoload 'batch-remove-old-elc "cleantree" nil nil nil)
+
+;;;***
+\f
+;;;### (autoloads (config-value config-value-hash-table) "config" "lisp/config.el")
+
+(autoload 'config-value-hash-table "config" "\
+Return hashtable of configuration parameters and their values." nil nil)
+
+(autoload 'config-value "config" "\
+Return the value of the configuration parameter CONFIG_SYMBOL." nil nil)
+
+;;;***
+\f
+;;;### (autoloads (Custom-make-dependencies) "cus-dep" "lisp/cus-dep.el")
+
+(autoload 'Custom-make-dependencies "cus-dep" "\
+Extract custom dependencies from .el files in SUBDIRS.
+SUBDIRS is a list of directories.  If it is nil, the command-line
+arguments are used.  If it is a string, only that directory is
+processed.  This function is especially useful in batch mode.
+
+Batch usage: xemacs -batch -l cus-dep.el -f Custom-make-dependencies DIRS" t nil)
+
+;;;***
+\f
+;;;### (autoloads (customize-menu-create custom-menu-create custom-save-all customize-save-customized customize-browse custom-buffer-create-other-window custom-buffer-create customize-apropos-groups customize-apropos-faces customize-apropos-options customize-apropos customize-saved customize-customized customize-face-other-window customize-face customize-option-other-window customize-changed-options customize-variable customize-other-window customize customize-save-variable customize-set-variable customize-set-value) "cus-edit" "lisp/cus-edit.el")
+
+(autoload 'customize-set-value "cus-edit" "\
+Set VARIABLE to VALUE.  VALUE is a Lisp object.
+
+If VARIABLE has a `variable-interactive' property, that is used as if
+it were the arg to `interactive' (which see) to interactively read the value.
+
+If VARIABLE has a `custom-type' property, it must be a widget and the
+`:prompt-value' property of that widget will be used for reading the value." t nil)
+
+(autoload 'customize-set-variable "cus-edit" "\
+Set the default for VARIABLE to VALUE.  VALUE is a Lisp object.
+
+If VARIABLE has a `custom-set' property, that is used for setting
+VARIABLE, otherwise `set-default' is used.
+
+The `customized-value' property of the VARIABLE will be set to a list
+with a quoted VALUE as its sole list member.
+
+If VARIABLE has a `variable-interactive' property, that is used as if
+it were the arg to `interactive' (which see) to interactively read the value.
+
+If VARIABLE has a `custom-type' property, it must be a widget and the
+`:prompt-value' property of that widget will be used for reading the value. " t nil)
+
+(autoload 'customize-save-variable "cus-edit" "\
+Set the default for VARIABLE to VALUE, and save it for future sessions.
+If VARIABLE has a `custom-set' property, that is used for setting
+VARIABLE, otherwise `set-default' is used.
+
+The `customized-value' property of the VARIABLE will be set to a list
+with a quoted VALUE as its sole list member.
+
+If VARIABLE has a `variable-interactive' property, that is used as if
+it were the arg to `interactive' (which see) to interactively read the value.
+
+If VARIABLE has a `custom-type' property, it must be a widget and the
+`:prompt-value' property of that widget will be used for reading the value. " t nil)
+
+(autoload 'customize "cus-edit" "\
+Select a customization buffer which you can use to set user options.
+User options are structured into \"groups\".
+The default group is `Emacs'." t nil)
+
+(defalias 'customize-group 'customize)
+
+(autoload 'customize-other-window "cus-edit" "\
+Customize SYMBOL, which must be a customization group." t nil)
+
+(defalias 'customize-group-other-window 'customize-other-window)
+
+(defalias 'customize-option 'customize-variable)
+
+(autoload 'customize-variable "cus-edit" "\
+Customize SYMBOL, which must be a user option variable." t nil)
+
+(autoload 'customize-changed-options "cus-edit" "\
+Customize all user option variables whose default values changed recently.
+This means, in other words, variables defined with a `:version' keyword." t nil)
+
+(defalias 'customize-variable-other-window 'customize-option-other-window)
+
+(autoload 'customize-option-other-window "cus-edit" "\
+Customize SYMBOL, which must be a user option variable.
+Show the buffer in another window, but don't select it." t nil)
+
+(autoload 'customize-face "cus-edit" "\
+Customize SYMBOL, which should be a face name or nil.
+If SYMBOL is nil, customize all faces." t nil)
+
+(autoload 'customize-face-other-window "cus-edit" "\
+Show customization buffer for FACE in other window." t nil)
+
+(autoload 'customize-customized "cus-edit" "\
+Customize all user options set since the last save in this session." t nil)
+
+(autoload 'customize-saved "cus-edit" "\
+Customize all already saved user options." t nil)
+
+(autoload 'customize-apropos "cus-edit" "\
+Customize all user options matching REGEXP.
+If ALL is `options', include only options.
+If ALL is `faces', include only faces.
+If ALL is `groups', include only groups.
+If ALL is t (interactively, with prefix arg), include options which are not
+user-settable, as well as faces and groups." t nil)
+
+(autoload 'customize-apropos-options "cus-edit" "\
+Customize all user options matching REGEXP.
+With prefix arg, include options which are not user-settable." t nil)
+
+(autoload 'customize-apropos-faces "cus-edit" "\
+Customize all user faces matching REGEXP." t nil)
+
+(autoload 'customize-apropos-groups "cus-edit" "\
+Customize all user groups matching REGEXP." t nil)
+
+(autoload 'custom-buffer-create "cus-edit" "\
+Create a buffer containing OPTIONS.
+Optional NAME is the name of the buffer.
+OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
+SYMBOL is a customization option, and WIDGET is a widget for editing
+that option." nil nil)
+
+(autoload 'custom-buffer-create-other-window "cus-edit" "\
+Create a buffer containing OPTIONS.
+Optional NAME is the name of the buffer.
+OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
+SYMBOL is a customization option, and WIDGET is a widget for editing
+that option." nil nil)
+
+(autoload 'customize-browse "cus-edit" "\
+Create a tree browser for the customize hierarchy." t nil)
+
+(defcustom custom-file "~/.emacs" "File used for storing customization information.\nIf you change this from the default \"~/.emacs\" you need to\nexplicitly load that file for the settings to take effect." :type 'file :group 'customize)
+
+(autoload 'customize-save-customized "cus-edit" "\
+Save all user options which have been set in this session." t nil)
+
+(autoload 'custom-save-all "cus-edit" "\
+Save all customizations in `custom-file'." nil nil)
+
+(autoload 'custom-menu-create "cus-edit" "\
+Create menu for customization group SYMBOL.
+The menu is in a format applicable to `easy-menu-define'." nil nil)
+
+(autoload 'customize-menu-create "cus-edit" "\
+Return a customize menu for customization group SYMBOL.
+If optional NAME is given, use that as the name of the menu.
+Otherwise the menu will be named `Customize'.
+The format is suitable for use with `easy-menu-define'." nil nil)
+
+;;;***
+\f
+;;;### (autoloads (custom-set-faces custom-declare-face) "cus-face" "lisp/cus-face.el")
+
+(autoload 'custom-declare-face "cus-face" "\
+Like `defface', but FACE is evaluated as a normal argument." nil nil)
+
+(autoload 'custom-set-faces "cus-face" "\
+Initialize faces according to user preferences.
+The arguments should be a list where each entry has the form:
+
+  (FACE SPEC [NOW])
+
+SPEC will be stored as the saved value for FACE.  If NOW is present
+and non-nil, FACE will also be created according to SPEC.
+
+See `defface' for the format of SPEC." nil nil)
+
+;;;***
+\f
+;;;### (autoloads (disassemble) "disass" "lisp/disass.el")
+
+(autoload 'disassemble "disass" "\
+Print disassembled code for OBJECT in (optional) BUFFER.
+OBJECT can be a symbol defined as a function, or a function itself
+\(a lambda expression or a compiled-function object).
+If OBJECT is not already compiled, we compile it, but do not
+redefine OBJECT if it is a symbol." t nil)
+
+;;;***
+\f
+;;;### (autoloads (standard-display-european standard-display-underline standard-display-graphic standard-display-g1 standard-display-ascii standard-display-default standard-display-8bit make-display-table describe-current-display-table) "disp-table" "lisp/disp-table.el")
+
+(autoload 'describe-current-display-table "disp-table" "\
+Describe the display table in use in the selected window and buffer." t nil)
+
+(autoload 'make-display-table "disp-table" "\
+Return a new, empty display table." nil nil)
+
+(autoload 'standard-display-8bit "disp-table" "\
+Display characters in the range L to H literally." nil nil)
+
+(autoload 'standard-display-default "disp-table" "\
+Display characters in the range L to H using the default notation." nil nil)
+
+(autoload 'standard-display-ascii "disp-table" "\
+Display character C using printable string S." nil nil)
+
+(autoload 'standard-display-g1 "disp-table" "\
+Display character C as character SC in the g1 character set.
+This function assumes that your terminal uses the SO/SI characters;
+it is meaningless for an X frame." nil nil)
+
+(autoload 'standard-display-graphic "disp-table" "\
+Display character C as character GC in graphics character set.
+This function assumes VT100-compatible escapes; it is meaningless for an
+X frame." nil nil)
+
+(autoload 'standard-display-underline "disp-table" "\
+Display character C as character UC plus underlining." nil nil)
+
+(autoload 'standard-display-european "disp-table" "\
+Toggle display of European characters encoded with ISO 8859.
+When enabled, characters in the range of 160 to 255 display not
+as octal escapes, but as accented characters.
+With prefix argument, enable European character display iff arg is positive." t nil)
+
+;;;***
+\f
+;;;### (autoloads nil "easymenu" "lisp/easymenu.el")
+
+;;;***
+\f
+;;;### (autoloads (tags-apropos list-tags tags-query-replace tags-search tags-loop-continue next-file tag-complete-symbol find-tag-other-window find-tag visit-tags-table) "etags" "lisp/etags.el")
+
+(autoload 'visit-tags-table "etags" "\
+Tell tags commands to use tags table file FILE when all else fails.
+FILE should be the name of a file created with the `etags' program.
+A directory name is ok too; it means file TAGS in that directory." t nil)
+
+(autoload 'find-tag "etags" "\
+*Find tag whose name contains TAGNAME.
+ Selects the buffer that the tag is contained in
+and puts point at its definition.
+ If TAGNAME is a null string, the expression in the buffer
+around or before point is used as the tag name.
+ If called interactively with a numeric argument, searches for the next tag
+in the tag table that matches the tagname used in the previous find-tag.
+ If second arg OTHER-WINDOW is non-nil, uses another window to display
+the tag.
+
+This version of this function supports multiple active tags tables,
+and completion.
+
+Variables of note:
+
+  tag-table-alist              controls which tables apply to which buffers
+  tags-file-name               a default tags table
+  tags-build-completion-table   controls completion behavior
+  buffer-tag-table             another way of specifying a buffer-local table
+  make-tags-files-invisible    whether tags tables should be very hidden
+  tag-mark-stack-max           how many tags-based hops to remember" t nil)
+
+(autoload 'find-tag-other-window "etags" "\
+*Find tag whose name contains TAGNAME.
+ Selects the buffer that the tag is contained in in another window
+and puts point at its definition.
+ If TAGNAME is a null string, the expression in the buffer
+around or before point is used as the tag name.
+ If second arg NEXT is non-nil (interactively, with prefix arg),
+searches for the next tag in the tag table
+that matches the tagname used in the previous find-tag.
+
+This version of this function supports multiple active tags tables,
+and completion.
+
+Variables of note:
+
+  tag-table-alist              controls which tables apply to which buffers
+  tags-file-name               a default tags table
+  tags-build-completion-table   controls completion behavior
+  buffer-tag-table             another way of specifying a buffer-local table
+  make-tags-files-invisible    whether tags tables should be very hidden
+  tag-mark-stack-max           how many tags-based hops to remember" t nil)
+
+(autoload 'tag-complete-symbol "etags" "\
+The function used to do tags-completion (using 'tag-completion-predicate)." t nil)
+
+(autoload 'next-file "etags" "\
+Select next file among files in current tag table(s).
+
+A first argument of t (prefix arg, if interactive) initializes to the
+beginning of the list of files in the (first) tags table.  If the argument
+is neither nil nor t, it is evalled to initialize the list of files.
+
+Non-nil second argument NOVISIT means use a temporary buffer
+to save time and avoid uninteresting warnings.
+
+Value is nil if the file was already visited;
+if the file was newly read in, the value is the filename." t nil)
+
+(autoload 'tags-loop-continue "etags" "\
+Continue last \\[tags-search] or \\[tags-query-replace] command.
+Used noninteractively with non-nil argument to begin such a command (the
+argument is passed to `next-file', which see).
+Two variables control the processing we do on each file:
+the value of `tags-loop-scan' is a form to be executed on each file
+to see if it is interesting (it returns non-nil if so)
+and `tags-loop-operate' is a form to execute to operate on an interesting file
+If the latter returns non-nil, we exit; otherwise we scan the next file." t nil)
+
+(autoload 'tags-search "etags" "\
+Search through all files listed in tags table for match for REGEXP.
+Stops when a match is found.
+To continue searching for next match, use command \\[tags-loop-continue].
+
+See documentation of variable `tag-table-alist'." t nil)
+
+(autoload 'tags-query-replace "etags" "\
+Query-replace-regexp FROM with TO through all files listed in tags table.
+Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
+If you exit (\\[keyboard-quit] or ESC), you can resume the query-replace
+with the command \\[tags-loop-continue].
+
+See documentation of variable `tag-table-alist'." t nil)
+
+(autoload 'list-tags "etags" "\
+Display list of tags in FILE." t nil)
+
+(autoload 'tags-apropos "etags" "\
+Display list of all tags in tag table REGEXP matches." t nil)
+(define-key esc-map "*" 'pop-tag-mark)
+
+;;;***
+\f
+;;;### (autoloads (finder-by-keyword) "finder" "lisp/finder.el")
+
+(autoload 'finder-by-keyword "finder" "\
+Find packages matching a given keyword." t nil)
+
+;;;***
+\f
+;;;### (autoloads (font-lock-set-defaults-1 font-lock-fontify-buffer turn-off-font-lock turn-on-font-lock font-lock-mode) "font-lock" "lisp/font-lock.el")
+
+(defcustom font-lock-auto-fontify t "*Whether font-lock should automatically fontify files as they're loaded.\nThis will only happen if font-lock has fontifying keywords for the major\nmode of the file.  You can get finer-grained control over auto-fontification\nby using this variable in combination with `font-lock-mode-enable-list' or\n`font-lock-mode-disable-list'." :type 'boolean :group 'font-lock)
+
+(defcustom font-lock-mode-enable-list nil "*List of modes to auto-fontify, if `font-lock-auto-fontify' is nil." :type '(repeat (symbol :tag "Mode")) :group 'font-lock)
+
+(defcustom font-lock-mode-disable-list nil "*List of modes not to auto-fontify, if `font-lock-auto-fontify' is t." :type '(repeat (symbol :tag "Mode")) :group 'font-lock)
+
+(defcustom font-lock-use-colors '(color) "*Specification for when Font Lock will set up color defaults.\nNormally this should be '(color), meaning that Font Lock will set up\ncolor defaults that are only used on color displays.  Set this to nil\nif you don't want Font Lock to set up color defaults at all.  This\nshould be one of\n\n-- a list of valid tags, meaning that the color defaults will be used\n   when all of the tags apply. (e.g. '(color x))\n-- a list whose first element is 'or and whose remaining elements are\n   lists of valid tags, meaning that the defaults will be used when\n   any of the tag lists apply.\n-- nil, meaning that the defaults should not be set up at all.\n\n(If you specify face values in your init file, they will override any\nthat Font Lock specifies, regardless of whether you specify the face\nvalues before or after loading Font Lock.)\n\nSee also `font-lock-use-fonts'.  If you want more control over the faces\nused for fontification, see the documentation of `font-lock-mode' for\nhow to do it." :type 'sexp :group 'font-lock)
+
+(defcustom font-lock-use-fonts '(or (mono) (grayscale)) "*Specification for when Font Lock will set up non-color defaults.\n\nNormally this should be '(or (mono) (grayscale)), meaning that Font\nLock will set up non-color defaults that are only used on either mono\nor grayscale displays.  Set this to nil if you don't want Font Lock to\nset up non-color defaults at all.  This should be one of\n\n-- a list of valid tags, meaning that the non-color defaults will be used\n   when all of the tags apply. (e.g. '(grayscale x))\n-- a list whose first element is 'or and whose remaining elements are\n   lists of valid tags, meaning that the defaults will be used when\n   any of the tag lists apply.\n-- nil, meaning that the defaults should not be set up at all.\n\n(If you specify face values in your init file, they will override any\nthat Font Lock specifies, regardless of whether you specify the face\nvalues before or after loading Font Lock.)\n\nSee also `font-lock-use-colors'.  If you want more control over the faces\nused for fontification, see the documentation of `font-lock-mode' for\nhow to do it." :type 'sexp :group 'font-lock)
+
+(defcustom font-lock-maximum-decoration t "*If non-nil, the maximum decoration level for fontifying.\nIf nil, use the minimum decoration (equivalent to level 0).\nIf t, use the maximum decoration available.\nIf a number, use that level of decoration (or if not available the maximum).\nIf a list, each element should be a cons pair of the form (MAJOR-MODE . LEVEL),\nwhere MAJOR-MODE is a symbol or t (meaning the default).  For example:\n ((c++-mode . 2) (c-mode . t) (t . 1))\nmeans use level 2 decoration for buffers in `c++-mode', the maximum decoration\navailable for buffers in `c-mode', and level 1 decoration otherwise." :type '(choice (const :tag "default" nil) (const :tag "maximum" t) (integer :tag "level" 1) (repeat :menu-tag "mode specific" :tag "mode specific" :value ((t . t)) (cons :tag "Instance" (radio :tag "Mode" (const :tag "all" t) (symbol :tag "name")) (radio :tag "Decoration" (const :tag "default" nil) (const :tag "maximum" t) (integer :tag "level" 1))))) :group 'font-lock)
+
+(define-obsolete-variable-alias 'font-lock-use-maximal-decoration 'font-lock-maximum-decoration)
+
+(defcustom font-lock-maximum-size (* 250 1024) "*If non-nil, the maximum size for buffers for fontifying.\nOnly buffers less than this can be fontified when Font Lock mode is turned on.\nIf nil, means size is irrelevant.\nIf a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE),\nwhere MAJOR-MODE is a symbol or t (meaning the default).  For example:\n ((c++-mode . 256000) (c-mode . 256000) (rmail-mode . 1048576))\nmeans that the maximum size is 250K for buffers in `c++-mode' or `c-mode', one\nmegabyte for buffers in `rmail-mode', and size is irrelevant otherwise." :type '(choice (const :tag "none" nil) (integer :tag "size") (repeat :menu-tag "mode specific" :tag "mode specific" :value ((t)) (cons :tag "Instance" (radio :tag "Mode" (const :tag "all" t) (symbol :tag "name")) (radio :tag "Size" (const :tag "none" nil) (integer :tag "size"))))) :group 'font-lock)
+
+(defvar font-lock-keywords nil "\
+A list of the keywords to highlight.
+Each element should be of the form:
+
+ MATCHER
+ (MATCHER . MATCH)
+ (MATCHER . FACENAME)
+ (MATCHER . HIGHLIGHT)
+ (MATCHER HIGHLIGHT ...)
+ (eval . FORM)
+
+where HIGHLIGHT should be either MATCH-HIGHLIGHT or MATCH-ANCHORED.
+
+FORM is an expression, whose value should be a keyword element,
+evaluated when the keyword is (first) used in a buffer.  This feature
+can be used to provide a keyword that can only be generated when Font
+Lock mode is actually turned on.
+
+For highlighting single items, typically only MATCH-HIGHLIGHT is required.
+However, if an item or (typically) items is to be highlighted following the
+instance of another item (the anchor) then MATCH-ANCHORED may be required.
+
+MATCH-HIGHLIGHT should be of the form:
+
+ (MATCH FACENAME OVERRIDE LAXMATCH)
+
+Where MATCHER can be either the regexp to search for, a variable
+containing the regexp to search for, or the function to call to make
+the search (called with one argument, the limit of the search).  MATCH
+is the subexpression of MATCHER to be highlighted.  FACENAME is either
+a symbol naming a face, or an expression whose value is the face name
+to use.  If you want FACENAME to be a symbol that evaluates to a face,
+use a form like \"(progn sym)\".
+
+OVERRIDE and LAXMATCH are flags.  If OVERRIDE is t, existing fontification may
+be overwritten.  If `keep', only parts not already fontified are highlighted.
+If `prepend' or `append', existing fontification is merged with the new, in
+which the new or existing fontification, respectively, takes precedence.
+If LAXMATCH is non-nil, no error is signalled if there is no MATCH in MATCHER.
+
+For example, an element of the form highlights (if not already highlighted):
+
+ \"\\\\\\=<foo\\\\\\=>\"               Discrete occurrences of \"foo\" in the value of the
+                       variable `font-lock-keyword-face'.
+ (\"fu\\\\(bar\\\\)\" . 1)     Substring \"bar\" within all occurrences of \"fubar\" in
+                       the value of `font-lock-keyword-face'.
+ (\"fubar\" . fubar-face)      Occurrences of \"fubar\" in the value of `fubar-face'.
+ (\"foo\\\\|bar\" 0 foo-bar-face t)
+                       Occurrences of either \"foo\" or \"bar\" in the value
+                       of `foo-bar-face', even if already highlighted.
+
+MATCH-ANCHORED should be of the form:
+
+ (MATCHER PRE-MATCH-FORM POST-MATCH-FORM MATCH-HIGHLIGHT ...)
+
+Where MATCHER is as for MATCH-HIGHLIGHT with one exception; see below.
+PRE-MATCH-FORM and POST-MATCH-FORM are evaluated before the first, and after
+the last, instance MATCH-ANCHORED's MATCHER is used.  Therefore they can be
+used to initialise before, and cleanup after, MATCHER is used.  Typically,
+PRE-MATCH-FORM is used to move to some position relative to the original
+MATCHER, before starting with MATCH-ANCHORED's MATCHER.  POST-MATCH-FORM might
+be used to move, before resuming with MATCH-ANCHORED's parent's MATCHER.
+
+For example, an element of the form highlights (if not already highlighted):
+
+ (\"\\\\\\=<anchor\\\\\\=>\" (0 anchor-face) (\"\\\\\\=<item\\\\\\=>\" nil nil (0 item-face)))
+
+ Discrete occurrences of \"anchor\" in the value of `anchor-face', and subsequent
+ discrete occurrences of \"item\" (on the same line) in the value of `item-face'.
+ (Here PRE-MATCH-FORM and POST-MATCH-FORM are nil.  Therefore \"item\" is
+ initially searched for starting from the end of the match of \"anchor\", and
+ searching for subsequent instance of \"anchor\" resumes from where searching
+ for \"item\" concluded.)
+
+The above-mentioned exception is as follows.  The limit of the MATCHER search
+defaults to the end of the line after PRE-MATCH-FORM is evaluated.
+However, if PRE-MATCH-FORM returns a position greater than the position after
+PRE-MATCH-FORM is evaluated, that position is used as the limit of the search.
+It is generally a bad idea to return a position greater than the end of the
+line, i.e., cause the MATCHER search to span lines.
+
+Note that the MATCH-ANCHORED feature is experimental; in the future, we may
+replace it with other ways of providing this functionality.
+
+These regular expressions should not match text which spans lines.  While
+\\[font-lock-fontify-buffer] handles multi-line patterns correctly, updating
+when you edit the buffer does not, since it considers text one line at a time.
+
+Be very careful composing regexps for this list;
+the wrong pattern can dramatically slow things down!")
+
+(make-variable-buffer-local 'font-lock-keywords)
+
+(defcustom font-lock-mode nil "Non nil means `font-lock-mode' is on" :group 'font-lock :type 'boolean :initialize 'custom-initialize-default :require 'font-lock :set '(lambda (var val) (font-lock-mode (or val 0))))
+
+(defvar font-lock-mode-hook nil "\
+Function or functions to run on entry to font-lock-mode.")
+
+(autoload 'font-lock-mode "font-lock" "\
+Toggle Font Lock Mode.
+With arg, turn font-lock mode on if and only if arg is positive.
+
+When Font Lock mode is enabled, text is fontified as you type it:
+
+ - Comments are displayed in `font-lock-comment-face';
+ - Strings are displayed in `font-lock-string-face';
+ - Documentation strings (in Lisp-like languages) are displayed in
+   `font-lock-doc-string-face';
+ - Language keywords (\"reserved words\") are displayed in
+   `font-lock-keyword-face';
+ - Function names in their defining form are displayed in
+   `font-lock-function-name-face';
+ - Variable names in their defining form are displayed in
+   `font-lock-variable-name-face';
+ - Type names are displayed in `font-lock-type-face';
+ - References appearing in help files and the like are displayed
+   in `font-lock-reference-face';
+ - Preprocessor declarations are displayed in
+  `font-lock-preprocessor-face';
+
+   and
+
+ - Certain other expressions are displayed in other faces according
+   to the value of the variable `font-lock-keywords'.
+
+Where modes support different levels of fontification, you can use the variable
+`font-lock-maximum-decoration' to specify which level you generally prefer.
+When you turn Font Lock mode on/off the buffer is fontified/defontified, though
+fontification occurs only if the buffer is less than `font-lock-maximum-size'.
+To fontify a buffer without turning on Font Lock mode, and regardless of buffer
+size, you can use \\[font-lock-fontify-buffer].
+
+See the variable `font-lock-keywords' for customization." t nil)
+
+(autoload 'turn-on-font-lock "font-lock" "\
+Unconditionally turn on Font Lock mode." nil nil)
+
+(autoload 'turn-off-font-lock "font-lock" "\
+Unconditionally turn off Font Lock mode." nil nil)
+
+(autoload 'font-lock-fontify-buffer "font-lock" "\
+Fontify the current buffer the way `font-lock-mode' would.
+See `font-lock-mode' for details.
+
+This can take a while for large buffers." t nil)
+
+(autoload 'font-lock-set-defaults-1 "font-lock" nil nil nil)
+
+(add-minor-mode 'font-lock-mode " Font")
+
+;;;***
+\f
+;;;### (autoloads (x-font-build-cache font-default-size-for-device font-default-encoding-for-device font-default-registry-for-device font-default-family-for-device font-default-object-for-device font-default-font-for-device font-create-object) "font" "lisp/font.el")
+
+(autoload 'font-create-object "font" nil nil nil)
+
+(autoload 'font-default-font-for-device "font" nil nil nil)
+
+(autoload 'font-default-object-for-device "font" nil nil nil)
+
+(autoload 'font-default-family-for-device "font" nil nil nil)
+
+(autoload 'font-default-registry-for-device "font" nil nil nil)
+
+(autoload 'font-default-encoding-for-device "font" nil nil nil)
+
+(autoload 'font-default-size-for-device "font" nil nil nil)
+
+(autoload 'x-font-build-cache "font" nil nil nil)
+
+;;;***
+\f
+;;;### (autoloads (gnuserv-start gnuserv-running-p) "gnuserv" "lisp/gnuserv.el")
+
+(defcustom gnuserv-frame nil "*The frame to be used to display all edited files.\nIf nil, then a new frame is created for each file edited.\nIf t, then the currently selected frame will be used.\nIf a function, then this will be called with a symbol `x' or `tty' as the\nonly argument, and its return value will be interpreted as above." :tag "Gnuserv Frame" :type '(radio (const :tag "Create new frame each time" nil) (const :tag "Use selected frame" t) (function-item :tag "Use main Emacs frame" gnuserv-main-frame-function) (function-item :tag "Use visible frame, otherwise create new" gnuserv-visible-frame-function) (function-item :tag "Create special Gnuserv frame and use it" gnuserv-special-frame-function) (function :tag "Other")) :group 'gnuserv :group 'frames)
+
+(autoload 'gnuserv-running-p "gnuserv" "\
+Return non-nil if a gnuserv process is running from this XEmacs session." nil nil)
+
+(autoload 'gnuserv-start "gnuserv" "\
+Allow this Emacs process to be a server for client processes.
+This starts a gnuserv communications subprocess through which
+client \"editors\" (gnuclient and gnudoit) can send editing commands to
+this Emacs job.  See the gnuserv(1) manual page for more details.
+
+Prefix arg means just kill any existing server communications subprocess." t nil)
+
+;;;***
+\f
+;;;### (autoloads nil "help-macro" "lisp/help-macro.el")
+
+(defcustom three-step-help t "*Non-nil means give more info about Help command in three steps.\nThe three steps are simple prompt, prompt with all options,\nand window listing and describing the options.\nA value of nil means skip the middle step, so that\n\\[help-command] \\[help-command] gives the window that lists the options." :type 'boolean :group 'help-appearance)
+
+;;;***
+\f
+;;;### (autoloads (hyper-apropos-popup-menu hyper-apropos-set-variable hyper-set-variable hyper-apropos-read-variable-symbol hyper-describe-function hyper-describe-variable hyper-describe-face hyper-describe-key-briefly hyper-describe-key hyper-apropos) "hyper-apropos" "lisp/hyper-apropos.el")
+
+(autoload 'hyper-apropos "hyper-apropos" "\
+Display lists of functions and variables matching REGEXP
+in buffer \"*Hyper Apropos*\".  If optional prefix arg is given, then the
+value of `hyper-apropos-programming-apropos' is toggled for this search.
+See also `hyper-apropos-mode'." t nil)
+
+(autoload 'hyper-describe-key "hyper-apropos" nil t nil)
+
+(autoload 'hyper-describe-key-briefly "hyper-apropos" nil t nil)
+
+(autoload 'hyper-describe-face "hyper-apropos" "\
+Describe face..
+See also `hyper-apropos' and `hyper-describe-function'." t nil)
+
+(autoload 'hyper-describe-variable "hyper-apropos" "\
+Hypertext drop-in replacement for `describe-variable'.
+See also `hyper-apropos' and `hyper-describe-function'." t nil)
+
+(autoload 'hyper-describe-function "hyper-apropos" "\
+Hypertext replacement for `describe-function'.  Unlike `describe-function'
+in that the symbol under the cursor is the default if it is a function.
+See also `hyper-apropos' and `hyper-describe-variable'." t nil)
+
+(autoload 'hyper-apropos-read-variable-symbol "hyper-apropos" "\
+Hypertext drop-in replacement for `describe-variable'.
+See also `hyper-apropos' and `hyper-describe-function'." nil nil)
+
+(define-obsolete-function-alias 'hypropos-read-variable-symbol 'hyper-apropos-read-variable-symbol)
+
+(define-obsolete-function-alias 'hypropos-get-doc 'hyper-apropos-get-doc)
+
+(autoload 'hyper-set-variable "hyper-apropos" nil t nil)
+
+(autoload 'hyper-apropos-set-variable "hyper-apropos" "\
+Interactively set the variable on the current line." t nil)
+
+(define-obsolete-function-alias 'hypropos-set-variable 'hyper-apropos-set-variable)
+
+(autoload 'hyper-apropos-popup-menu "hyper-apropos" nil t nil)
+
+(define-obsolete-function-alias 'hypropos-popup-menu 'hyper-apropos-popup-menu)
+
+;;;***
+\f
+;;;### (autoloads (Info-elisp-ref Info-emacs-key Info-goto-emacs-key-command-node Info-goto-emacs-command-node Info-emacs-command Info-search Info-visit-file Info-goto-node Info-batch-rebuild-dir Info-query info) "info" "lisp/info.el")
+
+(defvar Info-directory-list nil "\
+List of directories to search for Info documentation files.
+
+The first directory in this list, the \"dir\" file there will become
+the (dir)Top node of the Info documentation tree.  If you wish to
+modify the info search path, use `M-x customize-variable,
+Info-directory-list' to do so.")
+
+(autoload 'info "info" "\
+Enter Info, the documentation browser.
+Optional argument FILE specifies the file to examine;
+the default is the top-level directory of Info.
+
+In interactive use, a prefix argument directs this command
+to read a file name from the minibuffer." t nil)
+
+(autoload 'Info-query "info" "\
+Enter Info, the documentation browser.  Prompt for name of Info file." t nil)
+
+(autoload 'Info-batch-rebuild-dir "info" "\
+(Re)build info `dir' files in the directories remaining on the command line.
+Use this from the command line, with `-batch';
+it won't work in an interactive Emacs.
+Each file is processed even if an error occurred previously.
+For example, invoke \"xemacs -batch -f Info-batch-rebuild-dir /usr/local/info\"" nil nil)
+
+(autoload 'Info-goto-node "info" "\
+Go to info node named NAME.  Give just NODENAME or (FILENAME)NODENAME.
+Actually, the following interpretations of NAME are tried in order:
+    (FILENAME)NODENAME
+    (FILENAME)     (using Top node)
+    NODENAME       (in current file)
+    TAGNAME        (see below)
+    FILENAME       (using Top node)
+where TAGNAME is a string that appears in quotes: \"TAGNAME\", in an
+annotation for any node of any file.  (See `a' and `x' commands.)" t nil)
+
+(autoload 'Info-visit-file "info" "\
+Directly visit an info file." t nil)
+
+(autoload 'Info-search "info" "\
+Search for REGEXP, starting from point, and select node it's found in." t nil)
+
+(autoload 'Info-emacs-command "info" "\
+Look up an Emacs command in the Emacs manual in the Info system.
+This command is designed to be used whether you are already in Info or not." t nil)
+
+(autoload 'Info-goto-emacs-command-node "info" "\
+Look up an Emacs command in the Emacs manual in the Info system.
+This command is designed to be used whether you are already in Info or not." t nil)
+
+(autoload 'Info-goto-emacs-key-command-node "info" "\
+Look up an Emacs key sequence in the Emacs manual in the Info system.
+This command is designed to be used whether you are already in Info or not." t nil)
+
+(autoload 'Info-emacs-key "info" "\
+Look up an Emacs key sequence in the Emacs manual in the Info system.
+This command is designed to be used whether you are already in Info or not." t nil)
+
+(autoload 'Info-elisp-ref "info" "\
+Look up an Emacs Lisp function in the Elisp manual in the Info system.
+This command is designed to be used whether you are already in Info or not." t nil)
+
+;;;***
+\f
+;;;### (autoloads nil "itimer-autosave" "lisp/itimer-autosave.el")
+
+;;;***
+\f
+;;;### (autoloads nil "loaddefs" "lisp/loaddefs.el")
+
+;;;***
+\f
+;;;### (autoloads nil "loadhist" "lisp/loadhist.el")
+
+;;;***
+\f
+;;;### (autoloads (mwheel-install) "mwheel" "lisp/mwheel.el")
+
+(autoload 'mwheel-install "mwheel" "\
+Enable mouse wheel support." nil nil)
+
+;;;***
+\f
+;;;### (autoloads (package-admin-add-binary-package package-admin-add-single-file-package) "package-admin" "lisp/package-admin.el")
+
+(autoload 'package-admin-add-single-file-package "package-admin" "\
+Install a single file Lisp package into XEmacs package hierarchy.
+`file' should be the full path to the lisp file to install.
+`destdir' should be a simple directory name.
+The optional `pkg-dir' can be used to override the default package hierarchy
+\(car (last late-packages))." t nil)
+
+(autoload 'package-admin-add-binary-package "package-admin" "\
+Install a pre-bytecompiled XEmacs package into package hierarchy." t nil)
+
+;;;***
+\f
+;;;### (autoloads (package-get-custom package-get-package-provider package-get package-get-all package-get-update-all) "package-get" "lisp/package-get.el")
+
+(autoload 'package-get-update-all "package-get" "\
+Fetch and install the latest versions of all currently installed packages." t nil)
+
+(autoload 'package-get-all "package-get" "\
+Fetch PACKAGE with VERSION and all other required packages.
+Uses `package-get-base' to determine just what is required and what
+package provides that functionality.  If VERSION is nil, retrieves
+latest version.  Optional argument FETCHED-PACKAGES is used to keep
+track of packages already fetched." t nil)
+
+(autoload 'package-get "package-get" "\
+Fetch PACKAGE from remote site.
+Optional arguments VERSION indicates which version to retrieve, nil
+means most recent version.  CONFLICT indicates what happens if the
+package is already installed.  Valid values for CONFLICT are:
+'always        always retrieve the package even if it is already installed
+'never do not retrieve the package if it is installed.
+
+The value of `package-get-base' is used to determine what files should 
+be retrieved.  The value of `package-get-remote' is used to determine
+where a package should be retrieved from.  The sites are tried in
+order so one is better off listing easily reached sites first.
+
+Once the package is retrieved, its md5 checksum is computed.  If that
+sum does not match that stored in `package-get-base' for this version
+of the package, an error is signalled." t nil)
+
+(autoload 'package-get-package-provider "package-get" "\
+Search for a package that provides SYM and return the name and
+  version.  Searches in `package-get-base' for SYM.   If SYM is a
+  consp, then it must match a corresponding (provide (SYM VERSION)) from 
+  the package." t nil)
+
+(autoload 'package-get-custom "package-get" "\
+Fetch and install the latest versions of all customized packages." t nil)
+
+;;;***
+\f
+;;;### (autoloads (picture-mode) "picture" "lisp/picture.el")
+
+(autoload 'picture-mode "picture" "\
+Switch to Picture mode, in which a quarter-plane screen model is used.
+Printing characters replace instead of inserting themselves with motion
+afterwards settable by these commands:
+  C-c <          Move left after insertion.
+  C-c >          Move right after insertion.
+  C-c ^          Move up after insertion.
+  C-c .          Move down after insertion.
+  C-c `          Move northwest (nw) after insertion.
+  C-c '          Move northeast (ne) after insertion.
+  C-c /          Move southwest (sw) after insertion.
+  C-c \\   Move southeast (se) after insertion.
+The current direction is displayed in the modeline.  The initial
+direction is right.  Whitespace is inserted and tabs are changed to
+spaces when required by movement.  You can move around in the buffer
+with these commands:
+  \\[picture-move-down]          Move vertically to SAME column in previous line.
+  \\[picture-move-up]    Move vertically to SAME column in next line.
+  \\[picture-end-of-line]        Move to column following last non-whitespace character.
+  \\[picture-forward-column]     Move right inserting spaces if required.
+  \\[picture-backward-column]    Move left changing tabs to spaces if required.
+  C-c C-f Move in direction of current picture motion.
+  C-c C-b Move in opposite direction of current picture motion.
+  Return  Move to beginning of next line.
+You can edit tabular text with these commands:
+  M-Tab          Move to column beneath (or at) next interesting character.
+           `Indents' relative to a previous line.
+  Tab    Move to next stop in tab stop list.
+  C-c Tab Set tab stops according to context of this line.
+           With ARG resets tab stops to default (global) value.
+           See also documentation of variable  picture-tab-chars
+           which defines \"interesting character\".  You can manually
+           change the tab stop list with command \\[edit-tab-stops].
+You can manipulate text with these commands:
+  C-d    Clear (replace) ARG columns after point without moving.
+  C-c C-d Delete char at point - the command normally assigned to C-d.
+  \\[picture-backward-clear-column]  Clear (replace) ARG columns before point, moving back over them.
+  \\[picture-clear-line]         Clear ARG lines, advancing over them.  The cleared
+           text is saved in the kill ring.
+  \\[picture-open-line]          Open blank line(s) beneath current line.
+You can manipulate rectangles with these commands:
+  C-c C-k Clear (or kill) a rectangle and save it.
+  C-c C-w Like C-c C-k except rectangle is saved in named register.
+  C-c C-y Overlay (or insert) currently saved rectangle at point.
+  C-c C-x Like C-c C-y except rectangle is taken from named register.
+  \\[copy-rectangle-to-register]   Copies a rectangle to a register.
+  \\[advertised-undo]   Can undo effects of rectangle overlay commands
+           commands if invoked soon enough.
+You can return to the previous mode with:
+  C-c C-c Which also strips trailing whitespace from every line.
+           Stripping is suppressed by supplying an argument.
+
+Entry to this mode calls the value of  picture-mode-hook  if non-nil.
+
+Note that Picture mode commands will work outside of Picture mode, but
+they are not defaultly assigned to keys." t nil)
+
+(defalias 'edit-picture 'picture-mode)
+
+;;;***
+\f
+;;;### (autoloads (clear-rectangle string-rectangle open-rectangle insert-rectangle yank-rectangle kill-rectangle extract-rectangle delete-extract-rectangle delete-rectangle) "rect" "lisp/rect.el")
+
+(autoload 'delete-rectangle "rect" "\
+Delete (don't save) text in rectangle with point and mark as corners.
+The same range of columns is deleted in each line starting with the line
+where the region begins and ending with the line where the region ends." t nil)
+
+(autoload 'delete-extract-rectangle "rect" "\
+Delete contents of rectangle and return it as a list of strings.
+Arguments START and END are the corners of the rectangle.
+The value is list of strings, one for each line of the rectangle." nil nil)
+
+(autoload 'extract-rectangle "rect" "\
+Return contents of rectangle with corners at START and END.
+Value is list of strings, one for each line of the rectangle." nil nil)
+
+(defvar killed-rectangle nil "\
+Rectangle for yank-rectangle to insert.")
+
+(autoload 'kill-rectangle "rect" "\
+Delete rectangle with corners at point and mark; save as last killed one.
+Calling from program, supply two args START and END, buffer positions.
+But in programs you might prefer to use `delete-extract-rectangle'." t nil)
+
+(autoload 'yank-rectangle "rect" "\
+Yank the last killed rectangle with upper left corner at point." t nil)
+
+(autoload 'insert-rectangle "rect" "\
+Insert text of RECTANGLE with upper left corner at point.
+RECTANGLE's first line is inserted at point, its second
+line is inserted at a point vertically under point, etc.
+RECTANGLE should be a list of strings.
+After this command, the mark is at the upper left corner
+and point is at the lower right corner." nil nil)
+
+(autoload 'open-rectangle "rect" "\
+Blank out rectangle with corners at point and mark, shifting text right.
+The text previously in the region is not overwritten by the blanks,
+but instead winds up to the right of the rectangle." t nil)
+
+(autoload 'string-rectangle "rect" "\
+Insert STRING on each line of the region-rectangle, shifting text right.
+The left edge of the rectangle specifies the column for insertion.
+This command does not delete or overwrite any existing text.
+
+Called from a program, takes three args; START, END and STRING." t nil)
+
+(autoload 'clear-rectangle "rect" "\
+Blank out rectangle with corners at point and mark.
+The text previously in the region is overwritten by the blanks.
+When called from a program, requires two args which specify the corners." t nil)
+
+;;;***
+\f
+;;;### (autoloads (list-load-path-shadows) "shadow" "lisp/shadow.el")
+
+(autoload 'list-load-path-shadows "shadow" "\
+Display a list of Emacs Lisp files that shadow other files.
+
+This function lists potential load-path problems.  Directories in the
+`load-path' variable are searched, in order, for Emacs Lisp
+files.  When a previously encountered file name is found again, a
+message is displayed indicating that the later file is \"hidden\" by
+the earlier.
+
+For example, suppose `load-path' is set to
+
+\(\"/usr/gnu/emacs/site-lisp\" \"/usr/gnu/emacs/share/emacs/19.30/lisp\")
+
+and that each of these directories contains a file called XXX.el.  Then
+XXX.el in the site-lisp directory is referred to by all of:
+\(require 'XXX), (autoload .... \"XXX\"), (load-library \"XXX\") etc.
+
+The first XXX.el file prevents emacs from seeing the second (unless
+the second is loaded explicitly via load-file).
+
+When not intended, such shadowings can be the source of subtle
+problems.  For example, the above situation may have arisen because the
+XXX package was not distributed with versions of emacs prior to
+19.30.  An emacs maintainer downloaded XXX from elsewhere and installed
+it.  Later, XXX was updated and included in the emacs distribution.
+Unless the emacs maintainer checks for this, the new version of XXX
+will be hidden behind the old (which may no longer work with the new
+emacs version).
+
+This function performs these checks and flags all possible
+shadowings.  Because a .el file may exist without a corresponding .elc
+\(or vice-versa), these suffixes are essentially ignored.  A file
+XXX.elc in an early directory (that does not contain XXX.el) is
+considered to shadow a later file XXX.el, and vice-versa.
+
+When run interactively, the shadowings (if any) are displayed in a
+buffer called `*Shadows*'.  Shadowings are located by calling the
+\(non-interactive) companion function, `find-emacs-lisp-shadows'." t nil)
+
+;;;***
+\f
+;;;### (autoloads (load-default-sounds load-sound-file) "sound" "lisp/sound.el")
+
+(or sound-alist (setq sound-alist '((ready nil) (warp nil))))
+
+(autoload 'load-sound-file "sound" "\
+Read in an audio-file and add it to the sound-alist.
+
+You can only play sound files if you are running on display 0 of the
+console of a machine with native sound support or running a NetAudio
+server and XEmacs has the necessary sound support compiled in.
+
+The sound file must be in the Sun/NeXT U-LAW format, except on Linux,
+where .wav files are also supported by the sound card drivers." t nil)
+
+(autoload 'load-default-sounds "sound" "\
+Load and install some sound files as beep-types, using
+`load-sound-file'.  This only works if you're on display 0 of the
+console of a machine with native sound support or running a NetAudio
+server and XEmacs has the necessary sound support compiled in." t nil)
+
+;;;***
+\f
+;;;### (autoloads (ask-user-about-supersession-threat ask-user-about-lock) "userlock" "lisp/userlock.el")
+
+(autoload 'ask-user-about-lock "userlock" "\
+Ask user what to do when he wants to edit FILE but it is locked by USER.
+This function has a choice of three things to do:
+  do (signal 'file-locked (list FILE USER))
+    to refrain from editing the file
+  return t (grab the lock on the file)
+  return nil (edit the file even though it is locked).
+You can rewrite it to use any criterion you like to choose which one to do." nil nil)
+
+(autoload 'ask-user-about-supersession-threat "userlock" "\
+Ask a user who is about to modify an obsolete buffer what to do.
+This function has two choices: it can return, in which case the modification
+of the buffer will proceed, or it can (signal 'file-supersession (file)),
+in which case the proposed buffer modification will not be made.
+
+You can rewrite this to use any criterion you like to choose which one to do.
+The buffer in question is current when this function is called." nil nil)
+
+;;;***
+\f
+;;;### (autoloads (auto-view-mode view-major-mode view-mode view-minor-mode view-buffer-other-window view-file-other-window view-buffer view-file) "view-less" "lisp/view-less.el")
+
+(defvar view-minor-mode-map (let ((map (make-keymap))) (set-keymap-name map 'view-minor-mode-map) (suppress-keymap map) (define-key map "-" 'negative-argument) (define-key map " " 'scroll-up) (define-key map "f" 'scroll-up) (define-key map "b" 'scroll-down) (define-key map 'backspace 'scroll-down) (define-key map 'delete 'scroll-down) (define-key map "\r" 'view-scroll-lines-up) (define-key map "\n" 'view-scroll-lines-up) (define-key map "e" 'view-scroll-lines-up) (define-key map "j" 'view-scroll-lines-up) (define-key map "y" 'view-scroll-lines-down) (define-key map "k" 'view-scroll-lines-down) (define-key map "d" 'view-scroll-some-lines-up) (define-key map "u" 'view-scroll-some-lines-down) (define-key map "r" 'recenter) (define-key map "t" 'toggle-truncate-lines) (define-key map "N" 'view-buffer) (define-key map "E" 'view-file) (define-key map "P" 'view-buffer) (define-key map "!" 'shell-command) (define-key map "|" 'shell-command-on-region) (define-key map "=" 'what-line) (define-key map "?" 'view-search-backward) (define-key map "h" 'view-mode-describe) (define-key map "s" 'view-repeat-search) (define-key map "n" 'view-repeat-search) (define-key map "/" 'view-search-forward) (define-key map "\\" 'view-search-backward) (define-key map "g" 'view-goto-line) (define-key map "G" 'view-last-windowful) (define-key map "%" 'view-goto-percent) (define-key map "p" 'view-goto-percent) (define-key map "m" 'point-to-register) (define-key map "'" 'register-to-point) (define-key map "C" 'view-cleanup-backspaces) (define-key map "\ 3\ 3" 'view-quit) (define-key map "\18\11" 'view-quit-toggle-ro) (define-key map "q" 'view-quit) map))
+
+(defvar view-mode-map (let ((map (copy-keymap view-minor-mode-map))) (set-keymap-name map 'view-mode-map) map))
+
+(autoload 'view-file "view-less" "\
+Find FILE, enter view mode.  With prefix arg OTHER-P, use other window." t nil)
+
+(autoload 'view-buffer "view-less" "\
+Switch to BUF, enter view mode.  With prefix arg use other window." t nil)
+
+(autoload 'view-file-other-window "view-less" "\
+Find FILE in other window, and enter view mode." t nil)
+
+(autoload 'view-buffer-other-window "view-less" "\
+Switch to BUFFER in another window, and enter view mode." t nil)
+
+(autoload 'view-minor-mode "view-less" "\
+Minor mode for viewing text, with bindings like `less'.
+Commands are:
+\\<view-minor-mode-map>
+0..9   prefix args
+-      prefix minus
+\\[scroll-up]  page forward
+\\[scroll-down]        page back
+\\[view-scroll-lines-up]       scroll prefix-arg lines forward, default 1.
+\\[view-scroll-lines-down]     scroll prefix-arg lines backward, default 1.
+\\[view-scroll-some-lines-down]        scroll prefix-arg lines backward, default 10.
+\\[view-scroll-some-lines-up]  scroll prefix-arg lines forward, default 10.
+\\[what-line]  print line number
+\\[view-mode-describe] print this help message
+\\[view-search-forward]        regexp search, uses previous string if you just hit RET
+\\[view-search-backward]       as above but searches backward
+\\[view-repeat-search] repeat last search
+\\[view-goto-line]     goto line prefix-arg, default 1
+\\[view-last-windowful]        goto line prefix-arg, default last line
+\\[view-goto-percent]  goto a position by percentage
+\\[toggle-truncate-lines]      toggle truncate-lines
+\\[view-file]  view another file
+\\[view-buffer]        view another buffer
+\\[view-cleanup-backspaces]    cleanup backspace constructions
+\\[shell-command]      execute a shell command
+\\[shell-command-on-region]    execute a shell command with the region as input
+\\[view-quit]  exit view-mode, and bury the current buffer.
+
+If invoked with the optional (prefix) arg non-nil, view-mode cleans up
+backspace constructions.
+
+More precisely:
+\\{view-minor-mode-map}" t nil)
+
+(autoload 'view-mode "view-less" "\
+View the current buffer using view-minor-mode.  This exists to be 99.9%
+compatible with the implementations of `view-mode' in view.el and older
+versions of view-less.el." t nil)
+
+(autoload 'view-major-mode "view-less" "\
+View the current buffer using view-mode, as a major mode.
+This function has a nonstandard name because `view-mode' is wrongly
+named but is like this for compatibility reasons." t nil)
+
+(autoload 'auto-view-mode "view-less" "\
+If the file of the current buffer is not writable, call view-mode.
+This is meant to be added to `find-file-hooks'." nil nil)
+
+;;;***
+\f
+;;;### (autoloads (widget-minor-mode widget-browse-other-window widget-browse widget-browse-at) "wid-browse" "lisp/wid-browse.el")
+
+(autoload 'widget-browse-at "wid-browse" "\
+Browse the widget under point." t nil)
+
+(autoload 'widget-browse "wid-browse" "\
+Create a widget browser for WIDGET." t nil)
+
+(autoload 'widget-browse-other-window "wid-browse" "\
+Show widget browser for WIDGET in other window." t nil)
+
+(autoload 'widget-minor-mode "wid-browse" "\
+Togle minor mode for traversing widgets.
+With arg, turn widget mode on if and only if arg is positive." t nil)
+
+;;;***
+\f
+;;;### (autoloads (widget-delete widget-create widget-prompt-value) "wid-edit" "lisp/wid-edit.el")
+
+(autoload 'widget-prompt-value "wid-edit" "\
+Prompt for a value matching WIDGET, using PROMPT.
+The current value is assumed to be VALUE, unless UNBOUND is non-nil." nil nil)
+
+(autoload 'widget-create "wid-edit" "\
+Create widget of TYPE.
+The optional ARGS are additional keyword arguments." nil nil)
+
+(autoload 'widget-delete "wid-edit" "\
+Delete WIDGET." nil nil)
+
+;;;***
+\f
+;;;### (autoloads (font-menu-weight-constructor font-menu-size-constructor font-menu-family-constructor reset-device-font-menus) "x-font-menu" "lisp/x-font-menu.el")
+
+(defcustom font-menu-ignore-scaled-fonts t "*If non-nil, then the font menu will try to show only bitmap fonts." :type 'boolean :group 'x)
+
+(defcustom font-menu-this-frame-only-p nil "*If non-nil, then changing the default font from the font menu will only\naffect one frame instead of all frames." :type 'boolean :group 'x)
+
+(fset 'install-font-menus 'reset-device-font-menus)
+
+(autoload 'reset-device-font-menus "x-font-menu" "\
+Generates the `Font', `Size', and `Weight' submenus for the Options menu.
+This is run the first time that a font-menu is needed for each device.
+If you don't like the lazy invocation of this function, you can add it to
+`create-device-hook' and that will make the font menus respond more quickly
+when they are selected for the first time.  If you add fonts to your system, 
+or if you change your font path, you can call this to re-initialize the menus." nil nil)
+
+(autoload 'font-menu-family-constructor "x-font-menu" nil nil nil)
+
+(autoload 'font-menu-size-constructor "x-font-menu" nil nil nil)
+
+(autoload 'font-menu-weight-constructor "x-font-menu" nil nil nil)
+
+;;;***
+
+(provide 'Standard-autoloads)
diff --git a/lisp/auto-save.el b/lisp/auto-save.el
new file mode 100644 (file)
index 0000000..e7df3e6
--- /dev/null
@@ -0,0 +1,547 @@
+;;; auto-save.el -- Safer autosaving for EFS and tmp.
+
+;; Copyright (C) 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1992 by Sebastian Kremer <sk@thp.uni-koeln.de>
+
+;; Author: Sebastian Kremer <sk@thp.uni-koeln.de>
+;; Maintainer: XEmacs Development Team
+;; Keywords: extensions, dumped
+;; Version: 1.26
+
+;; 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 1, 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Not in FSF
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; Combines autosaving for efs (to a local or remote directory)
+;; with the ability to do autosaves to a fixed directory on a local
+;; disk, in case NFS is slow.  The auto-save file used for
+;;     /usr/foo/bar/baz.txt
+;; will be
+;;     AUTOSAVE/#\!usr\!foo\!bar\!baz.txt#
+;; assuming AUTOSAVE is the non-nil value of the variable
+;; `auto-save-directory'.
+
+;; Takes care that autosave files for non-file-buffers (e.g. *mail*)
+;; from two simultaneous Emacses don't collide.
+
+;; Autosaves even if the current directory is not writable.
+
+;; Can limit autosave names to 14 characters using a hash function,
+;; see `auto-save-hash-p'.
+
+;; See `auto-save-directory' and `make-auto-save-file-name' and
+;; references therein for complete documentation.
+
+;; `M-x recover-all-files' will effectively do recover-file on all
+;; files whose autosave file is newer (one of the benefits of having
+;; all autosave files in the same place).
+
+;; This file is dumped with XEmacs.
+
+;; If you want to autosave in the fixed directory /tmp/USER-autosave/
+;; (setq auto-save-directory
+;;       (concat "/tmp/" (user-login-name) "-autosave/"))
+
+;; If you don't want to save in /tmp (e.g., because it is swap
+;; mounted) but rather in ~/autosave/
+;;   (setq auto-save-directory (expand-file-name "~/.autosave/"))
+
+;; If you want to save each file in its own directory (the default)
+;;   (setq auto-save-directory nil)
+;; You still can take advantage of autosaving efs remote files
+;; in a fixed local directory, `auto-save-directory-fallback' will
+;; be used.
+
+;; If you want to use 14 character hashed autosave filenames
+;;   (setq auto-save-hash-p t)
+
+;; Finally, put this line after the others in your ~/.emacs:
+;;   (require 'auto-save)
+
+
+;;; Acknowledgement:
+
+;; This code is loosely derived from autosave-in-tmp.el by Jamie
+;; Zawinski <jwz@netscape.com> (the version I had was last modified 22
+;; dec 90 jwz) and code submitted to ange-ftp-lovers on Sun, 5 Apr
+;; 92 23:20:47 EDT by drw@BOURBAKI.MIT.EDU (Dale R. Worley).
+;; auto-save.el tries to cover the functionality of those two
+;; packages.
+
+;; Valuable comments and help from Dale Worley, Andy Norman, Jamie
+;; Zawinski and Sandy Rutherford are gratefully acknowledged.
+
+(defconst auto-save-version "1.26"
+  "Version number of auto-save.")
+
+(provide 'auto-save)
+
+\f
+;;; Customization:
+
+(defgroup auto-save nil
+  "Autosaving with support for efs and /tmp."
+  :group 'data)
+
+(put 'auto-save-interval 'custom-type 'integer)
+(put 'auto-save-interval 'factory-value '(300))
+(custom-add-to-group 'auto-save 'auto-save-interval 'custom-variable)
+
+(defcustom auto-save-directory nil
+
+  ;; Don't make this user-variable-p, it should be set in .emacs and
+  ;; left at that.  In particular, it should remain constant across
+  ;; several Emacs session to make recover-all-files work.
+
+  ;; However, it's OK for it to be customizable, as most of the
+  ;; customizable variables are set at the time `.emacs' is read.
+  ;; -hniksic
+
+  "If non-nil, fixed directory for autosaving: all autosave files go
+there.  If this directory does not yet exist at load time, it is
+created and its mode is set to 0700 so that nobody else can read your
+autosave files.
+
+If nil, each autosave files goes into the same directory as its
+corresponding visited file.
+
+A non-nil `auto-save-directory' could be on a local disk such as in
+/tmp, then auto-saves will always be fast, even if NFS or the
+automounter is slow.  In the usual case of /tmp being locally mounted,
+note that if you run emacs on two different machines, they will not
+see each other's auto-save files.
+
+The value \(expand-file-name \"~/.autosave/\"\) might be better if /tmp
+is mounted from swap (possible in SunOS, type `df /tmp' to find out)
+and thus vanishes after a reboot, or if your system is particularly
+thorough when cleaning up /tmp, clearing even non-empty subdirectories.
+
+It should never be an efs remote filename because that would
+defeat `efs-auto-save-remotely'.
+
+Unless you set `auto-save-hash-p', you shouldn't set this to a
+directory in a filesystem that does not support long filenames, since
+a file named
+
+    /home/sk/lib/emacs/lisp/auto-save.el
+
+will have a longish filename like
+
+    AUTO-SAVE-DIRECTORY/#\\!home\\!sk\\!lib\\!emacs\\!lisp\\!auto-save.el#
+
+as auto save file.
+
+See also variables `auto-save-directory-fallback',
+`efs-auto-save' and `efs-auto-save-remotely'."
+  :type '(choice (const :tag "Same as file" nil)
+                directory)
+  :group 'auto-save)
+
+
+(defcustom auto-save-hash-p nil
+  "If non-nil, hashed autosave names of length 14 are used.
+This is to avoid autosave filenames longer than 14 characters.
+The directory used is `auto-save-hash-directory' regardless of
+`auto-save-directory'.
+Hashing defeats `recover-all-files', you have to recover files
+individually by doing `recover-file'."
+  :type 'boolean
+  :group 'auto-save)
+
+;;; This defvar is in efs.el now, but doesn't hurt to give it here as
+;;; well so that loading first auto-save.el does not abort.
+
+;; #### Now that `auto-save' is dumped, this is looks obnoxious.
+(or (boundp 'efs-auto-save) (defvar efs-auto-save 0))
+(or (boundp 'efs-auto-save-remotely) (defvar efs-auto-save-remotely nil))
+
+(defcustom auto-save-offer-delete nil
+  "*If non-nil, `recover-all-files' offers to delete autosave files
+that are out of date or were dismissed for recovering.
+Special value 'always deletes those files silently."
+  :type '(choice (const :tag "on" t)
+                (const :tag "off" nil)
+                (const :tag "Delete silently" always))
+  :group 'auto-save)
+
+;;;; end of customization
+
+\f
+;;; Preparations to be done at load time
+
+(defvar auto-save-directory-fallback (expand-file-name "~/.autosave/")
+  ;; not user-variable-p, see above
+  "Directory used for local autosaving of remote files if
+both `auto-save-directory' and `efs-auto-save-remotely' are nil.
+Also used if a working directory to be used for autosaving is not writable.
+This *must* always be the name of directory that exists or can be
+created by you, never nil.")
+
+(defvar auto-save-hash-directory
+  (expand-file-name "hash/" (or auto-save-directory
+                               auto-save-directory-fallback))
+  "If non-nil, directory used for hashed autosave filenames.")
+
+(defun auto-save-check-directory (var)
+  (let ((dir (symbol-value var)))
+    (if (null dir)
+       nil
+      ;; Expand and store back into the variable
+      (set var (setq dir (expand-file-name dir)))
+      ;; Make sure directory exists
+      (if (file-directory-p dir)
+         nil
+       ;; Else we create and chmod 0700 the directory
+       (setq dir (directory-file-name dir)) ; some systems need this
+       (make-directory dir)
+       (set-file-modes dir #o700)))))
+
+(mapc #'auto-save-check-directory
+     '(auto-save-directory auto-save-directory-fallback))
+
+(and auto-save-hash-p
+     (auto-save-check-directory 'auto-save-hash-directory))
+
+\f
+;;; Computing an autosave name for a file and vice versa
+
+;; #### Now that this file is dumped, we should turn off the routine
+;; from files.el.  But it would make it harder to remove it!
+
+(defun make-auto-save-file-name (&optional file-name);; redefines files.el
+  ;; auto-save-file-name-p need not be redefined.
+
+  "Return file name to use for auto-saves of current buffer.
+Does not consider `auto-save-visited-file-name'; that is checked
+before calling this function.
+
+Offers to autosave all files in the same `auto-save-directory'.  All
+autosave files can then be recovered at once with function
+`recover-all-files'.
+
+Takes care to make autosave files for files accessed through efs
+be local files if variable `efs-auto-save-remotely' is nil.
+
+Takes care of slashes in buffer names to prevent autosave errors.
+
+Takes care that autosave files for buffers not visiting any file (such
+as `*mail*') from two simultaneous Emacses don't collide by prepending
+the Emacs pid.
+
+Uses 14 character autosave names if `auto-save-hash-p' is true.
+
+Autosaves even if the current directory is not writable, using
+directory `auto-save-directory-fallback'.
+
+You can redefine this for customization (he he :-).
+See also function `auto-save-file-name-p'."
+
+  ;; We have to be very careful about not signalling an error in this
+  ;; function since files.el does not provide for this (e.g. find-file
+  ;; would fail for each new file).
+
+  (setq file-name (or file-name
+                     buffer-file-truename
+                     (and buffer-file-name
+                          (expand-file-name buffer-file-name))))
+  (condition-case error-data
+      (let (
+           ;; So autosavename looks like #%...#, roughly as with the
+           ;; old make-auto-save-file-name function.  The
+           ;; make-temp-name inserts the pid of this Emacs: this
+           ;; avoids autosaving from two Emacses into the same file.
+           ;; It cannot be recovered automatically then because in
+           ;; the next Emacs session (the one after the crash) the
+           ;; pid will be different, but file-less buffers like
+           ;; *mail* must be recovered manually anyway.
+
+           ;; jwz: putting the emacs PID in the auto-save file name is bad
+           ;; news, because that defeats auto-save-recovery of *mail*
+           ;; buffers -- the (sensible) code in sendmail.el calls
+           ;; (make-auto-save-file-name) to determine whether there is
+           ;; unsent, auto-saved mail to recover. If that mail came from a
+           ;; previous emacs process (far and away the most likely case)
+           ;; then this can never succeed as the pid differs.
+           ;;(name-prefix (if file-name nil (make-temp-name "#%")))
+           (name-prefix (if file-name nil "#%"))
+
+           (save-name (or file-name
+                          ;; Prevent autosave errors.  Buffername
+                          ;; (to become non-dir part of filename) will
+                          ;; be unslashified twice.  Don't care.
+                          (auto-save-unslashify-name (buffer-name))))
+           (remote-p (and (stringp file-name)
+                          (fboundp 'efs-ftp-path)
+                          (efs-ftp-path file-name))))
+       ;; Return the appropriate auto save file name:
+       (expand-file-name;; a buffername needs this, a filename not
+        (cond (remote-p
+               (if efs-auto-save-remotely
+                   (auto-save-name-in-same-directory save-name)
+                 ;; We have to use the `fixed-directory' now since the
+                 ;; `same-directory' would be remote.
+                 ;; It will use the fallback if needed.
+                 (auto-save-name-in-fixed-directory save-name)))
+              ;; Else it is a local file (or a buffer without a file,
+              ;; hence the name-prefix).
+              ((or auto-save-directory auto-save-hash-p)
+               ;; Hashed files always go into the special hash dir,
+               ;; never in the same directory, to make recognizing
+               ;; reliable.
+               (auto-save-name-in-fixed-directory save-name name-prefix))
+              (t
+               (auto-save-name-in-same-directory save-name name-prefix)))))
+
+    ;; If any error occurs in the above code, return what the old
+    ;; version of this function would have done.  It is not ok to
+    ;; return nil, e.g., when after-find-file tests
+    ;; file-newer-than-file-p, nil would bomb.
+
+    (error (warn "Error caught in `make-auto-save-file-name':\n%s"
+                (error-message-string error-data))
+          (if buffer-file-name
+              (concat (file-name-directory buffer-file-name)
+                      "#"
+                      (file-name-nondirectory buffer-file-name)
+                      "#")
+            (expand-file-name (concat "#%" (buffer-name) "#"))))))
+
+(defun auto-save-original-name (savename)
+  "Reverse of `make-auto-save-file-name'.
+Returns nil if SAVENAME was not associated with a file (e.g., it came
+from an autosaved `*mail*' buffer) or does not appear to be an
+autosave file at all.
+Hashed files are not understood, see `auto-save-hash-p'."
+  (let ((basename (file-name-nondirectory savename))
+       (savedir (file-name-directory savename)))
+    (cond ((or (not (auto-save-file-name-p basename))
+              (string-match "^#%" basename))
+          nil)
+         ;; now we know it looks like #...# thus substring is safe to use
+         ((or (equal savedir auto-save-directory) ; 2nd arg may be nil
+              (equal savedir auto-save-directory-fallback))
+          ;; it is of the `-fixed-directory' type
+          (auto-save-slashify-name (substring basename 1 -1)))
+         (t
+          ;; else it is of `-same-directory' type
+          (concat savedir (substring basename 1 -1))))))
+
+(defun auto-save-name-in-fixed-directory (filename &optional prefix)
+  ;; Unslashify and enclose the whole FILENAME in `#' to make an auto
+  ;; save file in the auto-save-directory, or if that is nil, in
+  ;; auto-save-directory-fallback (which must be the name of an
+  ;; existing directory).  If the results would be too long for 14
+  ;; character filenames, and `auto-save-hash-p' is set, hash FILENAME
+  ;; into a shorter name.
+  ;; Optional PREFIX is string to use instead of "#" to prefix name.
+  (let ((base-name (concat (or prefix "#")
+                          (auto-save-unslashify-name filename)
+                          "#")))
+    (if (and auto-save-hash-p
+            auto-save-hash-directory
+            (> (length base-name) 14))
+       (expand-file-name (auto-save-cyclic-hash-14 filename)
+                         auto-save-hash-directory)
+      (expand-file-name base-name
+                       (or auto-save-directory
+                           auto-save-directory-fallback)))))
+
+(defun auto-save-name-in-same-directory (filename &optional prefix)
+  ;; Enclose the non-directory part of FILENAME in `#' to make an auto
+  ;; save file in the same directory as FILENAME.  But if this
+  ;; directory is not writable, use auto-save-directory-fallback.
+  ;; FILENAME is assumed to be in non-directory form (no trailing slash).
+  ;; It may be a name without a directory part (pesumably it really
+  ;; comes from a buffer name then), the fallback is used then.
+  ;; Optional PREFIX is string to use instead of "#" to prefix name.
+  (let ((directory (file-name-directory filename)))
+    (or (null directory)
+       (file-writable-p directory)
+       (setq directory auto-save-directory-fallback))
+    (concat directory                  ; (concat nil) is ""
+           (or prefix "#")
+           (file-name-nondirectory filename)
+           "#")))
+
+;; #### The following two should probably use `replace-in-string'.
+
+(defun auto-save-unslashify-name (s)
+  ;;  "Quote any slashes in string S by replacing them with the two
+  ;;characters `\\!'.
+  ;;Also, replace any backslash by double backslash, to make it one-to-one."
+  (let ((limit 0))
+    (while (string-match "[/\\]" s limit)
+      (setq s (concat (substring s 0 (match-beginning 0))
+                     (if (string= (substring s
+                                             (match-beginning 0)
+                                             (match-end 0))
+                                  "/")
+                         "\\!"
+                       "\\\\")
+                     (substring s (match-end 0))))
+      (setq limit (1+ (match-end 0)))))
+  s)
+
+(defun auto-save-slashify-name (s)
+  ;;"Reverse of `auto-save-unslashify-name'."
+  (let (pos)
+    (while (setq pos (string-match "\\\\[\\!]" s pos))
+      (setq s (concat (substring s 0 pos)
+                     (if (eq ?! (aref s (1+ pos))) "/" "\\")
+                     (substring s (+ pos 2)))
+           pos (1+ pos))))
+  s)
+
+\f
+;;; Hashing for autosave names
+
+;;; Hashing function contributed by Andy Norman <ange@hplb.hpl.hp.com>
+;;; based upon C code from pot@fly.cnuce.cnr.IT (Francesco Potorti`).
+
+(defun auto-save-cyclic-hash-14 (s)
+  ;;   "Hash string S into a string of length 14.
+  ;; A 7-bytes cyclic code for burst correction is calculated on a
+  ;; byte-by-byte basis. The polynomial used is D^7 + D^6 + D^3 +1.
+  ;; The resulting string consists of hexadecimal digits [0-9a-f].
+  ;; In particular, it contains no slash, so it can be used as autosave name."
+  (let ((crc (make-vector 7 ?\0)))
+    (mapc
+     (lambda (new)
+       (setq new (+ new (aref crc 6)))
+       (aset crc 6 (+ (aref crc 5) new))
+       (aset crc 5 (aref crc 4))
+       (aset crc 4 (aref crc 3))
+       (aset crc 3 (+ (aref crc 2) new))
+       (aset crc 2 (aref crc 1))
+       (aset crc 1 (aref crc 0))
+       (aset crc 0 new))
+     s)
+    (format "%02x%02x%02x%02x%02x%02x%02x"
+           (logand 255 (aref crc 0))
+           (logand 255 (aref crc 1))
+           (logand 255 (aref crc 2))
+           (logand 255 (aref crc 3))
+           (logand 255 (aref crc 4))
+           (logand 255 (aref crc 5))
+           (logand 255 (aref crc 6)))))
+
+;; #### It is unclear to me how the following function is useful.  It
+;; should be used in `auto-save-name-in-same-directory', if anywhere.
+;; -hniksic
+
+;; This leaves two characters that could be used to wrap it in `#' or
+;; make two filenames from it: one for autosaving, and another for a
+;; file containing the name of the autosaved filed, to make hashing
+;; reversible.
+;(defun auto-save-cyclic-hash-12 (s)
+;  "Outputs the 12-characters ascii hex representation of a 6-bytes
+;cyclic code for burst correction calculated on STRING on a
+;byte-by-byte basis. The used polynomial is D^6 + D^5 + D^4 + D^3 +1."
+;  (let ((crc (make-string 6 0)))
+;    (mapc
+;     (lambda (new)
+;       (setq new (+ new (aref crc 5)))
+;       (aset crc 5 (+ (aref crc 4) new))
+;       (aset crc 4 (+ (aref crc 3) new))
+;       (aset crc 3 (+ (aref crc 2) new))
+;       (aset crc 2 (aref crc 1))
+;       (aset crc 1 (aref crc 0))
+;       (aset crc 0 new))
+;     s)
+;    (format "%02x%02x%02x%02x%02x%02x"
+;            (aref crc 0)
+;            (aref crc 1)
+;            (aref crc 2)
+;            (aref crc 3)
+;            (aref crc 4)
+;            (aref crc 5))))
+
+\f
+
+;;; Recovering files
+
+(defun recover-all-files (&optional silent)
+  "Do recover-file for all autosave files which are current.
+Only works if you have a non-nil `auto-save-directory'.
+
+Optional prefix argument SILENT means to be silent about non-current
+autosave files.  This is useful if invoked automatically at Emacs
+startup.
+
+If `auto-save-offer-delete' is t, this function will offer to delete
+old or rejected autosave files.
+
+Hashed files (see `auto-save-hash-p') are not understood, use
+`recover-file' to recover them individually."
+  (interactive "P")
+  (let ((savefiles (directory-files auto-save-directory
+                                   t "\\`#" nil t))
+       afile                           ; the auto save file
+       file                            ; its original file
+       (total 0)                       ; # of files offered to recover
+       (count 0))                      ; # of files actually recovered
+    (or (equal auto-save-directory auto-save-directory-fallback)
+       (setq savefiles
+             (nconc savefiles
+                    (directory-files auto-save-directory-fallback
+                                     t "\\`#" nil t))))
+    (while savefiles
+      (setq afile (car savefiles)
+           file (auto-save-original-name afile)
+           savefiles (cdr savefiles))
+      (cond ((and file (not (file-newer-than-file-p afile file)))
+            (warn "Autosave file \"%s\" is not current." afile))
+           (t
+            (incf total)
+            (with-output-to-temp-buffer "*Directory*"
+              (apply 'call-process "ls" nil standard-output nil
+                     "-l" afile (if file (list file))))
+            (if (yes-or-no-p (format "Recover %s from auto save file? "
+                                     (or file "non-file buffer")))
+                (let* ((obuf (current-buffer)))
+                  (set-buffer (if file
+                                  (find-file-noselect file t)
+                                (generate-new-buffer "*recovered*")))
+                  (setq buffer-read-only nil)
+                  (erase-buffer)
+                  (insert-file-contents afile nil)
+                  (ignore-errors
+                    (after-find-file nil))
+                  (setq buffer-auto-save-file-name nil)
+                  (incf count)
+                  (message "\
+Auto-save off in buffer \"%s\" till you do M-x auto-save-mode."
+                           (buffer-name))
+                  (set-buffer obuf)
+                  (sit-for 1))
+              ;; If not used for recovering, offer to delete
+              ;; autosave file
+              (and auto-save-offer-delete
+                   (or (eq 'always auto-save-offer-delete)
+                       (yes-or-no-p
+                        (format "Delete autosave file for `%s'? " file)))
+                   (delete-file afile))))))
+    (if (zerop total)
+       (or silent (message "Nothing to recover."))
+      (message "%d/%d file%s recovered." count total (if (= count 1) "" "s"))))
+  (and (get-buffer "*Directory*")
+       (kill-buffer "*Directory*")))
+
+;;; auto-save.el ends here
diff --git a/lisp/auto-show.el b/lisp/auto-show.el
new file mode 100644 (file)
index 0000000..d8140f5
--- /dev/null
@@ -0,0 +1,203 @@
+;;; auto-show.el --- perform automatic horizontal scrolling as point moves
+
+;; Copyright (C) 1997 Free Software Foundation, Inc.
+;; This file is in the public domain.
+
+;; Author: Pete Ware <ware@cis.ohio-state.edu>
+;; Maintainer: XEmacs Development Team
+;; Keywords: extensions, internal, dumped
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Emacs/Mule zeta.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; Modified by: Ben Wing <ben@xemacs.org>
+
+;; This file provides functions that
+;; automatically scroll the window horizontally when the point moves
+;; off the left or right side of the window.
+
+;; Once this library is loaded, automatic horizontal scrolling
+;; occurs whenever long lines are being truncated.
+;; To request truncation of long lines, set the variable
+;; Setting the variable `truncate-lines' to non-nil.
+;; You can do this for all buffers as follows:
+;;
+;; (set-default 'truncate-lines t)
+
+;; Here is how to do it for C mode only:
+;;
+;; (set-default 'truncate-lines nil)   ; this is the original value
+;; (defun my-c-mode-hook ()
+;;   "Run when C-mode starts up.  Changes ..."
+;;   ... set various personal preferences ...
+;;   (setq truncate-lines t))
+;; (add-hook 'c-mode-hook 'my-c-mode-hook)
+;;
+;;
+;; As a finer level of control, you can still have truncated lines but
+;; without the automatic horizontal scrolling by setting the buffer
+;; local variable `auto-show-mode' to nil.  The default value is t.
+;; The command `auto-show-mode' toggles the value of the variable
+;; `auto-show-mode'.
+
+;;; Code:
+
+(defgroup auto-show nil
+  "Perform automatic horizontal scrolling as point moves."
+  :group 'display
+  :group 'extensions)
+
+;; This is preloaded, so we don't need special :set, :require, etc.
+(defcustom auto-show-mode t
+  "*Non-nil enables automatic horizontal scrolling, when lines are truncated.
+The default value is t.  To change the default, do this:
+       (set-default 'auto-show-mode nil)
+See also command `auto-show-mode'.
+This variable has no effect when lines are not being truncated.
+This variable is automatically local in each buffer where it is set."
+  :type 'boolean
+  :group 'auto-show)
+
+(make-variable-buffer-local 'auto-show-mode)
+
+(defcustom auto-show-shift-amount 8 
+  "*Extra columns to scroll. for automatic horizontal scrolling."
+  :type 'integer
+  :group 'auto-show)
+
+(defcustom auto-show-show-left-margin-threshold 50
+  "*Threshold column for automatic horizontal scrolling to the right.
+If point is before this column, we try to scroll to make the left margin
+visible.  Setting this to 0 disables this feature."
+  :type 'number
+  :group 'auto-show)
+
+(defun auto-show-truncationp ()
+  "True if line truncation is enabled for the selected window."
+  ;; XEmacs change (use specifiers)
+  ;; ### There should be a more straightforward way to do this from elisp.
+  (or truncate-lines 
+      (and truncate-partial-width-windows
+          (< (+ (window-width)
+                (specifier-instance left-margin-width)
+                (specifier-instance right-margin-width))
+             (frame-width)))))
+
+(defun auto-show-mode (arg)
+  "Turn automatic horizontal scroll mode on or off.
+With arg, turn auto scrolling on if arg is positive, off otherwise.
+This mode is enabled or disabled for each buffer individually.
+It takes effect only when `truncate-lines' is non-nil."
+  (interactive "P")
+  (setq auto-show-mode
+       (if (null arg)
+           (not auto-show-mode)
+         (> (prefix-numeric-value arg) 0))))
+
+;; XEmacs addition:
+(defvar auto-show-inhibiting-commands
+  '(scrollbar-char-left
+    scrollbar-char-right
+    scrollbar-page-left
+    scrollbar-page-right
+    scrollbar-to-left
+    scrollbar-to-right
+    scrollbar-horizontal-drag)
+  "Commands that inhibit auto-show behavior.
+This normally includes the horizontal scrollbar commands.")
+
+;; XEmacs addition:
+(defun auto-show-should-take-action-p ()
+  (and auto-show-mode (auto-show-truncationp)
+       (equal (window-buffer) (current-buffer))
+       (not (memq this-command auto-show-inhibiting-commands))))
+
+;; XEmacs addition:
+(defun auto-show-make-region-visible (start end)
+  "Move point in such a way that the region (START, END) is visible.
+This only does anything if auto-show-mode is enabled, and it doesn't
+actually do any horizontal scrolling; rather, it just sets things up so
+that the region will be visible when `auto-show-make-point-visible'
+is next called (this happens after every command)."
+  (if (auto-show-should-take-action-p)
+      (let* ((col (current-column))    ;column on line point is at
+            (scroll (window-hscroll));how far window is scrolled
+            (w-width (- (window-width) 
+                        (if (> scroll 0)
+                            2 1)))     ;how wide window is on the screen
+            (right-col (+ scroll w-width))
+            (start-col (save-excursion (goto-char start) (current-column)))
+            (end-col (save-excursion (goto-char end) (current-column))))
+       (cond ((and (>= start-col scroll)
+                   (<= end-col right-col))
+              ;; already completely visible
+              nil)
+             ((< start-col scroll)
+              (scroll-right (- scroll start-col)))
+             (t
+              (scroll-left (- end-col right-col)))))))
+
+(defun auto-show-make-point-visible (&optional ignore-arg)
+  "Scroll horizontally to make point visible, if that is enabled.
+This function only does something if `auto-show-mode' is non-nil
+and longlines are being truncated in the selected window.
+See also the command `auto-show-mode'."
+  (interactive)
+  ;; XEmacs change
+  (if (auto-show-should-take-action-p)
+      (let* ((col (current-column))    ;column on line point is at
+            (scroll (window-hscroll))  ;how far window is scrolled
+            (w-width (- (window-width) 
+                        (if (> scroll 0)
+                            2 1)))     ;how wide window is on the screen
+            (right-col (+ scroll w-width)))
+       (if (and (< col auto-show-show-left-margin-threshold)
+                (< col (window-width))
+                (> scroll 0))
+           (scroll-right scroll)
+         (if (< col scroll)            ;to the left of the screen
+             (scroll-right (+ (- scroll col) auto-show-shift-amount))
+           (if (or (> col right-col)   ;to the right of the screen
+                   (and (= col right-col)
+                        (not (eolp))))
+               (scroll-left (+ auto-show-shift-amount 
+                               (- col (+ scroll w-width))))))))))
+
+;; XEmacs change:
+;; #### instead of this, we kludgily call it from the C code, to make sure
+;; that it's done after any other things on post-command-hook (which might
+;; move point).
+;; Do auto-scrolling after commands.
+;;(add-hook 'post-command-hook 'auto-show-make-point-visible)
+
+;; If being dumped, turn it on right away.
+(when (boundp 'pureload)
+  (auto-show-mode 1))
+
+;; Do auto-scrolling in comint buffers after process output also.
+; XEmacs -- don't do this now, it messes up comint.
+;(add-hook 'comint-output-filter-functions 'auto-show-make-point-visible t)
+
+(provide 'auto-show)
+
+;;; auto-show.el ends here
diff --git a/lisp/autoload.el b/lisp/autoload.el
new file mode 100644 (file)
index 0000000..a4b68da
--- /dev/null
@@ -0,0 +1,564 @@
+;;; autoload.el --- maintain autoloads in loaddefs.el.
+
+;; Copyright (C) 1991, 1992, 1993, 1994, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
+;; Copyright (C) 1996 Ben Wing.
+
+;; Author: Roland McGrath <roland@gnu.ai.mit.edu>
+;; Keywords: maint
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Not synched with FSF.
+
+;;; Commentary:
+
+;; This code helps GNU Emacs maintainers keep the loaddefs.el file up to
+;; date.  It interprets magic cookies of the form ";;;###autoload" in
+;; lisp source files in various useful ways.  To learn more, read the
+;; source; if you're going to use this, you'd better be able to.
+
+;; ChangeLog:
+
+;; Sep-26-1997:  slb removed code dealing with customization.
+
+;;; Code:
+
+(defun make-autoload (form file)
+  "Turn FORM, a defun or defmacro, into an autoload for source file FILE.
+Returns nil if FORM is not a defun, define-skeleton or defmacro."
+  (let ((car (car-safe form)))
+    (if (memq car '(defun define-skeleton defmacro))
+       (let ((macrop (eq car 'defmacro))
+             name doc)
+         (setq form (cdr form)
+               name (car form)
+               ;; Ignore the arguments.
+               form (cdr (if (eq car 'define-skeleton)
+                             form
+                           (cdr form)))
+               doc (car form))
+         (if (stringp doc)
+             (setq form (cdr form))
+           (setq doc nil))
+         (list 'autoload (list 'quote name) file doc
+               (or (eq car 'define-skeleton)
+                   (eq (car-safe (car form)) 'interactive))
+               (if macrop (list 'quote 'macro) nil)))
+      nil)))
+
+(put 'define-skeleton 'doc-string-elt 3)
+
+(defvar generate-autoload-cookie ";;;###autoload"
+  "Magic comment indicating the following form should be autoloaded.
+Used by `update-file-autoloads'.  This string should be
+meaningless to Lisp (e.g., a comment).
+
+This string is used:
+
+;;;###autoload
+\(defun function-to-be-autoloaded () ...)
+
+If this string appears alone on a line, the following form will be
+read and an autoload made for it.  If it is followed by the string
+\"immediate\", then the form on the following line will be copied
+verbatim.  If there is further text on the line, that text will be
+copied verbatim to `generated-autoload-file'.")
+
+(defvar generate-autoload-section-header "\f\n;;;### "
+  "String inserted before the form identifying
+the section of autoloads for a file.")
+
+(defvar generate-autoload-section-trailer "\n;;;***\n"
+  "String which indicates the end of the section of autoloads for a file.")
+
+;;; Forms which have doc-strings which should be printed specially.
+;;; A doc-string-elt property of ELT says that (nth ELT FORM) is
+;;; the doc-string in FORM.
+;;;
+;;; There used to be the following note here:
+;;; ;;; Note: defconst and defvar should NOT be marked in this way.
+;;; ;;; We don't want to produce defconsts and defvars that
+;;; ;;; make-docfile can grok, because then it would grok them twice,
+;;; ;;; once in foo.el (where they are given with ;;;###autoload) and
+;;; ;;; once in loaddefs.el.
+;;;
+;;; Counter-note: Yes, they should be marked in this way.
+;;; make-docfile only processes those files that are loaded into the
+;;; dumped Emacs, and those files should never have anything
+;;; autoloaded here.  The above-feared problem only occurs with files
+;;; which have autoloaded entries *and* are processed by make-docfile;
+;;; there should be no such files.
+
+(put 'autoload 'doc-string-elt 3)
+(put 'defun    'doc-string-elt 3)
+(put 'defvar   'doc-string-elt 3)
+(put 'defconst 'doc-string-elt 3)
+(put 'defmacro 'doc-string-elt 3)
+
+(defun autoload-trim-file-name (file)
+  "Returns a relative pathname of FILE including the last directory."
+  (setq file (expand-file-name file))
+  (file-relative-name file (file-name-directory
+                           (directory-file-name
+                            (file-name-directory file)))))
+
+;;;###autoload
+(defun generate-file-autoloads (file &optional funlist)
+  "Insert at point a loaddefs autoload section for FILE.
+autoloads are generated for defuns and defmacros in FILE
+marked by `generate-autoload-cookie' (which see).
+If FILE is being visited in a buffer, the contents of the buffer
+are used."
+  (interactive "fGenerate autoloads for file: ")
+  (generate-file-autoloads-1 file funlist))
+
+(defun* generate-file-autoloads-1 (file funlist)
+  "Insert at point a loaddefs autoload section for FILE.
+autoloads are generated for defuns and defmacros in FILE
+marked by `generate-autoload-cookie' (which see).
+If FILE is being visited in a buffer, the contents of the buffer
+are used."
+  (let ((outbuf (current-buffer))
+       (autoloads-done '())
+       (load-name (replace-in-string (file-name-nondirectory file)
+                                     "\\.elc?$"
+                                     ""))
+       (trim-name (autoload-trim-file-name file))
+       (dofiles (not (null funlist)))
+       (print-length nil)
+       (print-readably t) ; XEmacs
+       (float-output-format nil)
+       ;; (done-any nil)
+       (visited (get-file-buffer file))
+       output-end)
+
+    ;; If the autoload section we create here uses an absolute
+    ;; pathname for FILE in its header, and then Emacs is installed
+    ;; under a different path on another system,
+    ;; `update-autoloads-here' won't be able to find the files to be
+    ;; autoloaded.  So, if FILE is in the same directory or a
+    ;; subdirectory of the current buffer's directory, we'll make it
+    ;; relative to the current buffer's directory.
+    (setq file (expand-file-name file))
+
+    (save-excursion
+      (unwind-protect
+         (progn
+           (let ((find-file-hooks nil)
+                 (enable-local-variables nil))
+             (set-buffer (or visited (find-file-noselect file)))
+             (set-syntax-table lisp-mode-syntax-table))
+           (save-excursion
+             (save-restriction
+               (widen)
+               (goto-char (point-min))
+               (unless (search-forward generate-autoload-cookie nil t)
+                 (message "No autoloads found in %s" trim-name)
+                 (return-from generate-file-autoloads-1))
+
+               (message "Generating autoloads for %s..." trim-name)
+               (goto-char (point-min))
+               (while (if dofiles funlist (not (eobp)))
+                 (if (not dofiles)
+                     (skip-chars-forward " \t\n\f")
+                   (goto-char (point-min))
+                   (re-search-forward
+                    (concat "(def\\(un\\|var\\|const\\|macro\\) "
+                            (regexp-quote (symbol-name (car funlist)))
+                            "\\s "))
+                   (goto-char (match-beginning 0)))
+                 (cond
+                  ((or dofiles
+                       (looking-at (regexp-quote generate-autoload-cookie)))
+                   (if dofiles
+                       nil
+                     (search-forward generate-autoload-cookie)
+                     (skip-chars-forward " \t"))
+                   ;; (setq done-any t)
+                   (if (or dofiles (eolp))
+                       ;; Read the next form and make an autoload.
+                       (let* ((form (prog1 (read (current-buffer))
+                                      (or (bolp) (forward-line 1))))
+                              (autoload (make-autoload form load-name))
+                              (doc-string-elt (get (car-safe form)
+                                                   'doc-string-elt)))
+                         (if autoload
+                             (setq autoloads-done (cons (nth 1 form)
+                                                        autoloads-done))
+                           (setq autoload form))
+                         (if (and doc-string-elt
+                                  (stringp (nth doc-string-elt autoload)))
+                             ;; We need to hack the printing because the
+                             ;; doc-string must be printed specially for
+                             ;; make-docfile (sigh).
+                             (let* ((p (nthcdr (1- doc-string-elt)
+                                               autoload))
+                                    (elt (cdr p)))
+                               (setcdr p nil)
+                               (princ "\n(" outbuf)
+                               ;; XEmacs change: don't let ^^L's get into
+                               ;; the file or sorting is hard.
+                               (let ((print-escape-newlines t)
+                                     (p (save-excursion
+                                          (set-buffer outbuf)
+                                          (point)))
+                                     p2)
+                                 (mapcar (function (lambda (elt)
+                                                     (prin1 elt outbuf)
+                                                     (princ " " outbuf)))
+                                         autoload)
+                                 (save-excursion
+                                   (set-buffer outbuf)
+                                   (setq p2 (point-marker))
+                                   (goto-char p)
+                                   (save-match-data
+                                     (while (search-forward "\^L" p2 t)
+                                       (delete-char -1)
+                                       (insert "\\^L")))
+                                   (goto-char p2)
+                                   ))
+                               (princ "\"\\\n" outbuf)
+                               (let ((begin (save-excursion
+                                              (set-buffer outbuf)
+                                              (point))))
+                                 (princ (substring
+                                         (prin1-to-string (car elt)) 1)
+                                        outbuf)
+                                 ;; Insert a backslash before each ( that
+                                 ;; appears at the beginning of a line in
+                                 ;; the doc string.
+                                 (save-excursion
+                                   (set-buffer outbuf)
+                                   (save-excursion
+                                     (while (search-backward "\n(" begin t)
+                                       (forward-char 1)
+                                       (insert "\\"))))
+                                 (if (null (cdr elt))
+                                     (princ ")" outbuf)
+                                   (princ " " outbuf)
+                                   (princ (substring
+                                           (prin1-to-string (cdr elt))
+                                           1)
+                                          outbuf))
+                                 (terpri outbuf)))
+                           ;; XEmacs change: another fucking ^L hack
+                           (let ((p (save-excursion
+                                      (set-buffer outbuf)
+                                      (point)))
+                                 (print-escape-newlines t)
+                                 p2)
+                             (print autoload outbuf)
+                             (save-excursion
+                               (set-buffer outbuf)
+                               (setq p2 (point-marker))
+                               (goto-char p)
+                               (save-match-data
+                                 (while (search-forward "\^L" p2 t)
+                                   (delete-char -1)
+                                   (insert "\\^L")))
+                               (goto-char p2)
+                               ))
+                           ))
+                     ;; Copy the rest of the line to the output.
+                     (let ((begin (point)))
+                       ;; (terpri outbuf)
+                       (cond ((looking-at "immediate\\s *$") ; XEmacs
+                              ;; This is here so that you can automatically
+                              ;; have small hook functions copied to
+                              ;; loaddefs.el so that it's not necessary to
+                              ;; load a whole file just to get a two-line
+                              ;; do-nothing find-file-hook... --Stig
+                              (forward-line 1)
+                              (setq begin (point))
+                              (forward-sexp)
+                              (forward-line 1))
+                             (t
+                              (forward-line 1)))
+                       (princ (buffer-substring begin (point)) outbuf))))
+                  ((looking-at ";")
+                   ;; Don't read the comment.
+                   (forward-line 1))
+                  (t
+                   (forward-sexp 1)
+                   (forward-line 1)))
+                 (if dofiles
+                     (setq funlist (cdr funlist)))))))
+       (unless visited
+           ;; We created this buffer, so we should kill it.
+           (kill-buffer (current-buffer)))
+       (set-buffer outbuf)
+       (setq output-end (point-marker))))
+    (if t ;; done-any
+       ;; XEmacs -- always do this so that we cache the information
+       ;; that we've processed the file already.
+       (progn
+         (insert generate-autoload-section-header)
+         (prin1 (list 'autoloads autoloads-done load-name trim-name)
+                outbuf)
+         (terpri outbuf)
+         ;;;; (insert ";;; Generated autoloads from "
+         ;;;;    (autoload-trim-file-name file) "\n")
+         ;; Warn if we put a line in loaddefs.el
+         ;; that is long enough to cause trouble.
+         (when (< output-end (point))
+           (setq output-end (point-marker)))
+         (while (< (point) output-end)
+           ;; (let ((beg (point)))
+             (end-of-line)
+             ;; Emacs -- I still haven't figured this one out.
+             ;; (if (> (- (point) beg) 900)
+                 ;; (progn
+                   ;; (message "A line is too long--over 900 characters")
+                   ;; (sleep-for 2)
+                   ;; (goto-char output-end)))
+             ;; )
+           (forward-line 1))
+         (goto-char output-end)
+         (insert generate-autoload-section-trailer)))
+    (or noninteractive ; XEmacs: only need one line in -batch mode.
+       (message "Generating autoloads for %s...done" file))))
+
+\f
+(defconst autoload-file-name "auto-autoloads.el"
+  "Generic filename to put autoloads into.
+Unless you are an XEmacs maintainer, it is probably unwise to change this.")
+
+(defvar autoload-target-directory "../lisp/prim/"
+  "Directory to put autoload declaration file into.
+Unless you know what you're doing, don't mess with this.")
+
+(defvar generated-autoload-file
+  (expand-file-name (concat autoload-target-directory
+                           autoload-file-name)
+                   data-directory)
+  "*File `update-file-autoloads' puts autoloads into.
+A .el file can set this in its local variables section to make its
+autoloads go somewhere else.")
+
+(defconst cusload-file-name "custom-load.el"
+  "Generic filename ot put custom loads into.
+Unless you are an XEmacs maintainr, it is probably unwise to change this.")
+
+;;;###autoload
+(defun update-file-autoloads (file)
+  "Update the autoloads for FILE in `generated-autoload-file'
+\(which FILE might bind in its local variables).
+This functions refuses to update autoloads files."
+  (interactive "fUpdate autoloads for file: ")
+  (setq file (expand-file-name file))
+  (when (and (file-newer-than-file-p file generated-autoload-file)
+            (not (member (file-name-nondirectory file)
+                         (list autoload-file-name))))
+
+    (let ((load-name (replace-in-string (file-name-nondirectory file)
+                                       "\\.elc?$"
+                                       ""))
+         (trim-name (autoload-trim-file-name file))
+         section-begin form)
+      (save-excursion
+       (let ((find-file-hooks nil))
+         (set-buffer (or (get-file-buffer generated-autoload-file)
+                         (find-file-noselect generated-autoload-file))))
+       ;; First delete all sections for this file.
+       (goto-char (point-min))
+       (while (search-forward generate-autoload-section-header nil t)
+         (setq section-begin (match-beginning 0))
+         (setq form (read (current-buffer)))
+         (when (string= (nth 2 form) load-name)
+           (search-forward generate-autoload-section-trailer)
+           (delete-region section-begin (point))))
+
+       ;; Now find insertion point for new section
+       (block find-insertion-point
+         (goto-char (point-min))
+         (while (search-forward generate-autoload-section-header nil t)
+           (setq form (read (current-buffer)))
+           (when (string< trim-name (nth 3 form))
+             ;; Found alphabetically correct insertion point
+             (goto-char (match-beginning 0))
+             (return-from find-insertion-point))
+           (search-forward generate-autoload-section-trailer))
+         (when (eq (point) (point-min))        ; No existing entries?
+           (goto-char (point-max))))   ; Append.
+
+       ;; Add in new sections for file
+       (generate-file-autoloads file))
+
+      (when (interactive-p) (save-buffer)))))
+
+;;;###autoload
+(defun update-autoloads-here ()
+  "Update sections of the current buffer generated by `update-file-autoloads'."
+  (interactive)
+  (let ((generated-autoload-file (buffer-file-name)))
+    (save-excursion
+      (goto-char (point-min))
+      (while (search-forward generate-autoload-section-header nil t)
+       (let* ((form (condition-case ()
+                        (read (current-buffer))
+                      (end-of-file nil)))
+              (file (nth 3 form)))
+         ;; XEmacs change: if we can't find the file as specified, look
+         ;; around a bit more.
+         (cond ((and (stringp file)
+                     (or (get-file-buffer file)
+                         (file-exists-p file))))
+               ((and (stringp file)
+                     (save-match-data
+                       (let ((loc (locate-file (file-name-nondirectory file)
+                                               load-path)))
+                         (if (null loc)
+                             nil
+                           (setq loc (expand-file-name
+                                      (autoload-trim-file-name loc)
+                                      ".."))
+                           (if (or (get-file-buffer loc)
+                                   (file-exists-p loc))
+                               (setq file loc)
+                             nil))))))
+               (t
+                (setq file
+                      (if (y-or-n-p
+                           (format
+                            "Can't find library `%s'; remove its autoloads? "
+                            (nth 2 form) file))
+                          t
+                        (condition-case ()
+                            (read-file-name
+                             (format "Find `%s' load file: "
+                                     (nth 2 form))
+                             nil nil t)
+                          (quit nil))))))
+         (if file
+             (let ((begin (match-beginning 0)))
+               (search-forward generate-autoload-section-trailer)
+               (delete-region begin (point))))
+         (if (stringp file)
+             (generate-file-autoloads file)))))))
+
+;;;###autoload
+(defun update-autoloads-from-directory (dir)
+  "Update `generated-autoload-file' with all the current autoloads from DIR.
+This runs `update-file-autoloads' on each .el file in DIR.
+Obsolete autoload entries for files that no longer exist are deleted."
+  (interactive "DUpdate autoloads for directory: ")
+  (setq dir (expand-file-name dir))
+  (let ((simple-dir (file-name-as-directory
+                    (file-name-nondirectory
+                    (directory-file-name dir))))
+       (enable-local-eval nil))
+    (save-excursion
+      (let ((find-file-hooks nil))
+       (set-buffer (find-file-noselect generated-autoload-file)))
+      (goto-char (point-min))
+      (while (search-forward generate-autoload-section-header nil t)
+       (let* ((begin (match-beginning 0))
+              (form (condition-case ()
+                        (read (current-buffer))
+                      (end-of-file nil)))
+              (file (nth 3 form)))
+         (when (and (stringp file)
+                    (string= (file-name-directory file) simple-dir)
+                    (not (file-exists-p
+                          (expand-file-name
+                           (file-name-nondirectory file) dir))))
+           ;; Remove the obsolete section.
+           (search-forward generate-autoload-section-trailer)
+           (delete-region begin (point)))))
+      ;; Update or create autoload sections for existing files.
+      (mapcar 'update-file-autoloads (directory-files dir t "^[^=].*\\.el$"))
+      (unless noninteractive
+       (save-buffer)))))
+
+;;;###autoload
+(defun batch-update-autoloads ()
+  "Update the autoloads for the files or directories on the command line.
+Runs `update-file-autoloads' on files and `update-directory-autoloads'
+on directories.  Must be used only with -batch, and kills Emacs on completion.
+Each file will be processed even if an error occurred previously.
+For example, invoke `xemacs -batch -f batch-update-autoloads *.el'.
+The directory to which the auto-autoloads.el file must be the first parameter
+on the command line."
+  (unless noninteractive
+    (error "batch-update-autoloads is to be used only with -batch"))
+  (let ((defdir default-directory)
+       (enable-local-eval nil))        ; Don't query in batch mode.
+    ;; (message "Updating autoloads in %s..." generated-autoload-file)
+    (dolist (arg command-line-args-left)
+      (setq arg (expand-file-name arg defdir))
+      (cond
+       ((file-directory-p arg)
+       (message "Updating autoloads for directory %s..." arg)
+       (update-autoloads-from-directory arg))
+       ((file-exists-p arg)
+       (update-file-autoloads arg))
+       (t (error "No such file or directory: %s" arg))))
+    (fixup-autoload-buffer (concat (if autoload-package-name
+                                      autoload-package-name
+                                    (file-name-nondirectory defdir))
+                                  "-autoloads"))
+    (save-some-buffers t)
+    ;; (message "Done")
+    (kill-emacs 0)))
+
+(defun fixup-autoload-buffer (sym)
+  (save-excursion
+    (set-buffer (find-file-noselect generated-autoload-file))
+    (goto-char (point-min))
+    (if (and (not (= (point-min) (point-max)))
+            (not (looking-at ";;; DO NOT MODIFY THIS FILE")))
+       (progn
+         (insert ";;; DO NOT MODIFY THIS FILE\n")
+         (insert "(if (featurep '" sym ")")
+         (insert " (error \"Already loaded\"))\n")
+         (goto-char (point-max))
+         (insert "\n(provide '" sym ")\n")))))
+
+(defvar autoload-package-name nil)
+
+;;;###autoload
+(defun batch-update-directory ()
+  "Update the autoloads for the directory on the command line.
+Runs `update-file-autoloads' on each file in the given directory, must
+be used only with -batch and kills XEmacs on completion."
+  (unless noninteractive
+    (error "batch-update-directory is to be used only with -batch"))
+  (let ((defdir default-directory)
+       (enable-local-eval nil))        ; Don't query in batch mode.
+    (dolist (arg command-line-args-left)
+      (setq arg (expand-file-name arg defdir))
+      (let ((generated-autoload-file (concat arg "/" autoload-file-name)))
+       (cond
+        ((file-directory-p arg)
+         (message "Updating autoloads in directory %s..." arg)
+         (update-autoloads-from-directory arg))
+        (t (error "No such file or directory: %s" arg)))
+       (fixup-autoload-buffer (concat (if autoload-package-name
+                                          autoload-package-name
+                                        (file-name-nondirectory arg))
+                               "-autoloads"))
+       (save-some-buffers t))
+      ;; (message "Done")
+      ;; (kill-emacs 0)
+      )
+    (setq command-line-args-left nil)))
+
+(provide 'autoload)
+
+;;; autoload.el ends here
diff --git a/lisp/backquote.el b/lisp/backquote.el
new file mode 100644 (file)
index 0000000..1232603
--- /dev/null
@@ -0,0 +1,304 @@
+;;; backquote.el --- Full backquote support for elisp.  Reverse compatible too.
+
+;; Copyright (C) 1997 Free Software Foundation, Inc.
+
+;; Maintainer: XEmacs Development Team
+;; Keywords: extensions, dumped
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Not synched with FSF.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; The bulk of the code is originally from CMU Common Lisp (original notice
+;; below).
+
+;; It correctly supports nested backquotes and backquoted vectors.
+
+;; Converted to work with elisp by Miles Bader <miles@cogsci.ed.ac.uk>
+
+;; Changes by Jonathan Stigelman <Stig@hackvan.com>:
+;;   - Documentation added
+;;   - support for old-backquote-compatibility-hook nixed because the
+;;     old-backquote compatibility is now done in the reader...
+;;   - nixed support for |,.| because
+;;     (a) it's not in CLtl2
+;;     (b) ",.foo" is the same as ". ,foo"
+;;     (c) because RMS isn't interested in using this version of backquote.el
+;;
+;; wing@666.com; added ,. support back in:
+;;     (a) yes, it is in CLtl2.  Read closely on page 529.
+;;     (b) RMS in 19.30 adds C support for ,. even if it's not really
+;;         handled.
+;;
+;; **********************************************************************
+;; This code was written as part of the CMU Common Lisp project at
+;; Carnegie Mellon University, and has been placed in the public domain.
+;; If you want to use this code or any part of CMU Common Lisp, please contact
+;; Scott Fahlman or slisp-group@cs.cmu.edu.
+;;
+;; **********************************************************************
+;;
+;;    BACKQUOTE: Code Spice Lispified by Lee Schumacher.
+;;
+;; The flags passed back by BQ-PROCESS-2 can be interpreted as follows:
+;;
+;;   |`,|: [a] => a
+;;    NIL: [a] => a            ;the NIL flag is used only when a is NIL
+;;      T: [a] => a            ;the T flag is used when a is self-evaluating
+;;  QUOTE: [a] => (QUOTE a)
+;; APPEND: [a] => (APPEND . a)
+;;  NCONC: [a] => (NCONC . a)
+;;   LIST: [a] => (LIST . a)
+;;  LIST*: [a] => (LIST* . a)
+;;
+;; The flags are combined according to the following set of rules:
+;;  ([a] means that a should be converted according to the previous table)
+;;
+;;   \ car  ||   otherwise    |   QUOTE or     |    |`,@|      |    |`,.|
+;;cdr \     ||                |   T or NIL     |               |
+;;============================================================================
+;;  |`,|    ||LIST* ([a] [d]) |LIST* ([a] [d]) |APPEND (a [d]) |NCONC  (a [d])
+;;  NIL     ||LIST    ([a])   |QUOTE    (a)    |<hair>    a    |<hair>    a
+;;QUOTE or T||LIST* ([a] [d]) |QUOTE  (a . d)  |APPEND (a [d]) |NCONC (a [d])
+;; APPEND   ||LIST* ([a] [d]) |LIST* ([a] [d]) |APPEND (a . d) |NCONC (a [d])
+;; NCONC    ||LIST* ([a] [d]) |LIST* ([a] [d]) |APPEND (a [d]) |NCONC (a . d)
+;;  LIST    ||LIST  ([a] . d) |LIST  ([a] . d) |APPEND (a [d]) |NCONC (a [d])
+;;  LIST*   ||LIST* ([a] . d) |LIST* ([a] . d) |APPEND (a [d]) |NCONC  (a [d])
+;;
+;;<hair> involves starting over again pretending you had read ".,a)" instead
+;; of ",@a)"
+;;
+
+;; These are the forms it expects:  |backquote|  |`|  |,|  |,@| and |,.|.
+
+;;; Code:
+
+(defconst bq-backquote-marker 'backquote)
+(defconst bq-backtick-marker '\`)      ; remnant of the old lossage
+(defconst bq-comma-marker '\,)
+(defconst bq-at-marker '\,@)
+(defconst bq-dot-marker '\,\.)
+
+;;; ----------------------------------------------------------------
+
+(fset '\` 'backquote)
+
+(defmacro backquote (template)
+  "Expand the internal representation of a backquoted TEMPLATE into a lisp form.
+
+The backquote character is like the quote character in that it prevents the
+template which follows it from being evaluated, except that backquote
+permits you to evaluate portions of the quoted template.  A comma character
+inside TEMPLATE indicates that the following item should be evaluated.  A
+comma character may be followed by an at-sign, which indicates that the form
+which follows should be evaluated and inserted and \"spliced\" into the
+template.  Forms following ,@ must evaluate to lists.
+
+Here is how to use backquotes:
+  (setq p 'b
+        q '(c d e))
+  `(a ,p ,@q)   -> (a b c d e)
+  `(a . b)      -> (a . b)
+  `(a . ,p)     -> (a . b)
+
+The XEmacs lisp reader expands lisp backquotes as it reads them.
+Examples:
+  `atom             is read as (backquote atom)
+  `(a ,b ,@(c d e)) is read as (backquote (a (\\, b) (\\,\\@ (c d e))))
+  `(a . ,p)         is read as (backquote (a \\, p))
+
+\(backquote TEMPLATE) is a macro that produces code to construct TEMPLATE.
+Note that this is very slow in interpreted code, but fast if you compile.
+TEMPLATE is one or more nested lists or vectors, which are `almost quoted'.
+They are copied recursively, with elements preceded by comma evaluated.
+ (backquote (a b))     == (list 'a 'b)
+ (backquote (a [b c])) == (list 'a (vector 'b 'c))
+
+However, certain special lists are not copied.  They specify substitution.
+Lists that look like (\\, EXP) are evaluated and the result is substituted.
+ (backquote (a (\\, (+ x 5)))) == (list 'a (+ x 5))
+
+Elements of the form (\\,\\@ EXP) are evaluated and then all the elements
+of the result are substituted.  This result must be a list; it may
+be `nil'.
+
+Elements of the form (\\,\\. EXP) are evaluated and then all the elements
+of the result are concatenated to the list of preceding elements in the list.
+They must occur as the last element of a list (not a vector).
+EXP may evaluate to nil.
+
+As an example, a simple macro `push' could be written:
+   (defmacro push (v l)
+     `(setq ,l (cons ,@(list v l))))
+or as
+   (defmacro push (v l)
+     `(setq ,l (cons ,v ,l)))
+
+For backwards compatibility, old-style emacs-lisp backquotes are still read.
+     OLD STYLE                        NEW STYLE
+     (` (foo (, bar) (,@ bing)))      `(foo ,bar ,@bing)
+
+Because of the old-style backquote support, you cannot use a new-style
+backquoted form as the first element of a list.  Perhaps some day this
+restriction will go away, but for now you should be wary of it:
+    (`(this ,will ,@fail))
+    ((` (but (, this) will (,@ work))))
+This is an extremely rare thing to need to do in lisp."
+  (bq-process template))
+
+;;; ----------------------------------------------------------------
+
+(defconst bq-comma-flag 'unquote)
+(defconst bq-at-flag 'unquote-splicing)
+(defconst bq-dot-flag 'unquote-nconc-splicing)
+
+(defun bq-process (form)
+  (let* ((flag-result (bq-process-2 form))
+        (flag (car flag-result))
+        (result (cdr flag-result)))
+    (cond ((eq flag bq-at-flag)
+          (error ",@ after ` in form: %s" form))
+         ((eq flag bq-dot-flag)
+          (error ",. after ` in form: %s" form))
+         (t
+          (bq-process-1 flag result)))))
+
+;;; ----------------------------------------------------------------
+
+(defun bq-vector-contents (vec)
+  (let ((contents nil)
+       (n (length vec)))
+    (while (> n 0)
+      (setq n (1- n))
+      (setq contents (cons (aref vec n) contents)))
+    contents))
+
+;;; This does the expansion from table 2.
+(defun bq-process-2 (code)
+  (cond ((vectorp code)
+        (let* ((dflag-d
+                (bq-process-2 (bq-vector-contents code))))
+          (cons 'vector (bq-process-1 (car dflag-d) (cdr dflag-d)))))
+       ((atom code)
+        (cond ((null code) (cons nil nil))
+              ((or (numberp code) (eq code t))
+               (cons t code))
+              (t (cons 'quote code))))
+       ((eq (car code) bq-at-marker)
+        (cons bq-at-flag (nth 1 code)))
+       ((eq (car code) bq-dot-marker)
+        (cons bq-dot-flag (nth 1 code)))
+       ((eq (car code) bq-comma-marker)
+        (bq-comma (nth 1 code)))
+       ((or (eq (car code) bq-backquote-marker)
+            (eq (car code) bq-backtick-marker))        ; old lossage
+        (bq-process-2 (bq-process (nth 1 code))))
+       (t (let* ((aflag-a (bq-process-2 (car code)))
+                 (aflag (car aflag-a))
+                 (a (cdr aflag-a)))
+            (let* ((dflag-d (bq-process-2 (cdr code)))
+                   (dflag (car dflag-d))
+                   (d (cdr dflag-d)))
+              (if (eq dflag bq-at-flag)
+                  ;; get the errors later.
+                  (error ",@ after dot in %s" code))
+              (if (eq dflag bq-dot-flag)
+                  (error ",. after dot in %s" code))
+              (cond
+               ((eq aflag bq-at-flag)
+                (if (null dflag)
+                    (bq-comma a)
+                    (cons 'append
+                          (cond ((eq dflag 'append)
+                                 (cons a d ))
+                                (t (list a (bq-process-1 dflag d)))))))
+                ((eq aflag bq-dot-flag)
+                 (if (null dflag)
+                     (bq-comma a)
+                     (cons 'nconc
+                           (cond ((eq dflag 'nconc)
+                                  (cons a d))
+                                 (t (list a (bq-process-1 dflag d)))))))
+               ((null dflag)
+                (if (memq aflag '(quote t nil))
+                    (cons 'quote (list a))
+                    (cons 'list (list (bq-process-1 aflag a)))))
+               ((memq dflag '(quote t))
+                (if (memq aflag '(quote t nil))
+                    (cons 'quote (cons a d ))
+                    (cons 'list* (list (bq-process-1 aflag a)
+                                       (bq-process-1 dflag d)))))
+               (t (setq a (bq-process-1 aflag a))
+                  (if (memq dflag '(list list*))
+                      (cons dflag (cons a d))
+                      (cons 'list*
+                            (list a (bq-process-1 dflag d)))))))))))
+
+;;; This handles the <hair> cases
+(defun bq-comma (code)
+  (cond ((atom code)
+        (cond ((null code)
+               (cons nil nil))
+              ((or (numberp code) (eq code 't))
+               (cons t code))
+              (t (cons bq-comma-flag code))))
+       ((eq (car code) 'quote)
+        (cons (car code) (car (cdr code))))
+       ((memq (car code) '(append list list* nconc))
+        (cons (car code) (cdr code)))
+       ((eq (car code) 'cons)
+        (cons 'list* (cdr code)))
+       (t (cons bq-comma-flag code))))
+
+;;; This handles table 1.
+(defun bq-process-1 (flag thing)
+  (cond ((or (eq flag bq-comma-flag)
+            (memq flag '(t nil)))
+        thing)
+       ((eq flag 'quote)
+        (list  'quote thing))
+       ((eq flag 'vector)
+        (list 'apply '(function vector) thing))
+       (t (cons (cdr
+                 (assq flag
+                       '((cons . cons)
+                         (list* . bq-list*)
+                         (list . list)
+                         (append . append)
+                         (nconc . nconc))))
+                thing))))
+
+;;; ----------------------------------------------------------------
+
+(defmacro bq-list* (&rest args)
+  "Return a list of its arguments with last cons a dotted pair."
+  (setq args (reverse args))
+  (let ((result (car args)))
+    (setq args (cdr args))
+    (while args
+      (setq result (list 'cons (car args) result))
+      (setq args (cdr args)))
+    result))
+
+(provide 'backquote)
+
+;;; backquote.el ends here
diff --git a/lisp/blessmail.el b/lisp/blessmail.el
new file mode 100644 (file)
index 0000000..8580396
--- /dev/null
@@ -0,0 +1,71 @@
+;;; blessmail.el --- Decide whether movemail needs special privileges.
+
+;; Copyright (C) 1994 Free Software Foundation, Inc.
+
+;; Maintainer: FSF
+;; Keywords: internal
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: FSF 19.34.
+
+;;; Commentary:
+
+;; This is loaded into a bare Emacs to create the blessmail script,
+;; which (on systems that need it) is used during installation
+;; to give appropriate permissions to movemail.
+;;
+;; It has to be done from lisp in order to be sure of getting the
+;; correct value of rmail-spool-directory.
+
+;;; Code:
+
+;; These are no longer needed because we run this in emacs instead of temacs.
+;; (message "Using load-path %s" load-path)
+;; (load "paths.el")
+;; It is not safe to load site-init.el here, because it might have things in it
+;; that won't load properly unless all the rest of Emacs is loaded.
+
+(let ((dirname (directory-file-name rmail-spool-directory))
+      linkname attr modes)
+  ;; Check for symbolic link
+  (while (setq linkname (file-symlink-p dirname))
+    (setq dirname (if (file-name-absolute-p linkname)
+                     linkname
+                   (concat (file-name-directory dirname) linkname))))
+  (insert "#!/bin/sh\n")
+  (setq attr (file-attributes dirname))
+  (if (not (eq t (car attr)))
+      (insert (format "echo %s is not a directory\n" rmail-spool-directory))
+    (setq modes (nth 8 attr))
+    (cond ((= ?w (aref modes 8))
+          ;; Nothing needs to be done.
+          )
+         ((= ?w (aref modes 5))
+          (insert "chgrp " (number-to-string (nth 3 attr))
+                  " $* && chmod g+s $*\n"))
+         ((= ?w (aref modes 2))
+          (insert "chown " (number-to-string (nth 2 attr))
+                  " $* && chmod u+s $*\n"))
+         (t
+          (insert "chown root $* && chmod u+s $*\n"))))
+  (insert "echo mail directory = " dirname "\n"))
+(write-region (point-min) (point-max) "blessmail")
+(kill-emacs)
+
+;;; blessmail.el ends here
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el
new file mode 100644 (file)
index 0000000..b93feb4
--- /dev/null
@@ -0,0 +1,639 @@
+;;; buff-menu.el --- buffer menu main function and support functions.
+
+;; Copyright (C) 1985, 86, 87, 93, 94, 95 Free Software Foundation, Inc.
+
+;; Maintainer: FSF
+;; Keywords: extensions, dumped
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: FSF 19.34 except as noted.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; Edit, delete, or change attributes of all currently active Emacs
+;; buffers from a list summarizing their state.  A good way to browse
+;; any special or scratch buffers you have loaded, since you can't find
+;; them by filename.  The single entry point is `Buffer-menu-mode',
+;; normally bound to C-x C-b.
+
+;;; Change Log:
+
+;; Merged by esr with recent mods to Emacs 19 buff-menu, 23 Mar 1993
+;;
+;; Modified by Bob Weiner, Motorola, Inc., 4/14/89
+;;
+;; Added optional backup argument to 'Buffer-menu-unmark' to make it undelete
+;; current entry and then move to previous one.
+;;
+;; Based on FSF code dating back to 1985.
+
+;;; Code:
+;;;Trying to preserve the old window configuration works well in
+;;;simple scenarios, when you enter the buffer menu, use it, and exit it.
+;;;But it does strange things when you switch back to the buffer list buffer
+;;;with C-x b, later on, when the window configuration is different.
+;;;The choice seems to be, either restore the window configuration
+;;;in all cases, or in no cases.
+;;;I decided it was better not to restore the window config at all. -- rms.
+
+;;;But since then, I changed buffer-menu to use the selected window,
+;;;so q now once again goes back to the previous window configuration.
+
+;;;(defvar Buffer-menu-window-config nil
+;;;  "Window configuration saved from entry to `buffer-menu'.")
+
+; Put buffer *Buffer List* into proper mode right away
+; so that from now on even list-buffers is enough to get a buffer menu.
+
+(defvar Buffer-menu-buffer-column 4)
+
+(defvar Buffer-menu-mode-map nil)
+
+(if Buffer-menu-mode-map
+    ()
+  (setq Buffer-menu-mode-map (make-keymap))
+  (suppress-keymap Buffer-menu-mode-map t)
+  (set-keymap-name Buffer-menu-mode-map 'Buffer-menu-mode-map) ; XEmacs
+  (define-key Buffer-menu-mode-map "q" 'Buffer-menu-quit)
+  (define-key Buffer-menu-mode-map "v" 'Buffer-menu-select)
+  (define-key Buffer-menu-mode-map "2" 'Buffer-menu-2-window)
+  (define-key Buffer-menu-mode-map "1" 'Buffer-menu-1-window)
+  (define-key Buffer-menu-mode-map "f" 'Buffer-menu-this-window)
+  (define-key Buffer-menu-mode-map "\C-m" 'Buffer-menu-this-window)
+  (define-key Buffer-menu-mode-map "o" 'Buffer-menu-other-window)
+  (define-key Buffer-menu-mode-map "\C-o" 'Buffer-menu-switch-other-window)
+  (define-key Buffer-menu-mode-map "s" 'Buffer-menu-save)
+  (define-key Buffer-menu-mode-map "d" 'Buffer-menu-delete)
+  (define-key Buffer-menu-mode-map "k" 'Buffer-menu-delete)
+  (define-key Buffer-menu-mode-map "\C-d" 'Buffer-menu-delete-backwards)
+  (define-key Buffer-menu-mode-map "\C-k" 'Buffer-menu-delete)
+  (define-key Buffer-menu-mode-map "x" 'Buffer-menu-execute)
+  (define-key Buffer-menu-mode-map " " 'next-line)
+  (define-key Buffer-menu-mode-map "n" 'next-line)
+  (define-key Buffer-menu-mode-map "p" 'previous-line)
+  (define-key Buffer-menu-mode-map 'backspace 'Buffer-menu-backup-unmark)
+  (define-key Buffer-menu-mode-map 'delete 'Buffer-menu-backup-unmark)
+  (define-key Buffer-menu-mode-map "~" 'Buffer-menu-not-modified)
+  (define-key Buffer-menu-mode-map "?" 'describe-mode)
+  (define-key Buffer-menu-mode-map "u" 'Buffer-menu-unmark)
+  (define-key Buffer-menu-mode-map "m" 'Buffer-menu-mark)
+  (define-key Buffer-menu-mode-map "t" 'Buffer-menu-visit-tags-table)
+  (define-key Buffer-menu-mode-map "%" 'Buffer-menu-toggle-read-only)
+  (define-key Buffer-menu-mode-map "g" 'revert-buffer)
+  (define-key Buffer-menu-mode-map 'button2 'Buffer-menu-mouse-select)
+  (define-key Buffer-menu-mode-map 'button3 'Buffer-menu-popup-menu)
+  )
+
+;; Buffer Menu mode is suitable only for specially formatted data.
+(put 'Buffer-menu-mode 'mode-class 'special)
+
+(defun Buffer-menu-mode ()
+  "Major mode for editing a list of buffers.
+Each line describes one of the buffers in Emacs.
+Letters do not insert themselves; instead, they are commands.
+\\<Buffer-menu-mode-map>
+\\[Buffer-menu-mouse-select] -- select buffer you click on, in place of the buffer menu.
+\\[Buffer-menu-this-window] -- select current line's buffer in place of the buffer menu.
+\\[Buffer-menu-other-window] -- select that buffer in another window,
+  so the buffer menu buffer remains visible in its window.
+\\[Buffer-menu-switch-other-window] -- make another window display that buffer.
+\\[Buffer-menu-mark] -- mark current line's buffer to be displayed.
+\\[Buffer-menu-select] -- select current line's buffer.
+  Also show buffers marked with m, in other windows.
+\\[Buffer-menu-1-window] -- select that buffer in full-frame window.
+\\[Buffer-menu-2-window] -- select that buffer in one window,
+  together with buffer selected before this one in another window.
+\\[Buffer-menu-visit-tags-table] -- visit-tags-table this buffer.
+\\[Buffer-menu-not-modified] -- clear modified-flag on that buffer.
+\\[Buffer-menu-save] -- mark that buffer to be saved, and move down.
+\\[Buffer-menu-delete] -- mark that buffer to be deleted, and move down.
+\\[Buffer-menu-delete-backwards] -- mark that buffer to be deleted, and move up.
+\\[Buffer-menu-execute] -- delete or save marked buffers.
+\\[Buffer-menu-unmark] -- remove all kinds of marks from current line.
+  With prefix argument, also move up one line.
+\\[Buffer-menu-backup-unmark] -- back up a line and remove marks.
+\\[Buffer-menu-toggle-read-only] -- toggle read-only status of buffer on this line."
+  (kill-all-local-variables)
+  (use-local-map Buffer-menu-mode-map)
+  (setq major-mode 'Buffer-menu-mode)
+  (setq mode-name "Buffer Menu")
+  (make-local-variable 'revert-buffer-function)
+  (setq revert-buffer-function 'Buffer-menu-revert-function)
+  (setq truncate-lines t)
+  (setq buffer-read-only t)
+  (make-local-variable 'mouse-track-click-hook) ; XEmacs
+  (add-hook 'mouse-track-click-hook 'Buffer-menu-maybe-mouse-select) ; XEmacs
+  (run-hooks 'buffer-menu-mode-hook))
+
+(defun Buffer-menu-revert-function (ignore1 ignore2)
+  (list-buffers))
+\f
+(defun Buffer-menu-buffer (error-if-non-existent-p)
+  "Return buffer described by this line of buffer menu."
+  (let* ((where (save-excursion
+                 (beginning-of-line)
+                 (+ (point) Buffer-menu-buffer-column)))
+        (name (and (not (eobp)) (get-text-property where 'buffer-name))))
+    (if name
+       (or (get-buffer name)
+           (if error-if-non-existent-p
+               (error "No buffer named `%s'" name)
+             nil))
+      (if error-if-non-existent-p
+         (error "No buffer on this line")
+       nil))))
+\f
+(defun buffer-menu (&optional arg)
+  "Make a menu of buffers so you can save, delete or select them.
+With argument, show only buffers that are visiting files.
+Type ? after invocation to get help on commands available.
+Type q immediately to make the buffer menu go away."
+  (interactive "P")
+;;;  (setq Buffer-menu-window-config (current-window-configuration))
+  (switch-to-buffer (list-buffers-noselect arg))
+  (message
+   "Commands: d, s, x, u; f, o, 1, 2, m, v; ~, %%; q to quit; ? for help."))
+
+(defun buffer-menu-other-window (&optional arg)
+  "Display a list of buffers in another window.
+With the buffer list buffer, you can save, delete or select the buffers.
+With argument, show only buffers that are visiting files.
+Type ? after invocation to get help on commands available.
+Type q immediately to make the buffer menu go away."
+  (interactive "P")
+;;;  (setq Buffer-menu-window-config (current-window-configuration))
+  (switch-to-buffer-other-window (list-buffers-noselect arg))
+  (message
+   "Commands: d, s, x, u; f, o, 1, 2, m, v; ~, %%; q to quit; ? for help."))
+
+(defun Buffer-menu-quit ()
+  "Quit the buffer menu."
+  (interactive)
+  (let ((buffer (current-buffer)))
+    ;; Switch away from the buffer menu and bury it.
+    (switch-to-buffer (other-buffer))
+    (bury-buffer buffer)))
+
+(defun Buffer-menu-mark ()
+  "Mark buffer on this line for being displayed by \\<Buffer-menu-mode-map>\\[Buffer-menu-select] command."
+  (interactive)
+  (beginning-of-line)
+  (if (looking-at " [-M]")
+      (ding)
+    (let ((buffer-read-only nil))
+      (delete-char 1)
+      (insert ?>)
+      (forward-line 1))))
+
+(defun Buffer-menu-unmark (&optional backup)
+  "Cancel all requested operations on buffer on this line and move down.
+Optional ARG means move up."
+  (interactive "P")
+  (beginning-of-line)
+  (if (looking-at " [-M]")
+      (ding)
+    (let* ((buf (Buffer-menu-buffer t))
+          (mod (buffer-modified-p buf))
+          (readonly (save-excursion (set-buffer buf) buffer-read-only))
+          (buffer-read-only nil))
+      (delete-char 3)
+      (insert (if readonly (if mod " *%" "  %") (if mod " * " "   ")))))
+  (forward-line (if backup -1 1)))
+
+(defun Buffer-menu-backup-unmark ()
+  "Move up and cancel all requested operations on buffer on line above."
+  (interactive)
+  (forward-line -1)
+  (Buffer-menu-unmark)
+  (forward-line -1))
+
+(defun Buffer-menu-delete (&optional arg)
+  "Mark buffer on this line to be deleted by \\<Buffer-menu-mode-map>\\[Buffer-menu-execute] command.
+Prefix arg is how many buffers to delete.
+Negative arg means delete backwards."
+  (interactive "p")
+  (beginning-of-line)
+  (if (looking-at " [-M]")             ;header lines
+      (ding)
+    (let ((buffer-read-only nil))
+      (if (or (null arg) (= arg 0))
+         (setq arg 1))
+      (while (> arg 0)
+       (delete-char 1)
+       (insert ?D)
+       (forward-line 1)
+       (setq arg (1- arg)))
+      (while (< arg 0)
+       (delete-char 1)
+       (insert ?D)
+       (forward-line -1)
+       (setq arg (1+ arg))))))
+
+(defun Buffer-menu-delete-backwards (&optional arg)
+  "Mark buffer on this line to be deleted by \\<Buffer-menu-mode-map>\\[Buffer-menu-execute] command
+and then move up one line.  Prefix arg means move that many lines."
+  (interactive "p")
+  (Buffer-menu-delete (- (or arg 1)))
+  (while (looking-at " [-M]")
+    (forward-line 1)))
+
+(defun Buffer-menu-save ()
+  "Mark buffer on this line to be saved by \\<Buffer-menu-mode-map>\\[Buffer-menu-execute] command."
+  (interactive)
+  (beginning-of-line)
+  (if (looking-at " [-M]")             ;header lines
+      (ding)
+    (let ((buffer-read-only nil))
+      (forward-char 1)
+      (delete-char 1)
+      (insert ?S)
+      (forward-line 1))))
+
+(defun Buffer-menu-not-modified (&optional arg)
+  "Mark buffer on this line as unmodified (no changes to save)."
+  (interactive "P")
+  (save-excursion
+    (set-buffer (Buffer-menu-buffer t))
+    (set-buffer-modified-p arg))
+  (save-excursion
+   (beginning-of-line)
+   (forward-char 1)
+   (if (= (char-after (point)) (if arg ?  ?*))
+       (let ((buffer-read-only nil))
+        (delete-char 1)
+        (insert (if arg ?* ? ))))))
+
+(defun Buffer-menu-execute ()
+  "Save and/or delete buffers marked with \\<Buffer-menu-mode-map>\\[Buffer-menu-save] or \\<Buffer-menu-mode-map>\\[Buffer-menu-delete] commands."
+  (interactive)
+  (save-excursion
+    (goto-char (point-min))
+    (forward-line 1)
+    (while (re-search-forward "^.S" nil t)
+      (let ((modp nil))
+       (save-excursion
+         (set-buffer (Buffer-menu-buffer t))
+         (save-buffer)
+         (setq modp (buffer-modified-p)))
+       (let ((buffer-read-only nil))
+         (delete-char -1)
+         (insert (if modp ?* ? ))))))
+  (save-excursion
+    (goto-char (point-min))
+    (forward-line 1)
+    (let ((buff-menu-buffer (current-buffer))
+         (buffer-read-only nil))
+      (while (search-forward "\nD" nil t)
+       (forward-char -1)
+       (let ((buf (Buffer-menu-buffer nil)))
+         (or (eq buf nil)
+             (eq buf buff-menu-buffer)
+             (save-excursion (kill-buffer buf))))
+       (if (Buffer-menu-buffer nil)
+           (progn (delete-char 1)
+                  (insert ? ))
+         (delete-region (point) (progn (forward-line 1) (point)))
+         (forward-char -1))))))
+
+(defun Buffer-menu-select ()
+  "Select this line's buffer; also display buffers marked with `>'.
+You can mark buffers with the \\<Buffer-menu-mode-map>\\[Buffer-menu-mark] command.
+This command deletes and replaces all the previously existing windows
+in the selected frame."
+  (interactive)
+  (let ((buff (Buffer-menu-buffer t))
+       (menu (current-buffer))       
+       (others ())
+       tem)
+    (goto-char (point-min))
+    (while (search-forward "\n>" nil t)
+      (setq tem (Buffer-menu-buffer t))
+      (let ((buffer-read-only nil))
+       (delete-char -1)
+       (insert ?\ ))
+      (or (eq tem buff) (memq tem others) (setq others (cons tem others))))
+    (setq others (nreverse others)
+         tem (/ (1- (frame-height)) (1+ (length others))))
+    (delete-other-windows)
+    (switch-to-buffer buff)
+    (or (eq menu buff)
+       (bury-buffer menu))
+    (if (equal (length others) 0)
+       (progn
+;;;      ;; Restore previous window configuration before displaying
+;;;      ;; selected buffers.
+;;;      (if Buffer-menu-window-config
+;;;          (progn
+;;;            (set-window-configuration Buffer-menu-window-config)
+;;;            (setq Buffer-menu-window-config nil)))
+         (switch-to-buffer buff))
+      (while others
+       (split-window nil tem)
+       (other-window 1)
+       (switch-to-buffer (car others))
+       (setq others (cdr others)))
+      (other-window 1)                         ;back to the beginning!
+)))
+
+
+\f
+(defun Buffer-menu-visit-tags-table ()
+  "Visit the tags table in the buffer on this line.  See `visit-tags-table'."
+  (interactive)
+  (let ((file (buffer-file-name (Buffer-menu-buffer t))))
+    (if file
+       (visit-tags-table file)
+      (error "Specified buffer has no file"))))
+
+(defun Buffer-menu-1-window ()
+  "Select this line's buffer, alone, in full frame."
+  (interactive)
+  (switch-to-buffer (Buffer-menu-buffer t))
+  (bury-buffer (other-buffer))
+  (delete-other-windows)
+  ;; XEmacs:
+  ;; This is to get w->force_start set to nil.  Don't ask me, I only work here.
+  (set-window-buffer (selected-window) (current-buffer)))
+
+(defun Buffer-menu-mouse-select (event)
+  "Select the buffer whose line you click on."
+  (interactive "e")
+  (let (buffer)
+    (save-excursion
+      (set-buffer (event-buffer event)) ; XEmacs
+      (save-excursion
+       (goto-char (event-point event)) ; XEmacs
+       (setq buffer (Buffer-menu-buffer t))))
+    (select-window (event-window event)) ; XEmacs
+    (if (and (window-dedicated-p (selected-window))
+            (eq (selected-window) (frame-root-window)))
+       (switch-to-buffer-other-frame buffer)
+      (switch-to-buffer buffer))))
+
+;; XEmacs
+(defun Buffer-menu-maybe-mouse-select (event &optional click-count)
+  (interactive "e")
+  (and (>= click-count 2)
+       (let ((buffer (current-buffer))
+            (point (point))
+            (config (current-window-configuration)))
+        (condition-case nil
+            (progn
+              (Buffer-menu-mouse-select event)
+              t)
+          (error
+           (set-window-configuration config)
+           (set-buffer buffer)
+           (goto-char point)
+           nil)))))
+
+(defun Buffer-menu-this-window ()
+  "Select this line's buffer in this window."
+  (interactive)
+  (switch-to-buffer (Buffer-menu-buffer t)))
+
+(defun Buffer-menu-other-window ()
+  "Select this line's buffer in other window, leaving buffer menu visible."
+  (interactive)
+  (switch-to-buffer-other-window (Buffer-menu-buffer t)))
+
+(defun Buffer-menu-switch-other-window ()
+  "Make the other window select this line's buffer.
+The current window remains selected."
+  (interactive)
+  (display-buffer (Buffer-menu-buffer t)))
+
+(defun Buffer-menu-2-window ()
+  "Select this line's buffer, with previous buffer in second window."
+  (interactive)
+  (let ((buff (Buffer-menu-buffer t))
+       (menu (current-buffer))
+       (pop-up-windows t))
+    (delete-other-windows)
+    (switch-to-buffer (other-buffer))
+    (pop-to-buffer buff)
+    (bury-buffer menu)))
+
+(defun Buffer-menu-toggle-read-only ()
+  "Toggle read-only status of buffer on this line, perhaps via version control."
+  (interactive)
+  (let (char)
+    (save-excursion
+      (set-buffer (Buffer-menu-buffer t))
+      (modeline-toggle-read-only)
+      (setq char (if buffer-read-only ?% ? )))
+    (save-excursion
+      (beginning-of-line)
+      (forward-char 2)
+      (if (/= (following-char) char)
+          (let (buffer-read-only)
+            (delete-char 1)
+            (insert char))))))
+
+;; XEmacs
+(defvar Buffer-menu-popup-menu
+  '("Buffer Commands"
+    ["Select Buffer"                   Buffer-menu-select              t]
+    ["Select buffer Other Window"      Buffer-menu-other-window        t]
+    ["Clear Buffer Modification Flag"  Buffer-menu-not-modified        t]
+    "----"
+    ["Mark Buffer for Selection"       Buffer-menu-mark                t]
+    ["Mark Buffer for Save"            Buffer-menu-save                t]
+    ["Mark Buffer for Deletion"                Buffer-menu-delete              t]
+    ["Unmark Buffer"                   Buffer-menu-unmark              t]
+    "----"
+    ["Delete/Save Marked Buffers"      Buffer-menu-execute             t]
+    ))
+
+;; XEmacs
+(defun Buffer-menu-popup-menu (event)
+  (interactive "e")
+  (mouse-set-point event)
+  (beginning-of-line)
+  (let ((buffer (Buffer-menu-buffer nil)))
+    (if buffer
+       (popup-menu
+        (nconc (list (car Buffer-menu-popup-menu)
+                     (concat
+                      "Commands on buffer \"" (buffer-name buffer) "\":")
+                     "----")
+               (cdr Buffer-menu-popup-menu)))
+      (error "no buffer on this line"))))
+
+\f
+;; XEmacs
+(defvar list-buffers-header-line
+  (purecopy (concat " MR Buffer           Size  Mode         File\n"
+                    " -- ------           ----  ----         ----\n")))
+
+;; XEmacs
+(defvar list-buffers-identification 'default-list-buffers-identification
+  "String used to identify this buffer, or a function of one argument
+to generate such a string.  This variable is always buffer-local.")
+(make-variable-buffer-local 'list-buffers-identification)
+
+;; XEmacs
+;;;###autoload
+(defvar list-buffers-directory nil)
+
+;;;###autoload
+(make-variable-buffer-local 'list-buffers-directory)
+
+;; #### not synched
+(defun default-list-buffers-identification (output)
+  (save-excursion
+    (let ((file (or (buffer-file-name (current-buffer))
+                   (and (boundp 'list-buffers-directory)
+                        list-buffers-directory)))
+         (size (buffer-size))
+         (mode mode-name)
+         eob p s col)
+      (set-buffer output)
+      (end-of-line)
+      (setq eob (point))
+      (prin1 size output)
+      (setq p (point))
+      ;; right-justify the size
+      (move-to-column 19 t)
+      (setq col (point))
+      (if (> eob col)
+         (goto-char eob))
+      (setq s (- 6 (- p col)))
+      (while (> s 0) ; speed/consing tradeoff...
+       (insert ? )
+       (setq s (1- s)))
+      (end-of-line)
+      (indent-to 27 1)
+      (insert mode)
+      (if (not file)
+         nil
+       ;; if the mode-name is really long, clip it for the filename
+       (if (> 0 (setq s (- 39 (current-column))))
+           (delete-char (max s (- eob (point)))))
+       (indent-to 40 1)
+       (insert file)))))
+
+;; #### not synched
+(defun list-buffers-internal (output &optional predicate)
+  (let ((current (current-buffer))
+        (buffers (buffer-list)))
+    (save-excursion
+      (set-buffer output)
+      (setq buffer-read-only nil)
+      (erase-buffer)
+      (buffer-disable-undo output)
+      (insert list-buffers-header-line)
+
+      (while buffers
+        (let* ((col1 19)
+               (buffer (car buffers))
+               (name (buffer-name buffer))
+              this-buffer-line-start)
+          (setq buffers (cdr buffers))
+          (cond ((null name))           ;deleted buffer
+                ((and predicate
+                      (not (if (stringp predicate)
+                               (string-match predicate name)
+                               (funcall predicate buffer))))
+                 nil)
+                (t
+                 (set-buffer buffer)
+                 (let ((ro buffer-read-only)
+                       (id list-buffers-identification))
+                   (set-buffer output)
+                  (setq this-buffer-line-start (point))
+                   (insert (if (eq buffer current)
+                               (progn (setq current (point)) ?\.)
+                               ?\ ))
+                   (insert (if (buffer-modified-p buffer)
+                               ?\* 
+                               ?\ ))
+                   (insert (if ro
+                               ?\%
+                               ?\ ))
+                   (if (string-match "[\n\"\\ \t]" name)
+                       (let ((print-escape-newlines t))
+                         (prin1 name output))
+                       (insert ?\  name))
+                   (indent-to col1 1)
+                   (cond ((stringp id)
+                          (insert id))
+                         (id
+                          (set-buffer buffer)
+                          (condition-case e
+                              (funcall id output)
+                            (error
+                             (princ "***" output) (prin1 e output)))
+                          (set-buffer output)
+                          (goto-char (point-max)))))
+                (put-nonduplicable-text-property this-buffer-line-start
+                                                 (point)
+                                                 'buffer-name name)
+                (put-nonduplicable-text-property this-buffer-line-start
+                                                 (point)
+                                                 'highlight t)
+                 (insert ?\n)))))
+
+      (Buffer-menu-mode)
+      (if (not (bufferp current))
+          (goto-char current)))))
+;(define-key ctl-x-map "\C-b" 'list-buffers)
+
+(defun list-buffers (&optional files-only)
+  "Display a list of names of existing buffers.
+The list is displayed in a buffer named `*Buffer List*'.
+Note that buffers with names starting with spaces are omitted.
+Non-null optional arg FILES-ONLY means mention only file buffers.
+
+The M column contains a * for buffers that are modified.
+The R column contains a % for buffers that are read-only."
+  (interactive (list (if current-prefix-arg t nil))) ; XEmacs
+  (display-buffer (list-buffers-noselect files-only)))
+
+;; #### not synched
+(defun list-buffers-noselect (&optional files-only)
+  "Create and return a buffer with a list of names of existing buffers.
+The buffer is named `*Buffer List*'.
+Note that buffers with names starting with spaces are omitted.
+Non-null optional arg FILES-ONLY means mention only file buffers.
+
+The M column contains a * for buffers that are modified.
+The R column contains a % for buffers that are read-only."
+  (let ((buffer (get-buffer-create "*Buffer List*")))
+    (list-buffers-internal buffer
+                          (if (memq files-only '(t nil))
+                              #'(lambda (b)
+                                  (let ((n (buffer-name b)))
+                                    (cond ((and (/= 0 (length n))
+                                                (= (aref n 0) ?\ ))
+                                           ;;don't mention if starts with " "
+                                           nil)
+                                          (files-only
+                                           (buffer-file-name b))
+                                          (t
+                                           t))))
+                            files-only))
+    buffer))
+
+(provide 'buff-menu)
+
+;;; buff-menu.el ends here
diff --git a/lisp/buffer.el b/lisp/buffer.el
new file mode 100644 (file)
index 0000000..44f9221
--- /dev/null
@@ -0,0 +1,112 @@
+;;; buffer.el --- buffer routines taken from C
+
+;; Copyright (C) 1985-1989, 1992-1995, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1995 Sun Microsystems.
+;; Copyright (C) 1995, 1996 Ben Wing.
+
+;; Maintainer: XEmacs Development Team
+;; Keywords: internal, dumped
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: FSF 19.30 buffer.c.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;;; Code:
+
+(defun switch-to-buffer (bufname &optional norecord)
+  "Select buffer BUFNAME in the current window.
+BUFNAME may be a buffer or a buffer name and is created if did not exist.
+Optional second arg NORECORD non-nil means
+do not put this buffer at the front of the list of recently selected ones.
+
+WARNING: This is NOT the way to work on another buffer temporarily
+within a Lisp program!  Use `set-buffer' instead.  That avoids messing with
+the window-buffer correspondences."
+  (interactive "BSwitch to buffer: ")
+  ;; #ifdef I18N3
+  ;; #### Doc string should indicate that the buffer name will get
+  ;; translated.
+  ;; #endif
+  (if (eq (minibuffer-window) (selected-window))
+      (error "Cannot switch buffers in minibuffer window"))
+  (if (window-dedicated-p (selected-window))
+      (error "Cannot switch buffers in a dedicated window"))
+  (let (buf)
+    (if (null bufname)
+       (setq buf (other-buffer (current-buffer)))
+      (setq buf (get-buffer bufname))
+      (if (null buf)
+         (progn
+           (setq buf (get-buffer-create bufname))
+           (set-buffer-major-mode buf))))
+    (push-window-configuration)
+    (set-buffer buf)
+    (or norecord (record-buffer buf))
+    (set-window-buffer (if (eq (selected-window) (minibuffer-window))
+                          (next-window (minibuffer-window))
+                        (selected-window))
+                      buf)
+    buf))
+
+(defun pop-to-buffer (bufname &optional not-this-window-p on-frame)
+  "Select buffer BUFNAME in some window, preferably a different one.
+If BUFNAME is nil, then some other buffer is chosen.
+If `pop-up-windows' is non-nil, windows can be split to do this.
+If optional second arg NOT-THIS-WINDOW-P is non-nil, insist on finding
+another window even if BUFNAME is already visible in the selected window.
+If optional third arg is non-nil, it is the frame to pop to this
+buffer on.
+If `focus-follows-mouse' is non-nil, keyboard focus is left unchanged."
+  ;; #ifdef I18N3
+  ;; #### Doc string should indicate that the buffer name will get
+  ;; translated.
+  ;; #endif
+  ;; This is twisted.  It is evil to throw the keyboard focus around
+  ;; willy-nilly if the user wants focus-follows-mouse.
+  (let ((oldbuf (current-buffer))
+       buf window frame)
+    (if (null bufname)
+       (setq buf (other-buffer (current-buffer)))
+      (setq buf (get-buffer bufname))
+      (if (null buf)
+         (progn
+           (setq buf (get-buffer-create bufname))
+           (set-buffer-major-mode buf))))
+    (push-window-configuration)
+    (set-buffer buf)
+    (setq window (display-buffer buf not-this-window-p on-frame))
+    (setq frame (window-frame window))
+    ;; if the display-buffer hook decided to show this buffer in another
+    ;; frame, then select that frame, (unless obeying focus-follows-mouse -sb).
+    (if (and (not focus-follows-mouse)
+            (not (eq frame (selected-frame))))
+       (select-frame frame))
+    (record-buffer buf)
+    (if (and focus-follows-mouse
+            on-frame
+            (not (eq on-frame (selected-frame))))
+       (set-buffer oldbuf)
+      ;; select-window will modify the internal keyboard focus of XEmacs
+      (select-window window))
+    buf))
+
+;;; buffer.el ends here
diff --git a/lisp/build-report.el b/lisp/build-report.el
new file mode 100644 (file)
index 0000000..1700496
--- /dev/null
@@ -0,0 +1,294 @@
+;;; build-report.el --- Automatically formatted build reports for XEmacs
+
+;; Copyright (C) 1997 Adrian Aichner
+
+;; Author: Adrian Aichner, Teradyne GmbH Munich <aichner@ecf.teradyne.com>
+;; Date: Sun., Apr. 20, 1997.
+;; Version: 1.35
+;; Keywords: internal
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Not synched.
+
+;;; Commentary:
+
+;; The Idea:
+;; Let XEmacs report interesting aspects of how it was built.
+
+;; The Concept:
+;; User creates an XEmacs Build Report by just calling
+;; M-x build-report
+;; which will initialize a mail buffer with relevant information
+;; derived from the XEmacs build process. Point is left at the
+;; beginning of the report for user to input some personal notes and
+;; send the report.
+
+;; The Status:
+;; This is the first `Proof of Concept'.
+
+;; The Author:
+;; Adrian Aichner, Teradyne GmbH Munich, Sun., Apr. 20, 1997.
+
+;;; Code:
+
+(require 'config)
+(provide 'build-report)
+
+;; Due to recommendation by developers on xemacs-beta@xemacs.org,
+;; release versions are to be checked out using `co -u -kv ...'.
+(defconst build-report-version
+  "1.35"
+  "Version number of build-report.")
+
+(defgroup build-report nil
+  "Package automating the process of sending XEmacs Build Reports."
+  :group 'build)
+
+(defcustom build-report-destination
+  "xemacs-build-reports@xemacs.org"
+  "The mail address XEmacs Build Reports should go to."
+  :type 'string
+  :group 'build-report)
+
+(defcustom build-report-keep-regexp
+  (list
+   "make\\["
+   "error"
+   "warn"
+   "pure.*\\(space\\|size\\)"
+   "hides\\b"
+   "strange"
+   "shadowings"
+   "^Compilation"
+   "not\\s-+found")
+  "Regexp of make process output lines to keep in the report."
+  :type '(repeat regexp)
+  :group 'build-report)
+
+(defcustom build-report-delete-regexp
+  (list
+   "confl.*with.*auto-inlining"
+   (concat (regexp-quote (gethash 'blddir (config-value-hash-table))) "/lisp/[^ \t\n]+ hides "))
+  "Regexp of make process output lines to delete from the report."
+  :type '(repeat regexp)
+  :group 'build-report)
+
+(defcustom build-report-make-output-file
+  (concat (gethash 'blddir (config-value-hash-table)) "/beta.err")
+  "Filename where stdout and stderr of XEmacs make process have been stored.
+mk.err will not be created automatically. You'll have to run make with
+output redirection. I use an alias
+alias mk 'make \!* >>&\! \!$.err &'
+for that, so that I get beta.err went I run `mk beta'."
+  :type 'file
+  :group 'build-report)
+
+(defcustom build-report-installation-file
+  (concat (gethash 'blddir (config-value-hash-table)) "/Installation")
+  "Installation file produced by XEmacs configure process."
+  :type 'file
+  :group 'build-report)
+
+(defcustom build-report-installation-insert-all nil
+  "Tell build-report to insert the whole Installation file
+instead of just the last report."
+  :type 'boolean
+  :group 'build-report)
+
+(defcustom build-report-subject
+  (concat "[%s] " emacs-version " on " system-configuration)
+  "XEmacs Build Report Subject Line. %s-sequences will be substituted
+with user input through `build-report' according to
+`build-report-prompts' using `format'."
+  :type 'string
+  :group 'build-report)
+
+(defcustom build-report-prompts
+  '(("Status?: "  "Success" "Failure"))
+  "XEmacs Build Report Prompt(s). This is a list of prompt-string
+lists used by `build-report' in conjunction with
+`build-report-subject'. Each list consists of a prompt string
+followed by any number of strings which can be chosen via the history
+mechanism."
+  :group 'build-report)
+
+(defcustom build-report-file-encoding
+  "7bit"
+  "XEmacs Build Report File Encoding to be used when MIME support is
+available."
+  :group 'build-report)
+
+;; Symbol Name mappings from TM to SEMI serving as Compatibility
+;; Bandaid
+(when (featurep 'mime-setup)
+  ;; No (defvaralias ...) so far. Thanks to "Didier Verna"
+  ;; <verna@inf.enst.fr> for reporting my incorrect defvaraliasing of
+  ;; `mime-editor/insert-tag'.
+  ;; Thanks to Jens-Ulrik Holger Petersen
+  ;; <petersen@kurims.kyoto-u.ac.jp> for suggesting the conditional
+  ;; aliasing of SEMI functions.
+  (unless (fboundp 'mime-edit-content-beginning)
+    (defalias 'mime-edit-content-beginning 'mime-editor/content-beginning))
+  (unless (fboundp 'mime-edit-insert-tag)
+    (defalias 'mime-edit-insert-tag 'mime-editor/insert-tag))
+  (unless (fboundp 'mime-edit-insert-binary-file)
+    (defalias 'mime-edit-insert-binary-file
+      'mime-editor/insert-binary-file)))
+
+(defun build-report (&rest args)
+  "Initializes a fresh mail composition buffer using `compose-mail'
+with the contents of XEmacs Installation file and excerpts from XEmacs
+make output and errors and leaves point at the beginning of the mail text.
+ See also
+`compose-mail', `mail-user-agent',
+`build-report-destination',
+`build-report-keep-regexp',
+`build-report-delete-regexp',
+`build-report-make-output-file' and
+`build-report-installation-file'."
+  (interactive
+   (let (prompt
+        hist
+        arg
+        (prompts build-report-prompts))
+     (progn
+       (while prompts
+        (setq prompt (caar prompts))
+        (setq hist (cdar prompts))
+        (setq prompts (cdr prompts))
+        (setq arg (cons (read-string prompt "" 'hist) arg)))
+       arg)))
+  (save-excursion
+    (compose-mail
+     build-report-destination
+     (apply 'format build-report-subject args)
+     nil
+     nil
+     nil
+     nil
+     nil)
+    (let ((report-begin (point)))
+      (insert (build-report-insert-make-output report-begin))
+      (insert (build-report-insert-installation-file
+              report-begin
+              build-report-installation-insert-all))
+      (insert (build-report-insert-header report-begin))
+      (goto-char report-begin))))
+
+(defun build-report-insert-header (where)
+  "Inserts the build-report-header at the point specified by `where'."
+  (goto-char where)
+  (with-temp-buffer
+    (insert "\n> XEmacs Build Report as generated\n> by"
+           " build-report-version "
+           build-report-version " follows:\n\n")
+    (buffer-string)))
+
+(defun build-report-insert-make-output (where)
+  "Inserts the output of the XEmacs Beta make run.
+The make process output must have been saved in
+`build-report-make-output-file' during the XEmacs Beta building."
+  (goto-char where)
+  (with-temp-buffer
+    (if (file-exists-p build-report-make-output-file)
+       (progn
+         (if (featurep 'mime-setup)
+             (progn
+               (mime-edit-insert-tag
+                "text"
+                "plain" 
+                (concat
+                 "\nContent-Disposition: attachment;"
+                 " filename=\""
+                 (file-name-nondirectory
+                  build-report-make-output-file)
+                 "\""))
+               (mime-edit-insert-binary-file
+                build-report-make-output-file
+                build-report-file-encoding))
+           (insert-file-contents build-report-make-output-file))
+         (goto-char (point-min))
+         (delete-non-matching-lines (build-report-keep))
+         (goto-char (point-min))
+         (delete-matching-lines (build-report-delete))
+         (goto-char (point-min))
+         (insert "> Contents of " 
+                 build-report-make-output-file
+                 "\n> keeping lines matching\n> \""
+                 (build-report-keep)
+                 "\"\n> and then deleting lines matching\n> \""
+                 (build-report-delete)
+                 "\"\n\n"))
+      (insert "> " build-report-make-output-file
+             " does not exist!\n\n"))
+    (buffer-string)))
+      
+(defun build-report-insert-installation-file (where all)
+  "Inserts the contents of the `build-report-installation-file'
+created by the XEmacs Beta configure process."
+  (goto-char where)
+  (with-temp-buffer
+    (if (file-exists-p build-report-installation-file)
+       (let (file-begin last-configure)
+         (insert "> Contents of "
+                 build-report-installation-file
+                 ":\n")
+         (insert
+          (format
+           "> (Output from %s of ./configure)\n\n"
+           (if all "all runs" "most recent run")))
+         (if (featurep 'mime-setup)
+             (progn
+               (mime-edit-insert-tag
+                "text"
+                "plain" 
+                (concat
+                 "\nContent-Disposition: attachment;"
+                 " filename=\""
+                 (file-name-nondirectory
+                  build-report-installation-file)
+                 "\""))
+               (mime-edit-insert-binary-file
+                build-report-installation-file
+                build-report-file-encoding)
+               (setq file-begin (mime-edit-content-beginning)))
+           (setq file-begin (point))
+           (insert-file-contents
+            build-report-installation-file))
+         (unless all
+           (setq last-configure
+                 (search-backward-regexp
+                  "^\\(uname.*\\|osversion\\):\\s-+" file-begin t))
+           (if (and file-begin last-configure)
+               (delete-region file-begin last-configure))))
+      (insert "> " build-report-installation-file
+             " does not exist!\n\n"))
+    (buffer-string)))
+
+(defun build-report-keep ()
+  "build-report-internal function of no general value."
+  (mapconcat '(lambda (item) item)
+            (cons "^--\\[\\[\\|\\]\\]$" build-report-keep-regexp) "\\|"))
+
+(defun build-report-delete ()
+  "build-report-internal function of no general value."
+  (mapconcat '(lambda (item) item)
+            build-report-delete-regexp "\\|"))
+
+;;; build-report.el ends here
diff --git a/lisp/byte-optimize.el b/lisp/byte-optimize.el
new file mode 100644 (file)
index 0000000..fe99286
--- /dev/null
@@ -0,0 +1,1969 @@
+;;; byte-opt.el --- the optimization passes of the emacs-lisp byte compiler.
+
+;;; Copyright (c) 1991, 1994 Free Software Foundation, Inc.
+
+;; Author: Jamie Zawinski <jwz@netscape.com>
+;;     Hallvard Furuseth <hbf@ulrik.uio.no>
+;; Keywords: internal
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: FSF 19.30.
+
+;;; Commentary:
+
+;; ========================================================================
+;; "No matter how hard you try, you can't make a racehorse out of a pig.
+;; You can, however, make a faster pig."
+;;
+;; Or, to put it another way, the emacs byte compiler is a VW Bug.  This code
+;; makes it be a VW Bug with fuel injection and a turbocharger...  You're 
+;; still not going to make it go faster than 70 mph, but it might be easier
+;; to get it there.
+;;
+
+;; TO DO:
+;;
+;; (apply '(lambda (x &rest y) ...) 1 (foo))
+;;
+;; maintain a list of functions known not to access any global variables
+;; (actually, give them a 'dynamically-safe property) and then
+;;   (let ( v1 v2 ... vM vN ) <...dynamically-safe...> )  ==>
+;;   (let ( v1 v2 ... vM ) vN <...dynamically-safe...> )
+;; by recursing on this, we might be able to eliminate the entire let.
+;; However certain variables should never have their bindings optimized
+;; away, because they affect everything.
+;;   (put 'debug-on-error 'binding-is-magic t)
+;;   (put 'debug-on-abort 'binding-is-magic t)
+;;   (put 'debug-on-next-call 'binding-is-magic t)
+;;   (put 'mocklisp-arguments 'binding-is-magic t)
+;;   (put 'inhibit-quit 'binding-is-magic t)
+;;   (put 'quit-flag 'binding-is-magic t)
+;;   (put 't 'binding-is-magic t)
+;;   (put 'nil 'binding-is-magic t)
+;; possibly also
+;;   (put 'gc-cons-threshold 'binding-is-magic t)
+;;   (put 'track-mouse 'binding-is-magic t)
+;; others?
+;;
+;; Simple defsubsts often produce forms like
+;;    (let ((v1 (f1)) (v2 (f2)) ...)
+;;       (FN v1 v2 ...))
+;; It would be nice if we could optimize this to 
+;;    (FN (f1) (f2) ...)
+;; but we can't unless FN is dynamically-safe (it might be dynamically
+;; referring to the bindings that the lambda arglist established.)
+;; One of the uncountable lossages introduced by dynamic scope...
+;;
+;; Maybe there should be a control-structure that says "turn on 
+;; fast-and-loose type-assumptive optimizations here."  Then when
+;; we see a form like (car foo) we can from then on assume that
+;; the variable foo is of type cons, and optimize based on that.
+;; But, this won't win much because of (you guessed it) dynamic 
+;; scope.  Anything down the stack could change the value.
+;; (Another reason it doesn't work is that it is perfectly valid
+;; to call car with a null argument.)  A better approach might
+;; be to allow type-specification of the form
+;;   (put 'foo 'arg-types '(float (list integer) dynamic))
+;;   (put 'foo 'result-type 'bool)
+;; It should be possible to have these types checked to a certain
+;; degree.
+;;
+;; collapse common subexpressions
+;;
+;; It would be nice if redundant sequences could be factored out as well,
+;; when they are known to have no side-effects:
+;;   (list (+ a b c) (+ a b c))   -->  a b add c add dup list-2
+;; but beware of traps like
+;;   (cons (list x y) (list x y))
+;;
+;; Tail-recursion elimination is not really possible in Emacs Lisp.
+;; Tail-recursion elimination is almost always impossible when all variables
+;; have dynamic scope, but given that the "return" byteop requires the
+;; binding stack to be empty (rather than emptying it itself), there can be
+;; no truly tail-recursive Emacs Lisp functions that take any arguments or
+;; make any bindings.
+;;
+;; Here is an example of an Emacs Lisp function which could safely be
+;; byte-compiled tail-recursively:
+;;
+;;  (defun tail-map (fn list)
+;;    (cond (list
+;;           (funcall fn (car list))
+;;           (tail-map fn (cdr list)))))
+;;
+;; However, if there was even a single let-binding around the COND,
+;; it could not be byte-compiled, because there would be an "unbind"
+;; byte-op between the final "call" and "return."  Adding a 
+;; Bunbind_all byteop would fix this.
+;;
+;;   (defun foo (x y z) ... (foo a b c))
+;;   ... (const foo) (varref a) (varref b) (varref c) (call 3) END: (return)
+;;   ... (varref a) (varbind x) (varref b) (varbind y) (varref c) (varbind z) (goto 0) END: (unbind-all) (return)
+;;   ... (varref a) (varset x) (varref b) (varset y) (varref c) (varset z) (goto 0) END: (return)
+;;
+;; this also can be considered tail recursion:
+;;
+;;   ... (const foo) (varref a) (call 1) (goto X) ... X: (return)
+;; could generalize this by doing the optimization
+;;   (goto X) ... X: (return)  -->  (return)
+;;
+;; But this doesn't solve all of the problems: although by doing tail-
+;; recursion elimination in this way, the call-stack does not grow, the
+;; binding-stack would grow with each recursive step, and would eventually
+;; overflow.  I don't believe there is any way around this without lexical
+;; scope.
+;;
+;; Wouldn't it be nice if Emacs Lisp had lexical scope.
+;;
+;; Idea: the form (lexical-scope) in a file means that the file may be 
+;; compiled lexically.  This proclamation is file-local.  Then, within 
+;; that file, "let" would establish lexical bindings, and "let-dynamic"
+;; would do things the old way.  (Or we could use CL "declare" forms.)
+;; We'd have to notice defvars and defconsts, since those variables should
+;; always be dynamic, and attempting to do a lexical binding of them
+;; should simply do a dynamic binding instead.
+;; But!  We need to know about variables that were not necessarily defvarred
+;; in the file being compiled (doing a boundp check isn't good enough.)
+;; Fdefvar() would have to be modified to add something to the plist.
+;;
+;; A major disadvantage of this scheme is that the interpreter and compiler 
+;; would have different semantics for files compiled with (dynamic-scope).  
+;; Since this would be a file-local optimization, there would be no way to
+;; modify the interpreter to obey this (unless the loader was hacked 
+;; in some grody way, but that's a really bad idea.)
+;;
+;; HA!  RMS removed the following paragraph from his version of
+;; byte-opt.el.
+;;
+;; Really the Right Thing is to make lexical scope the default across
+;; the board, in the interpreter and compiler, and just FIX all of 
+;; the code that relies on dynamic scope of non-defvarred variables.
+
+;; Other things to consider:
+
+;; Associative math should recognize subcalls to identical function:
+;;(disassemble (lambda (x) (+ (+ (foo) 1) (+ (bar) 2))))
+;; This should generate the same as (1+ x) and (1- x)
+
+;;(disassemble (lambda (x) (cons (+ x 1) (- x 1))))
+;; An awful lot of functions always return a non-nil value.  If they're
+;; error free also they may act as true-constants.
+
+;;(disassemble (lambda (x) (and (point) (foo))))
+;; When 
+;;   - all but one arguments to a function are constant
+;;   - the non-constant argument is an if-expression (cond-expression?)
+;; then the outer function can be distributed.  If the guarding
+;; condition is side-effect-free [assignment-free] then the other
+;; arguments may be any expressions.  Since, however, the code size
+;; can increase this way they should be "simple".  Compare:
+
+;;(disassemble (lambda (x) (eq (if (point) 'a 'b) 'c)))
+;;(disassemble (lambda (x) (if (point) (eq 'a 'c) (eq 'b 'c))))
+
+;; (car (cons A B)) -> (progn B A)
+;;(disassemble (lambda (x) (car (cons (foo) 42))))
+
+;; (cdr (cons A B)) -> (progn A B)
+;;(disassemble (lambda (x) (cdr (cons 42 (foo)))))
+
+;; (car (list A B ...)) -> (progn B ... A)
+;;(disassemble (lambda (x) (car (list (foo) 42 (bar)))))
+
+;; (cdr (list A B ...)) -> (progn A (list B ...))
+;;(disassemble (lambda (x) (cdr (list 42 (foo) (bar)))))
+
+
+;;; Code:
+
+(require 'byte-compile "bytecomp")
+
+(defun byte-compile-log-lap-1 (format &rest args)
+  (if (aref byte-code-vector 0)
+      (error "The old version of the disassembler is loaded.  Reload new-bytecomp as well."))
+  (byte-compile-log-1
+   (apply 'format format
+     (let (c a)
+       (mapcar '(lambda (arg)
+                 (if (not (consp arg))
+                     (if (and (symbolp arg)
+                              (string-match "^byte-" (symbol-name arg)))
+                         (intern (substring (symbol-name arg) 5))
+                       arg)
+                   (if (integerp (setq c (car arg)))
+                       (error "non-symbolic byte-op %s" c))
+                   (if (eq c 'TAG)
+                       (setq c arg)
+                     (setq a (cond ((memq c byte-goto-ops)
+                                    (car (cdr (cdr arg))))
+                                   ((memq c byte-constref-ops)
+                                    (car (cdr arg)))
+                                   (t (cdr arg))))
+                     (setq c (symbol-name c))
+                     (if (string-match "^byte-." c)
+                         (setq c (intern (substring c 5)))))
+                   (if (eq c 'constant) (setq c 'const))
+                   (if (and (eq (cdr arg) 0)
+                            (not (memq c '(unbind call const))))
+                       c
+                     (format "(%s %s)" c a))))
+              args)))))
+
+(defmacro byte-compile-log-lap (format-string &rest args)
+  (list 'and
+       '(memq byte-optimize-log '(t byte))
+       (cons 'byte-compile-log-lap-1
+             (cons format-string args))))
+
+\f
+;;; byte-compile optimizers to support inlining
+
+(put 'inline 'byte-optimizer 'byte-optimize-inline-handler)
+
+(defun byte-optimize-inline-handler (form)
+  "byte-optimize-handler for the `inline' special-form."
+  (cons 'progn
+       (mapcar
+        '(lambda (sexp)
+           (let ((fn (car-safe sexp)))
+             (if (and (symbolp fn)
+                   (or (cdr (assq fn byte-compile-function-environment))
+                     (and (fboundp fn)
+                       (not (or (cdr (assq fn byte-compile-macro-environment))
+                                (and (consp (setq fn (symbol-function fn)))
+                                     (eq (car fn) 'macro))
+                                (subrp fn))))))
+                 (byte-compile-inline-expand sexp)
+               sexp)))
+        (cdr form))))
+
+
+;; Splice the given lap code into the current instruction stream.
+;; If it has any labels in it, you're responsible for making sure there
+;; are no collisions, and that byte-compile-tag-number is reasonable
+;; after this is spliced in.  The provided list is destroyed.
+(defun byte-inline-lapcode (lap)
+  (setq byte-compile-output (nconc (nreverse lap) byte-compile-output)))
+
+
+(defun byte-compile-inline-expand (form)
+  (let* ((name (car form))
+        (fn (or (cdr (assq name byte-compile-function-environment))
+                (and (fboundp name) (symbol-function name)))))
+    (if (null fn)
+       (progn
+         (byte-compile-warn "attempt to inline %s before it was defined" name)
+         form)
+      ;; else
+      (if (and (consp fn) (eq (car fn) 'autoload))
+         (progn
+           (load (nth 1 fn))
+           (setq fn (or (cdr (assq name byte-compile-function-environment))
+                        (and (fboundp name) (symbol-function name))))))
+      (if (and (consp fn) (eq (car fn) 'autoload))
+         (error "file \"%s\" didn't define \"%s\"" (nth 1 fn) name))
+      (if (symbolp fn)
+         (byte-compile-inline-expand (cons fn (cdr form)))
+       (if (compiled-function-p fn)
+           (progn
+             (fetch-bytecode fn)
+             (cons (list 'lambda (compiled-function-arglist fn)
+                         (list 'byte-code
+                               (compiled-function-instructions fn)
+                               (compiled-function-constants fn)
+                               (compiled-function-stack-depth fn)))
+                   (cdr form)))
+         (if (not (eq (car fn) 'lambda)) (error "%s is not a lambda" name))
+         (cons fn (cdr form)))))))
+
+;;; ((lambda ...) ...)
+;;; 
+(defun byte-compile-unfold-lambda (form &optional name)
+  (or name (setq name "anonymous lambda"))
+  (let ((lambda (car form))
+       (values (cdr form)))
+    (if (compiled-function-p lambda)
+       (setq lambda (list 'lambda (compiled-function-arglist lambda)
+                         (list 'byte-code
+                               (compiled-function-instructions lambda)
+                               (compiled-function-constants lambda)
+                               (compiled-function-stack-depth lambda)))))
+    (let ((arglist (nth 1 lambda))
+         (body (cdr (cdr lambda)))
+         optionalp restp
+         bindings)
+      (if (and (stringp (car body)) (cdr body))
+         (setq body (cdr body)))
+      (if (and (consp (car body)) (eq 'interactive (car (car body))))
+         (setq body (cdr body)))
+      (while arglist
+       (cond ((eq (car arglist) '&optional)
+              ;; ok, I'll let this slide because funcall_lambda() does...
+              ;; (if optionalp (error "multiple &optional keywords in %s" name))
+              (if restp (error "&optional found after &rest in %s" name))
+              (if (null (cdr arglist))
+                  (error "nothing after &optional in %s" name))
+              (setq optionalp t))
+             ((eq (car arglist) '&rest)
+              ;; ...but it is by no stretch of the imagination a reasonable
+              ;; thing that funcall_lambda() allows (&rest x y) and
+              ;; (&rest x &optional y) in arglists.
+              (if (null (cdr arglist))
+                  (error "nothing after &rest in %s" name))
+              (if (cdr (cdr arglist))
+                  (error "multiple vars after &rest in %s" name))
+              (setq restp t))
+             (restp
+              (setq bindings (cons (list (car arglist)
+                                         (and values (cons 'list values)))
+                                   bindings)
+                    values nil))
+             ((and (not optionalp) (null values))
+              (byte-compile-warn "attempt to open-code %s with too few arguments" name)
+              (setq arglist nil values 'too-few))
+             (t
+              (setq bindings (cons (list (car arglist) (car values))
+                                   bindings)
+                    values (cdr values))))
+       (setq arglist (cdr arglist)))
+      (if values
+         (progn
+           (or (eq values 'too-few)
+               (byte-compile-warn
+                "attempt to open-code %s with too many arguments" name))
+           form)
+       (let ((newform 
+              (if bindings
+                  (cons 'let (cons (nreverse bindings) body))
+                (cons 'progn body))))
+         (byte-compile-log "  %s\t==>\t%s" form newform)
+         newform)))))
+
+\f
+;;; implementing source-level optimizers
+
+(defun byte-optimize-form-code-walker (form for-effect)
+  ;;
+  ;; For normal function calls, We can just mapcar the optimizer the cdr.  But
+  ;; we need to have special knowledge of the syntax of the special forms
+  ;; like let and defun (that's why they're special forms :-).  (Actually,
+  ;; the important aspect is that they are subrs that don't evaluate all of
+  ;; their args.)
+  ;;
+  (let ((fn (car-safe form))
+       tmp)
+    (cond ((not (consp form))
+          (if (not (and for-effect
+                        (or byte-compile-delete-errors
+                            (not (symbolp form))
+                            (eq form t))))
+            form))
+         ((eq fn 'quote)
+          (if (cdr (cdr form))
+              (byte-compile-warn "malformed quote form: %s"
+                                 (prin1-to-string form)))
+          ;; map (quote nil) to nil to simplify optimizer logic.
+          ;; map quoted constants to nil if for-effect (just because).
+          (and (nth 1 form)
+               (not for-effect)
+               form))
+         ((or (compiled-function-p fn)
+              (eq 'lambda (car-safe fn)))
+          (byte-compile-unfold-lambda form))
+         ((memq fn '(let let*))
+          ;; recursively enter the optimizer for the bindings and body
+          ;; of a let or let*.  This for depth-firstness: forms that
+          ;; are more deeply nested are optimized first.
+          (cons fn
+            (cons
+             (mapcar '(lambda (binding)
+                        (if (symbolp binding)
+                            binding
+                          (if (cdr (cdr binding))
+                              (byte-compile-warn "malformed let binding: %s"
+                                                 (prin1-to-string binding)))
+                          (list (car binding)
+                                (byte-optimize-form (nth 1 binding) nil))))
+                     (nth 1 form))
+             (byte-optimize-body (cdr (cdr form)) for-effect))))
+         ((eq fn 'cond)
+          (cons fn
+                (mapcar '(lambda (clause)
+                           (if (consp clause)
+                               (cons
+                                (byte-optimize-form (car clause) nil)
+                                (byte-optimize-body (cdr clause) for-effect))
+                             (byte-compile-warn "malformed cond form: %s"
+                                                (prin1-to-string clause))
+                             clause))
+                        (cdr form))))
+         ((eq fn 'progn)
+          ;; as an extra added bonus, this simplifies (progn <x>) --> <x>
+          (if (cdr (cdr form))
+              (progn
+                (setq tmp (byte-optimize-body (cdr form) for-effect))
+                (if (cdr tmp) (cons 'progn tmp) (car tmp)))
+            (byte-optimize-form (nth 1 form) for-effect)))
+         ((eq fn 'prog1)
+          (if (cdr (cdr form))
+              (cons 'prog1
+                    (cons (byte-optimize-form (nth 1 form) for-effect)
+                          (byte-optimize-body (cdr (cdr form)) t)))
+            (byte-optimize-form (nth 1 form) for-effect)))
+         ((eq fn 'prog2)
+          (cons 'prog2
+            (cons (byte-optimize-form (nth 1 form) t)
+              (cons (byte-optimize-form (nth 2 form) for-effect)
+                    (byte-optimize-body (cdr (cdr (cdr form))) t)))))
+         
+         ((memq fn '(save-excursion save-restriction save-current-buffer))
+          ;; those subrs which have an implicit progn; it's not quite good
+          ;; enough to treat these like normal function calls.
+          ;; This can turn (save-excursion ...) into (save-excursion) which
+          ;; will be optimized away in the lap-optimize pass.
+          (cons fn (byte-optimize-body (cdr form) for-effect)))
+         
+         ((eq fn 'with-output-to-temp-buffer)
+          ;; this is just like the above, except for the first argument.
+          (cons fn
+            (cons
+             (byte-optimize-form (nth 1 form) nil)
+             (byte-optimize-body (cdr (cdr form)) for-effect))))
+         
+         ((eq fn 'if)
+          (cons fn
+            (cons (byte-optimize-form (nth 1 form) nil)
+              (cons
+               (byte-optimize-form (nth 2 form) for-effect)
+               (byte-optimize-body (nthcdr 3 form) for-effect)))))
+         
+         ((memq fn '(and or))  ; remember, and/or are control structures.
+          ;; take forms off the back until we can't any more.
+          ;; In the future it could conceivably be a problem that the
+          ;; subexpressions of these forms are optimized in the reverse
+          ;; order, but it's ok for now.
+          (if for-effect
+              (let ((backwards (reverse (cdr form))))
+                (while (and backwards
+                            (null (setcar backwards
+                                          (byte-optimize-form (car backwards)
+                                                              for-effect))))
+                  (setq backwards (cdr backwards)))
+                (if (and (cdr form) (null backwards))
+                    (byte-compile-log
+                     "  all subforms of %s called for effect; deleted" form))
+                (and backwards
+                     (cons fn (nreverse backwards))))
+            (cons fn (mapcar 'byte-optimize-form (cdr form)))))
+
+         ((eq fn 'interactive)
+          (byte-compile-warn "misplaced interactive spec: %s"
+                             (prin1-to-string form))
+          nil)
+         
+         ((memq fn '(defun defmacro function
+                     condition-case save-window-excursion))
+          ;; These forms are compiled as constants or by breaking out
+          ;; all the subexpressions and compiling them separately.
+          form)
+
+         ((eq fn 'unwind-protect)
+          ;; the "protected" part of an unwind-protect is compiled (and thus
+          ;; optimized) as a top-level form, so don't do it here.  But the
+          ;; non-protected part has the same for-effect status as the
+          ;; unwind-protect itself.  (The protected part is always for effect,
+          ;; but that isn't handled properly yet.)
+          (cons fn
+                (cons (byte-optimize-form (nth 1 form) for-effect)
+                      (cdr (cdr form)))))
+          
+         ((eq fn 'catch)
+          ;; the body of a catch is compiled (and thus optimized) as a
+          ;; top-level form, so don't do it here.  The tag is never
+          ;; for-effect.  The body should have the same for-effect status
+          ;; as the catch form itself, but that isn't handled properly yet.
+          (cons fn
+                (cons (byte-optimize-form (nth 1 form) nil)
+                      (cdr (cdr form)))))
+
+         ;; If optimization is on, this is the only place that macros are
+         ;; expanded.  If optimization is off, then macroexpansion happens
+         ;; in byte-compile-form.  Otherwise, the macros are already expanded
+         ;; by the time that is reached.
+         ((not (eq form
+                   (setq form (macroexpand form
+                                           byte-compile-macro-environment))))
+          (byte-optimize-form form for-effect))
+         
+         ((not (symbolp fn))
+          (or (eq 'mocklisp (car-safe fn)) ; ha!
+              (byte-compile-warn "%s is a malformed function"
+                                 (prin1-to-string fn)))
+          form)
+
+         ((and for-effect (setq tmp (get fn 'side-effect-free))
+               (or byte-compile-delete-errors
+                   (eq tmp 'error-free)
+                   (progn
+                     (byte-compile-warn "%s called for effect"
+                                        (prin1-to-string form))
+                     nil)))
+          (byte-compile-log "  %s called for effect; deleted" fn)
+          ;; appending a nil here might not be necessary, but it can't hurt.
+          (byte-optimize-form
+           (cons 'progn (append (cdr form) '(nil))) t))
+         
+         (t
+          ;; Otherwise, no args can be considered to be for-effect,
+          ;; even if the called function is for-effect, because we
+          ;; don't know anything about that function.
+          (cons fn (mapcar 'byte-optimize-form (cdr form)))))))
+
+
+(defun byte-optimize-form (form &optional for-effect)
+  "The source-level pass of the optimizer."
+  ;;
+  ;; First, optimize all sub-forms of this one.
+  (setq form (byte-optimize-form-code-walker form for-effect))
+  ;;
+  ;; after optimizing all subforms, optimize this form until it doesn't
+  ;; optimize any further.  This means that some forms will be passed through
+  ;; the optimizer many times, but that's necessary to make the for-effect
+  ;; processing do as much as possible.
+  ;;
+  (let (opt new)
+    (if (and (consp form)
+            (symbolp (car form))
+            (or (and for-effect
+                     ;; we don't have any of these yet, but we might.
+                     (setq opt (get (car form) 'byte-for-effect-optimizer)))
+                (setq opt (get (car form) 'byte-optimizer)))
+            (not (eq form (setq new (funcall opt form)))))
+       (progn
+;;       (if (equal form new) (error "bogus optimizer -- %s" opt))
+         (byte-compile-log "  %s\t==>\t%s" form new)
+         (setq new (byte-optimize-form new for-effect))
+         new)
+      form)))
+
+
+(defun byte-optimize-body (forms all-for-effect)
+  ;; optimize the cdr of a progn or implicit progn; all forms is a list of
+  ;; forms, all but the last of which are optimized with the assumption that
+  ;; they are being called for effect.  the last is for-effect as well if
+  ;; all-for-effect is true.  returns a new list of forms.
+  (let ((rest forms)
+       (result nil)
+       fe new)
+    (while rest
+      (setq fe (or all-for-effect (cdr rest)))
+      (setq new (and (car rest) (byte-optimize-form (car rest) fe)))
+      (if (or new (not fe))
+         (setq result (cons new result)))
+      (setq rest (cdr rest)))
+    (nreverse result)))
+
+\f
+;;; some source-level optimizers
+;;;
+;;; when writing optimizers, be VERY careful that the optimizer returns
+;;; something not EQ to its argument if and ONLY if it has made a change.
+;;; This implies that you cannot simply destructively modify the list;
+;;; you must return something not EQ to it if you make an optimization.
+;;;
+;;; It is now safe to optimize code such that it introduces new bindings.
+
+;; I'd like this to be a defsubst, but let's not be self-referential...
+(defmacro byte-compile-trueconstp (form)
+  ;; Returns non-nil if FORM is a non-nil constant.
+  (` (cond ((consp (, form)) (eq (car (, form)) 'quote))
+          ((not (symbolp (, form))))
+          ((eq (, form) t)))))
+
+;; If the function is being called with constant numeric args,
+;; evaluate as much as possible at compile-time.  This optimizer 
+;; assumes that the function is associative, like + or *.
+(defun byte-optimize-associative-math (form)
+  (let ((args nil)
+       (constants nil)
+       (rest (cdr form)))
+    (while rest
+      (if (numberp (car rest))
+         (setq constants (cons (car rest) constants))
+         (setq args (cons (car rest) args)))
+      (setq rest (cdr rest)))
+    (if (cdr constants)
+       (if args
+           (list (car form)
+                 (apply (car form) constants)
+                 (if (cdr args)
+                     (cons (car form) (nreverse args))
+                     (car args)))
+           (apply (car form) constants))
+       form)))
+
+;; If the function is being called with constant numeric args,
+;; evaluate as much as possible at compile-time.  This optimizer
+;; assumes that the function satisfies
+;;   (op x1 x2 ... xn) == (op ...(op (op x1 x2) x3) ...xn)
+;; like - and /.
+(defun byte-optimize-nonassociative-math (form)
+  (if (or (not (numberp (car (cdr form))))
+         (not (numberp (car (cdr (cdr form))))))
+      form
+    (let ((constant (car (cdr form)))
+         (rest (cdr (cdr form))))
+      (while (numberp (car rest))
+       (setq constant (funcall (car form) constant (car rest))
+             rest (cdr rest)))
+      (if rest
+         (cons (car form) (cons constant rest))
+         constant))))
+
+;;(defun byte-optimize-associative-two-args-math (form)
+;;  (setq form (byte-optimize-associative-math form))
+;;  (if (consp form)
+;;      (byte-optimize-two-args-left form)
+;;      form))
+
+;;(defun byte-optimize-nonassociative-two-args-math (form)
+;;  (setq form (byte-optimize-nonassociative-math form))
+;;  (if (consp form)
+;;      (byte-optimize-two-args-right form)
+;;      form))
+
+;; jwz: (byte-optimize-approx-equal 0.0 0.0) was returning nil
+;; in xemacs 19.15 because it used < instead of <=.
+(defun byte-optimize-approx-equal (x y)
+  (<= (* (abs (- x y)) 100) (abs (+ x y))))
+
+;; Collect all the constants from FORM, after the STARTth arg,
+;; and apply FUN to them to make one argument at the end.
+;; For functions that can handle floats, that optimization
+;; can be incorrect because reordering can cause an overflow
+;; that would otherwise be avoided by encountering an arg that is a float.
+;; We avoid this problem by (1) not moving float constants and
+;; (2) not moving anything if it would cause an overflow.
+(defun byte-optimize-delay-constants-math (form start fun)
+  ;; Merge all FORM's constants from number START, call FUN on them
+  ;; and put the result at the end.
+  (let ((rest (nthcdr (1- start) form))
+       (orig form)
+       ;; t means we must check for overflow.
+       (overflow (memq fun '(+ *))))
+    (while (cdr (setq rest (cdr rest)))
+      (if (integerp (car rest))
+         (let (constants)
+           (setq form (copy-sequence form)
+                 rest (nthcdr (1- start) form))
+           (while (setq rest (cdr rest))
+             (cond ((integerp (car rest))
+                    (setq constants (cons (car rest) constants))
+                    (setcar rest nil))))
+           ;; If necessary, check now for overflow
+           ;; that might be caused by reordering.
+           (if (and overflow
+                    ;; We have overflow if the result of doing the arithmetic
+                    ;; on floats is not even close to the result
+                    ;; of doing it on integers.
+                    (not (byte-optimize-approx-equal
+                           (apply fun (mapcar 'float constants))
+                           (float (apply fun constants)))))
+               (setq form orig)
+             (setq form (nconc (delq nil form)
+                               (list (apply fun (nreverse constants)))))))))
+    form))
+
+(defun byte-optimize-plus (form)
+  (setq form (byte-optimize-delay-constants-math form 1 '+))
+  (if (memq 0 form) (setq form (delq 0 (copy-sequence form))))
+  ;;(setq form (byte-optimize-associative-two-args-math form))
+  (cond ((null (cdr form))
+        (condition-case ()
+            (eval form)
+          (error form)))
+
+       ;; `add1' and `sub1' are a marginally fewer instructions
+       ;; than `plus' and `minus', so use them when possible.
+       ((and (null (nthcdr 3 form))
+             (eq (nth 2 form) 1))
+        (list '1+ (nth 1 form)))       ; (+ x 1)  -->  (1+ x)
+       ((and (null (nthcdr 3 form))
+             (eq (nth 1 form) 1))
+        (list '1+ (nth 2 form)))       ; (+ 1 x)  -->  (1+ x)
+       ((and (null (nthcdr 3 form))
+             (eq (nth 2 form) -1))
+        (list '1- (nth 1 form)))       ; (+ x -1)  -->  (1- x)
+       ((and (null (nthcdr 3 form))
+             (eq (nth 1 form) -1))
+        (list '1- (nth 2 form)))       ; (+ -1 x)  -->  (1- x)
+
+;;; It is not safe to delete the function entirely
+;;; (actually, it would be safe if we know the sole arg
+;;; is not a marker).
+;;     ((null (cdr (cdr form))) (nth 1 form))
+       (t form)))
+
+(defun byte-optimize-minus (form)
+  ;; Put constants at the end, except the last constant.
+  (setq form (byte-optimize-delay-constants-math form 2 '+))
+  ;; Now only first and last element can be a number.
+  (let ((last (car (reverse (nthcdr 3 form)))))
+    (cond ((eq 0 last)
+          ;; (- x y ... 0)  --> (- x y ...)
+          (setq form (copy-sequence form))
+          (setcdr (cdr (cdr form)) (delq 0 (nthcdr 3 form))))
+         ;; If form is (- CONST foo... CONST), merge first and last.
+         ((and (numberp (nth 1 form))
+               (numberp last))
+          (setq form (nconc (list '- (- (nth 1 form) last) (nth 2 form))
+                            (delq last (copy-sequence (nthcdr 3 form))))))))
+  (setq form
+;;; It is not safe to delete the function entirely
+;;; (actually, it would be safe if we know the sole arg
+;;; is not a marker).
+;;;  (if (eq (nth 2 form) 0)
+;;;      (nth 1 form)                  ; (- x 0)  -->  x
+    (byte-optimize-predicate
+     (if (and (null (cdr (cdr (cdr form))))
+             (eq (nth 1 form) 0))      ; (- 0 x)  -->  (- x)
+        (cons (car form) (cdr (cdr form)))
+       form))
+;;;    )
+    )
+
+  ;; `add1' and `sub1' are a marginally fewer instructions than `plus'
+  ;; and `minus', so use them when possible.
+  (cond ((and (null (nthcdr 3 form))
+             (eq (nth 2 form) 1))
+        (list '1- (nth 1 form)))       ; (- x 1)  -->  (1- x)
+       ((and (null (nthcdr 3 form))
+             (eq (nth 2 form) -1))
+        (list '1+ (nth 1 form)))       ; (- x -1)  -->  (1+ x)
+       (t
+        form))
+  )
+
+(defun byte-optimize-multiply (form)
+  (setq form (byte-optimize-delay-constants-math form 1 '*))
+  ;; If there is a constant in FORM, it is now the last element.
+  (cond ((null (cdr form)) 1)
+;;; It is not safe to delete the function entirely
+;;; (actually, it would be safe if we know the sole arg
+;;; is not a marker or if it appears in other arithmetic).
+;;;    ((null (cdr (cdr form))) (nth 1 form))
+       ((let ((last (car (reverse form))))
+          (cond ((eq 0 last)  (cons 'progn (cdr form)))
+                ((eq 1 last)  (delq 1 (copy-sequence form)))
+                ((eq -1 last) (list '- (delq -1 (copy-sequence form))))
+                ((and (eq 2 last)
+                      (memq t (mapcar 'symbolp (cdr form))))
+                 (prog1 (setq form (delq 2 (copy-sequence form)))
+                   (while (not (symbolp (car (setq form (cdr form))))))
+                   (setcar form (list '+ (car form) (car form)))))
+                (form))))))
+
+(defsubst byte-compile-butlast (form)
+  (nreverse (cdr (reverse form))))
+
+(defun byte-optimize-divide (form)
+  (setq form (byte-optimize-delay-constants-math form 2 '*))
+  (let ((last (car (reverse (cdr (cdr form))))))
+    (if (numberp last)
+       (cond ((= (length form) 3)
+              (if (and (numberp (nth 1 form))
+                       (not (zerop last))
+                       (condition-case nil
+                           (/ (nth 1 form) last)
+                         (error nil)))
+                  (setq form (list 'progn (/ (nth 1 form) last)))))
+             ((= last 1)
+              (setq form (byte-compile-butlast form)))
+             ((numberp (nth 1 form))
+              (setq form (cons (car form)
+                               (cons (/ (nth 1 form) last)
+                                     (byte-compile-butlast (cdr (cdr form)))))
+                    last nil))))
+    (cond 
+;;;      ((null (cdr (cdr form)))
+;;;       (nth 1 form))
+         ((eq (nth 1 form) 0)
+          (append '(progn) (cdr (cdr form)) '(0)))
+         ((eq last -1)
+          (list '- (if (nthcdr 3 form)
+                       (byte-compile-butlast form)
+                     (nth 1 form))))
+         (form))))
+
+(defun byte-optimize-logmumble (form)
+  (setq form (byte-optimize-delay-constants-math form 1 (car form)))
+  (byte-optimize-predicate
+   (cond ((memq 0 form)
+         (setq form (if (eq (car form) 'logand)
+                        (cons 'progn (cdr form))
+                      (delq 0 (copy-sequence form)))))
+        ((and (eq (car-safe form) 'logior)
+              (memq -1 form))
+         (cons 'progn (cdr form)))
+        (form))))
+
+
+(defun byte-optimize-binary-predicate (form)
+  (if (byte-compile-constp (nth 1 form))
+      (if (byte-compile-constp (nth 2 form))
+         (condition-case ()
+             (list 'quote (eval form))
+           (error form))
+       ;; This can enable some lapcode optimizations.
+       (list (car form) (nth 2 form) (nth 1 form)))
+    form))
+
+(defun byte-optimize-predicate (form)
+  (let ((ok t)
+       (rest (cdr form)))
+    (while (and rest ok)
+      (setq ok (byte-compile-constp (car rest))
+           rest (cdr rest)))
+    (if ok
+       (condition-case ()
+           (list 'quote (eval form))
+         (error form))
+       form)))
+
+(defun byte-optimize-identity (form)
+  (if (and (cdr form) (null (cdr (cdr form))))
+      (nth 1 form)
+    (byte-compile-warn "identity called with %d arg%s, but requires 1"
+                      (length (cdr form))
+                      (if (= 1 (length (cdr form))) "" "s"))
+    form))
+
+(put 'identity 'byte-optimizer 'byte-optimize-identity)
+
+(put '+   'byte-optimizer 'byte-optimize-plus)
+(put '*   'byte-optimizer 'byte-optimize-multiply)
+(put '-   'byte-optimizer 'byte-optimize-minus)
+(put '/   'byte-optimizer 'byte-optimize-divide)
+(put 'max 'byte-optimizer 'byte-optimize-associative-math)
+(put 'min 'byte-optimizer 'byte-optimize-associative-math)
+
+(put '=   'byte-optimizer 'byte-optimize-binary-predicate)
+(put 'eq  'byte-optimizer 'byte-optimize-binary-predicate)
+(put 'eql 'byte-optimizer 'byte-optimize-binary-predicate)
+(put 'equal   'byte-optimizer 'byte-optimize-binary-predicate)
+(put 'string= 'byte-optimizer 'byte-optimize-binary-predicate)
+(put 'string-equal 'byte-optimizer 'byte-optimize-binary-predicate)
+
+(put '<   'byte-optimizer 'byte-optimize-predicate)
+(put '>   'byte-optimizer 'byte-optimize-predicate)
+(put '<=  'byte-optimizer 'byte-optimize-predicate)
+(put '>=  'byte-optimizer 'byte-optimize-predicate)
+(put '1+  'byte-optimizer 'byte-optimize-predicate)
+(put '1-  'byte-optimizer 'byte-optimize-predicate)
+(put 'not 'byte-optimizer 'byte-optimize-predicate)
+(put 'null  'byte-optimizer 'byte-optimize-predicate)
+(put 'memq  'byte-optimizer 'byte-optimize-predicate)
+(put 'consp 'byte-optimizer 'byte-optimize-predicate)
+(put 'listp 'byte-optimizer 'byte-optimize-predicate)
+(put 'symbolp 'byte-optimizer 'byte-optimize-predicate)
+(put 'stringp 'byte-optimizer 'byte-optimize-predicate)
+(put 'string< 'byte-optimizer 'byte-optimize-predicate)
+(put 'string-lessp 'byte-optimizer 'byte-optimize-predicate)
+
+(put 'logand 'byte-optimizer 'byte-optimize-logmumble)
+(put 'logior 'byte-optimizer 'byte-optimize-logmumble)
+(put 'logxor 'byte-optimizer 'byte-optimize-logmumble)
+(put 'lognot 'byte-optimizer 'byte-optimize-predicate)
+
+(put 'car 'byte-optimizer 'byte-optimize-predicate)
+(put 'cdr 'byte-optimizer 'byte-optimize-predicate)
+(put 'car-safe 'byte-optimizer 'byte-optimize-predicate)
+(put 'cdr-safe 'byte-optimizer 'byte-optimize-predicate)
+
+
+;; I'm not convinced that this is necessary.  Doesn't the optimizer loop 
+;; take care of this? - Jamie
+;; I think this may some times be necessary to reduce ie (quote 5) to 5,
+;; so arithmetic optimizers recognize the numeric constant.  - Hallvard
+(put 'quote 'byte-optimizer 'byte-optimize-quote)
+(defun byte-optimize-quote (form)
+  (if (or (consp (nth 1 form))
+         (and (symbolp (nth 1 form))
+              ;; XEmacs addition:
+              (not (keywordp (nth 1 form)))
+              (not (memq (nth 1 form) '(nil t)))))
+      form
+    (nth 1 form)))
+
+(defun byte-optimize-zerop (form)
+  (cond ((numberp (nth 1 form))
+        (eval form))
+       (byte-compile-delete-errors
+        (list '= (nth 1 form) 0))
+       (form)))
+
+(put 'zerop 'byte-optimizer 'byte-optimize-zerop)
+
+(defun byte-optimize-and (form)
+  ;; Simplify if less than 2 args.
+  ;; if there is a literal nil in the args to `and', throw it and following
+  ;; forms away, and surround the `and' with (progn ... nil).
+  (cond ((null (cdr form)))
+       ((memq nil form)
+        (list 'progn
+              (byte-optimize-and
+               (prog1 (setq form (copy-sequence form))
+                 (while (nth 1 form)
+                   (setq form (cdr form)))
+                 (setcdr form nil)))
+              nil))
+       ((null (cdr (cdr form)))
+        (nth 1 form))
+       ((byte-optimize-predicate form))))
+
+(defun byte-optimize-or (form)
+  ;; Throw away nil's, and simplify if less than 2 args.
+  ;; If there is a literal non-nil constant in the args to `or', throw away all
+  ;; following forms.
+  (if (memq nil form)
+      (setq form (delq nil (copy-sequence form))))
+  (let ((rest form))
+    (while (cdr (setq rest (cdr rest)))
+      (if (byte-compile-trueconstp (car rest))
+         (setq form (copy-sequence form)
+               rest (setcdr (memq (car rest) form) nil))))
+    (if (cdr (cdr form))
+       (byte-optimize-predicate form)
+      (nth 1 form))))
+
+(defun byte-optimize-cond (form)
+  ;; if any clauses have a literal nil as their test, throw them away.
+  ;; if any clause has a literal non-nil constant as its test, throw
+  ;; away all following clauses.
+  (let (rest)
+    ;; This must be first, to reduce (cond (t ...) (nil)) to (progn t ...)
+    (while (setq rest (assq nil (cdr form)))
+      (setq form (delq rest (copy-sequence form))))
+    (if (memq nil (cdr form))
+       (setq form (delq nil (copy-sequence form))))
+    (setq rest form)
+    (while (setq rest (cdr rest))
+      (cond ((byte-compile-trueconstp (car-safe (car rest)))
+            (cond ((eq rest (cdr form))
+                   (setq form
+                         (if (cdr (car rest))
+                             (if (cdr (cdr (car rest)))
+                                 (cons 'progn (cdr (car rest)))
+                               (nth 1 (car rest)))
+                           (car (car rest)))))
+                  ((cdr rest)
+                   (setq form (copy-sequence form))
+                   (setcdr (memq (car rest) form) nil)))
+            (setq rest nil)))))
+  ;;
+  ;; Turn (cond (( <x> )) ... ) into (or <x> (cond ... ))
+  (if (eq 'cond (car-safe form))
+      (let ((clauses (cdr form)))
+       (if (and (consp (car clauses))
+                (null (cdr (car clauses))))
+           (list 'or (car (car clauses))
+                 (byte-optimize-cond
+                  (cons (car form) (cdr (cdr form)))))
+         form))
+    form))
+
+(defun byte-optimize-if (form)
+  ;; (if <true-constant> <then> <else...>) ==> <then>
+  ;; (if <false-constant> <then> <else...>) ==> (progn <else...>)
+  ;; (if <test> nil <else...>) ==> (if (not <test>) (progn <else...>))
+  ;; (if <test> <then> nil) ==> (if <test> <then>)
+  (let ((clause (nth 1 form)))
+    (cond ((byte-compile-trueconstp clause)
+          (nth 2 form))
+         ((null clause)
+          (if (nthcdr 4 form)
+              (cons 'progn (nthcdr 3 form))
+            (nth 3 form)))
+         ((nth 2 form)
+          (if (equal '(nil) (nthcdr 3 form))
+              (list 'if clause (nth 2 form))
+            form))
+         ((or (nth 3 form) (nthcdr 4 form))
+          (list 'if
+                ;; Don't make a double negative;
+                ;; instead, take away the one that is there.
+                (if (and (consp clause) (memq (car clause) '(not null))
+                         (= (length clause) 2)) ; (not xxxx) or (not (xxxx))
+                    (nth 1 clause)
+                  (list 'not clause))
+                (if (nthcdr 4 form)
+                    (cons 'progn (nthcdr 3 form))
+                  (nth 3 form))))
+         (t
+          (list 'progn clause nil)))))
+
+(defun byte-optimize-while (form)
+  (if (nth 1 form)
+      form))
+
+(put 'and   'byte-optimizer 'byte-optimize-and)
+(put 'or    'byte-optimizer 'byte-optimize-or)
+(put 'cond  'byte-optimizer 'byte-optimize-cond)
+(put 'if    'byte-optimizer 'byte-optimize-if)
+(put 'while 'byte-optimizer 'byte-optimize-while)
+
+;; byte-compile-negation-optimizer lives in bytecomp.el
+;(put '/= 'byte-optimizer 'byte-compile-negation-optimizer)
+(put 'atom 'byte-optimizer 'byte-compile-negation-optimizer)
+(put 'nlistp 'byte-optimizer 'byte-compile-negation-optimizer)
+
+
+(defun byte-optimize-funcall (form)
+  ;; (funcall '(lambda ...) ...) ==> ((lambda ...) ...)
+  ;; (funcall 'foo ...) ==> (foo ...)
+  (let ((fn (nth 1 form)))
+    (if (memq (car-safe fn) '(quote function))
+       (cons (nth 1 fn) (cdr (cdr form)))
+       form)))
+
+(defun byte-optimize-apply (form)
+  ;; If the last arg is a literal constant, turn this into a funcall.
+  ;; The funcall optimizer can then transform (funcall 'foo ...) -> (foo ...).
+  (let ((fn (nth 1 form))
+       (last (nth (1- (length form)) form))) ; I think this really is fastest
+    (or (if (or (null last)
+               (eq (car-safe last) 'quote))
+           (if (listp (nth 1 last))
+               (let ((butlast (nreverse (cdr (reverse (cdr (cdr form)))))))
+                 (nconc (list 'funcall fn) butlast
+                        (mapcar '(lambda (x) (list 'quote x)) (nth 1 last))))
+             (byte-compile-warn
+              "last arg to apply can't be a literal atom: %s"
+              (prin1-to-string last))
+             nil))
+       form)))
+
+(put 'funcall 'byte-optimizer 'byte-optimize-funcall)
+(put 'apply   'byte-optimizer 'byte-optimize-apply)
+
+
+(put 'let 'byte-optimizer 'byte-optimize-letX)
+(put 'let* 'byte-optimizer 'byte-optimize-letX)
+(defun byte-optimize-letX (form)
+  (cond ((null (nth 1 form))
+        ;; No bindings
+        (cons 'progn (cdr (cdr form))))
+       ((or (nth 2 form) (nthcdr 3 form))
+        form)
+        ;; The body is nil
+       ((eq (car form) 'let)
+        (append '(progn) (mapcar 'car-safe (mapcar 'cdr-safe (nth 1 form)))
+                '(nil)))
+       (t
+        (let ((binds (reverse (nth 1 form))))
+          (list 'let* (reverse (cdr binds)) (nth 1 (car binds)) nil)))))
+
+
+(put 'nth 'byte-optimizer 'byte-optimize-nth)
+(defun byte-optimize-nth (form)
+  (if (and (= (safe-length form) 3) (memq (nth 1 form) '(0 1)))
+      (list 'car (if (zerop (nth 1 form))
+                    (nth 2 form)
+                  (list 'cdr (nth 2 form))))
+    (byte-optimize-predicate form)))
+
+(put 'nthcdr 'byte-optimizer 'byte-optimize-nthcdr)
+(defun byte-optimize-nthcdr (form)
+  (if (and (= (safe-length form) 3) (not (memq (nth 1 form) '(0 1 2))))
+      (byte-optimize-predicate form)
+    (let ((count (nth 1 form)))
+      (setq form (nth 2 form))
+      (while (>= (setq count (1- count)) 0)
+       (setq form (list 'cdr form)))
+      form)))
+\f
+;;; enumerating those functions which need not be called if the returned 
+;;; value is not used.  That is, something like
+;;;    (progn (list (something-with-side-effects) (yow))
+;;;           (foo))
+;;; may safely be turned into
+;;;    (progn (progn (something-with-side-effects) (yow))
+;;;           (foo))
+;;; Further optimizations will turn (progn (list 1 2 3) 'foo) into 'foo.
+
+;;; I wonder if I missed any :-\)
+(let ((side-effect-free-fns
+       '(% * + - / /= 1+ 1- < <= = > >= abs acos append aref ash asin atan
+        assoc assq
+        boundp buffer-file-name buffer-local-variables buffer-modified-p
+        buffer-substring
+        capitalize car-less-than-car car cdr ceiling concat
+        ;; coordinates-in-window-p not in XEmacs
+        copy-marker cos count-lines
+        default-boundp default-value documentation downcase
+        elt exp expt fboundp featurep
+        file-directory-p file-exists-p file-locked-p file-name-absolute-p
+        file-newer-than-file-p file-readable-p file-symlink-p file-writable-p
+        float floor format
+        get get-buffer get-buffer-window getenv get-file-buffer
+        int-to-string
+        length log log10 logand logb logior lognot logxor lsh
+        marker-buffer max member memq min mod
+        next-window nth nthcdr number-to-string
+        parse-colon-path previous-window
+        radians-to-degrees rassq regexp-quote reverse round
+        sin sqrt string< string= string-equal string-lessp string-to-char
+        string-to-int string-to-number substring symbol-plist
+        tan upcase user-variable-p vconcat
+        ;; XEmacs change: window-edges -> window-pixel-edges
+        window-buffer window-dedicated-p window-pixel-edges window-height
+        window-hscroll window-minibuffer-p window-width
+        zerop))
+      (side-effect-and-error-free-fns
+       '(arrayp atom
+        bobp bolp buffer-end buffer-list buffer-size buffer-string bufferp
+        car-safe case-table-p cdr-safe char-or-string-p char-table-p
+        characterp commandp cons
+        consolep console-live-p consp
+        current-buffer
+        ;; XEmacs: extent functions, frame-live-p, various other stuff
+        devicep device-live-p
+        dot dot-marker eobp eolp eq eql equal eventp extentp
+        extent-live-p floatp framep frame-live-p
+        get-largest-window get-lru-window
+        identity ignore integerp integer-or-marker-p interactive-p
+        invocation-directory invocation-name
+        ;; keymapp may autoload in XEmacs, so not on this list!
+        list listp
+        make-marker mark mark-marker markerp memory-limit minibuffer-window
+        ;; mouse-movement-p not in XEmacs
+        natnump nlistp not null number-or-marker-p numberp
+        one-window-p ;; overlayp not in XEmacs
+        point point-marker point-min point-max processp
+        range-table-p
+        selected-window sequencep stringp subrp symbolp syntax-table-p
+        user-full-name user-login-name user-original-login-name
+        user-real-login-name user-real-uid user-uid
+        vector vectorp
+        window-configuration-p window-live-p windowp)))
+  (while side-effect-free-fns
+    (put (car side-effect-free-fns) 'side-effect-free t)
+    (setq side-effect-free-fns (cdr side-effect-free-fns)))
+  (while side-effect-and-error-free-fns
+    (put (car side-effect-and-error-free-fns) 'side-effect-free 'error-free)
+    (setq side-effect-and-error-free-fns (cdr side-effect-and-error-free-fns)))
+  nil)
+
+
+(defun byte-compile-splice-in-already-compiled-code (form)
+  ;; form is (byte-code "..." [...] n)
+  (if (not (memq byte-optimize '(t lap)))
+      (byte-compile-normal-call form)
+    (byte-inline-lapcode
+     (byte-decompile-bytecode-1 (nth 1 form) (nth 2 form) t))
+    (setq byte-compile-maxdepth (max (+ byte-compile-depth (nth 3 form))
+                                    byte-compile-maxdepth))
+    (setq byte-compile-depth (1+ byte-compile-depth))))
+
+(put 'byte-code 'byte-compile 'byte-compile-splice-in-already-compiled-code)
+
+\f
+(defconst byte-constref-ops
+  '(byte-constant byte-constant2 byte-varref byte-varset byte-varbind))
+
+;;; This function extracts the bitfields from variable-length opcodes.
+;;; Originally defined in disass.el (which no longer uses it.)
+
+(defun disassemble-offset ()
+  "Don't call this!"
+  ;; fetch and return the offset for the current opcode.
+  ;; return NIL if this opcode has no offset
+  ;; OP, PTR and BYTES are used and set dynamically
+  (defvar op)
+  (defvar ptr)
+  (defvar bytes)
+  (cond ((< op byte-nth)
+        (let ((tem (logand op 7)))
+          (setq op (logand op 248))
+          (cond ((eq tem 6)
+                 (setq ptr (1+ ptr))   ;offset in next byte
+                 ;; char-to-int to avoid downstream problems
+                 ;; caused by chars appearing where ints are
+                 ;; expected.  In bytecode the bytes in the
+                 ;; opcode string are always interpreted as ints.
+                 (char-to-int (aref bytes ptr)))
+                ((eq tem 7)
+                 (setq ptr (1+ ptr))   ;offset in next 2 bytes
+                 (+ (aref bytes ptr)
+                    (progn (setq ptr (1+ ptr))
+                           (lsh (aref bytes ptr) 8))))
+                (t tem))))             ;offset was in opcode
+       ((>= op byte-constant)
+        (prog1 (- op byte-constant)    ;offset in opcode
+          (setq op byte-constant)))
+       ((and (>= op byte-constant2)
+             (<= op byte-goto-if-not-nil-else-pop))
+        (setq ptr (1+ ptr))            ;offset in next 2 bytes
+        (+ (aref bytes ptr)
+           (progn (setq ptr (1+ ptr))
+                  (lsh (aref bytes ptr) 8))))
+       ;; XEmacs: this code was here before.  FSF's first comparison
+       ;; is (>= op byte-listN).  It appears that the rel-goto stuff
+       ;; does not exist in FSF 19.30.  It doesn't exist in 19.28
+       ;; either, so I'm going to assume that this is an improvement
+       ;; on our part and leave it in. --ben
+       ((and (>= op byte-rel-goto)
+             (<= op byte-insertN))
+        (setq ptr (1+ ptr))            ;offset in next byte
+        ;; Use char-to-int to avoid downstream problems caused by
+        ;; chars appearing where ints are expected.  In bytecode
+        ;; the bytes in the opcode string are always interpreted as
+        ;; ints.
+        (char-to-int (aref bytes ptr)))))
+
+
+;;; This de-compiler is used for inline expansion of compiled functions,
+;;; and by the disassembler.
+;;;
+;;; This list contains numbers, which are pc values,
+;;; before each instruction.
+(defun byte-decompile-bytecode (bytes constvec)
+  "Turns BYTECODE into lapcode, referring to CONSTVEC."
+  (let ((byte-compile-constants nil)
+       (byte-compile-variables nil)
+       (byte-compile-tag-number 0))
+    (byte-decompile-bytecode-1 bytes constvec)))
+
+;; As byte-decompile-bytecode, but updates
+;; byte-compile-{constants, variables, tag-number}.
+;; If MAKE-SPLICEABLE is true, then `return' opcodes are replaced
+;; with `goto's destined for the end of the code.
+;; That is for use by the compiler.
+;; If MAKE-SPLICEABLE is nil, we are being called for the disassembler.
+;; In that case, we put a pc value into the list
+;; before each insn (or its label).
+(defun byte-decompile-bytecode-1 (bytes constvec &optional make-spliceable)
+  (let ((length (length bytes))
+       (ptr 0) optr tags op offset
+       ;; tag unused
+       lap tmp
+       endtag
+       ;; (retcount 0) unused
+       )
+    (while (not (= ptr length))
+      (or make-spliceable
+         (setq lap (cons ptr lap)))
+      (setq op (aref bytes ptr)
+           optr ptr
+           offset (disassemble-offset)) ; this does dynamic-scope magic
+      (setq op (aref byte-code-vector op))
+      ;; XEmacs: the next line in FSF 19.30 reads
+      ;; (cond ((memq op byte-goto-ops)
+      ;; see the comment above about byte-rel-goto in XEmacs.
+      (cond ((or (memq op byte-goto-ops)
+                (cond ((memq op byte-rel-goto-ops)
+                       (setq op (aref byte-code-vector
+                                      (- (symbol-value op)
+                                         (- byte-rel-goto byte-goto))))
+                       (setq offset (+ ptr (- offset 127)))
+                       t)))
+            ;; it's a pc
+            (setq offset
+                  (cdr (or (assq offset tags)
+                           (car (setq tags
+                                      (cons (cons offset
+                                                  (byte-compile-make-tag))
+                                            tags)))))))
+           ((cond ((eq op 'byte-constant2) (setq op 'byte-constant) t)
+                  ((memq op byte-constref-ops)))
+            (setq tmp (aref constvec offset)
+                  offset (if (eq op 'byte-constant)
+                             (byte-compile-get-constant tmp)
+                           (or (assq tmp byte-compile-variables)
+                               (car (setq byte-compile-variables
+                                          (cons (list tmp)
+                                                byte-compile-variables)))))))
+           ((and make-spliceable
+                 (eq op 'byte-return))
+            (if (= ptr (1- length))
+                (setq op nil)
+              (setq offset (or endtag (setq endtag (byte-compile-make-tag)))
+                    op 'byte-goto))))
+      ;; lap = ( [ (pc . (op . arg)) ]* )
+      (setq lap (cons (cons optr (cons op (or offset 0)))
+                     lap))
+      (setq ptr (1+ ptr)))
+    ;; take off the dummy nil op that we replaced a trailing "return" with.
+    (let ((rest lap))
+      (while rest
+       (cond ((numberp (car rest)))
+             ((setq tmp (assq (car (car rest)) tags))
+              ;; this addr is jumped to
+              (setcdr rest (cons (cons nil (cdr tmp))
+                                 (cdr rest)))
+              (setq tags (delq tmp tags))
+              (setq rest (cdr rest))))
+       (setq rest (cdr rest))))
+    (if tags (error "optimizer error: missed tags %s" tags))
+    (if (null (car (cdr (car lap))))
+       (setq lap (cdr lap)))
+    (if endtag
+       (setq lap (cons (cons nil endtag) lap)))
+    ;; remove addrs, lap = ( [ (op . arg) | (TAG tagno) ]* )
+    (mapcar (function (lambda (elt)
+                       (if (numberp elt)
+                           elt
+                         (cdr elt))))
+           (nreverse lap))))
+
+\f
+;;; peephole optimizer
+
+(defconst byte-tagref-ops (cons 'TAG byte-goto-ops))
+
+(defconst byte-conditional-ops
+  '(byte-goto-if-nil byte-goto-if-not-nil byte-goto-if-nil-else-pop
+    byte-goto-if-not-nil-else-pop))
+
+(defconst byte-after-unbind-ops
+   '(byte-constant byte-dup
+     byte-symbolp byte-consp byte-stringp byte-listp byte-numberp byte-integerp
+     byte-eq byte-equal byte-not
+     byte-cons byte-list1 byte-list2   ; byte-list3 byte-list4
+     byte-interactive-p)
+   ;; How about other side-effect-free-ops?  Is it safe to move an
+   ;; error invocation (such as from nth) out of an unwind-protect?
+   "Byte-codes that can be moved past an unbind.")
+
+(defconst byte-compile-side-effect-and-error-free-ops
+  '(byte-constant byte-dup byte-symbolp byte-consp byte-stringp byte-listp
+    byte-integerp byte-numberp byte-eq byte-equal byte-not byte-car-safe
+    byte-cdr-safe byte-cons byte-list1 byte-list2 byte-point byte-point-max
+    byte-point-min byte-following-char byte-preceding-char
+    byte-current-column byte-eolp byte-eobp byte-bolp byte-bobp
+    byte-current-buffer byte-interactive-p))
+
+(defconst byte-compile-side-effect-free-ops
+  (nconc 
+   '(byte-varref byte-nth byte-memq byte-car byte-cdr byte-length byte-aref
+     byte-symbol-value byte-get byte-concat2 byte-concat3 byte-sub1 byte-add1
+     byte-eqlsign byte-gtr byte-lss byte-leq byte-geq byte-diff byte-negate
+     byte-plus byte-max byte-min byte-mult byte-char-after byte-char-syntax
+     byte-buffer-substring byte-string= byte-string< byte-nthcdr byte-elt
+     byte-member byte-assq byte-quo byte-rem)
+   byte-compile-side-effect-and-error-free-ops))
+
+;;; This piece of shit is because of the way DEFVAR_BOOL() variables work.
+;;; Consider the code
+;;;
+;;;    (defun foo (flag)
+;;;      (let ((old-pop-ups pop-up-windows)
+;;;            (pop-up-windows flag))
+;;;        (cond ((not (eq pop-up-windows old-pop-ups))
+;;;               (setq old-pop-ups pop-up-windows)
+;;;               ...))))
+;;;
+;;; Uncompiled, old-pop-ups will always be set to nil or t, even if FLAG is
+;;; something else.  But if we optimize
+;;;
+;;;    varref flag
+;;;    varbind pop-up-windows
+;;;    varref pop-up-windows
+;;;    not
+;;; to
+;;;    varref flag
+;;;    dup
+;;;    varbind pop-up-windows
+;;;    not
+;;;
+;;; we break the program, because it will appear that pop-up-windows and 
+;;; old-pop-ups are not EQ when really they are.  So we have to know what
+;;; the BOOL variables are, and not perform this optimization on them.
+;;;
+
+;;; This used to hold a large list of boolean variables, which had to
+;;; be updated every time a new DEFVAR_BOOL is added, making it very
+;;; hard to maintain.  Such a list is not necessary under XEmacs,
+;;; where we can use `built-in-variable-type' to query for boolean
+;;; variables.
+
+;(defconst byte-boolean-vars
+;  '(abbrev-all-caps purify-flag find-file-compare-truenames
+;    find-file-use-truenames delete-auto-save-files byte-metering-on
+;    x-seppuku-on-epipe zmacs-regions zmacs-region-active-p
+;    zmacs-region-stays atomic-extent-goto-char-p
+;    suppress-early-error-handler-backtrace noninteractive
+;    inhibit-early-packages inhibit-autoloads debug-paths
+;    inhibit-site-lisp debug-on-quit debug-on-next-call
+;    modifier-keys-are-sticky x-allow-sendevents
+;    mswindows-dynamic-frame-resize focus-follows-mouse
+;    inhibit-input-event-recording enable-multibyte-characters
+;    disable-auto-save-when-buffer-shrinks
+;    allow-deletion-of-last-visible-frame indent-tabs-mode
+;    load-in-progress load-warn-when-source-newer
+;    load-warn-when-source-only load-ignore-elc-files
+;    load-force-doc-strings fail-on-bucky-bit-character-escapes
+;    popup-menu-titles menubar-show-keybindings completion-ignore-case
+;    canna-empty-info canna-through-info canna-underline
+;    canna-inhibit-hankakukana enable-multibyte-characters
+;    re-short-flag x-handle-non-fully-specified-fonts
+;    print-escape-newlines print-readably delete-exited-processes
+;    windowed-process-io visible-bell no-redraw-on-reenter
+;    cursor-in-echo-area inhibit-warning-display
+;    column-number-start-at-one parse-sexp-ignore-comments
+;    words-include-escapes scroll-on-clipped-lines)
+;  "DEFVAR_BOOL variables.  Giving these any non-nil value sets them to t.
+;If this does not enumerate all DEFVAR_BOOL variables, the byte-optimizer
+;may generate incorrect code.")
+
+(defun byte-optimize-lapcode (lap &optional for-effect)
+  "Simple peephole optimizer.  LAP is both modified and returned."
+  (let (lap0 ;; off0 unused
+       lap1 ;; off1
+       lap2 ;; off2
+       (keep-going 'first-time)
+       (add-depth 0)
+       rest tmp tmp2 tmp3
+       (side-effect-free (if byte-compile-delete-errors
+                             byte-compile-side-effect-free-ops
+                           byte-compile-side-effect-and-error-free-ops)))
+    (while keep-going
+      (or (eq keep-going 'first-time)
+         (byte-compile-log-lap "  ---- next pass"))
+      (setq rest lap
+           keep-going nil)
+      (while rest
+       (setq lap0 (car rest)
+             lap1 (nth 1 rest)
+             lap2 (nth 2 rest))
+
+       ;; You may notice that sequences like "dup varset discard" are
+       ;; optimized but sequences like "dup varset TAG1: discard" are not.
+       ;; You may be tempted to change this; resist that temptation.
+       (cond ;;
+             ;; <side-effect-free> pop -->  <deleted>
+             ;;  ...including:
+             ;; const-X pop   -->  <deleted>
+             ;; varref-X pop  -->  <deleted>
+             ;; dup pop       -->  <deleted>
+             ;;
+             ((and (eq 'byte-discard (car lap1))
+                   (memq (car lap0) side-effect-free))
+              (setq keep-going t)
+              (setq tmp (aref byte-stack+-info (symbol-value (car lap0))))
+              (setq rest (cdr rest))
+              (cond ((= tmp 1)
+                     (byte-compile-log-lap
+                      "  %s discard\t-->\t<deleted>" lap0)
+                     (setq lap (delq lap0 (delq lap1 lap))))
+                    ((= tmp 0)
+                     (byte-compile-log-lap
+                      "  %s discard\t-->\t<deleted> discard" lap0)
+                     (setq lap (delq lap0 lap)))
+                    ((= tmp -1)
+                     (byte-compile-log-lap
+                      "  %s discard\t-->\tdiscard discard" lap0)
+                     (setcar lap0 'byte-discard)
+                     (setcdr lap0 0))
+                    ((error "Optimizer error: too much on the stack"))))
+             ;;
+             ;; goto*-X X:  -->  X:
+             ;;
+             ((and (memq (car lap0) byte-goto-ops)
+                   (eq (cdr lap0) lap1))
+              (cond ((eq (car lap0) 'byte-goto)
+                     (setq lap (delq lap0 lap))
+                     (setq tmp "<deleted>"))
+                    ((memq (car lap0) byte-goto-always-pop-ops)
+                     (setcar lap0 (setq tmp 'byte-discard))
+                     (setcdr lap0 0))
+                    ((error "Depth conflict at tag %d" (nth 2 lap0))))
+              (and (memq byte-optimize-log '(t byte))
+                   (byte-compile-log "  (goto %s) %s:\t-->\t%s %s:"
+                                     (nth 1 lap1) (nth 1 lap1)
+                                     tmp (nth 1 lap1)))
+              (setq keep-going t))
+             ;;
+             ;; varset-X varref-X  -->  dup varset-X
+             ;; varbind-X varref-X  -->  dup varbind-X
+             ;; const/dup varset-X varref-X --> const/dup varset-X const/dup
+             ;; const/dup varbind-X varref-X --> const/dup varbind-X const/dup
+             ;; The latter two can enable other optimizations.
+             ;;
+             ((and (eq 'byte-varref (car lap2))
+                   (eq (cdr lap1) (cdr lap2))
+                   (memq (car lap1) '(byte-varset byte-varbind)))
+              (if (and (setq tmp (eq (built-in-variable-type (car (cdr lap2)))
+                                     'boolean))
+                       (not (eq (car lap0) 'byte-constant)))
+                  nil
+                (setq keep-going t)
+                (if (memq (car lap0) '(byte-constant byte-dup))
+                    (progn
+                      (setq tmp (if (or (not tmp)
+                                        (memq (car (cdr lap0)) '(nil t)))
+                                    (cdr lap0)
+                                  (byte-compile-get-constant t)))
+                      (byte-compile-log-lap "  %s %s %s\t-->\t%s %s %s"
+                                            lap0 lap1 lap2 lap0 lap1
+                                            (cons (car lap0) tmp))
+                      (setcar lap2 (car lap0))
+                      (setcdr lap2 tmp))
+                  (byte-compile-log-lap "  %s %s\t-->\tdup %s" lap1 lap2 lap1)
+                  (setcar lap2 (car lap1))
+                  (setcar lap1 'byte-dup)
+                  (setcdr lap1 0)
+                  ;; The stack depth gets locally increased, so we will
+                  ;; increase maxdepth in case depth = maxdepth here.
+                  ;; This can cause the third argument to byte-code to
+                  ;; be larger than necessary.
+                  (setq add-depth 1))))
+             ;;
+             ;; dup varset-X discard  -->  varset-X
+             ;; dup varbind-X discard  -->  varbind-X
+             ;; (the varbind variant can emerge from other optimizations)
+             ;;
+             ((and (eq 'byte-dup (car lap0))
+                   (eq 'byte-discard (car lap2))
+                   (memq (car lap1) '(byte-varset byte-varbind)))
+              (byte-compile-log-lap "  dup %s discard\t-->\t%s" lap1 lap1)
+              (setq keep-going t
+                    rest (cdr rest))
+              (setq lap (delq lap0 (delq lap2 lap))))
+             ;;
+             ;; not goto-X-if-nil              -->  goto-X-if-non-nil
+             ;; not goto-X-if-non-nil          -->  goto-X-if-nil
+             ;;
+             ;; it is wrong to do the same thing for the -else-pop variants.
+             ;;
+             ((and (eq 'byte-not (car lap0))
+                   (or (eq 'byte-goto-if-nil (car lap1))
+                       (eq 'byte-goto-if-not-nil (car lap1))))
+              (byte-compile-log-lap "  not %s\t-->\t%s"
+                                    lap1
+                                    (cons
+                                     (if (eq (car lap1) 'byte-goto-if-nil)
+                                         'byte-goto-if-not-nil
+                                       'byte-goto-if-nil)
+                                     (cdr lap1)))
+              (setcar lap1 (if (eq (car lap1) 'byte-goto-if-nil)
+                               'byte-goto-if-not-nil
+                               'byte-goto-if-nil))
+              (setq lap (delq lap0 lap))
+              (setq keep-going t))
+             ;;
+             ;; goto-X-if-nil     goto-Y X:  -->  goto-Y-if-non-nil X:
+             ;; goto-X-if-non-nil goto-Y X:  -->  goto-Y-if-nil     X:
+             ;;
+             ;; it is wrong to do the same thing for the -else-pop variants.
+             ;; 
+             ((and (or (eq 'byte-goto-if-nil (car lap0))
+                       (eq 'byte-goto-if-not-nil (car lap0)))  ; gotoX
+                   (eq 'byte-goto (car lap1))                  ; gotoY
+                   (eq (cdr lap0) lap2))                       ; TAG X
+              (let ((inverse (if (eq 'byte-goto-if-nil (car lap0))
+                                 'byte-goto-if-not-nil 'byte-goto-if-nil)))
+                (byte-compile-log-lap "  %s %s %s:\t-->\t%s %s:"
+                                      lap0 lap1 lap2
+                                      (cons inverse (cdr lap1)) lap2)
+                (setq lap (delq lap0 lap))
+                (setcar lap1 inverse)
+                (setq keep-going t)))
+             ;;
+             ;; const goto-if-* --> whatever
+             ;;
+             ((and (eq 'byte-constant (car lap0))
+                   (memq (car lap1) byte-conditional-ops))
+              (cond ((if (or (eq (car lap1) 'byte-goto-if-nil)
+                             (eq (car lap1) 'byte-goto-if-nil-else-pop))
+                         (car (cdr lap0))
+                       (not (car (cdr lap0))))
+                     (byte-compile-log-lap "  %s %s\t-->\t<deleted>"
+                                           lap0 lap1)
+                     (setq rest (cdr rest)
+                           lap (delq lap0 (delq lap1 lap))))
+                    (t
+                     (if (memq (car lap1) byte-goto-always-pop-ops)
+                         (progn
+                           (byte-compile-log-lap "  %s %s\t-->\t%s"
+                            lap0 lap1 (cons 'byte-goto (cdr lap1)))
+                           (setq lap (delq lap0 lap)))
+                       (byte-compile-log-lap "  %s %s\t-->\t%s" lap0 lap1
+                        (cons 'byte-goto (cdr lap1))))
+                     (setcar lap1 'byte-goto)))
+              (setq keep-going t))
+             ;;
+             ;; varref-X varref-X  -->  varref-X dup
+             ;; varref-X [dup ...] varref-X  -->  varref-X [dup ...] dup
+             ;; We don't optimize the const-X variations on this here,
+             ;; because that would inhibit some goto optimizations; we
+             ;; optimize the const-X case after all other optimizations.
+             ;;
+             ((and (eq 'byte-varref (car lap0))
+                   (progn
+                     (setq tmp (cdr rest))
+                     (while (eq (car (car tmp)) 'byte-dup)
+                       (setq tmp (cdr tmp)))
+                     t)
+                   (eq (cdr lap0) (cdr (car tmp)))
+                   (eq 'byte-varref (car (car tmp))))
+              (if (memq byte-optimize-log '(t byte))
+                  (let ((str ""))
+                    (setq tmp2 (cdr rest))
+                    (while (not (eq tmp tmp2))
+                      (setq tmp2 (cdr tmp2)
+                            str (concat str " dup")))
+                    (byte-compile-log-lap "  %s%s %s\t-->\t%s%s dup"
+                                          lap0 str lap0 lap0 str)))
+              (setq keep-going t)
+              (setcar (car tmp) 'byte-dup)
+              (setcdr (car tmp) 0)
+              (setq rest tmp))
+             ;;
+             ;; TAG1: TAG2: --> TAG1: <deleted>
+             ;; (and other references to TAG2 are replaced with TAG1)
+             ;;
+             ((and (eq (car lap0) 'TAG)
+                   (eq (car lap1) 'TAG))
+              (and (memq byte-optimize-log '(t byte))
+                   (byte-compile-log "  adjacent tags %d and %d merged"
+                                     (nth 1 lap1) (nth 1 lap0)))
+              (setq tmp3 lap)
+              (while (setq tmp2 (rassq lap0 tmp3))
+                (setcdr tmp2 lap1)
+                (setq tmp3 (cdr (memq tmp2 tmp3))))
+              (setq lap (delq lap0 lap)
+                    keep-going t))
+             ;;
+             ;; unused-TAG: --> <deleted>
+             ;;
+             ((and (eq 'TAG (car lap0))
+                   (not (rassq lap0 lap)))
+              (and (memq byte-optimize-log '(t byte))
+                   (byte-compile-log "  unused tag %d removed" (nth 1 lap0)))
+              (setq lap (delq lap0 lap)
+                    keep-going t))
+             ;;
+             ;; goto   ... --> goto   <delete until TAG or end>
+             ;; return ... --> return <delete until TAG or end>
+             ;;
+             ((and (memq (car lap0) '(byte-goto byte-return))
+                   (not (memq (car lap1) '(TAG nil))))
+              (setq tmp rest)
+              (let ((i 0)
+                    (opt-p (memq byte-optimize-log '(t lap)))
+                    str deleted)
+                (while (and (setq tmp (cdr tmp))
+                            (not (eq 'TAG (car (car tmp)))))
+                  (if opt-p (setq deleted (cons (car tmp) deleted)
+                                  str (concat str " %s")
+                                  i (1+ i))))
+                (if opt-p
+                    (let ((tagstr 
+                           (if (eq 'TAG (car (car tmp)))
+                               (format "%d:" (car (cdr (car tmp))))
+                             (or (car tmp) ""))))
+                      (if (< i 6)
+                          (apply 'byte-compile-log-lap-1
+                                 (concat "  %s" str
+                                         " %s\t-->\t%s <deleted> %s")
+                                 lap0
+                                 (nconc (nreverse deleted)
+                                        (list tagstr lap0 tagstr)))
+                        (byte-compile-log-lap
+                         "  %s <%d unreachable op%s> %s\t-->\t%s <deleted> %s"
+                         lap0 i (if (= i 1) "" "s")
+                         tagstr lap0 tagstr))))
+                (rplacd rest tmp))
+              (setq keep-going t))
+             ;;
+             ;; <safe-op> unbind --> unbind <safe-op>
+             ;; (this may enable other optimizations.)
+             ;;
+             ((and (eq 'byte-unbind (car lap1))
+                   (memq (car lap0) byte-after-unbind-ops))
+              (byte-compile-log-lap "  %s %s\t-->\t%s %s" lap0 lap1 lap1 lap0)
+              (setcar rest lap1)
+              (setcar (cdr rest) lap0)
+              (setq keep-going t))
+             ;;
+             ;; varbind-X unbind-N         -->  discard unbind-(N-1)
+             ;; save-excursion unbind-N    -->  unbind-(N-1)
+             ;; save-restriction unbind-N  -->  unbind-(N-1)
+             ;;
+             ((and (eq 'byte-unbind (car lap1))
+                   (memq (car lap0) '(byte-varbind byte-save-excursion
+                                      byte-save-restriction))
+                   (< 0 (cdr lap1)))
+              (if (zerop (setcdr lap1 (1- (cdr lap1))))
+                  (delq lap1 rest))
+              (if (eq (car lap0) 'byte-varbind)
+                  (setcar rest (cons 'byte-discard 0))
+                (setq lap (delq lap0 lap)))
+              (byte-compile-log-lap "  %s %s\t-->\t%s %s"
+                lap0 (cons (car lap1) (1+ (cdr lap1)))
+                (if (eq (car lap0) 'byte-varbind)
+                    (car rest)
+                  (car (cdr rest)))
+                (if (and (/= 0 (cdr lap1))
+                         (eq (car lap0) 'byte-varbind))
+                    (car (cdr rest))
+                  ""))
+              (setq keep-going t))
+             ;;
+             ;; goto*-X ... X: goto-Y  --> goto*-Y
+             ;; goto-X ...  X: return  --> return
+             ;;
+             ((and (memq (car lap0) byte-goto-ops)
+                   (memq (car (setq tmp (nth 1 (memq (cdr lap0) lap))))
+                         '(byte-goto byte-return)))
+              (cond ((and (not (eq tmp lap0))
+                          (or (eq (car lap0) 'byte-goto)
+                              (eq (car tmp) 'byte-goto)))
+                     (byte-compile-log-lap "  %s [%s]\t-->\t%s"
+                                           (car lap0) tmp tmp)
+                     (if (eq (car tmp) 'byte-return)
+                         (setcar lap0 'byte-return))
+                     (setcdr lap0 (cdr tmp))
+                     (setq keep-going t))))
+             ;;
+             ;; goto-*-else-pop X ... X: goto-if-* --> whatever
+             ;; goto-*-else-pop X ... X: discard --> whatever
+             ;;
+             ((and (memq (car lap0) '(byte-goto-if-nil-else-pop
+                                      byte-goto-if-not-nil-else-pop))
+                   (memq (car (car (setq tmp (cdr (memq (cdr lap0) lap)))))
+                         (eval-when-compile
+                          (cons 'byte-discard byte-conditional-ops)))
+                   (not (eq lap0 (car tmp))))
+              (setq tmp2 (car tmp))
+              (setq tmp3 (assq (car lap0) '((byte-goto-if-nil-else-pop
+                                             byte-goto-if-nil)
+                                            (byte-goto-if-not-nil-else-pop
+                                             byte-goto-if-not-nil))))
+              (if (memq (car tmp2) tmp3)
+                  (progn (setcar lap0 (car tmp2))
+                         (setcdr lap0 (cdr tmp2))
+                         (byte-compile-log-lap "  %s-else-pop [%s]\t-->\t%s"
+                                               (car lap0) tmp2 lap0))
+                ;; Get rid of the -else-pop's and jump one step further.
+                (or (eq 'TAG (car (nth 1 tmp)))
+                    (setcdr tmp (cons (byte-compile-make-tag)
+                                      (cdr tmp))))
+                (byte-compile-log-lap "  %s [%s]\t-->\t%s <skip>"
+                                      (car lap0) tmp2 (nth 1 tmp3))
+                (setcar lap0 (nth 1 tmp3))
+                (setcdr lap0 (nth 1 tmp)))
+              (setq keep-going t))
+             ;;
+             ;; const goto-X ... X: goto-if-* --> whatever
+             ;; const goto-X ... X: discard   --> whatever
+             ;;
+             ((and (eq (car lap0) 'byte-constant)
+                   (eq (car lap1) 'byte-goto)
+                   (memq (car (car (setq tmp (cdr (memq (cdr lap1) lap)))))
+                         (eval-when-compile
+                           (cons 'byte-discard byte-conditional-ops)))
+                   (not (eq lap1 (car tmp))))
+              (setq tmp2 (car tmp))
+              (cond ((memq (car tmp2)
+                           (if (null (car (cdr lap0)))
+                               '(byte-goto-if-nil byte-goto-if-nil-else-pop)
+                             '(byte-goto-if-not-nil
+                               byte-goto-if-not-nil-else-pop)))
+                     (byte-compile-log-lap "  %s goto [%s]\t-->\t%s %s"
+                                           lap0 tmp2 lap0 tmp2)
+                     (setcar lap1 (car tmp2))
+                     (setcdr lap1 (cdr tmp2))
+                     ;; Let next step fix the (const,goto-if*) sequence.
+                     (setq rest (cons nil rest)))
+                    (t
+                     ;; Jump one step further
+                     (byte-compile-log-lap
+                      "  %s goto [%s]\t-->\t<deleted> goto <skip>"
+                      lap0 tmp2)
+                     (or (eq 'TAG (car (nth 1 tmp)))
+                         (setcdr tmp (cons (byte-compile-make-tag)
+                                           (cdr tmp))))
+                     (setcdr lap1 (car (cdr tmp)))
+                     (setq lap (delq lap0 lap))))
+              (setq keep-going t))
+             ;;
+             ;; X: varref-Y    ...     varset-Y goto-X  -->
+             ;; X: varref-Y Z: ... dup varset-Y goto-Z
+             ;; (varset-X goto-BACK, BACK: varref-X --> copy the varref down.)
+             ;; (This is so usual for while loops that it is worth handling).
+             ;;
+             ((and (eq (car lap1) 'byte-varset)
+                   (eq (car lap2) 'byte-goto)
+                   (not (memq (cdr lap2) rest)) ;Backwards jump
+                   (eq (car (car (setq tmp (cdr (memq (cdr lap2) lap)))))
+                       'byte-varref)
+                   (eq (cdr (car tmp)) (cdr lap1))
+                   (not (eq (built-in-variable-type (car (cdr lap1)))
+                            'boolean)))
+              ;;(byte-compile-log-lap "  Pulled %s to end of loop" (car tmp))
+              (let ((newtag (byte-compile-make-tag)))
+                (byte-compile-log-lap
+                 "  %s: %s ... %s %s\t-->\t%s: %s %s: ... %s %s %s"
+                 (nth 1 (cdr lap2)) (car tmp)
+                  lap1 lap2
+                 (nth 1 (cdr lap2)) (car tmp)
+                 (nth 1 newtag) 'byte-dup lap1
+                 (cons 'byte-goto newtag)
+                 )
+                (setcdr rest (cons (cons 'byte-dup 0) (cdr rest)))
+                (setcdr tmp (cons (setcdr lap2 newtag) (cdr tmp))))
+              (setq add-depth 1)
+              (setq keep-going t))
+             ;;
+             ;; goto-X Y: ... X: goto-if*-Y  -->  goto-if-not-*-X+1 Y:
+             ;; (This can pull the loop test to the end of the loop)
+             ;;
+             ((and (eq (car lap0) 'byte-goto)
+                   (eq (car lap1) 'TAG)
+                   (eq lap1
+                       (cdr (car (setq tmp (cdr (memq (cdr lap0) lap))))))
+                   (memq (car (car tmp))
+                         '(byte-goto byte-goto-if-nil byte-goto-if-not-nil
+                                     byte-goto-if-nil-else-pop)))
+;;            (byte-compile-log-lap "  %s %s, %s %s  --> moved conditional"
+;;                                  lap0 lap1 (cdr lap0) (car tmp))
+              (let ((newtag (byte-compile-make-tag)))
+                (byte-compile-log-lap
+                 "%s %s: ... %s: %s\t-->\t%s ... %s:"
+                 lap0 (nth 1 lap1) (nth 1 (cdr lap0)) (car tmp)
+                 (cons (cdr (assq (car (car tmp))
+                                  '((byte-goto-if-nil . byte-goto-if-not-nil)
+                                    (byte-goto-if-not-nil . byte-goto-if-nil)
+                                    (byte-goto-if-nil-else-pop .
+                                     byte-goto-if-not-nil-else-pop)
+                                    (byte-goto-if-not-nil-else-pop .
+                                     byte-goto-if-nil-else-pop))))
+                       newtag)
+                 
+                 (nth 1 newtag)
+                 )
+                (setcdr tmp (cons (setcdr lap0 newtag) (cdr tmp)))
+                (if (eq (car (car tmp)) 'byte-goto-if-nil-else-pop)
+                    ;; We can handle this case but not the -if-not-nil case,
+                    ;; because we won't know which non-nil constant to push.
+                  (setcdr rest (cons (cons 'byte-constant
+                                           (byte-compile-get-constant nil))
+                                     (cdr rest))))
+              (setcar lap0 (nth 1 (memq (car (car tmp))
+                                        '(byte-goto-if-nil-else-pop
+                                          byte-goto-if-not-nil
+                                          byte-goto-if-nil
+                                          byte-goto-if-not-nil
+                                          byte-goto byte-goto))))
+              )
+              (setq keep-going t))
+             )
+       (setq rest (cdr rest)))
+      )
+    ;; Cleanup stage:
+    ;; Rebuild byte-compile-constants / byte-compile-variables.
+    ;; Simple optimizations that would inhibit other optimizations if they
+    ;; were done in the optimizing loop, and optimizations which there is no
+    ;;  need to do more than once.
+    (setq byte-compile-constants nil
+         byte-compile-variables nil)
+    (setq rest lap)
+    (while rest
+      (setq lap0 (car rest)
+           lap1 (nth 1 rest))
+      (if (memq (car lap0) byte-constref-ops)
+         (if (eq (cdr lap0) 'byte-constant)
+             (or (memq (cdr lap0) byte-compile-variables)
+                 (setq byte-compile-variables (cons (cdr lap0)
+                                                    byte-compile-variables)))
+           (or (memq (cdr lap0) byte-compile-constants)
+               (setq byte-compile-constants (cons (cdr lap0)
+                                                  byte-compile-constants)))))
+      (cond (;;
+            ;; const-C varset-X const-C  -->  const-C dup varset-X
+            ;; const-C varbind-X const-C  -->  const-C dup varbind-X
+            ;;
+            (and (eq (car lap0) 'byte-constant)
+                 (eq (car (nth 2 rest)) 'byte-constant)
+                 (eq (cdr lap0) (car (nth 2 rest)))
+                 (memq (car lap1) '(byte-varbind byte-varset)))
+            (byte-compile-log-lap "  %s %s %s\t-->\t%s dup %s"
+                                  lap0 lap1 lap0 lap0 lap1)
+            (setcar (cdr (cdr rest)) (cons (car lap1) (cdr lap1)))
+            (setcar (cdr rest) (cons 'byte-dup 0))
+            (setq add-depth 1))
+           ;;
+           ;; const-X  [dup/const-X ...]   -->  const-X  [dup ...] dup
+           ;; varref-X [dup/varref-X ...]  -->  varref-X [dup ...] dup
+           ;;
+           ((memq (car lap0) '(byte-constant byte-varref))
+            (setq tmp rest
+                  tmp2 nil)
+            (while (progn
+                     (while (eq 'byte-dup (car (car (setq tmp (cdr tmp))))))
+                     (and (eq (cdr lap0) (cdr (car tmp)))
+                          (eq (car lap0) (car (car tmp)))))
+              (setcar tmp (cons 'byte-dup 0))
+              (setq tmp2 t))
+            (if tmp2
+                (byte-compile-log-lap
+                 "  %s [dup/%s]...\t-->\t%s dup..." lap0 lap0 lap0)))
+           ;;
+           ;; unbind-N unbind-M  -->  unbind-(N+M)
+           ;;
+           ((and (eq 'byte-unbind (car lap0))
+                 (eq 'byte-unbind (car lap1)))
+            (byte-compile-log-lap "  %s %s\t-->\t%s" lap0 lap1
+                                  (cons 'byte-unbind
+                                        (+ (cdr lap0) (cdr lap1))))
+            (setq keep-going t)
+            (setq lap (delq lap0 lap))
+            (setcdr lap1 (+ (cdr lap1) (cdr lap0))))
+           )
+      (setq rest (cdr rest)))
+    (setq byte-compile-maxdepth (+ byte-compile-maxdepth add-depth)))
+  lap)
+
+(provide 'byte-optimize)
+
+\f
+;; To avoid "lisp nesting exceeds max-lisp-eval-depth" when this file compiles
+;; itself, compile some of its most used recursive functions (at load time).
+;;
+(eval-when-compile
+ (or (compiled-function-p (symbol-function 'byte-optimize-form))
+     (assq 'byte-code (symbol-function 'byte-optimize-form))
+     (let ((byte-optimize nil)
+          (byte-compile-warnings nil))
+       (mapcar '(lambda (x)
+                 (or noninteractive (message "compiling %s..." x))
+                 (byte-compile x)
+                 (or noninteractive (message "compiling %s...done" x)))
+              '(byte-optimize-form
+                byte-optimize-body
+                byte-optimize-predicate
+                byte-optimize-binary-predicate
+                ;; Inserted some more than necessary, to speed it up.
+                byte-optimize-form-code-walker
+                byte-optimize-lapcode))))
+ nil)
+
+;;; byte-optimize.el ends here
diff --git a/lisp/bytecomp-runtime.el b/lisp/bytecomp-runtime.el
new file mode 100644 (file)
index 0000000..105374a
--- /dev/null
@@ -0,0 +1,241 @@
+;;; bytecomp-runtime.el --- byte-compiler support for inlining
+
+;; Copyright (C) 1992, 1997 Free Software Foundation, Inc.
+
+;; Author: Jamie Zawinski <jwz@netscape.com>
+;; Author: Hallvard Furuseth <hbf@ulrik.uio.no>
+;; Maintainer: XEmacs Development Team
+;; Keywords: internal, dumped
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: FSF 19.30.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; The code in this file should always be loaded, because it defines things 
+;; like "defsubst" which should work interpreted as well.  The code in 
+;; bytecomp.el and byte-optimize.el can be loaded as needed.
+
+;; interface to selectively inlining functions.
+;; This only happens when source-code optimization is turned on.
+
+;;; Code:
+
+;; Redefined in byte-optimize.el.
+;; This is not documented--it's not clear that we should promote it.
+(fset 'inline 'progn)
+(put 'inline 'lisp-indent-hook 0)
+
+
+;;; Interface to inline functions.
+
+;; FSF comments the next two out, but I see no reason to do so. --ben
+(defmacro proclaim-inline (&rest fns)
+  "Cause the named functions to be open-coded when called from compiled code.
+They will only be compiled open-coded when `byte-optimize' is true."
+  (cons 'eval-and-compile
+       (apply
+        'nconc
+        (mapcar
+         '(lambda (x)
+            (` ((or (memq (get '(, x) 'byte-optimizer)
+                          '(nil byte-compile-inline-expand))
+                    (error
+                     "%s already has a byte-optimizer, can't make it inline"
+                     '(, x)))
+                (put '(, x) 'byte-optimizer 'byte-compile-inline-expand))))
+         fns))))
+
+
+(defmacro proclaim-notinline (&rest fns)
+  "Cause the named functions to no longer be open-coded."
+  (cons 'eval-and-compile
+       (apply
+        'nconc
+        (mapcar
+         '(lambda (x)
+            (` ((if (eq (get '(, x) 'byte-optimizer)
+                        'byte-compile-inline-expand)
+                    (put '(, x) 'byte-optimizer nil)))))
+         fns))))
+
+;; This has a special byte-hunk-handler in bytecomp.el.
+(defmacro defsubst (name arglist &rest body)
+  "Define an inline function.  The syntax is just like that of `defun'."
+  (or (memq (get name 'byte-optimizer)
+           '(nil byte-compile-inline-expand))
+      (error "`%s' is a primitive" name))
+  (list 'prog1
+       (cons 'defun (cons name (cons arglist body)))
+       (list 'proclaim-inline name)))
+; Instead of the above line, FSF has this:
+;      (list 'eval-and-compile
+;            (list 'put (list 'quote name)
+;                  ''byte-optimizer ''byte-compile-inline-expand))))
+
+(defun make-obsolete (fn new)
+  "Make the byte-compiler warn that FUNCTION is obsolete.
+The warning will say that NEW should be used instead.
+If NEW is a string, that is the `use instead' message."
+  (interactive "aMake function obsolete: \nxObsoletion replacement: ")
+  (let ((handler (get fn 'byte-compile)))
+    (if (eq 'byte-compile-obsolete handler)
+       (setcar (get fn 'byte-obsolete-info) new)
+      (put fn 'byte-obsolete-info (cons new handler))
+      (put fn 'byte-compile 'byte-compile-obsolete)))
+  fn)
+
+(defun make-obsolete-variable (var new)
+  "Make the byte-compiler warn that VARIABLE is obsolete,
+and NEW should be used instead.  If NEW is a string, then that is the
+`use instead' message."
+  (interactive
+   (list
+    (let ((str (completing-read "Make variable obsolete: " obarray 'boundp t)))
+      (if (equal str "") (error ""))
+      (intern str))
+    (car (read-from-string (read-string "Obsoletion replacement: ")))))
+  (put var 'byte-obsolete-variable new)
+  var)
+
+;; By overwhelming demand, we separate out truly obsolete symbols from
+;; those that are present for GNU Emacs compatibility.
+(defun make-compatible (fn new)
+  "Make the byte-compiler know that FUNCTION is provided for compatibility.
+The warning will say that NEW should be used instead.
+If NEW is a string, that is the `use instead' message."
+  (interactive "aMake function compatible: \nxCompatible replacement: ")
+  (let ((handler (get fn 'byte-compile)))
+    (if (eq 'byte-compile-compatible handler)
+       (setcar (get fn 'byte-compatible-info) new)
+      (put fn 'byte-compatible-info (cons new handler))
+      (put fn 'byte-compile 'byte-compile-compatible)))
+  fn)
+
+(defun make-compatible-variable (var new)
+  "Make the byte-compiler know that VARIABLE is provided for compatibility.
+and NEW should be used instead.  If NEW is a string, then that is the
+`use instead' message."
+  (interactive
+   (list
+    (let ((str (completing-read "Make variable compatible: "
+                               obarray 'boundp t)))
+      (if (equal str "") (error ""))
+      (intern str))
+    (car (read-from-string (read-string "Compatible replacement: ")))))
+  (put var 'byte-compatible-variable new)
+  var)
+
+(put 'dont-compile 'lisp-indent-hook 0)
+(defmacro dont-compile (&rest body)
+  "Like `progn', but the body always runs interpreted (not compiled).
+If you think you need this, you're probably making a mistake somewhere."
+  (list 'eval (list 'quote (if (cdr body) (cons 'progn body) (car body)))))
+
+\f
+;;; interface to evaluating things at compile time and/or load time
+;;; these macro must come after any uses of them in this file, as their
+;;; definition in the file overrides the magic definitions on the
+;;; byte-compile-macro-environment.
+
+(put 'eval-when-compile 'lisp-indent-hook 0)
+(defmacro eval-when-compile (&rest body)
+  "Like `progn', but evaluates the body at compile time.
+The result of the body appears to the compiler as a quoted constant."
+  ;; Not necessary because we have it in b-c-initial-macro-environment
+  ;; (list 'quote (eval (cons 'progn body)))
+  (cons 'progn body))
+
+(put 'eval-and-compile 'lisp-indent-hook 0)
+(defmacro eval-and-compile (&rest body)
+  "Like `progn', but evaluates the body at compile time and at load time."
+  ;; Remember, it's magic.
+  (cons 'progn body))
+
+;;; From Emacs 20.
+(put 'eval-when-feature 'lisp-indent-hook 1)
+(defmacro eval-when-feature (feature &rest body)
+  "Run the body forms when FEATURE is featurep, be it now or later.
+Called (eval-when-feature (FEATURE [. FILENAME]) BODYFORMS...).
+If (featurep 'FEATURE), evals now; otherwise adds an elt to
+`after-load-alist' (which see), using FEATURE as filename if FILENAME is nil."
+  (let ((file (or (cdr feature) (symbol-name (car feature)))))
+    `(let ((bodythunk (function (lambda () ,@body))))
+       (if (featurep ',(car feature))
+          (funcall bodythunk)
+        (setq after-load-alist (cons '(,file . (list 'lambda '() bodythunk))
+                                     after-load-alist))))))
+      
+
+\f
+;;; Interface to file-local byte-compiler parameters.
+;;; Redefined in bytecomp.el.
+
+;;; The great RMS speaketh:
+;;;
+;;; I nuked this because it's not a good idea for users to think of
+;;; using it.  These options are a matter of installation preference,
+;;; and have nothing to do with particular source files; it's a
+;;; mistake to suggest to users that they should associate these with
+;;; particular source files.  There is hardly any reason to change
+;;; these parameters, anyway.  --rms.
+;;;
+;;; But I'll leave this stuff alone. --ben
+
+(put 'byte-compiler-options 'lisp-indent-hook 0)
+(defmacro byte-compiler-options (&rest args)
+  "Set some compilation-parameters for this file.  
+This will affect only the file in which it appears; this does nothing when
+evaluated, or when loaded from a .el file.
+
+Each argument to this macro must be a list of a key and a value.
+
+  Keys:                  Values:               Corresponding variable:
+
+  verbose        t, nil                byte-compile-verbose
+  optimize       t, nil, source, byte  byte-optimize
+  warnings       list of warnings      byte-compile-warnings
+  file-format    emacs19, emacs20      byte-compile-emacs19-compatibility
+
+The value specified with the `warnings' option must be a list, containing
+some subset of the following flags:
+
+  free-vars    references to variables not in the current lexical scope.
+  unused-vars  references to non-global variables bound but not referenced.
+  unresolved   calls to unknown functions.
+  callargs     lambda calls with args that don't match the definition.
+  redefine     function cell redefined from a macro to a lambda or vice
+               versa, or redefined to take a different number of arguments.
+
+If the first element if the list is `+' or `-' then the specified elements 
+are added to or removed from the current set of warnings, instead of the
+entire set of warnings being overwritten.
+
+For example, something like this might appear at the top of a source file:
+
+    (byte-compiler-options
+      (optimize t)
+      (warnings (- callargs))          ; Don't warn about arglist mismatch
+      (warnings (+ unused-vars))       ; Do warn about unused bindings
+      (file-format emacs19))"
+  nil)
+
+;;; bytecomp-runtime.el ends here
diff --git a/lisp/bytecomp.el b/lisp/bytecomp.el
new file mode 100644 (file)
index 0000000..95bce46
--- /dev/null
@@ -0,0 +1,4157 @@
+;;; bytecomp.el --- compilation of Lisp code into byte code.
+
+;;; Copyright (C) 1985-1987, 1991-1994 Free Software Foundation, Inc.
+;;; Copyright (C) 1996 Ben Wing.
+
+;; Author: Jamie Zawinski <jwz@netscape.com>
+;;     Hallvard Furuseth <hbf@ulrik.uio.no>
+;; Keywords: internal
+
+;; Subsequently modified by RMS and others.
+
+(defconst byte-compile-version (purecopy  "2.25 XEmacs; 22-Mar-96."))
+
+;; 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; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: FSF 19.30.
+
+;;; Commentary:
+
+;; The Emacs Lisp byte compiler.  This crunches lisp source into a
+;; sort of p-code which takes up less space and can be interpreted
+;; faster.  The user entry points are byte-compile-file,
+;; byte-recompile-directory and byte-compile-buffer.
+
+;;; Code:
+
+;;; ========================================================================
+;;; Entry points:
+;;;    byte-recompile-directory, byte-compile-file,
+;;;     batch-byte-compile, batch-byte-recompile-directory,
+;;;    byte-compile, compile-defun,
+;;;    display-call-tree
+;;;  RMS says:
+;;; (byte-compile-buffer and byte-compile-and-load-file were turned off
+;;;  because they are not terribly useful and get in the way of completion.)
+;;; But I'm leaving them. --ben
+
+;;; This version of the byte compiler has the following improvements:
+;;;  + optimization of compiled code:
+;;;    - removal of unreachable code;
+;;;    - removal of calls to side-effectless functions whose return-value
+;;;      is unused;
+;;;    - compile-time evaluation of safe constant forms, such as (consp nil)
+;;;      and (ash 1 6);
+;;;    - open-coding of literal lambdas;
+;;;    - peephole optimization of emitted code;
+;;;    - trivial functions are left uncompiled for speed.
+;;;  + support for inline functions;
+;;;  + compile-time evaluation of arbitrary expressions;
+;;;  + compile-time warning messages for:
+;;;    - functions being redefined with incompatible arglists;
+;;;    - functions being redefined as macros, or vice-versa;
+;;;    - functions or macros defined multiple times in the same file;
+;;;    - functions being called with the incorrect number of arguments;
+;;;    - functions being called which are not defined globally, in the
+;;;      file, or as autoloads;
+;;;    - assignment and reference of undeclared free variables;
+;;;    - various syntax errors;
+;;;  + correct compilation of nested defuns, defmacros, defvars and defsubsts;
+;;;  + correct compilation of top-level uses of macros;
+;;;  + the ability to generate a histogram of functions called.
+
+;;; User customization variables:
+;;;
+;;; byte-compile-verbose       Whether to report the function currently being
+;;;                            compiled in the minibuffer;
+;;; byte-optimize              Whether to do optimizations; this may be
+;;;                            t, nil, 'source, or 'byte;
+;;; byte-optimize-log          Whether to report (in excruciating detail)
+;;;                            exactly which optimizations have been made.
+;;;                            This may be t, nil, 'source, or 'byte;
+;;; byte-compile-error-on-warn Whether to stop compilation when a warning is
+;;;                            produced;
+;;; byte-compile-delete-errors Whether the optimizer may delete calls or
+;;;                            variable references that are side-effect-free
+;;;                            except that they may return an error.
+;;; byte-compile-generate-call-tree    Whether to generate a histogram of
+;;;                            function calls.  This can be useful for
+;;;                            finding unused functions, as well as simple
+;;;                            performance metering.
+;;; byte-compile-warnings      List of warnings to issue, or t.  May contain
+;;;                            'free-vars (references to variables not in the
+;;;                                        current lexical scope)
+;;;                            'unused-vars (non-global variables bound but
+;;;                                          not referenced)
+;;;                            'unresolved (calls to unknown functions)
+;;;                            'callargs  (lambda calls with args that don't
+;;;                                        match the lambda's definition)
+;;;                            'redefine  (function cell redefined from
+;;;                                        a macro to a lambda or vice versa,
+;;;                                        or redefined to take other args)
+;;;                            'obsolete  (obsolete variables and functions)
+;;;                            'pedantic  (references to Emacs-compatible
+;;;                                        symbols)
+;;; byte-compile-emacs19-compatibility Whether the compiler should
+;;;                            generate .elc files which can be loaded into
+;;;                            generic emacs 19.
+;;; emacs-lisp-file-regexp     Regexp for the extension of source-files;
+;;;                            see also the function byte-compile-dest-file.
+;;; byte-compile-overwrite-file        If nil, delete old .elc files before saving.
+;;;
+;;; Most of the above parameters can also be set on a file-by-file basis; see
+;;; the documentation of the `byte-compiler-options' macro.
+
+;;; New Features:
+;;;
+;;;  o The form `defsubst' is just like `defun', except that the function
+;;;    generated will be open-coded in compiled code which uses it.  This
+;;;    means that no function call will be generated, it will simply be
+;;;    spliced in.  Lisp functions calls are very slow, so this can be a
+;;;    big win.
+;;;
+;;;    You can generally accomplish the same thing with `defmacro', but in
+;;;    that case, the defined procedure can't be used as an argument to
+;;;    mapcar, etc.
+;;;
+;;;  o You can make a given function be inline even if it has already been
+;;;    defined with `defun' by using the `proclaim-inline' form like so:
+;;;            (proclaim-inline my-function)
+;;;    This is, in fact, exactly what `defsubst' does.  To make a function no
+;;;    longer be inline, you must use `proclaim-notinline'.  Beware that if
+;;;    you define a function with `defsubst' and later redefine it with
+;;;    `defun', it will still be open-coded until you use proclaim-notinline.
+;;;
+;;;  o You can also open-code one particular call to a function without
+;;;    open-coding all calls.  Use the 'inline' form to do this, like so:
+;;;
+;;;            (inline (foo 1 2 3))    ;; `foo' will be open-coded
+;;;    or...
+;;;            (inline                 ;;  `foo' and `baz' will be
+;;;             (foo 1 2 3 (bar 5))    ;; open-coded, but `bar' will not.
+;;;             (baz 0))
+;;;
+;;;  o It is possible to open-code a function in the same file it is defined
+;;;    in without having to load that file before compiling it.  the
+;;;    byte-compiler has been modified to remember function definitions in
+;;;    the compilation environment in the same way that it remembers macro
+;;;    definitions.
+;;;
+;;;  o  Forms like ((lambda ...) ...) are open-coded.
+;;;
+;;;  o  The form `eval-when-compile' is like progn, except that the body
+;;;     is evaluated at compile-time.  When it appears at top-level, this
+;;;     is analogous to the Common Lisp idiom (eval-when (compile) ...).
+;;;     When it does not appear at top-level, it is similar to the
+;;;     Common Lisp #. reader macro (but not in interpreted code).
+;;;
+;;;  o  The form `eval-and-compile' is similar to eval-when-compile, but
+;;;    the whole form is evalled both at compile-time and at run-time.
+;;;
+;;;  o  The command M-x byte-compile-and-load-file does what you'd think.
+;;;
+;;;  o  The command compile-defun is analogous to eval-defun.
+;;;
+;;;  o  If you run byte-compile-file on a filename which is visited in a
+;;;     buffer, and that buffer is modified, you are asked whether you want
+;;;     to save the buffer before compiling.
+;;;
+;;;  o  You can add this to /etc/magic to make file(1) recognise the files
+;;;     generated by this compiler:
+;;;
+;;;      0     string          ;ELC            GNU Emacs Lisp compiled file,
+;;;      >4    byte            x               version %d
+;;;
+;;; TO DO:
+;;;
+;;;  o Should implement declarations and proclamations, notably special,
+;;;    unspecial, and ignore.  Do this in such a way as to not break cl.el.
+;;;  o The bound-but-not-used warnings are not issued for variables whose
+;;;    bindings were established in the arglist, due to the lack of an
+;;;    ignore declaration.  Once ignore exists, this should be turned on.
+;;;  o Warn about functions and variables defined but not used?
+;;;    Maybe add some kind of `export' declaration for this?
+;;;    (With interactive functions being automatically exported?)
+;;;  o Any reference to a variable, even one which is a no-op, will cause
+;;;    the warning not to be given.  Possibly we could use the for-effect
+;;;    flag to determine when this reference is useless; possibly more
+;;;    complex flow analysis would be necessary.
+;;;  o  If the optimizer deletes a variable reference, we might be left with
+;;;    a bound-but-not-referenced warning.  Generally this is ok, but not if
+;;;    it's a synergistic result of macroexpansion.  Need some way to note
+;;;    that a varref is being optimized away?  Of course it would be nice to
+;;;    optimize away the binding too, someday, but it's unsafe today.
+;;;  o (See byte-optimize.el for the optimization TODO list.)
+
+(require 'backquote)
+
+(or (fboundp 'defsubst)
+    ;; This really ought to be loaded already!
+    (load-library "bytecomp-runtime"))
+
+(eval-when-compile
+  (defvar byte-compile-single-version nil
+    "If this is true, the choice of emacs version (v19 or v20) byte-codes will
+be hard-coded into bytecomp when it compiles itself.  If the compiler itself
+is compiled with optimization, this causes a speedup.")
+
+  (cond (byte-compile-single-version
+        (defmacro byte-compile-single-version () t)
+        (defmacro byte-compile-version-cond (cond) (list 'quote (eval cond))))
+       (t
+        (defmacro byte-compile-single-version () nil)
+        (defmacro byte-compile-version-cond (cond) cond)))
+  )
+
+(defvar emacs-lisp-file-regexp (if (eq system-type 'vax-vms)
+                                  (purecopy "\\.EL\\(;[0-9]+\\)?$")
+                                (purecopy "\\.el$"))
+  "*Regexp which matches Emacs Lisp source files.
+You may want to redefine `byte-compile-dest-file' if you change this.")
+
+;; This enables file name handlers such as jka-compr
+;; to remove parts of the file name that should not be copied
+;; through to the output file name.
+(defun byte-compiler-base-file-name (filename)
+  (let ((handler (find-file-name-handler filename
+                                        'byte-compiler-base-file-name)))
+    (if handler
+       (funcall handler 'byte-compiler-base-file-name filename)
+      filename)))
+
+(or (fboundp 'byte-compile-dest-file)
+    ;; The user may want to redefine this along with emacs-lisp-file-regexp,
+    ;; so only define it if it is undefined.
+    (defun byte-compile-dest-file (filename)
+      "Convert an Emacs Lisp source file name to a compiled file name."
+      (setq filename (byte-compiler-base-file-name filename))
+      (setq filename (file-name-sans-versions filename))
+      (cond ((eq system-type 'vax-vms)
+                (concat (substring filename 0 (string-match ";" filename)) "c"))
+               ((string-match emacs-lisp-file-regexp filename)
+                (concat (substring filename 0 (match-beginning 0)) ".elc"))
+               (t (concat filename ".elc")))))
+
+;; This can be the 'byte-compile property of any symbol.
+(autoload 'byte-compile-inline-expand "byte-optimize")
+
+;; This is the entrypoint to the lapcode optimizer pass1.
+(autoload 'byte-optimize-form "byte-optimize")
+;; This is the entrypoint to the lapcode optimizer pass2.
+(autoload 'byte-optimize-lapcode "byte-optimize")
+(autoload 'byte-compile-unfold-lambda "byte-optimize")
+
+;; This is the entry point to the decompiler, which is used by the
+;; disassembler.  The disassembler just requires 'byte-compile, but
+;; that doesn't define this function, so this seems to be a reasonable
+;; thing to do.
+(autoload 'byte-decompile-bytecode "byte-opt")
+
+(defvar byte-compile-verbose
+  (and (not noninteractive) (> (device-baud-rate) search-slow-speed))
+  "*Non-nil means print messages describing progress of byte-compiler.")
+
+(defvar byte-compile-emacs19-compatibility
+  (not (emacs-version>= 20))
+  "*Non-nil means generate output that can run in Emacs 19.")
+
+(defvar byte-compile-print-gensym t
+  "*Non-nil means generate code that creates unique symbols at run-time.
+This is achieved by printing uninterned symbols using the `#:SYMBOL'
+notation, so that they will be read uninterned when run.
+
+With this feature, code that uses uninterned symbols in macros will
+not be runnable under pre-21.0 XEmacsen.
+
+When `byte-compile-emacs19-compatibility' is non-nil, this variable is
+ignored and considered to be nil.")
+
+(defvar byte-optimize t
+  "*Enables optimization in the byte compiler.
+nil means don't do any optimization.
+t means do all optimizations.
+`source' means do source-level optimizations only.
+`byte' means do code-level optimizations only.")
+
+(defvar byte-compile-delete-errors t
+  "*If non-nil, the optimizer may delete forms that may signal an error.
+This includes variable references and calls to functions such as `car'.")
+
+;; XEmacs addition
+(defvar byte-compile-new-bytecodes nil
+  "This is completely ignored.  It is only around for backwards
+compatibility.")
+
+
+;; FSF enables byte-compile-dynamic-docstrings but not byte-compile-dynamic
+;; by default.  This would be a reasonable conservative approach except
+;; for the fact that if you enable either of these, you get incompatible
+;; byte code that can't be read by XEmacs 19.13 or before or FSF 19.28 or
+;; before.
+;;
+;; Therefore, neither is enabled for 19.14.  Both are enabled for 20.0
+;; because we have no reason to be conservative about changing the
+;; way things work. (Ben)
+
+;; However, I don't think that defaulting byte-compile-dynamic to nil
+;; is a compatibility issue - rather it is a performance issue.
+;; Therefore I am setting byte-compile-dynamic back to nil. (mrb)
+
+(defvar byte-compile-dynamic nil
+  "*If non-nil, compile function bodies so they load lazily.
+They are hidden comments in the compiled file, and brought into core when the
+function is called.
+
+To enable this option, make it a file-local variable
+in the source file you want it to apply to.
+For example, add  -*-byte-compile-dynamic: t;-*- on the first line.
+
+When this option is true, if you load the compiled file and then move it,
+the functions you loaded will not be able to run.")
+
+(defvar byte-compile-dynamic-docstrings (emacs-version>= 20)
+  "*If non-nil, compile doc strings for lazy access.
+We bury the doc strings of functions and variables
+inside comments in the file, and bring them into core only when they
+are actually needed.
+
+When this option is true, if you load the compiled file and then move it,
+you won't be able to find the documentation of anything in that file.
+
+To disable this option for a certain file, make it a file-local variable
+in the source file.  For example, add this to the first line:
+  -*-byte-compile-dynamic-docstrings:nil;-*-
+You can also set the variable globally.
+
+This option is enabled by default because it reduces Emacs memory usage.")
+
+(defvar byte-optimize-log nil
+  "*If true, the byte-compiler will log its optimizations into *Compile-Log*.
+If this is 'source, then only source-level optimizations will be logged.
+If it is 'byte, then only byte-level optimizations will be logged.")
+
+(defvar byte-compile-error-on-warn nil
+  "*If true, the byte-compiler reports warnings with `error'.")
+
+;; byte-compile-warning-types in FSF.
+(defvar byte-compile-default-warnings
+  '(redefine callargs free-vars unresolved unused-vars obsolete)
+  "*The warnings used when byte-compile-warnings is t.")
+
+(defvar byte-compile-warnings t
+  "*List of warnings that the compiler should issue (t for the default set).
+Elements of the list may be:
+
+  free-vars    references to variables not in the current lexical scope.
+  unused-vars  references to non-global variables bound but not referenced.
+  unresolved   calls to unknown functions.
+  callargs     lambda calls with args that don't match the definition.
+  redefine     function cell redefined from a macro to a lambda or vice
+               versa, or redefined to take a different number of arguments.
+  obsolete     use of an obsolete function or variable.
+  pedantic     warn of use of compatible symbols.
+
+The default set is specified by `byte-compile-default-warnings' and
+normally encompasses all possible warnings.
+
+See also the macro `byte-compiler-options'.")
+
+(defvar byte-compile-generate-call-tree nil
+  "*Non-nil means collect call-graph information when compiling.
+This records functions were called and from where.
+If the value is t, compilation displays the call graph when it finishes.
+If the value is neither t nor nil, compilation asks you whether to display
+the graph.
+
+The call tree only lists functions called, not macros used. Those functions
+which the byte-code interpreter knows about directly (eq, cons, etc.) are
+not reported.
+
+The call tree also lists those functions which are not known to be called
+\(that is, to which no calls have been compiled).  Functions which can be
+invoked interactively are excluded from this list.")
+
+(defconst byte-compile-call-tree nil "Alist of functions and their call tree.
+Each element looks like
+
+  \(FUNCTION CALLERS CALLS\)
+
+where CALLERS is a list of functions that call FUNCTION, and CALLS
+is a list of functions for which calls were generated while compiling
+FUNCTION.")
+
+(defvar byte-compile-call-tree-sort 'name
+  "*If non-nil, sort the call tree.
+The values `name', `callers', `calls', `calls+callers'
+specify different fields to sort on.")
+
+(defvar byte-compile-overwrite-file t
+  "If nil, old .elc files are deleted before the new is saved, and .elc
+files will have the same modes as the corresponding .el file.  Otherwise,
+existing .elc files will simply be overwritten, and the existing modes
+will not be changed.  If this variable is nil, then an .elc file which
+is a symbolic link will be turned into a normal file, instead of the file
+which the link points to being overwritten.")
+
+(defvar byte-recompile-directory-ignore-errors-p nil
+  "If true, then `byte-recompile-directory' will continue compiling even
+when an error occurs in a file.  This is bound to t by
+`batch-byte-recompile-directory'.")
+
+(defvar byte-recompile-directory-recursively t
+  "*If true, then `byte-recompile-directory' will recurse on subdirectories.")
+
+(defvar byte-compile-constants nil
+  "list of all constants encountered during compilation of this form")
+(defvar byte-compile-variables nil
+  "list of all variables encountered during compilation of this form")
+(defvar byte-compile-bound-variables nil
+  "Alist of variables bound in the context of the current form,
+that is, the current lexical environment.  This list lives partly
+on the specbind stack.  The cdr of each cell is an integer bitmask.")
+
+(defconst byte-compile-referenced-bit 1)
+(defconst byte-compile-assigned-bit 2)
+(defconst byte-compile-arglist-bit 4)
+(defconst byte-compile-global-bit 8)
+
+(defvar byte-compile-free-references)
+(defvar byte-compile-free-assignments)
+
+(defvar byte-compiler-error-flag)
+
+(defconst byte-compile-initial-macro-environment
+  (purecopy
+   '((byte-compiler-options . (lambda (&rest forms)
+                               (apply 'byte-compiler-options-handler forms)))
+     (eval-when-compile . (lambda (&rest body)
+                           (list 'quote (eval (byte-compile-top-level
+                                               (cons 'progn body))))))
+     (eval-and-compile . (lambda (&rest body)
+                          (eval (cons 'progn body))
+                          (cons 'progn body)))))
+  "The default macro-environment passed to macroexpand by the compiler.
+Placing a macro here will cause a macro to have different semantics when
+expanded by the compiler as when expanded by the interpreter.")
+
+(defvar byte-compile-macro-environment byte-compile-initial-macro-environment
+  "Alist of macros defined in the file being compiled.
+Each element looks like (MACRONAME . DEFINITION).  It is
+\(MACRONAME . nil) when a macro is redefined as a function.")
+
+(defvar byte-compile-function-environment nil
+  "Alist of functions defined in the file being compiled.
+This is so we can inline them when necessary.
+Each element looks like (FUNCTIONNAME . DEFINITION).  It is
+\(FUNCTIONNAME . nil) when a function is redefined as a macro.")
+
+(defvar byte-compile-autoload-environment nil
+ "Alist of functions and macros defined by autoload in the file being compiled.
+This is so we can suppress warnings about calls to these functions, even though
+they do not have `real' definitions.
+Each element looks like (FUNCTIONNAME . CALL-TO-AUTOLOAD).")
+
+(defvar byte-compile-unresolved-functions nil
+  "Alist of undefined functions to which calls have been compiled (used for
+warnings when the function is later defined with incorrect args).")
+
+(defvar byte-compile-file-domain) ; domain of file being compiled
+
+(defvar byte-compile-tag-number 0)
+(defvar byte-compile-output nil
+  "Alist describing contents to put in byte code string.
+Each element is (INDEX . VALUE)")
+(defvar byte-compile-depth 0 "Current depth of execution stack.")
+(defvar byte-compile-maxdepth 0 "Maximum depth of execution stack.")
+
+\f
+;;; The byte codes; this information is duplicated in bytecode.c
+
+(defconst byte-code-vector nil
+  "An array containing byte-code names indexed by byte-code values.")
+
+(defconst byte-stack+-info nil
+  "An array with the stack adjustment for each byte-code.")
+
+(defmacro byte-defop (opcode stack-adjust opname &optional docstring)
+  ;; This is a speed-hack for building the byte-code-vector at compile-time.
+  ;; We fill in the vector at macroexpand-time, and then after the last call
+  ;; to byte-defop, we write the vector out as a constant instead of writing
+  ;; out a bunch of calls to aset.
+  ;; Actually, we don't fill in the vector itself, because that could make
+  ;; it problematic to compile big changes to this compiler; we store the
+  ;; values on its plist, and remove them later in -extrude.
+  (let ((v1 (or (get 'byte-code-vector 'tmp-compile-time-value)
+               (put 'byte-code-vector 'tmp-compile-time-value
+                    (make-vector 256 nil))))
+       (v2 (or (get 'byte-stack+-info 'tmp-compile-time-value)
+               (put 'byte-stack+-info 'tmp-compile-time-value
+                    (make-vector 256 nil)))))
+    (aset v1 opcode opname)
+    (aset v2 opcode stack-adjust))
+  (if docstring
+      (list 'defconst opname opcode (concat "Byte code opcode " docstring "."))
+      (list 'defconst opname opcode)))
+
+(defmacro byte-extrude-byte-code-vectors ()
+  (prog1 (list 'setq 'byte-code-vector
+                    (get 'byte-code-vector 'tmp-compile-time-value)
+                    'byte-stack+-info
+                    (get 'byte-stack+-info 'tmp-compile-time-value))
+    (remprop 'byte-code-vector 'tmp-compile-time-value)
+    (remprop 'byte-stack+-info 'tmp-compile-time-value)))
+
+
+;; unused: 0-7
+
+;; These opcodes are special in that they pack their argument into the
+;; opcode word.
+;;
+(byte-defop   8  1 byte-varref "for variable reference")
+(byte-defop  16 -1 byte-varset "for setting a variable")
+(byte-defop  24 -1 byte-varbind        "for binding a variable")
+(byte-defop  32  0 byte-call   "for calling a function")
+(byte-defop  40  0 byte-unbind "for unbinding special bindings")
+;; codes 8-47 are consumed by the preceding opcodes
+
+;; unused: 48-55
+
+(byte-defop  56 -1 byte-nth)
+(byte-defop  57  0 byte-symbolp)
+(byte-defop  58  0 byte-consp)
+(byte-defop  59  0 byte-stringp)
+(byte-defop  60  0 byte-listp)
+(byte-defop  61 -1 byte-old-eq)
+(byte-defop  62 -1 byte-old-memq)
+(byte-defop  63  0 byte-not)
+(byte-defop  64  0 byte-car)
+(byte-defop  65  0 byte-cdr)
+(byte-defop  66 -1 byte-cons)
+(byte-defop  67  0 byte-list1)
+(byte-defop  68 -1 byte-list2)
+(byte-defop  69 -2 byte-list3)
+(byte-defop  70 -3 byte-list4)
+(byte-defop  71  0 byte-length)
+(byte-defop  72 -1 byte-aref)
+(byte-defop  73 -2 byte-aset)
+(byte-defop  74  0 byte-symbol-value)
+(byte-defop  75  0 byte-symbol-function) ; this was commented out
+(byte-defop  76 -1 byte-set)
+(byte-defop  77 -1 byte-fset) ; this was commented out
+(byte-defop  78 -1 byte-get)
+(byte-defop  79 -2 byte-substring)
+(byte-defop  80 -1 byte-concat2)
+(byte-defop  81 -2 byte-concat3)
+(byte-defop  82 -3 byte-concat4)
+(byte-defop  83  0 byte-sub1)
+(byte-defop  84  0 byte-add1)
+(byte-defop  85 -1 byte-eqlsign)
+(byte-defop  86 -1 byte-gtr)
+(byte-defop  87 -1 byte-lss)
+(byte-defop  88 -1 byte-leq)
+(byte-defop  89 -1 byte-geq)
+(byte-defop  90 -1 byte-diff)
+(byte-defop  91  0 byte-negate)
+(byte-defop  92 -1 byte-plus)
+(byte-defop  93 -1 byte-max)
+(byte-defop  94 -1 byte-min)
+(byte-defop  95 -1 byte-mult)
+(byte-defop  96  1 byte-point)
+(byte-defop  97 -1 byte-eq) ; new as of v20
+(byte-defop  98  0 byte-goto-char)
+(byte-defop  99  0 byte-insert)
+(byte-defop 100  1 byte-point-max)
+(byte-defop 101  1 byte-point-min)
+(byte-defop 102  0 byte-char-after)
+(byte-defop 103  1 byte-following-char)
+(byte-defop 104  1 byte-preceding-char)
+(byte-defop 105  1 byte-current-column)
+(byte-defop 106  0 byte-indent-to)
+(byte-defop 107 -1 byte-equal) ; new as of v20
+(byte-defop 108  1 byte-eolp)
+(byte-defop 109  1 byte-eobp)
+(byte-defop 110  1 byte-bolp)
+(byte-defop 111  1 byte-bobp)
+(byte-defop 112  1 byte-current-buffer)
+(byte-defop 113  0 byte-set-buffer)
+(byte-defop 114  0 byte-save-current-buffer
+  "To make a binding to record the current buffer.")
+;;(byte-defop 114  1 byte-read-char-OBSOLETE) ;obsolete as of v19
+(byte-defop 115 -1 byte-memq) ; new as of v20
+(byte-defop 116  1 byte-interactive-p)
+
+(byte-defop 117  0 byte-forward-char)
+(byte-defop 118  0 byte-forward-word)
+(byte-defop 119 -1 byte-skip-chars-forward)
+(byte-defop 120 -1 byte-skip-chars-backward)
+(byte-defop 121  0 byte-forward-line)
+(byte-defop 122  0 byte-char-syntax)
+(byte-defop 123 -1 byte-buffer-substring)
+(byte-defop 124 -1 byte-delete-region)
+(byte-defop 125 -1 byte-narrow-to-region)
+(byte-defop 126  1 byte-widen)
+(byte-defop 127  0 byte-end-of-line)
+
+;; unused: 128
+
+;; These store their argument in the next two bytes
+(byte-defop 129  1 byte-constant2
+   "for reference to a constant with vector index >= byte-constant-limit")
+(byte-defop 130  0 byte-goto "for unconditional jump")
+(byte-defop 131 -1 byte-goto-if-nil "to pop value and jump if it's nil")
+(byte-defop 132 -1 byte-goto-if-not-nil
+           "to pop value and jump if it's not nil")
+(byte-defop 133 -1 byte-goto-if-nil-else-pop
+  "to examine top-of-stack, jump and don't pop it if it's nil,
+otherwise pop it")
+(byte-defop 134 -1 byte-goto-if-not-nil-else-pop
+  "to examine top-of-stack, jump and don't pop it if it's non nil,
+otherwise pop it")
+
+(byte-defop 135 -1 byte-return "to pop a value and return it from `byte-code'")
+(byte-defop 136 -1 byte-discard "to discard one value from stack")
+(byte-defop 137  1 byte-dup     "to duplicate the top of the stack")
+
+(byte-defop 138  0 byte-save-excursion
+  "to make a binding to record the buffer, point and mark")
+(byte-defop 139  0 byte-save-window-excursion
+  "to make a binding to record entire window configuration")
+(byte-defop 140  0 byte-save-restriction
+  "to make a binding to record the current buffer clipping restrictions")
+(byte-defop 141 -1 byte-catch
+  "for catch.  Takes, on stack, the tag and an expression for the body")
+(byte-defop 142 -1 byte-unwind-protect
+  "for unwind-protect.  Takes, on stack, an expression for the unwind-action")
+
+;; For condition-case.  Takes, on stack, the variable to bind,
+;; an expression for the body, and a list of clauses.
+(byte-defop 143 -2 byte-condition-case)
+
+;; For entry to with-output-to-temp-buffer.
+;; Takes, on stack, the buffer name.
+;; Binds standard-output and does some other things.
+;; Returns with temp buffer on the stack in place of buffer name.
+(byte-defop 144  0 byte-temp-output-buffer-setup)
+
+;; For exit from with-output-to-temp-buffer.
+;; Expects the temp buffer on the stack underneath value to return.
+;; Pops them both, then pushes the value back on.
+;; Unbinds standard-output and makes the temp buffer visible.
+(byte-defop 145 -1 byte-temp-output-buffer-show)
+
+;; To unbind back to the beginning of this frame.
+;; Not used yet, but will be needed for tail-recursion elimination.
+(byte-defop 146  0 byte-unbind-all)
+
+(byte-defop 147 -2 byte-set-marker)
+(byte-defop 148  0 byte-match-beginning)
+(byte-defop 149  0 byte-match-end)
+(byte-defop 150  0 byte-upcase)
+(byte-defop 151  0 byte-downcase)
+(byte-defop 152 -1 byte-string=)
+(byte-defop 153 -1 byte-string<)
+(byte-defop 154 -1 byte-old-equal)
+(byte-defop 155 -1 byte-nthcdr)
+(byte-defop 156 -1 byte-elt)
+(byte-defop 157 -1 byte-old-member)
+(byte-defop 158 -1 byte-old-assq)
+(byte-defop 159  0 byte-nreverse)
+(byte-defop 160 -1 byte-setcar)
+(byte-defop 161 -1 byte-setcdr)
+(byte-defop 162  0 byte-car-safe)
+(byte-defop 163  0 byte-cdr-safe)
+(byte-defop 164 -1 byte-nconc)
+(byte-defop 165 -1 byte-quo)
+(byte-defop 166 -1 byte-rem)
+(byte-defop 167  0 byte-numberp)
+(byte-defop 168  0 byte-integerp)
+
+;; unused: 169
+
+;; These are not present in FSF.
+;;
+(byte-defop 170  0 byte-rel-goto)
+(byte-defop 171 -1 byte-rel-goto-if-nil)
+(byte-defop 172 -1 byte-rel-goto-if-not-nil)
+(byte-defop 173 -1 byte-rel-goto-if-nil-else-pop)
+(byte-defop 174 -1 byte-rel-goto-if-not-nil-else-pop)
+
+(byte-defop 175 nil byte-listN)
+(byte-defop 176 nil byte-concatN)
+(byte-defop 177 nil byte-insertN)
+
+;; unused: 178-181
+
+;; these ops are new to v20
+(byte-defop 182 -1 byte-member)
+(byte-defop 183 -1 byte-assq)
+
+;; unused: 184-191
+
+(byte-defop 192  1 byte-constant       "for reference to a constant")
+;; codes 193-255 are consumed by byte-constant.
+(defconst byte-constant-limit 64
+  "Exclusive maximum index usable in the `byte-constant' opcode.")
+
+(defconst byte-goto-ops (purecopy
+                        '(byte-goto byte-goto-if-nil byte-goto-if-not-nil
+                          byte-goto-if-nil-else-pop
+                          byte-goto-if-not-nil-else-pop))
+  "List of byte-codes whose offset is a pc.")
+
+(defconst byte-goto-always-pop-ops
+  (purecopy '(byte-goto-if-nil byte-goto-if-not-nil)))
+
+(defconst byte-rel-goto-ops
+  (purecopy '(byte-rel-goto byte-rel-goto-if-nil byte-rel-goto-if-not-nil
+             byte-rel-goto-if-nil-else-pop byte-rel-goto-if-not-nil-else-pop))
+  "byte-codes for relative jumps.")
+
+(byte-extrude-byte-code-vectors)
+\f
+;;; lapcode generator
+;;;
+;;; the byte-compiler now does source -> lapcode -> bytecode instead of
+;;; source -> bytecode, because it's a lot easier to make optimizations
+;;; on lapcode than on bytecode.
+;;;
+;;; Elements of the lapcode list are of the form (<instruction> . <parameter>)
+;;; where instruction is a symbol naming a byte-code instruction,
+;;; and parameter is an argument to that instruction, if any.
+;;;
+;;; The instruction can be the pseudo-op TAG, which means that this position
+;;; in the instruction stream is a target of a goto.  (car PARAMETER) will be
+;;; the PC for this location, and the whole instruction "(TAG pc)" will be the
+;;; parameter for some goto op.
+;;;
+;;; If the operation is varbind, varref, varset or push-constant, then the
+;;; parameter is (variable/constant . index_in_constant_vector).
+;;;
+;;; First, the source code is macroexpanded and optimized in various ways.
+;;; Then the resultant code is compiled into lapcode.  Another set of
+;;; optimizations are then run over the lapcode.  Then the variables and
+;;; constants referenced by the lapcode are collected and placed in the
+;;; constants-vector.  (This happens now so that variables referenced by dead
+;;; code don't consume space.)  And finally, the lapcode is transformed into
+;;; compacted byte-code.
+;;;
+;;; A distinction is made between variables and constants because the variable-
+;;; referencing instructions are more sensitive to the variables being near the
+;;; front of the constants-vector than the constant-referencing instructions.
+;;; Also, this lets us notice references to free variables.
+
+(defun byte-compile-lapcode (lap)
+  "Turns lapcode into bytecode.  The lapcode is destroyed."
+  ;; Lapcode modifications: changes the ID of a tag to be the tag's PC.
+  (let ((pc 0)                 ; Program counter
+       op off                  ; Operation & offset
+       (bytes '())             ; Put the output bytes here
+       (patchlist nil)         ; List of tags and goto's to patch
+       rest rel tmp)
+    (while lap
+      (setq op (car (car lap))
+           off (cdr (car lap)))
+      (cond ((not (symbolp op))
+            (error "Non-symbolic opcode `%s'" op))
+           ((eq op 'TAG)
+            (setcar off pc)
+            (setq patchlist (cons off patchlist)))
+           ((memq op byte-goto-ops)
+            (setq pc (+ pc 3))
+            (setq bytes (cons (cons pc (cdr off))
+                              (cons nil
+                                    (cons (symbol-value op) bytes))))
+            (setq patchlist (cons bytes patchlist)))
+           (t
+            (setq bytes
+                  (cond ((cond ((consp off)
+                                ;; Variable or constant reference
+                                (setq off (cdr off))
+                                (eq op 'byte-constant)))
+                         (cond ((< off byte-constant-limit)
+                                (setq pc (1+ pc))
+                                (cons (+ byte-constant off) bytes))
+                               (t
+                                (setq pc (+ 3 pc))
+                                (cons (lsh off -8)
+                                      (cons (logand off 255)
+                                            (cons byte-constant2 bytes))))))
+                        ((and (<= byte-listN (symbol-value op))
+                              (<= (symbol-value op) byte-insertN))
+                         (setq pc (+ 2 pc))
+                         (cons off (cons (symbol-value op) bytes)))
+                        ((< off 6)
+                         (setq pc (1+ pc))
+                         (cons (+ (symbol-value op) off) bytes))
+                        ((< off 256)
+                         (setq pc (+ 2 pc))
+                         (cons off (cons (+ (symbol-value op) 6) bytes)))
+                        (t
+                         (setq pc (+ 3 pc))
+                         (cons (lsh off -8)
+                               (cons (logand off 255)
+                                     (cons (+ (symbol-value op) 7)
+                                           bytes))))))))
+      (setq lap (cdr lap)))
+    ;;(if (not (= pc (length bytes)))
+    ;;    (error "Compiler error: pc mismatch - %s %s" pc (length bytes)))
+    (cond (t ;; starting with Emacs 19.
+          ;; Make relative jumps
+          (setq patchlist (nreverse patchlist))
+          (while (progn
+                   (setq off 0)        ; PC change because of deleted bytes
+                   (setq rest patchlist)
+                   (while rest
+                     (setq tmp (car rest))
+                     (and (consp (car tmp)) ; Jump
+                          (prog1 (null (nth 1 tmp)) ; Absolute jump
+                            (setq tmp (car tmp)))
+                          (progn
+                            (setq rel (- (car (cdr tmp)) (car tmp)))
+                            (and (<= -129 rel) (< rel 128)))
+                          (progn
+                            ;; Convert to relative jump.
+                            (setcdr (car rest) (cdr (cdr (car rest))))
+                            (setcar (cdr (car rest))
+                                    (+ (car (cdr (car rest)))
+                                       (- byte-rel-goto byte-goto)))
+                            (setq off (1- off))))
+                     (setcar tmp (+ (car tmp) off)) ; Adjust PC
+                     (setq rest (cdr rest)))
+                   ;; If optimizing, repeat until no change.
+                   (and byte-optimize
+                        (not (zerop off)))))))
+    ;; Patch PC into jumps
+    (let (bytes)
+      (while patchlist
+       (setq bytes (car patchlist))
+       (cond ((atom (car bytes)))      ; Tag
+             ((nth 1 bytes)            ; Relative jump
+              (setcar bytes (+ (- (car (cdr (car bytes))) (car (car bytes)))
+                               128)))
+             (t                        ; Absolute jump
+              (setq pc (car (cdr (car bytes))))        ; Pick PC from tag
+              (setcar (cdr bytes) (logand pc 255))
+              (setcar bytes (lsh pc -8))))
+       (setq patchlist (cdr patchlist))))
+    (concat (nreverse bytes))))
+
+\f
+;;; byte compiler messages
+
+(defvar byte-compile-current-form nil)
+(defvar byte-compile-current-file nil)
+(defvar byte-compile-dest-file nil)
+
+(defmacro byte-compile-log (format-string &rest args)
+  (list 'and
+       'byte-optimize
+       '(memq byte-optimize-log '(t source))
+       (list 'let '((print-escape-newlines t)
+                    (print-level 4)
+                    (print-length 4))
+             (list 'byte-compile-log-1
+                   (cons 'format
+                     (cons format-string
+                       (mapcar
+                        '(lambda (x)
+                           (if (symbolp x) (list 'prin1-to-string x) x))
+                        args)))))))
+
+(defconst byte-compile-last-warned-form nil)
+
+;; Log a message STRING in *Compile-Log*.
+;; Also log the current function and file if not already done.
+(defun byte-compile-log-1 (string &optional fill)
+  (let ((this-form (or byte-compile-current-form "toplevel forms")))
+    (cond
+     (noninteractive
+      (if (or byte-compile-current-file
+             (and byte-compile-last-warned-form
+                  (not (eq this-form byte-compile-last-warned-form))))
+         (message
+          (format "While compiling %s%s:"
+                  this-form
+                  (if byte-compile-current-file
+                      (if (stringp byte-compile-current-file)
+                          (concat " in file " byte-compile-current-file)
+                        (concat " in buffer "
+                                (buffer-name byte-compile-current-file)))
+                    ""))))
+      (message "  %s" string))
+     (t
+      (save-excursion
+       (set-buffer (get-buffer-create "*Compile-Log*"))
+       (goto-char (point-max))
+       (cond ((or byte-compile-current-file
+                  (and byte-compile-last-warned-form
+                       (not (eq this-form byte-compile-last-warned-form))))
+              (if byte-compile-current-file
+                  (insert "\n\^L\n" (current-time-string) "\n"))
+              (insert "While compiling "
+                      (if (stringp this-form) this-form
+                        (format "%s" this-form)))
+              (if byte-compile-current-file
+                  (if (stringp byte-compile-current-file)
+                      (insert " in file " byte-compile-current-file)
+                    (insert " in buffer "
+                            (buffer-name byte-compile-current-file))))
+              (insert ":\n")))
+       (insert "  " string "\n")
+       (if (and fill (not (string-match "\n" string)))
+           (let ((fill-prefix "     ")
+                 (fill-column 78))
+             (fill-paragraph nil)))
+       )))
+    (setq byte-compile-current-file nil
+         byte-compile-last-warned-form this-form)))
+
+;; Log the start of a file in *Compile-Log*, and mark it as done.
+;; But do nothing in batch mode.
+(defun byte-compile-log-file ()
+  (and byte-compile-current-file (not noninteractive)
+       (save-excursion
+        (set-buffer (get-buffer-create "*Compile-Log*"))
+        (goto-char (point-max))
+        (insert "\n\^L\nCompiling "
+                (if (stringp byte-compile-current-file)
+                    (concat "file " byte-compile-current-file)
+                  (concat "buffer " (buffer-name byte-compile-current-file)))
+                " at " (current-time-string) "\n")
+        (setq byte-compile-current-file nil))))
+
+(defun byte-compile-warn (format &rest args)
+  (setq format (apply 'format format args))
+  (if byte-compile-error-on-warn
+      (error "%s" format)              ; byte-compile-file catches and logs it
+    (byte-compile-log-1 (concat "** " format) t)
+;;; RMS says:
+;;; It is useless to flash warnings too fast to be read.
+;;; Besides, they will all be shown at the end.
+;;; and comments out the next two lines.
+    (or noninteractive  ; already written on stdout.
+       (message "Warning: %s" format))))
+
+;;; This function should be used to report errors that have halted
+;;; compilation of the current file.
+(defun byte-compile-report-error (error-info)
+  (setq byte-compiler-error-flag t)
+  (byte-compile-log-1
+   (concat "!! "
+          (format (if (cdr error-info) "%s (%s)" "%s")
+                  (get (car error-info) 'error-message)
+                  (prin1-to-string (cdr error-info))))))
+
+;;; Used by make-obsolete.
+(defun byte-compile-obsolete (form)
+  (let ((new (get (car form) 'byte-obsolete-info)))
+    (if (memq 'obsolete byte-compile-warnings)
+       (byte-compile-warn "%s is an obsolete function; %s" (car form)
+                          (if (stringp (car new))
+                              (car new)
+                            (format "use %s instead." (car new)))))
+    (funcall (or (cdr new) 'byte-compile-normal-call) form)))
+
+;;; Used by make-obsolete.
+(defun byte-compile-compatible (form)
+  (let ((new (get (car form) 'byte-compatible-info)))
+    (if (memq 'pedantic byte-compile-warnings)
+       (byte-compile-warn "%s is provided for compatibility; %s" (car form)
+                          (if (stringp (car new))
+                              (car new)
+                            (format "use %s instead." (car new)))))
+    (funcall (or (cdr new) 'byte-compile-normal-call) form)))
+\f
+;; Compiler options
+
+(defconst byte-compiler-legal-options
+  '((optimize byte-optimize (t nil source byte) val)
+    (file-format byte-compile-emacs19-compatibility (emacs19 emacs20)
+                (eq val 'emacs19))
+    (delete-errors byte-compile-delete-errors (t nil) val)
+    (verbose byte-compile-verbose (t nil) val)
+    (new-bytecodes byte-compile-new-bytecodes (t nil) val)
+    (warnings byte-compile-warnings
+             ((callargs redefine free-vars unused-vars unresolved))
+             val)))
+
+;; XEmacs addition
+(defconst byte-compiler-obsolete-options
+  '((new-bytecodes t)))
+
+;; Inhibit v19/v20 selectors if the version is hardcoded.
+;; #### This should print a warning if the user tries to change something
+;; than can't be changed because the running compiler doesn't support it.
+(cond
+ ((byte-compile-single-version)
+  (setcar (cdr (cdr (assq 'file-format byte-compiler-legal-options)))
+         (if (byte-compile-version-cond byte-compile-emacs19-compatibility)
+             '(emacs19) '(emacs20)))))
+
+;; now we can copy it.
+(setq byte-compiler-legal-options (purecopy byte-compiler-legal-options))
+
+(defun byte-compiler-options-handler (&rest args)
+  (let (key val desc choices)
+    (while args
+      (if (or (atom (car args)) (nthcdr 2 (car args)) (null (cdr (car args))))
+         (error "malformed byte-compiler-option %s" (car args)))
+      (setq key (car (car args))
+           val (car (cdr (car args)))
+           desc (assq key byte-compiler-legal-options))
+      (or desc
+         (error "unknown byte-compiler option %s" key))
+      (if (assq key byte-compiler-obsolete-options)
+         (byte-compile-warn "%s is an obsolete byte-compiler option." key))
+      (setq choices (nth 2 desc))
+      (if (consp (car choices))
+         (let* (this
+                (handler 'cons)
+                (var (nth 1 desc))
+                (ret (and (memq (car val) '(+ -))
+                          (copy-sequence (if (eq t (symbol-value var))
+                                             (car choices)
+                                           (symbol-value var))))))
+           (setq choices (car  choices))
+           (while val
+             (setq this (car val))
+             (cond ((memq this choices)
+                    (setq ret (funcall handler this ret)))
+                   ((eq this '+) (setq handler 'cons))
+                   ((eq this '-) (setq handler 'delq))
+                   ((error "%s only accepts %s." key choices)))
+             (setq val (cdr val)))
+           (set (nth 1 desc) ret))
+       (or (memq val choices)
+           (error "%s must be one of %s." key choices))
+       (set (nth 1 desc) (eval (nth 3 desc))))
+      (setq args (cdr args)))
+    nil))
+\f
+;;; sanity-checking arglists
+
+(defun byte-compile-fdefinition (name macro-p)
+  (let* ((list (if (memq macro-p '(nil subr))
+                  byte-compile-function-environment
+                byte-compile-macro-environment))
+        (env (cdr (assq name list))))
+    (or env
+       (let ((fn name))
+         (while (and (symbolp fn)
+                     (fboundp fn)
+                     (or (symbolp (symbol-function fn))
+                         (consp (symbol-function fn))
+                         (and (not macro-p)
+                              (compiled-function-p (symbol-function fn)))
+                         (and (eq macro-p 'subr) (subrp fn))))
+           (setq fn (symbol-function fn)))
+         (if (or (and (not macro-p) (compiled-function-p fn))
+                 (and (eq macro-p 'subr) (subrp fn)))
+             fn
+           (and (consp fn)
+                (not (eq macro-p 'subr))
+                (if (eq 'macro (car fn))
+                    (cdr fn)
+                  (if macro-p
+                      nil
+                    (if (eq 'autoload (car fn))
+                        nil
+                      fn)))))))))
+
+(defun byte-compile-arglist-signature (arglist)
+  (let ((args 0)
+       opts
+       restp)
+    (while arglist
+      (cond ((eq (car arglist) '&optional)
+            (or opts (setq opts 0)))
+           ((eq (car arglist) '&rest)
+            (if (cdr arglist)
+                (setq restp t
+                      arglist nil)))
+           (t
+            (if opts
+                (setq opts (1+ opts))
+                (setq args (1+ args)))))
+      (setq arglist (cdr arglist)))
+    (cons args (if restp nil (if opts (+ args opts) args)))))
+
+
+(defun byte-compile-arglist-signatures-congruent-p (old new)
+  (not (or
+        (> (car new) (car old))  ; requires more args now
+        (and (null (cdr old))    ; tooks rest-args, doesn't any more
+             (cdr new))
+        (and (cdr new) (cdr old) ; can't take as many args now
+             (< (cdr new) (cdr old)))
+        )))
+
+(defun byte-compile-arglist-signature-string (signature)
+  (cond ((null (cdr signature))
+        (format "%d+" (car signature)))
+       ((= (car signature) (cdr signature))
+        (format "%d" (car signature)))
+       (t (format "%d-%d" (car signature) (cdr signature)))))
+
+
+;; Warn if the form is calling a function with the wrong number of arguments.
+(defun byte-compile-callargs-warn (form)
+  (let* ((def (or (byte-compile-fdefinition (car form) nil)
+                 (byte-compile-fdefinition (car form) t)))
+        (sig (and def (byte-compile-arglist-signature
+                        (if (eq 'lambda (car-safe def))
+                            (nth 1 def)
+                          (if (compiled-function-p def)
+                              (compiled-function-arglist def)
+                            '(&rest def))))))
+        (ncall (length (cdr form))))
+    (if (and (null def)
+            (fboundp 'subr-min-args)
+            (setq def (byte-compile-fdefinition (car form) 'subr)))
+       (setq sig (cons (subr-min-args def) (subr-max-args def))))
+    (if sig
+       (if (or (< ncall (car sig))
+               (and (cdr sig) (> ncall (cdr sig))))
+           (byte-compile-warn
+             "%s called with %d argument%s, but %s %s"
+             (car form) ncall
+             (if (= 1 ncall) "" "s")
+             (if (< ncall (car sig))
+                 "requires"
+                 "accepts only")
+             (byte-compile-arglist-signature-string sig)))
+      (or (fboundp (car form)) ; might be a subr or autoload.
+         ;; ## this doesn't work with recursion.
+         (eq (car form) byte-compile-current-form)
+         ;; It's a currently-undefined function.
+         ;; Remember number of args in call.
+         (let ((cons (assq (car form) byte-compile-unresolved-functions))
+               (n (length (cdr form))))
+           (if cons
+               (or (memq n (cdr cons))
+                   (setcdr cons (cons n (cdr cons))))
+               (setq byte-compile-unresolved-functions
+                     (cons (list (car form) n)
+                           byte-compile-unresolved-functions))))))))
+
+;; Warn if the function or macro is being redefined with a different
+;; number of arguments.
+(defun byte-compile-arglist-warn (form macrop)
+  (let ((old (byte-compile-fdefinition (nth 1 form) macrop)))
+    (if old
+       (let ((sig1 (byte-compile-arglist-signature
+                     (if (eq 'lambda (car-safe old))
+                         (nth 1 old)
+                       (if (compiled-function-p old)
+                           (compiled-function-arglist old)
+                         '(&rest def)))))
+             (sig2 (byte-compile-arglist-signature (nth 2 form))))
+         (or (byte-compile-arglist-signatures-congruent-p sig1 sig2)
+             (byte-compile-warn "%s %s used to take %s %s, now takes %s"
+               (if (eq (car form) 'defun) "function" "macro")
+               (nth 1 form)
+               (byte-compile-arglist-signature-string sig1)
+               (if (equal sig1 '(1 . 1)) "argument" "arguments")
+               (byte-compile-arglist-signature-string sig2))))
+      ;; This is the first definition.  See if previous calls are compatible.
+      (let ((calls (assq (nth 1 form) byte-compile-unresolved-functions))
+           nums sig min max)
+       (if calls
+           (progn
+             (setq sig (byte-compile-arglist-signature (nth 2 form))
+                   nums (sort (copy-sequence (cdr calls)) (function <))
+                   min (car nums)
+                   max (car (nreverse nums)))
+             (if (or (< min (car sig))
+                     (and (cdr sig) (> max (cdr sig))))
+                 (byte-compile-warn
+           "%s being defined to take %s%s, but was previously called with %s"
+                   (nth 1 form)
+                   (byte-compile-arglist-signature-string sig)
+                   (if (equal sig '(1 . 1)) " arg" " args")
+                   (byte-compile-arglist-signature-string (cons min max))))
+
+             (setq byte-compile-unresolved-functions
+                   (delq calls byte-compile-unresolved-functions)))))
+      )))
+
+;; If we have compiled any calls to functions which are not known to be
+;; defined, issue a warning enumerating them.
+;; `unresolved' in the list `byte-compile-warnings' disables this.
+(defun byte-compile-warn-about-unresolved-functions (&optional msg)
+  (if (memq 'unresolved byte-compile-warnings)
+   (let ((byte-compile-current-form (or msg "the end of the data")))
+     ;; First delete the autoloads from the list.
+     (if byte-compile-autoload-environment
+        (let ((rest byte-compile-unresolved-functions))
+          (while rest
+            (if (assq (car (car rest)) byte-compile-autoload-environment)
+                (setq byte-compile-unresolved-functions
+                      (delq (car rest) byte-compile-unresolved-functions)))
+            (setq rest (cdr rest)))))
+     ;; Now warn.
+     (if (cdr byte-compile-unresolved-functions)
+        (let* ((str "The following functions are not known to be defined: ")
+               (L (+ (length str) 5))
+               (rest (reverse byte-compile-unresolved-functions))
+               s)
+          (while rest
+            (setq s (symbol-name (car (car rest)))
+                  L (+ L (length s) 2)
+                  rest (cdr rest))
+            (if (<= L (1- fill-column))
+                (setq str (concat str " " s (and rest ",")))
+              (setq str (concat str "\n    " s (and rest ","))
+                    L (+ (length s) 4))))
+          (byte-compile-warn "%s" str))
+       (if byte-compile-unresolved-functions
+          (byte-compile-warn "the function %s is not known to be defined."
+           (car (car byte-compile-unresolved-functions)))))))
+  nil)
+
+(defun byte-compile-defvar-p (var)
+  ;; Whether the byte compiler thinks that nonexical references to this
+  ;; variable are ok.
+  (or (globally-boundp var)
+      (let ((rest byte-compile-bound-variables))
+       (while (and rest var)
+         (if (and (eq var (car-safe (car rest)))
+                  (not (= 0 (logand (cdr (car rest))
+                                    byte-compile-global-bit))))
+             (setq var nil))
+         (setq rest (cdr rest)))
+       ;; if var is nil at this point, it's a defvar in this file.
+       (not var))))
+
+
+;;; If we have compiled bindings of variables which have no referents, warn.
+(defun byte-compile-warn-about-unused-variables ()
+  (let ((rest byte-compile-bound-variables)
+       (unreferenced '())
+       cell)
+    (while (and rest
+               ;; only warn about variables whose lifetime is now ending,
+               ;; that is, variables from the lexical scope that is now
+               ;; terminating.  (Think nested lets.)
+               (not (eq (car rest) 'new-scope)))
+      (setq cell (car rest))
+      (if (and (= 0 (logand byte-compile-referenced-bit (cdr cell)))
+              ;; Don't warn about declared-but-unused arguments,
+              ;; for two reasons: first, the arglist structure
+              ;; might be imposed by external forces, and we don't
+              ;; have (declare (ignore x)) yet; and second, inline
+              ;; expansion produces forms like
+              ;;   ((lambda (arg) (byte-code "..." [arg])) x)
+              ;; which we can't (ok, well, don't) recognise as
+              ;; containing a reference to arg, so every inline
+              ;; expansion would generate a warning.  (If we had
+              ;; `ignore' then inline expansion could emit an
+              ;; ignore declaration.)
+              (= 0 (logand byte-compile-arglist-bit (cdr cell)))
+              ;; Don't warn about defvars because this is a
+              ;; legitimate special binding.
+              (not (byte-compile-defvar-p (car cell))))
+         (setq unreferenced (cons (car cell) unreferenced)))
+      (setq rest (cdr rest)))
+    (setq unreferenced (nreverse unreferenced))
+    (while unreferenced
+      (byte-compile-warn
+       (format "variable %s bound but not referenced" (car unreferenced)))
+      (setq unreferenced (cdr unreferenced)))))
+
+\f
+(defmacro byte-compile-constp (form)
+  ;; Returns non-nil if FORM is a constant.
+  (` (cond ((consp (, form)) (eq (car (, form)) 'quote))
+          ((not (symbolp (, form))))
+          ((keywordp (, form)))
+          ((memq (, form) '(nil t))))))
+
+(defmacro byte-compile-close-variables (&rest body)
+  `(let
+       (;;
+       ;; Close over these variables to encapsulate the
+       ;; compilation state
+       ;;
+       (byte-compile-macro-environment
+        ;; Copy it because the compiler may patch into the
+        ;; macroenvironment.
+        (copy-alist byte-compile-initial-macro-environment))
+       (byte-compile-function-environment nil)
+       (byte-compile-autoload-environment nil)
+       (byte-compile-unresolved-functions nil)
+       (byte-compile-bound-variables nil)
+       (byte-compile-free-references nil)
+       (byte-compile-free-assignments nil)
+       ;;
+       ;; Close over these variables so that `byte-compiler-options'
+       ;; can change them on a per-file basis.
+       ;;
+       (byte-compile-verbose byte-compile-verbose)
+       (byte-optimize byte-optimize)
+       (byte-compile-emacs19-compatibility
+        byte-compile-emacs19-compatibility)
+       (byte-compile-dynamic byte-compile-dynamic)
+       (byte-compile-dynamic-docstrings
+        byte-compile-dynamic-docstrings)
+       (byte-compile-warnings (if (eq byte-compile-warnings t)
+                                  byte-compile-default-warnings
+                                byte-compile-warnings))
+       (byte-compile-file-domain nil)
+       )
+     (prog1
+        (progn ,@body)
+       (if (memq 'unused-vars byte-compile-warnings)
+          ;; done compiling in this scope, warn now.
+          (byte-compile-warn-about-unused-variables)))))
+
+
+(defvar byte-compile-warnings-point-max nil)
+(defmacro displaying-byte-compile-warnings (&rest body)
+  `(let ((byte-compile-warnings-point-max byte-compile-warnings-point-max))
+     ;; Log the file name.
+     (byte-compile-log-file)
+     ;; Record how much is logged now.
+     ;; We will display the log buffer if anything more is logged
+     ;; before the end of BODY.
+     (or byte-compile-warnings-point-max
+        (save-excursion
+          (set-buffer (get-buffer-create "*Compile-Log*"))
+          (setq byte-compile-warnings-point-max (point-max))))
+     (unwind-protect
+        (condition-case error-info
+            (progn ,@body)
+          (error
+           (byte-compile-report-error error-info)))
+       (save-excursion
+        ;; If there were compilation warnings, display them.
+        (set-buffer "*Compile-Log*")
+        (if (= byte-compile-warnings-point-max (point-max))
+            nil
+          (if temp-buffer-show-function
+              (let ((show-buffer (get-buffer-create "*Compile-Log-Show*")))
+                (save-excursion
+                  (set-buffer show-buffer)
+                  (setq buffer-read-only nil)
+                  (erase-buffer))
+                (copy-to-buffer show-buffer
+                                (save-excursion
+                                  (goto-char byte-compile-warnings-point-max)
+                                  (forward-line -1)
+                                  (point))
+                                (point-max))
+                (funcall temp-buffer-show-function show-buffer))
+              (select-window
+               (prog1 (selected-window)
+                 (select-window (display-buffer (current-buffer)))
+                 (goto-char byte-compile-warnings-point-max)
+                 (recenter 1)))))))))
+
+\f
+;;;###autoload
+(defun byte-force-recompile (directory)
+  "Recompile every `.el' file in DIRECTORY that already has a `.elc' file.
+Files in subdirectories of DIRECTORY are processed also."
+  (interactive "DByte force recompile (directory): ")
+  (byte-recompile-directory directory nil t))
+
+;;;###autoload
+(defun byte-recompile-directory (directory &optional arg norecursion force)
+  "Recompile every `.el' file in DIRECTORY that needs recompilation.
+This is if a `.elc' file exists but is older than the `.el' file.
+Files in subdirectories of DIRECTORY are processed also unless argument
+NORECURSION is non-nil.
+
+If the `.elc' file does not exist, normally the `.el' file is *not* compiled.
+But a prefix argument (optional second arg) means ask user,
+for each such `.el' file, whether to compile it.  Prefix argument 0 means
+don't ask and compile the file anyway.
+
+A nonzero prefix argument also means ask about each subdirectory.
+
+If the fourth argument FORCE is non-nil,
+recompile every `.el' file that already has a `.elc' file."
+  (interactive "DByte recompile directory: \nP")
+  (if arg
+      (setq arg (prefix-numeric-value arg)))
+  (if noninteractive
+      nil
+    (save-some-buffers)
+    (redraw-modeline))
+  (let ((directories (list (expand-file-name directory)))
+       (file-count 0)
+       (dir-count 0)
+       last-dir)
+    (displaying-byte-compile-warnings
+     (while directories
+       (setq directory (file-name-as-directory (car directories)))
+       (or noninteractive (message "Checking %s..." directory))
+       (let ((files (directory-files directory))
+            source dest)
+        (while files
+          (setq source (expand-file-name (car files) directory))
+          (if (and (not (member (car files) '("." ".." "RCS" "CVS" "SCCS")))
+                   ;; Stay away from directory back-links, etc:
+                   (not (file-symlink-p source))
+                   (file-directory-p source)
+                   byte-recompile-directory-recursively)
+              ;; This file is a subdirectory.  Handle them differently.
+              (if (or (null arg)
+                      (eq arg 0)
+                      (y-or-n-p (concat "Check " source "? ")))
+                  (setq directories
+                        (nconc directories (list source))))
+            ;; It is an ordinary file.  Decide whether to compile it.
+            (if (and (string-match emacs-lisp-file-regexp source)
+                     (not (auto-save-file-name-p source))
+                     (setq dest (byte-compile-dest-file source))
+                     (if (file-exists-p dest)
+                         ;; File was already compiled.
+                         (or force (file-newer-than-file-p source dest))
+                       ;; No compiled file exists yet.
+                       (and arg
+                            (or (eq 0 arg)
+                                (y-or-n-p (concat "Compile " source "? "))))))
+                (progn ;(if (and noninteractive (not byte-compile-verbose))
+                       ;    (message "Compiling %s..." source))
+                       ; we do this in byte-compile-file.
+                       (if byte-recompile-directory-ignore-errors-p
+                            (batch-byte-compile-1 source)
+                         (byte-compile-file source))
+                       (or noninteractive
+                           (message "Checking %s..." directory))
+                       (setq file-count (1+ file-count))
+                       (if (not (eq last-dir directory))
+                           (setq last-dir directory
+                                 dir-count (1+ dir-count)))
+                       )))
+          (setq files (cdr files))))
+       (setq directories (cdr directories))))
+    (message "Done (Total of %d file%s compiled%s)"
+            file-count (if (= file-count 1) "" "s")
+            (if (> dir-count 1) (format " in %d directories" dir-count) ""))))
+
+;;;###autoload
+(defun byte-recompile-file (filename &optional force)
+  "Recompile a file of Lisp code named FILENAME if it needs recompilation.
+This is if the `.elc' file exists but is older than the `.el' file.
+
+If the `.elc' file does not exist, normally the `.el' file is *not*
+compiled.  But a prefix argument (optional second arg) means ask user
+whether to compile it.  Prefix argument 0 don't ask and recompile anyway."
+  (interactive "fByte recompile file: \nP")
+  (let ((dest))
+    (if (and (string-match emacs-lisp-file-regexp filename)
+            (not (auto-save-file-name-p filename))
+            (setq dest (byte-compile-dest-file filename))
+            (if (file-exists-p dest)
+                (file-newer-than-file-p filename dest)
+              (and force
+                   (or (eq 0 force)
+                       (y-or-n-p (concat "Compile " filename "? "))))))
+       (byte-compile-file filename))))
+
+(defvar kanji-flag nil)
+
+;;;###autoload
+(defun byte-compile-file (filename &optional load)
+  "Compile a file of Lisp code named FILENAME into a file of byte code.
+The output file's name is made by appending `c' to the end of FILENAME.
+With prefix arg (noninteractively: 2nd arg), load the file after compiling."
+;;  (interactive "fByte compile file: \nP")
+  (interactive
+   (let ((file buffer-file-name)
+        (file-name nil)
+        (file-dir nil))
+     (and file
+         (eq (cdr (assq 'major-mode (buffer-local-variables)))
+             'emacs-lisp-mode)
+         (setq file-name (file-name-nondirectory file)
+               file-dir (file-name-directory file)))
+     (list (read-file-name (if current-prefix-arg
+                              "Byte compile and load file: "
+                            "Byte compile file: ")
+                          file-dir nil nil file-name)
+          current-prefix-arg)))
+  ;; Expand now so we get the current buffer's defaults
+  (setq filename (expand-file-name filename))
+
+  ;; If we're compiling a file that's in a buffer and is modified, offer
+  ;; to save it first.
+  (or noninteractive
+      (let ((b (get-file-buffer (expand-file-name filename))))
+       (if (and b (buffer-modified-p b)
+                (y-or-n-p (format "save buffer %s first? " (buffer-name b))))
+           (save-excursion (set-buffer b) (save-buffer)))))
+
+  (if (or noninteractive byte-compile-verbose) ; XEmacs change
+      (message "Compiling %s..." filename))
+  (let (;;(byte-compile-current-file (file-name-nondirectory filename))
+       (byte-compile-current-file filename)
+       (debug-issue-ebola-notices 0) ; Hack -slb
+       target-file input-buffer output-buffer
+       byte-compile-dest-file)
+    (setq target-file (byte-compile-dest-file filename))
+    (setq byte-compile-dest-file target-file)
+    (save-excursion
+      (setq input-buffer (get-buffer-create " *Compiler Input*"))
+      (set-buffer input-buffer)
+      (erase-buffer)
+      (insert-file-contents filename)
+      ;; Run hooks including the uncompression hook.
+      ;; If they change the file name, then change it for the output also.
+      (let ((buffer-file-name filename)
+           (default-major-mode 'emacs-lisp-mode)
+           (enable-local-eval nil))
+        (normal-mode)
+        (setq filename buffer-file-name)))
+      (setq byte-compiler-error-flag nil)
+    ;; It is important that input-buffer not be current at this call,
+    ;; so that the value of point set in input-buffer
+    ;; within byte-compile-from-buffer lingers in that buffer.
+    (setq output-buffer (byte-compile-from-buffer input-buffer filename))
+    (if byte-compiler-error-flag
+       nil
+      (if byte-compile-verbose
+         (message "Compiling %s...done" filename))
+      (kill-buffer input-buffer)
+      (save-excursion
+       (set-buffer output-buffer)
+       (goto-char (point-max))
+       (insert "\n")                   ; aaah, unix.
+       (let ((vms-stmlf-recfm t))
+         (setq target-file (byte-compile-dest-file filename))
+         (or byte-compile-overwrite-file
+             (condition-case ()
+                 (delete-file target-file)
+               (error nil)))
+         (if (file-writable-p target-file)
+             (let ((kanji-flag nil))   ; for nemacs, from Nakagawa Takayuki
+               (if (or (eq system-type 'ms-dos) (eq system-type 'windows-nt))
+                   (setq buffer-file-type t))
+               (write-region 1 (point-max) target-file))
+           ;; This is just to give a better error message than write-region
+           (signal 'file-error
+                   (list "Opening output file"
+                         (if (file-exists-p target-file)
+                             "cannot overwrite file"
+                           "directory not writable or nonexistent")
+                         target-file)))
+         (or byte-compile-overwrite-file
+             (condition-case ()
+                 (set-file-modes target-file (file-modes filename))
+               (error nil))))
+       (kill-buffer (current-buffer)))
+      (if (and byte-compile-generate-call-tree
+              (or (eq t byte-compile-generate-call-tree)
+                  (y-or-n-p (format "Report call tree for %s? " filename))))
+         (save-excursion
+           (display-call-tree filename)))
+      (if load
+         (load target-file))
+      t)))
+
+;; RMS comments the next two out.
+
+;;;###autoload
+(defun byte-compile-and-load-file (&optional filename)
+  "Compile a file of Lisp code named FILENAME into a file of byte code,
+and then load it.  The output file's name is made by appending \"c\" to
+the end of FILENAME."
+  (interactive)
+  (if filename ; I don't get it, (interactive-p) doesn't always work
+       (byte-compile-file filename t)
+    (let ((current-prefix-arg '(4)))
+       (call-interactively 'byte-compile-file))))
+
+;;;###autoload
+(defun byte-compile-buffer (&optional buffer)
+  "Byte-compile and evaluate contents of BUFFER (default: the current buffer)."
+  (interactive "bByte compile buffer: ")
+  (setq buffer (if buffer (get-buffer buffer) (current-buffer)))
+  (message "Compiling %s..." buffer)
+  (let* ((filename (or (buffer-file-name buffer)
+                      (prin1-to-string buffer)))
+        (byte-compile-current-file buffer))
+    (byte-compile-from-buffer buffer filename t))
+  (message "Compiling %s...done" buffer)
+  t)
+
+;;; compiling a single function
+;;;###autoload
+(defun compile-defun (&optional arg)
+  "Compile and evaluate the current top-level form.
+Print the result in the minibuffer.
+With argument, insert value in current buffer after the form."
+  (interactive "P")
+  (save-excursion
+    (end-of-defun)
+    (beginning-of-defun)
+    (let* ((byte-compile-current-file (buffer-file-name))
+          (load-file-name (buffer-file-name))
+          (byte-compile-last-warned-form 'nothing)
+          (value (eval (displaying-byte-compile-warnings
+                        (byte-compile-sexp (read (current-buffer))
+                                           "toplevel forms")))))
+      (cond (arg
+            (message "Compiling from buffer... done.")
+            (prin1 value (current-buffer))
+            (insert "\n"))
+           ((message "%s" (prin1-to-string value)))))))
+
+(defvar byte-compile-inbuffer)
+(defvar byte-compile-outbuffer)
+
+(defun byte-compile-from-buffer (byte-compile-inbuffer filename &optional eval)
+  ;; buffer --> output-buffer, or buffer --> eval form, return nil
+  (let (byte-compile-outbuffer
+       ;; Prevent truncation of flonums and lists as we read and print them
+       (float-output-format nil)
+       (case-fold-search nil)
+       (print-length nil)
+       (print-level nil)
+       ;; Simulate entry to byte-compile-top-level
+       (byte-compile-constants nil)
+       (byte-compile-variables nil)
+       (byte-compile-tag-number 0)
+       (byte-compile-depth 0)
+       (byte-compile-maxdepth 0)
+       (byte-compile-output nil)
+       ;;        #### This is bound in b-c-close-variables.
+       ;;        (byte-compile-warnings (if (eq byte-compile-warnings t)
+       ;;                                   byte-compile-warning-types
+       ;;                                 byte-compile-warnings))
+       )
+    (byte-compile-close-variables
+     (save-excursion
+       (setq byte-compile-outbuffer
+            (set-buffer (get-buffer-create " *Compiler Output*")))
+       (erase-buffer)
+       ;;       (emacs-lisp-mode)
+       (setq case-fold-search nil)
+       (and filename
+           (not eval)
+           (byte-compile-insert-header filename
+                                       byte-compile-inbuffer
+                                       byte-compile-outbuffer))
+
+       ;; This is a kludge.  Some operating systems (OS/2, DOS) need to
+       ;; write files containing binary information specially.
+       ;; Under most circumstances, such files will be in binary
+       ;; overwrite mode, so those OS's use that flag to guess how
+       ;; they should write their data.  Advise them that .elc files
+       ;; need to be written carefully.
+       (setq overwrite-mode 'overwrite-mode-binary))
+     (displaying-byte-compile-warnings
+      (save-excursion
+       (set-buffer byte-compile-inbuffer)
+       (goto-char 1)
+
+       ;; Compile the forms from the input buffer.
+       (while (progn
+                (while (progn (skip-chars-forward " \t\n\^l")
+                              (looking-at ";"))
+                  (forward-line 1))
+                (not (eobp)))
+         (byte-compile-file-form (read byte-compile-inbuffer)))
+
+       ;; Compile pending forms at end of file.
+       (byte-compile-flush-pending)
+       (byte-compile-warn-about-unresolved-functions)
+       ;; Should we always do this?  When calling multiple files, it
+       ;; would be useful to delay this warning until all have
+       ;; been compiled.
+       (setq byte-compile-unresolved-functions nil)))
+     (save-excursion
+       (set-buffer byte-compile-outbuffer)
+       (goto-char (point-min))))
+    (if (not eval)
+       byte-compile-outbuffer
+      (let (form)
+       (while (condition-case nil
+                  (progn (setq form (read byte-compile-outbuffer))
+                         t)
+                (end-of-file nil))
+         (eval form)))
+      (kill-buffer byte-compile-outbuffer)
+      nil)))
+
+(defun byte-compile-insert-header (filename byte-compile-inbuffer
+                                           byte-compile-outbuffer)
+  (set-buffer byte-compile-inbuffer)
+  (let ((dynamic-docstrings byte-compile-dynamic-docstrings))
+    (set-buffer byte-compile-outbuffer)
+    (goto-char 1)
+    ;;
+    ;; The magic number of .elc files is ";ELC", or 0x3B454C43.  After that is
+    ;; the file-format version number (19 or 20) as a byte, followed by some
+    ;; nulls.  The primary motivation for doing this is to get some binary
+    ;; characters up in the first line of the file so that `diff' will simply
+    ;; say "Binary files differ" instead of actually doing a diff of two .elc
+    ;; files.  An extra benefit is that you can add this to /etc/magic:
+    ;;
+    ;; 0       string          ;ELC            GNU Emacs Lisp compiled file,
+    ;; >4      byte            x               version %d
+    ;;
+    (insert
+     ";ELC"
+     (if (byte-compile-version-cond byte-compile-emacs19-compatibility) 19 20)
+     "\000\000\000\n"
+     )
+    (insert ";;; compiled by "
+           (or (and (boundp 'user-mail-address) user-mail-address)
+               (concat (user-login-name) "@" (system-name)))
+           " on "
+           (current-time-string) "\n;;; from file " filename "\n")
+    (insert ";;; emacs version " emacs-version ".\n")
+    (insert ";;; bytecomp version " byte-compile-version "\n;;; "
+     (cond
+       ((eq byte-optimize 'source) "source-level optimization only")
+       ((eq byte-optimize 'byte) "byte-level optimization only")
+       (byte-optimize "optimization is on")
+       (t "optimization is off"))
+     (if (byte-compile-version-cond byte-compile-emacs19-compatibility)
+        "; compiled with Emacs 19 compatibility.\n"
+       ".\n"))
+   (if (not (byte-compile-version-cond byte-compile-emacs19-compatibility))
+       (insert ";;; this file uses opcodes which do not exist in Emacs 19.\n"
+              ;; Have to check if emacs-version is bound so that this works
+              ;; in files loaded early in loadup.el.
+              "\n(if (and (boundp 'emacs-version)\n"
+              "\t (or (and (boundp 'epoch::version) epoch::version)\n"
+              "\t     (string-lessp emacs-version \"20\")))\n"
+              "    (error \"`"
+              ;; prin1-to-string is used to quote backslashes.
+              (substring (prin1-to-string (file-name-nondirectory filename))
+                         1 -1)
+              "' was compiled for Emacs 20\"))\n\n"))
+   (insert "(or (boundp 'current-load-list) (setq current-load-list nil))\n"
+          "\n")
+   (if (and (byte-compile-version-cond byte-compile-emacs19-compatibility)
+           dynamic-docstrings)
+       (insert ";;; this file uses opcodes which do not exist prior to\n"
+              ";;; XEmacs 19.14/GNU Emacs 19.29 or later."
+              ;; Have to check if emacs-version is bound so that this works
+              ;; in files loaded early in loadup.el.
+              "\n(if (and (boundp 'emacs-version)\n"
+              "\t (or (and (boundp 'epoch::version) epoch::version)\n"
+              "\t     (and (not (string-match \"XEmacs\" emacs-version))\n"
+              "\t          (string-lessp emacs-version \"19.29\"))\n"
+              "\t     (string-lessp emacs-version \"19.14\")))\n"
+              "    (error \"`"
+              ;; prin1-to-string is used to quote backslashes.
+              (substring (prin1-to-string (file-name-nondirectory filename))
+                         1 -1)
+              "' was compiled for XEmacs 19.14/Emacs 19.29 or later\"))\n\n"
+              )
+      ))
+
+  ;; back in the inbuffer; determine and set the coding system for the .elc
+  ;; file if under Mule.  If there are any extended characters in the
+  ;; input file, use `escape-quoted' to make sure that both binary and
+  ;; extended characters are output properly and distinguished properly.
+  ;; Otherwise, use `no-conversion' for maximum portability with non-Mule
+  ;; Emacsen.
+  (if (featurep 'mule)
+      (if (save-excursion
+           (set-buffer byte-compile-inbuffer)
+           (goto-char (point-min))
+           ;; mrb- There must be a better way than skip-chars-forward
+           (skip-chars-forward (concat (char-to-string 0) "-"
+                                       (char-to-string 255)))
+           (eq (point) (point-max)))
+         (setq buffer-file-coding-system 'no-conversion)
+       (insert "(require 'mule)\n;;;###coding system: escape-quoted\n")
+       (setq buffer-file-coding-system 'escape-quoted)
+       ;; Lazy loading not yet implemented for MULE files
+       ;; mrb - Fix this someday.
+       (save-excursion
+         (set-buffer byte-compile-inbuffer)
+         (setq byte-compile-dynamic nil
+               byte-compile-dynamic-docstrings nil))
+       ;;(external-debugging-output (prin1-to-string (buffer-local-variables))))
+       ))
+  )
+
+
+(defun byte-compile-output-file-form (form)
+  ;; writes the given form to the output buffer, being careful of docstrings
+  ;; in defun, defmacro, defvar, defconst and autoload because make-docfile is
+  ;; so amazingly stupid.
+  ;; defalias calls are output directly by byte-compile-file-form-defmumble;
+  ;; it does not pay to first build the defalias in defmumble and then parse
+  ;; it here.
+  (if (and (memq (car-safe form) '(defun defmacro defvar defconst autoload))
+          (stringp (nth 3 form)))
+      (byte-compile-output-docform nil nil '("\n(" 3 ")") form nil
+                                  (eq (car form) 'autoload))
+    (let ((print-escape-newlines t)
+         (print-length nil)
+         (print-level nil)
+         (print-readably t)    ; print #[] for bytecode, 'x for (quote x)
+         (print-gensym (if (and byte-compile-print-gensym
+                                (not byte-compile-emacs19-compatibility))
+                           t nil)))
+      (princ "\n" byte-compile-outbuffer)
+      (prin1 form byte-compile-outbuffer)
+      nil)))
+
+(defun byte-compile-output-docform (preface name info form specindex quoted)
+  "Print a form with a doc string.  INFO is (prefix doc-index postfix).
+If PREFACE and NAME are non-nil, print them too,
+before INFO and the FORM but after the doc string itself.
+If SPECINDEX is non-nil, it is the index in FORM
+of the function bytecode string.  In that case,
+we output that argument and the following argument (the constants vector)
+together, for lazy loading.
+QUOTED says that we have to put a quote before the
+list that represents a doc string reference.
+`autoload' needs that."
+  ;; We need to examine byte-compile-dynamic-docstrings
+  ;; in the input buffer (now current), not in the output buffer.
+  (let ((dynamic-docstrings byte-compile-dynamic-docstrings))
+    (set-buffer
+     (prog1 (current-buffer)
+       (set-buffer byte-compile-outbuffer)
+       (let (position)
+
+        ;; Insert the doc string, and make it a comment with #@LENGTH.
+        (and (>= (nth 1 info) 0)
+             dynamic-docstrings
+             (progn
+               ;; Make the doc string start at beginning of line
+               ;; for make-docfile's sake.
+               (insert "\n")
+               (setq position
+                     (byte-compile-output-as-comment
+                      (nth (nth 1 info) form) nil))
+               ;; If the doc string starts with * (a user variable),
+               ;; negate POSITION.
+               (if (and (stringp (nth (nth 1 info) form))
+                        (> (length (nth (nth 1 info) form)) 0)
+                        (char= (aref (nth (nth 1 info) form) 0) ?*))
+                   (setq position (- position)))))
+
+        (if preface
+            (progn
+              (insert preface)
+              (prin1 name byte-compile-outbuffer)))
+        (insert (car info))
+        (let ((print-escape-newlines t)
+              (print-readably t)       ; print #[] for bytecode, 'x for (quote x)
+              ;; Use a cons cell to say that we want
+              ;; print-gensym-alist not to be cleared between calls
+              ;; to print functions.
+              (print-gensym (if (and byte-compile-print-gensym
+                                     (not byte-compile-emacs19-compatibility))
+                                '(t) nil))
+              print-gensym-alist
+              (index 0))
+          (prin1 (car form) byte-compile-outbuffer)
+          (while (setq form (cdr form))
+            (setq index (1+ index))
+            (insert " ")
+            (cond ((and (numberp specindex) (= index specindex))
+                   (let ((position
+                          (byte-compile-output-as-comment
+                           (cons (car form) (nth 1 form))
+                           t)))
+                     (princ (format "(#$ . %d) nil" position)
+                            byte-compile-outbuffer)
+                     (setq form (cdr form))
+                     (setq index (1+ index))))
+                  ((= index (nth 1 info))
+                   (if position
+                       (princ (format (if quoted "'(#$ . %d)"  "(#$ . %d)")
+                                      position)
+                              byte-compile-outbuffer)
+                     (let ((print-escape-newlines nil))
+                       (goto-char (prog1 (1+ (point))
+                                    (prin1 (car form)
+                                           byte-compile-outbuffer)))
+                       (insert "\\\n")
+                       (goto-char (point-max)))))
+                  (t
+                   (prin1 (car form) byte-compile-outbuffer)))))
+        (insert (nth 2 info))))))
+  nil)
+
+(defvar for-effect) ; ## Kludge!  This should be an arg, not a special.
+
+(defun byte-compile-keep-pending (form &optional handler)
+  (if (memq byte-optimize '(t source))
+      (setq form (byte-optimize-form form t)))
+  (if handler
+      (let ((for-effect t))
+       ;; To avoid consing up monstrously large forms at load time, we split
+       ;; the output regularly.
+       (and (memq (car-safe form) '(fset defalias define-function))
+            (nthcdr 300 byte-compile-output)
+            (byte-compile-flush-pending))
+       (funcall handler form)
+       (if for-effect
+           (byte-compile-discard)))
+    (byte-compile-form form t))
+  nil)
+
+(defun byte-compile-flush-pending ()
+  (if byte-compile-output
+      (let ((form (byte-compile-out-toplevel t 'file)))
+       (cond ((eq (car-safe form) 'progn)
+              (mapcar 'byte-compile-output-file-form (cdr form)))
+             (form
+              (byte-compile-output-file-form form)))
+       (setq byte-compile-constants nil
+             byte-compile-variables nil
+             byte-compile-depth 0
+             byte-compile-maxdepth 0
+             byte-compile-output nil))))
+
+(defun byte-compile-file-form (form)
+  (let ((byte-compile-current-form nil)        ; close over this for warnings.
+       handler)
+    (cond
+     ((not (consp form))
+      (byte-compile-keep-pending form))
+     ((and (symbolp (car form))
+          (setq handler (get (car form) 'byte-hunk-handler)))
+      (cond ((setq form (funcall handler form))
+            (byte-compile-flush-pending)
+            (byte-compile-output-file-form form))))
+     ((eq form (setq form (macroexpand form byte-compile-macro-environment)))
+      (byte-compile-keep-pending form))
+     (t
+      (byte-compile-file-form form)))))
+
+;; Functions and variables with doc strings must be output separately,
+;; so make-docfile can recognise them.  Most other things can be output
+;; as byte-code.
+
+(put 'defsubst 'byte-hunk-handler 'byte-compile-file-form-defsubst)
+(defun byte-compile-file-form-defsubst (form)
+  (cond ((assq (nth 1 form) byte-compile-unresolved-functions)
+        (setq byte-compile-current-form (nth 1 form))
+        (byte-compile-warn "defsubst %s was used before it was defined"
+                           (nth 1 form))))
+  (byte-compile-file-form
+   (macroexpand form byte-compile-macro-environment))
+  ;; Return nil so the form is not output twice.
+  nil)
+
+(put 'autoload 'byte-hunk-handler 'byte-compile-file-form-autoload)
+(defun byte-compile-file-form-autoload (form)
+  ;;
+  ;; If this is an autoload of a macro, and all arguments are constants (that
+  ;; is, there is no hairy computation going on here) then evaluate the form
+  ;; at compile-time.  This is so that we can make use of macros which we
+  ;; have autoloaded from the file being compiled.  Normal function autoloads
+  ;; are not automatically evaluated at compile time, because there's not
+  ;; much point to it (so why bother cluttering up the compile-time namespace.)
+  ;;
+  ;; If this is an autoload of a function, then record its definition in the
+  ;; byte-compile-autoload-environment to suppress any `not known to be
+  ;; defined' warnings at the end of this file (this only matters for
+  ;; functions which are autoloaded and compiled in the same file, if the
+  ;; autoload already exists in the compilation environment, we wouldn't have
+  ;; warned anyway.)
+  ;;
+  (let* ((name (if (byte-compile-constp (nth 1 form))
+                  (eval (nth 1 form))))
+        ;; In v19, the 5th arg to autoload can be t, nil, 'macro, or 'keymap.
+        (macrop (and (byte-compile-constp (nth 5 form))
+                     (memq (eval (nth 5 form)) '(t macro))))
+;;      (functionp (and (byte-compile-constp (nth 5 form))
+;;                      (eq 'nil (eval (nth 5 form)))))
+        )
+    (if (and macrop
+            (let ((form form))
+              ;; all forms are constant
+              (while (if (setq form (cdr form))
+                         (byte-compile-constp (car form))))
+              (null form)))
+       ;; eval the macro autoload into the compilation enviroment
+       (eval form))
+
+    (if name
+       (let ((old (assq name byte-compile-autoload-environment)))
+         (cond (old
+                (if (memq 'redefine byte-compile-warnings)
+                    (byte-compile-warn "multiple autoloads for %s" name))
+                (setcdr old form))
+               (t
+                ;; We only use the names in the autoload environment, but
+                ;; it might be useful to have the bodies some day.
+                (setq byte-compile-autoload-environment
+                      (cons (cons name form)
+                            byte-compile-autoload-environment)))))))
+  ;;
+  ;; Now output the form.
+  (if (stringp (nth 3 form))
+      form
+    ;; No doc string, so we can compile this as a normal form.
+    (byte-compile-keep-pending form 'byte-compile-normal-call)))
+
+(put 'defvar   'byte-hunk-handler 'byte-compile-file-form-defvar)
+(put 'defconst 'byte-hunk-handler 'byte-compile-file-form-defvar)
+(defun byte-compile-file-form-defvar (form)
+  (if (> (length form) 4)
+      (byte-compile-warn "%s used with too many args (%s)"
+                        (car form) (nth 1 form)))
+  (if (and (> (length form) 3) (not (stringp (nth 3 form))))
+      (byte-compile-warn "Third arg to %s %s is not a string: %s"
+                        (car form) (nth 1 form) (nth 3 form)))
+  (if (null (nth 3 form))
+      ;; Since there is no doc string, we can compile this as a normal form,
+      ;; and not do a file-boundary.
+      (byte-compile-keep-pending form)
+    (if (memq 'free-vars byte-compile-warnings)
+       (setq byte-compile-bound-variables
+             (cons (cons (nth 1 form) byte-compile-global-bit)
+                   byte-compile-bound-variables)))
+    (cond ((consp (nth 2 form))
+          (setq form (copy-sequence form))
+          (setcar (cdr (cdr form))
+                  (byte-compile-top-level (nth 2 form) nil 'file))))
+
+    ;; The following turns out not to be necessary, since we emit a call to
+    ;; defvar, which can hack Vfile_domain by itself!
+    ;;
+    ;; If a file domain has been set, emit (put 'VAR 'variable-domain ...)
+    ;; after this defvar.
+;    (if byte-compile-file-domain
+;      (progn
+;        ;; Actually, this will emit the (put ...) before the (defvar ...)
+;        ;; but I don't think that can matter in this case.
+;        (byte-compile-keep-pending
+;         (list 'put (list 'quote (nth 1 form)) ''variable-domain
+;              (list 'quote byte-compile-file-domain)))))
+    form))
+
+(put 'require 'byte-hunk-handler 'byte-compile-file-form-eval-boundary)
+(defun byte-compile-file-form-eval-boundary (form)
+  (eval form)
+  (byte-compile-keep-pending form 'byte-compile-normal-call))
+
+(put 'progn 'byte-hunk-handler 'byte-compile-file-form-progn)
+(put 'prog1 'byte-hunk-handler 'byte-compile-file-form-progn)
+(put 'prog2 'byte-hunk-handler 'byte-compile-file-form-progn)
+(defun byte-compile-file-form-progn (form)
+  (mapcar 'byte-compile-file-form (cdr form))
+  ;; Return nil so the forms are not output twice.
+  nil)
+
+;; This handler is not necessary, but it makes the output from dont-compile
+;; and similar macros cleaner.
+(put 'eval 'byte-hunk-handler 'byte-compile-file-form-eval)
+(defun byte-compile-file-form-eval (form)
+  (if (eq (car-safe (nth 1 form)) 'quote)
+      (nth 1 (nth 1 form))
+    (byte-compile-keep-pending form)))
+
+(put 'defun 'byte-hunk-handler 'byte-compile-file-form-defun)
+(defun byte-compile-file-form-defun (form)
+  (byte-compile-file-form-defmumble form nil))
+
+(put 'defmacro 'byte-hunk-handler 'byte-compile-file-form-defmacro)
+(defun byte-compile-file-form-defmacro (form)
+  (byte-compile-file-form-defmumble form t))
+
+(defun byte-compile-compiled-obj-to-list (obj)
+  ;; #### this is fairly disgusting.  Rewrite the code instead
+  ;; so that it doesn't create compiled objects in the first place!
+  ;; Much better than creating them and then "uncreating" them
+  ;; like this.
+  (read (concat "("
+               (substring (let ((print-readably t)
+                                (print-gensym
+                                 (if (and byte-compile-print-gensym
+                                          (not byte-compile-emacs19-compatibility))
+                                     '(t) nil))
+                                (print-gensym-alist nil))
+                            (prin1-to-string obj))
+                          2 -1)
+               ")")))
+
+(defun byte-compile-file-form-defmumble (form macrop)
+  (let* ((name (car (cdr form)))
+        (this-kind (if macrop 'byte-compile-macro-environment
+                     'byte-compile-function-environment))
+        (that-kind (if macrop 'byte-compile-function-environment
+                     'byte-compile-macro-environment))
+        (this-one (assq name (symbol-value this-kind)))
+        (that-one (assq name (symbol-value that-kind)))
+        (byte-compile-free-references nil)
+        (byte-compile-free-assignments nil))
+
+    ;; When a function or macro is defined, add it to the call tree so that
+    ;; we can tell when functions are not used.
+    (if byte-compile-generate-call-tree
+       (or (assq name byte-compile-call-tree)
+           (setq byte-compile-call-tree
+                 (cons (list name nil nil) byte-compile-call-tree))))
+
+    (setq byte-compile-current-form name) ; for warnings
+    (if (memq 'redefine byte-compile-warnings)
+       (byte-compile-arglist-warn form macrop))
+    (if byte-compile-verbose
+       (message "Compiling %s... (%s)"
+                ;; #### filename used free
+                (if filename (file-name-nondirectory filename) "")
+                (nth 1 form)))
+    (cond (that-one
+          (if (and (memq 'redefine byte-compile-warnings)
+                   ;; hack hack: don't warn when compiling the stubs in
+                   ;; bytecomp-runtime...
+                   (not (assq (nth 1 form)
+                              byte-compile-initial-macro-environment)))
+              (byte-compile-warn
+                "%s defined multiple times, as both function and macro"
+                (nth 1 form)))
+          (setcdr that-one nil))
+         (this-one
+          (if (and (memq 'redefine byte-compile-warnings)
+                   ;; hack: don't warn when compiling the magic internal
+                   ;; byte-compiler macros in bytecomp-runtime.el...
+                   (not (assq (nth 1 form)
+                              byte-compile-initial-macro-environment)))
+              (byte-compile-warn "%s %s defined multiple times in this file"
+                                 (if macrop "macro" "function")
+                                 (nth 1 form))))
+         ((and (fboundp name)
+               (or (subrp (symbol-function name))
+                   (eq (car-safe (symbol-function name))
+                       (if macrop 'lambda 'macro))))
+          (if (memq 'redefine byte-compile-warnings)
+              (byte-compile-warn "%s %s being redefined as a %s"
+                                 (if (subrp (symbol-function name))
+                                     "subr"
+                                   (if macrop "function" "macro"))
+                                 (nth 1 form)
+                                 (if macrop "macro" "function")))
+          ;; shadow existing definition
+          (set this-kind
+               (cons (cons name nil) (symbol-value this-kind))))
+         )
+    (let ((body (nthcdr 3 form)))
+      (if (and (stringp (car body))
+              (symbolp (car-safe (cdr-safe body)))
+              (car-safe (cdr-safe body))
+              (stringp (car-safe (cdr-safe (cdr-safe body)))))
+         (byte-compile-warn "Probable `\"' without `\\' in doc string of %s"
+                            (nth 1 form))))
+    (let* ((new-one (byte-compile-lambda (cons 'lambda (nthcdr 2 form))))
+          (code (byte-compile-byte-code-maker new-one)))
+      (if this-one
+         (setcdr this-one new-one)
+       (set this-kind
+            (cons (cons name new-one) (symbol-value this-kind))))
+      (if (and (stringp (nth 3 form))
+              (eq 'quote (car-safe code))
+              (eq 'lambda (car-safe (nth 1 code))))
+         (cons (car form)
+               (cons name (cdr (nth 1 code))))
+       (byte-compile-flush-pending)
+       (if (not (stringp (nth 3 form)))
+           ;; No doc string.  Provide -1 as the "doc string index"
+           ;; so that no element will be treated as a doc string.
+           (byte-compile-output-docform
+            "\n(defalias '"
+            name
+            (cond ((atom code)
+                   (if macrop '(" '(macro . #[" -1 "])") '(" #[" -1 "]")))
+                  ((eq (car code) 'quote)
+                   (setq code new-one)
+                   (if macrop '(" '(macro " -1 ")") '(" '(" -1 ")")))
+                  ((if macrop '(" (cons 'macro (" -1 "))") '(" (" -1 ")"))))
+            ;; FSF just calls `(append code nil)' here but that relies
+            ;; on horrible C kludges in concat() that accept byte-
+            ;; compiled objects and pretend they're vectors.
+            (if (compiled-function-p code)
+                (byte-compile-compiled-obj-to-list code)
+              (append code nil))
+            (and (atom code) byte-compile-dynamic
+                 1)
+            nil)
+         ;; Output the form by hand, that's much simpler than having
+         ;; b-c-output-file-form analyze the defalias.
+         (byte-compile-output-docform
+          "\n(defalias '"
+          name
+          (cond ((atom code) ; compiled-function-p
+                 (if macrop '(" '(macro . #[" 4 "])") '(" #[" 4 "]")))
+                ((eq (car code) 'quote)
+                 (setq code new-one)
+                 (if macrop '(" '(macro " 2 ")") '(" '(" 2 ")")))
+                ((if macrop '(" (cons 'macro (" 5 "))") '(" (" 5 ")"))))
+          ;; The result of byte-compile-byte-code-maker is either a
+          ;; compiled-function object, or a list of some kind.  If it's
+          ;; not a cons, we must coerce it into a list of the elements
+          ;; to be printed to the file.
+          (if (consp code)
+              code
+            (nconc (list
+                    (compiled-function-arglist code)
+                    (compiled-function-instructions code)
+                    (compiled-function-constants code)
+                    (compiled-function-stack-depth code))
+                   (let ((doc (documentation code t)))
+                     (if doc (list doc)))
+                   (if (commandp code)
+                       (list (nth 1 (compiled-function-interactive code))))))
+          (and (atom code) byte-compile-dynamic
+               1)
+          nil))
+       (princ ")" byte-compile-outbuffer)
+       nil))))
+
+;; Print Lisp object EXP in the output file, inside a comment,
+;; and return the file position it will have.
+;; If QUOTED is non-nil, print with quoting; otherwise, print without quoting.
+(defun byte-compile-output-as-comment (exp quoted)
+  (let ((position (point)))
+    (set-buffer
+     (prog1 (current-buffer)
+       (set-buffer byte-compile-outbuffer)
+
+       ;; Insert EXP, and make it a comment with #@LENGTH.
+       (insert " ")
+       (if quoted
+          (prin1 exp byte-compile-outbuffer)
+        (princ exp byte-compile-outbuffer))
+       (goto-char position)
+       ;; Quote certain special characters as needed.
+       ;; get_doc_string in doc.c does the unquoting.
+       (while (search-forward "\^A" nil t)
+        (replace-match "\^A\^A" t t))
+       (goto-char position)
+       (while (search-forward "\000" nil t)
+        (replace-match "\^A0" t t))
+       (goto-char position)
+       (while (search-forward "\037" nil t)
+        (replace-match "\^A_" t t))
+       (goto-char (point-max))
+       (insert "\037")
+       (goto-char position)
+       (insert "#@" (format "%d" (- (point-max) position)))
+
+       ;; Save the file position of the object.
+       ;; Note we should add 1 to skip the space
+       ;; that we inserted before the actual doc string,
+       ;; and subtract 1 to convert from an 1-origin Emacs position
+       ;; to a file position; they cancel.
+       (setq position (point))
+       (goto-char (point-max))))
+    position))
+
+\f
+
+;; The `domain' declaration.  This is legal only at top-level in a file, and
+;; should generally be the first form in the file.  It is not legal inside
+;; function bodies.
+
+(put 'domain 'byte-hunk-handler 'byte-compile-file-form-domain)
+(defun byte-compile-file-form-domain (form)
+  (if (not (null (cdr (cdr form))))
+      (byte-compile-warn "domain used with too many arguments: %s" form))
+  (let ((domain (nth 1 form)))
+    (or (null domain)
+       (stringp domain)
+       (progn
+         (byte-compile-warn
+          "argument to `domain' declaration must be a literal string: %s"
+          form)
+         (setq domain nil)))
+    (setq byte-compile-file-domain domain))
+  (byte-compile-keep-pending form 'byte-compile-normal-call))
+
+(defun byte-compile-domain (form)
+  (byte-compile-warn "The `domain' declaration is legal only at top-level: %s"
+                    (let ((print-escape-newlines t)
+                          (print-level 4)
+                          (print-length 4))
+                      (prin1-to-string form)))
+  (byte-compile-normal-call
+   (list 'signal ''error
+        (list 'quote (list "`domain' used inside a function" form)))))
+
+;; This is part of bytecomp.el in 19.35:
+(put 'custom-declare-variable 'byte-hunk-handler
+     'byte-compile-file-form-custom-declare-variable)
+(defun byte-compile-file-form-custom-declare-variable (form)
+  (if (memq 'free-vars byte-compile-warnings)
+      (setq byte-compile-bound-variables
+           (cons (cons (nth 1 (nth 1 form))
+                       byte-compile-global-bit)
+                 byte-compile-bound-variables)))
+  form)
+
+\f
+;;;###autoload
+(defun byte-compile (form)
+  "If FORM is a symbol, byte-compile its function definition.
+If FORM is a lambda or a macro, byte-compile it as a function."
+  (displaying-byte-compile-warnings
+   (byte-compile-close-variables
+    (let* ((fun (if (symbolp form)
+                   (and (fboundp form) (symbol-function form))
+                 form))
+          (macro (eq (car-safe fun) 'macro)))
+      (if macro
+         (setq fun (cdr fun)))
+      (cond ((eq (car-safe fun) 'lambda)
+            (setq fun (if macro
+                          (cons 'macro (byte-compile-lambda fun))
+                        (byte-compile-lambda fun)))
+            (if (symbolp form)
+                (defalias form fun)
+              fun)))))))
+
+;;;###autoload
+(defun byte-compile-sexp (sexp &optional msg)
+  "Compile and return SEXP."
+  (displaying-byte-compile-warnings
+   (byte-compile-close-variables
+    (prog1
+       (byte-compile-top-level sexp)
+      (byte-compile-warn-about-unresolved-functions msg)))))
+
+;; Given a function made by byte-compile-lambda, make a form which produces it.
+(defun byte-compile-byte-code-maker (fun)
+  (cond
+   ;; ## atom is faster than compiled-func-p.
+   ((atom fun)                         ; compiled-function-p
+    fun)
+   ;; b-c-lambda didn't produce a compiled-function, so it must be a trivial
+   ;; function.
+   ((let (tmp)
+      (if (and (setq tmp (assq 'byte-code (cdr-safe (cdr fun))))
+              (null (cdr (memq tmp fun))))
+         ;; Generate a make-byte-code call.
+         (let* ((interactive (assq 'interactive (cdr (cdr fun)))))
+           (nconc (list 'make-byte-code
+                        (list 'quote (nth 1 fun)) ;arglist
+                        (nth 1 tmp)    ;bytes
+                        (nth 2 tmp)    ;consts
+                        (nth 3 tmp))   ;depth
+                  (cond ((stringp (nth 2 fun))
+                         (list (nth 2 fun))) ;doc
+                        (interactive
+                         (list nil)))
+                  (cond (interactive
+                         (list (if (or (null (nth 1 interactive))
+                                       (stringp (nth 1 interactive)))
+                                   (nth 1 interactive)
+                                 ;; Interactive spec is a list or a variable
+                                 ;; (if it is correct).
+                                 (list 'quote (nth 1 interactive))))))))
+       ;; a non-compiled function (probably trivial)
+       (list 'quote fun))))))
+
+;; Byte-compile a lambda-expression and return a valid function.
+;; The value is usually a compiled function but may be the original
+;; lambda-expression.
+(defun byte-compile-lambda (fun)
+  (or (eq 'lambda (car-safe fun))
+      (error "not a lambda -- %s" (prin1-to-string fun)))
+  (let* ((arglist (nth 1 fun))
+        (byte-compile-bound-variables
+         (let ((new-bindings
+                (mapcar (function (lambda (x)
+                                    (cons x byte-compile-arglist-bit)))
+                        (and (memq 'free-vars byte-compile-warnings)
+                             (delq '&rest (delq '&optional
+                                                (copy-sequence arglist)))))))
+           (nconc new-bindings
+                  (cons 'new-scope byte-compile-bound-variables))))
+        (body (cdr (cdr fun)))
+        (doc (if (stringp (car body))
+                 (prog1 (car body)
+                   (setq body (cdr body)))))
+        (int (assq 'interactive body)))
+    (let ((rest arglist))
+      (while rest
+       (cond ((not (symbolp (car rest)))
+              (byte-compile-warn "non-symbol in arglist: %s"
+                                 (prin1-to-string (car rest))))
+             ((memq (car rest) '(t nil))
+              (byte-compile-warn "constant in arglist: %s" (car rest)))
+             ((and (char= ?\& (aref (symbol-name (car rest)) 0))
+                   (not (memq (car rest) '(&optional &rest))))
+              (byte-compile-warn "unrecognised `&' keyword in arglist: %s"
+                                 (car rest))))
+       (setq rest (cdr rest))))
+    (cond (int
+          ;; Skip (interactive) if it is in front (the most usual location).
+          (if (eq int (car body))
+              (setq body (cdr body)))
+          (cond ((consp (cdr int))
+                 (if (cdr (cdr int))
+                     (byte-compile-warn "malformed interactive spec: %s"
+                                        (prin1-to-string int)))
+                 ;; If the interactive spec is a call to `list',
+                 ;; don't compile it, because `call-interactively'
+                 ;; looks at the args of `list'.
+                 (let ((form (nth 1 int)))
+                   (while (or (eq (car-safe form) 'let)
+                              (eq (car-safe form) 'let*)
+                              (eq (car-safe form) 'save-excursion))
+                     (while (consp (cdr form))
+                       (setq form (cdr form)))
+                     (setq form (car form)))
+                   (or (eq (car-safe form) 'list)
+                       (setq int (list 'interactive
+                                       (byte-compile-top-level (nth 1 int)))))))
+                ((cdr int)
+                 (byte-compile-warn "malformed interactive spec: %s"
+                                    (prin1-to-string int))))))
+    (let ((compiled (byte-compile-top-level (cons 'progn body) nil 'lambda)))
+      (if (memq 'unused-vars byte-compile-warnings)
+         ;; done compiling in this scope, warn now.
+         (byte-compile-warn-about-unused-variables))
+      (if (eq 'byte-code (car-safe compiled))
+         (apply 'make-byte-code
+                (append (list arglist)
+                        ;; byte-string, constants-vector, stack depth
+                        (cdr compiled)
+                        ;; optionally, the doc string.
+                        (if (or doc int)
+                            (list doc))
+                        ;; optionally, the interactive spec.
+                        (if int
+                            (list (nth 1 int)))))
+       (setq compiled
+             (nconc (if int (list int))
+                    (cond ((eq (car-safe compiled) 'progn) (cdr compiled))
+                          (compiled (list compiled)))))
+       (nconc (list 'lambda arglist)
+              (if (or doc (stringp (car compiled)))
+                  (cons doc (cond (compiled)
+                                  (body (list nil))))
+                compiled))))))
+
+(defun byte-compile-constants-vector ()
+  ;; Builds the constants-vector from the current variables and constants.
+  ;;   This modifies the constants from (const . nil) to (const . offset).
+  ;; To keep the byte-codes to look up the vector as short as possible:
+  ;;   First 6 elements are vars, as there are one-byte varref codes for those.
+  ;;   Next up to byte-constant-limit are constants, still with one-byte codes.
+  ;;   Next variables again, to get 2-byte codes for variable lookup.
+  ;;   The rest of the constants and variables need 3-byte byte-codes.
+  (let* ((i -1)
+        (rest (nreverse byte-compile-variables)) ; nreverse because the first
+        (other (nreverse byte-compile-constants)) ; vars often are used most.
+        ret tmp
+        (limits '(5                    ; Use the 1-byte varref codes,
+                  63  ; 1-constlim     ;  1-byte byte-constant codes,
+                  255                  ;  2-byte varref codes,
+                  65535))              ;  3-byte codes for the rest.
+        limit)
+    (while (or rest other)
+      (setq limit (car limits))
+      (while (and rest (not (eq i limit)))
+       (if (setq tmp (assq (car (car rest)) ret))
+           (setcdr (car rest) (cdr tmp))
+         (setcdr (car rest) (setq i (1+ i)))
+         (setq ret (cons (car rest) ret)))
+       (setq rest (cdr rest)))
+      (setq limits (cdr limits)
+           rest (prog1 other
+                  (setq other rest))))
+    (apply 'vector (nreverse (mapcar 'car ret)))))
+
+;; Given an expression FORM, compile it and return an equivalent byte-code
+;; expression (a call to the function byte-code).
+(defun byte-compile-top-level (form &optional for-effect output-type)
+  ;; OUTPUT-TYPE advises about how form is expected to be used:
+  ;;   'eval or nil    -> a single form,
+  ;;   'progn or t     -> a list of forms,
+  ;;   'lambda         -> body of a lambda,
+  ;;   'file           -> used at file-level.
+  (let ((byte-compile-constants nil)
+       (byte-compile-variables nil)
+       (byte-compile-tag-number 0)
+       (byte-compile-depth 0)
+       (byte-compile-maxdepth 0)
+       (byte-compile-output nil))
+    (if (memq byte-optimize '(t source))
+       (setq form (byte-optimize-form form for-effect)))
+    (while (and (eq (car-safe form) 'progn) (null (cdr (cdr form))))
+      (setq form (nth 1 form)))
+    (if (and (eq 'byte-code (car-safe form))
+            (not (memq byte-optimize '(t byte)))
+            (stringp (nth 1 form))
+            (vectorp (nth 2 form))
+            (natnump (nth 3 form)))
+       form
+      (byte-compile-form form for-effect)
+      (byte-compile-out-toplevel for-effect output-type))))
+
+(defun byte-compile-out-toplevel (&optional for-effect output-type)
+  (if for-effect
+      ;; The stack is empty. Push a value to be returned from (byte-code ..).
+      (if (eq (car (car byte-compile-output)) 'byte-discard)
+         (setq byte-compile-output (cdr byte-compile-output))
+       (byte-compile-push-constant
+        ;; Push any constant - preferably one which already is used, and
+        ;; a number or symbol - ie not some big sequence.  The return value
+        ;; isn't returned, but it would be a shame if some textually large
+        ;; constant was not optimized away because we chose to return it.
+        (and (not (assq nil byte-compile-constants)) ; Nil is often there.
+             (let ((tmp (reverse byte-compile-constants)))
+               (while (and tmp (not (or (symbolp (car (car tmp)))
+                                        (numberp (car (car tmp))))))
+                 (setq tmp (cdr tmp)))
+               (car (car tmp)))))))
+  (byte-compile-out 'byte-return 0)
+  (setq byte-compile-output (nreverse byte-compile-output))
+  (if (memq byte-optimize '(t byte))
+      (setq byte-compile-output
+           (byte-optimize-lapcode byte-compile-output for-effect)))
+
+  ;; Decompile trivial functions:
+  ;; only constants and variables, or a single funcall except in lambdas.
+  ;; Except for Lisp_Compiled objects, forms like (foo "hi")
+  ;; are still quicker than (byte-code "..." [foo "hi"] 2).
+  ;; Note that even (quote foo) must be parsed just as any subr by the
+  ;; interpreter, so quote should be compiled into byte-code in some contexts.
+  ;; What to leave uncompiled:
+  ;;   lambda  -> never.  we used to leave it uncompiled if the body was
+  ;;              a single atom, but that causes confusion if the docstring
+  ;;              uses the (file . pos) syntax.  Besides, now that we have
+  ;;              the Lisp_Compiled type, the compiled form is faster.
+  ;;   eval    -> atom, quote or (function atom atom atom)
+  ;;   progn   -> as <<same-as-eval>> or (progn <<same-as-eval>> atom)
+  ;;   file    -> as progn, but takes both quotes and atoms, and longer forms.
+  (let (rest
+       (maycall (not (eq output-type 'lambda))) ; t if we may make a funcall.
+       tmp body)
+    (cond
+     ;; #### This should be split out into byte-compile-nontrivial-function-p.
+     ((or (eq output-type 'lambda)
+         (nthcdr (if (eq output-type 'file) 50 8) byte-compile-output)
+         (assq 'TAG byte-compile-output) ; Not necessary, but speeds up a bit.
+         (not (setq tmp (assq 'byte-return byte-compile-output)))
+         (progn
+           (setq rest (nreverse
+                       (cdr (memq tmp (reverse byte-compile-output)))))
+           (while (cond
+                   ((memq (car (car rest)) '(byte-varref byte-constant))
+                    (setq tmp (car (cdr (car rest))))
+                    (if (if (eq (car (car rest)) 'byte-constant)
+                            (or (consp tmp)
+                                (and (symbolp tmp)
+                                     (not (keywordp tmp))
+                                     (not (memq tmp '(nil t))))))
+                        (if maycall
+                            (setq body (cons (list 'quote tmp) body)))
+                      (setq body (cons tmp body))))
+                   ((and maycall
+                         ;; Allow a funcall if at most one atom follows it.
+                         (null (nthcdr 3 rest))
+                         (setq tmp
+                               ;; XEmacs change for rms funs
+                               (or (and
+                                    (byte-compile-version-cond
+                                     byte-compile-emacs19-compatibility)
+                                    (get (car (car rest))
+                                         'byte-opcode19-invert))
+                                   (get (car (car rest))
+                                        'byte-opcode-invert)))
+                         (or (null (cdr rest))
+                             (and (memq output-type '(file progn t))
+                                  (cdr (cdr rest))
+                                  (eq (car (nth 1 rest)) 'byte-discard)
+                                  (progn (setq rest (cdr rest)) t))))
+                    (setq maycall nil) ; Only allow one real function call.
+                    (setq body (nreverse body))
+                    (setq body (list
+                                (if (and (eq tmp 'funcall)
+                                         (eq (car-safe (car body)) 'quote))
+                                    (cons (nth 1 (car body)) (cdr body))
+                                  (cons tmp body))))
+                    (or (eq output-type 'file)
+                        (not (delq nil (mapcar 'consp (cdr (car body))))))))
+             (setq rest (cdr rest)))
+           rest))
+      (let ((byte-compile-vector (byte-compile-constants-vector)))
+       (list 'byte-code (byte-compile-lapcode byte-compile-output)
+             byte-compile-vector byte-compile-maxdepth)))
+     ;; it's a trivial function
+     ((cdr body) (cons 'progn (nreverse body)))
+     ((car body)))))
+
+;; Given BODY, compile it and return a new body.
+(defun byte-compile-top-level-body (body &optional for-effect)
+  (setq body (byte-compile-top-level (cons 'progn body) for-effect t))
+  (cond ((eq (car-safe body) 'progn)
+        (cdr body))
+       (body
+        (list body))))
+\f
+;; This is the recursive entry point for compiling each subform of an
+;; expression.
+;; If for-effect is non-nil, byte-compile-form will output a byte-discard
+;; before terminating (ie no value will be left on the stack).
+;; A byte-compile handler may, when for-effect is non-nil, choose output code
+;; which does not leave a value on the stack, and then set for-effect to nil
+;; (to prevent byte-compile-form from outputting the byte-discard).
+;; If a handler wants to call another handler, it should do so via
+;; byte-compile-form, or take extreme care to handle for-effect correctly.
+;; (Use byte-compile-form-do-effect to reset the for-effect flag too.)
+;;
+(defun byte-compile-form (form &optional for-effect)
+  (setq form (macroexpand form byte-compile-macro-environment))
+  (cond ((not (consp form))
+        ;; XEmacs addition: keywordp
+        (cond ((or (not (symbolp form)) (keywordp form) (memq form '(nil t)))
+               (byte-compile-constant form))
+              ((and for-effect byte-compile-delete-errors)
+               (setq for-effect nil))
+              (t (byte-compile-variable-ref 'byte-varref form))))
+       ((symbolp (car form))
+        (let* ((fn (car form))
+               (handler (get fn 'byte-compile)))
+          (if (memq fn '(t nil))
+              (byte-compile-warn "%s called as a function" fn))
+          (if (and handler
+                   (or (not (byte-compile-version-cond
+                             byte-compile-emacs19-compatibility))
+                       (not (get (get fn 'byte-opcode) 'emacs20-opcode))))
+              (funcall handler form)
+            (if (memq 'callargs byte-compile-warnings)
+                (byte-compile-callargs-warn form))
+            (byte-compile-normal-call form))))
+       ((and (or (compiled-function-p (car form))
+                 (eq (car-safe (car form)) 'lambda))
+             ;; if the form comes out the same way it went in, that's
+             ;; because it was malformed, and we couldn't unfold it.
+             (not (eq form (setq form (byte-compile-unfold-lambda form)))))
+        (byte-compile-form form for-effect)
+        (setq for-effect nil))
+       ((byte-compile-normal-call form)))
+  (if for-effect
+      (byte-compile-discard)))
+
+(defun byte-compile-normal-call (form)
+  (if byte-compile-generate-call-tree
+      (byte-compile-annotate-call-tree form))
+  (byte-compile-push-constant (car form))
+  (mapcar 'byte-compile-form (cdr form)) ; wasteful, but faster.
+  (byte-compile-out 'byte-call (length (cdr form))))
+
+;; kludge added to XEmacs to work around the bogosities of a nonlexical lisp.
+(or (fboundp 'globally-boundp) (fset 'globally-boundp 'boundp))
+
+(defun byte-compile-variable-ref (base-op var &optional varbind-flags)
+  (if (or (not (symbolp var)) (keywordp var) (memq var '(nil t)))
+      (byte-compile-warn (if (eq base-op 'byte-varbind)
+                            "Attempt to let-bind %s %s"
+                          "Variable reference to %s %s")
+                        (if (symbolp var) "constant" "nonvariable")
+                        (prin1-to-string var))
+    (if (and (get var 'byte-obsolete-variable)
+            (memq 'obsolete byte-compile-warnings))
+       (let ((ob (get var 'byte-obsolete-variable)))
+         (byte-compile-warn "%s is an obsolete variable; %s" var
+                            (if (stringp ob)
+                                ob
+                              (format "use %s instead." ob)))))
+    (if (and (get var 'byte-compatible-variable)
+            (memq 'pedantic byte-compile-warnings))
+       (let ((ob (get var 'byte-compatible-variable)))
+         (byte-compile-warn "%s is provided for compatibility; %s" var
+                            (if (stringp ob)
+                                ob
+                              (format "use %s instead." ob)))))
+    (if (memq 'free-vars byte-compile-warnings)
+       (if (eq base-op 'byte-varbind)
+           (setq byte-compile-bound-variables
+                 (cons (cons var (or varbind-flags 0))
+                       byte-compile-bound-variables))
+         (or (globally-boundp var)
+             (let ((cell (assq var byte-compile-bound-variables)))
+               (if cell (setcdr cell
+                                (logior (cdr cell)
+                                        (if (eq base-op 'byte-varset)
+                                            byte-compile-assigned-bit
+                                          byte-compile-referenced-bit)))))
+             (if (eq base-op 'byte-varset)
+                 (or (memq var byte-compile-free-assignments)
+                     (progn
+                       (byte-compile-warn "assignment to free variable %s"
+                                          var)
+                       (setq byte-compile-free-assignments
+                             (cons var byte-compile-free-assignments))))
+               (or (memq var byte-compile-free-references)
+                   (progn
+                     (byte-compile-warn "reference to free variable %s" var)
+                     (setq byte-compile-free-references
+                           (cons var byte-compile-free-references)))))))))
+  (let ((tmp (assq var byte-compile-variables)))
+    (or tmp
+       (setq tmp (list var)
+             byte-compile-variables (cons tmp byte-compile-variables)))
+    (byte-compile-out base-op tmp)))
+
+(defmacro byte-compile-get-constant (const)
+  (` (or (if (stringp (, const))
+            (assoc (, const) byte-compile-constants)
+          (assq (, const) byte-compile-constants))
+        (car (setq byte-compile-constants
+                   (cons (list (, const)) byte-compile-constants))))))
+
+;; Use this when the value of a form is a constant.  This obeys for-effect.
+(defun byte-compile-constant (const)
+  (if for-effect
+      (setq for-effect nil)
+    (byte-compile-out 'byte-constant (byte-compile-get-constant const))))
+
+;; Use this for a constant that is not the value of its containing form.
+;; This ignores for-effect.
+(defun byte-compile-push-constant (const)
+  (let ((for-effect nil))
+    (inline (byte-compile-constant const))))
+
+\f
+;; Compile those primitive ordinary functions
+;; which have special byte codes just for speed.
+
+(defmacro byte-defop-compiler (function &optional compile-handler)
+  ;; add a compiler-form for FUNCTION.
+  ;; If function is a symbol, then the variable "byte-SYMBOL" must name
+  ;; the opcode to be used.  If function is a list, the first element
+  ;; is the function and the second element is the bytecode-symbol.
+  ;; COMPILE-HANDLER is the function to use to compile this byte-op, or
+  ;; may be the abbreviations 0, 1, 2, 3, 0-1, 1-2, 2-3, 0+1, 1+1, 2+1,
+  ;; 0-1+1, 1-2+1, 2-3+1, 0+2, or 1+2.  If it is nil, then the handler is
+  ;; "byte-compile-SYMBOL."
+  (let (opcode)
+    (if (symbolp function)
+       (setq opcode (intern (concat "byte-" (symbol-name function))))
+      (setq opcode (car (cdr function))
+           function (car function)))
+    (let ((fnform
+          (list 'put (list 'quote function) ''byte-compile
+                (list 'quote
+                      (or (cdr (assq compile-handler
+                                     '((0 . byte-compile-no-args)
+                                       (1 . byte-compile-one-arg)
+                                       (2 . byte-compile-two-args)
+                                       (3 . byte-compile-three-args)
+                                       (0-1 . byte-compile-zero-or-one-arg)
+                                       (1-2 . byte-compile-one-or-two-args)
+                                       (2-3 . byte-compile-two-or-three-args)
+                                       (0+1 . byte-compile-no-args-with-one-extra)
+                                       (1+1 . byte-compile-one-arg-with-one-extra)
+                                       (2+1 . byte-compile-two-args-with-one-extra)
+                                       (0-1+1 . byte-compile-zero-or-one-arg-with-one-extra)
+                                       (1-2+1 . byte-compile-one-or-two-args-with-one-extra)
+                                       (2-3+1 . byte-compile-two-or-three-args-with-one-extra)
+                                       (0+2 . byte-compile-no-args-with-two-extra)
+                                       (1+2 . byte-compile-one-arg-with-two-extra)
+
+                                       )))
+                          compile-handler
+                          (intern (concat "byte-compile-"
+                                          (symbol-name function))))))))
+      (if opcode
+         (list 'progn fnform
+               (list 'put (list 'quote function)
+                     ''byte-opcode (list 'quote opcode))
+               (list 'put (list 'quote opcode)
+                     ''byte-opcode-invert (list 'quote function)))
+       fnform))))
+
+(defmacro byte-defop-compiler20 (function &optional compile-handler)
+  ;; Just like byte-defop-compiler, but defines an opcode that will only
+  ;; be used when byte-compile-emacs19-compatibility is false.
+  (if (and (byte-compile-single-version)
+          byte-compile-emacs19-compatibility)
+      ;; #### instead of doing nothing, this should do some remprops,
+      ;; #### to protect against the case where a single-version compiler
+      ;; #### is loaded into a world that has contained a multi-version one.
+      nil
+    (list 'progn
+      (list 'put
+       (list 'quote
+         (or (car (cdr-safe function))
+             (intern (concat "byte-"
+                       (symbol-name (or (car-safe function) function))))))
+       ''emacs20-opcode t)
+      (list 'byte-defop-compiler function compile-handler))))
+
+;; XEmacs addition:
+(defmacro byte-defop-compiler-rmsfun (function &optional compile-handler)
+  ;; for functions like `eq' that compile into different opcodes depending
+  ;; on the Emacs version: byte-old-eq for v19, byte-eq for v20.
+  (let ((opcode (intern (concat "byte-" (symbol-name function))))
+       (opcode19 (intern (concat "byte-old-" (symbol-name function))))
+       (fnform
+        (list 'put (list 'quote function) ''byte-compile
+              (list 'quote
+                    (or (cdr (assq compile-handler
+                                   '((2 . byte-compile-two-args-19->20)
+                                     )))
+                        compile-handler
+                        (intern (concat "byte-compile-"
+                                        (symbol-name function))))))))
+    (list 'progn fnform
+         (list 'put (list 'quote function)
+               ''byte-opcode (list 'quote opcode))
+         (list 'put (list 'quote function)
+               ''byte-opcode19 (list 'quote opcode19))
+         (list 'put (list 'quote opcode)
+               ''byte-opcode-invert (list 'quote function))
+         (list 'put (list 'quote opcode19)
+               ''byte-opcode19-invert (list 'quote function)))))
+
+(defmacro byte-defop-compiler-1 (function &optional compile-handler)
+  (list 'byte-defop-compiler (list function nil) compile-handler))
+
+\f
+(put 'byte-call 'byte-opcode-invert 'funcall)
+(put 'byte-list1 'byte-opcode-invert 'list)
+(put 'byte-list2 'byte-opcode-invert 'list)
+(put 'byte-list3 'byte-opcode-invert 'list)
+(put 'byte-list4 'byte-opcode-invert 'list)
+(put 'byte-listN 'byte-opcode-invert 'list)
+(put 'byte-concat2 'byte-opcode-invert 'concat)
+(put 'byte-concat3 'byte-opcode-invert 'concat)
+(put 'byte-concat4 'byte-opcode-invert 'concat)
+(put 'byte-concatN 'byte-opcode-invert 'concat)
+(put 'byte-insertN 'byte-opcode-invert 'insert)
+
+;; How old is this stuff? -slb
+;(byte-defop-compiler (dot byte-point)         0+1)
+;(byte-defop-compiler (dot-max byte-point-max) 0+1)
+;(byte-defop-compiler (dot-min byte-point-min) 0+1)
+(byte-defop-compiler point             0+1)
+(byte-defop-compiler-rmsfun eq         2)
+(byte-defop-compiler point-max         0+1)
+(byte-defop-compiler point-min         0+1)
+(byte-defop-compiler following-char    0+1)
+(byte-defop-compiler preceding-char    0+1)
+(byte-defop-compiler current-column    0+1)
+;; FSF has special function here; generalized here by the 1+2 stuff.
+(byte-defop-compiler (indent-to-column byte-indent-to) 1+2)
+(byte-defop-compiler indent-to         1+2)
+(byte-defop-compiler-rmsfun equal      2)
+(byte-defop-compiler eolp              0+1)
+(byte-defop-compiler eobp              0+1)
+(byte-defop-compiler bolp              0+1)
+(byte-defop-compiler bobp              0+1)
+(byte-defop-compiler current-buffer    0)
+;;(byte-defop-compiler read-char       0) ;; obsolete
+(byte-defop-compiler-rmsfun memq       2)
+(byte-defop-compiler interactive-p     0)
+(byte-defop-compiler widen             0+1)
+(byte-defop-compiler end-of-line       0-1+1)
+(byte-defop-compiler forward-char      0-1+1)
+(byte-defop-compiler forward-line      0-1+1)
+(byte-defop-compiler symbolp           1)
+(byte-defop-compiler consp             1)
+(byte-defop-compiler stringp           1)
+(byte-defop-compiler listp             1)
+(byte-defop-compiler not               1)
+(byte-defop-compiler (null byte-not)   1)
+(byte-defop-compiler car               1)
+(byte-defop-compiler cdr               1)
+(byte-defop-compiler length            1)
+(byte-defop-compiler symbol-value      1)
+(byte-defop-compiler symbol-function   1)
+(byte-defop-compiler (1+ byte-add1)    1)
+(byte-defop-compiler (1- byte-sub1)    1)
+(byte-defop-compiler goto-char         1+1)
+(byte-defop-compiler char-after                0-1+1)
+(byte-defop-compiler set-buffer                1)
+;;(byte-defop-compiler set-mark                1) ;; obsolete
+(byte-defop-compiler forward-word      1+1)
+(byte-defop-compiler char-syntax       1+1)
+(byte-defop-compiler nreverse          1)
+(byte-defop-compiler car-safe          1)
+(byte-defop-compiler cdr-safe          1)
+(byte-defop-compiler numberp           1)
+(byte-defop-compiler integerp          1)
+(byte-defop-compiler skip-chars-forward     1-2+1)
+(byte-defop-compiler skip-chars-backward    1-2+1)
+(byte-defop-compiler (eql byte-eq)     2)
+(byte-defop-compiler20 old-eq          2)
+(byte-defop-compiler20 old-memq                2)
+(byte-defop-compiler cons              2)
+(byte-defop-compiler aref              2)
+(byte-defop-compiler (= byte-eqlsign)  byte-compile-one-or-more-args)
+(byte-defop-compiler (< byte-lss)      byte-compile-one-or-more-args)
+(byte-defop-compiler (> byte-gtr)      byte-compile-one-or-more-args)
+(byte-defop-compiler (<= byte-leq)     byte-compile-one-or-more-args)
+(byte-defop-compiler (>= byte-geq)     byte-compile-one-or-more-args)
+(byte-defop-compiler /=                        byte-compile-/=)
+(byte-defop-compiler get               2+1)
+(byte-defop-compiler nth               2)
+(byte-defop-compiler substring         2-3)
+(byte-defop-compiler (move-marker byte-set-marker) 2-3)
+(byte-defop-compiler set-marker                2-3)
+(byte-defop-compiler match-beginning   1)
+(byte-defop-compiler match-end         1)
+(byte-defop-compiler upcase            1+1)
+(byte-defop-compiler downcase          1+1)
+(byte-defop-compiler string=           2)
+(byte-defop-compiler string<           2)
+(byte-defop-compiler (string-equal byte-string=) 2)
+(byte-defop-compiler (string-lessp byte-string<) 2)
+(byte-defop-compiler20 old-equal       2)
+(byte-defop-compiler nthcdr            2)
+(byte-defop-compiler elt               2)
+(byte-defop-compiler20 old-member      2)
+(byte-defop-compiler20 old-assq                2)
+(byte-defop-compiler (rplaca byte-setcar) 2)
+(byte-defop-compiler (rplacd byte-setcdr) 2)
+(byte-defop-compiler setcar            2)
+(byte-defop-compiler setcdr            2)
+;; buffer-substring now has its own function.  This used to be
+;; 2+1, but now all args are optional.
+(byte-defop-compiler buffer-substring)
+(byte-defop-compiler delete-region     2+1)
+(byte-defop-compiler narrow-to-region  2+1)
+(byte-defop-compiler (% byte-rem)      2)
+(byte-defop-compiler aset              3)
+
+(byte-defop-compiler-rmsfun member     2)
+(byte-defop-compiler-rmsfun assq       2)
+
+(byte-defop-compiler max               byte-compile-associative)
+(byte-defop-compiler min               byte-compile-associative)
+(byte-defop-compiler (+ byte-plus)     byte-compile-associative)
+(byte-defop-compiler (* byte-mult)     byte-compile-associative)
+
+;;####(byte-defop-compiler move-to-column      1)
+(byte-defop-compiler-1 interactive byte-compile-noop)
+(byte-defop-compiler-1 domain byte-compile-domain)
+
+;; As of GNU Emacs 19.18 and Lucid Emacs 19.8, mod and % are different: `%'
+;; means integral remainder and may have a negative result; `mod' is always
+;; positive, and accepts floating point args.  All code which uses `mod' and
+;; requires the new interpretation must be compiled with bytecomp version 2.18
+;; or newer, or the emitted code will run the byte-code for `%' instead of an
+;; actual call to `mod'.  So be careful of compiling new code with an old
+;; compiler.  Note also that `%' is more efficient than `mod' because the
+;; former is byte-coded and the latter is not.
+;;(byte-defop-compiler (mod byte-rem) 2)
+
+\f
+(defun byte-compile-subr-wrong-args (form n)
+  (byte-compile-warn "%s called with %d arg%s, but requires %s"
+                    (car form) (length (cdr form))
+                    (if (= 1 (length (cdr form))) "" "s") n)
+  ;; get run-time wrong-number-of-args error.
+  (byte-compile-normal-call form))
+
+(defun byte-compile-no-args (form)
+  (if (not (= (length form) 1))
+      (byte-compile-subr-wrong-args form "none")
+    (byte-compile-out (get (car form) 'byte-opcode) 0)))
+
+(defun byte-compile-one-arg (form)
+  (if (not (= (length form) 2))
+      (byte-compile-subr-wrong-args form 1)
+    (byte-compile-form (car (cdr form)))  ;; Push the argument
+    (byte-compile-out (get (car form) 'byte-opcode) 0)))
+
+(defun byte-compile-two-args (form)
+  (if (not (= (length form) 3))
+      (byte-compile-subr-wrong-args form 2)
+    (byte-compile-form (car (cdr form)))  ;; Push the arguments
+    (byte-compile-form (nth 2 form))
+    (byte-compile-out (get (car form) 'byte-opcode) 0)))
+
+(defun byte-compile-three-args (form)
+  (if (not (= (length form) 4))
+      (byte-compile-subr-wrong-args form 3)
+    (byte-compile-form (car (cdr form)))  ;; Push the arguments
+    (byte-compile-form (nth 2 form))
+    (byte-compile-form (nth 3 form))
+    (byte-compile-out (get (car form) 'byte-opcode) 0)))
+
+(defun byte-compile-zero-or-one-arg (form)
+  (let ((len (length form)))
+    (cond ((= len 1) (byte-compile-one-arg (append form '(nil))))
+         ((= len 2) (byte-compile-one-arg form))
+         (t (byte-compile-subr-wrong-args form "0-1")))))
+
+(defun byte-compile-one-or-two-args (form)
+  (let ((len (length form)))
+    (cond ((= len 2) (byte-compile-two-args (append form '(nil))))
+         ((= len 3) (byte-compile-two-args form))
+         (t (byte-compile-subr-wrong-args form "1-2")))))
+
+(defun byte-compile-two-or-three-args (form)
+  (let ((len (length form)))
+    (cond ((= len 3) (byte-compile-three-args (append form '(nil))))
+         ((= len 4) (byte-compile-three-args form))
+         (t (byte-compile-subr-wrong-args form "2-3")))))
+
+;; from Ben Wing <ben@xemacs.org>: some inlined functions have extra
+;; optional args added to them in XEmacs 19.12.  Changing the byte
+;; interpreter to deal with these args would be wrong and cause
+;; incompatibility, so we generate non-inlined calls for those cases.
+;; Without the following functions, spurious warnings will be generated;
+;; however, they would still compile correctly because
+;; `byte-compile-subr-wrong-args' also converts the call to non-inlined.
+
+(defun byte-compile-no-args-with-one-extra (form)
+  (let ((len (length form)))
+    (cond ((= len 1) (byte-compile-no-args form))
+         ((= len 2) (byte-compile-normal-call form))
+         (t (byte-compile-subr-wrong-args form "0-1")))))
+
+(defun byte-compile-one-arg-with-one-extra (form)
+  (let ((len (length form)))
+    (cond ((= len 2) (byte-compile-one-arg form))
+         ((= len 3) (byte-compile-normal-call form))
+         (t (byte-compile-subr-wrong-args form "1-2")))))
+
+(defun byte-compile-two-args-with-one-extra (form)
+  (let ((len (length form)))
+    (cond ((= len 3) (byte-compile-two-args form))
+         ((= len 4) (byte-compile-normal-call form))
+         (t (byte-compile-subr-wrong-args form "2-3")))))
+
+(defun byte-compile-zero-or-one-arg-with-one-extra (form)
+  (let ((len (length form)))
+    (cond ((= len 1) (byte-compile-one-arg (append form '(nil))))
+         ((= len 2) (byte-compile-one-arg form))
+         ((= len 3) (byte-compile-normal-call form))
+         (t (byte-compile-subr-wrong-args form "0-2")))))
+
+(defun byte-compile-one-or-two-args-with-one-extra (form)
+  (let ((len (length form)))
+    (cond ((= len 2) (byte-compile-two-args (append form '(nil))))
+         ((= len 3) (byte-compile-two-args form))
+         ((= len 4) (byte-compile-normal-call form))
+         (t (byte-compile-subr-wrong-args form "1-3")))))
+
+(defun byte-compile-two-or-three-args-with-one-extra (form)
+  (let ((len (length form)))
+    (cond ((= len 3) (byte-compile-three-args (append form '(nil))))
+         ((= len 4) (byte-compile-three-args form))
+         ((= len 5) (byte-compile-normal-call form))
+         (t (byte-compile-subr-wrong-args form "2-4")))))
+
+(defun byte-compile-no-args-with-two-extra (form)
+  (let ((len (length form)))
+    (cond ((= len 1) (byte-compile-no-args form))
+         ((or (= len 2) (= len 3)) (byte-compile-normal-call form))
+         (t (byte-compile-subr-wrong-args form "0-2")))))
+
+(defun byte-compile-one-arg-with-two-extra (form)
+  (let ((len (length form)))
+    (cond ((= len 2) (byte-compile-one-arg form))
+         ((or (= len 3) (= len 4)) (byte-compile-normal-call form))
+         (t (byte-compile-subr-wrong-args form "1-3")))))
+
+;; XEmacs: used for functions that have a different opcode in v19 than v20.
+;; this includes `eq', `equal', and other old-ified functions.
+(defun byte-compile-two-args-19->20 (form)
+  (if (not (= (length form) 3))
+      (byte-compile-subr-wrong-args form 2)
+    (byte-compile-form (car (cdr form)))  ;; Push the arguments
+    (byte-compile-form (nth 2 form))
+    (if (byte-compile-version-cond byte-compile-emacs19-compatibility)
+       (byte-compile-out (get (car form) 'byte-opcode19) 0)
+      (byte-compile-out (get (car form) 'byte-opcode) 0))))
+
+(defun byte-compile-noop (form)
+  (byte-compile-constant nil))
+
+(defun byte-compile-discard ()
+  (byte-compile-out 'byte-discard 0))
+
+
+;; Compile a function that accepts one or more args and is right-associative.
+;; We do it by left-associativity so that the operations
+;; are done in the same order as in interpreted code.
+(defun byte-compile-associative (form)
+  (if (cdr form)
+      (let ((opcode (get (car form) 'byte-opcode))
+           (args (copy-sequence (cdr form))))
+       (byte-compile-form (car args))
+       (setq args (cdr args))
+       (while args
+         (byte-compile-form (car args))
+         (byte-compile-out opcode 0)
+         (setq args (cdr args))))
+    (byte-compile-constant (eval form))))
+
+\f
+;; more complicated compiler macros
+
+(byte-defop-compiler list)
+(byte-defop-compiler concat)
+(byte-defop-compiler fset)
+(byte-defop-compiler insert)
+(byte-defop-compiler-1 function byte-compile-function-form)
+(byte-defop-compiler-1 - byte-compile-minus)
+(byte-defop-compiler (/ byte-quo) byte-compile-quo)
+(byte-defop-compiler nconc)
+(byte-defop-compiler-1 beginning-of-line)
+
+(defun byte-compile-one-or-more-args (form)
+  (let ((len (length form)))
+    (cond ((= len 1) (byte-compile-subr-wrong-args form "1 or more"))
+         ((= len 2) (byte-compile-constant t))
+         ((= len 3) (byte-compile-two-args form))
+         (t (byte-compile-normal-call form)))))
+
+(defun byte-compile-/= (form)
+  (let ((len (length form)))
+    (cond ((= len 1) (byte-compile-subr-wrong-args form "1 or more"))
+         ((= len 2) (byte-compile-constant t))
+         ;; optimize (/= X Y) to (not (= X Y))
+         ((= len 3) (byte-compile-form-do-effect `(not (= ,@(cdr form)))))
+         (t (byte-compile-normal-call form)))))
+
+(defun byte-compile-buffer-substring (form)
+  (let ((len (length form)))
+    ;; buffer-substring used to take exactly two args, but now takes 0-3.
+    ;; convert 0-2 to two args and use special bytecode operand.
+    ;; convert 3 args to a normal call.
+    (cond ((= len 1) (setq form (append form '(nil nil)))
+          (= len 2) (setq form (append form '(nil)))))
+    (cond ((= len 3) (byte-compile-two-args form))
+         ((= len 4) (byte-compile-normal-call form))
+         (t (byte-compile-subr-wrong-args form "0-3")))))
+
+(defun byte-compile-list (form)
+  (let ((count (length (cdr form))))
+    (cond ((= count 0)
+          (byte-compile-constant nil))
+         ((< count 5)
+          (mapcar 'byte-compile-form (cdr form))
+          (byte-compile-out
+           (aref [byte-list1 byte-list2 byte-list3 byte-list4] (1- count)) 0))
+         ((< count 256)
+          (mapcar 'byte-compile-form (cdr form))
+          (byte-compile-out 'byte-listN count))
+         (t (byte-compile-normal-call form)))))
+
+(defun byte-compile-concat (form)
+  (let ((count (length (cdr form))))
+    (cond ((and (< 1 count) (< count 5))
+          (mapcar 'byte-compile-form (cdr form))
+          (byte-compile-out
+           (aref [byte-concat2 byte-concat3 byte-concat4] (- count 2))
+           0))
+         ;; Concat of one arg is not a no-op if arg is not a string.
+         ((= count 0)
+          (byte-compile-form ""))
+         ((< count 256)
+          (mapcar 'byte-compile-form (cdr form))
+          (byte-compile-out 'byte-concatN count))
+         ((byte-compile-normal-call form)))))
+
+(defun byte-compile-minus (form)
+  (if (null (setq form (cdr form)))
+      (byte-compile-constant 0)
+    (byte-compile-form (car form))
+    (if (cdr form)
+       (while (setq form (cdr form))
+         (byte-compile-form (car form))
+         (byte-compile-out 'byte-diff 0))
+      (byte-compile-out 'byte-negate 0))))
+
+(defun byte-compile-quo (form)
+  (let ((len (length form)))
+    (cond ((<= len 2)
+          (byte-compile-subr-wrong-args form "2 or more"))
+         (t
+          (byte-compile-form (car (setq form (cdr form))))
+          (while (setq form (cdr form))
+            (byte-compile-form (car form))
+            (byte-compile-out 'byte-quo 0))))))
+
+(defun byte-compile-nconc (form)
+  (let ((len (length form)))
+    (cond ((= len 1)
+          (byte-compile-constant nil))
+         ((= len 2)
+          ;; nconc of one arg is a noop, even if that arg isn't a list.
+          (byte-compile-form (nth 1 form)))
+         (t
+          (byte-compile-form (car (setq form (cdr form))))
+          (while (setq form (cdr form))
+            (byte-compile-form (car form))
+            (byte-compile-out 'byte-nconc 0))))))
+
+(defun byte-compile-fset (form)
+  ;; warn about forms like (fset 'foo '(lambda () ...))
+  ;; (where the lambda expression is non-trivial...)
+  ;; Except don't warn if the first argument is 'make-byte-code, because
+  ;; I'm sick of getting mail asking me whether that warning is a problem.
+  (let ((fn (nth 2 form))
+       body)
+    (if (and (eq (car-safe fn) 'quote)
+            (eq (car-safe (setq fn (nth 1 fn))) 'lambda)
+            (not (eq (car-safe (cdr-safe (nth 1 form))) 'make-byte-code)))
+       (progn
+         (setq body (cdr (cdr fn)))
+         (if (stringp (car body)) (setq body (cdr body)))
+         (if (eq 'interactive (car-safe (car body))) (setq body (cdr body)))
+         (if (and (consp (car body))
+                  (not (eq 'byte-code (car (car body)))))
+             (byte-compile-warn
+      "A quoted lambda form is the second argument of fset.  This is probably
+     not what you want, as that lambda cannot be compiled.  Consider using
+     the syntax (function (lambda (...) ...)) instead.")))))
+  (byte-compile-two-args form))
+
+(defun byte-compile-funarg (form)
+  ;; (mapcar '(lambda (x) ..) ..) ==> (mapcar (function (lambda (x) ..)) ..)
+  ;; for cases where it's guaranteed that first arg will be used as a lambda.
+  (byte-compile-normal-call
+   (let ((fn (nth 1 form)))
+     (if (and (eq (car-safe fn) 'quote)
+             (eq (car-safe (nth 1 fn)) 'lambda))
+        (cons (car form)
+              (cons (cons 'function (cdr fn))
+                    (cdr (cdr form))))
+       form))))
+
+;; (function foo) must compile like 'foo, not like (symbol-function 'foo).
+;; Otherwise it will be incompatible with the interpreter,
+;; and (funcall (function foo)) will lose with autoloads.
+
+(defun byte-compile-function-form (form)
+  (byte-compile-constant
+   (cond ((symbolp (nth 1 form))
+         (nth 1 form))
+        ((byte-compile-lambda (nth 1 form))))))
+
+(defun byte-compile-insert (form)
+  (cond ((null (cdr form))
+        (byte-compile-constant nil))
+       ((<= (length form) 256)
+        (mapcar 'byte-compile-form (cdr form))
+        (if (cdr (cdr form))
+            (byte-compile-out 'byte-insertN (length (cdr form)))
+          (byte-compile-out 'byte-insert 0)))
+       ((memq t (mapcar 'consp (cdr (cdr form))))
+        (byte-compile-normal-call form))
+       ;; We can split it; there is no function call after inserting 1st arg.
+       (t
+        (while (setq form (cdr form))
+          (byte-compile-form (car form))
+          (byte-compile-out 'byte-insert 0)
+          (if (cdr form)
+              (byte-compile-discard))))))
+
+;; alas, the old (pre-19.12, and all existing versions of FSFmacs 19)
+;; byte compiler will generate incorrect code for
+;; (beginning-of-line nil buffer) because it buggily doesn't
+;; check the number of arguments passed to beginning-of-line.
+
+(defun byte-compile-beginning-of-line (form)
+  (let ((len (length form)))
+    (cond ((> len 3)
+          (byte-compile-subr-wrong-args form "0-2"))
+         ((or (= len 3) (not (byte-compile-constp (nth 1 form))))
+          (byte-compile-normal-call form))
+         (t
+          (byte-compile-form
+           (list 'forward-line
+                 (if (integerp (setq form (or (eval (nth 1 form)) 1)))
+                     (1- form)
+                   (byte-compile-warn
+                    "Non-numeric arg to beginning-of-line: %s" form)
+                   (list '1- (list 'quote form))))
+           t)
+          (byte-compile-constant nil)))))
+
+\f
+(byte-defop-compiler set)
+(byte-defop-compiler-1 setq)
+(byte-defop-compiler-1 set-default)
+(byte-defop-compiler-1 setq-default)
+
+(byte-defop-compiler-1 quote)
+(byte-defop-compiler-1 quote-form)
+
+(defun byte-compile-setq (form)
+  (let ((args (cdr form)))
+    (if args
+       (while args
+         (byte-compile-form (car (cdr args)))
+         (or for-effect (cdr (cdr args))
+             (byte-compile-out 'byte-dup 0))
+         (byte-compile-variable-ref 'byte-varset (car args))
+         (setq args (cdr (cdr args))))
+      ;; (setq), with no arguments.
+      (byte-compile-form nil for-effect))
+    (setq for-effect nil)))
+
+(defun byte-compile-set (form)
+  ;; Compile (set 'foo x) as (setq foo x) for trivially better code and so
+  ;; that we get applicable warnings.  Compile everything else (including
+  ;; malformed calls) like a normal 2-arg byte-coded function.
+  (if (or (not (eq (car-safe (nth 1 form)) 'quote))
+         (not (= (length form) 3))
+         (not (= (length (nth 1 form)) 2)))
+      (byte-compile-two-args form)
+    (byte-compile-setq (list 'setq (nth 1 (nth 1 form)) (nth 2 form)))))
+
+(defun byte-compile-setq-default (form)
+  (let ((rest (cdr form)))
+    ;; emit multiple calls to set-default if necessary
+    (while rest
+      (byte-compile-form
+       (list 'set-default (list 'quote (car rest)) (car (cdr rest)))
+       (not (null (cdr (cdr rest)))))
+      (setq rest (cdr (cdr rest))))))
+
+(defun byte-compile-set-default (form)
+  (let ((rest (cdr form)))
+    (if (cdr (cdr (cdr form)))
+       ;; emit multiple calls to set-default if necessary; all but last
+       ;; for-effect (this recurses.)
+       (while rest
+         (byte-compile-form
+          (list 'set-default (car rest) (car (cdr rest)))
+          (not (null (cdr rest))))
+         (setq rest (cdr (cdr rest))))
+      ;; else, this is the one-armed version
+      (let ((var (nth 1 form))
+           ;;(val (nth 2 form))
+           )
+       ;; notice calls to set-default/setq-default for variables which
+       ;; have not been declared with defvar/defconst.
+       (if (and (memq 'free-vars byte-compile-warnings)
+                (or (null var)
+                    (and (eq (car-safe var) 'quote)
+                         (= 2 (length var)))))
+           (let ((sym (nth 1 var))
+                 cell)
+             (or (and sym (symbolp sym) (globally-boundp sym))
+                 (and (setq cell (assq sym byte-compile-bound-variables))
+                      (setcdr cell (logior (cdr cell)
+                                           byte-compile-assigned-bit)))
+                 (memq sym byte-compile-free-assignments)
+                 (if (or (not (symbolp sym)) (memq sym '(t nil)))
+                     (progn
+                       (byte-compile-warn
+                        "Attempt to set-globally %s %s"
+                        (if (symbolp sym) "constant" "nonvariable")
+                        (prin1-to-string sym)))
+                   (progn
+                     (byte-compile-warn "assignment to free variable %s" sym)
+                     (setq byte-compile-free-assignments
+                           (cons sym byte-compile-free-assignments)))))))
+       ;; now emit a normal call to set-default (or possibly multiple calls)
+       (byte-compile-normal-call form)))))
+
+
+(defun byte-compile-quote (form)
+  (byte-compile-constant (car (cdr form))))
+
+(defun byte-compile-quote-form (form)
+  (byte-compile-constant (byte-compile-top-level (nth 1 form))))
+
+\f
+;;; control structures
+
+(defun byte-compile-body (body &optional for-effect)
+  (while (cdr body)
+    (byte-compile-form (car body) t)
+    (setq body (cdr body)))
+  (byte-compile-form (car body) for-effect))
+
+(proclaim-inline byte-compile-body-do-effect)
+(defun byte-compile-body-do-effect (body)
+  (byte-compile-body body for-effect)
+  (setq for-effect nil))
+
+(proclaim-inline byte-compile-form-do-effect)
+(defun byte-compile-form-do-effect (form)
+  (byte-compile-form form for-effect)
+  (setq for-effect nil))
+
+(byte-defop-compiler-1 inline byte-compile-progn)
+(byte-defop-compiler-1 progn)
+(byte-defop-compiler-1 prog1)
+(byte-defop-compiler-1 prog2)
+(byte-defop-compiler-1 if)
+(byte-defop-compiler-1 cond)
+(byte-defop-compiler-1 and)
+(byte-defop-compiler-1 or)
+(byte-defop-compiler-1 while)
+(byte-defop-compiler-1 funcall)
+(byte-defop-compiler-1 apply byte-compile-funarg)
+(byte-defop-compiler-1 mapcar byte-compile-funarg)
+(byte-defop-compiler-1 mapatoms byte-compile-funarg)
+(byte-defop-compiler-1 mapconcat byte-compile-funarg)
+(byte-defop-compiler-1 let)
+(byte-defop-compiler-1 let*)
+
+(defun byte-compile-progn (form)
+  (byte-compile-body-do-effect (cdr form)))
+
+(defun byte-compile-prog1 (form)
+  (byte-compile-form-do-effect (car (cdr form)))
+  (byte-compile-body (cdr (cdr form)) t))
+
+(defun byte-compile-prog2 (form)
+  (byte-compile-form (nth 1 form) t)
+  (byte-compile-form-do-effect (nth 2 form))
+  (byte-compile-body (cdr (cdr (cdr form))) t))
+
+(defmacro byte-compile-goto-if (cond discard tag)
+  (` (byte-compile-goto
+      (if (, cond)
+         (if (, discard) 'byte-goto-if-not-nil 'byte-goto-if-not-nil-else-pop)
+       (if (, discard) 'byte-goto-if-nil 'byte-goto-if-nil-else-pop))
+      (, tag))))
+
+(defun byte-compile-if (form)
+  (byte-compile-form (car (cdr form)))
+  (if (null (nthcdr 3 form))
+      ;; No else-forms
+      (let ((donetag (byte-compile-make-tag)))
+       (byte-compile-goto-if nil for-effect donetag)
+       (byte-compile-form (nth 2 form) for-effect)
+       (byte-compile-out-tag donetag))
+    (let ((donetag (byte-compile-make-tag)) (elsetag (byte-compile-make-tag)))
+      (byte-compile-goto 'byte-goto-if-nil elsetag)
+      (byte-compile-form (nth 2 form) for-effect)
+      (byte-compile-goto 'byte-goto donetag)
+      (byte-compile-out-tag elsetag)
+      (byte-compile-body (cdr (cdr (cdr form))) for-effect)
+      (byte-compile-out-tag donetag)))
+  (setq for-effect nil))
+
+(defun byte-compile-cond (clauses)
+  (let ((donetag (byte-compile-make-tag))
+       nexttag clause)
+    (while (setq clauses (cdr clauses))
+      (setq clause (car clauses))
+      (cond ((or (eq (car clause) t)
+                (and (eq (car-safe (car clause)) 'quote)
+                     (car-safe (cdr-safe (car clause)))))
+            ;; Unconditional clause
+            (setq clause (cons t clause)
+                  clauses nil))
+           ((cdr clauses)
+            (byte-compile-form (car clause))
+            (if (null (cdr clause))
+                ;; First clause is a singleton.
+                (byte-compile-goto-if t for-effect donetag)
+              (setq nexttag (byte-compile-make-tag))
+              (byte-compile-goto 'byte-goto-if-nil nexttag)
+              (byte-compile-body (cdr clause) for-effect)
+              (byte-compile-goto 'byte-goto donetag)
+              (byte-compile-out-tag nexttag)))))
+    ;; Last clause
+    (and (cdr clause) (not (eq (car clause) t))
+        (progn (byte-compile-form (car clause))
+               (byte-compile-goto-if nil for-effect donetag)
+               (setq clause (cdr clause))))
+    (byte-compile-body-do-effect clause)
+    (byte-compile-out-tag donetag)))
+
+(defun byte-compile-and (form)
+  (let ((failtag (byte-compile-make-tag))
+       (args (cdr form)))
+    (if (null args)
+       (byte-compile-form-do-effect t)
+      (while (cdr args)
+       (byte-compile-form (car args))
+       (byte-compile-goto-if nil for-effect failtag)
+       (setq args (cdr args)))
+      (byte-compile-form-do-effect (car args))
+      (byte-compile-out-tag failtag))))
+
+(defun byte-compile-or (form)
+  (let ((wintag (byte-compile-make-tag))
+       (args (cdr form)))
+    (if (null args)
+       (byte-compile-form-do-effect nil)
+      (while (cdr args)
+       (byte-compile-form (car args))
+       (byte-compile-goto-if t for-effect wintag)
+       (setq args (cdr args)))
+      (byte-compile-form-do-effect (car args))
+      (byte-compile-out-tag wintag))))
+
+(defun byte-compile-while (form)
+  (let ((endtag (byte-compile-make-tag))
+       (looptag (byte-compile-make-tag)))
+    (byte-compile-out-tag looptag)
+    (byte-compile-form (car (cdr form)))
+    (byte-compile-goto-if nil for-effect endtag)
+    (byte-compile-body (cdr (cdr form)) t)
+    (byte-compile-goto 'byte-goto looptag)
+    (byte-compile-out-tag endtag)
+    (setq for-effect nil)))
+
+(defun byte-compile-funcall (form)
+  (mapcar 'byte-compile-form (cdr form))
+  (byte-compile-out 'byte-call (length (cdr (cdr form)))))
+
+
+(defun byte-compile-let (form)
+  ;; First compute the binding values in the old scope.
+  (let ((varlist (car (cdr form))))
+    (while varlist
+      (if (consp (car varlist))
+         (byte-compile-form (car (cdr (car varlist))))
+       (byte-compile-push-constant nil))
+      (setq varlist (cdr varlist))))
+  (let ((byte-compile-bound-variables
+        (cons 'new-scope byte-compile-bound-variables))
+       (varlist (reverse (car (cdr form))))
+       (extra-flags
+        ;; If this let is of the form (let (...) (byte-code ...))
+        ;; then assume that it is the result of a transformation of
+        ;; ((lambda (...) (byte-code ... )) ...) and thus compile
+        ;; the variable bindings as if they were arglist bindings
+        ;; (which matters for what warnings.)
+        (if (eq 'byte-code (car-safe (nth 2 form)))
+            byte-compile-arglist-bit
+          nil)))
+    (while varlist
+      (byte-compile-variable-ref 'byte-varbind
+                                (if (consp (car varlist))
+                                    (car (car varlist))
+                                  (car varlist))
+                                extra-flags)
+      (setq varlist (cdr varlist)))
+    (byte-compile-body-do-effect (cdr (cdr form)))
+    (if (memq 'unused-vars byte-compile-warnings)
+       ;; done compiling in this scope, warn now.
+       (byte-compile-warn-about-unused-variables))
+    (byte-compile-out 'byte-unbind (length (car (cdr form))))))
+
+(defun byte-compile-let* (form)
+  (let ((byte-compile-bound-variables
+        (cons 'new-scope byte-compile-bound-variables))
+       (varlist (copy-sequence (car (cdr form)))))
+    (while varlist
+      (if (atom (car varlist))
+         (byte-compile-push-constant nil)
+       (byte-compile-form (car (cdr (car varlist))))
+       (setcar varlist (car (car varlist))))
+      (byte-compile-variable-ref 'byte-varbind (car varlist))
+      (setq varlist (cdr varlist)))
+    (byte-compile-body-do-effect (cdr (cdr form)))
+    (if (memq 'unused-vars byte-compile-warnings)
+       ;; done compiling in this scope, warn now.
+       (byte-compile-warn-about-unused-variables))
+    (byte-compile-out 'byte-unbind (length (car (cdr form))))))
+
+
+;;(byte-defop-compiler-1 /= byte-compile-negated)
+(byte-defop-compiler-1 atom byte-compile-negated)
+(byte-defop-compiler-1 nlistp byte-compile-negated)
+
+;;(put '/= 'byte-compile-negated-op '=)
+(put 'atom 'byte-compile-negated-op 'consp)
+(put 'nlistp 'byte-compile-negated-op 'listp)
+
+(defun byte-compile-negated (form)
+  (byte-compile-form-do-effect (byte-compile-negation-optimizer form)))
+
+;; Even when optimization is off, atom is optimized to (not (consp ...)).
+(defun byte-compile-negation-optimizer (form)
+  ;; an optimizer for forms where <form1> is less efficient than (not <form2>)
+  (list 'not
+    (cons (or (get (car form) 'byte-compile-negated-op)
+             (error
+              "Compiler error: `%s' has no `byte-compile-negated-op' property"
+              (car form)))
+         (cdr form))))
+\f
+;;; other tricky macro-like special-forms
+
+(byte-defop-compiler-1 catch)
+(byte-defop-compiler-1 unwind-protect)
+(byte-defop-compiler-1 condition-case)
+(byte-defop-compiler-1 save-excursion)
+(byte-defop-compiler-1 save-current-buffer)
+(byte-defop-compiler-1 save-restriction)
+(byte-defop-compiler-1 save-window-excursion)
+(byte-defop-compiler-1 with-output-to-temp-buffer)
+;; no track-mouse.
+
+(defun byte-compile-catch (form)
+  (byte-compile-form (car (cdr form)))
+  (byte-compile-push-constant
+    (byte-compile-top-level (cons 'progn (cdr (cdr form))) for-effect))
+  (byte-compile-out 'byte-catch 0))
+
+(defun byte-compile-unwind-protect (form)
+  (byte-compile-push-constant
+   (byte-compile-top-level-body (cdr (cdr form)) t))
+  (byte-compile-out 'byte-unwind-protect 0)
+  (byte-compile-form-do-effect (car (cdr form)))
+  (byte-compile-out 'byte-unbind 1))
+
+;;(defun byte-compile-track-mouse (form)
+;;  (byte-compile-form
+;;   (list
+;;    'funcall
+;;    (list 'quote
+;;         (list 'lambda nil
+;;               (cons 'track-mouse
+;;                     (byte-compile-top-level-body (cdr form))))))))
+
+(defun byte-compile-condition-case (form)
+  (let* ((var (nth 1 form))
+        (byte-compile-bound-variables
+         (if var
+             (cons (cons var 0)
+                   (cons 'new-scope byte-compile-bound-variables))
+           (cons 'new-scope byte-compile-bound-variables))))
+    (or (symbolp var)
+       (byte-compile-warn
+        "%s is not a variable-name or nil (in condition-case)"
+        (prin1-to-string var)))
+    (byte-compile-push-constant var)
+    (byte-compile-push-constant (byte-compile-top-level
+                                (nth 2 form) for-effect))
+    (let ((clauses (cdr (cdr (cdr form))))
+         compiled-clauses)
+      (while clauses
+       (let* ((clause (car clauses))
+               (condition (car clause)))
+          (cond ((not (or (symbolp condition)
+                         (and (listp condition)
+                              (let ((syms condition) (ok t))
+                                (while syms
+                                  (if (not (symbolp (car syms)))
+                                      (setq ok nil))
+                                  (setq syms (cdr syms)))
+                                ok))))
+                 (byte-compile-warn
+                   "%s is not a symbol naming a condition or a list of such (in condition-case)"
+                   (prin1-to-string condition)))
+;;                ((not (or (eq condition 't)
+;;                       (and (stringp (get condition 'error-message))
+;;                            (consp (get condition 'error-conditions)))))
+;;                 (byte-compile-warn
+;;                   "%s is not a known condition name (in condition-case)"
+;;                   condition))
+               )
+         (setq compiled-clauses
+               (cons (cons condition
+                           (byte-compile-top-level-body
+                            (cdr clause) for-effect))
+                     compiled-clauses)))
+       (setq clauses (cdr clauses)))
+      (byte-compile-push-constant (nreverse compiled-clauses)))
+    (if (memq 'unused-vars byte-compile-warnings)
+       ;; done compiling in this scope, warn now.
+       (byte-compile-warn-about-unused-variables))
+    (byte-compile-out 'byte-condition-case 0)))
+
+
+(defun byte-compile-save-excursion (form)
+  (byte-compile-out 'byte-save-excursion 0)
+  (byte-compile-body-do-effect (cdr form))
+  (byte-compile-out 'byte-unbind 1))
+
+(defun byte-compile-save-restriction (form)
+  (byte-compile-out 'byte-save-restriction 0)
+  (byte-compile-body-do-effect (cdr form))
+  (byte-compile-out 'byte-unbind 1))
+
+(defun byte-compile-save-current-buffer (form)
+  (if (byte-compile-version-cond byte-compile-emacs19-compatibility)
+      ;; `save-current-buffer' special form is not available in XEmacs 19.
+      (byte-compile-form
+       `(let ((_byte_compiler_save_buffer_emulation_closure_ (current-buffer)))
+         (unwind-protect
+             (progn ,@(cdr form))
+           (and (buffer-live-p _byte_compiler_save_buffer_emulation_closure_)
+                (set-buffer _byte_compiler_save_buffer_emulation_closure_)))))
+    (byte-compile-out 'byte-save-current-buffer 0)
+    (byte-compile-body-do-effect (cdr form))
+    (byte-compile-out 'byte-unbind 1)))
+
+(defun byte-compile-save-window-excursion (form)
+  (byte-compile-push-constant
+   (byte-compile-top-level-body (cdr form) for-effect))
+  (byte-compile-out 'byte-save-window-excursion 0))
+
+(defun byte-compile-with-output-to-temp-buffer (form)
+  (byte-compile-form (car (cdr form)))
+  (byte-compile-out 'byte-temp-output-buffer-setup 0)
+  (byte-compile-body (cdr (cdr form)))
+  (byte-compile-out 'byte-temp-output-buffer-show 0))
+
+\f
+;;; top-level forms elsewhere
+
+(byte-defop-compiler-1 defun)
+(byte-defop-compiler-1 defmacro)
+(byte-defop-compiler-1 defvar)
+(byte-defop-compiler-1 defconst byte-compile-defvar)
+(byte-defop-compiler-1 autoload)
+;; According to Mly this can go now that lambda is a macro
+;(byte-defop-compiler-1 lambda byte-compile-lambda-form)
+(byte-defop-compiler-1 defalias)
+(byte-defop-compiler-1 define-function)
+
+(defun byte-compile-defun (form)
+  ;; This is not used for file-level defuns with doc strings.
+  (byte-compile-two-args ; Use this to avoid byte-compile-fset's warning.
+   (list 'fset (list 'quote (nth 1 form))
+        (byte-compile-byte-code-maker
+         (byte-compile-lambda (cons 'lambda (cdr (cdr form)))))))
+  (byte-compile-discard)
+  (byte-compile-constant (nth 1 form)))
+
+(defun byte-compile-defmacro (form)
+  ;; This is not used for file-level defmacros with doc strings.
+  (byte-compile-body-do-effect
+   (list (list 'fset (list 'quote (nth 1 form))
+              (let ((code (byte-compile-byte-code-maker
+                           (byte-compile-lambda
+                            (cons 'lambda (cdr (cdr form)))))))
+                (if (eq (car-safe code) 'make-byte-code)
+                    (list 'cons ''macro code)
+                  (list 'quote (cons 'macro (eval code))))))
+        (list 'quote (nth 1 form)))))
+
+(defun byte-compile-defvar (form)
+  ;; This is not used for file-level defvar/consts with doc strings:
+  ;; byte-compile-file-form-defvar will be used in that case.
+  (let ((var (nth 1 form))
+       (value (nth 2 form))
+       (string (nth 3 form)))
+    (if (> (length form) 4)
+       (byte-compile-warn "%s used with too many args" (car form)))
+    (if (memq 'free-vars byte-compile-warnings)
+       (setq byte-compile-bound-variables
+             (cons (cons var byte-compile-global-bit)
+                   byte-compile-bound-variables)))
+    (byte-compile-body-do-effect
+     (list (if (cdr (cdr form))
+              (if (eq (car form) 'defconst)
+                  (list 'setq var value)
+                (list 'or (list 'boundp (list 'quote var))
+                      (list 'setq var value))))
+          ;; Put the defined variable in this library's load-history entry
+          ;; just as a real defvar would.
+          (list 'setq 'current-load-list
+                (list 'cons (list 'quote var)
+                      'current-load-list))
+          (if string
+              (list 'put (list 'quote var) ''variable-documentation string))
+          (list 'quote var)))))
+
+(defun byte-compile-autoload (form)
+  (and (byte-compile-constp (nth 1 form))
+       (byte-compile-constp (nth 5 form))
+       (memq (eval (nth 5 form)) '(t macro))  ; macro-p
+       (not (fboundp (eval (nth 1 form))))
+       (byte-compile-warn
+       "The compiler ignores `autoload' except at top level.  You should
+     probably put the autoload of the macro `%s' at top-level."
+       (eval (nth 1 form))))
+  (byte-compile-normal-call form))
+
+;; Lambda's in valid places are handled as special cases by various code.
+;; The ones that remain are errors.
+;; According to Mly this can go now that lambda is a macro
+;(defun byte-compile-lambda-form (form)
+;  (byte-compile-warn
+;   "`lambda' used in function position is invalid: probably you mean #'%s"
+;   (let ((print-escape-newlines t)
+;       (print-level 4)
+;       (print-length 4))
+;     (prin1-to-string form)))
+;  (byte-compile-normal-call
+;   (list 'signal ''error
+;       (list 'quote (list "`lambda' used in function position" form)))))
+
+;; Compile normally, but deal with warnings for the function being defined.
+(defun byte-compile-defalias (form)
+  (if (and (consp (cdr form)) (consp (nth 1 form))
+          (eq (car (nth 1 form)) 'quote)
+          (consp (cdr (nth 1 form)))
+          (symbolp (nth 1 (nth 1 form)))
+          (consp (nthcdr 2 form))
+          (consp (nth 2 form))
+          (eq (car (nth 2 form)) 'quote)
+          (consp (cdr (nth 2 form)))
+          (symbolp (nth 1 (nth 2 form))))
+      (progn
+       (byte-compile-defalias-warn (nth 1 (nth 1 form))
+                                   (nth 1 (nth 2 form)))
+       (setq byte-compile-function-environment
+             (cons (cons (nth 1 (nth 1 form))
+                         (nth 1 (nth 2 form)))
+                   byte-compile-function-environment))))
+  (byte-compile-normal-call form))
+
+(defun byte-compile-define-function (form)
+  (byte-compile-defalias form))
+
+;; Turn off warnings about prior calls to the function being defalias'd.
+;; This could be smarter and compare those calls with
+;; the function it is being aliased to.
+(defun byte-compile-defalias-warn (new alias)
+  (let ((calls (assq new byte-compile-unresolved-functions)))
+    (if calls
+       (setq byte-compile-unresolved-functions
+             (delq calls byte-compile-unresolved-functions)))))
+\f
+;;; tags
+
+;; Note: Most operations will strip off the 'TAG, but it speeds up
+;; optimization to have the 'TAG as a part of the tag.
+;; Tags will be (TAG . (tag-number . stack-depth)).
+(defun byte-compile-make-tag ()
+  (list 'TAG (setq byte-compile-tag-number (1+ byte-compile-tag-number))))
+
+
+(defun byte-compile-out-tag (tag)
+  (setq byte-compile-output (cons tag byte-compile-output))
+  (if (cdr (cdr tag))
+      (progn
+       ;; ## remove this someday
+       (and byte-compile-depth
+         (not (= (cdr (cdr tag)) byte-compile-depth))
+         (error "Compiler bug: depth conflict at tag %d" (car (cdr tag))))
+       (setq byte-compile-depth (cdr (cdr tag))))
+    (setcdr (cdr tag) byte-compile-depth)))
+
+(defun byte-compile-goto (opcode tag)
+  (setq byte-compile-output (cons (cons opcode tag) byte-compile-output))
+  (setcdr (cdr tag) (if (memq opcode byte-goto-always-pop-ops)
+                       (1- byte-compile-depth)
+                     byte-compile-depth))
+  (setq byte-compile-depth (and (not (eq opcode 'byte-goto))
+                               (1- byte-compile-depth))))
+
+(defun byte-compile-out (opcode offset)
+  (setq byte-compile-output (cons (cons opcode offset) byte-compile-output))
+  (cond ((eq opcode 'byte-call)
+        (setq byte-compile-depth (- byte-compile-depth offset)))
+       ((eq opcode 'byte-return)
+        ;; This is actually an unnecessary case, because there should be
+        ;; no more opcodes behind byte-return.
+        (setq byte-compile-depth nil))
+       (t
+        (setq byte-compile-depth (+ byte-compile-depth
+                                    (or (aref byte-stack+-info
+                                              (symbol-value opcode))
+                                        (- (1- offset))))
+              byte-compile-maxdepth (max byte-compile-depth
+                                         byte-compile-maxdepth))))
+  ;;(if (< byte-compile-depth 0) (error "Compiler error: stack underflow"))
+  )
+
+\f
+;;; call tree stuff
+
+(defun byte-compile-annotate-call-tree (form)
+  (let (entry)
+    ;; annotate the current call
+    (if (setq entry (assq (car form) byte-compile-call-tree))
+       (or (memq byte-compile-current-form (nth 1 entry)) ;callers
+           (setcar (cdr entry)
+                   (cons byte-compile-current-form (nth 1 entry))))
+      (setq byte-compile-call-tree
+           (cons (list (car form) (list byte-compile-current-form) nil)
+                 byte-compile-call-tree)))
+    ;; annotate the current function
+    (if (setq entry (assq byte-compile-current-form byte-compile-call-tree))
+       (or (memq (car form) (nth 2 entry)) ;called
+           (setcar (cdr (cdr entry))
+                   (cons (car form) (nth 2 entry))))
+      (setq byte-compile-call-tree
+           (cons (list byte-compile-current-form nil (list (car form)))
+                 byte-compile-call-tree)))
+    ))
+
+;; Renamed from byte-compile-report-call-tree
+;; to avoid interfering with completion of byte-compile-file.
+;;;###autoload
+(defun display-call-tree (&optional filename)
+  "Display a call graph of a specified file.
+This lists which functions have been called, what functions called
+them, and what functions they call.  The list includes all functions
+whose definitions have been compiled in this Emacs session, as well as
+all functions called by those functions.
+
+The call graph does not include macros, inline functions, or
+primitives that the byte-code interpreter knows about directly \(eq,
+cons, etc.\).
+
+The call tree also lists those functions which are not known to be called
+\(that is, to which no calls have been compiled\), and which cannot be
+invoked interactively."
+  (interactive)
+  (message "Generating call tree...")
+  (with-output-to-temp-buffer "*Call-Tree*"
+    (set-buffer "*Call-Tree*")
+    (erase-buffer)
+    (message "Generating call tree... (sorting on %s)"
+            byte-compile-call-tree-sort)
+    (insert "Call tree for "
+           (cond ((null byte-compile-current-file) (or filename "???"))
+                 ((stringp byte-compile-current-file)
+                  byte-compile-current-file)
+                 (t (buffer-name byte-compile-current-file)))
+           " sorted on "
+           (prin1-to-string byte-compile-call-tree-sort)
+           ":\n\n")
+    (if byte-compile-call-tree-sort
+       (setq byte-compile-call-tree
+             (sort byte-compile-call-tree
+                   (cond
+                    ((eq byte-compile-call-tree-sort 'callers)
+                     (function (lambda (x y) (< (length (nth 1 x))
+                                                (length (nth 1 y))))))
+                    ((eq byte-compile-call-tree-sort 'calls)
+                     (function (lambda (x y) (< (length (nth 2 x))
+                                                (length (nth 2 y))))))
+                    ((eq byte-compile-call-tree-sort 'calls+callers)
+                     (function (lambda (x y) (< (+ (length (nth 1 x))
+                                                   (length (nth 2 x)))
+                                                (+ (length (nth 1 y))
+                                                   (length (nth 2 y)))))))
+                    ((eq byte-compile-call-tree-sort 'name)
+                     (function (lambda (x y) (string< (car x)
+                                                      (car y)))))
+                    (t (error
+                     "`byte-compile-call-tree-sort': `%s' - unknown sort mode"
+                              byte-compile-call-tree-sort))))))
+    (message "Generating call tree...")
+    (let ((rest byte-compile-call-tree)
+         (b (current-buffer))
+         f p
+         callers calls)
+      (while rest
+       (prin1 (car (car rest)) b)
+       (setq callers (nth 1 (car rest))
+             calls (nth 2 (car rest)))
+       (insert "\t"
+         (cond ((not (fboundp (setq f (car (car rest)))))
+                (if (null f)
+                    " <top level>";; shouldn't insert nil then, actually -sk
+                  " <not defined>"))
+               ((subrp (setq f (symbol-function f)))
+                " <subr>")
+               ((symbolp f)
+                (format " ==> %s" f))
+               ((compiled-function-p f)
+                "<compiled function>")
+               ((not (consp f))
+                "<malformed function>")
+               ((eq 'macro (car f))
+                (if (or (compiled-function-p (cdr f))
+                        (assq 'byte-code (cdr (cdr (cdr f)))))
+                    " <compiled macro>"
+                  " <macro>"))
+               ((assq 'byte-code (cdr (cdr f)))
+                "<compiled lambda>")
+               ((eq 'lambda (car f))
+                "<function>")
+               (t "???"))
+         (format " (%d callers + %d calls = %d)"
+                 ;; Does the optimizer eliminate common subexpressions?-sk
+                 (length callers)
+                 (length calls)
+                 (+ (length callers) (length calls)))
+         "\n")
+       (if callers
+           (progn
+             (insert "  called by:\n")
+             (setq p (point))
+             (insert "    " (if (car callers)
+                                (mapconcat 'symbol-name callers ", ")
+                              "<top level>"))
+             (let ((fill-prefix "    "))
+               (fill-region-as-paragraph p (point)))))
+       (if calls
+           (progn
+             (insert "  calls:\n")
+             (setq p (point))
+             (insert "    " (mapconcat 'symbol-name calls ", "))
+             (let ((fill-prefix "    "))
+               (fill-region-as-paragraph p (point)))))
+       (insert "\n")
+       (setq rest (cdr rest)))
+
+      (message "Generating call tree...(finding uncalled functions...)")
+      (setq rest byte-compile-call-tree)
+      (let ((uncalled nil))
+       (while rest
+         (or (nth 1 (car rest))
+             (null (setq f (car (car rest))))
+             (byte-compile-fdefinition f t)
+             (commandp (byte-compile-fdefinition f nil))
+             (setq uncalled (cons f uncalled)))
+         (setq rest (cdr rest)))
+       (if uncalled
+           (let ((fill-prefix "  "))
+             (insert "Noninteractive functions not known to be called:\n  ")
+             (setq p (point))
+             (insert (mapconcat 'symbol-name (nreverse uncalled) ", "))
+             (fill-region-as-paragraph p (point)))))
+      )
+    (message "Generating call tree...done.")
+    ))
+
+\f
+;;; by crl@newton.purdue.edu
+;;;  Only works noninteractively.
+;;;###autoload
+(defun batch-byte-compile ()
+  "Run `byte-compile-file' on the files remaining on the command line.
+Use this from the command line, with `-batch';
+it won't work in an interactive Emacs.
+Each file is processed even if an error occurred previously.
+For example, invoke \"xemacs -batch -f batch-byte-compile $emacs/ ~/*.el\""
+  ;; command-line-args-left is what is left of the command line (from
+  ;; startup.el)
+  (defvar command-line-args-left)      ;Avoid 'free variable' warning
+  (if (not noninteractive)
+      (error "`batch-byte-compile' is to be used only with -batch"))
+  (let ((error nil)
+       (debug-issue-ebola-notices 0)) ; Hack -slb
+    (while command-line-args-left
+      (if (file-directory-p (expand-file-name (car command-line-args-left)))
+         (let ((files (directory-files (car command-line-args-left)))
+               source dest)
+           (while files
+             (if (and (string-match emacs-lisp-file-regexp (car files))
+                      (not (auto-save-file-name-p (car files)))
+                      (setq source (expand-file-name
+                                    (car files)
+                                    (car command-line-args-left)))
+                      (setq dest (byte-compile-dest-file source))
+                      (file-exists-p dest)
+                      (file-newer-than-file-p source dest))
+                 (if (null (batch-byte-compile-1 source))
+                     (setq error t)))
+             (setq files (cdr files))))
+       (if (null (batch-byte-compile-1 (car command-line-args-left)))
+           (setq error t)))
+      (setq command-line-args-left (cdr command-line-args-left)))
+    (message "Done")
+    (kill-emacs (if error 1 0))))
+
+(defun batch-byte-compile-1 (file)
+  (condition-case err
+      (progn (byte-compile-file file) t)
+    (error
+     (princ ">>Error occurred processing ")
+     (princ file)
+     (princ ": ")
+     (if (fboundp 'display-error) ; XEmacs 19.8+
+        (display-error err nil)
+       (princ (or (get (car err) 'error-message) (car err)))
+       (mapcar '(lambda (x) (princ " ") (prin1 x)) (cdr err)))
+     (princ "\n")
+     nil)))
+
+;;;###autoload
+(defun batch-byte-recompile-directory-norecurse ()
+  "Same as `batch-byte-recompile-directory' but without recursion."
+  (setq byte-recompile-directory-recursively nil)
+  (batch-byte-recompile-directory))
+
+;;;###autoload
+(defun batch-byte-recompile-directory ()
+  "Runs `byte-recompile-directory' on the dirs remaining on the command line.
+Must be used only with `-batch', and kills Emacs on completion.
+For example, invoke `xemacs -batch -f batch-byte-recompile-directory .'."
+  ;; command-line-args-left is what is left of the command line (startup.el)
+  (defvar command-line-args-left)      ;Avoid 'free variable' warning
+  (if (not noninteractive)
+      (error "batch-byte-recompile-directory is to be used only with -batch"))
+  (or command-line-args-left
+      (setq command-line-args-left '(".")))
+  (let ((byte-recompile-directory-ignore-errors-p t)
+       (debug-issue-ebola-notices 0))
+    (while command-line-args-left
+      (byte-recompile-directory (car command-line-args-left))
+      (setq command-line-args-left (cdr command-line-args-left))))
+  (kill-emacs 0))
+
+(make-obsolete 'elisp-compile-defun 'compile-defun)
+(make-obsolete 'byte-compile-report-call-tree 'display-call-tree)
+
+;; other make-obsolete calls in obsolete.el.
+
+(provide 'byte-compile)
+(provide 'bytecomp)
+
+\f
+;;; report metering (see the hacks in bytecode.c)
+
+(if (boundp 'byte-code-meter)
+    (defun byte-compile-report-ops ()
+      (defvar byte-code-meter)
+      (with-output-to-temp-buffer "*Meter*"
+       (set-buffer "*Meter*")
+       (let ((i 0) n op off)
+         (while (< i 256)
+           (setq n (aref (aref byte-code-meter 0) i)
+                 off nil)
+           (if t ;(not (zerop n))
+               (progn
+                 (setq op i)
+                 (setq off nil)
+                 (cond ((< op byte-nth)
+                        (setq off (logand op 7))
+                        (setq op (logand op 248)))
+                       ((>= op byte-constant)
+                        (setq off (- op byte-constant)
+                              op byte-constant)))
+                 (setq op (aref byte-code-vector op))
+                 (insert (format "%-4d" i))
+                 (insert (symbol-name op))
+                 (if off (insert " [" (int-to-string off) "]"))
+                 (indent-to 40)
+                 (insert (int-to-string n) "\n")))
+           (setq i (1+ i)))))))
+
+\f
+;; To avoid "lisp nesting exceeds max-lisp-eval-depth" when bytecomp compiles
+;; itself, compile some of its most used recursive functions (at load time).
+;;
+(eval-when-compile
+ (or (compiled-function-p (symbol-function 'byte-compile-form))
+     (assq 'byte-code (symbol-function 'byte-compile-form))
+     (let ((byte-optimize nil) ; do it fast
+          (byte-compile-warnings nil))
+       (mapcar '(lambda (x)
+                 (or noninteractive (message "compiling %s..." x))
+                 (byte-compile x)
+                 (or noninteractive (message "compiling %s...done" x)))
+              '(byte-compile-normal-call
+                byte-compile-form
+                byte-compile-body
+                ;; Inserted some more than necessary, to speed it up.
+                byte-compile-top-level
+                byte-compile-out-toplevel
+                byte-compile-constant
+                byte-compile-variable-ref))))
+ nil)
+
+;;; bytecomp.el ends here
diff --git a/lisp/callers-of-rpt.el b/lisp/callers-of-rpt.el
new file mode 100644 (file)
index 0000000..8e9c7fc
--- /dev/null
@@ -0,0 +1,119 @@
+;;; callers-of-rpt.el --- generate call graph of lisp in XEmacs
+
+;; Copyright (C) 1997 Karl Hegbloom
+;; Copyright (C) 1997 Free Software Foundation, Inc.
+
+;; Author: Karl Hegbloom <karlheg@inetarena.com>
+;; Maintainer: XEmacs Development Team
+;; Keywords: internal
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: not in FSF
+
+;;; Commentary:
+
+;; Grep-2.1 is required.
+;; Modify the `xemacs-src-lisp-dir' and `xemacs-pkg-lisp-dir' to reflect
+;;  where these directories live on your local system.
+
+;;; Code:
+
+(defvar xemacs-src-lisp-dir "/usr/src/xemacs-20.0/lisp/"
+  "Where the XEmacs 20 lisp sources live.")
+(defvar xemacs-pkg-lisp-dir "/home/xemacs/packages/"
+  "Where the package lisp sources live.")
+
+;; (makunbound 'caller-table)
+(defconst caller-table (make-hashtable 256 #'equal)
+  "Hashtable keyed on the symbols being required.  Each element will
+  be a list of file-names of programs that depend on them.")
+
+;;./apel/atype.el:(require 'emu)
+;;./apel/atype.el:(require 'alist)
+;;./apel/emu-e19.el:       (require 'emu-xemacs))
+;;./apel/emu-e19.el:       (require 'emu-19)
+
+(defun make-caller-report ()
+  "Generate a simple report showing .el files that are `require'd by
+  other .el files, and the list of programs that depend on them."
+  (interactive)
+  (let ((cmd-out (get-buffer-create "*caller-report find-grep output*"))
+       (rpt (get-buffer-create "* caller report *"))
+       file-name)
+    (switch-to-buffer cmd-out)
+    (buffer-disable-undo cmd-out)
+    (set-syntax-table emacs-lisp-mode-syntax-table cmd-out)
+    (erase-buffer cmd-out)
+    (message "Running the find | grep...")
+    (sit-for 0)
+    ;; Note: Edit this part as needed for your installation.
+    (shell-command (concat
+                   ;; First the installed lisp
+                   "cd " xemacs-src-lisp-dir " ;"
+                   "grep -H '(require ' $(find -name '*.el' -print) |"
+                   " grep -v 'auto-autoloads\\.el\\|callers-of-rpt\\.el' |"
+                   " grep -v 'el:[ \t]*;\\|require load' ;" ; ones commented off, and cus-edit.el
+                   ;; Then the packages
+                   "cd " xemacs-pkg-lisp-dir " ;"
+                   "grep -H '(require ' $(find -name '*.el' -print) |"
+                   " grep -v 'auto-autoloads\\.el\\|callers-of-rpt\\.el' |"
+                   " grep -v 'el:[ \t]*;' ;" ; ones commented off
+                   )
+                  cmd-out)
+    (message "Running the find | grep... Done.")
+    (goto-char (point-min))
+    (sit-for 0)
+    (while (not (eobp))
+      (setq file-name (buffer-substring (+ (point) 2) ; skip the leading "./"
+                                       (progn
+                                         (skip-chars-forward "^:")
+                                         (point))
+                                       cmd-out))
+      (re-search-forward "(require '" nil t)
+      (let* ((key (buffer-substring (point) (progn
+                                             (skip-chars-forward "^) ")
+                                             (point))
+                                   cmd-out))
+            (lst (gethash key caller-table)))
+       (puthash key (add-to-list 'lst file-name) caller-table))
+      (forward-line 1)
+      (sit-for 0))
+    (switch-to-buffer rpt)
+    (buffer-disable-undo rpt)
+    (erase-buffer rpt)
+    (sit-for 0)
+    (let (keys)
+      (maphash #'(lambda (key val) (push key keys)) caller-table)
+      (setq keys (sort keys #'string<))
+      (mapc #'(lambda (key)
+               (insert (format "(%s '(" key))
+               (let ((lst (gethash key caller-table)))
+                 (while lst
+                   (insert (format "%S" (car lst)))
+                   (setq lst (cdr lst))
+                   (when lst (insert " "))))
+               (insert "))\n")
+               (sit-for 0))
+           keys))))
+
+(byte-compile 'make-caller-report)
+(delete-other-windows)
+(make-caller-report)
+
+;;; callers-of-rpt.el ends here
diff --git a/lisp/check-features.el b/lisp/check-features.el
new file mode 100644 (file)
index 0000000..3aa0a82
--- /dev/null
@@ -0,0 +1,58 @@
+;;; check-features.el --- Do a sanity check on an XEmacs build
+
+;; Copyright (C) 1998 by Free Software Foundation, Inc.
+
+;; Author: SL Baur <steve@altair.xemacs.org>
+;; Keywords: internal
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Not in FSF
+
+;;; Commentary:
+
+;; This file is executed after a build to check that all lisp packages that
+;; need to be installed are.
+
+;;; Code:
+
+(require 'packages)
+
+(defvar build-error 0)
+
+(when (featurep 'tooltalk)
+  (condition-case nil
+      (package-require 'tooltalk 1.0)
+    (t (progn
+        (setq build-error 1)
+        (message "Error:  This XEmacs is built with tooltalk support but")
+        (message "does not have a tooltalk package installed.  Without the")
+        (message "tooltalk lisp package, Tooltalk support is broken.")))))
+
+(when (featurep 'sparcworks)
+  (condition-case nil
+      (package-require 'Sun 1.0)
+    (t (progn
+        (setq build-error 1)
+        (message "Error:  This XEmacs is built with sparcworks support but")
+        (message "does not have the Sun package installed.  Without the Sun")
+        (message "lisp package, Sparcworks support will be broken.")))))
+
+(kill-emacs build-error)
+
+;;; check-features.el ends here
diff --git a/lisp/cl-compat.el b/lisp/cl-compat.el
new file mode 100644 (file)
index 0000000..82ba291
--- /dev/null
@@ -0,0 +1,194 @@
+;;; cl-compat.el --- Common Lisp extensions for GNU Emacs Lisp (compatibility)
+
+;; Copyright (C) 1993 Free Software Foundation, Inc.
+
+;; Author: Dave Gillespie <daveg@synaptics.com>
+;; Version: 2.02
+;; Keywords: extensions
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: FSF 19.34.
+
+;;; Commentary:
+
+;; These are extensions to Emacs Lisp that provide a degree of
+;; Common Lisp compatibility, beyond what is already built-in
+;; in Emacs Lisp.
+;;
+;; This package was written by Dave Gillespie; it is a complete
+;; rewrite of Cesar Quiroz's original cl.el package of December 1986.
+;;
+;; This package works with Emacs 18, Emacs 19, and XEmacs/Lucid Emacs 19.
+;;
+;; Bug reports, comments, and suggestions are welcome!
+
+;; This file contains emulations of internal routines of the older
+;; CL package which users may have called directly from their code.
+;; Use (require 'cl-compat) to get these routines.
+
+;; See cl.el for Change Log.
+
+
+;;; Code:
+
+;; Require at load-time, but not when compiling cl-compat.
+(or (featurep 'cl) (require 'cl))
+
+
+;;; Keyword routines not supported by new package.
+
+(defmacro defkeyword (x &optional doc)
+  (list* 'defconst x (list 'quote x) (and doc (list doc))))
+
+(defun keywordp (sym)
+  (and (symbolp sym) (eq (aref (symbol-name sym) 0) ?\:) (set sym sym)))
+
+(defun keyword-of (sym)
+  (or (keywordp sym) (keywordp (intern (format ":%s" sym)))))
+
+
+;;; Multiple values.  Note that the new package uses a different
+;;; convention for multiple values.  The following definitions
+;;; emulate the old convention; all function names have been changed
+;;; by capitalizing the first letter: Values, Multiple-value-*,
+;;; to avoid conflict with the new-style definitions in cl-macs.
+
+(put 'Multiple-value-bind  'lisp-indent-function 2)
+(put 'Multiple-value-setq  'lisp-indent-function 2)
+(put 'Multiple-value-call  'lisp-indent-function 1)
+(put 'Multiple-value-prog1 'lisp-indent-function 1)
+
+(defvar *mvalues-values* nil)
+
+(defun Values (&rest val-forms)
+  (setq *mvalues-values* val-forms)
+  (car val-forms))
+
+(defun Values-list (val-forms)
+  (apply 'values val-forms))
+
+(defmacro Multiple-value-list (form)
+  (list 'let* (list '(*mvalues-values* nil) (list '*mvalues-temp* form))
+       '(or (and (eq *mvalues-temp* (car *mvalues-values*)) *mvalues-values*)
+            (list *mvalues-temp*))))
+
+(defmacro Multiple-value-call (function &rest args)
+  (list 'apply function
+       (cons 'append
+             (mapcar (function (lambda (x) (list 'Multiple-value-list x)))
+                     args))))
+
+(defmacro Multiple-value-bind (vars form &rest body)
+  (list* 'multiple-value-bind vars (list 'Multiple-value-list form) body))
+
+(defmacro Multiple-value-setq (vars form)
+  (list 'multiple-value-setq vars (list 'Multiple-value-list form)))
+
+(defmacro Multiple-value-prog1 (form &rest body)
+  (list 'prog1 form (list* 'let '((*mvalues-values* nil)) body)))
+
+
+;;; Routines for parsing keyword arguments.
+
+(defun build-klist (arglist keys &optional allow-others)
+  (let ((res (Multiple-value-call 'mapcar* 'cons (unzip-lists arglist))))
+    (or allow-others
+       (let ((bad (set-difference (mapcar 'car res) keys)))
+         (if bad (error "Bad keywords: %s not in %s" bad keys))))
+    res))
+
+(defun extract-from-klist (klist key &optional def)
+  (let ((res (assq key klist))) (if res (cdr res) def)))
+
+(defun keyword-argument-supplied-p (klist key)
+  (assq key klist))
+
+(defun elt-satisfies-test-p (item elt klist)
+  (let ((test-not (cdr (assq ':test-not klist)))
+       (test (cdr (assq ':test klist)))
+       (key (cdr (assq ':key klist))))
+    (if key (setq elt (funcall key elt)))
+    (if test-not (not (funcall test-not item elt))
+      (funcall (or test 'eql) item elt))))
+
+
+;;; Rounding functions with old-style multiple value returns.
+
+(defun cl-floor (a &optional b) (Values-list (floor* a b)))
+(defun cl-ceiling (a &optional b) (Values-list (ceiling* a b)))
+(defun cl-round (a &optional b) (Values-list (round* a b)))
+(defun cl-truncate (a &optional b) (Values-list (truncate* a b)))
+
+(defun safe-idiv (a b)
+  (let* ((q (/ (abs a) (abs b)))
+         (s (* (signum a) (signum b))))
+    (Values q (- a (* s q b)) s)))
+
+
+;; Internal routines.
+
+(defun pair-with-newsyms (oldforms)
+  (let ((newsyms (mapcar (function (lambda (x) (gensym))) oldforms)))
+    (Values (mapcar* 'list newsyms oldforms) newsyms)))
+
+(defun zip-lists (evens odds)
+  (mapcan 'list evens odds))
+
+(defun unzip-lists (list)
+  (let ((e nil) (o nil))
+    (while list
+      (setq e (cons (car list) e) o (cons (cadr list) o) list (cddr list)))
+    (Values (nreverse e) (nreverse o))))
+
+(defun reassemble-argslists (list)
+  (let ((n (apply 'min (mapcar 'length list))) (res nil))
+    (while (>= (setq n (1- n)) 0)
+      (setq res (cons (mapcar (function (lambda (x) (elt x n))) list) res)))
+    res))
+
+(defun duplicate-symbols-p (list)
+  (let ((res nil))
+    (while list
+      (if (memq (car list) (cdr list)) (setq res (cons (car list) res)))
+      (setq list (cdr list)))
+    res))
+
+
+;;; Setf internals.
+
+(defun setnth (n list x)
+  (setcar (nthcdr n list) x))
+
+(defun setnthcdr (n list x)
+  (setcdr (nthcdr (1- n) list) x))
+
+(defun setelt (seq n x)
+  (if (consp seq) (setcar (nthcdr n seq) x) (aset seq n x)))
+
+
+;;; Functions omitted: case-clausify, check-do-stepforms, check-do-endforms,
+;;; extract-do-inits, extract-do[*]-steps, select-stepping-forms,
+;;; elt-satisfies-if[-not]-p, with-keyword-args, mv-bind-clausify,
+;;; all names with embedded `$'.
+
+
+(provide 'cl-compat)
+
+;;; cl-compat.el ends here
+
diff --git a/lisp/cl-extra.el b/lisp/cl-extra.el
new file mode 100644 (file)
index 0000000..0d469a7
--- /dev/null
@@ -0,0 +1,944 @@
+;;; cl-extra.el --- Common Lisp extensions for GNU Emacs Lisp (part two)
+
+;; Copyright (C) 1993 Free Software Foundation, Inc.
+
+;; Author: Dave Gillespie <daveg@synaptics.com>
+;; Maintainer: XEmacs Development Team
+;; Version: 2.02
+;; Keywords: extensions, dumped
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: FSF 19.34.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; These are extensions to Emacs Lisp that provide a degree of
+;; Common Lisp compatibility, beyond what is already built-in
+;; in Emacs Lisp.
+;;
+;; This package was written by Dave Gillespie; it is a complete
+;; rewrite of Cesar Quiroz's original cl.el package of December 1986.
+;;
+;; This package works with Emacs 18, Emacs 19, and XEmacs/Lucid Emacs 19.
+;;
+;; Bug reports, comments, and suggestions are welcome!
+
+;; This file contains portions of the Common Lisp extensions
+;; package which are autoloaded since they are relatively obscure.
+
+;; See cl.el for Change Log.
+
+
+;;; Code:
+
+(or (memq 'cl-19 features)
+    (error "Tried to load `cl-extra' before `cl'!"))
+
+
+;;; We define these here so that this file can compile without having
+;;; loaded the cl.el file already.
+
+(defmacro cl-push (x place) (list 'setq place (list 'cons x place)))
+(defmacro cl-pop (place)
+  (list 'car (list 'prog1 place (list 'setq place (list 'cdr place)))))
+
+(defvar cl-emacs-type)
+
+
+;;; Type coercion.
+
+(defun coerce (x type)
+  "Coerce OBJECT to type TYPE.
+TYPE is a Common Lisp type specifier."
+  (cond ((eq type 'list) (if (listp x) x (append x nil)))
+       ((eq type 'vector) (if (vectorp x) x (vconcat x)))
+       ((eq type 'string) (if (stringp x) x (concat x)))
+       ((eq type 'array) (if (arrayp x) x (vconcat x)))
+       ((and (eq type 'character) (stringp x) (= (length x) 1)) (aref x 0))
+       ((and (eq type 'character) (symbolp x)) (coerce (symbol-name x) type))
+       ((eq type 'float) (float x))
+       ((eq type 'bit-vector) (if (bit-vector-p x) x
+                                (apply 'bit-vector (append x nil))))
+       ((eq type 'weak-list)
+        (if (weak-list-p x) x
+          (let ((wl (make-weak-list)))
+            (set-weak-list-list wl (if (listp x) x (append x nil)))
+            wl)))
+       ((typep x type) x)
+       (t (error "Can't coerce %s to type %s" x type))))
+
+
+;;; Predicates.
+
+(defun equalp (x y)
+  "Return t if two Lisp objects have similar structures and contents.
+This is like `equal', except that it accepts numerically equal
+numbers of different types (float vs. integer), and also compares
+strings case-insensitively."
+  (cond ((eq x y) t)
+       ((stringp x)
+        (and (stringp y) (= (length x) (length y))
+             (or (string-equal x y)
+                 (string-equal (downcase x) (downcase y)))))   ; lazy but simple!
+       ((characterp x)
+        (and (characterp y)
+             (or (char-equal x y)
+                 (char-equal (downcase x) (downcase y)))))
+       ((numberp x)
+        (and (numberp y) (= x y)))
+       ((consp x)
+        ;; XEmacs change
+        (while (and (consp x) (consp y) (equalp (cl-pop x) (cl-pop y))))
+        (and (not (consp x)) (equalp x y)))
+       ((vectorp x)
+        (and (vectorp y) (= (length x) (length y))
+             (let ((i (length x)))
+               (while (and (>= (setq i (1- i)) 0)
+                           (equalp (aref x i) (aref y i))))
+               (< i 0))))
+       (t (equal x y))))
+
+
+;;; Control structures.
+
+(defun cl-mapcar-many (cl-func cl-seqs)
+  (if (cdr (cdr cl-seqs))
+      (let* ((cl-res nil)
+            (cl-n (apply 'min (mapcar 'length cl-seqs)))
+            (cl-i 0)
+            (cl-args (copy-sequence cl-seqs))
+            cl-p1 cl-p2)
+       (setq cl-seqs (copy-sequence cl-seqs))
+       (while (< cl-i cl-n)
+         (setq cl-p1 cl-seqs cl-p2 cl-args)
+         (while cl-p1
+           (setcar cl-p2
+                   (if (consp (car cl-p1))
+                       (prog1 (car (car cl-p1))
+                         (setcar cl-p1 (cdr (car cl-p1))))
+                     (aref (car cl-p1) cl-i)))
+           (setq cl-p1 (cdr cl-p1) cl-p2 (cdr cl-p2)))
+         (cl-push (apply cl-func cl-args) cl-res)
+         (setq cl-i (1+ cl-i)))
+       (nreverse cl-res))
+    (let ((cl-res nil)
+         (cl-x (car cl-seqs))
+         (cl-y (nth 1 cl-seqs)))
+      (let ((cl-n (min (length cl-x) (length cl-y)))
+           (cl-i -1))
+       (while (< (setq cl-i (1+ cl-i)) cl-n)
+         (cl-push (funcall cl-func
+                           (if (consp cl-x) (cl-pop cl-x) (aref cl-x cl-i))
+                           (if (consp cl-y) (cl-pop cl-y) (aref cl-y cl-i)))
+                  cl-res)))
+      (nreverse cl-res))))
+
+(defun map (cl-type cl-func cl-seq &rest cl-rest)
+  "Map a function across one or more sequences, returning a sequence.
+TYPE is the sequence type to return, FUNC is the function, and SEQS
+are the argument sequences."
+  (let ((cl-res (apply 'mapcar* cl-func cl-seq cl-rest)))
+    (and cl-type (coerce cl-res cl-type))))
+
+(defun maplist (cl-func cl-list &rest cl-rest)
+  "Map FUNC to each sublist of LIST or LISTS.
+Like `mapcar', except applies to lists and their cdr's rather than to
+the elements themselves."
+  (if cl-rest
+      (let ((cl-res nil)
+           (cl-args (cons cl-list (copy-sequence cl-rest)))
+           cl-p)
+       (while (not (memq nil cl-args))
+         (cl-push (apply cl-func cl-args) cl-res)
+         (setq cl-p cl-args)
+         (while cl-p (setcar cl-p (cdr (cl-pop cl-p)) )))
+       (nreverse cl-res))
+    (let ((cl-res nil))
+      (while cl-list
+       (cl-push (funcall cl-func cl-list) cl-res)
+       (setq cl-list (cdr cl-list)))
+      (nreverse cl-res))))
+
+
+;; mapc is now in C, renamed from `mapc-internal'.
+
+;(defun mapc (cl-func cl-seq &rest cl-rest)
+;  "Like `mapcar', but does not accumulate values returned by the function."
+;  (if cl-rest
+;      (apply 'map nil cl-func cl-seq cl-rest)
+;    ;; XEmacs change: we call mapc-internal, which really doesn't
+;    ;; accumulate any results.
+;    (mapc-internal cl-func cl-seq))
+;  cl-seq)
+
+(defun mapl (cl-func cl-list &rest cl-rest)
+  "Like `maplist', but does not accumulate values returned by the function."
+  (if cl-rest
+      (apply 'maplist cl-func cl-list cl-rest)
+    (let ((cl-p cl-list))
+      (while cl-p (funcall cl-func cl-p) (setq cl-p (cdr cl-p)))))
+  cl-list)
+
+(defun mapcan (cl-func cl-seq &rest cl-rest)
+  "Like `mapcar', but nconc's together the values returned by the function."
+  (apply 'nconc (apply 'mapcar* cl-func cl-seq cl-rest)))
+
+(defun mapcon (cl-func cl-list &rest cl-rest)
+  "Like `maplist', but nconc's together the values returned by the function."
+  (apply 'nconc (apply 'maplist cl-func cl-list cl-rest)))
+
+(defun some (cl-pred cl-seq &rest cl-rest)
+  "Return true if PREDICATE is true of any element of SEQ or SEQs.
+If so, return the true (non-nil) value returned by PREDICATE."
+  (if (or cl-rest (nlistp cl-seq))
+      (catch 'cl-some
+       (apply 'map nil
+              (function (lambda (&rest cl-x)
+                          (let ((cl-res (apply cl-pred cl-x)))
+                            (if cl-res (throw 'cl-some cl-res)))))
+              cl-seq cl-rest) nil)
+    (let ((cl-x nil))
+      (while (and cl-seq (not (setq cl-x (funcall cl-pred (cl-pop cl-seq))))))
+      cl-x)))
+
+(defun every (cl-pred cl-seq &rest cl-rest)
+  "Return true if PREDICATE is true of every element of SEQ or SEQs."
+  (if (or cl-rest (nlistp cl-seq))
+      (catch 'cl-every
+       (apply 'map nil
+              (function (lambda (&rest cl-x)
+                          (or (apply cl-pred cl-x) (throw 'cl-every nil))))
+              cl-seq cl-rest) t)
+    (while (and cl-seq (funcall cl-pred (car cl-seq)))
+      (setq cl-seq (cdr cl-seq)))
+    (null cl-seq)))
+
+(defun notany (cl-pred cl-seq &rest cl-rest)
+  "Return true if PREDICATE is false of every element of SEQ or SEQs."
+  (not (apply 'some cl-pred cl-seq cl-rest)))
+
+(defun notevery (cl-pred cl-seq &rest cl-rest)
+  "Return true if PREDICATE is false of some element of SEQ or SEQs."
+  (not (apply 'every cl-pred cl-seq cl-rest)))
+
+;;; Support for `loop'.
+(defun cl-map-keymap (cl-func cl-map)
+  (while (symbolp cl-map) (setq cl-map (symbol-function cl-map)))
+  (if (eq cl-emacs-type 'lucid) (funcall 'map-keymap cl-func cl-map)
+    (if (listp cl-map)
+       (let ((cl-p cl-map))
+         (while (consp (setq cl-p (cdr cl-p)))
+           (cond ((consp (car cl-p))
+                  (funcall cl-func (car (car cl-p)) (cdr (car cl-p))))
+                 ((vectorp (car cl-p))
+                  (cl-map-keymap cl-func (car cl-p)))
+                 ((eq (car cl-p) 'keymap)
+                  (setq cl-p nil)))))
+      (let ((cl-i -1))
+       (while (< (setq cl-i (1+ cl-i)) (length cl-map))
+         (if (aref cl-map cl-i)
+             (funcall cl-func cl-i (aref cl-map cl-i))))))))
+
+(defun cl-map-keymap-recursively (cl-func-rec cl-map &optional cl-base)
+  (or cl-base
+      (setq cl-base (copy-sequence (if (eq cl-emacs-type 18) "0" [0]))))
+  (cl-map-keymap
+   (function
+    (lambda (cl-key cl-bind)
+      (aset cl-base (1- (length cl-base)) cl-key)
+      (if (keymapp cl-bind)
+         (cl-map-keymap-recursively
+          cl-func-rec cl-bind
+          (funcall (if (eq cl-emacs-type 18) 'concat 'vconcat)
+                   cl-base (list 0)))
+       (funcall cl-func-rec cl-base cl-bind))))
+   cl-map))
+
+(defun cl-map-intervals (cl-func &optional cl-what cl-prop cl-start cl-end)
+  (or cl-what (setq cl-what (current-buffer)))
+  (if (bufferp cl-what)
+      (let (cl-mark cl-mark2 (cl-next t) cl-next2)
+       (save-excursion
+         (set-buffer cl-what)
+         (setq cl-mark (copy-marker (or cl-start (point-min))))
+         (setq cl-mark2 (and cl-end (copy-marker cl-end))))
+       (while (and cl-next (or (not cl-mark2) (< cl-mark cl-mark2)))
+         (setq cl-next (and (fboundp 'next-property-change)
+                            (if cl-prop (next-single-property-change
+                                         cl-mark cl-prop cl-what)
+                              (next-property-change cl-mark cl-what)))
+               cl-next2 (or cl-next (save-excursion
+                                      (set-buffer cl-what) (point-max))))
+         (funcall cl-func (prog1 (marker-position cl-mark)
+                            (set-marker cl-mark cl-next2))
+                  (if cl-mark2 (min cl-next2 cl-mark2) cl-next2)))
+       (set-marker cl-mark nil) (if cl-mark2 (set-marker cl-mark2 nil)))
+    (or cl-start (setq cl-start 0))
+    (or cl-end (setq cl-end (length cl-what)))
+    (while (< cl-start cl-end)
+      (let ((cl-next (or (and (fboundp 'next-property-change)
+                             (if cl-prop (next-single-property-change
+                                          cl-start cl-prop cl-what)
+                               (next-property-change cl-start cl-what)))
+                        cl-end)))
+       (funcall cl-func cl-start (min cl-next cl-end))
+       (setq cl-start cl-next)))))
+
+(defun cl-map-overlays (cl-func &optional cl-buffer cl-start cl-end cl-arg)
+  (or cl-buffer (setq cl-buffer (current-buffer)))
+  (if (fboundp 'overlay-lists)
+
+      ;; This is the preferred algorithm, though overlay-lists is undocumented.
+      (let (cl-ovl)
+       (save-excursion
+         (set-buffer cl-buffer)
+         (setq cl-ovl (overlay-lists))
+         (if cl-start (setq cl-start (copy-marker cl-start)))
+         (if cl-end (setq cl-end (copy-marker cl-end))))
+       (setq cl-ovl (nconc (car cl-ovl) (cdr cl-ovl)))
+       (while (and cl-ovl
+                   (or (not (overlay-start (car cl-ovl)))
+                       (and cl-end (>= (overlay-start (car cl-ovl)) cl-end))
+                       (and cl-start (<= (overlay-end (car cl-ovl)) cl-start))
+                       (not (funcall cl-func (car cl-ovl) cl-arg))))
+         (setq cl-ovl (cdr cl-ovl)))
+       (if cl-start (set-marker cl-start nil))
+       (if cl-end (set-marker cl-end nil)))
+
+    ;; This alternate algorithm fails to find zero-length overlays.
+    (let ((cl-mark (save-excursion (set-buffer cl-buffer)
+                                  (copy-marker (or cl-start (point-min)))))
+         (cl-mark2 (and cl-end (save-excursion (set-buffer cl-buffer)
+                                               (copy-marker cl-end))))
+         cl-pos cl-ovl)
+      (while (save-excursion
+              (and (setq cl-pos (marker-position cl-mark))
+                   (< cl-pos (or cl-mark2 (point-max)))
+                   (progn
+                     (set-buffer cl-buffer)
+                     (setq cl-ovl (overlays-at cl-pos))
+                     (set-marker cl-mark (next-overlay-change cl-pos)))))
+       (while (and cl-ovl
+                   (or (/= (overlay-start (car cl-ovl)) cl-pos)
+                       (not (and (funcall cl-func (car cl-ovl) cl-arg)
+                                 (set-marker cl-mark nil)))))
+         (setq cl-ovl (cdr cl-ovl))))
+      (set-marker cl-mark nil) (if cl-mark2 (set-marker cl-mark2 nil)))))
+
+;;; Support for `setf'.
+(defun cl-set-frame-visible-p (frame val)
+  (cond ((null val) (make-frame-invisible frame))
+       ((eq val 'icon) (iconify-frame frame))
+       (t (make-frame-visible frame)))
+  val)
+
+;;; Support for `progv'.
+(defvar cl-progv-save)
+(defun cl-progv-before (syms values)
+  (while syms
+    (cl-push (if (boundp (car syms))
+                (cons (car syms) (symbol-value (car syms)))
+              (car syms)) cl-progv-save)
+    (if values
+       (set (cl-pop syms) (cl-pop values))
+      (makunbound (cl-pop syms)))))
+
+(defun cl-progv-after ()
+  (while cl-progv-save
+    (if (consp (car cl-progv-save))
+       (set (car (car cl-progv-save)) (cdr (car cl-progv-save)))
+      (makunbound (car cl-progv-save)))
+    (cl-pop cl-progv-save)))
+
+
+;;; Numbers.
+
+(defun gcd (&rest args)
+  "Return the greatest common divisor of the arguments."
+  (let ((a (abs (or (cl-pop args) 0))))
+    (while args
+      (let ((b (abs (cl-pop args))))
+       (while (> b 0) (setq b (% a (setq a b))))))
+    a))
+
+(defun lcm (&rest args)
+  "Return the least common multiple of the arguments."
+  (if (memq 0 args)
+      0
+    (let ((a (abs (or (cl-pop args) 1))))
+      (while args
+       (let ((b (abs (cl-pop args))))
+         (setq a (* (/ a (gcd a b)) b))))
+      a)))
+
+(defun isqrt (a)
+  "Return the integer square root of the argument."
+  (if (and (integerp a) (> a 0))
+      ;; XEmacs change
+      (let ((g (cond ((>= a 1000000) 10000) ((>= a 10000) 1000)
+                    ((>= a 100) 100) (t 10)))
+           g2)
+       (while (< (setq g2 (/ (+ g (/ a g)) 2)) g)
+         (setq g g2))
+       g)
+    (if (eq a 0) 0 (signal 'arith-error nil))))
+
+(defun cl-expt (x y)
+  "Return X raised to the power of Y.  Works only for integer arguments."
+  (if (<= y 0) (if (= y 0) 1 (if (memq x '(-1 1)) (cl-expt x (- y)) 0))
+    (* (if (= (% y 2) 0) 1 x) (cl-expt (* x x) (/ y 2)))))
+(or (and (fboundp 'expt) (subrp (symbol-function 'expt)))
+    (defalias 'expt 'cl-expt))
+
+(defun floor* (x &optional y)
+  "Return a list of the floor of X and the fractional part of X.
+With two arguments, return floor and remainder of their quotient."
+  (let ((q (floor x y)))
+    (list q (- x (if y (* y q) q)))))
+
+(defun ceiling* (x &optional y)
+  "Return a list of the ceiling of X and the fractional part of X.
+With two arguments, return ceiling and remainder of their quotient."
+  (let ((res (floor* x y)))
+    (if (= (car (cdr res)) 0) res
+      (list (1+ (car res)) (- (car (cdr res)) (or y 1))))))
+
+(defun truncate* (x &optional y)
+  "Return a list of the integer part of X and the fractional part of X.
+With two arguments, return truncation and remainder of their quotient."
+  (if (eq (>= x 0) (or (null y) (>= y 0)))
+      (floor* x y) (ceiling* x y)))
+
+(defun round* (x &optional y)
+  "Return a list of X rounded to the nearest integer and the remainder.
+With two arguments, return rounding and remainder of their quotient."
+  (if y
+      (if (and (integerp x) (integerp y))
+         (let* ((hy (/ y 2))
+                (res (floor* (+ x hy) y)))
+           (if (and (= (car (cdr res)) 0)
+                    (= (+ hy hy) y)
+                    (/= (% (car res) 2) 0))
+               (list (1- (car res)) hy)
+             (list (car res) (- (car (cdr res)) hy))))
+       (let ((q (round (/ x y))))
+         (list q (- x (* q y)))))
+    (if (integerp x) (list x 0)
+      (let ((q (round x)))
+       (list q (- x q))))))
+
+(defun mod* (x y)
+  "The remainder of X divided by Y, with the same sign as Y."
+  (nth 1 (floor* x y)))
+
+(defun rem* (x y)
+  "The remainder of X divided by Y, with the same sign as X."
+  (nth 1 (truncate* x y)))
+
+(defun signum (a)
+  "Return 1 if A is positive, -1 if negative, 0 if zero."
+  (cond ((> a 0) 1) ((< a 0) -1) (t 0)))
+
+
+;; Random numbers.
+
+(defvar *random-state*)
+(defun random* (lim &optional state)
+  "Return a random nonnegative number less than LIM, an integer or float.
+Optional second arg STATE is a random-state object."
+  (or state (setq state *random-state*))
+  ;; Inspired by "ran3" from Numerical Recipes.  Additive congruential method.
+  (let ((vec (aref state 3)))
+    (if (integerp vec)
+       (let ((i 0) (j (- 1357335 (% (abs vec) 1357333))) (k 1) ii)
+         (aset state 3 (setq vec (make-vector 55 nil)))
+         (aset vec 0 j)
+         (while (> (setq i (% (+ i 21) 55)) 0)
+           (aset vec i (setq j (prog1 k (setq k (- j k))))))
+         (while (< (setq i (1+ i)) 200) (random* 2 state))))
+    (let* ((i (aset state 1 (% (1+ (aref state 1)) 55)))
+          (j (aset state 2 (% (1+ (aref state 2)) 55)))
+          (n (logand 8388607 (aset vec i (- (aref vec i) (aref vec j))))))
+      (if (integerp lim)
+         (if (<= lim 512) (% n lim)
+           (if (> lim 8388607) (setq n (+ (lsh n 9) (random* 512 state))))
+           (let ((mask 1023))
+             (while (< mask (1- lim)) (setq mask (1+ (+ mask mask))))
+             (if (< (setq n (logand n mask)) lim) n (random* lim state))))
+       (* (/ n '8388608e0) lim)))))
+
+(defun make-random-state (&optional state)
+  "Return a copy of random-state STATE, or of `*random-state*' if omitted.
+If STATE is t, return a new state object seeded from the time of day."
+  (cond ((null state) (make-random-state *random-state*))
+       ((vectorp state) (cl-copy-tree state t))
+       ((integerp state) (vector 'cl-random-state-tag -1 30 state))
+       (t (make-random-state (cl-random-time)))))
+
+(defun random-state-p (object)
+  "Return t if OBJECT is a random-state object."
+  (and (vectorp object) (= (length object) 4)
+       (eq (aref object 0) 'cl-random-state-tag)))
+
+
+;; Implementation limits.
+
+(defun cl-finite-do (func a b)
+  (condition-case err
+      (let ((res (funcall func a b)))   ; check for IEEE infinity
+       (and (numberp res) (/= res (/ res 2)) res))
+    (arith-error nil)))
+
+(defvar most-positive-float)
+(defvar most-negative-float)
+(defvar least-positive-float)
+(defvar least-negative-float)
+(defvar least-positive-normalized-float)
+(defvar least-negative-normalized-float)
+(defvar float-epsilon)
+(defvar float-negative-epsilon)
+
+(defun cl-float-limits ()
+  (or most-positive-float (not (numberp '2e1))
+      (let ((x '2e0) y z)
+       ;; Find maximum exponent (first two loops are optimizations)
+       (while (cl-finite-do '* x x) (setq x (* x x)))
+       (while (cl-finite-do '* x (/ x 2)) (setq x (* x (/ x 2))))
+       (while (cl-finite-do '+ x x) (setq x (+ x x)))
+       (setq z x y (/ x 2))
+       ;; Now fill in 1's in the mantissa.
+       (while (and (cl-finite-do '+ x y) (/= (+ x y) x))
+         (setq x (+ x y) y (/ y 2)))
+       (setq most-positive-float x
+             most-negative-float (- x))
+       ;; Divide down until mantissa starts rounding.
+       (setq x (/ x z) y (/ 16 z) x (* x y))
+       (while (condition-case err (and (= x (* (/ x 2) 2)) (> (/ y 2) 0))
+                (arith-error nil))
+         (setq x (/ x 2) y (/ y 2)))
+       (setq least-positive-normalized-float y
+             least-negative-normalized-float (- y))
+       ;; Divide down until value underflows to zero.
+       (setq x (/ 1 z) y x)
+       (while (condition-case err (> (/ x 2) 0) (arith-error nil))
+         (setq x (/ x 2)))
+       (setq least-positive-float x
+             least-negative-float (- x))
+       (setq x '1e0)
+       (while (/= (+ '1e0 x) '1e0) (setq x (/ x 2)))
+       (setq float-epsilon (* x 2))
+       (setq x '1e0)
+       (while (/= (- '1e0 x) '1e0) (setq x (/ x 2)))
+       (setq float-negative-epsilon (* x 2))))
+  nil)
+
+
+;;; Sequence functions.
+
+;XEmacs -- our built-in is more powerful.
+;(defun subseq (seq start &optional end)
+;  "Return the subsequence of SEQ from START to END.
+;If END is omitted, it defaults to the length of the sequence.
+;If START or END is negative, it counts from the end."
+;  (if (stringp seq) (substring seq start end)
+;    (let (len)
+;      (and end (< end 0) (setq end (+ end (setq len (length seq)))))
+;      (if (< start 0) (setq start (+ start (or len (setq len (length seq))))))
+;      (cond ((listp seq)
+;           (if (> start 0) (setq seq (nthcdr start seq)))
+;           (if end
+;               (let ((res nil))
+;                 (while (>= (setq end (1- end)) start)
+;                   (cl-push (cl-pop seq) res))
+;                 (nreverse res))
+;             (copy-sequence seq)))
+;          (t
+;           (or end (setq end (or len (length seq))))
+;           (let ((res (make-vector (max (- end start) 0) nil))
+;                 (i 0))
+;             (while (< start end)
+;               (aset res i (aref seq start))
+;               (setq i (1+ i) start (1+ start)))
+;             res))))))
+
+(defun concatenate (type &rest seqs)
+  "Concatenate, into a sequence of type TYPE, the argument SEQUENCES."
+  (cond ((eq type 'vector) (apply 'vconcat seqs))
+       ((eq type 'string) (apply 'concat seqs))
+       ((eq type 'list) (apply 'append (append seqs '(nil))))
+       (t (error "Not a sequence type name: %s" type))))
+
+
+;;; List functions.
+
+(defun revappend (x y)
+  "Equivalent to (append (reverse X) Y)."
+  (nconc (reverse x) y))
+
+(defun nreconc (x y)
+  "Equivalent to (nconc (nreverse X) Y)."
+  (nconc (nreverse x) y))
+
+(defun list-length (x)
+  "Return the length of a list.  Return nil if list is circular."
+  (let ((n 0) (fast x) (slow x))
+    (while (and (cdr fast) (not (and (eq fast slow) (> n 0))))
+      (setq n (+ n 2) fast (cdr (cdr fast)) slow (cdr slow)))
+    (if fast (if (cdr fast) nil (1+ n)) n)))
+
+(defun tailp (sublist list)
+  "Return true if SUBLIST is a tail of LIST."
+  (while (and (consp list) (not (eq sublist list)))
+    (setq list (cdr list)))
+  (if (numberp sublist) (equal sublist list) (eq sublist list)))
+
+(defun cl-copy-tree (tree &optional vecp)
+  "Make a copy of TREE.
+If TREE is a cons cell, this recursively copies both its car and its cdr.
+Contrast to copy-sequence, which copies only along the cdrs.  With second
+argument VECP, this copies vectors as well as conses."
+  (if (consp tree)
+      (let ((p (setq tree (copy-list tree))))
+       (while (consp p)
+         (if (or (consp (car p)) (and vecp (vectorp (car p))))
+             (setcar p (cl-copy-tree (car p) vecp)))
+         (or (listp (cdr p)) (setcdr p (cl-copy-tree (cdr p) vecp)))
+         (cl-pop p)))
+    (if (and vecp (vectorp tree))
+       (let ((i (length (setq tree (copy-sequence tree)))))
+         (while (>= (setq i (1- i)) 0)
+           (aset tree i (cl-copy-tree (aref tree i) vecp))))))
+  tree)
+(or (and (fboundp 'copy-tree) (subrp (symbol-function 'copy-tree)))
+    (defalias 'copy-tree 'cl-copy-tree))
+
+
+;;; Property lists.
+
+;; XEmacs: our `get' groks DEFAULT.
+(defalias 'get* 'get)
+
+(defun getf (plist tag &optional def)
+  "Search PROPLIST for property PROPNAME; return its value or DEFAULT.
+PROPLIST is a list of the sort returned by `symbol-plist'."
+  (setplist '--cl-getf-symbol-- plist)
+  (or (get '--cl-getf-symbol-- tag)
+      (and def (get* '--cl-getf-symbol-- tag def))))
+
+(defun cl-set-getf (plist tag val)
+  (let ((p plist))
+    (while (and p (not (eq (car p) tag))) (setq p (cdr (cdr p))))
+    (if p (progn (setcar (cdr p) val) plist) (list* tag val plist))))
+
+(defun cl-do-remf (plist tag)
+  (let ((p (cdr plist)))
+    (while (and (cdr p) (not (eq (car (cdr p)) tag))) (setq p (cdr (cdr p))))
+    (and (cdr p) (progn (setcdr p (cdr (cdr (cdr p)))) t))))
+
+(defun cl-remprop (sym tag)
+  "Remove from SYMBOL's plist the property PROP and its value."
+  (let ((plist (symbol-plist sym)))
+    (if (and plist (eq tag (car plist)))
+       (progn (setplist sym (cdr (cdr plist))) t)
+      (cl-do-remf plist tag))))
+(or (and (fboundp 'remprop) (subrp (symbol-function 'remprop)))
+    (defalias 'remprop 'cl-remprop))
+
+
+
+;;; Hash tables.
+
+(defun make-hash-table (&rest cl-keys)
+  "Make an empty Common Lisp-style hash-table.
+If :test is `eq', `eql', or `equal', this can use XEmacs built-in hash-tables.
+In Emacs 19, or with a different test, this internally uses a-lists.
+Keywords supported:  :test :size
+The Common Lisp keywords :rehash-size and :rehash-threshold are ignored."
+  (let ((cl-test (or (car (cdr (memq ':test cl-keys))) 'eql))
+       (cl-size (or (car (cdr (memq ':size cl-keys))) 20)))
+    ;; XEmacs change
+    (if (and (memq cl-test '(eq eql equal)) (fboundp 'make-hashtable))
+       (funcall 'make-hashtable cl-size cl-test)
+      (list 'cl-hash-table-tag cl-test
+           (if (> cl-size 1) (make-vector cl-size 0)
+             (let ((sym (make-symbol "--hashsym--"))) (set sym nil) sym))
+           0))))
+
+(defvar cl-lucid-hash-tag
+  (if (and (fboundp 'make-hashtable) (vectorp (make-hashtable 1)))
+      (aref (make-hashtable 1) 0) (make-symbol "--cl-hash-tag--")))
+
+(defun hash-table-p (x)
+  "Return t if OBJECT is a hash table."
+  (or (and (fboundp 'hashtablep) (funcall 'hashtablep x))
+      (eq (car-safe x) 'cl-hash-table-tag)
+      (and (vectorp x) (= (length x) 4) (eq (aref x 0) cl-lucid-hash-tag))))
+
+(defun cl-not-hash-table (x &optional y &rest z)
+  (signal 'wrong-type-argument (list 'hash-table-p (or y x))))
+
+(defun cl-hash-lookup (key table)
+  (or (eq (car-safe table) 'cl-hash-table-tag) (cl-not-hash-table table))
+  (let* ((array (nth 2 table)) (test (car (cdr table))) (str key) sym)
+    (if (symbolp array) (setq str nil sym (symbol-value array))
+      (while (or (consp str) (and (vectorp str) (> (length str) 0)))
+       (setq str (elt str 0)))
+      (cond ((stringp str) (if (eq test 'equalp) (setq str (downcase str))))
+           ((symbolp str) (setq str (symbol-name str)))
+           ((and (numberp str) (> str -8000000) (< str 8000000))
+            (or (integerp str) (setq str (truncate str)))
+            (setq str (aref ["0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "10"
+                             "11" "12" "13" "14" "15"] (logand str 15))))
+           (t (setq str "*")))
+      (setq sym (symbol-value (intern-soft str array))))
+    (list (and sym (cond ((or (eq test 'eq)
+                             (and (eq test 'eql) (not (numberp key))))
+                         (assq key sym))
+                        ((memq test '(eql equal)) (assoc key sym))
+                        (t (assoc* key sym ':test test))))
+         sym str)))
+
+(defvar cl-builtin-gethash
+  (if (and (fboundp 'gethash) (subrp (symbol-function 'gethash)))
+      (symbol-function 'gethash) 'cl-not-hash-table))
+(defvar cl-builtin-remhash
+  (if (and (fboundp 'remhash) (subrp (symbol-function 'remhash)))
+      (symbol-function 'remhash) 'cl-not-hash-table))
+(defvar cl-builtin-clrhash
+  (if (and (fboundp 'clrhash) (subrp (symbol-function 'clrhash)))
+      (symbol-function 'clrhash) 'cl-not-hash-table))
+(defvar cl-builtin-maphash
+  (if (and (fboundp 'maphash) (subrp (symbol-function 'maphash)))
+      (symbol-function 'maphash) 'cl-not-hash-table))
+
+(defun cl-gethash (key table &optional def)
+  "Look up KEY in HASH-TABLE; return corresponding value, or DEFAULT."
+  (if (consp table)
+      (let ((found (cl-hash-lookup key table)))
+       (if (car found) (cdr (car found)) def))
+    (funcall cl-builtin-gethash key table def)))
+(defalias 'gethash 'cl-gethash)
+
+(defun cl-puthash (key val table)
+  (if (consp table)
+      (let ((found (cl-hash-lookup key table)))
+       (if (car found) (setcdr (car found) val)
+         (if (nth 2 found)
+             (progn
+               (if (> (nth 3 table) (* (length (nth 2 table)) 3))
+                   (let ((new-table (make-vector (nth 3 table) 0)))
+                     (mapatoms (function
+                                (lambda (sym)
+                                  (set (intern (symbol-name sym) new-table)
+                                       (symbol-value sym))))
+                               (nth 2 table))
+                     (setcar (cdr (cdr table)) new-table)))
+               (set (intern (nth 2 found) (nth 2 table))
+                    (cons (cons key val) (nth 1 found))))
+           (set (nth 2 table) (cons (cons key val) (nth 1 found))))
+         (setcar (cdr (cdr (cdr table))) (1+ (nth 3 table)))))
+    (funcall 'puthash key val table)) val)
+
+(defun cl-remhash (key table)
+  "Remove KEY from HASH-TABLE."
+  (if (consp table)
+      (let ((found (cl-hash-lookup key table)))
+       (and (car found)
+            (let ((del (delq (car found) (nth 1 found))))
+              (setcar (cdr (cdr (cdr table))) (1- (nth 3 table)))
+              (if (nth 2 found) (set (intern (nth 2 found) (nth 2 table)) del)
+                (set (nth 2 table) del)) t)))
+    (prog1 (not (eq (funcall cl-builtin-gethash key table '--cl--) '--cl--))
+      (funcall cl-builtin-remhash key table))))
+(defalias 'remhash 'cl-remhash)
+
+(defun cl-clrhash (table)
+  "Clear HASH-TABLE."
+  (if (consp table)
+      (progn
+       (or (hash-table-p table) (cl-not-hash-table table))
+       (if (symbolp (nth 2 table)) (set (nth 2 table) nil)
+         (setcar (cdr (cdr table)) (make-vector (length (nth 2 table)) 0)))
+       (setcar (cdr (cdr (cdr table))) 0))
+    (funcall cl-builtin-clrhash table))
+  nil)
+(defalias 'clrhash 'cl-clrhash)
+
+(defun cl-maphash (cl-func cl-table)
+  "Call FUNCTION on keys and values from HASH-TABLE."
+  (or (hash-table-p cl-table) (cl-not-hash-table cl-table))
+  (if (consp cl-table)
+      (mapatoms (function (lambda (cl-x)
+                           (setq cl-x (symbol-value cl-x))
+                           (while cl-x
+                             (funcall cl-func (car (car cl-x))
+                                      (cdr (car cl-x)))
+                             (setq cl-x (cdr cl-x)))))
+               (if (symbolp (nth 2 cl-table))
+                   (vector (nth 2 cl-table)) (nth 2 cl-table)))
+    (funcall cl-builtin-maphash cl-func cl-table)))
+(defalias 'maphash 'cl-maphash)
+
+(defun hash-table-count (table)
+  "Return the number of entries in HASH-TABLE."
+  (or (hash-table-p table) (cl-not-hash-table table))
+  (if (consp table) (nth 3 table) (funcall 'hashtable-fullness table)))
+
+
+;;; Some debugging aids.
+
+(defun cl-prettyprint (form)
+  "Insert a pretty-printed rendition of a Lisp FORM in current buffer."
+  (let ((pt (point)) last)
+    (insert "\n" (prin1-to-string form) "\n")
+    (setq last (point))
+    (goto-char (1+ pt))
+    (while (search-forward "(quote " last t)
+      (delete-backward-char 7)
+      (insert "'")
+      (forward-sexp)
+      (delete-char 1))
+    (goto-char (1+ pt))
+    (cl-do-prettyprint)))
+
+(defun cl-do-prettyprint ()
+  (skip-chars-forward " ")
+  (if (looking-at "(")
+      (let ((skip (or (looking-at "((") (looking-at "(prog")
+                     (looking-at "(unwind-protect ")
+                     (looking-at "(function (")
+                     (looking-at "(cl-block-wrapper ")))
+           (two (or (looking-at "(defun ") (looking-at "(defmacro ")))
+           (let (or (looking-at "(let\\*? ") (looking-at "(while ")))
+           (set (looking-at "(p?set[qf] ")))
+       (if (or skip let
+               (progn
+                 (forward-sexp)
+                 (and (>= (current-column) 78) (progn (backward-sexp) t))))
+           (let ((nl t))
+             (forward-char 1)
+             (cl-do-prettyprint)
+             (or skip (looking-at ")") (cl-do-prettyprint))
+             (or (not two) (looking-at ")") (cl-do-prettyprint))
+             (while (not (looking-at ")"))
+               (if set (setq nl (not nl)))
+               (if nl (insert "\n"))
+               (lisp-indent-line)
+               (cl-do-prettyprint))
+             (forward-char 1))))
+    (forward-sexp)))
+
+(defvar cl-macroexpand-cmacs nil)
+(defvar cl-closure-vars nil)
+
+(defun cl-macroexpand-all (form &optional env)
+  "Expand all macro calls through a Lisp FORM.
+This also does some trivial optimizations to make the form prettier."
+  (while (or (not (eq form (setq form (macroexpand form env))))
+            (and cl-macroexpand-cmacs
+                 (not (eq form (setq form (compiler-macroexpand form)))))))
+  (cond ((not (consp form)) form)
+       ((memq (car form) '(let let*))
+        (if (null (nth 1 form))
+            (cl-macroexpand-all (cons 'progn (cddr form)) env)
+          (let ((letf nil) (res nil) (lets (cadr form)))
+            (while lets
+              (cl-push (if (consp (car lets))
+                           (let ((exp (cl-macroexpand-all (caar lets) env)))
+                             (or (symbolp exp) (setq letf t))
+                             (cons exp (cl-macroexpand-body (cdar lets) env)))
+                         (let ((exp (cl-macroexpand-all (car lets) env)))
+                           (if (symbolp exp) exp
+                             (setq letf t) (list exp nil)))) res)
+              (setq lets (cdr lets)))
+            (list* (if letf (if (eq (car form) 'let) 'letf 'letf*) (car form))
+                   (nreverse res) (cl-macroexpand-body (cddr form) env)))))
+       ((eq (car form) 'cond)
+        (cons (car form)
+              (mapcar (function (lambda (x) (cl-macroexpand-body x env)))
+                      (cdr form))))
+       ((eq (car form) 'condition-case)
+        (list* (car form) (nth 1 form) (cl-macroexpand-all (nth 2 form) env)
+               (mapcar (function
+                        (lambda (x)
+                          (cons (car x) (cl-macroexpand-body (cdr x) env))))
+                       (cdddr form))))
+       ((memq (car form) '(quote function))
+        (if (eq (car-safe (nth 1 form)) 'lambda)
+            (let ((body (cl-macroexpand-body (cddadr form) env)))
+              (if (and cl-closure-vars (eq (car form) 'function)
+                       (cl-expr-contains-any body cl-closure-vars))
+                  (let* ((new (mapcar 'gensym cl-closure-vars))
+                         (sub (pairlis cl-closure-vars new)) (decls nil))
+                    (while (or (stringp (car body))
+                               (eq (car-safe (car body)) 'interactive))
+                      (cl-push (list 'quote (cl-pop body)) decls))
+                    (put (car (last cl-closure-vars)) 'used t)
+                    (append
+                     (list 'list '(quote lambda) '(quote (&rest --cl-rest--)))
+                     (sublis sub (nreverse decls))
+                     (list
+                      (list* 'list '(quote apply)
+                             (list 'list '(quote quote)
+                                   (list 'function
+                                         (list* 'lambda
+                                                (append new (cadadr form))
+                                                (sublis sub body))))
+                             (nconc (mapcar (function
+                                             (lambda (x)
+                                               (list 'list '(quote quote) x)))
+                                            cl-closure-vars)
+                                    '((quote --cl-rest--)))))))
+                (list (car form) (list* 'lambda (cadadr form) body))))
+          (let ((found (assq (cadr form) env)))
+            (if (eq (cadr (caddr found)) 'cl-labels-args)
+                (cl-macroexpand-all (cadr (caddr (cadddr found))) env)
+              form))))
+       ((memq (car form) '(defun defmacro))
+        (list* (car form) (nth 1 form) (cl-macroexpand-body (cddr form) env)))
+       ((and (eq (car form) 'progn) (not (cddr form)))
+        (cl-macroexpand-all (nth 1 form) env))
+       ((eq (car form) 'setq)
+        (let* ((args (cl-macroexpand-body (cdr form) env)) (p args))
+          (while (and p (symbolp (car p))) (setq p (cddr p)))
+          (if p (cl-macroexpand-all (cons 'setf args)) (cons 'setq args))))
+       (t (cons (car form) (cl-macroexpand-body (cdr form) env)))))
+
+(defun cl-macroexpand-body (body &optional env)
+  (mapcar (function (lambda (x) (cl-macroexpand-all x env))) body))
+
+(defun cl-prettyexpand (form &optional full)
+  (message "Expanding...")
+  (let ((cl-macroexpand-cmacs full) (cl-compiling-file full)
+       (byte-compile-macro-environment nil))
+    (setq form (cl-macroexpand-all form
+                                  (and (not full) '((block) (eval-when)))))
+    (message "Formatting...")
+    (prog1 (cl-prettyprint form)
+      (message ""))))
+
+
+
+(run-hooks 'cl-extra-load-hook)
+
+(provide 'cl-extra)
+
+;;; cl-extra.el ends here
diff --git a/lisp/cl-macs.el b/lisp/cl-macs.el
new file mode 100644 (file)
index 0000000..e08a165
--- /dev/null
@@ -0,0 +1,2813 @@
+;;; cl-macs.el --- Common Lisp extensions for GNU Emacs Lisp (part four)
+
+;; Copyright (C) 1993 Free Software Foundation, Inc.
+
+;; Author: Dave Gillespie <daveg@synaptics.com>
+;; Version: 2.02
+;; Keywords: extensions
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: FSF 19.34.
+
+;;; Commentary:
+
+;; These are extensions to Emacs Lisp that provide a degree of
+;; Common Lisp compatibility, beyond what is already built-in
+;; in Emacs Lisp.
+;;
+;; This package was written by Dave Gillespie; it is a complete
+;; rewrite of Cesar Quiroz's original cl.el package of December 1986.
+;;
+;; This package works with Emacs 18, Emacs 19, and Lucid Emacs 19.
+;;
+;; Bug reports, comments, and suggestions are welcome!
+
+;; This file contains the portions of the Common Lisp extensions
+;; package which should be autoloaded, but need only be present
+;; if the compiler or interpreter is used---this file is not
+;; necessary for executing compiled code.
+
+;; See cl.el for Change Log.
+
+
+;;; Code:
+
+(or (memq 'cl-19 features)
+    (error "Tried to load `cl-macs' before `cl'!"))
+
+
+;;; We define these here so that this file can compile without having
+;;; loaded the cl.el file already.
+
+(defmacro cl-push (x place) (list 'setq place (list 'cons x place)))
+(defmacro cl-pop (place)
+  (list 'car (list 'prog1 place (list 'setq place (list 'cdr place)))))
+(defmacro cl-pop2 (place)
+  (list 'prog1 (list 'car (list 'cdr place))
+       (list 'setq place (list 'cdr (list 'cdr place)))))
+(put 'cl-push 'edebug-form-spec 'edebug-sexps)
+(put 'cl-pop 'edebug-form-spec 'edebug-sexps)
+(put 'cl-pop2 'edebug-form-spec 'edebug-sexps)
+
+(defvar cl-emacs-type)
+(defvar cl-optimize-safety)
+(defvar cl-optimize-speed)
+
+
+;;; This kludge allows macros which use cl-transform-function-property
+;;; to be called at compile-time.
+
+(require
+ (progn
+   (or (fboundp 'defalias) (fset 'defalias 'fset))
+   (or (fboundp 'cl-transform-function-property)
+       (defalias 'cl-transform-function-property
+        (function (lambda (n p f)
+                    (list 'put (list 'quote n) (list 'quote p)
+                          (list 'function (cons 'lambda f)))))))
+   (car (or features (setq features (list 'cl-kludge))))))
+
+
+;;; Initialization.
+
+(defvar cl-old-bc-file-form nil)
+
+;; Patch broken Emacs 18 compiler (re top-level macros).
+;; Emacs 19 compiler doesn't need this patch.
+;; Also, undo broken definition of `eql' that uses same bytecode as `eq'.
+
+;;;###autoload
+(defun cl-compile-time-init ()
+  (setq cl-old-bc-file-form (symbol-function 'byte-compile-file-form))
+  (or (fboundp 'byte-compile-flush-pending)   ; Emacs 19 compiler?
+      (defalias 'byte-compile-file-form
+       (function
+        (lambda (form)
+          (setq form (macroexpand form byte-compile-macro-environment))
+          (if (eq (car-safe form) 'progn)
+              (cons 'progn (mapcar 'byte-compile-file-form (cdr form)))
+            (funcall cl-old-bc-file-form form))))))
+  (put 'eql 'byte-compile 'cl-byte-compile-compiler-macro)
+  (run-hooks 'cl-hack-bytecomp-hook))
+
+
+;;; Symbols.
+
+(defvar *gensym-counter*)
+
+;;;###autoload
+(defun gensym (&optional arg)
+  "Generate a new uninterned symbol.
+The name is made by appending a number to PREFIX, default \"G\"."
+  (let ((prefix (if (stringp arg) arg "G"))
+       (num (if (integerp arg) arg
+              (prog1 *gensym-counter*
+                (setq *gensym-counter* (1+ *gensym-counter*))))))
+    (make-symbol (format "%s%d" prefix num))))
+
+;;;###autoload
+(defun gentemp (&optional arg)
+  "Generate a new interned symbol with a unique name.
+The name is made by appending a number to PREFIX, default \"G\"."
+  (let ((prefix (if (stringp arg) arg "G"))
+       name)
+    (while (intern-soft (setq name (format "%s%d" prefix *gensym-counter*)))
+      (setq *gensym-counter* (1+ *gensym-counter*)))
+    (intern name)))
+
+
+;;; Program structure.
+
+;;;###autoload
+(defmacro defun* (name args &rest body)
+  "(defun* NAME ARGLIST [DOCSTRING] BODY...): define NAME as a function.
+Like normal `defun', except ARGLIST allows full Common Lisp conventions,
+and BODY is implicitly surrounded by (block NAME ...)."
+  (let* ((res (cl-transform-lambda (cons args body) name))
+        (form (list* 'defun name (cdr res))))
+    (if (car res) (list 'progn (car res) form) form)))
+
+;;;###autoload
+(defmacro defmacro* (name args &rest body)
+  "(defmacro* NAME ARGLIST [DOCSTRING] BODY...): define NAME as a macro.
+Like normal `defmacro', except ARGLIST allows full Common Lisp conventions,
+and BODY is implicitly surrounded by (block NAME ...)."
+  (let* ((res (cl-transform-lambda (cons args body) name))
+        (form (list* 'defmacro name (cdr res))))
+    (if (car res) (list 'progn (car res) form) form)))
+
+;;;###autoload
+(defmacro function* (func)
+  "(function* SYMBOL-OR-LAMBDA): introduce a function.
+Like normal `function', except that if argument is a lambda form, its
+ARGLIST allows full Common Lisp conventions."
+  (if (eq (car-safe func) 'lambda)
+      (let* ((res (cl-transform-lambda (cdr func) 'cl-none))
+            (form (list 'function (cons 'lambda (cdr res)))))
+       (if (car res) (list 'progn (car res) form) form))
+    (list 'function func)))
+
+(defun cl-transform-function-property (func prop form)
+  (let ((res (cl-transform-lambda form func)))
+    (append '(progn) (cdr (cdr (car res)))
+           (list (list 'put (list 'quote func) (list 'quote prop)
+                       (list 'function (cons 'lambda (cdr res))))))))
+
+(defconst lambda-list-keywords
+  '(&optional &rest &key &allow-other-keys &aux &whole &body &environment))
+
+(defvar cl-macro-environment nil)
+(defvar bind-block) (defvar bind-defs) (defvar bind-enquote)
+(defvar bind-inits) (defvar bind-lets) (defvar bind-forms)
+
+(defun cl-transform-lambda (form bind-block)
+  (let* ((args (car form)) (body (cdr form))
+        (bind-defs nil) (bind-enquote nil)
+        (bind-inits nil) (bind-lets nil) (bind-forms nil)
+        (header nil) (simple-args nil))
+    (while (or (stringp (car body)) (eq (car-safe (car body)) 'interactive))
+      (cl-push (cl-pop body) header))
+    (setq args (if (listp args) (copy-list args) (list '&rest args)))
+    (let ((p (last args))) (if (cdr p) (setcdr p (list '&rest (cdr p)))))
+    (if (setq bind-defs (cadr (memq '&cl-defs args)))
+       (setq args (delq '&cl-defs (delq bind-defs args))
+             bind-defs (cadr bind-defs)))
+    (if (setq bind-enquote (memq '&cl-quote args))
+       (setq args (delq '&cl-quote args)))
+    (if (memq '&whole args) (error "&whole not currently implemented"))
+    (let* ((p (memq '&environment args)) (v (cadr p)))
+      (if p (setq args (nconc (delq (car p) (delq v args))
+                             (list '&aux (list v 'cl-macro-environment))))))
+    (while (and args (symbolp (car args))
+               (not (memq (car args) '(nil &rest &body &key &aux)))
+               (not (and (eq (car args) '&optional)
+                         (or bind-defs (consp (cadr args))))))
+      (cl-push (cl-pop args) simple-args))
+    (or (eq bind-block 'cl-none)
+       (setq body (list (list* 'block bind-block body))))
+    (if (null args)
+       (list* nil (nreverse simple-args) (nconc (nreverse header) body))
+      (if (memq '&optional simple-args) (cl-push '&optional args))
+      (cl-do-arglist args nil (- (length simple-args)
+                                (if (memq '&optional simple-args) 1 0)))
+      (setq bind-lets (nreverse bind-lets))
+      (list* (and bind-inits (list* 'eval-when '(compile load eval)
+                                   (nreverse bind-inits)))
+            (nconc (nreverse simple-args)
+                   (list '&rest (car (cl-pop bind-lets))))
+            (nconc (nreverse header)
+                   (list (nconc (list 'let* bind-lets)
+                                (nreverse bind-forms) body)))))))
+
+(defun cl-do-arglist (args expr &optional num)   ; uses bind-*
+  (if (nlistp args)
+      (if (or (memq args lambda-list-keywords) (not (symbolp args)))
+         (error "Invalid argument name: %s" args)
+       (cl-push (list args expr) bind-lets))
+    (setq args (copy-list args))
+    (let ((p (last args))) (if (cdr p) (setcdr p (list '&rest (cdr p)))))
+    (let ((p (memq '&body args))) (if p (setcar p '&rest)))
+    (if (memq '&environment args) (error "&environment used incorrectly"))
+    (let ((save-args args)
+         (restarg (memq '&rest args))
+         (safety (if (cl-compiling-file) cl-optimize-safety 3))
+         (keys nil)
+         (laterarg nil) (exactarg nil) minarg)
+      (or num (setq num 0))
+      (if (listp (cadr restarg))
+         (setq restarg (gensym "--rest--"))
+       (setq restarg (cadr restarg)))
+      (cl-push (list restarg expr) bind-lets)
+      (if (eq (car args) '&whole)
+         (cl-push (list (cl-pop2 args) restarg) bind-lets))
+      (let ((p args))
+       (setq minarg restarg)
+       (while (and p (not (memq (car p) lambda-list-keywords)))
+         (or (eq p args) (setq minarg (list 'cdr minarg)))
+         (setq p (cdr p)))
+       (if (memq (car p) '(nil &aux))
+           (setq minarg (list '= (list 'length restarg)
+                              (length (ldiff args p)))
+                 exactarg (not (eq args p)))))
+      (while (and args (not (memq (car args) lambda-list-keywords)))
+       (let ((poparg (list (if (or (cdr args) (not exactarg)) 'pop 'car)
+                           restarg)))
+         (cl-do-arglist
+          (cl-pop args)
+          (if (or laterarg (= safety 0)) poparg
+            (list 'if minarg poparg
+                  (list 'signal '(quote wrong-number-of-arguments)
+                        (list 'list (and (not (eq bind-block 'cl-none))
+                                         (list 'quote bind-block))
+                              (list 'length restarg)))))))
+       (setq num (1+ num) laterarg t))
+      (while (and (eq (car args) '&optional) (cl-pop args))
+       (while (and args (not (memq (car args) lambda-list-keywords)))
+         (let ((arg (cl-pop args)))
+           (or (consp arg) (setq arg (list arg)))
+           (if (cddr arg) (cl-do-arglist (nth 2 arg) (list 'and restarg t)))
+           (let ((def (if (cdr arg) (nth 1 arg)
+                        (or (car bind-defs)
+                            (nth 1 (assq (car arg) bind-defs)))))
+                 (poparg (list 'pop restarg)))
+             (and def bind-enquote (setq def (list 'quote def)))
+             (cl-do-arglist (car arg)
+                            (if def (list 'if restarg poparg def) poparg))
+             (setq num (1+ num))))))
+      (if (eq (car args) '&rest)
+         (let ((arg (cl-pop2 args)))
+           (if (consp arg) (cl-do-arglist arg restarg)))
+       (or (eq (car args) '&key) (= safety 0) exactarg
+           (cl-push (list 'if restarg
+                          (list 'signal '(quote wrong-number-of-arguments)
+                                (list 'list
+                                      (and (not (eq bind-block 'cl-none))
+                                           (list 'quote bind-block))
+                                      (list '+ num (list 'length restarg)))))
+                    bind-forms)))
+      (while (and (eq (car args) '&key) (cl-pop args))
+       (while (and args (not (memq (car args) lambda-list-keywords)))
+         (let ((arg (cl-pop args)))
+           (or (consp arg) (setq arg (list arg)))
+           (let* ((karg (if (consp (car arg)) (caar arg)
+                          (intern (format ":%s" (car arg)))))
+                  (varg (if (consp (car arg)) (cadar arg) (car arg)))
+                  (def (if (cdr arg) (cadr arg)
+                         (or (car bind-defs) (cadr (assq varg bind-defs)))))
+                  (look (list 'memq (list 'quote karg) restarg)))
+             (and def bind-enquote (setq def (list 'quote def)))
+             (if (cddr arg)
+                 (let* ((temp (or (nth 2 arg) (gensym)))
+                        (val (list 'car (list 'cdr temp))))
+                   (cl-do-arglist temp look)
+                   (cl-do-arglist varg
+                                  (list 'if temp
+                                        (list 'prog1 val (list 'setq temp t))
+                                        def)))
+               (cl-do-arglist
+                varg
+                (list 'car
+                      (list 'cdr
+                            (if (null def)
+                                look
+                              (list 'or look
+                                    (if (eq (cl-const-expr-p def) t)
+                                        (list
+                                         'quote
+                                         (list nil (cl-const-expr-val def)))
+                                      (list 'list nil def))))))))
+             (cl-push karg keys)
+             (if (= (aref (symbol-name karg) 0) ?:)
+                 (progn (set karg karg)
+                        (cl-push (list 'setq karg (list 'quote karg))
+                                 bind-inits)))))))
+      (setq keys (nreverse keys))
+      (or (and (eq (car args) '&allow-other-keys) (cl-pop args))
+         (null keys) (= safety 0)
+         (let* ((var (gensym "--keys--"))
+                (allow '(:allow-other-keys))
+                (check (list
+                        'while var
+                        (list
+                         'cond
+                         (list (list 'memq (list 'car var)
+                                     (list 'quote (append keys allow)))
+                               (list 'setq var (list 'cdr (list 'cdr var))))
+                         (list (list 'car
+                                     (list 'cdr
+                                           (list 'memq (cons 'quote allow)
+                                                 restarg)))
+                               (list 'setq var nil))
+                         (list t
+                               (list
+                                'error
+                                (format "Keyword argument %%s not one of %s"
+                                        keys)
+                                (list 'car var)))))))
+           (cl-push (list 'let (list (list var restarg)) check) bind-forms)))
+      (while (and (eq (car args) '&aux) (cl-pop args))
+       (while (and args (not (memq (car args) lambda-list-keywords)))
+         (if (consp (car args))
+             (if (and bind-enquote (cadar args))
+                 (cl-do-arglist (caar args)
+                                (list 'quote (cadr (cl-pop args))))
+               (cl-do-arglist (caar args) (cadr (cl-pop args))))
+           (cl-do-arglist (cl-pop args) nil))))
+      (if args (error "Malformed argument list %s" save-args)))))
+
+(defun cl-arglist-args (args)
+  (if (nlistp args) (list args)
+    (let ((res nil) (kind nil) arg)
+      (while (consp args)
+       (setq arg (cl-pop args))
+       (if (memq arg lambda-list-keywords) (setq kind arg)
+         (if (eq arg '&cl-defs) (cl-pop args)
+           (and (consp arg) kind (setq arg (car arg)))
+           (and (consp arg) (cdr arg) (eq kind '&key) (setq arg (cadr arg)))
+           (setq res (nconc res (cl-arglist-args arg))))))
+      (nconc res (and args (list args))))))
+
+;;;###autoload
+(defmacro destructuring-bind (args expr &rest body)
+  (let* ((bind-lets nil) (bind-forms nil) (bind-inits nil)
+        (bind-defs nil) (bind-block 'cl-none))
+    (cl-do-arglist (or args '(&aux)) expr)
+    (append '(progn) bind-inits
+           (list (nconc (list 'let* (nreverse bind-lets))
+                        (nreverse bind-forms) body)))))
+
+
+;;; The `eval-when' form.
+
+(defvar cl-not-toplevel nil)
+
+;;;###autoload
+(defmacro eval-when (when &rest body)
+  "(eval-when (WHEN...) BODY...): control when BODY is evaluated.
+If `compile' is in WHEN, BODY is evaluated when compiled at top-level.
+If `load' is in WHEN, BODY is evaluated when loaded after top-level compile.
+If `eval' is in WHEN, BODY is evaluated when interpreted or at non-top-level."
+  (if (and (fboundp 'cl-compiling-file) (cl-compiling-file)
+          (not cl-not-toplevel) (not (boundp 'for-effect)))  ; horrible kludge
+      (let ((comp (or (memq 'compile when) (memq ':compile-toplevel when)))
+           (cl-not-toplevel t))
+       (if (or (memq 'load when) (memq ':load-toplevel when))
+           (if comp (cons 'progn (mapcar 'cl-compile-time-too body))
+             (list* 'if nil nil body))
+         (progn (if comp (eval (cons 'progn body))) nil)))
+    (and (or (memq 'eval when) (memq ':execute when))
+        (cons 'progn body))))
+
+(defun cl-compile-time-too (form)
+  (or (and (symbolp (car-safe form)) (get (car-safe form) 'byte-hunk-handler))
+      (setq form (macroexpand
+                 form (cons '(eval-when) byte-compile-macro-environment))))
+  (cond ((eq (car-safe form) 'progn)
+        (cons 'progn (mapcar 'cl-compile-time-too (cdr form))))
+       ((eq (car-safe form) 'eval-when)
+        (let ((when (nth 1 form)))
+          (if (or (memq 'eval when) (memq ':execute when))
+              (list* 'eval-when (cons 'compile when) (cddr form))
+            form)))
+       (t (eval form) form)))
+
+(or (and (fboundp 'eval-when-compile)
+        (not (eq (car-safe (symbol-function 'eval-when-compile)) 'autoload)))
+    (eval '(defmacro eval-when-compile (&rest body)
+            "Like `progn', but evaluates the body at compile time.
+The result of the body appears to the compiler as a quoted constant."
+            (list 'quote (eval (cons 'progn body))))))
+
+;;;###autoload
+(defmacro load-time-value (form &optional read-only)
+  "Like `progn', but evaluates the body at load time.
+The result of the body appears to the compiler as a quoted constant."
+  (if (cl-compiling-file)
+      (let* ((temp (gentemp "--cl-load-time--"))
+            (set (list 'set (list 'quote temp) form)))
+       (if (and (fboundp 'byte-compile-file-form-defmumble)
+                (boundp 'this-kind) (boundp 'that-one))
+           (fset 'byte-compile-file-form
+                 (list 'lambda '(form)
+                       (list 'fset '(quote byte-compile-file-form)
+                             (list 'quote
+                                   (symbol-function 'byte-compile-file-form)))
+                       (list 'byte-compile-file-form (list 'quote set))
+                       '(byte-compile-file-form form)))
+         ;; XEmacs change
+         (print set (symbol-value ;;'outbuffer
+                                  'byte-compile-output-buffer
+                                  )))
+       (list 'symbol-value (list 'quote temp)))
+    (list 'quote (eval form))))
+
+
+;;; Conditional control structures.
+
+;;;###autoload
+(defmacro case (expr &rest clauses)
+  "(case EXPR CLAUSES...): evals EXPR, chooses from CLAUSES on that value.
+Each clause looks like (KEYLIST BODY...).  EXPR is evaluated and compared
+against each key in each KEYLIST; the corresponding BODY is evaluated.
+If no clause succeeds, case returns nil.  A single atom may be used in
+place of a KEYLIST of one atom.  A KEYLIST of `t' or `otherwise' is
+allowed only in the final clause, and matches if no other keys match.
+Key values are compared by `eql'."
+  (let* ((temp (if (cl-simple-expr-p expr 3) expr (gensym)))
+        (head-list nil)
+        (last-clause (car (last clauses)))
+        (body (cons
+               'cond
+               (mapcar
+                (function
+                 (lambda (c)
+                   (cons (cond ((memq (car c) '(t otherwise))
+                                (or (eq c last-clause)
+                                    (error
+                                     "`%s' is allowed only as the last case clause"
+                                     (car c)))
+                                t)
+                               ((eq (car c) 'ecase-error-flag)
+                                (list 'error "ecase failed: %s, %s"
+                                      temp (list 'quote (reverse head-list))))
+                               ((listp (car c))
+                                (setq head-list (append (car c) head-list))
+                                (list 'member* temp (list 'quote (car c))))
+                               (t
+                                (if (memq (car c) head-list)
+                                    (error "Duplicate key in case: %s"
+                                           (car c)))
+                                (cl-push (car c) head-list)
+                                (list 'eql temp (list 'quote (car c)))))
+                         (or (cdr c) '(nil)))))
+                clauses))))
+    (if (eq temp expr) body
+      (list 'let (list (list temp expr)) body))))
+
+;; #### CL standard also requires `ccase', which signals a continuable
+;; error (`cerror' in XEmacs).  However, I don't think it buys us
+;; anything to introduce it, as there is probably much more CL stuff
+;; missing, and the feature is not essential.  --hniksic
+
+;;;###autoload
+(defmacro ecase (expr &rest clauses)
+  "(ecase EXPR CLAUSES...): like `case', but error if no case fits.
+`otherwise'-clauses are not allowed."
+  (let ((disallowed (or (assq t clauses)
+                       (assq 'otherwise clauses))))
+    (if disallowed
+       (error "`%s' is not allowed in ecase" (car disallowed))))
+  (list* 'case expr (append clauses '((ecase-error-flag)))))
+
+;;;###autoload
+(defmacro typecase (expr &rest clauses)
+  "(typecase EXPR CLAUSES...): evals EXPR, chooses from CLAUSES on that value.
+Each clause looks like (TYPE BODY...).  EXPR is evaluated and, if it
+satisfies TYPE, the corresponding BODY is evaluated.  If no clause succeeds,
+typecase returns nil.  A TYPE of `t' or `otherwise' is allowed only in the
+final clause, and matches if no other keys match."
+  (let* ((temp (if (cl-simple-expr-p expr 3) expr (gensym)))
+        (type-list nil)
+        (body (cons
+               'cond
+               (mapcar
+                (function
+                 (lambda (c)
+                   (cons (cond ((eq (car c) 'otherwise) t)
+                               ((eq (car c) 'ecase-error-flag)
+                                (list 'error "etypecase failed: %s, %s"
+                                      temp (list 'quote (reverse type-list))))
+                               (t
+                                (cl-push (car c) type-list)
+                                (cl-make-type-test temp (car c))))
+                         (or (cdr c) '(nil)))))
+                clauses))))
+    (if (eq temp expr) body
+      (list 'let (list (list temp expr)) body))))
+
+;;;###autoload
+(defmacro etypecase (expr &rest clauses)
+  "(etypecase EXPR CLAUSES...): like `typecase', but error if no case fits.
+`otherwise'-clauses are not allowed."
+  (list* 'typecase expr (append clauses '((ecase-error-flag)))))
+
+
+;;; Blocks and exits.
+
+;;;###autoload
+(defmacro block (name &rest body)
+  "(block NAME BODY...): define a lexically-scoped block named NAME.
+NAME may be any symbol.  Code inside the BODY forms can call `return-from'
+to jump prematurely out of the block.  This differs from `catch' and `throw'
+in two respects:  First, the NAME is an unevaluated symbol rather than a
+quoted symbol or other form; and second, NAME is lexically rather than
+dynamically scoped:  Only references to it within BODY will work.  These
+references may appear inside macro expansions, but not inside functions
+called from BODY."
+  (if (cl-safe-expr-p (cons 'progn body)) (cons 'progn body)
+    (list 'cl-block-wrapper
+         (list* 'catch (list 'quote (intern (format "--cl-block-%s--" name)))
+                body))))
+
+(defvar cl-active-block-names nil)
+
+(put 'cl-block-wrapper 'byte-compile 'cl-byte-compile-block)
+(defun cl-byte-compile-block (cl-form)
+  (if (fboundp 'byte-compile-form-do-effect)  ; Check for optimizing compiler
+      (progn
+       (let* ((cl-entry (cons (nth 1 (nth 1 (nth 1 cl-form))) nil))
+              (cl-active-block-names (cons cl-entry cl-active-block-names))
+              (cl-body (byte-compile-top-level
+                        (cons 'progn (cddr (nth 1 cl-form))))))
+         (if (cdr cl-entry)
+             (byte-compile-form (list 'catch (nth 1 (nth 1 cl-form)) cl-body))
+           (byte-compile-form cl-body))))
+    (byte-compile-form (nth 1 cl-form))))
+
+(put 'cl-block-throw 'byte-compile 'cl-byte-compile-throw)
+(defun cl-byte-compile-throw (cl-form)
+  (let ((cl-found (assq (nth 1 (nth 1 cl-form)) cl-active-block-names)))
+    (if cl-found (setcdr cl-found t)))
+  (byte-compile-normal-call (cons 'throw (cdr cl-form))))
+
+;;;###autoload
+(defmacro return (&optional res)
+  "(return [RESULT]): return from the block named nil.
+This is equivalent to `(return-from nil RESULT)'."
+  (list 'return-from nil res))
+
+;;;###autoload
+(defmacro return-from (name &optional res)
+  "(return-from NAME [RESULT]): return from the block named NAME.
+This jump out to the innermost enclosing `(block NAME ...)' form,
+returning RESULT from that form (or nil if RESULT is omitted).
+This is compatible with Common Lisp, but note that `defun' and
+`defmacro' do not create implicit blocks as they do in Common Lisp."
+  (let ((name2 (intern (format "--cl-block-%s--" name))))
+    (list 'cl-block-throw (list 'quote name2) res)))
+
+
+;;; The "loop" macro.
+
+(defvar args) (defvar loop-accum-var) (defvar loop-accum-vars)
+(defvar loop-bindings) (defvar loop-body) (defvar loop-destr-temps)
+(defvar loop-finally) (defvar loop-finish-flag) (defvar loop-first-flag)
+(defvar loop-initially) (defvar loop-map-form) (defvar loop-name)
+(defvar loop-result) (defvar loop-result-explicit)
+(defvar loop-result-var) (defvar loop-steps) (defvar loop-symbol-macs)
+
+;;;###autoload
+(defmacro loop (&rest args)
+  "(loop CLAUSE...): The Common Lisp `loop' macro.
+Valid clauses are:
+  for VAR from/upfrom/downfrom NUM to/upto/downto/above/below NUM by NUM,
+  for VAR in LIST by FUNC, for VAR on LIST by FUNC, for VAR = INIT then EXPR,
+  for VAR across ARRAY, repeat NUM, with VAR = INIT, while COND, until COND,
+  always COND, never COND, thereis COND, collect EXPR into VAR,
+  append EXPR into VAR, nconc EXPR into VAR, sum EXPR into VAR,
+  count EXPR into VAR, maximize EXPR into VAR, minimize EXPR into VAR,
+  if COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...],
+  unless COND CLAUSE [and CLAUSE]... else CLAUSE [and CLAUSE...],
+  do EXPRS..., initially EXPRS..., finally EXPRS..., return EXPR,
+  finally return EXPR, named NAME."
+  (if (not (memq t (mapcar 'symbolp (delq nil (delq t (copy-list args))))))
+      (list 'block nil (list* 'while t args))
+    (let ((loop-name nil)      (loop-bindings nil)
+         (loop-body nil)       (loop-steps nil)
+         (loop-result nil)     (loop-result-explicit nil)
+         (loop-result-var nil) (loop-finish-flag nil)
+         (loop-accum-var nil)  (loop-accum-vars nil)
+         (loop-initially nil)  (loop-finally nil)
+         (loop-map-form nil)   (loop-first-flag nil)
+         (loop-destr-temps nil) (loop-symbol-macs nil))
+      (setq args (append args '(cl-end-loop)))
+      (while (not (eq (car args) 'cl-end-loop)) (cl-parse-loop-clause))
+      (if loop-finish-flag
+         (cl-push (list (list loop-finish-flag t)) loop-bindings))
+      (if loop-first-flag
+         (progn (cl-push (list (list loop-first-flag t)) loop-bindings)
+                (cl-push (list 'setq loop-first-flag nil) loop-steps)))
+      (let* ((epilogue (nconc (nreverse loop-finally)
+                             (list (or loop-result-explicit loop-result))))
+            (ands (cl-loop-build-ands (nreverse loop-body)))
+            (while-body (nconc (cadr ands) (nreverse loop-steps)))
+            (body (append
+                   (nreverse loop-initially)
+                   (list (if loop-map-form
+                             (list 'block '--cl-finish--
+                                   (subst
+                                    (if (eq (car ands) t) while-body
+                                      (cons (list 'or (car ands)
+                                                  '(return-from --cl-finish--
+                                                     nil))
+                                            while-body))
+                                    '--cl-map loop-map-form))
+                           (list* 'while (car ands) while-body)))
+                   (if loop-finish-flag
+                       (if (equal epilogue '(nil)) (list loop-result-var)
+                         (list (list 'if loop-finish-flag
+                                     (cons 'progn epilogue) loop-result-var)))
+                     epilogue))))
+       (if loop-result-var (cl-push (list loop-result-var) loop-bindings))
+       (while loop-bindings
+         (if (cdar loop-bindings)
+             (setq body (list (cl-loop-let (cl-pop loop-bindings) body t)))
+           (let ((lets nil))
+             (while (and loop-bindings
+                         (not (cdar loop-bindings)))
+               (cl-push (car (cl-pop loop-bindings)) lets))
+             (setq body (list (cl-loop-let lets body nil))))))
+       (if loop-symbol-macs
+           (setq body (list (list* 'symbol-macrolet loop-symbol-macs body))))
+       (list* 'block loop-name body)))))
+
+(defun cl-parse-loop-clause ()   ; uses args, loop-*
+  (let ((word (cl-pop args))
+       (hash-types '(hash-key hash-keys hash-value hash-values))
+       (key-types '(key-code key-codes key-seq key-seqs
+                    key-binding key-bindings)))
+    (cond
+
+     ((null args)
+      (error "Malformed `loop' macro"))
+
+     ((eq word 'named)
+      (setq loop-name (cl-pop args)))
+
+     ((eq word 'initially)
+      (if (memq (car args) '(do doing)) (cl-pop args))
+      (or (consp (car args)) (error "Syntax error on `initially' clause"))
+      (while (consp (car args))
+       (cl-push (cl-pop args) loop-initially)))
+
+     ((eq word 'finally)
+      (if (eq (car args) 'return)
+         (setq loop-result-explicit (or (cl-pop2 args) '(quote nil)))
+       (if (memq (car args) '(do doing)) (cl-pop args))
+       (or (consp (car args)) (error "Syntax error on `finally' clause"))
+       (if (and (eq (caar args) 'return) (null loop-name))
+           (setq loop-result-explicit (or (nth 1 (cl-pop args)) '(quote nil)))
+         (while (consp (car args))
+           (cl-push (cl-pop args) loop-finally)))))
+
+     ((memq word '(for as))
+      (let ((loop-for-bindings nil) (loop-for-sets nil) (loop-for-steps nil)
+           (ands nil))
+       (while
+           (let ((var (or (cl-pop args) (gensym))))
+             (setq word (cl-pop args))
+             (if (eq word 'being) (setq word (cl-pop args)))
+             (if (memq word '(the each)) (setq word (cl-pop args)))
+             (if (memq word '(buffer buffers))
+                 (setq word 'in args (cons '(buffer-list) args)))
+             (cond
+
+              ((memq word '(from downfrom upfrom to downto upto
+                            above below by))
+               (cl-push word args)
+               (if (memq (car args) '(downto above))
+                   (error "Must specify `from' value for downward loop"))
+               (let* ((down (or (eq (car args) 'downfrom)
+                                (memq (caddr args) '(downto above))))
+                      (excl (or (memq (car args) '(above below))
+                                (memq (caddr args) '(above below))))
+                      (start (and (memq (car args) '(from upfrom downfrom))
+                                  (cl-pop2 args)))
+                      (end (and (memq (car args)
+                                      '(to upto downto above below))
+                                (cl-pop2 args)))
+                      (step (and (eq (car args) 'by) (cl-pop2 args)))
+                      (end-var (and (not (cl-const-expr-p end)) (gensym)))
+                      (step-var (and (not (cl-const-expr-p step))
+                                     (gensym))))
+                 (and step (numberp step) (<= step 0)
+                      (error "Loop `by' value is not positive: %s" step))
+                 (cl-push (list var (or start 0)) loop-for-bindings)
+                 (if end-var (cl-push (list end-var end) loop-for-bindings))
+                 (if step-var (cl-push (list step-var step)
+                                       loop-for-bindings))
+                 (if end
+                     (cl-push (list
+                               (if down (if excl '> '>=) (if excl '< '<=))
+                               var (or end-var end)) loop-body))
+                 (cl-push (list var (list (if down '- '+) var
+                                          (or step-var step 1)))
+                          loop-for-steps)))
+
+              ((memq word '(in in-ref on))
+               (let* ((on (eq word 'on))
+                      (temp (if (and on (symbolp var)) var (gensym))))
+                 (cl-push (list temp (cl-pop args)) loop-for-bindings)
+                 (cl-push (list 'consp temp) loop-body)
+                 (if (eq word 'in-ref)
+                     (cl-push (list var (list 'car temp)) loop-symbol-macs)
+                   (or (eq temp var)
+                       (progn
+                         (cl-push (list var nil) loop-for-bindings)
+                         (cl-push (list var (if on temp (list 'car temp)))
+                                  loop-for-sets))))
+                 (cl-push (list temp
+                                (if (eq (car args) 'by)
+                                    (let ((step (cl-pop2 args)))
+                                      (if (and (memq (car-safe step)
+                                                     '(quote function
+                                                             function*))
+                                               (symbolp (nth 1 step)))
+                                          (list (nth 1 step) temp)
+                                        (list 'funcall step temp)))
+                                  (list 'cdr temp)))
+                          loop-for-steps)))
+
+              ((eq word '=)
+               (let* ((start (cl-pop args))
+                      (then (if (eq (car args) 'then) (cl-pop2 args) start)))
+                 (cl-push (list var nil) loop-for-bindings)
+                 (if (or ands (eq (car args) 'and))
+                     (progn
+                       (cl-push (list var
+                                      (list 'if
+                                            (or loop-first-flag
+                                                (setq loop-first-flag
+                                                      (gensym)))
+                                            start var))
+                                loop-for-sets)
+                       (cl-push (list var then) loop-for-steps))
+                   (cl-push (list var
+                                  (if (eq start then) start
+                                    (list 'if
+                                          (or loop-first-flag
+                                              (setq loop-first-flag (gensym)))
+                                          start then)))
+                            loop-for-sets))))
+
+              ((memq word '(across across-ref))
+               (let ((temp-vec (gensym)) (temp-idx (gensym)))
+                 (cl-push (list temp-vec (cl-pop args)) loop-for-bindings)
+                 (cl-push (list temp-idx -1) loop-for-bindings)
+                 (cl-push (list '< (list 'setq temp-idx (list '1+ temp-idx))
+                                (list 'length temp-vec)) loop-body)
+                 (if (eq word 'across-ref)
+                     (cl-push (list var (list 'aref temp-vec temp-idx))
+                              loop-symbol-macs)
+                   (cl-push (list var nil) loop-for-bindings)
+                   (cl-push (list var (list 'aref temp-vec temp-idx))
+                            loop-for-sets))))
+
+              ((memq word '(element elements))
+               (let ((ref (or (memq (car args) '(in-ref of-ref))
+                              (and (not (memq (car args) '(in of)))
+                                   (error "Expected `of'"))))
+                     (seq (cl-pop2 args))
+                     (temp-seq (gensym))
+                     (temp-idx (if (eq (car args) 'using)
+                                   (if (and (= (length (cadr args)) 2)
+                                            (eq (caadr args) 'index))
+                                       (cadr (cl-pop2 args))
+                                     (error "Bad `using' clause"))
+                                 (gensym))))
+                 (cl-push (list temp-seq seq) loop-for-bindings)
+                 (cl-push (list temp-idx 0) loop-for-bindings)
+                 (if ref
+                     (let ((temp-len (gensym)))
+                       (cl-push (list temp-len (list 'length temp-seq))
+                                loop-for-bindings)
+                       (cl-push (list var (list 'elt temp-seq temp-idx))
+                                loop-symbol-macs)
+                       (cl-push (list '< temp-idx temp-len) loop-body))
+                   (cl-push (list var nil) loop-for-bindings)
+                   (cl-push (list 'and temp-seq
+                                  (list 'or (list 'consp temp-seq)
+                                        (list '< temp-idx
+                                              (list 'length temp-seq))))
+                            loop-body)
+                   (cl-push (list var (list 'if (list 'consp temp-seq)
+                                            (list 'pop temp-seq)
+                                            (list 'aref temp-seq temp-idx)))
+                            loop-for-sets))
+                 (cl-push (list temp-idx (list '1+ temp-idx))
+                          loop-for-steps)))
+
+              ((memq word hash-types)
+               (or (memq (car args) '(in of)) (error "Expected `of'"))
+               (let* ((table (cl-pop2 args))
+                      (other (if (eq (car args) 'using)
+                                 (if (and (= (length (cadr args)) 2)
+                                          (memq (caadr args) hash-types)
+                                          (not (eq (caadr args) word)))
+                                     (cadr (cl-pop2 args))
+                                   (error "Bad `using' clause"))
+                               (gensym))))
+                 (if (memq word '(hash-value hash-values))
+                     (setq var (prog1 other (setq other var))))
+                 (setq loop-map-form
+                       (list 'maphash (list 'function
+                                            (list* 'lambda (list var other)
+                                                   '--cl-map)) table))))
+
+              ((memq word '(symbol present-symbol external-symbol
+                            symbols present-symbols external-symbols))
+               (let ((ob (and (memq (car args) '(in of)) (cl-pop2 args))))
+                 (setq loop-map-form
+                       (list 'mapatoms (list 'function
+                                             (list* 'lambda (list var)
+                                                    '--cl-map)) ob))))
+
+              ((memq word '(overlay overlays extent extents))
+               (let ((buf nil) (from nil) (to nil))
+                 (while (memq (car args) '(in of from to))
+                   (cond ((eq (car args) 'from) (setq from (cl-pop2 args)))
+                         ((eq (car args) 'to) (setq to (cl-pop2 args)))
+                         (t (setq buf (cl-pop2 args)))))
+                 (setq loop-map-form
+                       (list 'cl-map-extents
+                             (list 'function (list 'lambda (list var (gensym))
+                                                   '(progn . --cl-map) nil))
+                             buf from to))))
+
+              ((memq word '(interval intervals))
+               (let ((buf nil) (prop nil) (from nil) (to nil)
+                     (var1 (gensym)) (var2 (gensym)))
+                 (while (memq (car args) '(in of property from to))
+                   (cond ((eq (car args) 'from) (setq from (cl-pop2 args)))
+                         ((eq (car args) 'to) (setq to (cl-pop2 args)))
+                         ((eq (car args) 'property)
+                          (setq prop (cl-pop2 args)))
+                         (t (setq buf (cl-pop2 args)))))
+                 (if (and (consp var) (symbolp (car var)) (symbolp (cdr var)))
+                     (setq var1 (car var) var2 (cdr var))
+                   (cl-push (list var (list 'cons var1 var2)) loop-for-sets))
+                 (setq loop-map-form
+                       (list 'cl-map-intervals
+                             (list 'function (list 'lambda (list var1 var2)
+                                                   '(progn . --cl-map)))
+                             buf prop from to))))
+
+              ((memq word key-types)
+               (or (memq (car args) '(in of)) (error "Expected `of'"))
+               (let ((map (cl-pop2 args))
+                     (other (if (eq (car args) 'using)
+                                (if (and (= (length (cadr args)) 2)
+                                         (memq (caadr args) key-types)
+                                         (not (eq (caadr args) word)))
+                                    (cadr (cl-pop2 args))
+                                  (error "Bad `using' clause"))
+                              (gensym))))
+                 (if (memq word '(key-binding key-bindings))
+                     (setq var (prog1 other (setq other var))))
+                 (setq loop-map-form
+                       (list (if (memq word '(key-seq key-seqs))
+                                 'cl-map-keymap-recursively 'cl-map-keymap)
+                             (list 'function (list* 'lambda (list var other)
+                                                    '--cl-map)) map))))
+
+              ((memq word '(frame frames screen screens))
+               (let ((temp (gensym)))
+                 (cl-push (list var '(selected-frame))
+                          loop-for-bindings)
+                 (cl-push (list temp nil) loop-for-bindings)
+                 (cl-push (list 'prog1 (list 'not (list 'eq var temp))
+                                (list 'or temp (list 'setq temp var)))
+                          loop-body)
+                 (cl-push (list var (list 'next-frame var))
+                          loop-for-steps)))
+
+              ((memq word '(window windows))
+               (let ((scr (and (memq (car args) '(in of)) (cl-pop2 args)))
+                     (temp (gensym)))
+                 (cl-push (list var (if scr
+                                        (list 'frame-selected-window scr)
+                                      '(selected-window)))
+                          loop-for-bindings)
+                 (cl-push (list temp nil) loop-for-bindings)
+                 (cl-push (list 'prog1 (list 'not (list 'eq var temp))
+                                (list 'or temp (list 'setq temp var)))
+                          loop-body)
+                 (cl-push (list var (list 'next-window var)) loop-for-steps)))
+
+              (t
+               (let ((handler (and (symbolp word)
+                                   (get word 'cl-loop-for-handler))))
+                 (if handler
+                     (funcall handler var)
+                   (error "Expected a `for' preposition, found %s" word)))))
+             (eq (car args) 'and))
+         (setq ands t)
+         (cl-pop args))
+       (if (and ands loop-for-bindings)
+           (cl-push (nreverse loop-for-bindings) loop-bindings)
+         (setq loop-bindings (nconc (mapcar 'list loop-for-bindings)
+                                    loop-bindings)))
+       (if loop-for-sets
+           (cl-push (list 'progn
+                          (cl-loop-let (nreverse loop-for-sets) 'setq ands)
+                          t) loop-body))
+       (if loop-for-steps
+           (cl-push (cons (if ands 'psetq 'setq)
+                          (apply 'append (nreverse loop-for-steps)))
+                    loop-steps))))
+
+     ((eq word 'repeat)
+      (let ((temp (gensym)))
+       (cl-push (list (list temp (cl-pop args))) loop-bindings)
+       (cl-push (list '>= (list 'setq temp (list '1- temp)) 0) loop-body)))
+
+     ((eq word 'collect)
+      (let ((what (cl-pop args))
+           (var (cl-loop-handle-accum nil 'nreverse)))
+       (if (eq var loop-accum-var)
+           (cl-push (list 'progn (list 'push what var) t) loop-body)
+         (cl-push (list 'progn
+                        (list 'setq var (list 'nconc var (list 'list what)))
+                        t) loop-body))))
+
+     ((memq word '(nconc nconcing append appending))
+      (let ((what (cl-pop args))
+           (var (cl-loop-handle-accum nil 'nreverse)))
+       (cl-push (list 'progn
+                      (list 'setq var
+                            (if (eq var loop-accum-var)
+                                (list 'nconc
+                                      (list (if (memq word '(nconc nconcing))
+                                                'nreverse 'reverse)
+                                            what)
+                                      var)
+                              (list (if (memq word '(nconc nconcing))
+                                        'nconc 'append)
+                                    var what))) t) loop-body)))
+
+     ((memq word '(concat concating))
+      (let ((what (cl-pop args))
+           (var (cl-loop-handle-accum "")))
+       (cl-push (list 'progn (list 'callf 'concat var what) t) loop-body)))
+
+     ((memq word '(vconcat vconcating))
+      (let ((what (cl-pop args))
+           (var (cl-loop-handle-accum [])))
+       (cl-push (list 'progn (list 'callf 'vconcat var what) t) loop-body)))
+
+     ((memq word '(sum summing))
+      (let ((what (cl-pop args))
+           (var (cl-loop-handle-accum 0)))
+       (cl-push (list 'progn (list 'incf var what) t) loop-body)))
+
+     ((memq word '(count counting))
+      (let ((what (cl-pop args))
+           (var (cl-loop-handle-accum 0)))
+       (cl-push (list 'progn (list 'if what (list 'incf var)) t) loop-body)))
+
+     ((memq word '(minimize minimizing maximize maximizing))
+      (let* ((what (cl-pop args))
+            (temp (if (cl-simple-expr-p what) what (gensym)))
+            (var (cl-loop-handle-accum nil))
+            (func (intern (substring (symbol-name word) 0 3)))
+            (set (list 'setq var (list 'if var (list func var temp) temp))))
+       (cl-push (list 'progn (if (eq temp what) set
+                               (list 'let (list (list temp what)) set))
+                      t) loop-body)))
+
+     ((eq word 'with)
+      (let ((bindings nil))
+       (while (progn (cl-push (list (cl-pop args)
+                                    (and (eq (car args) '=) (cl-pop2 args)))
+                              bindings)
+                     (eq (car args) 'and))
+         (cl-pop args))
+       (cl-push (nreverse bindings) loop-bindings)))
+
+     ((eq word 'while)
+      (cl-push (cl-pop args) loop-body))
+
+     ((eq word 'until)
+      (cl-push (list 'not (cl-pop args)) loop-body))
+
+     ((eq word 'always)
+      (or loop-finish-flag (setq loop-finish-flag (gensym)))
+      (cl-push (list 'setq loop-finish-flag (cl-pop args)) loop-body)
+      (setq loop-result t))
+
+     ((eq word 'never)
+      (or loop-finish-flag (setq loop-finish-flag (gensym)))
+      (cl-push (list 'setq loop-finish-flag (list 'not (cl-pop args)))
+              loop-body)
+      (setq loop-result t))
+
+     ((eq word 'thereis)
+      (or loop-finish-flag (setq loop-finish-flag (gensym)))
+      (or loop-result-var (setq loop-result-var (gensym)))
+      (cl-push (list 'setq loop-finish-flag
+                    (list 'not (list 'setq loop-result-var (cl-pop args))))
+              loop-body))
+
+     ((memq word '(if when unless))
+      (let* ((cond (cl-pop args))
+            (then (let ((loop-body nil))
+                    (cl-parse-loop-clause)
+                    (cl-loop-build-ands (nreverse loop-body))))
+            (else (let ((loop-body nil))
+                    (if (eq (car args) 'else)
+                        (progn (cl-pop args) (cl-parse-loop-clause)))
+                    (cl-loop-build-ands (nreverse loop-body))))
+            (simple (and (eq (car then) t) (eq (car else) t))))
+       (if (eq (car args) 'end) (cl-pop args))
+       (if (eq word 'unless) (setq then (prog1 else (setq else then))))
+       (let ((form (cons (if simple (cons 'progn (nth 1 then)) (nth 2 then))
+                         (if simple (nth 1 else) (list (nth 2 else))))))
+         (if (cl-expr-contains form 'it)
+             (let ((temp (gensym)))
+               (cl-push (list temp) loop-bindings)
+               (setq form (list* 'if (list 'setq temp cond)
+                                 (subst temp 'it form))))
+           (setq form (list* 'if cond form)))
+         (cl-push (if simple (list 'progn form t) form) loop-body))))
+
+     ((memq word '(do doing))
+      (let ((body nil))
+       (or (consp (car args)) (error "Syntax error on `do' clause"))
+       (while (consp (car args)) (cl-push (cl-pop args) body))
+       (cl-push (cons 'progn (nreverse (cons t body))) loop-body)))
+
+     ((eq word 'return)
+      (or loop-finish-flag (setq loop-finish-flag (gensym)))
+      (or loop-result-var (setq loop-result-var (gensym)))
+      (cl-push (list 'setq loop-result-var (cl-pop args)
+                    loop-finish-flag nil) loop-body))
+
+     (t
+      (let ((handler (and (symbolp word) (get word 'cl-loop-handler))))
+       (or handler (error "Expected a loop keyword, found %s" word))
+       (funcall handler))))
+    (if (eq (car args) 'and)
+       (progn (cl-pop args) (cl-parse-loop-clause)))))
+
+(defun cl-loop-let (specs body par)   ; uses loop-*
+  (let ((p specs) (temps nil) (new nil))
+    (while (and p (or (symbolp (car-safe (car p))) (null (cadar p))))
+      (setq p (cdr p)))
+    (and par p
+        (progn
+          (setq par nil p specs)
+          (while p
+            (or (cl-const-expr-p (cadar p))
+                (let ((temp (gensym)))
+                  (cl-push (list temp (cadar p)) temps)
+                  (setcar (cdar p) temp)))
+            (setq p (cdr p)))))
+    (while specs
+      (if (and (consp (car specs)) (listp (caar specs)))
+         (let* ((spec (caar specs)) (nspecs nil)
+                (expr (cadr (cl-pop specs)))
+                (temp (cdr (or (assq spec loop-destr-temps)
+                               (car (cl-push (cons spec (or (last spec 0)
+                                                            (gensym)))
+                                             loop-destr-temps))))))
+           (cl-push (list temp expr) new)
+           (while (consp spec)
+             (cl-push (list (cl-pop spec)
+                            (and expr (list (if spec 'pop 'car) temp)))
+                      nspecs))
+           (setq specs (nconc (nreverse nspecs) specs)))
+       (cl-push (cl-pop specs) new)))
+    (if (eq body 'setq)
+       (let ((set (cons (if par 'psetq 'setq) (apply 'nconc (nreverse new)))))
+         (if temps (list 'let* (nreverse temps) set) set))
+      (list* (if par 'let 'let*)
+            (nconc (nreverse temps) (nreverse new)) body))))
+
+(defun cl-loop-handle-accum (def &optional func)   ; uses args, loop-*
+  (if (eq (car args) 'into)
+      (let ((var (cl-pop2 args)))
+       (or (memq var loop-accum-vars)
+           (progn (cl-push (list (list var def)) loop-bindings)
+                  (cl-push var loop-accum-vars)))
+       var)
+    (or loop-accum-var
+       (progn
+         (cl-push (list (list (setq loop-accum-var (gensym)) def))
+                  loop-bindings)
+         (setq loop-result (if func (list func loop-accum-var)
+                             loop-accum-var))
+         loop-accum-var))))
+
+(defun cl-loop-build-ands (clauses)
+  (let ((ands nil)
+       (body nil))
+    (while clauses
+      (if (and (eq (car-safe (car clauses)) 'progn)
+              (eq (car (last (car clauses))) t))
+         (if (cdr clauses)
+             (setq clauses (cons (nconc (butlast (car clauses))
+                                        (if (eq (car-safe (cadr clauses))
+                                                'progn)
+                                            (cdadr clauses)
+                                          (list (cadr clauses))))
+                                 (cddr clauses)))
+           (setq body (cdr (butlast (cl-pop clauses)))))
+       (cl-push (cl-pop clauses) ands)))
+    (setq ands (or (nreverse ands) (list t)))
+    (list (if (cdr ands) (cons 'and ands) (car ands))
+         body
+         (let ((full (if body
+                         (append ands (list (cons 'progn (append body '(t)))))
+                       ands)))
+           (if (cdr full) (cons 'and full) (car full))))))
+
+
+;;; Other iteration control structures.
+
+;;;###autoload
+(defmacro do (steps endtest &rest body)
+  "The Common Lisp `do' loop.
+Format is: (do ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)"
+  (cl-expand-do-loop steps endtest body nil))
+
+;;;###autoload
+(defmacro do* (steps endtest &rest body)
+  "The Common Lisp `do*' loop.
+Format is: (do* ((VAR INIT [STEP])...) (END-TEST [RESULT...]) BODY...)"
+  (cl-expand-do-loop steps endtest body t))
+
+(defun cl-expand-do-loop (steps endtest body star)
+  (list 'block nil
+       (list* (if star 'let* 'let)
+              (mapcar (function (lambda (c)
+                                  (if (consp c) (list (car c) (nth 1 c)) c)))
+                      steps)
+              (list* 'while (list 'not (car endtest))
+                     (append body
+                             (let ((sets (mapcar
+                                          (function
+                                           (lambda (c)
+                                             (and (consp c) (cdr (cdr c))
+                                                  (list (car c) (nth 2 c)))))
+                                          steps)))
+                               (setq sets (delq nil sets))
+                               (and sets
+                                    (list (cons (if (or star (not (cdr sets)))
+                                                    'setq 'psetq)
+                                                (apply 'append sets)))))))
+              (or (cdr endtest) '(nil)))))
+
+;;;###autoload
+(defmacro dolist (spec &rest body)
+  "(dolist (VAR LIST [RESULT]) BODY...): loop over a list.
+Evaluate BODY with VAR bound to each `car' from LIST, in turn.
+Then evaluate RESULT to get return value, default nil."
+  (let ((temp (gensym "--dolist-temp--")))
+    (list 'block nil
+         (list* 'let (list (list temp (nth 1 spec)) (car spec))
+                (list* 'while temp (list 'setq (car spec) (list 'car temp))
+                       (append body (list (list 'setq temp
+                                                (list 'cdr temp)))))
+                (if (cdr (cdr spec))
+                    (cons (list 'setq (car spec) nil) (cdr (cdr spec)))
+                  '(nil))))))
+
+;;;###autoload
+(defmacro dotimes (spec &rest body)
+  "(dotimes (VAR COUNT [RESULT]) BODY...): loop a certain number of times.
+Evaluate BODY with VAR bound to successive integers from 0, inclusive,
+to COUNT, exclusive.  Then evaluate RESULT to get return value, default
+nil."
+  (let ((temp (gensym "--dotimes-temp--")))
+    (list 'block nil
+         (list* 'let (list (list temp (nth 1 spec)) (list (car spec) 0))
+                (list* 'while (list '< (car spec) temp)
+                       (append body (list (list 'incf (car spec)))))
+                (or (cdr (cdr spec)) '(nil))))))
+
+;;;###autoload
+(defmacro do-symbols (spec &rest body)
+  "(dosymbols (VAR [OBARRAY [RESULT]]) BODY...): loop over all symbols.
+Evaluate BODY with VAR bound to each interned symbol, or to each symbol
+from OBARRAY."
+  ;; Apparently this doesn't have an implicit block.
+  (list 'block nil
+       (list 'let (list (car spec))
+             (list* 'mapatoms
+                    (list 'function (list* 'lambda (list (car spec)) body))
+                    (and (cadr spec) (list (cadr spec))))
+             (caddr spec))))
+
+;;;###autoload
+(defmacro do-all-symbols (spec &rest body)
+  (list* 'do-symbols (list (car spec) nil (cadr spec)) body))
+
+
+;;; Assignments.
+
+;;;###autoload
+(defmacro psetq (&rest args)
+  "(psetq SYM VAL SYM VAL ...): set SYMs to the values VALs in parallel.
+This is like `setq', except that all VAL forms are evaluated (in order)
+before assigning any symbols SYM to the corresponding values."
+  (cons 'psetf args))
+
+
+;;; Binding control structures.
+
+;;;###autoload
+(defmacro progv (symbols values &rest body)
+  "(progv SYMBOLS VALUES BODY...): bind SYMBOLS to VALUES dynamically in BODY.
+The forms SYMBOLS and VALUES are evaluated, and must evaluate to lists.
+Each SYMBOL in the first list is bound to the corresponding VALUE in the
+second list (or made unbound if VALUES is shorter than SYMBOLS); then the
+BODY forms are executed and their result is returned.  This is much like
+a `let' form, except that the list of symbols can be computed at run-time."
+  (list 'let '((cl-progv-save nil))
+       (list 'unwind-protect
+             (list* 'progn (list 'cl-progv-before symbols values) body)
+             '(cl-progv-after))))
+
+;;; This should really have some way to shadow 'byte-compile properties, etc.
+;;;###autoload
+(defmacro flet (bindings &rest body)
+  "(flet ((FUNC ARGLIST BODY...) ...) FORM...): make temporary function defns.
+This is an analogue of `let' that operates on the function cell of FUNC
+rather than its value cell.  The FORMs are evaluated with the specified
+function definitions in place, then the definitions are undone (the FUNCs
+go back to their previous definitions, or lack thereof)."
+  (list* 'letf*
+        (mapcar
+         (function
+          (lambda (x)
+            (if (or (and (fboundp (car x))
+                         (eq (car-safe (symbol-function (car x))) 'macro))
+                    (cdr (assq (car x) cl-macro-environment)))
+                (error "Use `labels', not `flet', to rebind macro names"))
+            (let ((func (list 'function*
+                              (list 'lambda (cadr x)
+                                    (list* 'block (car x) (cddr x))))))
+              (if (and (cl-compiling-file)
+                       (boundp 'byte-compile-function-environment))
+                  (cl-push (cons (car x) (eval func))
+                           byte-compile-function-environment))
+              (list (list 'symbol-function (list 'quote (car x))) func))))
+         bindings)
+        body))
+
+;;;###autoload
+(defmacro labels (bindings &rest body)
+  "(labels ((FUNC ARGLIST BODY...) ...) FORM...): make temporary func bindings.
+This is like `flet', except the bindings are lexical instead of dynamic.
+Unlike `flet', this macro is fully complaint with the Common Lisp standard."
+  (let ((vars nil) (sets nil) (cl-macro-environment cl-macro-environment))
+    (while bindings
+      (let ((var (gensym)))
+       (cl-push var vars)
+       (cl-push (list 'function* (cons 'lambda (cdar bindings))) sets)
+       (cl-push var sets)
+       (cl-push (list (car (cl-pop bindings)) 'lambda '(&rest cl-labels-args)
+                      (list 'list* '(quote funcall) (list 'quote var)
+                            'cl-labels-args))
+                cl-macro-environment)))
+    (cl-macroexpand-all (list* 'lexical-let vars (cons (cons 'setq sets) body))
+                       cl-macro-environment)))
+
+;; The following ought to have a better definition for use with newer
+;; byte compilers.
+;;;###autoload
+(defmacro macrolet (bindings &rest body)
+  "(macrolet ((NAME ARGLIST BODY...) ...) FORM...): make temporary macro defns.
+This is like `flet', but for macros instead of functions."
+  (if (cdr bindings)
+      (list 'macrolet
+           (list (car bindings)) (list* 'macrolet (cdr bindings) body))
+    (if (null bindings) (cons 'progn body)
+      (let* ((name (caar bindings))
+            (res (cl-transform-lambda (cdar bindings) name)))
+       (eval (car res))
+       (cl-macroexpand-all (cons 'progn body)
+                           (cons (list* name 'lambda (cdr res))
+                                 cl-macro-environment))))))
+
+;;;###autoload
+(defmacro symbol-macrolet (bindings &rest body)
+  "(symbol-macrolet ((NAME EXPANSION) ...) FORM...): make symbol macro defns.
+Within the body FORMs, references to the variable NAME will be replaced
+by EXPANSION, and (setq NAME ...) will act like (setf EXPANSION ...)."
+  (if (cdr bindings)
+      (list 'symbol-macrolet
+           (list (car bindings)) (list* 'symbol-macrolet (cdr bindings) body))
+    (if (null bindings) (cons 'progn body)
+      (cl-macroexpand-all (cons 'progn body)
+                         (cons (list (symbol-name (caar bindings))
+                                     (cadar bindings))
+                               cl-macro-environment)))))
+
+(defvar cl-closure-vars nil)
+;;;###autoload
+(defmacro lexical-let (bindings &rest body)
+  "(lexical-let BINDINGS BODY...): like `let', but lexically scoped.
+The main visible difference is that lambdas inside BODY will create
+lexical closures as in Common Lisp."
+  (let* ((cl-closure-vars cl-closure-vars)
+        (vars (mapcar (function
+                       (lambda (x)
+                         (or (consp x) (setq x (list x)))
+                         (cl-push (gensym (format "--%s--" (car x)))
+                                  cl-closure-vars)
+                         (list (car x) (cadr x) (car cl-closure-vars))))
+                      bindings))
+        (ebody 
+         (cl-macroexpand-all
+          (cons 'progn body)
+          (nconc (mapcar (function (lambda (x)
+                                     (list (symbol-name (car x))
+                                           (list 'symbol-value (caddr x))
+                                           t))) vars)
+                 (list '(defun . cl-defun-expander))
+                 cl-macro-environment))))
+    (if (not (get (car (last cl-closure-vars)) 'used))
+       (list 'let (mapcar (function (lambda (x)
+                                      (list (caddr x) (cadr x)))) vars)
+             (sublis (mapcar (function (lambda (x)
+                                         (cons (caddr x)
+                                               (list 'quote (caddr x)))))
+                             vars)
+                     ebody))
+      (list 'let (mapcar (function (lambda (x)
+                                    (list (caddr x)
+                                          (list 'make-symbol
+                                                (format "--%s--" (car x))))))
+                        vars)
+           (apply 'append '(setf)
+                  (mapcar (function
+                           (lambda (x)
+                             (list (list 'symbol-value (caddr x)) (cadr x))))
+                          vars))
+           ebody))))
+
+;;;###autoload
+(defmacro lexical-let* (bindings &rest body)
+  "(lexical-let* BINDINGS BODY...): like `let*', but lexically scoped.
+The main visible difference is that lambdas inside BODY will create
+lexical closures as in Common Lisp."
+  (if (null bindings) (cons 'progn body)
+    (setq bindings (reverse bindings))
+    (while bindings
+      (setq body (list (list* 'lexical-let (list (cl-pop bindings)) body))))
+    (car body)))
+
+(defun cl-defun-expander (func &rest rest)
+  (list 'progn
+       (list 'defalias (list 'quote func)
+             (list 'function (cons 'lambda rest)))
+       (list 'quote func)))
+
+
+;;; Multiple values.
+
+;;;###autoload
+(defmacro multiple-value-bind (vars form &rest body)
+  "(multiple-value-bind (SYM SYM...) FORM BODY): collect multiple return values.
+FORM must return a list; the BODY is then executed with the first N elements
+of this list bound (`let'-style) to each of the symbols SYM in turn.  This
+is analogous to the Common Lisp `multiple-value-bind' macro, using lists to
+simulate true multiple return values.  For compatibility, (values A B C) is
+a synonym for (list A B C)."
+  (let ((temp (gensym)) (n -1))
+    (list* 'let* (cons (list temp form)
+                      (mapcar (function
+                               (lambda (v)
+                                 (list v (list 'nth (setq n (1+ n)) temp))))
+                              vars))
+          body)))
+
+;;;###autoload
+(defmacro multiple-value-setq (vars form)
+  "(multiple-value-setq (SYM SYM...) FORM): collect multiple return values.
+FORM must return a list; the first N elements of this list are stored in
+each of the symbols SYM in turn.  This is analogous to the Common Lisp
+`multiple-value-setq' macro, using lists to simulate true multiple return
+values.  For compatibility, (values A B C) is a synonym for (list A B C)."
+  (cond ((null vars) (list 'progn form nil))
+       ((null (cdr vars)) (list 'setq (car vars) (list 'car form)))
+       (t
+        (let* ((temp (gensym)) (n 0))
+          (list 'let (list (list temp form))
+                (list 'prog1 (list 'setq (cl-pop vars) (list 'car temp))
+                      (cons 'setq (apply 'nconc
+                                         (mapcar (function
+                                                  (lambda (v)
+                                                    (list v (list
+                                                             'nth
+                                                             (setq n (1+ n))
+                                                             temp))))
+                                                 vars)))))))))
+
+
+;;; Declarations.
+
+;;;###autoload
+(defmacro locally (&rest body) (cons 'progn body))
+;;;###autoload
+(defmacro the (type form) form)
+
+(defvar cl-proclaim-history t)    ; for future compilers
+(defvar cl-declare-stack t)       ; for future compilers
+
+(defun cl-do-proclaim (spec hist)
+  (and hist (listp cl-proclaim-history) (cl-push spec cl-proclaim-history))
+  (cond ((eq (car-safe spec) 'special)
+        (if (boundp 'byte-compile-bound-variables)
+            (setq byte-compile-bound-variables
+                  ;; todo: this should compute correct binding bits vs. 0
+                  (append (mapcar #'(lambda (v) (cons v 0)) 
+                                  (cdr spec))
+                          byte-compile-bound-variables))))
+
+       ((eq (car-safe spec) 'inline)
+        (while (setq spec (cdr spec))
+          (or (memq (get (car spec) 'byte-optimizer)
+                    '(nil byte-compile-inline-expand))
+              (error "%s already has a byte-optimizer, can't make it inline"
+                     (car spec)))
+          (put (car spec) 'byte-optimizer 'byte-compile-inline-expand)))
+
+       ((eq (car-safe spec) 'notinline)
+        (while (setq spec (cdr spec))
+          (if (eq (get (car spec) 'byte-optimizer)
+                  'byte-compile-inline-expand)
+              (put (car spec) 'byte-optimizer nil))))
+
+       ((eq (car-safe spec) 'optimize)
+        (let ((speed (assq (nth 1 (assq 'speed (cdr spec)))
+                           '((0 nil) (1 t) (2 t) (3 t))))
+              (safety (assq (nth 1 (assq 'safety (cdr spec)))
+                            '((0 t) (1 t) (2 t) (3 nil)))))
+          (if speed (setq cl-optimize-speed (car speed)
+                          byte-optimize (nth 1 speed)))
+          (if safety (setq cl-optimize-safety (car safety)
+                           byte-compile-delete-errors (nth 1 safety)))))
+
+       ((and (eq (car-safe spec) 'warn) (boundp 'byte-compile-warnings))
+        (if (eq byte-compile-warnings t)
+            ;; XEmacs change
+            (setq byte-compile-warnings byte-compile-default-warnings))
+        (while (setq spec (cdr spec))
+          (if (consp (car spec))
+              (if (eq (cadar spec) 0)
+                  (setq byte-compile-warnings
+                        (delq (caar spec) byte-compile-warnings))
+                (setq byte-compile-warnings
+                      (adjoin (caar spec) byte-compile-warnings)))))))
+  nil)
+
+;;; Process any proclamations made before cl-macs was loaded.
+(defvar cl-proclaims-deferred)
+(let ((p (reverse cl-proclaims-deferred)))
+  (while p (cl-do-proclaim (cl-pop p) t))
+  (setq cl-proclaims-deferred nil))
+
+;;;###autoload
+(defmacro declare (&rest specs)
+  (if (cl-compiling-file)
+      (while specs
+       (if (listp cl-declare-stack) (cl-push (car specs) cl-declare-stack))
+       (cl-do-proclaim (cl-pop specs) nil)))
+  nil)
+
+
+
+;;; Generalized variables.
+
+;;;###autoload
+(defmacro define-setf-method (func args &rest body)
+  "(define-setf-method NAME ARGLIST BODY...): define a `setf' method.
+This method shows how to handle `setf's to places of the form (NAME ARGS...).
+The argument forms ARGS are bound according to ARGLIST, as if NAME were
+going to be expanded as a macro, then the BODY forms are executed and must
+return a list of five elements: a temporary-variables list, a value-forms
+list, a store-variables list (of length one), a store-form, and an access-
+form.  See `defsetf' for a simpler way to define most setf-methods."
+  (append '(eval-when (compile load eval))
+         (if (stringp (car body))
+             (list (list 'put (list 'quote func) '(quote setf-documentation)
+                         (cl-pop body))))
+         (list (cl-transform-function-property
+                func 'setf-method (cons args body)))))
+
+;;;###autoload
+(defmacro defsetf (func arg1 &rest args)
+  "(defsetf NAME FUNC): define a `setf' method.
+This macro is an easy-to-use substitute for `define-setf-method' that works
+well for simple place forms.  In the simple `defsetf' form, `setf's of
+the form (setf (NAME ARGS...) VAL) are transformed to function or macro
+calls of the form (FUNC ARGS... VAL).  Example: (defsetf aref aset).
+Alternate form: (defsetf NAME ARGLIST (STORE) BODY...).
+Here, the above `setf' call is expanded by binding the argument forms ARGS
+according to ARGLIST, binding the value form VAL to STORE, then executing
+BODY, which must return a Lisp form that does the necessary `setf' operation.
+Actually, ARGLIST and STORE may be bound to temporary variables which are
+introduced automatically to preserve proper execution order of the arguments.
+Example: (defsetf nth (n x) (v) (list 'setcar (list 'nthcdr n x) v))."
+  (if (listp arg1)
+      (let* ((largs nil) (largsr nil)
+            (temps nil) (tempsr nil)
+            (restarg nil) (rest-temps nil)
+            (store-var (car (prog1 (car args) (setq args (cdr args)))))
+            (store-temp (intern (format "--%s--temp--" store-var)))
+            (lets1 nil) (lets2 nil)
+            (docstr nil) (p arg1))
+       (if (stringp (car args))
+           (setq docstr (prog1 (car args) (setq args (cdr args)))))
+       (while (and p (not (eq (car p) '&aux)))
+         (if (eq (car p) '&rest)
+             (setq p (cdr p) restarg (car p))
+           (or (memq (car p) '(&optional &key &allow-other-keys))
+               (setq largs (cons (if (consp (car p)) (car (car p)) (car p))
+                                 largs)
+                     temps (cons (intern (format "--%s--temp--" (car largs)))
+                                 temps))))
+         (setq p (cdr p)))
+       (setq largs (nreverse largs) temps (nreverse temps))
+       (if restarg
+           (setq largsr (append largs (list restarg))
+                 rest-temps (intern (format "--%s--temp--" restarg))
+                 tempsr (append temps (list rest-temps)))
+         (setq largsr largs tempsr temps))
+       (let ((p1 largs) (p2 temps))
+         (while p1
+           (setq lets1 (cons (list (car p2)
+                                   (list 'gensym (format "--%s--" (car p1))))
+                             lets1)
+                 lets2 (cons (list (car p1) (car p2)) lets2)
+                 p1 (cdr p1) p2 (cdr p2))))
+       (if restarg (setq lets2 (cons (list restarg rest-temps) lets2)))
+       (append (list 'define-setf-method func arg1)
+               (and docstr (list docstr))
+               (list
+                (list 'let*
+                      (nreverse
+                       (cons (list store-temp
+                                   (list 'gensym (format "--%s--" store-var)))
+                             (if restarg
+                                 (append
+                                  (list
+                                   (list rest-temps
+                                         (list 'mapcar '(quote gensym)
+                                               restarg)))
+                                  lets1)
+                               lets1)))
+                      (list 'list  ; 'values
+                            (cons (if restarg 'list* 'list) tempsr)
+                            (cons (if restarg 'list* 'list) largsr)
+                            (list 'list store-temp)
+                            (cons 'let*
+                                  (cons (nreverse
+                                         (cons (list store-var store-temp)
+                                               lets2))
+                                        args))
+                            (cons (if restarg 'list* 'list)
+                                  (cons (list 'quote func) tempsr)))))))
+    (list 'defsetf func '(&rest args) '(store)
+         (let ((call (list 'cons (list 'quote arg1)
+                           '(append args (list store)))))
+           (if (car args)
+               (list 'list '(quote progn) call 'store)
+             call)))))
+
+;;; Some standard place types from Common Lisp.
+(defsetf aref aset)
+(defsetf car setcar)
+(defsetf cdr setcdr)
+(defsetf elt (seq n) (store)
+  (list 'if (list 'listp seq) (list 'setcar (list 'nthcdr n seq) store)
+       (list 'aset seq n store)))
+(defsetf get (x y &optional d) (store) (list 'put x y store))
+(defsetf get* (x y &optional d) (store) (list 'put x y store))
+(defsetf gethash (x h &optional d) (store) (list 'cl-puthash x store h))
+(defsetf nth (n x) (store) (list 'setcar (list 'nthcdr n x) store))
+(defsetf subseq (seq start &optional end) (new)
+  (list 'progn (list 'replace seq new ':start1 start ':end1 end) new))
+(defsetf symbol-function fset)
+(defsetf symbol-plist setplist)
+(defsetf symbol-value set)
+
+;;; Various car/cdr aliases.  Note that `cadr' is handled specially.
+(defsetf first setcar)
+(defsetf second (x) (store) (list 'setcar (list 'cdr x) store))
+(defsetf third (x) (store) (list 'setcar (list 'cddr x) store))
+(defsetf fourth (x) (store) (list 'setcar (list 'cdddr x) store))
+(defsetf fifth (x) (store) (list 'setcar (list 'nthcdr 4 x) store))
+(defsetf sixth (x) (store) (list 'setcar (list 'nthcdr 5 x) store))
+(defsetf seventh (x) (store) (list 'setcar (list 'nthcdr 6 x) store))
+(defsetf eighth (x) (store) (list 'setcar (list 'nthcdr 7 x) store))
+(defsetf ninth (x) (store) (list 'setcar (list 'nthcdr 8 x) store))
+(defsetf tenth (x) (store) (list 'setcar (list 'nthcdr 9 x) store))
+(defsetf rest setcdr)
+
+;;; Some more Emacs-related place types.
+(defsetf buffer-file-name set-visited-file-name t)
+(defsetf buffer-modified-p set-buffer-modified-p t)
+(defsetf buffer-name rename-buffer t)
+(defsetf buffer-string () (store)
+  (list 'progn '(erase-buffer) (list 'insert store)))
+(defsetf buffer-substring cl-set-buffer-substring)
+(defsetf current-buffer set-buffer)
+(defsetf current-case-table set-case-table)
+(defsetf current-column move-to-column t)
+(defsetf current-global-map use-global-map t)
+(defsetf current-input-mode () (store)
+  (list 'progn (list 'apply 'set-input-mode store) store))
+(defsetf current-local-map use-local-map t)
+(defsetf current-window-configuration set-window-configuration t)
+(defsetf default-file-modes set-default-file-modes t)
+(defsetf default-value set-default)
+(defsetf documentation-property put)
+(defsetf extent-face set-extent-face)
+(defsetf extent-priority set-extent-priority)
+(defsetf extent-property (x y &optional d) (arg)
+  (list 'set-extent-property x y arg))
+(defsetf extent-end-position (ext) (store)
+  (list 'progn (list 'set-extent-endpoints (list 'extent-start-position ext)
+                    store) store))
+(defsetf extent-start-position (ext) (store)
+  (list 'progn (list 'set-extent-endpoints store
+                    (list 'extent-end-position ext)) store))
+(defsetf face-background (f &optional s) (x) (list 'set-face-background f x s))
+(defsetf face-background-pixmap (f &optional s) (x)
+  (list 'set-face-background-pixmap f x s))
+(defsetf face-font (f &optional s) (x) (list 'set-face-font f x s))
+(defsetf face-foreground (f &optional s) (x) (list 'set-face-foreground f x s))
+(defsetf face-underline-p (f &optional s) (x)
+  (list 'set-face-underline-p f x s))
+(defsetf file-modes set-file-modes t)
+(defsetf frame-parameters modify-frame-parameters t)
+(defsetf frame-visible-p cl-set-frame-visible-p)
+(defsetf frame-properties (&optional f) (p)
+  `(progn (set-frame-properties ,f ,p) ,p))
+(defsetf frame-property (f p &optional d) (v)
+  `(progn (set-frame-property ,f ,v) ,p))
+(defsetf frame-width (&optional f) (v)
+  `(progn (set-frame-width ,f ,v) ,v))
+(defsetf frame-height (&optional f) (v)
+  `(progn (set-frame-height ,f ,v) ,v))
+(defsetf current-frame-configuration set-frame-configuration)
+
+;; XEmacs: new stuff
+;; Consoles
+(defsetf selected-console select-console t)
+(defsetf selected-device select-device t)
+(defsetf device-baud-rate (&optional d) (v)
+  `(set-device-baud-rate ,d ,v))
+;; This setf method is a bad idea, because set-specifier *adds* a
+;; specification, rather than just setting it.  The net effect is that
+;; it makes specifier-instance return VAL, but other things don't work
+;; as expected -- letf, to name one.
+;(defsetf specifier-instance (spec &optional dom def nof) (val)
+;  `(set-specifier ,spec ,val ,dom))
+
+;; Annotations
+(defsetf annotation-glyph set-annotation-glyph)
+(defsetf annotation-down-glyph set-annotation-down-glyph)
+(defsetf annotation-face set-annotation-face)
+(defsetf annotation-layout set-annotation-layout)
+(defsetf annotation-data set-annotation-data)
+(defsetf annotation-action set-annotation-action)
+(defsetf annotation-menu set-annotation-menu)
+;; Widget
+(defsetf widget-get widget-put t)
+(defsetf widget-value widget-value-set t)
+
+;; Misc
+(defsetf recent-keys-ring-size set-recent-keys-ring-size)
+(defsetf symbol-value-in-buffer (s b &optional u) (store)
+  `(with-current-buffer ,b (set ,s ,store)))
+(defsetf symbol-value-in-console (s c &optional u) (store)
+  `(letf (((selected-console) ,c))
+     (set ,s ,store)))
+
+(defsetf buffer-dedicated-frame (&optional b) (v)
+  `(set-buffer-dedicated-frame ,b ,v))
+(defsetf console-type-image-conversion-list
+  set-console-type-image-conversion-list)
+(defsetf default-toolbar-position set-default-toolbar-position)
+(defsetf device-class (&optional d) (v)
+  `(set-device-class ,d ,v))
+(defsetf extent-begin-glyph set-extent-begin-glyph)
+(defsetf extent-begin-glyph-layout set-extent-begin-glyph-layout)
+(defsetf extent-end-glyph set-extent-end-glyph)
+(defsetf extent-end-glyph-layout set-extent-end-glyph-layout)
+(defsetf extent-keymap set-extent-keymap)
+(defsetf extent-parent set-extent-parent)
+(defsetf extent-properties set-extent-properties)
+;; Avoid adding various face and glyph functions.
+(defsetf frame-selected-window (&optional f) (v)
+  `(set-frame-selected-window ,f ,v))
+(defsetf itimer-function set-itimer-function)
+(defsetf itimer-function-arguments set-itimer-function-arguments)
+(defsetf itimer-is-idle set-itimer-is-idle)
+(defsetf itimer-recorded-run-time set-itimer-recorded-run-time)
+(defsetf itimer-restart set-itimer-restart)
+(defsetf itimer-uses-arguments set-itimer-uses-arguments)
+(defsetf itimer-value set-itimer-value)
+(defsetf keymap-parents set-keymap-parents)
+(defsetf marker-insertion-type set-marker-insertion-type)
+(defsetf mouse-pixel-position (&optional d) (v)
+  `(progn
+     set-mouse-pixel-position ,d ,(car v) ,(car (cdr v)) ,(cdr (cdr v))
+     ,v))
+(defsetf trunc-stack-length set-trunc-stack-length)
+(defsetf trunc-stack-stack set-trunc-stack-stack)
+(defsetf undoable-stack-max set-undoable-stack-max)
+(defsetf weak-list-list set-weak-list-list)
+
+
+(defsetf getenv setenv t)
+(defsetf get-register set-register)
+(defsetf global-key-binding global-set-key)
+(defsetf keymap-parent set-keymap-parent)
+(defsetf keymap-name set-keymap-name)
+(defsetf keymap-prompt set-keymap-prompt)
+(defsetf keymap-default-binding set-keymap-default-binding)
+(defsetf local-key-binding local-set-key)
+(defsetf mark set-mark t)
+(defsetf mark-marker set-mark t)
+(defsetf marker-position set-marker t)
+(defsetf match-data store-match-data t)
+(defsetf mouse-position (scr) (store)
+  (list 'set-mouse-position scr (list 'car store) (list 'cadr store)
+       (list 'cddr store)))
+(defsetf overlay-get overlay-put)
+(defsetf overlay-start (ov) (store)
+  (list 'progn (list 'move-overlay ov store (list 'overlay-end ov)) store))
+(defsetf overlay-end (ov) (store)
+  (list 'progn (list 'move-overlay ov (list 'overlay-start ov) store) store))
+(defsetf point goto-char)
+(defsetf point-marker goto-char t)
+(defsetf point-max () (store)
+  (list 'progn (list 'narrow-to-region '(point-min) store) store))
+(defsetf point-min () (store)
+  (list 'progn (list 'narrow-to-region store '(point-max)) store))
+(defsetf process-buffer set-process-buffer)
+(defsetf process-filter set-process-filter)
+(defsetf process-sentinel set-process-sentinel)
+(defsetf read-mouse-position (scr) (store)
+  (list 'set-mouse-position scr (list 'car store) (list 'cdr store)))
+(defsetf selected-window select-window)
+(defsetf selected-frame select-frame)
+(defsetf standard-case-table set-standard-case-table)
+(defsetf syntax-table set-syntax-table)
+(defsetf visited-file-modtime set-visited-file-modtime t)
+(defsetf window-buffer set-window-buffer t)
+(defsetf window-display-table set-window-display-table t)
+(defsetf window-dedicated-p set-window-dedicated-p t)
+(defsetf window-height () (store)
+  (list 'progn (list 'enlarge-window (list '- store '(window-height))) store))
+(defsetf window-hscroll set-window-hscroll)
+(defsetf window-point set-window-point)
+(defsetf window-start set-window-start)
+(defsetf window-width () (store)
+  (list 'progn (list 'enlarge-window (list '- store '(window-width)) t) store))
+(defsetf x-get-cutbuffer x-store-cutbuffer t)
+(defsetf x-get-cut-buffer x-store-cut-buffer t)   ; groan.
+(defsetf x-get-secondary-selection x-own-secondary-selection t)
+(defsetf x-get-selection x-own-selection t)
+
+;;; More complex setf-methods.
+;;; These should take &environment arguments, but since full arglists aren't
+;;; available while compiling cl-macs, we fake it by referring to the global
+;;; variable cl-macro-environment directly.
+
+(define-setf-method apply (func arg1 &rest rest)
+  (or (and (memq (car-safe func) '(quote function function*))
+          (symbolp (car-safe (cdr-safe func))))
+      (error "First arg to apply in setf is not (function SYM): %s" func))
+  (let* ((form (cons (nth 1 func) (cons arg1 rest)))
+        (method (get-setf-method form cl-macro-environment)))
+    (list (car method) (nth 1 method) (nth 2 method)
+         (cl-setf-make-apply (nth 3 method) (cadr func) (car method))
+         (cl-setf-make-apply (nth 4 method) (cadr func) (car method)))))
+
+(defun cl-setf-make-apply (form func temps)
+  (if (eq (car form) 'progn)
+      (list* 'progn (cl-setf-make-apply (cadr form) func temps) (cddr form))
+    (or (equal (last form) (last temps))
+       (error "%s is not suitable for use with setf-of-apply" func))
+    (list* 'apply (list 'quote (car form)) (cdr form))))
+
+(define-setf-method nthcdr (n place)
+  (let ((method (get-setf-method place cl-macro-environment))
+       (n-temp (gensym "--nthcdr-n--"))
+       (store-temp (gensym "--nthcdr-store--")))
+    (list (cons n-temp (car method))
+         (cons n (nth 1 method))
+         (list store-temp)
+         (list 'let (list (list (car (nth 2 method))
+                                (list 'cl-set-nthcdr n-temp (nth 4 method)
+                                      store-temp)))
+               (nth 3 method) store-temp)
+         (list 'nthcdr n-temp (nth 4 method)))))
+
+(define-setf-method getf (place tag &optional def)
+  (let ((method (get-setf-method place cl-macro-environment))
+       (tag-temp (gensym "--getf-tag--"))
+       (def-temp (gensym "--getf-def--"))
+       (store-temp (gensym "--getf-store--")))
+    (list (append (car method) (list tag-temp def-temp))
+         (append (nth 1 method) (list tag def))
+         (list store-temp)
+         (list 'let (list (list (car (nth 2 method))
+                                (list 'cl-set-getf (nth 4 method)
+                                      tag-temp store-temp)))
+               (nth 3 method) store-temp)
+         (list 'getf (nth 4 method) tag-temp def-temp))))
+
+(define-setf-method substring (place from &optional to)
+  (let ((method (get-setf-method place cl-macro-environment))
+       (from-temp (gensym "--substring-from--"))
+       (to-temp (gensym "--substring-to--"))
+       (store-temp (gensym "--substring-store--")))
+    (list (append (car method) (list from-temp to-temp))
+         (append (nth 1 method) (list from to))
+         (list store-temp)
+         (list 'let (list (list (car (nth 2 method))
+                                (list 'cl-set-substring (nth 4 method)
+                                      from-temp to-temp store-temp)))
+               (nth 3 method) store-temp)
+         (list 'substring (nth 4 method) from-temp to-temp))))
+
+(define-setf-method values (&rest args)
+  (let ((methods (mapcar #'(lambda (x)
+                            (get-setf-method x cl-macro-environment))
+                        args))
+       (store-temp (gensym "--values-store--")))
+    (list (apply 'append (mapcar 'first methods))
+         (apply 'append (mapcar 'second methods))
+         (list store-temp)
+         (cons 'list
+               (mapcar #'(lambda (m)
+                           (cl-setf-do-store (cons (car (third m)) (fourth m))
+                                             (list 'pop store-temp)))
+                       methods))
+         (cons 'list (mapcar 'fifth methods)))))
+
+;;; Getting and optimizing setf-methods.
+;;;###autoload
+(defun get-setf-method (place &optional env)
+  "Return a list of five values describing the setf-method for PLACE.
+PLACE may be any Lisp form which can appear as the PLACE argument to
+a macro like `setf' or `incf'."
+  (if (symbolp place)
+      (let ((temp (gensym "--setf--")))
+       (list nil nil (list temp) (list 'setq place temp) place))
+    (or (and (symbolp (car place))
+            (let* ((func (car place))
+                   (name (symbol-name func))
+                   (method (get func 'setf-method))
+                   (case-fold-search nil))
+              (or (and method
+                       (let ((cl-macro-environment env))
+                         (setq method (apply method (cdr place))))
+                       (if (and (consp method) (= (length method) 5))
+                           method
+                         (error "Setf-method for %s returns malformed method"
+                                func)))
+                  (and (save-match-data
+                         (string-match "\\`c[ad][ad][ad]?[ad]?r\\'" name))
+                       (get-setf-method (compiler-macroexpand place)))
+                  (and (eq func 'edebug-after)
+                       (get-setf-method (nth (1- (length place)) place)
+                                        env)))))
+       (if (eq place (setq place (macroexpand place env)))
+           (if (and (symbolp (car place)) (fboundp (car place))
+                    (symbolp (symbol-function (car place))))
+               (get-setf-method (cons (symbol-function (car place))
+                                      (cdr place)) env)
+             (error "No setf-method known for %s" (car place)))
+         (get-setf-method place env)))))
+
+(defun cl-setf-do-modify (place opt-expr)
+  (let* ((method (get-setf-method place cl-macro-environment))
+        (temps (car method)) (values (nth 1 method))
+        (lets nil) (subs nil)
+        (optimize (and (not (eq opt-expr 'no-opt))
+                       (or (and (not (eq opt-expr 'unsafe))
+                                (cl-safe-expr-p opt-expr))
+                           (cl-setf-simple-store-p (car (nth 2 method))
+                                                   (nth 3 method)))))
+        (simple (and optimize (consp place) (cl-simple-exprs-p (cdr place)))))
+    (while values
+      (if (or simple (cl-const-expr-p (car values)))
+         (cl-push (cons (cl-pop temps) (cl-pop values)) subs)
+       (cl-push (list (cl-pop temps) (cl-pop values)) lets)))
+    (list (nreverse lets)
+         (cons (car (nth 2 method)) (sublis subs (nth 3 method)))
+         (sublis subs (nth 4 method)))))
+
+(defun cl-setf-do-store (spec val)
+  (let ((sym (car spec))
+       (form (cdr spec)))
+    (if (or (cl-const-expr-p val)
+           (and (cl-simple-expr-p val) (eq (cl-expr-contains form sym) 1))
+           (cl-setf-simple-store-p sym form))
+       (subst val sym form)
+      (list 'let (list (list sym val)) form))))
+
+(defun cl-setf-simple-store-p (sym form)
+  (and (consp form) (eq (cl-expr-contains form sym) 1)
+       (eq (nth (1- (length form)) form) sym)
+       (symbolp (car form)) (fboundp (car form))
+       (not (eq (car-safe (symbol-function (car form))) 'macro))))
+
+;;; The standard modify macros.
+;;;###autoload
+(defmacro setf (&rest args)
+  "(setf PLACE VAL PLACE VAL ...): set each PLACE to the value of its VAL.
+This is a generalized version of `setq'; the PLACEs may be symbolic
+references such as (car x) or (aref x i), as well as plain symbols.
+For example, (setf (cadar x) y) is equivalent to (setcar (cdar x) y).
+The return value is the last VAL in the list."
+  (if (cdr (cdr args))
+      (let ((sets nil))
+       (while args (cl-push (list 'setf (cl-pop args) (cl-pop args)) sets))
+       (cons 'progn (nreverse sets)))
+    (if (symbolp (car args))
+       (and args (cons 'setq args))
+      (let* ((method (cl-setf-do-modify (car args) (nth 1 args)))
+            (store (cl-setf-do-store (nth 1 method) (nth 1 args))))
+       (if (car method) (list 'let* (car method) store) store)))))
+
+;;;###autoload
+(defmacro psetf (&rest args)
+  "(psetf PLACE VAL PLACE VAL ...): set PLACEs to the values VALs in parallel.
+This is like `setf', except that all VAL forms are evaluated (in order)
+before assigning any PLACEs to the corresponding values."
+  (let ((p args) (simple t) (vars nil))
+    (while p
+      (if (or (not (symbolp (car p))) (cl-expr-depends-p (nth 1 p) vars))
+         (setq simple nil))
+      (if (memq (car p) vars)
+         (error "Destination duplicated in psetf: %s" (car p)))
+      (cl-push (cl-pop p) vars)
+      (or p (error "Odd number of arguments to psetf"))
+      (cl-pop p))
+    (if simple
+       (list 'progn (cons 'setf args) nil)
+      (setq args (reverse args))
+      (let ((expr (list 'setf (cadr args) (car args))))
+       (while (setq args (cddr args))
+         (setq expr (list 'setf (cadr args) (list 'prog1 (car args) expr))))
+       (list 'progn expr nil)))))
+
+;;;###autoload
+(defun cl-do-pop (place)
+  (if (cl-simple-expr-p place)
+      (list 'prog1 (list 'car place) (list 'setf place (list 'cdr place)))
+    (let* ((method (cl-setf-do-modify place t))
+          (temp (gensym "--pop--")))
+      (list 'let*
+           (append (car method)
+                   (list (list temp (nth 2 method))))
+           (list 'prog1
+                 (list 'car temp)
+                 (cl-setf-do-store (nth 1 method) (list 'cdr temp)))))))
+
+;;;###autoload
+(defmacro remf (place tag)
+  "(remf PLACE TAG): remove TAG from property list PLACE.
+PLACE may be a symbol, or any generalized variable allowed by `setf'.
+The form returns true if TAG was found and removed, nil otherwise."
+  (let* ((method (cl-setf-do-modify place t))
+        (tag-temp (and (not (cl-const-expr-p tag)) (gensym "--remf-tag--")))
+        (val-temp (and (not (cl-simple-expr-p place))
+                       (gensym "--remf-place--")))
+        (ttag (or tag-temp tag))
+        (tval (or val-temp (nth 2 method))))
+    (list 'let*
+         (append (car method)
+                 (and val-temp (list (list val-temp (nth 2 method))))
+                 (and tag-temp (list (list tag-temp tag))))
+         (list 'if (list 'eq ttag (list 'car tval))
+               (list 'progn
+                     (cl-setf-do-store (nth 1 method) (list 'cddr tval))
+                     t)
+               (list 'cl-do-remf tval ttag)))))
+
+;;;###autoload
+(defmacro shiftf (place &rest args)
+  "(shiftf PLACE PLACE... VAL): shift left among PLACEs.
+Example: (shiftf A B C) sets A to B, B to C, and returns the old A.
+Each PLACE may be a symbol, or any generalized variable allowed by `setf'."
+  (if (not (memq nil (mapcar 'symbolp (butlast (cons place args)))))
+      (list* 'prog1 place
+            (let ((sets nil))
+              (while args
+                (cl-push (list 'setq place (car args)) sets)
+                (setq place (cl-pop args)))
+              (nreverse sets)))
+    (let* ((places (reverse (cons place args)))
+          (form (cl-pop places)))
+      (while places
+       (let ((method (cl-setf-do-modify (cl-pop places) 'unsafe)))
+         (setq form (list 'let* (car method)
+                          (list 'prog1 (nth 2 method)
+                                (cl-setf-do-store (nth 1 method) form))))))
+      form)))
+
+;;;###autoload
+(defmacro rotatef (&rest args)
+  "(rotatef PLACE...): rotate left among PLACEs.
+Example: (rotatef A B C) sets A to B, B to C, and C to A.  It returns nil.
+Each PLACE may be a symbol, or any generalized variable allowed by `setf'."
+  (if (not (memq nil (mapcar 'symbolp args)))
+      (and (cdr args)
+          (let ((sets nil)
+                (first (car args)))
+            (while (cdr args)
+              (setq sets (nconc sets (list (cl-pop args) (car args)))))
+            (nconc (list 'psetf) sets (list (car args) first))))
+    (let* ((places (reverse args))
+          (temp (gensym "--rotatef--"))
+          (form temp))
+      (while (cdr places)
+       (let ((method (cl-setf-do-modify (cl-pop places) 'unsafe)))
+         (setq form (list 'let* (car method)
+                          (list 'prog1 (nth 2 method)
+                                (cl-setf-do-store (nth 1 method) form))))))
+      (let ((method (cl-setf-do-modify (car places) 'unsafe)))
+       (list 'let* (append (car method) (list (list temp (nth 2 method))))
+             (cl-setf-do-store (nth 1 method) form) nil)))))
+
+;;;###autoload
+(defmacro letf (bindings &rest body)
+  "(letf ((PLACE VALUE) ...) BODY...): temporarily bind to PLACEs.
+This is the analogue of `let', but with generalized variables (in the
+sense of `setf') for the PLACEs.  Each PLACE is set to the corresponding
+VALUE, then the BODY forms are executed.  On exit, either normally or
+because of a `throw' or error, the PLACEs are set back to their original
+values.  Note that this macro is *not* available in Common Lisp.
+As a special case, if `(PLACE)' is used instead of `(PLACE VALUE)',
+the PLACE is not modified before executing BODY."
+  (if (and (not (cdr bindings)) (cdar bindings) (symbolp (caar bindings)))
+      (list* 'let bindings body)
+    (let ((lets nil) (sets nil)
+         (unsets nil) (rev (reverse bindings)))
+      (while rev
+       (let* ((place (if (symbolp (caar rev))
+                         (list 'symbol-value (list 'quote (caar rev)))
+                       (caar rev)))
+              (value (cadar rev))
+              (method (cl-setf-do-modify place 'no-opt))
+              (save (gensym "--letf-save--"))
+              (bound (and (memq (car place) '(symbol-value symbol-function))
+                          (gensym "--letf-bound--")))
+              (temp (and (not (cl-const-expr-p value)) (cdr bindings)
+                         (gensym "--letf-val--"))))
+         (setq lets (nconc (car method)
+                           (if bound
+                               (list (list bound
+                                           (list (if (eq (car place)
+                                                         'symbol-value)
+                                                     'boundp 'fboundp)
+                                                 (nth 1 (nth 2 method))))
+                                     (list save (list 'and bound
+                                                      (nth 2 method))))
+                             (list (list save (nth 2 method))))
+                           (and temp (list (list temp value)))
+                           lets)
+               body (list
+                     (list 'unwind-protect
+                           (cons 'progn
+                                 (if (cdr (car rev))
+                                     (cons (cl-setf-do-store (nth 1 method)
+                                                             (or temp value))
+                                           body)
+                                   body))
+                           (if bound
+                               (list 'if bound
+                                     (cl-setf-do-store (nth 1 method) save)
+                                     (list (if (eq (car place) 'symbol-value)
+                                               'makunbound 'fmakunbound)
+                                           (nth 1 (nth 2 method))))
+                             (cl-setf-do-store (nth 1 method) save))))
+               rev (cdr rev))))
+      (list* 'let* lets body))))
+
+;;;###autoload
+(defmacro letf* (bindings &rest body)
+  "(letf* ((PLACE VALUE) ...) BODY...): temporarily bind to PLACEs.
+This is the analogue of `let*', but with generalized variables (in the
+sense of `setf') for the PLACEs.  Each PLACE is set to the corresponding
+VALUE, then the BODY forms are executed.  On exit, either normally or
+because of a `throw' or error, the PLACEs are set back to their original
+values.  Note that this macro is *not* available in Common Lisp.
+As a special case, if `(PLACE)' is used instead of `(PLACE VALUE)',
+the PLACE is not modified before executing BODY."
+  (if (null bindings)
+      (cons 'progn body)
+    (setq bindings (reverse bindings))
+    (while bindings
+      (setq body (list (list* 'letf (list (cl-pop bindings)) body))))
+    (car body)))
+
+;;;###autoload
+(defmacro callf (func place &rest args)
+  "(callf FUNC PLACE ARGS...): set PLACE to (FUNC PLACE ARGS...).
+FUNC should be an unquoted function name.  PLACE may be a symbol,
+or any generalized variable allowed by `setf'."
+  (let* ((method (cl-setf-do-modify place (cons 'list args)))
+        (rargs (cons (nth 2 method) args)))
+    (list 'let* (car method)
+         (cl-setf-do-store (nth 1 method)
+                           (if (symbolp func) (cons func rargs)
+                             (list* 'funcall (list 'function func)
+                                    rargs))))))
+
+;;;###autoload
+(defmacro callf2 (func arg1 place &rest args)
+  "(callf2 FUNC ARG1 PLACE ARGS...): set PLACE to (FUNC ARG1 PLACE ARGS...).
+Like `callf', but PLACE is the second argument of FUNC, not the first."
+  (if (and (cl-safe-expr-p arg1) (cl-simple-expr-p place) (symbolp func))
+      (list 'setf place (list* func arg1 place args))
+    (let* ((method (cl-setf-do-modify place (cons 'list args)))
+          (temp (and (not (cl-const-expr-p arg1)) (gensym "--arg1--")))
+          (rargs (list* (or temp arg1) (nth 2 method) args)))
+      (list 'let* (append (and temp (list (list temp arg1))) (car method))
+           (cl-setf-do-store (nth 1 method)
+                             (if (symbolp func) (cons func rargs)
+                               (list* 'funcall (list 'function func)
+                                      rargs)))))))
+
+;;;###autoload
+(defmacro define-modify-macro (name arglist func &optional doc)
+  "(define-modify-macro NAME ARGLIST FUNC): define a `setf'-like modify macro.
+If NAME is called, it combines its PLACE argument with the other arguments
+from ARGLIST using FUNC: (define-modify-macro incf (&optional (n 1)) +)"
+  (if (memq '&key arglist) (error "&key not allowed in define-modify-macro"))
+  (let ((place (gensym "--place--")))
+    (list 'defmacro* name (cons place arglist) doc
+         (list* (if (memq '&rest arglist) 'list* 'list)
+                '(quote callf) (list 'quote func) place
+                (cl-arglist-args arglist)))))
+
+
+;;; Structures.
+
+;;;###autoload
+(defmacro defstruct (struct &rest descs)
+  "(defstruct (NAME OPTIONS...) (SLOT SLOT-OPTS...)...): define a struct type.
+This macro defines a new Lisp data type called NAME, which contains data
+stored in SLOTs.  This defines a `make-NAME' constructor, a `copy-NAME'
+copier, a `NAME-p' predicate, and setf-able `NAME-SLOT' accessors."
+  (let* ((name (if (consp struct) (car struct) struct))
+        (opts (cdr-safe struct))
+        (slots nil)
+        (defaults nil)
+        (conc-name (concat (symbol-name name) "-"))
+        (constructor (intern (format "make-%s" name)))
+        (constrs nil)
+        (copier (intern (format "copy-%s" name)))
+        (predicate (intern (format "%s-p" name)))
+        (print-func nil) (print-auto nil)
+        (safety (if (cl-compiling-file) cl-optimize-safety 3))
+        (include nil)
+        (tag (intern (format "cl-struct-%s" name)))
+        (tag-symbol (intern (format "cl-struct-%s-tags" name)))
+        (include-descs nil)
+        ;; XEmacs change
+        (include-tag-symbol nil)
+        (side-eff nil)
+        (type nil)
+        (named nil)
+        (forms nil)
+        pred-form pred-check)
+    (if (stringp (car descs))
+       (cl-push (list 'put (list 'quote name) '(quote structure-documentation)
+                      (cl-pop descs)) forms))
+    (setq descs (cons '(cl-tag-slot)
+                     (mapcar (function (lambda (x) (if (consp x) x (list x))))
+                             descs)))
+    (while opts
+      (let ((opt (if (consp (car opts)) (caar opts) (car opts)))
+           (args (cdr-safe (cl-pop opts))))
+       (cond ((eq opt ':conc-name)
+              (if args
+                  (setq conc-name (if (car args)
+                                      (symbol-name (car args)) ""))))
+             ((eq opt ':constructor)
+              (if (cdr args)
+                  (cl-push args constrs)
+                (if args (setq constructor (car args)))))
+             ((eq opt ':copier)
+              (if args (setq copier (car args))))
+             ((eq opt ':predicate)
+              (if args (setq predicate (car args))))
+             ((eq opt ':include)
+              (setq include (car args)
+                    include-descs (mapcar (function
+                                           (lambda (x)
+                                             (if (consp x) x (list x))))
+                                          (cdr args))
+                    ;; XEmacs change
+                    include-tag-symbol (intern (format "cl-struct-%s-tags"
+                                                       include))))
+             ((eq opt ':print-function)
+              (setq print-func (car args)))
+             ((eq opt ':type)
+              (setq type (car args)))
+             ((eq opt ':named)
+              (setq named t))
+             ((eq opt ':initial-offset)
+              (setq descs (nconc (make-list (car args) '(cl-skip-slot))
+                                 descs)))
+             (t
+              (error "Slot option %s unrecognized" opt)))))
+    (if print-func
+       (setq print-func (list 'progn
+                              (list 'funcall (list 'function print-func)
+                                    'cl-x 'cl-s 'cl-n) t))
+      (or type (and include (not (get include 'cl-struct-print)))
+         (setq print-auto t
+               print-func (and (or (not (or include type)) (null print-func))
+                               (list 'progn
+                                     (list 'princ (format "#S(%s" name)
+                                           'cl-s))))))
+    (if include
+       (let ((inc-type (get include 'cl-struct-type))
+             (old-descs (get include 'cl-struct-slots)))
+         (or inc-type (error "%s is not a struct name" include))
+         (and type (not (eq (car inc-type) type))
+              (error ":type disagrees with :include for %s" name))
+         (while include-descs
+           (setcar (memq (or (assq (caar include-descs) old-descs)
+                             (error "No slot %s in included struct %s"
+                                    (caar include-descs) include))
+                         old-descs)
+                   (cl-pop include-descs)))
+         (setq descs (append old-descs (delq (assq 'cl-tag-slot descs) descs))
+               type (car inc-type)
+               named (assq 'cl-tag-slot descs))
+         (if (cadr inc-type) (setq tag name named t))
+         (let ((incl include))
+           (while incl
+             (cl-push (list 'pushnew (list 'quote tag)
+                            (intern (format "cl-struct-%s-tags" incl)))
+                      forms)
+             (setq incl (get incl 'cl-struct-include)))))
+      (if type
+         (progn
+           (or (memq type '(vector list))
+               (error "Illegal :type specifier: %s" type))
+           (if named (setq tag name)))
+       (setq type 'vector named 'true)))
+    (or named (setq descs (delq (assq 'cl-tag-slot descs) descs)))
+    (cl-push (list 'defvar tag-symbol) forms)
+    (setq pred-form (and named
+                        (let ((pos (- (length descs)
+                                      (length (memq (assq 'cl-tag-slot descs)
+                                                    descs)))))
+                          (if (eq type 'vector)
+                              (list 'and '(vectorp cl-x)
+                                    (list '>= '(length cl-x) (length descs))
+                                    (list 'memq (list 'aref 'cl-x pos)
+                                          tag-symbol))
+                            (if (= pos 0)
+                                (list 'memq '(car-safe cl-x) tag-symbol)
+                              (list 'and '(consp cl-x)
+                                    (list 'memq (list 'nth pos 'cl-x)
+                                          tag-symbol))))))
+         pred-check (and pred-form (> safety 0)
+                         (if (and (eq (caadr pred-form) 'vectorp)
+                                  (= safety 1))
+                             (cons 'and (cdddr pred-form)) pred-form)))
+    (let ((pos 0) (descp descs))
+      (while descp
+       (let* ((desc (cl-pop descp))
+              (slot (car desc)))
+         (if (memq slot '(cl-tag-slot cl-skip-slot))
+             (progn
+               (cl-push nil slots)
+               (cl-push (and (eq slot 'cl-tag-slot) (list 'quote tag))
+                        defaults))
+           (if (assq slot descp)
+               (error "Duplicate slots named %s in %s" slot name))
+           (let ((accessor (intern (format "%s%s" conc-name slot))))
+             (cl-push slot slots)
+             (cl-push (nth 1 desc) defaults)
+             (cl-push (list*
+                       'defsubst* accessor '(cl-x)
+                       (append
+                        (and pred-check
+                             (list (list 'or pred-check
+                                         (list 'error
+                                               (format "%s accessing a non-%s"
+                                                       accessor name)
+                                               'cl-x))))
+                        (list (if (eq type 'vector) (list 'aref 'cl-x pos)
+                                (if (= pos 0) '(car cl-x)
+                                  (list 'nth pos 'cl-x)))))) forms)
+             (cl-push (cons accessor t) side-eff)
+             (cl-push (list 'define-setf-method accessor '(cl-x)
+                            (if (cadr (memq ':read-only (cddr desc)))
+                                (list 'error (format "%s is a read-only slot"
+                                                     accessor))
+                              (list 'cl-struct-setf-expander 'cl-x
+                                    (list 'quote name) (list 'quote accessor)
+                                    (and pred-check (list 'quote pred-check))
+                                    pos)))
+                      forms)
+             (if print-auto
+                 (nconc print-func
+                        (list (list 'princ (format " %s" slot) 'cl-s)
+                              (list 'prin1 (list accessor 'cl-x) 'cl-s)))))))
+       (setq pos (1+ pos))))
+    (setq slots (nreverse slots)
+         defaults (nreverse defaults))
+    (and predicate pred-form
+        (progn (cl-push (list 'defsubst* predicate '(cl-x)
+                              (if (eq (car pred-form) 'and)
+                                  (append pred-form '(t))
+                                (list 'and pred-form t))) forms)
+               (cl-push (cons predicate 'error-free) side-eff)))
+    (and copier
+        (progn (cl-push (list 'defun copier '(x) '(copy-sequence x)) forms)
+               (cl-push (cons copier t) side-eff)))
+    (if constructor
+       (cl-push (list constructor
+                      (cons '&key (delq nil (copy-sequence slots))))
+                constrs))
+    (while constrs
+      (let* ((name (caar constrs))
+            (args (cadr (cl-pop constrs)))
+            (anames (cl-arglist-args args))
+            (make (mapcar* (function (lambda (s d) (if (memq s anames) s d)))
+                           slots defaults)))
+       (cl-push (list 'defsubst* name
+                      (list* '&cl-defs (list 'quote (cons nil descs)) args)
+                      (cons type make)) forms)
+       (if (cl-safe-expr-p (cons 'progn (mapcar 'second descs)))
+           (cl-push (cons name t) side-eff))))
+    (if print-auto (nconc print-func (list '(princ ")" cl-s) t)))
+    (if print-func
+       (cl-push (list 'push
+                      (list 'function
+                            (list 'lambda '(cl-x cl-s cl-n)
+                                  (list 'and pred-form print-func)))
+                      'custom-print-functions) forms))
+    (cl-push (list 'setq tag-symbol (list 'list (list 'quote tag))) forms)
+    (cl-push (list* 'eval-when '(compile load eval)
+                   (list 'put (list 'quote name) '(quote cl-struct-slots)
+                         (list 'quote descs))
+                   (list 'put (list 'quote name) '(quote cl-struct-type)
+                         (list 'quote (list type (eq named t))))
+                   (list 'put (list 'quote name) '(quote cl-struct-include)
+                         (list 'quote include))
+                   (list 'put (list 'quote name) '(quote cl-struct-print)
+                         print-auto)
+                   (mapcar (function (lambda (x)
+                                       (list 'put (list 'quote (car x))
+                                             '(quote side-effect-free)
+                                             (list 'quote (cdr x)))))
+                           side-eff))
+            forms)
+    (cons 'progn (nreverse (cons (list 'quote name) forms)))))
+
+;;;###autoload
+(defun cl-struct-setf-expander (x name accessor pred-form pos)
+  (let* ((temp (gensym "--x--")) (store (gensym "--store--")))
+    (list (list temp) (list x) (list store)
+         (append '(progn)
+                 (and pred-form
+                      (list (list 'or (subst temp 'cl-x pred-form)
+                                  (list 'error
+                                        (format
+                                         "%s storing a non-%s" accessor name)
+                                        temp))))
+                 (list (if (eq (car (get name 'cl-struct-type)) 'vector)
+                           (list 'aset temp pos store)
+                         (list 'setcar
+                               (if (<= pos 5)
+                                   (let ((xx temp))
+                                     (while (>= (setq pos (1- pos)) 0)
+                                       (setq xx (list 'cdr xx)))
+                                     xx)
+                                 (list 'nthcdr pos temp))
+                               store))))
+         (list accessor temp))))
+
+
+;;; Types and assertions.
+
+;;;###autoload
+(defmacro deftype (name args &rest body)
+  "(deftype NAME ARGLIST BODY...): define NAME as a new data type.
+The type name can then be used in `typecase', `check-type', etc."
+  (list 'eval-when '(compile load eval)
+       (cl-transform-function-property
+        name 'cl-deftype-handler (cons (list* '&cl-defs ''('*) args) body))))
+
+(defun cl-make-type-test (val type)
+  (if (symbolp type)
+      (cond ((get type 'cl-deftype-handler)
+            (cl-make-type-test val (funcall (get type 'cl-deftype-handler))))
+           ((memq type '(nil t)) type)
+           ((eq type 'string-char) (list 'characterp val))
+           ((eq type 'null) (list 'null val))
+           ((eq type 'float) (list 'floatp-safe val))
+           ((eq type 'real) (list 'numberp val))
+           ((eq type 'fixnum) (list 'integerp val))
+           (t
+            (let* ((name (symbol-name type))
+                   (namep (intern (concat name "p"))))
+              (if (fboundp namep) (list namep val)
+                (list (intern (concat name "-p")) val)))))
+    (cond ((get (car type) 'cl-deftype-handler)
+          (cl-make-type-test val (apply (get (car type) 'cl-deftype-handler)
+                                        (cdr type))))
+         ((memq (car-safe type) '(integer float real number))
+          (delq t (list 'and (cl-make-type-test val (car type))
+                        (if (memq (cadr type) '(* nil)) t
+                          (if (consp (cadr type)) (list '> val (caadr type))
+                            (list '>= val (cadr type))))
+                        (if (memq (caddr type) '(* nil)) t
+                          (if (consp (caddr type)) (list '< val (caaddr type))
+                            (list '<= val (caddr type)))))))
+         ((memq (car-safe type) '(and or not))
+          (cons (car type)
+                (mapcar (function (lambda (x) (cl-make-type-test val x)))
+                        (cdr type))))
+         ((memq (car-safe type) '(member member*))
+          (list 'and (list 'member* val (list 'quote (cdr type))) t))
+         ((eq (car-safe type) 'satisfies) (list (cadr type) val))
+         (t (error "Bad type spec: %s" type)))))
+
+;;;###autoload
+(defun typep (val type)   ; See compiler macro below.
+  "Check that OBJECT is of type TYPE.
+TYPE is a Common Lisp-style type specifier."
+  (eval (cl-make-type-test 'val type)))
+
+;;;###autoload
+(defmacro check-type (form type &optional string)
+  "Verify that FORM is of type TYPE; signal an error if not.
+STRING is an optional description of the desired type."
+  (and (or (not (cl-compiling-file))
+          (< cl-optimize-speed 3) (= cl-optimize-safety 3))
+       (let* ((temp (if (cl-simple-expr-p form 3) form (gensym)))
+             (body (list 'or (cl-make-type-test temp type)
+                         (list 'signal '(quote wrong-type-argument)
+                               (list 'list (or string (list 'quote type))
+                                     temp (list 'quote form))))))
+        (if (eq temp form) (list 'progn body nil)
+          (list 'let (list (list temp form)) body nil)))))
+
+;;;###autoload
+(defmacro assert (form &optional show-args string &rest args)
+  "Verify that FORM returns non-nil; signal an error if not.
+Second arg SHOW-ARGS means to include arguments of FORM in message.
+Other args STRING and ARGS... are arguments to be passed to `error'.
+They are not evaluated unless the assertion fails.  If STRING is
+omitted, a default message listing FORM itself is used."
+  (and (or (not (cl-compiling-file))
+          (< cl-optimize-speed 3) (= cl-optimize-safety 3))
+       (let ((sargs (and show-args (delq nil (mapcar
+                                             (function
+                                              (lambda (x)
+                                                (and (not (cl-const-expr-p x))
+                                                     x))) (cdr form))))))
+        (list 'progn
+              (list 'or form
+                    (if string
+                        (list* 'error string (append sargs args))
+                      (list 'signal '(quote cl-assertion-failed)
+                            (list* 'list (list 'quote form) sargs))))
+              nil))))
+
+;;;###autoload
+(defmacro ignore-errors (&rest body)
+  "Execute FORMS; if an error occurs, return nil.
+Otherwise, return result of last FORM."
+  (list 'condition-case nil (cons 'progn body) '(error nil)))
+
+
+;;; Some predicates for analyzing Lisp forms.  These are used by various
+;;; macro expanders to optimize the results in certain common cases.
+
+(defconst cl-simple-funcs '(car cdr nth aref elt if and or + - 1+ 1- min max
+                           car-safe cdr-safe progn prog1 prog2))
+(defconst cl-safe-funcs '(* / % length memq list vector vectorp
+                         < > <= >= = error))
+
+;;; Check if no side effects, and executes quickly.
+(defun cl-simple-expr-p (x &optional size)
+  (or size (setq size 10))
+  (if (and (consp x) (not (memq (car x) '(quote function function*))))
+      (and (symbolp (car x))
+          (or (memq (car x) cl-simple-funcs)
+              (get (car x) 'side-effect-free))
+          (progn
+            (setq size (1- size))
+            (while (and (setq x (cdr x))
+                        (setq size (cl-simple-expr-p (car x) size))))
+            (and (null x) (>= size 0) size)))
+    (and (> size 0) (1- size))))
+
+(defun cl-simple-exprs-p (xs)
+  (while (and xs (cl-simple-expr-p (car xs)))
+    (setq xs (cdr xs)))
+  (not xs))
+
+;;; Check if no side effects.
+(defun cl-safe-expr-p (x)
+  (or (not (and (consp x) (not (memq (car x) '(quote function function*)))))
+      (and (symbolp (car x))
+          (or (memq (car x) cl-simple-funcs)
+              (memq (car x) cl-safe-funcs)
+              (get (car x) 'side-effect-free))
+          (progn
+            (while (and (setq x (cdr x)) (cl-safe-expr-p (car x))))
+            (null x)))))
+
+;;; Check if constant (i.e., no side effects or dependencies).
+(defun cl-const-expr-p (x)
+  (cond ((consp x)
+        (or (eq (car x) 'quote)
+            (and (memq (car x) '(function function*))
+                 (or (symbolp (nth 1 x))
+                     (and (eq (car-safe (nth 1 x)) 'lambda) 'func)))))
+       ((symbolp x) (and (memq x '(nil t)) t))
+       (t t)))
+
+(defun cl-const-exprs-p (xs)
+  (while (and xs (cl-const-expr-p (car xs)))
+    (setq xs (cdr xs)))
+  (not xs))
+
+(defun cl-const-expr-val (x)
+  (and (eq (cl-const-expr-p x) t) (if (consp x) (nth 1 x) x)))
+
+(defun cl-expr-access-order (x v)
+  (if (cl-const-expr-p x) v
+    (if (consp x)
+       (progn
+         (while (setq x (cdr x)) (setq v (cl-expr-access-order (car x) v)))
+         v)
+      (if (eq x (car v)) (cdr v) '(t)))))
+
+;;; Count number of times X refers to Y.  Return NIL for 0 times.
+(defun cl-expr-contains (x y)
+  (cond ((equal y x) 1)
+       ((and (consp x) (not (memq (car-safe x) '(quote function function*))))
+        (let ((sum 0))
+          (while x
+            (setq sum (+ sum (or (cl-expr-contains (cl-pop x) y) 0))))
+          (and (> sum 0) sum)))
+       (t nil)))
+
+(defun cl-expr-contains-any (x y)
+  (while (and y (not (cl-expr-contains x (car y)))) (cl-pop y))
+  y)
+
+;;; Check whether X may depend on any of the symbols in Y.
+(defun cl-expr-depends-p (x y)
+  (and (not (cl-const-expr-p x))
+       (or (not (cl-safe-expr-p x)) (cl-expr-contains-any x y))))
+
+
+;;; Compiler macros.
+
+;;;###autoload
+(defmacro define-compiler-macro (func args &rest body)
+  "(define-compiler-macro FUNC ARGLIST BODY...): Define a compiler-only macro.
+This is like `defmacro', but macro expansion occurs only if the call to
+FUNC is compiled (i.e., not interpreted).  Compiler macros should be used
+for optimizing the way calls to FUNC are compiled; the form returned by
+BODY should do the same thing as a call to the normal function called
+FUNC, though possibly more efficiently.  Note that, like regular macros,
+compiler macros are expanded repeatedly until no further expansions are
+possible.  Unlike regular macros, BODY can decide to \"punt\" and leave the
+original function call alone by declaring an initial `&whole foo' parameter
+and then returning foo."
+  (let ((p (if (listp args) args (list '&rest args))) (res nil))
+    (while (consp p) (cl-push (cl-pop p) res))
+    (setq args (nreverse res)) (setcdr res (and p (list '&rest p))))
+  (list 'eval-when '(compile load eval)
+       (cl-transform-function-property
+        func 'cl-compiler-macro
+        (cons (if (memq '&whole args) (delq '&whole args)
+                (cons '--cl-whole-arg-- args)) body))
+       (list 'or (list 'get (list 'quote func) '(quote byte-compile))
+             (list 'put (list 'quote func) '(quote byte-compile)
+                   '(quote cl-byte-compile-compiler-macro)))))
+
+;;;###autoload
+(defun compiler-macroexpand (form)
+  (while
+      (let ((func (car-safe form)) (handler nil))
+       (while (and (symbolp func)
+                   (not (setq handler (get func 'cl-compiler-macro)))
+                   (fboundp func)
+                   (or (not (eq (car-safe (symbol-function func)) 'autoload))
+                       (load (nth 1 (symbol-function func)))))
+         (setq func (symbol-function func)))
+       (and handler
+            (not (eq form (setq form (apply handler form (cdr form))))))))
+  form)
+
+(defun cl-byte-compile-compiler-macro (form)
+  (if (eq form (setq form (compiler-macroexpand form)))
+      (byte-compile-normal-call form)
+    (byte-compile-form form)))
+
+(defmacro defsubst* (name args &rest body)
+  "(defsubst* NAME ARGLIST [DOCSTRING] BODY...): define NAME as a function.
+Like `defun', except the function is automatically declared `inline',
+ARGLIST allows full Common Lisp conventions, and BODY is implicitly
+surrounded by (block NAME ...)."
+  (let* ((argns (cl-arglist-args args)) (p argns)
+        (pbody (cons 'progn body))
+        (unsafe (not (cl-safe-expr-p pbody))))
+    (while (and p (eq (cl-expr-contains args (car p)) 1)) (cl-pop p))
+    (list 'progn
+         (if p nil   ; give up if defaults refer to earlier args
+           (list 'define-compiler-macro name
+                 (list* '&whole 'cl-whole '&cl-quote args)
+                 (list* 'cl-defsubst-expand (list 'quote argns)
+                        (list 'quote (list* 'block name body))
+                        (not (or unsafe (cl-expr-access-order pbody argns)))
+                        (and (memq '&key args) 'cl-whole) unsafe argns)))
+         (list* 'defun* name args body))))
+
+(defun cl-defsubst-expand (argns body simple whole unsafe &rest argvs)
+  (if (and whole (not (cl-safe-expr-p (cons 'progn argvs)))) whole
+    (if (cl-simple-exprs-p argvs) (setq simple t))
+    (let ((lets (delq nil
+                     (mapcar* (function
+                               (lambda (argn argv)
+                                 (if (or simple (cl-const-expr-p argv))
+                                     (progn (setq body (subst argv argn body))
+                                            (and unsafe (list argn argv)))
+                                   (list argn argv))))
+                              argns argvs))))
+      (if lets (list 'let lets body) body))))
+
+
+;;; Compile-time optimizations for some functions defined in this package.
+;;; Note that cl.el arranges to force cl-macs to be loaded at compile-time,
+;;; mainly to make sure these macros will be present.
+
+(put 'eql 'byte-compile nil)
+(define-compiler-macro eql (&whole form a b)
+  (cond ((eq (cl-const-expr-p a) t)
+        (let ((val (cl-const-expr-val a)))
+          (if (and (numberp val) (not (integerp val)))
+              (list 'equal a b)
+            (list 'eq a b))))
+       ((eq (cl-const-expr-p b) t)
+        (let ((val (cl-const-expr-val b)))
+          (if (and (numberp val) (not (integerp val)))
+              (list 'equal a b)
+            (list 'eq a b))))
+       ((cl-simple-expr-p a 5)
+        (list 'if (list 'numberp a)
+              (list 'equal a b)
+              (list 'eq a b)))
+       ((and (cl-safe-expr-p a)
+             (cl-simple-expr-p b 5))
+        (list 'if (list 'numberp b)
+              (list 'equal a b)
+              (list 'eq a b)))
+       (t form)))
+
+(define-compiler-macro member* (&whole form a list &rest keys)
+  (let ((test (and (= (length keys) 2) (eq (car keys) ':test)
+                  (cl-const-expr-val (nth 1 keys)))))
+    (cond ((eq test 'eq) (list 'memq a list))
+         ((eq test 'equal) (list 'member a list))
+         ((or (null keys) (eq test 'eql))
+          (if (eq (cl-const-expr-p a) t)
+              (list (if (floatp-safe (cl-const-expr-val a)) 'member 'memq)
+                    a list)
+            (if (eq (cl-const-expr-p list) t)
+                (let ((p (cl-const-expr-val list)) (mb nil) (mq nil))
+                  (if (not (cdr p))
+                      (and p (list 'eql a (list 'quote (car p))))
+                    (while p
+                      (if (floatp-safe (car p)) (setq mb t)
+                        (or (integerp (car p)) (symbolp (car p)) (setq mq t)))
+                      (setq p (cdr p)))
+                    (if (not mb) (list 'memq a list)
+                      (if (not mq) (list 'member a list) form))))
+              form)))
+         (t form))))
+
+(define-compiler-macro assoc* (&whole form a list &rest keys)
+  (let ((test (and (= (length keys) 2) (eq (car keys) ':test)
+                  (cl-const-expr-val (nth 1 keys)))))
+    (cond ((eq test 'eq) (list 'assq a list))
+         ((eq test 'equal) (list 'assoc a list))
+         ((and (eq (cl-const-expr-p a) t) (or (null keys) (eq test 'eql)))
+          (if (floatp-safe (cl-const-expr-val a))
+              (list 'assoc a list) (list 'assq a list)))
+         (t form))))
+
+(define-compiler-macro adjoin (&whole form a list &rest keys)
+  (if (and (cl-simple-expr-p a) (cl-simple-expr-p list)
+          (not (memq ':key keys)))
+      (list 'if (list* 'member* a list keys) list (list 'cons a list))
+    form))
+
+(define-compiler-macro list* (arg &rest others)
+  (let* ((args (reverse (cons arg others)))
+        (form (car args)))
+    (while (setq args (cdr args))
+      (setq form (list 'cons (car args) form)))
+    form))
+
+(define-compiler-macro get* (sym prop &optional def)
+  (if def
+      (list 'getf (list 'symbol-plist sym) prop def)
+    (list 'get sym prop)))
+
+(define-compiler-macro typep (&whole form val type)
+  (if (cl-const-expr-p type)
+      (let ((res (cl-make-type-test val (cl-const-expr-val type))))
+       (if (or (memq (cl-expr-contains res val) '(nil 1))
+               (cl-simple-expr-p val)) res
+         (let ((temp (gensym)))
+           (list 'let (list (list temp val)) (subst temp val res)))))
+    form))
+
+
+(mapcar (function
+        (lambda (y)
+          (put (car y) 'side-effect-free t)
+          (put (car y) 'byte-compile 'cl-byte-compile-compiler-macro)
+          (put (car y) 'cl-compiler-macro
+               (list 'lambda '(w x)
+                     (if (symbolp (cadr y))
+                         (list 'list (list 'quote (cadr y))
+                               (list 'list (list 'quote (caddr y)) 'x))
+                       (cons 'list (cdr y)))))))
+       '((first 'car x) (second 'cadr x) (third 'caddr x) (fourth 'cadddr x)
+         (fifth 'nth 4 x) (sixth 'nth 5 x) (seventh 'nth 6 x)
+         (eighth 'nth 7 x) (ninth 'nth 8 x) (tenth 'nth 9 x)
+         (rest 'cdr x) (endp 'null x) (plusp '> x 0) (minusp '< x 0)
+         (caar car car) (cadr car cdr) (cdar cdr car) (cddr cdr cdr)
+         (caaar car caar) (caadr car cadr) (cadar car cdar)
+         (caddr car cddr) (cdaar cdr caar) (cdadr cdr cadr)
+         (cddar cdr cdar) (cdddr cdr cddr) (caaaar car caaar)
+         (caaadr car caadr) (caadar car cadar) (caaddr car caddr)
+         (cadaar car cdaar) (cadadr car cdadr) (caddar car cddar)
+         (cadddr car cdddr) (cdaaar cdr caaar) (cdaadr cdr caadr)
+         (cdadar cdr cadar) (cdaddr cdr caddr) (cddaar cdr cdaar)
+         (cddadr cdr cdadr) (cdddar cdr cddar) (cddddr cdr cdddr) ))
+
+;;; Things that are inline.
+(proclaim '(inline floatp-safe acons map concatenate notany notevery
+;; XEmacs change
+                  cl-set-elt revappend nreconc))
+
+;;; Things that are side-effect-free.
+(mapcar (function (lambda (x) (put x 'side-effect-free t)))
+       '(oddp evenp abs expt signum last butlast ldiff pairlis gcd lcm
+         isqrt floor* ceiling* truncate* round* mod* rem* subseq
+         list-length get* getf gethash hash-table-count))
+
+;;; Things that are side-effect-and-error-free.
+(mapcar (function (lambda (x) (put x 'side-effect-free 'error-free)))
+       '(eql floatp-safe list* subst acons equalp random-state-p
+         copy-tree sublis hash-table-p))
+
+
+(run-hooks 'cl-macs-load-hook)
+
+;;; cl-macs.el ends here
diff --git a/lisp/cl-seq.el b/lisp/cl-seq.el
new file mode 100644 (file)
index 0000000..9f1b256
--- /dev/null
@@ -0,0 +1,938 @@
+;;; cl-seq.el --- Common Lisp extensions for GNU Emacs Lisp (part three)
+
+;; Copyright (C) 1993 Free Software Foundation, Inc.
+
+;; Author: Dave Gillespie <daveg@synaptics.com>
+;; Maintainer: XEmacs Development Team
+;; Version: 2.02
+;; Keywords: extensions, dumped
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: FSF 19.34.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; These are extensions to Emacs Lisp that provide a degree of
+;; Common Lisp compatibility, beyond what is already built-in
+;; in Emacs Lisp.
+;;
+;; This package was written by Dave Gillespie; it is a complete
+;; rewrite of Cesar Quiroz's original cl.el package of December 1986.
+;;
+;; This package works with Emacs 18, Emacs 19, and Lucid Emacs 19.
+;;
+;; Bug reports, comments, and suggestions are welcome!
+
+;; This file contains the Common Lisp sequence and list functions
+;; which take keyword arguments.
+
+;; See cl.el for Change Log.
+
+
+;;; Code:
+
+(or (memq 'cl-19 features)
+    (error "Tried to load `cl-seq' before `cl'!"))
+
+
+;;; We define these here so that this file can compile without having
+;;; loaded the cl.el file already.
+
+(defmacro cl-push (x place) (list 'setq place (list 'cons x place)))
+(defmacro cl-pop (place)
+  (list 'car (list 'prog1 place (list 'setq place (list 'cdr place)))))
+
+
+;;; Keyword parsing.  This is special-cased here so that we can compile
+;;; this file independent from cl-macs.
+
+(defmacro cl-parsing-keywords (kwords other-keys &rest body)
+  (cons
+   'let*
+   (cons (mapcar
+         (function
+          (lambda (x)
+            (let* ((var (if (consp x) (car x) x))
+                   (mem (list 'car (list 'cdr (list 'memq (list 'quote var)
+                                                    'cl-keys)))))
+              (if (eq var ':test-not)
+                  (setq mem (list 'and mem (list 'setq 'cl-test mem) t)))
+              (if (eq var ':if-not)
+                  (setq mem (list 'and mem (list 'setq 'cl-if mem) t)))
+              (list (intern
+                     (format "cl-%s" (substring (symbol-name var) 1)))
+                    (if (consp x) (list 'or mem (car (cdr x))) mem)))))
+         kwords)
+        (append
+         (and (not (eq other-keys t))
+              (list
+               (list 'let '((cl-keys-temp cl-keys))
+                     (list 'while 'cl-keys-temp
+                           (list 'or (list 'memq '(car cl-keys-temp)
+                                           (list 'quote
+                                                 (mapcar
+                                                  (function
+                                                   (lambda (x)
+                                                     (if (consp x)
+                                                         (car x) x)))
+                                                  (append kwords
+                                                          other-keys))))
+                                 '(car (cdr (memq (quote :allow-other-keys)
+                                                  cl-keys)))
+                                 '(error "Bad keyword argument %s"
+                                         (car cl-keys-temp)))
+                           '(setq cl-keys-temp (cdr (cdr cl-keys-temp)))))))
+         body))))
+(put 'cl-parsing-keywords 'lisp-indent-function 2)
+(put 'cl-parsing-keywords 'edebug-form-spec '(sexp sexp &rest form))
+
+(defmacro cl-check-key (x)
+  (list 'if 'cl-key (list 'funcall 'cl-key x) x))
+
+(defmacro cl-check-test-nokey (item x)
+  (list 'cond
+       (list 'cl-test
+             (list 'eq (list 'not (list 'funcall 'cl-test item x))
+                   'cl-test-not))
+       (list 'cl-if
+             (list 'eq (list 'not (list 'funcall 'cl-if x)) 'cl-if-not))
+       (list 't (list 'if (list 'numberp item)
+                      (list 'equal item x) (list 'eq item x)))))
+
+(defmacro cl-check-test (item x)
+  (list 'cl-check-test-nokey item (list 'cl-check-key x)))
+
+(defmacro cl-check-match (x y)
+  (setq x (list 'cl-check-key x) y (list 'cl-check-key y))
+  (list 'if 'cl-test
+       (list 'eq (list 'not (list 'funcall 'cl-test x y)) 'cl-test-not)
+       (list 'if (list 'numberp x)
+             (list 'equal x y) (list 'eq x y))))
+
+(put 'cl-check-key 'edebug-form-spec 'edebug-forms)
+(put 'cl-check-test 'edebug-form-spec 'edebug-forms)
+(put 'cl-check-test-nokey 'edebug-form-spec 'edebug-forms)
+(put 'cl-check-match 'edebug-form-spec 'edebug-forms)
+
+(defvar cl-test) (defvar cl-test-not)
+(defvar cl-if) (defvar cl-if-not)
+(defvar cl-key)
+
+
+(defun reduce (cl-func cl-seq &rest cl-keys)
+  "Reduce two-argument FUNCTION across SEQUENCE.
+Keywords supported:  :start :end :from-end :initial-value :key"
+  (cl-parsing-keywords (:from-end (:start 0) :end :initial-value :key) ()
+    (or (listp cl-seq) (setq cl-seq (append cl-seq nil)))
+    (setq cl-seq (subseq cl-seq cl-start cl-end))
+    (if cl-from-end (setq cl-seq (nreverse cl-seq)))
+    (let ((cl-accum (cond ((memq ':initial-value cl-keys) cl-initial-value)
+                         (cl-seq (cl-check-key (cl-pop cl-seq)))
+                         (t (funcall cl-func)))))
+      (if cl-from-end
+         (while cl-seq
+           (setq cl-accum (funcall cl-func (cl-check-key (cl-pop cl-seq))
+                                   cl-accum)))
+       (while cl-seq
+         (setq cl-accum (funcall cl-func cl-accum
+                                 (cl-check-key (cl-pop cl-seq))))))
+      cl-accum)))
+
+(defun fill (seq item &rest cl-keys)
+  "Fill the elements of SEQ with ITEM.
+Keywords supported:  :start :end"
+  (cl-parsing-keywords ((:start 0) :end) ()
+    (if (listp seq)
+       (let ((p (nthcdr cl-start seq))
+             (n (if cl-end (- cl-end cl-start) 8000000)))
+         (while (and p (>= (setq n (1- n)) 0))
+           (setcar p item)
+           (setq p (cdr p))))
+      (or cl-end (setq cl-end (length seq)))
+      (if (and (= cl-start 0) (= cl-end (length seq)))
+         (fillarray seq item)
+       (while (< cl-start cl-end)
+         (aset seq cl-start item)
+         (setq cl-start (1+ cl-start)))))
+    seq))
+
+(defun replace (cl-seq1 cl-seq2 &rest cl-keys)
+  "Replace the elements of SEQ1 with the elements of SEQ2.
+SEQ1 is destructively modified, then returned.
+Keywords supported:  :start1 :end1 :start2 :end2"
+  (cl-parsing-keywords ((:start1 0) :end1 (:start2 0) :end2) ()
+    (if (and (eq cl-seq1 cl-seq2) (<= cl-start2 cl-start1))
+       (or (= cl-start1 cl-start2)
+           (let* ((cl-len (length cl-seq1))
+                  (cl-n (min (- (or cl-end1 cl-len) cl-start1)
+                             (- (or cl-end2 cl-len) cl-start2))))
+             (while (>= (setq cl-n (1- cl-n)) 0)
+               (cl-set-elt cl-seq1 (+ cl-start1 cl-n)
+                           (elt cl-seq2 (+ cl-start2 cl-n))))))
+      (if (listp cl-seq1)
+         (let ((cl-p1 (nthcdr cl-start1 cl-seq1))
+               (cl-n1 (if cl-end1 (- cl-end1 cl-start1) 4000000)))
+           (if (listp cl-seq2)
+               (let ((cl-p2 (nthcdr cl-start2 cl-seq2))
+                     (cl-n (min cl-n1
+                                (if cl-end2 (- cl-end2 cl-start2) 4000000))))
+                 (while (and cl-p1 cl-p2 (>= (setq cl-n (1- cl-n)) 0))
+                   (setcar cl-p1 (car cl-p2))
+                   (setq cl-p1 (cdr cl-p1) cl-p2 (cdr cl-p2))))
+             (setq cl-end2 (min (or cl-end2 (length cl-seq2))
+                                (+ cl-start2 cl-n1)))
+             (while (and cl-p1 (< cl-start2 cl-end2))
+               (setcar cl-p1 (aref cl-seq2 cl-start2))
+               (setq cl-p1 (cdr cl-p1) cl-start2 (1+ cl-start2)))))
+       (setq cl-end1 (min (or cl-end1 (length cl-seq1))
+                          (+ cl-start1 (- (or cl-end2 (length cl-seq2))
+                                          cl-start2))))
+       (if (listp cl-seq2)
+           (let ((cl-p2 (nthcdr cl-start2 cl-seq2)))
+             (while (< cl-start1 cl-end1)
+               (aset cl-seq1 cl-start1 (car cl-p2))
+               (setq cl-p2 (cdr cl-p2) cl-start1 (1+ cl-start1))))
+         (while (< cl-start1 cl-end1)
+           (aset cl-seq1 cl-start1 (aref cl-seq2 cl-start2))
+           (setq cl-start2 (1+ cl-start2) cl-start1 (1+ cl-start1))))))
+    cl-seq1))
+
+(defun remove* (cl-item cl-seq &rest cl-keys)
+  "Remove all occurrences of ITEM in SEQ.
+This is a non-destructive function; it makes a copy of SEQ if necessary
+to avoid corrupting the original SEQ.
+Keywords supported:  :test :test-not :key :count :start :end :from-end"
+  (cl-parsing-keywords (:test :test-not :key :if :if-not :count :from-end
+                       (:start 0) :end) ()
+    (if (<= (or cl-count (setq cl-count 8000000)) 0)
+       cl-seq
+      (if (or (nlistp cl-seq) (and cl-from-end (< cl-count 4000000)))
+         (let ((cl-i (cl-position cl-item cl-seq cl-start cl-end
+                                  cl-from-end)))
+           (if cl-i
+               (let ((cl-res (apply 'delete* cl-item (append cl-seq nil)
+                                    (append (if cl-from-end
+                                                (list ':end (1+ cl-i))
+                                              (list ':start cl-i))
+                                            cl-keys))))
+                 (if (listp cl-seq) cl-res
+                   (if (stringp cl-seq) (concat cl-res) (vconcat cl-res))))
+             cl-seq))
+       (setq cl-end (- (or cl-end 8000000) cl-start))
+       (if (= cl-start 0)
+           (while (and cl-seq (> cl-end 0)
+                       (cl-check-test cl-item (car cl-seq))
+                       (setq cl-end (1- cl-end) cl-seq (cdr cl-seq))
+                       (> (setq cl-count (1- cl-count)) 0))))
+       (if (and (> cl-count 0) (> cl-end 0))
+           (let ((cl-p (if (> cl-start 0) (nthcdr cl-start cl-seq)
+                         (setq cl-end (1- cl-end)) (cdr cl-seq))))
+             (while (and cl-p (> cl-end 0)
+                         (not (cl-check-test cl-item (car cl-p))))
+               (setq cl-p (cdr cl-p) cl-end (1- cl-end)))
+             (if (and cl-p (> cl-end 0))
+                 (nconc (ldiff cl-seq cl-p)
+                        (if (= cl-count 1) (cdr cl-p)
+                          (and (cdr cl-p)
+                               (apply 'delete* cl-item
+                                      (copy-sequence (cdr cl-p))
+                                      ':start 0 ':end (1- cl-end)
+                                      ':count (1- cl-count) cl-keys))))
+               cl-seq))
+         cl-seq)))))
+
+(defun remove-if (cl-pred cl-list &rest cl-keys)
+  "Remove all items satisfying PREDICATE in SEQ.
+This is a non-destructive function; it makes a copy of SEQ if necessary
+to avoid corrupting the original SEQ.
+Keywords supported:  :key :count :start :end :from-end"
+  (apply 'remove* nil cl-list ':if cl-pred cl-keys))
+
+(defun remove-if-not (cl-pred cl-list &rest cl-keys)
+  "Remove all items not satisfying PREDICATE in SEQ.
+This is a non-destructive function; it makes a copy of SEQ if necessary
+to avoid corrupting the original SEQ.
+Keywords supported:  :key :count :start :end :from-end"
+  (apply 'remove* nil cl-list ':if-not cl-pred cl-keys))
+
+(defun delete* (cl-item cl-seq &rest cl-keys)
+  "Remove all occurrences of ITEM in SEQ.
+This is a destructive function; it reuses the storage of SEQ whenever possible.
+Keywords supported:  :test :test-not :key :count :start :end :from-end"
+  (cl-parsing-keywords (:test :test-not :key :if :if-not :count :from-end
+                       (:start 0) :end) ()
+    (if (<= (or cl-count (setq cl-count 8000000)) 0)
+       cl-seq
+      (if (listp cl-seq)
+         (if (and cl-from-end (< cl-count 4000000))
+             (let (cl-i)
+               (while (and (>= (setq cl-count (1- cl-count)) 0)
+                           (setq cl-i (cl-position cl-item cl-seq cl-start
+                                                   cl-end cl-from-end)))
+                 (if (= cl-i 0) (setq cl-seq (cdr cl-seq))
+                   (let ((cl-tail (nthcdr (1- cl-i) cl-seq)))
+                     (setcdr cl-tail (cdr (cdr cl-tail)))))
+                 (setq cl-end cl-i))
+               cl-seq)
+           (setq cl-end (- (or cl-end 8000000) cl-start))
+           (if (= cl-start 0)
+               (progn
+                 (while (and cl-seq
+                             (> cl-end 0)
+                             (cl-check-test cl-item (car cl-seq))
+                             (setq cl-end (1- cl-end) cl-seq (cdr cl-seq))
+                             (> (setq cl-count (1- cl-count)) 0)))
+                 (setq cl-end (1- cl-end)))
+             (setq cl-start (1- cl-start)))
+           (if (and (> cl-count 0) (> cl-end 0))
+               (let ((cl-p (nthcdr cl-start cl-seq)))
+                 (while (and (cdr cl-p) (> cl-end 0))
+                   (if (cl-check-test cl-item (car (cdr cl-p)))
+                       (progn
+                         (setcdr cl-p (cdr (cdr cl-p)))
+                         (if (= (setq cl-count (1- cl-count)) 0)
+                             (setq cl-end 1)))
+                     (setq cl-p (cdr cl-p)))
+                   (setq cl-end (1- cl-end)))))
+           cl-seq)
+       (apply 'remove* cl-item cl-seq cl-keys)))))
+
+(defun delete-if (cl-pred cl-list &rest cl-keys)
+  "Remove all items satisfying PREDICATE in SEQ.
+This is a destructive function; it reuses the storage of SEQ whenever possible.
+Keywords supported:  :key :count :start :end :from-end"
+  (apply 'delete* nil cl-list ':if cl-pred cl-keys))
+
+(defun delete-if-not (cl-pred cl-list &rest cl-keys)
+  "Remove all items not satisfying PREDICATE in SEQ.
+This is a destructive function; it reuses the storage of SEQ whenever possible.
+Keywords supported:  :key :count :start :end :from-end"
+  (apply 'delete* nil cl-list ':if-not cl-pred cl-keys))
+
+(or (and (fboundp 'delete) (subrp (symbol-function 'delete)))
+    (defalias 'delete (function (lambda (x y) (delete* x y ':test 'equal)))))
+
+(defun remove (cl-item cl-seq)
+  "Remove all occurrences of ITEM in SEQ, testing with `equal'
+This is a non-destructive function; it makes a copy of SEQ if necessary
+to avoid corrupting the original SEQ.
+Also see: `remove*', `delete', `delete*'"
+  (remove* cl-item cl-seq ':test 'equal))
+
+(defun remq (cl-elt cl-list)
+  "Remove all occurances of ELT in LIST, comparing with `eq'.
+This is a non-destructive function; it makes a copy of LIST to avoid
+corrupting the original LIST.
+Also see: `delq', `delete', `delete*', `remove', `remove*'."
+  (if (memq cl-elt cl-list)
+      (delq cl-elt (copy-list cl-list))
+    cl-list))
+
+(defun remove-duplicates (cl-seq &rest cl-keys)
+  "Return a copy of SEQ with all duplicate elements removed.
+Keywords supported:  :test :test-not :key :start :end :from-end"
+  (cl-delete-duplicates cl-seq cl-keys t))
+
+(defun delete-duplicates (cl-seq &rest cl-keys)
+  "Remove all duplicate elements from SEQ (destructively).
+Keywords supported:  :test :test-not :key :start :end :from-end"
+  (cl-delete-duplicates cl-seq cl-keys nil))
+
+(defun cl-delete-duplicates (cl-seq cl-keys cl-copy)
+  (if (listp cl-seq)
+      (cl-parsing-keywords (:test :test-not :key (:start 0) :end :from-end :if)
+         ()
+       (if cl-from-end
+           (let ((cl-p (nthcdr cl-start cl-seq)) cl-i)
+             (setq cl-end (- (or cl-end (length cl-seq)) cl-start))
+             (while (> cl-end 1)
+               (setq cl-i 0)
+               (while (setq cl-i (cl-position (cl-check-key (car cl-p))
+                                              (cdr cl-p) cl-i (1- cl-end)))
+                 (if cl-copy (setq cl-seq (copy-sequence cl-seq)
+                                   cl-p (nthcdr cl-start cl-seq) cl-copy nil))
+                 (let ((cl-tail (nthcdr cl-i cl-p)))
+                   (setcdr cl-tail (cdr (cdr cl-tail))))
+                 (setq cl-end (1- cl-end)))
+               (setq cl-p (cdr cl-p) cl-end (1- cl-end)
+                     cl-start (1+ cl-start)))
+             cl-seq)
+         (setq cl-end (- (or cl-end (length cl-seq)) cl-start))
+         (while (and (cdr cl-seq) (= cl-start 0) (> cl-end 1)
+                     (cl-position (cl-check-key (car cl-seq))
+                                  (cdr cl-seq) 0 (1- cl-end)))
+           (setq cl-seq (cdr cl-seq) cl-end (1- cl-end)))
+         (let ((cl-p (if (> cl-start 0) (nthcdr (1- cl-start) cl-seq)
+                       (setq cl-end (1- cl-end) cl-start 1) cl-seq)))
+           (while (and (cdr (cdr cl-p)) (> cl-end 1))
+             (if (cl-position (cl-check-key (car (cdr cl-p)))
+                              (cdr (cdr cl-p)) 0 (1- cl-end))
+                 (progn
+                   (if cl-copy (setq cl-seq (copy-sequence cl-seq)
+                                     cl-p (nthcdr (1- cl-start) cl-seq)
+                                     cl-copy nil))
+                   (setcdr cl-p (cdr (cdr cl-p))))
+               (setq cl-p (cdr cl-p)))
+             (setq cl-end (1- cl-end) cl-start (1+ cl-start)))
+           cl-seq)))
+    (let ((cl-res (cl-delete-duplicates (append cl-seq nil) cl-keys nil)))
+      (if (stringp cl-seq) (concat cl-res) (vconcat cl-res)))))
+
+(defun substitute (cl-new cl-old cl-seq &rest cl-keys)
+  "Substitute NEW for OLD in SEQ.
+This is a non-destructive function; it makes a copy of SEQ if necessary
+to avoid corrupting the original SEQ.
+Keywords supported:  :test :test-not :key :count :start :end :from-end"
+  (cl-parsing-keywords (:test :test-not :key :if :if-not :count
+                       (:start 0) :end :from-end) ()
+    (if (or (eq cl-old cl-new)
+           (<= (or cl-count (setq cl-from-end nil cl-count 8000000)) 0))
+       cl-seq
+      (let ((cl-i (cl-position cl-old cl-seq cl-start cl-end)))
+       (if (not cl-i)
+           cl-seq
+         (setq cl-seq (copy-sequence cl-seq))
+         (or cl-from-end
+             (progn (cl-set-elt cl-seq cl-i cl-new)
+                    (setq cl-i (1+ cl-i) cl-count (1- cl-count))))
+         (apply 'nsubstitute cl-new cl-old cl-seq ':count cl-count
+                ':start cl-i cl-keys))))))
+
+(defun substitute-if (cl-new cl-pred cl-list &rest cl-keys)
+  "Substitute NEW for all items satisfying PREDICATE in SEQ.
+This is a non-destructive function; it makes a copy of SEQ if necessary
+to avoid corrupting the original SEQ.
+Keywords supported:  :key :count :start :end :from-end"
+  (apply 'substitute cl-new nil cl-list ':if cl-pred cl-keys))
+
+(defun substitute-if-not (cl-new cl-pred cl-list &rest cl-keys)
+  "Substitute NEW for all items not satisfying PREDICATE in SEQ.
+This is a non-destructive function; it makes a copy of SEQ if necessary
+to avoid corrupting the original SEQ.
+Keywords supported:  :key :count :start :end :from-end"
+  (apply 'substitute cl-new nil cl-list ':if-not cl-pred cl-keys))
+
+(defun nsubstitute (cl-new cl-old cl-seq &rest cl-keys)
+  "Substitute NEW for OLD in SEQ.
+This is a destructive function; it reuses the storage of SEQ whenever possible.
+Keywords supported:  :test :test-not :key :count :start :end :from-end"
+  (cl-parsing-keywords (:test :test-not :key :if :if-not :count
+                       (:start 0) :end :from-end) ()
+    (or (eq cl-old cl-new) (<= (or cl-count (setq cl-count 8000000)) 0)
+       (if (and (listp cl-seq) (or (not cl-from-end) (> cl-count 4000000)))
+           (let ((cl-p (nthcdr cl-start cl-seq)))
+             (setq cl-end (- (or cl-end 8000000) cl-start))
+             (while (and cl-p (> cl-end 0) (> cl-count 0))
+               (if (cl-check-test cl-old (car cl-p))
+                   (progn
+                     (setcar cl-p cl-new)
+                     (setq cl-count (1- cl-count))))
+               (setq cl-p (cdr cl-p) cl-end (1- cl-end))))
+         (or cl-end (setq cl-end (length cl-seq)))
+         (if cl-from-end
+             (while (and (< cl-start cl-end) (> cl-count 0))
+               (setq cl-end (1- cl-end))
+               (if (cl-check-test cl-old (elt cl-seq cl-end))
+                   (progn
+                     (cl-set-elt cl-seq cl-end cl-new)
+                     (setq cl-count (1- cl-count)))))
+           (while (and (< cl-start cl-end) (> cl-count 0))
+             (if (cl-check-test cl-old (aref cl-seq cl-start))
+                 (progn
+                   (aset cl-seq cl-start cl-new)
+                   (setq cl-count (1- cl-count))))
+             (setq cl-start (1+ cl-start))))))
+    cl-seq))
+
+(defun nsubstitute-if (cl-new cl-pred cl-list &rest cl-keys)
+  "Substitute NEW for all items satisfying PREDICATE in SEQ.
+This is a destructive function; it reuses the storage of SEQ whenever possible.
+Keywords supported:  :key :count :start :end :from-end"
+  (apply 'nsubstitute cl-new nil cl-list ':if cl-pred cl-keys))
+
+(defun nsubstitute-if-not (cl-new cl-pred cl-list &rest cl-keys)
+  "Substitute NEW for all items not satisfying PREDICATE in SEQ.
+This is a destructive function; it reuses the storage of SEQ whenever possible.
+Keywords supported:  :key :count :start :end :from-end"
+  (apply 'nsubstitute cl-new nil cl-list ':if-not cl-pred cl-keys))
+
+(defun find (cl-item cl-seq &rest cl-keys)
+  "Find the first occurrence of ITEM in LIST.
+Return the matching ITEM, or nil if not found.
+Keywords supported:  :test :test-not :key :start :end :from-end"
+  (let ((cl-pos (apply 'position cl-item cl-seq cl-keys)))
+    (and cl-pos (elt cl-seq cl-pos))))
+
+(defun find-if (cl-pred cl-list &rest cl-keys)
+  "Find the first item satisfying PREDICATE in LIST.
+Return the matching ITEM, or nil if not found.
+Keywords supported:  :key :start :end :from-end"
+  (apply 'find nil cl-list ':if cl-pred cl-keys))
+
+(defun find-if-not (cl-pred cl-list &rest cl-keys)
+  "Find the first item not satisfying PREDICATE in LIST.
+Return the matching ITEM, or nil if not found.
+Keywords supported:  :key :start :end :from-end"
+  (apply 'find nil cl-list ':if-not cl-pred cl-keys))
+
+(defun position (cl-item cl-seq &rest cl-keys)
+  "Find the first occurrence of ITEM in LIST.
+Return the index of the matching item, or nil if not found.
+Keywords supported:  :test :test-not :key :start :end :from-end"
+  (cl-parsing-keywords (:test :test-not :key :if :if-not
+                       (:start 0) :end :from-end) ()
+    (cl-position cl-item cl-seq cl-start cl-end cl-from-end)))
+
+(defun cl-position (cl-item cl-seq cl-start &optional cl-end cl-from-end)
+  (if (listp cl-seq)
+      (let ((cl-p (nthcdr cl-start cl-seq)))
+       (or cl-end (setq cl-end 8000000))
+       (let ((cl-res nil))
+         (while (and cl-p (< cl-start cl-end) (or (not cl-res) cl-from-end))
+           (if (cl-check-test cl-item (car cl-p))
+               (setq cl-res cl-start))
+           (setq cl-p (cdr cl-p) cl-start (1+ cl-start)))
+         cl-res))
+    (or cl-end (setq cl-end (length cl-seq)))
+    (if cl-from-end
+       (progn
+         (while (and (>= (setq cl-end (1- cl-end)) cl-start)
+                     (not (cl-check-test cl-item (aref cl-seq cl-end)))))
+         (and (>= cl-end cl-start) cl-end))
+      (while (and (< cl-start cl-end)
+                 (not (cl-check-test cl-item (aref cl-seq cl-start))))
+       (setq cl-start (1+ cl-start)))
+      (and (< cl-start cl-end) cl-start))))
+
+(defun position-if (cl-pred cl-list &rest cl-keys)
+  "Find the first item satisfying PREDICATE in LIST.
+Return the index of the matching item, or nil if not found.
+Keywords supported:  :key :start :end :from-end"
+  (apply 'position nil cl-list ':if cl-pred cl-keys))
+
+(defun position-if-not (cl-pred cl-list &rest cl-keys)
+  "Find the first item not satisfying PREDICATE in LIST.
+Return the index of the matching item, or nil if not found.
+Keywords supported:  :key :start :end :from-end"
+  (apply 'position nil cl-list ':if-not cl-pred cl-keys))
+
+(defun count (cl-item cl-seq &rest cl-keys)
+  "Count the number of occurrences of ITEM in LIST.
+Keywords supported:  :test :test-not :key :start :end"
+  (cl-parsing-keywords (:test :test-not :key :if :if-not (:start 0) :end) ()
+    (let ((cl-count 0) cl-x)
+      (or cl-end (setq cl-end (length cl-seq)))
+      (if (consp cl-seq) (setq cl-seq (nthcdr cl-start cl-seq)))
+      (while (< cl-start cl-end)
+       (setq cl-x (if (consp cl-seq) (cl-pop cl-seq) (aref cl-seq cl-start)))
+       (if (cl-check-test cl-item cl-x) (setq cl-count (1+ cl-count)))
+       (setq cl-start (1+ cl-start)))
+      cl-count)))
+
+(defun count-if (cl-pred cl-list &rest cl-keys)
+  "Count the number of items satisfying PREDICATE in LIST.
+Keywords supported:  :key :start :end"
+  (apply 'count nil cl-list ':if cl-pred cl-keys))
+
+(defun count-if-not (cl-pred cl-list &rest cl-keys)
+  "Count the number of items not satisfying PREDICATE in LIST.
+Keywords supported:  :key :start :end"
+  (apply 'count nil cl-list ':if-not cl-pred cl-keys))
+
+(defun mismatch (cl-seq1 cl-seq2 &rest cl-keys)
+  "Compare SEQ1 with SEQ2, return index of first mismatching element.
+Return nil if the sequences match.  If one sequence is a prefix of the
+other, the return value indicates the end of the shorted sequence.
+Keywords supported:  :test :test-not :key :start1 :end1 :start2 :end2 :from-end"
+  (cl-parsing-keywords (:test :test-not :key :from-end
+                       (:start1 0) :end1 (:start2 0) :end2) ()
+    (or cl-end1 (setq cl-end1 (length cl-seq1)))
+    (or cl-end2 (setq cl-end2 (length cl-seq2)))
+    (if cl-from-end
+       (progn
+         (while (and (< cl-start1 cl-end1) (< cl-start2 cl-end2)
+                     (cl-check-match (elt cl-seq1 (1- cl-end1))
+                                     (elt cl-seq2 (1- cl-end2))))
+           (setq cl-end1 (1- cl-end1) cl-end2 (1- cl-end2)))
+         (and (or (< cl-start1 cl-end1) (< cl-start2 cl-end2))
+              (1- cl-end1)))
+      (let ((cl-p1 (and (listp cl-seq1) (nthcdr cl-start1 cl-seq1)))
+           (cl-p2 (and (listp cl-seq2) (nthcdr cl-start2 cl-seq2))))
+       (while (and (< cl-start1 cl-end1) (< cl-start2 cl-end2)
+                   (cl-check-match (if cl-p1 (car cl-p1)
+                                     (aref cl-seq1 cl-start1))
+                                   (if cl-p2 (car cl-p2)
+                                     (aref cl-seq2 cl-start2))))
+         (setq cl-p1 (cdr cl-p1) cl-p2 (cdr cl-p2)
+               cl-start1 (1+ cl-start1) cl-start2 (1+ cl-start2)))
+       (and (or (< cl-start1 cl-end1) (< cl-start2 cl-end2))
+            cl-start1)))))
+
+(defun search (cl-seq1 cl-seq2 &rest cl-keys)
+  "Search for SEQ1 as a subsequence of SEQ2.
+Return the index of the leftmost element of the first match found;
+return nil if there are no matches.
+Keywords supported:  :test :test-not :key :start1 :end1 :start2 :end2 :from-end"
+  (cl-parsing-keywords (:test :test-not :key :from-end
+                       (:start1 0) :end1 (:start2 0) :end2) ()
+    (or cl-end1 (setq cl-end1 (length cl-seq1)))
+    (or cl-end2 (setq cl-end2 (length cl-seq2)))
+    (if (>= cl-start1 cl-end1)
+       (if cl-from-end cl-end2 cl-start2)
+      (let* ((cl-len (- cl-end1 cl-start1))
+            (cl-first (cl-check-key (elt cl-seq1 cl-start1)))
+            (cl-if nil) cl-pos)
+       (setq cl-end2 (- cl-end2 (1- cl-len)))
+       (while (and (< cl-start2 cl-end2)
+                   (setq cl-pos (cl-position cl-first cl-seq2
+                                             cl-start2 cl-end2 cl-from-end))
+                   (apply 'mismatch cl-seq1 cl-seq2
+                          ':start1 (1+ cl-start1) ':end1 cl-end1
+                          ':start2 (1+ cl-pos) ':end2 (+ cl-pos cl-len)
+                          ':from-end nil cl-keys))
+         (if cl-from-end (setq cl-end2 cl-pos) (setq cl-start2 (1+ cl-pos))))
+       (and (< cl-start2 cl-end2) cl-pos)))))
+
+(defun sort* (cl-seq cl-pred &rest cl-keys)
+  "Sort the argument SEQUENCE according to PREDICATE.
+This is a destructive function; it reuses the storage of SEQUENCE if possible.
+Keywords supported:  :key"
+  (if (nlistp cl-seq)
+      (replace cl-seq (apply 'sort* (append cl-seq nil) cl-pred cl-keys))
+    (cl-parsing-keywords (:key) ()
+      (if (memq cl-key '(nil identity))
+         (sort cl-seq cl-pred)
+       (sort cl-seq (function (lambda (cl-x cl-y)
+                                (funcall cl-pred (funcall cl-key cl-x)
+                                         (funcall cl-key cl-y)))))))))
+
+(defun stable-sort (cl-seq cl-pred &rest cl-keys)
+  "Sort the argument SEQUENCE stably according to PREDICATE.
+This is a destructive function; it reuses the storage of SEQUENCE if possible.
+Keywords supported:  :key"
+  (apply 'sort* cl-seq cl-pred cl-keys))
+
+(defun merge (cl-type cl-seq1 cl-seq2 cl-pred &rest cl-keys)
+  "Destructively merge the two sequences to produce a new sequence.
+TYPE is the sequence type to return, SEQ1 and SEQ2 are the two
+argument sequences, and PRED is a `less-than' predicate on the elements.
+Keywords supported:  :key"
+  (or (listp cl-seq1) (setq cl-seq1 (append cl-seq1 nil)))
+  (or (listp cl-seq2) (setq cl-seq2 (append cl-seq2 nil)))
+  (cl-parsing-keywords (:key) ()
+    (let ((cl-res nil))
+      (while (and cl-seq1 cl-seq2)
+       (if (funcall cl-pred (cl-check-key (car cl-seq2))
+                    (cl-check-key (car cl-seq1)))
+           (cl-push (cl-pop cl-seq2) cl-res)
+         (cl-push (cl-pop cl-seq1) cl-res)))
+      (coerce (nconc (nreverse cl-res) cl-seq1 cl-seq2) cl-type))))
+
+;;; See compiler macro in cl-macs.el
+(defun member* (cl-item cl-list &rest cl-keys)
+  "Find the first occurrence of ITEM in LIST.
+Return the sublist of LIST whose car is ITEM.
+Keywords supported:  :test :test-not :key"
+  (if cl-keys
+      (cl-parsing-keywords (:test :test-not :key :if :if-not) ()
+       (while (and cl-list (not (cl-check-test cl-item (car cl-list))))
+         (setq cl-list (cdr cl-list)))
+       cl-list)
+    (if (and (numberp cl-item) (not (integerp cl-item)))
+       (member cl-item cl-list)
+      (memq cl-item cl-list))))
+
+(defun member-if (cl-pred cl-list &rest cl-keys)
+  "Find the first item satisfying PREDICATE in LIST.
+Return the sublist of LIST whose car matches.
+Keywords supported:  :key"
+  (apply 'member* nil cl-list ':if cl-pred cl-keys))
+
+(defun member-if-not (cl-pred cl-list &rest cl-keys)
+  "Find the first item not satisfying PREDICATE in LIST.
+Return the sublist of LIST whose car matches.
+Keywords supported:  :key"
+  (apply 'member* nil cl-list ':if-not cl-pred cl-keys))
+
+(defun cl-adjoin (cl-item cl-list &rest cl-keys)
+  (if (cl-parsing-keywords (:key) t
+       (apply 'member* (cl-check-key cl-item) cl-list cl-keys))
+      cl-list
+    (cons cl-item cl-list)))
+
+;;; See compiler macro in cl-macs.el
+(defun assoc* (cl-item cl-alist &rest cl-keys)
+  "Find the first item whose car matches ITEM in LIST.
+Keywords supported:  :test :test-not :key"
+  (if cl-keys
+      (cl-parsing-keywords (:test :test-not :key :if :if-not) ()
+       (while (and cl-alist
+                   (or (not (consp (car cl-alist)))
+                       (not (cl-check-test cl-item (car (car cl-alist))))))
+         (setq cl-alist (cdr cl-alist)))
+       (and cl-alist (car cl-alist)))
+    (if (and (numberp cl-item) (not (integerp cl-item)))
+       (assoc cl-item cl-alist)
+      (assq cl-item cl-alist))))
+
+(defun assoc-if (cl-pred cl-list &rest cl-keys)
+  "Find the first item whose car satisfies PREDICATE in LIST.
+Keywords supported:  :key"
+  (apply 'assoc* nil cl-list ':if cl-pred cl-keys))
+
+(defun assoc-if-not (cl-pred cl-list &rest cl-keys)
+  "Find the first item whose car does not satisfy PREDICATE in LIST.
+Keywords supported:  :key"
+  (apply 'assoc* nil cl-list ':if-not cl-pred cl-keys))
+
+(defun rassoc* (cl-item cl-alist &rest cl-keys)
+  "Find the first item whose cdr matches ITEM in LIST.
+Keywords supported:  :test :test-not :key"
+  (if (or cl-keys (numberp cl-item))
+      (cl-parsing-keywords (:test :test-not :key :if :if-not) ()
+       (while (and cl-alist
+                   (or (not (consp (car cl-alist)))
+                       (not (cl-check-test cl-item (cdr (car cl-alist))))))
+         (setq cl-alist (cdr cl-alist)))
+       (and cl-alist (car cl-alist)))
+    (rassq cl-item cl-alist)))
+
+(defun rassoc-if (cl-pred cl-list &rest cl-keys)
+  "Find the first item whose cdr satisfies PREDICATE in LIST.
+Keywords supported:  :key"
+  (apply 'rassoc* nil cl-list ':if cl-pred cl-keys))
+
+(defun rassoc-if-not (cl-pred cl-list &rest cl-keys)
+  "Find the first item whose cdr does not satisfy PREDICATE in LIST.
+Keywords supported:  :key"
+  (apply 'rassoc* nil cl-list ':if-not cl-pred cl-keys))
+
+(defun union (cl-list1 cl-list2 &rest cl-keys)
+  "Combine LIST1 and LIST2 using a set-union operation.
+The result list contains all items that appear in either LIST1 or LIST2.
+This is a non-destructive function; it makes a copy of the data if necessary
+to avoid corrupting the original LIST1 and LIST2.
+Keywords supported:  :test :test-not :key"
+  (cond ((null cl-list1) cl-list2) ((null cl-list2) cl-list1)
+       ((equal cl-list1 cl-list2) cl-list1)
+       (t
+        (or (>= (length cl-list1) (length cl-list2))
+            (setq cl-list1 (prog1 cl-list2 (setq cl-list2 cl-list1))))
+        (while cl-list2
+          (if (or cl-keys (numberp (car cl-list2)))
+              (setq cl-list1 (apply 'adjoin (car cl-list2) cl-list1 cl-keys))
+            (or (memq (car cl-list2) cl-list1)
+                (cl-push (car cl-list2) cl-list1)))
+          (cl-pop cl-list2))
+        cl-list1)))
+
+(defun nunion (cl-list1 cl-list2 &rest cl-keys)
+  "Combine LIST1 and LIST2 using a set-union operation.
+The result list contains all items that appear in either LIST1 or LIST2.
+This is a destructive function; it reuses the storage of LIST1 and LIST2
+whenever possible.
+Keywords supported:  :test :test-not :key"
+  (cond ((null cl-list1) cl-list2) ((null cl-list2) cl-list1)
+       (t (apply 'union cl-list1 cl-list2 cl-keys))))
+
+(defun intersection (cl-list1 cl-list2 &rest cl-keys)
+  "Combine LIST1 and LIST2 using a set-intersection operation.
+The result list contains all items that appear in both LIST1 and LIST2.
+This is a non-destructive function; it makes a copy of the data if necessary
+to avoid corrupting the original LIST1 and LIST2.
+Keywords supported:  :test :test-not :key"
+  (and cl-list1 cl-list2
+       (if (equal cl-list1 cl-list2) cl-list1
+        (cl-parsing-keywords (:key) (:test :test-not)
+          (let ((cl-res nil))
+            (or (>= (length cl-list1) (length cl-list2))
+                (setq cl-list1 (prog1 cl-list2 (setq cl-list2 cl-list1))))
+            (while cl-list2
+              (if (if (or cl-keys (numberp (car cl-list2)))
+                      (apply 'member* (cl-check-key (car cl-list2))
+                             cl-list1 cl-keys)
+                    (memq (car cl-list2) cl-list1))
+                  (cl-push (car cl-list2) cl-res))
+              (cl-pop cl-list2))
+            cl-res)))))
+
+(defun nintersection (cl-list1 cl-list2 &rest cl-keys)
+  "Combine LIST1 and LIST2 using a set-intersection operation.
+The result list contains all items that appear in both LIST1 and LIST2.
+This is a destructive function; it reuses the storage of LIST1 and LIST2
+whenever possible.
+Keywords supported:  :test :test-not :key"
+  (and cl-list1 cl-list2 (apply 'intersection cl-list1 cl-list2 cl-keys)))
+
+(defun set-difference (cl-list1 cl-list2 &rest cl-keys)
+  "Combine LIST1 and LIST2 using a set-difference operation.
+The result list contains all items that appear in LIST1 but not LIST2.
+This is a non-destructive function; it makes a copy of the data if necessary
+to avoid corrupting the original LIST1 and LIST2.
+Keywords supported:  :test :test-not :key"
+  (if (or (null cl-list1) (null cl-list2)) cl-list1
+    (cl-parsing-keywords (:key) (:test :test-not)
+      (let ((cl-res nil))
+       (while cl-list1
+         (or (if (or cl-keys (numberp (car cl-list1)))
+                 (apply 'member* (cl-check-key (car cl-list1))
+                        cl-list2 cl-keys)
+               (memq (car cl-list1) cl-list2))
+             (cl-push (car cl-list1) cl-res))
+         (cl-pop cl-list1))
+       cl-res))))
+
+(defun nset-difference (cl-list1 cl-list2 &rest cl-keys)
+  "Combine LIST1 and LIST2 using a set-difference operation.
+The result list contains all items that appear in LIST1 but not LIST2.
+This is a destructive function; it reuses the storage of LIST1 and LIST2
+whenever possible.
+Keywords supported:  :test :test-not :key"
+  (if (or (null cl-list1) (null cl-list2)) cl-list1
+    (apply 'set-difference cl-list1 cl-list2 cl-keys)))
+
+(defun set-exclusive-or (cl-list1 cl-list2 &rest cl-keys)
+  "Combine LIST1 and LIST2 using a set-exclusive-or operation.
+The result list contains all items that appear in exactly one of LIST1, LIST2.
+This is a non-destructive function; it makes a copy of the data if necessary
+to avoid corrupting the original LIST1 and LIST2.
+Keywords supported:  :test :test-not :key"
+  (cond ((null cl-list1) cl-list2) ((null cl-list2) cl-list1)
+       ((equal cl-list1 cl-list2) nil)
+       (t (append (apply 'set-difference cl-list1 cl-list2 cl-keys)
+                  (apply 'set-difference cl-list2 cl-list1 cl-keys)))))
+
+(defun nset-exclusive-or (cl-list1 cl-list2 &rest cl-keys)
+  "Combine LIST1 and LIST2 using a set-exclusive-or operation.
+The result list contains all items that appear in exactly one of LIST1, LIST2.
+This is a destructive function; it reuses the storage of LIST1 and LIST2
+whenever possible.
+Keywords supported:  :test :test-not :key"
+  (cond ((null cl-list1) cl-list2) ((null cl-list2) cl-list1)
+       ((equal cl-list1 cl-list2) nil)
+       (t (nconc (apply 'nset-difference cl-list1 cl-list2 cl-keys)
+                 (apply 'nset-difference cl-list2 cl-list1 cl-keys)))))
+
+(defun subsetp (cl-list1 cl-list2 &rest cl-keys)
+  "True if LIST1 is a subset of LIST2.
+I.e., if every element of LIST1 also appears in LIST2.
+Keywords supported:  :test :test-not :key"
+  (cond ((null cl-list1) t) ((null cl-list2) nil)
+       ((equal cl-list1 cl-list2) t)
+       (t (cl-parsing-keywords (:key) (:test :test-not)
+            (while (and cl-list1
+                        (apply 'member* (cl-check-key (car cl-list1))
+                               cl-list2 cl-keys))
+              (cl-pop cl-list1))
+            (null cl-list1)))))
+
+(defun subst-if (cl-new cl-pred cl-tree &rest cl-keys)
+  "Substitute NEW for elements matching PREDICATE in TREE (non-destructively).
+Return a copy of TREE with all matching elements replaced by NEW.
+Keywords supported:  :key"
+  (apply 'sublis (list (cons nil cl-new)) cl-tree ':if cl-pred cl-keys))
+
+(defun subst-if-not (cl-new cl-pred cl-tree &rest cl-keys)
+  "Substitute NEW for elts not matching PREDICATE in TREE (non-destructively).
+Return a copy of TREE with all non-matching elements replaced by NEW.
+Keywords supported:  :key"
+  (apply 'sublis (list (cons nil cl-new)) cl-tree ':if-not cl-pred cl-keys))
+
+(defun nsubst (cl-new cl-old cl-tree &rest cl-keys)
+  "Substitute NEW for OLD everywhere in TREE (destructively).
+Any element of TREE which is `eql' to OLD is changed to NEW (via a call
+to `setcar').
+Keywords supported:  :test :test-not :key"
+  (apply 'nsublis (list (cons cl-old cl-new)) cl-tree cl-keys))
+
+(defun nsubst-if (cl-new cl-pred cl-tree &rest cl-keys)
+  "Substitute NEW for elements matching PREDICATE in TREE (destructively).
+Any element of TREE which matches is changed to NEW (via a call to `setcar').
+Keywords supported:  :key"
+  (apply 'nsublis (list (cons nil cl-new)) cl-tree ':if cl-pred cl-keys))
+
+(defun nsubst-if-not (cl-new cl-pred cl-tree &rest cl-keys)
+  "Substitute NEW for elements not matching PREDICATE in TREE (destructively).
+Any element of TREE which matches is changed to NEW (via a call to `setcar').
+Keywords supported:  :key"
+  (apply 'nsublis (list (cons nil cl-new)) cl-tree ':if-not cl-pred cl-keys))
+
+(defun sublis (cl-alist cl-tree &rest cl-keys)
+  "Perform substitutions indicated by ALIST in TREE (non-destructively).
+Return a copy of TREE with all matching elements replaced.
+Keywords supported:  :test :test-not :key"
+  (cl-parsing-keywords (:test :test-not :key :if :if-not) ()
+    (cl-sublis-rec cl-tree)))
+
+(defvar cl-alist)
+(defun cl-sublis-rec (cl-tree)   ; uses cl-alist/key/test*/if*
+  (let ((cl-temp (cl-check-key cl-tree)) (cl-p cl-alist))
+    (while (and cl-p (not (cl-check-test-nokey (car (car cl-p)) cl-temp)))
+      (setq cl-p (cdr cl-p)))
+    (if cl-p (cdr (car cl-p))
+      (if (consp cl-tree)
+         (let ((cl-a (cl-sublis-rec (car cl-tree)))
+               (cl-d (cl-sublis-rec (cdr cl-tree))))
+           (if (and (eq cl-a (car cl-tree)) (eq cl-d (cdr cl-tree)))
+               cl-tree
+             (cons cl-a cl-d)))
+       cl-tree))))
+
+(defun nsublis (cl-alist cl-tree &rest cl-keys)
+  "Perform substitutions indicated by ALIST in TREE (destructively).
+Any matching element of TREE is changed via a call to `setcar'.
+Keywords supported:  :test :test-not :key"
+  (cl-parsing-keywords (:test :test-not :key :if :if-not) ()
+    (let ((cl-hold (list cl-tree)))
+      (cl-nsublis-rec cl-hold)
+      (car cl-hold))))
+
+(defun cl-nsublis-rec (cl-tree)   ; uses cl-alist/temp/p/key/test*/if*
+  (while (consp cl-tree)
+    (let ((cl-temp (cl-check-key (car cl-tree))) (cl-p cl-alist))
+      (while (and cl-p (not (cl-check-test-nokey (car (car cl-p)) cl-temp)))
+       (setq cl-p (cdr cl-p)))
+      (if cl-p (setcar cl-tree (cdr (car cl-p)))
+       (if (consp (car cl-tree)) (cl-nsublis-rec (car cl-tree))))
+      (setq cl-temp (cl-check-key (cdr cl-tree)) cl-p cl-alist)
+      (while (and cl-p (not (cl-check-test-nokey (car (car cl-p)) cl-temp)))
+       (setq cl-p (cdr cl-p)))
+      (if cl-p
+         (progn (setcdr cl-tree (cdr (car cl-p))) (setq cl-tree nil))
+       (setq cl-tree (cdr cl-tree))))))
+
+(defun tree-equal (cl-x cl-y &rest cl-keys)
+  "Return t if trees X and Y have `eql' leaves.
+Atoms are compared by `eql'; cons cells are compared recursively.
+Keywords supported:  :test :test-not :key"
+  (cl-parsing-keywords (:test :test-not :key) ()
+    (cl-tree-equal-rec cl-x cl-y)))
+
+(defun cl-tree-equal-rec (cl-x cl-y)
+  (while (and (consp cl-x) (consp cl-y)
+             (cl-tree-equal-rec (car cl-x) (car cl-y)))
+    (setq cl-x (cdr cl-x) cl-y (cdr cl-y)))
+  (and (not (consp cl-x)) (not (consp cl-y)) (cl-check-match cl-x cl-y)))
+
+
+(run-hooks 'cl-seq-load-hook)
+
+;;; cl-seq.el ends here
diff --git a/lisp/cl.el b/lisp/cl.el
new file mode 100644 (file)
index 0000000..233a476
--- /dev/null
@@ -0,0 +1,761 @@
+;;; cl.el --- Common Lisp extensions for GNU Emacs Lisp
+
+;; Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+
+;; Author: Dave Gillespie <daveg@synaptics.com>
+;; Maintainer: XEmacs Development Team
+;; Version: 2.02
+;; Keywords: extensions, dumped, lisp
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: FSF 19.34.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; These are extensions to Emacs Lisp that provide a degree of
+;; Common Lisp compatibility, beyond what is already built-in
+;; in Emacs Lisp.
+;;
+;; This package was written by Dave Gillespie; it is a complete
+;; rewrite of Cesar Quiroz's original cl.el package of December 1986.
+;;
+;; This package works with Emacs 18, Emacs 19, and XEmacs/Lucid Emacs 19.
+;;
+;; Bug reports, comments, and suggestions are welcome!
+
+;; This file contains the portions of the Common Lisp extensions
+;; package which should always be present.
+
+
+;;; Future notes:
+
+;; Once Emacs 19 becomes standard, many things in this package which are
+;; messy for reasons of compatibility can be greatly simplified.  For now,
+;; I prefer to maintain one unified version.
+
+
+;;; Change Log:
+
+;; Version 2.02 (30 Jul 93):
+;;  * Added "cl-compat.el" file, extra compatibility with old package.
+;;  * Added `lexical-let' and `lexical-let*'.
+;;  * Added `define-modify-macro', `callf', and `callf2'.
+;;  * Added `ignore-errors'.
+;;  * Changed `(setf (nthcdr N PLACE) X)' to work when N is zero.
+;;  * Merged `*gentemp-counter*' into `*gensym-counter*'.
+;;  * Extended `subseq' to allow negative START and END like `substring'.
+;;  * Added `in-ref', `across-ref', `elements of-ref' loop clauses.
+;;  * Added `concat', `vconcat' loop clauses.
+;;  * Cleaned up a number of compiler warnings.
+
+;; Version 2.01 (7 Jul 93):
+;;  * Added support for FSF version of Emacs 19.
+;;  * Added `add-hook' for Emacs 18 users.
+;;  * Added `defsubst*' and `symbol-macrolet'.
+;;  * Added `maplist', `mapc', `mapl', `mapcan', `mapcon'.
+;;  * Added `map', `concatenate', `reduce', `merge'.
+;;  * Added `revappend', `nreconc', `tailp', `tree-equal'.
+;;  * Added `assert', `check-type', `typecase', `typep', and `deftype'.
+;;  * Added destructuring and `&environment' support to `defmacro*'.
+;;  * Added destructuring to `loop', and added the following clauses:
+;;      `elements', `frames', `overlays', `intervals', `buffers', `key-seqs'.
+;;  * Renamed `delete' to `delete*' and `remove' to `remove*'.
+;;  * Completed support for all keywords in `remove*', `substitute', etc.
+;;  * Added `most-positive-float' and company.
+;;  * Fixed hash tables to work with latest Lucid Emacs.
+;;  * `proclaim' forms are no longer compile-time-evaluating; use `declaim'.
+;;  * Syntax for `warn' declarations has changed.
+;;  * Improved implementation of `random*'.
+;;  * Moved most sequence functions to a new file, cl-seq.el.
+;;  * Moved `eval-when' into cl-macs.el.
+;;  * Moved `pushnew' and `adjoin' to cl.el for most common cases.
+;;  * Moved `provide' forms down to ends of files.
+;;  * Changed expansion of `pop' to something that compiles to better code.
+;;  * Changed so that no patch is required for Emacs 19 byte compiler.
+;;  * Made more things dependent on `optimize' declarations.
+;;  * Added a partial implementation of struct print functions.
+;;  * Miscellaneous minor changes.
+
+;; Version 2.00:
+;;  * First public release of this package.
+
+
+;;; Code:
+
+(defvar cl-emacs-type (cond ((or (and (fboundp 'epoch::version)
+                                     (symbol-value 'epoch::version))
+                                (string-lessp emacs-version "19")) 18)
+                           ((string-match "XEmacs" emacs-version)
+                            'lucid)
+                           (t 19)))
+
+(or (fboundp 'defalias) (fset 'defalias 'fset))
+
+(defvar cl-optimize-speed 1)
+(defvar cl-optimize-safety 1)
+
+
+;;; Keywords used in this package.
+
+;;; XEmacs - keywords are done in Fintern().
+;;;
+;;; (defconst :test ':test)
+;;; (defconst :test-not ':test-not)
+;;; (defconst :key ':key)
+;;; (defconst :start ':start)
+;;; (defconst :start1 ':start1)
+;;; (defconst :start2 ':start2)
+;;; (defconst :end ':end)
+;;; (defconst :end1 ':end1)
+;;; (defconst :end2 ':end2)
+;;; (defconst :count ':count)
+;;; (defconst :initial-value ':initial-value)
+;;; (defconst :size ':size)
+;;; (defconst :from-end ':from-end)
+;;; (defconst :rehash-size ':rehash-size)
+;;; (defconst :rehash-threshold ':rehash-threshold)
+;;; (defconst :allow-other-keys ':allow-other-keys)
+
+
+(defvar custom-print-functions nil
+  "This is a list of functions that format user objects for printing.
+Each function is called in turn with three arguments: the object, the
+stream, and the print level (currently ignored).  If it is able to
+print the object it returns true; otherwise it returns nil and the
+printer proceeds to the next function on the list.
+
+This variable is not used at present, but it is defined in hopes that
+a future Emacs interpreter will be able to use it.")
+
+
+;;; Predicates.
+
+(defun eql (a b)    ; See compiler macro in cl-macs.el
+  "Return t if the two args are the same Lisp object.
+Floating-point numbers of equal value are `eql', but they may not be `eq'."
+  (if (floatp a)
+      (equal a b)
+    (eq a b)))
+
+
+;;; Generalized variables.  These macros are defined here so that they
+;;; can safely be used in .emacs files.
+
+(defmacro incf (place &optional x)
+  "(incf PLACE [X]): increment PLACE by X (1 by default).
+PLACE may be a symbol, or any generalized variable allowed by `setf'.
+The return value is the incremented value of PLACE."
+  (if (symbolp place)
+      (list 'setq place (if x (list '+ place x) (list '1+ place)))
+    ;; XEmacs byte-compiler optimizes (+ FOO 1) to (1+ FOO), so this
+    ;; is OK.
+    (list 'callf '+ place (or x 1))))
+
+(defmacro decf (place &optional x)
+  "(decf PLACE [X]): decrement PLACE by X (1 by default).
+PLACE may be a symbol, or any generalized variable allowed by `setf'.
+The return value is the decremented value of PLACE."
+  (if (symbolp place)
+      (list 'setq place (if x (list '- place x) (list '1- place)))
+    (list 'callf '- place (or x 1))))
+
+(defmacro pop (place)
+  "(pop PLACE): remove and return the head of the list stored in PLACE.
+Analogous to (prog1 (car PLACE) (setf PLACE (cdr PLACE))), though more
+careful about evaluating each argument only once and in the right order.
+PLACE may be a symbol, or any generalized variable allowed by `setf'."
+  (if (symbolp place)
+      (list 'car (list 'prog1 place (list 'setq place (list 'cdr place))))
+    (cl-do-pop place)))
+
+(defmacro push (x place)
+  "(push X PLACE): insert X at the head of the list stored in PLACE.
+Analogous to (setf PLACE (cons X PLACE)), though more careful about
+evaluating each argument only once and in the right order.  PLACE may
+be a symbol, or any generalized variable allowed by `setf'."
+  (if (symbolp place) (list 'setq place (list 'cons x place))
+    (list 'callf2 'cons x place)))
+
+(defmacro pushnew (x place &rest keys)
+  "(pushnew X PLACE): insert X at the head of the list if not already there.
+Like (push X PLACE), except that the list is unmodified if X is `eql' to
+an element already on the list.
+Keywords supported:  :test :test-not :key"
+  (if (symbolp place) (list 'setq place (list* 'adjoin x place keys))
+    (list* 'callf2 'adjoin x place keys)))
+
+(defun cl-set-elt (seq n val)
+  (if (listp seq) (setcar (nthcdr n seq) val) (aset seq n val)))
+
+(defun cl-set-nthcdr (n list x)
+  (if (<= n 0) x (setcdr (nthcdr (1- n) list) x) list))
+
+(defun cl-set-buffer-substring (start end val)
+  (save-excursion (delete-region start end)
+                 (goto-char start)
+                 (insert val)
+                 val))
+
+(defun cl-set-substring (str start end val)
+  (if end (if (< end 0) (incf end (length str)))
+    (setq end (length str)))
+  (if (< start 0) (incf start str))
+  (concat (and (> start 0) (substring str 0 start))
+         val
+         (and (< end (length str)) (substring str end))))
+
+
+;;; Control structures.
+
+;; These macros are so simple and so often-used that it's better to have
+;; them all the time than to load them from cl-macs.el.
+
+;; NOTE: these macros were moved to subr.el in FSF 20.  It is of no
+;; consequence to XEmacs, because we preload this file, and they
+;; should better remain here.
+
+(defmacro when (cond &rest body)
+  "(when COND BODY...): if COND yields non-nil, do BODY, else return nil."
+  (list 'if cond (cons 'progn body)))
+
+(defmacro unless (cond &rest body)
+  "(unless COND BODY...): if COND yields nil, do BODY, else return nil."
+  (cons 'if (cons cond (cons nil body))))
+
+(defun cl-map-extents (&rest cl-args)
+  ;; XEmacs: This used to check for overlays first, but that's wrong
+  ;; because of the new compatibility library.  *duh*
+  (cond ((fboundp 'map-extents)
+        (apply 'map-extents cl-args))
+       ((fboundp 'next-overlay-at)
+        (apply 'cl-map-overlays cl-args))))
+
+
+;;; Blocks and exits.
+
+(defalias 'cl-block-wrapper 'identity)
+(defalias 'cl-block-throw 'throw)
+
+
+;;; Multiple values.  True multiple values are not supported, or even
+;;; simulated.  Instead, multiple-value-bind and friends simply expect
+;;; the target form to return the values as a list.
+
+(defalias 'values 'list)
+(defalias 'values-list 'identity)
+(defalias 'multiple-value-list 'identity)
+(defalias 'multiple-value-call 'apply)  ; only works for one arg
+(defalias 'nth-value 'nth)
+
+
+;;; Macros.
+
+(defvar cl-macro-environment nil)
+;; XEmacs: we renamed the internal function to macroexpand-internal
+;; to avoid doc-file problems.
+(defvar cl-old-macroexpand (prog1 (symbol-function 'macroexpand-internal)
+                            (defalias 'macroexpand 'cl-macroexpand)))
+
+(defun cl-macroexpand (cl-macro &optional cl-env)
+  "Return result of expanding macros at top level of FORM.
+If FORM is not a macro call, it is returned unchanged.
+Otherwise, the macro is expanded and the expansion is considered
+in place of FORM.  When a non-macro-call results, it is returned.
+
+The second optional arg ENVIRONMENT species an environment of macro
+definitions to shadow the loaded ones for use in file byte-compilation."
+  (let ((cl-macro-environment cl-env))
+    (while (progn (setq cl-macro (funcall cl-old-macroexpand cl-macro cl-env))
+                 (and (symbolp cl-macro)
+                      (cdr (assq (symbol-name cl-macro) cl-env))))
+      (setq cl-macro (cadr (assq (symbol-name cl-macro) cl-env))))
+    cl-macro))
+
+
+;;; Declarations.
+
+(defvar cl-compiling-file nil)
+(defun cl-compiling-file ()
+  (or cl-compiling-file
+      ;; XEmacs change
+;      (and (boundp 'outbuffer) (bufferp (symbol-value 'outbuffer))
+;         (equal (buffer-name (symbol-value 'outbuffer))
+;                " *Compiler Output*"))
+      (and (boundp 'byte-compile-outbuffer)
+          (bufferp (symbol-value 'byte-compile-outbuffer))
+          (equal (buffer-name (symbol-value 'byte-compile-outbuffer))
+                 " *Compiler Output*"))
+      ))
+
+(defvar cl-proclaims-deferred nil)
+
+(defun proclaim (spec)
+  (if (fboundp 'cl-do-proclaim) (cl-do-proclaim spec t)
+    (push spec cl-proclaims-deferred))
+  nil)
+
+(defmacro declaim (&rest specs)
+  (let ((body (mapcar (function (lambda (x) (list 'proclaim (list 'quote x))))
+                     specs)))
+    (if (cl-compiling-file) (list* 'eval-when '(compile load eval) body)
+      (cons 'progn body))))   ; avoid loading cl-macs.el for eval-when
+
+
+;;; Symbols.
+
+(defun cl-random-time ()
+  (let* ((time (copy-sequence (current-time-string))) (i (length time)) (v 0))
+    (while (>= (decf i) 0) (setq v (+ (* v 3) (aref time i))))
+    v))
+
+(defvar *gensym-counter* (* (logand (cl-random-time) 1023) 100))
+
+
+;;; Numbers.
+
+(defun floatp-safe (x)
+  "Return t if OBJECT is a floating point number.
+On Emacs versions that lack floating-point support, this function
+always returns nil."
+  ;;(and (numberp x) (not (integerp x)))
+  ;; XEmacs: use floatp.  XEmacs is always compiled with
+  ;; floating-point, anyway.
+  (floatp x))
+
+(defun plusp (x)
+  "Return t if NUMBER is positive."
+  (> x 0))
+
+(defun minusp (x)
+  "Return t if NUMBER is negative."
+  (< x 0))
+
+(defun oddp (x)
+  "Return t if INTEGER is odd."
+  (eq (logand x 1) 1))
+
+(defun evenp (x)
+  "Return t if INTEGER is even."
+  (eq (logand x 1) 0))
+
+(defun cl-abs (x)
+  "Return the absolute value of ARG."
+  (if (>= x 0) x (- x)))
+(or (fboundp 'abs) (defalias 'abs 'cl-abs))   ; This is built-in to Emacs 19
+
+(defvar *random-state* (vector 'cl-random-state-tag -1 30 (cl-random-time)))
+
+;;; We use `eval' in case VALBITS differs from compile-time to load-time.
+(defconst most-positive-fixnum (eval '(lsh -1 -1))
+  "The integer closest in value to positive infinity.")
+(defconst most-negative-fixnum (eval '(- -1 (lsh -1 -1)))
+  "The integer closest in value to negative infinity.")
+
+;;; The following are set by code in cl-extra.el
+(defconst most-positive-float nil
+  "The float closest in value to positive infinity.")
+(defconst most-negative-float nil
+  "The float closest in value to negative infinity.")
+(defconst least-positive-float nil
+  "The positive float closest in value to 0.")
+(defconst least-negative-float nil
+  "The negative float closest in value to 0.")
+(defconst least-positive-normalized-float nil)
+(defconst least-negative-normalized-float nil)
+(defconst float-epsilon nil)
+(defconst float-negative-epsilon nil)
+
+
+;;; Sequence functions.
+
+(defalias 'copy-seq 'copy-sequence)
+
+(defun mapcar* (cl-func cl-x &rest cl-rest)
+  "Apply FUNCTION to each element of SEQ, and make a list of the results.
+If there are several SEQs, FUNCTION is called with that many arguments,
+and mapping stops as soon as the shortest list runs out.  With just one
+SEQ, this is like `mapcar'.  With several, it is like the Common Lisp
+`mapcar' function extended to arbitrary sequence types."
+  (if cl-rest
+      (if (or (cdr cl-rest) (nlistp cl-x) (nlistp (car cl-rest)))
+         (cl-mapcar-many cl-func (cons cl-x cl-rest))
+       (let ((cl-res nil) (cl-y (car cl-rest)))
+         (while (and cl-x cl-y)
+           (push (funcall cl-func (pop cl-x) (pop cl-y)) cl-res))
+         (nreverse cl-res)))
+    (mapcar cl-func cl-x)))
+
+
+;;; List functions.
+
+(defalias 'first 'car)
+(defalias 'rest 'cdr)
+(defalias 'endp 'null)
+
+(defun second (x)
+  "Return the second element of the list LIST."
+  (car (cdr x)))
+
+(defun third (x)
+  "Return the third element of the list LIST."
+  (car (cdr (cdr x))))
+
+(defun fourth (x)
+  "Return the fourth element of the list LIST."
+  (nth 3 x))
+
+(defun fifth (x)
+  "Return the fifth element of the list LIST."
+  (nth 4 x))
+
+(defun sixth (x)
+  "Return the sixth element of the list LIST."
+  (nth 5 x))
+
+(defun seventh (x)
+  "Return the seventh element of the list LIST."
+  (nth 6 x))
+
+(defun eighth (x)
+  "Return the eighth element of the list LIST."
+  (nth 7 x))
+
+(defun ninth (x)
+  "Return the ninth element of the list LIST."
+  (nth 8 x))
+
+(defun tenth (x)
+  "Return the tenth element of the list LIST."
+  (nth 9 x))
+
+(defun caar (x)
+  "Return the `car' of the `car' of X."
+  (car (car x)))
+
+(defun cadr (x)
+  "Return the `car' of the `cdr' of X."
+  (car (cdr x)))
+
+(defun cdar (x)
+  "Return the `cdr' of the `car' of X."
+  (cdr (car x)))
+
+(defun cddr (x)
+  "Return the `cdr' of the `cdr' of X."
+  (cdr (cdr x)))
+
+(defun caaar (x)
+  "Return the `car' of the `car' of the `car' of X."
+  (car (car (car x))))
+
+(defun caadr (x)
+  "Return the `car' of the `car' of the `cdr' of X."
+  (car (car (cdr x))))
+
+(defun cadar (x)
+  "Return the `car' of the `cdr' of the `car' of X."
+  (car (cdr (car x))))
+
+(defun caddr (x)
+  "Return the `car' of the `cdr' of the `cdr' of X."
+  (car (cdr (cdr x))))
+
+(defun cdaar (x)
+  "Return the `cdr' of the `car' of the `car' of X."
+  (cdr (car (car x))))
+
+(defun cdadr (x)
+  "Return the `cdr' of the `car' of the `cdr' of X."
+  (cdr (car (cdr x))))
+
+(defun cddar (x)
+  "Return the `cdr' of the `cdr' of the `car' of X."
+  (cdr (cdr (car x))))
+
+(defun cdddr (x)
+  "Return the `cdr' of the `cdr' of the `cdr' of X."
+  (cdr (cdr (cdr x))))
+
+(defun caaaar (x)
+  "Return the `car' of the `car' of the `car' of the `car' of X."
+  (car (car (car (car x)))))
+
+(defun caaadr (x)
+  "Return the `car' of the `car' of the `car' of the `cdr' of X."
+  (car (car (car (cdr x)))))
+
+(defun caadar (x)
+  "Return the `car' of the `car' of the `cdr' of the `car' of X."
+  (car (car (cdr (car x)))))
+
+(defun caaddr (x)
+  "Return the `car' of the `car' of the `cdr' of the `cdr' of X."
+  (car (car (cdr (cdr x)))))
+
+(defun cadaar (x)
+  "Return the `car' of the `cdr' of the `car' of the `car' of X."
+  (car (cdr (car (car x)))))
+
+(defun cadadr (x)
+  "Return the `car' of the `cdr' of the `car' of the `cdr' of X."
+  (car (cdr (car (cdr x)))))
+
+(defun caddar (x)
+  "Return the `car' of the `cdr' of the `cdr' of the `car' of X."
+  (car (cdr (cdr (car x)))))
+
+(defun cadddr (x)
+  "Return the `car' of the `cdr' of the `cdr' of the `cdr' of X."
+  (car (cdr (cdr (cdr x)))))
+
+(defun cdaaar (x)
+  "Return the `cdr' of the `car' of the `car' of the `car' of X."
+  (cdr (car (car (car x)))))
+
+(defun cdaadr (x)
+  "Return the `cdr' of the `car' of the `car' of the `cdr' of X."
+  (cdr (car (car (cdr x)))))
+
+(defun cdadar (x)
+  "Return the `cdr' of the `car' of the `cdr' of the `car' of X."
+  (cdr (car (cdr (car x)))))
+
+(defun cdaddr (x)
+  "Return the `cdr' of the `car' of the `cdr' of the `cdr' of X."
+  (cdr (car (cdr (cdr x)))))
+
+(defun cddaar (x)
+  "Return the `cdr' of the `cdr' of the `car' of the `car' of X."
+  (cdr (cdr (car (car x)))))
+
+(defun cddadr (x)
+  "Return the `cdr' of the `cdr' of the `car' of the `cdr' of X."
+  (cdr (cdr (car (cdr x)))))
+
+(defun cdddar (x)
+  "Return the `cdr' of the `cdr' of the `cdr' of the `car' of X."
+  (cdr (cdr (cdr (car x)))))
+
+(defun cddddr (x)
+  "Return the `cdr' of the `cdr' of the `cdr' of the `cdr' of X."
+  (cdr (cdr (cdr (cdr x)))))
+
+(defun last (x &optional n)
+  "Return the last link in the list LIST.
+With optional argument N, return Nth-to-last link (default 1)."
+  (if n
+      (let ((m 0) (p x))
+       (while (consp p) (incf m) (pop p))
+       (if (<= n 0) p
+         (if (< n m) (nthcdr (- m n) x) x)))
+    (while (consp (cdr x)) (pop x))
+    x))
+
+(defun butlast (x &optional n)
+  "Return a copy of LIST with the last N elements removed."
+  (if (and n (<= n 0)) x
+    (nbutlast (copy-sequence x) n)))
+
+(defun nbutlast (x &optional n)
+  "Modify LIST to remove the last N elements."
+  (let ((m (length x)))
+    (or n (setq n 1))
+    (and (< n m)
+        (progn
+          (if (> n 0) (setcdr (nthcdr (- (1- m) n) x) nil))
+          x))))
+
+(defun list* (arg &rest rest)   ; See compiler macro in cl-macs.el
+  "Return a new list with specified args as elements, cons'd to last arg.
+Thus, `(list* A B C D)' is equivalent to `(nconc (list A B C) D)', or to
+`(cons A (cons B (cons C D)))'."
+  (cond ((not rest) arg)
+       ((not (cdr rest)) (cons arg (car rest)))
+       (t (let* ((n (length rest))
+                 (copy (copy-sequence rest))
+                 (last (nthcdr (- n 2) copy)))
+            (setcdr last (car (cdr last)))
+            (cons arg copy)))))
+
+(defun ldiff (list sublist)
+  "Return a copy of LIST with the tail SUBLIST removed."
+  (let ((res nil))
+    (while (and (consp list) (not (eq list sublist)))
+      (push (pop list) res))
+    (nreverse res)))
+
+(defun copy-list (list)
+  "Return a copy of a list, which may be a dotted list.
+The elements of the list are not copied, just the list structure itself."
+  (if (consp list)
+      (let ((res nil))
+       (while (consp list) (push (pop list) res))
+       (prog1 (nreverse res) (setcdr res list)))
+    (car list)))
+
+(defun cl-maclisp-member (item list)
+  (while (and list (not (equal item (car list)))) (setq list (cdr list)))
+  list)
+
+;;; Define an Emacs 19-compatible `member' for the benefit of Emacs 18 users.
+(or (and (fboundp 'member) (subrp (symbol-function 'member)))
+    (defalias 'member 'cl-maclisp-member))
+
+(defalias 'cl-member 'memq)   ; for compatibility with old CL package
+(defalias 'cl-floor 'floor*)
+(defalias 'cl-ceiling 'ceiling*)
+(defalias 'cl-truncate 'truncate*)
+(defalias 'cl-round 'round*)
+(defalias 'cl-mod 'mod*)
+
+(defun adjoin (cl-item cl-list &rest cl-keys)  ; See compiler macro in cl-macs
+  "Return ITEM consed onto the front of LIST only if it's not already there.
+Otherwise, return LIST unmodified.
+Keywords supported:  :test :test-not :key"
+  (cond ((or (equal cl-keys '(:test eq))
+            (and (null cl-keys) (not (numberp cl-item))))
+        (if (memq cl-item cl-list) cl-list (cons cl-item cl-list)))
+       ((or (equal cl-keys '(:test equal)) (null cl-keys))
+        (if (member cl-item cl-list) cl-list (cons cl-item cl-list)))
+       (t (apply 'cl-adjoin cl-item cl-list cl-keys))))
+
+(defun subst (cl-new cl-old cl-tree &rest cl-keys)
+  "Substitute NEW for OLD everywhere in TREE (non-destructively).
+Return a copy of TREE with all elements `eql' to OLD replaced by NEW.
+Keywords supported:  :test :test-not :key"
+  (if (or cl-keys (and (numberp cl-old) (not (integerp cl-old))))
+      (apply 'sublis (list (cons cl-old cl-new)) cl-tree cl-keys)
+    (cl-do-subst cl-new cl-old cl-tree)))
+
+(defun cl-do-subst (cl-new cl-old cl-tree)
+  (cond ((eq cl-tree cl-old) cl-new)
+       ((consp cl-tree)
+        (let ((a (cl-do-subst cl-new cl-old (car cl-tree)))
+              (d (cl-do-subst cl-new cl-old (cdr cl-tree))))
+          (if (and (eq a (car cl-tree)) (eq d (cdr cl-tree)))
+              cl-tree (cons a d))))
+       (t cl-tree)))
+
+(defun acons (a b c)
+  "Return a new alist created by adding (KEY . VALUE) to ALIST."
+  (cons (cons a b) c))
+
+(defun pairlis (a b &optional c) (nconc (mapcar* 'cons a b) c))
+
+
+;;; Miscellaneous.
+
+;; XEmacs change
+(define-error 'cl-assertion-failed "Assertion failed")
+
+;;; This is defined in Emacs 19; define it here for Emacs 18 users.
+(defun cl-add-hook (hook func &optional append)
+  "Add to hook variable HOOK the function FUNC.
+FUNC is not added if it already appears on the list stored in HOOK."
+  (let ((old (and (boundp hook) (symbol-value hook))))
+    (and (listp old) (not (eq (car old) 'lambda))
+        (setq old (list old)))
+    (and (not (member func old))
+        (set hook (if append (nconc old (list func)) (cons func old))))))
+(or (fboundp 'add-hook) (defalias 'add-hook 'cl-add-hook))
+
+;; XEmacs change
+;(load "cl-defs")
+
+;;; Define data for indentation and edebug.
+(mapcar (function
+        (lambda (entry)
+          (mapcar (function
+                   (lambda (func)
+                     (put func 'lisp-indent-function (nth 1 entry))
+                     (put func 'lisp-indent-hook (nth 1 entry))
+                     (or (get func 'edebug-form-spec)
+                         (put func 'edebug-form-spec (nth 2 entry)))))
+                  (car entry))))
+       '(((defun* defmacro*) defun)
+         ((function*) nil
+          (&or symbolp ([&optional 'macro] 'lambda (&rest sexp) &rest form)))
+         ((eval-when) 1 (sexp &rest form))
+         ((when unless) 1 (&rest form))
+         ((declare) nil (&rest sexp))
+         ((the) 1 (sexp &rest form))
+         ((case ecase typecase etypecase) 1 (form &rest (sexp &rest form)))
+         ((block return-from) 1 (sexp &rest form))
+         ((return) nil (&optional form))
+         ((do do*) 2 ((&rest &or symbolp (symbolp &optional form form))
+                      (form &rest form)
+                      &rest form))
+         ((dolist dotimes) 1 ((symbolp form &rest form) &rest form))
+         ((do-symbols) 1 ((symbolp form &optional form form) &rest form))
+         ((do-all-symbols) 1 ((symbolp form &optional form) &rest form))
+         ((psetq setf psetf) nil edebug-setq-form)
+         ((progv) 2 (&rest form))
+         ((flet labels macrolet) 1
+          ((&rest (sexp sexp &rest form)) &rest form))
+         ((symbol-macrolet lexical-let lexical-let*) 1
+          ((&rest &or symbolp (symbolp form)) &rest form))
+         ((multiple-value-bind) 2 ((&rest symbolp) &rest form))
+         ((multiple-value-setq) 1 ((&rest symbolp) &rest form))
+         ((incf decf remf pop push pushnew shiftf rotatef) nil (&rest form))
+         ((letf letf*) 1 ((&rest (&rest form)) &rest form))
+         ((callf destructuring-bind) 2 (sexp form &rest form))
+         ((callf2) 3 (sexp form form &rest form))
+         ((loop) defun (&rest &or symbolp form))
+         ((ignore-errors) 0 (&rest form))))
+
+
+;;; This goes here so that cl-macs can find it if it loads right now.
+(provide 'cl-19)     ; usage: (require 'cl-19 "cl")
+
+
+;;; Things to do after byte-compiler is loaded.
+;;; As a side effect, we cause cl-macs to be loaded when compiling, so
+;;; that the compiler-macros defined there will be present.
+
+(defvar cl-hacked-flag nil)
+(defun cl-hack-byte-compiler ()
+  (if (and (not cl-hacked-flag) (fboundp 'byte-compile-file-form))
+      (progn
+       (cl-compile-time-init)   ; in cl-macs.el
+       (setq cl-hacked-flag t))))
+
+;;; Try it now in case the compiler has already been loaded.
+(cl-hack-byte-compiler)
+
+;;; Also make a hook in case compiler is loaded after this file.
+;;; The compiler doesn't call any hooks when it loads or runs, but
+;;; we can take advantage of the fact that emacs-lisp-mode will be
+;;; called when the compiler reads in the file to be compiled.
+;;; BUG: If the first compilation is `byte-compile' rather than
+;;; `byte-compile-file', we lose.  Oh, well.
+(add-hook 'emacs-lisp-mode-hook 'cl-hack-byte-compiler)
+
+
+;;; The following ensures that packages which expect the old-style cl.el
+;;; will be happy with this one.
+
+(provide 'cl)
+
+(provide 'mini-cl)   ; for Epoch
+
+(run-hooks 'cl-load-hook)
+
+;;; cl.el ends here
diff --git a/lisp/cmdloop.el b/lisp/cmdloop.el
new file mode 100644 (file)
index 0000000..53fd00b
--- /dev/null
@@ -0,0 +1,570 @@
+;;; cmdloop.el --- support functions for the top-level command loop.
+
+;; Copyright (C) 1992-4, 1997 Free Software Foundation, Inc.
+;; Author: Richard Mlynarik
+;; Date: 8-Jul-92
+;; Maintainer: XEmacs Development Team
+;; Keywords: internal, dumped
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: FSF 19.30. (Some of the stuff below is in FSF's subr.el.)
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;;; Code:
+
+(defun recursion-depth ()
+  "Return the current depth in recursive edits."
+  (+ command-loop-level (minibuffer-depth)))
+
+(defun top-level ()
+  "Exit all recursive editing levels."
+  (interactive)
+  (throw 'top-level nil))
+
+(defun exit-recursive-edit ()
+  "Exit from the innermost recursive edit or minibuffer."
+  (interactive)
+  (if (> (recursion-depth) 0)
+      (throw 'exit nil))
+  (error "No recursive edit is in progress"))
+
+(defun abort-recursive-edit ()
+  "Abort the command that requested this recursive edit or minibuffer input."
+  (interactive)
+  (if (> (recursion-depth) 0)
+      (throw 'exit t))
+  (error "No recursive edit is in progress"))
+
+;; (defun keyboard-quit ()
+;;   "Signal a `quit' condition."
+;;   (interactive)
+;;  (deactivate-mark)
+;;   (signal 'quit nil))
+
+;; moved here from pending-del.
+(defun keyboard-quit ()
+  "Signal a `quit' condition.
+If this character is typed while lisp code is executing, it will be treated
+ as an interrupt.
+If this character is typed at top-level, this simply beeps.
+If `zmacs-regions' is true, and the zmacs region is active in this buffer,
+then this key deactivates the region without beeping or signalling."
+  (interactive)
+  (if (and (region-active-p)
+          (eq (current-buffer) (zmacs-region-buffer)))
+      ;; pseudo-zmacs compatibility: don't beep if this ^G is simply
+      ;; deactivating the region.  If it is inactive, beep.
+      nil
+    (signal 'quit nil)))
+
+(defvar buffer-quit-function nil
+  "Function to call to \"quit\" the current buffer, or nil if none.
+\\[keyboard-escape-quit] calls this function when its more local actions
+\(such as cancelling a prefix argument, minibuffer or region) do not apply.")
+
+(defun keyboard-escape-quit ()
+  "Exit the current \"mode\" (in a generalized sense of the word).
+This command can exit an interactive command such as `query-replace',
+can clear out a prefix argument or a region,
+can get out of the minibuffer or other recursive edit,
+cancel the use of the current buffer (for special-purpose buffers),
+or go back to just one window (by deleting all but the selected window)."
+  (interactive)
+  (cond ((eq last-command 'mode-exited) nil)
+       ((> (minibuffer-depth) 0)
+        (abort-recursive-edit))
+       (current-prefix-arg
+        nil)
+       ((region-active-p)
+        (zmacs-deactivate-region))
+       ((> (recursion-depth) 0)
+        (exit-recursive-edit))
+       (buffer-quit-function
+        (funcall buffer-quit-function))
+       ((not (one-window-p t))
+        (delete-other-windows))
+       ((string-match "^ \\*" (buffer-name (current-buffer)))
+        (bury-buffer))))
+
+;; `cancel-mode-internal' is a function of a misc-user event, which is
+;; queued when window system directs XEmacs frame to cancel any modal
+;; behavior it exposes, like mouse pointer grabbing.
+;;
+;; This function does nothing at the top level, but the code which
+;; runs modal event loops, such as selection drag loop in `mouse-track',
+;; check if misc-user function symbol is `cancel-mode-internal', and
+;; takes necessary cleanup actions.
+(defun cancel-mode-internal (object)
+  (setq zmacs-region-stays t))
+\f
+;; Someone wrote: "This should really be a ring of last errors."
+;;
+;; But why bother?  This stuff is not all that necessary now that we
+;; have message log, anyway.
+(defvar last-error nil
+  "Object describing the last signaled error.")
+
+(defcustom errors-deactivate-region nil
+  "*Non-nil means that errors will cause the region to be deactivated."
+  :type 'boolean
+  :group 'editing-basics)
+
+(defun command-error (error-object)
+  (let ((inhibit-quit t)
+       (debug-on-error nil)
+       (etype (car-safe error-object)))
+    (setq quit-flag nil)
+    (setq standard-output t)
+    (setq standard-input t)
+    (setq executing-kbd-macro nil)
+    (and errors-deactivate-region
+        (zmacs-deactivate-region))
+    (discard-input)
+
+    (setq last-error error-object)
+
+    (message nil)
+    (ding nil (cond ((eq etype 'undefined-keystroke-sequence)
+                    (if (and (vectorp (nth 1 error-object))
+                             (/= 0 (length (nth 1 error-object)))
+                             (button-event-p (aref (nth 1 error-object) 0)))
+                        'undefined-click
+                      'undefined-key))
+                   ((eq etype 'quit)
+                    'quit)
+                   ((memq etype '(end-of-buffer beginning-of-buffer))
+                    'buffer-bound)
+                   ((eq etype 'buffer-read-only)
+                    'read-only)
+                   (t 'command-error)))
+    (display-error error-object t)
+
+    (if (noninteractive)
+        (progn
+          (message "%s exiting." emacs-program-name)
+          (kill-emacs -1)))
+    t))
+
+(defun describe-last-error ()
+  "Redisplay the last error-message.  See the variable `last-error'."
+  (interactive)
+  (if last-error
+      (with-displaying-help-buffer
+       (lambda ()
+        (princ "Last error was:\n" standard-output)
+        (display-error last-error standard-output)))
+    (message "No error yet")))
+
+
+;;#### Must be done later in the loadup sequence
+;(define-key (symbol-function 'help-command) "e" 'describe-last-error)
+
+
+(defun truncate-command-history-for-gc ()
+  (let ((tail (nthcdr 30 command-history)))
+    (if tail (setcdr tail nil)))
+  (let ((tail (nthcdr 30 values)))
+    (if tail (setcdr tail nil)))
+  )
+
+(add-hook 'pre-gc-hook 'truncate-command-history-for-gc)
+
+\f
+;;;; Object-oriented programming at its finest
+
+;; Now in src/print.c; used by Ferror_message_string and others
+;(defun display-error (error-object stream) ;(defgeneric report-condition ...)
+;  "Display `error-object' on `stream' in a user-friendly way."
+;  (funcall (or (let ((type (car-safe error-object)))
+;                 (catch 'error
+;                   (and (consp error-object)
+;                        (symbolp type)
+;                        ;;(stringp (get type 'error-message))
+;                      (consp (get type 'error-conditions))
+;                        (let ((tail (cdr error-object)))
+;                          (while (not (null tail))
+;                            (if (consp tail)
+;                                (setq tail (cdr tail))
+;                                (throw 'error nil)))
+;                          t)
+;                        ;; (check-type condition condition)
+;                        (get type 'error-conditions)
+;                        ;; Search class hierarchy
+;                        (let ((tail (get type 'error-conditions)))
+;                          (while (not (null tail))
+;                            (cond ((not (and (consp tail)
+;                                             (symbolp (car tail))))
+;                                   (throw 'error nil))
+;                                  ((get (car tail) 'display-error)
+;                                   (throw 'error (get (car tail)
+;                                                      'display-error)))
+;                                  (t
+;                                   (setq tail (cdr tail)))))
+;                          ;; Default method
+;                          #'(lambda (error-object stream)
+;                              (let ((type (car error-object))
+;                                    (tail (cdr error-object))
+;                                    (first t)
+;                                  (print-message-label 'error))
+;                                (if (eq type 'error)
+;                                    (progn (princ (car tail) stream)
+;                                           (setq tail (cdr tail)))
+;                                (princ (or (gettext (get type 'error-message)) type)
+;                                       stream))
+;                                (while tail
+;                                  (princ (if first ": " ", ") stream)
+;                                  (prin1 (car tail) stream)
+;                                  (setq tail (cdr tail)
+;                                        first nil))))))))
+;             #'(lambda (error-object stream)
+;                   (princ (gettext "Peculiar error ") stream)
+;                   (prin1 error-object stream)))
+;           error-object stream))
+
+(put 'file-error 'display-error
+     #'(lambda (error-object stream)
+         (let ((tail (cdr error-object))
+               (first t))
+           (princ (car tail) stream)
+           (while (setq tail (cdr tail))
+             (princ (if first ": " ", ") stream)
+             (princ (car tail) stream)
+             (setq first nil)))))
+
+(put 'undefined-keystroke-sequence 'display-error
+     #'(lambda (error-object stream)
+         (princ (key-description (car (cdr error-object))) stream)
+        ;; #### I18N3: doesn't localize properly.
+         (princ (gettext " not defined.") stream) ; doo dah, doo dah.
+         ))
+
+\f
+(defcustom teach-extended-commands-p t
+  "*If true, then `\\[execute-extended-command]' will teach you keybindings.
+Any time you execute a command with \\[execute-extended-command] which has a
+shorter keybinding, you will be shown the alternate binding before the
+command executes.  There is a short pause after displaying the binding,
+before executing it; the length can be controlled by
+`teach-extended-commands-timeout'."
+  :type 'boolean
+  :group 'keyboard)
+
+(defcustom teach-extended-commands-timeout 4
+  "*How long to pause after displaying a keybinding before executing.
+The value is measured in seconds.  This only applies if
+`teach-extended-commands-p' is true."
+  :type 'number
+  :group 'keyboard)
+
+;That damn RMS went off and implemented something differently, after
+;we had already implemented it.  We can't support both properly until
+;we have Lisp magic variables.
+;(defvar suggest-key-bindings t
+;  "*FSFmacs equivalent of `teach-extended-commands-*'.
+;Provided for compatibility only.
+;Non-nil means show the equivalent key-binding when M-x command has one.
+;The value can be a length of time to show the message for.
+;If the value is non-nil and not a number, we wait 2 seconds.")
+;
+;(make-obsolete-variable 'suggest-key-bindings 'teach-extended-commands-p)
+
+(defun execute-extended-command (prefix-arg)
+  "Read a command name from the minibuffer using 'completing-read'.
+Then call the specified command using 'command-execute' and return its
+return value.  If the command asks for a prefix argument, supply the
+value of the current raw prefix argument, or the value of PREFIX-ARG
+when called from Lisp."
+  (interactive "P")
+  ;; Note:  This doesn't hack "this-command-keys"
+  (let ((prefix-arg prefix-arg))
+    (setq this-command (read-command
+                        ;; Note: this has the hard-wired
+                        ;;  "C-u" and "M-x" string bug in common
+                        ;;  with all GNU Emacs's.
+                       ;; (i.e. it prints C-u and M-x regardless of
+                       ;; whether some other keys were actually bound
+                       ;; to `execute-extended-command' and 
+                       ;; `universal-argument'.
+                        (cond ((eq prefix-arg '-)
+                               "- M-x ")
+                              ((equal prefix-arg '(4))
+                               "C-u M-x ")
+                              ((integerp prefix-arg)
+                               (format "%d M-x " prefix-arg))
+                              ((and (consp prefix-arg)
+                                    (integerp (car prefix-arg)))
+                               (format "%d M-x " (car prefix-arg)))
+                              (t
+                               "M-x ")))))
+
+  (if (and teach-extended-commands-p
+          (interactive-p))
+      ;; We need to fiddle with keys: remember the keys, run the
+      ;; command, and show the keys (if any).
+      (let ((_execute_command_keys_ (where-is-internal this-command))
+           (_execute_command_name_ this-command)) ; the name can change
+       (command-execute this-command t)
+       (when (and _execute_command_keys_
+                  ;; Wait for a while, so the user can see a message
+                  ;; printed, if any.
+                  (sit-for 1))
+         (display-message
+          'no-log
+          (format "Command `%s' is bound to key%s: %s"
+                  _execute_command_name_
+                  (if (cdr _execute_command_keys_) "s" "")
+                  (sorted-key-descriptions _execute_command_keys_)))
+         (sit-for teach-extended-commands-timeout)
+         (clear-message 'no-log)))
+    ;; Else, just run the command.
+    (command-execute this-command t)))
+
+
+;;; C code calls this; the underscores in the variable names are to avoid
+;;; cluttering the specbind namespace (lexical scope!  lexical scope!)
+;;; Putting this in Lisp instead of C slows kbd macros by 50%.
+;(defun command-execute (_command &optional _record-flag)
+;  "Execute CMD as an editor command.
+;CMD must be a symbol that satisfies the `commandp' predicate.
+;Optional second arg RECORD-FLAG non-nil
+;means unconditionally put this command in `command-history'.
+;Otherwise, that is done only if an arg is read using the minibuffer."
+;  (let ((_prefix prefix-arg)
+;        (_cmd (indirect-function _command)))
+;    (setq prefix-arg nil
+;          this-command _command
+;          current-prefix-arg _prefix
+;          zmacs-region-stays nil)
+;    ;; #### debug_on_next_call = 0;
+;    (cond ((and (symbolp _command)
+;                (get _command 'disabled))
+;           (run-hooks disabled-command-hook))
+;          ((or (stringp _cmd) (vectorp _cmd))
+;           ;; If requested, place the macro in the command history.  
+;           ;;  For other sorts of commands, call-interactively takes
+;           ;;  care of this. 
+;           (if _record-flag
+;               (setq command-history
+;                     (cons (list 'execute-kbd-macro _cmd _prefix)
+;                           command-history)))
+;             (execute-kbd-macro _cmd _prefix))
+;            (t
+;             (call-interactively _command _record-flag)))))
+\f
+(defun y-or-n-p-minibuf (prompt)
+  "Ask user a \"y or n\" question.  Return t if answer is \"y\".
+Takes one argument, which is the string to display to ask the question.
+It should end in a space; `y-or-n-p' adds `(y or n) ' to it.
+No confirmation of the answer is requested; a single character is enough.
+Also accepts Space to mean yes, or Delete to mean no."
+  (save-excursion
+    (let* ((pre "")
+           (yn (gettext "(y or n) "))
+          ;; we need to translate the prompt ourselves because of the
+          ;; strange way we handle it.
+          (prompt (gettext prompt))
+           event)
+      (while (stringp yn)
+        (if (let ((cursor-in-echo-area t)
+                  (inhibit-quit t))
+              (message "%s%s%s" pre prompt yn)
+              (setq event (next-command-event event))
+             (condition-case nil
+                 (prog1
+                     (or quit-flag (eq 'keyboard-quit (key-binding event)))
+                   (setq quit-flag nil))
+               (wrong-type-argument t)))
+            (progn
+              (message "%s%s%s%s" pre prompt yn (single-key-description event))
+              (setq quit-flag nil)
+              (signal 'quit '())))
+        (let* ((keys (events-to-keys (vector event)))
+              (def (lookup-key query-replace-map keys)))
+          (cond ((eq def 'skip)
+                 (message "%s%sNo" prompt yn)
+                (setq yn nil))
+                ((eq def 'act)
+                 (message "%s%sYes" prompt yn)
+                (setq yn t))
+               ((eq def 'recenter)
+                (recenter))
+               ((or (eq def 'quit) (eq def 'exit-prefix))
+                (signal 'quit '()))
+                ((button-release-event-p event) ; ignore them
+                 nil)
+                (t
+                 (message "%s%s%s%s" pre prompt yn
+                          (single-key-description event))
+                 (ding nil 'y-or-n-p)
+                 (discard-input)
+                 (if (= (length pre) 0)
+                     (setq pre (gettext "Please answer y or n.  ")))))))
+      yn)))
+
+(defun yes-or-no-p-minibuf (prompt)
+  "Ask user a yes-or-no question.  Return t if answer is yes.
+Takes one argument, which is the string to display to ask the question.
+It should end in a space; `yes-or-no-p' adds `(yes or no) ' to it.
+The user must confirm the answer with RET,
+and can edit it until it has been confirmed."
+  (save-excursion
+    (let ((p (concat (gettext prompt) (gettext "(yes or no) ")))
+          (ans ""))
+      (while (stringp ans)
+        (setq ans (downcase (read-string p nil t))) ;no history
+        (cond ((string-equal ans (gettext "yes"))
+               (setq ans 't))
+              ((string-equal ans (gettext "no"))
+               (setq ans 'nil))
+              (t
+               (ding nil 'yes-or-no-p)
+               (discard-input)
+               (message "Please answer yes or no.")
+               (sleep-for 2))))
+      ans)))
+
+;; these may be redefined later, but make the original def easily encapsulable
+(define-function 'yes-or-no-p 'yes-or-no-p-minibuf)
+(define-function 'y-or-n-p 'y-or-n-p-minibuf)
+\f
+
+(defun read-char ()
+  "Read a character from the command input (keyboard or macro).
+If a mouse click or non-ASCII character is detected, an error is
+signalled.  The character typed is returned as an ASCII value.  This
+is most likely the wrong thing for you to be using: consider using
+the `next-command-event' function instead."
+  (save-excursion
+    (let ((event (next-command-event)))
+      (or inhibit-quit
+         (and (event-matches-key-specifier-p event (quit-char))
+              (signal 'quit nil)))
+      (prog1 (or (event-to-character event)
+                 ;; Kludge.  If the event we read was a mouse-release,
+                 ;; discard it and read the next one.
+                 (if (button-release-event-p event)
+                     (event-to-character (next-command-event event)))
+                 (error "Key read has no ASCII equivalent %S" event))
+        ;; this is not necessary, but is marginally more efficient than GC.
+        (deallocate-event event)))))
+
+(defun read-char-exclusive ()
+  "Read a character from the command input (keyboard or macro).
+If a mouse click or non-ASCII character is detected, it is discarded.
+The character typed is returned as an ASCII value.  This is most likely
+the wrong thing for you to be using: consider using the
+`next-command-event' function instead."
+  (let (event ch)
+    (while (progn
+            (setq event (next-command-event))
+            (or inhibit-quit
+                (and (event-matches-key-specifier-p event (quit-char))
+                     (signal 'quit nil)))
+            (setq ch (event-to-character event))
+            (deallocate-event event)
+            (null ch)))
+    ch))
+
+(defun read-quoted-char (&optional prompt)
+  "Like `read-char', except that if the first character read is an octal
+digit, we read up to two more octal digits and return the character
+represented by the octal number consisting of those digits.
+Optional argument PROMPT specifies a string to use to prompt the user."
+  (let ((count 0) (code 0) done
+       (prompt (and prompt (gettext prompt)))
+       char event)
+    (while (and (not done) (< count 3))
+      (let ((inhibit-quit (zerop count))
+           ;; Don't let C-h get the help message--only help function keys.
+           (help-char nil)
+           (help-form
+            "Type the special character you want to use,
+or three octal digits representing its character code."))
+       (and prompt (display-message 'prompt (format "%s-" prompt)))
+       (setq event (next-command-event)
+             char (or (event-to-character event nil nil t)
+                      (signal 'error
+                              (list "key read cannot be inserted in a buffer"
+                                    event))))
+       (if inhibit-quit (setq quit-flag nil)))
+      (cond ((<= ?0 char ?7)
+            (setq code (+ (* code 8) (- char ?0))
+                  count (1+ count))
+            (when prompt
+              (display-message 'prompt
+                (setq prompt (format "%s %c" prompt char)))))
+           ((> count 0)
+            (setq unread-command-event event
+                  done t))
+           (t (setq code (char-int char)
+                    done t))))
+    (int-char code)
+    ;; Turn a meta-character into a character with the 0200 bit set.
+;    (logior (if (/= (logand code ?\M-\^@) 0) 128 0)
+;          (logand 255 code))))
+    ))
+
+(defun momentary-string-display (string pos &optional exit-char message) 
+  "Momentarily display STRING in the buffer at POS.
+Display remains until next character is typed.
+If the char is EXIT-CHAR (optional third arg, default is SPC) it is swallowed;
+otherwise it is then available as input (as a command if nothing else).
+Display MESSAGE (optional fourth arg) in the echo area.
+If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there."
+  (or exit-char (setq exit-char ?\ ))
+  (let ((buffer-read-only nil)
+       ;; Don't modify the undo list at all.
+       (buffer-undo-list t)
+       (modified (buffer-modified-p))
+       (name buffer-file-name)
+       insert-end)
+    (unwind-protect
+       (progn
+         (save-excursion
+           (goto-char pos)
+           ;; defeat file locking... don't try this at home, kids!
+           (setq buffer-file-name nil)
+           (insert-before-markers (gettext string))
+           (setq insert-end (point))
+           ;; If the message end is off frame, recenter now.
+           (if (> (window-end) insert-end)
+               (recenter (/ (window-height) 2)))
+           ;; If that pushed message start off the frame,
+           ;; scroll to start it at the top of the frame.
+           (move-to-window-line 0)
+           (if (> (point) pos)
+               (progn
+                 (goto-char pos)
+                 (recenter 0))))
+         (message (or message (gettext "Type %s to continue editing."))
+                  (single-key-description exit-char))
+         (let ((event (save-excursion (next-command-event))))
+           (or (eq (event-to-character event) exit-char)
+               (setq unread-command-event event))))
+      (if insert-end
+         (save-excursion
+           (delete-region pos insert-end)))
+      (setq buffer-file-name name)
+      (set-buffer-modified-p modified))))
+
+;;; cmdloop.el ends here
diff --git a/lisp/code-files.el b/lisp/code-files.el
new file mode 100644 (file)
index 0000000..3ff114b
--- /dev/null
@@ -0,0 +1,564 @@
+;;; code-files.el --- File I/O functions for XEmacs.
+
+;; Copyright (C) 1992,93,94,95 Free Software Foundation, Inc.
+;; Copyright (C) 1995 Amdahl Corporation.
+;; Copyright (C) 1995 Sun Microsystems.
+
+;; This file is part of XEmacs.
+
+;; This file is very similar to mule-files.el
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;;; Derived from mule.el in the original Mule but heavily modified
+;;; by Ben Wing.
+
+;; 1997/3/11 modified by MORIOKA Tomohiko to sync with Emacs 20 API.
+
+;;; Code:
+
+(setq-default buffer-file-coding-system 'no-conversion)
+(put 'buffer-file-coding-system 'permanent-local t)
+
+(define-obsolete-variable-alias
+  'file-coding-system
+  'buffer-file-coding-system)
+
+(define-obsolete-variable-alias
+  'overriding-file-coding-system
+  'coding-system-for-read)
+
+(defvar buffer-file-coding-system-for-read 'undecided
+  "Coding system used when reading a file.
+This provides coarse-grained control; for finer-grained control, use
+`file-coding-system-alist'.  From a Lisp program, if you wish to
+unilaterally specify the coding system used for one particular
+operation, you should bind the variable `coding-system-for-read'
+rather than setting this variable, which is intended to be used for
+global environment specification.")
+
+(define-obsolete-variable-alias
+  'file-coding-system-for-read
+  'buffer-file-coding-system-for-read)
+
+(defvar file-coding-system-alist
+  '(("\\.elc$" . (binary . binary))
+;; This must not be neccessary, slb suggests -kkm
+;;  ("loaddefs.el$" . (binary . binary))
+    ("\\.tar$" . (binary . binary))
+    ("\\.\\(tif\\|tiff\\)$" . (binary . binary))
+    ("\\.png$" . (binary . binary))
+    ("\\.gif$" . (binary . binary))
+    ("\\.\\(jpeg\\|jpg\\)$" . (binary . binary))
+    ("TUTORIAL\\.hr$" . iso-8859-2)
+    ("TUTORIAL\\.pl$" . iso-8859-2)
+    ("TUTORIAL\\.ro$" . iso-8859-2)
+    ;; ("\\.\\(el\\|emacs\\|info\\(-[0-9]+\\)?\\|texi\\)$" . iso-2022-8)
+    ;; ("\\(ChangeLog\\|CHANGES-beta\\)$" . iso-2022-8)
+    ("\\.\\(gz\\|Z\\)$" . binary)
+    ("/spool/mail/.*$" . convert-mbox-coding-system))
+  "Alist to decide a coding system to use for a file I/O operation.
+The format is ((PATTERN . VAL) ...),
+where PATTERN is a regular expression matching a file name,
+VAL is a coding system, a cons of coding systems, or a function symbol.
+If VAL is a coding system, it is used for both decoding and encoding
+the file contents.
+If VAL is a cons of coding systems, the car part is used for decoding,
+and the cdr part is used for encoding.
+If VAL is a function symbol, the function must return a coding system
+or a cons of coding systems which are used as above.
+
+This overrides the more general specification in
+`buffer-file-coding-system-for-read', but is overridden by
+`coding-system-for-read'.")
+
+(defun set-buffer-file-coding-system (coding-system &optional force)
+  "Set buffer-file-coding-system of the current buffer to CODING-SYSTEM.
+If optional argument FORCE (interactively, the prefix argument) is not
+given, attempt to match the EOL type of the new coding system to
+the current value of `buffer-file-coding-system'."
+  (interactive "zFile coding system: \nP")
+  (get-coding-system coding-system) ;; correctness check
+  (if (not force)
+      (setq coding-system
+           (subsidiary-coding-system
+            coding-system
+            (coding-system-eol-type buffer-file-coding-system))))
+  (setq buffer-file-coding-system coding-system)
+  (redraw-modeline t))
+
+(defun toggle-buffer-file-coding-system ()
+  "Set EOL type of buffer-file-coding-system of the current buffer to
+something other than what it is at the moment."
+  (interactive)
+  (let ((eol-type 
+        (coding-system-eol-type buffer-file-coding-system)))
+    (setq buffer-file-coding-system
+         (subsidiary-coding-system
+          (coding-system-base buffer-file-coding-system)
+          (cond ((eq eol-type 'lf) 'crlf)
+                ((eq eol-type 'crlf) 'lf)
+                ((eq eol-type 'cr) 'lf))))))
+
+(define-obsolete-function-alias
+  'set-file-coding-system
+  'set-buffer-file-coding-system)
+
+(defun set-buffer-file-coding-system-for-read (coding-system)
+  "Set the coding system used when reading in a file.
+This is equivalent to setting the variable
+`buffer-file-coding-system-for-read'.  You can also use
+`file-coding-system-alist' to specify the coding system for
+particular files."
+  (interactive "zFile coding system for read: ")
+  (get-coding-system coding-system) ;; correctness check
+  (setq buffer-file-coding-system-for-read coding-system))
+
+(define-obsolete-function-alias
+  'set-file-coding-system-for-read
+  'set-buffer-file-coding-system-for-read)
+
+(defun set-default-buffer-file-coding-system (coding-system)
+  "Set the default value of `buffer-file-coding-system' to CODING-SYSTEM.
+The default value is used both for buffers without associated files
+and for files with no apparent coding system (i.e. primarily ASCII).
+See `buffer-file-coding-system' for more information."
+  (interactive "zDefault file coding system: ")
+  (setq-default buffer-file-coding-system coding-system)
+  (redraw-modeline t))
+
+(define-obsolete-function-alias
+  'set-default-file-coding-system
+  'set-default-buffer-file-coding-system)
+
+(defun find-file-coding-system-for-read-from-filename (filename)
+  "Look up coding system to read a file in `file-coding-system-alist'.
+The return value will be nil (no applicable entry) or a coding system
+object (the entry specified a coding system)."
+  (let ((alist file-coding-system-alist)
+       (found nil)
+       (codesys nil))
+    (let ((case-fold-search (eq system-type 'vax-vms)))
+      (setq filename (file-name-sans-versions filename))
+      (while (and (not found) alist)
+       (if (string-match (car (car alist)) filename)
+           (setq codesys (cdr (car alist))
+                 found t))
+       (setq alist (cdr alist))))
+    (when codesys
+      (if (functionp codesys)
+         (setq codesys (funcall codesys 'insert-file-contents filename))
+       )
+      (cond ((consp codesys) (find-coding-system (car codesys)))
+           ((find-coding-system codesys))
+           ))))
+
+(define-obsolete-function-alias
+  'find-file-coding-system-from-filename
+  'find-file-coding-system-for-read-from-filename)
+
+(defun find-file-coding-system-for-write-from-filename (filename)
+  "Look up coding system to write a file in `file-coding-system-alist'.
+The return value will be nil (no applicable entry) or a coding system
+object (the entry specified a coding system)."
+  (let ((alist file-coding-system-alist)
+       (found nil)
+       (codesys nil))
+    (let ((case-fold-search (eq system-type 'vax-vms)))
+      (setq filename (file-name-sans-versions filename))
+      (while (and (not found) alist)
+       (if (string-match (car (car alist)) filename)
+           (setq codesys (cdr (car alist))
+                 found t))
+       (setq alist (cdr alist))))
+    (when codesys
+      (if (functionp codesys)
+         (setq codesys (funcall codesys 'write-region filename))
+       )
+      (cond ((consp codesys) (find-coding-system (cdr codesys)))
+           ((find-coding-system codesys))
+           ))))
+
+(defun convert-mbox-coding-system (filename visit start end)
+  "Decoding function for Unix mailboxes.
+Does separate detection and decoding on each message, since each
+message might be in a different encoding."
+  (let ((buffer-read-only nil))
+    (save-restriction
+      (narrow-to-region start end)
+      (goto-char (point-min))
+      (while (not (eobp))
+       (let ((start (point))
+             end)
+         (forward-char 1)
+         (if (re-search-forward "^From" nil 'move)
+             (beginning-of-line))
+         (setq end (point))
+         (decode-coding-region start end 'undecided))))))
+
+(defun find-coding-system-magic-cookie ()
+  "Look for the coding-system magic cookie in the current buffer.\n"
+"The coding-system magic cookie is the exact string\n"
+"\";;;###coding system: \" followed by a valid coding system symbol,\n"
+"somewhere within the first 3000 characters of the file.  If found,\n"
+"the coding system symbol is returned; otherwise nil is returned.\n"
+"Note that it is extremely unlikely that such a string would occur\n"
+"coincidentally as the result of encoding some characters in a non-ASCII\n"
+"charset, and that the spaces make it even less likely since the space\n"
+"character is not a valid octet in any ISO 2022 encoding of most non-ASCII\n"
+"charsets."
+  (save-excursion
+    (goto-char (point-min))
+    (or (and (looking-at
+             "^[^\n]*-\\*-[^\n]*coding: \\([^ \t\n;]+\\)[^\n]*-\\*-")
+            (let ((codesys (intern (buffer-substring
+                                    (match-beginning 1)(match-end 1)))))
+              (if (find-coding-system codesys) codesys)))
+        ;; (save-excursion
+        ;;   (let (start end)
+        ;;     (and (re-search-forward "^;+[ \t]*Local Variables:" nil t)
+        ;;          (setq start (match-end 0))
+        ;;          (re-search-forward "\n;+[ \t]*End:")
+        ;;          (setq end (match-beginning 0))
+        ;;          (save-restriction
+        ;;            (narrow-to-region start end)
+        ;;            (goto-char start)
+        ;;            (re-search-forward "^;;; coding: \\([^\n]+\\)$" nil t)
+        ;;            )
+        ;;          (let ((codesys
+        ;;                 (intern (buffer-substring
+        ;;                          (match-beginning 1)(match-end 1)))))
+        ;;            (if (find-coding-system codesys) codesys))
+        ;;          )))
+       (let ((case-fold-search nil))
+         (if (search-forward
+              ";;;###coding system: " (+ (point-min) 3000) t)
+             (let ((start (point))
+                   (end (progn
+                          (skip-chars-forward "^ \t\n\r")
+                          (point))))
+               (if (> end start)
+                   (let ((codesys (intern (buffer-substring start end))))
+                     (if (find-coding-system codesys) codesys)))
+               )))
+       )))
+
+(defun load (file &optional noerror nomessage nosuffix)
+  "Execute a file of Lisp code named FILE.
+First tries FILE with .elc appended, then tries with .el,
+ then tries FILE unmodified.  Searches directories in load-path.
+If optional second arg NOERROR is non-nil,
+ report no error if FILE doesn't exist.
+Print messages at start and end of loading unless
+ optional third arg NOMESSAGE is non-nil.
+If optional fourth arg NOSUFFIX is non-nil, don't try adding
+ suffixes .elc or .el to the specified name FILE.
+Return t if file exists."
+  (let* ((filename (substitute-in-file-name file))
+        (handler (find-file-name-handler filename 'load))
+        (path nil))
+    (if handler
+       (funcall handler 'load filename noerror nomessage nosuffix)
+      (if (or (<= (length filename) 0)
+             (null (setq path
+                         (locate-file filename load-path
+                                      (and (not nosuffix) ".elc:.el:")))))
+         (and (null noerror)
+              (signal 'file-error (list "Cannot open load file" filename)))
+       ;; now use the internal load to actually load the file.
+       (load-internal
+        file noerror nomessage nosuffix
+        (let ((elc ; use string= instead of string-match to keep match-data.
+               (string= ".elc" (downcase (substring path -4)))))
+          (or (and (not elc) coding-system-for-read) ; prefer for source file
+              ;; find magic-cookie
+              (save-excursion
+                (set-buffer (get-buffer-create " *load*"))
+                (erase-buffer)
+                (let ((coding-system-for-read 'no-conversion))
+                  (insert-file-contents path nil 1 3001))
+                (find-coding-system-magic-cookie))
+              (if elc
+                  ;; if reading a byte-compiled file and we didn't find
+                  ;; a coding-system magic cookie, then use `binary'.
+                  ;; We need to guarantee that we never do autodetection
+                  ;; on byte-compiled files because confusion here would
+                  ;; be a very bad thing.  Pre-existing byte-compiled
+                  ;; files are always in the `binary' coding system.
+                  ;; Also, byte-compiled files always use `lf' to terminate
+                  ;; a line; don't risk confusion here either.
+                  'binary
+                (or (find-file-coding-system-for-read-from-filename path)
+                    ;; looking up in `file-coding-system-alist'.
+                    ;; otherwise use `buffer-file-coding-system-for-read',
+                    ;; as normal
+                    buffer-file-coding-system-for-read)
+                )))
+        )))))
+
+(defvar insert-file-contents-access-hook nil
+  "A hook to make a file accessible before reading it.
+`insert-file-contents' calls this hook before doing anything else.
+Called with two arguments: FILENAME and VISIT, the same as the
+corresponding arguments in the call to `insert-file-contents'.")
+
+(defvar insert-file-contents-pre-hook nil
+  "A special hook to decide the coding system used for reading in a file.
+
+Before reading a file, `insert-file-contents' calls the functions on
+this hook with arguments FILENAME and VISIT, the same as the
+corresponding arguments in the call to `insert-file-contents'.  In
+these functions, you may refer to the global variable
+`buffer-file-coding-system-for-read'.
+
+The return value of the functions should be either
+
+-- nil
+-- A coding system or a symbol denoting it, indicating the coding system
+   to be used for reading the file
+-- A list of two elements (absolute pathname and length of data inserted),
+   which is used as the return value to `insert-file-contents'.  In this
+   case, `insert-file-contents' assumes that the function has inserted
+   the file for itself and suppresses further reading.
+
+If any function returns non-nil, the remaining functions are not called.")
+
+(defvar insert-file-contents-error-hook nil
+  "A hook to set `buffer-file-coding-system' when a read error has occurred.
+
+When a file error (e.g. nonexistent file) occurs while read a file,
+`insert-file-contents' calls the functions on this hook with three
+arguments: FILENAME and VISIT (the same as the corresponding arguments
+in the call to `insert-file-contents') and a cons (SIGNALED-CONDITIONS
+. SIGNAL-DATA).
+
+After calling this hook, the error is signalled for real and
+propagates to the caller of `insert-file-contents'.")
+
+(defvar insert-file-contents-post-hook nil
+  "A hook to set `buffer-file-coding-system' for the current buffer.
+
+After successful reading, `insert-file-contents' calls the functions
+on this hook with four arguments: FILENAME and VISIT (the same as the
+corresponding arguments in the call to `insert-file-contents'),
+CODING-SYSTEM (the actual coding system used to decode the file), and
+a cons of absolute pathname and length of data inserted (the same
+thing as will be returned from `insert-file-contents').")
+
+(defun insert-file-contents (filename &optional visit beg end replace)
+  "Insert contents of file FILENAME after point.
+Returns list of absolute file name and length of data inserted.
+If second argument VISIT is non-nil, the buffer's visited filename
+and last save file modtime are set, and it is marked unmodified.
+If visiting and the file does not exist, visiting is completed
+before the error is signaled.
+
+The optional third and fourth arguments BEG and END
+specify what portion of the file to insert.
+If VISIT is non-nil, BEG and END must be nil.
+If optional fifth argument REPLACE is non-nil,
+it means replace the current buffer contents (in the accessible portion)
+with the file contents.  This is better than simply deleting and inserting
+the whole thing because (1) it preserves some marker positions
+and (2) it puts less data in the undo list.
+
+NOTE: When Mule support is enabled, the REPLACE argument is
+currently ignored.
+
+The coding system used for decoding the file is determined as follows:
+
+1. `coding-system-for-read', if non-nil.
+2. The result of `insert-file-contents-pre-hook', if non-nil.
+3. The matching value for this filename from
+   `file-coding-system-alist', if any.
+4. `buffer-file-coding-system-for-read', if non-nil.
+5. The coding system 'no-conversion.
+
+If a local value for `buffer-file-coding-system' in the current buffer
+does not exist, it is set to the coding system which was actually used
+for reading.
+
+See also `insert-file-contents-access-hook',
+`insert-file-contents-pre-hook', `insert-file-contents-error-hook',
+and `insert-file-contents-post-hook'."
+  (let (return-val coding-system used-codesys conversion-func)
+    ;; OK, first load the file.
+    (condition-case err
+       (progn
+         (run-hook-with-args 'insert-file-contents-access-hook
+                             filename visit)
+         ;; determine the coding system to use, as described above.
+         (setq coding-system
+               (or
+                ;; #1.
+                coding-system-for-read
+                ;; #2.
+                (run-hook-with-args-until-success
+                 'insert-file-contents-pre-hook
+                 filename visit)
+                ;; #3.
+                (find-file-coding-system-for-read-from-filename filename)
+                ;; #4.
+                buffer-file-coding-system-for-read
+                ;; #5.
+                'no-conversion))
+         (if (consp coding-system)
+             (setq return-val coding-system)
+           (if (null (find-coding-system coding-system))
+               (progn
+                 (message
+                  "Invalid coding-system (%s), using 'undecided"
+                  coding-system)
+                 (setq coding-system 'undecided)))
+           (setq return-val
+                 (insert-file-contents-internal filename visit beg end
+                                                replace coding-system
+                                                ;; store here!
+                                                'used-codesys))
+           ))
+      (file-error
+       (run-hook-with-args 'insert-file-contents-error-hook
+                          filename visit err)
+       (signal (car err) (cdr err))))
+    (setq coding-system used-codesys)
+    ;; call any `post-read-conversion' for the coding system that
+    ;; was used ...
+    (let ((func
+          (coding-system-property coding-system 'post-read-conversion))
+         (endmark (make-marker)))
+      (set-marker endmark (+ (point) (nth 1 return-val)))
+      (if func
+         (unwind-protect
+             (save-excursion
+               (let (buffer-read-only)
+                 (funcall func (point) (marker-position endmark))))
+           (if visit
+               (progn
+                 (set-buffer-auto-saved)
+                 (set-buffer-modified-p nil)))))
+      (setcar (cdr return-val) (- (marker-position endmark) (point))))
+    ;; now finally set the buffer's `buffer-file-coding-system'.
+    (if (run-hook-with-args-until-success 'insert-file-contents-post-hook
+                                         filename visit return-val)
+       nil
+      (if (local-variable-p 'buffer-file-coding-system (current-buffer))
+         ;; if buffer-file-coding-system is already local, just
+         ;; set its eol type to what was found, if it wasn't
+         ;; set already.
+         (set-buffer-file-coding-system
+          (subsidiary-coding-system buffer-file-coding-system
+                                    (coding-system-eol-type coding-system)))
+       ;; otherwise actually set buffer-file-coding-system.
+       (set-buffer-file-coding-system coding-system)))
+    return-val))
+
+(defvar write-region-pre-hook nil
+  "A special hook to decide the coding system used for writing out a file.
+
+Before writing a file, `write-region' calls the functions on this hook
+with arguments START, END, FILENAME, APPEND, VISIT, and CODING-SYSTEM,
+the same as the corresponding arguments in the call to
+`write-region'.
+
+The return value of the functions should be either
+
+-- nil
+-- A coding system or a symbol denoting it, indicating the coding system
+   to be used for reading the file
+-- A list of two elements (absolute pathname and length of data written),
+   which is used as the return value to `write-region'.  In this
+   case, `write-region' assumes that the function has written
+   the file for itself and suppresses further writing.
+
+If any function returns non-nil, the remaining functions are not called.")
+
+(defvar write-region-post-hook nil
+  "A hook called by `write-region' after a file has been written out.
+
+The functions on this hook are called with arguments START, END,
+FILENAME, APPEND, VISIT, and CODING-SYSTEM, the same as the
+corresponding arguments in the call to `write-region'.")
+
+(defun write-region (start end filename &optional append visit lockname coding-system)
+  "Write current region into specified file.
+By default the file's existing contents are replaced by the specified region.
+When called from a program, takes three arguments:
+START, END and FILENAME.  START and END are buffer positions.
+Optional fourth argument APPEND if non-nil means
+  append to existing file contents (if any).
+Optional fifth argument VISIT if t means
+  set last-save-file-modtime of buffer to this file's modtime
+  and mark buffer not modified.
+If VISIT is a string, it is a second file name;
+  the output goes to FILENAME, but the buffer is marked as visiting VISIT.
+  VISIT is also the file name to lock and unlock for clash detection.
+If VISIT is neither t nor nil nor a string,
+  that means do not print the \"Wrote file\" message.
+The optional sixth arg LOCKNAME, if non-nil, specifies the name to
+  use for locking and unlocking, overriding FILENAME and VISIT.
+Kludgy feature: if START is a string, then that string is written
+to the file, instead of any buffer contents, and END is ignored.
+Optional seventh argument CODING-SYSTEM specifies the coding system
+  used to encode the text when it is written out, and defaults to
+  the value of `buffer-file-coding-system' in the current buffer.
+  Interactively, with a prefix arg, you will be prompted for the
+  coding system.
+See also `write-region-pre-hook' and `write-region-post-hook'."
+  (interactive "r\nFWrite region to file: \ni\ni\ni\nZCoding-system: ")
+  (setq coding-system
+       (or coding-system-for-write
+           (run-hook-with-args-until-success
+            'write-region-pre-hook start end filename append visit lockname)
+           coding-system
+           buffer-file-coding-system
+           (find-file-coding-system-for-write-from-filename filename)
+           ))
+  (if (consp coding-system)
+      coding-system
+    (let ((func
+          (coding-system-property coding-system 'pre-write-conversion)))
+      (if func
+         (let ((curbuf (current-buffer))
+               (tempbuf (generate-new-buffer " *temp-write-buffer*"))
+               (modif (buffer-modified-p)))
+           (unwind-protect
+               (save-excursion
+                 (set-buffer tempbuf)
+                 (erase-buffer)
+                 (insert-buffer-substring curbuf start end)
+                 (funcall func (point-min) (point-max))
+                 (write-region-internal (point-min) (point-max) filename
+                                        append
+                                        (if (eq visit t) nil visit)
+                                        lockname
+                                        coding-system))
+             ;; leaving a buffer associated with file will cause problems
+             ;; when next visiting.
+             (kill-buffer tempbuf)
+             (if (or visit (null modif))
+                 (progn
+                   (set-buffer-auto-saved)
+                   (set-buffer-modified-p nil)
+                   (if (buffer-file-name) (set-visited-file-modtime))))))
+       (write-region-internal start end filename append visit lockname
+                              coding-system)))
+    (run-hook-with-args 'write-region-post-hook
+                       start end filename append visit lockname
+                       coding-system)))
+
+;;; mule-files.el ends here
diff --git a/lisp/code-process.el b/lisp/code-process.el
new file mode 100644 (file)
index 0000000..7174f97
--- /dev/null
@@ -0,0 +1,258 @@
+;;; code-process.el --- Process coding functions for XEmacs.
+
+;; Copyright (C) 1985-1987, 1993, 1994, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1995 Ben Wing
+;; Copyright (C) 1997 MORIOKA Tomohiko
+
+;; Author: Ben Wing
+;;         MORIOKA Tomohiko
+;; Maintainer: XEmacs Development Team
+;; Keywords: mule, multilingual, coding system, process
+
+;; This file is part of XEmacs.
+
+;; This file is very similar to code-process.el
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Code:
+
+(defvar process-coding-system-alist nil
+  "Alist to decide a coding system to use for a process I/O operation.
+The format is ((PATTERN . VAL) ...),
+where PATTERN is a regular expression matching a program name,
+VAL is a coding system, a cons of coding systems, or a function symbol.
+If VAL is a coding system, it is used for both decoding what received
+from the program and encoding what sent to the program.
+If VAL is a cons of coding systems, the car part is used for decoding,
+and the cdr part is used for encoding.
+If VAL is a function symbol, the function must return a coding system
+or a cons of coding systems which are used as above.")
+
+(defun call-process (program &optional infile buffer displayp &rest args)
+  "Call PROGRAM synchronously in separate process.
+The program's input comes from file INFILE (nil means `/dev/null').
+Insert output in BUFFER before point; t means current buffer;
+ nil for BUFFER means discard it; 0 means discard and don't wait.
+BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case,
+REAL-BUFFER says what to do with standard output, as above,
+while STDERR-FILE says what to do with standard error in the child.
+STDERR-FILE may be nil (discard standard error output),
+t (mix it with ordinary output), or a file name string.
+
+Fourth arg DISPLAYP non-nil means redisplay buffer as output is inserted.
+Remaining arguments are strings passed as command arguments to PROGRAM.
+
+If BUFFER is 0, `call-process' returns immediately with value nil.
+Otherwise it waits for PROGRAM to terminate and returns a numeric exit status
+ or a signal description string.
+If you quit, the process is killed with SIGINT, or SIGKILL if you
+ quit again."
+  (let* ((coding-system-for-read
+         (or coding-system-for-read
+             (let (ret)
+               (catch 'found
+                 (let ((alist process-coding-system-alist)
+                       (case-fold-search (eq system-type 'vax-vms)))
+                   (while alist
+                     (if (string-match (car (car alist)) program)
+                         (throw 'found (setq ret (cdr (car alist))))
+                       )
+                     (setq alist (cdr alist))
+                     )))
+               (if (functionp ret)
+                   (setq ret (funcall ret 'call-process program))
+                 )
+               (cond ((consp ret) (car ret))
+                     ((not ret) 'undecided)
+                     ((find-coding-system ret) ret)
+                     )
+               ))))
+    (apply 'call-process-internal program infile buffer displayp args)
+    ))
+
+(defun call-process-region (start end program
+                                 &optional deletep buffer displayp
+                                 &rest args)
+  "Send text from START to END to a synchronous process running PROGRAM.
+Delete the text if fourth arg DELETEP is non-nil.
+
+Insert output in BUFFER before point; t means current buffer;
+ nil for BUFFER means discard it; 0 means discard and don't wait.
+BUFFER can also have the form (REAL-BUFFER STDERR-FILE); in that case,
+REAL-BUFFER says what to do with standard output, as above,
+while STDERR-FILE says what to do with standard error in the child.
+STDERR-FILE may be nil (discard standard error output),
+t (mix it with ordinary output), or a file name string.
+
+Sixth arg DISPLAYP non-nil means redisplay buffer as output is inserted.
+Remaining args are passed to PROGRAM at startup as command args.
+
+If BUFFER is 0, returns immediately with value nil.
+Otherwise waits for PROGRAM to terminate
+and returns a numeric exit status or a signal description string.
+If you quit, the process is first killed with SIGINT, then with SIGKILL if
+you quit again before the process exits."
+  (let ((temp (cond ((eq system-type 'vax-vms)
+                     (make-temp-name "tmp:emacs"))
+                   ((or (eq system-type 'ms-dos)
+                        (eq system-type 'windows-nt))
+                    (make-temp-name
+                     (concat (file-name-as-directory
+                              (temp-directory))
+                              "em")))
+                    (t
+                    (make-temp-name
+                     (concat (file-name-as-directory
+                              (temp-directory))
+                             "emacs"))))))
+    (unwind-protect
+       (let (cs-r cs-w)
+         (let (ret)
+           (catch 'found
+             (let ((alist process-coding-system-alist)
+                   (case-fold-search (eq system-type 'vax-vms)))
+               (while alist
+                 (if (string-match (car (car alist)) program)
+                     (throw 'found (setq ret (cdr (car alist)))))
+                 (setq alist (cdr alist))
+                 )))
+           (if (functionp ret)
+               (setq ret (funcall ret 'call-process-region program)))
+           (cond ((consp ret)
+                  (setq cs-r (car ret)
+                        cs-w (cdr ret)))
+                 ((find-coding-system ret)
+                  (setq cs-r ret
+                        cs-w ret))))
+         (let ((coding-system-for-read
+                (or coding-system-for-read cs-r))
+               (coding-system-for-write
+                (or coding-system-for-write cs-w)))
+           (if (or (eq system-type 'ms-dos)
+                   (eq system-type 'windows-nt))
+               (let ((buffer-file-type binary-process-output))
+                 (write-region start end temp nil 'silent))
+             (write-region start end temp nil 'silent))
+           (if deletep (delete-region start end))
+           (apply #'call-process program temp buffer displayp args)))
+      (condition-case ()
+          (delete-file temp)
+        (file-error nil)))))
+
+(defun start-process (name buffer program &rest program-args)
+  "Start a program in a subprocess.  Return the process object for it.
+Args are NAME BUFFER PROGRAM &rest PROGRAM-ARGS
+NAME is name for process.  It is modified if necessary to make it unique.
+BUFFER is the buffer or (buffer-name) to associate with the process.
+ Process output goes at end of that buffer, unless you specify
+ an output stream or filter function to handle the output.
+ BUFFER may be also nil, meaning that this process is not associated
+ with any buffer
+Third arg is program file name.  It is searched for as in the shell.
+Remaining arguments are strings to give program as arguments.
+INCODE and OUTCODE specify the coding-system objects used in input/output
+ from/to the process."
+  (let (cs-r cs-w)
+    (let (ret)
+      (catch 'found
+       (let ((alist process-coding-system-alist)
+             (case-fold-search (eq system-type 'vax-vms)))
+         (while alist
+           (if (string-match (car (car alist)) program)
+               (throw 'found (setq ret (cdr (car alist)))))
+           (setq alist (cdr alist))
+           )))
+      (if (functionp ret)
+         (setq ret (funcall ret 'start-process program)))
+      (cond ((consp ret)
+            (setq cs-r (car ret)
+                  cs-w (cdr ret)))
+           ((find-coding-system ret)
+            (setq cs-r ret
+                  cs-w ret))))
+    (let ((coding-system-for-read
+          (or coding-system-for-read cs-r 'undecided))
+         (coding-system-for-write
+          (or coding-system-for-write cs-w)))
+      (apply 'start-process-internal name buffer program program-args)
+      )))
+
+(defvar network-coding-system-alist nil
+  "Alist to decide a coding system to use for a network I/O operation.
+The format is ((PATTERN . VAL) ...),
+where PATTERN is a regular expression matching a network service name
+or is a port number to connect to,
+VAL is a coding system, a cons of coding systems, or a function symbol.
+If VAL is a coding system, it is used for both decoding what received
+from the network stream and encoding what sent to the network stream.
+If VAL is a cons of coding systems, the car part is used for decoding,
+and the cdr part is used for encoding.
+If VAL is a function symbol, the function must return a coding system
+or a cons of coding systems which are used as above.
+
+See also the function `find-operation-coding-system'.")
+
+(defun open-network-stream (name buffer host service)
+  "Open a TCP connection for a service to a host.
+Returns a subprocess-object to represent the connection.
+Input and output work as for subprocesses; `delete-process' closes it.
+Args are NAME BUFFER HOST SERVICE.
+NAME is name for process.  It is modified if necessary to make it unique.
+BUFFER is the buffer (or buffer-name) to associate with the process.
+ Process output goes at end of that buffer, unless you specify
+ an output stream or filter function to handle the output.
+ BUFFER may be also nil, meaning that this process is not associated
+ with any buffer
+Third arg is name of the host to connect to, or its IP address.
+Fourth arg SERVICE is name of the service desired, or an integer
+ specifying a port number to connect to."
+  (let (cs-r cs-w)
+    (let (ret)
+      (catch 'found
+       (let ((alist network-coding-system-alist)
+             (case-fold-search (eq system-type 'vax-vms))
+             pattern)
+         (while alist
+           (setq pattern (car (car alist)))
+           (and
+            (cond ((numberp pattern)
+                   (and (numberp service)
+                        (eq pattern service)))
+                  ((stringp pattern)
+                   (or (and (stringp service)
+                            (string-match pattern service))
+                       (and (numberp service)
+                            (string-match pattern
+                                          (number-to-string service))))))
+            (throw 'found (setq ret (cdr (car alist)))))
+           (setq alist (cdr alist))
+           )))
+      (if (functionp ret)
+         (setq ret (funcall ret 'open-network-stream service)))
+      (cond ((consp ret)
+            (setq cs-r (car ret)
+                  cs-w (cdr ret)))
+           ((find-coding-system ret)
+            (setq cs-r ret
+                  cs-w ret))))
+    (let ((coding-system-for-read
+          (or coding-system-for-read cs-r))
+         (coding-system-for-write
+          (or coding-system-for-write cs-w)))
+      (open-network-stream-internal name buffer host service))))
+
+;;; mule-process.el ends here
diff --git a/lisp/coding.el b/lisp/coding.el
new file mode 100644 (file)
index 0000000..7a5856d
--- /dev/null
@@ -0,0 +1,214 @@
+;;; coding.el --- Coding-system functions for XEmacs.
+
+;; Copyright (C) 1995 Electrotechnical Laboratory, JAPAN.
+;; Licensed to the Free Software Foundation.
+;; Copyright (C) 1995 Amdahl Corporation.
+;; Copyright (C) 1995 Sun Microsystems.
+;; Copyright (C) 1997 MORIOKA Tomohiko
+
+;; This file is part of XEmacs.
+
+;; This file is very similar to mule-coding.el
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;;; split off of mule.el.
+
+;;; Code:
+
+(defalias 'check-coding-system 'get-coding-system)
+
+(defconst modeline-multibyte-status '("%C")
+  "Modeline control for showing multibyte extension status.")
+
+;; override the default value defined in loaddefs.el.
+(setq-default modeline-format
+  (cons (purecopy "")
+       (cons 'modeline-multibyte-status
+             (cdr modeline-format))))
+
+(defun modify-coding-system-alist (target-type regexp coding-system)
+  "Modify one of look up tables for finding a coding system on I/O operation.
+There are three of such tables, `file-coding-system-alist',
+`process-coding-system-alist', and `network-coding-system-alist'.
+
+TARGET-TYPE specifies which of them to modify.
+If it is `file', it affects `file-coding-system-alist' (which see).
+If it is `process', it affects `process-coding-system-alist' (which see).
+If it is `network', it affects `network-codign-system-alist' (which see).
+
+REGEXP is a regular expression matching a target of I/O operation.
+The target is a file name if TARGET-TYPE is `file', a program name if
+TARGET-TYPE is `process', or a network service name or a port number
+to connect to if TARGET-TYPE is `network'.
+
+CODING-SYSTEM is a coding system to perform code conversion on the I/O
+operation, or a cons cell (DECODING . ENCODING) specifying the coding systems
+for decoding and encoding respectively,
+or a function symbol which, when called, returns such a cons cell."
+  (or (memq target-type '(file process network))
+      (error "Invalid target type: %s" target-type))
+  (or (stringp regexp)
+      (and (eq target-type 'network) (integerp regexp))
+      (error "Invalid regular expression: %s" regexp))
+  (if (symbolp coding-system)
+      (if (not (fboundp coding-system))
+         (progn
+           (check-coding-system coding-system)
+           (setq coding-system (cons coding-system coding-system))))
+    (check-coding-system (car coding-system))
+    (check-coding-system (cdr coding-system)))
+  (cond ((eq target-type 'file)
+        (let ((slot (assoc regexp file-coding-system-alist)))
+          (if slot
+              (setcdr slot coding-system)
+            (setq file-coding-system-alist
+                  (cons (cons regexp coding-system)
+                        file-coding-system-alist)))))
+       ((eq target-type 'process)
+        (let ((slot (assoc regexp process-coding-system-alist)))
+          (if slot
+              (setcdr slot coding-system)
+            (setq process-coding-system-alist
+                  (cons (cons regexp coding-system)
+                        process-coding-system-alist)))))
+       (t
+        (let ((slot (assoc regexp network-coding-system-alist)))
+          (if slot
+              (setcdr slot coding-system)
+            (setq network-coding-system-alist
+                  (cons (cons regexp coding-system)
+                        network-coding-system-alist)))))))
+
+(defsubst keyboard-coding-system ()
+  "Return coding-system of what is sent from terminal keyboard."
+  keyboard-coding-system)
+
+(defun set-keyboard-coding-system (coding-system)
+  "Set the coding system used for TTY keyboard input. Currently broken."
+  (interactive "zkeyboard-coding-system: ")
+  (get-coding-system coding-system) ; correctness check
+  (setq keyboard-coding-system coding-system)
+  (redraw-modeline t))
+
+(defsubst terminal-coding-system ()
+  "Return coding-system of your terminal."
+  terminal-coding-system)
+
+(defun set-terminal-coding-system (coding-system)
+  "Set the coding system used for TTY display output. Currently broken."
+  (interactive "zterminal-coding-system: ")
+  (get-coding-system coding-system) ; correctness check
+  (setq terminal-coding-system coding-system)
+  (set-console-tty-coding-system (device-console) terminal-coding-system)
+  (redraw-modeline t))
+
+(defun set-pathname-coding-system (coding-system)
+  "Set the coding system used for file system path names."
+  (interactive "zPathname-coding-system: ")
+  (get-coding-system coding-system) ; correctness check
+  (setq file-name-coding-system coding-system))
+
+(defun what-coding-system (start end &optional arg)
+  "Show the encoding of text in the region.
+This function is meant to be called interactively;
+from a Lisp program, use `detect-coding-region' instead."
+  (interactive "r\nP")
+  (princ (detect-coding-region start end)))
+
+(defun decode-coding-string (str coding-system)
+  "Decode the string STR which is encoded in CODING-SYSTEM.
+Does not modify STR.  Returns the decoded string on successful conversion."
+  (with-string-as-buffer-contents
+   str (decode-coding-region (point-min) (point-max) coding-system)))
+
+(defun encode-coding-string (str coding-system)
+  "Encode the string STR using CODING-SYSTEM.
+Does not modify STR.  Returns the encoded string on successful conversion."
+  (with-string-as-buffer-contents
+   str (encode-coding-region (point-min) (point-max) coding-system)))
+
+\f
+;;;; Coding system accessors
+
+(defun coding-system-mnemonic (coding-system)
+  "Return the 'mnemonic property of CODING-SYSTEM."
+  (coding-system-property coding-system 'mnemonic))
+
+(defalias 'coding-system-docstring 'coding-system-doc-string)
+
+(defun coding-system-eol-type (coding-system)
+  "Return the 'eol-type property of CODING-SYSTEM."
+  (coding-system-property coding-system 'eol-type))
+
+(defun coding-system-eol-lf (coding-system)
+  "Return the 'eol-lf property of CODING-SYSTEM."
+  (coding-system-property coding-system 'eol-lf))
+
+(defun coding-system-eol-crlf (coding-system)
+  "Return the 'eol-crlf property of CODING-SYSTEM."
+  (coding-system-property coding-system 'eol-crlf))
+
+(defun coding-system-eol-cr (coding-system)
+  "Return the 'eol-cr property of CODING-SYSTEM."
+  (coding-system-property coding-system 'eol-cr))
+
+(defun coding-system-post-read-conversion (coding-system)
+  "Return the 'post-read-conversion property of CODING-SYSTEM."
+  (coding-system-property coding-system 'post-read-conversion))
+
+(defun coding-system-pre-write-conversion (coding-system)
+  "Return the 'pre-write-conversion property of CODING-SYSTEM."
+  (coding-system-property coding-system 'pre-write-conversion))
+
+(defun coding-system-base (coding-system)
+  "Return the base coding system of CODING-SYSTEM."
+  (if (not (coding-system-eol-type coding-system))
+      coding-system
+    (find-coding-system 
+     (intern
+      (substring 
+       (symbol-name (coding-system-name coding-system))
+       0
+       (string-match "-unix$\\|-dos$\\|-mac$"
+                    (symbol-name (coding-system-name coding-system))))))))
+\f
+;;;; Definitions of predefined coding systems
+
+(make-coding-system
+ 'undecided 'undecided
+ "Automatic conversion."
+ '(mnemonic "Auto"))
+
+;; these are so that gnus and friends work when not mule
+(or (featurep 'mule)
+    (progn
+      (copy-coding-system 'undecided 'iso-8859-1)
+      (copy-coding-system 'undecided 'iso-8859-2)))
+
+;; compatibility for old XEmacsen (don't use it)
+(copy-coding-system 'undecided 'automatic-conversion)
+
+(copy-coding-system 'no-conversion 'raw-text)
+
+(make-compatible-variable 'enable-multibyte-characters "Unimplemented")
+
+(define-obsolete-variable-alias
+  'pathname-coding-system 'file-name-coding-system)
+
+;;; mule-coding.el ends here
diff --git a/lisp/config.el b/lisp/config.el
new file mode 100644 (file)
index 0000000..67d8f8c
--- /dev/null
@@ -0,0 +1,70 @@
+;;; config.el --- access configuration parameters
+
+;; Copyright (C) 1997 Sun Microsystems, Inc.
+
+;; Author:   Martin Buchholz
+;; Keywords: configure
+
+;; 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; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: not in FSF.
+
+;;; Commentary:
+
+;;; Code:
+
+\f
+(defvar config-value-file (expand-file-name "config.values" exec-directory)
+  "File containing configuration parameters and their values.")
+
+(defvar config-value-hash-table nil
+  "Hashtable to store configuration parameters and their values.")
+
+;;;###autoload
+(defun config-value-hash-table ()
+  "Return hashtable of configuration parameters and their values."
+  (when (null config-value-hash-table)
+    (setq config-value-hash-table (make-hashtable 300))
+    (save-excursion
+      (let ((buf (get-buffer-create " *Config*")))
+       (set-buffer buf)
+       (erase-buffer)
+       (insert-file-contents config-value-file)
+       (goto-char (point-min))
+       (condition-case nil
+           (while t
+             (let* ((key (read buf))
+                    (value (read buf))
+                    (prev (gethash key config-value-hash-table)))
+               (cond ((null prev)
+                      (puthash key value config-value-hash-table))
+                     ((atom prev)
+                      (puthash key (list prev value) config-value-hash-table))
+                     (t
+                      (nconc prev (list value))))))
+         (end-of-file nil)))
+      (kill-buffer " *Config*")))
+  config-value-hash-table)
+
+;;;###autoload
+(defun config-value (config-symbol)
+  "Return the value of the configuration parameter CONFIG_SYMBOL."
+  (gethash config-symbol (config-value-hash-table)))
+
+(provide 'config)
+;;; config.el ends here
diff --git a/lisp/console.el b/lisp/console.el
new file mode 100644 (file)
index 0000000..0642031
--- /dev/null
@@ -0,0 +1,49 @@
+;;; console.el --- miscellaneous console functions not written in C
+
+;; Copyright (C) 1994-5, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1996 Ben Wing
+
+;; Maintainer: XEmacs Development Team
+;; Keywords: internal, dumped
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not in FSF.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;;; Code:
+
+(defun quit-char (&optional console)
+  "Return the character that causes a QUIT to happen.
+This is normally C-g.  Optional arg CONSOLE specifies the console
+that the information is returned for; nil means the current console."
+  (nth 3 (current-input-mode console)))
+
+(defun resume-pid-console (pid)
+  "Resume the consoles with a controlling process of PID."
+  (mapc (lambda (c) 
+         (if (and (eq (console-type c) 'tty)
+                  (eql pid (console-tty-controlling-process c)))
+             (resume-console c)))
+       (console-list))
+  nil)
+
+;;; console.el ends here
diff --git a/lisp/cus-dep.el b/lisp/cus-dep.el
new file mode 100644 (file)
index 0000000..81cb424
--- /dev/null
@@ -0,0 +1,180 @@
+;;; cus-dep.el --- Find customization dependencies.
+;;
+;; Copyright (C) 1997 Free Software Foundation, Inc.
+;;
+;; Author: Per Abrahamsen <abraham@dina.kvl.dk>, then
+;;         Richard Stallman <rms@gnu.ai.mit.edu>, then
+;;         Hrvoje Niksic <hniksic@srce.hr>       (rewritten for XEmacs)
+;; Maintainer: Hrvoje Niksic <hniksic@srce.hr>
+;; Keywords: internal
+
+;; 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; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not synched with FSF.
+
+\f
+;;; Commentary:
+
+;; This file generates the custom-load files, loaded by cus-load.el.
+;; The only entry point is `Custom-make-dependencies'.
+
+;; It works by scanning all the `.el' files in a directory, and
+;; evaluates any `defcustom', `defgroup', or `defface' expression that
+;; it finds.  The symbol changed by this expression is stored to a
+;; hash table as the hash key, file name being the value.
+
+;; After all the files have been examined, custom-loads.el is
+;; generated by mapping all the atoms, and seeing if any of them
+;; contains a `custom-group' property.  This property is a list whose
+;; each element's car is the "child" group symbol.  If that property
+;; is in the hash-table, the file name will be looked up from the
+;; hash-table, and added to cusload-file.  Because the hash-table is
+;; cleared whenever we process a new directory, we cannot get confused
+;; by custom-loads from another directory, or from a previous
+;; installation.  This is also why it is perfectly safe to have old
+;; custom-loads around, and have them loaded by `cus-load.el' (as
+;; invoked by `cus-edit.el').
+
+;; A trivial, but useful optimization is that if cusload-file exists,
+;; and no .el files in the directory are newer than cusload-file, it
+;; will not be generated.  This means that the directories where
+;; nothing has changed will be skipped.
+
+;; The `custom-add-loads' function, used by files generated by
+;; `Custom-make-dependencies', updates the symbol's `custom-loads'
+;; property (a list of strings) with a new list of strings,
+;; eliminating the duplicates.  Additionally, it adds the symbol to
+;; `custom-group-hash-table'.  It is defined in `cus-load.el'.
+
+;; Example:
+
+;; (custom-add-loads 'foo 'custom-loads '("bar" "baz"))
+;; (get 'foo 'custom-loads)
+;;   => ("bar" "baz")
+;;
+;; (custom-add-loads 'foo 'custom-loads '("hmph" "baz" "quz"))
+;; (get 'foo 'custom-loads)
+;;   => ("bar" "baz" "hmph" "qux")
+
+;; Obviously, this allows correct incremental loading of custom-load
+;; files.  This is not necessary under FSF (they simply use `put'),
+;; since they have only one file with custom dependencies.  With the
+;; advent of packages, we cannot afford the same luxury.
+
+\f
+;;; Code:
+
+(require 'cl)
+(require 'widget)
+(require 'cus-face)
+
+;; Don't change this, unless you plan to change the code in
+;; cus-start.el, too.
+(defconst cusload-base-file "custom-load.el")
+
+;; Be very careful when changing this function.  It looks easy to
+;; understand, but is in fact very easy to break.  Be sure to read and
+;; understand the commentary above!
+
+;;;###autoload
+(defun Custom-make-dependencies (&optional subdirs)
+  "Extract custom dependencies from .el files in SUBDIRS.
+SUBDIRS is a list of directories.  If it is nil, the command-line
+arguments are used.  If it is a string, only that directory is
+processed.  This function is especially useful in batch mode.
+
+Batch usage: xemacs -batch -l cus-dep.el -f Custom-make-dependencies DIRS"
+  (interactive "DDirectory: ")
+  (and (stringp subdirs)
+       (setq subdirs (list subdirs)))
+  (or subdirs
+      ;; Usurp the command-line-args
+      (setq subdirs command-line-args-left
+           command-line-args-left nil))
+  (setq subdirs (mapcar #'expand-file-name subdirs))
+  (with-temp-buffer
+    (let ((enable-local-eval nil)
+         (hash (make-hash-table :test 'eq)))
+      (dolist (dir subdirs)
+       (princ (format "Processing %s\n" dir))
+       (let ((cusload-file (expand-file-name cusload-base-file dir))
+             (files (directory-files dir t "\\`[^=].*\\.el\\'")))
+         ;; A trivial optimization: if no file in the directory is
+         ;; newer than custom-load.el, no need to do anything!
+         (if (and (file-exists-p cusload-file)
+                  (dolist (file files t)
+                    (when (file-newer-than-file-p file cusload-file)
+                      (return nil))))
+             (princ "(No changes need to be written)\n")
+           ;; Process directory
+           (dolist (file files)
+             (when (file-exists-p file)
+               (erase-buffer)
+               (insert-file-contents file)
+               (goto-char (point-min))
+               (let ((name (file-name-sans-extension
+                            (file-name-nondirectory file))))
+                 ;; Search for defcustom/defface/defgroup
+                 ;; expressions, and evaluate them.
+                 (ignore-errors
+                   (while (re-search-forward
+                           "^(defcustom\\|^(defface\\|^(defgroup"
+                           nil t)
+                     (beginning-of-line)
+                     (let ((expr (read (current-buffer))))
+                       (eval expr)
+                       ;; Hash the file of the affected symbol.
+                       (setf (gethash (nth 1 expr) hash) name)))))))
+           (cond
+            ((zerop (hash-table-count hash))
+             (princ "(No customization dependencies")
+             (when (file-exists-p cusload-file)
+               (princ (format ", deleting %s" cusload-file))
+               (delete-file cusload-file))
+             (princ ")\n"))
+            (t
+             (princ (format "Generating %s...\n" cusload-base-file))
+             (with-temp-file cusload-file
+               (insert ";;; " cusload-base-file
+                       " --- automatically extracted custom dependencies\n"
+                       "\n;;; Code:\n\n")
+               (mapatoms
+                (lambda (sym)
+                  (let ((members (get sym 'custom-group))
+                        item where found)
+                    (when members
+                      (while members
+                        (setq item (car (car members))
+                              members (cdr members)
+                              where (gethash item hash))
+                        (unless (or (null where)
+                                    (member where found))
+                          (if found
+                              (insert " ")
+                            (insert "(custom-add-loads '"
+                                    (symbol-name sym) " '("))
+                          (prin1 where (current-buffer))
+                          (push where found)))
+                      (when found
+                        (insert "))\n"))))))
+               (insert "\n;;; custom-load.el ends here\n"))
+             (clrhash hash)))))))))
+
+(provide 'cus-dep)
+
+;;; cus-dep.el ends here
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el
new file mode 100644 (file)
index 0000000..630c5dc
--- /dev/null
@@ -0,0 +1,3268 @@
+;;; cus-edit.el --- Tools for customizating Emacs and Lisp packages.
+;;
+;; Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+;;
+;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
+;; Maintainer: Hrvoje Niksic <hniksic@srce.hr>
+;; Keywords: help, faces
+;; Version: 1.9960-x
+;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
+
+;; 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; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+;;
+;; This file implements the code to create and edit customize buffers.
+;;
+;; See `custom.el'.
+
+;; No commands should have names starting with `custom-' because
+;; that interferes with completion.  Use `customize-' for commands
+;; that the user will run with M-x, and `Custom-' for interactive commands.
+
+;; NOTE: In many places within this file we use `mapatoms', which is
+;; very slow in an average XEmacs because of the large number of
+;; symbols requiring a large number of funcalls -- XEmacs with Gnus
+;; can grow to some 17000 symbols without ever doing anything fancy.
+;; It would probably pay off to make a hashtable of symbols known to
+;; Custom, similar to custom-group-hash-table.
+
+;; This is not top priority, because none of the functions that do
+;; mapatoms are speed-critical (the one that was now uses
+;; custom-group-hash-table), but it would be nice to have.
+
+\f
+;;; Code:
+
+(require 'cus-face)
+(require 'wid-edit)
+(require 'easymenu)
+
+(require 'cus-load)
+(require 'cus-start)
+
+;; Huh?  This looks dirty!
+(put 'custom-define-hook 'custom-type 'hook)
+(put 'custom-define-hook 'standard-value '(nil))
+(custom-add-to-group 'customize 'custom-define-hook 'custom-variable)
+
+;;; Customization Groups.
+
+(defgroup emacs nil
+  "Customization of the One True Editor."
+  :link '(custom-manual "(XEmacs)Top"))
+
+;; Most of these groups are stolen from `finder.el',
+(defgroup editing nil
+  "Basic text editing facilities."
+  :group 'emacs)
+
+(defgroup matching nil
+  "Various sorts of searching and matching."
+  :group 'editing)
+
+(defgroup emulations nil
+  "Emulations of other editors."
+  :group 'editing)
+
+(defgroup outlines nil
+  "Support for hierarchical outlining."
+  :group 'editing)
+
+(defgroup external nil
+  "Interfacing to external utilities."
+  :group 'emacs)
+
+(defgroup bib nil
+  "Code related to the `bib' bibliography processor."
+  :tag "Bibliography"
+  :group 'external)
+
+(defgroup programming nil
+  "Support for programming in other languages."
+  :group 'emacs)
+
+(defgroup languages nil
+  "Specialized modes for editing programming languages."
+  :group 'programming)
+
+;; #### This should be in cc-vars.el
+(defgroup c nil
+  "Support for the C language and related languages."
+  :group 'languages)
+
+(defgroup tools nil
+  "Programming tools."
+  :group 'programming)
+
+(defgroup oop nil
+  "Support for object-oriented programming."
+  :group 'programming)
+
+(defgroup applications nil
+  "Applications written in Emacs."
+  :group 'emacs)
+
+;; #### This should be in calendar.el
+(defgroup calendar nil
+  "Calendar and time management support."
+  :group 'applications)
+
+(defgroup mail nil
+  "Modes for electronic-mail handling."
+  :group 'applications)
+
+(defgroup news nil
+  "Support for netnews reading and posting."
+  :group 'applications)
+
+(defgroup games nil
+  "Games, jokes and amusements."
+  :group 'applications)
+
+(defgroup development nil
+  "Support for further development of Emacs."
+  :group 'emacs)
+
+(defgroup docs nil
+  "Support for Emacs documentation."
+  :group 'development)
+
+(defgroup extensions nil
+  "Emacs Lisp language extensions."
+  :group 'development)
+
+(defgroup internal nil
+  "Code for Emacs internals, build process, defaults."
+  :group 'development)
+
+(defgroup maint nil
+  "Maintenance aids for the Emacs development group."
+  :tag "Maintenance"
+  :group 'development)
+
+(defgroup environment nil
+  "Fitting Emacs with its environment."
+  :group 'emacs)
+
+(defgroup comm nil
+  "Communications, networking, remote access to files."
+  :tag "Communication"
+  :group 'environment)
+
+(defgroup hardware nil
+  "Support for interfacing with exotic hardware."
+  :group 'environment)
+
+(defgroup terminals nil
+  "Support for terminal types."
+  :group 'environment)
+
+(defgroup unix nil
+  "Front-ends/assistants for, or emulators of, UNIX features."
+  :group 'environment)
+
+(defgroup i18n nil
+  "Internationalization and alternate character-set support."
+  :group 'environment
+  :group 'editing)
+
+(defgroup data nil
+  "Support editing files of data."
+  :group 'emacs)
+
+(defgroup wp nil
+  "Word processing."
+  :group 'emacs)
+
+(defgroup tex nil
+  "Code related to the TeX formatter."
+  :group 'wp)
+
+(defgroup hypermedia nil
+  "Support for links between text or other media types."
+  :group 'emacs)
+
+(defgroup local nil
+  "Code local to your site."
+  :group 'emacs)
+
+(defgroup customize '((widgets custom-group))
+  "Customization of the Customization support."
+  :link '(custom-manual "(custom)Top")
+  :link '(url-link :tag "Development Page"
+                  "http://www.dina.kvl.dk/~abraham/custom/")
+  :prefix "custom-"
+  :group 'help)
+
+(defgroup custom-faces nil
+  "Faces used by customize."
+  :group 'customize
+  :group 'faces)
+
+(defgroup custom-browse nil
+  "Control customize browser."
+  :prefix "custom-"
+  :group 'customize)
+
+(defgroup custom-buffer nil
+  "Control customize buffers."
+  :prefix "custom-"
+  :group 'customize)
+
+(defgroup custom-menu nil
+  "Control customize menus."
+  :prefix "custom-"
+  :group 'customize)
+
+(defgroup alloc nil
+  "Storage allocation and gc for GNU Emacs Lisp interpreter."
+  :tag "Storage Allocation"
+  :group 'internal)
+
+(defgroup undo nil
+  "Undoing changes in buffers."
+  :group 'editing)
+
+(defgroup editing-basics nil
+  "Most basic editing facilities."
+  :group 'editing)
+
+(defgroup display nil
+  "How characters are displayed in buffers."
+  :group 'environment)
+
+(defgroup installation nil
+  "The Emacs installation."
+  :group 'environment)
+
+(defgroup limits nil
+  "Internal Emacs limits."
+  :group 'internal)
+
+(defgroup debug nil
+  "Debugging Emacs itself."
+  :group 'development)
+
+(defgroup mule nil
+  "Mule XEmacs internationalization."
+  :group 'i18n)
+
+\f
+;;; Utilities.
+
+(defun custom-quote (sexp)
+  "Quote SEXP iff it is not self quoting."
+  (if (or (memq sexp '(t nil))
+         (keywordp sexp)
+         (eq (car-safe sexp) 'lambda)
+         (stringp sexp)
+         (numberp sexp)
+         (characterp sexp)
+         (vectorp sexp)
+         (bit-vector-p sexp))
+      sexp
+    (list 'quote sexp)))
+
+(defun custom-split-regexp-maybe (regexp)
+  "If REGEXP is a string, split it to a list at `\\|'.
+You can get the original back with from the result with:
+  (mapconcat 'identity result \"\\|\")
+
+IF REGEXP is not a string, return it unchanged."
+  (if (stringp regexp)
+      (split-string regexp "\\\\|")
+    regexp))
+
+(defun custom-variable-prompt ()
+  ;; Code stolen from `help.el'.
+  "Prompt for a variable, defaulting to the variable at point.
+Return a list suitable for use in `interactive'."
+   (let ((v (variable-at-point))
+        (enable-recursive-minibuffers t)
+        val)
+     (setq val (completing-read
+               (if (symbolp v)
+                   (format "Customize variable: (default %s) " v)
+                 "Customize variable: ")
+               obarray (lambda (symbol)
+                         (and (boundp symbol)
+                              (or (get symbol 'custom-type)
+                                  (user-variable-p symbol)))) t))
+     (list (if (equal val "")
+              (if (symbolp v) v nil)
+            (intern val)))))
+
+;; Here we take not only the actual groups, but the loads, too.
+(defun custom-group-prompt (prompt)
+  "Read group from minibuffer."
+  (let ((completion-ignore-case t))
+    (list (completing-read
+          prompt obarray
+          (lambda (symbol)
+            (or (get symbol 'custom-group)
+                (get symbol 'custom-loads)))
+          t))))
+
+(defun custom-menu-filter (menu widget)
+  "Convert MENU to the form used by `widget-choose'.
+MENU should be in the same format as `custom-variable-menu'.
+WIDGET is the widget to apply the filter entries of MENU on."
+  (let ((result nil)
+       current name action filter)
+    (while menu
+      (setq current (car menu)
+           name (nth 0 current)
+           action (nth 1 current)
+           filter (nth 2 current)
+           menu (cdr menu))
+      (if (or (null filter) (funcall filter widget))
+         (push (cons name action) result)
+       (push name result)))
+    (nreverse result)))
+
+\f
+;;; Unlispify.
+
+(defvar custom-prefix-list nil
+  "List of prefixes that should be ignored by `custom-unlispify'")
+
+(defcustom custom-unlispify-menu-entries t
+  "Display menu entries as words instead of symbols if non nil."
+  :group 'custom-menu
+  :type 'boolean)
+
+(defcustom custom-unlispify-remove-prefixes t
+  "Non-nil means remove group prefixes from option names in buffers and menus.
+This only has an effect when `custom-unlispify-tag-names' or
+`custom-unlispify-menu-entries' is on."
+  :group 'custom-menu
+  :type 'boolean)
+
+(defun custom-unlispify-menu-entry (symbol &optional no-suffix)
+  "Convert symbol into a menu entry."
+  (cond ((not custom-unlispify-menu-entries)
+        (symbol-name symbol))
+       ((get symbol 'custom-tag)
+        (if no-suffix
+            (get symbol 'custom-tag)
+          (concat (get symbol 'custom-tag) "...")))
+       (t
+        (with-current-buffer (get-buffer-create " *Custom-Work*")
+          (erase-buffer)
+          (princ symbol (current-buffer))
+          (goto-char (point-min))
+          (when (and (eq (get symbol 'custom-type) 'boolean)
+                     (re-search-forward "-p\\'" nil t))
+            (replace-match "" t t)
+            (goto-char (point-min)))
+          (when custom-unlispify-remove-prefixes
+            (let ((prefixes custom-prefix-list)
+                  prefix)
+              (while prefixes
+                (setq prefix (car prefixes))
+                (if (search-forward prefix (+ (point) (length prefix)) t)
+                    (progn
+                      (setq prefixes nil)
+                      (delete-region (point-min) (point)))
+                  (setq prefixes (cdr prefixes))))))
+          (subst-char-in-region (point-min) (point-max) ?- ?\  t)
+          (capitalize-region (point-min) (point-max))
+          (unless no-suffix
+            (goto-char (point-max))
+            (insert "..."))
+          (buffer-string)))))
+
+(defcustom custom-unlispify-tag-names t
+  "Display tag names as words instead of symbols if non nil."
+  :group 'custom-buffer
+  :type 'boolean)
+
+(defun custom-unlispify-tag-name (symbol)
+  "Convert symbol into a menu entry."
+  (let ((custom-unlispify-menu-entries custom-unlispify-tag-names))
+    (custom-unlispify-menu-entry symbol t)))
+
+(defun custom-prefix-add (symbol prefixes)
+  ;; Addd SYMBOL to list of ignored PREFIXES.
+  (cons (or (get symbol 'custom-prefix)
+           (concat (symbol-name symbol) "-"))
+       prefixes))
+
+\f
+;;; Guess.
+
+(defcustom custom-guess-name-alist
+  '(("-p\\'" boolean)
+    ("-hooks?\\'" hook)
+    ("-face\\'" face)
+    ("-file\\'" file)
+    ("-function\\'" function)
+    ("-functions\\'" (repeat function))
+    ("-list\\'" (repeat sexp))
+    ("-alist\\'" (repeat (cons sexp sexp))))
+  "Alist of (MATCH TYPE).
+
+MATCH should be a regexp matching the name of a symbol, and TYPE should
+be a widget suitable for editing the value of that symbol.  The TYPE
+of the first entry where MATCH matches the name of the symbol will be
+used.
+
+This is used for guessing the type of variables not declared with
+customize."
+  :type '(repeat (group (regexp :tag "Match") (sexp :tag "Type")))
+  :group 'customize)
+
+(defcustom custom-guess-doc-alist
+  '(("\\`\\*?Non-nil " boolean))
+  "Alist of (MATCH TYPE).
+
+MATCH should be a regexp matching a documentation string, and TYPE
+should be a widget suitable for editing the value of a variable with
+that documentation string.  The TYPE of the first entry where MATCH
+matches the name of the symbol will be used.
+
+This is used for guessing the type of variables not declared with
+customize."
+  :type '(repeat (group (regexp :tag "Match") (sexp :tag "Type")))
+  :group 'customize)
+
+(defun custom-guess-type (symbol)
+  "Guess a widget suitable for editing the value of SYMBOL.
+This is done by matching SYMBOL with `custom-guess-name-alist' and
+if that fails, the doc string with `custom-guess-doc-alist'."
+  (let ((name (symbol-name symbol))
+       (names custom-guess-name-alist)
+       current found)
+    (while names
+      (setq current (car names)
+           names (cdr names))
+      (when (string-match (nth 0 current) name)
+       (setq found (nth 1 current)
+             names nil)))
+    (unless found
+      (let ((doc (documentation-property symbol 'variable-documentation))
+           (docs custom-guess-doc-alist))
+       (when doc
+         (while docs
+           (setq current (car docs)
+                 docs (cdr docs))
+           (when (string-match (nth 0 current) doc)
+             (setq found (nth 1 current)
+                   docs nil))))))
+    found))
+
+\f
+;;; Sorting.
+
+(defcustom custom-browse-sort-alphabetically nil
+  "If non-nil, sort members of each customization group alphabetically."
+  :type 'boolean
+  :group 'custom-browse)
+
+(defcustom custom-browse-order-groups nil
+  "If non-nil, order group members within each customization group.
+If `first', order groups before non-groups.
+If `last', order groups after non-groups."
+  :type '(choice (const first)
+                (const last)
+                (const :tag "none" nil))
+  :group 'custom-browse)
+
+(defcustom custom-browse-only-groups nil
+  "If non-nil, show group members only within each customization group."
+  :type 'boolean
+  :group 'custom-browse)
+
+(defcustom custom-buffer-sort-alphabetically nil
+  "If non-nil, sort members of each customization group alphabetically."
+  :type 'boolean
+  :group 'custom-buffer)
+
+(defcustom custom-buffer-order-groups 'last
+  "If non-nil, order group members within each customization group.
+If `first', order groups before non-groups.
+If `last', order groups after non-groups."
+  :type '(choice (const first)
+                (const last)
+                (const :tag "none" nil))
+  :group 'custom-buffer)
+
+(defcustom custom-menu-sort-alphabetically nil
+  "If non-nil, sort members of each customization group alphabetically."
+  :type 'boolean
+  :group 'custom-menu)
+
+(defcustom custom-menu-order-groups 'first
+  "If non-nil, order group members within each customization group.
+If `first', order groups before non-groups.
+If `last', order groups after non-groups."
+  :type '(choice (const first)
+                (const last)
+                (const :tag "none" nil))
+  :group 'custom-menu)
+
+(defun custom-sort-items (items sort-alphabetically order-groups)
+  "Return a sorted copy of ITEMS.
+ITEMS should be a `custom-group' property.
+If SORT-ALPHABETICALLY non-nil, sort alphabetically.
+If ORDER-GROUPS is `first' order groups before non-groups, if `last' order
+groups after non-groups, if nil do not order groups at all."
+  (sort (copy-sequence items)
+   (lambda (a b)
+     (let ((typea (nth 1 a)) (typeb (nth 1 b))
+          (namea (symbol-name (nth 0 a))) (nameb (symbol-name (nth 0 b))))
+       (cond ((not order-groups)
+             ;; Since we don't care about A and B order, maybe sort.
+             (when sort-alphabetically
+               (string-lessp namea nameb)))
+            ((eq typea 'custom-group)
+             ;; If B is also a group, maybe sort.  Otherwise, order A and B.
+             (if (eq typeb 'custom-group)
+                 (when sort-alphabetically
+                   (string-lessp namea nameb))
+               (eq order-groups 'first)))
+            ((eq typeb 'custom-group)
+             ;; Since A cannot be a group, order A and B.
+             (eq order-groups 'last))
+            (sort-alphabetically
+             ;; Since A and B cannot be groups, sort.
+             (string-lessp namea nameb)))))))
+
+\f
+;;; Custom Mode Commands.
+
+(defvar custom-options nil
+  "Customization widgets in the current buffer.")
+
+(defun Custom-set ()
+  "Set changes in all modified options."
+  (interactive)
+  (let ((children custom-options))
+    (mapc (lambda (child)
+           (when (eq (widget-get child :custom-state) 'modified)
+             (widget-apply child :custom-set)))
+         children)))
+
+(defun Custom-save ()
+  "Set all modified group members and save them."
+  (interactive)
+  (let ((children custom-options))
+    (mapc (lambda (child)
+           (when (memq (widget-get child :custom-state) '(modified set))
+             (widget-apply child :custom-save)))
+         children))
+  (custom-save-all))
+
+(defvar custom-reset-menu
+  '(("Current" . Custom-reset-current)
+    ("Saved" . Custom-reset-saved)
+    ("Standard Settings" . Custom-reset-standard))
+  "Alist of actions for the `Reset' button.
+The key is a string containing the name of the action, the value is a
+lisp function taking the widget as an element which will be called
+when the action is chosen.")
+
+(defun custom-reset (event)
+  "Select item from reset menu."
+  (let* ((completion-ignore-case t)
+        (answer (widget-choose "Reset to"
+                               custom-reset-menu
+                               event)))
+    (if answer
+       (funcall answer))))
+
+(defun Custom-reset-current (&rest ignore)
+  "Reset all modified group members to their current value."
+  (interactive)
+  (let ((children custom-options))
+    (mapc (lambda (child)
+           (when (eq (widget-get child :custom-state) 'modified)
+             (widget-apply child :custom-reset-current)))
+         children)))
+
+(defun Custom-reset-saved (&rest ignore)
+  "Reset all modified or set group members to their saved value."
+  (interactive)
+  (let ((children custom-options))
+    (mapc (lambda (child)
+           (when (eq (widget-get child :custom-state) 'modified)
+             (widget-apply child :custom-reset-saved)))
+         children)))
+
+(defun Custom-reset-standard (&rest ignore)
+  "Reset all modified, set, or saved group members to their standard settings."
+  (interactive)
+  (let ((children custom-options))
+    (mapc (lambda (child)
+           (when (eq (widget-get child :custom-state) 'modified)
+             (widget-apply child :custom-reset-standard)))
+         children)))
+
+\f
+;;; The Customize Commands
+
+(defun custom-prompt-variable (prompt-var prompt-val)
+  "Prompt for a variable and a value and return them as a list.
+PROMPT-VAR is the prompt for the variable, and PROMPT-VAL is the
+prompt for the value.  The %s escape in PROMPT-VAL is replaced with
+the name of the variable.
+
+If the variable has a `variable-interactive' property, that is used as if
+it were the arg to `interactive' (which see) to interactively read the value.
+
+If the variable has a `custom-type' property, it must be a widget and the
+`:prompt-value' property of that widget will be used for reading the value."
+  (let* ((var (read-variable prompt-var))
+        (minibuffer-help-form '(describe-variable var)))
+    (list var
+         (let ((prop (get var 'variable-interactive))
+               (type (get var 'custom-type))
+               (prompt (format prompt-val var)))
+           (unless (listp type)
+             (setq type (list type)))
+           (cond (prop
+                  ;; Use VAR's `variable-interactive' property
+                  ;; as an interactive spec for prompting.
+                  (call-interactively (list 'lambda '(arg)
+                                            (list 'interactive prop)
+                                            'arg)))
+                 (type
+                  (widget-prompt-value type
+                                       prompt
+                                       (if (boundp var)
+                                           (symbol-value var))
+                                       (not (boundp var))))
+                 (t
+                  (eval-minibuffer prompt)))))))
+
+;;;###autoload
+(defun customize-set-value (var val)
+  "Set VARIABLE to VALUE.  VALUE is a Lisp object.
+
+If VARIABLE has a `variable-interactive' property, that is used as if
+it were the arg to `interactive' (which see) to interactively read the value.
+
+If VARIABLE has a `custom-type' property, it must be a widget and the
+`:prompt-value' property of that widget will be used for reading the value."
+  (interactive (custom-prompt-variable "Set variable: "
+                                      "Set %s to value: "))
+
+  (set var val))
+
+;;;###autoload
+(defun customize-set-variable (var val)
+  "Set the default for VARIABLE to VALUE.  VALUE is a Lisp object.
+
+If VARIABLE has a `custom-set' property, that is used for setting
+VARIABLE, otherwise `set-default' is used.
+
+The `customized-value' property of the VARIABLE will be set to a list
+with a quoted VALUE as its sole list member.
+
+If VARIABLE has a `variable-interactive' property, that is used as if
+it were the arg to `interactive' (which see) to interactively read the value.
+
+If VARIABLE has a `custom-type' property, it must be a widget and the
+`:prompt-value' property of that widget will be used for reading the value. "
+  (interactive (custom-prompt-variable "Set variable: "
+                                      "Set customized value for %s to: "))
+  (funcall (or (get var 'custom-set) 'set-default) var val)
+  (put var 'customized-value (list (custom-quote val))))
+
+;;;###autoload
+(defun customize-save-variable (var val)
+  "Set the default for VARIABLE to VALUE, and save it for future sessions.
+If VARIABLE has a `custom-set' property, that is used for setting
+VARIABLE, otherwise `set-default' is used.
+
+The `customized-value' property of the VARIABLE will be set to a list
+with a quoted VALUE as its sole list member.
+
+If VARIABLE has a `variable-interactive' property, that is used as if
+it were the arg to `interactive' (which see) to interactively read the value.
+
+If VARIABLE has a `custom-type' property, it must be a widget and the
+`:prompt-value' property of that widget will be used for reading the value. "
+  (interactive (custom-prompt-variable "Set and ave variable: "
+                                      "Set and save value for %s as: "))
+  (funcall (or (get var 'custom-set) 'set-default) var val)
+  (put var 'saved-value (list (custom-quote val)))
+  (custom-save-all))
+
+;;;###autoload
+(defun customize (group)
+  "Select a customization buffer which you can use to set user options.
+User options are structured into \"groups\".
+The default group is `Emacs'."
+  (interactive (custom-group-prompt
+               "Customize group: (default emacs) "))
+  (when (stringp group)
+    (if (string-equal "" group)
+       (setq group 'emacs)
+      (setq group (intern group))))
+  (let ((name (format "*Customize Group: %s*"
+                     (custom-unlispify-tag-name group))))
+    (if (get-buffer name)
+       (switch-to-buffer name)
+      (custom-buffer-create (list (list group 'custom-group))
+                           name
+                           (concat " for group "
+                                   (custom-unlispify-tag-name group))))))
+
+;;;###autoload
+(defalias 'customize-group 'customize)
+
+;;;###autoload
+(defun customize-other-window (symbol)
+  "Customize SYMBOL, which must be a customization group."
+  (interactive (custom-group-prompt
+               "Customize group: (default emacs) "))
+  (when (stringp symbol)
+    (if (string-equal "" symbol)
+       (setq symbol 'emacs)
+      (setq symbol (intern symbol))))
+  (custom-buffer-create-other-window
+   (list (list symbol 'custom-group))
+   (format "*Customize Group: %s*" (custom-unlispify-tag-name symbol))))
+
+;;;###autoload
+(defalias 'customize-group-other-window 'customize-other-window)
+
+;;;###autoload
+(defalias 'customize-option 'customize-variable)
+
+;;;###autoload
+(defun customize-variable (symbol)
+  "Customize SYMBOL, which must be a user option variable."
+  (interactive (custom-variable-prompt))
+  (custom-buffer-create (list (list symbol 'custom-variable))
+                       (format "*Customize Variable: %s*"
+                               (custom-unlispify-tag-name symbol))))
+
+;;;###autoload
+(defun customize-changed-options (since-version)
+  "Customize all user option variables whose default values changed recently.
+This means, in other words, variables defined with a `:version' keyword."
+  (interactive "sCustomize options changed, since version (default all versions): ")
+  (if (equal since-version "")
+      (setq since-version nil))
+  (let ((found nil))
+    (mapatoms (lambda (symbol)
+               (and (boundp symbol)
+                    (let ((version (get symbol 'custom-version)))
+                      (and version
+                           (or (null since-version)
+                               (customize-version-lessp since-version version))))
+                    (push (list symbol 'custom-variable) found))))
+    (unless found
+      (error "No user options have changed defaults %s"
+            (if since-version
+                (format "since XEmacs %s" since-version)
+              "in recent Emacs versions")))
+    (custom-buffer-create (custom-sort-items found t nil)
+                         "*Customize Changed Options*")))
+
+(defun customize-version-lessp (version1 version2)
+  (let (major1 major2 minor1 minor2)
+    (string-match "\\([0-9]+\\)[.]\\([0-9]+\\)" version1)
+    (setq major1 (read (match-string 1 version1)))
+    (setq minor1 (read (match-string 2 version1)))
+    (string-match "\\([0-9]+\\)[.]\\([0-9]+\\)" version2)
+    (setq major2 (read (match-string 1 version2)))
+    (setq minor2 (read (match-string 2 version2)))
+    (or (< major1 major2)
+       (and (= major1 major2)
+            (< minor1 minor2)))))
+
+;;;###autoload
+(defalias 'customize-variable-other-window 'customize-option-other-window)
+
+;;;###autoload
+(defun customize-option-other-window (symbol)
+  "Customize SYMBOL, which must be a user option variable.
+Show the buffer in another window, but don't select it."
+  (interactive (custom-variable-prompt))
+  (custom-buffer-create-other-window
+   (list (list symbol 'custom-variable))
+   (format "*Customize Option: %s*" (custom-unlispify-tag-name symbol))))
+
+;;;###autoload
+(defun customize-face (&optional symbol)
+  "Customize SYMBOL, which should be a face name or nil.
+If SYMBOL is nil, customize all faces."
+  (interactive (list (completing-read "Customize face: (default all) "
+                                     obarray 'find-face)))
+  (if (or (null symbol) (and (stringp symbol) (zerop (length symbol))))
+      (custom-buffer-create (custom-sort-items
+                            (mapcar (lambda (symbol)
+                                      (list symbol 'custom-face))
+                                    (face-list))
+                            t nil)
+                           "*Customize Faces*")
+    (when (stringp symbol)
+      (setq symbol (intern symbol)))
+    (check-argument-type 'symbolp symbol)
+    (custom-buffer-create (list (list symbol 'custom-face))
+                         (format "*Customize Face: %s*"
+                                 (custom-unlispify-tag-name symbol)))))
+
+;;;###autoload
+(defun customize-face-other-window (&optional symbol)
+  "Show customization buffer for FACE in other window."
+  (interactive (list (completing-read "Customize face: "
+                                     obarray 'find-face)))
+  (if (or (null symbol) (and (stringp symbol) (zerop (length symbol))))
+      ()
+    (if (stringp symbol)
+       (setq symbol (intern symbol)))
+    (check-argument-type 'symbolp symbol)
+    (custom-buffer-create-other-window
+     (list (list symbol 'custom-face))
+     (format "*Customize Face: %s*" (custom-unlispify-tag-name symbol)))))
+
+;;;###autoload
+(defun customize-customized ()
+  "Customize all user options set since the last save in this session."
+  (interactive)
+  (let ((found nil))
+    (mapatoms (lambda (symbol)
+               (and (get symbol 'customized-face)
+                    (find-face symbol)
+                    (push (list symbol 'custom-face) found))
+               (and (get symbol 'customized-value)
+                    (boundp symbol)
+                    (push (list symbol 'custom-variable) found))))
+    (if (not found)
+       (error "No customized user options")
+      (custom-buffer-create (custom-sort-items found t nil)
+                           "*Customize Customized*"))))
+
+;;;###autoload
+(defun customize-saved ()
+  "Customize all already saved user options."
+  (interactive)
+  (let ((found nil))
+    (mapatoms (lambda (symbol)
+               (and (get symbol 'saved-face)
+                    (find-face symbol)
+                    (push (list symbol 'custom-face) found))
+               (and (get symbol 'saved-value)
+                    (boundp symbol)
+                    (push (list symbol 'custom-variable) found))))
+    (if (not found )
+       (error "No saved user options")
+      (custom-buffer-create (custom-sort-items found t nil)
+                           "*Customize Saved*"))))
+
+;;;###autoload
+(defun customize-apropos (regexp &optional all)
+  "Customize all user options matching REGEXP.
+If ALL is `options', include only options.
+If ALL is `faces', include only faces.
+If ALL is `groups', include only groups.
+If ALL is t (interactively, with prefix arg), include options which are not
+user-settable, as well as faces and groups."
+  (interactive "sCustomize regexp: \nP")
+  (let ((found nil))
+    (mapatoms (lambda (symbol)
+               (when (string-match regexp (symbol-name symbol))
+                 (when (and (not (memq all '(faces options)))
+                            (get symbol 'custom-group))
+                   (push (list symbol 'custom-group) found))
+                 (when (and (not (memq all '(options groups)))
+                            (find-face symbol))
+                   (push (list symbol 'custom-face) found))
+                 (when (and (not (memq all '(groups faces)))
+                            (boundp symbol)
+                            (or (get symbol 'saved-value)
+                                (get symbol 'standard-value)
+                                (if (memq all '(nil options))
+                                    (user-variable-p symbol)
+                                  (get symbol 'variable-documentation))))
+                   (push (list symbol 'custom-variable) found)))))
+    (if (not found)
+       (error "No matches")
+      (custom-buffer-create (custom-sort-items found t
+                                              custom-buffer-order-groups)
+                           "*Customize Apropos*"))))
+
+;;;###autoload
+(defun customize-apropos-options (regexp &optional arg)
+  "Customize all user options matching REGEXP.
+With prefix arg, include options which are not user-settable."
+  (interactive "sCustomize regexp: \nP")
+  (customize-apropos regexp (or arg 'options)))
+
+;;;###autoload
+(defun customize-apropos-faces (regexp)
+  "Customize all user faces matching REGEXP."
+  (interactive "sCustomize regexp: \n")
+  (customize-apropos regexp 'faces))
+
+;;;###autoload
+(defun customize-apropos-groups (regexp)
+  "Customize all user groups matching REGEXP."
+  (interactive "sCustomize regexp: \n")
+  (customize-apropos regexp 'groups))
+
+\f
+;;; Buffer.
+
+(defcustom custom-buffer-style 'links
+  "*Control the presentation style for customization buffers.
+The value should be a symbol, one of:
+
+brackets: groups nest within each other with big horizontal brackets.
+links: groups have links to subgroups."
+  :type '(radio (const :tag "brackets: Groups nest within each others" brackets)
+               (const :tag "links: Group have links to subgroups" links))
+  :group 'custom-buffer)
+
+(defcustom custom-buffer-done-function 'kill-buffer
+  "*Function to be used to remove the buffer when the user is done with it.
+Choices include `kill-buffer' (the default) and `bury-buffer'.
+The function will be called with one argument, the buffer to remove."
+  :type '(radio (function-item kill-buffer)
+               (function-item bury-buffer)
+               (function :tag "Other" nil))
+  :group 'custom-buffer)
+
+(defcustom custom-buffer-indent 3
+  "Number of spaces to indent nested groups."
+  :type 'integer
+  :group 'custom-buffer)
+
+;;;###autoload
+(defun custom-buffer-create (options &optional name description)
+  "Create a buffer containing OPTIONS.
+Optional NAME is the name of the buffer.
+OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
+SYMBOL is a customization option, and WIDGET is a widget for editing
+that option."
+  (unless name (setq name "*Customization*"))
+  (kill-buffer (get-buffer-create name))
+  (switch-to-buffer (get-buffer-create name))
+  (custom-buffer-create-internal options description))
+
+;;;###autoload
+(defun custom-buffer-create-other-window (options &optional name description)
+  "Create a buffer containing OPTIONS.
+Optional NAME is the name of the buffer.
+OPTIONS should be an alist of the form ((SYMBOL WIDGET)...), where
+SYMBOL is a customization option, and WIDGET is a widget for editing
+that option."
+  (unless name (setq name "*Customization*"))
+  (kill-buffer (get-buffer-create name))
+  (let ((window (selected-window)))
+    (switch-to-buffer-other-window (get-buffer-create name))
+    (custom-buffer-create-internal options description)
+    (select-window window)))
+
+(defcustom custom-reset-button-menu t
+  "If non-nil, only show a single reset button in customize buffers.
+This button will have a menu with all three reset operations."
+  :type 'boolean
+  :group 'custom-buffer)
+
+(defconst custom-skip-messages 5)
+
+(defun Custom-buffer-done ()
+  "Remove current buffer.
+This works by calling the function specified by
+ `custom-buffer-done-function'."
+  (interactive)
+  (funcall custom-buffer-done-function (current-buffer)))
+
+(defun custom-buffer-create-buttons ()
+  (message "Creating customization buttons...")
+  (widget-insert "\nOperate on everything in this buffer:\n ")
+  (widget-create 'push-button
+                :tag "Set"
+                :tag-glyph '("set-up" "set-down")
+                :help-echo "\
+Make your editing in this buffer take effect for this session"
+                :action (lambda (widget &optional event)
+                          (Custom-set)))
+  (widget-insert " ")
+  (widget-create 'push-button
+                :tag "Save"
+                :tag-glyph '("save-up" "save-down")
+                :help-echo "\
+Make your editing in this buffer take effect for future Emacs sessions"
+                :action (lambda (widget &optional event)
+                          (Custom-save)))
+  (if custom-reset-button-menu
+      (progn
+       (widget-insert " ")
+       (widget-create 'push-button
+                      :tag "Reset"
+                      :tag-glyph '("reset-up" "reset-down")
+                      :help-echo "Show a menu with reset operations"
+                      :mouse-down-action (lambda (&rest junk) t)
+                      :action (lambda (widget &optional event)
+                                (custom-reset event))))
+    (widget-insert " ")
+    (widget-create 'push-button
+                  :tag "Reset"
+                  :help-echo "\
+Reset all edited text in this buffer to reflect current values"
+                  :action 'Custom-reset-current)
+    (widget-insert " ")
+    (widget-create 'push-button
+                  :tag "Reset to Saved"
+                  :help-echo "\
+Reset all values in this buffer to their saved settings"
+                  :action 'Custom-reset-saved)
+    (widget-insert " ")
+    (widget-create 'push-button
+                  :tag "Reset to Standard"
+                  :help-echo "\
+Reset all values in this buffer to their standard settings"
+                  :action 'Custom-reset-standard))
+  (widget-insert "  ")
+  (widget-create 'push-button
+                :tag "Done"
+                :tag-glyph '("done-up" "done-down")
+                :help-echo "Remove the buffer"
+                :action (lambda (widget &optional event)
+                          (Custom-buffer-done)))
+  (widget-insert "\n"))
+
+(defcustom custom-novice t
+  "If non-nil, show help message at top of customize buffers."
+  :type 'boolean
+  :group 'custom-buffer)
+
+(defcustom custom-display-global-buttons 'top
+  "If `nil' don't display the global buttons.  If `top' display at the
+beginning of custom buffers.  If `bottom', display at the end."
+  :type '(choice (const top)
+                (const bottom)
+                (const :tag "don't" nil))
+  :group 'custom-buffer)
+
+(defun custom-buffer-create-internal (options &optional description)
+  (message "Creating customization buffer...")
+  (custom-mode)
+  (widget-insert "This is a customization buffer")
+  (if description
+      (widget-insert description))
+  (when custom-novice
+      (widget-insert ".\n\
+Type RET or click button2 on an active field to invoke its action.
+Invoke ")
+      (widget-create 'info-link
+                    :tag "Help"
+                    :help-echo "Read the online help"
+                    "(XEmacs)Easy Customization")
+      (widget-insert " for more information."))
+  (widget-insert "\n")
+  (if (equal custom-display-global-buttons 'top)
+      (custom-buffer-create-buttons))
+  (widget-insert "\n")
+  (message "Creating customization items...")
+  (setq custom-options
+       (if (= (length options) 1)
+           (mapcar (lambda (entry)
+                     (widget-create (nth 1 entry)
+                                    :documentation-shown t
+                                    :custom-state 'unknown
+                                    :tag (custom-unlispify-tag-name
+                                          (nth 0 entry))
+                                    :value (nth 0 entry)))
+                   options)
+         (let ((count 0)
+               (length (length options)))
+           (mapcar (lambda (entry)
+                     (prog2
+                         (display-message
+                          'progress
+                          (format "Creating customization items %2d%%..."
+                                  (/ (* 100.0 count) length)))
+                         (widget-create (nth 1 entry)
+                                        :tag (custom-unlispify-tag-name
+                                              (nth 0 entry))
+                                        :value (nth 0 entry))
+                       (incf count)
+                       (unless (eq (preceding-char) ?\n)
+                         (widget-insert "\n"))
+                       (widget-insert "\n")))
+                   options))))
+  (unless (eq (preceding-char) ?\n)
+    (widget-insert "\n"))
+  (if (equal custom-display-global-buttons 'bottom)
+      (custom-buffer-create-buttons))
+  (display-message 'progress
+                  (format
+                   "Creating customization items %2d%%...done" 100))
+  (unless (eq custom-buffer-style 'tree)
+    (mapc 'custom-magic-reset custom-options))
+  (message "Creating customization setup...")
+  (widget-setup)
+  (goto-char (point-min))
+  (message "Creating customization buffer...done"))
+
+\f
+;;; The Tree Browser.
+
+;;;###autoload
+(defun customize-browse (&optional group)
+  "Create a tree browser for the customize hierarchy."
+  (interactive)
+  (unless group
+    (setq group 'emacs))
+  (let ((name "*Customize Browser*"))
+    (kill-buffer (get-buffer-create name))
+    (switch-to-buffer (get-buffer-create name)))
+  (custom-mode)
+  (widget-insert "\
+Square brackets show active fields; type RET or click button2
+on an active field to invoke its action.
+Invoke [+] below to expand a group, and [-] to collapse an expanded group.\n")
+  (if custom-browse-only-groups
+      (widget-insert "\
+Invoke the [Group] button below to edit that item in another window.\n\n")
+    (widget-insert "Invoke the ")
+    (widget-create 'item
+                  :format "%t"
+                  :tag "[Group]"
+                  :tag-glyph "folder")
+    (widget-insert ", ")
+    (widget-create 'item
+                  :format "%t"
+                  :tag "[Face]"
+                  :tag-glyph "face")
+    (widget-insert ", and ")
+    (widget-create 'item
+                  :format "%t"
+                  :tag "[Option]"
+                  :tag-glyph "option")
+    (widget-insert " buttons below to edit that
+item in another window.\n\n"))
+  (let ((custom-buffer-style 'tree))
+    (widget-create 'custom-group
+                  :custom-last t
+                  :custom-state 'unknown
+                  :tag (custom-unlispify-tag-name group)
+                  :value group))
+  (widget-add-change)
+  (goto-char (point-min)))
+
+(define-widget 'custom-browse-visibility 'item
+  "Control visibility of of items in the customize tree browser."
+  :format "%[[%t]%]"
+  :action 'custom-browse-visibility-action)
+
+(defun custom-browse-visibility-action (widget &rest ignore)
+  (let ((custom-buffer-style 'tree))
+    (custom-toggle-parent widget)))
+
+(define-widget 'custom-browse-group-tag 'push-button
+  "Show parent in other window when activated."
+  :tag "Group"
+  :tag-glyph "folder"
+  :action 'custom-browse-group-tag-action)
+
+(defun custom-browse-group-tag-action (widget &rest ignore)
+  (let ((parent (widget-get widget :parent)))
+    (customize-group-other-window (widget-value parent))))
+
+(define-widget 'custom-browse-variable-tag 'push-button
+  "Show parent in other window when activated."
+  :tag "Option"
+  :tag-glyph "option"
+  :action 'custom-browse-variable-tag-action)
+
+(defun custom-browse-variable-tag-action (widget &rest ignore)
+  (let ((parent (widget-get widget :parent)))
+    (customize-variable-other-window (widget-value parent))))
+
+(define-widget 'custom-browse-face-tag 'push-button
+  "Show parent in other window when activated."
+  :tag "Face"
+  :tag-glyph "face"
+  :action 'custom-browse-face-tag-action)
+
+(defun custom-browse-face-tag-action (widget &rest ignore)
+  (let ((parent (widget-get widget :parent)))
+    (customize-face-other-window (widget-value parent))))
+
+(defconst custom-browse-alist '(("   " "space")
+                               (" | " "vertical")
+                               ("-\\ " "top")
+                               (" |-" "middle")
+                               (" `-" "bottom")))
+
+(defun custom-browse-insert-prefix (prefix)
+  "Insert PREFIX.  On XEmacs convert it to line graphics."
+  ;; ### Unfinished.
+  (if nil ; (string-match "XEmacs" emacs-version)
+      (progn
+       (insert "*")
+       (while (not (string-equal prefix ""))
+         (let ((entry (substring prefix 0 3)))
+           (setq prefix (substring prefix 3))
+           (let ((overlay (make-overlay (1- (point)) (point) nil t nil))
+                 (name (nth 1 (assoc entry custom-browse-alist))))
+             (overlay-put overlay 'end-glyph (widget-glyph-find name entry))
+             (overlay-put overlay 'start-open t)
+             (overlay-put overlay 'end-open t)))))
+    (insert prefix)))
+
+\f
+;;; Modification of Basic Widgets.
+;;
+;; We add extra properties to the basic widgets needed here.  This is
+;; fine, as long as we are careful to stay within out own namespace.
+;;
+;; We want simple widgets to be displayed by default, but complex
+;; widgets to be hidden.
+
+(widget-put (get 'item 'widget-type) :custom-show t)
+(widget-put (get 'editable-field 'widget-type)
+           :custom-show (lambda (widget value)
+                          ;; This used to call pp-to-string
+                          (let ((pp (widget-prettyprint-to-string value)))
+                            (cond ((string-match "\n" pp)
+                                   nil)
+                                  ((> (length pp) 40)
+                                   nil)
+                                  (t t)))))
+(widget-put (get 'menu-choice 'widget-type) :custom-show t)
+
+;;; The `custom-manual' Widget.
+
+(define-widget 'custom-manual 'info-link
+  "Link to the manual entry for this customization option."
+  :tag "Manual")
+
+;;; The `custom-magic' Widget.
+
+(defgroup custom-magic-faces nil
+  "Faces used by the magic button."
+  :group 'custom-faces
+  :group 'custom-buffer)
+
+(defface custom-invalid-face '((((class color))
+                               (:foreground "yellow" :background "red"))
+                              (t
+                               (:bold t :italic t :underline t)))
+  "Face used when the customize item is invalid."
+  :group 'custom-magic-faces)
+
+(defface custom-rogue-face '((((class color))
+                             (:foreground "pink" :background "black"))
+                            (t
+                             (:underline t)))
+  "Face used when the customize item is not defined for customization."
+  :group 'custom-magic-faces)
+
+(defface custom-modified-face '((((class color))
+                                (:foreground "white" :background "blue"))
+                               (t
+                                (:italic t :bold)))
+  "Face used when the customize item has been modified."
+  :group 'custom-magic-faces)
+
+(defface custom-set-face '((((class color))
+                               (:foreground "blue" :background "white"))
+                              (t
+                               (:italic t)))
+  "Face used when the customize item has been set."
+  :group 'custom-magic-faces)
+
+(defface custom-changed-face '((((class color))
+                               (:foreground "white" :background "blue"))
+                              (t
+                               (:italic t)))
+  "Face used when the customize item has been changed."
+  :group 'custom-magic-faces)
+
+(defface custom-saved-face '((t (:underline t)))
+  "Face used when the customize item has been saved."
+  :group 'custom-magic-faces)
+
+(defconst custom-magic-alist '((nil "#" underline "\
+uninitialized, you should not see this.")
+                              (unknown "?" italic "\
+unknown, you should not see this.")
+                              (hidden "-" default "\
+hidden, invoke \"Show\" button in the previous line to show." "\
+group now hidden, invoke the above \"Show\" button to show contents.")
+                              (invalid "x" custom-invalid-face "\
+the value displayed for this %c is invalid and cannot be set.")
+                              (modified "*" custom-modified-face "\
+you have edited the value as text, but you have not set the %c." "\
+you have edited something in this group, but not set it.")
+                              (set "+" custom-set-face "\
+you have set this %c, but not saved it for future sessions." "\
+something in this group has been set, but not saved.")
+                              (changed ":" custom-changed-face "\
+this %c has been changed outside the customize buffer." "\
+something in this group has been changed outside customize.")
+                              (saved "!" custom-saved-face "\
+this %c has been set and saved." "\
+something in this group has been set and saved.")
+                              (rogue "@" custom-rogue-face "\
+this %c has not been changed with customize." "\
+something in this group is not prepared for customization.")
+                              (standard " " nil "\
+this %c is unchanged from its standard setting." "\
+visible group members are all at standard settings."))
+  "Alist of customize option states.
+Each entry is of the form (STATE MAGIC FACE ITEM-DESC [ GROUP-DESC ]), where
+
+STATE is one of the following symbols:
+
+`nil'
+   For internal use, should never occur.
+`unknown'
+   For internal use, should never occur.
+`hidden'
+   This item is not being displayed.
+`invalid'
+   This item is modified, but has an invalid form.
+`modified'
+   This item is modified, and has a valid form.
+`set'
+   This item has been set but not saved.
+`changed'
+   The current value of this item has been changed temporarily.
+`saved'
+   This item is marked for saving.
+`rogue'
+   This item has no customization information.
+`standard'
+   This item is unchanged from the standard setting.
+
+MAGIC is a string used to present that state.
+
+FACE is a face used to present the state.
+
+ITEM-DESC is a string describing the state for options.
+
+GROUP-DESC is a string describing the state for groups.  If this is
+left out, ITEM-DESC will be used.
+
+The string %c in either description will be replaced with the
+category of the item.  These are `group'. `option', and `face'.
+
+The list should be sorted most significant first.")
+
+(defcustom custom-magic-show 'long
+  "If non-nil, show textual description of the state.
+If `long', show a full-line description, not just one word."
+  :type '(choice (const :tag "no" nil)
+                (const short)
+                (const long))
+  :group 'custom-buffer)
+
+(defcustom custom-magic-show-hidden '(option face)
+  "Control whether the State button is shown for hidden items.
+The value should be a list with the custom categories where the State
+button should be visible.  Possible categories are `group', `option',
+and `face'."
+  :type '(set (const group) (const option) (const face))
+  :group 'custom-buffer)
+
+(defcustom custom-magic-show-button nil
+  "Show a \"magic\" button indicating the state of each customization option."
+  :type 'boolean
+  :group 'custom-buffer)
+
+(define-widget 'custom-magic 'default
+  "Show and manipulate state for a customization option."
+  :format "%v"
+  :action 'widget-parent-action
+  :notify 'ignore
+  :value-get 'ignore
+  :value-create 'custom-magic-value-create
+  :value-delete 'widget-children-value-delete)
+
+(defun widget-magic-mouse-down-action (widget &optional event)
+  ;; Non-nil unless hidden.
+  (not (eq (widget-get (widget-get (widget-get widget :parent) :parent)
+                      :custom-state)
+          'hidden)))
+
+(defun custom-magic-value-create (widget)
+  ;; Create compact status report for WIDGET.
+  (let* ((parent (widget-get widget :parent))
+        (state (widget-get parent :custom-state))
+        (hidden (eq state 'hidden))
+        (entry (assq state custom-magic-alist))
+        (magic (nth 1 entry))
+        (face (nth 2 entry))
+        (category (widget-get parent :custom-category))
+        (text (or (and (eq category 'group)
+                       (nth 4 entry))
+                  (nth 3 entry)))
+        (form (widget-get parent :custom-form))
+        children)
+    (while (string-match "\\`\\(.*\\)%c\\(.*\\)\\'" text)
+      (setq text (concat (match-string 1 text)
+                        (symbol-name category)
+                        (match-string 2 text))))
+    (when (and custom-magic-show
+              (or (not hidden)
+                  (memq category custom-magic-show-hidden)))
+      (insert "   ")
+      (when (and (eq category 'group)
+                (not (and (eq custom-buffer-style 'links)
+                          (> (widget-get parent :custom-level) 1))))
+       (insert-char ?\  (* custom-buffer-indent
+                           (widget-get parent :custom-level))))
+      (push (widget-create-child-and-convert
+            widget 'choice-item
+            :help-echo "Change the state of this item"
+            :format (if hidden "%t" "%[%t%]")
+            :button-prefix 'widget-push-button-prefix
+            :button-suffix 'widget-push-button-suffix
+            :mouse-down-action 'widget-magic-mouse-down-action
+            :tag "State"
+            ;;:tag-glyph (or hidden '("state-up" "state-down"))
+            )
+           children)
+      (insert ": ")
+      (let ((start (point)))
+       (if (eq custom-magic-show 'long)
+           (insert text)
+         (insert (symbol-name state)))
+       (cond ((eq form 'lisp)
+              (insert " (lisp)"))
+             ((eq form 'mismatch)
+              (insert " (mismatch)")))
+       (put-text-property start (point) 'face 'custom-state-face))
+      (insert "\n"))
+    (when (and (eq category 'group)
+              (not (and (eq custom-buffer-style 'links)
+                        (> (widget-get parent :custom-level) 1))))
+      (insert-char ?\  (* custom-buffer-indent
+                         (widget-get parent :custom-level))))
+    (when custom-magic-show-button
+      (when custom-magic-show
+       (let ((indent (widget-get parent :indent)))
+         (when indent
+           (insert-char ?\  indent))))
+      (push (widget-create-child-and-convert
+            widget 'choice-item
+            :mouse-down-action 'widget-magic-mouse-down-action
+            :button-face face
+            :button-prefix ""
+            :button-suffix ""
+            :help-echo "Change the state"
+            :format (if hidden "%t" "%[%t%]")
+            :tag (if (memq form '(lisp mismatch))
+                     (concat "(" magic ")")
+                   (concat "[" magic "]")))
+           children)
+      (insert " "))
+    (widget-put widget :children children)))
+
+(defun custom-magic-reset (widget)
+  "Redraw the :custom-magic property of WIDGET."
+  (let ((magic (widget-get widget :custom-magic)))
+    (widget-value-set magic (widget-value magic))))
+
+;;; The `custom' Widget.
+
+(defface custom-button-face '((t (:bold t)))
+  "Face used for buttons in customization buffers."
+  :group 'custom-faces)
+
+(defface custom-documentation-face nil
+  "Face used for documentation strings in customization buffers."
+  :group 'custom-faces)
+
+(defface custom-state-face '((((class color)
+                              (background dark))
+                             (:foreground "lime green"))
+                            (((class color)
+                              (background light))
+                             (:foreground "dark green"))
+                            (t nil))
+  "Face used for State descriptions in the customize buffer."
+  :group 'custom-faces)
+
+(define-widget 'custom 'default
+  "Customize a user option."
+  :format "%v"
+  :convert-widget 'custom-convert-widget
+  :notify 'custom-notify
+  :custom-prefix ""
+  :custom-level 1
+  :custom-state 'hidden
+  :documentation-property 'widget-subclass-responsibility
+  :value-create 'widget-subclass-responsibility
+  :value-delete 'widget-children-value-delete
+  :value-get 'widget-value-value-get
+  :validate 'widget-children-validate
+  :match (lambda (widget value) (symbolp value)))
+
+(defun custom-convert-widget (widget)
+  ;; Initialize :value and :tag from :args in WIDGET.
+  (let ((args (widget-get widget :args)))
+    (when args
+      (widget-put widget :value (widget-apply widget
+                                             :value-to-internal (car args)))
+      (widget-put widget :tag (custom-unlispify-tag-name (car args)))
+      (widget-put widget :args nil)))
+  widget)
+
+(defun custom-notify (widget &rest args)
+  "Keep track of changes."
+  (let ((state (widget-get widget :custom-state)))
+    (unless (eq state 'modified)
+      (unless (memq state '(nil unknown hidden))
+       (widget-put widget :custom-state 'modified))
+      (custom-magic-reset widget)
+      (apply 'widget-default-notify widget args))))
+
+(defun custom-redraw (widget)
+  "Redraw WIDGET with current settings."
+  (let ((line (count-lines (point-min) (point)))
+       (column (current-column))
+       (pos (point))
+       (from (marker-position (widget-get widget :from)))
+       (to (marker-position (widget-get widget :to))))
+    (save-excursion
+      (widget-value-set widget (widget-value widget))
+      (custom-redraw-magic widget))
+    (when (and (>= pos from) (<= pos to))
+      (condition-case nil
+         (progn
+           (if (> column 0)
+               (goto-line line)
+             (goto-line (1+ line)))
+           (move-to-column column))
+       (error nil)))))
+
+(defun custom-redraw-magic (widget)
+  "Redraw WIDGET state with current settings."
+  (while widget
+    (let ((magic (widget-get widget :custom-magic)))
+      (cond (magic
+            (widget-value-set magic (widget-value magic))
+            (when (setq widget (widget-get widget :group))
+              (custom-group-state-update widget)))
+           (t
+            (setq widget nil)))))
+  (widget-setup))
+
+(defun custom-show (widget value)
+  "Non-nil if WIDGET should be shown with VALUE by default."
+  (let ((show (widget-get widget :custom-show)))
+    (cond ((null show)
+          nil)
+         ((eq t show)
+          t)
+         (t
+          (funcall show widget value)))))
+
+(defvar custom-load-recursion nil
+  "Hack to avoid recursive dependencies.")
+
+(defun custom-load-symbol (symbol)
+  "Load all dependencies for SYMBOL."
+  (unless custom-load-recursion
+    (let ((custom-load-recursion t)
+         (loads (get symbol 'custom-loads))
+         load)
+      (while loads
+       (setq load (car loads)
+             loads (cdr loads))
+       (cond ((symbolp load)
+              (condition-case nil
+                  (require load)
+                (error nil)))
+             ;; Don't reload a file already loaded.
+             ((and (boundp 'preloaded-file-list)
+                   (member load preloaded-file-list)))
+             ((assoc load load-history))
+             ((assoc (locate-library load) load-history))
+             (t
+              (condition-case nil
+                  ;; Without this, we would load cus-edit recursively.
+                  ;; We are still loading it when we call this,
+                  ;; and it is not in load-history yet.
+                  (or (equal load "cus-edit")
+                      (load-library load))
+                (error nil))))))))
+
+(defun custom-load-widget (widget)
+  "Load all dependencies for WIDGET."
+  (custom-load-symbol (widget-value widget)))
+
+(defun custom-unloaded-symbol-p (symbol)
+  "Return non-nil if the dependencies of SYMBOL has not yet been loaded."
+  (let ((found nil)
+       (loads (get symbol 'custom-loads))
+       load)
+    (while loads
+      (setq load (car loads)
+           loads (cdr loads))
+      (cond ((symbolp load)
+            (unless (featurep load)
+              (setq found t)))
+           ((assoc load load-history))
+           ((assoc (locate-library load) load-history)
+            ;; #### WTF???
+            (message nil))
+           (t
+            (setq found t))))
+    found))
+
+(defun custom-unloaded-widget-p (widget)
+  "Return non-nil if the dependencies of WIDGET has not yet been loaded."
+  (custom-unloaded-symbol-p (widget-value widget)))
+
+(defun custom-toggle-hide (widget)
+  "Toggle visibility of WIDGET."
+  (custom-load-widget widget)
+  (let ((state (widget-get widget :custom-state)))
+    (cond ((memq state '(invalid modified))
+          (error "There are unset changes"))
+         ((eq state 'hidden)
+          (widget-put widget :custom-state 'unknown))
+         (t
+          (widget-put widget :documentation-shown nil)
+          (widget-put widget :custom-state 'hidden)))
+    (custom-redraw widget)
+    (widget-setup)))
+
+(defun custom-toggle-parent (widget &rest ignore)
+  "Toggle visibility of parent of WIDGET."
+  (custom-toggle-hide (widget-get widget :parent)))
+
+(defun custom-add-see-also (widget &optional prefix)
+  "Add `See also ...' to WIDGET if there are any links.
+Insert PREFIX first if non-nil."
+  (let* ((symbol (widget-get widget :value))
+        (links (get symbol 'custom-links))
+        (many (> (length links) 2))
+        (buttons (widget-get widget :buttons))
+        (indent (widget-get widget :indent)))
+    (when links
+      (when indent
+       (insert-char ?\  indent))
+      (when prefix
+       (insert prefix))
+      (insert "See also ")
+      (while links
+       (push (widget-create-child-and-convert widget (car links))
+             buttons)
+       (setq links (cdr links))
+       (cond ((null links)
+              (insert ".\n"))
+             ((null (cdr links))
+              (if many
+                  (insert ", and ")
+                (insert " and ")))
+             (t
+              (insert ", "))))
+      (widget-put widget :buttons buttons))))
+
+(defun custom-add-parent-links (widget &optional initial-string)
+  "Add \"Parent groups: ...\" to WIDGET if the group has parents.
+The value if non-nil if any parents were found.
+If INITIAL-STRING is non-nil, use that rather than \"Parent groups:\"."
+  (let ((name (widget-value widget))
+       (type (widget-type widget))
+       (buttons (widget-get widget :buttons))
+       (start (point))
+       found)
+    (insert (or initial-string "Parent groups:"))
+    (maphash (lambda (group ignore)
+              (let ((entry (assq name (get group 'custom-group))))
+                (when (eq (nth 1 entry) type)
+                  (insert " ")
+                  (push (widget-create-child-and-convert
+                         widget 'custom-group-link
+                         :tag (custom-unlispify-tag-name group)
+                         group)
+                        buttons)
+                  (setq found t))))
+            custom-group-hash-table)
+    (widget-put widget :buttons buttons)
+    (if found
+       (insert "\n")
+      (delete-region start (point)))
+    found))
+
+;;; The `custom-variable' Widget.
+
+(defface custom-variable-tag-face '((((class color)
+                                     (background dark))
+                                    (:foreground "light blue" :underline t))
+                                   (((class color)
+                                     (background light))
+                                    (:foreground "blue" :underline t))
+                                   (t (:underline t)))
+  "Face used for unpushable variable tags."
+  :group 'custom-faces)
+
+(defface custom-variable-button-face '((t (:underline t :bold t)))
+  "Face used for pushable variable tags."
+  :group 'custom-faces)
+
+(defcustom custom-variable-default-form 'edit
+  "Default form of displaying variable values."
+  :type '(choice (const edit)
+                (const lisp))
+  :group 'custom-buffer)
+
+(define-widget 'custom-variable 'custom
+  "Customize variable."
+  :format "%v"
+  :help-echo "Set or reset this variable"
+  :documentation-property 'variable-documentation
+  :custom-category 'option
+  :custom-state nil
+  :custom-menu 'custom-variable-menu-create
+  :custom-form nil ; defaults to value of `custom-variable-default-form'
+  :value-create 'custom-variable-value-create
+  :action 'custom-variable-action
+  :custom-set 'custom-variable-set
+  :custom-save 'custom-variable-save
+  :custom-reset-current 'custom-redraw
+  :custom-reset-saved 'custom-variable-reset-saved
+  :custom-reset-standard 'custom-variable-reset-standard)
+
+(defun custom-variable-type (symbol)
+  "Return a widget suitable for editing the value of SYMBOL.
+If SYMBOL has a `custom-type' property, use that.
+Otherwise, look up symbol in `custom-guess-type-alist'."
+  (let* ((type (or (get symbol 'custom-type)
+                  (and (not (get symbol 'standard-value))
+                       (custom-guess-type symbol))
+                  'sexp))
+        (options (get symbol 'custom-options))
+        (tmp (if (listp type)
+                 (copy-sequence type)
+               (list type))))
+    (when options
+      (widget-put tmp :options options))
+    tmp))
+
+(defun custom-variable-value-create (widget)
+  "Here is where you edit the variables value."
+  (custom-load-widget widget)
+  (unless (widget-get widget :custom-form)
+    (widget-put widget :custom-form custom-variable-default-form))
+  (let* ((buttons (widget-get widget :buttons))
+        (children (widget-get widget :children))
+        (form (widget-get widget :custom-form))
+        (state (widget-get widget :custom-state))
+        (symbol (widget-get widget :value))
+        (tag (widget-get widget :tag))
+        (type (custom-variable-type symbol))
+        (conv (widget-convert type))
+        (get (or (get symbol 'custom-get) 'default-value))
+        (prefix (widget-get widget :custom-prefix))
+        (last (widget-get widget :custom-last))
+        (value (if (default-boundp symbol)
+                   (funcall get symbol)
+                 (widget-get conv :value))))
+    ;; If the widget is new, the child determine whether it is hidden.
+    (cond (state)
+         ((custom-show type value)
+          (setq state 'unknown))
+         (t
+          (setq state 'hidden)))
+    ;; If we don't know the state, see if we need to edit it in lisp form.
+    (when (eq state 'unknown)
+      (unless (widget-apply conv :match value)
+       ;; (widget-apply (widget-convert type) :match value)
+       (setq form 'mismatch)))
+    ;; Now we can create the child widget.
+    (cond ((eq custom-buffer-style 'tree)
+          (insert prefix (if last " `--- " " |--- "))
+          (push (widget-create-child-and-convert
+                 widget 'custom-browse-variable-tag)
+                buttons)
+          (insert " " tag "\n")
+          (widget-put widget :buttons buttons))
+         ((eq state 'hidden)
+          ;; Indicate hidden value.
+          (push (widget-create-child-and-convert
+                 widget 'item
+                 :format "%{%t%}: "
+                 :sample-face 'custom-variable-tag-face
+                 :tag tag
+                 :parent widget)
+                buttons)
+          (push (widget-create-child-and-convert
+                 widget 'visibility
+                 :help-echo "Show the value of this option"
+                 :action 'custom-toggle-parent
+                 nil)
+                buttons))
+         ((memq form '(lisp mismatch))
+          ;; In lisp mode edit the saved value when possible.
+          (let* ((value (cond ((get symbol 'saved-value)
+                               (car (get symbol 'saved-value)))
+                              ((get symbol 'standard-value)
+                               (car (get symbol 'standard-value)))
+                              ((default-boundp symbol)
+                               (custom-quote (funcall get symbol)))
+                              (t
+                               (custom-quote (widget-get conv :value))))))
+            (insert (symbol-name symbol) ": ")
+            (push (widget-create-child-and-convert
+                   widget 'visibility
+                   :help-echo "Hide the value of this option"
+                   :action 'custom-toggle-parent
+                   t)
+                  buttons)
+            (insert " ")
+            (push (widget-create-child-and-convert
+                   widget 'sexp
+                   :button-face 'custom-variable-button-face
+                   :format "%v"
+                   :tag (symbol-name symbol)
+                   :parent widget
+                   :value value)
+                  children)))
+         (t
+          ;; Edit mode.
+          (let* ((format (widget-get type :format))
+                 tag-format value-format)
+            (while (not (string-match ":" format))
+              (setq format (signal 'error (list "Bad format" format))))
+            (setq tag-format (substring format 0 (match-end 0)))
+            (setq value-format (substring format (match-end 0)))
+            (push (widget-create-child-and-convert
+                   widget 'item
+                   :format tag-format
+                   :action 'custom-tag-action
+                   :help-echo "Change value of this option"
+                   :mouse-down-action 'custom-tag-mouse-down-action
+                   :button-face 'custom-variable-button-face
+                   :sample-face 'custom-variable-tag-face
+                   tag)
+                  buttons)
+            (insert " ")
+            (push (widget-create-child-and-convert
+                 widget 'visibility
+                 :help-echo "Hide the value of this option"
+                 :action 'custom-toggle-parent
+                 t)
+                buttons)
+            (push (widget-create-child-and-convert
+                   widget type
+                   :format value-format
+                   :value value)
+                  children))))
+    (unless (eq custom-buffer-style 'tree)
+      ;; Now update the state.
+      (unless (eq (preceding-char) ?\n)
+       (widget-insert "\n"))
+      (if (eq state 'hidden)
+         (widget-put widget :custom-state state)
+       (custom-variable-state-set widget))
+      ;; Create the magic button.
+      (let ((magic (widget-create-child-and-convert
+                   widget 'custom-magic nil)))
+       (widget-put widget :custom-magic magic)
+       (push magic buttons))
+      ;; Update properties.
+      (widget-put widget :custom-form form)
+      (widget-put widget :buttons buttons)
+      (widget-put widget :children children)
+      ;; Insert documentation.
+      (widget-default-format-handler widget ?h)
+      ;; See also.
+      (unless (eq state 'hidden)
+       (when (eq (widget-get widget :custom-level) 1)
+         (custom-add-parent-links widget))
+       (custom-add-see-also widget)))))
+
+(defun custom-tag-action (widget &rest args)
+  "Pass :action to first child of WIDGET's parent."
+  (apply 'widget-apply (car (widget-get (widget-get widget :parent) :children))
+        :action args))
+
+(defun custom-tag-mouse-down-action (widget &rest args)
+  "Pass :mouse-down-action to first child of WIDGET's parent."
+  (apply 'widget-apply (car (widget-get (widget-get widget :parent) :children))
+        :mouse-down-action args))
+
+(defun custom-variable-state-set (widget)
+  "Set the state of WIDGET."
+  (let* ((symbol (widget-value widget))
+        (get (or (get symbol 'custom-get) 'default-value))
+        (value (if (default-boundp symbol)
+                   (funcall get symbol)
+                 (widget-get widget :value)))
+        tmp
+        (state (cond ((setq tmp (get symbol 'customized-value))
+                      (if (condition-case nil
+                              (equal value (eval (car tmp)))
+                            (error nil))
+                          'set
+                        'changed))
+                     ((setq tmp (get symbol 'saved-value))
+                      (if (condition-case nil
+                              (equal value (eval (car tmp)))
+                            (error nil))
+                          'saved
+                        'changed))
+                     ((setq tmp (get symbol 'standard-value))
+                      (if (condition-case nil
+                              (equal value (eval (car tmp)))
+                            (error nil))
+                          'standard
+                        'changed))
+                     (t 'rogue))))
+    (widget-put widget :custom-state state)))
+
+(defvar custom-variable-menu
+  '(("Set for Current Session" custom-variable-set
+     (lambda (widget)
+       (eq (widget-get widget :custom-state) 'modified)))
+    ("Save for Future Sessions" custom-variable-save
+     (lambda (widget)
+       (memq (widget-get widget :custom-state) '(modified set changed rogue))))
+    ("Reset to Current" custom-redraw
+     (lambda (widget)
+       (and (default-boundp (widget-value widget))
+           (memq (widget-get widget :custom-state) '(modified changed)))))
+    ("Reset to Saved" custom-variable-reset-saved
+     (lambda (widget)
+       (and (get (widget-value widget) 'saved-value)
+           (memq (widget-get widget :custom-state)
+                 '(modified set changed rogue)))))
+    ("Reset to Standard Settings" custom-variable-reset-standard
+     (lambda (widget)
+       (and (get (widget-value widget) 'standard-value)
+           (memq (widget-get widget :custom-state)
+                 '(modified set changed saved rogue)))))
+    ("---" ignore ignore)
+    ("Don't show as Lisp expression" custom-variable-edit
+     (lambda (widget)
+       (eq (widget-get widget :custom-form) 'lisp)))
+    ("Show as Lisp expression" custom-variable-edit-lisp
+     (lambda (widget)
+       (eq (widget-get widget :custom-form) 'edit))))
+  "Alist of actions for the `custom-variable' widget.
+Each entry has the form (NAME ACTION FILTER) where NAME is the name of
+the menu entry, ACTION is the function to call on the widget when the
+menu is selected, and FILTER is a predicate which takes a `custom-variable'
+widget as an argument, and returns non-nil if ACTION is valid on that
+widget. If FILTER is nil, ACTION is always valid.")
+
+(defun custom-variable-action (widget &optional event)
+  "Show the menu for `custom-variable' WIDGET.
+Optional EVENT is the location for the menu."
+  (if (eq (widget-get widget :custom-state) 'hidden)
+      (custom-toggle-hide widget)
+    (unless (eq (widget-get widget :custom-state) 'modified)
+      (custom-variable-state-set widget))
+    ;; Redrawing magic also depresses the state glyph.
+    ;(custom-redraw-magic widget)
+    (let* ((completion-ignore-case t)
+          (answer (widget-choose (concat "Operation on "
+                                         (custom-unlispify-tag-name
+                                          (widget-get widget :value)))
+                                 (custom-menu-filter custom-variable-menu
+                                                     widget)
+                                 event)))
+      (if answer
+         (funcall answer widget)))))
+
+(defun custom-variable-edit (widget)
+  "Edit value of WIDGET."
+  (widget-put widget :custom-state 'unknown)
+  (widget-put widget :custom-form 'edit)
+  (custom-redraw widget))
+
+(defun custom-variable-edit-lisp (widget)
+  "Edit the lisp representation of the value of WIDGET."
+  (widget-put widget :custom-state 'unknown)
+  (widget-put widget :custom-form 'lisp)
+  (custom-redraw widget))
+
+(defun custom-variable-set (widget)
+  "Set the current value for the variable being edited by WIDGET."
+  (let* ((form (widget-get widget :custom-form))
+        (state (widget-get widget :custom-state))
+        (child (car (widget-get widget :children)))
+        (symbol (widget-value widget))
+        (set (or (get symbol 'custom-set) 'set-default))
+         val)
+    (cond ((eq state 'hidden)
+          (error "Cannot set hidden variable"))
+         ((setq val (widget-apply child :validate))
+          (goto-char (widget-get val :from))
+          (error "%s" (widget-get val :error)))
+         ((memq form '(lisp mismatch))
+          (funcall set symbol (eval (setq val (widget-value child))))
+          (put symbol 'customized-value (list val)))
+         (t
+          (funcall set symbol (setq val (widget-value child)))
+          (put symbol 'customized-value (list (custom-quote val)))))
+    (custom-variable-state-set widget)
+    (custom-redraw-magic widget)))
+
+(defun custom-variable-save (widget)
+  "Set and save the value for the variable being edited by WIDGET."
+  (let* ((form (widget-get widget :custom-form))
+        (state (widget-get widget :custom-state))
+        (child (car (widget-get widget :children)))
+        (symbol (widget-value widget))
+        (set (or (get symbol 'custom-set) 'set-default))
+        val)
+    (cond ((eq state 'hidden)
+          (error "Cannot set hidden variable"))
+         ((setq val (widget-apply child :validate))
+          (goto-char (widget-get val :from))
+          (error "%s" (widget-get val :error)))
+         ((memq form '(lisp mismatch))
+          (put symbol 'saved-value (list (widget-value child)))
+          (funcall set symbol (eval (widget-value child))))
+         (t
+          (put symbol
+               'saved-value (list (custom-quote (widget-value
+                                                 child))))
+          (funcall set symbol (widget-value child))))
+    (put symbol 'customized-value nil)
+    (custom-save-all)
+    (custom-variable-state-set widget)
+    (custom-redraw-magic widget)))
+
+(defun custom-variable-reset-saved (widget)
+  "Restore the saved value for the variable being edited by WIDGET."
+  (let* ((symbol (widget-value widget))
+        (set (or (get symbol 'custom-set) 'set-default)))
+    (if (get symbol 'saved-value)
+       (condition-case nil
+           (funcall set symbol (eval (car (get symbol 'saved-value))))
+         (error nil))
+      (signal 'error (list "No saved value for variable" symbol)))
+    (put symbol 'customized-value nil)
+    (widget-put widget :custom-state 'unknown)
+    (custom-redraw widget)))
+
+(defun custom-variable-reset-standard (widget)
+  "Restore the standard setting for the variable being edited by WIDGET."
+  (let* ((symbol (widget-value widget))
+        (set (or (get symbol 'custom-set) 'set-default)))
+    (if (get symbol 'standard-value)
+       (funcall set symbol (eval (car (get symbol 'standard-value))))
+      (signal 'error (list "No standard setting known for variable" symbol)))
+    (put symbol 'customized-value nil)
+    (when (get symbol 'saved-value)
+      (put symbol 'saved-value nil)
+      (custom-save-all))
+    (widget-put widget :custom-state 'unknown)
+    (custom-redraw widget)))
+
+;;; The `custom-face-edit' Widget.
+
+(define-widget 'custom-face-edit 'checklist
+  "Edit face attributes."
+  :format "%t: %v"
+  :tag "Attributes"
+  :extra-offset 12
+  :button-args '(:help-echo "Control whether this attribute have any effect")
+  :args (mapcar (lambda (att)
+                 (list 'group
+                       :inline t
+                       :sibling-args (widget-get (nth 1 att) :sibling-args)
+                       (list 'const :format "" :value (nth 0 att))
+                       (nth 1 att)))
+               custom-face-attributes))
+
+;;; The `custom-display' Widget.
+
+(define-widget 'custom-display 'menu-choice
+  "Select a display type."
+  :tag "Display"
+  :value t
+  :help-echo "Specify frames where the face attributes should be used"
+  :args '((const :tag "all" t)
+         (checklist
+          :offset 0
+          :extra-offset 9
+          :args ((group :sibling-args (:help-echo "\
+Only match the specified window systems")
+                        (const :format "Type: "
+                               type)
+                        (checklist :inline t
+                                   :offset 0
+                                   (const :format "X "
+                                          :sibling-args (:help-echo "\
+The X11 Window System")
+                                          x)
+                                   (const :format "PM "
+                                          :sibling-args (:help-echo "\
+OS/2 Presentation Manager")
+                                          pm)
+                                   (const :format "MSWindows "
+                                          :sibling-args (:help-echo "\
+Windows NT/95/97")
+                                          mswindows)
+                                   (const :format "DOS "
+                                          :sibling-args (:help-echo "\
+Plain MS-DOS")
+                                          pc)
+                                   (const :format "TTY%n"
+                                          :sibling-args (:help-echo "\
+Plain text terminals")
+                                          tty)))
+                 (group :sibling-args (:help-echo "\
+Only match the frames with the specified color support")
+                        (const :format "Class: "
+                               class)
+                        (checklist :inline t
+                                   :offset 0
+                                   (const :format "Color "
+                                          :sibling-args (:help-echo "\
+Match color frames")
+                                          color)
+                                   (const :format "Grayscale "
+                                          :sibling-args (:help-echo "\
+Match grayscale frames")
+                                          grayscale)
+                                   (const :format "Monochrome%n"
+                                          :sibling-args (:help-echo "\
+Match frames with no color support")
+                                          mono)))
+                 (group :sibling-args (:help-echo "\
+Only match frames with the specified intensity")
+                        (const :format "\
+Background brightness: "
+                               background)
+                        (checklist :inline t
+                                   :offset 0
+                                   (const :format "Light "
+                                          :sibling-args (:help-echo "\
+Match frames with light backgrounds")
+                                          light)
+                                   (const :format "Dark\n"
+                                          :sibling-args (:help-echo "\
+Match frames with dark backgrounds")
+                                          dark)))))))
+
+;;; The `custom-face' Widget.
+
+(defface custom-face-tag-face '((t (:underline t)))
+  "Face used for face tags."
+  :group 'custom-faces)
+
+(defcustom custom-face-default-form 'selected
+  "Default form of displaying face definition."
+  :type '(choice (const all)
+                (const selected)
+                (const lisp))
+  :group 'custom-buffer)
+
+(define-widget 'custom-face 'custom
+  "Customize face."
+  :sample-face 'custom-face-tag-face
+  :help-echo "Set or reset this face"
+  :documentation-property '(lambda (face)
+                            (face-doc-string face))
+  :value-create 'custom-face-value-create
+  :action 'custom-face-action
+  :custom-category 'face
+  :custom-form nil ; defaults to value of `custom-face-default-form'
+  :custom-set 'custom-face-set
+  :custom-save 'custom-face-save
+  :custom-reset-current 'custom-redraw
+  :custom-reset-saved 'custom-face-reset-saved
+  :custom-reset-standard 'custom-face-reset-standard
+  :custom-menu 'custom-face-menu-create)
+
+(define-widget 'custom-face-all 'editable-list
+  "An editable list of display specifications and attributes."
+  :entry-format "%i %d %v"
+  :insert-button-args '(:help-echo "Insert new display specification here")
+  :append-button-args '(:help-echo "Append new display specification here")
+  :delete-button-args '(:help-echo "Delete this display specification")
+  :args '((group :format "%v" custom-display custom-face-edit)))
+
+(defconst custom-face-all (widget-convert 'custom-face-all)
+  "Converted version of the `custom-face-all' widget.")
+
+(define-widget 'custom-display-unselected 'item
+  "A display specification that doesn't match the selected display."
+  :match 'custom-display-unselected-match)
+
+(defun custom-display-unselected-match (widget value)
+  "Non-nil if VALUE is an unselected display specification."
+  (not (face-spec-set-match-display value (selected-frame))))
+
+(define-widget 'custom-face-selected 'group
+  "Edit the attributes of the selected display in a face specification."
+  :args '((repeat :format ""
+                 :inline t
+                 (group custom-display-unselected sexp))
+         (group (sexp :format "") custom-face-edit)
+         (repeat :format ""
+                 :inline t
+                 sexp)))
+
+(defconst custom-face-selected (widget-convert 'custom-face-selected)
+  "Converted version of the `custom-face-selected' widget.")
+
+(defun custom-face-value-create (widget)
+  "Create a list of the display specifications for WIDGET."
+  (let ((buttons (widget-get widget :buttons))
+       (symbol (widget-get widget :value))
+       (tag (widget-get widget :tag))
+       (state (widget-get widget :custom-state))
+       (begin (point))
+       (is-last (widget-get widget :custom-last))
+       (prefix (widget-get widget :custom-prefix)))
+    (unless tag
+      (setq tag (prin1-to-string symbol)))
+    (cond ((eq custom-buffer-style 'tree)
+          (insert prefix (if is-last " `--- " " |--- "))
+          (push (widget-create-child-and-convert
+                 widget 'custom-browse-face-tag)
+                buttons)
+          (insert " " tag "\n")
+          (widget-put widget :buttons buttons))
+         (t
+          ;; Create tag.
+          (insert tag)
+          (if (eq custom-buffer-style 'face)
+              (insert " ")
+            (widget-specify-sample widget begin (point))
+            (insert ": "))
+          ;; Sample.
+          (and (not (find-face symbol))
+               ;; XEmacs cannot display uninitialized faces.
+               (make-face symbol))
+          (push (widget-create-child-and-convert widget 'item
+                                                 :format "(%{%t%})"
+                                                 :sample-face symbol
+                                                 :tag "sample")
+                buttons)
+          ;; Visibility.
+          (insert " ")
+          (push (widget-create-child-and-convert
+                 widget 'visibility
+                 :help-echo "Hide or show this face"
+                 :action 'custom-toggle-parent
+                 (not (eq state 'hidden)))
+                buttons)
+          ;; Magic.
+          (insert "\n")
+          (let ((magic (widget-create-child-and-convert
+                        widget 'custom-magic nil)))
+            (widget-put widget :custom-magic magic)
+            (push magic buttons))
+          ;; Update buttons.
+          (widget-put widget :buttons buttons)
+          ;; Insert documentation.
+          (widget-default-format-handler widget ?h)
+          ;; See also.
+          (unless (eq state 'hidden)
+            (when (eq (widget-get widget :custom-level) 1)
+              (custom-add-parent-links widget))
+            (custom-add-see-also widget))
+          ;; Editor.
+          (unless (eq (preceding-char) ?\n)
+            (insert "\n"))
+          (unless (eq state 'hidden)
+            (message "Creating face editor...")
+            (custom-load-widget widget)
+            (unless (widget-get widget :custom-form)
+                (widget-put widget :custom-form custom-face-default-form))
+            (let* ((symbol (widget-value widget))
+                   (spec (or (get symbol 'saved-face)
+                             (get symbol 'face-defface-spec)
+                             ;; Attempt to construct it.
+                             (list (list t (face-custom-attributes-get
+                                            symbol (selected-frame))))))
+                   (form (widget-get widget :custom-form))
+                   (indent (widget-get widget :indent))
+                   (edit (widget-create-child-and-convert
+                          widget
+                          (cond ((and (eq form 'selected)
+                                      (widget-apply custom-face-selected
+                                                    :match spec))
+                                 (when indent (insert-char ?\  indent))
+                                 'custom-face-selected)
+                                ((and (not (eq form 'lisp))
+                                      (widget-apply custom-face-all
+                                                    :match spec))
+                                 'custom-face-all)
+                                (t
+                                 (when indent (insert-char ?\  indent))
+                                 'sexp))
+                          :value spec)))
+              (custom-face-state-set widget)
+              (widget-put widget :children (list edit)))
+            (message "Creating face editor...done"))))))
+
+(defvar custom-face-menu
+  '(("Set for Current Session" custom-face-set)
+    ("Save for Future Sessions" custom-face-save)
+    ("Reset to Saved" custom-face-reset-saved
+     (lambda (widget)
+       (get (widget-value widget) 'saved-face)))
+    ("Reset to Standard Setting" custom-face-reset-standard
+     (lambda (widget)
+       (get (widget-value widget) 'face-defface-spec)))
+    ("---" ignore ignore)
+    ("Show all display specs" custom-face-edit-all
+     (lambda (widget)
+       (not (eq (widget-get widget :custom-form) 'all))))
+    ("Just current attributes" custom-face-edit-selected
+     (lambda (widget)
+       (not (eq (widget-get widget :custom-form) 'selected))))
+    ("Show as Lisp expression" custom-face-edit-lisp
+     (lambda (widget)
+       (not (eq (widget-get widget :custom-form) 'lisp)))))
+  "Alist of actions for the `custom-face' widget.
+Each entry has the form (NAME ACTION FILTER) where NAME is the name of
+the menu entry, ACTION is the function to call on the widget when the
+menu is selected, and FILTER is a predicate which takes a `custom-face'
+widget as an argument, and returns non-nil if ACTION is valid on that
+widget. If FILTER is nil, ACTION is always valid.")
+
+(defun custom-face-edit-selected (widget)
+  "Edit selected attributes of the value of WIDGET."
+  (widget-put widget :custom-state 'unknown)
+  (widget-put widget :custom-form 'selected)
+  (custom-redraw widget))
+
+(defun custom-face-edit-all (widget)
+  "Edit all attributes of the value of WIDGET."
+  (widget-put widget :custom-state 'unknown)
+  (widget-put widget :custom-form 'all)
+  (custom-redraw widget))
+
+(defun custom-face-edit-lisp (widget)
+  "Edit the lisp representation of the value of WIDGET."
+  (widget-put widget :custom-state 'unknown)
+  (widget-put widget :custom-form 'lisp)
+  (custom-redraw widget))
+
+(defun custom-face-state-set (widget)
+  "Set the state of WIDGET."
+  (let ((symbol (widget-value widget)))
+    (widget-put widget :custom-state (cond ((get symbol 'customized-face)
+                                           'set)
+                                          ((get symbol 'saved-face)
+                                           'saved)
+                                          ((get symbol 'face-defface-spec)
+                                           'standard)
+                                          (t
+                                           'rogue)))))
+
+(defun custom-face-action (widget &optional event)
+  "Show the menu for `custom-face' WIDGET.
+Optional EVENT is the location for the menu."
+  (if (eq (widget-get widget :custom-state) 'hidden)
+      (custom-toggle-hide widget)
+    (let* ((completion-ignore-case t)
+          (symbol (widget-get widget :value))
+          (answer (widget-choose (concat "Operation on "
+                                         (custom-unlispify-tag-name symbol))
+                                 (custom-menu-filter custom-face-menu
+                                                     widget)
+                                 event)))
+      (if answer
+         (funcall answer widget)))))
+
+(defun custom-face-set (widget)
+  "Make the face attributes in WIDGET take effect."
+  (let* ((symbol (widget-value widget))
+        (child (car (widget-get widget :children)))
+        (value (widget-value child)))
+    (put symbol 'customized-face value)
+    (face-spec-set symbol value)
+    (custom-face-state-set widget)
+    (custom-redraw-magic widget)))
+
+(defun custom-face-save (widget)
+  "Make the face attributes in WIDGET default."
+  (let* ((symbol (widget-value widget))
+        (child (car (widget-get widget :children)))
+        (value (widget-value child)))
+    (face-spec-set symbol value)
+    (put symbol 'saved-face value)
+    (put symbol 'customized-face nil)
+    (custom-save-all)
+    (custom-face-state-set widget)
+    (custom-redraw-magic widget)))
+
+(defun custom-face-reset-saved (widget)
+  "Restore WIDGET to the face's default attributes."
+  (let* ((symbol (widget-value widget))
+        (child (car (widget-get widget :children)))
+        (value (get symbol 'saved-face)))
+    (unless value
+      (signal 'error (list "No saved value for this face" symbol)))
+    (put symbol 'customized-face nil)
+    (face-spec-set symbol value)
+    (widget-value-set child value)
+    (custom-face-state-set widget)
+    (custom-redraw-magic widget)))
+
+(defun custom-face-reset-standard (widget)
+  "Restore WIDGET to the face's standard settings."
+  (let* ((symbol (widget-value widget))
+        (child (car (widget-get widget :children)))
+        (value (get symbol 'face-defface-spec)))
+    (unless value
+      (signal 'error (list "No standard setting for this face" symbol)))
+    (put symbol 'customized-face nil)
+    (when (get symbol 'saved-face)
+      (put symbol 'saved-face nil)
+      (custom-save-all))
+    (face-spec-set symbol value)
+    (widget-value-set child value)
+    (custom-face-state-set widget)
+    (custom-redraw-magic widget)))
+
+;;; The `face' Widget.
+
+(define-widget 'face 'default
+  "Select and customize a face."
+  :convert-widget 'widget-value-convert-widget
+  :button-prefix 'widget-push-button-prefix
+  :button-suffix 'widget-push-button-suffix
+  :format "%t: %[select face%] %v"
+  :tag "Face"
+  :value 'default
+  :value-create 'widget-face-value-create
+  :value-delete 'widget-face-value-delete
+  :value-get 'widget-value-value-get
+  :validate 'widget-children-validate
+  :action 'widget-face-action
+  :match (lambda (widget value) (symbolp value)))
+
+(defun widget-face-value-create (widget)
+  ;; Create a `custom-face' child.
+  (let* ((symbol (widget-value widget))
+        (custom-buffer-style 'face)
+        (child (widget-create-child-and-convert
+                widget 'custom-face
+                :custom-level nil
+                :value symbol)))
+    (custom-magic-reset child)
+    (setq custom-options (cons child custom-options))
+    (widget-put widget :children (list child))))
+
+(defun widget-face-value-delete (widget)
+  ;; Remove the child from the options.
+  (let ((child (car (widget-get widget :children))))
+    (setq custom-options (delq child custom-options))
+    (widget-children-value-delete widget)))
+
+(defvar face-history nil
+  "History of entered face names.")
+
+(defun widget-face-action (widget &optional event)
+  "Prompt for a face."
+  (let ((answer (completing-read "Face: "
+                                (mapcar (lambda (face)
+                                          (list (symbol-name face)))
+                                        (face-list))
+                                nil nil nil
+                                'face-history)))
+    (unless (zerop (length answer))
+      (widget-value-set widget (intern answer))
+      (widget-apply widget :notify widget event)
+      (widget-setup))))
+
+;;; The `hook' Widget.
+
+(define-widget 'hook 'list
+  "A emacs lisp hook"
+  :value-to-internal (lambda (widget value)
+                      (if (symbolp value)
+                          (list value)
+                        value))
+  :match (lambda (widget value)
+          (or (symbolp value)
+              (widget-group-match widget value)))
+  :convert-widget 'custom-hook-convert-widget
+  :tag "Hook")
+
+(defun custom-hook-convert-widget (widget)
+  ;; Handle `:custom-options'.
+  (let* ((options (widget-get widget :options))
+        (other `(editable-list :inline t
+                               :entry-format "%i %d%v"
+                               (function :format " %v")))
+        (args (if options
+                  (list `(checklist :inline t
+                                    ,@(mapcar (lambda (entry)
+                                                `(function-item ,entry))
+                                              options))
+                        other)
+                (list other))))
+    (widget-put widget :args args)
+    widget))
+
+;;; The `plist' Widget.
+
+(define-widget 'plist 'list
+  "A property list."
+  :match (lambda (widget value)
+          (valid-plist-p value))
+  :convert-widget 'custom-plist-convert-widget
+  :tag "Property List")
+
+;; #### Should handle options better.
+(defun custom-plist-convert-widget (widget)
+  (let* ((options (widget-get widget :options))
+        (other `(editable-list :inline t
+                               (group :inline t
+                                      (symbol :format "%t: %v "
+                                              :size 10
+                                              :tag "Property")
+                                      (sexp :tag "Value"))))
+        (args
+         (if options
+             `((checklist :inline t
+                          ,@(mapcar 'custom-plist-process-option options))
+               ,other)
+           (list other))))
+    (widget-put widget :args args)
+    widget))
+
+(defun custom-plist-process-option (entry)
+  `(group :inline t
+         (const :tag "Property"
+                :format "%t: %v "
+                :size 10
+                ,entry)
+         (sexp :tag "Value")))
+
+;;; The `custom-group-link' Widget.
+
+(define-widget 'custom-group-link 'link
+  "Show parent in other window when activated."
+  :help-echo 'custom-group-link-help-echo
+  :action 'custom-group-link-action)
+
+(defun custom-group-link-help-echo (widget)
+  (concat "Create customization buffer for the `"
+         (custom-unlispify-tag-name (widget-value widget))
+         "' group"))
+
+(defun custom-group-link-action (widget &rest ignore)
+  (customize-group (widget-value widget)))
+
+;;; The `custom-group' Widget.
+
+(defcustom custom-group-tag-faces nil
+  ;; In XEmacs, this ought to play games with font size.
+  "Face used for group tags.
+The first member is used for level 1 groups, the second for level 2,
+and so forth.  The remaining group tags are shown with
+`custom-group-tag-face'."
+  :type '(repeat face)
+  :group 'custom-faces)
+
+(defface custom-group-tag-face-1 '((((class color)
+                                    (background dark))
+                                   (:foreground "pink" :underline t))
+                                  (((class color)
+                                    (background light))
+                                   (:foreground "red" :underline t))
+                                  (t (:underline t)))
+  "Face used for group tags.")
+
+(defface custom-group-tag-face '((((class color)
+                                  (background dark))
+                                 (:foreground "light blue" :underline t))
+                                (((class color)
+                                  (background light))
+                                 (:foreground "blue" :underline t))
+                                (t (:underline t)))
+  "Face used for low level group tags."
+  :group 'custom-faces)
+
+(define-widget 'custom-group 'custom
+  "Customize group."
+  :format "%v"
+  :sample-face-get 'custom-group-sample-face-get
+  :documentation-property 'group-documentation
+  :help-echo "Set or reset all members of this group"
+  :value-create 'custom-group-value-create
+  :action 'custom-group-action
+  :custom-category 'group
+  :custom-set 'custom-group-set
+  :custom-save 'custom-group-save
+  :custom-reset-current 'custom-group-reset-current
+  :custom-reset-saved 'custom-group-reset-saved
+  :custom-reset-standard 'custom-group-reset-standard
+  :custom-menu 'custom-group-menu-create)
+
+(defun custom-group-sample-face-get (widget)
+  ;; Use :sample-face.
+  (or (nth (1- (widget-get widget :custom-level)) custom-group-tag-faces)
+      'custom-group-tag-face))
+
+(define-widget 'custom-group-visibility 'visibility
+  "An indicator and manipulator for hidden group contents."
+  :create 'custom-group-visibility-create)
+
+(defun custom-group-visibility-create (widget)
+  (let ((visible (widget-value widget)))
+    (if visible
+       (insert "--------")))
+  (widget-default-create widget))
+
+(defun custom-group-members (symbol groups-only)
+  "Return SYMBOL's custom group members.
+If GROUPS-ONLY non-nil, return only those members that are groups."
+  (if (not groups-only)
+      (get symbol 'custom-group)
+    (let (members)
+      (dolist (entry (get symbol 'custom-group) (nreverse members))
+       (when (eq (nth 1 entry) 'custom-group)
+         (push entry members))))))
+
+(defun custom-group-value-create (widget)
+  "Insert a customize group for WIDGET in the current buffer."
+  (let* ((state (widget-get widget :custom-state))
+        (level (widget-get widget :custom-level))
+        ;; (indent (widget-get widget :indent))
+        (prefix (widget-get widget :custom-prefix))
+        (buttons (widget-get widget :buttons))
+        (tag (widget-get widget :tag))
+        (symbol (widget-value widget))
+        (members (custom-group-members symbol
+                                       (and (eq custom-buffer-style 'tree)
+                                            custom-browse-only-groups))))
+    (cond ((and (eq custom-buffer-style 'tree)
+               (eq state 'hidden)
+               (or members (custom-unloaded-widget-p widget)))
+          (custom-browse-insert-prefix prefix)
+          (push (widget-create-child-and-convert
+                 widget 'custom-browse-visibility
+                 ;; :tag-glyph "plus"
+                 :tag "+")
+                buttons)
+          (insert "-- ")
+          ;; (widget-glyph-insert nil "-- " "horizontal")
+          (push (widget-create-child-and-convert
+                 widget 'custom-browse-group-tag)
+                buttons)
+          (insert " " tag "\n")
+          (widget-put widget :buttons buttons))
+         ((and (eq custom-buffer-style 'tree)
+               (zerop (length members)))
+          (custom-browse-insert-prefix prefix)
+          (insert "[ ]-- ")
+          ;; (widget-glyph-insert nil "[ ]" "empty")
+          ;; (widget-glyph-insert nil "-- " "horizontal")
+          (push (widget-create-child-and-convert
+                 widget 'custom-browse-group-tag)
+                buttons)
+          (insert " " tag "\n")
+          (widget-put widget :buttons buttons))
+         ((eq custom-buffer-style 'tree)
+          (custom-browse-insert-prefix prefix)
+          (custom-load-widget widget)
+          (if (zerop (length members))
+              (progn
+                (custom-browse-insert-prefix prefix)
+                (insert "[ ]-- ")
+                ;; (widget-glyph-insert nil "[ ]" "empty")
+                ;; (widget-glyph-insert nil "-- " "horizontal")
+                (push (widget-create-child-and-convert
+                       widget 'custom-browse-group-tag)
+                      buttons)
+                (insert " " tag "\n")
+                (widget-put widget :buttons buttons))
+            (push (widget-create-child-and-convert
+                   widget 'custom-browse-visibility
+                   ;; :tag-glyph "minus"
+                   :tag "-")
+                  buttons)
+            (insert "-\\ ")
+            ;; (widget-glyph-insert nil "-\\ " "top")
+            (push (widget-create-child-and-convert
+                   widget 'custom-browse-group-tag)
+                  buttons)
+            (insert " " tag "\n")
+            (widget-put widget :buttons buttons)
+            (message "Creating group...")
+            (let* ((members (custom-sort-items members
+                             custom-browse-sort-alphabetically
+                             custom-browse-order-groups))
+                   (prefixes (widget-get widget :custom-prefixes))
+                   (custom-prefix-list (custom-prefix-add symbol prefixes))
+                   (extra-prefix (if (widget-get widget :custom-last)
+                                     "   "
+                                   " | "))
+                   (prefix (concat prefix extra-prefix))
+                   children entry)
+              (while members
+                (setq entry (car members)
+                      members (cdr members))
+                (push (widget-create-child-and-convert
+                       widget (nth 1 entry)
+                       :group widget
+                       :tag (custom-unlispify-tag-name (nth 0 entry))
+                       :custom-prefixes custom-prefix-list
+                       :custom-level (1+ level)
+                       :custom-last (null members)
+                       :value (nth 0 entry)
+                       :custom-prefix prefix)
+                      children))
+              (widget-put widget :children (reverse children)))
+            (message "Creating group...done")))
+         ;; Nested style.
+         ((eq state 'hidden)
+          ;; Create level indicator.
+          (unless (eq custom-buffer-style 'links)
+            (insert-char ?\  (* custom-buffer-indent (1- level)))
+            (insert "-- "))
+          ;; Create link indicator.
+          (when (eq custom-buffer-style 'links)
+            (insert " ")
+            (push (widget-create-child-and-convert
+                   widget 'custom-group-link
+                   :tag "Open"
+                   :tag-glyph '("open-up" "open-down")
+                   symbol)
+                  buttons)
+            (insert " "))
+          ;; Create tag.
+          (let ((begin (point)))
+            (insert tag)
+            (widget-specify-sample widget begin (point)))
+          (insert " group")
+          ;; Create visibility indicator.
+          (unless (eq custom-buffer-style 'links)
+            (insert ": ")
+            (push (widget-create-child-and-convert
+                   widget 'custom-group-visibility
+                   :help-echo "Show members of this group"
+                   :action 'custom-toggle-parent
+                   (not (eq state 'hidden)))
+                  buttons))
+          (insert " \n")
+          ;; Create magic button.
+          (let ((magic (widget-create-child-and-convert
+                        widget 'custom-magic nil)))
+            (widget-put widget :custom-magic magic)
+            (push magic buttons))
+          ;; Update buttons.
+          (widget-put widget :buttons buttons)
+          ;; Insert documentation.
+          (if (and (eq custom-buffer-style 'links) (> level 1))
+              (widget-put widget :documentation-indent 0))
+          (widget-default-format-handler widget ?h))
+         ;; Nested style.
+         (t                            ;Visible.
+          (custom-load-widget widget)
+          ;; Update members
+          (setq members (custom-group-members
+                         symbol (and (eq custom-buffer-style 'tree)
+                                     custom-browse-only-groups)))
+          ;; Add parent groups references above the group.
+          (if t    ;;; This should test that the buffer
+                   ;;; was made to display a group.
+              (when (eq level 1)
+                (if (custom-add-parent-links widget
+                                             "Go to parent group:")
+                    (insert "\n"))))
+          ;; Create level indicator.
+          (insert-char ?\  (* custom-buffer-indent (1- level)))
+          (insert "/- ")
+          ;; Create tag.
+          (let ((start (point)))
+            (insert tag)
+            (widget-specify-sample widget start (point)))
+          (insert " group: ")
+          ;; Create visibility indicator.
+          (unless (eq custom-buffer-style 'links)
+            (insert "--------")
+            (push (widget-create-child-and-convert
+                   widget 'visibility
+                   :help-echo "Hide members of this group"
+                   :action 'custom-toggle-parent
+                   (not (eq state 'hidden)))
+                  buttons)
+            (insert " "))
+          ;; Create more dashes.
+          ;; Use 76 instead of 75 to compensate for the temporary "<"
+          ;; added by `widget-insert'.
+          (insert-char ?- (- 76 (current-column)
+                             (* custom-buffer-indent level)))
+          (insert "\\\n")
+          ;; Create magic button.
+          (let ((magic (widget-create-child-and-convert
+                        widget 'custom-magic
+                        :indent 0
+                        nil)))
+            (widget-put widget :custom-magic magic)
+            (push magic buttons))
+          ;; Update buttons.
+          (widget-put widget :buttons buttons)
+          ;; Insert documentation.
+          (widget-default-format-handler widget ?h)
+          ;; Parent groups.
+          (if nil  ;;; This should test that the buffer
+                   ;;; was not made to display a group.
+              (when (eq level 1)
+                (insert-char ?\  custom-buffer-indent)
+                (custom-add-parent-links widget)))
+          (custom-add-see-also widget
+                               (make-string (* custom-buffer-indent level)
+                                            ?\ ))
+          ;; Members.
+          (message "Creating group...")
+          (let* ((members (custom-sort-items members
+                                             custom-buffer-sort-alphabetically
+                                             custom-buffer-order-groups))
+                 (prefixes (widget-get widget :custom-prefixes))
+                 (custom-prefix-list (custom-prefix-add symbol prefixes))
+                 (length (length members))
+                 (count 0)
+                 (children (mapcar
+                            (lambda (entry)
+                              (widget-insert "\n")
+                              (when (zerop (% count custom-skip-messages))
+                                (display-message
+                                 'progress
+                                 (format "\
+Creating group members... %2d%%"
+                                         (/ (* 100.0 count) length))))
+                              (incf count)
+                              (prog1
+                                  (widget-create-child-and-convert
+                                   widget (nth 1 entry)
+                                   :group widget
+                                   :tag (custom-unlispify-tag-name
+                                         (nth 0 entry))
+                                   :custom-prefixes custom-prefix-list
+                                   :custom-level (1+ level)
+                                   :value (nth 0 entry))
+                                (unless (eq (preceding-char) ?\n)
+                                  (widget-insert "\n"))))
+                            members)))
+            (message "Creating group magic...")
+            (mapc 'custom-magic-reset children)
+            (message "Creating group state...")
+            (widget-put widget :children children)
+            (custom-group-state-update widget)
+            (message "Creating group... done"))
+          ;; End line
+          (insert "\n")
+          (insert-char ?\  (* custom-buffer-indent (1- level)))
+          (insert "\\- " (widget-get widget :tag) " group end ")
+          (insert-char ?- (- 75 (current-column) (* custom-buffer-indent level)))
+          (insert "/\n")))))
+
+(defvar custom-group-menu
+  '(("Set for Current Session" custom-group-set
+     (lambda (widget)
+       (eq (widget-get widget :custom-state) 'modified)))
+    ("Save for Future Sessions" custom-group-save
+     (lambda (widget)
+       (memq (widget-get widget :custom-state) '(modified set))))
+    ("Reset to Current" custom-group-reset-current
+     (lambda (widget)
+       (memq (widget-get widget :custom-state) '(modified))))
+    ("Reset to Saved" custom-group-reset-saved
+     (lambda (widget)
+       (memq (widget-get widget :custom-state) '(modified set))))
+    ("Reset to standard setting" custom-group-reset-standard
+     (lambda (widget)
+       (memq (widget-get widget :custom-state) '(modified set saved)))))
+  "Alist of actions for the `custom-group' widget.
+Each entry has the form (NAME ACTION FILTER) where NAME is the name of
+the menu entry, ACTION is the function to call on the widget when the
+menu is selected, and FILTER is a predicate which takes a `custom-group'
+widget as an argument, and returns non-nil if ACTION is valid on that
+widget. If FILTER is nil, ACTION is always valid.")
+
+(defun custom-group-action (widget &optional event)
+  "Show the menu for `custom-group' WIDGET.
+Optional EVENT is the location for the menu."
+  (if (eq (widget-get widget :custom-state) 'hidden)
+      (custom-toggle-hide widget)
+    (let* ((completion-ignore-case t)
+          (answer (widget-choose (concat "Operation on "
+                                         (custom-unlispify-tag-name
+                                          (widget-get widget :value)))
+                                 (custom-menu-filter custom-group-menu
+                                                     widget)
+                                 event)))
+      (if answer
+         (funcall answer widget)))))
+
+(defun custom-group-set (widget)
+  "Set changes in all modified group members."
+  (let ((children (widget-get widget :children)))
+    (mapc (lambda (child)
+           (when (eq (widget-get child :custom-state) 'modified)
+             (widget-apply child :custom-set)))
+         children)))
+
+(defun custom-group-save (widget)
+  "Save all modified group members."
+  (let ((children (widget-get widget :children)))
+    (mapc (lambda (child)
+           (when (memq (widget-get child :custom-state) '(modified set))
+             (widget-apply child :custom-save)))
+         children)))
+
+(defun custom-group-reset-current (widget)
+  "Reset all modified group members."
+  (let ((children (widget-get widget :children)))
+    (mapc (lambda (child)
+           (when (eq (widget-get child :custom-state) 'modified)
+             (widget-apply child :custom-reset-current)))
+         children)))
+
+(defun custom-group-reset-saved (widget)
+  "Reset all modified or set group members."
+  (let ((children (widget-get widget :children)))
+    (mapc (lambda (child)
+           (when (memq (widget-get child :custom-state) '(modified set))
+             (widget-apply child :custom-reset-saved)))
+         children)))
+
+(defun custom-group-reset-standard (widget)
+  "Reset all modified, set, or saved group members."
+  (let ((children (widget-get widget :children)))
+    (mapc (lambda (child)
+           (when (memq (widget-get child :custom-state)
+                       '(modified set saved))
+             (widget-apply child :custom-reset-standard)))
+         children)))
+
+(defun custom-group-state-update (widget)
+  "Update magic."
+  (unless (eq (widget-get widget :custom-state) 'hidden)
+    (let* ((children (widget-get widget :children))
+          (states (mapcar (lambda (child)
+                            (widget-get child :custom-state))
+                          children))
+          (magics custom-magic-alist)
+          (found 'standard))
+      (while magics
+       (let ((magic (car (car magics))))
+         (if (and (not (eq magic 'hidden))
+                  (memq magic states))
+             (setq found magic
+                   magics nil)
+           (setq magics (cdr magics)))))
+      (widget-put widget :custom-state found)))
+  (custom-magic-reset widget))
+
+;;; The `custom-save-all' Function.
+;;;###autoload
+(defcustom custom-file "~/.emacs"
+  "File used for storing customization information.
+If you change this from the default \"~/.emacs\" you need to
+explicitly load that file for the settings to take effect."
+  :type 'file
+  :group 'customize)
+
+(defun custom-save-delete (symbol)
+  "Delete the call to SYMBOL form `custom-file'.
+Leave point at the location of the call, or after the last expression."
+  (let ((find-file-hooks nil)
+       (auto-mode-alist nil))
+    (set-buffer (find-file-noselect custom-file)))
+  (goto-char (point-min))
+  (catch 'found
+    (while t
+      (let ((sexp (condition-case nil
+                     (read (current-buffer))
+                   (end-of-file (throw 'found nil)))))
+       (when (and (listp sexp)
+                  (eq (car sexp) symbol))
+         (delete-region (save-excursion
+                          (backward-sexp)
+                          (point))
+                        (point))
+         (throw 'found nil))))))
+
+(defun custom-save-variables ()
+  "Save all customized variables in `custom-file'."
+  (save-excursion
+    (custom-save-delete 'custom-set-variables)
+    (let ((standard-output (current-buffer)))
+      (unless (bolp)
+       (princ "\n"))
+      (princ "(custom-set-variables")
+      (mapatoms (lambda (symbol)
+                 (let ((value (get symbol 'saved-value))
+                       (requests (get symbol 'custom-requests))
+                       (now (not (or (get symbol 'standard-value)
+                                     (and (not (boundp symbol))
+                                          (not (get symbol 'force-value)))))))
+                   (when value
+                     (princ "\n '(")
+                     (princ symbol)
+                     (princ " ")
+                     (prin1 (car value))
+                     (cond (requests
+                            (if now
+                                (princ " t ")
+                              (princ " nil "))
+                            (prin1 requests)
+                            (princ ")"))
+                           (now
+                            (princ " t)"))
+                           (t
+                            (princ ")")))))))
+      (princ ")")
+      (unless (looking-at "\n")
+       (princ "\n")))))
+
+(defun custom-save-faces ()
+  "Save all customized faces in `custom-file'."
+  (save-excursion
+    (custom-save-delete 'custom-set-faces)
+    (let ((standard-output (current-buffer)))
+      (unless (bolp)
+       (princ "\n"))
+      (princ "(custom-set-faces")
+      (let ((value (get 'default 'saved-face)))
+       ;; The default face must be first, since it affects the others.
+       (when value
+         (princ "\n '(default ")
+         (prin1 value)
+         (if (or (get 'default 'face-defface-spec)
+                 (and (not (find-face 'default))
+                      (not (get 'default 'force-face))))
+             (princ ")")
+           (princ " t)"))))
+      (mapatoms (lambda (symbol)
+                 (let ((value (get symbol 'saved-face)))
+                   (when (and (not (eq symbol 'default))
+                              ;; Don't print default face here.
+                              value)
+                     (princ "\n '(")
+                     (princ symbol)
+                     (princ " ")
+                     (prin1 value)
+                     (if (or (get symbol 'face-defface-spec)
+                             (and (not (find-face symbol))
+                                  (not (get symbol 'force-face))))
+                         (princ ")")
+                       (princ " t)"))))))
+      (princ ")")
+      (unless (looking-at "\n")
+       (princ "\n")))))
+
+;;;###autoload
+(defun customize-save-customized ()
+  "Save all user options which have been set in this session."
+  (interactive)
+  (mapatoms (lambda (symbol)
+             (let ((face (get symbol 'customized-face))
+                   (value (get symbol 'customized-value)))
+               (when face
+                 (put symbol 'saved-face face)
+                 (put symbol 'customized-face nil))
+               (when value
+                 (put symbol 'saved-value value)
+                 (put symbol 'customized-value nil)))))
+  ;; We really should update all custom buffers here.
+  (custom-save-all))
+
+;;;###autoload
+(defun custom-save-all ()
+  "Save all customizations in `custom-file'."
+  (let ((inhibit-read-only t))
+    (custom-save-variables)
+    (custom-save-faces)
+    (let ((find-file-hooks nil)
+         (auto-mode-alist))
+      (with-current-buffer (find-file-noselect custom-file)
+       (save-buffer)))))
+
+\f
+;;; The Customize Menu.
+
+;;; Menu support
+
+(defun custom-face-menu-create (widget symbol)
+  "Ignoring WIDGET, create a menu entry for customization face SYMBOL."
+  (vector (custom-unlispify-menu-entry symbol)
+         `(customize-face ',symbol)
+         t))
+
+(defun custom-variable-menu-create (widget symbol)
+  "Ignoring WIDGET, create a menu entry for customization variable SYMBOL."
+  (let ((type (get symbol 'custom-type)))
+    (unless (listp type)
+      (setq type (list type)))
+    (if (and type (widget-get type :custom-menu))
+       (widget-apply type :custom-menu symbol)
+      (vector (custom-unlispify-menu-entry symbol)
+             `(customize-variable ',symbol)
+             t))))
+
+;; Add checkboxes to boolean variable entries.
+(widget-put (get 'boolean 'widget-type)
+           :custom-menu (lambda (widget symbol)
+                          `[,(custom-unlispify-menu-entry symbol)
+                            (customize-variable ',symbol)
+                            :style toggle
+                            :selected ,symbol]))
+
+;; XEmacs can create menus dynamically.
+(defun custom-group-menu-create (widget symbol)
+  "Ignoring WIDGET, create a menu entry for customization group SYMBOL."
+  `( ,(custom-unlispify-menu-entry symbol t)
+     :filter (lambda (&rest junk)
+              (let ((item (custom-menu-create ',symbol)))
+                (if (listp item)
+                    (cdr item)
+                  (list item))))))
+
+;;;###autoload
+(defun custom-menu-create (symbol)
+  "Create menu for customization group SYMBOL.
+The menu is in a format applicable to `easy-menu-define'."
+  (let* ((item (vector (custom-unlispify-menu-entry symbol)
+                      `(customize-group ',symbol)
+                      t)))
+    ;; Item is the entry for creating a menu buffer for SYMBOL.
+    ;; We may nest, if the menu is not too big.
+    (custom-load-symbol symbol)
+    (if (< (length (get symbol 'custom-group)) widget-menu-max-size)
+       ;; The menu is not too big.
+       (let ((custom-prefix-list (custom-prefix-add symbol
+                                                    custom-prefix-list))
+             (members (custom-sort-items (get symbol 'custom-group)
+                                         custom-menu-sort-alphabetically
+                                         custom-menu-order-groups)))
+         ;; Create the menu.
+         `(,(custom-unlispify-menu-entry symbol t)
+           ,item
+           "--"
+           ,@(mapcar (lambda (entry)
+                       (widget-apply (if (listp (nth 1 entry))
+                                         (nth 1 entry)
+                                       (list (nth 1 entry)))
+                                     :custom-menu (nth 0 entry)))
+                     members)))
+      ;; The menu was too big.
+      item)))
+
+;;;###autoload
+(defun customize-menu-create (symbol &optional name)
+  "Return a customize menu for customization group SYMBOL.
+If optional NAME is given, use that as the name of the menu.
+Otherwise the menu will be named `Customize'.
+The format is suitable for use with `easy-menu-define'."
+  (unless name
+    (setq name "Customize"))
+  `(,name
+    :filter (lambda (&rest junk)
+             (cdr (custom-menu-create ',symbol)))))
+
+;;; The Custom Mode.
+
+(defvar custom-mode-map nil
+  "Keymap for `custom-mode'.")
+
+(unless custom-mode-map
+  (setq custom-mode-map (make-sparse-keymap))
+  (set-keymap-parents custom-mode-map widget-keymap)
+  (suppress-keymap custom-mode-map)
+  (define-key custom-mode-map " " 'scroll-up)
+  (define-key custom-mode-map [delete] 'scroll-down)
+  (define-key custom-mode-map "q" 'Custom-buffer-done)
+  (define-key custom-mode-map "u" 'Custom-goto-parent)
+  (define-key custom-mode-map "n" 'widget-forward)
+  (define-key custom-mode-map "p" 'widget-backward))
+
+(easy-menu-define Custom-mode-menu
+    custom-mode-map
+  "Menu used in customization buffers."
+  `("Custom"
+    ,(customize-menu-create 'customize)
+    ["Set" Custom-set t]
+    ["Save" Custom-save t]
+    ["Reset to Current" Custom-reset-current t]
+    ["Reset to Saved" Custom-reset-saved t]
+    ["Reset to Standard Settings" Custom-reset-standard t]
+    ["Info" (Info-goto-node "(xemacs)Easy Customization") t]))
+
+(defun Custom-goto-parent ()
+  "Go to the parent group listed at the top of this buffer.
+If several parents are listed, go to the first of them."
+  (interactive)
+  (save-excursion
+    (goto-char (point-min))
+    (if (search-forward "\nGo to parent group: " nil t)
+       (let* ((button (get-char-property (point) 'button))
+              (parent (downcase (widget-get  button :tag))))
+         (customize-group parent)))))
+
+(defcustom custom-mode-hook nil
+  "Hook called when entering custom-mode."
+  :type 'hook
+  :group 'custom-buffer )
+
+(defun custom-state-buffer-message (widget)
+  (if (eq (widget-get (widget-get widget :parent) :custom-state) 'modified)
+      (message
+       "To install your edits, invoke [State] and choose the Set operation")))
+
+(defun custom-mode ()
+  "Major mode for editing customization buffers.
+
+The following commands are available:
+
+Move to next button or editable field.     \\[widget-forward]
+Move to previous button or editable field. \\[widget-backward]
+\\<widget-field-keymap>\
+Complete content of editable text field.   \\[widget-complete]
+\\<custom-mode-map>\
+Invoke button under point.                \\[widget-button-press]
+Set all modifications.                    \\[Custom-set]
+Make all modifications default.                   \\[Custom-save]
+Reset all modified options.               \\[Custom-reset-current]
+Reset all modified or set options.        \\[Custom-reset-saved]
+Reset all options.                        \\[Custom-reset-standard]
+
+Entry to this mode calls the value of `custom-mode-hook'
+if that value is non-nil."
+  (kill-all-local-variables)
+  (setq major-mode 'custom-mode
+       mode-name "Custom")
+  (use-local-map custom-mode-map)
+  (easy-menu-add Custom-mode-menu)
+  (make-local-variable 'custom-options)
+  (make-local-variable 'widget-documentation-face)
+  (setq widget-documentation-face 'custom-documentation-face)
+  (make-local-variable 'widget-button-face)
+  (setq widget-button-face 'custom-button-face)
+  (make-local-hook 'widget-edit-functions)
+  (add-hook 'widget-edit-functions 'custom-state-buffer-message nil t)
+  (run-hooks 'custom-mode-hook))
+
+\f
+;;; The End.
+
+(provide 'cus-edit)
+
+;; cus-edit.el ends here
diff --git a/lisp/cus-face.el b/lisp/cus-face.el
new file mode 100644 (file)
index 0000000..09e7771
--- /dev/null
@@ -0,0 +1,255 @@
+;;; cus-face.el -- Support for Custom faces.
+;;
+;; Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+;;
+;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
+;; Maintainer: Hrvoje Niksic <hniksic@srce.hr>
+;; Keywords: help, faces
+;; Version: 1.9960-x
+;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
+
+;;; Commentary:
+;;
+;; See `custom.el'.
+
+;; This file should probably be dissolved, and code moved to faces.el,
+;; like Stallman did.
+
+;;; Code:
+
+(require 'custom)
+
+;; To elude the warnings for font functions.
+(eval-when-compile
+  (require 'font))
+
+;;; Declaring a face.
+
+;;;###autoload
+(defun custom-declare-face (face spec doc &rest args)
+  "Like `defface', but FACE is evaluated as a normal argument."
+  ;; (when (fboundp 'pureload)
+    ;; (error "Attempt to declare a face during dump"))
+  (unless (get face 'face-defface-spec)
+    (put face 'face-defface-spec spec)
+    (unless (find-face face)
+      ;; If the user has already created the face, respect that.
+      (let ((value (or (get face 'saved-face) spec))
+           (frames (relevant-custom-frames))
+           frame)
+       ;; Create global face.
+       (make-empty-face face)
+       (face-display-set face value)
+       ;; Create frame local faces
+       (while frames
+         (setq frame (car frames)
+               frames (cdr frames))
+         (face-display-set face value frame))
+       (init-face-from-resources face)))
+    (when (and doc (null (face-doc-string face)))
+      (set-face-doc-string face doc))
+    (custom-handle-all-keywords face args 'custom-face)
+    (run-hooks 'custom-define-hook))
+  face)
+
+;;; Font Attributes.
+
+(defconst custom-face-attributes
+  '((:foreground (color :tag "Foreground"
+                       :value ""
+                       :help-echo "Set foreground color.")
+                set-face-foreground face-foreground-name)
+    (:background (color :tag "Background"
+                       :value ""
+                       :help-echo "Set background color.")
+                set-face-background face-background-name)
+    (:size (editable-field :format "Size: %v"
+                          :help-echo "\
+Text size (e.g. 9pt or 2mm).")
+          custom-set-face-font-size custom-face-font-size)
+    (:stipple (editable-field :format "Stipple: %v"
+                             :help-echo "Name of background bitmap file.")
+             set-face-stipple custom-face-stipple)
+    (:family (editable-field :format "Font Family: %v"
+                            :help-echo "\
+Name of font family to use (e.g. times).") 
+            custom-set-face-font-family custom-face-font-family)
+    (:bold (toggle :format "%[Bold%]: %v\n"
+                  :help-echo "Control whether a bold font should be used.")
+          custom-set-face-bold custom-face-bold)
+    (:italic (toggle :format "%[Italic%]: %v\n"
+                    :help-echo "\
+Control whether an italic font should be used.")
+            custom-set-face-italic custom-face-italic)
+    (:underline (toggle :format "%[Underline%]: %v\n"
+                       :help-echo "\
+Control whether the text should be underlined.")
+               set-face-underline-p face-underline-p)
+    ;; #### Should make it work on X
+    (:strikethru (toggle :format "%[Strikethru%]: %v\n"
+                        :help-echo "\
+Control whether the text should be strikethru.")
+                set-face-strikethru-p face-strikethru-p)
+    (:inverse-video (toggle :format "%[Inverse Video%]: %v\n"
+                           :help-echo "\
+Control whether the text should be inverted.  Works only on TTY-s")
+                   set-face-reverse-p face-reverse-p))
+  "Alist of face attributes. 
+
+The elements are of the form (KEY TYPE SET GET) where KEY is a symbol
+identifying the attribute, TYPE is a widget type for editing the
+attibute, SET is a function for setting the attribute value, and GET is a function for getiing the attribute value. 
+
+The SET function should take three arguments, the face to modify, the
+value of the attribute, and optionally the frame where the face should
+be changed.
+
+The GET function should take two arguments, the face to examine, and
+optonally the frame where the face should be examined.")
+
+(defun face-custom-attributes-set (face frame &rest atts)
+  "For FACE on FRAME set the attributes [KEYWORD VALUE]....
+Each keyword should be listed in `custom-face-attributes'.
+
+If FRAME is nil, set the default face."
+  (while atts
+    (let* ((name (nth 0 atts))
+          (value (nth 1 atts))
+          (fun (nth 2 (assq name custom-face-attributes))))
+      (setq atts (cdr (cdr atts)))
+      (condition-case nil
+         (funcall fun face value frame)
+       (error nil)))))
+
+(defun face-custom-attributes-get (face frame)
+  "For FACE on FRAME get the attributes [KEYWORD VALUE]....
+Each keyword should be listed in `custom-face-attributes'.
+
+If FRAME is nil, use the default face."
+  (condition-case nil
+      ;; Attempt to get `font.el' from w3.
+      (require 'font)
+    (error nil))
+  (let ((atts custom-face-attributes)
+       att result get)
+    (while atts
+      (setq att (car atts)
+           atts (cdr atts)
+           get (nth 3 att))
+      (condition-case nil
+         ;; This may fail if w3 doesn't exist.
+         (when get
+           (let ((answer (funcall get face frame)))
+             (unless (equal answer (funcall get 'default frame))
+               (when (widget-apply (nth 1 att) :match answer)
+                 (setq result (cons (nth 0 att) (cons answer result)))))))
+       (error nil)))
+    result))
+
+(defun custom-set-face-bold (face value &optional frame)
+  "Set the bold property of FACE to VALUE."
+  (if value
+      (make-face-bold face frame)
+    (make-face-unbold face frame)))
+
+;; Really, we should get rid of these font.el dependencies...  They
+;; are still presenting a problem with dumping the faces (font.el is
+;; too bloated for us to dump).  I am thinking about hacking up
+;; font-like functionality myself for the sake of this file.  It will
+;; probably be to-the-point and more efficient.
+
+(defun custom-face-bold (face &rest args)
+  "Return non-nil if the font of FACE is bold."
+  (let* ((font (apply 'face-font-name face args))
+        ;; Gag
+        (fontobj (font-create-object font)))
+    (font-bold-p fontobj)))
+
+(defun custom-set-face-italic (face value &optional frame)
+  "Set the italic property of FACE to VALUE."
+  (if value
+      (make-face-italic face frame)
+    (make-face-unitalic face frame)))
+
+(defun custom-face-italic (face &rest args)
+  "Return non-nil if the font of FACE is italic."
+  (let* ((font (apply 'face-font-name face args))
+        ;; Gag
+        (fontobj (font-create-object font)))
+    (font-italic-p fontobj)))
+
+(defun custom-face-stipple (face &rest args)
+  "Return the name of the stipple file used for FACE."
+  (let ((image  (apply 'specifier-instance 
+                      (face-background-pixmap face) args)))
+    (and image 
+        (image-instance-file-name image))))
+
+(defun custom-set-face-font-size (face size &rest args)
+  "Set the font of FACE to SIZE"
+  (let* ((font (apply 'face-font-name face args))
+        ;; Gag
+        (fontobj (font-create-object font)))
+    (set-font-size fontobj size)
+    (apply 'font-set-face-font face fontobj args)))
+
+(defun custom-face-font-size (face &rest args)
+  "Return the size of the font of FACE as a string."
+  (let* ((font (apply 'face-font-name face args))
+        ;; Gag
+        (fontobj (font-create-object font)))
+    (format "%s" (font-size fontobj))))
+
+(defun custom-set-face-font-family (face family &rest args)
+  "Set the font of FACE to FAMILY."
+  (let* ((font (apply 'face-font-name face args))
+        ;; Gag
+        (fontobj (font-create-object font)))
+    (set-font-family fontobj family)
+    (apply 'font-set-face-font face fontobj args)))
+
+(defun custom-face-font-family (face &rest args)
+  "Return the name of the font family of FACE."
+  (let* ((font (apply 'face-font-name face args))
+        ;; Gag
+        (fontobj (font-create-object font)))
+    (font-family fontobj)))
+
+;;; Initializing.
+
+;;;###autoload
+(defun custom-set-faces (&rest args)
+  "Initialize faces according to user preferences.
+The arguments should be a list where each entry has the form:
+
+  (FACE SPEC [NOW])
+
+SPEC will be stored as the saved value for FACE.  If NOW is present
+and non-nil, FACE will also be created according to SPEC.
+
+See `defface' for the format of SPEC."
+  (while args
+    (let ((entry (car args)))
+      (if (listp entry)
+         (let ((face (nth 0 entry))
+               (spec (nth 1 entry))
+               (now (nth 2 entry)))
+           (put face 'saved-face spec)
+           (when now
+             (put face 'force-face t))
+           (when (or now (find-face face))
+             (unless (find-face face)
+               (make-empty-face face))
+             (face-spec-set face spec))
+           (setq args (cdr args)))
+       ;; Old format, a plist of FACE SPEC pairs.
+       (let ((face (nth 0 args))
+             (spec (nth 1 args)))
+         (put face 'saved-face spec))
+       (setq args (cdr (cdr args)))))))
+
+;;; The End.
+
+(provide 'cus-face)
+
+;; cus-face.el ends here
diff --git a/lisp/cus-load.el b/lisp/cus-load.el
new file mode 100644 (file)
index 0000000..28bef12
--- /dev/null
@@ -0,0 +1,63 @@
+;;; cus-load.el --- Batch load all available cus-load files
+
+;; Copyright (C) 1997 by Free Software Foundation, Inc.
+
+;; Author: Steven L Baur <steve@altair.xemacs.org>
+;; Keywords: internal, help, faces
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Not in FSF
+
+;;; Commentary:
+
+;; In FSF all of the custom loads are in a single `cus-load' file.
+;; However, we have them distributed across directories, with optional
+;; incremental loading.  Here we simply collect the whole set.
+
+\f
+;;; Code:
+
+(require 'custom)
+
+(defun custom-add-loads (symbol list)
+  "Update the custom-loads list of a symbol.
+This works by adding the elements from LIST to the SYMBOL's
+`custom-loads' property, avoiding duplicates.  Also, SYMBOL is
+added to `custom-group-hash-table'."
+  (let ((loads (get symbol 'custom-loads)))
+    (dolist (el list)
+      (unless (member el loads)
+       (setq loads (nconc loads (list el)))))
+    (put symbol 'custom-loads loads)
+    (puthash symbol t custom-group-hash-table)))
+
+(message "Loading customization dependencies...")
+
+;; Garbage-collection seems to be very intensive here, and it slows
+;; things down.  Nuke it.
+(let ((gc-cons-threshold most-positive-fixnum))
+  (mapc (lambda (dir)
+         (load (expand-file-name "custom-load" dir) t t))
+       load-path))
+
+(message "Loading customization dependencies...done")
+
+(provide 'cus-load)
+
+;;; cus-load.el ends here
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
new file mode 100644 (file)
index 0000000..8dc92d8
--- /dev/null
@@ -0,0 +1,194 @@
+;;; cus-start.el --- define customization properties of builtins.
+
+;; Copyright (C) 1997 Free Software Foundation, Inc.
+
+;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
+;; Maintainer: XEmacs Development Team
+;; Keywords: internal, dumped
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Not synched with FSF.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; The following code is used to define the customization properties
+;; for builtin variables, and variables in the packages that are
+;; preloaded /very/ early, before custom.el itself (replace.el is such
+;; an example).  The way it handles custom stuff is dirty, and should
+;; be regarded as a last resort.  DO NOT add variables here, unless
+;; you know what you are doing.
+
+;; Must be run before the user has changed the value of any options!
+
+\f
+;;; Code:
+
+(require 'custom)
+
+(let ((all '(;; boolean
+            (abbrev-all-caps abbrev boolean)
+            (allow-deletion-of-last-visible-frame frames boolean)
+            (debug-on-quit debug boolean)
+            (delete-auto-save-files auto-save boolean)
+            (delete-exited-processes processes-basics boolean)
+            (indent-tabs-mode editing-basics boolean)
+            (load-ignore-elc-files maint boolean)
+            (load-warn-when-source-newer maint boolean)
+            (load-warn-when-source-only maint boolean)
+            (modifier-keys-are-sticky keyboard boolean)
+            (no-redraw-on-reenter display boolean)
+            (scroll-on-clipped-lines display boolean)
+            (truncate-partial-width-windows display boolean)
+            (visible-bell sound boolean)
+            (x-allow-sendevents x boolean)
+            (zmacs-regions editing-basics boolean)
+            ;; integer
+            (auto-save-interval auto-save integer)
+            (bell-volume sound integer)
+            (echo-keystrokes keyboard integer)
+            (gc-cons-threshold alloc integer)
+            (next-screen-context-lines display integer)
+            (scroll-conservatively display integer)
+            (scroll-step windows integer)
+            (window-min-height windows integer)
+            (window-min-width windows integer)
+            ;; object
+            (auto-save-file-format auto-save
+                                   (choice (const :tag "Normal" t)
+                                           (repeat (symbol :tag "Format"))))
+            (completion-ignored-extensions minibuffer
+                                           (repeat
+                                            (string :format "%v")))
+            (debug-ignored-errors debug (repeat (choice :format "%v"
+                                                        (symbol :tag "Class")
+                                                        regexp)))
+            (debug-on-error debug  (choice (const :tag "off" nil)
+                                           (const :tag "Always" t)
+                                           (repeat :menu-tag "When"
+                                                   :value (nil)
+                                                   (symbol
+                                                    :tag "Condition"))))
+            (debug-on-signal debug (choice (const :tag "off" nil)
+                                           (const :tag "Always" t)
+                                           (repeat :menu-tag "When"
+                                                   :value (nil)
+                                                   (symbol
+                                                    :tag "Condition"))))
+            (exec-path processes-basics (repeat
+                                         (choice :tag "Directory"
+                                                 (const :tag "Default" nil)
+                                                 (directory :format "%v"))))
+            (file-name-handler-alist data (repeat
+                                           (cons regexp
+                                                 (function :tag "Handler"))))
+            (shell-file-name execute file)
+            (stack-trace-on-error debug (choice (const :tag "off" nil)
+                                           (const :tag "Always" t)
+                                           (repeat :menu-tag "When"
+                                                   :value (nil)
+                                                   (symbol
+                                                    :tag "Condition"))))
+            (stack-trace-on-signal debug (choice (const :tag "off" nil)
+                                           (const :tag "Always" t)
+                                           (repeat :menu-tag "When"
+                                                   :value (nil)
+                                                   (symbol
+                                                    :tag "Condition"))))
+            ;; buffer-local
+            (case-fold-search matching boolean)
+            (ctl-arrow display (choice (integer 160)
+                                       (sexp :tag "160 (default)"
+                                             :format "%t\n")))
+            (fill-column fill integer)
+            (left-margin fill integer)
+            (tab-width editing-basics integer)
+            (truncate-lines display boolean)
+            (overwrite-mode editing-basics ;; for the options menu - dverna
+                            (choice (const :tag "disabled" nil)
+                                    (const :tag "textual"
+                                           'overwrite-mode-textual)
+                                    (const :tag "binary"
+                                           'overwrite-mode-binary)))
+            ;; not documented as user-options, but should still be
+            ;; customizable:
+            (bar-cursor display (choice (const :tag "Block Cursor" nil)
+                                        (const :tag "Bar Cursor (1 pixel)" t)
+                                        (sexp :tag "Bar Cursor (2 pixels)"
+                                              :format "%t\n" 'other)))
+            (default-frame-plist frames plist)
+            (default-tty-frame-plist frames plist)
+            (default-x-frame-plist frames plist)
+            (disable-auto-save-when-buffer-shrinks auto-save boolean)
+            (find-file-use-truenames find-file boolean)
+            (find-file-compare-truenames find-file boolean)
+            (focus-follows-mouse x boolean)
+            (help-char keyboard (choice character
+                                        (sexp :tag "Single key specifier")))
+            (max-lisp-eval-depth limits integer)
+            (max-specpdl-size limits integer)
+            (meta-prefix-char keyboard character)
+            (parse-sexp-ignore-comments editing-basics boolean)
+            (selective-display display 
+                               (choice (const :tag "off" nil)
+                                       (integer :tag "space"
+                                                :format "%v"
+                                                1)
+                                       (const :tag "on" t)))
+            (selective-display-ellipses display boolean)
+            (signal-error-on-buffer-boundary internal boolean)
+            (temp-buffer-show-function
+             windows (radio (function-item :tag "Temp Buffers Always in Same Frame"
+                                           :format "%t\n"
+                                           show-temp-buffer-in-current-frame)
+                            (const :tag "Temp Buffers Like Other Buffers" nil)
+                            (function :tag "Other")))
+            (undo-threshold undo integer)
+            (undo-high-threshold undo integer)
+            (words-include-escapes editing-basics boolean)
+            ;; These are from replace.el, which is loaded too early
+            ;; to be customizable.
+            (case-replace matching boolean)
+            (query-replace-highlight matching boolean)
+            (list-matching-lines-default-context-lines matching integer)))
+      this symbol group type)
+  (while all
+    (setq this (car all)
+         all (cdr all)
+         symbol (nth 0 this)
+         group (nth 1 this)
+         type (nth 2 this))
+    (if (not (boundp symbol))
+       ;; This is loaded so early, there is no message
+       (if (fboundp 'message)
+           ;; If variables are removed from C code, give an error here!
+           (message "Intrinsic `%S' not bound" symbol))
+      ;; This is called before any user can have changed the value.
+      (put symbol 'standard-value 
+          (list (quote-maybe (default-value symbol))))
+      ;; Add it to the right group.
+      (custom-add-to-group group symbol 'custom-variable)
+      ;; Set the type.
+      (put symbol 'custom-type type))))
+
+;; This is to prevent it from being reloaded by `cus-load.el'.
+(provide 'cus-start)
+
+;;; cus-start.el ends here.
diff --git a/lisp/custom-load.el b/lisp/custom-load.el
new file mode 100644 (file)
index 0000000..d4da910
--- /dev/null
@@ -0,0 +1,81 @@
+;;; custom-load.el --- automatically extracted custom dependencies
+
+;;; Code:
+
+(custom-add-loads 'extensions '("auto-show" "wid-edit"))
+(custom-add-loads 'info-faces '("info"))
+(custom-add-loads 'custom-buffer '("cus-edit"))
+(custom-add-loads 'custom-faces '("cus-edit"))
+(custom-add-loads 'auto-show '("auto-show"))
+(custom-add-loads 'drag-n-drop '("dragdrop"))
+(custom-add-loads 'mouse '("mouse" "mwheel"))
+(custom-add-loads 'etags '("etags"))
+(custom-add-loads 'widgets '("wid-browse" "wid-edit"))
+(custom-add-loads 'menu '("menubar-items"))
+(custom-add-loads 'minibuffer '("simple" "minibuf"))
+(custom-add-loads 'log-message '("simple"))
+(custom-add-loads 'environment '("frame" "keydefs" "minibuf" "modeline" "window-xemacs" "menubar" "x-init" "toolbar-items" "cus-edit" "gnuserv" "sound"))
+(custom-add-loads 'sound '("sound"))
+(custom-add-loads 'terminals '("gnuserv"))
+(custom-add-loads 'auto-save '("files" "auto-save"))
+(custom-add-loads 'mail '("simple"))
+(custom-add-loads 'custom-menu '("cus-edit"))
+(custom-add-loads 'docs '("hyper-apropos" "info"))
+(custom-add-loads 'tools '("etags" "hyper-apropos"))
+(custom-add-loads 'editing-basics '("cmdloop" "simple" "files" "lisp"))
+(custom-add-loads 'internal '("cus-edit"))
+(custom-add-loads 'help-appearance '("help" "help-macro"))
+(custom-add-loads 'build-report '("build-report"))
+(custom-add-loads 'buffers-menu '("menubar-items"))
+(custom-add-loads 'hypermedia '("wid-edit"))
+(custom-add-loads 'lisp '("lisp" "lisp-mode" "hyper-apropos"))
+(custom-add-loads 'applications '("cus-edit"))
+(custom-add-loads 'help '("help" "cus-edit" "hyper-apropos" "info"))
+(custom-add-loads 'keyboard '("cmdloop"))
+(custom-add-loads 'hyper-apropos-faces '("hyper-apropos"))
+(custom-add-loads 'widget-browse '("wid-browse"))
+(custom-add-loads 'data '("auto-save"))
+(custom-add-loads 'warnings '("simple"))
+(custom-add-loads 'widget-documentation '("wid-edit"))
+(custom-add-loads 'backup '("files"))
+(custom-add-loads 'frames '("frame" "window-xemacs" "gui" "gnuserv"))
+(custom-add-loads 'customize '("cus-edit" "wid-edit"))
+(custom-add-loads 'custom-browse '("cus-edit"))
+(custom-add-loads 'abbrev '("abbrev" "files"))
+(custom-add-loads 'programming '("cus-edit"))
+(custom-add-loads 'toolbar '("toolbar-items"))
+(custom-add-loads 'dired '("files"))
+(custom-add-loads 'dnd-debug '("dragdrop"))
+(custom-add-loads 'killing '("simple"))
+(custom-add-loads 'widget-button '("wid-edit"))
+(custom-add-loads 'paren-blinking '("simple"))
+(custom-add-loads 'find-file '("files"))
+(custom-add-loads 'files '("files"))
+(custom-add-loads 'build '("build-report"))
+(custom-add-loads 'font-lock '("font-lock"))
+(custom-add-loads 'external '("process" "cus-edit"))
+(custom-add-loads 'development '("process" "lisp-mode" "cus-edit"))
+(custom-add-loads 'gnuserv '("gnuserv"))
+(custom-add-loads 'fill-comments '("simple"))
+(custom-add-loads 'windows '("window" "window-xemacs"))
+(custom-add-loads 'widget-faces '("wid-edit"))
+(custom-add-loads 'languages '("lisp-mode" "cus-edit" "font-lock"))
+(custom-add-loads 'fill '("simple" "fill"))
+(custom-add-loads 'custom-magic-faces '("cus-edit"))
+(custom-add-loads 'display '("toolbar" "scrollbar" "auto-show"))
+(custom-add-loads 'faces '("faces" "cus-edit" "font-lock" "font" "hyper-apropos" "info" "wid-edit"))
+(custom-add-loads 'emacs '("faces" "help" "files" "cus-edit" "package-get"))
+(custom-add-loads 'processes '("process" "gnuserv"))
+(custom-add-loads 'hyper-apropos '("hyper-apropos"))
+(custom-add-loads 'wp '("cus-edit"))
+(custom-add-loads 'vc '("files"))
+(custom-add-loads 'isearch '("isearch-mode"))
+(custom-add-loads 'font-lock-faces '("font-lock"))
+(custom-add-loads 'modeline '("modeline"))
+(custom-add-loads 'editing '("simple" "abbrev" "fill" "mouse" "dragdrop" "cus-edit"))
+(custom-add-loads 'matching '("simple" "isearch-mode" "hyper-apropos"))
+(custom-add-loads 'i18n '("cus-edit"))
+(custom-add-loads 'info '("toolbar-items" "info"))
+(custom-add-loads 'x '("x-faces" "x-font-menu"))
+
+;;; custom-load.el ends here
diff --git a/lisp/custom.el b/lisp/custom.el
new file mode 100644 (file)
index 0000000..5b53d63
--- /dev/null
@@ -0,0 +1,405 @@
+;;; custom.el -- Tools for declaring and initializing options.
+
+;; Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+
+;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
+;; Maintainer: Hrvoje Niksic <hniksic@srce.hr>
+;; Keywords: help, faces, dumped
+;; Version: 1.9960-x
+;; X-URL: http://www.dina.kvl.dk/~abraham/custom/
+
+;; 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; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; This file only contain the code needed to declare and initialize
+;; user options.  The code to customize options is autoloaded from
+;; `cus-edit.el'. 
+;;
+;; The code implementing face declarations is in `cus-face.el'
+
+;;; Code:
+
+(require 'widget)
+
+(defvar custom-define-hook nil
+  ;; Customize information for this option is in `cus-edit.el'.
+  "Hook called after defining each customize option.")
+
+;;; The `defcustom' Macro.
+
+(defun custom-initialize-default (symbol value)
+  "Initialize SYMBOL with VALUE.
+This will do nothing if symbol already has a default binding.
+Otherwise, if symbol has a `saved-value' property, it will evaluate
+the car of that and used as the default binding for symbol.
+Otherwise, VALUE will be evaluated and used as the default binding for
+symbol."
+  (unless (default-boundp symbol)
+    ;; Use the saved value if it exists, otherwise the standard setting.
+    (set-default symbol (if (get symbol 'saved-value)
+                           (eval (car (get symbol 'saved-value)))
+                         (eval value)))))
+
+(defun custom-initialize-set (symbol value)
+  "Initialize SYMBOL with VALUE.
+Like `custom-initialize-default', but use the function specified by
+`:set' to initialize SYMBOL."
+  (unless (default-boundp symbol)
+    (funcall (or (get symbol 'custom-set) 'set-default)
+            symbol 
+            (if (get symbol 'saved-value)
+                (eval (car (get symbol 'saved-value)))
+              (eval value)))))
+
+(defun custom-initialize-reset (symbol value)
+  "Initialize SYMBOL with VALUE.
+Like `custom-initialize-set', but use the function specified by
+`:get' to reinitialize SYMBOL if it is already bound."
+    (funcall (or (get symbol 'custom-set) 'set-default)
+            symbol 
+            (cond ((default-boundp symbol)
+                   (funcall (or (get symbol 'custom-get) 'default-value)
+                            symbol))
+                  ((get symbol 'saved-value)
+                   (eval (car (get symbol 'saved-value))))
+                  (t
+                   (eval value)))))
+
+(defun custom-initialize-changed (symbol value)
+  "Initialize SYMBOL with VALUE.
+Like `custom-initialize-reset', but only use the `:set' function if the 
+not using the standard setting.  Otherwise, use the `set-default'."
+  (cond ((default-boundp symbol)
+        (funcall (or (get symbol 'custom-set) 'set-default)
+                 symbol
+                 (funcall (or (get symbol 'custom-get) 'default-value)
+                          symbol)))
+       ((get symbol 'saved-value)
+        (funcall (or (get symbol 'custom-set) 'set-default)
+                 symbol
+                 (eval (car (get symbol 'saved-value)))))
+       (t
+        (set-default symbol (eval value)))))
+
+(defun custom-declare-variable (symbol value doc &rest args)
+  "Like `defcustom', but SYMBOL and VALUE are evaluated as normal arguments."
+  ;; Remember the standard setting.
+  (put symbol 'standard-value (list value))
+  ;; Maybe this option was rogue in an earlier version.  It no longer is.
+  (when (get symbol 'force-value)
+    ;; It no longer is.    
+    (put symbol 'force-value nil))
+  (when doc
+    (put symbol 'variable-documentation doc))
+  (let ((initialize 'custom-initialize-reset)
+       (requests nil))
+    (while args 
+      (let ((arg (car args)))
+       (setq args (cdr args))
+       (check-argument-type 'keywordp arg)
+       (let ((keyword arg)
+             (value (car args)))
+         (unless args
+           (signal 'error (list "Keyword is missing an argument" keyword)))
+         (setq args (cdr args))
+         (cond ((eq keyword :initialize)
+                (setq initialize value))
+               ((eq keyword :set)
+                (put symbol 'custom-set value))
+               ((eq keyword :get)
+                (put symbol 'custom-get value))
+               ((eq keyword :require)
+                (setq requests (cons value requests)))
+               ((eq keyword :type)
+                (put symbol 'custom-type value))
+               ((eq keyword :options)
+                (if (get symbol 'custom-options)
+                    ;; Slow safe code to avoid duplicates.
+                    (mapc (lambda (option)
+                            (custom-add-option symbol option))
+                          value)
+                  ;; Fast code for the common case.
+                  (put symbol 'custom-options (copy-sequence value))))
+               (t
+                (custom-handle-keyword symbol keyword value
+                                       'custom-variable))))))
+    (put symbol 'custom-requests requests)
+    ;; Do the actual initialization.
+    (funcall initialize symbol value))
+  ;; #### This is a rough equivalent of LOADHIST_ATTACH.  However,
+  ;; LOADHIST_ATTACH also checks for `initialized'.
+  (push symbol current-load-list)
+  (run-hooks 'custom-define-hook)
+  symbol)
+
+(defmacro defcustom (symbol value doc &rest args)
+  "Declare SYMBOL as a customizable variable that defaults to VALUE.
+DOC is the variable documentation.
+
+Neither SYMBOL nor VALUE needs to be quoted.
+If SYMBOL is not already bound, initialize it to VALUE.
+The remaining arguments should have the form
+
+   [KEYWORD VALUE]... 
+
+The following KEYWORD's are defined:
+
+:type  VALUE should be a widget type for editing the symbols value.
+       The default is `sexp'.
+:options VALUE should be a list of valid members of the widget type.
+:group  VALUE should be a customization group.  
+        Add SYMBOL to that group.
+:initialize VALUE should be a function used to initialize the
+       variable.  It takes two arguments, the symbol and value
+       given in the `defcustom' call.  The default is
+       `custom-initialize-set' 
+:set   VALUE should be a function to set the value of the symbol. 
+       It takes two arguments, the symbol to set and the value to
+       give it.  The default is `set-default'.
+:get   VALUE should be a function to extract the value of symbol.
+       The function takes one argument, a symbol, and should return
+       the current value for that symbol.  The default is
+       `default-value'. 
+:require VALUE should be a feature symbol.  Each feature will be
+       required after initialization, of the the user have saved this
+       option.
+
+Read the section about customization in the Emacs Lisp manual for more
+information."
+  `(custom-declare-variable (quote ,symbol) (quote ,value) ,doc ,@args))
+
+;;; The `defface' Macro.
+
+(defmacro defface (face spec doc &rest args)
+  "Declare FACE as a customizable face that defaults to SPEC.
+FACE does not need to be quoted.
+
+Third argument DOC is the face documentation.
+
+If FACE has been set with `custom-set-face', set the face attributes
+as specified by that function, otherwise set the face attributes
+according to SPEC.
+
+The remaining arguments should have the form
+
+   [KEYWORD VALUE]...
+
+The following KEYWORDs are defined:
+
+:group  VALUE should be a customization group.
+        Add FACE to that group.
+
+SPEC should be an alist of the form ((DISPLAY ATTS)...).
+
+ATTS is a list of face attributes and their values.  The possible
+attributes are defined in the variable `custom-face-attributes'.
+
+The ATTS of the first entry in SPEC where the DISPLAY matches the
+frame should take effect in that frame.  DISPLAY can either be the
+symbol t, which will match all frames, or an alist of the form
+\((REQ ITEM...)...)
+
+For the DISPLAY to match a FRAME, the REQ property of the frame must
+match one of the ITEM.  The following REQ are defined:
+
+`type' (the value of `window-system')
+  Should be one of `x' or `tty'.
+
+`class' (the frame's color support)
+  Should be one of `color', `grayscale', or `mono'.
+
+`background' (what color is used for the background text)
+  Should be one of `light' or `dark'.
+
+Read the section about customization in the Emacs Lisp manual for more
+information."
+  `(custom-declare-face (quote ,face) ,spec ,doc ,@args))
+
+;;; The `defgroup' Macro.
+
+(defun custom-declare-group (symbol members doc &rest args)
+  "Like `defgroup', but SYMBOL is evaluated as a normal argument."
+  (while members 
+    (apply 'custom-add-to-group symbol (car members))
+    (pop members))
+  (put symbol 'custom-group (nconc members (get symbol 'custom-group)))
+  (when doc
+    (put symbol 'group-documentation doc))
+  (while args
+    (let ((arg (car args)))
+      (setq args (cdr args))
+      (check-argument-type 'keywordp arg)
+      (let ((keyword arg)
+           (value (car args)))
+       (unless args
+         (signal 'error (list "Keyword is missing an argument" keyword)))
+       (setq args (cdr args))
+       (cond ((eq keyword :prefix)
+              (put symbol 'custom-prefix value))
+             (t
+              (custom-handle-keyword symbol keyword value
+                                     'custom-group))))))
+  (run-hooks 'custom-define-hook)
+  symbol)
+
+(defmacro defgroup (symbol members doc &rest args)
+  "Declare SYMBOL as a customization group containing MEMBERS.
+SYMBOL does not need to be quoted.
+
+Third arg DOC is the group documentation.
+
+MEMBERS should be an alist of the form ((NAME WIDGET)...) where NAME
+is a symbol and WIDGET is a widget for editing that symbol.  Useful
+widgets are `custom-variable' for editing variables, `custom-face' for
+edit faces, and `custom-group' for editing groups.
+
+The remaining arguments should have the form
+
+   [KEYWORD VALUE]... 
+
+The following KEYWORD's are defined:
+
+:group  VALUE should be a customization group.
+        Add SYMBOL to that group.
+
+Read the section about customization in the Emacs Lisp manual for more
+information."
+  `(custom-declare-group (quote ,symbol) ,members ,doc ,@args))
+
+;; This is preloaded very early, so we avoid using CL features.
+(defvar custom-group-hash-table (make-hashtable 300 'eq)
+  "Hash-table of non-empty groups.")
+
+(defun custom-add-to-group (group option widget)
+  "To existing GROUP add a new OPTION of type WIDGET.
+If there already is an entry for that option, overwrite it."
+  (let* ((members (get group 'custom-group))
+        (old (assq option members)))
+    (if old
+       (setcar (cdr old) widget)
+      (put group 'custom-group (nconc members (list (list option widget))))))
+  (puthash group t custom-group-hash-table))
+
+;;; Properties.
+
+(defun custom-handle-all-keywords (symbol args type)
+  "For customization option SYMBOL, handle keyword arguments ARGS.
+Third argument TYPE is the custom option type."
+  (while args 
+    (let ((arg (car args)))
+      (setq args (cdr args))
+      (check-argument-type 'keywordp arg)
+      (let ((keyword arg)
+           (value (car args)))
+       (unless args
+         (signal 'error (list "Keyword is missing an argument" keyword)))
+       (setq args (cdr args))
+       (custom-handle-keyword symbol keyword value type)))))  
+
+(defun custom-handle-keyword (symbol keyword value type)
+  "For customization option SYMBOL, handle KEYWORD with VALUE.
+Fourth argument TYPE is the custom option type."
+  (cond ((eq keyword :group)
+        (custom-add-to-group value symbol type))
+       ((eq keyword :version)
+        (custom-add-version symbol value))
+       ((eq keyword :link)
+        (custom-add-link symbol value))
+       ((eq keyword :load)
+        (custom-add-load symbol value))
+       ((eq keyword :tag)
+        (put symbol 'custom-tag value))
+       (t
+        (signal 'error (list "Unknown keyword" keyword)))))
+
+(defun custom-add-option (symbol option)
+  "To the variable SYMBOL add OPTION.
+
+If SYMBOL is a hook variable, OPTION should be a hook member.
+For other types variables, the effect is undefined."
+  (let ((options (get symbol 'custom-options)))
+    (unless (member option options)
+      (put symbol 'custom-options (cons option options)))))
+
+(defun custom-add-link (symbol widget)
+  "To the custom option SYMBOL add the link WIDGET."
+  (let ((links (get symbol 'custom-links)))
+    (unless (member widget links)
+      (put symbol 'custom-links (cons widget links)))))
+
+(defun custom-add-version (symbol version)
+  "To the custom option SYMBOL add the version VERSION."
+  (put symbol 'custom-version version))
+
+(defun custom-add-load (symbol load)
+  "To the custom option SYMBOL add the dependency LOAD.
+LOAD should be either a library file name, or a feature name."
+  (puthash symbol t custom-group-hash-table)
+  (let ((loads (get symbol 'custom-loads)))
+    (unless (member load loads)
+      (put symbol 'custom-loads (cons load loads)))))
+
+;;; Initializing.
+
+(defun custom-set-variables (&rest args)
+  "Initialize variables according to user preferences.  
+
+The arguments should be a list where each entry has the form:
+
+  (SYMBOL VALUE [NOW])
+
+The unevaluated VALUE is stored as the saved value for SYMBOL.
+If NOW is present and non-nil, VALUE is also evaluated and bound as
+the default value for the SYMBOL."
+  (while args 
+    (let ((entry (car args)))
+      (if (listp entry)
+         (let* ((symbol (nth 0 entry))
+                (value (nth 1 entry))
+                (now (nth 2 entry))
+                (requests (nth 3 entry))
+                (set (or (get symbol 'custom-set) 'set-default)))
+           (put symbol 'saved-value (list value))
+           (cond (now 
+                  ;; Rogue variable, set it now.
+                  (put symbol 'force-value t)
+                  (funcall set symbol (eval value)))
+                 ((default-boundp symbol)
+                  ;; Something already set this, overwrite it.
+                  (funcall set symbol (eval value))))
+           (when requests
+             (put symbol 'custom-requests requests)
+             (mapc 'require requests))
+           (setq args (cdr args)))
+       ;; Old format, a plist of SYMBOL VALUE pairs.
+       (message "Warning: old format `custom-set-variables'")
+       (ding)
+       (sit-for 2)
+       (let ((symbol (nth 0 args))
+             (value (nth 1 args)))
+         (put symbol 'saved-value (list value)))
+       (setq args (cdr (cdr args)))))))
+
+;;; The End.
+
+(provide 'custom)
+
+;; custom.el ends here
diff --git a/lisp/derived.el b/lisp/derived.el
new file mode 100644 (file)
index 0000000..9210fd8
--- /dev/null
@@ -0,0 +1,363 @@
+;;; derived.el --- allow inheritance of major modes.
+
+;; Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc.
+
+;; Author: David Megginson (dmeggins@aix1.uottawa.ca)
+;; Maintainer: XEmacs Development Team
+;; Keywords: extensions, dumped
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: FSF 19.34.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; GNU Emacs is already, in a sense, object oriented -- each object
+;; (buffer) belongs to a class (major mode), and that class defines
+;; the relationship between messages (input events) and methods
+;; (commands) by means of a keymap.
+;;
+;; The only thing missing is a good scheme of inheritance.  It is
+;; possible to simulate a single level of inheritance with generous
+;; use of hooks and a bit of work -- sgml-mode, for example, also runs
+;; the hooks for text-mode, and keymaps can inherit from other keymaps
+;; -- but generally, each major mode ends up reinventing the wheel.
+;; Ideally, someone should redesign all of Emacs's major modes to
+;; follow a more conventional object-oriented system: when defining a
+;; new major mode, the user should need only to name the existing mode
+;; it is most similar to, then list the (few) differences.
+;;
+;; In the mean time, this package offers most of the advantages of
+;; full inheritance with the existing major modes.  The macro
+;; `define-derived-mode' allows the user to make a variant of an existing
+;; major mode, with its own keymap.  The new mode will inherit the key
+;; bindings of its parent, and will, in fact, run its parent first
+;; every time it is called.  For example, the commands
+;;
+;;  (define-derived-mode hypertext-mode text-mode "Hypertext"
+;;    "Major mode for hypertext.\n\n\\{hypertext-mode-map}"
+;;    (setq case-fold-search nil))
+;;
+;;  (define-key hypertext-mode-map [down-mouse-3] 'do-hyper-link)
+;;
+;; will create a function `hypertext-mode' with its own (sparse)
+;; keymap `hypertext-mode-map.'  The command M-x hypertext-mode will
+;; perform the following actions:
+;;
+;; - run the command (text-mode) to get its default setup
+;; - replace the current keymap with 'hypertext-mode-map,' which will
+;;   inherit from 'text-mode-map'.
+;; - replace the current syntax table with
+;;   'hypertext-mode-syntax-table', which will borrow its defaults
+;;   from the current text-mode-syntax-table.
+;; - replace the current abbrev table with
+;;   'hypertext-mode-abbrev-table', which will borrow its defaults
+;;   from the current text-mode-abbrev table
+;; - change the mode line to read "Hypertext"
+;; - assign the value 'hypertext-mode' to the 'major-mode' variable
+;; - run the body of commands provided in the macro -- in this case,
+;;   set the local variable `case-fold-search' to nil.
+;; - **run the command (hypertext-mode-setup), which is empty by
+;;   default, but may be redefined by the user to contain special
+;;   commands (ie. setting local variables like 'outline-regexp')
+;;   **NOTE: do not use this option -- it will soon be obsolete.
+;; - run anything assigned to 'hypertext-mode-hooks' (obsolete, but
+;;   supported for the sake of compatibility).
+;;
+;; The advantages of this system are threefold.  First, text mode is
+;; untouched -- if you had added the new keystroke to `text-mode-map,'
+;; possibly using hooks, you would have added it to all text buffers
+;; -- here, it appears only in hypertext buffers, where it makes
+;; sense.  Second, it is possible to build even further, and make
+;; a derived mode from a derived mode.  The commands
+;;
+;;   (define-derived-mode html-mode hypertext-mode "HTML")
+;;   [various key definitions]
+;; 
+;; will add a new major mode for HTML with very little fuss.
+;;
+;; Note also the function `derived-mode-class,' which returns the non-derived
+;; major mode which a derived mode is based on (ie. NOT necessarily the
+;; immediate parent).
+;;
+;; (derived-mode-class 'text-mode) ==> text-mode
+;; (derived-mode-class 'hypertext-mode) ==> text-mode
+;; (derived-mode-class 'html-mode) ==> text-mode
+\f
+;;; Code:
+
+;; PUBLIC: define a new major mode which inherits from an existing one.
+
+;; XEmacs -- no autoload
+(defmacro define-derived-mode (child parent name &optional docstring &rest body)
+  "Create a new mode as a variant of an existing mode.
+
+The arguments to this command are as follow:
+
+CHILD:     the name of the command for the derived mode.
+PARENT:    the name of the command for the parent mode (ie. text-mode).
+NAME:      a string which will appear in the status line (ie. \"Hypertext\")
+DOCSTRING: an optional documentation string--if you do not supply one,
+           the function will attempt to invent something useful.
+BODY:      forms to execute just before running the
+           hooks for the new mode.
+
+Here is how you could define LaTeX-Thesis mode as a variant of LaTeX mode:
+
+  (define-derived-mode LaTeX-thesis-mode LaTeX-mode \"LaTeX-Thesis\")
+
+You could then make new key bindings for `LaTeX-thesis-mode-map'
+without changing regular LaTeX mode.  In this example, BODY is empty,
+and DOCSTRING is generated by default.
+
+On a more complicated level, the following command uses sgml-mode as
+the parent, and then sets the variable `case-fold-search' to nil:
+
+  (define-derived-mode article-mode sgml-mode \"Article\"
+    \"Major mode for editing technical articles.\"
+    (setq case-fold-search nil))
+
+Note that if the documentation string had been left out, it would have
+been generated automatically, with a reference to the keymap."
+
+                                       ; Some trickiness, since what
+                                       ; appears to be the docstring
+                                       ; may really be the first
+                                       ; element of the body.
+  (if (and docstring (not (stringp docstring)))
+      (progn (setq body (cons docstring body))
+            (setq docstring nil)))
+  (setq docstring (or docstring (derived-mode-make-docstring parent child)))
+
+  (` (progn 
+       (derived-mode-init-mode-variables (quote (, child)))
+       (defun (, child) ()
+        (, docstring)
+        (interactive)
+                                       ; Run the parent.
+        ((, parent))
+                                       ; Identify special modes.
+        (if (get (quote (, parent)) 'special)
+            (put (quote (, child)) 'special t))
+        ;; XEmacs addition
+        (let ((mode-class (get (quote (, parent)) 'mode-class)))
+          (if mode-class
+              (put (quote (, child)) 'mode-class mode-class)))
+                                       ; Identify the child mode.
+        (setq major-mode (quote (, child)))
+        (setq mode-name (, name))
+                                       ; Set up maps and tables.
+        (derived-mode-set-keymap (quote (, child)))
+        (derived-mode-set-syntax-table (quote (, child)))
+        (derived-mode-set-abbrev-table (quote (, child)))
+                                       ; Splice in the body (if any).
+        (,@ body)
+;;;                                    ; Run the setup function, if
+;;;                                    ; any -- this will soon be
+;;;                                    ; obsolete.
+;;;     (derived-mode-run-setup-function (quote (, child)))
+                                       ; Run the hooks, if any.
+        (derived-mode-run-hooks (quote (, child)))))))
+
+
+;; PUBLIC: find the ultimate class of a derived mode.
+
+(defun derived-mode-class (mode)
+  "Find the class of a major mode.
+A mode's class is the first ancestor which is NOT a derived mode.
+Use the `derived-mode-parent' property of the symbol to trace backwards."
+  (while (get mode 'derived-mode-parent)
+    (setq mode (get mode 'derived-mode-parent)))
+  mode)
+
+\f
+;; Inline functions to construct various names from a mode name.
+
+(defsubst derived-mode-setup-function-name (mode)
+  "Construct a setup-function name based on a mode name."
+  (intern (concat (symbol-name mode) "-setup")))
+
+(defsubst derived-mode-hooks-name (mode)
+  "Construct a hooks name based on a mode name."
+  ;; XEmacs change from -hooks
+  (intern (concat (symbol-name mode) "-hook")))
+
+(defsubst derived-mode-map-name (mode)
+  "Construct a map name based on a mode name."
+  (intern (concat (symbol-name mode) "-map")))
+
+(defsubst derived-mode-syntax-table-name (mode)
+  "Construct a syntax-table name based on a mode name."
+  (intern (concat (symbol-name mode) "-syntax-table")))
+
+(defsubst derived-mode-abbrev-table-name (mode)
+  "Construct an abbrev-table name based on a mode name."
+  (intern (concat (symbol-name mode) "-abbrev-table")))
+
+\f
+;; Utility functions for defining a derived mode.
+
+;; XEmacs -- don't autoload
+(defun derived-mode-init-mode-variables (mode)
+  "Initialize variables for a new mode. 
+Right now, if they don't already exist, set up a blank keymap, an
+empty syntax table, and an empty abbrev table -- these will be merged
+the first time the mode is used."
+
+  (if (boundp (derived-mode-map-name mode))
+      t
+    (eval (` (defvar (, (derived-mode-map-name mode))
+              ;; XEmacs change
+              (make-sparse-keymap (derived-mode-map-name mode))
+              (, (format "Keymap for %s." mode)))))
+    (put (derived-mode-map-name mode) 'derived-mode-unmerged t))
+
+  (if (boundp (derived-mode-syntax-table-name mode))
+      t
+    (eval (` (defvar (, (derived-mode-syntax-table-name mode))
+              ;; XEmacs change
+              ;; Make a syntax table which doesn't specify anything
+              ;; for any char.  Valid data will be merged in by
+              ;; derived-mode-merge-syntax-tables.
+              ;; (make-char-table 'syntax-table nil)
+              (make-syntax-table)
+              (, (format "Syntax table for %s." mode)))))
+    (put (derived-mode-syntax-table-name mode) 'derived-mode-unmerged t))
+
+  (if (boundp (derived-mode-abbrev-table-name mode))
+      t
+    (eval (` (defvar (, (derived-mode-abbrev-table-name mode))
+              (progn (define-abbrev-table (derived-mode-abbrev-table-name mode) nil)
+                     (make-abbrev-table))
+              (, (format "Abbrev table for %s." mode)))))))
+
+(defun derived-mode-make-docstring (parent child)
+  "Construct a docstring for a new mode if none is provided."
+
+  (format "This major mode is a variant of `%s', created by `define-derived-mode'.
+It inherits all of the parent's attributes, but has its own keymap,
+abbrev table and syntax table:
+
+  `%s-map' and `%s-syntax-table'
+
+which more-or-less shadow
+
+  `%s-map' and `%s-syntax-table'
+
+\\{%s-map}" parent child child parent parent child))
+
+\f
+;; Utility functions for running a derived mode.
+
+(defun derived-mode-set-keymap (mode)
+  "Set the keymap of the new mode, maybe merging with the parent."
+  (let* ((map-name (derived-mode-map-name mode))
+        (new-map (eval map-name))
+        (old-map (current-local-map)))
+    (and old-map
+        (get map-name 'derived-mode-unmerged)
+        (derived-mode-merge-keymaps old-map new-map))
+    (put map-name 'derived-mode-unmerged nil)
+    (use-local-map new-map)))
+
+(defun derived-mode-set-syntax-table (mode) 
+  "Set the syntax table of the new mode, maybe merging with the parent."
+  (let* ((table-name (derived-mode-syntax-table-name mode))
+        (old-table (syntax-table))
+        (new-table (eval table-name)))
+    (if (get table-name 'derived-mode-unmerged)
+       (derived-mode-merge-syntax-tables old-table new-table))
+    (put table-name 'derived-mode-unmerged nil)
+    (set-syntax-table new-table)))
+
+(defun derived-mode-set-abbrev-table (mode)
+  "Set the abbrev table if it exists.  
+Always merge its parent into it, since the merge is non-destructive."
+  (let* ((table-name (derived-mode-abbrev-table-name mode))
+        (old-table local-abbrev-table)
+        (new-table (eval table-name)))
+    (derived-mode-merge-abbrev-tables old-table new-table)
+    (setq local-abbrev-table new-table)))
+
+;;;(defun derived-mode-run-setup-function (mode)
+;;;  "Run the setup function if it exists."
+
+;;;  (let ((fname (derived-mode-setup-function-name mode)))
+;;;    (if (fboundp fname)
+;;;    (funcall fname))))
+
+(defun derived-mode-run-hooks (mode)
+  "Run the hooks if they exist."
+
+  (let ((hooks-name (derived-mode-hooks-name mode)))
+    (if (boundp hooks-name)
+       (run-hooks hooks-name))))
+
+;; Functions to merge maps and tables.
+
+(defun derived-mode-merge-keymaps (old new)
+  "Merge an old keymap into a new one.
+The old keymap is set to be the parent of the new one, so that there will
+be automatic inheritance."
+  ;; XEmacs change.  FSF 19.30 & 19.34 has a whole bunch of weird crap here
+  ;; for merging prefix keys and such.  Hopefully none of this is
+  ;; necessary in XEmacs.
+  (set-keymap-parents new (list old)))
+
+(defun derived-mode-merge-syntax-tables (old new)
+  "Merge an old syntax table into a new one.
+Where the new table already has an entry, nothing is copied from the old one."
+  ;; 20.x
+  (if (fboundp 'map-char-table)
+      ;; we use map-char-table not map-syntax-table so we can explicitly
+      ;; check for inheritance.
+      (map-char-table
+       #'(lambda (key value)
+          (if (eq ?@ (char-syntax-from-code value))
+              (map-char-table #'(lambda (key1 value1)
+                                  (put-char-table key1 value1 new))
+                              old
+                              key)))
+       new)
+    ;; pre-20.0
+    (let ((idx 0)
+         (end (min (length new) (length old))))
+      (while (< idx end)
+       (if (not (aref new idx))
+           (aset new idx (aref old idx)))
+       (setq idx (1+ idx))))))
+
+;; Merge an old abbrev table into a new one.
+;; This function requires internal knowledge of how abbrev tables work,
+;; presuming that they are obarrays with the abbrev as the symbol, the expansion
+;; as the value of the symbol, and the hook as the function definition.
+(defun derived-mode-merge-abbrev-tables (old new)
+  (if old
+      (mapatoms 
+       (function 
+       (lambda (symbol)
+         (or (intern-soft (symbol-name symbol) new)
+             (define-abbrev new (symbol-name symbol)
+               (symbol-value symbol) (symbol-function symbol)))))
+       old)))
+    
+(provide 'derived)
+
+;;; derived.el ends here
diff --git a/lisp/device.el b/lisp/device.el
new file mode 100644 (file)
index 0000000..6d40d5f
--- /dev/null
@@ -0,0 +1,113 @@
+;;; device.el --- miscellaneous device functions not written in C
+
+;; Copyright (C) 1994-5, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1996 Ben Wing
+
+;; Maintainer: XEmacs Development Team
+;; Keywords: internal, dumped
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not in FSF.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;;; Code:
+
+(defun device-list ()
+  "Return a list of all devices."
+  (apply 'nconc (mapcar 'console-device-list (console-list))))
+
+(defun device-type (&optional device)
+  "Return the type of the specified device (e.g. `x' or `tty').
+This is equivalent to the type of the device's console.
+Value is `tty' for a tty device (a character-only terminal),
+`x' for a device that is a screen on an X display,
+`ns' for a device that is a NeXTstep connection (not yet implemented),
+`mswindows' for a device that is a Windows or Windows NT connection,
+`pc' for a device that is a direct-write MS-DOS screen (not yet implemented),
+`stream' for a stream device (which acts like a stdio stream), and
+`dead' for a deleted device."
+  (or device (setq device (selected-device)))
+  (if (not (device-live-p device)) 'dead
+    (console-type (device-console device))))
+
+(defun make-tty-device (&optional tty terminal-type controlling-process)
+  "Create a new device on TTY.
+  TTY should be the name of a tty device file (e.g. \"/dev/ttyp3\" under
+SunOS et al.), as returned by the `tty' command.  A value of nil means
+use the stdin and stdout as passed to XEmacs from the shell.
+  If TERMINAL-TYPE is non-nil, it should be a string specifying the
+type of the terminal attached to the specified tty.  If it is nil,
+the terminal type will be inferred from the TERM environment variable.
+  If CONTROLLING-PROCESS is non-nil, it should be an integer
+specifying the process id of the process in control of the specified tty.  If
+it is nil, it is assumes to be the value returned by emacs-pid."
+  (make-device 'tty tty (list 'terminal-type terminal-type 
+                             'controlling-process controlling-process)))
+
+(defun device-pixel-width (&optional device)
+  "Return the width in pixels of DEVICE, or nil if unknown."
+  (let ((ds (device-system-metric device 'size-device)))
+    (and ds (car ds))))
+
+(defun device-pixel-height (&optional device)
+  "Return the height in pixels of DEVICE, or nil if unknown."
+  (let ((ds (device-system-metric device 'size-device)))
+    (and ds (cdr ds))))
+
+(defun device-mm-width (&optional device)
+  "Return the width in millimeters of DEVICE, or nil if unknown."
+  (let ((ds (device-system-metric device 'size-device-mm)))
+    (and ds (car ds))))
+
+(defun device-mm-height (&optional device)
+  "Return the height in millimeters of DEVICE, or nil if unknown."
+  (let ((ds (device-system-metric device 'size-device-mm)))
+    (and ds (cdr ds))))
+
+(defun device-bitplanes (&optional device)
+  "Return the number of bitplanes of DEVICE, or nil if unknown."
+  (device-system-metric device 'num-bit-planes))
+
+(defun device-color-cells (&optional device)
+  "Return the number of color cells of DEVICE, or nil if unknown."
+  (device-system-metric device 'num-color-cells))
+
+(defun make-x-device (&optional display)
+  "Create a new device connected to DISPLAY."
+  (make-device 'x display))
+
+(defun make-mswindows-device ()
+  "Create a new mswindows device."
+  (make-device 'mswindows nil))
+
+(defun device-on-window-system-p (&optional device)
+  "Return non-nil if DEVICE is on a window system.
+This generally means that there is support for the mouse, the menubar,
+the toolbar, glyphs, etc."
+  (or device (setq device (selected-device)))
+  (console-on-window-system-p (device-console device)))
+
+(defalias 'valid-device-type-p 'valid-console-type-p)
+(defalias 'device-type-list 'console-type-list)
+(defalias 'device-pixel-depth 'device-bitplanes)
+
+;;; device.el ends here
diff --git a/lisp/dialog.el b/lisp/dialog.el
new file mode 100644 (file)
index 0000000..740ff72
--- /dev/null
@@ -0,0 +1,157 @@
+;;; dialog.el --- Dialog-box support for XEmacs
+
+;; Copyright (C) 1991-4, 1997 Free Software Foundation, Inc.
+
+;; Maintainer: XEmacs Development Team
+;; Keywords: extensions, internal, dumped
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not in FSF.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs (when dialog boxes are compiled in).
+
+;;; Code:
+(defun yes-or-no-p-dialog-box (prompt)
+  "Ask user a \"y or n\" question with a popup dialog box.
+Returns t if answer is \"yes\".
+Takes one argument, which is the string to display to ask the question."
+  (let ((echo-keystrokes 0)
+       event)   
+    (popup-dialog-box
+     ;; "Non-violent language please!" says Robin.
+     (cons prompt '(["Yes" yes t] ["No" no t] nil ["Cancel" abort t])))
+;     (cons prompt '(["Yes" yes t] ["No" no t] nil ["Abort" abort t])))
+    (catch 'ynp-done
+      (while t
+       (setq event (next-command-event event))
+       (cond ((and (misc-user-event-p event) (eq (event-object event) 'yes))
+              (throw 'ynp-done t))
+             ((and (misc-user-event-p event) (eq (event-object event) 'no))
+              (throw 'ynp-done nil))
+             ((and (misc-user-event-p event)
+                   (or (eq (event-object event) 'abort)
+                       (eq (event-object event) 'menu-no-selection-hook)))
+              (signal 'quit nil))
+             ((button-release-event-p event) ;; don't beep twice
+              nil)
+             (t
+              (beep)
+              (message "please answer the dialog box")))))))
+
+(defun yes-or-no-p-maybe-dialog-box (prompt)
+  "Ask user a yes-or-no question.  Return t if answer is yes.
+The question is asked with a dialog box or the minibuffer, as appropriate.
+Takes one argument, which is the string to display to ask the question.
+It should end in a space; `yes-or-no-p' adds `(yes or no) ' to it.
+The user must confirm the answer with RET,
+and can edit it until it as been confirmed."
+  (if (should-use-dialog-box-p)
+      (yes-or-no-p-dialog-box prompt)
+    (yes-or-no-p-minibuf prompt)))
+
+(defun y-or-n-p-maybe-dialog-box (prompt)
+  "Ask user a \"y or n\" question.  Return t if answer is \"y\".
+Takes one argument, which is the string to display to ask the question.
+The question is asked with a dialog box or the minibuffer, as appropriate.
+It should end in a space; `y-or-n-p' adds `(y or n) ' to it.
+No confirmation of the answer is requested; a single character is enough.
+Also accepts Space to mean yes, or Delete to mean no."
+  (if (should-use-dialog-box-p)
+      (yes-or-no-p-dialog-box prompt)
+    (y-or-n-p-minibuf prompt)))
+
+(if (fboundp 'popup-dialog-box)
+    (progn
+      (fset 'yes-or-no-p 'yes-or-no-p-maybe-dialog-box)
+      (fset 'y-or-n-p 'y-or-n-p-maybe-dialog-box)))
+
+;; this is call-compatible with the horribly-named FSF Emacs function
+;; `x-popup-dialog'.  I refuse to use that name.
+(defun get-dialog-box-response (position contents)
+  ;; by Stig@hackvan.com
+  ;; modified by pez@atlantic2.sbi.com
+  "Pop up a dialog box and return user's selection.
+POSITION specifies which frame to use.
+This is normally an event or a window or frame.
+If POSITION is t or nil, it means to use the frame the mouse is on.
+The dialog box appears in the middle of the specified frame.
+
+CONTENTS specifies the alternatives to display in the dialog box.
+It is a list of the form (TITLE ITEM1 ITEM2...).
+Each ITEM is a cons cell (STRING . VALUE).
+The return value is VALUE from the chosen item.
+
+An ITEM may also be just a string--that makes a nonselectable item.
+An ITEM may also be nil--that means to put all preceding items
+on the left of the dialog box and all following items on the right."
+  (cond
+   ((eventp position)
+    (select-frame (event-frame position)))
+   ((framep position)
+    (select-frame position))
+   ((windowp position)
+    (select-window position)))
+  (let ((dbox (cons (car contents)
+                   (mapcar #'(lambda (x)
+                               (cond
+                                ((null x)
+                                 nil)
+                                ((stringp x)
+                                 `[,x 'ignore nil]) ;this will never get
+                                                    ;selected
+                                (t
+                                 `[,(car x) (throw 'result ',(cdr x)) t])))
+                           (cdr contents))
+                   )))
+    (catch 'result
+      (popup-dialog-box dbox)
+      (dispatch-event (next-command-event)))))
+
+(defun message-box (fmt &rest args)
+  "Display a message, in a dialog box if possible.
+If the selected device has no dialog-box support, use the echo area.
+The arguments are the same as to `format'.
+
+If the only argument is nil, clear any existing message; let the
+minibuffer contents show."
+  (if (and (null fmt) (null args))
+      (progn
+       (clear-message nil)
+       nil)
+    (let ((str (apply 'format fmt args)))
+      (if (device-on-window-system-p)
+         (get-dialog-box-response nil (list str (cons "OK" t)))
+       (display-message 'message str))
+      str)))
+
+(defun message-or-box (fmt &rest args)
+  "Display a message in a dialog box or in the echo area.\n\
+If this command was invoked with the mouse, use a dialog box.\n\
+Otherwise, use the echo area.
+The arguments are the same as to `format'.
+
+If the only argument is nil, clear any existing message; let the
+minibuffer contents show."
+  (if (should-use-dialog-box-p)
+      (apply 'message-box fmt args)
+    (apply 'message fmt args)))
+
+;;; dialog.el ends here
diff --git a/lisp/disass.el b/lisp/disass.el
new file mode 100644 (file)
index 0000000..2185d19
--- /dev/null
@@ -0,0 +1,272 @@
+;;; disass.el --- disassembler for compiled Emacs Lisp code
+
+;;; Copyright (C) 1986, 1991-1994 Free Software Foundation, Inc.
+
+;; Author: Doug Cutting <doug@csli.stanford.edu>
+;;     Jamie Zawinski <jwz@netscape.com>
+;; Maintainer: Jamie Zawinski <jwz@netscape.com>
+;; Keywords: internal
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: FSF 19.28.
+
+;;; Commentary:
+
+;; The single entry point, `disassemble', disassembles a code object generated
+;; by the Emacs Lisp byte-compiler.  This doesn't invert the compilation
+;; operation, not by a long shot, but it's useful for debugging.
+
+;;
+;; Original version by Doug Cutting (doug@csli.stanford.edu)
+;; Substantially modified by Jamie Zawinski for
+;; the new lapcode-based byte compiler.
+
+;;; Code:
+
+;;; The variable byte-code-vector is defined by the new bytecomp.el.
+;;; The function byte-decompile-lapcode is defined in byte-opt.el.
+;;; Since we don't use byte-decompile-lapcode, let's try not loading byte-opt.
+;;; The variable byte-code-vector is defined by the new bytecomp.el.
+;;; The function byte-decompile-lapcode is defined in byte-optimize.el.
+(require 'byte-optimize)
+
+(defvar disassemble-column-1-indent 8 "*")
+(defvar disassemble-column-2-indent 10 "*")
+(defvar disassemble-recursive-indent 3 "*")
+
+
+;;;###autoload
+(defun disassemble (object &optional buffer indent interactive-p)
+  "Print disassembled code for OBJECT in (optional) BUFFER.
+OBJECT can be a symbol defined as a function, or a function itself
+\(a lambda expression or a compiled-function object).
+If OBJECT is not already compiled, we compile it, but do not
+redefine OBJECT if it is a symbol."
+  (interactive (list (intern (completing-read "Disassemble function: "
+                                             obarray 'fboundp t))
+                    nil 0 t))
+  (if (eq (car-safe object) 'byte-code)
+      (setq object (list 'lambda () object)))
+  (or indent (setq indent 0))          ;Default indent to zero
+  (save-excursion
+    (if (or interactive-p (null buffer))
+       (with-output-to-temp-buffer "*Disassemble*"
+         (set-buffer "*Disassemble*")
+         (disassemble-internal object indent (not interactive-p)))
+      (set-buffer buffer)
+      (disassemble-internal object indent nil)))
+  nil)
+
+
+(defun disassemble-internal (obj indent interactive-p)
+  (let ((macro 'nil)
+       (name 'nil)
+       args)
+    (while (symbolp obj)
+      (setq name obj
+           obj (symbol-function obj)))
+    (if (subrp obj)
+       (error "Can't disassemble #<subr %s>" name))
+    (if (eq (car-safe obj) 'autoload)
+       (progn
+         (load (elt obj 1))
+         (setq obj (symbol-function name))))
+    (if (eq (car-safe obj) 'macro)     ;handle macros
+       (setq macro t
+             obj (cdr obj)))
+    (if (and (listp obj) (eq (car obj) 'byte-code))
+       (setq obj (list 'lambda nil obj)))      
+    (if (and (listp obj) (not (eq (car obj) 'lambda)))
+       (error "not a function"))
+    (if (consp obj)
+       (if (assq 'byte-code obj)
+           nil
+         (if interactive-p (message (if name
+                                        "Compiling %s's definition..."
+                                      "Compiling definition...")
+                                    name))
+         (setq obj (byte-compile obj))
+         (if interactive-p (message "Done compiling.  Disassembling..."))))
+    (cond ((consp obj)
+          (setq obj (cdr obj))         ;throw lambda away
+          (setq args (car obj))        ;save arg list
+          (setq obj (cdr obj)))
+         (t
+          (setq args (compiled-function-arglist obj))))
+    (if (zerop indent)                 ; not a nested function
+       (progn
+         (indent-to indent)
+         (insert (format "byte code%s%s%s:\n"
+                         (if (or macro name) " for" "")
+                         (if macro " macro" "")
+                         (if name (format " %s" name) "")))))
+    (let ((doc (if (consp obj)
+                  (and (stringp (car obj)) (car obj))
+                (condition-case error
+                    (documentation obj)
+                  (error (format "%S" error))))))
+      (if (and doc (stringp doc))
+         (progn (and (consp obj) (setq obj (cdr obj)))
+                (indent-to indent)
+                (princ "  doc:  " (current-buffer))
+                (let ((frobbed nil))
+                  (if (string-match "\n" doc)
+                      (setq doc (substring doc 0 (match-beginning 0))
+                            frobbed t))
+                  (if (> (length doc) 70)
+                      (setq doc (substring doc 0 65) frobbed t))
+                  (if frobbed (setq doc (concat doc " ..."))))
+                (insert doc "\n"))))
+    (indent-to indent)
+    (insert "  args: ")
+    (prin1 args (current-buffer))
+    (insert "\n")
+    (if (condition-case ()
+           (commandp obj)                  ; ie interactivep
+         (error nil))
+       (let ((interactive (if (consp obj)
+                              (elt (assq 'interactive obj) 1)
+                            (elt (compiled-function-interactive obj) 1))))
+          (if (eq (car-safe (car-safe obj)) 'interactive)
+              (setq obj (cdr obj)))
+          (indent-to indent)
+          (insert " interactive: ")
+         (if (eq (car-safe interactive) 'byte-code)
+             (progn
+               (insert "\n")
+               (disassemble-1 interactive
+                              (+ indent disassemble-recursive-indent)))
+           (let ((print-escape-newlines t))
+             (prin1 interactive (current-buffer))))
+         (insert "\n")))
+    (cond ((and (consp obj) (assq 'byte-code obj))
+          (disassemble-1 (assq 'byte-code obj) indent))
+         ((compiled-function-p obj)
+          (disassemble-1 obj indent))
+         (t
+          (insert "Uncompiled body:  ")
+          (let ((print-escape-newlines t))
+            (prin1 (if (cdr obj) (cons 'progn obj) (car obj))
+                   (current-buffer))))))
+  (if interactive-p
+      (message nil)))
+
+
+(defun disassemble-1 (obj indent)
+  "Prints the byte-code call OBJ in the current buffer.
+OBJ should be a call to BYTE-CODE generated by the byte compiler."
+  (let (bytes constvec)
+    (if (consp obj)
+       (setq bytes (car (cdr obj))             ; the byte code
+             constvec (car (cdr (cdr obj))))   ; constant vector
+      (setq bytes (compiled-function-instructions obj)
+           constvec (compiled-function-constants obj)))
+    (let ((lap (byte-decompile-bytecode bytes constvec))
+         op arg opname pc-value)
+      (let ((tagno 0)
+           tmp
+           (lap lap))
+       (while (setq tmp (assq 'TAG lap))
+         (setcar (cdr tmp) (setq tagno (1+ tagno)))
+         (setq lap (cdr (memq tmp lap)))))
+      (while lap
+       ;; Take off the pc value of the next thing
+       ;; and put it in pc-value.
+       (setq pc-value nil)
+       (if (numberp (car lap))
+           (setq pc-value (car lap)
+                 lap (cdr lap)))
+       ;; Fetch the next op and its arg.
+       (setq op (car (car lap))
+             arg (cdr (car lap)))
+       (setq lap (cdr lap))
+       (indent-to indent)
+       (if (eq 'TAG op)
+           (progn
+             ;; We have a label.  Display it, but first its pc value.
+             (if pc-value
+                 (insert (format "%d:" pc-value)))
+             (insert (int-to-string (car arg))))
+         ;; We have an instruction.  Display its pc value first.
+         (if pc-value
+             (insert (format "%d" pc-value)))
+         (indent-to (+ indent disassemble-column-1-indent))
+         (if (and op
+                  (string-match "^byte-" (setq opname (symbol-name op))))
+             (setq opname (substring opname 5))
+           (setq opname "<not-an-opcode>"))
+         (if (eq op 'byte-constant2)
+             (insert " #### shouldn't have seen constant2 here!\n  "))
+         (insert opname)
+         (indent-to (+ indent disassemble-column-1-indent
+                       disassemble-column-2-indent
+                       -1))
+         (insert " ")
+         (cond ((memq op byte-goto-ops)
+                (insert (int-to-string (nth 1 arg))))
+               ((memq op '(byte-call byte-unbind
+                                     byte-listN byte-concatN byte-insertN))
+                (insert (int-to-string arg)))
+               ((memq op '(byte-varref byte-varset byte-varbind))
+                (prin1 (car arg) (current-buffer)))
+               ((memq op '(byte-constant byte-constant2))
+                ;; it's a constant
+                (setq arg (car arg))
+                ;; but if the value of the constant is compiled code, then
+                ;; recursively disassemble it.
+                (cond ((or (compiled-function-p arg)
+                           (and (eq (car-safe arg) 'lambda)
+                                (assq 'byte-code arg))
+                           (and (eq (car-safe arg) 'macro)
+                                (or (compiled-function-p (cdr arg))
+                                    (and (eq (car-safe (cdr arg)) 'lambda)
+                                         (assq 'byte-code (cdr arg))))))
+                       (cond ((compiled-function-p arg)
+                              (insert "<compiled-function>\n"))
+                             ((eq (car-safe arg) 'lambda)
+                              (insert "<compiled lambda>"))
+                             (t (insert "<compiled macro>\n")))
+                       (disassemble-internal
+                        arg
+                        (+ indent disassemble-recursive-indent 1)
+                        nil))
+                      ((eq (car-safe arg) 'byte-code)
+                       (insert "<byte code>\n")
+                       (disassemble-1  ;recurse on byte-code object
+                        arg
+                        (+ indent disassemble-recursive-indent)))
+                      ((eq (car-safe (car-safe arg)) 'byte-code)
+                       (insert "(<byte code>...)\n")
+                       (mapcar         ;recurse on list of byte-code objects
+                        '(lambda (obj)
+                           (disassemble-1
+                            obj
+                            (+ indent disassemble-recursive-indent)))
+                        arg))
+                      (t
+                       ;; really just a constant
+                       (let ((print-escape-newlines t))
+                         (prin1 arg (current-buffer))))))
+               )
+         (insert "\n")))))
+  nil)
+
+(provide 'disass)
+
+;;; disass.el ends here
diff --git a/lisp/disp-table.el b/lisp/disp-table.el
new file mode 100644 (file)
index 0000000..74e3790
--- /dev/null
@@ -0,0 +1,208 @@
+;;; disp-table.el --- functions for dealing with char tables.
+
+;; Copyright (C) 1987, 1994, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1995 Sun Microsystems.
+
+;; Author: Howard Gayle
+;; Maintainer: XEmacs Development Team
+;; Keywords: i18n, internal
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not synched with FSF.
+
+;;; Commentary:
+
+;; #### Need lots of work.  make-display-table depends on a value
+;; that is a define in the C code.  Maybe we should just move the
+;; function into C.
+
+;; #### display-tables-as-vectors is really evil and a big pain in
+;; the ass.
+
+;; Rewritten for XEmacs July 1995, Ben Wing.
+
+\f
+;;; Code:
+
+(defun describe-display-table (dt)
+  "Describe the display table DT in a help buffer."
+  (with-displaying-help-buffer
+   (lambda ()
+     (princ "\nCharacter display glyph sequences:\n")
+     (save-excursion
+       (let ((vector (make-vector 256 nil))
+             (i 0))
+         (while (< i 256)
+           (aset vector i (aref dt i))
+           (incf i))
+        ;; FSF calls `describe-vector' here, but it is so incredibly
+        ;; lame a function for that name that I cannot bring myself
+        ;; to porting it.  Here is what `describe-vector' does:
+        (terpri)
+        (let ((old (aref vector 0))
+              (oldpos 0)
+              (i 1)
+              str)
+          (while (<= i 256)
+            (when (or (= i 256)
+                      (not (equal old (aref vector i))))
+              (if (eq oldpos (1- i))
+                  (princ (format "%s\t\t%s\n"
+                                 (single-key-description (int-char oldpos))
+                                 old))
+                (setq str (format "%s - %s"
+                                  (single-key-description (int-char oldpos))
+                                  (single-key-description (int-char (1- i)))))
+                (princ str)
+                (princ (make-string (max (- 2 (/ (length str)
+                                                 tab-width)) 1) ?\t))
+                (princ old)
+                (terpri))
+              (or (= i 256)
+                  (setq old (aref vector i)
+                        oldpos i)))
+            (incf i))))))))
+
+;;;###autoload
+(defun describe-current-display-table (&optional domain)
+  "Describe the display table in use in the selected window and buffer."
+  (interactive)
+  (or domain (setq domain (selected-window)))
+  (let ((disptab (specifier-instance current-display-table domain)))
+    (if disptab
+       (describe-display-table disptab)
+      (message "No display table"))))
+
+;;;###autoload
+(defun make-display-table ()
+  "Return a new, empty display table."
+  (make-vector 256 nil))
+
+;; #### we need a generic frob-specifier function.
+;; #### this also needs to be redone like frob-face-property.
+
+;; Let me say one more time how much dynamic scoping sucks.
+
+(defun frob-display-table (fdt-function fdt-locale)
+  (or fdt-locale (setq fdt-locale 'global))
+  (or (specifier-spec-list current-display-table fdt-locale)
+      (add-spec-to-specifier current-display-table (make-display-table)
+                            fdt-locale))
+  (add-spec-list-to-specifier
+   current-display-table
+   (list (cons fdt-locale
+              (mapcar
+               (lambda (fdt-x)
+                  (funcall fdt-function (cdr fdt-x))
+                  fdt-x)
+               (cdar (specifier-spec-list current-display-table
+                                          fdt-locale)))))))
+
+(defun standard-display-8bit-1 (dt l h)
+  (while (<= l h)
+    (aset dt l (char-to-string l))
+    (setq l (1+ l))))
+
+;;;###autoload
+(defun standard-display-8bit (l h &optional locale)
+  "Display characters in the range L to H literally."
+  (frob-display-table
+   (lambda (x)
+     (standard-display-8bit-1 x l h))
+   locale))
+
+(defun standard-display-default-1 (dt l h)
+  (while (<= l h)
+    (aset dt l nil)
+    (setq l (1+ l))))
+
+;;;###autoload
+(defun standard-display-default (l h &optional locale)
+  "Display characters in the range L to H using the default notation."
+  (frob-display-table
+   (lambda (x)
+     (standard-display-default-1 x l h))
+   locale))
+
+;;;###autoload
+(defun standard-display-ascii (c s &optional locale)
+  "Display character C using printable string S."
+  (frob-display-table
+   (lambda (x)
+     (aset x c s))
+   locale))
+
+
+;;; #### should frob in a 'tty locale.
+
+;;;###autoload
+(defun standard-display-g1 (c sc &optional locale)
+  "Display character C as character SC in the g1 character set.
+This function assumes that your terminal uses the SO/SI characters;
+it is meaningless for an X frame."
+  (frob-display-table
+   (lambda (x)
+     (aset x c (concat "\016" (char-to-string sc) "\017")))
+   locale))
+
+
+;;; #### should frob in a 'tty locale.
+
+;;;###autoload
+(defun standard-display-graphic (c gc &optional locale)
+  "Display character C as character GC in graphics character set.
+This function assumes VT100-compatible escapes; it is meaningless for an
+X frame."
+  (frob-display-table
+   (lambda (x)
+     (aset x c (concat "\e(0" (char-to-string gc) "\e(B")))
+   locale))
+
+;;; #### should frob in a 'tty locale.
+;;; #### the FSF equivalent of this makes this character be displayed
+;;; in the 'underline face.  There's no current way to do this with
+;;; XEmacs display tables.
+
+;;;###autoload
+(defun standard-display-underline (c uc &optional locale)
+  "Display character C as character UC plus underlining."
+  (frob-display-table
+   (lambda (x)
+     (aset x c (concat "\e[4m" (char-to-string uc) "\e[m")))
+   locale))
+
+;;;###autoload
+(defun standard-display-european (arg &optional locale)
+  "Toggle display of European characters encoded with ISO 8859.
+When enabled, characters in the range of 160 to 255 display not
+as octal escapes, but as accented characters.
+With prefix argument, enable European character display iff arg is positive."
+  (interactive "P")
+  (frob-display-table
+   (lambda (x)
+     (if (or (<= (prefix-numeric-value arg) 0)
+             (and (null arg)
+                  (equal (aref x 160) (char-to-string 160))))
+         (standard-display-default-1 x 160 255)
+       (standard-display-8bit-1 x 160 255)))
+   locale))
+
+(provide 'disp-table)
+
+;;; disp-table.el ends here
diff --git a/lisp/dragdrop.el b/lisp/dragdrop.el
new file mode 100644 (file)
index 0000000..92d3069
--- /dev/null
@@ -0,0 +1,424 @@
+;;; dragdrop.el --- window system-independent Drag'n'Drop support.
+
+;; Copyright (C) 1998 Oliver Graf <ograf@fga.de>
+
+;; Maintainer: XEmacs Development Team, Oliver Graf <ograf@fga.de>
+;; Keywords: drag, drop, dumped
+
+;; 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; see the file COPYING.  If not, write to the
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not in FSF.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs (when drag'n'drop support is compiled in).
+
+;;; Code:
+
+;; we need mouse-set-point
+(require 'mouse)
+(provide 'dragdrop)
+
+;; I think this is a better name for the custom group
+;; looks better in the menu and the group display as dragdrop
+;; Anyway: is dragdrop- a good prefix for all this?
+;; What if someone trys drop<TAB> in the minibuffer?
+(defgroup drag-n-drop nil
+  "*{EXPERIMENTAL} Window system-independent drag'n'drop support."
+  :group 'editing)
+
+(defcustom dragdrop-drop-at-point nil
+  "*{EXPERIMENTAL} If non-nil, drop text at the cursor location.
+Otherwise, the cursor will be moved to the location of the pointer drop before
+text is inserted."
+  :type 'boolean
+  :group 'drag-n-drop)
+
+(defcustom dragdrop-autoload-tm-view nil
+  "*{EXPERIMENTAL} If non-nil, autoload tm-view to decode MIME data.
+Otherwise, the buffer is only decoded if tm-view is already avaiable."
+  :type 'boolean
+  :group 'drag-n-drop)
+
+;; the widget for editing the drop-functions
+(define-widget 'dragdrop-function-widget 'list
+  "*{EXPERIMENTAL} Widget for editing drop dispatch functions."
+  :args `((choice :tag "Function"
+                 (function-item experimental-dragdrop-drop-url-default)
+                 (function-item experimental-dragdrop-drop-mime-default)
+                 (function-item experimental-dragdrop-drop-log-function)
+                 (function :tag "Other" nil))
+         (choice :tag "Button" :value t
+                 (choice-item :tag "Ignore" t)
+                 (choice-item 0) (choice-item 1) (choice-item 2)
+                 (choice-item 3) (choice-item 4) (choice-item 5)
+                 (choice-item 6) (choice-item 7))
+         (radio-button-choice :tag "Modifiers"
+                              (const :tag "Ignore Modifier Keys" t)
+                              (checklist :greedy t
+                                         :format "Modifier Keys:\n%v"
+                                         :extra-offset 6
+                                         (const shift)
+                                         (const control)
+                                         (const meta)
+                                         (const alt)
+                                         (const hyper)
+                                         (const super)))
+         (repeat :inline t :value nil :tag "Extra Function Arguments"
+                 (sexp :tag "Arg" :value nil)))
+  :value '(nil t t))
+
+(defcustom experimental-dragdrop-drop-functions '((experimental-dragdrop-drop-url-default t t)
+                                                 (experimental-dragdrop-drop-mime-default t t))
+  "*{EXPERIMENTAL} This is the standart drop function search list.
+Each element is a list of a function, a button selector, a modifier
+selector and optional argumets to the function call.
+The function must accept at least two arguments: first is the event
+of the drop, second the object data, followed by any of the optional
+arguments provided in this list.
+The functions are called in order, until one returns t."
+  :group 'drag-n-drop
+  :type '(repeat dragdrop-function-widget))
+
+(defgroup dnd-debug nil
+  "*{EXPERIMENTAL} Drag'n'Drop debugging options."
+  :group 'drag-n-drop)
+
+(defcustom dragdrop-drop-log nil
+  "*{EXPERIMENTAL} If non-nil, every drop is logged.
+The name of the buffer is set in the custom 'dragdrop-drop-log-name"
+  :group 'dnd-debug
+  :type 'boolean)
+
+(defcustom dragdrop-drop-log-name "*drop log buffer*"
+  "*{EXPERIMENTAL} The name of the buffer used to log drops.
+Set dragdrop-drop-log to non-nil to enable this feature."
+  :group 'dnd-debug
+  :type 'string)
+
+(defvar dragdrop-drop-log-buffer nil
+  "*{EXPERIMENTAL} Buffer to log drops in debug mode.")
+
+;;
+;; Drop API
+;;
+(defun dragdrop-drop-dispatch (object)
+  "*{EXPERIMENTAL} This function identifies DROP type misc-user-events.
+It calls functions which will handle the drag."
+  (let ((event current-mouse-event))
+    (and dragdrop-drop-log
+        (experimental-dragdrop-drop-log-function event object))
+    (dragdrop-drop-find-functions event object)))
+
+(defun dragdrop-drop-find-functions (event object)
+  "Finds valid drop-handle functions and executes them to dispose the drop.
+It does this by looking for extent-properties called
+'experimental-dragdrop-drop-functions and for variables named like this."
+  (catch 'dragdrop-drop-is-done
+    (and (event-over-text-area-p event)
+        ;; let's search the extents
+        (catch 'dragdrop-extents-done
+          (let ((window (event-window event))
+                (pos (event-point event))
+                (cpos (event-closest-point event))
+                (buffer nil))
+            (or window (throw 'dragdrop-extents-done nil))
+            (or pos (setq pos cpos))
+            (select-window window)
+            (setq buffer (window-buffer))
+            (let ((ext (extent-at pos buffer 'experimental-dragdrop-drop-functions)))
+              (while (not (eq ext nil))
+                (dragdrop-drop-do-functions
+                 (extent-property ext 'experimental-dragdrop-drop-functions)
+                 event
+                 object)
+                (setq ext (extent-at pos buffer
+                                     'experimental-dragdrop-drop-functions
+                                     ext)))))))
+    ;; now look into the variable experimental-dragdrop-drop-functions
+    (dragdrop-drop-do-functions experimental-dragdrop-drop-functions event object)))
+
+(defun dragdrop-compare-mods (first-mods second-mods)
+  "Returns t if both first-mods and second-mods contain the same elements.
+Order is not important."
+  (let ((moda (copy-sequence first-mods))
+       (modb (copy-sequence second-mods)))
+    (while (and (not (eq moda ()))
+               (not (eq modb ())))
+      (setq modb (delete (car moda) modb))
+      (setq moda (delete (car moda) moda)))
+    (and (eq moda ())
+        (eq modb ()))))
+
+(defun dragdrop-drop-do-functions (drop-funs event object)
+  "Calls all functions in drop-funs with object until one returns t.
+Returns t if one of drop-funs returns t. Otherwise returns nil."
+  (let ((flist nil)
+       (button (event-button event))
+       (mods (event-modifiers event)))
+    (while (not (eq drop-funs ()))
+      (setq flist (car drop-funs))
+      (and (or (eq (cadr flist) t)
+              (= (cadr flist) button))
+          (or (eq (caddr flist) t)
+              (dragdrop-compare-mods (caddr flist) modifiers))
+          (apply (car flist) `(,event ,object ,@(cdddr flist)))
+          ;; (funcall (car flist) event object)
+          (throw 'dragdrop-drop-is-done t))
+      (setq drop-funs (cdr drop-funs))))
+  nil)
+
+(defun experimental-dragdrop-drop-log-function (event object &optional message buffer)
+  "*{EXPERIMENTAL} Logs any drops into a buffer.
+If buffer is nil, it inserts the data into a buffer called after
+dragdrop-drop-log-name.
+If dragdrop-drop-log is non-nil, this is done automatically for each drop.
+The function always returns nil."
+  (save-excursion
+    (cond ((buffer-live-p buffer)
+          (set-buffer buffer))
+         ((stringp buffer)
+          (set-buffer (get-buffer-create buffer)))
+         ((buffer-live-p dragdrop-drop-log-buffer)
+          (set-buffer dragdrop-drop-log-buffer))
+         (t
+          (setq dragdrop-drop-log-buffer (get-buffer-create dragdrop-drop-log-name))
+          (set-buffer dragdrop-drop-log-buffer)))
+    (insert (format "* %s: %s\n"
+                   (current-time-string)
+                   (if message message "received a drop")))
+    (insert (format "  at %d,%d (%d,%d) with button %d and mods %s\n"
+                   (event-x event)
+                   (event-y event)
+                   (event-x-pixel event)
+                   (event-y-pixel event)
+                   (event-button event)
+                   (event-modifiers event)))
+    (insert (format "  data is of type %s (%d %s)\n"
+            (cond ((eq (car object) 'dragdrop-URL) "URL")
+                  ((eq (car object) 'dragdrop-MIME) "MIME")
+                  (t "UNKNOWN"))
+            (length (cdr object))
+            (if (= (length (cdr object)) 1) "element" "elements")))
+    (let ((i 1)
+         (data (cdr object)))
+      (while (not (eq data ()))
+       (insert (format "    Element %d: %S\n"
+                       i (car data)))
+       (setq i (1+ i))
+       (setq data (cdr data))))
+    (insert "----------\n"))
+  nil)
+
+(defun experimental-dragdrop-drop-url-default (event object)
+  "*{EXPERIMENTAL} Default handler for dropped URL data.
+Finds files and URLs. Returns nil if object does not contain URL data."
+  (cond ((eq (car object) 'dragdrop-URL)
+        (let ((data (cdr object))
+              (frame (event-channel event))
+              (x pop-up-windows)
+              (window (event-window event)))
+          (setq pop-up-windows nil)
+          (while (not (eq data ()))
+            (cond ((dragdrop-is-some-url "file" (car data))
+                   ;; if it is some file, pop it to a buffer
+                   (cond (window
+                          (select-window window)))
+                   (switch-to-buffer (find-file-noselect
+                                      (substring (car data) 5))))
+                  ;; to-do: open ftp URLs with efs...
+                  (t 
+                   ;; some other URL, try to fire up some browser for it
+                   (if (boundp 'browse-url-browser-function)
+                       (funcall browse-url-browser-function (car data))
+                     (display-message 'error 
+                       "Can't show URL, no browser selected"))))
+            (undo-boundary)
+            (setq data (cdr data)))
+          (make-frame-visible frame)
+          (setq pop-up-windows x)
+          t))
+       (t nil)))
+
+(defun experimental-dragdrop-drop-mime-default (event object)
+  "*{EXPERIMENTAL} Default handler for dropped MIME data.
+Inserts text into buffer, creates MIME buffers for other types.
+Returns nil if object does not contain MIME data."
+  (cond ((eq (car object) 'dragdrop-MIME)
+        (let ((ldata (cdr object))
+              (frame (event-channel event))
+              (x pop-up-windows)
+              (data nil))
+          ;; how should this be handled???
+          ;; insert drops of text/* into buffer
+          ;; create new buffer if pointer is outside buffer...
+          ;; but there are many other ways...
+          ;;   
+          ;; first thing: check if it's only text/plain and if the
+          ;; drop happened inside some buffer. if yes insert it into
+          ;; this buffer (hope it is not encoded in some MIME way)
+          ;;
+          ;; Remember: ("text/plain" "dosnotmatter" "somedata")
+          ;; drops are inserted at mouse-point, if inside a buffer
+          (while (not (eq ldata ()))
+            (setq data (car ldata))
+            (if (and (listp data)
+                     (= (length data) 3)
+                     (listp (car data))
+                     (stringp (caar data))
+                     (string= (caar data) "text/plain")
+                     (event-over-text-area-p event))
+                (let ((window (event-window event)))
+                  (and window
+                       (select-window window))
+                  (and (not dragdrop-drop-at-point)
+                       (mouse-set-point event))
+                  (insert (caddr data)))
+              (let ((buf (get-buffer-create "*MIME-Drop data*")))
+                (set-buffer buf)
+                (pop-to-buffer buf nil frame)
+                (or (featurep 'tm-view)
+                    (and dragdrop-autoload-tm-view
+                         (require 'tm-view)))
+                (cond ((stringp data)
+                       ;; this is some raw MIME stuff
+                       ;; create some buffer and let tm do the job
+                       ;;
+                       ;; this is always the same buffer!!!
+                       ;; change?
+                       (erase-buffer)
+                       (insert data)
+                       (and (featurep 'tm-view)
+                            (mime/viewer-mode buf)))
+                      ((and (listp data)
+                            (= (length data) 3))
+                       ;; change the internal content-type representation to the
+                       ;; way tm does it ("content/type" (key . value)*)
+                       ;; but for now list will do the job
+                       ;;
+                       ;; this is always the same buffer!!!
+                       ;; change?
+                       (erase-buffer)
+                       (insert (caddr data))
+                       (and (featurep 'tm-view)
+                            ;; this list of (car data) should be done before
+                            ;; enqueing the event
+                            (mime/viewer-mode buf (car data) (cadr data))))
+                      (t
+                       (display-message 'error "Wrong drop data")))))
+            (undo-boundary)
+            (setq ldata (cdr ldata)))
+          (make-frame-visible frame)
+          (setq pop-up-windows x))
+        t)
+       (t nil)))
+
+(defun dragdrop-is-some-url (method url)
+  "Returns true if method equals the start of url.
+If method does not end into ':' this is appended before the
+compare."
+  (cond ((and (stringp url)
+             (stringp method)
+             (> (length url) (length method)))
+        ;; is this ?: check efficient enough?
+        (if (not (string= (substring method -1) ":"))
+            (setq method (concat method ":")))
+        (string= method (substring url 0 (length method))))
+       (t nil)))
+
+;;
+;; Drag API
+;;
+(defun experimental-dragdrop-drag (event object)
+  "*{EXPERIMENTAL} The generic drag function.
+Tries to do the best with object in the selected protocol.
+Object must comply to the standart drag'n'drop object 
+format."
+  (error "Not implemented"))
+
+(defun experimental-dragdrop-drag-region (event begin end)
+  "*{EXPERIMENTAL} Drag a region.
+This function uses special data types if the low-level
+protocol requires it. It does so by calling
+dragdrop-drag-pure-text."
+  (dragdrop-drag-pure-text event
+                          (buffer-substring-no-properties begin end)))
+
+(defun experimental-dragdrop-drag-pure-text (event text)
+  "*{EXPERIMENTAL} Drag text-only data.
+Takes care of special low-level protocol data types.
+Text must be a list of strings."
+  (error "Not implemented"))
+
+(defun experimental-dragdrop-drag-pure-file (event file)
+  "*{EXPERIMENTAL} Drag filepath-only data.
+Takes care of special low-level protocol data types.
+file must be a list of strings."
+  (error "Not implemented"))
+
+;;
+;; The following ones come from frame.el but the better belong here
+;; until changed
+;;
+(defun cde-start-drag (event type data)
+  "Implement the CDE drag operation.
+Calls the internal function cde-start-drag-internal to do the actual work."
+  (interactive "_eXX")
+  (if (featurep 'cde)
+      ;; Avoid build-time doc string warning by calling the function
+      ;; in the following roundabout way:
+      (funcall (intern "cde-start-drag-internal")
+              event type data)
+    (error "CDE functionality not compiled in.")))
+
+(defun cde-start-drag-region (event begin end)
+  "Implement the CDE drag operation for a region.
+Calls the internal function CDE-start-drag-internal to do the actual work.
+This always does buffer transfers."
+  ;; Oliver Graf <ograf@fga.de>
+  (interactive "_er")
+  (if (featurep 'cde)
+      (funcall (intern "cde-start-drag-internal")
+              event nil (list (buffer-substring-no-properties begin end)))
+    (error "CDE functionality not compiled in.")))
+
+;; the OffiX drag stuff will soon move also (perhaps mouse.el)
+;; if the drag event is done
+(defun offix-start-drag (event data &optional type)
+  "Implement the OffiX drag operation.
+Calls the internal function offix-start-drag-internal to do the actual work.
+If type is not given, DndText is assumed."
+  ;; Oliver Graf <ograf@fga.de>
+  (interactive "esi")
+  (if (featurep 'offix)
+      (funcall (intern "offix-start-drag-internal") event data type)
+    (error "OffiX functionality not compiled in.")))
+
+(defun offix-start-drag-region (event begin end)
+  "Implement the OffiX drag operation for a region.
+Calls the internal function offix-start-drag-internal to do the actual work.
+This always assumes DndText as type."
+  ;; Oliver Graf <ograf@fga.de>
+  (interactive "_er")
+  (if (featurep 'offix)
+      (funcall (intern "offix-start-drag-internal")
+              event (buffer-substring-no-properties begin end))
+    (error "OffiX functionality not compiled in.")))
+
+
+;;; dragdrop.el ends here
diff --git a/lisp/dump-paths.el b/lisp/dump-paths.el
new file mode 100644 (file)
index 0000000..81e4de3
--- /dev/null
@@ -0,0 +1,72 @@
+;; dump-paths.el --- set up XEmacs paths for dumping
+
+;; Copyright (C) 1985, 1986, 1992, 1994, 1997 Free Software Foundation, Inc.
+
+;; Maintainer: XEmacs Development Team
+;; Keywords: internal, dumped
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Not in FSF
+
+;;; Commentary:
+
+;; This sets up the various paths for continuing loading files for
+;; dumping.
+
+(let ((debug-paths (or debug-paths
+                     (and (getenv "EMACSDEBUGPATHS")
+                          t)))
+      (roots (paths-find-emacs-roots invocation-directory
+                                    invocation-name)))
+
+  (if debug-paths
+      (princ (format "XEmacs thinks the roots of its hierarchy are:\n%S\n"
+                    roots)))
+
+  (let ((stuff (packages-find-packages roots)))
+    (setq late-packages (car (cdr stuff))))
+
+  (setq late-package-load-path (packages-find-package-load-path late-packages))
+
+  (if debug-paths
+      (progn
+       (princ (format "configure-package-path:\n%S\n" configure-package-path)
+              'external-debugging-output)
+       (princ (format "late-packages and late-package-load-path:\n%S\n%S\n"
+                      late-packages late-package-load-path)
+              'external-debugging-output)))
+
+  (setq lisp-directory (paths-find-lisp-directory roots))
+  (if debug-paths
+      (princ (format "lisp-directory:\n%S\n" lisp-directory)
+            'external-debugging-output))
+  (setq site-directory (and (null inhibit-site-lisp)
+                           (paths-find-site-lisp-directory roots)))
+  (if (and debug-paths (null inhibit-site-lisp))
+      (princ (format "site-directory:\n%S\n" site-directory)
+            'external-debugging-output))
+
+  (setq load-path (paths-construct-load-path roots
+                                            '()
+                                            late-package-load-path
+                                            '()
+                                            lisp-directory
+                                            site-directory)))
+
+;;; dump-paths.el ends here
diff --git a/lisp/dumped-lisp.el b/lisp/dumped-lisp.el
new file mode 100644 (file)
index 0000000..cbbecfb
--- /dev/null
@@ -0,0 +1,220 @@
+(setq preloaded-file-list
+      (assemble-list
+        "backquote"            ; needed for defsubst etc.
+       "bytecomp-runtime"      ; define defsubst
+       "Installation.el"
+       "find-paths"
+       "packages"              ; Bootstrap run-time lisp environment
+       "setup-paths"
+       "dump-paths"
+       "subr"                  ; load the most basic Lisp functions
+       "replace"               ; match-string used in version.el.
+       ; Ignore compiled-by-mistake version.elc
+       "version.el"
+       "cl"
+       "cl-extra"
+       "cl-seq"
+       "widget"
+       "custom"                ; Before the world so everything can be
+                               ; customized
+       "cus-start"             ; for customization of builtin variables
+       "cmdloop"
+       "keymap"
+       "syntax"
+       "device"
+       "console"
+       "obsolete"
+       "specifier"
+       "faces"                 ; must be loaded before any make-face call
+;;(pureload "facemenu") #### not yet ported
+       "glyphs"
+       "objects"
+       "extents"
+       "events"
+       "text-props"
+       "process" ;; This is bad. network-streams may not be defined.
+       (when-feature multicast "multicast") ; #+network-streams implicitely true
+       "frame"                 ; move up here cause some stuff needs it here
+       "map-ynp"
+       "simple"
+       "keydefs"               ; Before loaddefs so that keymap vars exist.
+       "abbrev"
+       "derived"
+       "minibuf"
+       "list-mode"
+       "modeline"              ; needs simple.el to be loaded first
+;; If SparcWorks support is included some additional packages are
+;; dumped which would normally have autoloads.  To avoid
+;; duplicate doc string warnings, SparcWorks uses a separate
+;; autoloads file with the dumped packages removed.
+;; After fixing, eos/loaddefs-eos and loaddefs appear identical?!!
+;; So just make loaddefs-eos go away...
+;;(pureload (if (featurep 'sparcworks) "eos/loaddefs-eos" "loaddefs"))
+       "startup"               ; For initialization of
+                               ;  `emacs-user-extension-dir'
+       "misc"
+       ;; (pureload "profile")
+       (unless-feature mule "help-nomule")
+       "help"
+       ;; (pureload "hyper-apropos")  Soon...
+       (unless-feature file-coding "files-nomule")
+       "files"
+       "lib-complete"
+       "format"
+       "indent"
+       "isearch-mode"
+       "buffer"
+       "buff-menu"
+       "undo-stack"
+       "window"
+       "window-xemacs"
+       "paths.el"              ; don't get confused if paths compiled.
+       "lisp"
+       "page"
+       "register"
+       "iso8859-1"             ; This must be before any modes
+                                       ; (sets standard syntax table.)
+       "paragraphs"
+       "easymenu"              ; Added for 20.3.
+       "lisp-mode"
+       "text-mode"
+       "fill"
+       "auto-save"             ; Added for 20.4
+
+       (when-feature windows-nt "winnt")
+       (when-feature lisp-float-type "float-sup")
+       "itimer"                ; for vars auto-save-timeout and
+                               ; auto-gc-threshold
+       "itimer-autosave"
+       (when-feature toolbar "toolbar")
+       (when-feature scrollbar "scrollbar")
+       (when-feature menubar "menubar")
+       (when-feature dialog "dialog")
+       (when-feature mule "mule-charset")
+       (when-feature file-coding "coding")
+       (when-feature mule "mule-coding")
+;; Handle I/O of files with extended characters.
+       (when-feature file-coding "code-files")
+       (when-feature mule "mule-files")
+;; Handle process with encoding/decoding non-ascii coding-system.
+       (when-feature file-coding "code-process")
+       (when-feature mule "mule-help")
+;; Load the remaining basic files.
+       (when-feature mule "mule-category")
+       (when-feature mule "mule-ccl")
+       (when-feature mule "mule-misc")
+       (when-feature mule "kinsoku")
+       (when-feature (and mule x) "mule-x-init")
+       (when-feature (and mule tty) "mule-tty-init")
+       (when-feature mule "mule-cmds") ; to sync with Emacs 20.1
+
+;; after this goes the specific lisp routines for a particular input system
+;; 97.2.5 JHod Shouldn't these go into a site-load file to allow site
+;; or user switching of input systems???
+;(if (featurep 'wnn)
+;    (progn
+;      (pureload "egg")
+;      (pureload "egg-wnn")
+;      (setq egg-default-startup-file "eggrc-wnn")))
+
+;; (if (and (boundp 'CANNA) CANNA)
+;;     (pureload "canna")
+;;   )
+
+;; Now load files to set up all the different languages/environments
+;; that Mule knows about.
+
+       (when-feature mule "arabic")
+       (when-feature mule "chinese")
+       (when-feature mule "mule-base/cyrillic") ; overloaded in leim/quail
+       (when-feature mule "english")
+;;     (when-feature mule "ethiopic")
+       (when-feature mule "european")
+       (when-feature mule "mule-base/greek") ; overloaded in leim/quail
+       (when-feature mule "hebrew")
+       (when-feature mule "japanese")
+       (when-feature mule "korean")
+       (when-feature mule "misc-lang")
+;;     (when-feature mule "thai")
+       (when-feature mule "viet-chars")
+;;     (when-feature mule "vietnamese")
+
+       ;; Specialized language support
+       (when-feature (and mule CANNA) "canna-leim")
+;; Egg/Its is now a package
+;      (when-feature (and mule wnn) "egg-leim")
+;      (when-feature (and mule wnn) "egg-kwnn-leim")
+;      (when-feature (and mule wnn) "egg-cwnn-leim")
+;      (when-feature mule "egg-sj3-leim")
+;; SKK is now a package
+;      (when-feature mule "skk-leim")
+
+;; Set up the XEmacs environment for Mule.
+;; Assumes the existence of various stuff above.
+       (when-feature mule "mule-init")
+
+;; Enable Mule capability for Gnus, mail, etc...
+;; Moved to sunpro-load.el - the default only for Sun.
+;;(pureload "mime-setup")
+;;; mule-load.el ends here
+       (when-feature window-system "gui")
+       (when-feature window-system "mode-motion")
+       (when-feature window-system "mouse")
+       (when-feature window-system "select")
+       (when-feature dragdrop-api "dragdrop")
+;; preload the X code, for faster startup.
+       (when-feature (and (not infodock)
+                          (or x mswindows) menubar) "menubar-items")
+       (when-feature (and infodock (or x mswindows) menubar) "id-menus")
+       (when-feature x "x-faces")
+       (when-feature x "x-iso8859-1")
+       (when-feature x "x-mouse")
+       (when-feature x "x-select")
+       (when-feature (and x scrollbar) "x-scrollbar")
+       (when-feature x "x-misc")
+       (when-feature x "x-init")
+       (when-feature (and (not infodock)
+                          window-system toolbar) "toolbar-items")
+       (when-feature x "x-win-xfree86")
+       (when-feature x "x-win-sun")
+;; preload the mswindows code.
+       (when-feature mswindows "msw-glyphs")
+       (when-feature mswindows "msw-faces")
+       (when-feature mswindows "msw-mouse")
+       (when-feature mswindows "msw-init")
+       (when-feature mswindows "msw-select")
+;; preload the TTY init code.
+       (when-feature tty "tty-init")
+;;; Formerly in tooltalk/tooltalk-load.el
+       ;; Moved to tooltalk package
+       ;; (when-feature tooltalk "tooltalk-macros")
+       ;; (when-feature tooltalk "tooltalk-util")
+       ;; (when-feature tooltalk "tooltalk-init")
+       ;; "vc-hooks"           ; Packaged.  Available in two versions.
+       ;; "ediff-hook"         ; Packaged.
+       "fontl-hooks"
+       "auto-show"
+       (when-feature ldap "ldap")
+
+;; (when-feature energize "energize/energize-load.el")
+;;; formerly in sunpro/sunpro-load.el
+;;     (when-feature (and mule sparcworks) "mime-setup")
+
+       ;; Moved to Sun package
+       ;; (when-feature sparcworks "cc-mode") ; Requires cc-mode package
+       ;; (when-feature sparcworks "sunpro-init")
+       ;; (when-feature sparcworks "ring")
+       ;; (when-feature sparcworks "comint") ; Requires comint package
+       ;; (when-feature sparcworks "annotations")
+
+;;; formerly in eos/sun-eos-load.el
+;;     (when-feature sparcworks "sun-eos-init")
+;;     (when-feature sparcworks "sun-eos-common")
+;;     (when-feature sparcworks "sun-eos-editor")
+;;     (when-feature sparcworks "sun-eos-browser")
+;;     (when-feature sparcworks "sun-eos-debugger")
+;;     (when-feature sparcworks "sun-eos-debugger-extra")
+;;     (when-feature sparcworks "sun-eos-menubar")
+       "loadhist"              ; Must be dumped before loaddefs is loaded
+       "loaddefs"              ; <=== autoloads get loaded here
+))
diff --git a/lisp/easymenu.el b/lisp/easymenu.el
new file mode 100644 (file)
index 0000000..3bd9f34
--- /dev/null
@@ -0,0 +1,217 @@
+;;; easymenu.el - Easy menu support for Emacs 19 and XEmacs.
+
+;; Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+
+;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
+;; Maintainer: XEmacs Development Team
+;; Keywords: internal, extensions, dumped
+
+;; 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., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Not synched with FSF.
+
+;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; Easymenu allows you to define menus for both Emacs 19 and XEmacs.
+
+;; This file 
+;; The advantages of using easymenu are:
+
+;; - Easier to use than either the Emacs 19 and XEmacs menu syntax.
+
+;; - Common interface for Emacs 18, Emacs 19, and XEmacs.  
+;;   (The code does nothing when run under Emacs 18).
+
+;; The public functions are:
+
+;; - Function: easy-menu-define SYMBOL MAPS DOC MENU
+;;     SYMBOL is both the name of the variable that holds the menu and
+;;            the name of a function that will present a the menu.
+;;     MAPS is a list of keymaps where the menu should appear in the menubar.
+;;     DOC is the documentation string for the variable.
+;;     MENU is an XEmacs style menu description.  
+
+;;     See the documentation for easy-menu-define for details.
+
+;; - Function: easy-menu-change PATH NAME ITEMS
+;;     Change an existing menu.
+;;     The menu must already exist and be visible on the menu bar.
+;;     PATH is a list of strings used for locating the menu on the menu bar. 
+;;     NAME is the name of the menu.  
+;;     ITEMS is a list of menu items, as defined in `easy-menu-define'.
+
+;; - Function: easy-menu-add MENU [ MAP ]
+;;     Add MENU to the current menubar in MAP.
+
+;; - Function: easy-menu-remove MENU
+;;     Remove MENU from the current menubar.
+
+;; Emacs 19 never uses `easy-menu-add' or `easy-menu-remove', menus
+;; automatically appear and disappear when the keymaps specified by
+;; the MAPS argument to `easy-menu-define' are activated.
+
+;; XEmacs will bind the map to button3 in each MAPS, but you must
+;; explicitly call `easy-menu-add' and `easy-menu-remove' to add and
+;; remove menus from the menu bar.
+
+;;; Code:
+
+;; ;;;###autoload
+(defmacro easy-menu-define (symbol maps doc menu)
+  "Define a menu bar submenu in maps MAPS, according to MENU.
+The arguments SYMBOL and DOC are ignored; they are present for
+compatibility only.  SYMBOL is not evaluated.  In other Emacs versions
+these arguments may be used as a variable to hold the menu data, and a
+doc string for that variable.
+
+The first element of MENU must be a string.  It is the menu bar item name.
+The rest of the elements are menu items.
+
+A menu item is usually a vector of three elements:  [NAME CALLBACK ENABLE]
+
+NAME is a string--the menu item name.
+
+CALLBACK is a command to run when the item is chosen,
+or a list to evaluate when the item is chosen.
+
+ENABLE is an expression; the item is enabled for selection
+whenever this expression's value is non-nil.
+
+Alternatively, a menu item may have the form: 
+
+   [ NAME CALLBACK [ KEYWORD ARG ] ... ]
+
+Where KEYWORD is one of the symbol defined below.
+
+   :keys KEYS
+
+KEYS is a string; a complex keyboard equivalent to this menu item.
+
+   :active ENABLE
+
+ENABLE is an expression; the item is enabled for selection
+whenever this expression's value is non-nil.
+
+   :suffix NAME
+
+NAME is a string; the name of an argument to CALLBACK.
+
+   :style STYLE
+   
+STYLE is a symbol describing the type of menu item.  The following are
+defined:  
+
+toggle: A checkbox.  
+        Currently just prepend the name with the string \"Toggle \".
+radio: A radio button. 
+nil: An ordinary menu item.
+
+   :selected SELECTED
+
+SELECTED is an expression; the checkbox or radio button is selected
+whenever this expression's value is non-nil.
+Currently just disable radio buttons, no effect on checkboxes.
+
+A menu item can be a string.  Then that string appears in the menu as
+unselectable text.  A string consisting solely of hyphens is displayed
+as a solid horizontal line.
+
+A menu item can be a list.  It is treated as a submenu.
+The first element should be the submenu name.  That's used as the
+menu item in the top-level menu.  The cdr of the submenu list
+is a list of menu items, as above."
+  (` (progn
+       (defvar (, symbol) nil (, doc))
+       (easy-menu-do-define (quote (, symbol)) (, maps) (, doc) (, menu)))))
+
+(defun easy-menu-do-define (symbol maps doc menu)
+  (if (featurep 'menubar)
+      (progn
+       (set symbol menu)
+       (fset symbol (list 'lambda '(e)
+                          doc
+                          '(interactive "@e")
+                          '(run-hooks 'activate-menubar-hook)
+                          '(setq zmacs-region-stays 't)
+                          (list 'popup-menu symbol))))))
+
+(defun easy-menu-change (&rest args)
+  (when (featurep 'menubar)
+    (apply 'add-menu args)))
+
+;; This variable hold the easy-menu mode menus of all major and
+;; minor modes currently in effect in the current buffer.
+(defvar easy-menu-all-popups nil)
+(make-variable-buffer-local 'easy-menu-all-popups)
+
+(defun easy-menu-add (menu &optional map)
+  "Add MENU to the current menu bar."
+  (if (featurep 'menubar)
+      (progn
+       (unless (member menu easy-menu-all-popups)
+         (push menu easy-menu-all-popups))
+       (setq mode-popup-menu (if (> (length easy-menu-all-popups) 1)
+                                 (cons (easy-menu-title)
+                                       (reverse easy-menu-all-popups))
+                               (car easy-menu-all-popups)))
+
+       (cond ((null current-menubar)
+              ;; Don't add it to a non-existing menubar.
+              nil)
+             ((assoc (car menu) current-menubar)
+              ;; Already present.
+              nil)
+             ((equal current-menubar '(nil))
+              ;; Set at left if only contains right marker.
+              (set-buffer-menubar (list menu nil)))
+             (t
+              ;; Add at right.
+              (set-buffer-menubar (copy-sequence current-menubar))
+              (add-menu nil (car menu) (cdr menu)))))))
+
+(defun easy-menu-remove (menu)
+  "Remove MENU from the current menu bar."
+  (if (featurep 'menubar)
+      (progn
+       (setq easy-menu-all-popups (delq menu easy-menu-all-popups)
+             mode-popup-menu (if (< (length easy-menu-all-popups) 1)
+                                 (cons (easy-menu-title)
+                                       (reverse easy-menu-all-popups))
+                               (car easy-menu-all-popups)))
+
+       (and current-menubar
+            (assoc (car menu) current-menubar)
+            (delete-menu-item (list (car menu)))))))
+
+;; Think up a good title for the menu.  Take the major-mode of the
+;; buffer, strip the -mode part, convert hyphens to spaces, and
+;; capitalize it.
+;;
+;; If you can think of something smarter, feel free to replace it.
+;; Don't forget to mail the change to xemacs@xemacs.org where everyone
+;; can flame, er, praise your changes.
+(defun easy-menu-title ()
+  (capitalize (replace-in-string (replace-in-string
+                                 (symbol-name major-mode) "-mode$" "")
+                                "-" " ")))
+
+(provide 'easymenu)
+
+;;; easymenu.el ends here
diff --git a/lisp/etags.el b/lisp/etags.el
new file mode 100644 (file)
index 0000000..14f69d2
--- /dev/null
@@ -0,0 +1,1205 @@
+;;; etags.el --- etags facility for Emacs
+
+;; Copyright 1985, 1986, 1988, 1990, 1997 Free Software Foundation, Inc.
+
+;; Author: Their Name is Legion (see list below)
+;; Maintainer: XEmacs Development Team
+;; Keywords: tools
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not synched with FSF.
+
+;;; Commentary:
+
+;; This file is completely different from FSF's etags.el.  It appears
+;; that an early version of this file (tags.el) has been rewritten by
+;; two different people; we got one, FSF got the other.  Various
+;; people have said that our version is better and faster.
+
+;; TODO:
+;; - DOCUMENT!
+
+;; Derived from the original lisp/tags.el.
+
+;; Ideas and code from the work of the following people:
+;; Andy Norman <ange@hplb.hpl.hp.com>, author of ange-tags.el
+;; Ramana Rao <rao@arisia.xerox.com>
+;; John Sturdy <jcgs@harlqn.co.uk>, author of tags-helper.el
+;; Henry Kautz <kautz@allegra.att.com>, author of tag-completion.el
+;; Dan LaLiberte <liberte@cs.uiuc.edu>, author of local-tags.el
+;; Tom Dietterich <tgd@turing.cs.orst.edu>, author of quest.el
+;; The author(s) of lisp/simple.el
+;; Duke Briscoe <briscoe@cs.yale.edu>
+;; Lynn Slater <lrs@indetech.com>, author of location.el
+;; Shinichirou Sugou <shin@sgtp.apple.juice.or.jp>
+;; an unidentified anonymous elisp hacker
+;; Kyle Jones <kyle_jones@wonderworks.com>
+;;   added "Exact match, then inexact" code
+;;   added support for include directive.
+;; Hrvoje Niksic <hniksic@srce.hr>
+;;   various changes.
+
+\f
+;;; User variables.
+
+(defgroup etags nil
+  "Etags facility for Emacs.
+Using etags, you can create tag tables for any number of files, and
+easily access the symbols in those files, using the `\\[find-tag]'
+command."
+  :prefix "tags-"
+  :group 'tools)
+
+
+(defcustom tags-build-completion-table 'ask
+  "*If this variable is nil, then tags completion is disabled.
+If it is t, then things which prompt for tags will do so with completion
+ across all known tags.
+If it is the symbol `ask', you will be asked whether each tags table
+ should be added to the completion list as it is read in.  (With the
+ exception that for very small tags tables, you will not be asked,
+ since they can be parsed quickly.)"
+  :type '(choice (const :tag "Disabled" nil)
+                (const :tag "Complete All" t)
+                (const :tag "Ask" ask))
+  :group 'etags)
+
+(defcustom tags-always-exact nil
+  "*If this variable is non-nil, then tags always looks for exact matches.
+If it is nil (the default), tags will first go through exact matches,
+then through the non-exact ones."
+  :type 'boolean
+  :group 'etags)
+
+(defcustom tag-table-alist nil
+  "*A list which determines which tags files are active for a buffer.
+This is not really an association list, in that all elements are
+checked.  The CAR of each element of this list is a pattern against
+which the buffer's file name is compared; if it matches, then the CDR
+of the list should be the name of the tags table to use.  If more than
+one element of this list matches the buffer's file name, then all of
+the associated tags tables will be used.  Earlier ones will be
+searched first.
+
+If the CAR of elements of this list are strings, then they are treated
+as regular-expressions against which the file is compared (like the
+auto-mode-alist).  If they are not strings, then they are evaluated.
+If they evaluate to non-nil, then the current buffer is considered to
+match.
+
+If the CDR of the elements of this list are strings, then they are
+assumed to name a TAGS file.  If they name a directory, then the string
+\"TAGS\" is appended to them to get the file name.  If they are not 
+strings, then they are evaluated, and must return an appropriate string.
+
+For example:
+  (setq tag-table-alist
+       '((\"/usr/src/public/perl/\" . \"/usr/src/public/perl/perl-3.0/\")
+        (\"\\\\.el$\" . \"/usr/local/emacs/src/\")
+        (\"/jbw/gnu/\" . \"/usr15/degree/stud/jbw/gnu/\")
+        (\"\" . \"/usr/local/emacs/src/\")
+        ))
+
+This means that anything in the /usr/src/public/perl/ directory should use
+the TAGS file /usr/src/public/perl/perl-3.0/TAGS; and file ending in .el should
+use the TAGS file /usr/local/emacs/src/TAGS; and anything in or below the
+directory /jbw/gnu/ should use the TAGS file /usr15/degree/stud/jbw/gnu/TAGS.
+A file called something like \"/usr/jbw/foo.el\" would use both the TAGS files
+/usr/local/emacs/src/TAGS and /usr15/degree/stud/jbw/gnu/TAGS (in that order)
+because it matches both patterns.
+
+If the buffer-local variable `buffer-tag-table' is set, then it names a tags
+table that is searched before all others when find-tag is executed from this
+buffer.
+
+If there is a file called \"TAGS\" in the same directory as the file in 
+question, then that tags file will always be used as well (after the
+`buffer-tag-table' but before the tables specified by this list.)
+
+If the variable tags-file-name is set, then the tags file it names will apply
+to all buffers (for backwards compatibility.)  It is searched first."
+  :type '(repeat (cons :format "%v"
+                      (choice :value ""
+                              (regexp :tag "Buffer regexp")
+                              sexp)
+                      (choice :value ""
+                              (string :tag "Tag file or directory")
+                              sexp)))
+  :group 'etags)
+
+(defvar buffer-tag-table nil
+  "*The additional name of one TAGS table to be used for this buffer.
+You can set this with `\\[set-buffer-tag-table]'.  See the documentation
+for the variable `tag-table-alist' for more information.")
+(make-variable-buffer-local 'buffer-tag-table)
+
+(defvar tags-file-name nil
+  "The name of the tags-table used by all buffers.
+This is for backwards compatibility, and is largely supplanted by the
+variable tag-table-alist.")
+
+(defcustom tags-auto-read-changed-tag-files nil
+  "*If non-nil, always re-read changed TAGS file without prompting.
+If nil, prompt whether to re-read the changed TAGS file."
+  :type 'boolean
+  :group 'etags)
+
+(defcustom make-tags-files-invisible nil
+  "*If non-nil, TAGS-files will not show up in buffer-lists or be 
+selectable (or deletable.)"
+  :type 'boolean
+  :group 'etags)
+
+(defcustom tags-search-nuke-uninteresting-buffers t
+  "*If non-nil, keep newly-visited files if they contain the search target.
+This affects the `tags-search' and `tags-query-replace' commands."
+  :type 'boolean
+  :group 'etags)
+
+\f
+;; Buffer tag tables.
+
+(defun buffer-tag-table-list ()
+  "Returns a list (ordered) of the tags tables which should be used for 
+the current buffer."
+  (let (result)
+    ;; Explicitly set buffer-tag-table
+    (when buffer-tag-table
+      (push buffer-tag-table result))
+    ;; Current directory
+    (when (file-readable-p (concat default-directory "TAGS"))
+      (push (concat default-directory "TAGS") result))
+    ;; Parent directory
+    (let ((parent-tag-file (expand-file-name "../TAGS" default-directory)))
+      (when (file-readable-p parent-tag-file)
+       (push parent-tag-file result)))
+    ;; tag-table-alist
+    (let ((key (or buffer-file-name
+                  (concat default-directory (buffer-name))))
+         expression)
+      (dolist (item tag-table-alist)
+       (setq expression (car item))
+       ;; If the car of the alist item is a string, apply it as a regexp
+       ;; to the buffer-file-name.  Otherwise, evaluate it.  If the
+       ;; regexp matches, or the expression evaluates non-nil, then this
+       ;; item in tag-table-alist applies to this buffer.
+       (when (if (stringp expression)
+                 (string-match expression key)
+               (ignore-errors
+                 (eval expression)))
+         ;; Now evaluate the cdr of the alist item to get the name of
+         ;; the tag table file.
+         (setq expression (ignore-errors
+                            (eval (cdr item))))
+         (if (stringp expression)
+             (push expression result)
+           (error "Expression in tag-table-alist evaluated to non-string")))))
+    (setq result
+         (mapcar
+          (lambda (name)
+            (when (file-directory-p name)
+              (setq name (concat (file-name-as-directory name) "TAGS")))
+            (and (file-readable-p name)
+                 ;; get-tag-table-buffer has side-effects
+                 (symbol-value-in-buffer 'buffer-file-name
+                                         (get-tag-table-buffer name))))
+          result))
+    (setq result (delq nil result))
+    ;; If no TAGS file has been found, ask the user explicitly.
+    ;; #### tags-file-name is *evil*.
+    (or result tags-file-name
+       (call-interactively 'visit-tags-table))
+    (when tags-file-name
+      (setq result (nconc result (list tags-file-name))))
+    (or result (error "Buffer has no associated tag tables"))
+    (delete-duplicates (nreverse result) :test 'equal)))
+
+;;;###autoload
+(defun visit-tags-table (file)
+  "Tell tags commands to use tags table file FILE when all else fails.
+FILE should be the name of a file created with the `etags' program.
+A directory name is ok too; it means file TAGS in that directory."
+  (interactive (list (read-file-name "Visit tags table: (default TAGS) "
+                                    default-directory
+                                    (expand-file-name "TAGS" default-directory)
+                                    t)))
+  (if (string-equal file "") 
+      (setq tags-file-name nil)
+    (setq file (expand-file-name file))
+    (when (file-directory-p file)
+      (setq file (expand-file-name "TAGS" file)))
+    ;; It used to be that, if a user pressed RET by mistake, the bogus
+    ;; `tags-file-name' would remain, causing the error at
+    ;; `buffer-tag-table'.
+    (when (file-exists-p file)
+      (setq tags-file-name file))))
+
+(defun set-buffer-tag-table (file)
+  "In addition to the tags tables specified by the variable `tag-table-alist',
+each buffer can have one additional table.  This command sets that.
+See the documentation for the variable `tag-table-alist' for more information."
+  (interactive
+   (list
+     (read-file-name "Visit tags table: (directory sufficient) "
+                    nil default-directory t)))
+  (or file (error "No TAGS file name supplied"))
+  (setq file (expand-file-name file))
+  (when (file-directory-p file)
+    (setq file (expand-file-name "TAGS" file)))
+  (or (file-exists-p file) (error "TAGS file missing: %s" file))
+  (setq buffer-tag-table file))
+
+\f
+;; Manipulating the tag table buffer
+
+(defconst tag-table-completion-status nil
+  "Indicates whether a completion table has been built.
+Either nil, t, or `disabled'.")
+(make-variable-buffer-local 'tag-table-completion-status)
+
+(defconst tag-table-files nil
+  "If the current buffer is a TAGS table, this holds a list of the files 
+referenced by this file, or nil if that hasn't been computed yet.")
+(make-variable-buffer-local 'tag-table-files)
+
+(defun get-tag-table-buffer (tag-table)
+  "Returns a buffer visiting the given TAGS table.
+If appropriate, reverting the buffer, and possibly build a completion-table."
+  (or (stringp tag-table)
+      (error "Bad tags file name supplied: %s" tag-table))
+  ;; Remove symbolic links from name.
+  (setq tag-table (symlink-expand-file-name tag-table))
+  (let (buf build-completion check-name)
+    (setq buf (get-file-buffer tag-table))
+    (unless buf
+      (if (file-readable-p tag-table)
+         (setq buf (find-file-noselect tag-table)
+               check-name t)
+       (error "No such tags file: %s" tag-table)))
+    (with-current-buffer buf
+      ;; Make the TAGS buffer invisible.
+      (when (and check-name
+                make-tags-files-invisible
+                (string-match "\\`[^ ]" (buffer-name)))
+       (rename-buffer (generate-new-buffer-name
+                       (concat " " (buffer-name)))))
+      (or (verify-visited-file-modtime buf)
+         (cond ((or tags-auto-read-changed-tag-files
+                    (yes-or-no-p
+                     (format "Tags file %s has changed, read new contents? "
+                             tag-table)))
+                (when tags-auto-read-changed-tag-files
+                  (message "Tags file %s has changed, reading new contents..."
+                           tag-table))
+                (revert-buffer t t)
+                (when (eq tag-table-completion-status t)
+                  (setq tag-table-completion-status nil))
+                (setq tag-table-files nil))))
+      (or (eq (char-after 1) ?\f)
+         (error "File %s not a valid tags file" tag-table))
+      (or (memq tag-table-completion-status '(t disabled))
+         (setq build-completion t))
+      (when build-completion
+       (if (ecase tags-build-completion-table
+             ((nil) nil)
+             ((t) t)
+             ((ask)
+              ;; don't bother asking for small ones
+              (or (< (buffer-size) 20000)
+                  (y-or-n-p
+                   (format "Build tag completion table for %s? "
+                           tag-table)))))
+           ;; The user wants to build the table:
+           (condition-case nil
+               (progn
+                 (add-to-tag-completion-table)
+                 (setq tag-table-completion-status t))
+             ;; Allow user to C-g out correctly
+             (quit
+              (message "Tags completion table construction aborted")
+              (setq tag-table-completion-status nil
+                    quit-flag t)
+              t))
+         ;; The table is verboten.
+         (setq tag-table-completion-status 'disabled))))
+    buf))
+
+(defun file-of-tag ()
+  "Return the file name of the file whose tags point is within.
+Assumes the tag table is the current buffer.
+File name returned is relative to tag table file's directory."
+  (let ((opoint (point))
+       prev size)
+    (save-excursion
+      (goto-char (point-min))
+      (while (< (point) opoint)
+       (forward-line 1)
+       (end-of-line)
+       (skip-chars-backward "^,\n")
+       (setq prev (point)
+             size (read (current-buffer)))
+       (goto-char prev)
+       (forward-line 1)
+       ;; New include syntax
+       ;;   filename,include
+       ;; tacked on to the end of a tag file means use filename
+       ;; as a tag file before giving up.
+       ;; Skip it here.
+       (unless (eq size 'include)
+         (forward-char size)))
+      (goto-char (1- prev))
+      (buffer-substring (point) (point-at-bol)))))
+
+(defun tag-table-include-files ()
+  "Return all file names associated with `include' directives in a tag buffer."
+  ;; New include syntax
+  ;;   filename,include
+  ;; tacked on to the end of a tag file means use filename as a
+  ;; tag file before giving up.
+  (let ((files nil))
+    (save-excursion
+      (goto-char (point-min))
+      (while (re-search-forward "\f\n\\(.*\\),include$" nil t)
+       (push (match-string 1) files)))
+    files))
+
+(defun tag-table-files (tag-table)
+  "Returns a list of the files referenced by the named TAGS table."
+  (with-current-buffer (get-tag-table-buffer tag-table)
+    (unless tag-table-files
+      (let (files prev size)
+       (goto-char (point-min))
+       (while (not (eobp))
+         (forward-line 1)
+         (end-of-line)
+         (skip-chars-backward "^,\n")
+         (setq prev (point)
+               size (read (current-buffer)))
+         (goto-char prev)
+         (push (expand-file-name (buffer-substring (1- (point))
+                                                   (point-at-bol))
+                                 default-directory)
+               files)
+         (forward-line 1)
+         (forward-char size))
+       (setq tag-table-files (nreverse files))))
+    tag-table-files))
+
+;; #### should this be on previous page?
+(defun buffer-tag-table-files ()
+  "Returns a list of all files referenced by all TAGS tables that 
+this buffer uses."
+  (apply #'nconc
+        (mapcar #'tag-table-files (buffer-tag-table-list))))
+
+\f
+;; Building the completion table
+
+;; Test cases for building completion table; must handle these properly:
+;; Lisp_Int, XSETINT, current_column \7f60,2282
+;;        Lisp_Int, XSETINT, point>NumCharacters ? 0 : CharAt(\7f363,9935
+;;        Lisp_Int, XSETINT, point<=FirstCharacter ? 0 : CharAt(\7f366,10108
+;;      point<=FirstCharacter || CharAt(\7f378,10630
+;;      point>NumCharacters || CharAt(\7f382,10825
+;; DEFUN ("x-set-foreground-color", Fx_set_foreground_color,\7f191,4562
+;; DEFUN ("x-set-foreground-color", Fx_set_foreground_color,\7f191,4562
+;; DEFUN ("*", Ftimes,\7f1172,32079
+;; DEFUN ("/=", Fneq,\7f1035,28839
+;; defun_internal \7f4199,101362
+;; int pure[PURESIZE / sizeof \7f53,1564
+;; char staticvec1[NSTATICS * sizeof \7f667,17608
+;;  Date: 04 May 87 23:53:11 PDT \7f26,1077
+;; #define anymacroname(\7f324,4344
+;; (define-key ctl-x-map \7f311,11784
+;; (define-abbrev-table 'c-mode-abbrev-table \7f24,1016
+;; static char *skip_white(\7f116,3443
+;; static foo \7f348,11643
+;; (defun texinfo-insert-@code \7f91,3358
+;; (defvar texinfo-kindex)\7f29,1105
+;; (defun texinfo-format-\. \7f548,18376
+;; (defvar sm::menu-kludge-y \7f621,22726
+;; (defvar *mouse-drag-window* \7f103,3642
+;; (defun simula-back-level(\7f317,11263
+;; } DPxAC,\7f380,14024
+;; } BM_QCB;\7f69,2990
+;; #define MTOS_DONE\t
+
+;; "^[^ ]+ +\\([^ ]+\\) "
+
+;; void *find_cactus_segment(\7f116,2444
+;; void *find_pdb_segment(\7f162,3688
+;; void init_dclpool(\7f410,10739
+;; WORD insert_draw_command(\7f342,8881
+;; void *req_pdbmem(\7f579,15574
+
+(defvar tag-completion-table (make-vector 511 0))
+
+(defvar tag-symbol)
+(defvar tag-table-symbol)
+(defvar tag-symbol-tables)
+(defvar buffer-tag-table-list)
+
+(defmacro intern-tag-symbol (tag)
+  `(progn
+     (setq tag-symbol (intern ,tag tag-completion-table)
+          tag-symbol-tables (and (boundp tag-symbol)
+                                 (symbol-value tag-symbol)))
+     (or (memq tag-table-symbol tag-symbol-tables)
+        (set tag-symbol (cons tag-table-symbol tag-symbol-tables)))))
+
+;; Can't use "\\s " in these patterns because that will include newline
+(defconst tags-DEFUN-pattern
+          "DEFUN[ \t]*(\"\\([^\"]+\\)\",[ \t]*\\(\\(\\sw\\|\\s_\\)+\\),\C-?")
+(defconst tags-array-pattern ".*[ \t]+\\([^ \[]+\\)\\[")
+(defconst tags-def-pattern
+          "\\(.*[ \t]+\\)?\\**\\(\\(\\sw\\|\\s_\\)+\\)[ ();,\t]*\C-?"
+;; "\\(.*[ \t]+\\)?\\(\\(\\sw\\|\\s_\\)+\\)[ ()]*\C-?"
+;; "\\(\\sw\\|\\s_\\)+[ ()]*\C-?"
+      )
+(defconst tags-file-pattern "^\f\n\\(.+\\),[0-9]+\n")
+
+;; #### Should make it work with the `include' directive!
+(defun add-to-tag-completion-table ()
+  "Sucks the current buffer (a TAGS table) into the completion-table."
+  (message "Adding %s to tags completion table..." buffer-file-name)
+  (goto-char (point-min))
+  (let ((tag-table-symbol (intern buffer-file-name tag-completion-table))
+       ;; tag-table-symbol is used by intern-tag-symbol
+       filename file-type name name2 tag-symbol
+       tag-symbol-tables
+       (case-fold-search nil))
+    ;; Loop over the files mentioned in the TAGS file for each file,
+    ;; try to find its major-mode, then process tags appropriately.
+    (while (looking-at tags-file-pattern)
+      (goto-char (match-end 0))
+      (setq filename (file-name-sans-versions (match-string 1))
+           ;; We used to check auto-mode-alist for the proper
+           ;; file-type.  This was way too slow, as it had to process
+           ;; an enormous amount of regexps for each time.  Now we
+           ;; use the shotgun approach with only two regexps.
+           file-type (cond ((string-match "\\.\\([cC]\\|cc\\|cxx\\)\\'"
+                                          filename)
+                            'c-mode)
+                           ((string-match "\\.\\(el\\|cl\\|lisp\\)\\'"
+                                          filename)
+                            'lisp-mode)
+                           ((string-match "\\.scm\\'" filename)
+                            'scheme-mode)
+                           (t nil)))
+      (set-syntax-table (cond ((and (eq file-type 'c-mode)
+                                   c-mode-syntax-table)
+                              c-mode-syntax-table)
+                             ((eq file-type 'lisp-mode)
+                              lisp-mode-syntax-table)
+                             (t (standard-syntax-table))))
+      ;; Clear loop variables.
+      (setq name nil name2 nil)
+      (lmessage 'progress "%s..." filename)
+      ;; Loop over the individual tag lines.
+      (while (not (or (eobp) (eq (char-after) ?\f)))
+       (cond ((and (eq file-type 'c-mode)
+                   (looking-at "DEFUN[ \t]"))
+              ;; DEFUN
+              (or (looking-at tags-DEFUN-pattern)
+                  (error "DEFUN doesn't fit pattern"))
+              (setq name (match-string 1)
+                    name2 (match-string 2)))
+             ;;((looking-at "\\s ")
+             ;; skip probably bogus entry:
+             ;;)
+             ((and (eq file-type 'c-mode)
+                   (looking-at ".*\\["))
+              ;; Array
+              (cond ((not (looking-at tags-array-pattern))
+                     (message "array definition doesn't fit pattern")
+                     (setq name nil))
+                    (t
+                     (setq name (match-string 1)))))
+             ((and (eq file-type 'scheme-mode)
+                   (looking-at "\\s-*(\\s-*def\\sw*\\s-*(?\\s-*\\(\\(\\sw\\|\\s_\\|:\\)+\\))?\\s-*\C-?"))
+              ;; Something Schemish (is this really necessary??)
+              (setq name (match-string 1)))
+             ((looking-at tags-def-pattern)
+              ;; ???
+              (setq name (match-string 2))))
+       ;; add the tags we found to the completion table
+       (and name (intern-tag-symbol name))
+       (and name2 (intern-tag-symbol name2))
+       (forward-line 1)))
+    (or (eobp) (error "Bad TAGS file")))
+  (message "Adding %s to tags completion table...done" buffer-file-name))
+
+\f
+;; Interactive find-tag
+
+(defvar find-tag-default-hook nil
+  "Function to call to create a default tag.
+Make it buffer-local in a mode hook.  The function is called with no
+ arguments.")
+
+(defvar find-tag-hook nil
+  "Function to call after a tag is found.
+Make it buffer-local in a mode hook.  The function is called with no
+ arguments.")
+
+;; Return a default tag to search for, based on the text at point.
+(defun find-tag-default ()
+  (or (and (not (memq find-tag-default-hook '(nil find-tag-default)))
+          (condition-case data
+              (funcall find-tag-default-hook)
+            (error
+             (warn "Error in find-tag-default-hook signalled error: %s"
+                   (error-message-string data))
+             nil)))
+      (symbol-near-point)))
+
+;; This function depends on the following symbols being bound properly:
+;; buffer-tag-table-list,
+;; tag-symbol-tables (value irrelevant, bound outside for efficiency)
+(defun tag-completion-predicate (tag-symbol)
+  (and (boundp tag-symbol)
+       (setq tag-symbol-tables (symbol-value tag-symbol))
+       (catch 'found
+        (while tag-symbol-tables
+          (when (memq (car tag-symbol-tables) buffer-tag-table-list)
+            (throw 'found t))
+          (setq tag-symbol-tables (cdr tag-symbol-tables))))))
+
+(defun buffer-tag-table-symbol-list ()
+  (mapcar (lambda (table-name)
+           (intern table-name tag-completion-table))
+         (buffer-tag-table-list)))
+
+(defvar find-tag-history nil "History list for find-tag-tag.")
+
+(defun find-tag-tag (prompt)
+  (let* ((default (find-tag-default))
+        (buffer-tag-table-list (buffer-tag-table-symbol-list))
+        tag-symbol-tables tag-name)
+    (setq tag-name
+         (completing-read
+          (if default
+              (format "%s(default %s) " prompt default)
+            prompt)
+          tag-completion-table 'tag-completion-predicate nil nil
+          'find-tag-history))
+    (if (string-equal tag-name "")
+       ;; #### - This is a really LAME way of doing it!  --Stig
+       default                 ;indicate exact symbol match
+      tag-name)))
+
+(defvar last-tag-data nil
+  "Information for continuing a tag search.
+Is of the form (TAG POINT MATCHING-EXACT TAG-TABLE TAG-TABLE ...).")
+
+(defvar tags-loop-operate nil
+  "Form for `tags-loop-continue' to eval to change one file.")
+
+(defvar tags-loop-scan
+  '(error "%s" (substitute-command-keys
+               "No \\[tags-search] or \\[tags-query-replace] in progress."))
+  "Form for `tags-loop-continue' to eval to scan one file.
+If it returns non-nil, this file needs processing by evalling
+\`tags-loop-operate'.  Otherwise, move on to the next file.")
+
+(autoload 'get-symbol-syntax-table "symbol-syntax")
+
+(defun find-tag-internal (tagname)
+  (let ((next (null tagname))
+       (tmpnext (null tagname))
+       ;; If tagname is a list: (TAGNAME), this indicates
+       ;; requiring an exact symbol match.
+       (exact (or tags-always-exact (consp tagname)))
+       (normal-syntax-table (syntax-table))
+       (exact-syntax-table (get-symbol-syntax-table (syntax-table)))
+       tag-table-currently-matching-exact
+       tag-target exact-tagname
+       tag-tables tag-table-point file linebeg startpos buf
+       offset found pat syn-tab)
+    (when (consp tagname)
+      (setq tagname (car tagname)))
+    (cond (next
+          (setq tagname (car last-tag-data))
+          (setq tag-table-currently-matching-exact
+                (car (cdr (cdr last-tag-data)))))
+         (t
+          (setq tag-table-currently-matching-exact t)))
+    ;; \_ in the tagname is used to indicate a symbol boundary.
+    (setq exact-tagname (concat "\\_" tagname "\\_"))
+    (while (string-match "\\\\_" exact-tagname)
+      (aset exact-tagname (1- (match-end 0)) ?b))
+    (save-excursion
+      (catch 'found
+       ;; Loop searching for exact matches and then inexact matches.
+       (while (not (eq tag-table-currently-matching-exact 'neither))
+         (cond (tmpnext
+                (setq tag-tables (cdr (cdr (cdr last-tag-data)))
+                      tag-table-point (car (cdr last-tag-data)))
+                ;; Start from the beginning of the table list on the
+                ;; next iteration of the loop.
+                (setq tmpnext nil))
+               (t
+                (setq tag-tables (buffer-tag-table-list)
+                      tag-table-point 1)))
+         (if tag-table-currently-matching-exact
+             (setq tag-target exact-tagname
+                   syn-tab exact-syntax-table)
+           (setq tag-target tagname
+                 syn-tab normal-syntax-table))
+         (with-caps-disable-folding tag-target
+           (while tag-tables
+             (set-buffer (get-tag-table-buffer (car tag-tables)))
+             (bury-buffer (current-buffer))
+             (goto-char (or tag-table-point (point-min)))
+             (setq tag-table-point nil)
+             (letf (((syntax-table) syn-tab)
+                    (case-fold-search nil))
+               ;; #### should there be support for non-regexp
+               ;; tag searches?
+               (while (re-search-forward tag-target nil t)
+                 (and (save-match-data
+                        (looking-at "[^\n\C-?]*\C-?"))
+                      ;; If we're looking for inexact matches, skip
+                      ;; exact matches since we've visited them
+                      ;; already.
+                      (or tag-table-currently-matching-exact
+                          (letf (((syntax-table) exact-syntax-table))
+                            (save-excursion
+                              (goto-char (match-beginning 0))
+                              (not (looking-at exact-tagname)))))
+                      (throw 'found t))))
+             (setq tag-tables
+                   (nconc (tag-table-include-files) (cdr tag-tables)))))
+         (if (and (not exact) (eq tag-table-currently-matching-exact t))
+             (setq tag-table-currently-matching-exact nil)
+           (setq tag-table-currently-matching-exact 'neither)))
+       (error "No %sentries %s %s"
+              (if next "more " "")
+              (if exact "matching" "containing")
+              tagname))
+      (search-forward "\C-?")
+      (setq file (expand-file-name (file-of-tag)
+                                  ;; In XEmacs, this needs to be
+                                  ;; relative to:
+                                  (or (file-name-directory (car tag-tables))
+                                      "./")))
+      (setq linebeg (buffer-substring (1- (point)) (point-at-bol)))
+      (search-forward ",")
+      (setq startpos (read (current-buffer)))
+      (setq last-tag-data
+           (nconc (list tagname (point) tag-table-currently-matching-exact)
+                  tag-tables))
+      (setq buf (find-file-noselect file))
+      (with-current-buffer buf
+       (save-excursion
+         (save-restriction
+           (widen)
+           ;; Here we search for PAT in the range [STARTPOS - OFFSET,
+           ;; STARTPOS + OFFSET], with increasing values of OFFSET.
+           ;;
+           ;; We used to set the initial offset to 1000, but the
+           ;; actual sources show that finer-grained control is
+           ;; needed (e.g. two `hash_string's in src/symbols.c.)  So,
+           ;; I changed 100 to 100, and (* 3 offset) to (* 5 offset).
+           (setq offset 100)
+           (setq pat (concat "^" (regexp-quote linebeg)))
+           (or startpos (setq startpos (point-min)))
+           (while (and (not found)
+                       (progn
+                         (goto-char (- startpos offset))
+                         (not (bobp))))
+             (setq found (re-search-forward pat (+ startpos offset) t))
+             (setq offset (* 5 offset)))
+           ;; Finally, try finding it anywhere in the buffer.
+           (or found
+               (re-search-forward pat nil t)
+               (error "%s not found in %s" pat file))
+           (beginning-of-line)
+           (setq startpos (point)))))
+      (cons buf startpos))))
+
+;;;###autoload
+(defun find-tag (tagname &optional other-window)
+  "*Find tag whose name contains TAGNAME.
+ Selects the buffer that the tag is contained in
+and puts point at its definition.
+ If TAGNAME is a null string, the expression in the buffer
+around or before point is used as the tag name.
+ If called interactively with a numeric argument, searches for the next tag
+in the tag table that matches the tagname used in the previous find-tag.
+ If second arg OTHER-WINDOW is non-nil, uses another window to display
+the tag.
+
+This version of this function supports multiple active tags tables,
+and completion.
+
+Variables of note:
+
+  tag-table-alist              controls which tables apply to which buffers
+  tags-file-name               a default tags table
+  tags-build-completion-table   controls completion behavior
+  buffer-tag-table             another way of specifying a buffer-local table
+  make-tags-files-invisible    whether tags tables should be very hidden
+  tag-mark-stack-max           how many tags-based hops to remember"
+  (interactive (if current-prefix-arg
+                  '(nil nil)
+                (list (find-tag-tag "Find tag: ") nil)))
+  (let* ((local-find-tag-hook find-tag-hook)
+        (next (null tagname))
+        (result (find-tag-internal tagname))
+        (tag-buf (car result))
+        (tag-point (cdr result)))
+    ;; Push old position on the tags mark stack.
+    (if (or (not next)
+           (not (memq last-command
+                      '(find-tag find-tag-other-window tags-loop-continue))))
+       (push-tag-mark))
+    (if other-window
+       (pop-to-buffer tag-buf)
+      (switch-to-buffer tag-buf))
+    (widen)
+    (push-mark)
+    (goto-char tag-point)
+    (if find-tag-hook
+       (funcall find-tag-hook)
+      (if local-find-tag-hook
+         (funcall local-find-tag-hook))))
+  (setq tags-loop-scan (list 'find-tag nil nil)
+       tags-loop-operate nil)
+  ;; Return t in case used as the tags-loop-scan.
+  t)
+
+;;;###autoload
+(defun find-tag-other-window (tagname &optional next)
+  "*Find tag whose name contains TAGNAME.
+ Selects the buffer that the tag is contained in in another window
+and puts point at its definition.
+ If TAGNAME is a null string, the expression in the buffer
+around or before point is used as the tag name.
+ If second arg NEXT is non-nil (interactively, with prefix arg),
+searches for the next tag in the tag table
+that matches the tagname used in the previous find-tag.
+
+This version of this function supports multiple active tags tables,
+and completion.
+
+Variables of note:
+
+  tag-table-alist              controls which tables apply to which buffers
+  tags-file-name               a default tags table
+  tags-build-completion-table   controls completion behavior
+  buffer-tag-table             another way of specifying a buffer-local table
+  make-tags-files-invisible    whether tags tables should be very hidden
+  tag-mark-stack-max           how many tags-based hops to remember"
+  (interactive (if current-prefix-arg
+                  '(nil t)
+                (list (find-tag-tag "Find tag other window: "))))
+  (if next
+      (find-tag nil t)
+    (find-tag tagname t)))
+
+\f
+;; Completion on tags in the buffer.
+
+(defun complete-symbol (&optional table predicate prettify)
+  (let* ((end (point))
+        (beg (save-excursion
+               (backward-sexp 1)
+               ;;(while (= (char-syntax (following-char)) ?\')
+               ;;  (forward-char 1))
+               (skip-syntax-forward "'")
+               (point)))
+        (pattern (buffer-substring beg end))
+        (table (or table obarray))
+        (completion (try-completion pattern table predicate)))
+    (cond ((eq completion t))
+         ((null completion)
+          (error "Can't find completion for \"%s\"" pattern))
+         ((not (string-equal pattern completion))
+          (delete-region beg end)
+          (insert completion))
+         (t
+          (message "Making completion list...")
+          (let ((list (all-completions pattern table predicate)))
+            (if prettify
+                (setq list (funcall prettify list)))
+            (with-output-to-temp-buffer "*Help*"
+              (display-completion-list list)))
+          (message "Making completion list...%s" "done")))))
+
+;;;###autoload
+(defun tag-complete-symbol ()
+  "The function used to do tags-completion (using 'tag-completion-predicate)."
+  (interactive)
+  (let* ((buffer-tag-table-list (buffer-tag-table-symbol-list))
+        tag-symbol-tables)
+    (complete-symbol tag-completion-table 'tag-completion-predicate)))
+
+\f
+;; Applying a command to files mentioned in tag tables
+
+(defvar next-file-list nil
+  "List of files for next-file to process.")
+
+;;;###autoload
+(defun next-file (&optional initialize novisit)
+  "Select next file among files in current tag table(s).
+
+A first argument of t (prefix arg, if interactive) initializes to the
+beginning of the list of files in the (first) tags table.  If the argument
+is neither nil nor t, it is evalled to initialize the list of files.
+
+Non-nil second argument NOVISIT means use a temporary buffer
+to save time and avoid uninteresting warnings.
+
+Value is nil if the file was already visited;
+if the file was newly read in, the value is the filename."
+  (interactive "P")
+  (cond ((not initialize)
+         ;; Not the first run.
+         )
+        ((eq initialize t)
+         ;; Initialize the list from the tags table.
+        (setq next-file-list (buffer-tag-table-files)))
+        (t
+         ;; Initialize the list by evalling the argument.
+         (setq next-file-list (eval initialize))))
+  (when (null next-file-list)
+    (and novisit
+        (get-buffer " *next-file*")
+        (kill-buffer " *next-file*"))
+    (error "All files processed"))
+  (let* ((file (car next-file-list))
+        (buf (get-file-buffer file))
+        (new (not buf)))
+    (pop next-file-list)
+
+    (if (not (and new novisit))
+        (switch-to-buffer (find-file-noselect file novisit) t)
+      ;; Like find-file, but avoids random junk.
+      (set-buffer (get-buffer-create " *next-file*"))
+      (kill-all-local-variables)
+      (erase-buffer)
+      (insert-file-contents file nil))
+    (widen)
+    (when (> (point) (point-min))
+      (push-mark nil t)
+      (goto-char (point-min)))
+    (and new file)))
+
+;;;###autoload
+(defun tags-loop-continue (&optional first-time)
+  "Continue last \\[tags-search] or \\[tags-query-replace] command.
+Used noninteractively with non-nil argument to begin such a command (the
+argument is passed to `next-file', which see).
+Two variables control the processing we do on each file:
+the value of `tags-loop-scan' is a form to be executed on each file
+to see if it is interesting (it returns non-nil if so)
+and `tags-loop-operate' is a form to execute to operate on an interesting file
+If the latter returns non-nil, we exit; otherwise we scan the next file."
+  (interactive)
+  (let ((messaged nil)
+       (more-files-p t)
+        new)
+    (while more-files-p
+      ;; Scan files quickly for the first or next interesting one.
+      (while (or first-time
+                (save-restriction
+                  (widen)
+                  (not (eval tags-loop-scan))))
+       (setq new (next-file first-time
+                            tags-search-nuke-uninteresting-buffers))
+       ;; If NEW is non-nil, we got a temp buffer,
+       ;; and NEW is the file name.
+       (if (or messaged
+               (and (not first-time)
+                    (> (device-baud-rate) search-slow-speed)
+                    (setq messaged t)))
+           (lmessage 'progress
+               "Scanning file %s..." (or new buffer-file-name)))
+       (setq first-time nil)
+       (goto-char (point-min)))
+
+      ;; If we visited it in a temp buffer, visit it now for real.
+      (if (and new tags-search-nuke-uninteresting-buffers)
+         (let ((pos (point)))
+           (erase-buffer)
+           (set-buffer (find-file-noselect new))
+           (widen)
+           (goto-char pos)))
+
+      (switch-to-buffer (current-buffer))
+
+      ;; Now operate on the file.
+      ;; If value is non-nil, continue to scan the next file.
+      (setq more-files-p (eval tags-loop-operate)))
+    (and messaged
+         (null tags-loop-operate)
+         (message "Scanning file %s...found" buffer-file-name))))
+
+
+;;;###autoload
+(defun tags-search (regexp &optional file-list-form)
+  "Search through all files listed in tags table for match for REGEXP.
+Stops when a match is found.
+To continue searching for next match, use command \\[tags-loop-continue].
+
+See documentation of variable `tag-table-alist'."
+  (interactive "sTags search (regexp): ")
+  (if (and (equal regexp "")
+           (eq (car tags-loop-scan) 'with-caps-disable-folding)
+           (null tags-loop-operate))
+      ;; Continue last tags-search as if by `M-,'.
+      (tags-loop-continue nil)
+    (setq tags-loop-scan `(with-caps-disable-folding ,regexp
+                            (re-search-forward ,regexp nil t))
+          tags-loop-operate nil)
+    (tags-loop-continue (or file-list-form t))))
+
+;;;###autoload
+(defun tags-query-replace (from to &optional delimited file-list-form)
+  "Query-replace-regexp FROM with TO through all files listed in tags table.
+Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
+If you exit (\\[keyboard-quit] or ESC), you can resume the query-replace
+with the command \\[tags-loop-continue].
+
+See documentation of variable `tag-table-alist'."
+  (interactive
+   "sTags query replace (regexp): \nsTags query replace %s by: \nP")
+  (setq tags-loop-scan `(with-caps-disable-folding ,from
+                          (if (re-search-forward ,from nil t)
+                              ;; When we find a match, move back
+                              ;; to the beginning of it so perform-replace
+                              ;; will see it.
+                              (progn (goto-char (match-beginning 0)) t)))
+        tags-loop-operate (list 'perform-replace from to t t 
+                                (not (null delimited))))
+   (tags-loop-continue (or file-list-form t)))
+\f
+;; Miscellaneous
+
+;;;###autoload
+(defun list-tags (file)
+  "Display list of tags in FILE."
+  (interactive (list (read-file-name
+                     (if (buffer-file-name)
+                         (format "List tags (in file, %s by default): "
+                                 (file-name-nondirectory (buffer-file-name)))
+                       "List tags (in file): ")
+                     nil (buffer-file-name) t)))
+  (find-file-noselect file)
+  (with-output-to-temp-buffer "*Tags List*"
+    (princ "Tags in file ")
+    (princ file)
+    (terpri)
+    (save-excursion
+      (dolist (tags-file (with-current-buffer (get-file-buffer file)
+                          (buffer-tag-table-list)))
+       ;; We don't want completions getting in the way.
+       (let ((tags-build-completion-table nil))
+         (set-buffer (get-tag-table-buffer tags-file)))
+       (goto-char (point-min))
+       (when
+           (search-forward (concat "\f\n" (file-name-nondirectory file) ",")
+                           nil t)
+         (forward-line 1)
+         (while (not (or (eobp) (looking-at "\f")))
+           (princ (buffer-substring (point)
+                                    (progn (skip-chars-forward "^\C-?")
+                                           (point))))
+           (terpri)
+           (forward-line 1)))))))
+
+;;;###autoload
+(defun tags-apropos (string)
+  "Display list of all tags in tag table REGEXP matches."
+  (interactive "sTag apropos (regexp): ")
+  (with-output-to-temp-buffer "*Tags List*"
+    (princ "Tags matching regexp ")
+    (prin1 string)
+    (terpri)
+    (save-excursion
+      (visit-tags-table-buffer)
+      (goto-char 1)
+      (while (re-search-forward string nil t)
+       (beginning-of-line)
+       (princ (buffer-substring (point)
+                                (progn (skip-chars-forward "^\C-?")
+                                       (point))))
+       (terpri)
+       (forward-line 1)))))
+
+;; #### copied from tags.el.  This function is *very* big in FSF.
+(defun visit-tags-table-buffer ()
+  "Select the buffer containing the current tag table."
+  (or tags-file-name
+      (call-interactively 'visit-tags-table))
+  (set-buffer (or (get-file-buffer tags-file-name)
+                 (progn
+                   (setq tag-table-files nil)
+                   (find-file-noselect tags-file-name))))
+  (or (verify-visited-file-modtime (get-file-buffer tags-file-name))
+      (cond ((yes-or-no-p "Tags file has changed, read new contents? ")
+            (revert-buffer t t)
+            (setq tag-table-files nil))))
+  (or (eq (char-after 1) ?\^L)
+      (error "File %s not a valid tag table" tags-file-name)))
+
+\f
+;; Sample uses of find-tag-hook and find-tag-default-hook
+
+;; This is wrong.  We should either make this behaviour default and
+;; back it up, or not use it at all.  For now, I've commented it out.
+;; --hniksic
+
+;; Example buffer-local tag finding
+
+;(add-hook 'emacs-lisp-mode-hook 'setup-emacs-lisp-default-tag-hook)
+
+;(defun setup-emacs-lisp-default-tag-hook ()
+;  (cond ((eq major-mode 'emacs-lisp-mode)
+;       (make-variable-buffer-local 'find-tag-default-hook)
+;       (setq find-tag-default-hook 'emacs-lisp-default-tag))))
+;;; Run it once immediately
+;(setup-emacs-lisp-default-tag-hook)
+;(when (get-buffer "*scratch*")
+;  (with-current-buffer "*scratch*"
+;    (setup-emacs-lisp-default-tag-hook)))
+
+;(defun emacs-lisp-default-tag ()
+;  "Function to return a default tag for Emacs-Lisp mode."
+;  (let ((tag (or (variable-at-point)
+;               (function-at-point))))
+;    (if tag (symbol-name tag))))
+
+\f
+;; Display short info on tag in minibuffer
+
+;; Don't pollute `M-?' -- we may need it for more important stuff.  --hniksic
+;(if (null (lookup-key esc-map "?"))
+;    (define-key esc-map "?" 'display-tag-info))
+
+(defun display-tag-info (tagname)
+  "Prints a description of the first tag matching TAGNAME in the echo area.
+If this is an elisp function, prints something like \"(defun foo (x y z)\".
+That is, is prints the first line of the definition of the form.
+If this is a C-defined elisp function, it does something more clever."
+  (interactive (if current-prefix-arg
+                  '(nil)
+                (list (find-tag-tag "Display tag info: "))))
+  (let* ((results (find-tag-internal tagname))
+        (tag-buf (car results))
+        (tag-point (cdr results))
+        info lname min max fname args)
+    (with-current-buffer tag-buf
+      (save-excursion
+       (save-restriction
+         (widen)
+         (goto-char tag-point)
+         (cond ((let ((case-fold-search nil))
+                  (looking-at "^DEFUN[ \t]"))
+                (forward-sexp 1)
+                (down-list 1)
+                (setq lname (read (current-buffer))
+                      fname (buffer-substring
+                             (progn (forward-sexp 1) (point))
+                             (progn (backward-sexp 1) (point)))
+                      min (buffer-substring
+                           (progn (forward-sexp 3) (point))
+                           (progn (backward-sexp 1) (point)))
+                      max (buffer-substring
+                           (progn (forward-sexp 2) (point))
+                           (progn (backward-sexp 1) (point))))
+                (backward-up-list 1)
+                (setq args (buffer-substring
+                            (progn (forward-sexp 2) (point))
+                            (progn (backward-sexp 1) (point))))
+                (setq info (format "Elisp: %s, C: %s %s, #args: %s"
+                                   lname
+                                   fname args
+                                   (if (string-equal min max)
+                                       min
+                                     (format "from %s to %s" min max)))))
+               (t
+                (setq info
+                      (buffer-substring
+                       (progn (beginning-of-line) (point))
+                       (progn (end-of-line) (point)))))))))
+    (message "%s" info))
+  (setq tags-loop-scan '(display-tag-info nil)
+       tags-loop-operate nil)
+  ;; Always return non-nil
+  t)
+
+\f
+;; Tag mark stack.
+
+(defvar tag-mark-stack1 nil)
+(defvar tag-mark-stack2 nil)
+
+(defcustom tag-mark-stack-max 16
+  "*The maximum number of elements kept on the mark-stack used
+by tags-search.  See also the commands `\\[push-tag-mark]' and
+and `\\[pop-tag-mark]'."
+  :type 'integer
+  :group 'etags)
+
+(defun push-mark-on-stack (stack-symbol &optional max-size)
+  (let ((stack (symbol-value stack-symbol)))
+    (push (point-marker) stack)
+    (cond ((and max-size
+               (> (length stack) max-size))
+          (set-marker (car (nthcdr max-size stack)) nil)
+          (setcdr (nthcdr (1- max-size) stack) nil)))
+    (set stack-symbol stack)))
+
+(defun pop-mark-from-stack (stack-symbol1 stack-symbol2 &optional max-size)
+  (let* ((stack (or (symbol-value stack-symbol1)
+                   (error "No more tag marks on stack")))
+        (marker (car stack))
+        (m-buf (marker-buffer marker)))
+    (set stack-symbol1 (cdr stack))
+    (or m-buf
+       (error "Marker has no buffer"))
+    (or (buffer-live-p m-buf)
+       (error "Buffer has been killed"))
+    (push-mark-on-stack stack-symbol2 max-size)
+    (switch-to-buffer m-buf)
+    (widen)
+    (goto-char marker)))
+
+(defun push-tag-mark ()
+  (push-mark-on-stack 'tag-mark-stack1 tag-mark-stack-max))
+
+;;;###autoload (define-key esc-map "*" 'pop-tag-mark)
+
+(defun pop-tag-mark (arg)
+  "Go to last tag position.
+`find-tag' maintains a mark-stack seperate from the \\[set-mark-command] mark-stack.
+This function pops (and moves to) the tag at the top of this stack."
+  (interactive "P")
+  (if (not arg)
+      (pop-mark-from-stack
+       'tag-mark-stack1 'tag-mark-stack2 tag-mark-stack-max)
+    (pop-mark-from-stack
+     'tag-mark-stack2 'tag-mark-stack1 tag-mark-stack-max)))
+
+\f
+(provide 'etags)
+(provide 'tags)
diff --git a/lisp/events.el b/lisp/events.el
new file mode 100644 (file)
index 0000000..c587e75
--- /dev/null
@@ -0,0 +1,160 @@
+;;; events.el --- event functions for XEmacs.
+
+;; Copyright (C) 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1996-7 Sun Microsystems, Inc.
+;; Copyright (C) 1996 Ben Wing.
+
+;; Maintainer: Martin Buchholz
+;; Keywords: internal, event, dumped
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not in FSF.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;;; Code:
+
+
+(defun event-console (event)
+  "Return the console that EVENT occurred on.
+This will be nil for some types of events (e.g. eval events)."
+  (cdfw-console (event-channel event)))
+
+(defun event-device (event)
+  "Return the device that EVENT occurred on.
+This will be nil for some types of events (e.g. keyboard and eval events)."
+  (dfw-device (event-channel event)))
+
+(defun event-frame (event)
+  "Return the frame that EVENT occurred on.
+This will be nil for some types of events (e.g. keyboard and eval events)."
+  (fw-frame (event-channel event)))
+
+(defun event-buffer (event)
+  "Return the buffer of the window over which mouse event EVENT occurred.
+Return nil unless both (mouse-event-p EVENT) and
+(event-over-text-area-p EVENT) are non-nil."
+  (let ((window (event-window event)))
+    (and (windowp window) (window-buffer window))))
+
+(defalias 'allocate-event 'make-event)
+
+
+(defun key-press-event-p (object)
+  "Return t if OBJECT is a key-press event."
+  (and (event-live-p object) (eq 'key-press (event-type object))))
+
+(defun button-press-event-p (object)
+  "Return t if OBJECT is a mouse button-press event."
+  (and (event-live-p object) (eq 'button-press (event-type object))))
+
+(defun button-release-event-p (object)
+  "Return t if OBJECT is a mouse button-release event."
+  (and (event-live-p object) (eq 'button-release (event-type object))))
+
+(defun button-event-p (object)
+  "Return t if OBJECT is a mouse button-press or button-release event."
+  (and (event-live-p object)
+       (memq (event-type object) '(button-press button-release))
+       t))
+
+(defun motion-event-p (object)
+  "Return t if OBJECT is a mouse motion event."
+  (and (event-live-p object) (eq 'motion (event-type object))))
+
+(defun mouse-event-p (object)
+  "Return t if OBJECT is a mouse button-press, button-release or motion event."
+  (and (event-live-p object)
+       (memq (event-type object) '(button-press button-release motion))
+       t))
+
+(defun process-event-p (object)
+  "Return t if OBJECT is a process-output event."
+  (and (event-live-p object) (eq 'process (event-type object))))
+
+(defun timeout-event-p (object)
+  "Return t if OBJECT is a timeout event."
+  (and (event-live-p object) (eq 'timeout (event-type object))))
+
+(defun eval-event-p (object)
+  "Return t if OBJECT is an eval event."
+  (and (event-live-p object) (eq 'eval (event-type object))))
+
+(defun misc-user-event-p (object)
+  "Return t if OBJECT is a misc-user event.
+A misc-user event is a user event that is not a keypress or mouse click;
+normally this means a menu selection or scrollbar action."
+  (and (event-live-p object) (eq 'misc-user (event-type object))))
+
+;; You could just as easily use event-glyph but we include this for
+;; consistency.
+
+(defun event-over-glyph-p (object)
+  "Return t if OBJECT is a mouse event occurring over a glyph.
+Mouse events are events of type button-press, button-release or motion."
+  (and (event-live-p object) (event-glyph object) t))
+
+(defun keyboard-translate (&rest pairs)
+  "Translate character or keysym FROM to TO at a low level.
+Multiple FROM-TO pairs may be specified.
+
+See `keyboard-translate-table' for more information."
+  (while pairs
+    (puthash (pop pairs) (pop pairs) keyboard-translate-table)))
+
+(put 'backspace 'ascii-character ?\b)
+(put 'delete    'ascii-character ?\177)
+(put 'tab       'ascii-character ?\t)
+(put 'linefeed  'ascii-character ?\n)
+(put 'clear     'ascii-character 12)
+(put 'return    'ascii-character ?\r)
+(put 'escape    'ascii-character ?\e)
+(put 'space    'ascii-character ? )
+
+ ;; Do the same voodoo for the keypad keys.  I used to bind these to keyboard
+ ;; macros (for instance, kp-0 was bound to "0") so that they would track the
+ ;; bindings of the corresponding keys by default, but that made the display
+ ;; of M-x describe-bindings much harder to read, so now we'll just bind them
+ ;; to self-insert by default.  Not a big difference...
+(put 'kp-0 'ascii-character ?0)
+(put 'kp-1 'ascii-character ?1)
+(put 'kp-2 'ascii-character ?2)
+(put 'kp-3 'ascii-character ?3)
+(put 'kp-4 'ascii-character ?4)
+(put 'kp-5 'ascii-character ?5)
+(put 'kp-6 'ascii-character ?6)
+(put 'kp-7 'ascii-character ?7)
+(put 'kp-8 'ascii-character ?8)
+(put 'kp-9 'ascii-character ?9)
+
+(put 'kp-space     'ascii-character ? )
+(put 'kp-tab       'ascii-character ?\t)
+(put 'kp-enter     'ascii-character ?\r)
+(put 'kp-equal     'ascii-character ?=)
+(put 'kp-multiply  'ascii-character ?*)
+(put 'kp-add       'ascii-character ?+)
+(put 'kp-separator 'ascii-character ?,)
+(put 'kp-subtract  'ascii-character ?-)
+(put 'kp-decimal   'ascii-character ?.)
+(put 'kp-divide    'ascii-character ?/)
+
+;;; events.el ends here
diff --git a/lisp/extents.el b/lisp/extents.el
new file mode 100644 (file)
index 0000000..37f0752
--- /dev/null
@@ -0,0 +1,102 @@
+;;; extents.el --- miscellaneous extent functions not written in C
+
+;; Copyright (C) 1993-4, 1997 Free Software Foundation, Inc.
+
+;; Keywords: internal, dumped
+
+;; 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; see the file COPYING.  If not, write to the
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not in FSF.
+
+;;; Commentary:
+
+;; some help from stig@hackvan.com here.
+
+;;; Code:
+
+;; an alternative to map-extents.
+(defun mapcar-extents (function &optional predicate buffer-or-string from to
+                               flags property value)
+  "Apply FUNCTION to all extents which overlap a region in BUFFER-OR-STRING.
+The region is delimited by FROM and TO.  FUNCTION is called with
+one argument, the extent.  A list of the values returned by FUNCTION
+is returned.  An optional PREDICATE may be used to further limit the
+extents over which FUNCTION is mapped.  The optional arguments FLAGS,
+PROPERTY, and VALUE may also be used to control the extents passed to
+PREDICATE or FUNCTION.  See also `map-extents'."
+  (let (*result*)
+    (map-extents (if predicate
+                     #'(lambda (ex junk)
+                         (and (funcall predicate ex)
+                              (setq *result* (cons (funcall function ex)
+                                                   *result*)))
+                         nil)
+                   #'(lambda (ex junk)
+                         (setq *result* (cons (funcall function ex)
+                                              *result*))
+                         nil))
+                 buffer-or-string from to nil flags property value)
+    (nreverse *result*)))
+
+(defun extent-list (&optional buffer-or-string from to flags)
+  "Return a list of the extents in BUFFER-OR-STRING.
+BUFFER-OR-STRING defaults to the current buffer if omitted.
+FROM and TO can be used to limit the range over which extents are
+returned; if omitted, all extents in the buffer or string are returned.
+
+More specifically, if a range is specified using FROM and TO, only
+extents that overlap the range (i.e. begin or end inside of the range)
+are included in the list.  FROM and TO default to the beginning and
+end of BUFFER-OR-STRING, respectively.
+
+FLAGS controls how end cases are treated.  For a discussion of this,
+and exactly what ``overlap'' means, see `map-extents'.
+
+If you want to map a function over the extents in a buffer or string,
+consider using `map-extents' or `mapcar-extents' instead."
+  (mapcar-extents 'identity nil buffer-or-string from to flags))
+
+(defun extent-string (extent)
+  "Return the string delimited by the bounds of EXTENT."
+  (let ((object (extent-object extent)))
+    (if (bufferp object)
+       (buffer-substring (extent-start-position extent)
+                         (extent-end-position extent)
+                         object)
+      (substring object
+                (extent-start-position extent)
+                (extent-end-position extent)))))
+
+(defun extent-descendants (extent)
+  "Return a list of all descendants of EXTENT, including EXTENT.
+This recursively applies `extent-children' to any children of
+EXTENT, until no more children can be found."
+  (let ((children (extent-children extent)))
+    (if children
+       (apply 'nconc (mapcar 'extent-descendants children))
+      (list extent))))
+
+(defun set-extent-keymap (extent keymap)
+  "Set EXTENT's `keymap' property to KEYMAP."
+  (set-extent-property extent 'keymap keymap))
+
+(defun extent-keymap (extent)
+  "Return EXTENT's `keymap' property."
+  (extent-property extent 'keymap))
+
+;;; extents.el ends here
diff --git a/lisp/faces.el b/lisp/faces.el
new file mode 100644 (file)
index 0000000..09a3e79
--- /dev/null
@@ -0,0 +1,1702 @@
+;;; faces.el --- Lisp interface to the C "face" structure
+
+;; Copyright (C) 1992-4, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1995 Board of Trustees, University of Illinois
+;; Copyright (C) 1995, 1996 Ben Wing
+
+;; Author: Ben Wing <ben@xemacs.org>
+;; Keywords: faces, internal, dumped
+
+;; 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; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not synched with FSF.  Almost completely divergent.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; face implementation #1 (used Lisp vectors and parallel C vectors;
+;; FSFmacs still uses this) authored by Jamie Zawinski <jwz@netscape.com>
+;; pre Lucid-Emacs 19.0.
+
+;; face implementation #2 (used one face object per frame per face)
+;; authored by Jamie Zawinski for 19.9.
+
+;; face implementation #3 (use one face object per face) originally
+;; authored for 19.12 by Chuck Thompson <cthomp@cs.uiuc.edu>,
+;; rewritten by Ben Wing with the advent of specifiers.
+
+
+;;; Some stuff in FSF's faces.el is in our x-faces.el.
+
+;;; Code:
+
+(defgroup faces nil
+  "Support for multiple text attributes (fonts, colors, ...)
+Such a collection of attributes is called a \"face\"."
+  :group 'emacs)
+
+
+(defun read-face-name (prompt)
+  (let (face)
+    (while (= (length face) 0) ; nil or ""
+      (setq face (completing-read prompt
+                                 (mapcar (lambda (x) (list (symbol-name x)))
+                                         (face-list))
+                                 nil t)))
+    (intern face)))
+
+(defun face-interactive (what &optional bool)
+  (let* ((fn (intern (concat "face-" what "-instance")))
+        (face (read-face-name (format "Set %s of face: " what)))
+        (default (if (fboundp fn)
+                     ;; #### we should distinguish here between
+                     ;; explicitly setting the value to be the
+                     ;; same as the default face's value, and
+                     ;; not setting a value at all.
+                     (funcall fn face)))
+        (value (if bool
+                   (y-or-n-p (format "Should face %s be %s? "
+                                     (symbol-name face) bool))
+                 (read-string (format "Set %s of face %s to: "
+                                      what (symbol-name face))
+                  (cond ((font-instance-p default)
+                         (font-instance-name default))
+                        ((color-instance-p default)
+                         (color-instance-name default))
+                        ((image-instance-p default)
+                         (image-instance-file-name default))
+                        (t default))))))
+    (list face (if (equal value "") nil value))))
+
+(defconst built-in-face-specifiers
+  (built-in-face-specifiers)
+  "A list of the built-in face properties that are specifiers.")
+
+(defun face-property (face property &optional locale tag-set exact-p)
+  "Return FACE's value of the given PROPERTY.
+
+If LOCALE is omitted, the FACE's actual value for PROPERTY will be
+  returned.  For built-in properties, this will be a specifier object
+  of a type appropriate to the property (e.g. a font or color
+  specifier).  For other properties, this could be anything.
+
+If LOCALE is supplied, then instead of returning the actual value,
+  the specification(s) for the given locale or locale type will
+  be returned.  This will only work if the actual value of
+  PROPERTY is a specifier (this will always be the case for built-in
+  properties, but not or not may apply to user-defined properties).
+  If the actual value of PROPERTY is not a specifier, this value
+  will simply be returned regardless of LOCALE.
+
+The return value will be a list of instantiators (e.g. strings
+  specifying a font or color name), or a list of specifications, each
+  of which is a cons of a locale and a list of instantiators.
+  Specifically, if LOCALE is a particular locale (a buffer, window,
+  frame, device, or 'global), a list of instantiators for that locale
+  will be returned.  Otherwise, if LOCALE is a locale type (one of
+  the symbols 'buffer, 'window, 'frame, or 'device), the specifications
+  for all locales of that type will be returned.  Finally, if LOCALE is
+  'all, the specifications for all locales of all types will be returned.
+
+The specifications in a specifier determine what the value of
+  PROPERTY will be in a particular \"domain\" or set of circumstances,
+  which is typically a particular Emacs window along with the buffer
+  it contains and the frame and device it lies within.  The value
+  is derived from the instantiator associated with the most specific
+  locale (in the order buffer, window, frame, device, and 'global)
+  that matches the domain in question.  In other words, given a domain
+  (i.e. an Emacs window, usually), the specifier for PROPERTY will first
+  be searched for a specification whose locale is the buffer contained
+  within that window; then for a specification whose locale is the window
+  itself; then for a specification whose locale is the frame that the
+  window is contained within; etc.  The first instantiator that is
+  valid for the domain (usually this means that the instantiator is
+  recognized by the device [i.e. the X server or TTY device] that the
+  domain is on.  The function `face-property-instance' actually does
+  all this, and is used to determine how to display the face.
+
+See `set-face-property' for the built-in property-names."
+
+  (setq face (get-face face))
+  (let ((value (get face property)))
+    (if (and locale
+            (or (memq property built-in-face-specifiers)
+                (specifierp value)))
+       (setq value (specifier-specs value locale tag-set exact-p)))
+    value))
+
+(defun convert-face-property-into-specifier (face property)
+  "Convert PROPERTY on FACE into a specifier, if it's not already."
+  (setq face (get-face face))
+  (let ((specifier (get face property)))
+    ;; if a user-property does not have a specifier but a
+    ;; locale was specified, put a specifier there.
+    ;; If there was already a value there, convert it to a
+    ;; specifier with the value as its 'global instantiator.
+    (unless (specifierp specifier)
+      (let ((new-specifier (make-specifier 'generic)))
+       (if (or (not (null specifier))
+               ;; make sure the nil returned from `get' wasn't
+               ;; actually the value of the property
+               (null (get face property t)))
+           (add-spec-to-specifier new-specifier specifier))
+       (setq specifier new-specifier)
+       (put face property specifier)))))
+
+(defun face-property-instance (face property
+                                   &optional domain default no-fallback)
+  "Return the instance of FACE's PROPERTY in the specified DOMAIN.
+
+Under most circumstances, DOMAIN will be a particular window,
+  and the returned instance describes how the specified property
+  actually is displayed for that window and the particular buffer
+  in it.  Note that this may not be the same as how the property
+  appears when the buffer is displayed in a different window or
+  frame, or how the property appears in the same window if you
+  switch to another buffer in that window; and in those cases,
+  the returned instance would be different.
+
+The returned instance will typically be a color-instance,
+  font-instance, or pixmap-instance object, and you can query
+  it using the appropriate object-specific functions.  For example,
+  you could use `color-instance-rgb-components' to find out the
+  RGB (red, green, and blue) components of how the 'background
+  property of the 'highlight face is displayed in a particular
+  window.  The results might be different from the results
+  you would get for another window (perhaps the user
+  specified a different color for the frame that window is on;
+  or perhaps the same color was specified but the window is
+  on a different X server, and that X server has different RGB
+  values for the color from this one).
+
+DOMAIN defaults to the selected window if omitted.
+
+DOMAIN can be a frame or device, instead of a window.  The value
+  returned for a such a domain is used in special circumstances
+  when a more specific domain does not apply; for example, a frame
+  value might be used for coloring a toolbar, which is conceptually
+  attached to a frame rather than a particular window.  The value
+  is also useful in determining what the value would be for a
+  particular window within the frame or device, if it is not
+  overridden by a more specific specification.
+
+If PROPERTY does not name a built-in property, its value will
+  simply be returned unless it is a specifier object, in which case
+  it will be instanced using `specifier-instance'.
+
+Optional arguments DEFAULT and NO-FALLBACK are the same as in
+  `specifier-instance'."
+
+  (setq face (get-face face))
+  (let ((value (get face property)))
+    (if (specifierp value)
+       (setq value (specifier-instance value domain default no-fallback)))
+    value))
+
+(defun face-property-matching-instance (face property matchspec
+                                            &optional domain default
+                                            no-fallback)
+  "Return the instance of FACE's PROPERTY matching MATCHSPEC in DOMAIN.
+Currently the only useful value for MATCHSPEC is a charset, when used
+in conjunction with the face's font; this allows you to retrieve a
+font that can be used to display a particular charset, rather than just
+any font.
+
+Other than MATCHSPEC, this function is identical to `face-property-instance'.
+See also `specifier-matching-instance' for a fuller description of the
+matching process."
+
+  (setq face (get-face face))
+  (let ((value (get face property)))
+    (if (specifierp value)
+       (setq value (specifier-matching-instance value matchspec domain
+                                                default no-fallback)))
+    value))
+
+(defun set-face-property (face property value &optional locale tag-set
+                              how-to-add)
+  "Change a property of FACE.
+
+NOTE: If you want to remove a property from a face, use `remove-face-property'
+  rather than attempting to set a value of nil for the property.
+
+For built-in properties, the actual value of the property is a
+  specifier and you cannot change this; but you can change the
+  specifications within the specifier, and that is what this function
+  will do.  For user-defined properties, you can use this function
+  to either change the actual value of the property or, if this value
+  is a specifier, change the specifications within it.
+
+If PROPERTY is a built-in property, the specifications to be added to
+  this property can be supplied in many different ways:
+
+  -- If VALUE is a simple instantiator (e.g. a string naming a font or
+     color) or a list of instantiators, then the instantiator(s) will
+     be added as a specification of the property for the given LOCALE
+     (which defaults to 'global if omitted).
+  -- If VALUE is a list of specifications (each of which is a cons of
+     a locale and a list of instantiators), then LOCALE must be nil
+     (it does not make sense to explicitly specify a locale in this
+     case), and specifications will be added as given.
+  -- If VALUE is a specifier (as would be returned by `face-property'
+     if no LOCALE argument is given), then some or all of the
+     specifications in the specifier will be added to the property.
+     In this case, the function is really equivalent to
+     `copy-specifier' and LOCALE has the same semantics (if it is
+     a particular locale, the specification for the locale will be
+     copied; if a locale type, specifications for all locales of
+     that type will be copied; if nil or 'all, then all
+     specifications will be copied).
+
+HOW-TO-ADD should be either nil or one of the symbols 'prepend,
+  'append, 'remove-tag-set-prepend, 'remove-tag-set-append, 'remove-locale,
+  'remove-locale-type, or 'remove-all.  See `copy-specifier' and
+  `add-spec-to-specifier' for a description of what each of
+  these means.  Most of the time, you do not need to worry about
+  this argument; the default behavior usually is fine.
+
+In general, it is OK to pass an instance object (e.g. as returned
+  by `face-property-instance') as an instantiator in place of
+  an actual instantiator.  In such a case, the instantiator used
+  to create that instance object will be used (for example, if
+  you set a font-instance object as the value of the 'font
+  property, then the font name used to create that object will
+  be used instead).  If some cases, however, doing this
+  conversion does not make sense, and this will be noted in
+  the documentation for particular types of instance objects.
+
+If PROPERTY is not a built-in property, then this function will
+  simply set its value if LOCALE is nil.  However, if LOCALE is
+  given, then this function will attempt to add VALUE as the
+  instantiator for the given LOCALE, using `add-spec-to-specifier'.
+  If the value of the property is not a specifier, it will
+  automatically be converted into a 'generic specifier.
+
+
+The following symbols have predefined meanings:
+
+ foreground         The foreground color of the face.
+                    For valid instantiators, see `color-specifier-p'.
+
+ background         The background color of the face.
+                    For valid instantiators, see `color-specifier-p'.
+
+ font               The font used to display text covered by this face.
+                    For valid instantiators, see `font-specifier-p'.
+
+ display-table      The display table of the face.
+                    This should be a vector of 256 elements.
+
+ background-pixmap  The pixmap displayed in the background of the face.
+                    Only used by faces on X devices.
+                    For valid instantiators, see `image-specifier-p'.
+
+ underline          Underline all text covered by this face.
+                    For valid instantiators, see `face-boolean-specifier-p'.
+
+ strikethru         Draw a line through all text covered by this face.
+                    For valid instantiators, see `face-boolean-specifier-p'.
+
+ highlight          Highlight all text covered by this face.
+                    Only used by faces on TTY devices.
+                    For valid instantiators, see `face-boolean-specifier-p'.
+
+ dim                Dim all text covered by this face.
+                    Only used by faces on TTY devices.
+                    For valid instantiators, see `face-boolean-specifier-p'.
+
+ blinking           Blink all text covered by this face.
+                    Only used by faces on TTY devices.
+                    For valid instantiators, see `face-boolean-specifier-p'.
+
+ reverse            Reverse the foreground and background colors.
+                    Only used by faces on TTY devices.
+                    For valid instantiators, see `face-boolean-specifier-p'.
+
+ doc-string         Description of what the face's normal use is.
+                    NOTE: This is not a specifier, unlike all
+                    the other built-in properties, and cannot
+                    contain locale-specific values."
+
+  (setq face (get-face face))
+  (if (memq property built-in-face-specifiers)
+      (set-specifier (get face property) value locale tag-set how-to-add)
+
+    ;; This section adds user defined properties.
+    (if (not locale)
+       (put face property value)
+      (convert-face-property-into-specifier face property)
+      (add-spec-to-specifier (get face property) value locale tag-set
+                            how-to-add)))
+  value)
+
+(defun remove-face-property (face property &optional locale tag-set exact-p)
+  "Remove a property from FACE.
+For built-in properties, this is analogous to `remove-specifier'.
+See `remove-specifier' for the meaning of the LOCALE, TAG-SET, and EXACT-P
+arguments."
+  (or locale (setq locale 'all))
+  (if (memq property built-in-face-specifiers)
+      (remove-specifier (face-property face property) locale tag-set exact-p)
+    (if (eq locale 'all)
+       (remprop (get-face face) property)
+      (convert-face-property-into-specifier face property)
+      (remove-specifier (face-property face property) locale tag-set
+                       exact-p))))
+
+(defun reset-face (face &optional locale tag-set exact-p)
+  "Clear all existing built-in specifications from FACE.
+This makes FACE inherit all its display properties from 'default.
+WARNING: Be absolutely sure you want to do this!!!  It is a dangerous
+operation and is not undoable.
+
+The arguments LOCALE, TAG-SET and EXACT-P are the same as for
+`remove-specifier'."
+  (mapc (lambda (x)
+         (remove-specifier (face-property face x) locale tag-set exact-p))
+       built-in-face-specifiers)
+  nil)
+
+(defun set-face-parent (face parent &optional locale tag-set how-to-add)
+  "Set the parent of FACE to PARENT, for all properties.
+This makes all properties of FACE inherit from PARENT."
+  (setq parent (get-face parent))
+  (mapcar (lambda (x)
+           (set-face-property face x (vector parent) locale tag-set
+                              how-to-add))
+         (delq 'display-table
+               (delq 'background-pixmap
+                     (copy-sequence built-in-face-specifiers))))
+  (set-face-background-pixmap face (vector 'inherit ':face parent)
+                             locale tag-set how-to-add)
+  nil)
+
+(defun face-doc-string (face)
+  "Return the documentation string for FACE."
+  (face-property face 'doc-string))
+
+(defun set-face-doc-string (face doc-string)
+  "Change the documentation string of FACE to DOC-STRING."
+  (interactive (face-interactive "doc-string"))
+  (set-face-property face 'doc-string doc-string))
+
+(defun face-font-name (face &optional domain charset)
+  "Return the font name of FACE in DOMAIN, or nil if it is unspecified.
+DOMAIN is as in `face-font-instance'."
+  (let ((f (face-font-instance face domain charset)))
+    (and f (font-instance-name f))))
+
+(defun face-font (face &optional locale tag-set exact-p)
+  "Return the font of FACE in LOCALE, or nil if it is unspecified.
+
+FACE may be either a face object or a symbol representing a face.
+
+LOCALE may be a locale (the instantiators for that particular locale
+  will be returned), a locale type (the specifications for all locales
+  of that type will be returned), 'all (all specifications will be
+  returned), or nil (the actual specifier object will be returned).
+
+See `face-property' for more information."
+  (face-property face 'font locale tag-set exact-p))
+
+(defun face-font-instance (face &optional domain charset)
+  "Return the instance of FACE's font in DOMAIN.
+
+FACE may be either a face object or a symbol representing a face.
+
+Normally DOMAIN will be a window or nil (meaning the selected window),
+  and an instance object describing how the font appears in that
+  particular window and buffer will be returned.
+
+See `face-property-instance' for more information."
+  (if charset
+      (face-property-matching-instance face 'font charset domain)
+    (face-property-instance face 'font domain)))
+
+(defun set-face-font (face font &optional locale tag-set how-to-add)
+  "Change the font of FACE to FONT in LOCALE.
+
+FACE may be either a face object or a symbol representing a face.
+
+FONT should be an instantiator (see `font-specifier-p'), a list of
+  instantiators, an alist of specifications (each mapping a
+  locale to an instantiator list), or a font specifier object.
+
+If FONT is an alist, LOCALE must be omitted.  If FONT is a
+  specifier object, LOCALE can be a locale, a locale type, 'all,
+  or nil; see `copy-specifier' for its semantics.  Otherwise LOCALE
+  specifies the locale under which the specified instantiator(s)
+  will be added, and defaults to 'global.
+
+See `set-face-property' for more information."
+  (interactive (face-interactive "font"))
+  (set-face-property face 'font font locale tag-set how-to-add))
+
+(defun face-foreground (face &optional locale tag-set exact-p)
+  "Return the foreground of FACE in LOCALE, or nil if it is unspecified.
+
+FACE may be either a face object or a symbol representing a face.
+
+LOCALE may be a locale (the instantiators for that particular locale
+  will be returned), a locale type (the specifications for all locales
+  of that type will be returned), 'all (all specifications will be
+  returned), or nil (the actual specifier object will be returned).
+
+See `face-property' for more information."
+  (face-property face 'foreground locale tag-set exact-p))
+
+(defun face-foreground-instance (face &optional domain default no-fallback)
+  "Return the instance of FACE's foreground in DOMAIN.
+
+FACE may be either a face object or a symbol representing a face.
+
+Normally DOMAIN will be a window or nil (meaning the selected window),
+  and an instance object describing how the foreground appears in that
+  particular window and buffer will be returned.
+
+See `face-property-instance' for more information."
+  (face-property-instance face 'foreground domain default no-fallback))
+
+(defun face-foreground-name (face &optional domain default no-fallback)
+  "Return the name of FACE's foreground color in DOMAIN.
+
+FACE may be either a face object or a symbol representing a face.
+
+Normally DOMAIN will be a window or nil (meaning the selected window),
+  and an instance object describing how the background appears in that
+  particular window and buffer will be returned.
+
+See `face-property-instance' for more information."
+  (color-instance-name (face-foreground-instance
+                       face domain default no-fallback)))
+
+(defun set-face-foreground (face color &optional locale tag-set how-to-add)
+  "Change the foreground color of FACE to COLOR in LOCALE.
+
+FACE may be either a face object or a symbol representing a face.
+
+COLOR should be an instantiator (see `color-specifier-p'), a list of
+  instantiators, an alist of specifications (each mapping a locale to
+  an instantiator list), or a color specifier object.
+
+If COLOR is an alist, LOCALE must be omitted.  If COLOR is a
+  specifier object, LOCALE can be a locale, a locale type, 'all,
+  or nil; see `copy-specifier' for its semantics.  Otherwise LOCALE
+  specifies the locale under which the specified instantiator(s)
+  will be added, and defaults to 'global.
+
+See `set-face-property' for more information."
+  (interactive (face-interactive "foreground"))
+  (set-face-property face 'foreground color locale tag-set how-to-add))
+
+(defun face-background (face &optional locale tag-set exact-p)
+  "Return the background color of FACE in LOCALE, or nil if it is unspecified.
+
+FACE may be either a face object or a symbol representing a face.
+
+LOCALE may be a locale (the instantiators for that particular locale
+  will be returned), a locale type (the specifications for all locales
+  of that type will be returned), 'all (all specifications will be
+  returned), or nil (the actual specifier object will be returned).
+
+See `face-property' for more information."
+  (face-property face 'background locale tag-set exact-p))
+
+(defun face-background-instance (face &optional domain default no-fallback)
+  "Return the instance of FACE's background in DOMAIN.
+
+FACE may be either a face object or a symbol representing a face.
+
+Normally DOMAIN will be a window or nil (meaning the selected window),
+  and an instance object describing how the background appears in that
+  particular window and buffer will be returned.
+
+See `face-property-instance' for more information."
+  (face-property-instance face 'background domain default no-fallback))
+
+(defun face-background-name (face &optional domain default no-fallback)
+  "Return the name of FACE's background color in DOMAIN.
+
+FACE may be either a face object or a symbol representing a face.
+
+Normally DOMAIN will be a window or nil (meaning the selected window),
+  and an instance object describing how the background appears in that
+  particular window and buffer will be returned.
+
+See `face-property-instance' for more information."
+  (color-instance-name (face-background-instance
+                       face domain default no-fallback)))
+
+(defun set-face-background (face color &optional locale tag-set how-to-add)
+  "Change the background color of FACE to COLOR in LOCALE.
+
+FACE may be either a face object or a symbol representing a face.
+
+COLOR should be an instantiator (see `color-specifier-p'), a list of
+  instantiators, an alist of specifications (each mapping a locale to
+  an instantiator list), or a color specifier object.
+
+If COLOR is an alist, LOCALE must be omitted.  If COLOR is a
+  specifier object, LOCALE can be a locale, a locale type, 'all,
+  or nil; see `copy-specifier' for its semantics.  Otherwise LOCALE
+  specifies the locale under which the specified instantiator(s)
+  will be added, and defaults to 'global.
+
+See `set-face-property' for more information."
+  (interactive (face-interactive "background"))
+  (set-face-property face 'background color locale tag-set how-to-add))
+
+(defun face-background-pixmap (face &optional locale tag-set exact-p)
+  "Return the background pixmap of FACE in LOCALE, or nil if it is unspecified.
+This property is only used on window system devices.
+
+FACE may be either a face object or a symbol representing a face.
+
+LOCALE may be a locale (the instantiators for that particular locale
+  will be returned), a locale type (the specifications for all locales
+  of that type will be returned), 'all (all specifications will be
+  returned), or nil (the actual specifier object will be returned).
+
+See `face-property' for more information."
+  (face-property face 'background-pixmap locale tag-set exact-p))
+
+(defun face-background-pixmap-instance (face &optional domain default
+                                            no-fallback)
+  "Return the instance of FACE's background pixmap in DOMAIN.
+
+FACE may be either a face object or a symbol representing a face.
+
+Normally DOMAIN will be a window or nil (meaning the selected window),
+  and an instance object describing how the background appears in that
+  particular window and buffer will be returned.
+
+See `face-property-instance' for more information."
+  (face-property-instance face 'background-pixmap domain default no-fallback))
+
+(defun set-face-background-pixmap (face pixmap &optional locale tag-set
+                                       how-to-add)
+  "Change the background pixmap of FACE to PIXMAP in LOCALE.
+This property is only used on window system devices.
+
+FACE may be either a face object or a symbol representing a face.
+
+PIXMAP should be an instantiator (see `image-specifier-p'), a list
+  of instantiators, an alist of specifications (each mapping a locale
+  to an instantiator list), or an image specifier object.
+
+If PIXMAP is an alist, LOCALE must be omitted.  If PIXMAP is a
+  specifier object, LOCALE can be a locale, a locale type, 'all,
+  or nil; see `copy-specifier' for its semantics.  Otherwise LOCALE
+  specifies the locale under which the specified instantiator(s)
+  will be added, and defaults to 'global.
+
+See `set-face-property' for more information."
+  (interactive (face-interactive "background-pixmap"))
+  (set-face-property face 'background-pixmap pixmap locale tag-set how-to-add))
+
+(defun face-display-table (face &optional locale tag-set exact-p)
+  "Return the display table of FACE in LOCALE.
+
+A vector (as returned by `make-display-table') will be returned.
+
+LOCALE may be a locale (the instantiators for that particular locale
+  will be returned), a locale type (the specifications for all locales
+  of that type will be returned), 'all (all specifications will be
+  returned), or nil (the actual specifier object will be returned).
+
+See `face-property' for more information."
+  (face-property face 'display-table locale tag-set exact-p))
+
+(defun face-display-table-instance (face &optional domain default no-fallback)
+  "Return the instance of FACE's display table in DOMAIN.
+A vector (as returned by `make-display-table') will be returned.
+
+See `face-property-instance' for the semantics of the DOMAIN argument."
+  (face-property-instance face 'display-table domain default no-fallback))
+
+(defun set-face-display-table (face display-table &optional locale tag-set
+                                   how-to-add)
+  "Change the display table of FACE to DISPLAY-TABLE in LOCALE.
+DISPLAY-TABLE should be a vector as returned by `make-display-table'.
+
+See `set-face-property' for the semantics of the LOCALE, TAG-SET, and
+  HOW-TO-ADD arguments."
+  (interactive (face-interactive "display-table"))
+  (set-face-property face 'display-table display-table locale tag-set
+                    how-to-add))
+
+;; The following accessors and mutators are, IMHO, good
+;; implementation.  Cf. with `make-face-bold'.
+
+(defun face-underline-p (face &optional domain default no-fallback)
+  "Return t if FACE is underlined in DOMAIN.
+See `face-property-instance' for the semantics of the DOMAIN argument."
+  (face-property-instance face 'underline domain default no-fallback))
+
+(defun set-face-underline-p (face underline-p &optional locale tag-set
+                                 how-to-add)
+  "Change the underline property of FACE to UNDERLINE-P.
+UNDERLINE-P is normally a face-boolean instantiator; see
+ `face-boolean-specifier-p'.
+See `set-face-property' for the semantics of the LOCALE, TAG-SET, and
+ HOW-TO-ADD arguments."
+  (interactive (face-interactive "underline-p" "underlined"))
+  (set-face-property face 'underline underline-p locale tag-set how-to-add))
+
+(defun face-strikethru-p (face &optional domain default no-fallback)
+  "Return t if FACE is strikethru-d (i.e. struck through) in DOMAIN.
+See `face-property-instance' for the semantics of the DOMAIN argument."
+  (face-property-instance face 'strikethru domain default no-fallback))
+
+(defun set-face-strikethru-p (face strikethru-p &optional locale tag-set
+                                 how-to-add)
+  "Change whether FACE is strikethru-d (i.e. struck through) in LOCALE.
+STRIKETHRU-P is normally a face-boolean instantiator; see
+ `face-boolean-specifier-p'.
+See `set-face-property' for the semantics of the LOCALE, TAG-SET, and
+ HOW-TO-ADD arguments."
+  (interactive (face-interactive "strikethru-p" "strikethru-d"))
+  (set-face-property face 'strikethru strikethru-p locale tag-set how-to-add))
+
+(defun face-highlight-p (face &optional domain default no-fallback)
+  "Return t if FACE is highlighted in DOMAIN (TTY domains only).
+See `face-property-instance' for the semantics of the DOMAIN argument."
+  (face-property-instance face 'highlight domain default no-fallback))
+
+(defun set-face-highlight-p (face highlight-p &optional locale tag-set
+                                 how-to-add)
+  "Change whether FACE is highlighted in LOCALE (TTY locales only).
+HIGHLIGHT-P is normally a face-boolean instantiator; see
+ `face-boolean-specifier-p'.
+See `set-face-property' for the semantics of the LOCALE, TAG-SET, and
+ HOW-TO-ADD arguments."
+  (interactive (face-interactive "highlight-p" "highlighted"))
+  (set-face-property face 'highlight highlight-p locale tag-set how-to-add))
+
+(defun face-dim-p (face &optional domain default no-fallback)
+  "Return t if FACE is dimmed in DOMAIN (TTY domains only).
+See `face-property-instance' for the semantics of the DOMAIN argument."
+  (face-property-instance face 'dim domain default no-fallback))
+
+(defun set-face-dim-p (face dim-p &optional locale tag-set how-to-add)
+  "Change whether FACE is dimmed in LOCALE (TTY locales only).
+DIM-P is normally a face-boolean instantiator; see
+ `face-boolean-specifier-p'.
+See `set-face-property' for the semantics of the LOCALE, TAG-SET, and
+ HOW-TO-ADD arguments."
+  (interactive (face-interactive "dim-p" "dimmed"))
+  (set-face-property face 'dim dim-p locale tag-set how-to-add))
+
+(defun face-blinking-p (face &optional domain default no-fallback)
+  "Return t if FACE is blinking in DOMAIN (TTY domains only).
+See `face-property-instance' for the semantics of the DOMAIN argument."
+  (face-property-instance face 'blinking domain default no-fallback))
+
+(defun set-face-blinking-p (face blinking-p &optional locale tag-set
+                                how-to-add)
+  "Change whether FACE is blinking in LOCALE (TTY locales only).
+BLINKING-P is normally a face-boolean instantiator; see
+ `face-boolean-specifier-p'.
+See `set-face-property' for the semantics of the LOCALE, TAG-SET, and
+ HOW-TO-ADD arguments."
+  (interactive (face-interactive "blinking-p" "blinking"))
+  (set-face-property face 'blinking blinking-p locale tag-set how-to-add))
+
+(defun face-reverse-p (face &optional domain default no-fallback)
+  "Return t if FACE is reversed in DOMAIN (TTY domains only).
+See `face-property-instance' for the semantics of the DOMAIN argument."
+  (face-property-instance face 'reverse domain default no-fallback))
+
+(defun set-face-reverse-p (face reverse-p &optional locale tag-set how-to-add)
+  "Change whether FACE is reversed in LOCALE (TTY locales only).
+REVERSE-P is normally a face-boolean instantiator; see
+ `face-boolean-specifier-p'.
+See `set-face-property' for the semantics of the LOCALE, TAG-SET, and
+ HOW-TO-ADD arguments."
+  (interactive (face-interactive "reverse-p" "reversed"))
+  (set-face-property face 'reverse reverse-p locale tag-set how-to-add))
+
+\f
+(defun face-property-equal (face1 face2 prop domain)
+  (equal (face-property-instance face1 prop domain)
+        (face-property-instance face2 prop domain)))
+
+(defun face-equal-loop (props face1 face2 domain)
+  (while (and props
+             (face-property-equal face1 face2 (car props) domain))
+    (setq props (cdr props)))
+  (null props))
+
+(defun face-equal (face1 face2 &optional domain)
+  "Return t if FACE1 and FACE2 will display in the same way in DOMAIN.
+See `face-property-instance' for the semantics of the DOMAIN argument."
+  (if (null domain) (setq domain (selected-window)))
+  (if (not (valid-specifier-domain-p domain))
+      (error "Invalid specifier domain"))
+  (let ((device (dfw-device domain))
+       (common-props '(foreground background font display-table underline))
+       (win-props '(background-pixmap strikethru))
+       (tty-props '(highlight dim blinking reverse)))
+
+    ;; First check the properties which are used in common between the
+    ;; x and tty devices.  Then, check those properties specific to
+    ;; the particular device type.
+    (and (face-equal-loop common-props face1 face2 domain)
+        (cond ((eq 'tty (device-type device))
+               (face-equal-loop tty-props face1 face2 domain))
+              ((or (eq 'x (device-type device))
+                   (eq 'mswindows (device-type device)))
+               (face-equal-loop win-props face1 face2 domain))
+              (t t)))))
+
+(defun face-differs-from-default-p (face &optional domain)
+  "Return t if FACE will display differently from the default face in DOMAIN.
+See `face-property-instance' for the semantics of the DOMAIN argument."
+  (not (face-equal face 'default domain)))
+
+; moved from x-faces.el
+(defun try-font-name (name &optional device)
+  ;; yes, name really should be here twice.
+  (and name (make-font-instance name device t) name))
+
+\f
+;; This function is a terrible, disgusting hack!!!!  Need to
+;; separate out the font elements as separate face properties!
+
+;; WE DEMAND LEXICAL SCOPING!!!
+;; WE DEMAND LEXICAL SCOPING!!!
+;; WE DEMAND LEXICAL SCOPING!!!
+;; WE DEMAND LEXICAL SCOPING!!!
+;; WE DEMAND LEXICAL SCOPING!!!
+;; WE DEMAND LEXICAL SCOPING!!!
+;; WE DEMAND LEXICAL SCOPING!!!
+;; WE DEMAND LEXICAL SCOPING!!!
+;; WE DEMAND LEXICAL SCOPING!!!
+;; WE DEMAND LEXICAL SCOPING!!!
+;; WE DEMAND LEXICAL SCOPING!!!
+;; WE DEMAND LEXICAL SCOPING!!!
+;; WE DEMAND LEXICAL SCOPING!!!
+;; WE DEMAND LEXICAL SCOPING!!!
+;; WE DEMAND LEXICAL SCOPING!!!
+(defun frob-face-property (face property func &optional locale)
+  "Change the specifier for FACE's PROPERTY according to FUNC, in LOCALE.
+This function is ugly and messy and is primarily used as an internal
+helper function for `make-face-bold' et al., so you probably don't
+want to use it or read the rest of the documentation.  But if you do ...
+
+FUNC should be a function of two arguments (an instance and a device)
+that returns a modified name that is valid for the given device.
+If LOCALE specifies a valid domain (i.e. a window, frame, or device),
+this function instantiates the specifier over that domain, applies FUNC
+to the resulting instance, and adds the result back as an instantiator
+for that locale.  Otherwise, LOCALE should be a locale, locale type, or
+'all (defaults to 'all if omitted).  For each specification thusly
+included: if the locale given is a valid domain, FUNC will be
+iterated over all valid instantiators for the device of the domain
+until a non-nil result is found (if there is no such result, the
+first valid instantiator is used), and that result substituted for
+the specification; otherwise, the process just outlined is
+iterated over each existing device and the concatenated results
+substituted for the specification."
+  (let ((sp (face-property face property)))
+    (if (valid-specifier-domain-p locale)
+       ;; this is easy.
+       (let* ((inst (face-property-instance face property locale))
+              (name (and inst (funcall func inst (dfw-device locale)))))
+         (when name
+           (add-spec-to-specifier sp name locale)))
+      ;; otherwise, map over all specifications ...
+      ;; but first, some further kludging:
+      ;; (1) if we're frobbing the global property, make sure
+      ;;     that something is there (copy from the default face,
+      ;;     if necessary).  Otherwise, something like
+      ;;     (make-face-larger 'modeline)
+      ;;     won't do anything at all if the modeline simply
+      ;;     inherits its font from 'default.
+      ;; (2) if we're frobbing a particular locale, nothing would
+      ;;     happen if that locale has no instantiators.  So signal
+      ;;     an error to indicate this.
+      (if (and (or (eq locale 'global) (eq locale 'all) (not locale))
+              (not (face-property face property 'global)))
+         (copy-specifier (face-property 'default property)
+                         (face-property face property)
+                         'global))
+      (if (and (valid-specifier-locale-p locale)
+              (not (face-property face property locale)))
+         (error "Property must have a specification in locale %S" locale))
+      (map-specifier
+       sp
+       (lambda (sp locale inst-list func)
+        (let* ((device (dfw-device locale))
+               ;; if a device can be derived from the locale,
+               ;; call frob-face-property-1 for that device.
+               ;; Otherwise map frob-face-property-1 over each device.
+               (result
+                (if device
+                    (list (frob-face-property-1 sp device inst-list func))
+                  (mapcar (lambda (device)
+                            (frob-face-property-1 sp device
+                                                  inst-list func))
+                          (device-list))))
+               new-result)
+          ;; remove duplicates and nils from the obtained list of
+          ;; instantiators.
+          (mapcar (lambda (arg)
+                    (when (and arg (not (member arg new-result)))
+                      (setq new-result (cons arg new-result))))
+                  result)
+          ;; add back in.
+          (add-spec-list-to-specifier sp (list (cons locale new-result)))
+          ;; tell map-specifier to keep going.
+          nil))
+       locale
+       func))))
+
+(defun frob-face-property-1 (sp device inst-list func)
+  (let
+      (first-valid result)
+    (while (and inst-list (not result))
+      (let* ((inst-pair (car inst-list))
+            (tag-set (car inst-pair))
+            (sp-inst (specifier-instance-from-inst-list
+                      sp device (list inst-pair))))
+       (if sp-inst
+           (progn
+             (if (not first-valid)
+                 (setq first-valid inst-pair))
+             (setq result (funcall func sp-inst device))
+              (if result
+                  (setq result (cons tag-set result))))))
+      (setq inst-list (cdr inst-list)))
+    (or result first-valid)))
+
+(defun frob-face-font-2 (face locale unfrobbed-face frobbed-face
+                             tty-thunk x-thunk standard-face-mapping)
+  ;; another kludge to make things more intuitive.  If we're
+  ;; inheriting from a standard face in this locale, frob the
+  ;; inheritance as appropriate.  Else, if, after the first X frobbing
+  ;; pass, the face hasn't changed and still looks like the standard
+  ;; unfrobbed face (e.g. 'default), make it inherit from the standard
+  ;; frobbed face (e.g. 'bold).  Regardless of things, do the TTY
+  ;; frobbing.
+
+  ;; yuck -- The LOCALE argument to make-face-bold is not actually a locale,
+  ;; but is a "locale, locale-type, or nil for all".  So ...  do our extra
+  ;; frobbing only if it's actually a locale; or for nil, do the frobbing
+  ;; on 'global.  This specifier stuff needs some rethinking.
+  (let* ((the-locale (cond ((null locale) 'global)
+                          ((valid-specifier-locale-p locale) locale)
+                          (t nil)))
+        (specs (and the-locale (face-font face the-locale nil t)))
+        (change-it (and specs (cdr (assoc specs standard-face-mapping)))))
+    (if (and change-it
+            (not (memq (face-name (find-face face))
+                       '(default bold italic bold-italic))))
+       (progn
+         (or (equal change-it t)
+             (set-face-property face 'font change-it the-locale))
+         (funcall tty-thunk))
+      (let* ((domain (cond ((null the-locale) nil)
+                          ((valid-specifier-domain-p the-locale) the-locale)
+                          ;; OK, this next one is truly a kludge, but
+                          ;; it results in more intuitive behavior most
+                          ;; of the time. (really!)
+                          ((or (eq the-locale 'global) (eq the-locale 'all))
+                           (selected-device))
+                          (t nil)))
+            (inst (and domain (face-property-instance face 'font domain))))
+       (funcall tty-thunk)
+       (funcall x-thunk)
+       ;; If it's reasonable to do the inherit-from-standard-face trick,
+       ;; and it's called for, then do it now.
+       (or (null domain)
+           (not (equal inst (face-property-instance face 'font domain)))
+           ;; don't do it for standard faces, or you'll get inheritance loops.
+           ;; #### This makes XEmacs seg fault! fix this bug.
+           (memq (face-name (find-face face))
+                 '(default bold italic bold-italic))
+           (not (equal (face-property-instance face 'font domain)
+                       (face-property-instance unfrobbed-face 'font domain)))
+           (set-face-property face 'font (vector frobbed-face)
+                              the-locale))))))
+
+(defun make-face-bold (face &optional locale)
+  "Make FACE bold in LOCALE, if possible.
+This will attempt to make the font bold for X locales and will set the
+highlight flag for TTY locales.
+
+If LOCALE is nil, omitted, or `all', this will attempt to frob all
+font specifications for FACE to make them appear bold.  Similarly, if
+LOCALE is a locale type, this frobs all font specifications for locales
+of that type.  If LOCALE is a particular locale, what happens depends on
+what sort of locale is given.  If you gave a device, frame, or window,
+then it's always possible to determine what the font actually will be,
+so this is determined and the resulting font is frobbed and added back as a
+specification for this locale.  If LOCALE is a buffer, however, you can't
+determine what the font will actually be unless there's actually a
+specification given for that particular buffer (otherwise, it depends
+on what window and frame the buffer appears in, and might not even be
+well-defined if the buffer appears multiple times in different places);
+therefore you will get an error unless there's a specification for the
+buffer.
+
+Finally, in some cases (specifically, when LOCALE is not a locale type),
+if the frobbing didn't actually make the font look any different
+\(this happens, for example, if your font specification is already bold
+or has no bold equivalent), and currently looks like the font of the
+'default face, it is set to inherit from the 'bold face.  This is kludgy
+but it makes `make-face-bold' have more intuitive behavior in many
+circumstances."
+  (interactive (list (read-face-name "Make which face bold: ")))
+  (frob-face-font-2
+   face locale 'default 'bold
+   (lambda ()
+     ;; handle TTY specific entries
+     (when (featurep 'tty)
+       (set-face-highlight-p face t locale 'tty)))
+   (lambda ()
+     ;; handle X specific entries
+     (when (featurep 'x)
+       (frob-face-property face 'font 'x-make-font-bold locale))
+     (when (featurep 'mswindows)
+       (frob-face-property face 'font 'mswindows-make-font-bold locale))
+     )
+   '(([default] . [bold])
+     ([bold] . t)
+     ([italic] . [bold-italic])
+     ([bold-italic] . t))))
+
+(defun make-face-italic (face &optional locale)
+  "Make FACE italic in LOCALE, if possible.
+This will attempt to make the font italic for X locales and will set
+the underline flag for TTY locales.
+See `make-face-bold' for the semantics of the LOCALE argument and
+for more specifics on exactly how this function works."
+  (interactive (list (read-face-name "Make which face italic: ")))
+  (frob-face-font-2
+   face locale 'default 'italic
+   (lambda ()
+     ;; handle TTY specific entries
+     (when (featurep 'tty)
+       (set-face-underline-p face t locale 'tty)))
+   (lambda ()
+     ;; handle X specific entries
+     (when (featurep 'x)
+       (frob-face-property face 'font 'x-make-font-italic locale))
+     (when (featurep 'mswindows)
+       (frob-face-property face 'font 'mswindows-make-font-italic locale))
+     )
+   '(([default] . [italic])
+     ([bold] . [bold-italic])
+     ([italic] . t)
+     ([bold-italic] . t))))
+
+(defun make-face-bold-italic (face &optional locale)
+  "Make FACE bold and italic in LOCALE, if possible.
+This will attempt to make the font bold-italic for X locales and will
+set the highlight and underline flags for TTY locales.
+See `make-face-bold' for the semantics of the LOCALE argument and
+for more specifics on exactly how this function works."
+  (interactive (list (read-face-name "Make which face bold-italic: ")))
+  (frob-face-font-2
+   face locale 'default 'bold-italic
+   (lambda ()
+     ;; handle TTY specific entries
+     (when (featurep 'tty)
+       (set-face-highlight-p face t locale 'tty)
+       (set-face-underline-p face t locale 'tty)))
+   (lambda ()
+     ;; handle X specific entries
+     (when (featurep 'x)
+       (frob-face-property face 'font 'x-make-font-bold-italic locale))
+     (when (featurep 'mswindows)
+       (frob-face-property face 'font 'mswindows-make-font-bold-italic locale))
+     )
+   '(([default] . [italic])
+     ([bold] . [bold-italic])
+     ([italic] . [bold-italic])
+     ([bold-italic] . t))))
+
+(defun make-face-unbold (face &optional locale)
+  "Make FACE non-bold in LOCALE, if possible.
+This will attempt to make the font non-bold for X locales and will
+unset the highlight flag for TTY locales.
+See `make-face-bold' for the semantics of the LOCALE argument and
+for more specifics on exactly how this function works."
+  (interactive (list (read-face-name "Make which face non-bold: ")))
+  (frob-face-font-2
+   face locale 'bold 'default
+   (lambda ()
+     ;; handle TTY specific entries
+     (when (featurep 'tty)
+       (set-face-highlight-p face nil locale 'tty)))
+   (lambda ()
+     ;; handle X specific entries
+     (when (featurep 'x)
+       (frob-face-property face 'font 'x-make-font-unbold locale))
+     (when (featurep 'mswindows)
+       (frob-face-property face 'font 'mswindows-make-font-unbold locale))
+     )
+   '(([default] . t)
+     ([bold] . [default])
+     ([italic] . t)
+     ([bold-italic] . [italic]))))
+
+(defun make-face-unitalic (face &optional locale)
+  "Make FACE non-italic in LOCALE, if possible.
+This will attempt to make the font non-italic for X locales and will
+unset the underline flag for TTY locales.
+See `make-face-bold' for the semantics of the LOCALE argument and
+for more specifics on exactly how this function works."
+  (interactive (list (read-face-name "Make which face non-italic: ")))
+  (frob-face-font-2
+   face locale 'italic 'default
+   (lambda ()
+     ;; handle TTY specific entries
+     (when (featurep 'tty)
+       (set-face-underline-p face nil locale 'tty)))
+   (lambda ()
+     ;; handle X specific entries
+     (when (featurep 'x)
+       (frob-face-property face 'font 'x-make-font-unitalic locale))
+     (when (featurep 'mswindows)
+       (frob-face-property face 'font 'mswindows-make-font-unitalic locale))
+     )
+   '(([default] . t)
+     ([bold] . t)
+     ([italic] . [default])
+     ([bold-italic] . [bold]))))
+
+
+;; Why do the following two functions lose so badly in so many
+;; circumstances?
+
+(defun make-face-smaller (face &optional locale)
+  "Make the font of FACE be smaller, if possible.
+LOCALE works as in `make-face-bold' et al., but the ``inheriting-
+from-the-bold-face'' operations described there are not done
+because they don't make sense in this context."
+  (interactive (list (read-face-name "Shrink which face: ")))
+  ;; handle X specific entries
+  (when (featurep 'x)
+    (frob-face-property face 'font 'x-find-smaller-font locale))
+  (when (featurep 'mswindows)
+    (frob-face-property face 'font 'mswindows-find-smaller-font locale)))
+
+(defun make-face-larger (face &optional locale)
+  "Make the font of FACE be larger, if possible.
+See `make-face-smaller' for the semantics of the LOCALE argument."
+  (interactive (list (read-face-name "Enlarge which face: ")))
+  ;; handle X specific entries
+  (when (featurep 'x)
+    (frob-face-property face 'font 'x-find-larger-font locale))
+  (when (featurep 'mswindows)
+    (frob-face-property face 'font 'mswindows-find-larger-font locale)))
+
+(defun invert-face (face &optional locale)
+  "Swap the foreground and background colors of the face."
+  (interactive (list (read-face-name "Invert face: ")))
+  (if (valid-specifier-domain-p locale)
+      (let ((foreface (face-foreground-instance face locale)))
+       (set-face-foreground face (face-background-instance face locale)
+                            locale)
+       (set-face-background face foreface locale))
+    (let ((forespec (copy-specifier (face-foreground face) nil locale)))
+      (copy-specifier (face-background face) (face-foreground face) locale)
+      (copy-specifier forespec (face-background face) locale))))
+
+\f
+;;; Convenience functions
+
+(defun face-ascent (face &optional domain charset)
+  "Return the ascent of FACE in DOMAIN.
+See `face-property-instance' for the semantics of the DOMAIN argument."
+  (font-ascent (face-font face) domain charset))
+
+(defun face-descent (face &optional domain charset)
+  "Return the descent of FACE in DOMAIN.
+See `face-property-instance' for the semantics of the DOMAIN argument."
+  (font-descent (face-font face) domain charset))
+
+(defun face-width (face &optional domain charset)
+  "Return the width of FACE in DOMAIN.
+See `face-property-instance' for the semantics of the DOMAIN argument."
+  (font-width (face-font face) domain charset))
+
+(defun face-height (face &optional domain charset)
+  "Return the height of FACE in DOMAIN.
+See `face-property-instance' for the semantics of the DOMAIN argument."
+  (+ (face-ascent face domain charset) (face-descent face domain charset)))
+
+(defun face-proportional-p (face &optional domain charset)
+  "Return t if FACE is proportional in DOMAIN.
+See `face-property-instance' for the semantics of the DOMAIN argument."
+  (font-proportional-p (face-font face) domain charset))
+
+\f
+;; Functions that used to be in cus-face.el, but logically go here.
+
+(defcustom frame-background-mode nil
+  "*The brightness of the background.
+Set this to the symbol dark if your background color is dark, light if
+your background is light, or nil (default) if you want Emacs to
+examine the brightness for you."
+  :group 'faces
+  :type '(choice (choice-item dark)
+                (choice-item light)
+                (choice-item :tag "Auto" nil)))
+
+;; The old variable that many people still have in .emacs files.
+(define-obsolete-variable-alias 'custom-background-mode
+  'frame-background-mode)
+
+(defun get-frame-background-mode (frame)
+  "Detect background mode for FRAME."
+  (let* ((color-instance (face-background-instance 'default frame))
+        (mode (condition-case nil
+                  (if (< (apply '+ (color-instance-rgb-components
+                                    color-instance)) 65536)
+                      'dark 'light)
+                ;; Here, we get an error on a TTY.  As we don't have
+                ;; a good way of detecting whether a TTY is light or
+                ;; dark, we'll guess it's dark.
+                (error 'dark))))
+    (set-frame-property frame 'background-mode mode)
+    mode))
+
+(defun extract-custom-frame-properties (frame)
+  "Return a plist with the frame properties of FRAME used by custom."
+  (list 'type (or (frame-property frame 'display-type)
+                 (device-type (frame-device frame)))
+       'class (device-class (frame-device frame))
+       'background (or frame-background-mode
+                       (frame-property frame 'background-mode)
+                       (get-frame-background-mode frame))))
+
+(defcustom init-face-from-resources t
+  "If non nil, attempt to initialize faces from the resource database."
+  :group 'faces
+  :type 'boolean)
+
+;; Old name, used by custom.  Also, FSFmacs name.
+(defvaralias 'initialize-face-resources 'init-face-from-resources)
+
+(defun face-spec-set (face spec &optional frame)
+  "Set FACE's face attributes according to the first matching entry in SPEC.
+If optional FRAME is non-nil, set it for that frame only.
+If it is nil, then apply SPEC to each frame individually.
+See `defface' for information about SPEC."
+  (if frame
+      (progn
+       (reset-face face frame)
+       (face-display-set face spec frame)
+       (init-face-from-resources face frame))
+    (let ((frames (relevant-custom-frames)))
+      (reset-face face)
+      (face-display-set face spec)
+      (while frames
+       (face-display-set face spec (car frames))
+       (pop frames))
+      (init-face-from-resources face))))
+
+(defun face-display-set (face spec &optional frame)
+  "Set FACE to the attributes to the first matching entry in SPEC.
+Iff optional FRAME is non-nil, set it for that frame only.
+See `defface' for information about SPEC."
+  (while spec
+    (let ((display (caar spec))
+         (atts (cadar spec)))
+      (pop spec)
+      (when (face-spec-set-match-display display frame)
+       ;; Avoid creating frame local duplicates of the global face.
+       (unless (and frame (eq display (get face 'custom-face-display)))
+         (apply 'face-custom-attributes-set face frame atts))
+       (unless frame
+         (put face 'custom-face-display display))
+       (setq spec nil)))))
+
+(defvar default-custom-frame-properties nil
+  "The frame properties used for the global faces.
+Frames not matching these propertiess should have frame local faces.
+The value should be nil, if uninitialized, or a plist otherwise.
+See `defface' for a list of valid keys and values for the plist.")
+
+(defun get-custom-frame-properties (&optional frame)
+  "Return a plist with the frame properties of FRAME used by custom.
+If FRAME is nil, return the default frame properties."
+  (cond (frame
+        ;; Try to get from cache.
+        (let ((cache (frame-property frame 'custom-properties)))
+          (unless cache
+            ;; Oh well, get it then.
+            (setq cache (extract-custom-frame-properties frame))
+            ;; and cache it...
+            (set-frame-property frame 'custom-properties cache))
+          cache))
+       ;; We avoid this cache, because various frame and device
+       ;; properties can change.
+       ;;(default-custom-frame-properties)
+       (t
+        (setq default-custom-frame-properties
+              (extract-custom-frame-properties (selected-frame))))))
+
+(defun face-spec-set-match-display (display &optional frame)
+  "Return non-nil if DISPLAY matches FRAME.
+DISPLAY is part of a spec such as can be used in `defface'.
+If FRAME is nil or omitted, the selected frame is used."
+  (if (eq display t)
+      t
+    (let* ((props (get-custom-frame-properties frame))
+          (type (plist-get props 'type))
+          (class (plist-get props 'class))
+          (background (plist-get props 'background))
+          (match t)
+          (entries display)
+          entry req options)
+      (while (and entries match)
+       (setq entry (car entries)
+             entries (cdr entries)
+             req (car entry)
+             options (cdr entry)
+             match (case req
+                     (type       (memq type options))
+                     (class      (memq class options))
+                     (background (memq background options))
+                     (t (warn "Unknown req `%S' with options `%S'"
+                              req options)
+                        nil))))
+      match)))
+
+(defun relevant-custom-frames ()
+  "List of frames whose custom properties differ from the default."
+  (let ((relevant nil)
+       (default (get-custom-frame-properties))
+       (frames (frame-list))
+       frame)
+    (while frames
+      (setq frame (car frames)
+           frames (cdr frames))
+      (unless (equal default (get-custom-frame-properties frame))
+       (push frame relevant)))
+    relevant))
+
+(defun initialize-custom-faces (&optional frame)
+  "Initialize all custom faces for FRAME.
+If FRAME is nil or omitted, initialize them for all frames."
+  (mapc (lambda (symbol)
+         (let ((spec (or (get symbol 'saved-face)
+                         (get symbol 'face-defface-spec))))
+           (when spec
+             ;; No need to init-face-from-resources -- code in
+             ;; `init-frame-faces' does it already.
+             (face-display-set symbol spec frame))))
+       (face-list)))
+
+(defun custom-initialize-frame (frame)
+  "Initialize frame-local custom faces for FRAME if necessary."
+  (unless (equal (get-custom-frame-properties)
+                (get-custom-frame-properties frame))
+    (initialize-custom-faces frame)))
+
+\f
+(defun make-empty-face (name &optional doc-string temporary)
+  "Like `make-face', but doesn't query the resource database."
+  (let ((init-face-from-resources nil))
+    (make-face name doc-string temporary)))
+
+(defun init-face-from-resources (face &optional locale)
+  "Initialize FACE from the resource database.
+If LOCALE is specified, it should be a frame, device, or 'global, and
+the face will be resourced over that locale.  Otherwise, the face will
+be resourced over all possible locales (i.e. all frames, all devices,
+and 'global)."
+  (cond ((null init-face-from-resources)
+        ;; Do nothing.
+        )
+       ((not locale)
+        ;; Global, set for all frames.
+        (progn
+          (init-face-from-resources face 'global)
+          (let ((devices (device-list)))
+            (while devices
+              (init-face-from-resources face (car devices))
+              (setq devices (cdr devices))))
+          (let ((frames (frame-list)))
+            (while frames
+              (init-face-from-resources face (car frames))
+              (setq frames (cdr frames))))))
+       (t
+        ;; Specific.
+        (let ((devtype (cond ((devicep locale) (device-type locale))
+                             ((framep locale) (frame-type locale))
+                             (t nil))))
+          (cond ((or (and (not devtype) (featurep 'x)) (eq 'x devtype))
+                 (x-init-face-from-resources face locale))
+                ((or (not devtype) (eq 'tty devtype))
+                 ;; Nothing to do for TTYs?
+                 ))))))
+
+(defun init-device-faces (device)
+  ;; First, add any device-local face resources.
+  (when init-face-from-resources
+    (loop for face in (face-list) do
+         (init-face-from-resources face device))
+    ;; Then do any device-specific initialization.
+    (cond ((eq 'x (device-type device))
+          (x-init-device-faces device))
+         ((eq 'mswindows (device-type device))
+          (mswindows-init-device-faces device))
+         ;; Nothing to do for TTYs?
+         )
+    (init-other-random-faces device)))
+
+(defun init-frame-faces (frame)
+  (when init-face-from-resources
+    ;; First, add any frame-local face resources.
+    (loop for face in (face-list) do
+         (init-face-from-resources face frame))
+    ;; Then do any frame-specific initialization.
+    (cond ((eq 'x (frame-type frame))
+          (x-init-frame-faces frame))
+         ((eq 'mswindows (frame-type frame))
+          (mswindows-init-frame-faces frame))
+         ;; Is there anything which should be done for TTY's?
+         )))
+
+;; #### This is somewhat X-specific, and is called when the first
+;; X device is created (even if there were TTY devices created
+;; beforehand).  The concept of resources has not been generalized
+;; outside of X-specificness, so we have to live with this
+;; breach of device-independence.
+
+(defun init-global-faces ()
+  ;; Look for global face resources.
+  (loop for face in (face-list) do
+       (init-face-from-resources face 'global))
+  ;; Further X frobbing.
+  (x-init-global-faces)
+  ;; for bold and the like, make the global specification be bold etc.
+  ;; if the user didn't already specify a value.  These will also be
+  ;; frobbed further in init-other-random-faces.
+  (unless (face-font 'bold 'global)
+    (make-face-bold 'bold 'global))
+  ;;
+  (unless (face-font 'italic 'global)
+    (make-face-italic 'italic 'global))
+  ;;
+  (unless (face-font 'bold-italic 'global)
+    (make-face-bold-italic 'bold-italic 'global)
+    (unless (face-font 'bold-italic 'global)
+      (copy-face 'bold 'bold-italic)
+      (make-face-italic 'bold-italic)))
+
+  (when (face-equal 'bold 'bold-italic)
+    (copy-face 'italic 'bold-italic)
+    (make-face-bold 'bold-italic))
+  ;;
+  ;; Nothing more to be done for X or TTY's?
+  )
+
+
+;; These warnings are there for a reason.  Just specify your fonts
+;; correctly.  Deal with it.  Additionally, one can use
+;; `log-warning-minimum-level' instead of this.
+;(defvar inhibit-font-complaints nil
+;  "Whether to suppress complaints about incomplete sets of fonts.")
+
+(defun face-complain-about-font (face device)
+  (if (symbolp face) (setq face (symbol-name face)))
+;;  (if (not inhibit-font-complaints)
+  (display-warning
+   'font
+   (let ((default-name (face-font-name 'default device)))
+     (format "%s: couldn't deduce %s %s version of the font
+%S.
+
+Please specify X resources to make the %s face
+visually distinguishable from the default face.
+For example, you could add one of the following to $HOME/Emacs:
+
+Emacs.%s.attributeFont: -dt-*-medium-i-*
+or
+Emacs.%s.attributeForeground: hotpink\n"
+             invocation-name
+             (if (string-match "\\`[aeiouAEIOU]" face) "an" "a")
+             face
+             default-name
+             face
+             face
+             face
+             ))))
+
+
+;; #### This is quite a mess.  We should use the custom mechanism for
+;; most of this stuff.  Currently we don't do it, because Custom
+;; doesn't use specifiers (yet.)  FSF does it the Right Way.
+
+;; For instance, the definition of `bold' should be something like
+;; (defface bold ((t (:bold t))) "Bold text.") -- and `:bold t' should
+;; make sure that everything works properly.
+
+(defun init-other-random-faces (device)
+  "Initialize the colors and fonts of the bold, italic, bold-italic,
+zmacs-region, list-mode-item-selected, highlight, primary-selection,
+secondary-selection, and isearch faces when each device is created.  If
+you want to add code to do stuff like this, use the create-device-hook."
+
+  ;; try to make 'bold look different from the default on this device.
+  ;; If that doesn't work at all, then issue a warning.
+  (unless (face-differs-from-default-p 'bold device)
+    (make-face-bold 'bold device)
+    (unless (face-differs-from-default-p 'bold device)
+      (make-face-unbold 'bold device)
+      (unless (face-differs-from-default-p 'bold device)
+       ;; the luser specified one of the bogus font names
+       (face-complain-about-font 'bold device))))
+
+  ;; Similar for italic.
+  ;; It's unreasonable to expect to be able to make a font italic all
+  ;; the time.  For many languages, italic is an alien concept.
+  ;; Basically, because italic is not a globally meaningful concept,
+  ;; the use of the italic face should really be oboleted.
+
+  ;; I disagree with above.  In many languages, the concept of capital
+  ;; letters is just as alien, and yet we use them.  Italic is here to
+  ;; stay.  -hniksic
+
+  ;; In a Solaris Japanese environment, there just aren't any italic
+  ;; fonts - period.  CDE recognizes this reality, and fonts
+  ;; -dt-interface user-medium-r-normal-*-*-*-*-*-*-*-*-* don't come
+  ;; in italic versions.  So we first try to make the font bold before
+  ;; complaining.
+  (unless (face-differs-from-default-p 'italic device)
+    (make-face-italic 'italic device)
+    (unless (face-differs-from-default-p 'italic device)
+      (make-face-bold 'italic device)
+      (unless (face-differs-from-default-p 'italic device)
+       (face-complain-about-font 'italic device))))
+
+  ;; similar for bold-italic.
+  (unless (face-differs-from-default-p 'bold-italic device)
+    (make-face-bold-italic 'bold-italic device)
+    ;; if we couldn't get a bold-italic version, try just bold.
+    (unless (face-differs-from-default-p 'bold-italic device)
+      (make-face-bold 'bold-italic device)
+      ;; if we couldn't get bold or bold-italic, then that's probably because
+      ;; the default font is bold, so make the `bold-italic' face be unbold.
+      (unless (face-differs-from-default-p 'bold-italic device)
+       (make-face-unbold 'bold-italic device)
+       (make-face-italic 'bold-italic device)
+       (unless (face-differs-from-default-p 'bold-italic device)
+         ;; if that didn't work, try plain italic
+         ;; (can this ever happen? what the hell.)
+         (make-face-italic 'bold-italic device)
+         (unless (face-differs-from-default-p 'bold-italic device)
+           ;; then bitch and moan.
+           (face-complain-about-font 'bold-italic device))))))
+
+  ;; Set the text-cursor colors unless already specified.
+  (when (and (not (eq 'tty (device-type device)))
+            (not (face-background 'text-cursor 'global))
+            (face-property-equal 'text-cursor 'default 'background device))
+    (set-face-background 'text-cursor [default foreground] 'global
+                        nil 'append))
+  (when (and (not (eq 'tty (device-type device)))
+            (not (face-foreground 'text-cursor 'global))
+            (face-property-equal 'text-cursor 'default 'foreground device))
+    (set-face-foreground 'text-cursor [default background] 'global
+                        nil 'append))
+  )
+
+;; New function with 20.1, suggested by Per Abrahamsen, coded by Kyle Jones.
+(defun set-face-stipple (face pixmap &optional frame)
+  "Change the stipple pixmap of FACE to PIXMAP.
+This is an Emacs compatibility function; consider using
+set-face-background-pixmap instead.
+
+PIXMAP should be a string, the name of a file of pixmap data.
+The directories listed in the `x-bitmap-file-path' variable are searched.
+
+Alternatively, PIXMAP may be a list of the form (WIDTH HEIGHT
+DATA) where WIDTH and HEIGHT are the size in pixels, and DATA is
+a string, containing the raw bits of the bitmap.  XBM data is
+expected in this case, other types of image data will not work.
+
+If the optional FRAME argument is provided, change only
+in that frame; otherwise change each frame."
+  (while (not (find-face face))
+    (setq face (signal 'wrong-type-argument (list 'facep face))))
+  (locate-file pixmap x-bitmap-file-path ".xbm:" 4)
+  (while (cond ((stringp pixmap)
+               (unless (file-readable-p pixmap)
+                 (setq pixmap `[xbm :file ,pixmap]))
+               nil)
+              ((and (consp pixmap) (= (length pixmap) 3))
+               (setq pixmap `[xbm :data ,pixmap])
+               nil)
+              (t t))
+    (setq pixmap (signal 'wrong-type-argument
+                        (list 'stipple-pixmap-p pixmap))))
+  (while (and frame (not (framep frame)))
+    (setq frame (signal 'wrong-type-argument (list 'framep frame))))
+  (set-face-background-pixmap face pixmap frame))
+
+\f
+;; Create the remaining standard faces now.  This way, packages that we dump
+;; can reference these faces as parents.
+;;
+;; The default, modeline, left-margin, right-margin, text-cursor,
+;; and pointer faces are created in C.
+
+(make-face 'bold "Bold text.")
+(make-face 'italic "Italic text.")
+(make-face 'bold-italic "Bold-italic text.")
+(make-face 'underline "Underlined text.")
+(or (face-differs-from-default-p 'underline)
+    (set-face-underline-p 'underline t 'global '(default)))
+(make-face 'zmacs-region "Used on highlightes region between point and mark.")
+(make-face 'isearch "Used on region matched by isearch.")
+(make-face 'list-mode-item-selected
+          "Face for the selected list item in list-mode.")
+(make-face 'highlight "Highlight face.")
+(make-face 'primary-selection "Primary selection face.")
+(make-face 'secondary-selection "Secondary selection face.")
+
+;; Several useful color faces.
+(eval-when-compile (load "cl-macs"))
+(dolist (color '(red green blue yellow))
+  (make-face color (concat (symbol-name color) " text."))
+  (set-face-foreground color (symbol-name color) nil 'color))
+
+;; Make some useful faces.  This happens very early, before creating
+;; the first non-stream device.
+
+(set-face-background 'text-cursor
+                    '(((x default) . "Red3")
+                      ((mswindows default) . "Red3"))
+                    'global)
+
+;; some older X servers don't recognize "darkseagreen2"
+(set-face-background 'highlight
+                    '(((x default color) . "darkseagreen2")
+                      ((x default color) . "green")
+                      ((x default grayscale) . "gray53")
+                      ((mswindows default color) . "darkseagreen2")
+                      ((mswindows default color) . "green")
+                      ((mswindows default grayscale) . "gray53"))
+                    'global)
+(set-face-background-pixmap 'highlight
+                           '(((x default mono) . "gray1")
+                             ((mswindows default mono) . "gray1"))
+                           'global)
+
+(set-face-background 'zmacs-region
+                    '(((x default color) . "gray65")
+                      ((x default grayscale) . "gray65")
+                      ((mswindows default color) . "gray65")
+                      ((mswindows default grayscale) . "gray65"))
+                    'global)
+(set-face-background-pixmap 'zmacs-region
+                           '(((x default mono) . "gray3")
+                             ((mswindows default mono) . "gray3"))
+                           'global)
+
+(set-face-background 'list-mode-item-selected
+                    '(((x default color) . "gray68")
+                      ((x default grayscale) . "gray68")
+                      ((x default mono) . [default foreground])
+                      ((mswindows default color) . "gray68")
+                      ((mswindows default grayscale) . "gray68")
+                      ((mswindows default mono) . [default foreground]))
+                    'global)
+(set-face-foreground 'list-mode-item-selected
+                    '(((x default mono) . [default background])
+                      ((mswindows default mono) . [default background]))
+                    'global)
+
+(set-face-background 'primary-selection
+                    '(((x default color) . "gray65")
+                      ((x default grayscale) . "gray65")
+                      ((mswindows default color) . "gray65")
+                      ((mswindows default grayscale) . "gray65"))
+                    'global)
+(set-face-background-pixmap 'primary-selection
+                           '(((x default mono) . "gray3")
+                             ((mswindows default mono) . "gray3"))
+                           'global)
+
+(set-face-background 'secondary-selection
+                    '(((x default color) . "paleturquoise")
+                      ((x default color) . "green")
+                      ((x default grayscale) . "gray53")
+                      ((mswindows default color) . "paleturquoise")
+                      ((mswindows default color) . "green")
+                      ((mswindows default grayscale) . "gray53"))
+                    'global)
+(set-face-background-pixmap 'secondary-selection
+                           '(((x default mono) . "gray1")
+                             ((mswindows default mono) . "gray1"))
+                           'global)
+
+(set-face-background 'isearch
+                    '(((x default color) . "paleturquoise")
+                      ((x default color) . "green")
+                      ((mswindows default color) . "paleturquoise")
+                      ((mswindows default color) . "green"))
+                    'global)
+
+;; Define some logical color names to be used when reading the pixmap files.
+(if (featurep 'xpm)
+    (setq xpm-color-symbols
+         (list
+          (purecopy '("foreground" (face-foreground 'default)))
+          (purecopy '("background" (face-background 'default)))
+          (purecopy '("backgroundToolBarColor"
+                      (or
+                       (and 
+                        (featurep 'x)
+                        (x-get-resource "backgroundToolBarColor"
+                                        "BackgroundToolBarColor" 'string))
+
+                       (face-background 'toolbar))))
+          (purecopy '("foregroundToolBarColor"
+                      (or
+                       (and 
+                        (featurep 'x)
+                        (x-get-resource "foregroundToolBarColor"
+                                        "ForegroundToolBarColor" 'string))
+                       (face-foreground 'toolbar))))
+          )))
+
+(when (featurep 'tty)
+  (set-face-highlight-p 'bold                    t 'global '(default tty))
+  (set-face-underline-p 'italic                  t 'global '(default tty))
+  (set-face-highlight-p 'bold-italic             t 'global '(default tty))
+  (set-face-underline-p 'bold-italic             t 'global '(default tty))
+  (set-face-highlight-p 'highlight               t 'global '(default tty))
+  (set-face-reverse-p   'text-cursor             t 'global '(default tty))
+  (set-face-reverse-p   'modeline                t 'global '(default tty))
+  (set-face-reverse-p   'zmacs-region            t 'global '(default tty))
+  (set-face-reverse-p   'primary-selection       t 'global '(default tty))
+  (set-face-underline-p 'secondary-selection     t 'global '(default tty))
+  (set-face-reverse-p   'list-mode-item-selected t 'global '(default tty))
+  (set-face-reverse-p   'isearch                 t 'global '(default tty))
+  )
+
+;;; faces.el ends here
diff --git a/lisp/files-nomule.el b/lisp/files-nomule.el
new file mode 100644 (file)
index 0000000..cab09cc
--- /dev/null
@@ -0,0 +1,96 @@
+;;; files-nomule.el --- file I/O stubs when not under Mule.
+
+;; Copyright (C) 1985-1987, 1992-1994, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1995 Sun Microsystems.
+
+;; Maintainer: XEmacs Development Team
+;; Keywords: extensions, dumped
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: FSF 19.34 (files.el).   (Is it?  Please check)
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs (when Mule is not compiled in).
+
+;; These stubs were moved from the bottom of files.el.
+
+;;; Code:
+
+(defun insert-file-contents (filename &optional visit beg end replace)
+  "Insert contents of file FILENAME after point.
+Returns list of absolute file name and length of data inserted.
+If second argument VISIT is non-nil, the buffer's visited filename
+and last save file modtime are set, and it is marked unmodified.
+If visiting and the file does not exist, visiting is completed
+before the error is signaled.
+
+The optional third and fourth arguments BEG and END
+specify what portion of the file to insert.
+If VISIT is non-nil, BEG and END must be nil.
+If optional fifth argument REPLACE is non-nil,
+it means replace the current buffer contents (in the accessible portion)
+with the file contents.  This is better than simply deleting and inserting
+the whole thing because (1) it preserves some marker positions
+and (2) it puts less data in the undo list."
+  (insert-file-contents-internal filename visit beg end replace nil nil))
+
+(defun write-region (start end filename &optional append visit lockname coding-system)
+  "Write current region into specified file.
+By default, the file's existing contents are replaced by the specified region.
+When called from a program, takes three arguments:
+START, END and FILENAME.  START and END are buffer positions.
+Optional fourth argument APPEND if non-nil means
+  append to existing file contents (if any).
+Optional fifth argument VISIT if t means
+  set the last-save-file-modtime of buffer to this file's modtime
+  and mark buffer not modified.
+If VISIT is a string, it is a second file name;
+  the output goes to FILENAME, but the buffer is marked as visiting VISIT.
+  VISIT is also the file name to lock and unlock for clash detection.
+If VISIT is neither t nor nil nor a string,
+  that means do not print the \"Wrote file\" message.
+The optional sixth arg LOCKNAME, if non-nil, specifies the name to
+  use for locking and unlocking, overriding FILENAME and VISIT.
+Kludgy feature: if START is a string, then that string is written
+to the file, instead of any buffer contents, and END is ignored.
+Optional seventh argument CODING-SYSTEM is meaningful only if support
+  for Mule is present in XEmacs and specifies the coding system
+  used to encode the text when it is written out, and defaults to
+  the value of `buffer-file-coding-system' in the current buffer.
+  When Mule support is not present, the CODING-SYSTEM argument is
+  ignored."
+  (interactive "r\nFWrite region to file: ")
+  (write-region-internal start end filename append visit lockname nil))
+
+(defun load (file &optional noerror nomessage nosuffix)
+  "Execute a file of Lisp code named FILE.
+First try FILE with `.elc' appended, then try with `.el',
+ then try FILE unmodified.
+This function searches the directories in `load-path'.
+If optional second arg NOERROR is non-nil,
+ report no error if FILE doesn't exist.
+Print messages at start and end of loading unless
+ optional third arg NOMESSAGE is non-nil (ignored in -batch mode).
+If optional fourth arg NOSUFFIX is non-nil, don't try adding
+ suffixes `.elc' or `.el' to the specified name FILE.
+Return t if file exists."
+  (load-internal file noerror nomessage nosuffix nil nil))
+
+;;; files-nomule.el ends here
diff --git a/lisp/files.el b/lisp/files.el
new file mode 100644 (file)
index 0000000..591648d
--- /dev/null
@@ -0,0 +1,3291 @@
+;;; files.el --- file input and output commands for XEmacs.
+
+;; Copyright (C) 1985-1987, 1992-1995, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1995 Sun Microsystems.
+
+;; Maintainer: XEmacs Development Team
+;; Keywords: extensions, dumped
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc. 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: FSF 20.3 (but diverging)
+;;; Warning: Merging this file is tough.  Beware.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; Defines most of XEmacs's file- and directory-handling functions,
+;; including basic file visiting, backup generation, link handling,
+;; ITS-id version control, load- and write-hook handling, and the like.
+
+;;; Code:
+
+;; XEmacs: Avoid compilation warnings.
+(defvar coding-system-for-read)
+(defvar buffer-file-coding-system)
+
+(defgroup files nil
+  "Support editing files."
+  :group 'emacs)
+
+(defgroup backup nil
+  "Backups of edited data files."
+  :group 'files)
+
+(defgroup find-file nil
+  "Finding and editing files."
+  :group 'files)
+
+
+;; XEmacs: In buffer.c
+;(defconst delete-auto-save-files t
+;  "*Non-nil means delete auto-save file when a buffer is saved or killed.")
+
+;; FSF has automount-dir-prefix.  Our directory-abbrev-alist is more general.
+;; note: tmp_mnt bogosity conversion is established in paths.el.
+(defcustom directory-abbrev-alist nil
+  "*Alist of abbreviations for file directories.
+A list of elements of the form (FROM . TO), each meaning to replace
+FROM with TO when it appears in a directory name.
+This replacement is done when setting up the default directory of a
+newly visited file.  *Every* FROM string should start with \\\\` or ^.
+
+Use this feature when you have directories which you normally refer to
+via absolute symbolic links or to eliminate automounter mount points
+from the beginning of your filenames.  Make TO the name of the link,
+and FROM the name it is linked to."
+  :type '(repeat (cons :format "%v"
+                      :value ("\\`" . "")
+                      (regexp :tag "From")
+                      (regexp :tag "To")))
+  :group 'find-file)
+
+;;; Turn off backup files on VMS since it has version numbers.
+(defcustom make-backup-files (not (eq system-type 'vax-vms))
+  "*Non-nil means make a backup of a file the first time it is saved.
+This can be done by renaming the file or by copying.
+
+Renaming means that XEmacs renames the existing file so that it is a
+backup file, then writes the buffer into a new file.  Any other names
+that the old file had will now refer to the backup file.  The new file
+is owned by you and its group is defaulted.
+
+Copying means that XEmacs copies the existing file into the backup
+file, then writes the buffer on top of the existing file.  Any other
+names that the old file had will now refer to the new (edited) file.
+The file's owner and group are unchanged.
+
+The choice of renaming or copying is controlled by the variables
+`backup-by-copying', `backup-by-copying-when-linked' and
+`backup-by-copying-when-mismatch'.  See also `backup-inhibited'."
+  :type 'boolean
+  :group 'backup)
+
+;; Do this so that local variables based on the file name
+;; are not overridden by the major mode.
+(defvar backup-inhibited nil
+  "Non-nil means don't make a backup, regardless of the other parameters.
+This variable is intended for use by making it local to a buffer.
+But it is local only if you make it local.")
+(put 'backup-inhibited 'permanent-local t)
+
+(defcustom backup-by-copying nil
+ "*Non-nil means always use copying to create backup files.
+See documentation of variable `make-backup-files'."
+ :type 'boolean
+ :group 'backup)
+
+(defcustom backup-by-copying-when-linked nil
+ "*Non-nil means use copying to create backups for files with multiple names.
+This causes the alternate names to refer to the latest version as edited.
+This variable is relevant only if `backup-by-copying' is nil."
+ :type 'boolean
+ :group 'backup)
+
+(defcustom backup-by-copying-when-mismatch nil
+  "*Non-nil means create backups by copying if this preserves owner or group.
+Renaming may still be used (subject to control of other variables)
+when it would not result in changing the owner or group of the file;
+that is, for files which are owned by you and whose group matches
+the default for a new file created there by you.
+This variable is relevant only if `backup-by-copying' is nil."
+  :type 'boolean
+  :group 'backup)
+
+(defvar backup-enable-predicate
+  #'(lambda (name)
+     (not (or (null name)
+             (string-match "^/tmp/" name)
+             (let ((tmpdir (temp-directory)))
+               (and tmpdir
+                    (string-match (concat "\\`" (regexp-quote tmpdir) "/")
+                                  tmpdir))))))
+  "Predicate that looks at a file name and decides whether to make backups.
+Called with an absolute file name as argument, it returns t to enable backup.")
+
+(defcustom buffer-offer-save nil
+  "*Non-nil in a buffer means offer to save the buffer on exit
+even if the buffer is not visiting a file.
+Automatically local in all buffers."
+  :type 'boolean
+  :group 'find-file)
+(make-variable-buffer-local 'buffer-offer-save)
+
+;; FSF uses normal defconst
+(defvaralias 'find-file-visit-truename 'find-file-use-truenames)
+(defvaralias 'find-file-existing-other-name 'find-file-compare-truenames)
+
+(defcustom revert-without-query nil
+  "*Specify which files should be reverted without query.
+The value is a list of regular expressions.
+If the file name matches one of these regular expressions,
+then `revert-buffer' reverts the file without querying
+if the file has changed on disk and you have not edited the buffer."
+  :type '(repeat (regexp ""))
+  :group 'find-file)
+
+(defvar buffer-file-number nil
+  "The device number and file number of the file visited in the current buffer.
+The value is a list of the form (FILENUM DEVNUM).
+This pair of numbers uniquely identifies the file.
+If the buffer is visiting a new file, the value is nil.")
+(make-variable-buffer-local 'buffer-file-number)
+(put 'buffer-file-number 'permanent-local t)
+
+(defvar buffer-file-numbers-unique (not (memq system-type '(windows-nt)))
+  "Non-nil means that buffer-file-number uniquely identifies files.")
+
+(defcustom file-precious-flag nil
+  "*Non-nil means protect against I/O errors while saving files.
+Some modes set this non-nil in particular buffers.
+
+This feature works by writing the new contents into a temporary file
+and then renaming the temporary file to replace the original.
+In this way, any I/O error in writing leaves the original untouched,
+and there is never any instant where the file is nonexistent.
+
+Note that this feature forces backups to be made by copying.
+Yet, at the same time, saving a precious file
+breaks any hard links between it and other files."
+  :type 'boolean
+  :group 'backup)
+
+(defcustom version-control nil
+  "*Control use of version numbers for backup files.
+t means make numeric backup versions unconditionally.
+nil means make them for files that have some already.
+`never' means do not make them."
+  :type 'boolean
+  :group 'backup
+  :group 'vc)
+
+;; This is now defined in efs.
+;(defvar dired-kept-versions 2
+;  "*When cleaning directory, number of versions to keep.")
+
+(defcustom delete-old-versions nil
+  "*If t, delete excess backup versions silently.
+If nil, ask confirmation.  Any other value prevents any trimming."
+  :type '(choice (const :tag "Delete" t)
+                 (const :tag "Ask" nil)
+                 (sexp :tag "Leave" :format "%t\n" other))
+  :group 'backup)
+
+(defcustom kept-old-versions 2
+  "*Number of oldest versions to keep when a new numbered backup is made."
+  :type 'integer
+  :group 'backup)
+
+(defcustom kept-new-versions 2
+  "*Number of newest versions to keep when a new numbered backup is made.
+Includes the new backup.  Must be > 0"
+  :type 'integer
+  :group 'backup)
+
+(defcustom require-final-newline nil
+  "*Value of t says silently ensure a file ends in a newline when it is saved.
+Non-nil but not t says ask user whether to add a newline when there isn't one.
+nil means don't add newlines."
+  :type '(choice (const :tag "Off" nil)
+                (const :tag "Add" t)
+                (sexp :tag "Ask" :format "%t\n" ask))
+  :group 'editing-basics)
+
+(defcustom auto-save-default t
+  "*Non-nil says by default do auto-saving of every file-visiting buffer."
+  :type 'boolean
+  :group 'auto-save)
+
+(defcustom auto-save-visited-file-name nil
+  "*Non-nil says auto-save a buffer in the file it is visiting, when practical.
+Normally auto-save files are written under other names."
+  :type 'boolean
+  :group 'auto-save)
+
+(defcustom save-abbrevs nil
+  "*Non-nil means save word abbrevs too when files are saved.
+Loading an abbrev file sets this to t."
+  :type 'boolean
+  :group 'abbrev)
+
+(defcustom find-file-run-dired t
+  "*Non-nil says run dired if `find-file' is given the name of a directory."
+  :type 'boolean
+  :group 'find-file)
+
+;;;It is not useful to make this a local variable.
+;;;(put 'find-file-not-found-hooks 'permanent-local t)
+(defvar find-file-not-found-hooks nil
+  "List of functions to be called for `find-file' on nonexistent file.
+These functions are called as soon as the error is detected.
+`buffer-file-name' is already set up.
+The functions are called in the order given until one of them returns non-nil.")
+
+;;;It is not useful to make this a local variable.
+;;;(put 'find-file-hooks 'permanent-local t)
+(defvar find-file-hooks nil
+  "List of functions to be called after a buffer is loaded from a file.
+The buffer's local variables (if any) will have been processed before the
+functions are called.")
+
+(defvar write-file-hooks nil
+  "List of functions to be called before writing out a buffer to a file.
+If one of them returns non-nil, the file is considered already written
+and the rest are not called.
+These hooks are considered to pertain to the visited file.
+So this list is cleared if you change the visited file name.
+See also `write-contents-hooks' and `continue-save-buffer'.")
+;;; However, in case someone does make it local...
+(put 'write-file-hooks 'permanent-local t)
+
+(defvar local-write-file-hooks nil
+  "Just like `write-file-hooks', except intended for per-buffer use.
+The functions in this list are called before the ones in
+`write-file-hooks'.
+
+This variable is meant to be used for hooks that have to do with a
+particular visited file.  Therefore, it is a permanent local, so that
+changing the major mode does not clear it.  However, calling
+`set-visited-file-name' does clear it.")
+(make-variable-buffer-local 'local-write-file-hooks)
+(put 'local-write-file-hooks 'permanent-local t)
+
+
+;; #### think about this (added by Sun).
+(put 'after-set-visited-file-name-hooks 'permanent-local t)
+(defvar after-set-visited-file-name-hooks nil
+  "List of functions to be called after \\[set-visited-file-name]
+or during \\[write-file].
+You can use this hook to restore local values of write-file-hooks,
+after-save-hook, and revert-buffer-function, which pertain
+to a specific file and therefore are normally killed by a rename.
+Put hooks pertaining to the buffer contents on write-contents-hooks
+and revert-buffer-insert-file-contents-function.")
+
+(defvar write-contents-hooks nil
+  "List of functions to be called before writing out a buffer to a file.
+If one of them returns non-nil, the file is considered already written
+and the rest are not called.
+These hooks are considered to pertain to the buffer's contents,
+not to the particular visited file; thus, `set-visited-file-name' does
+not clear this variable, but changing the major mode does clear it.
+See also `write-file-hooks' and `continue-save-buffer'.")
+
+;;  XEmacs addition
+;;  Energize needed this to hook into save-buffer at a lower level; we need
+;;  to provide a new output method, but don't want to have to duplicate all
+;;  of the backup file and file modes logic.that does not occur if one uses
+;;  a write-file-hook which returns non-nil.
+(put 'write-file-data-hooks 'permanent-local t)
+(defvar write-file-data-hooks nil
+  "List of functions to be called to put the bytes on disk.
+These functions receive the name of the file to write to as argument.
+The default behavior is to call
+  (write-region (point-min) (point-max) filename nil t)
+If one of them returns non-nil, the file is considered already written
+and the rest are not called.
+These hooks are considered to pertain to the visited file.
+So this list is cleared if you change the visited file name.
+See also `write-file-hooks'.")
+
+(defcustom enable-local-variables t
+  "*Control use of local-variables lists in files you visit.
+The value can be t, nil or something else.
+A value of t means local-variables lists are obeyed;
+nil means they are ignored; anything else means query.
+
+The command \\[normal-mode] always obeys local-variables lists
+and ignores this variable."
+  :type '(choice (const :tag "Obey" t)
+                (const :tag "Ignore" nil)
+                (sexp :tag "Query" :format "%t\n" other))
+  :group 'find-file)
+
+(defcustom enable-local-eval 'maybe
+  "*Control processing of the \"variable\" `eval' in a file's local variables.
+The value can be t, nil or something else.
+A value of t means obey `eval' variables;
+nil means ignore them; anything else means query.
+
+The command \\[normal-mode] always obeys local-variables lists
+and ignores this variable."
+  :type '(choice (const :tag "Obey" t)
+                (const :tag "Ignore" nil)
+                (sexp :tag "Query" :format "%t\n" other))
+  :group 'find-file)
+
+;; Avoid losing in versions where CLASH_DETECTION is disabled.
+(or (fboundp 'lock-buffer)
+    (defalias 'lock-buffer 'ignore))
+(or (fboundp 'unlock-buffer)
+    (defalias 'unlock-buffer 'ignore))
+\f
+;;FSFmacs bastardized ange-ftp cruft
+;; This hook function provides support for ange-ftp host name
+;; completion.  It runs the usual ange-ftp hook, but only for
+;; completion operations.  Having this here avoids the need
+;; to load ange-ftp when it's not really in use.
+;(defun ange-ftp-completion-hook-function (op &rest args)
+;  (if (memq op '(file-name-completion file-name-all-completions))
+;      (apply 'ange-ftp-hook-function op args)
+;    (let ((inhibit-file-name-handlers
+;         (cons 'ange-ftp-completion-hook-function
+;               (and (eq inhibit-file-name-operation op)
+;                    inhibit-file-name-handlers)))
+;        (inhibit-file-name-operation op))
+;      (apply op args))
+
+(defun convert-standard-filename (filename)
+  "Convert a standard file's name to something suitable for the current OS.
+This function's standard definition is trivial; it just returns the argument.
+However, on some systems, the function is redefined
+with a definition that really does change some file names."
+  filename)
+\f
+(defun pwd ()
+  "Show the current default directory."
+  (interactive nil)
+  (message "Directory %s" default-directory))
+
+(defvar cd-path nil
+  "Value of the CDPATH environment variable, as a list.
+Not actually set up until the first time you use it.")
+
+(defvar cdpath-previous nil
+  "Prior value of the CDPATH environment variable.")
+
+(defun parse-colon-path (cd-path)
+  "Explode a colon-separated search path into a list of directory names.
+
+If you think you want to use this, you probably don't.  This function
+is provided for backward compatibility.  A more robust implementation
+of the same functionality is available as `split-path', which see."
+  (and cd-path
+       (let (cd-list (cd-start 0) cd-colon)
+        (setq cd-path (concat cd-path path-separator))
+        (while (setq cd-colon (string-match path-separator cd-path cd-start))
+          (setq cd-list
+                (nconc cd-list
+                       (list (if (= cd-start cd-colon)
+                                  nil
+                               (substitute-in-file-name
+                                (file-name-as-directory
+                                 (substring cd-path cd-start cd-colon)))))))
+          (setq cd-start (+ cd-colon 1)))
+        cd-list)))
+
+(defun cd-absolute (dir)
+  "Change current directory to given absolute file name DIR."
+  ;; Put the name into directory syntax now,
+  ;; because otherwise expand-file-name may give some bad results.
+  (if (not (eq system-type 'vax-vms))
+      (setq dir (file-name-as-directory dir)))
+  ;; XEmacs change: stig@hackvan.com
+  (if find-file-use-truenames
+      (setq dir (file-truename dir)))
+  (setq dir (abbreviate-file-name (expand-file-name dir)))
+  (cond ((not (file-directory-p dir))
+         (error "%s is not a directory" dir))
+       ;; this breaks ange-ftp, which doesn't (can't?) overload `file-executable-p'.
+        ;;((not (file-executable-p dir))
+        ;; (error "Cannot cd to %s:  Permission denied" dir))
+        (t
+         (setq default-directory dir))))
+
+(defun cd (dir)
+  "Make DIR become the current buffer's default directory.
+If your environment includes a `CDPATH' variable, try each one of that
+colon-separated list of directories when resolving a relative directory name."
+  (interactive
+   ;; XEmacs change? (read-file-name => read-directory-name)
+   (list (read-directory-name "Change default directory: "
+                             default-directory default-directory
+                             (and (member cd-path '(nil ("./")))
+                                  (null (getenv "CDPATH"))))))
+  (if (file-name-absolute-p dir)
+      (cd-absolute (expand-file-name dir))
+    ;; XEmacs
+    (unless (and cd-path (equal (getenv "CDPATH") cdpath-previous))
+      ;;#### Unix-specific
+      (let ((trypath (parse-colon-path
+                     (setq cdpath-previous (getenv "CDPATH")))))
+       (setq cd-path (or trypath (list "./")))))
+    (or (catch 'found
+         (mapcar #'(lambda (x)
+                       (let ((f (expand-file-name (concat x dir))))
+                         (if (file-directory-p f)
+                             (progn
+                               (cd-absolute f)
+                               (throw 'found t)))))
+                 cd-path)
+         nil)
+       ;; jwz: give a better error message to those of us with the
+       ;; good taste not to use a kludge like $CDPATH.
+       (if (equal cd-path '("./"))
+           (error "No such directory: %s" (expand-file-name dir))
+         (error "Directory not found in $CDPATH: %s" dir)))))
+
+(defun load-file (file)
+  "Load the Lisp file named FILE."
+  (interactive "fLoad file: ")
+  (load (expand-file-name file) nil nil t))
+
+; We now dump utils/lib-complete.el which has improved versions of this.
+;(defun load-library (library)
+;  "Load the library named LIBRARY.
+;This is an interface to the function `load'."
+;  (interactive "sLoad library: ")
+;  (load library))
+;
+;(defun find-library (library)
+;  "Find the library of Lisp code named LIBRARY.
+;This searches `load-path' for a file named either \"LIBRARY\" or \"LIBRARY.el\"."
+;  (interactive "sFind library file: ")
+;  (let ((f (locate-file library load-path ":.el:")))
+;    (if f
+;        (find-file f)
+;        (error "Couldn't locate library %s" library))))
+
+(defun file-local-copy (file &optional buffer)
+  "Copy the file FILE into a temporary file on this machine.
+Returns the name of the local copy, or nil, if FILE is directly
+accessible."
+  (let ((handler (find-file-name-handler file 'file-local-copy)))
+    (if handler
+       (funcall handler 'file-local-copy file)
+      nil)))
+
+;; XEmacs change block
+; We have this in C and use the realpath() system call.
+
+;(defun file-truename (filename &optional counter prev-dirs)
+; [... lots of code snipped ...]
+;    filename))
+
+;; XEmacs addition.  Called from `insert-file-contents-internal'
+;; at the appropriate time.
+(defun compute-buffer-file-truename (&optional buffer)
+  "Recompute BUFFER's value of `buffer-file-truename'
+based on the current value of `buffer-file-name'.
+BUFFER defaults to the current buffer if unspecified."
+  (save-excursion
+    (set-buffer (or buffer (current-buffer)))
+    (cond ((null buffer-file-name)
+          (setq buffer-file-truename nil))
+         ((setq buffer-file-truename (file-truename buffer-file-name))
+          ;; it exists, we're done.
+          nil)
+         (t
+          ;; the file doesn't exist, but maybe the directory does.
+          (let* ((dir (file-name-directory buffer-file-name))
+                 (truedir (file-truename dir)))
+            (if truedir (setq dir truedir))
+            (setq buffer-file-truename
+                  (expand-file-name (file-name-nondirectory buffer-file-name)
+                                    dir)))))
+    (if (and find-file-use-truenames buffer-file-truename)
+       (setq buffer-file-name (abbreviate-file-name buffer-file-truename)
+             default-directory (file-name-directory buffer-file-name)))
+    buffer-file-truename))
+;; End XEmacs change block
+
+(defun file-chase-links (filename)
+  "Chase links in FILENAME until a name that is not a link.
+Does not examine containing directories for links,
+unlike `file-truename'."
+  (let (tem (count 100) (newname filename))
+    (while (setq tem (file-symlink-p newname))
+      (save-match-data
+       (if (= count 0)
+           (error "Apparent cycle of symbolic links for %s" filename))
+       ;; In the context of a link, `//' doesn't mean what XEmacs thinks.
+       (while (string-match "//+" tem)
+         (setq tem (concat (substring tem 0 (1+ (match-beginning 0)))
+                           (substring tem (match-end 0)))))
+       ;; Handle `..' by hand, since it needs to work in the
+       ;; target of any directory symlink.
+       ;; This code is not quite complete; it does not handle
+       ;; embedded .. in some cases such as ./../foo and foo/bar/../../../lose.
+       (while (string-match "\\`\\.\\./" tem) ;#### Unix specific
+         (setq tem (substring tem 3))
+         (setq newname (file-name-as-directory
+                        ;; Do the .. by hand.
+                        (directory-file-name
+                         (file-name-directory
+                          ;; Chase links in the default dir of the symlink.
+                          (file-chase-links
+                           (directory-file-name
+                            (file-name-directory newname))))))))
+       (setq newname (expand-file-name tem (file-name-directory newname)))
+       (setq count (1- count))))
+    newname))
+\f
+(defun switch-to-other-buffer (arg)
+  "Switch to the previous buffer.  With a numeric arg, n, switch to the nth
+most recent buffer.  With an arg of 0, buries the current buffer at the
+bottom of the buffer stack."
+  (interactive "p")
+  (if (eq arg 0)
+      (bury-buffer (current-buffer)))
+  (switch-to-buffer
+   (if (<= arg 1) (other-buffer (current-buffer))
+     (nth (1+ arg) (buffer-list)))))
+
+(defun switch-to-buffer-other-window (buffer)
+  "Select buffer BUFFER in another window."
+  (interactive "BSwitch to buffer in other window: ")
+  (let ((pop-up-windows t))
+    ;; XEmacs: this used to have (selected-frame) as the third argument,
+    ;; but this is obnoxious.  If the user wants the buffer in a
+    ;; different frame, then it should be this way.
+
+    ;; Change documented above undone --mrb
+    (pop-to-buffer buffer t (selected-frame))))
+
+(defun switch-to-buffer-other-frame (buffer)
+  "Switch to buffer BUFFER in a newly-created frame."
+  (interactive "BSwitch to buffer in other frame: ")
+  (let* ((name (get-frame-name-for-buffer buffer))
+        (frame (make-frame (if name
+                                 (list (cons 'name (symbol-name name)))))))
+    (pop-to-buffer buffer t frame)
+    (make-frame-visible frame)
+    buffer))
+
+(defun find-file (filename &optional codesys)
+  "Edit file FILENAME.
+Switch to a buffer visiting file FILENAME,
+creating one if none already exists.
+Under XEmacs/Mule, optional second argument specifies the
+coding system to use when decoding the file.  Interactively,
+with a prefix argument, you will be prompted for the coding system."
+  (interactive "FFind file: \nZCoding system: ")
+  (if codesys
+      (let ((coding-system-for-read
+            (get-coding-system codesys)))
+       (switch-to-buffer (find-file-noselect filename)))
+    (switch-to-buffer (find-file-noselect filename))))
+
+(defun find-file-other-window (filename &optional codesys)
+  "Edit file FILENAME, in another window.
+May create a new window, or reuse an existing one.
+See the function `display-buffer'.
+Under XEmacs/Mule, optional second argument specifies the
+coding system to use when decoding the file.  Interactively,
+with a prefix argument, you will be prompted for the coding system."
+  (interactive "FFind file in other window: \nZCoding system: ")
+  (if codesys
+      (let ((coding-system-for-read
+            (get-coding-system codesys)))
+       (switch-to-buffer-other-window (find-file-noselect filename)))
+    (switch-to-buffer-other-window (find-file-noselect filename))))
+
+(defun find-file-other-frame (filename &optional codesys)
+  "Edit file FILENAME, in a newly-created frame.
+Under XEmacs/Mule, optional second argument specifies the
+coding system to use when decoding the file.  Interactively,
+with a prefix argument, you will be prompted for the coding system."
+  (interactive "FFind file in other frame: \nZCoding system: ")
+  (if codesys
+      (let ((coding-system-for-read
+            (get-coding-system codesys)))
+       (switch-to-buffer-other-frame (find-file-noselect filename)))
+    (switch-to-buffer-other-frame (find-file-noselect filename))))
+
+(defun find-file-read-only (filename &optional codesys)
+  "Edit file FILENAME but don't allow changes.
+Like \\[find-file] but marks buffer as read-only.
+Use \\[toggle-read-only] to permit editing.
+Under XEmacs/Mule, optional second argument specifies the
+coding system to use when decoding the file.  Interactively,
+with a prefix argument, you will be prompted for the coding system."
+  (interactive "fFind file read-only: \nZCoding system: ")
+  (if codesys
+      (let ((coding-system-for-read
+            (get-coding-system codesys)))
+       (find-file filename))
+    (find-file filename))
+  (setq buffer-read-only t)
+  (current-buffer))
+
+(defun find-file-read-only-other-window (filename &optional codesys)
+  "Edit file FILENAME in another window but don't allow changes.
+Like \\[find-file-other-window] but marks buffer as read-only.
+Use \\[toggle-read-only] to permit editing.
+Under XEmacs/Mule, optional second argument specifies the
+coding system to use when decoding the file.  Interactively,
+with a prefix argument, you will be prompted for the coding system."
+  (interactive "fFind file read-only other window: \nZCoding system: ")
+  (if codesys
+      (let ((coding-system-for-read
+            (get-coding-system codesys)))
+       (find-file-other-window filename))
+    (find-file-other-window filename))
+  (setq buffer-read-only t)
+  (current-buffer))
+
+(defun find-file-read-only-other-frame (filename &optional codesys)
+  "Edit file FILENAME in another frame but don't allow changes.
+Like \\[find-file-other-frame] but marks buffer as read-only.
+Use \\[toggle-read-only] to permit editing.
+Under XEmacs/Mule, optional second argument specifies the
+coding system to use when decoding the file.  Interactively,
+with a prefix argument, you will be prompted for the coding system."
+  (interactive "fFind file read-only other frame: \nZCoding system: ")
+  (if codesys
+      (let ((coding-system-for-read
+            (get-coding-system codesys)))
+       (find-file-other-frame filename))
+    (find-file-other-frame filename))
+  (setq buffer-read-only t)
+  (current-buffer))
+
+(defun find-alternate-file-other-window (filename &optional codesys)
+  "Find file FILENAME as a replacement for the file in the next window.
+This command does not select that window.
+Under XEmacs/Mule, optional second argument specifies the
+coding system to use when decoding the file.  Interactively,
+with a prefix argument, you will be prompted for the coding system."
+  (interactive
+   (save-selected-window
+     (other-window 1)
+     (let ((file buffer-file-name)
+          (file-name nil)
+          (file-dir nil))
+       (and file
+           (setq file-name (file-name-nondirectory file)
+                 file-dir (file-name-directory file)))
+       (list (read-file-name
+             "Find alternate file: " file-dir nil nil file-name)
+            (if (and current-prefix-arg (featurep 'mule))
+                (read-coding-system "Coding-system: "))))))
+  (if (one-window-p)
+      (find-file-other-window filename)
+    (save-selected-window
+      (other-window 1)
+      (find-alternate-file filename codesys))))
+
+(defun find-alternate-file (filename &optional codesys)
+  "Find file FILENAME, select its buffer, kill previous buffer.
+If the current buffer now contains an empty file that you just visited
+\(presumably by mistake), use this command to visit the file you really want.
+Under XEmacs/Mule, optional second argument specifies the
+coding system to use when decoding the file.  Interactively,
+with a prefix argument, you will be prompted for the coding system."
+  (interactive
+   (let ((file buffer-file-name)
+        (file-name nil)
+        (file-dir nil))
+     (and file
+         (setq file-name (file-name-nondirectory file)
+               file-dir (file-name-directory file)))
+     (list (read-file-name
+           "Find alternate file: " file-dir nil nil file-name)
+          (if (and current-prefix-arg (featurep 'mule))
+              (read-coding-system "Coding-system: ")))))
+  (and (buffer-modified-p) (buffer-file-name)
+       ;; (not buffer-read-only)
+       (not (yes-or-no-p (format
+                         "Buffer %s is modified; kill anyway? "
+                         (buffer-name))))
+       (error "Aborted"))
+  (let ((obuf (current-buffer))
+       (ofile buffer-file-name)
+       (onum buffer-file-number)
+       (otrue buffer-file-truename)
+       (oname (buffer-name)))
+    (if (get-buffer " **lose**")
+       (kill-buffer " **lose**"))
+    (rename-buffer " **lose**")
+    (setq buffer-file-name nil)
+    (setq buffer-file-number nil)
+    (setq buffer-file-truename nil)
+    (unwind-protect
+       (progn
+         (unlock-buffer)
+         (if codesys
+             (let ((coding-system-for-read
+                    (get-coding-system codesys)))
+               (find-file filename))
+           (find-file filename)))
+      (cond ((eq obuf (current-buffer))
+            (setq buffer-file-name ofile)
+            (setq buffer-file-number onum)
+            (setq buffer-file-truename otrue)
+            (lock-buffer)
+            (rename-buffer oname))))
+    (or (eq (current-buffer) obuf)
+       (kill-buffer obuf))))
+
+(defun create-file-buffer (filename)
+  "Create a suitably named buffer for visiting FILENAME, and return it.
+FILENAME (sans directory) is used unchanged if that name is free;
+otherwise a string <2> or <3> or ... is appended to get an unused name."
+    (let ((handler (find-file-name-handler filename 'create-file-buffer)))
+      (if handler
+         (funcall handler 'create-file-buffer filename)
+       (let ((lastname (file-name-nondirectory filename)))
+         (if (string= lastname "")
+             (setq lastname filename))
+         (generate-new-buffer lastname)))))
+
+(defun generate-new-buffer (name)
+  "Create and return a buffer with a name based on NAME.
+Choose the buffer's name using `generate-new-buffer-name'."
+  (get-buffer-create (generate-new-buffer-name name)))
+
+(defvar abbreviated-home-dir nil
+  "The user's homedir abbreviated according to `directory-abbrev-alist'.")
+
+(defun abbreviate-file-name (filename &optional hack-homedir)
+  "Return a version of FILENAME shortened using `directory-abbrev-alist'.
+See documentation of variable `directory-abbrev-alist' for more information.
+If optional argument HACK-HOMEDIR is non-nil, then this also substitutes
+\"~\" for the user's home directory."
+  (let ((handler (find-file-name-handler filename 'abbreviate-file-name)))
+    (if handler
+       (funcall handler 'abbreviate-file-name filename hack-homedir)
+      ;; Get rid of the prefixes added by the automounter.
+      ;;(if (and (string-match automount-dir-prefix filename)
+      ;;         (file-exists-p (file-name-directory
+      ;;                         (substring filename (1- (match-end 0))))))
+      ;;    (setq filename (substring filename (1- (match-end 0)))))
+      (let ((tail directory-abbrev-alist))
+       ;; If any elt of directory-abbrev-alist matches this name,
+       ;; abbreviate accordingly.
+       (while tail
+         (if (string-match (car (car tail)) filename)
+             (setq filename
+                   (concat (cdr (car tail)) (substring filename (match-end 0)))))
+         (setq tail (cdr tail))))
+      (if hack-homedir
+         (progn
+           ;; Compute and save the abbreviated homedir name.
+           ;; We defer computing this until the first time it's needed, to
+           ;; give time for directory-abbrev-alist to be set properly.
+           ;; We include a slash at the end, to avoid spurious matches
+           ;; such as `/usr/foobar' when the home dir is `/usr/foo'.
+           (or abbreviated-home-dir
+               (setq abbreviated-home-dir
+                     (let ((abbreviated-home-dir "$foo"))
+                       (concat "\\`" (regexp-quote (abbreviate-file-name
+                                                    (expand-file-name "~")))
+                               "\\(/\\|\\'\\)"))))
+           ;; If FILENAME starts with the abbreviated homedir,
+           ;; make it start with `~' instead.
+           (if (and (string-match abbreviated-home-dir filename)
+                    ;; If the home dir is just /, don't change it.
+                    (not (and (= (match-end 0) 1) ;#### unix-specific
+                              (= (aref filename 0) ?/)))
+                    (not (and (or (eq system-type 'ms-dos)
+                                  (eq system-type 'windows-nt))
+                              (save-match-data
+                                (string-match "^[a-zA-Z]:/$" filename)))))
+               (setq filename
+                     (concat "~"
+                             (substring filename
+                                        (match-beginning 1) (match-end 1))
+                             (substring filename (match-end 0)))))))
+      filename)))
+
+(defcustom find-file-not-true-dirname-list nil
+  "*List of logical names for which visiting shouldn't save the true dirname.
+On VMS, when you visit a file using a logical name that searches a path,
+you may or may not want the visited file name to record the specific
+directory where the file was found.  If you *do not* want that, add the logical
+name to this list as a string."
+  :type '(repeat (string :tag "Name"))
+  :group 'find-file)
+
+;; This function is needed by FSF vc.el.  I hope somebody can make it
+;; work for XEmacs.  -sb.
+;; #### In what way does it not work?  --hniksic
+(defun find-buffer-visiting (filename)
+  "Return the buffer visiting file FILENAME (a string).
+This is like `get-file-buffer', except that it checks for any buffer
+visiting the same file, possibly under a different name.
+If there is no such live buffer, return nil."
+  (let ((buf (get-file-buffer filename))
+       (truename (abbreviate-file-name (file-truename filename))))
+    (or buf
+       (let ((list (buffer-list)) found)
+         (while (and (not found) list)
+           (save-excursion
+             (set-buffer (car list))
+             (if (and buffer-file-name
+                      (string= buffer-file-truename truename))
+                 (setq found (car list))))
+           (setq list (cdr list)))
+         found)
+       (let ((number (nthcdr 10 (file-attributes truename)))
+             (list (buffer-list)) found)
+         (and buffer-file-numbers-unique
+              number
+              (while (and (not found) list)
+                (save-excursion
+                  (set-buffer (car list))
+                  (if (and buffer-file-number
+                           (equal buffer-file-number number)
+                           ;; Verify this buffer's file number
+                           ;; still belongs to its file.
+                           (file-exists-p buffer-file-name)
+                           (equal (nthcdr 10 (file-attributes buffer-file-name))
+                                  number))
+                      (setq found (car list))))
+                (setq list (cdr list))))
+         found))))
+
+(defun insert-file-contents-literally (filename &optional visit beg end replace)
+  "Like `insert-file-contents', q.v., but only reads in the file.
+A buffer may be modified in several ways after reading into the buffer due
+to advanced Emacs features, such as file-name-handlers, format decoding,
+find-file-hooks, etc.
+  This function ensures that none of these modifications will take place."
+  (let ((file-name-handler-alist nil)
+       (format-alist nil)
+       (after-insert-file-functions nil)
+       (find-buffer-file-type-function
+        (if (fboundp 'find-buffer-file-type)
+            (symbol-function 'find-buffer-file-type)
+          nil)))
+    (unwind-protect
+       (progn
+         (fset 'find-buffer-file-type (lambda (filename) t))
+         (insert-file-contents filename visit beg end replace))
+      (if find-buffer-file-type-function
+         (fset 'find-buffer-file-type find-buffer-file-type-function)
+       (fmakunbound 'find-buffer-file-type)))))
+
+(defun find-file-noselect (filename &optional nowarn rawfile)
+  "Read file FILENAME into a buffer and return the buffer.
+If a buffer exists visiting FILENAME, return that one, but
+verify that the file has not changed since visited or saved.
+The buffer is not selected, just returned to the caller.
+If NOWARN is non-nil, warning messages will be suppressed.
+If RAWFILE is non-nil, the file is read literally."
+  (setq filename (abbreviate-file-name (expand-file-name filename)))
+  (if (file-directory-p filename)
+      (if (and (fboundp 'dired-noselect) find-file-run-dired)
+         (dired-noselect (if find-file-use-truenames
+                             (abbreviate-file-name (file-truename filename))
+                           filename))
+       (error "%s is a directory" filename))
+    (let* ((buf (get-file-buffer filename))
+          (truename (abbreviate-file-name (file-truename filename)))
+          (number (nthcdr 10 (file-attributes truename)))
+;         ;; Find any buffer for a file which has same truename.
+;         (other (and (not buf) (find-buffer-visiting filename)))
+           (error nil))
+
+;     ;; Let user know if there is a buffer with the same truename.
+;      (if (and (not buf) same-truename (not nowarn))
+;        (message "%s and %s are the same file (%s)"
+;                 filename (buffer-file-name same-truename)
+;                 truename)
+;      (if (and (not buf) same-number (not nowarn))
+;        (message "%s and %s are the same file"
+;                 filename (buffer-file-name same-number))))
+;      ;; Optionally also find that buffer.
+;      (if (or find-file-existing-other-name find-file-visit-truename)
+;        (setq buf (or same-truename same-number)))
+
+      (when (and buf
+                (or find-file-compare-truenames find-file-use-truenames)
+                (not nowarn))
+       (save-excursion
+         (set-buffer buf)
+         (if (not (string-equal buffer-file-name filename))
+             (message "%s and %s are the same file (%s)"
+                      filename buffer-file-name
+                      buffer-file-truename))))
+
+      (if buf
+         (or nowarn
+             (verify-visited-file-modtime buf)
+             (cond ((not (file-exists-p filename))
+                    (error "File %s no longer exists!" filename))
+                   ;; Certain files should be reverted automatically
+                   ;; if they have changed on disk and not in the buffer.
+                   ((and (not (buffer-modified-p buf))
+                         (dolist (rx revert-without-query nil)
+                           (when (string-match rx filename)
+                             (return t))))
+                    (with-current-buffer buf
+                      (message "Reverting file %s..." filename)
+                      (revert-buffer t t)
+                      (message "Reverting file %s... done" filename)))
+                   ((yes-or-no-p
+                     (if (string= (file-name-nondirectory filename)
+                                  (buffer-name buf))
+                         (format
+                          (if (buffer-modified-p buf)
+       (gettext "File %s changed on disk.  Discard your edits? ")
+       (gettext "File %s changed on disk.  Reread from disk? "))
+                          (file-name-nondirectory filename))
+                       (format
+                        (if (buffer-modified-p buf)
+      (gettext "File %s changed on disk.  Discard your edits in %s? ")
+      (gettext "File %s changed on disk.  Reread from disk into %s? "))
+                        (file-name-nondirectory filename)
+                        (buffer-name buf))))
+                    (with-current-buffer buf
+                      (revert-buffer t t)))))
+       ;; Else: we must create a new buffer for filename
+       (save-excursion
+;;; The truename stuff makes this obsolete.
+;;;      (let* ((link-name (car (file-attributes filename)))
+;;;             (linked-buf (and (stringp link-name)
+;;;                              (get-file-buffer link-name))))
+;;;        (if (bufferp linked-buf)
+;;;            (message "Symbolic link to file in buffer %s"
+;;;                     (buffer-name linked-buf))))
+         (setq buf (create-file-buffer filename))
+         (set-buffer-major-mode buf)
+         (set-buffer buf)
+         (erase-buffer)
+         (if rawfile
+             (condition-case ()
+                 (insert-file-contents-literally filename t)
+               (file-error
+                (when (and (file-exists-p filename)
+                           (not (file-readable-p filename)))
+                  (kill-buffer buf)
+                  (signal 'file-error (list "File is not readable" filename)))
+                ;; Unconditionally set error
+                (setq error t)))
+           (condition-case ()
+               (insert-file-contents filename t)
+             (file-error
+              (when (and (file-exists-p filename)
+                         (not (file-readable-p filename)))
+                (kill-buffer buf)
+                (signal 'file-error (list "File is not readable" filename)))
+              ;; Run find-file-not-found-hooks until one returns non-nil.
+              (or (run-hook-with-args-until-success 'find-file-not-found-hooks)
+                  ;; If they fail too, set error.
+                  (setq error t)))))
+         ;; Find the file's truename, and maybe use that as visited name.
+         ;; automatically computed in XEmacs, unless jka-compr was used!
+         (unless buffer-file-truename
+           (setq buffer-file-truename truename))
+         (setq buffer-file-number number)
+         ;; On VMS, we may want to remember which directory in a search list
+         ;; the file was found in.
+         (and (eq system-type 'vax-vms)
+              (let (logical)
+                (if (string-match ":" (file-name-directory filename))
+                    (setq logical (substring (file-name-directory filename)
+                                             0 (match-beginning 0))))
+                (not (member logical find-file-not-true-dirname-list)))
+              (setq buffer-file-name buffer-file-truename))
+         (and find-file-use-truenames
+              ;; This should be in C.  Put pathname abbreviations that have
+              ;; been explicitly requested back into the pathname.  Most
+              ;; importantly, strip out automounter /tmp_mnt directories so
+              ;; that auto-save will work
+              (setq buffer-file-name (abbreviate-file-name buffer-file-name)))
+         ;; Set buffer's default directory to that of the file.
+         (setq default-directory (file-name-directory buffer-file-name))
+         ;; Turn off backup files for certain file names.  Since
+         ;; this is a permanent local, the major mode won't eliminate it.
+         (and (not (funcall backup-enable-predicate buffer-file-name))
+              (progn
+                (make-local-variable 'backup-inhibited)
+                (setq backup-inhibited t)))
+         (if rawfile
+             ;; #### FSF 20.3 sets buffer-file-coding-system to
+             ;; `no-conversion' here.  Should we copy?  It also makes
+             ;; `find-file-literally' a local variable and sets it to t.
+             nil
+           (after-find-file error (not nowarn))
+           (setq buf (current-buffer)))))
+      buf)))
+\f
+;; FSF has `insert-file-literally' and `find-file-literally' here.
+
+(defvar after-find-file-from-revert-buffer nil)
+
+(defun after-find-file (&optional error warn noauto
+                                 after-find-file-from-revert-buffer
+                                 nomodes)
+  "Called after finding a file and by the default revert function.
+Sets buffer mode, parses local variables.
+Optional args ERROR, WARN, and NOAUTO: ERROR non-nil means there was an
+error in reading the file.  WARN non-nil means warn if there
+exists an auto-save file more recent than the visited file.
+NOAUTO means don't mess with auto-save mode.
+Fourth arg AFTER-FIND-FILE-FROM-REVERT-BUFFER non-nil
+ means this call was from `revert-buffer'.
+Fifth arg NOMODES non-nil means don't alter the file's modes.
+Finishes by calling the functions in `find-file-hooks'."
+  (setq buffer-read-only (not (file-writable-p buffer-file-name)))
+  (if noninteractive
+      nil
+    (let* (not-serious
+          (msg
+           (cond ((and error (file-attributes buffer-file-name))
+                  (setq buffer-read-only t)
+                  (gettext "File exists, but cannot be read."))
+                 ((not buffer-read-only)
+                  (if (and warn
+                           (file-newer-than-file-p (make-auto-save-file-name)
+                                                   buffer-file-name))
+                      (format "%s has auto save data; consider M-x recover-file"
+                              (file-name-nondirectory buffer-file-name))
+                    (setq not-serious t)
+                    (if error (gettext "(New file)") nil)))
+                 ((not error)
+                  (setq not-serious t)
+                  (gettext "Note: file is write protected"))
+                 ((file-attributes (directory-file-name default-directory))
+                  (gettext "File not found and directory write-protected"))
+                 ((file-exists-p (file-name-directory buffer-file-name))
+                  (setq buffer-read-only nil))
+                 (t
+                  ;; If the directory the buffer is in doesn't exist,
+                  ;; offer to create it.  It's better to do this now
+                  ;; than when we save the buffer, because we want
+                  ;; autosaving to work.
+                  (setq buffer-read-only nil)
+                  ;; XEmacs
+                  (or (file-exists-p (file-name-directory buffer-file-name))
+                      (condition-case nil
+                          (if (yes-or-no-p
+                               (format
+                                "\
+The directory containing %s does not exist.  Create? "
+                                (abbreviate-file-name buffer-file-name)))
+                              (make-directory (file-name-directory
+                                               buffer-file-name)
+                                              t))
+                        (quit
+                         (kill-buffer (current-buffer))
+                         (signal 'quit nil))))
+                  nil))))
+      (if msg
+         (progn
+           (message "%s" msg)
+           (or not-serious (sit-for 1 t)))))
+    (if (and auto-save-default (not noauto))
+       (auto-save-mode t)))
+  (unless nomodes
+    (normal-mode t)
+    (run-hooks 'find-file-hooks)))
+
+(defun normal-mode (&optional find-file)
+  "Choose the major mode for this buffer automatically.
+Also sets up any specified local variables of the file.
+Uses the visited file name, the -*- line, and the local variables spec.
+
+This function is called automatically from `find-file'.  In that case,
+we may set up specified local variables depending on the value of
+`enable-local-variables': if it is t, we do; if it is nil, we don't;
+otherwise, we query.  `enable-local-variables' is ignored if you
+run `normal-mode' explicitly."
+  (interactive)
+  (or find-file (funcall (or default-major-mode 'fundamental-mode)))
+  (and (condition-case err
+           (progn (set-auto-mode)
+                  t)
+         (error (message "File mode specification error: %s"
+                         (prin1-to-string err))
+                nil))
+       (condition-case err
+           (hack-local-variables (not find-file))
+         (error (lwarn 'local-variables 'warning
+                 "File local-variables error: %s"
+                 (error-message-string err))))))
+
+;; #### This variable sucks in the package model.  There should be a
+;; way for new packages to add their entries to auto-mode-alist in a
+;; clean way.  Per Abrahamsen suggested splitting auto-mode-alist to
+;; several distinct variables such as, in order of precedence,
+;; `user-auto-mode-alist' for users, `package-auto-mode-alist' for
+;; packages and `auto-mode-alist' (which might also be called
+;; `default-auto-mode-alist') for default stuff, such as some of the
+;; entries below.
+
+(defvar auto-mode-alist
+  '(("\\.te?xt\\'" . text-mode)
+    ("\\.[ch]\\'" . c-mode)
+    ("\\.el\\'" . emacs-lisp-mode)
+    ("\\.\\([CH]\\|cc\\|hh\\)\\'" . c++-mode)
+    ("\\.[ch]\\(pp\\|xx\\|\\+\\+\\)\\'" . c++-mode)
+    ("\\.java\\'" . java-mode)
+    ("\\.idl\\'" . idl-mode)
+    ("\\.f\\(or\\)?\\'" . fortran-mode)
+    ("\\.F\\(OR\\)?\\'" . fortran-mode)
+    ("\\.[fF]90\\'" . f90-mode)
+;;; Less common extensions come here
+;;; so more common ones above are found faster.
+    ("\\.p[lm]\\'" . perl-mode)
+    ("\\.py\\'" . python-mode)
+    ("\\.texi\\(nfo\\)?\\'" . texinfo-mode)
+    ("\\.ad[abs]\\'" . ada-mode)
+    ("\\.c?l\\(i?sp\\)?\\'" . lisp-mode)
+    ("\\.p\\(as\\)?\\'" . pascal-mode)
+    ("\\.ltx\\'" . latex-mode)
+    ("\\.[sS]\\'" . asm-mode)
+    ("[Cc]hange.?[Ll]og?\\(.[0-9]+\\)?\\'" . change-log-mode)
+    ("\\$CHANGE_LOG\\$\\.TXT" . change-log-mode)
+    ("\\.scm?\\(?:\\.[0-9]*\\)?\\'" . scheme-mode)
+    ("\\.e\\'" . eiffel-mode)
+    ("\\.mss\\'" . scribe-mode)
+    ("\\.m\\([mes]\\|an\\)\\'" . nroff-mode)
+    ("\\.icn\\'" . icon-mode)
+    ("\\.\\([ckz]?sh\\|shar\\)\\'" . sh-mode)
+    ;; #### Unix-specific!
+    ("/\\.\\(bash_\\|z\\)?\\(profile\\|login\||logout\\)\\'" . sh-mode)
+    ("/\\.\\([ckz]sh\\|bash\\|tcsh\\|es\\|xinit\\|startx\\)rc\\'" . sh-mode)
+    ("/\\.\\([kz]shenv\\|xsession\\)\\'" . sh-mode)
+    ;; The following come after the ChangeLog pattern for the sake of
+    ;; ChangeLog.1, etc. and after the .scm.[0-9] pattern too.
+    ("\\.[12345678]\\'" . nroff-mode)
+    ("\\.[tT]e[xX]\\'" . tex-mode)
+    ("\\.\\(sty\\|cls\\|bbl\\)\\'" . latex-mode)
+    ("\\.bib\\'" . bibtex-mode)
+    ("\\.article\\'" . text-mode)
+    ("\\.letter\\'" . text-mode)
+    ("\\.\\(tcl\\|exp\\)\\'" . tcl-mode)
+    ("\\.wrl\\'" . vrml-mode)
+    ("\\.awk\\'" . awk-mode)
+    ("\\.prolog\\'" . prolog-mode)
+    ("\\.tar\\'" . tar-mode)
+    ("\\.\\(arc\\|zip\\|lzh\\|zoo\\)\\'" . archive-mode)
+    ;; Mailer puts message to be edited in /tmp/Re.... or Message
+    ;; #### Unix-specific!
+    ("\\`/tmp/Re" . text-mode)
+    ("/Message[0-9]*\\'" . text-mode)
+    ("/drafts/[0-9]+\\'" . mh-letter-mode)
+    ;; some news reader is reported to use this
+    ("^/tmp/fol/" . text-mode)
+    ("\\.y\\'" . c-mode)
+    ("\\.lex\\'" . c-mode)
+    ("\\.m\\'" . objc-mode)
+    ("\\.oak\\'" . scheme-mode)
+    ("\\.s?html?\\'" . html-mode)
+    ("\\.htm?l?3\\'" . html3-mode)
+    ("\\.\\(sgml?\\|dtd\\)\\'" . sgml-mode)
+    ("\\.c?ps\\'" . postscript-mode)
+    ;; .emacs following a directory delimiter in either Unix or
+    ;; Windows syntax.
+    ("[/\\][._].*emacs\\'" . emacs-lisp-mode)
+    ("\\.m4\\'" . autoconf-mode)
+    ("configure\\.in\\'" . autoconf-mode)
+    ("\\.ml\\'" . lisp-mode)
+    ("\\.ma?k\\'" . makefile-mode)
+    ("[Mm]akefile\\(\\.\\|\\'\\)" . makefile-mode)
+    ("\\.X\\(defaults\\|environment\\|resources\\|modmap\\)\\'" . xrdb-mode)
+    ;; #### The following three are Unix-specific (but do we care?)
+    ("/app-defaults/" . xrdb-mode)
+    ("\\.[^/]*wm\\'" . winmgr-mode)
+    ("\\.[^/]*wm2?rc" . winmgr-mode)
+    ("\\.[Jj][Pp][Ee]?[Gg]\\'" . image-mode)
+    ("\\.[Pp][Nn][Gg]\\'" . image-mode)
+    ("\\.[Gg][Ii][Ff]\\'" . image-mode)
+    )
+"Alist of filename patterns vs. corresponding major mode functions.
+Each element looks like (REGEXP . FUNCTION) or (REGEXP FUNCTION NON-NIL).
+\(NON-NIL stands for anything that is not nil; the value does not matter.)
+Visiting a file whose name matches REGEXP specifies FUNCTION as the
+mode function to use.  FUNCTION will be called, unless it is nil.
+
+If the element has the form (REGEXP FUNCTION NON-NIL), then after
+calling FUNCTION (if it's not nil), we delete the suffix that matched
+REGEXP and search the list again for another match.")
+
+(defvar interpreter-mode-alist
+  '(("^#!.*csh"          . sh-mode)
+    ("^#!.*\\b\\(scope\\|wish\\|tcl\\|tclsh\\|expect\\)" . tcl-mode)
+    ("^#!.*sh\\b" . sh-mode)
+    ("perl"   . perl-mode)
+    ("python" . python-mode)
+    ("awk\\b" . awk-mode)
+    ("rexx"   . rexx-mode)
+    ("scm"    . scheme-mode)
+    ("^:"     . sh-mode))
+  "Alist mapping interpreter names to major modes.
+This alist is used to guess the major mode of a file based on the
+contents of the first line.  This line often contains something like:
+#!/bin/sh
+but may contain something more imaginative like
+#! /bin/env python
+or
+eval 'exec perl -w -S $0 ${1+\"$@\"}'.
+
+Each alist element looks like (INTERPRETER . MODE).
+The car of each element is a regular expression which is compared
+with the name of the interpreter specified in the first line.
+If it matches, mode MODE is selected.")
+
+(defvar inhibit-first-line-modes-regexps (purecopy '("\\.tar\\'" "\\.tgz\\'"
+                                                    "\\.tar\\.gz\\'"))
+  "List of regexps; if one matches a file name, don't look for `-*-'.")
+
+(defvar inhibit-first-line-modes-suffixes nil
+  "List of regexps for what to ignore, for `inhibit-first-line-modes-regexps'.
+When checking `inhibit-first-line-modes-regexps', we first discard
+from the end of the file name anything that matches one of these regexps.")
+
+(defvar user-init-file
+  "" ; set by command-line
+  "File name including directory of user's initialization file.")
+
+(defun set-auto-mode (&optional just-from-file-name)
+  "Select major mode appropriate for current buffer.
+This checks for a -*- mode tag in the buffer's text,
+compares the filename against the entries in `auto-mode-alist',
+or checks the interpreter that runs this file against
+`interpreter-mode-alist'.
+
+It does not check for the `mode:' local variable in the
+Local Variables section of the file; for that, use `hack-local-variables'.
+
+If `enable-local-variables' is nil, this function does not check for a
+-*- mode tag.
+
+If the optional argument JUST-FROM-FILE-NAME is non-nil,
+then we do not set anything but the major mode,
+and we don't even do that unless it would come from the file name."
+  (save-excursion
+    ;; Look for -*-MODENAME-*- or -*- ... mode: MODENAME; ... -*-
+    ;; Do this by calling the hack-local-variables helper to avoid redundancy.
+    ;; We bind enable-local-variables to nil this time because we're going to
+    ;; call hack-local-variables-prop-line again later, "for real."  Note that
+    ;; this temporary binding does not prevent hack-local-variables-prop-line
+    ;; from setting the major mode.
+    (or (and enable-local-variables
+            (let ((enable-local-variables nil))
+              (hack-local-variables-prop-line nil))
+            )
+       ;; It's not in the -*- line, so check the auto-mode-alist, unless
+       ;; this buffer isn't associated with a file.
+       (null buffer-file-name)
+       (let ((name (file-name-sans-versions buffer-file-name))
+              (keep-going t))
+          (while keep-going
+            (setq keep-going nil)
+            (let ((alist auto-mode-alist)
+                  (mode nil))
+              ;; Find first matching alist entry.
+             (let ((case-fold-search
+                    (memq system-type '(vax-vms windows-nt))))
+               (while (and (not mode) alist)
+                 (if (string-match (car (car alist)) name)
+                     (if (and (consp (cdr (car alist)))
+                              (nth 2 (car alist)))
+                         (progn
+                           (setq mode (car (cdr (car alist)))
+                                 name (substring name 0 (match-beginning 0))
+                                 keep-going t))
+                       (setq mode (cdr (car alist))
+                             keep-going nil)))
+                 (setq alist (cdr alist))))
+             (unless just-from-file-name
+               ;; If we can't deduce a mode from the file name,
+               ;; look for an interpreter specified in the first line.
+               (if (and (null mode)
+                        (save-excursion ; XEmacs
+                          (goto-char (point-min))
+                          (looking-at "#!")))
+                   (let ((firstline
+                          (buffer-substring
+                           (point-min)
+                           (save-excursion
+                             (goto-char (point-min)) (end-of-line) (point)))))
+                     (setq alist interpreter-mode-alist)
+                     (while alist
+                       (if (string-match (car (car alist)) firstline)
+                           (progn
+                             (setq mode (cdr (car alist)))
+                             (setq alist nil))
+                         (setq alist (cdr alist)))))))
+              (if mode
+                 (if (not (fboundp mode))
+                     (progn
+                       (if (or (not (boundp 'package-get-base))
+                               (not package-get-base))
+                           (load "package-get-base"))
+                       (require 'package-get)
+                       (let ((name (package-get-package-provider mode)))
+                         (if name
+                             (message "Mode %s is not installed.  Download package %s" mode name)
+                           (message "Mode %s either doesn't exist or is not a known package" mode))
+                         (sit-for 2)
+                         (error "%s" mode)))
+                   (unless (and just-from-file-name
+                                (or
+                                 ;; Don't reinvoke major mode.
+                                 (eq mode major-mode)
+                                 ;; Don't lose on minor modes.
+                                 (assq mode minor-mode-alist)))
+                     (funcall mode))))))))))
+
+(defvar hack-local-variables-hook nil
+  "Normal hook run after processing a file's local variables specs.
+Major modes can use this to examine user-specified local variables
+in order to initialize other data structure based on them.
+
+This hook runs even if there were no local variables or if their
+evaluation was suppressed.  See also `enable-local-variables' and
+`enable-local-eval'.")
+
+(defun hack-local-variables (&optional force)
+  "Parse, and bind or evaluate as appropriate, any local variables
+for current buffer."
+  ;; Don't look for -*- if this file name matches any
+  ;; of the regexps in inhibit-first-line-modes-regexps.
+  (if (or (null buffer-file-name) ; don't lose if buffer has no file!
+         (not (let ((temp inhibit-first-line-modes-regexps)
+                    (name (if buffer-file-name
+                              (file-name-sans-versions buffer-file-name)
+                            (buffer-name))))
+                (while (let ((sufs inhibit-first-line-modes-suffixes))
+                         (while (and sufs (not
+                                           (string-match (car sufs) name)))
+                           (setq sufs (cdr sufs)))
+                         sufs)
+                  (setq name (substring name 0 (match-beginning 0))))
+                (while (and temp
+                            (not (string-match (car temp) name)))
+                  (setq temp (cdr temp))
+                  temp))))
+      (progn
+        ;; Look for variables in the -*- line.
+        (hack-local-variables-prop-line force)
+        ;; Look for "Local variables:" block in last page.
+        (hack-local-variables-last-page force)))
+  (run-hooks 'hack-local-variables-hook))
+
+;;; Local variables may be specified in the last page of the file (within 3k
+;;; from the end of the file and after the last ^L) in the form
+;;;
+;;;   Local variables:
+;;;   variable-name: variable-value
+;;;   end:
+;;;
+;;; The lines may begin with a common prefix, like ";;;   " in the above
+;;; example.  They may also have a common suffix (" */" for example).  In
+;;; this form, the local variable "mode" can be used to change the major
+;;; mode, and the local variable "eval" can be used to evaluate an arbitrary
+;;; form.
+;;;
+;;; Local variables may also be specified in the first line of the file.
+;;; Embedded in this line are a pair of "-*-" sequences.  What lies between
+;;; them are variable-name/variable-value pairs, like:
+;;;
+;;;     -*- mode: emacs-lisp -*-
+;;; or  -*- mode: postscript; version-control: never -*-
+;;; or  -*- tags-file-name: "/foo/bar/TAGS" -*-
+;;;
+;;; The local variable "eval" is not used with this form. For hysterical
+;;; reasons, the syntax "-*- modename -*-" is allowed as well.
+;;;
+
+(defun hack-local-variables-p (modeline)
+  (or (eq enable-local-variables t)
+      (and enable-local-variables
+           (save-window-excursion
+             (condition-case nil
+                 (switch-to-buffer (current-buffer))
+               (error
+                ;; If we fail to switch in the selected window,
+                ;; it is probably a minibuffer.
+                ;; So try another window.
+                (condition-case nil
+                    (switch-to-buffer-other-window (current-buffer))
+                  (error
+                   (switch-to-buffer-other-frame (current-buffer))))))
+             (or modeline (save-excursion
+                             (beginning-of-line)
+                             (set-window-start (selected-window) (point))))
+             (y-or-n-p (format
+                        "Set local variables as specified %s of %s? "
+                        (if modeline "in -*- line" "at end")
+                        (if buffer-file-name
+                            (file-name-nondirectory buffer-file-name)
+                            (concat "buffer " (buffer-name)))))))))
+
+(defun hack-local-variables-last-page (&optional force)
+  ;; Set local variables set in the "Local Variables:" block of the last page.
+  (save-excursion
+    (goto-char (point-max))
+    (search-backward "\n\^L" (max (- (point-max) 3000) (point-min)) 'move)
+    (if (let ((case-fold-search t))
+         (and (search-forward "Local Variables:" nil t)
+              (or force
+                   (hack-local-variables-p nil))))
+       (let ((continue t)
+             prefix prefixlen suffix beg
+              (enable-local-eval enable-local-eval))
+         ;; The prefix is what comes before "local variables:" in its line.
+         ;; The suffix is what comes after "local variables:" in its line.
+         (skip-chars-forward " \t")
+         (or (eolp)
+             (setq suffix (buffer-substring (point)
+                                            (progn (end-of-line) (point)))))
+         (goto-char (match-beginning 0))
+         (or (bolp)
+             (setq prefix
+                   (buffer-substring (point)
+                                     (progn (beginning-of-line) (point)))))
+         (if prefix (setq prefixlen (length prefix)
+                          prefix (regexp-quote prefix)))
+         (if suffix (setq suffix (concat (regexp-quote suffix) "$")))
+         (while continue
+           ;; Look at next local variable spec.
+           (if selective-display (re-search-forward "[\n\C-m]")
+             (forward-line 1))
+           ;; Skip the prefix, if any.
+           (if prefix
+               (if (looking-at prefix)
+                   (forward-char prefixlen)
+                 (error "Local variables entry is missing the prefix")))
+           ;; Find the variable name; strip whitespace.
+           (skip-chars-forward " \t")
+           (setq beg (point))
+           (skip-chars-forward "^:\n")
+           (if (eolp) (error "Missing colon in local variables entry"))
+           (skip-chars-backward " \t")
+           (let* ((str (buffer-substring beg (point)))
+                  (var (read str))
+                 val)
+             ;; Setting variable named "end" means end of list.
+             (if (string-equal (downcase str) "end")
+                 (setq continue nil)
+               ;; Otherwise read the variable value.
+               (skip-chars-forward "^:")
+               (forward-char 1)
+               (setq val (read (current-buffer)))
+               (skip-chars-backward "\n")
+               (skip-chars-forward " \t")
+               (or (if suffix (looking-at suffix) (eolp))
+                   (error "Local variables entry is terminated incorrectly"))
+               ;; Set the variable.  "Variables" mode and eval are funny.
+                (hack-one-local-variable var val))))))))
+
+;; jwz - New Version 20.1/19.15
+(defun hack-local-variables-prop-line (&optional force)
+  ;; Set local variables specified in the -*- line.
+  ;; Returns t if mode was set.
+  (let ((result nil))
+    (save-excursion
+      (goto-char (point-min))
+      (skip-chars-forward " \t\n\r")
+      (let ((end (save-excursion
+                  ;; If the file begins with "#!"
+                  ;; (un*x exec interpreter magic), look
+                  ;; for mode frobs in the first two
+                  ;; lines.  You cannot necessarily
+                  ;; put them in the first line of
+                  ;; such a file without screwing up
+                  ;; the interpreter invocation.
+                  (end-of-line (and (looking-at "^#!") 2))
+                  (point))))
+       ;; Parse the -*- line into the `result' alist.
+       (cond ((not (search-forward "-*-" end t))
+              ;; doesn't have one.
+              (setq force t))
+             ((looking-at "[ \t]*\\([^ \t\n\r:;]+\\)\\([ \t]*-\\*-\\)")
+              ;; Antiquated form: "-*- ModeName -*-".
+              (setq result
+                    (list (cons 'mode
+                                (intern (buffer-substring
+                                         (match-beginning 1)
+                                         (match-end 1)))))
+                    ))
+             (t
+              ;; Usual form: '-*-' [ <variable> ':' <value> ';' ]* '-*-'
+              ;; (last ";" is optional).
+              (save-excursion
+                (if (search-forward "-*-" end t)
+                    (setq end (- (point) 3))
+                  (error "-*- not terminated before end of line")))
+              (while (< (point) end)
+                (or (looking-at "[ \t]*\\([^ \t\n:]+\\)[ \t]*:[ \t]*")
+                    (error "malformed -*- line"))
+                (goto-char (match-end 0))
+                ;; There used to be a downcase here,
+                ;; but the manual didn't say so,
+                ;; and people want to set var names that aren't all lc.
+                (let ((key (intern (buffer-substring
+                                    (match-beginning 1)
+                                    (match-end 1))))
+                      (val (save-restriction
+                             (narrow-to-region (point) end)
+                             (read (current-buffer)))))
+                  ;; Case sensitivity!  Icepicks in my forehead!
+                  (if (equal (downcase (symbol-name key)) "mode")
+                      (setq key 'mode))
+                  (setq result (cons (cons key val) result))
+                  (skip-chars-forward " \t;")))
+              (setq result (nreverse result))))))
+
+    (let ((set-any-p (or force
+                        ;; It's OK to force null specifications.
+                        (null result)
+                        ;; It's OK to force mode-only specifications.
+                        (let ((remaining result)
+                              (mode-specs-only t))
+                          (while remaining
+                            (if (eq (car (car remaining)) 'mode)
+                                (setq remaining (cdr remaining))
+                              ;; Otherwise, we have a real local.
+                              (setq mode-specs-only nil
+                                    remaining nil))
+                            )
+                          mode-specs-only)
+                        ;; Otherwise, check.
+                        (hack-local-variables-p t)))
+         (mode-p nil))
+      (while result
+       (let ((key (car (car result)))
+             (val (cdr (car result))))
+         (cond ((eq key 'mode)
+                (setq mode-p t)
+                (let ((mode (intern (concat (downcase (symbol-name val))
+                                            "-mode"))))
+                  ;; Without this guard, `normal-mode' would potentially run
+                  ;; the major mode function twice: once via `set-auto-mode'
+                  ;; and once via `hack-local-variables'.
+                  (if (not (eq mode major-mode))
+                      (funcall mode))
+                  ))
+               (set-any-p
+                (hack-one-local-variable key val))
+               (t
+                nil)))
+       (setq result (cdr result)))
+      mode-p)))
+
+(defconst ignored-local-variables
+  (list 'enable-local-eval)
+  "Variables to be ignored in a file's local variable spec.")
+
+;; Get confirmation before setting these variables as locals in a file.
+(put 'debugger 'risky-local-variable t)
+(put 'enable-local-eval 'risky-local-variable t)
+(put 'ignored-local-variables 'risky-local-variable t)
+(put 'eval 'risky-local-variable t)
+(put 'file-name-handler-alist 'risky-local-variable t)
+(put 'minor-mode-map-alist 'risky-local-variable t)
+(put 'after-load-alist 'risky-local-variable t)
+(put 'buffer-file-name 'risky-local-variable t)
+(put 'buffer-auto-save-file-name 'risky-local-variable t)
+(put 'buffer-file-truename 'risky-local-variable t)
+(put 'exec-path 'risky-local-variable t)
+(put 'load-path 'risky-local-variable t)
+(put 'exec-directory 'risky-local-variable t)
+(put 'process-environment 'risky-local-variable t)
+;; Don't wait for outline.el to be loaded, for the sake of outline-minor-mode.
+(put 'outline-level 'risky-local-variable t)
+(put 'rmail-output-file-alist 'risky-local-variable t)
+
+;; This one is safe because the user gets to check it before it is used.
+(put 'compile-command 'safe-local-variable t)
+
+;(defun hack-one-local-variable-quotep (exp)
+;  (and (consp exp) (eq (car exp) 'quote) (consp (cdr exp))))
+
+;; "Set" one variable in a local variables spec.
+;; A few variable names are treated specially.
+(defun hack-one-local-variable (var val)
+  (cond ((eq var 'mode)
+        (funcall (intern (concat (downcase (symbol-name val))
+                                 "-mode"))))
+       ((memq var ignored-local-variables)
+        nil)
+       ;; "Setting" eval means either eval it or do nothing.
+       ;; Likewise for setting hook variables.
+       ((or (get var 'risky-local-variable)
+            (and
+             (string-match "-hooks?$\\|-functions?$\\|-forms?$\\|-program$\\|-command$"
+                           (symbol-name var))
+             (not (get var 'safe-local-variable))))
+;       ;; Permit evaling a put of a harmless property
+;       ;; if the args do nothing tricky.
+;       (if (or (and (eq var 'eval)
+;                    (consp val)
+;                    (eq (car val) 'put)
+;                    (hack-one-local-variable-quotep (nth 1 val))
+;                    (hack-one-local-variable-quotep (nth 2 val))
+;                    ;; Only allow safe values of lisp-indent-hook;
+;                    ;; not functions.
+;                    (or (numberp (nth 3 val))
+;                        (equal (nth 3 val) ''defun))
+;                    (memq (nth 1 (nth 2 val))
+;                          '(lisp-indent-hook)))
+        (if (and (not (zerop (user-uid)))
+                 (or (eq enable-local-eval t)
+                     (and enable-local-eval
+                          (save-window-excursion
+                            (switch-to-buffer (current-buffer))
+                            (save-excursion
+                              (beginning-of-line)
+                              (set-window-start (selected-window) (point)))
+                            (setq enable-local-eval
+                                  (y-or-n-p (format "Process `eval' or hook local variables in file %s? "
+                                                    (file-name-nondirectory buffer-file-name))))))))
+            (if (eq var 'eval)
+                (save-excursion (eval val))
+              (make-local-variable var)
+              (set var val))
+          (message "Ignoring `eval:' in file's local variables")))
+       ;; Ordinary variable, really set it.
+       (t (make-local-variable var)
+          (set var val))))
+\f
+(defcustom change-major-mode-with-file-name t
+  "*Non-nil means \\[write-file] should set the major mode from the file name.
+However, the mode will not be changed if
+\(1) a local variables list or the `-*-' line specifies a major mode, or
+\(2) the current major mode is a \"special\" mode,
+\    not suitable for ordinary files, or
+\(3) the new file name does not particularly specify any mode."
+  :type 'boolean
+  :group 'editing-basics)
+
+(defun set-visited-file-name (filename &optional no-query along-with-file)
+  "Change name of file visited in current buffer to FILENAME.
+The next time the buffer is saved it will go in the newly specified file.
+nil or empty string as argument means make buffer not be visiting any file.
+Remember to delete the initial contents of the minibuffer
+if you wish to pass an empty string as the argument.
+
+The optional second argument NO-QUERY, if non-nil, inhibits asking for
+confirmation in the case where another buffer is already visiting FILENAME.
+
+The optional third argument ALONG-WITH-FILE, if non-nil, means that
+the old visited file has been renamed to the new name FILENAME."
+  (interactive "FSet visited file name: ")
+  (if (buffer-base-buffer)
+      (error "An indirect buffer cannot visit a file"))
+  (let (truename)
+    (if filename
+       (setq filename
+             (if (string-equal filename "")
+                 nil
+               (expand-file-name filename))))
+    (if filename
+       (progn
+         (setq truename (file-truename filename))
+         ;; #### Do we need to check if truename is non-nil?
+         (if find-file-use-truenames
+             (setq filename truename))))
+    (let ((buffer (and filename (find-buffer-visiting filename))))
+      (and buffer (not (eq buffer (current-buffer)))
+          (not no-query)
+          (not (y-or-n-p (message "A buffer is visiting %s; proceed? "
+                                  filename)))
+          (error "Aborted")))
+    (or (equal filename buffer-file-name)
+       (progn
+         (and filename (lock-buffer filename))
+         (unlock-buffer)))
+    (setq buffer-file-name filename)
+    (if filename                       ; make buffer name reflect filename.
+       (let ((new-name (file-name-nondirectory buffer-file-name)))
+         (if (string= new-name "")
+             (error "Empty file name"))
+         (if (eq system-type 'vax-vms)
+             (setq new-name (downcase new-name)))
+         (setq default-directory (file-name-directory buffer-file-name))
+         (or (string= new-name (buffer-name))
+             (rename-buffer new-name t))))
+    (setq buffer-backed-up nil)
+    (or along-with-file
+       (clear-visited-file-modtime))
+    (compute-buffer-file-truename) ; insert-file-contents does this too.
+;    ;; Abbreviate the file names of the buffer.
+;    (if truename
+;       (progn
+;         (setq buffer-file-truename (abbreviate-file-name truename))
+;         (if find-file-visit-truename
+;             (setq buffer-file-name buffer-file-truename))))
+    (setq buffer-file-number
+         (if filename
+             (nthcdr 10 (file-attributes buffer-file-name))
+             nil)))
+  ;; write-file-hooks is normally used for things like ftp-find-file
+  ;; that visit things that are not local files as if they were files.
+  ;; Changing to visit an ordinary local file instead should flush the hook.
+  (kill-local-variable 'write-file-hooks)
+  (kill-local-variable 'after-save-hook)
+  (kill-local-variable 'local-write-file-hooks)
+  (kill-local-variable 'write-file-data-hooks)
+  (kill-local-variable 'revert-buffer-function)
+  (kill-local-variable 'backup-inhibited)
+  ;; If buffer was read-only because of version control,
+  ;; that reason is gone now, so make it writable.
+  (when (boundp 'vc-mode)
+    (if vc-mode
+       (setq buffer-read-only nil))
+    (kill-local-variable 'vc-mode))
+  ;; Turn off backup files for certain file names.
+  ;; Since this is a permanent local, the major mode won't eliminate it.
+  (and buffer-file-name
+       (not (funcall backup-enable-predicate buffer-file-name))
+       (progn
+        (make-local-variable 'backup-inhibited)
+        (setq backup-inhibited t)))
+  (let ((oauto buffer-auto-save-file-name))
+    ;; If auto-save was not already on, turn it on if appropriate.
+    (if (not buffer-auto-save-file-name)
+       (and buffer-file-name auto-save-default
+            (auto-save-mode t))
+      ;; If auto save is on, start using a new name.
+      ;; We deliberately don't rename or delete the old auto save
+      ;; for the old visited file name.  This is because perhaps
+      ;; the user wants to save the new state and then compare with the
+      ;; previous state from the auto save file.
+      (setq buffer-auto-save-file-name
+           (make-auto-save-file-name)))
+    ;; Rename the old auto save file if any.
+    (and oauto buffer-auto-save-file-name
+        (file-exists-p oauto)
+        (rename-file oauto buffer-auto-save-file-name t)))
+  (if buffer-file-name
+      (not along-with-file)
+      (set-buffer-modified-p t))
+  ;; Update the major mode, if the file name determines it.
+  (condition-case nil
+      ;; Don't change the mode if it is special.
+      (or (not change-major-mode-with-file-name)
+         (get major-mode 'mode-class)
+         ;; Don't change the mode if the local variable list specifies it.
+         (hack-local-variables t)
+         (set-auto-mode t))
+    (error nil))
+  ;; #### ??
+  (run-hooks 'after-set-visited-file-name-hooks))
+
+(defun write-file (filename &optional confirm codesys)
+  "Write current buffer into file FILENAME.
+Makes buffer visit that file, and marks it not modified.
+If the buffer is already visiting a file, you can specify
+a directory name as FILENAME, to write a file of the same
+old name in that directory.
+If optional second arg CONFIRM is non-nil,
+ask for confirmation for overwriting an existing file.
+Under XEmacs/Mule, optional third argument specifies the
+coding system to use when encoding the file.  Interactively,
+with a prefix argument, you will be prompted for the coding system."
+;;  (interactive "FWrite file: ")
+  (interactive
+   (list (if buffer-file-name
+            (read-file-name "Write file: "
+                                nil nil nil nil)
+          (read-file-name "Write file: "
+                              (cdr (assq 'default-directory
+                                         (buffer-local-variables)))
+                              nil nil (buffer-name)))
+        t
+        (if (and current-prefix-arg (featurep 'mule))
+            (read-coding-system "Coding system: "))))
+  (and (eq (current-buffer) mouse-grabbed-buffer)
+       (error "Can't write minibuffer window"))
+  (or (null filename) (string-equal filename "")
+      (progn
+       ;; If arg is just a directory,
+       ;; use same file name, but in that directory.
+       (if (and (file-directory-p filename) buffer-file-name)
+           (setq filename (concat (file-name-as-directory filename)
+                                  (file-name-nondirectory buffer-file-name))))
+       (and confirm
+            (file-exists-p filename)
+            (or (y-or-n-p (format "File `%s' exists; overwrite? " filename))
+                (error "Canceled")))
+       (set-visited-file-name filename)))
+  (set-buffer-modified-p t)
+  (setq buffer-read-only nil)
+  (if codesys
+      (let ((buffer-file-coding-system (get-coding-system codesys)))
+       (save-buffer))
+    (save-buffer)))
+\f
+(defun backup-buffer ()
+  "Make a backup of the disk file visited by the current buffer, if appropriate.
+This is normally done before saving the buffer the first time.
+If the value is non-nil, it is the result of `file-modes' on the original file;
+this means that the caller, after saving the buffer, should change the modes
+of the new file to agree with the old modes."
+  (if buffer-file-name
+      (let ((handler (find-file-name-handler buffer-file-name 'backup-buffer)))
+       (if handler
+           (funcall handler 'backup-buffer)
+         (if (and make-backup-files
+                  (not backup-inhibited)
+                  (not buffer-backed-up)
+                  (file-exists-p buffer-file-name)
+                  (memq (aref (elt (file-attributes buffer-file-name) 8) 0)
+                        '(?- ?l)))
+             (let ((real-file-name buffer-file-name)
+                   backup-info backupname targets setmodes)
+               ;; If specified name is a symbolic link, chase it to the target.
+               ;; Thus we make the backups in the directory where the real file is.
+               (setq real-file-name (file-chase-links real-file-name))
+               (setq backup-info (find-backup-file-name real-file-name)
+                     backupname (car backup-info)
+                     targets (cdr backup-info))
+;;;     (if (file-directory-p buffer-file-name)
+;;;         (error "Cannot save buffer in directory %s" buffer-file-name))
+               (if backup-info
+                   (condition-case ()
+                       (let ((delete-old-versions
+                              ;; If have old versions to maybe delete,
+                              ;; ask the user to confirm now, before doing anything.
+                              ;; But don't actually delete til later.
+                              (and targets
+                                   (or (eq delete-old-versions t)
+                                       (eq delete-old-versions nil))
+                                   (or delete-old-versions
+                                       (y-or-n-p (format "Delete excess backup versions of %s? "
+                                                         real-file-name))))))
+                         ;; Actually write the back up file.
+                         (condition-case ()
+                             (if (or file-precious-flag
+                                       ;                         (file-symlink-p buffer-file-name)
+                                     backup-by-copying
+                                     (and backup-by-copying-when-linked
+                                          (> (file-nlinks real-file-name) 1))
+                                     (and backup-by-copying-when-mismatch
+                                          (let ((attr (file-attributes real-file-name)))
+                                            (or (nth 9 attr)
+                                                (not (file-ownership-preserved-p real-file-name))))))
+                                 (condition-case ()
+                                     (copy-file real-file-name backupname t t)
+                                   (file-error
+                                    ;; If copying fails because file BACKUPNAME
+                                    ;; is not writable, delete that file and try again.
+                                    (if (and (file-exists-p backupname)
+                                             (not (file-writable-p backupname)))
+                                        (delete-file backupname))
+                                    (copy-file real-file-name backupname t t)))
+                               ;; rename-file should delete old backup.
+                               (rename-file real-file-name backupname t)
+                               (setq setmodes (file-modes backupname)))
+                           (file-error
+                            ;; If trouble writing the backup, write it in ~.
+                            (setq backupname (expand-file-name "~/%backup%~"))
+                            (message "Cannot write backup file; backing up in ~/%%backup%%~")
+                            (sleep-for 1)
+                            (condition-case ()
+                                (copy-file real-file-name backupname t t)
+                              (file-error
+                               ;; If copying fails because file BACKUPNAME
+                               ;; is not writable, delete that file and try again.
+                               (if (and (file-exists-p backupname)
+                                        (not (file-writable-p backupname)))
+                                   (delete-file backupname))
+                               (copy-file real-file-name backupname t t)))))
+                         (setq buffer-backed-up t)
+                         ;; Now delete the old versions, if desired.
+                         (if delete-old-versions
+                             (while targets
+                               (condition-case ()
+                                   (delete-file (car targets))
+                                 (file-error nil))
+                               (setq targets (cdr targets))))
+                         setmodes)
+                     (file-error nil)))))))))
+
+(defun file-name-sans-versions (name &optional keep-backup-version)
+  "Return FILENAME sans backup versions or strings.
+This is a separate procedure so your site-init or startup file can
+redefine it.
+If the optional argument KEEP-BACKUP-VERSION is non-nil,
+we do not remove backup version numbers, only true file version numbers."
+  (let ((handler (find-file-name-handler name 'file-name-sans-versions)))
+    (if handler
+       (funcall handler 'file-name-sans-versions name keep-backup-version)
+      (substring name 0
+                (if (eq system-type 'vax-vms)
+                    ;; VMS version number is (a) semicolon, optional
+                    ;; sign, zero or more digits or (b) period, option
+                    ;; sign, zero or more digits, provided this is the
+                    ;; second period encountered outside of the
+                    ;; device/directory part of the file name.
+                    (or (string-match ";[-+]?[0-9]*\\'" name)
+                        (if (string-match "\\.[^]>:]*\\(\\.[-+]?[0-9]*\\)\\'"
+                                          name)
+                            (match-beginning 1))
+                        (length name))
+                  (if keep-backup-version
+                      (length name)
+                    (or (string-match "\\.~[0-9.]+~\\'" name)
+                        ;; XEmacs - VC uses extensions like ".~tagname~" or ".~1.1.5.2~"
+                        (let ((pos (string-match "\\.~\\([^.~ \t]+\\|[0-9.]+\\)~\\'" name)))
+                          (and pos
+                               ;; #### - is this filesystem check too paranoid?
+                               (file-exists-p (substring name 0 pos))
+                               pos))
+                        (string-match "~\\'" name)
+                        (length name))))))))
+
+(defun file-ownership-preserved-p (file)
+  "Return t if deleting FILE and rewriting it would preserve the owner."
+  (let ((handler (find-file-name-handler file 'file-ownership-preserved-p)))
+    (if handler
+       (funcall handler 'file-ownership-preserved-p file)
+      (let ((attributes (file-attributes file)))
+       ;; Return t if the file doesn't exist, since it's true that no
+       ;; information would be lost by an (attempted) delete and create.
+       (or (null attributes)
+           (= (nth 2 attributes) (user-uid)))))))
+
+(defun file-name-sans-extension (filename)
+  "Return FILENAME sans final \"extension\".
+The extension, in a file name, is the part that follows the last `.'."
+  (save-match-data
+    (let ((file (file-name-sans-versions (file-name-nondirectory filename)))
+         directory)
+      (if (string-match "\\.[^.]*\\'" file)
+         (if (setq directory (file-name-directory filename))
+             (expand-file-name (substring file 0 (match-beginning 0))
+                               directory)
+           (substring file 0 (match-beginning 0)))
+       filename))))
+
+(defun file-name-extension (filename &optional period)
+  "Return FILENAME's final \"extension\".
+The extension, in a file name, is the part that follows the last `.'.
+Return nil for extensionless file names such as `foo'.
+Return the empty string for file names such as `foo.'.
+
+If PERIOD is non-nil, then the returned value includes the period
+that delimits the extension, and if FILENAME has no extension,
+the value is \"\"."
+  (save-match-data
+    (let ((file (file-name-sans-versions (file-name-nondirectory filename))))
+      (if (string-match "\\.[^.]*\\'" file)
+          (substring file (+ (match-beginning 0) (if period 0 1)))
+        (if period
+            "")))))
+
+(defun make-backup-file-name (file)
+  "Create the non-numeric backup file name for FILE.
+This is a separate function so you can redefine it for customization."
+  (if (eq system-type 'ms-dos)
+      (let ((fn (file-name-nondirectory file)))
+       (concat (file-name-directory file)
+               (if (string-match "\\([^.]*\\)\\(\\..*\\)?" fn)
+                   (substring fn 0 (match-end 1)))
+               ".bak"))
+    (concat file "~")))
+
+(defun backup-file-name-p (file)
+  "Return non-nil if FILE is a backup file name (numeric or not).
+This is a separate function so you can redefine it for customization.
+You may need to redefine `file-name-sans-versions' as well."
+  (if (eq system-type 'ms-dos)
+      (string-match "\\.bak\\'" file)
+      (string-match "~\\'" file)))
+
+;; This is used in various files.
+;; The usage of bv-length is not very clean,
+;; but I can't see a good alternative,
+;; so as of now I am leaving it alone.
+(defun backup-extract-version (fn)
+  "Given the name of a numeric backup file, return the backup number.
+Uses the free variable `bv-length', whose value should be
+the index in the name where the version number begins."
+  (declare (special bv-length))
+  (if (and (string-match "[0-9]+~\\'" fn bv-length)
+          (= (match-beginning 0) bv-length))
+      (string-to-int (substring fn bv-length -1))
+      0))
+
+;; I believe there is no need to alter this behavior for VMS;
+;; since backup files are not made on VMS, it should not get called.
+(defun find-backup-file-name (fn)
+  "Find a file name for a backup file, and suggestions for deletions.
+Value is a list whose car is the name for the backup file
+ and whose cdr is a list of old versions to consider deleting now.
+If the value is nil, don't make a backup."
+  (let ((handler (find-file-name-handler fn 'find-backup-file-name)))
+    ;; Run a handler for this function so that ange-ftp can refuse to do it.
+    (if handler
+       (funcall handler 'find-backup-file-name fn)
+      (if (eq version-control 'never)
+         (list (make-backup-file-name fn))
+       (let* ((base-versions (concat (file-name-nondirectory fn) ".~"))
+              ;; used by backup-extract-version:
+              (bv-length (length base-versions))
+              possibilities
+              (versions nil)
+              (high-water-mark 0)
+              (deserve-versions-p nil)
+              (number-to-delete 0))
+         (condition-case ()
+             (setq possibilities (file-name-all-completions
+                                  base-versions
+                                  (file-name-directory fn))
+                   versions (sort (mapcar
+                                   #'backup-extract-version
+                                   possibilities)
+                                  '<)
+                   high-water-mark (apply #'max 0 versions)
+                   deserve-versions-p (or version-control
+                                          (> high-water-mark 0))
+                   number-to-delete (- (length versions)
+                                       kept-old-versions kept-new-versions -1))
+           (file-error
+            (setq possibilities nil)))
+         (if (not deserve-versions-p)
+             (list (make-backup-file-name fn))
+           (cons (concat fn ".~" (int-to-string (1+ high-water-mark)) "~")
+                 (if (and (> number-to-delete 0)
+                          ;; Delete nothing if there is overflow
+                          ;; in the number of versions to keep.
+                          (>= (+ kept-new-versions kept-old-versions -1) 0))
+                     (mapcar #'(lambda (n)
+                                 (concat fn ".~" (int-to-string n) "~"))
+                             (let ((v (nthcdr kept-old-versions versions)))
+                               (rplacd (nthcdr (1- number-to-delete) v) ())
+                               v))))))))))
+
+(defun file-nlinks (filename)
+  "Return number of names file FILENAME has."
+  (car (cdr (file-attributes filename))))
+
+(defun file-relative-name (filename &optional directory)
+  "Convert FILENAME to be relative to DIRECTORY (default: default-directory).
+This function returns a relative file name which is equivalent to FILENAME
+when used with that default directory as the default.
+If this is impossible (which can happen on MSDOS and Windows
+when the file name and directory use different drive names)
+then it returns FILENAME."
+  (save-match-data
+    (let ((fname (expand-file-name filename)))
+      (setq directory (file-name-as-directory
+                      (expand-file-name (or directory default-directory))))
+      ;; On Microsoft OSes, if FILENAME and DIRECTORY have different
+      ;; drive names, they can't be relative, so return the absolute name.
+      (if (and (or (eq system-type 'ms-dos)
+                  (eq system-type 'windows-nt))
+              (not (string-equal (substring fname  0 2)
+                                 (substring directory 0 2))))
+         filename
+       (let ((ancestor ".")
+             (fname-dir (file-name-as-directory fname)))
+         (while (and (not (string-match (concat "^" (regexp-quote directory))
+                                        fname-dir))
+                     (not (string-match (concat "^" (regexp-quote directory)) fname)))
+           (setq directory (file-name-directory (substring directory 0 -1))
+                 ancestor (if (equal ancestor ".")
+                              ".."
+                            (concat "../" ancestor))))
+         ;; Now ancestor is empty, or .., or ../.., etc.
+         (if (string-match (concat "^" (regexp-quote directory)) fname)
+             ;; We matched within FNAME's directory part.
+             ;; Add the rest of FNAME onto ANCESTOR.
+             (let ((rest (substring fname (match-end 0))))
+               (if (and (equal ancestor ".")
+                        (not (equal rest "")))
+                   ;; But don't bother with ANCESTOR if it would give us `./'.
+                   rest
+                 (concat (file-name-as-directory ancestor) rest)))
+           ;; We matched FNAME's directory equivalent.
+           ancestor))))))
+\f
+(defun save-buffer (&optional args)
+  "Save current buffer in visited file if modified.  Versions described below.
+
+By default, makes the previous version into a backup file
+ if previously requested or if this is the first save.
+With 1 or 3 \\[universal-argument]'s, marks this version
+ to become a backup when the next save is done.
+With 2 or 3 \\[universal-argument]'s,
+ unconditionally makes the previous version into a backup file.
+With argument of 0, never makes the previous version into a backup file.
+
+If a file's name is FOO, the names of its numbered backup versions are
+ FOO.~i~ for various integers i.  A non-numbered backup file is called FOO~.
+Numeric backups (rather than FOO~) will be made if value of
+ `version-control' is not the atom `never' and either there are already
+ numeric versions of the file being backed up, or `version-control' is
+ non-nil.
+We don't want excessive versions piling up, so there are variables
+ `kept-old-versions', which tells XEmacs how many oldest versions to keep,
+ and `kept-new-versions', which tells how many newest versions to keep.
+ Defaults are 2 old versions and 2 new.
+`dired-kept-versions' controls dired's clean-directory (.) command.
+If `delete-old-versions' is nil, system will query user
+ before trimming versions.  Otherwise it does it silently."
+  (interactive "_p")
+  (let ((modp (buffer-modified-p))
+       (large (> (buffer-size) 50000))
+       (make-backup-files (or (and make-backup-files (not (eq args 0)))
+                              (memq args '(16 64)))))
+    (and modp (memq args '(16 64)) (setq buffer-backed-up nil))
+    (if (and modp large) (display-message
+                         'progress (format "Saving file %s..."
+                                           (buffer-file-name))))
+    (basic-save-buffer)
+    (and modp (memq args '(4 64)) (setq buffer-backed-up nil))))
+
+(defun delete-auto-save-file-if-necessary (&optional force)
+  "Delete auto-save file for current buffer if `delete-auto-save-files' is t.
+Normally delete only if the file was written by this XEmacs
+since the last real save, but optional arg FORCE non-nil means delete anyway."
+  (and buffer-auto-save-file-name delete-auto-save-files
+       (not (string= buffer-file-name buffer-auto-save-file-name))
+       (or force (recent-auto-save-p))
+       (progn
+        (condition-case ()
+            (delete-file buffer-auto-save-file-name)
+          (file-error nil))
+        (set-buffer-auto-saved))))
+
+;; XEmacs change (from Sun)
+;; used to communicate with continue-save-buffer:
+(defvar continue-save-buffer-hooks-tail nil)
+
+;; Not in FSFmacs
+(defun basic-write-file-data (realname truename)
+  ;; call the hooks until the bytes are put
+  ;; call write-region as a last resort
+  (let ((region-written nil)
+       (hooks write-file-data-hooks))
+    (while (and hooks (not region-written))
+      (setq region-written (funcall (car hooks) realname)
+           hooks (cdr hooks)))
+    (if (not region-written)
+       (write-region (point-min) (point-max) realname nil t truename))))
+
+(put 'after-save-hook 'permanent-local t)
+(defvar after-save-hook nil
+  "Normal hook that is run after a buffer is saved to its file.
+These hooks are considered to pertain to the visited file.
+So this list is cleared if you change the visited file name.")
+
+(defun files-fetch-hook-value (hook)
+  (let ((localval (symbol-value hook))
+       (globalval (default-value hook)))
+    (if (memq t localval)
+       (setq localval (append (delq t localval) (delq t globalval))))
+    localval))
+
+(defun basic-save-buffer ()
+  "Save the current buffer in its visited file, if it has been modified.
+After saving the buffer, run `after-save-hook'."
+  (interactive)
+  (save-excursion
+    ;; In an indirect buffer, save its base buffer instead.
+    (if (buffer-base-buffer)
+       (set-buffer (buffer-base-buffer)))
+    (if (buffer-modified-p)
+       (let ((recent-save (recent-auto-save-p)))
+         ;; On VMS, rename file and buffer to get rid of version number.
+         (if (and (eq system-type 'vax-vms)
+                  (not (string= buffer-file-name
+                                (file-name-sans-versions buffer-file-name))))
+             (let (buffer-new-name)
+               ;; Strip VMS version number before save.
+               (setq buffer-file-name
+                     (file-name-sans-versions buffer-file-name))
+               ;; Construct a (unique) buffer name to correspond.
+               (let ((buf (create-file-buffer (downcase buffer-file-name))))
+                 (setq buffer-new-name (buffer-name buf))
+                 (kill-buffer buf))
+               (rename-buffer buffer-new-name)))
+         ;; If buffer has no file name, ask user for one.
+         (or buffer-file-name
+             (let ((filename
+                    (expand-file-name
+                     (read-file-name "File to save in: ") nil)))
+               (and (file-exists-p filename)
+                    (or (y-or-n-p (format "File `%s' exists; overwrite? "
+                                          filename))
+                        (error "Canceled")))
+               (set-visited-file-name filename)))
+         (or (verify-visited-file-modtime (current-buffer))
+             (not (file-exists-p buffer-file-name))
+             (yes-or-no-p
+              (format "%s has changed since visited or saved.  Save anyway? "
+                      (file-name-nondirectory buffer-file-name)))
+             (error "Save not confirmed"))
+         (save-restriction
+           (widen)
+           (and (> (point-max) 1)
+                (/= (char-after (1- (point-max))) ?\n)
+                (not (and (eq selective-display t)
+                          (= (char-after (1- (point-max))) ?\r)))
+                (or (eq require-final-newline t)
+                    (and require-final-newline
+                         (y-or-n-p
+                          (format "Buffer %s does not end in newline.  Add one? "
+                                  (buffer-name)))))
+                (save-excursion
+                  (goto-char (point-max))
+                  (insert ?\n)))
+           ;;
+           ;; Run the write-file-hooks until one returns non-null.
+           ;; Bind after-save-hook to nil while running the
+           ;; write-file-hooks so that if this function is called
+           ;; recursively (from inside a write-file-hook) the
+           ;; after-hooks will only get run once (from the
+           ;; outermost call).
+           ;;
+           ;; Ugh, have to duplicate logic of run-hook-with-args-until-success
+            (let ((hooks (append (files-fetch-hook-value 'write-contents-hooks)
+                                 (files-fetch-hook-value
+                                 'local-write-file-hooks)
+                                 (files-fetch-hook-value 'write-file-hooks)))
+                 (after-save-hook nil)
+                  (local-write-file-hooks nil)
+                 (write-contents-hooks nil)
+                 (write-file-hooks nil)
+                 done)
+              (while (and hooks
+                          (let ((continue-save-buffer-hooks-tail hooks))
+                            (not (setq done (funcall (car hooks))))))
+                (setq hooks (cdr hooks)))
+             ;; If a hook returned t, file is already "written".
+             ;; Otherwise, write it the usual way now.
+             (if (not done)
+                 (basic-save-buffer-1)))
+           ;; XEmacs: next two clauses (buffer-file-number setting and
+           ;; set-file-modes) moved into basic-save-buffer-1.
+           )
+         ;; If the auto-save file was recent before this command,
+         ;; delete it now.
+         (delete-auto-save-file-if-necessary recent-save)
+         ;; Support VC `implicit' locking.
+         (when (fboundp 'vc-after-save)
+           (vc-after-save))
+         (run-hooks 'after-save-hook))
+      (display-message 'no-log "(No changes need to be saved)"))))
+
+;; This does the "real job" of writing a buffer into its visited file
+;; and making a backup file.  This is what is normally done
+;; but inhibited if one of write-file-hooks returns non-nil.
+;; It returns a value to store in setmodes.
+(defun basic-save-buffer-1 ()
+  (let (setmodes tempsetmodes)
+    (if (not (file-writable-p buffer-file-name))
+       (let ((dir (file-name-directory buffer-file-name)))
+         (if (not (file-directory-p dir))
+             (error "%s is not a directory" dir)
+           (if (not (file-exists-p buffer-file-name))
+               (error "Directory %s write-protected" dir)
+             (if (yes-or-no-p
+                  (format "File %s is write-protected; try to save anyway? "
+                          (file-name-nondirectory
+                           buffer-file-name)))
+                 (setq tempsetmodes t)
+               (error
+                "Attempt to save to a file which you aren't allowed to write"))))))
+    (or buffer-backed-up
+       (setq setmodes (backup-buffer)))
+    (let ((dir (file-name-directory buffer-file-name)))
+      (if (and file-precious-flag
+              (file-writable-p dir))
+         ;; If file is precious, write temp name, then rename it.
+         ;; This requires write access to the containing dir,
+         ;; which is why we don't try it if we don't have that access.
+         (let ((realname buffer-file-name)
+               tempname nogood i succeed
+               (old-modtime (visited-file-modtime)))
+           (setq i 0)
+           (setq nogood t)
+           ;; Find the temporary name to write under.
+           (while nogood
+             (setq tempname (format "%s#tmp#%d" dir i))
+             (setq nogood (file-exists-p tempname))
+             (setq i (1+ i)))
+           (unwind-protect
+               (progn (clear-visited-file-modtime)
+                      (write-region (point-min) (point-max)
+                                    tempname nil realname
+                                    buffer-file-truename)
+                      (setq succeed t))
+             ;; If writing the temp file fails,
+             ;; delete the temp file.
+             (or succeed
+                 (progn
+                   (delete-file tempname)
+                   (set-visited-file-modtime old-modtime))))
+           ;; Since we have created an entirely new file
+           ;; and renamed it, make sure it gets the
+           ;; right permission bits set.
+           (setq setmodes (file-modes buffer-file-name))
+           ;; We succeeded in writing the temp file,
+           ;; so rename it.
+           (rename-file tempname buffer-file-name t))
+       ;; If file not writable, see if we can make it writable
+       ;; temporarily while we write it.
+       ;; But no need to do so if we have just backed it up
+       ;; (setmodes is set) because that says we're superseding.
+       (cond ((and tempsetmodes (not setmodes))
+              ;; Change the mode back, after writing.
+              (setq setmodes (file-modes buffer-file-name))
+              (set-file-modes buffer-file-name 511)))
+       (basic-write-file-data buffer-file-name buffer-file-truename)))
+    (setq buffer-file-number
+         (if buffer-file-name
+             (nth 10 (file-attributes buffer-file-name))
+           nil))
+    (if setmodes
+       (condition-case ()
+           (set-file-modes buffer-file-name setmodes)
+         (error nil)))))
+
+;; XEmacs change, from Sun
+(defun continue-save-buffer ()
+  "Provide a clean way for a write-file-hook to wrap AROUND
+the execution of the remaining hooks and writing to disk.
+Do not call this function except from a functions
+on the write-file-hooks or write-contents-hooks list.
+A hook that calls this function must return non-nil,
+to signal completion to its caller.  continue-save-buffer
+always returns non-nil."
+  (let ((hooks (cdr (or continue-save-buffer-hooks-tail
+                       (error
+        "continue-save-buffer called outside a write-file-hook!"))))
+       (done nil))
+    ;; Do something like this:
+    ;; (let ((write-file-hooks hooks)) (basic-save-buffer))
+    ;; First run the rest of the hooks.
+    (while (and hooks
+               (let ((continue-save-buffer-hooks-tail hooks))
+                 (not (setq done (funcall (car hooks))))))
+      (setq hooks (cdr hooks)))
+    ;;
+    ;; If a hook returned t, file is already "written".
+    (if (not done)
+       (basic-save-buffer-1))
+    'continue-save-buffer))
+
+(defcustom save-some-buffers-query-display-buffer t
+  "*Non-nil makes `\\[save-some-buffers]' switch to the buffer offered for saving."
+  :type 'boolean
+  :group 'editing-basics)
+
+(defun save-some-buffers (&optional arg exiting)
+  "Save some modified file-visiting buffers.  Asks user about each one.
+Optional argument (the prefix) non-nil means save all with no questions.
+Optional second argument EXITING means ask about certain non-file buffers
+ as well as about file buffers."
+  (interactive "P")
+  (save-excursion
+    ;; `delete-other-windows' can bomb during autoloads generation, so
+    ;; guard it well.
+    (if (or noninteractive
+           (eq (selected-window) (minibuffer-window))
+           (not save-some-buffers-query-display-buffer))
+       ;; If playing with windows is unsafe or undesired, just do the
+       ;; usual drill.
+       (save-some-buffers-1 arg exiting nil)
+      ;; Else, protect the windows.
+      (when (save-window-excursion
+             (save-some-buffers-1 arg exiting t))
+       ;; Force redisplay.
+       (sit-for 0)))))
+
+;; XEmacs - do not use queried flag
+(defun save-some-buffers-1 (arg exiting switch-buffer)
+  (let* ((switched nil)
+        (files-done
+         (map-y-or-n-p
+          (lambda (buffer)
+            (and (buffer-modified-p buffer)
+                 (not (buffer-base-buffer buffer))
+                 ;; XEmacs addition:
+                 (not (symbol-value-in-buffer 'save-buffers-skip buffer))
+                 (or
+                  (buffer-file-name buffer)
+                  (and exiting
+                       (progn
+                         (set-buffer buffer)
+                         (and buffer-offer-save (> (buffer-size) 0)))))
+                 (if arg
+                     t
+                   ;; #### We should provide a per-buffer means to
+                   ;; disable the switching.  For instance, you might
+                   ;; want to turn it off for buffers the contents of
+                   ;; which is meaningless to humans, such as
+                   ;; `.newsrc.eld'.
+                   (when switch-buffer
+                     (unless (one-window-p)
+                       (delete-other-windows))
+                     (setq switched t)
+                     ;; #### Consider using `display-buffer' here for 21.1!
+                     ;;(display-buffer buffer nil (selected-frame)))
+                     (switch-to-buffer buffer t))
+                   (if (buffer-file-name buffer)
+                       (format "Save file %s? "
+                               (buffer-file-name buffer))
+                     (format "Save buffer %s? "
+                             (buffer-name buffer))))))
+          (lambda (buffer)
+            (set-buffer buffer)
+            (condition-case ()
+                (save-buffer)
+              (error nil)))
+          (buffer-list)
+          '("buffer" "buffers" "save")
+          ;;instead of this we just say "yes all", "no all", etc.
+          ;;"save all the rest"
+          ;;"save only this buffer" "save no more buffers")
+          ;; this is rather bogus. --ben
+          ;; (it makes the dialog box too big, and you get an error
+          ;; "wrong type argument: framep, nil" when you hit q after
+          ;; choosing the option from the dialog box)
+
+          ;; We should fix the dialog box rather than disabling
+          ;; this!  --hniksic
+          (list (list ?\C-r (lambda (buf)
+                              ;; #### FSF has an EXIT-ACTION argument
+                              ;; to `view-buffer'.
+                              (view-buffer buf)
+                              (setq view-exit-action
+                                    (lambda (ignore)
+                                      (exit-recursive-edit)))
+                              (recursive-edit)
+                              ;; Return nil to ask about BUF again.
+                              nil)
+                      "display the current buffer"))))
+        (abbrevs-done
+         (and save-abbrevs abbrevs-changed
+              (progn
+                (if (or arg
+                        (y-or-n-p (format "Save abbrevs in %s? " abbrev-file-name)))
+                    (write-abbrev-file nil))
+                ;; Don't keep bothering user if he says no.
+                (setq abbrevs-changed nil)
+                t))))
+    (or (> files-done 0) abbrevs-done
+       (display-message 'no-log "(No files need saving)"))
+    switched))
+
+\f
+(defun not-modified (&optional arg)
+  "Mark current buffer as unmodified, not needing to be saved.
+With prefix arg, mark buffer as modified, so \\[save-buffer] will save.
+
+It is not a good idea to use this function in Lisp programs, because it
+prints a message in the minibuffer.  Instead, use `set-buffer-modified-p'."
+  (interactive "_P")
+  (if arg ;; rewritten for I18N3 snarfing
+      (display-message 'command "Modification-flag set")
+    (display-message 'command "Modification-flag cleared"))
+  (set-buffer-modified-p arg))
+
+(defun toggle-read-only (&optional arg)
+  "Toggle the current buffer's read-only status.
+With arg, set read-only iff arg is positive."
+  (interactive "_P")
+  (setq buffer-read-only
+       (if (null arg)
+            (not buffer-read-only)
+            (> (prefix-numeric-value arg) 0)))
+  ;; Force modeline redisplay
+  (redraw-modeline))
+
+(defun insert-file (filename &optional codesys)
+  "Insert contents of file FILENAME into buffer after point.
+Set mark after the inserted text.
+
+Under XEmacs/Mule, optional second argument specifies the
+coding system to use when decoding the file.  Interactively,
+with a prefix argument, you will be prompted for the coding system.
+
+This function is meant for the user to run interactively.
+Don't call it from programs!  Use `insert-file-contents' instead.
+\(Its calling sequence is different; see its documentation)."
+  (interactive "*fInsert file: \nZCoding system: ")
+  (if (file-directory-p filename)
+      (signal 'file-error (list "Opening input file" "file is a directory"
+                               filename)))
+  (let ((tem
+        (if codesys
+            (let ((coding-system-for-read
+                   (get-coding-system codesys)))
+              (insert-file-contents filename))
+          (insert-file-contents filename))))
+    (push-mark (+ (point) (car (cdr tem))))))
+
+(defun append-to-file (start end filename &optional codesys)
+  "Append the contents of the region to the end of file FILENAME.
+When called from a function, expects three arguments,
+START, END and FILENAME.  START and END are buffer positions
+saying what text to write.
+Under XEmacs/Mule, optional fourth argument specifies the
+coding system to use when encoding the file.  Interactively,
+with a prefix argument, you will be prompted for the coding system."
+  (interactive "r\nFAppend to file: \nZCoding system: ")
+  (if codesys
+      (let ((buffer-file-coding-system (get-coding-system codesys)))
+       (write-region start end filename t))
+    (write-region start end filename t)))
+
+(defun file-newest-backup (filename)
+  "Return most recent backup file for FILENAME or nil if no backups exist."
+  (let* ((filename (expand-file-name filename))
+        (file (file-name-nondirectory filename))
+        (dir  (file-name-directory    filename))
+        (comp (file-name-all-completions file dir))
+        newest)
+    (while comp
+      (setq file (concat dir (car comp))
+           comp (cdr comp))
+      (if (and (backup-file-name-p file)
+              (or (null newest) (file-newer-than-file-p file newest)))
+         (setq newest file)))
+    newest))
+
+(defun rename-uniquely ()
+  "Rename current buffer to a similar name not already taken.
+This function is useful for creating multiple shell process buffers
+or multiple mail buffers, etc."
+  (interactive)
+  (save-match-data
+    (let* ((base-name (if (and (string-match "<[0-9]+>\\'" (buffer-name))
+                              (not (and buffer-file-name
+                                        (string= (buffer-name)
+                                                 (file-name-nondirectory
+                                                  buffer-file-name)))))
+                         ;; If the existing buffer name has a <NNN>,
+                         ;; which isn't part of the file name (if any),
+                         ;; then get rid of that.
+                         (substring (buffer-name) 0 (match-beginning 0))
+                       (buffer-name)))
+          (new-buf (generate-new-buffer base-name))
+          (name (buffer-name new-buf)))
+      (kill-buffer new-buf)
+      (rename-buffer name)
+      (redraw-modeline))))
+
+(defun make-directory-path (path)
+  "Create all the directories along path that don't exist yet."
+  (interactive "Fdirectory path to create: ")
+  (make-directory path t))
+
+(defun make-directory (dir &optional parents)
+  "Create the directory DIR and any nonexistent parent dirs.
+Interactively, the default choice of directory to create
+is the current default directory for file names.
+That is useful when you have visited a file in a nonexistent directory.
+
+Noninteractively, the second (optional) argument PARENTS says whether
+to create parent directories if they don't exist."
+  (interactive (list (let ((current-prefix-arg current-prefix-arg))
+                      (read-directory-name "Create directory: "))
+                    current-prefix-arg))
+  (let ((handler (find-file-name-handler dir 'make-directory)))
+    (if handler
+       (funcall handler 'make-directory dir parents)
+      (if (not parents)
+         (make-directory-internal dir)
+       (let ((dir (directory-file-name (expand-file-name dir)))
+             create-list)
+         (while (not (file-exists-p dir))
+           (setq create-list (cons dir create-list)
+                 dir (directory-file-name (file-name-directory dir))))
+         (while create-list
+           (make-directory-internal (car create-list))
+           (setq create-list (cdr create-list))))))))
+\f
+(put 'revert-buffer-function 'permanent-local t)
+(defvar revert-buffer-function nil
+  "Function to use to revert this buffer, or nil to do the default.
+The function receives two arguments IGNORE-AUTO and NOCONFIRM,
+which are the arguments that `revert-buffer' received.")
+
+(put 'revert-buffer-insert-file-contents-function 'permanent-local t)
+(defvar revert-buffer-insert-file-contents-function nil
+  "Function to use to insert contents when reverting this buffer.
+Gets two args, first the nominal file name to use,
+and second, t if reading the auto-save file.")
+
+(defvar before-revert-hook nil
+  "Normal hook for `revert-buffer' to run before reverting.
+If `revert-buffer-function' is used to override the normal revert
+mechanism, this hook is not used.")
+
+(defvar after-revert-hook nil
+  "Normal hook for `revert-buffer' to run after reverting.
+Note that the hook value that it runs is the value that was in effect
+before reverting; that makes a difference if you have buffer-local
+hook functions.
+
+If `revert-buffer-function' is used to override the normal revert
+mechanism, this hook is not used.")
+
+(defvar revert-buffer-internal-hook nil
+  "Don't use this.")
+
+(defun revert-buffer (&optional ignore-auto noconfirm preserve-modes)
+  "Replace the buffer text with the text of the visited file on disk.
+This undoes all changes since the file was visited or saved.
+With a prefix argument, offer to revert from latest auto-save file, if
+that is more recent than the visited file.
+
+This command also works for special buffers that contain text which
+doesn't come from a file, but reflects some other data base instead:
+for example, Dired buffers and buffer-list buffers.  In these cases,
+it reconstructs the buffer contents from the appropriate data base.
+
+When called from Lisp, the first argument is IGNORE-AUTO; only offer
+to revert from the auto-save file when this is nil.  Note that the
+sense of this argument is the reverse of the prefix argument, for the
+sake of backward compatibility.  IGNORE-AUTO is optional, defaulting
+to nil.
+
+Optional second argument NOCONFIRM means don't ask for confirmation at
+all.
+
+Optional third argument PRESERVE-MODES non-nil means don't alter
+the files modes.  Normally we reinitialize them using `normal-mode'.
+
+If the value of `revert-buffer-function' is non-nil, it is called to
+do all the work for this command.  Otherwise, the hooks
+`before-revert-hook' and `after-revert-hook' are run at the beginning
+and the end, and if `revert-buffer-insert-file-contents-function' is
+non-nil, it is called instead of rereading visited file contents."
+
+  ;; I admit it's odd to reverse the sense of the prefix argument, but
+  ;; there is a lot of code out there which assumes that the first
+  ;; argument should be t to avoid consulting the auto-save file, and
+  ;; there's no straightforward way to encourage authors to notice a
+  ;; reversal of the argument sense.  So I'm just changing the user
+  ;; interface, but leaving the programmatic interface the same.
+  (interactive (list (not current-prefix-arg)))
+  (if revert-buffer-function
+      (funcall revert-buffer-function ignore-auto noconfirm)
+    (let* ((opoint (point))
+          (auto-save-p (and (not ignore-auto)
+                             (recent-auto-save-p)
+                            buffer-auto-save-file-name
+                            (file-readable-p buffer-auto-save-file-name)
+                            (y-or-n-p
+   "Buffer has been auto-saved recently.  Revert from auto-save file? ")))
+          (file-name (if auto-save-p
+                         buffer-auto-save-file-name
+                       buffer-file-name)))
+      (cond ((null file-name)
+            (error "Buffer does not seem to be associated with any file"))
+           ((or noconfirm
+                (and (not (buffer-modified-p))
+                     (let (found)
+                       (dolist (rx revert-without-query found)
+                         (when (string-match rx file-name)
+                           (setq found t)))))
+                (yes-or-no-p (format "Revert buffer from file %s? "
+                                     file-name)))
+            (run-hooks 'before-revert-hook)
+            ;; If file was backed up but has changed since,
+            ;; we shd make another backup.
+            (and (not auto-save-p)
+                 (not (verify-visited-file-modtime (current-buffer)))
+                 (setq buffer-backed-up nil))
+            ;; Get rid of all undo records for this buffer.
+            (or (eq buffer-undo-list t)
+                (setq buffer-undo-list nil))
+            ;; Effectively copy the after-revert-hook status,
+            ;; since after-find-file will clobber it.
+            (let ((global-hook (default-value 'after-revert-hook))
+                  (local-hook-p (local-variable-p 'after-revert-hook
+                                                  (current-buffer)))
+                  (local-hook (and (local-variable-p 'after-revert-hook
+                                                     (current-buffer))
+                                   after-revert-hook)))
+              (let (buffer-read-only
+                    ;; Don't make undo records for the reversion.
+                    (buffer-undo-list t))
+                (if revert-buffer-insert-file-contents-function
+                    (funcall revert-buffer-insert-file-contents-function
+                             file-name auto-save-p)
+                  (if (not (file-exists-p file-name))
+                      (error "File %s no longer exists!" file-name))
+                  ;; Bind buffer-file-name to nil
+                  ;; so that we don't try to lock the file.
+                  (let ((buffer-file-name nil))
+                    (or auto-save-p
+                        (unlock-buffer)))
+                  (widen)
+                  (insert-file-contents file-name (not auto-save-p)
+                                        nil nil t)))
+              (goto-char (min opoint (point-max)))
+              ;; Recompute the truename in case changes in symlinks
+              ;; have changed the truename.
+              ;XEmacs: already done by insert-file-contents
+              ;;(setq buffer-file-truename
+                    ;;(abbreviate-file-name (file-truename buffer-file-name)))
+              (after-find-file nil nil t t preserve-modes)
+              ;; Run after-revert-hook as it was before we reverted.
+              (setq-default revert-buffer-internal-hook global-hook)
+              (if local-hook-p
+                  (progn
+                    (make-local-variable 'revert-buffer-internal-hook)
+                    (setq revert-buffer-internal-hook local-hook))
+                (kill-local-variable 'revert-buffer-internal-hook))
+              (run-hooks 'revert-buffer-internal-hook))
+            t)))))
+
+(defun recover-file (file)
+  "Visit file FILE, but get contents from its last auto-save file."
+  ;; Actually putting the file name in the minibuffer should be used
+  ;; only rarely.
+  ;; Not just because users often use the default.
+  (interactive "FRecover file: ")
+  (setq file (expand-file-name file))
+  (let ((handler (or (find-file-name-handler file 'recover-file)
+                   (find-file-name-handler
+                    (let ((buffer-file-name file))
+                      (make-auto-save-file-name))
+                    'recover-file))))
+    (if handler
+       (funcall handler 'recover-file file)
+      (if (auto-save-file-name-p file)
+         (error "%s is an auto-save file" file))
+      (let ((file-name (let ((buffer-file-name file))
+                        (make-auto-save-file-name))))
+       (cond ((if (file-exists-p file)
+                  (not (file-newer-than-file-p file-name file))
+                (not (file-exists-p file-name)))
+              (error "Auto-save file %s not current" file-name))
+             ((save-window-excursion
+                (if (not (eq system-type 'vax-vms))
+                    (with-output-to-temp-buffer "*Directory*"
+                      (buffer-disable-undo standard-output)
+                      (call-process "ls" nil standard-output nil
+                                    (if (file-symlink-p file) "-lL" "-l")
+                                    file file-name)))
+                (yes-or-no-p (format "Recover auto save file %s? " file-name)))
+              (switch-to-buffer (find-file-noselect file t))
+              (let ((buffer-read-only nil))
+                (erase-buffer)
+                (insert-file-contents file-name nil))
+              (after-find-file nil nil t))
+             (t (error "Recover-file cancelled.")))))))
+
+(defun recover-session ()
+  "Recover auto save files from a previous Emacs session.
+This command first displays a Dired buffer showing you the
+previous sessions that you could recover from.
+To choose one, move point to the proper line and then type C-c C-c.
+Then you'll be asked about a number of files to recover."
+  (interactive)
+  (unless (fboundp 'dired)
+    (error "recover-session requires dired"))
+  (if (null auto-save-list-file-prefix)
+      (error
+       "You set `auto-save-list-file-prefix' to disable making session files"))
+  (dired (concat auto-save-list-file-prefix "*"))
+  (goto-char (point-min))
+  (or (looking-at "Move to the session you want to recover,")
+      (let ((inhibit-read-only t))
+       (insert "Move to the session you want to recover,\n"
+               "then type C-c C-c to select it.\n\n"
+               "You can also delete some of these files;\n"
+               "type d on a line to mark that file for deletion.\n\n")))
+  (use-local-map (let ((map (make-sparse-keymap)))
+                  (set-keymap-parents map (list (current-local-map)))
+                  map))
+  (define-key (current-local-map) "\C-c\C-c" 'recover-session-finish))
+
+(defun recover-session-finish ()
+  "Choose one saved session to recover auto-save files from.
+This command is used in the special Dired buffer created by
+\\[recover-session]."
+  (interactive)
+  ;; Get the name of the session file to recover from.
+  (let ((file (dired-get-filename))
+       files
+       (buffer (get-buffer-create " *recover*")))
+    ;; #### dired-do-flagged-delete in FSF.
+    ;; This version is for ange-ftp
+    ;;(dired-do-deletions t)
+    ;; This version is for efs
+    (dired-expunge-deletions)
+    (unwind-protect
+       (save-excursion
+         ;; Read in the auto-save-list file.
+         (set-buffer buffer)
+         (erase-buffer)
+         (insert-file-contents file)
+         ;; Loop thru the text of that file
+         ;; and get out the names of the files to recover.
+         (while (not (eobp))
+           (let (thisfile autofile)
+             (if (eolp)
+                 ;; This is a pair of lines for a non-file-visiting buffer.
+                 ;; Get the auto-save file name and manufacture
+                 ;; a "visited file name" from that.
+                 (progn
+                   (forward-line 1)
+                   (setq autofile
+                         (buffer-substring-no-properties
+                          (point)
+                          (save-excursion
+                            (end-of-line)
+                            (point))))
+                   (setq thisfile
+                         (expand-file-name
+                          (substring
+                           (file-name-nondirectory autofile)
+                           1 -1)
+                          (file-name-directory autofile)))
+                   (forward-line 1))
+               ;; This pair of lines is a file-visiting
+               ;; buffer.  Use the visited file name.
+               (progn
+                 (setq thisfile
+                       (buffer-substring-no-properties
+                        (point) (progn (end-of-line) (point))))
+                 (forward-line 1)
+                 (setq autofile
+                       (buffer-substring-no-properties
+                        (point) (progn (end-of-line) (point))))
+                 (forward-line 1)))
+             ;; Ignore a file if its auto-save file does not exist now.
+             (if (file-exists-p autofile)
+                 (setq files (cons thisfile files)))))
+         (setq files (nreverse files))
+         ;; The file contains a pair of line for each auto-saved buffer.
+         ;; The first line of the pair contains the visited file name
+         ;; or is empty if the buffer was not visiting a file.
+         ;; The second line is the auto-save file name.
+         (if files
+             (map-y-or-n-p  "Recover %s? "
+                            (lambda (file)
+                              (condition-case nil
+                                  (save-excursion (recover-file file))
+                                (error
+                                 "Failed to recover `%s'" file)))
+                            files
+                            '("file" "files" "recover"))
+           (message "No files can be recovered from this session now")))
+      (kill-buffer buffer))))
+
+(defun kill-some-buffers (&optional list)
+  "For each buffer in LIST, ask whether to kill it.
+LIST defaults to all existing live buffers."
+  (interactive)
+  (if (null list)
+      (setq list (buffer-list)))
+  (while list
+    (let* ((buffer (car list))
+          (name (buffer-name buffer)))
+      (and (not (string-equal name ""))
+          (/= (aref name 0) ?\ )
+          (yes-or-no-p
+           (format
+            (if (buffer-modified-p buffer)
+                (gettext "Buffer %s HAS BEEN EDITED.  Kill? ")
+              (gettext "Buffer %s is unmodified.  Kill? "))
+            name))
+          (kill-buffer buffer)))
+    (setq list (cdr list))))
+\f
+(defun auto-save-mode (arg)
+  "Toggle auto-saving of contents of current buffer.
+With prefix argument ARG, turn auto-saving on if positive, else off."
+  (interactive "P")
+  (setq buffer-auto-save-file-name
+        (and (if (null arg)
+                (or (not buffer-auto-save-file-name)
+                    ;; If autosave is off because buffer has shrunk,
+                    ;; then toggling should turn it on.
+                    (< buffer-saved-size 0))
+              (or (eq arg t) (listp arg) (and (integerp arg) (> arg 0))))
+            (if (and buffer-file-name auto-save-visited-file-name
+                     (not buffer-read-only))
+                buffer-file-name
+              (make-auto-save-file-name))))
+  ;; If -1 was stored here, to temporarily turn off saving,
+  ;; turn it back on.
+  (and (< buffer-saved-size 0)
+       (setq buffer-saved-size 0))
+  (if (interactive-p)
+      (if buffer-auto-save-file-name ;; rewritten for I18N3 snarfing
+         (display-message 'command "Auto-save on (in this buffer)")
+       (display-message 'command "Auto-save off (in this buffer)")))
+  buffer-auto-save-file-name)
+
+(defun rename-auto-save-file ()
+  "Adjust current buffer's auto save file name for current conditions.
+Also rename any existing auto save file, if it was made in this session."
+  (let ((osave buffer-auto-save-file-name))
+    (setq buffer-auto-save-file-name
+         (make-auto-save-file-name))
+    (if (and osave buffer-auto-save-file-name
+            (not (string= buffer-auto-save-file-name buffer-file-name))
+            (not (string= buffer-auto-save-file-name osave))
+            (file-exists-p osave)
+            (recent-auto-save-p))
+       (rename-file osave buffer-auto-save-file-name t))))
+
+;; see also ../packages/auto-save.el
+(defun make-auto-save-file-name (&optional filename)
+  "Return file name to use for auto-saves of current buffer.
+Does not consider `auto-save-visited-file-name' as that variable is checked
+before calling this function.  You can redefine this for customization.
+See also `auto-save-file-name-p'."
+  (let ((fname (or filename buffer-file-name))
+       name)
+    (setq name
+         (if fname
+             (concat (file-name-directory fname)
+                     "#"
+                     (file-name-nondirectory fname)
+                     "#")
+
+           ;; Deal with buffers that don't have any associated files.  (Mail
+           ;; mode tends to create a good number of these.)
+
+           (let ((buffer-name (buffer-name))
+                 (limit 0))
+             ;; Use technique from Sebastian Kremer's auto-save
+             ;; package to turn slashes into \\!.  This ensures that
+             ;; the auto-save buffer name is unique.
+
+             ;; #### - yuck!  yuck!  yuck!  move this functionality
+             ;; somewhere else and make the name translation customizable.
+             ;; Using "\!" as part of a filename on a UNIX filesystem is nearly
+             ;; IMPOSSIBLE to get past a shell parser.  -stig
+
+             (while (string-match "[/\\]" buffer-name limit)
+               (setq buffer-name
+                     (concat (substring buffer-name 0 (match-beginning 0))
+                             (if (string= (substring buffer-name
+                                                     (match-beginning 0)
+                                                     (match-end 0))
+                                          "/")
+                                 "\\!"
+                               "\\\\")
+                             (substring buffer-name (match-end 0))))
+               (setq limit (1+ (match-end 0))))
+
+             ;;    (expand-file-name (format "#%s#%s#" (buffer-name) (make-temp-name "")))
+
+             ;; jwz: putting the emacs PID in the auto-save file name
+             ;; is bad news, because that defeats auto-save-recovery of
+             ;; *mail* buffers -- the (sensible) code in sendmail.el
+             ;; calls (make-auto-save-file-name) to determine whether
+             ;; there is unsent, auto-saved mail to recover.  If that
+             ;; mail came from a previous emacs process (far and away
+             ;; the most likely case) then this can never succeed as
+             ;; the pid differs.
+
+             (expand-file-name (format "#%s#" buffer-name)))
+           ))
+    ;; don't try to write auto-save files in unwritable places.  Unless
+    ;; there's already an autosave file here, put ours somewhere safe. --Stig
+    (if (or (file-writable-p name)
+           (file-exists-p name))
+       name
+      (expand-file-name (concat "~/" (file-name-nondirectory name))))))
+
+(defun auto-save-file-name-p (filename)
+  "Return non-nil if FILENAME can be yielded by `make-auto-save-file-name'.
+FILENAME should lack slashes.
+You can redefine this for customization."
+  (string-match "\\`#.*#\\'" filename))
+\f
+(defun wildcard-to-regexp (wildcard)
+  "Given a shell file name pattern WILDCARD, return an equivalent regexp.
+The generated regexp will match a filename iff the filename
+matches that wildcard according to shell rules.  Only wildcards known
+by `sh' are supported."
+  (let* ((i (string-match "[[.*+\\^$?]" wildcard))
+        ;; Copy the initial run of non-special characters.
+        (result (substring wildcard 0 i))
+        (len (length wildcard)))
+    ;; If no special characters, we're almost done.
+    (if i
+       (while (< i len)
+         (let ((ch (aref wildcard i))
+               j)
+           (setq
+            result
+            (concat result
+                    (cond
+                     ((eq ch ?\[)      ; [...] maps to regexp char class
+                      (progn
+                        (setq i (1+ i))
+                        (concat
+                         (cond
+                          ((eq (aref wildcard i) ?!) ; [!...] -> [^...]
+                           (progn
+                             (setq i (1+ i))
+                             (if (eq (aref wildcard i) ?\])
+                                 (progn
+                                   (setq i (1+ i))
+                                   "[^]")
+                               "[^")))
+                          ((eq (aref wildcard i) ?^)
+                           ;; Found "[^".  Insert a `\0' character
+                           ;; (which cannot happen in a filename)
+                           ;; into the character class, so that `^'
+                           ;; is not the first character after `[',
+                           ;; and thus non-special in a regexp.
+                           (progn
+                             (setq i (1+ i))
+                             "[\000^"))
+                          ((eq (aref wildcard i) ?\])
+                           ;; I don't think `]' can appear in a
+                           ;; character class in a wildcard, but
+                           ;; let's be general here.
+                           (progn
+                             (setq i (1+ i))
+                             "[]"))
+                          (t "["))
+                         (prog1        ; copy everything upto next `]'.
+                             (substring wildcard
+                                        i
+                                        (setq j (string-match
+                                                 "]" wildcard i)))
+                           (setq i (if j (1- j) (1- len)))))))
+                     ((eq ch ?.)  "\\.")
+                     ((eq ch ?*)  "[^\000]*")
+                     ((eq ch ?+)  "\\+")
+                     ((eq ch ?^)  "\\^")
+                     ((eq ch ?$)  "\\$")
+                     ((eq ch ?\\) "\\\\") ; probably cannot happen...
+                     ((eq ch ??)  "[^\000]")
+                     (t (char-to-string ch)))))
+           (setq i (1+ i)))))
+    ;; Shell wildcards should match the entire filename,
+    ;; not its part.  Make the regexp say so.
+    (concat "\\`" result "\\'")))
+\f
+(defcustom list-directory-brief-switches
+  (if (eq system-type 'vax-vms) "" "-CF")
+  "*Switches for list-directory to pass to `ls' for brief listing."
+  :type 'string
+  :group 'dired)
+
+(defcustom list-directory-verbose-switches
+  (if (eq system-type 'vax-vms)
+      "/PROTECTION/SIZE/DATE/OWNER/WIDTH=(OWNER:10)"
+    "-l")
+  "*Switches for list-directory to pass to `ls' for verbose listing,"
+  :type 'string
+  :group 'dired)
+
+(defun list-directory (dirname &optional verbose)
+  "Display a list of files in or matching DIRNAME, a la `ls'.
+DIRNAME is globbed by the shell if necessary.
+Prefix arg (second arg if noninteractive) means supply -l switch to `ls'.
+Actions controlled by variables `list-directory-brief-switches'
+and `list-directory-verbose-switches'."
+  (interactive (let ((pfx current-prefix-arg))
+                (list (read-file-name (if pfx (gettext "List directory (verbose): ")
+                                        (gettext "List directory (brief): "))
+                                      nil default-directory nil)
+                      pfx)))
+  (let ((switches (if verbose list-directory-verbose-switches
+                   list-directory-brief-switches)))
+    (or dirname (setq dirname default-directory))
+    (setq dirname (expand-file-name dirname))
+    (with-output-to-temp-buffer "*Directory*"
+      (buffer-disable-undo standard-output)
+      (princ "Directory ")
+      (princ dirname)
+      (terpri)
+      (save-excursion
+       (set-buffer "*Directory*")
+       (setq default-directory (file-name-directory dirname))
+       (let ((wildcard (not (file-directory-p dirname))))
+         (insert-directory dirname switches wildcard (not wildcard)))))))
+
+(defvar insert-directory-program "ls"
+  "Absolute or relative name of the `ls' program used by `insert-directory'.")
+
+;; insert-directory
+;; - must insert _exactly_one_line_ describing FILE if WILDCARD and
+;;   FULL-DIRECTORY-P is nil.
+;;   The single line of output must display FILE's name as it was
+;;   given, namely, an absolute path name.
+;; - must insert exactly one line for each file if WILDCARD or
+;;   FULL-DIRECTORY-P is t, plus one optional "total" line
+;;   before the file lines, plus optional text after the file lines.
+;;   Lines are delimited by "\n", so filenames containing "\n" are not
+;;   allowed.
+;;   File lines should display the basename.
+;; - must be consistent with
+;;   - functions dired-move-to-filename, (these two define what a file line is)
+;;              dired-move-to-end-of-filename,
+;;              dired-between-files, (shortcut for (not (dired-move-to-filename)))
+;;              dired-insert-headerline
+;;              dired-after-subdir-garbage (defines what a "total" line is)
+;;   - variable dired-subdir-regexp
+(defun insert-directory (file switches &optional wildcard full-directory-p)
+  "Insert directory listing for FILE, formatted according to SWITCHES.
+Leaves point after the inserted text.
+SWITCHES may be a string of options, or a list of strings.
+Optional third arg WILDCARD means treat FILE as shell wildcard.
+Optional fourth arg FULL-DIRECTORY-P means file is a directory and
+switches do not contain `d', so that a full listing is expected.
+
+This works by running a directory listing program
+whose name is in the variable `insert-directory-program'.
+If WILDCARD, it also runs the shell specified by `shell-file-name'."
+  ;; We need the directory in order to find the right handler.
+  (let ((handler (find-file-name-handler (expand-file-name file)
+                                        'insert-directory)))
+    (if handler
+       (funcall handler 'insert-directory file switches
+                wildcard full-directory-p)
+      (cond
+       ((eq system-type 'vax-vms)
+       (vms-read-directory file switches (current-buffer)))
+       ((and (fboundp 'mswindows-insert-directory)
+            (eq system-type 'windows-nt))
+       (mswindows-insert-directory file switches wildcard full-directory-p))
+       (t
+       (if wildcard
+           ;; Run ls in the directory of the file pattern we asked for.
+           (let ((default-directory
+                      (if (file-name-absolute-p file)
+                          (file-name-directory file)
+                          (file-name-directory (expand-file-name file))))
+                 (pattern (file-name-nondirectory file))
+                 (beg 0))
+             ;; Quote some characters that have special meanings in shells;
+             ;; but don't quote the wildcards--we want them to be special.
+             ;; We also currently don't quote the quoting characters
+             ;; in case people want to use them explicitly to quote
+             ;; wildcard characters.
+              ;;#### Unix-specific
+             (while (string-match "[ \t\n;<>&|()#$]" pattern beg)
+               (setq pattern
+                     (concat (substring pattern 0 (match-beginning 0))
+                             "\\"
+                             (substring pattern (match-beginning 0)))
+                     beg (1+ (match-end 0))))
+             (call-process shell-file-name nil t nil
+                           "-c" (concat "\\"  ;; Disregard shell aliases!
+                                        insert-directory-program
+                                        " -d "
+                                        (if (stringp switches)
+                                            switches
+                                          (mapconcat 'identity switches " "))
+                                        " "
+                                        pattern)))
+         ;; SunOS 4.1.3, SVr4 and others need the "." to list the
+         ;; directory if FILE is a symbolic link.
+         (apply 'call-process
+                insert-directory-program nil t nil
+                (let (list)
+                  (if (listp switches)
+                      (setq list switches)
+                    (if (not (equal switches ""))
+                        (progn
+                          ;; Split the switches at any spaces
+                          ;; so we can pass separate options as separate args.
+                          (while (string-match " " switches)
+                            (setq list (cons (substring switches 0 (match-beginning 0))
+                                             list)
+                                  switches (substring switches (match-end 0))))
+                          (setq list (cons switches list)))))
+                  (append list
+                          (list
+                           (if full-directory-p
+                               (concat (file-name-as-directory file)
+                                       ;;#### Unix-specific
+                                       ".")
+                             file)))))))))))
+
+(defvar kill-emacs-query-functions nil
+  "Functions to call with no arguments to query about killing XEmacs.
+If any of these functions returns nil, killing Emacs is cancelled.
+`save-buffers-kill-emacs' (\\[save-buffers-kill-emacs]) calls these functions,
+but `kill-emacs', the low level primitive, does not.
+See also `kill-emacs-hook'.")
+
+(defun save-buffers-kill-emacs (&optional arg)
+  "Offer to save each buffer, then kill this XEmacs process.
+With prefix arg, silently save all file-visiting buffers, then kill."
+  (interactive "P")
+  (save-some-buffers arg t)
+  (and (or (not (memq t (mapcar #'(lambda (buf) (and (buffer-file-name buf)
+                                                    (buffer-modified-p buf)))
+                               (buffer-list))))
+          (yes-or-no-p "Modified buffers exist; exit anyway? "))
+       (or (not (fboundp 'process-list))
+          ;; process-list is not defined on VMS.
+          (let ((processes (process-list))
+                active)
+            (while processes
+              (and (memq (process-status (car processes)) '(run stop open))
+                   (let ((val (process-kill-without-query (car processes))))
+                     (process-kill-without-query (car processes) val)
+                     val)
+                   (setq active t))
+              (setq processes (cdr processes)))
+            (or
+             (not active)
+             (save-excursion
+               (save-window-excursion
+                 (delete-other-windows)
+                 (list-processes)
+                 (yes-or-no-p
+                  "Active processes exist; kill them and exit anyway? "))))))
+       ;; Query the user for other things, perhaps.
+       (run-hook-with-args-until-failure 'kill-emacs-query-functions)
+       (kill-emacs)))
+
+(defun symlink-expand-file-name (filename)
+  "If FILENAME is a symlink, return its non-symlink equivalent.
+Unlike `file-truename', this doesn't chase symlinks in directory
+components of the file or expand a relative pathname into an
+absolute one."
+  (let ((count 20))
+    (while (and (> count 0) (file-symlink-p filename))
+      (setq filename (file-symlink-p filename)
+           count (1- count)))
+    (if (> count 0)
+       filename
+      (error "Apparently circular symlink path"))))
+
+;; Suggested by Michael Kifer <kifer@CS.SunySB.EDU>
+(defun file-remote-p (file-name)
+  "Test whether FILE-NAME is looked for on a remote system."
+  (cond ((not allow-remote-paths) nil)
+       ((featurep 'ange-ftp) (ange-ftp-ftp-path file-name))
+       ((fboundp 'efs-ftp-path) (efs-ftp-path file-name))
+       (t nil)))
+
+;; #### FSF has file-name-non-special here.
+
+;;; files.el ends here
diff --git a/lisp/fill.el b/lisp/fill.el
new file mode 100644 (file)
index 0000000..f76a017
--- /dev/null
@@ -0,0 +1,1077 @@
+;;; fill.el --- fill commands for XEmacs.
+
+;; Copyright (C) 1985, 86, 92, 94, 95, 1997 Free Software Foundation, Inc.
+
+;; Maintainer: XEmacs Development Team
+;; Keywords: wp, dumped
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: FSF 19.34.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; All the commands for filling text.  These are documented in the XEmacs
+;; Reference Manual.
+
+;; 97/3/14 Jareth Hein (jhod@po.iijnet.or.jp) added functions for kinsoku (asian text
+;; line break processing)
+;; 97/06/11 Steve Baur (steve@altair.xemacs.org) converted broken
+;;  following-char/preceding-char calls to char-after/char-before.
+
+;;; Code:
+
+(defgroup fill nil
+  "Indenting and filling text."
+  :group 'editing)
+
+(defcustom fill-individual-varying-indent nil
+  "*Controls criterion for a new paragraph in `fill-individual-paragraphs'.
+Non-nil means changing indent doesn't end a paragraph.
+That mode can handle paragraphs with extra indentation on the first line,
+but it requires separator lines between paragraphs.
+A value of nil means that any change in indentation starts a new paragraph."
+  :type 'boolean
+  :group 'fill)
+
+(defcustom sentence-end-double-space t
+  "*Non-nil means a single space does not end a sentence.
+This variable applies only to filling, not motion commands.  To
+change the behavior of motion commands, see `sentence-end'."
+  :type 'boolean
+  :group 'fill)
+
+(defcustom colon-double-space nil
+  "*Non-nil means put two spaces after a colon when filling."
+  :type 'boolean
+  :group 'fill)
+
+(defvar fill-paragraph-function nil
+  "Mode-specific function to fill a paragraph, or nil if there is none.
+If the function returns nil, then `fill-paragraph' does its normal work.")
+
+(defun set-fill-prefix ()
+  "Set the fill prefix to the current line up to point.
+Filling expects lines to start with the fill prefix and
+reinserts the fill prefix in each resulting line."
+  (interactive)
+  (setq fill-prefix (buffer-substring
+                    (save-excursion (move-to-left-margin) (point))
+                    (point)))
+  (if (equal fill-prefix "")
+      (setq fill-prefix nil))
+  (if fill-prefix
+      (message "fill-prefix: \"%s\"" fill-prefix)
+    (message "fill-prefix cancelled")))
+
+(defcustom adaptive-fill-mode t
+  "*Non-nil means determine a paragraph's fill prefix from its text."
+  :type 'boolean
+  :group 'fill)
+
+;; #### - this is still weak.  Yeah, there's filladapt, but this should
+;; still be better...  --Stig
+(defcustom adaptive-fill-regexp (purecopy "[ \t]*\\([#;>*]+ +\\)?")
+  "*Regexp to match text at start of line that constitutes indentation.
+If Adaptive Fill mode is enabled, whatever text matches this pattern
+on the second line of a paragraph is used as the standard indentation
+for the paragraph.  If the paragraph has just one line, the indentation
+is taken from that line."
+  :type 'regexp
+  :group 'fill)
+
+(defcustom adaptive-fill-function nil
+  "*Function to call to choose a fill prefix for a paragraph.
+This function is used when `adaptive-fill-regexp' does not match."
+  :type 'function
+  :group 'fill)
+
+;; Added for kinsoku processing. Use this instead of 
+;; (skip-chars-backward "^ \t\n")
+;; (skip-chars-backward "^ \n" linebeg)
+(defun fill-move-backward-to-break-point (regexp &optional lim)
+  (let ((opoint (point)))
+    ;; 93.8.23 by kawamoto@ics.es.osaka-u.ac.jp
+    ;;  case of first 'word' being longer than fill-column
+    (if (not (re-search-backward regexp lim 'move))
+       nil
+      ;; we have skipped backward SPC or WAN (word-across-newline).  So move point forward again.
+      (forward-char)
+      (if (< opoint (point))
+         (forward-char -1)))))
+
+;; Added for kinsoku processing. Use instead of
+;; (re-search-forward "[ \t]" opoint t)
+;; (skip-chars-forward "^ \n")
+;; (skip-chars-forward "^ \n")
+(defun fill-move-forward-to-break-point (regexp &optional lim)
+  (let ((opoint (point)))
+    (if (not (re-search-forward regexp lim 'move))
+       nil
+      (forward-char -1)
+      (if (< (point) opoint)
+         (forward-char))))
+  (if (featurep 'mule) (kinsoku-process-extend)))
+
+(defun fill-end-of-sentence-p ()
+  (save-excursion
+    (skip-chars-backward " ]})\"'")
+    (memq (char-before (point)) '(?. ?? ?!))))
+
+(defun current-fill-column ()
+  "Return the fill-column to use for this line.
+The fill-column to use for a buffer is stored in the variable `fill-column',
+but can be locally modified by the `right-margin' text property, which is
+subtracted from `fill-column'.
+
+The fill column to use for a line is the first column at which the column
+number equals or exceeds the local fill-column - right-margin difference."
+  (save-excursion
+    (if fill-column
+       (let* ((here (progn (beginning-of-line) (point)))
+              (here-col 0)
+              (eol (progn (end-of-line) (point)))
+              margin fill-col change col)
+         ;; Look separately at each region of line with a different right-margin.
+         (while (and (setq margin (get-text-property here 'right-margin)
+                           fill-col (- fill-column (or margin 0))
+                           change (text-property-not-all
+                                   here eol 'right-margin margin))
+                     (progn (goto-char (1- change))
+                            (setq col (current-column))
+                            (< col fill-col)))
+           (setq here change
+                 here-col col))
+         (max here-col fill-col)))))
+
+(defun canonically-space-region (beg end)
+  "Remove extra spaces between words in region.
+Leave one space between words, two at end of sentences or after colons
+\(depending on values of `sentence-end-double-space' and `colon-double-space').
+Remove indentation from each line."
+  (interactive "r")
+  ;;;### 97/3/14 jhod: Do I have to add anything here for kinsoku?
+  (save-excursion
+    (goto-char beg)
+    ;; XEmacs - (ENE/stig from fa-extras.el): Skip the start of a comment.
+    (and comment-start-skip
+        (looking-at comment-start-skip)
+        (goto-char (match-end 0)))
+    ;; Nuke tabs; they get screwed up in a fill.
+    ;; This is quick, but loses when a tab follows the end of a sentence.
+    ;; Actually, it is difficult to tell that from "Mr.\tSmith".
+    ;; Blame the typist.
+    (subst-char-in-region beg end ?\t ?\ )
+    (while (and (< (point) end)
+               (re-search-forward "   *" end t))
+      (delete-region
+       (+ (match-beginning 0)
+         ;; Determine number of spaces to leave:
+         (save-excursion
+           (skip-chars-backward " ]})\"'")
+           (cond ((and sentence-end-double-space
+                       (memq (char-before (point)) '(?. ?? ?!)))  2)
+                 ((and colon-double-space
+                       (eq (char-before (point)) ?:))  2)
+                 ((char-equal (char-before (point)) ?\n)  0)
+                 (t 1))))
+       (match-end 0)))
+    ;; Make sure sentences ending at end of line get an extra space.
+    ;; loses on split abbrevs ("Mr.\nSmith")
+    (goto-char beg)
+    (while (and (< (point) end)
+               (re-search-forward "[.?!][])}\"']*$" end t))
+      ;; We insert before markers in case a caller such as
+      ;; do-auto-fill has done a save-excursion with point at the end
+      ;; of the line and wants it to stay at the end of the line.
+      (insert ? ))))
+;; XEmacs: we don't have this function.
+;; (insert-before-markers-and-inherit ? ))))
+
+;; XEmacs -- added DONT-SKIP-FIRST.  Port of older code changes by Stig.
+;; #### probably this junk is broken -- do-auto-fill doesn't actually use
+;; it.  If so, it should be removed.
+
+(defun fill-context-prefix (from to &optional first-line-regexp
+                                dont-skip-first)
+  "Compute a fill prefix from the text between FROM and TO.
+This uses the variables `adaptive-fill-prefix' and `adaptive-fill-function'.
+If FIRST-LINE-REGEXP is non-nil, then when taking a prefix from the
+first line, insist it must match FIRST-LINE-REGEXP."
+  (save-excursion
+    (goto-char from)
+    (if (eolp) (forward-line 1))
+    ;; Move to the second line unless there is just one.
+    (let ((firstline (point))
+         ;; Non-nil if we are on the second line.
+         at-second
+         result)
+      ;; XEmacs change
+      (if (not dont-skip-first)
+         (forward-line 1))
+      (if (>= (point) to)
+         (goto-char firstline)
+       (setq at-second t))
+      (move-to-left-margin)
+      ;; XEmacs change
+      (let ((start (point))
+           ; jhod: no longer used?
+           ;(eol (save-excursion (end-of-line) (point)))
+           )
+       (setq result
+             (if (not (looking-at paragraph-start))
+                 (cond ((and adaptive-fill-regexp (looking-at adaptive-fill-regexp))
+                        (buffer-substring-no-properties start (match-end 0)))
+                       (adaptive-fill-function (funcall adaptive-fill-function)))))
+       (and result
+            (or at-second
+                (null first-line-regexp)
+                (string-match first-line-regexp result))
+            result)))))
+
+;; XEmacs (stig) - this is pulled out of fill-region-as-paragraph so that it
+;; can also be called from do-auto-fill
+;; #### But it's not used there.  Chuck pulled it out because it broke things.
+(defun maybe-adapt-fill-prefix (&optional from to dont-skip-first)
+  (if (and adaptive-fill-mode
+          (or (null fill-prefix) (string= fill-prefix "")))
+      (setq fill-prefix (fill-context-prefix from to nil dont-skip-first))))
+
+(defun fill-region-as-paragraph (from to &optional justify
+                                     nosqueeze squeeze-after)
+  "Fill the region as one paragraph.
+It removes any paragraph breaks in the region and extra newlines at the end,
+indents and fills lines between the margins given by the
+`current-left-margin' and `current-fill-column' functions.
+It leaves point at the beginning of the line following the paragraph.
+
+Normally performs justification according to the `current-justification'
+function, but with a prefix arg, does full justification instead.
+
+From a program, optional third arg JUSTIFY can specify any type of
+justification.  Fourth arg NOSQUEEZE non-nil means not to make spaces
+between words canonical before filling.  Fifth arg SQUEEZE-AFTER, if non-nil,
+means don't canonicalize spaces before that position.
+
+If `sentence-end-double-space' is non-nil, then period followed by one
+space does not end a sentence, so don't break a line there."
+  (interactive
+   (progn
+     ;; XEmacs addition:
+     (barf-if-buffer-read-only nil (region-beginning) (region-end))
+     (list (region-beginning) (region-end)
+          (if current-prefix-arg 'full))))
+  ;; Arrange for undoing the fill to restore point.
+  (if (and buffer-undo-list (not (eq buffer-undo-list t)))
+      (setq buffer-undo-list (cons (point) buffer-undo-list)))
+
+  ;; Make sure "to" is the endpoint.
+  (goto-char (min from to))
+  (setq to   (max from to))
+  ;; Ignore blank lines at beginning of region.
+  (skip-chars-forward " \t\n")
+
+  (let ((from-plus-indent (point))
+       (oneleft nil))
+
+    (beginning-of-line)
+    (setq from (point))
+  
+    ;; Delete all but one soft newline at end of region.
+    ;; And leave TO before that one.
+    (goto-char to)
+    (while (and (> (point) from) (eq ?\n (char-after (1- (point)))))
+      (if (and oneleft
+              (not (and use-hard-newlines
+                        (get-text-property (1- (point)) 'hard))))
+         (delete-backward-char 1)
+       (backward-char 1)
+       (setq oneleft t)))
+    (setq to (point))
+
+    ;; If there was no newline, and there is text in the paragraph, then
+    ;; create a newline.
+    (if (and (not oneleft) (> to from-plus-indent))
+       (newline))
+    (goto-char from-plus-indent))
+
+  (if (not (> to (point)))
+      nil ; There is no paragraph, only whitespace: exit now.
+
+    (or justify (setq justify (current-justification)))
+
+    ;; Don't let Adaptive Fill mode alter the fill prefix permanently.
+    (let ((fill-prefix fill-prefix))
+      ;; Figure out how this paragraph is indented, if desired.
+      ;; XEmacs: move some code here to a separate function.
+      (maybe-adapt-fill-prefix from to t)
+
+      (save-restriction
+       (goto-char from)
+       (beginning-of-line)
+       (narrow-to-region (point) to)
+
+       (if (not justify)           ; filling disabled: just check indentation
+           (progn
+             (goto-char from)
+             (while (not (eobp))
+               (if (and (not (eolp))
+                        (< (current-indentation) (current-left-margin)))
+                   (indent-to-left-margin))
+               (forward-line 1)))
+
+         (if use-hard-newlines
+             (remove-text-properties from (point-max) '(hard nil)))
+         ;; Make sure first line is indented (at least) to left margin...
+         (if (or (memq justify '(right center))
+                 (< (current-indentation) (current-left-margin)))
+             (indent-to-left-margin))
+         ;; Delete the fill prefix from every line except the first.
+         ;; The first line may not even have a fill prefix.
+         (goto-char from)
+         (let ((fpre (and fill-prefix (not (equal fill-prefix ""))
+                          (concat "[ \t]*"
+                                  (regexp-quote fill-prefix)
+                                  "[ \t]*"))))
+           (and fpre
+                (progn
+                  (if (>= (+ (current-left-margin) (length fill-prefix))
+                          (current-fill-column))
+                      (error "fill-prefix too long for specified width"))
+                  (goto-char from)
+                  (forward-line 1)
+                  (while (not (eobp))
+                    (if (looking-at fpre)
+                        (delete-region (point) (match-end 0)))
+                    (forward-line 1))
+                  (goto-char from)
+                  (if (looking-at fpre)
+                      (goto-char (match-end 0)))
+                  (setq from (point)))))
+         ;; Remove indentation from lines other than the first.
+         (beginning-of-line 2)
+         (indent-region (point) (point-max) 0)
+         (goto-char from)
+
+         ;; FROM, and point, are now before the text to fill,
+         ;; but after any fill prefix on the first line.
+
+         ;; Make sure sentences ending at end of line get an extra space.
+         ;; loses on split abbrevs ("Mr.\nSmith")
+         (while (re-search-forward "[.?!][])}\"']*$" nil t)
+           ;; XEmacs change (no insert-and-inherit)
+           (or (eobp) (insert ?\  ?\ )))
+         (goto-char from)
+         (skip-chars-forward " \t")
+         ;; Then change all newlines to spaces.
+         ;;; 97/3/14 jhod: Kinsoku change
+         ;; Spacing is not necessary for charcters of no word-separater.
+         ;; The regexp word-across-newline is used for this check.
+         (if (not (and (featurep 'mule)
+                       (stringp word-across-newline)))
+             (subst-char-in-region from (point-max) ?\n ?\ )
+           ;;
+           ;; WAN     +NL+WAN       --> WAN            + WAN
+           ;; not(WAN)+NL+WAN       --> not(WAN)       + WAN
+           ;; WAN     +NL+not(WAN)  --> WAN            + not(WAN)
+           ;; SPC     +NL+not(WAN)  --> SPC            + not(WAN)
+           ;; not(WAN)+NL+not(WAN)  --> not(WAN) + SPC + not(WAN)
+           ;;
+           (goto-char from)
+           (end-of-line)
+           (while (not (eobp))
+             ;; Insert SPC only when point is between nonWAN.  Insert
+             ;; before deleting to preserve marker if possible.
+             (if (or (prog2            ; check following char.
+                         (forward-char)        ; skip newline
+                         (or (eobp)
+                             (looking-at word-across-newline))
+                       (forward-char -1))
+                     (prog2            ; check previous char.
+                         (forward-char -1)
+                         (or (eq (char-after (point)) ?\ )
+                             (looking-at word-across-newline))
+                       (forward-char)))
+                 nil
+               (insert ?\ ))
+             (delete-char 1)           ; delete newline
+             (end-of-line)))
+         ;; end patch
+         (goto-char from)
+         (skip-chars-forward " \t")
+         (if (and nosqueeze (not (eq justify 'full)))
+             nil
+           (canonically-space-region (or squeeze-after (point)) (point-max))
+           (goto-char (point-max))
+           (delete-horizontal-space)
+           ;; XEmacs change (no insert-and-inherit)
+           (insert " "))
+         (goto-char (point-min))
+
+         ;; This is the actual filling loop.
+         (let ((prefixcol 0) linebeg
+               (re-break-point (if (featurep 'mule)
+                                   (concat "[ \n\t]\\|" word-across-newline)
+                                 "[ \n\t]")))
+           (while (not (eobp))
+             (setq linebeg (point))
+             (move-to-column (1+ (current-fill-column)))
+             (if (eobp)
+                 (or nosqueeze (delete-horizontal-space))
+               ;; Move back to start of word.
+               ;; 97/3/14 jhod: Kinsoku
+               ;(skip-chars-backward "^ \n" linebeg)
+               (fill-move-backward-to-break-point re-break-point linebeg)
+               ;; end patch
+               ;; Don't break after a period followed by just one space.
+               ;; Move back to the previous place to break.
+               ;; The reason is that if a period ends up at the end of a line,
+               ;; further fills will assume it ends a sentence.
+               ;; If we now know it does not end a sentence,
+               ;; avoid putting it at the end of the line.
+               (if sentence-end-double-space
+                   (while (and (> (point) (+ linebeg 2))
+                               (eq (char-before (point)) ?\ )
+                               (not (eq (char-after (point)) ?\ ))
+                               (eq (char-after (- (point) 2)) ?\.))
+                     (forward-char -2)
+                     ;; 97/3/14 jhod: Kinsoku
+                     ;(skip-chars-backward "^ \n" linebeg)))
+                     (fill-move-backward-to-break-point re-break-point linebeg)))
+               (if (featurep 'mule) (kinsoku-process))
+               ;end patch
+
+               ;; If the left margin and fill prefix by themselves
+               ;; pass the fill-column. or if they are zero
+               ;; but we have no room for even one word,
+               ;; keep at least one word anyway.
+               ;; This handles ALL BUT the first line of the paragraph.
+               (if (if (zerop prefixcol)
+                       (save-excursion
+                         (skip-chars-backward " \t" linebeg)
+                         (bolp))
+                     (>= prefixcol (current-column)))
+                   ;; Ok, skip at least one word.
+                   ;; Meanwhile, don't stop at a period followed by one space.
+                   (let ((first t))
+                     (move-to-column prefixcol)
+                     (while (and (not (eobp))
+                                 (or first
+                                     (and (not (bobp))
+                                          sentence-end-double-space
+                                          (save-excursion (forward-char -1)
+                                                          (and (looking-at "\\. ")
+                                                               (not (looking-at "\\.  ")))))))
+                       (skip-chars-forward " \t")
+                       ;; 94/3/14 jhod: Kinsoku
+                       ;(skip-chars-forward "^ \n\t")
+                       (fill-move-forward-to-break-point re-break-point)
+                       ;; end patch
+                       (setq first nil)))
+                 ;; Normally, move back over the single space between the words.
+                 (if (eq (char-before (point)) ?\ )
+                     (forward-char -1)))
+               ;; If the left margin and fill prefix by themselves
+               ;; pass the fill-column, keep at least one word.
+               ;; This handles the first line of the paragraph.
+               (if (and (zerop prefixcol)
+                        (let ((fill-point (point)) nchars)
+                          (save-excursion
+                            (move-to-left-margin)
+                            (setq nchars (- fill-point (point)))
+                            (or (< nchars 0)
+                                (and fill-prefix
+                                     (< nchars (length fill-prefix))
+                                     (string= (buffer-substring (point) fill-point)
+                                              (substring fill-prefix 0 nchars)))))))
+                   ;; Ok, skip at least one word.  But
+                   ;; don't stop at a period followed by just one space.
+                   (let ((first t))
+                     (while (and (not (eobp))
+                                 (or first
+                                     (and (not (bobp))
+                                          sentence-end-double-space
+                                          (save-excursion (forward-char -1)
+                                                          (and (looking-at "\\. ")
+                                                               (not (looking-at "\\.  ")))))))
+                       (skip-chars-forward " \t")
+                       ;; 97/3/14 jhod: Kinsoku
+                       ;(skip-chars-forward "^ \t\n")
+                       (fill-move-forward-to-break-point re-break-point)
+                       ;; end patch
+                       (setq first nil))))
+               ;; Check again to see if we got to the end of the paragraph.
+               (if (save-excursion (skip-chars-forward " \t") (eobp))
+                   (or nosqueeze (delete-horizontal-space))
+                 ;; Replace whitespace here with one newline, then indent to left
+                 ;; margin.
+                 (skip-chars-backward " \t")
+                 ;; 97/3/14 jhod: More kinsoku stuff
+                 (if (featurep 'mule)
+                     ;; WAN means chars which match word-across-newline.
+                     ;; (0)     | SPC + SPC* <EOB>     --> NL
+                     ;; (1) WAN | SPC + SPC*           --> WAN + SPC + NL
+                     ;; (2)     | SPC + SPC* + WAN     --> SPC + NL  + WAN
+                     ;; (3) '.' | SPC + nonSPC         --> '.' + SPC + NL + nonSPC
+                     ;; (4) '.' | SPC + SPC            --> '.' + NL
+                     ;; (5)     | SPC*                 --> NL
+                     (let ((start (point))     ; 92.6.30 by K.Handa
+                           (ch (char-after (point))))
+                       (if (and (= ch ? )
+                                (progn         ; not case (0) -- 92.6.30 by K.Handa
+                                  (skip-chars-forward " \t")
+                                  (not (eobp)))
+                                (or
+                                 (progn        ; case (1)
+                                   (goto-char start)
+                                   (forward-char -1)
+                                   (looking-at word-across-newline))
+                                 (progn        ; case (2)
+                                   (goto-char start)
+                                   (skip-chars-forward " \t")
+                                   (and (not (eobp))
+                                        (looking-at word-across-newline)
+                                        ;; never leave space after the end of sentence
+                                        (not (fill-end-of-sentence-p))))
+                                 (progn        ; case (3)
+                                   (goto-char (1+ start))
+                                   (and (not (eobp))
+                                        (not (eq (char-after (point)) ? ))
+                                        (fill-end-of-sentence-p)))))
+                           ;; We should keep one SPACE before NEWLINE. (1),(2),(3)
+                           (goto-char (1+ start))
+                         ;; We should delete all SPACES around break point. (4),(5)
+                         (goto-char start))))
+                 ;; end of patch
+                 (insert ?\n)
+                 ;; Give newline the properties of the space(s) it replaces
+                 (set-text-properties (1- (point)) (point)
+                                      (text-properties-at (point)))
+                 (indent-to-left-margin)
+                 ;; Insert the fill prefix after indentation.
+                 ;; Set prefixcol so whitespace in the prefix won't get lost.
+                 (and fill-prefix (not (equal fill-prefix ""))
+                      (progn
+                        (insert fill-prefix)
+                        (setq prefixcol (current-column))))))
+             ;; Justify the line just ended, if desired.
+             (if justify
+                 (if (save-excursion (skip-chars-forward " \t") (eobp))
+                     (progn
+                       (delete-horizontal-space)
+                       (justify-current-line justify t t))
+                   (forward-line -1)
+                   (justify-current-line justify nil t)
+                   (forward-line 1))))))
+       ;; Leave point after final newline.
+       (goto-char (point-max)))
+    (forward-char 1))))
+
+(defun fill-paragraph (arg)
+  "Fill paragraph at or after point.  Prefix arg means justify as well.
+If `sentence-end-double-space' is non-nil, then period followed by one
+space does not end a sentence, so don't break a line there.
+
+If `fill-paragraph-function' is non-nil, we call it (passing our
+argument to it), and if it returns non-nil, we simply return its value."
+  (interactive (list (if current-prefix-arg 'full)))
+  (or (and fill-paragraph-function
+          (let ((function fill-paragraph-function)
+                fill-paragraph-function)
+            (funcall function arg)))
+      (let ((before (point)))
+       (save-excursion
+         (forward-paragraph)
+         (or (bolp) (newline 1))
+         (let ((end (point))
+               (beg (progn (backward-paragraph) (point))))
+           (goto-char before)
+           (if use-hard-newlines
+               ;; Can't use fill-region-as-paragraph, since this paragraph may
+               ;; still contain hard newlines.  See fill-region.
+               (fill-region beg end arg)
+             (fill-region-as-paragraph beg end arg)))))))
+
+(defun fill-region (from to &optional justify nosqueeze to-eop)
+  "Fill each of the paragraphs in the region.
+Prefix arg (non-nil third arg, if called from program) means justify as well.
+
+Noninteractively, fourth arg NOSQUEEZE non-nil means to leave
+whitespace other than line breaks untouched, and fifth arg TO-EOP
+non-nil means to keep filling to the end of the paragraph (or next
+hard newline, if `use-hard-newlines' is on).
+
+If `sentence-end-double-space' is non-nil, then period followed by one
+space does not end a sentence, so don't break a line there."
+  (interactive
+   (progn
+     ;; XEmacs addition:
+     (barf-if-buffer-read-only nil (region-beginning) (region-end))
+     (list (region-beginning) (region-end)
+          (if current-prefix-arg 'full))))
+  (let (end beg)
+    (save-restriction
+      (goto-char (max from to))
+      (if to-eop
+         (progn (skip-chars-backward "\n")
+                (forward-paragraph)))
+      (setq end (point))
+      (goto-char (setq beg (min from to)))
+      (beginning-of-line)
+      (narrow-to-region (point) end)
+      (while (not (eobp))
+       (let ((initial (point))
+             end)
+         ;; If using hard newlines, break at every one for filling
+         ;; purposes rather than using paragraph breaks. 
+         (if use-hard-newlines
+             (progn 
+               (while (and (setq end (text-property-any (point) (point-max)
+                                                        'hard t))
+                           (not (eq ?\n (char-after end)))
+                           (not (= end (point-max))))
+                 (goto-char (1+ end)))
+               (setq end (if end (min (point-max) (1+ end)) (point-max)))
+               (goto-char initial))
+           (forward-paragraph 1)
+           (setq end (point))
+           (forward-paragraph -1))
+         (if (< (point) beg)
+             (goto-char beg))
+         (if (>= (point) initial)
+             (fill-region-as-paragraph (point) end justify nosqueeze)
+           (goto-char end)))))))
+
+;; XEmacs addition: from Tim Bradshaw <tfb@edinburgh.ac.uk>
+(defun fill-paragraph-or-region (arg)
+  "Fill the current region, if it's active; otherwise, fill the paragraph.
+See `fill-paragraph' and `fill-region' for more information."
+  (interactive "*P")
+  (if (region-active-p)
+      (fill-region (point) (mark) arg)
+    (fill-paragraph arg)))
+
+\f  
+(defconst default-justification 'left
+  "*Method of justifying text not otherwise specified.
+Possible values are `left', `right', `full', `center', or `none'.
+The requested kind of justification is done whenever lines are filled.
+The `justification' text-property  can locally override this variable.
+This variable automatically becomes buffer-local when set in any fashion.")
+(make-variable-buffer-local 'default-justification)
+
+(defun current-justification ()
+  "How should we justify this line?
+This returns the value of the text-property `justification',
+or the variable `default-justification' if there is no text-property.
+However, it returns nil rather than `none' to mean \"don't justify\"."
+  (let ((j (or (get-text-property 
+               ;; Make sure we're looking at paragraph body.
+               (save-excursion (skip-chars-forward " \t") 
+                               (if (and (eobp) (not (bobp)))
+                                   (1- (point)) (point)))
+               'justification)
+              default-justification)))
+    (if (eq 'none j)
+       nil
+      j)))
+
+(defun set-justification (begin end value &optional whole-par)
+  "Set the region's justification style.
+The kind of justification to use is prompted for.
+If the mark is not active, this command operates on the current paragraph.
+If the mark is active, the region is used.  However, if the beginning and end
+of the region are not at paragraph breaks, they are moved to the beginning and
+end of the paragraphs they are in.
+If `use-hard-newlines' is true, all hard newlines are taken to be paragraph
+breaks.
+
+When calling from a program, operates just on region between BEGIN and END,
+unless optional fourth arg WHOLE-PAR is non-nil.  In that case bounds are
+extended to include entire paragraphs as in the interactive command."
+  ;; XEmacs change (was mark-active)
+  (interactive (list (if (region-active-p) (region-beginning) (point))
+                    (if (region-active-p) (region-end) (point))
+                    (let ((s (completing-read
+                              "Set justification to: "
+                              '(("left") ("right") ("full")
+                                ("center") ("none"))
+                              nil t)))
+                      (if (equal s "") (error ""))
+                      (intern s))
+                    t))
+  (save-excursion
+    (save-restriction
+      (if whole-par
+         (let ((paragraph-start (if use-hard-newlines "." paragraph-start))
+               (paragraph-ignore-fill-prefix (if use-hard-newlines t 
+                                               paragraph-ignore-fill-prefix)))
+           (goto-char begin)
+           (while (and (bolp) (not (eobp))) (forward-char 1))
+           (backward-paragraph)
+           (setq begin (point))
+           (goto-char end)
+           (skip-chars-backward " \t\n" begin)
+           (forward-paragraph)
+           (setq end (point))))
+
+      (narrow-to-region (point-min) end)
+      (unjustify-region begin (point-max))
+      (put-text-property begin (point-max) 'justification value)
+      (fill-region begin (point-max) nil t))))
+
+(defun set-justification-none (b e)
+  "Disable automatic filling for paragraphs in the region.
+If the mark is not active, this applies to the current paragraph."
+  ;; XEmacs change (was mark-active)
+  (interactive (list (if (region-active-p) (region-beginning) (point))
+                    (if (region-active-p) (region-end) (point))))
+  (set-justification b e 'none t))
+
+(defun set-justification-left (b e)
+  "Make paragraphs in the region left-justified.
+This is usually the default, but see the variable `default-justification'.
+If the mark is not active, this applies to the current paragraph."
+  ;; XEmacs change (was mark-active)
+  (interactive (list (if (region-active-p) (region-beginning) (point))
+                    (if (region-active-p) (region-end) (point))))
+  (set-justification b e 'left t))
+
+(defun set-justification-right (b e)
+  "Make paragraphs in the region right-justified:
+Flush at the right margin and ragged on the left.
+If the mark is not active, this applies to the current paragraph."
+  ;; XEmacs change (was mark-active)
+  (interactive (list (if (region-active-p) (region-beginning) (point))
+                    (if (region-active-p) (region-end) (point))))
+  (set-justification b e 'right t))
+
+(defun set-justification-full (b e)
+  "Make paragraphs in the region fully justified:
+This makes lines flush on both margins by inserting spaces between words.
+If the mark is not active, this applies to the current paragraph."
+  ;; XEmacs change (was mark-active)
+  (interactive (list (if (region-active-p) (region-beginning) (point))
+                    (if (region-active-p) (region-end) (point))))
+  (set-justification b e 'full t))
+
+(defun set-justification-center (b e)
+  "Make paragraphs in the region centered.
+If the mark is not active, this applies to the current paragraph."
+  ;; XEmacs change (was mark-active)
+  (interactive (list (if (region-active-p) (region-beginning) (point))
+                    (if (region-active-p) (region-end) (point))))
+  (set-justification b e 'center t))
+
+;; 97/3/14 jhod: This functions are added for Kinsoku support
+(defun find-space-insertable-point ()
+ "Search backward for a permissable point for inserting justification spaces"
+ (if (boundp 'space-insertable)
+     (if (re-search-backward space-insertable nil t)
+        (progn (forward-char 1)
+               t)
+       nil)
+   (search-backward " " nil t)))
+
+;; A line has up to six parts:
+;;
+;;           >>>                    hello.                    
+;; [Indent-1][FP][    Indent-2     ][text][trailing whitespace][newline]
+;;
+;; "Indent-1" is the left-margin indentation; normally it ends at column
+;;     given by the `current-left-margin' function.
+;; "FP" is the fill-prefix.  It can be any string, including whitespace.
+;; "Indent-2" is added to justify a line if the `current-justification' is
+;;     `center' or `right'.  In `left' and `full' justification regions, any
+;;     whitespace there is part of the line's text, and should not be changed.
+;; Trailing whitespace is not counted as part of the line length when
+;; center- or right-justifying.
+;;
+;; All parts of the line are optional, although the final newline can 
+;;     only be missing on the last line of the buffer.
+
+(defun justify-current-line (&optional how eop nosqueeze)
+  "Do some kind of justification on this line.
+Normally does full justification: adds spaces to the line to make it end at
+the column given by `current-fill-column'.
+Optional first argument HOW specifies alternate type of justification:
+it can be `left', `right', `full', `center', or `none'.  
+If HOW is t, will justify however the `current-justification' function says to.
+If HOW is nil or missing, full justification is done by default.
+Second arg EOP non-nil means that this is the last line of the paragraph, so
+it will not be stretched by full justification.
+Third arg NOSQUEEZE non-nil means to leave interior whitespace unchanged,
+otherwise it is made canonical."
+  (interactive)
+  (if (eq t how) (setq how (or (current-justification) 'none))
+    (if (null how) (setq how 'full)
+      (or (memq how '(none left right center))
+         (setq how 'full))))
+  (or (memq how '(none left))  ; No action required for these.
+      (let ((fc (current-fill-column))
+           (pos (point-marker))
+           fp-end                      ; point at end of fill prefix
+           beg                         ; point at beginning of line's text
+           end                         ; point at end of line's text
+           indent                      ; column of `beg'
+           endcol                      ; column of `end'
+           ncols)                      ; new indent point or offset
+       (end-of-line)
+       ;; Check if this is the last line of the paragraph.
+       (if (and use-hard-newlines (null eop) 
+                (get-text-property (point) 'hard))
+           (setq eop t))
+       (skip-chars-backward " \t")
+       ;; Quick exit if it appears to be properly justified already
+       ;; or there is no text.
+       (if (or (bolp)
+               (and (memq how '(full right))
+                    (= (current-column) fc)))
+           nil
+         (setq end (point))
+         (beginning-of-line)
+         (skip-chars-forward " \t")
+         ;; Skip over fill-prefix.
+         (if (and fill-prefix 
+                  (not (string-equal fill-prefix ""))
+                  (equal fill-prefix
+                         (buffer-substring 
+                          (point) (min (point-max) (+ (length fill-prefix)
+                                                      (point))))))
+             (forward-char (length fill-prefix))
+           (if (and adaptive-fill-mode 
+                    (looking-at adaptive-fill-regexp))
+               (goto-char (match-end 0))))
+         (setq fp-end (point))
+         (skip-chars-forward " \t")
+         ;; This is beginning of the line's text.
+         (setq indent (current-column))
+         (setq beg (point))
+         (goto-char end)
+         (setq endcol (current-column))
+
+         ;; HOW can't be null or left--we would have exited already
+         (cond ((eq 'right how) 
+                (setq ncols (- fc endcol))
+                (if (< ncols 0)
+                    ;; Need to remove some indentation
+                    (delete-region 
+                     (progn (goto-char fp-end)
+                            (if (< (current-column) (+ indent ncols))
+                                (move-to-column (+ indent ncols) t))
+                            (point))
+                     (progn (move-to-column indent) (point)))
+                  ;; Need to add some
+                  (goto-char beg)
+                  (indent-to (+ indent ncols))
+                  ;; If point was at beginning of text, keep it there.
+                  (if (= beg pos) 
+                      (move-marker pos (point)))))
+
+               ((eq 'center how)
+                ;; Figure out how much indentation is needed
+                (setq ncols (+ (current-left-margin)
+                               (/ (- fc (current-left-margin) ;avail. space
+                                     (- endcol indent)) ;text width
+                                  2)))
+                (if (< ncols indent)
+                    ;; Have too much indentation - remove some
+                    (delete-region
+                     (progn (goto-char fp-end)
+                            (if (< (current-column) ncols)
+                                (move-to-column ncols t))
+                            (point))
+                     (progn (move-to-column indent) (point)))
+                  ;; Have too little - add some
+                  (goto-char beg)
+                  (indent-to ncols)
+                  ;; If point was at beginning of text, keep it there.
+                  (if (= beg pos)
+                      (move-marker pos (point)))))
+
+               ((eq 'full how)
+                ;; Insert extra spaces between words to justify line
+                (save-restriction
+                  (narrow-to-region beg end)
+                  (or nosqueeze
+                      (canonically-space-region beg end))
+                  (goto-char (point-max))
+                  (setq ncols (- fc endcol))
+                  ;; Ncols is number of additional spaces needed
+                  (if (> ncols 0)
+                      (if (and (not eop)
+                               ;; 97/3/14 jhod: Kinsoku
+                               (find-space-insertable-point)) ;(search-backward " " nil t))
+                          (while (> ncols 0)
+                            (let ((nmove (+ 3 (random 3))))
+                              (while (> nmove 0)
+                                (or (find-space-insertable-point) ;(search-backward " " nil t)
+                                    (progn
+                                      (goto-char (point-max))
+                                      (find-space-insertable-point))) ;(search-backward " ")))
+                                (skip-chars-backward " ")
+                                (setq nmove (1- nmove))))
+                            ;; XEmacs change
+                            (insert " ")
+                            (skip-chars-backward " ")
+                            (setq ncols (1- ncols)))))))
+               (t (error "Unknown justification value"))))
+       (goto-char pos)
+       (move-marker pos nil)))
+  nil)
+
+(defun unjustify-current-line ()
+  "Remove justification whitespace from current line.
+If the line is centered or right-justified, this function removes any
+indentation past the left margin.  If the line is full-justified, it removes
+extra spaces between words.  It does nothing in other justification modes."
+  (let ((justify (current-justification)))
+    (cond ((eq 'left justify) nil)
+         ((eq  nil  justify) nil)
+         ((eq 'full justify)           ; full justify: remove extra spaces
+          (beginning-of-line-text)
+          (canonically-space-region
+           (point) (save-excursion (end-of-line) (point))))
+         ((memq justify '(center right))
+          (save-excursion
+            (move-to-left-margin nil t)
+            ;; Position ourselves after any fill-prefix.
+            (if (and fill-prefix 
+                     (not (string-equal fill-prefix ""))
+                     (equal fill-prefix
+                            (buffer-substring 
+                             (point) (min (point-max) (+ (length fill-prefix)
+                                                         (point))))))
+                (forward-char (length fill-prefix)))
+            (delete-region (point) (progn (skip-chars-forward " \t")
+                                          (point))))))))
+
+(defun unjustify-region (&optional begin end)
+  "Remove justification whitespace from region.
+For centered or right-justified regions, this function removes any indentation
+past the left margin from each line.  For full-justified lines, it removes 
+extra spaces between words.  It does nothing in other justification modes.
+Arguments BEGIN and END are optional; default is the whole buffer."
+  (save-excursion
+    (save-restriction
+      (if end (narrow-to-region (point-min) end))
+      (goto-char (or begin (point-min)))
+      (while (not (eobp))
+       (unjustify-current-line)
+       (forward-line 1)))))
+
+\f
+(defun fill-nonuniform-paragraphs (min max &optional justifyp mailp)
+  "Fill paragraphs within the region, allowing varying indentation within each.
+This command divides the region into \"paragraphs\",
+only at paragraph-separator lines, then fills each paragraph
+using as the fill prefix the smallest indentation of any line
+in the paragraph.
+
+When calling from a program, pass range to fill as first two arguments.
+
+Optional third and fourth arguments JUSTIFY and MAIL-FLAG:
+JUSTIFY to justify paragraphs (prefix arg),
+MAIL-FLAG for a mail message, i. e. don't fill header lines."
+  (interactive (list (region-beginning) (region-end)
+                    (if current-prefix-arg 'full)))
+  (let ((fill-individual-varying-indent t))
+    (fill-individual-paragraphs min max justifyp mailp)))
+
+(defun fill-individual-paragraphs (min max &optional justify mailp)
+  "Fill paragraphs of uniform indentation within the region.
+This command divides the region into \"paragraphs\",
+treating every change in indentation level as a paragraph boundary,
+then fills each paragraph using its indentation level as the fill prefix.
+
+When calling from a program, pass range to fill as first two arguments.
+
+Optional third and fourth arguments JUSTIFY and MAIL-FLAG:
+JUSTIFY to justify paragraphs (prefix arg),
+MAIL-FLAG for a mail message, i. e. don't fill header lines."
+  (interactive (list (region-beginning) (region-end)
+                    (if current-prefix-arg 'full)))
+  (save-restriction
+    (save-excursion
+      (goto-char min)
+      (beginning-of-line)
+      (narrow-to-region (point) max)
+      (if mailp 
+         (while (and (not (eobp))
+                     (or (looking-at "[ \t]*[^ \t\n]+:")
+                         (looking-at "[ \t]*$")))
+           (if (looking-at "[ \t]*[^ \t\n]+:")
+               (search-forward "\n\n" nil 'move)
+                (forward-line 1))))
+      (narrow-to-region (point) max)
+      ;; Loop over paragraphs.
+      (while (progn (skip-chars-forward " \t\n") (not (eobp)))
+       (move-to-left-margin)
+       (let ((start (point))
+             fill-prefix fill-prefix-regexp)
+         ;; Find end of paragraph, and compute the smallest fill-prefix
+         ;; that fits all the lines in this paragraph.
+         (while (progn
+                  ;; Update the fill-prefix on the first line
+                  ;; and whenever the prefix good so far is too long.
+                  (if (not (and fill-prefix
+                                (looking-at fill-prefix-regexp)))
+                      (setq fill-prefix
+                            (if (and adaptive-fill-mode adaptive-fill-regexp
+                                     (looking-at adaptive-fill-regexp))
+                                (match-string 0)
+                              (buffer-substring 
+                               (point)
+                               (save-excursion (skip-chars-forward " \t")
+                                               (point))))
+                            fill-prefix-regexp (regexp-quote fill-prefix)))
+                  (forward-line 1)
+                  (if (bolp)
+                      ;; If forward-line went past a newline
+                      ;; move further to the left margin.
+                      (move-to-left-margin))
+                  ;; Now stop the loop if end of paragraph.
+                  (and (not (eobp))
+                       (if fill-individual-varying-indent
+                           ;; If this line is a separator line, with or
+                           ;; without prefix, end the paragraph.
+                           (and 
+                            (not (looking-at paragraph-separate))
+                            (save-excursion
+                              (not (and (looking-at fill-prefix-regexp)
+                                        ;; XEmacs change
+                                        (progn
+                                          (forward-char (length fill-prefix))
+                                          (looking-at paragraph-separate))))))
+                            ;; If this line has more or less indent
+                            ;; than the fill prefix wants, end the paragraph.
+                            (and (looking-at fill-prefix-regexp)
+                                 (save-excursion
+                                   (not
+                                   (progn
+                                     (forward-char (length fill-prefix))
+                                     (or (looking-at paragraph-separate)
+                                         (looking-at paragraph-start))))))))))
+         ;; Fill this paragraph, but don't add a newline at the end.
+         (let ((had-newline (bolp)))
+           (fill-region-as-paragraph start (point) justify)
+           (or had-newline (delete-char -1))))))))
+
+;;; fill.el ends here
diff --git a/lisp/find-paths.el b/lisp/find-paths.el
new file mode 100644 (file)
index 0000000..9685d6e
--- /dev/null
@@ -0,0 +1,298 @@
+;;; find-paths.el --- setup various XEmacs paths
+
+;; Copyright (C) 1985-1986, 1990, 1992-1997 Free Software Foundation, Inc.
+;; Copyright (c) 1993, 1994 Sun Microsystems, Inc.
+;; Copyright (C) 1995 Board of Trustees, University of Illinois
+
+;; Author: Mike Sperber <sperber@informatik.uni-tuebingen.de>
+;; Maintainer: XEmacs Development Team
+;; Keywords: internal, dumped
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not in FSF.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; This file contains the library functionality to find paths into the
+;; XEmacs hierarchy.
+\f
+;;; Code:
+
+(defvar paths-version-control-filename-regexp
+  "^\\(RCS\\|CVS\\|SCCS\\)$"
+  "File bases associated with version control.")
+
+(defvar paths-lisp-filename-regexp
+  "^\\(.*\\.elc?\\)$"
+  "File bases that contain Lisp file.")
+
+(defvar paths-no-lisp-directory-regexp
+  (concat "\\(" paths-version-control-filename-regexp "\\)"
+         "\\|"
+         "\\(" paths-lisp-filename-regexp "\\)")
+  "File bases that may not be directories containing Lisp code.")
+
+(defun paths-find-recursive-path (directories &optional max-depth exclude-regexp)
+  "Return a list of the directory hierarchy underneath DIRECTORIES.
+The returned list is sorted by pre-order and lexicographically.
+MAX-DEPTH limits the depth of the search to MAX-DEPTH level,
+if it is a number.  If MAX-DEPTH is NIL, the search depth is unlimited.
+EXCLUDE-REGEXP is a regexp that matches directory names to exclude
+from the search."
+  (let ((path '()))
+    (while directories
+      (let ((directory (file-name-as-directory
+                       (expand-file-name
+                        (car directories)))))
+       (if (file-directory-p directory)
+           (let ((raw-entries
+                  (if (equal 0 max-depth)
+                      '()
+                      (directory-files directory nil "^[^.-]")))
+                 (reverse-dirs '()))
+
+             (while raw-entries
+               (if (null (string-match exclude-regexp (car raw-entries)))
+                   (setq reverse-dirs
+                         (cons (expand-file-name (car raw-entries) directory)
+                               reverse-dirs)))
+               (setq raw-entries (cdr raw-entries)))
+
+             (let ((sub-path
+                    (paths-find-recursive-path (reverse reverse-dirs)
+                                               (if (numberp max-depth)
+                                                   (- max-depth 1)
+                                                 max-depth)
+                                               exclude-regexp)))
+               (setq path (nconc path
+                                 (list directory)
+                                 sub-path))))))
+      (setq directories (cdr directories)))
+    path))
+
+(defun paths-find-recursive-load-path (directories &optional max-depth)
+  "Construct a recursive load path underneath DIRECTORIES."
+  (paths-find-recursive-path directories
+                            max-depth paths-no-lisp-directory-regexp))
+
+(defun paths-emacs-root-p (directory)
+  "Check if DIRECTORY is a plausible installation root for XEmacs."
+  (or
+   ;; installed
+   (file-directory-p (paths-construct-path (list directory
+                                                "lib"
+                                                emacs-program-name)))
+   ;; in-place or windows-nt
+   (and 
+    (file-directory-p (paths-construct-path (list directory "lisp")))
+    (file-directory-p (paths-construct-path (list directory "etc"))))))
+
+(defun paths-chase-symlink (file-name)
+  "Chase a symlink until the bitter end."
+      (let ((maybe-symlink (file-symlink-p file-name)))
+       (if maybe-symlink
+           (let* ((directory (file-name-directory file-name))
+                  (destination (expand-file-name maybe-symlink directory)))
+             (paths-chase-symlink destination))
+         file-name)))
+
+(defun paths-find-emacs-root
+  (invocation-directory invocation-name)
+  "Find the run-time root of XEmacs."
+  (let* ((executable-file-name (paths-chase-symlink
+                               (concat invocation-directory
+                                       invocation-name)))
+        (executable-directory (file-name-directory executable-file-name))
+        (maybe-root-1 (file-name-as-directory
+                       (paths-construct-path '("..") executable-directory)))
+        (maybe-root-2 (file-name-as-directory
+                       (paths-construct-path '(".." "..") executable-directory))))
+    (or (and (paths-emacs-root-p maybe-root-1)
+            maybe-root-1)
+       (and (paths-emacs-root-p maybe-root-2)
+            maybe-root-2))))
+
+(defun paths-construct-path (components &optional expand-directory)
+  "Convert list of path components COMPONENTS into a path.
+If EXPAND-DIRECTORY is non-NIL, use it as a directory to feed
+to EXPAND-FILE-NAME."
+  (let* ((reverse-components (reverse components))
+        (last-component (car reverse-components))
+        (first-components (reverse (cdr reverse-components)))
+        (path
+         (apply #'concat
+                (append (mapcar #'file-name-as-directory first-components)
+                        (list last-component)))))
+    (if expand-directory
+       (expand-file-name path expand-directory)
+      path)))
+
+(defun paths-construct-emacs-directory (root suffix base)
+  "Construct a directory name within the XEmacs hierarchy."
+  (file-name-as-directory
+   (expand-file-name 
+    (concat
+     (file-name-as-directory root)
+     suffix
+     base))))
+
+(defun paths-find-emacs-directory (roots suffix base
+                                  &optional envvar default keep-suffix)
+  "Find a directory in the XEmacs hierarchy.
+ROOTS must be a list of installation roots.
+SUFFIX is the subdirectory from there.
+BASE is the base to look for.
+ENVVAR is the name of the environment variable that might also
+specify the directory.
+DEFAULT is the preferred value.
+If KEEP-SUFFIX is non-nil, the suffix must be respected in searching
+the directory."
+  (let ((preferred-value (or (and envvar (getenv envvar))
+                            default)))
+    (if (and preferred-value
+            (file-directory-p preferred-value))
+       (file-name-as-directory preferred-value)
+      (catch 'gotcha
+       (while roots
+         (let* ((root (car roots))
+                ;; installed
+                (path (paths-construct-emacs-directory root suffix base)))
+           (if (file-directory-p path)
+               (throw 'gotcha path)
+             ;; in-place
+             (if (null keep-suffix)
+                 (let ((path (paths-construct-emacs-directory root "" base)))
+                   (if (file-directory-p path)
+                       (throw 'gotcha path))))))
+         (setq roots (cdr roots)))
+       nil))))
+
+(defun paths-find-site-directory (roots base &optional envvar default)
+  "Find a site-specific directory in the XEmacs hierarchy."
+  (paths-find-emacs-directory roots
+                             (file-name-as-directory
+                              (paths-construct-path (list
+                                                     "lib"
+                                                     emacs-program-name)))
+                             base
+                             envvar default))
+
+(defun paths-find-version-directory (roots base
+                                    &optional envvar default enforce-version)
+  "Find a version-specific directory in the XEmacs hierarchy.
+If ENFORCE-VERSION is non-nil, the directory must contain the XEmacs version."
+  (paths-find-emacs-directory roots
+                             (file-name-as-directory
+                              (paths-construct-path
+                               (list "lib"
+                                     (construct-emacs-version-name))))
+                             base
+                             envvar default
+                             enforce-version))
+
+(defun paths-find-architecture-directory (roots base &optional envvar default)
+  "Find an architecture-specific directory in the XEmacs hierarchy."
+  (or
+   ;; from more to less specific
+   (paths-find-version-directory roots
+                                (concat base system-configuration)
+                                envvar)
+   (paths-find-version-directory roots
+                                base
+                                envvar)
+   (paths-find-version-directory roots
+                                system-configuration
+                                envvar default)))
+
+(defun construct-emacs-version-name ()
+  "Construct the raw XEmacs version number."
+  (concat emacs-program-name "-" emacs-program-version))
+
+(defun paths-directories-which-exist (directories)
+  "Return the directories among DIRECTORIES."
+  (let ((reverse-directories '()))
+    (while directories
+      (if (file-directory-p (car directories))
+         (setq reverse-directories 
+               (cons (car directories)
+                     reverse-directories)))
+      (setq directories (cdr directories)))
+    (reverse reverse-directories)))
+
+(defun paths-uniq-append (list-1 list-2)
+  "Append LIST-1 and LIST-2, omitting duplicates."
+  (let ((reverse-survivors '()))
+    (while list-2
+      (if (null (member (car list-2) list-1))
+         (setq reverse-survivors (cons (car list-2) reverse-survivors)))
+      (setq list-2 (cdr list-2)))
+    (append list-1
+           (reverse reverse-survivors))))
+
+(defun paths-filter (predicate list)
+  "Delete all matches of PREDICATE from LIST."
+  (let ((reverse-result '()))
+    (while list
+      (if (funcall predicate (car list))
+         (setq reverse-result (cons (car list) reverse-result)))
+      (setq list (cdr list)))
+    (nreverse reverse-result)))
+
+(defun paths-decode-directory-path (string &optional drop-empties)
+  "Split STRING at path separators into a directory list.
+Non-\"\" comonents are converted into directory form.
+If DROP-EMPTIES is non-NIL, \"\" components are dropped from the output.
+Otherwise, they are left alone."
+  (let* ((components (split-path string))
+        (directories
+         (mapcar #'(lambda (component)
+                     (if (string-equal "" component)
+                         component
+                       (file-name-as-directory component)))
+                 components)))
+    (if drop-empties
+       (paths-filter #'(lambda (component)
+                         (null (string-equal "" component)))
+                     directories)
+      directories)))
+
+(defun paths-find-emacs-roots (invocation-directory
+                              invocation-name)
+  "Find all plausible installation roots for XEmacs."
+  (let* ((potential-invocation-root
+         (paths-find-emacs-root invocation-directory invocation-name))
+        (invocation-roots
+         (and potential-invocation-root
+              (list potential-invocation-root)))
+        (potential-installation-roots
+         (paths-uniq-append
+          (and configure-exec-prefix-directory
+               (list (file-name-as-directory
+                      configure-exec-prefix-directory)))
+          (and configure-prefix-directory
+               (list (file-name-as-directory
+                      configure-prefix-directory)))))
+        (installation-roots
+         (paths-filter #'paths-emacs-root-p potential-installation-roots)))
+    (paths-uniq-append invocation-roots
+                      installation-roots)))
+
+;;; find-paths.el ends here
diff --git a/lisp/finder.el b/lisp/finder.el
new file mode 100644 (file)
index 0000000..4656b32
--- /dev/null
@@ -0,0 +1,406 @@
+;;; finder.el --- topic & keyword-based code finder
+
+;; Copyright (C) 1992 Free Software Foundation, Inc.
+
+;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
+;; Created: 16 Jun 1992
+;; Version: 1.0
+;; Keywords: help
+;; X-Modified-by: Bob Weiner <weiner@mot.com>, 4/18/95, to include Lisp
+;;     library directory names in finder-program-info, for fast display of
+;;     Lisp libraries and associated commentaries.  Added {v}, finder-view,
+;;     and {e}, finder-edit commands for displaying libraries.
+;;     
+;;     Added user variable, 'finder-abbreviate-directory-list', used to
+;;     abbreviate directories before they are saved to finder-program-info.
+;;     Such relative directories can be portable from one Emacs installation
+;;     to another.  Default value is based upon the value of Emacs'
+;;      data-directory variable.
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: FSF 19.34.
+
+;;; Commentary:
+
+;; This mode uses the Keywords library header to provide code-finding
+;; services by keyword.
+;;
+;; Things to do:
+;;    1. Support multiple keywords per search.  This could be extremely hairy;
+;; there doesn't seem to be any way to get completing-read to exit on
+;; an EOL with no substring pending, which is what we'd want to end the loop.
+;;    2. Search by string in synopsis line?
+;;    3. Function to check finder-package-info for unknown keywords.
+
+;;; Code:
+
+(require 'lisp-mnt)
+(condition-case nil
+    (require 'finder-inf)
+  (t nil))
+;; XEmacs addition
+(require 'picture)
+(require 'mode-motion)
+
+(defvar finder-emacs-root-directory
+  (file-name-directory (directory-file-name data-directory))
+  "Root directory of current emacs tree.")
+
+(defvar finder-abbreviate-directory-list
+  (list finder-emacs-root-directory)
+  "*List of directory roots to remove from finder-package-info directory entries.
+The first element in the list is used when expanding relative package
+directories to view or extract information from package source code.")
+
+(defvar finder-file-regexp "\\.el$"
+  "Regexp which matches file names but not Emacs Lisp finder keywords.")
+
+;; Local variable in finder buffer.
+(defvar finder-headmark)
+
+(defvar finder-known-keywords
+  `(
+    (abbrev    . "abbreviation handling, typing shortcuts, macros")
+    (bib       . "code related to the `bib' bibliography processor")
+    (c         . "C, C++, and Objective-C language support")
+    (calendar  . "calendar and time management support")
+    (comm      . "communications, networking, remote access to files")
+    (data      . "support for editing files of data")
+    (docs      . "support for Emacs documentation")
+    (dumped     . "files preloaded into Emacs")
+    (emulations        . "emulations of other editors")
+    (extensions        . "Emacs Lisp language extensions")
+    (faces     . "support for multiple fonts")
+    (frames    . "support for Emacs frames and window systems")
+    (games     . "games, jokes and amusements")
+    (hardware  . "support for interfacing with exotic hardware")
+    (help      . "support for on-line help systems")
+    (hypermedia        . "support for links between text or other media types")
+    (i18n      . "internationalization and alternate character-set support")
+    (internal  . "code for Emacs internals, build process, defaults")
+    (languages . "specialized modes for editing programming languages")
+    (lisp      . "Lisp support, including Emacs Lisp")
+    (local     . "code local to your site")
+    (maint     . "maintenance aids for the Emacs development group")
+    (mail      . "modes for electronic-mail handling")
+    (matching  . "various sorts of searching and matching")
+    (mouse     . "mouse support")
+    ,(when (featurep 'mule)
+       (cons 'mule "multi-language extensions"))
+    (news      . "support for netnews reading and posting")
+    (oop       . "support for object-oriented programming")
+    (outlines  . "support for hierarchical outlining")
+    (processes . "process, subshell, compilation, and job control support")
+    (terminals . "support for terminal types")
+    (tex       . "code related to the TeX formatter")
+    (tools     . "programming tools")
+    (unix      . "front-ends/assistants for, or emulators of, UNIX features")
+    (vms       . "support code for vms")
+    (wp                . "word processing")
+    ))
+
+(defvar finder-mode-map nil)
+(or finder-mode-map
+    (let ((map (make-sparse-keymap)))
+      (define-key map " "      'finder-select)
+      (define-key map "f"      'finder-select)
+      (define-key map "\C-m"   'finder-select)
+      ;; XEmacs changes
+      (define-key map "e"      'finder-edit)
+      (define-key map "v"      'finder-view)
+      (define-key map "?"      'finder-summary)
+      (define-key map "q"      'finder-exit)
+      (define-key map "d"      'finder-list-keywords)
+      ;; XEmacs change
+      (define-key map [button2]        'finder-mouse-select)
+      (setq finder-mode-map map)))
+
+
+;;; Code for regenerating the keyword list.
+
+(defvar finder-package-info nil
+  "Assoc list mapping file names to description & keyword lists.")
+
+(defvar finder-compile-keywords-quiet nil
+  "If non-nil finder-compile-keywords will not print any messages.")
+
+(defun finder-compile-keywords (&rest dirs)
+  "Regenerate the keywords association list into the file `finder-inf.el'.
+Optional arguments are a list of Emacs Lisp directories to compile from; no
+arguments compiles from `load-path'."
+  (save-excursion
+    ;; XEmacs change
+    (find-file "finder-inf.el")
+    (let ((processed nil)
+         (directory-abbrev-alist
+          (append
+           (mapcar (function (lambda (dir) (cons dir "")))
+                   finder-abbreviate-directory-list)
+           directory-abbrev-alist))
+         (using-load-path))
+      (or dirs (setq dirs load-path))
+      (setq using-load-path (equal dirs load-path))
+      (erase-buffer)
+      (insert ";;; finder-inf.el --- keyword-to-package mapping\n")
+      (insert ";; Keywords: help\n")
+      (insert ";;; Commentary:\n")
+      (insert ";; Don't edit this file.  It's generated by finder.el\n\n")
+      (insert ";;; Code:\n")
+      (insert "\n(setq finder-package-info '(\n")
+      (mapcar
+       (function
+       (lambda (d)
+         (mapcar
+          (function
+           (lambda (f) 
+             (if (not (member f processed))
+                 (let (summary keystart keywords)
+                   (setq processed (cons f processed))
+                   (if (not finder-compile-keywords-quiet)
+                       (message "Processing %s ..." f))
+                   (save-excursion
+                     (set-buffer (get-buffer-create "*finder-scratch*"))
+                     (buffer-disable-undo (current-buffer))
+                     (erase-buffer)
+                     (insert-file-contents (expand-file-name f d))
+                     (condition-case err
+                         (setq summary  (lm-synopsis)
+                               keywords (lm-keywords))
+                       (t (message "finder: error processing %s %S" f err))))
+                   (if (not summary)
+                       nil
+                     (insert (format "    (\"%s\"\n        " f))
+                     (prin1 summary (current-buffer))
+                     (insert "\n        ")
+                     (setq keystart (point))
+                     (insert (if keywords (format "(%s)" keywords) "nil"))
+                     (subst-char-in-region keystart (point) ?, ? )
+                     (insert "\n        ")
+                     (prin1 (abbreviate-file-name d) (current-buffer))
+                     (insert ")\n"))))))
+          ;;
+          ;; Skip null, non-existent or relative pathnames, e.g. "./", if
+          ;; using load-path, so that they do not interfere with a scan of
+          ;; library directories only.
+          (if (and using-load-path
+                   (not (and d (file-name-absolute-p d) (file-exists-p d))))
+              nil
+            (setq d (file-name-as-directory (or d ".")))
+            (directory-files d nil "^[^=].*\\.el$")))))
+       dirs)
+      (insert "))\n\n(provide 'finder-inf)\n\n;;; finder-inf.el ends here\n")
+      (kill-buffer "*finder-scratch*")
+      (unless noninteractive
+       (eval-current-buffer)) ; So we get the new keyword list immediately
+      (basic-save-buffer))))
+
+(defun finder-compile-keywords-make-dist ()
+  "Regenerate `finder-inf.el' for the Emacs distribution."
+  (finder-compile-keywords default-directory))
+
+;;; Now the retrieval code
+
+(defun finder-insert-at-column (column &rest strings)
+  "Insert list of STRINGS, at column COLUMN."
+  (if (>= (current-column) column) (insert "\n"))
+  (move-to-column column)
+  (let ((col (current-column)))
+    (if (< col column)
+       (indent-to column)
+      (if (and (/= col column)
+              (= (preceding-char) ?\t))
+         (let (indent-tabs-mode)
+           (delete-char -1)
+            (indent-to col)
+            (move-to-column column)))))
+  (apply 'insert strings))
+
+(defun finder-list-keywords ()
+  "Display descriptions of the keywords in the Finder buffer."
+  (interactive)
+  (setq buffer-read-only nil)
+  (erase-buffer)
+  (mapcar
+   (lambda (assoc)
+     (let ((keyword (car assoc)))
+       (insert (symbol-name keyword))
+       (finder-insert-at-column 14 (concat (cdr assoc) "\n"))
+       (cons (symbol-name keyword) keyword)))
+   finder-known-keywords)
+  (goto-char (point-min))
+  (setq finder-headmark (point))
+  (setq buffer-read-only t)
+  (set-buffer-modified-p nil)
+  ;; XEmacs change
+  (if (not (one-window-p))
+      (balance-windows))
+  (finder-summary))
+
+(defun finder-list-matches (key)
+  (setq buffer-read-only nil)
+  (erase-buffer)
+  (let ((id (intern key)))
+    (insert
+     "The following packages match the keyword `" key "':\n\n")
+    (setq finder-headmark (point))
+    (mapcar
+     (lambda (x)
+       (if (memq id (car (cdr (cdr x))))
+          (progn
+            (insert (car x))
+            (finder-insert-at-column 16 (concat (car (cdr x)) "\n")))))
+     finder-package-info)
+    (goto-char (point-min))
+    (forward-line)
+    (setq buffer-read-only t)
+    (set-buffer-modified-p nil)
+    (shrink-window-if-larger-than-buffer)
+    (finder-summary)))
+
+;; Search for a file named FILE the same way `load' would search.
+(defun finder-find-library (file)
+  (if (file-name-absolute-p file)
+      file
+    (let ((dirs load-path)
+         found)
+      (while (and dirs (not found))
+       (if (file-exists-p (expand-file-name (concat file ".el") (car dirs)))
+           (setq found (expand-file-name file (car dirs)))
+         (if (file-exists-p (expand-file-name file (car dirs)))
+             (setq found (expand-file-name file (car dirs)))))
+       (setq dirs (cdr dirs)))
+      found)))
+
+(defun finder-commentary (file)
+  (interactive)
+  (let* ((str (lm-commentary (finder-find-library file))))
+    (if (null str)
+       (error "Can't find any Commentary section"))
+    (pop-to-buffer "*Finder*")
+    ;; XEmacs change
+    (setq buffer-read-only nil
+         mode-motion-hook 'mode-motion-highlight-line)
+    (erase-buffer)
+    (insert str)
+    (goto-char (point-min))
+    (delete-blank-lines)
+    (goto-char (point-max))
+    (delete-blank-lines)
+    (goto-char (point-min))
+    (while (re-search-forward "^;+ ?" nil t)
+      (replace-match "" nil nil))
+    (goto-char (point-min))
+    (setq buffer-read-only t)
+    (set-buffer-modified-p nil)
+    (shrink-window-if-larger-than-buffer)
+    (finder-summary)))
+
+(defun finder-current-item ()
+  (if (and finder-headmark (< (point) finder-headmark))
+      (error "No keyword or filename on this line")
+    (save-excursion
+      (beginning-of-line)
+      (current-word))))
+
+;; XEmacs change
+(defun finder-edit ()
+  (interactive)
+  (let ((entry (finder-current-item)))
+    (if (string-match finder-file-regexp entry)
+       (let ((path (finder-find-library entry)))
+         (if path
+             (find-file-other-window path)
+           (error "Can't find Emacs Lisp library: '%s'" entry)))
+      ;; a finder keyword
+      (error "Finder-edit works on Emacs Lisp libraries only"))))
+
+;; XEmacs change
+(defun finder-view ()
+  (interactive)
+  (let ((entry (finder-current-item)))
+    (if (string-match finder-file-regexp entry)
+       (let ((path (finder-find-library entry)))
+         (if path
+             (view-file-other-window path)
+           (error "Can't find Emacs Lisp library: '%s'" entry)))
+      ;; a finder keyword
+      (error "Finder-view works on Emacs Lisp libraries only"))))
+
+(defun finder-select ()
+  (interactive)
+  (let ((key (finder-current-item)))
+    ;; XEmacs change
+    (if (string-match finder-file-regexp key)
+       (finder-commentary key)
+      (finder-list-matches key))))
+
+;; XEmacs change
+(defun finder-mouse-select (ev)
+  (interactive "e")
+  (goto-char (event-point ev))
+  (finder-select))
+
+;; XEmacs change
+;;;###autoload
+(defun finder-by-keyword ()
+  "Find packages matching a given keyword."
+  (interactive)
+  (finder-mode)
+  (finder-list-keywords))
+
+(defun finder-mode ()
+  "Major mode for browsing package documentation.
+\\<finder-mode-map>
+\\[finder-select]      more help for the item on the current line
+\\[finder-edit] edit Lisp library in another window
+\\[finder-view] view Lisp library in another window
+\\[finder-exit]        exit Finder mode and kill the Finder buffer.
+"
+  (interactive)
+  (pop-to-buffer "*Finder*")
+  ;; XEmacs change
+  (setq buffer-read-only nil
+       mode-motion-hook 'mode-motion-highlight-line)
+  (erase-buffer)
+  (use-local-map finder-mode-map)
+  (set-syntax-table emacs-lisp-mode-syntax-table)
+  (setq mode-name "Finder")
+  (setq major-mode 'finder-mode)
+  (make-local-variable 'finder-headmark)
+  (setq finder-headmark nil))
+
+(defun finder-summary ()
+  "Summarize basic Finder commands."
+  (interactive)
+  (message "%s"
+   (substitute-command-keys
+    ;; XEmacs change
+    "\\<finder-mode-map>\\[finder-select] = select, \\[finder-list-keywords] = keywords, \\[finder-edit] = edit, \\[finder-view] = view, \\[finder-exit] = quit, \\[finder-summary] = help")))
+
+(defun finder-exit ()
+  "Exit Finder mode and kill the buffer"
+  (interactive)
+  ;; XEmacs change
+  (or (one-window-p t 0)
+      (delete-window))
+  (kill-buffer "*Finder*"))
+
+(provide 'finder)
+
+;;; finder.el ends here
diff --git a/lisp/float-sup.el b/lisp/float-sup.el
new file mode 100644 (file)
index 0000000..11d409d
--- /dev/null
@@ -0,0 +1,67 @@
+;;; float-sup.el --- detect absence of floating-point support in XEmacs runtime
+
+;; Copyright (C) 1985-7, 1997 Free Software Foundation, Inc.
+
+;; Maintainer: FSF
+;; Keywords: internal, dumped
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: FSF 19.34.
+
+;;; Code:
+
+;; This file is dumped with XEmacs.
+
+;; Provide a meaningful error message if we are running on
+;; bare (non-float) emacs.
+;; Can't test for 'floatp since that may be defined by float-imitation
+;; packages like float.el in this very directory.
+
+;; XEmacs change
+(or (featurep 'lisp-float-type)
+    (error "Floating point was disabled at compile time"))
+
+;; define pi and e via math-lib calls. (much less prone to killer typos.)
+;; XEmacs change (purecopy)
+(defconst pi (purecopy (* 4 (atan 1))) "The value of Pi (3.1415926...)")
+(defconst e (purecopy (exp 1)) "The value of e (2.7182818...)")
+
+;; Careful when editing this file ... typos here will be hard to spot.
+;; (defconst pi       3.14159265358979323846264338327
+;;  "The value of Pi (3.14159265358979323846264338327...)")
+
+;; XEmacs change (purecopy)
+(defconst degrees-to-radians (purecopy (/ pi 180.0))
+  "Degrees to radian conversion constant")
+(defconst radians-to-degrees (purecopy (/ 180.0 pi))
+  "Radian to degree conversion constant")
+
+;; these expand to a single multiply by a float when byte compiled
+
+(defmacro degrees-to-radians (x)
+  "Convert ARG from degrees to radians."
+  (list '* (/ pi 180.0) x))
+(defmacro radians-to-degrees (x)
+  "Convert ARG from radians to degrees."
+  (list '* (/ 180.0 pi) x))
+
+;; Provided in C code in XEmacs
+;; (provide 'lisp-float-type)
+
+;;; float-sup.el ends here
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
new file mode 100644 (file)
index 0000000..91446fd
--- /dev/null
@@ -0,0 +1,2583 @@
+;;; font-lock.el --- decorating source files with fonts/colors based on syntax
+
+;; Copyright (C) 1992-1995, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1995 Amdahl Corporation.
+;; Copyright (C) 1996 Ben Wing.
+
+;; Author: Jamie Zawinski <jwz@netscape.com>, for the LISPM Preservation Society.
+;; Minimally merged with FSF 19.34 by Barry Warsaw <bwarsaw@python.org>
+;; Then (partially) synched with FSF 19.30, leading to:
+;; Next Author: RMS
+;; Next Author: Simon Marshall <simon@gnu.ai.mit.edu>
+;; Latest XEmacs Author: Ben Wing
+;; Maintainer: XEmacs Development Team
+;; Keywords: languages, faces
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: FSF 19.30 except for the code to initialize the faces.
+
+;;; Commentary:
+
+;; Font-lock-mode is a minor mode that causes your comments to be
+;; displayed in one face, strings in another, reserved words in another,
+;; documentation strings in another, and so on.
+;;
+;; Comments will be displayed in `font-lock-comment-face'.
+;; Strings will be displayed in `font-lock-string-face'.
+;; Doc strings will be displayed in `font-lock-doc-string-face'.
+;; Function and variable names (in their defining forms) will be
+;;  displayed in `font-lock-function-name-face'.
+;; Reserved words will be displayed in `font-lock-keyword-face'.
+;;
+;; Don't let the name fool you: you can highlight things using different
+;; colors or background stipples instead of fonts, though that is not the
+;; default.  See the variables `font-lock-use-colors' and
+;; `font-lock-use-fonts' for broad control over this, or see the
+;; documentation on faces and how to change their attributes for
+;; fine-grained control.
+;;
+;; To make the text you type be fontified, use M-x font-lock-mode.  When
+;; this minor mode is on, the fonts of the current line will be updated
+;; with every insertion or deletion.
+;;
+;; By default, font-lock will automatically put newly loaded files
+;; into font-lock-mode if it knows about the file's mode.  See the
+;; variables `font-lock-auto-fontify', `font-lock-mode-enable-list',
+;; and `font-lock-mode-disable-list' for control over this.
+;;
+;; The `font-lock-keywords' variable defines other patterns to highlight.
+;; The default font-lock-mode-hook sets it to the value of the variables
+;; lisp-font-lock-keywords, c-font-lock-keywords, etc, as appropriate.
+;; The easiest way to change the highlighting patterns is to change the
+;; values of c-font-lock-keywords and related variables.  See the doc
+;; string of the variable `font-lock-keywords' for the appropriate syntax.
+;;
+;; The default value for `lisp-font-lock-keywords' is the value of the variable
+;; `lisp-font-lock-keywords-1'.  You may like `lisp-font-lock-keywords-2' 
+;; better; it highlights many more words, but is slower and makes your buffers
+;; be very visually noisy.
+;;
+;; The same is true of `c-font-lock-keywords-1' and `c-font-lock-keywords-2';
+;; the former is subdued, the latter is loud.
+;;
+;; You can make font-lock default to the gaudier variety of keyword
+;; highlighting by setting the variable `font-lock-maximum-decoration'
+;; before loading font-lock, or by calling the functions
+;; `font-lock-use-default-maximal-decoration' or
+;; `font-lock-use-default-minimal-decoration'.
+;;
+;; On a Sparc10, the initial fontification takes about 6 seconds for a typical
+;; 140k file of C code, using the default configuration.  The actual speed
+;; depends heavily on the type of code in the file, and how many non-syntactic
+;; patterns match; for example, Xlib.h takes 23 seconds for 101k, because many
+;; patterns match in it.  You can speed this up substantially by removing some
+;; of the patterns that are highlighted by default.  Fontifying lisp code is
+;; significantly faster, because lisp has a more regular syntax than C, so the
+;; regular expressions don't have to be as complicated.
+;;
+;; It's called font-lock-mode here because on the Lispms it was called
+;; "Electric Font Lock Mode."  It was called that because there was an older
+;; mode called "Electric Caps Lock Mode" which had the function of causing all
+;; of your source code to be in upper case except for strings and comments,
+;; without you having to blip the caps lock key by hand all the time (thus the
+;; "electric", as in `electric-c-brace'.)
+
+;; See also the related packages `fast-lock' and `lazy-lock'.  Both
+;; attempt to speed up the initial fontification.  `fast-lock' saves
+;; the fontification info when you exit Emacs and reloads it next time
+;; you load the file, so that the file doesn't have to be fontified
+;; again.  `lazy-lock' does "lazy" fontification -- i.e. it only
+;; fontifies the text as it becomes visible rather than fontifying
+;; the whole file when it's first loaded in.
+
+;; Further comments from the FSF:
+
+;; Nasty regexps of the form "bar\\(\\|lo\\)\\|f\\(oo\\|u\\(\\|bar\\)\\)\\|lo"
+;; are made thusly: (regexp-opt '("foo" "fu" "fubar" "bar" "barlo" "lo")) for
+;; efficiency.
+
+;; What is fontification for?  You might say, "It's to make my code look nice."
+;; I think it should be for adding information in the form of cues.  These cues
+;; should provide you with enough information to both (a) distinguish between
+;; different items, and (b) identify the item meanings, without having to read
+;; the items and think about it.  Therefore, fontification allows you to think
+;; less about, say, the structure of code, and more about, say, why the code
+;; doesn't work.  Or maybe it allows you to think less and drift off to sleep.
+;;
+;; So, here are my opinions/advice/guidelines:
+;; 
+;; - Use the same face for the same conceptual object, across all modes.
+;;   i.e., (b) above, all modes that have items that can be thought of as, say,
+;;   keywords, should be highlighted with the same face, etc.
+;; - Keep the faces distinct from each other as far as possible.
+;;   i.e., (a) above.
+;; - Make the face attributes fit the concept as far as possible.
+;;   i.e., function names might be a bold colour such as blue, comments might
+;;   be a bright colour such as red, character strings might be brown, because,
+;;   err, strings are brown (that was not the reason, please believe me).
+;; - Don't use a non-nil OVERRIDE unless you have a good reason.
+;;   Only use OVERRIDE for special things that are easy to define, such as the
+;;   way `...' quotes are treated in strings and comments in Emacs Lisp mode.
+;;   Don't use it to, say, highlight keywords in commented out code or strings.
+;; - Err, that's it.
+
+\f
+;;; Code:
+
+(require 'fontl-hooks)
+
+;;;;;;;;;;;;;;;;;;;;;;      user variables       ;;;;;;;;;;;;;;;;;;;;;;
+
+(defgroup font-lock nil
+  "Decorate source files with fonts/colors based on syntax.
+Font-lock-mode is a minor mode that causes your comments to be
+displayed in one face, strings in another, reserved words in another,
+documentation strings in another, and so on.
+
+Comments will be displayed in `font-lock-comment-face'.
+Strings will be displayed in `font-lock-string-face'.
+Doc strings will be displayed in `font-lock-doc-string-face'.
+Function and variable names (in their defining forms) will be displayed
+ in `font-lock-function-name-face'.
+Reserved words will be displayed in `font-lock-keyword-face'.
+Preprocessor conditionals will be displayed in `font-lock-preprocessor-face'."
+  :group 'languages)
+
+(defgroup font-lock-faces nil
+  "Faces used by the font-lock package."
+  :group 'font-lock
+  :group 'faces)
+
+
+(defcustom font-lock-verbose t
+  "*If non-nil, means show status messages when fontifying.
+See also `font-lock-message-threshold'."
+  :type 'boolean
+  :group 'font-lock)
+
+(defcustom font-lock-message-threshold 6000
+  "*Minimum size of region being fontified for status messages to appear.
+
+The size is measured in characters.  This affects `font-lock-fontify-region'
+but not `font-lock-fontify-buffer'. (In other words, when you first visit
+a file and it gets fontified, you will see status messages no matter what
+size the file is.  However, if you do something else like paste a
+chunk of text or revert a buffer, you will see status messages only if the
+changed region is large enough.)
+
+Note that setting `font-lock-verbose' to nil disables the status
+messages entirely."
+  :type 'integer
+  :group 'font-lock)
+
+;;;###autoload
+(defcustom font-lock-auto-fontify t
+  "*Whether font-lock should automatically fontify files as they're loaded.
+This will only happen if font-lock has fontifying keywords for the major
+mode of the file.  You can get finer-grained control over auto-fontification
+by using this variable in combination with `font-lock-mode-enable-list' or
+`font-lock-mode-disable-list'."
+  :type 'boolean
+  :group 'font-lock)
+
+;;;###autoload
+(defcustom font-lock-mode-enable-list nil
+  "*List of modes to auto-fontify, if `font-lock-auto-fontify' is nil."
+  :type '(repeat (symbol :tag "Mode"))
+  :group 'font-lock)
+
+;;;###autoload
+(defcustom font-lock-mode-disable-list nil
+  "*List of modes not to auto-fontify, if `font-lock-auto-fontify' is t."
+  :type '(repeat (symbol :tag "Mode"))
+  :group 'font-lock)
+
+;;;###autoload
+(defcustom font-lock-use-colors '(color)
+  "*Specification for when Font Lock will set up color defaults.
+Normally this should be '(color), meaning that Font Lock will set up
+color defaults that are only used on color displays.  Set this to nil
+if you don't want Font Lock to set up color defaults at all.  This
+should be one of
+
+-- a list of valid tags, meaning that the color defaults will be used
+   when all of the tags apply. (e.g. '(color x))
+-- a list whose first element is 'or and whose remaining elements are
+   lists of valid tags, meaning that the defaults will be used when
+   any of the tag lists apply.
+-- nil, meaning that the defaults should not be set up at all.
+
+\(If you specify face values in your init file, they will override any
+that Font Lock specifies, regardless of whether you specify the face
+values before or after loading Font Lock.)
+
+See also `font-lock-use-fonts'.  If you want more control over the faces
+used for fontification, see the documentation of `font-lock-mode' for
+how to do it."
+  ;; Hard to do right.
+  :type 'sexp
+  :group 'font-lock)
+
+;;;###autoload
+(defcustom font-lock-use-fonts '(or (mono) (grayscale))
+  "*Specification for when Font Lock will set up non-color defaults.
+
+Normally this should be '(or (mono) (grayscale)), meaning that Font
+Lock will set up non-color defaults that are only used on either mono
+or grayscale displays.  Set this to nil if you don't want Font Lock to
+set up non-color defaults at all.  This should be one of
+
+-- a list of valid tags, meaning that the non-color defaults will be used
+   when all of the tags apply. (e.g. '(grayscale x))
+-- a list whose first element is 'or and whose remaining elements are
+   lists of valid tags, meaning that the defaults will be used when
+   any of the tag lists apply.
+-- nil, meaning that the defaults should not be set up at all.
+
+\(If you specify face values in your init file, they will override any
+that Font Lock specifies, regardless of whether you specify the face
+values before or after loading Font Lock.)
+
+See also `font-lock-use-colors'.  If you want more control over the faces
+used for fontification, see the documentation of `font-lock-mode' for
+how to do it."
+  :type 'sexp
+  :group 'font-lock)
+
+;;;###autoload
+(defcustom font-lock-maximum-decoration t
+  "*If non-nil, the maximum decoration level for fontifying.
+If nil, use the minimum decoration (equivalent to level 0).
+If t, use the maximum decoration available.
+If a number, use that level of decoration (or if not available the maximum).
+If a list, each element should be a cons pair of the form (MAJOR-MODE . LEVEL),
+where MAJOR-MODE is a symbol or t (meaning the default).  For example:
+ ((c++-mode . 2) (c-mode . t) (t . 1))
+means use level 2 decoration for buffers in `c++-mode', the maximum decoration
+available for buffers in `c-mode', and level 1 decoration otherwise."
+  :type '(choice (const :tag "default" nil)
+                (const :tag "maximum" t)
+                (integer :tag "level" 1)
+                (repeat :menu-tag "mode specific" :tag "mode specific"
+                        :value ((t . t))
+                        (cons :tag "Instance"
+                              (radio :tag "Mode"
+                                     (const :tag "all" t)
+                                     (symbol :tag "name"))
+                              (radio :tag "Decoration"
+                                     (const :tag "default" nil)
+                                     (const :tag "maximum" t) 
+                                     (integer :tag "level" 1)))))
+  :group 'font-lock)
+
+;;;###autoload
+(define-obsolete-variable-alias 'font-lock-use-maximal-decoration
+  'font-lock-maximum-decoration)
+
+;;;###autoload
+(defcustom font-lock-maximum-size (* 250 1024)
+  "*If non-nil, the maximum size for buffers for fontifying.
+Only buffers less than this can be fontified when Font Lock mode is turned on.
+If nil, means size is irrelevant.
+If a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE),
+where MAJOR-MODE is a symbol or t (meaning the default).  For example:
+ ((c++-mode . 256000) (c-mode . 256000) (rmail-mode . 1048576))
+means that the maximum size is 250K for buffers in `c++-mode' or `c-mode', one
+megabyte for buffers in `rmail-mode', and size is irrelevant otherwise."
+  :type '(choice (const :tag "none" nil)
+                (integer :tag "size")
+                (repeat :menu-tag "mode specific" :tag "mode specific"
+                        :value ((t . nil))
+                        (cons :tag "Instance"
+                              (radio :tag "Mode"
+                                     (const :tag "all" t)
+                                     (symbol :tag "name"))
+                              (radio :tag "Size"
+                                     (const :tag "none" nil)
+                                     (integer :tag "size")))))
+  :group 'font-lock)
+
+\f
+;; Fontification variables:
+
+;;;###autoload
+(defvar font-lock-keywords nil
+  "A list of the keywords to highlight.
+Each element should be of the form:
+
+ MATCHER
+ (MATCHER . MATCH)
+ (MATCHER . FACENAME)
+ (MATCHER . HIGHLIGHT)
+ (MATCHER HIGHLIGHT ...)
+ (eval . FORM)
+
+where HIGHLIGHT should be either MATCH-HIGHLIGHT or MATCH-ANCHORED.
+
+FORM is an expression, whose value should be a keyword element,
+evaluated when the keyword is (first) used in a buffer.  This feature
+can be used to provide a keyword that can only be generated when Font
+Lock mode is actually turned on.
+
+For highlighting single items, typically only MATCH-HIGHLIGHT is required.
+However, if an item or (typically) items is to be highlighted following the
+instance of another item (the anchor) then MATCH-ANCHORED may be required.
+
+MATCH-HIGHLIGHT should be of the form:
+
+ (MATCH FACENAME OVERRIDE LAXMATCH)
+
+Where MATCHER can be either the regexp to search for, a variable
+containing the regexp to search for, or the function to call to make
+the search (called with one argument, the limit of the search).  MATCH
+is the subexpression of MATCHER to be highlighted.  FACENAME is either
+a symbol naming a face, or an expression whose value is the face name
+to use.  If you want FACENAME to be a symbol that evaluates to a face,
+use a form like \"(progn sym)\".
+
+OVERRIDE and LAXMATCH are flags.  If OVERRIDE is t, existing fontification may
+be overwritten.  If `keep', only parts not already fontified are highlighted.
+If `prepend' or `append', existing fontification is merged with the new, in
+which the new or existing fontification, respectively, takes precedence.
+If LAXMATCH is non-nil, no error is signalled if there is no MATCH in MATCHER.
+
+For example, an element of the form highlights (if not already highlighted):
+
+ \"\\\\\\=<foo\\\\\\=>\"               Discrete occurrences of \"foo\" in the value of the
+                       variable `font-lock-keyword-face'.
+ (\"fu\\\\(bar\\\\)\" . 1)     Substring \"bar\" within all occurrences of \"fubar\" in
+                       the value of `font-lock-keyword-face'.
+ (\"fubar\" . fubar-face)      Occurrences of \"fubar\" in the value of `fubar-face'.
+ (\"foo\\\\|bar\" 0 foo-bar-face t)
+                       Occurrences of either \"foo\" or \"bar\" in the value
+                       of `foo-bar-face', even if already highlighted.
+
+MATCH-ANCHORED should be of the form:
+
+ (MATCHER PRE-MATCH-FORM POST-MATCH-FORM MATCH-HIGHLIGHT ...)
+
+Where MATCHER is as for MATCH-HIGHLIGHT with one exception; see below.
+PRE-MATCH-FORM and POST-MATCH-FORM are evaluated before the first, and after
+the last, instance MATCH-ANCHORED's MATCHER is used.  Therefore they can be
+used to initialise before, and cleanup after, MATCHER is used.  Typically,
+PRE-MATCH-FORM is used to move to some position relative to the original
+MATCHER, before starting with MATCH-ANCHORED's MATCHER.  POST-MATCH-FORM might
+be used to move, before resuming with MATCH-ANCHORED's parent's MATCHER.
+
+For example, an element of the form highlights (if not already highlighted):
+
+ (\"\\\\\\=<anchor\\\\\\=>\" (0 anchor-face) (\"\\\\\\=<item\\\\\\=>\" nil nil (0 item-face)))
+
+ Discrete occurrences of \"anchor\" in the value of `anchor-face', and subsequent
+ discrete occurrences of \"item\" (on the same line) in the value of `item-face'.
+ (Here PRE-MATCH-FORM and POST-MATCH-FORM are nil.  Therefore \"item\" is
+ initially searched for starting from the end of the match of \"anchor\", and
+ searching for subsequent instance of \"anchor\" resumes from where searching
+ for \"item\" concluded.)
+
+The above-mentioned exception is as follows.  The limit of the MATCHER search
+defaults to the end of the line after PRE-MATCH-FORM is evaluated.
+However, if PRE-MATCH-FORM returns a position greater than the position after
+PRE-MATCH-FORM is evaluated, that position is used as the limit of the search.
+It is generally a bad idea to return a position greater than the end of the
+line, i.e., cause the MATCHER search to span lines.
+
+Note that the MATCH-ANCHORED feature is experimental; in the future, we may
+replace it with other ways of providing this functionality.
+
+These regular expressions should not match text which spans lines.  While
+\\[font-lock-fontify-buffer] handles multi-line patterns correctly, updating
+when you edit the buffer does not, since it considers text one line at a time.
+
+Be very careful composing regexps for this list;
+the wrong pattern can dramatically slow things down!")
+;;;###autoload
+(make-variable-buffer-local 'font-lock-keywords)
+
+(defvar font-lock-defaults nil
+  "The defaults font Font Lock mode for the current buffer.
+Normally, do not set this directly.  If you are writing a major mode,
+put a property of `font-lock-defaults' on the major-mode symbol with
+the desired value.
+
+It should be a list
+
+\(KEYWORDS KEYWORDS-ONLY CASE-FOLD SYNTAX-ALIST SYNTAX-BEGIN)
+
+KEYWORDS may be a symbol (a variable or function whose value is the keywords
+to use for fontification) or a list of symbols.  If KEYWORDS-ONLY is non-nil,
+syntactic fontification (strings and comments) is not performed.  If CASE-FOLD
+is non-nil, the case of the keywords is ignored when fontifying.  If
+SYNTAX-ALIST is non-nil, it should be a list of cons pairs of the form (CHAR
+. STRING) used to set the local Font Lock syntax table, for keyword and
+syntactic fontification (see `modify-syntax-entry').
+
+If SYNTAX-BEGIN is non-nil, it should be a function with no args used to move
+backwards outside any enclosing syntactic block, for syntactic fontification.
+Typical values are `beginning-of-line' (i.e., the start of the line is known to
+be outside a syntactic block), or `beginning-of-defun' for programming modes or
+`backward-paragraph' for textual modes (i.e., the mode-dependent function is
+known to move outside a syntactic block).  If nil, the beginning of the buffer
+is used as a position outside of a syntactic block, in the worst case.
+
+These item elements are used by Font Lock mode to set the variables
+`font-lock-keywords', `font-lock-keywords-only',
+`font-lock-keywords-case-fold-search', `font-lock-syntax-table' and
+`font-lock-beginning-of-syntax-function', respectively.
+
+Alternatively, if the value is a symbol, it should name a major mode,
+and the defaults for that mode will apply.")
+(make-variable-buffer-local 'font-lock-defaults)
+
+;; FSF uses `font-lock-defaults-alist' and expects the major mode to
+;; set a value for `font-lock-defaults', but I don't like either of
+;; these -- requiring the mode to set `font-lock-defaults' makes it
+;; impossible to have defaults for a minor mode, and using an alist is
+;; generally a bad idea for information that really should be
+;; decentralized. (Who knows what strange modes might want
+;; font-locking?)
+
+(defvar font-lock-keywords-only nil
+  "Non-nil means Font Lock should not do syntactic fontification.
+This is normally set via `font-lock-defaults'.
+
+This should be nil for all ``language'' modes, but other modes, like
+dired, do not have anything useful in the syntax tables (no comment
+or string delimiters, etc) and so there is no need to use them and
+this variable should have a value of t.
+
+You should not set this variable directly; its value is computed
+from `font-lock-defaults', or (if that does not specify anything)
+by examining the syntax table to see whether it appears to contain
+anything useful.")
+(make-variable-buffer-local 'font-lock-keywords-only)
+
+(defvar font-lock-keywords-case-fold-search nil
+  "Whether the strings in `font-lock-keywords' should be case-folded.
+This variable is automatically buffer-local, as the correct value depends
+on the language in use.")
+(make-variable-buffer-local 'font-lock-keywords-case-fold-search)
+
+(defvar font-lock-after-fontify-buffer-hook nil
+  "Function or functions to run after completion of font-lock-fontify-buffer.")
+
+(defvar font-lock-syntax-table nil
+  "Non-nil means use this syntax table for fontifying.
+If this is nil, the major mode's syntax table is used.
+This is normally set via `font-lock-defaults'.")
+(make-variable-buffer-local 'font-lock-syntax-table)
+
+;; These are used in the FSF version in syntactic font-locking.
+;; We do this all in C.
+;;; These record the parse state at a particular position, always the
+;;; start of a line.  Used to make
+;;; `font-lock-fontify-syntactically-region' faster.
+;(defvar font-lock-cache-position nil)
+;(defvar font-lock-cache-state nil)
+;(make-variable-buffer-local 'font-lock-cache-position)
+;(make-variable-buffer-local 'font-lock-cache-state)
+
+;; If this is nil, we only use the beginning of the buffer if we can't use
+;; `font-lock-cache-position' and `font-lock-cache-state'.
+(defvar font-lock-beginning-of-syntax-function nil
+  "Non-nil means use this function to move back outside of a syntactic block.
+If this is nil, the beginning of the buffer is used (in the worst case).
+This is normally set via `font-lock-defaults'.")
+(make-variable-buffer-local 'font-lock-beginning-of-syntax-function)
+
+(defvar font-lock-fontify-buffer-function 'font-lock-default-fontify-buffer
+  "Function to use for fontifying the buffer.
+This is normally set via `font-lock-defaults'.")
+
+(defvar font-lock-unfontify-buffer-function 'font-lock-default-unfontify-buffer
+  "Function to use for unfontifying the buffer.
+This is used when turning off Font Lock mode.
+This is normally set via `font-lock-defaults'.")
+
+(defvar font-lock-fontify-region-function 'font-lock-default-fontify-region
+  "Function to use for fontifying a region.
+It should take two args, the beginning and end of the region, and an optional
+third arg VERBOSE.  If non-nil, the function should print status messages.
+This is normally set via `font-lock-defaults'.")
+
+(defvar font-lock-unfontify-region-function 'font-lock-default-unfontify-region
+  "Function to use for unfontifying a region.
+It should take two args, the beginning and end of the region.
+This is normally set via `font-lock-defaults'.")
+
+(defvar font-lock-inhibit-thing-lock nil
+  "List of Font Lock mode related modes that should not be turned on.
+Currently, valid mode names as `fast-lock-mode' and `lazy-lock-mode'.
+This is normally set via `font-lock-defaults'.")
+
+;;;###autoload
+(defcustom font-lock-mode nil ;; customized for the option menu. dverna
+  "Non nil means `font-lock-mode' is on"
+  :group 'font-lock
+  :type 'boolean
+  :initialize 'custom-initialize-default
+  :require 'font-lock
+  :set '(lambda (var val)
+         (font-lock-mode (or val 0)))
+  )
+
+(defvar font-lock-fontified nil) ; whether we have hacked this buffer
+(put 'font-lock-fontified 'permanent-local t)
+
+;;;###autoload
+(defvar font-lock-mode-hook nil
+  "Function or functions to run on entry to font-lock-mode.")
+
+; whether font-lock-set-defaults has already been run.
+(defvar font-lock-defaults-computed nil)
+(make-variable-buffer-local 'font-lock-defaults-computed)
+
+\f
+;;; Initialization of faces.
+
+;; #### barf gag retch.  Horrid FSF lossage that we need to
+;; keep around for compatibility with font-lock-keywords that
+;; forget to properly quote their faces.
+(defvar font-lock-comment-face 'font-lock-comment-face
+  "Don't even think of using this.")
+(defvar font-lock-doc-string-face 'font-lock-doc-string-face
+  "Don't even think of using this.")
+(defvar font-lock-string-face 'font-lock-string-face
+  "Don't even think of using this.")
+(defvar font-lock-keyword-face 'font-lock-keyword-face
+  "Don't even think of using this.")
+(defvar font-lock-function-name-face 'font-lock-function-name-face
+  "Don't even think of using this.")
+(defvar font-lock-variable-name-face 'font-lock-variable-name-face
+  "Don't even think of using this.")
+(defvar font-lock-type-face 'font-lock-type-face
+  "Don't even think of using this.")
+(defvar font-lock-reference-face 'font-lock-reference-face
+  "Don't even think of using this.")
+(defvar font-lock-preprocessor-face 'font-lock-preprocessor-face
+  "Don't even think of using this.")
+
+(defconst font-lock-face-list
+  '(font-lock-comment-face
+    font-lock-string-face
+    font-lock-doc-string-face
+    font-lock-keyword-face
+    font-lock-function-name-face
+    font-lock-variable-name-face
+    font-lock-type-face
+    font-lock-reference-face
+    font-lock-preprocessor-face
+    font-lock-warning-face))
+
+;; #### There should be an emulation for the old font-lock-use-*
+;; settings!
+
+(defface font-lock-comment-face
+  '((((class color) (background dark)) (:foreground "gray80"))
+    (((class color) (background light)) (:foreground "blue4"))
+    (((class grayscale) (background light))
+     (:foreground "DimGray" :bold t :italic t))
+    (((class grayscale) (background dark))
+     (:foreground "LightGray" :bold t :italic t))
+    (t (:bold t)))
+  "Font Lock mode face used to highlight comments."
+  :group 'font-lock-faces)
+
+(defface font-lock-string-face
+  '((((class color) (background dark)) (:foreground "tan"))
+    (((class color) (background light)) (:foreground "green4"))
+    (((class grayscale) (background light)) (:foreground "DimGray" :italic t))
+    (((class grayscale) (background dark)) (:foreground "LightGray" :italic t))
+    (t (:bold t)))
+  "Font Lock mode face used to highlight strings."
+  :group 'font-lock-faces)
+
+(defface font-lock-doc-string-face
+  '((((class color) (background dark)) (:foreground "light coral"))
+    (((class color) (background light)) (:foreground "green4"))
+    (t (:bold t)))
+  "Font Lock mode face used to highlight documentation strings."
+  :group 'font-lock-faces)
+
+(defface font-lock-keyword-face
+  '((((class color) (background dark)) (:foreground "cyan"))
+    (((class color) (background light)) (:foreground "red4"))
+    (((class grayscale) (background light)) (:foreground "LightGray" :bold t))
+    (((class grayscale) (background dark)) (:foreground "DimGray" :bold t))
+    (t (:bold t)))
+  "Font Lock mode face used to highlight keywords."
+  :group 'font-lock-faces)
+
+(defface font-lock-function-name-face
+  '((((class color) (background dark)) (:foreground "aquamarine"))
+    (((class color) (background light)) (:foreground "brown4"))
+    (t (:bold t :underline t)))
+  "Font Lock mode face used to highlight function names."
+  :group 'font-lock-faces)
+
+(defface font-lock-variable-name-face
+  '((((class color) (background dark)) (:foreground "cyan3"))
+    (((class color) (background light)) (:foreground "magenta4"))
+    (((class grayscale) (background light))
+     (:foreground "Gray90" :bold t :italic t))
+    (((class grayscale) (background dark))
+     (:foreground "DimGray" :bold t :italic t))
+    (t (:underline t)))
+  "Font Lock mode face used to highlight variable names."
+  :group 'font-lock-faces)
+
+(defface font-lock-type-face
+  '((((class color) (background dark)) (:foreground "wheat"))
+    (((class color) (background light)) (:foreground "steelblue"))
+    (((class grayscale) (background light)) (:foreground "Gray90" :bold t))
+    (((class grayscale) (background dark)) (:foreground "DimGray" :bold t))
+    (t (:bold t)))
+  "Font Lock mode face used to highlight types."
+  :group 'font-lock-faces)
+
+(defface font-lock-reference-face
+  '((((class color) (background dark)) (:foreground "cadetblue2"))
+    (((class color) (background light)) (:foreground "red3"))
+    (((class grayscale) (background light))
+     (:foreground "LightGray" :bold t :underline t))
+    (((class grayscale) (background dark))
+     (:foreground "Gray50" :bold t :underline t)))
+  "Font Lock mode face used to highlight references."
+  :group 'font-lock-faces)
+
+;; #### FSF has font-lock-builtin-face.
+
+(defface font-lock-preprocessor-face
+  '((((class color) (background dark)) (:foreground "steelblue1"))
+    (((class color) (background light)) (:foreground "blue3"))
+    (t (:underline t)))
+  "Font Lock Mode face used to highlight preprocessor conditionals."
+  :group 'font-lock-faces)
+
+;; #### Currently unused
+(defface font-lock-warning-face
+  '((((class color) (background light)) (:foreground "Red" :bold t))
+    (((class color) (background dark)) (:foreground "Pink" :bold t))
+    (t (:inverse-video t :bold t)))
+  "Font Lock mode face used to highlight warnings."
+  :group 'font-lock-faces)
+
+(defun font-lock-recompute-variables ()
+  ;; Is this a Draconian thing to do?
+  (mapc #'(lambda (buffer)
+           (with-current-buffer buffer
+             (font-lock-mode 0)
+             (font-lock-set-defaults t)))
+       (buffer-list)))
+
+;; Backwards-compatible crud.
+
+(defun font-lock-reset-all-faces ()
+  (dolist (face font-lock-face-list)
+    (face-spec-set face (get face 'face-defface-spec))))
+
+(defun font-lock-use-default-fonts ()
+  "Reset the font-lock faces to a default set of fonts."
+  (interactive)
+  ;; #### !!!!
+  (font-lock-reset-all-faces))
+
+(defun font-lock-use-default-colors ()
+  "Reset the font-lock faces to a default set of colors."
+  (interactive)
+  ;; #### !!!!
+  (font-lock-reset-all-faces))
+
+(defun font-lock-use-default-minimal-decoration ()
+  "Reset the font-lock patterns to a fast, minimal set of decorations."
+  (and font-lock-maximum-decoration
+       (setq font-lock-maximum-decoration nil)
+       (font-lock-recompute-variables)))
+
+(defun font-lock-use-default-maximal-decoration ()
+  "Reset the font-lock patterns to a larger set of decorations."
+  (and (not (eq t font-lock-maximum-decoration))
+       (setq font-lock-maximum-decoration t)
+       (font-lock-recompute-variables)))
+
+\f
+;;;;;;;;;;;;;;;;;;;;;;        actual code        ;;;;;;;;;;;;;;;;;;;;;;
+
+;;; To fontify the whole buffer by language syntax, we go through it a
+;;; character at a time, creating extents on the boundary of each syntactic
+;;; unit (that is, one extent for each block comment, one for each line
+;;; comment, one for each string, etc.)  This is done with the C function
+;;; syntactically-sectionize.  It's in C for speed (the speed of lisp function
+;;; calls was a real bottleneck for this task since it involves examining each
+;;; character in turn.)
+;;;
+;;; Then we make a second pass, to fontify the buffer based on other patterns
+;;; specified by regexp.  When we find a match for a region of text, we need
+;;; to change the fonts on those characters.  This is done with the
+;;; put-text-property function, which knows how to efficiently share extents.
+;;; Conceptually, we are attaching some particular face to each of the
+;;; characters in a range, but the implementation of this involves creating
+;;; extents, or resizing existing ones.
+;;;
+;;; Each time a modification happens to a line, we re-fontify the entire line.
+;;; We do this by first removing the extents (text properties) on the line,
+;;; and then doing the syntactic and keyword passes again on that line.  (More
+;;; generally, each modified region is extended to include the preceding and
+;;; following BOL or EOL.)
+;;;
+;;; This means that, as the user types, we repeatedly go back to the beginning
+;;; of the line, doing more work the longer the line gets.  This doesn't cost
+;;; much in practice, and if we don't, then we incorrectly fontify things when,
+;;; for example, inserting spaces into `intfoo () {}'.
+;;;
+
+\f
+;; The user level functions
+
+;;;###autoload
+(defun font-lock-mode (&optional arg)
+  "Toggle Font Lock Mode.
+With arg, turn font-lock mode on if and only if arg is positive.
+
+When Font Lock mode is enabled, text is fontified as you type it:
+
+ - Comments are displayed in `font-lock-comment-face';
+ - Strings are displayed in `font-lock-string-face';
+ - Documentation strings (in Lisp-like languages) are displayed in
+   `font-lock-doc-string-face';
+ - Language keywords (\"reserved words\") are displayed in
+   `font-lock-keyword-face';
+ - Function names in their defining form are displayed in
+   `font-lock-function-name-face';
+ - Variable names in their defining form are displayed in
+   `font-lock-variable-name-face';
+ - Type names are displayed in `font-lock-type-face';
+ - References appearing in help files and the like are displayed
+   in `font-lock-reference-face';
+ - Preprocessor declarations are displayed in
+  `font-lock-preprocessor-face';
+
+   and
+
+ - Certain other expressions are displayed in other faces according
+   to the value of the variable `font-lock-keywords'.
+
+Where modes support different levels of fontification, you can use the variable
+`font-lock-maximum-decoration' to specify which level you generally prefer.
+When you turn Font Lock mode on/off the buffer is fontified/defontified, though
+fontification occurs only if the buffer is less than `font-lock-maximum-size'.
+To fontify a buffer without turning on Font Lock mode, and regardless of buffer
+size, you can use \\[font-lock-fontify-buffer].
+
+See the variable `font-lock-keywords' for customization."
+  (interactive "P")
+  (let ((on-p (if arg (> (prefix-numeric-value arg) 0) (not font-lock-mode)))
+       (maximum-size (if (not (consp font-lock-maximum-size))
+                         font-lock-maximum-size
+                       (cdr (or (assq major-mode font-lock-maximum-size)
+                                (assq t font-lock-maximum-size))))))
+    ;; Font-lock mode will refuse to turn itself on if in batch mode, or if
+    ;; the current buffer is "invisible".  The latter is because packages
+    ;; sometimes put their temporary buffers into some particular major mode
+    ;; to get syntax tables and variables and whatnot, but we don't want the
+    ;; fact that the user has font-lock-mode on a mode hook to slow these
+    ;; things down.
+    (if (or noninteractive (eq (aref (buffer-name) 0) ?\ ))
+       (setq on-p nil))
+    (if (equal (buffer-name) " *Compiler Input*") ; hack for bytecomp...
+       (setq on-p nil))
+    (cond (on-p
+          (make-local-hook 'after-change-functions)
+          (add-hook 'after-change-functions
+                    'font-lock-after-change-function nil t)
+          (add-hook 'pre-idle-hook 'font-lock-pre-idle-hook))
+         (t
+          (remove-hook 'after-change-functions
+                       'font-lock-after-change-function t)
+          (setq font-lock-defaults-computed nil
+                font-lock-keywords nil)
+          ;; We have no business doing this here, since 
+          ;; pre-idle-hook is global.  Other buffers may
+          ;; still be in font-lock mode.  -dkindred@cs.cmu.edu
+          ;; (remove-hook 'pre-idle-hook 'font-lock-pre-idle-hook)
+          ))
+    (set (make-local-variable 'font-lock-mode) on-p)
+    (cond (on-p
+          (font-lock-set-defaults-1)
+          (make-local-hook 'before-revert-hook)
+          (make-local-hook 'after-revert-hook)
+          ;; If buffer is reverted, must clean up the state.
+          (add-hook 'before-revert-hook 'font-lock-revert-setup nil t)
+          (add-hook 'after-revert-hook 'font-lock-revert-cleanup nil t)
+          (run-hooks 'font-lock-mode-hook)
+          (cond (font-lock-fontified
+                 nil)
+                ((or (null maximum-size) (<= (buffer-size) maximum-size))
+                 (font-lock-fontify-buffer))
+                (font-lock-verbose
+                 (lmessage 'command "Fontifying %s... buffer too big."
+                   (buffer-name)))))
+         (font-lock-fontified
+          (setq font-lock-fontified nil)
+          (remove-hook 'before-revert-hook 'font-lock-revert-setup t)
+          (remove-hook 'after-revert-hook 'font-lock-revert-cleanup t)
+          (font-lock-unfontify-region (point-min) (point-max))
+          (font-lock-thing-lock-cleanup))
+         (t
+          (remove-hook 'before-revert-hook 'font-lock-revert-setup t)
+          (remove-hook 'after-revert-hook 'font-lock-revert-cleanup t)
+          (font-lock-thing-lock-cleanup)))
+    (redraw-modeline)))
+
+;; For init-file hooks
+;;;###autoload
+(defun turn-on-font-lock ()
+  "Unconditionally turn on Font Lock mode."
+  (font-lock-mode 1))
+
+;;;###autoload
+(defun turn-off-font-lock ()
+  "Unconditionally turn off Font Lock mode."
+  (font-lock-mode 0))
+
+;;; FSF has here:
+
+;; support for add-keywords, global-font-lock-mode and
+;; font-lock-support-mode (unified support for various *-lock modes).
+
+\f
+;; Fontification functions.
+
+;; We first define some defsubsts to encapsulate the way we add
+;; faces to a region of text.  I am planning on modifying the
+;; text-property mechanism so that multiple independent classes
+;; of text properties can exist.  That way, for example, ediff's
+;; face text properties don't interfere with font lock's face
+;; text properties.  Due to the XEmacs implementation of text
+;; properties in terms of extents, doing this is fairly trivial:
+;; instead of using the `text-prop' property, you just use a
+;; specified property.
+
+(defsubst font-lock-set-face (start end face)
+  ;; Set the face on the characters in the range.
+  (put-nonduplicable-text-property start end 'face face)
+  (put-nonduplicable-text-property start end 'font-lock t))
+
+(defsubst font-lock-remove-face (start end)
+  ;; Remove any syntax highlighting on the characters in the range.
+  (put-nonduplicable-text-property start end 'face nil)
+  (put-nonduplicable-text-property start end 'font-lock nil))
+
+(defsubst font-lock-any-faces-p (start end)
+  ;; Return non-nil if we've put any syntax highlighting on
+  ;; the characters in the range.
+  ;;
+  ;; used to look for 'text-prop property, but this has problems if
+  ;; you put any other text properties in the vicinity.  Simon
+  ;; Marshall suggested looking for the 'face property (this is what
+  ;; FSF Emacs does) but that's equally bogus.  Only reliable way is
+  ;; for font-lock to specially mark its extents.
+  ;;
+  ;; FSF's (equivalent) definition of this defsubst would be
+  ;; (text-property-not-all start end 'font-lock nil)
+  ;;
+  ;; Perhaps our `map-extents' is faster than our definition
+  ;; of `text-property-not-all'.  #### If so, `text-property-not-all'
+  ;; should be fixed ...
+  ;;
+  (map-extents 'extent-property (current-buffer) start (1- end) 'font-lock))
+
+\f
+;; Fontification functions.
+
+;; Rather than the function, e.g., `font-lock-fontify-region' containing the
+;; code to fontify a region, the function runs the function whose name is the
+;; value of the variable, e.g., `font-lock-fontify-region-function'.  Normally,
+;; the value of this variable is, e.g., `font-lock-default-fontify-region'
+;; which does contain the code to fontify a region.  However, the value of the
+;; variable could be anything and thus, e.g., `font-lock-fontify-region' could
+;; do anything.  The indirection of the fontification functions gives major
+;; modes the capability of modifying the way font-lock.el fontifies.  Major
+;; modes can modify the values of, e.g., `font-lock-fontify-region-function',
+;; via the variable `font-lock-defaults'.
+;;
+;; For example, Rmail mode sets the variable `font-lock-defaults' so that
+;; font-lock.el uses its own function for buffer fontification.  This function
+;; makes fontification be on a message-by-message basis and so visiting an
+;; RMAIL file is much faster.  A clever implementation of the function might
+;; fontify the headers differently than the message body.  (It should, and
+;; correspondingly for Mail mode, but I can't be bothered to do the work.  Can
+;; you?)  This hints at a more interesting use...
+;;
+;; Languages that contain text normally contained in different major modes
+;; could define their own fontification functions that treat text differently
+;; depending on its context.  For example, Perl mode could arrange that here
+;; docs are fontified differently than Perl code.  Or Yacc mode could fontify
+;; rules one way and C code another.  Neat!
+;;
+;; A further reason to use the fontification indirection feature is when the
+;; default syntactual fontification, or the default fontification in general,
+;; is not flexible enough for a particular major mode.  For example, perhaps
+;; comments are just too hairy for `font-lock-fontify-syntactically-region' to
+;; cope with.  You need to write your own version of that function, e.g.,
+;; `hairy-fontify-syntactically-region', and make your own version of
+;; `hairy-fontify-region' call that function before calling
+;; `font-lock-fontify-keywords-region' for the normal regexp fontification
+;; pass.  And Hairy mode would set `font-lock-defaults' so that font-lock.el
+;; would call your region fontification function instead of its own.  For
+;; example, TeX modes could fontify {\foo ...} and \bar{...}  etc. multi-line
+;; directives correctly and cleanly.  (It is the same problem as fontifying
+;; multi-line strings and comments; regexps are not appropriate for the job.)
+
+;;;###autoload
+(defun font-lock-fontify-buffer ()
+  "Fontify the current buffer the way `font-lock-mode' would.
+See `font-lock-mode' for details.
+
+This can take a while for large buffers."
+  (interactive)
+  (let ((font-lock-verbose (or font-lock-verbose (interactive-p))))
+    (funcall font-lock-fontify-buffer-function)))
+
+(defun font-lock-unfontify-buffer ()
+  (funcall font-lock-unfontify-buffer-function))
+
+(defun font-lock-fontify-region (beg end &optional loudly)
+  (funcall font-lock-fontify-region-function beg end loudly))
+
+(defun font-lock-unfontify-region (beg end &optional loudly)
+  (funcall font-lock-unfontify-region-function beg end loudly))
+
+;; #### In these functions, the FSF is careful to do
+;; (save-restriction
+;;   (widen)
+;; before anything else.  Should we copy?
+(defun font-lock-default-fontify-buffer ()
+  (interactive)
+  (let ((was-on font-lock-mode)
+       (font-lock-verbose (or font-lock-verbose (interactive-p)))
+       (font-lock-message-threshold 0)
+       (aborted nil))
+    ;; Turn it on to run hooks and get the right font-lock-keywords.
+    (or was-on (font-lock-mode 1))
+    (font-lock-unfontify-region (point-min) (point-max) t)
+;;    (buffer-syntactic-context-flush-cache)
+    
+    ;; If a ^G is typed during fontification, abort the fontification, but
+    ;; return normally (do not signal.)  This is to make it easy to abort
+    ;; fontification if it's taking a long time, without also causing the
+    ;; buffer not to pop up.  If a real abort is desired, the user can ^G
+    ;; again.
+    ;;
+    ;; Possibly this should happen down in font-lock-fontify-region instead
+    ;; of here, but since that happens from the after-change-hook (meaning
+    ;; much more frequently) I'm afraid of the bad consequences of stealing
+    ;; the interrupt character at inopportune times.
+    ;;
+    (condition-case nil
+       (save-excursion
+         (font-lock-fontify-region (point-min) (point-max)))
+      (quit
+       (setq aborted t)))
+
+    (or was-on         ; turn it off if it was off.
+       (let ((font-lock-fontified nil)) ; kludge to prevent defontification
+         (font-lock-mode 0)))
+    (set (make-local-variable 'font-lock-fontified) t)
+    (when (and aborted font-lock-verbose)
+       (lmessage 'command  "Fontifying %s... aborted." (buffer-name))))
+  (run-hooks 'font-lock-after-fontify-buffer-hook))
+
+(defun font-lock-default-unfontify-buffer ()
+  (font-lock-unfontify-region (point-min) (point-max))
+  (set (make-local-variable 'font-lock-fontified) nil))
+
+;; This used to be `font-lock-fontify-region', and before that,
+;; `font-lock-fontify-region' used to be the name used for what is now
+;; `font-lock-fontify-syntactically-region'.
+(defun font-lock-default-fontify-region (beg end &optional loudly)
+  (let ((modified (buffer-modified-p))
+       (buffer-undo-list t) (inhibit-read-only t)
+       (old-syntax-table (syntax-table))
+       buffer-file-name buffer-file-truename)
+    (unwind-protect
+       (progn
+         ;; Use the fontification syntax table, if any.
+         (if font-lock-syntax-table (set-syntax-table font-lock-syntax-table))
+         ;; Now do the fontification.
+         (if font-lock-keywords-only
+             (font-lock-unfontify-region beg end)
+           (font-lock-fontify-syntactically-region beg end loudly))
+         (font-lock-fontify-keywords-region beg end loudly))
+      ;; Clean up.
+      (set-syntax-table old-syntax-table)
+      (and (not modified) (buffer-modified-p) (set-buffer-modified-p nil)))))
+
+;; The following must be rethought, since keywords can override fontification.
+;      ;; Now scan for keywords, but not if we are inside a comment now.
+;      (or (and (not font-lock-keywords-only)
+;             (let ((state (parse-partial-sexp beg end nil nil 
+;                                              font-lock-cache-state)))
+;               (or (nth 4 state) (nth 7 state))))
+;        (font-lock-fontify-keywords-region beg end))
+
+(defun font-lock-default-unfontify-region (beg end &optional maybe-loudly)
+  (when (and maybe-loudly font-lock-verbose
+            (>= (- end beg) font-lock-message-threshold))
+    (lmessage 'progress "Fontifying %s..." (buffer-name)))
+  (let ((modified (buffer-modified-p))
+       (buffer-undo-list t) (inhibit-read-only t)
+       buffer-file-name buffer-file-truename)
+    (font-lock-remove-face beg end)
+    (and (not modified) (buffer-modified-p) (set-buffer-modified-p nil))))
+
+;; Following is the original FSF version (similar to our original
+;; version, before all the crap I added below).
+;;
+;; Probably that crap should either be fixed up so it works better,
+;; or tossed away.
+;;
+;; I think that lazy-lock v2 tries to do something similar.
+;; Those efforts should be merged.
+
+;; Called when any modification is made to buffer text.
+;(defun font-lock-after-change-function (beg end old-len)
+;  (save-excursion
+;    (save-match-data
+;      ;; Rescan between start of line from `beg' and start of line after `end'.
+;      (font-lock-fontify-region
+;      (progn (goto-char beg) (beginning-of-line) (point))
+;      (progn (goto-char end) (forward-line 1) (point))))))
+
+(defvar font-lock-old-extent nil)
+(defvar font-lock-old-len 0)
+
+(defun font-lock-fontify-glumped-region ()
+  ;; even if something goes wrong in the fontification, mark the glumped
+  ;; region as fontified; otherwise, the same error might get signaled
+  ;; after every command.
+  (unwind-protect
+      ;; buffer may be deleted.
+      (if (buffer-live-p (extent-object font-lock-old-extent))
+         (save-excursion
+           (set-buffer (extent-object font-lock-old-extent))
+           (font-lock-after-change-function-1
+            (extent-start-position font-lock-old-extent)
+            (extent-end-position font-lock-old-extent)
+            font-lock-old-len)))
+    (detach-extent font-lock-old-extent)
+    (setq font-lock-old-extent nil)))
+
+(defun font-lock-pre-idle-hook ()
+  (condition-case nil
+      (if font-lock-old-extent
+         (font-lock-fontify-glumped-region))
+    (error (warn "Error caught in `font-lock-pre-idle-hook'"))))
+
+(defvar font-lock-always-fontify-immediately nil
+  "Set this to non-nil to disable font-lock deferral.")
+
+;;; called when any modification is made to buffer text.  This function
+;;; attempts to glump adjacent changes together so that excessive
+;;; fontification is avoided.  This function could easily be adapted
+;;; to other after-change-functions.
+
+(defun font-lock-after-change-function (beg end old-len)
+  (let ((obeg (and font-lock-old-extent
+                  (extent-start-position font-lock-old-extent)))
+       (oend (and font-lock-old-extent
+                  (extent-end-position font-lock-old-extent)))
+       (bc-end (+ beg old-len)))
+
+    ;; If this change can't be merged into the glumped one,
+    ;; we need to fontify the glumped one right now.
+    (if (and font-lock-old-extent
+            (or (not (eq (current-buffer)
+                         (extent-object font-lock-old-extent)))
+                (< bc-end obeg)
+                (> beg oend)))
+       (font-lock-fontify-glumped-region))
+  
+    (if font-lock-old-extent
+       ;; Update glumped region.
+       (progn
+         ;; Any characters in the before-change region that are
+         ;; outside the glumped region go into the glumped
+         ;; before-change region.
+         (if (> bc-end oend)
+             (setq font-lock-old-len (+ font-lock-old-len (- bc-end oend))))
+         (if (> obeg beg)
+             (setq font-lock-old-len (+ font-lock-old-len (- obeg beg))))
+         ;; New glumped region is the union of the glumped region
+         ;; and the new region.
+         (set-extent-endpoints font-lock-old-extent
+                               (min obeg beg)
+                               (max oend end)))
+
+      ;; No glumped region, so create one.
+      (setq font-lock-old-extent (make-extent beg end))
+      (set-extent-property font-lock-old-extent 'detachable nil)
+      (set-extent-property font-lock-old-extent 'end-open nil)
+      (setq font-lock-old-len old-len))
+
+    (if font-lock-always-fontify-immediately
+       (font-lock-fontify-glumped-region))))
+
+(defun font-lock-after-change-function-1 (beg end old-len)
+  (if (null font-lock-mode)
+      nil
+    (save-excursion
+      (save-restriction
+       ;; if we don't widen, then fill-paragraph (and any command that
+       ;; operates on a narrowed region) confuses things, because the C
+       ;; code will fail to realize that we're inside a comment.
+       (widen)
+       (save-match-data
+         (let ((zmacs-region-stays zmacs-region-stays)) ; protect from change!
+           (goto-char beg)
+           ;; Maybe flush the internal cache used by syntactically-sectionize.
+           ;; (It'd be nice if this was more automatic.)  Any deletions mean
+           ;; the cache is invalid, and insertions at beginning or end of line
+           ;; mean that the bol cache might be invalid.
+;;         (if (or (> old-len 0) (bobp) (= (preceding-char) ?\n))
+;;             (buffer-syntactic-context-flush-cache))
+
+           ;; Always recompute the whole line.
+           (goto-char end)
+           (forward-line 1)
+           (setq end (point))
+           (goto-char beg)
+           (beginning-of-line)
+           (setq beg (point))
+           ;; Rescan between start of line from `beg' and start of line after
+           ;; `end'.
+           (font-lock-fontify-region beg end)))))))
+
+\f
+;; Syntactic fontification functions.
+
+;; Note: Here is the FSF version.  Our version is much faster because
+;; of the C support we provide.  This may be useful for reference,
+;; however, and perhaps there is something useful here that should
+;; be merged into our version.
+;;
+;(defun font-lock-fontify-syntactically-region (start end &optional loudly)
+;  "Put proper face on each string and comment between START and END.
+;START should be at the beginning of a line."
+;  (let ((synstart (if comment-start-skip
+;                     (concat "\\s\"\\|" comment-start-skip)
+;                   "\\s\""))
+;       (comstart (if comment-start-skip
+;                     (concat "\\s<\\|" comment-start-skip)
+;                   "\\s<"))
+;       state prev prevstate)
+;    (if loudly (message "Fontifying %s... (syntactically...)" (buffer-name)))
+;    (save-restriction
+;      (widen)
+;      (goto-char start)
+;      ;;
+;      ;; Find the state at the `beginning-of-line' before `start'.
+;      (if (eq start font-lock-cache-position)
+;         ;; Use the cache for the state of `start'.
+;         (setq state font-lock-cache-state)
+;       ;; Find the state of `start'.
+;       (if (null font-lock-beginning-of-syntax-function)
+;           ;; Use the state at the previous cache position, if any, or
+;           ;; otherwise calculate from `point-min'.
+;           (if (or (null font-lock-cache-position)
+;                   (< start font-lock-cache-position))
+;               (setq state (parse-partial-sexp (point-min) start))
+;             (setq state (parse-partial-sexp font-lock-cache-position start
+;                                             nil nil font-lock-cache-state)))
+;         ;; Call the function to move outside any syntactic block.
+;         (funcall font-lock-beginning-of-syntax-function)
+;         (setq state (parse-partial-sexp (point) start)))
+;       ;; Cache the state and position of `start'.
+;       (setq font-lock-cache-state state
+;             font-lock-cache-position start))
+;      ;;
+;      ;; If the region starts inside a string, show the extent of it.
+;      (if (nth 3 state)
+;         (let ((beg (point)))
+;           (while (and (re-search-forward "\\s\"" end 'move)
+;                       (nth 3 (parse-partial-sexp beg (point)
+;                                                  nil nil state))))
+;           (put-text-property beg (point) 'face font-lock-string-face)
+;           (setq state (parse-partial-sexp beg (point) nil nil state))))
+;      ;;
+;      ;; Likewise for a comment.
+;      (if (or (nth 4 state) (nth 7 state))
+;         (let ((beg (point)))
+;           (save-restriction
+;             (narrow-to-region (point-min) end)
+;             (condition-case nil
+;                 (progn
+;                   (re-search-backward comstart (point-min) 'move)
+;                   (forward-comment 1)
+;                   ;; forward-comment skips all whitespace,
+;                   ;; so go back to the real end of the comment.
+;                   (skip-chars-backward " \t"))
+;               (error (goto-char end))))
+;           (put-text-property beg (point) 'face font-lock-comment-face)
+;           (setq state (parse-partial-sexp beg (point) nil nil state))))
+;      ;;
+;      ;; Find each interesting place between here and `end'.
+;      (while (and (< (point) end)
+;                 (setq prev (point) prevstate state)
+;                 (re-search-forward synstart end t)
+;                 (progn
+;                   ;; Clear out the fonts of what we skip over.
+;                   (remove-text-properties prev (point) '(face nil))
+;                   ;; Verify the state at that place
+;                   ;; so we don't get fooled by \" or \;.
+;                   (setq state (parse-partial-sexp prev (point)
+;                                                   nil nil state))))
+;       (let ((here (point)))
+;         (if (or (nth 4 state) (nth 7 state))
+;             ;;
+;             ;; We found a real comment start.
+;             (let ((beg (match-beginning 0)))
+;               (goto-char beg)
+;               (save-restriction
+;                 (narrow-to-region (point-min) end)
+;                 (condition-case nil
+;                     (progn
+;                       (forward-comment 1)
+;                       ;; forward-comment skips all whitespace,
+;                       ;; so go back to the real end of the comment.
+;                       (skip-chars-backward " \t"))
+;                   (error (goto-char end))))
+;               (put-text-property beg (point) 'face
+;                                  font-lock-comment-face)
+;               (setq state (parse-partial-sexp here (point) nil nil state)))
+;           (if (nth 3 state)
+;               ;;
+;               ;; We found a real string start.
+;               (let ((beg (match-beginning 0)))
+;                 (while (and (re-search-forward "\\s\"" end 'move)
+;                             (nth 3 (parse-partial-sexp here (point)
+;                                                        nil nil state))))
+;                 (put-text-property beg (point) 'face font-lock-string-face)
+;                 (setq state (parse-partial-sexp here (point)
+;                                                 nil nil state))))))
+;       ;;
+;       ;; Make sure `prev' is non-nil after the loop
+;       ;; only if it was set on the very last iteration.
+;       (setq prev nil)))
+;    ;;
+;    ;; Clean up.
+;    (and prev (remove-text-properties prev end '(face nil)))))
+
+(defun font-lock-fontify-syntactically-region (start end &optional loudly)
+  "Put proper face on each string and comment between START and END.
+START should be at the beginning of a line."
+  (if font-lock-keywords-only
+      nil
+    (when (and font-lock-verbose
+              (>= (- end start) font-lock-message-threshold))
+      (lmessage 'progress "Fontifying %s... (syntactically...)"
+       (buffer-name)))
+    (font-lock-unfontify-region start end loudly)
+    (goto-char start)
+    (if (> end (point-max)) (setq end (point-max)))
+    (syntactically-sectionize
+      #'(lambda (s e context depth)
+         (let (face)
+           (cond ((eq context 'string)
+                  ;;#### Should only do this is Lisp-like modes!
+                  (setq face
+                        (if (= depth 1)
+                            ;; really we should only use this if
+                            ;;  in position 3 depth 1, but that's
+                            ;;  too expensive to compute.
+                            'font-lock-doc-string-face
+                          'font-lock-string-face)))
+                 ((or (eq context 'comment)
+                      (eq context 'block-comment))
+                  (setq face 'font-lock-comment-face)
+;               ;; Don't fontify whitespace at the beginning of lines;
+;               ;;  otherwise comment blocks may not line up with code.
+;               ;; (This is sometimes a good idea, sometimes not; in any
+;               ;; event it should be in C for speed --jwz)
+;               (save-excursion
+;                   (goto-char s)
+;                   (while (prog1 (search-forward "\n" (1- e) 'move)
+;                            (setq face 'font-lock-comment-face)
+;                            (setq e (point)))
+;                     (skip-chars-forward " \t\n")
+;                     (setq s (point)))
+                  ))
+           (font-lock-set-face s e face)))
+      start end)
+    ))
+\f
+;;; Additional text property functions.
+
+;; The following three text property functions are not generally available (and
+;; it's not certain that they should be) so they are inlined for speed.
+;; The case for `fillin-text-property' is simple; it may or not be generally
+;; useful.  (Since it is used here, it is useful in at least one place.;-)
+;; However, the case for `append-text-property' and `prepend-text-property' is
+;; more complicated.  Should they remove duplicate property values or not?  If
+;; so, should the first or last duplicate item remain?  Or the one that was
+;; added?  In our implementation, the first duplicate remains.
+
+;; XEmacs: modified all these functions to use
+;; `put-nonduplicable-text-property' instead of `put-text-property', and
+;; the first one to take both SETPROP and MARKPROP, in accordance with the
+;; changed definitions of `font-lock-any-faces-p' and `font-lock-set-face'.
+
+(defsubst font-lock-fillin-text-property (start end setprop markprop value &optional object)
+  "Fill in one property of the text from START to END.
+Arguments PROP and VALUE specify the property and value to put where none are
+already in place.  Therefore existing property values are not overwritten.
+Optional argument OBJECT is the string or buffer containing the text."
+  (let ((start (text-property-any start end markprop nil object)) next)
+    (while start
+      (setq next (next-single-property-change start markprop object end))
+      (put-nonduplicable-text-property start next setprop value object)
+      (put-nonduplicable-text-property start next markprop value object)
+      (setq start (text-property-any next end markprop nil object)))))
+
+;; This function (from simon's unique.el) is rewritten and inlined for speed.
+;(defun unique (list function)
+;  "Uniquify LIST, deleting elements using FUNCTION.
+;Return the list with subsequent duplicate items removed by side effects.
+;FUNCTION is called with an element of LIST and a list of elements from LIST,
+;and should return the list of elements with occurrences of the element removed,
+;i.e., a function such as `delete' or `delq'.
+;This function will work even if LIST is unsorted.  See also `uniq'."
+;  (let ((list list))
+;    (while list
+;      (setq list (setcdr list (funcall function (car list) (cdr list))))))
+;  list)
+
+(defsubst font-lock-unique (list)
+  "Uniquify LIST, deleting elements using `delq'.
+Return the list with subsequent duplicate items removed by side effects."
+  (let ((list list))
+    (while list
+      (setq list (setcdr list (delq (car list) (cdr list))))))
+  list)
+
+;; A generalisation of `facemenu-add-face' for any property, but without the
+;; removal of inactive faces via `facemenu-discard-redundant-faces' and special
+;; treatment of `default'.  Uses `unique' to remove duplicate property values.
+(defsubst font-lock-prepend-text-property (start end prop value &optional object)
+  "Prepend to one property of the text from START to END.
+Arguments PROP and VALUE specify the property and value to prepend to the value
+already in place.  The resulting property values are always lists, and unique.
+Optional argument OBJECT is the string or buffer containing the text."
+  (let ((val (if (listp value) value (list value))) next prev)
+    (while (/= start end)
+      (setq next (next-single-property-change start prop object end)
+           prev (get-text-property start prop object))
+      (put-text-property
+       start next prop
+       (font-lock-unique (append val (if (listp prev) prev (list prev))))
+       object)
+      (setq start next))))
+
+(defsubst font-lock-append-text-property (start end prop value &optional object)
+  "Append to one property of the text from START to END.
+Arguments PROP and VALUE specify the property and value to append to the value
+already in place.  The resulting property values are always lists, and unique.
+Optional argument OBJECT is the string or buffer containing the text."
+  (let ((val (if (listp value) value (list value))) next prev)
+    (while (/= start end)
+      (setq next (next-single-property-change start prop object end)
+           prev (get-text-property start prop object))
+      (put-text-property
+       start next prop
+       (font-lock-unique (append (if (listp prev) prev (list prev)) val))
+       object)
+      (setq start next))))
+\f
+;;; Regexp fontification functions.
+
+(defsubst font-lock-apply-highlight (highlight)
+  "Apply HIGHLIGHT following a match.
+HIGHLIGHT should be of the form MATCH-HIGHLIGHT, see `font-lock-keywords'."
+  (let* ((match (nth 0 highlight))
+        (start (match-beginning match)) (end (match-end match))
+        (override (nth 2 highlight)))
+    (let ((newface (nth 1 highlight)))
+      (or (symbolp newface)
+         (setq newface (eval newface)))
+      (cond ((not start)
+            ;; No match but we might not signal an error.
+            (or (nth 3 highlight)
+                (error "No match %d in highlight %S" match highlight)))
+           ((= start end) nil)
+           ((not override)
+            ;; Cannot override existing fontification.
+            (or (font-lock-any-faces-p start end)
+                (font-lock-set-face start end newface)))
+           ((eq override t)
+            ;; Override existing fontification.
+            (font-lock-set-face start end newface))
+           ((eq override 'keep)
+            ;; Keep existing fontification.
+            (font-lock-fillin-text-property start end 'face 'font-lock
+                                            newface))
+           ((eq override 'prepend)
+            ;; Prepend to existing fontification.
+            (font-lock-prepend-text-property start end 'face newface))
+           ((eq override 'append)
+            ;; Append to existing fontification.
+            (font-lock-append-text-property start end 'face newface))))))
+
+(defsubst font-lock-fontify-anchored-keywords (keywords limit)
+  "Fontify according to KEYWORDS until LIMIT.
+KEYWORDS should be of the form MATCH-ANCHORED, see `font-lock-keywords',
+LIMIT can be modified by the value of its PRE-MATCH-FORM."
+  (let ((matcher (nth 0 keywords)) (lowdarks (nthcdr 3 keywords)) highlights
+       ;; Evaluate PRE-MATCH-FORM.
+       (pre-match-value (eval (nth 1 keywords))))
+    ;; Set LIMIT to value of PRE-MATCH-FORM or the end of line.
+    (if (and (numberp pre-match-value) (> pre-match-value (point)))
+       (setq limit pre-match-value)
+      (save-excursion (end-of-line) (setq limit (point))))
+    (save-match-data
+      ;; Find an occurrence of `matcher' before `limit'.
+      (while (if (stringp matcher)
+                (re-search-forward matcher limit t)
+              (funcall matcher limit))
+       ;; Apply each highlight to this instance of `matcher'.
+       (setq highlights lowdarks)
+       (while highlights
+         (font-lock-apply-highlight (car highlights))
+         (setq highlights (cdr highlights)))))
+    ;; Evaluate POST-MATCH-FORM.
+    (eval (nth 2 keywords))))
+
+(defun font-lock-fontify-keywords-region (start end &optional loudvar)
+  "Fontify according to `font-lock-keywords' between START and END.
+START should be at the beginning of a line."
+  (let ((loudly (and font-lock-verbose
+                    (>= (- end start) font-lock-message-threshold))))
+    (let ((case-fold-search font-lock-keywords-case-fold-search)
+         (keywords (cdr (if (eq (car-safe font-lock-keywords) t)
+                            font-lock-keywords
+                          (font-lock-compile-keywords))))
+         (bufname (buffer-name)) (count 0)
+         keyword matcher highlights)
+      ;;
+      ;; Fontify each item in `font-lock-keywords' from `start' to `end'.
+      (while keywords
+       (when loudly (lmessage 'progress "Fontifying %s... (regexps..%s)"
+                      bufname
+                      (make-string (setq count (1+ count)) ?.)))
+       ;;
+       ;; Find an occurrence of `matcher' from `start' to `end'.
+       (setq keyword (car keywords) matcher (car keyword))
+       (goto-char start)
+       (while (and (< (point) end)
+                   (if (stringp matcher)
+                       (re-search-forward matcher end t)
+                     (funcall matcher end)))
+         ;; Apply each highlight to this instance of `matcher', which may be
+         ;; specific highlights or more keywords anchored to `matcher'.
+         (setq highlights (cdr keyword))
+         (while highlights
+           (if (numberp (car (car highlights)))
+               (let ((end (match-end (car (car highlights)))))
+                 (font-lock-apply-highlight (car highlights))
+                 ;; restart search just after the end of the
+                 ;; keyword so keywords can share bracketing
+                 ;; expressions.
+                 (and end (goto-char end)))
+             (font-lock-fontify-anchored-keywords (car highlights) end))
+           (setq highlights (cdr highlights))))
+       (setq keywords (cdr keywords))))
+    (if loudly (lmessage 'progress "Fontifying %s... done." (buffer-name)))))
+
+\f
+;; Various functions.
+
+;; Turn off other related packages if they're on.  I prefer a hook. --sm.
+;; These explicit calls are easier to understand
+;; because people know what they will do.
+;; A hook is a mystery because it might do anything whatever. --rms.
+(defun font-lock-thing-lock-cleanup ()
+  (cond ((and (boundp 'fast-lock-mode) fast-lock-mode)
+        (fast-lock-mode -1))
+       ((and (boundp 'lazy-lock-mode) lazy-lock-mode)
+        (lazy-lock-mode -1))
+       ((and (boundp 'lazy-shot-mode) lazy-shot-mode)
+        (lazy-shot-mode -1))))
+
+;; Do something special for these packages after fontifying.  I prefer a hook.
+(defun font-lock-after-fontify-buffer ()
+  (cond ((and (boundp 'fast-lock-mode) fast-lock-mode)
+        (fast-lock-after-fontify-buffer))
+       ((and (boundp 'lazy-lock-mode) lazy-lock-mode)
+        (lazy-lock-after-fontify-buffer))))
+
+;; If the buffer is about to be reverted, it won't be fontified afterward.
+(defun font-lock-revert-setup ()
+  (setq font-lock-fontified nil))
+
+;; If the buffer has just been reverted, normally that turns off
+;; Font Lock mode.  So turn the mode back on if necessary.
+(defalias 'font-lock-revert-cleanup 'turn-on-font-lock)
+
+\f
+;; Various functions.
+
+(defun font-lock-compile-keywords (&optional keywords)
+  ;; Compile `font-lock-keywords' into the form (t KEYWORD ...) where KEYWORD
+  ;; is the (MATCHER HIGHLIGHT ...) shown in the variable's doc string.
+  (let ((keywords (or keywords font-lock-keywords)))
+    (setq font-lock-keywords 
+     (if (eq (car-safe keywords) t)
+        keywords
+       (cons t (mapcar 'font-lock-compile-keyword keywords))))))
+
+(defun font-lock-compile-keyword (keyword)
+  (cond ((nlistp keyword)              ; Just MATCHER
+        (list keyword '(0 font-lock-keyword-face)))
+       ((eq (car keyword) 'eval)       ; Specified (eval . FORM)
+        (font-lock-compile-keyword (eval (cdr keyword))))
+       ((numberp (cdr keyword))        ; Specified (MATCHER . MATCH)
+        (list (car keyword) (list (cdr keyword) 'font-lock-keyword-face)))
+       ((symbolp (cdr keyword))        ; Specified (MATCHER . FACENAME)
+        (list (car keyword) (list 0 (cdr keyword))))
+       ((nlistp (nth 1 keyword))       ; Specified (MATCHER . HIGHLIGHT)
+        (list (car keyword) (cdr keyword)))
+       (t                              ; Hopefully (MATCHER HIGHLIGHT ...)
+        keyword)))
+
+(defun font-lock-choose-keywords (keywords level)
+  ;; Return LEVELth element of KEYWORDS.  A LEVEL of nil is equal to a
+  ;; LEVEL of 0, a LEVEL of t is equal to (1- (length KEYWORDS)).
+  (let ((level (if (not (consp level))
+                  level
+                (cdr (or (assq major-mode level) (assq t level))))))
+    (cond ((symbolp keywords)
+          keywords)
+         ((numberp level)
+          (or (nth level keywords) (car (reverse keywords))))
+         ((eq level t)
+          (car (reverse keywords)))
+         (t
+          (car keywords)))))
+
+\f
+;;; Determining which set of font-lock keywords to use.
+
+(defun font-lock-find-font-lock-defaults (modesym)
+  ;; Get the defaults based on the major mode.
+  (let (raw-defaults)
+    ;; I want a do-while loop!
+    (while (progn
+            (setq raw-defaults (get modesym 'font-lock-defaults))
+            (and raw-defaults (symbolp raw-defaults)
+                 (setq modesym raw-defaults)))
+      )
+    raw-defaults))
+
+(defun font-lock-examine-syntax-table ()
+  ; Computes the value of font-lock-keywords-only for this buffer.
+  (if (eq (syntax-table) (standard-syntax-table))
+      ;; Assume that modes which haven't bothered to install their own
+      ;; syntax table don't do anything syntactically interesting.
+      ;; Really, the standard-syntax-table shouldn't have comments and
+      ;; strings in it, but changing that now might break things.
+      nil
+    ;; else map over the syntax table looking for strings or comments.
+    (let (got-one)
+      ;; XEmacs 20.0 ...
+      (if (fboundp 'map-syntax-table)
+         (setq got-one
+               (map-syntax-table
+                #'(lambda (key value)
+                    (memq (char-syntax-from-code value)
+                          '(?\" ?\< ?\> ?\$)))
+                (syntax-table)))
+       ;; older Emacsen.
+       (let ((i (1- (length (syntax-table)))))
+         (while (>= i 0)
+           (if (memq (char-syntax i) '(?\" ?\< ?\> ?\$))
+               (setq got-one t i 0))
+           (setq i (1- i)))))
+      (set (make-local-variable 'font-lock-keywords-only) (not got-one)))))
+
+;; font-lock-set-defaults is in fontl-hooks.el.
+
+;;;###autoload
+(defun font-lock-set-defaults-1 (&optional explicit-defaults)
+  ;; does everything that font-lock-set-defaults does except
+  ;; enable font-lock-mode.  This is called by `font-lock-mode'.
+  ;; Note that the return value is used!
+
+  (if (and font-lock-defaults-computed (not explicit-defaults))
+      ;; nothing to do.
+      nil
+
+    (or font-lock-keywords
+       (let* ((defaults (or (and (not (eq t explicit-defaults))
+                                 explicit-defaults)
+                            ;; in case modes decide to set
+                            ;; `font-lock-defaults' themselves,
+                            ;; as in FSF Emacs.
+                            font-lock-defaults
+                            (font-lock-find-font-lock-defaults major-mode)))
+              (keywords (font-lock-choose-keywords
+                         (nth 0 defaults) font-lock-maximum-decoration)))
+         
+         ;; Keywords?
+         (setq font-lock-keywords (if (fboundp keywords)
+                                      (funcall keywords)
+                                    (eval keywords)))
+         (or font-lock-keywords
+             ;; older way:
+             ;; try to look for a variable `foo-mode-font-lock-keywords',
+             ;; or similar.
+             (let ((major (symbol-name major-mode))
+                   (try #'(lambda (n)
+                            (if (stringp n) (setq n (intern-soft n)))
+                            (if (and n
+                                     (boundp n))
+                                n
+                              nil))))
+               (setq font-lock-keywords 
+                     (symbol-value
+                      (or (funcall try (get major-mode 'font-lock-keywords))
+                          (funcall try (concat major "-font-lock-keywords"))
+                          (funcall try (and (string-match "-mode\\'" major)
+                                            (concat (substring 
+                                                     major 0 
+                                                     (match-beginning 0))
+                                                    "-font-lock-keywords")))
+                          'font-lock-keywords)))))
+
+         ;; Case fold?
+         (if (>= (length defaults) 3)
+             (setq font-lock-keywords-case-fold-search (nth 2 defaults))
+           ;; older way:
+           ;; look for a property 'font-lock-keywords-case-fold-search on
+           ;; the major-mode symbol.
+           (let* ((nonexist (make-symbol ""))
+                  (value (get major-mode 'font-lock-keywords-case-fold-search
+                              nonexist)))
+             (if (not (eq nonexist value))
+                 (setq font-lock-keywords-case-fold-search value))))
+
+         ;; Syntactic?
+         (if (>= (length defaults) 2)
+             (setq font-lock-keywords-only (nth 1 defaults))
+           ;; older way:
+           ;; cleverly examine the syntax table.
+           (font-lock-examine-syntax-table))
+          
+         ;; Syntax table?
+         (if (nth 3 defaults)
+             (let ((slist (nth 3 defaults)))
+               (setq font-lock-syntax-table
+                     (copy-syntax-table (syntax-table)))
+               (while slist
+                 (modify-syntax-entry (car (car slist)) (cdr (car slist))
+                                      font-lock-syntax-table)
+                 (setq slist (cdr slist)))))
+
+         ;; Syntax function?
+         (cond (defaults
+                 (setq font-lock-beginning-of-syntax-function
+                       (nth 4 defaults)))
+               (t
+                ;; older way:
+                ;; defaults not specified at all, so use `beginning-of-defun'.
+                (setq font-lock-beginning-of-syntax-function
+                      'beginning-of-defun)))))
+
+    (setq font-lock-defaults-computed t)))
+
+\f
+;;;;;;;;;;;;;;;;;;;;;;         keywords         ;;;;;;;;;;;;;;;;;;;;;;
+
+;;; Various major-mode interfaces.
+;;; Probably these should go in with the source of the respective major modes.
+
+;; The defaults and keywords listed here should perhaps be moved into
+;; mode-specific files.
+
+;; For C and Lisp modes we use `beginning-of-defun', rather than nil,
+;; for SYNTAX-BEGIN.  Thus the calculation of the cache is usually
+;; faster but not infallible, so we risk mis-fontification.  --sm.
+
+(put 'c-mode 'font-lock-defaults 
+     '((c-font-lock-keywords
+       c-font-lock-keywords-1 c-font-lock-keywords-2 c-font-lock-keywords-3)
+       nil nil ((?_ . "w")) beginning-of-defun))
+(put 'c++-c-mode 'font-lock-defaults 'c-mode)
+(put 'elec-c-mode 'font-lock-defaults 'c-mode)
+
+(put 'c++-mode 'font-lock-defaults
+     '((c++-font-lock-keywords
+       c++-font-lock-keywords-1 c++-font-lock-keywords-2
+       c++-font-lock-keywords-3)
+       nil nil ((?_ . "w") (?~ . "w")) beginning-of-defun))
+
+(put 'java-mode 'font-lock-defaults 
+     '((java-font-lock-keywords
+       java-font-lock-keywords-1 java-font-lock-keywords-2
+       java-font-lock-keywords-3)
+       nil nil ((?_ . "w")) beginning-of-defun
+       (font-lock-mark-block-function . mark-defun)))
+
+(put 'lisp-mode 'font-lock-defaults
+     '((lisp-font-lock-keywords
+       lisp-font-lock-keywords-1 lisp-font-lock-keywords-2)
+       nil nil
+       ((?: . "w") (?- . "w") (?* . "w") (?+ . "w") (?. . "w") (?< . "w")
+       (?> . "w") (?= . "w") (?! . "w") (?? . "w") (?$ . "w") (?% . "w")
+       (?_ . "w") (?& . "w") (?~ . "w") (?^ . "w") (?/ . "w"))
+       beginning-of-defun))
+(put 'emacs-lisp-mode 'font-lock-defaults 'lisp-mode)
+(put 'lisp-interaction-mode 'font-lock-defaults 'lisp-mode)
+
+(put 'scheme-mode 'font-lock-defaults
+     '(scheme-font-lock-keywords
+       nil t
+       ((?: . "w") (?- . "w") (?* . "w") (?+ . "w") (?. . "w") (?< . "w")
+       (?> . "w") (?= . "w") (?! . "w") (?? . "w") (?$ . "w") (?% . "w")
+       (?_ . "w") (?& . "w") (?~ . "w") (?^ . "w") (?/ . "w"))
+       beginning-of-defun))
+(put 'inferior-scheme-mode 'font-lock-defaults 'scheme-mode)
+(put 'scheme-interaction-mode 'font-lock-defaults 'scheme-mode)
+
+(put 'tex-mode 'font-lock-defaults
+     ;; For TeX modes we could use `backward-paragraph' for the same reason.
+     '(tex-font-lock-keywords nil nil ((?$ . "\""))))
+;; the nine billion names of TeX mode...
+(put 'bibtex-mode      'font-lock-defaults 'tex-mode)
+(put 'plain-tex-mode   'font-lock-defaults 'tex-mode)
+(put 'slitex-tex-mode  'font-lock-defaults 'tex-mode)
+(put 'SliTeX-mode      'font-lock-defaults 'tex-mode)
+(put 'slitex-mode      'font-lock-defaults 'tex-mode)
+(put 'latex-tex-mode   'font-lock-defaults 'tex-mode)
+(put 'LaTex-tex-mode   'font-lock-defaults 'tex-mode)
+(put 'latex-mode        'font-lock-defaults 'tex-mode)
+(put 'LaTeX-mode        'font-lock-defaults 'tex-mode)
+(put 'japanese-LaTeX-mode 'font-lock-defaults 'tex-mode)
+(put 'japanese-SliTeX-mode 'font-lock-defaults 'tex-mode)
+(put 'FoilTeX-mode     'font-lock-defaults 'tex-mode)
+(put 'LATeX-MoDe       'font-lock-defaults 'tex-mode)
+(put 'lATEx-mODe       'font-lock-defaults 'tex-mode)
+;; ok, this is getting a bit silly ...
+(put 'eDOm-xETAl       'font-lock-defaults 'tex-mode)
+
+;;; Various regexp information shared by several modes.
+;;; Information specific to a single mode should go in its load library.
+
+(defconst lisp-font-lock-keywords-1
+  (list
+   ;; Anything not a variable or type declaration is fontified as a function.
+   ;; It would be cleaner to allow preceding whitespace, but it would also be
+   ;; about five times slower.
+   (list (concat "^(\\(def\\("
+                 ;; Variable declarations.
+                 "\\(const\\(\\|ant\\)\\|ine-key\\(\\|-after\\)\\|var\\|custom\\)\\|"
+                 ;; Structure declarations.
+                 "\\(class\\|struct\\|type\\)\\|"
+                 ;; Everything else is a function declaration.
+                 "\\([^ \t\n\(\)]+\\)"
+                 "\\)\\)\\>"
+                 ;; Any whitespace and declared object.
+                 "[ \t'\(]*"
+                 "\\([^ \t\n\)]+\\)?")
+         '(1 font-lock-keyword-face)
+         '(8 (cond ((match-beginning 3) 'font-lock-variable-name-face)
+                   ((match-beginning 6) 'font-lock-type-face)
+                   (t 'font-lock-function-name-face))
+             nil t))
+   )
+ "Subdued level highlighting Lisp modes.")
+
+(defconst lisp-font-lock-keywords-2
+  (append lisp-font-lock-keywords-1
+   (list
+    ;;
+    ;; Control structures.  ELisp and CLisp combined.
+    ;;
+    ;;(regexp-opt
+    ;;  '("cond" "if" "while" "let" "let*" "prog" "progn" "prog1"
+    ;;    "prog2" "progv" "catch" "throw" "save-restriction"
+    ;;    "save-excursion" "save-window-excursion"
+    ;;    "save-current-buffer" "with-current-buffer"
+    ;;    "with-temp-file" "with-temp-buffer" "with-output-to-string"
+    ;;    "with-string-as-buffer-contents"
+    ;;    "save-selected-window" "save-match-data" "unwind-protect"
+    ;;    "condition-case" "track-mouse" "autoload"
+    ;;    "eval-after-load" "eval-and-compile" "eval-when-compile"
+    ;;    "when" "unless" "do" "dolist" "dotimes" "flet" "labels"
+    ;;    "lambda" "return" "return-from"))
+    (cons
+     (concat
+      "(\\("
+      "autoload\\|c\\(atch\\|ond\\(ition-case\\)?\\)\\|do\\(list\\|"
+      "times\\)?\\|eval-\\(a\\(fter-load\\|nd-compile\\)\\|when-compile\\)\\|"
+      "flet\\|if\\|l\\(a\\(bels\\|mbda\\)\\|et\\*?\\)\\|"
+      "prog[nv12\\*]?\\|return\\(-from\\)?\\|save-\\(current-buffer\\|"
+      "excursion\\|match-data\\|restriction\\|selected-window\\|"
+      "window-excursion\\)\\|t\\(hrow\\|rack-mouse\\)\\|un\\(less\\|"
+      "wind-protect\\)\\|w\\(h\\(en\\|ile\\)\\|ith-\\(current-buffer\\|"
+      "output-to-string\\|string-as-buffer-contents\\|temp-\\(buffer\\|"
+      "file\\)\\)\\)"
+      "\\)\\>") 1)
+    ;;
+    ;; Feature symbols as references.
+    '("(\\(featurep\\|provide\\|require\\)\\>[ \t']*\\(\\sw+\\)?"
+      (1 font-lock-keyword-face) (2 font-lock-reference-face nil t))
+    ;;
+    ;; Words inside \\[] tend to be for `substitute-command-keys'.
+    '("\\\\\\\\\\[\\(\\sw+\\)]" 1 font-lock-reference-face prepend)
+    ;;
+    ;; Words inside `' tend to be symbol names.
+    '("`\\(\\sw\\sw+\\)'" 1 font-lock-reference-face prepend)
+    ;;
+    ;; CLisp `:' keywords as references.
+    '("\\<:\\sw+\\>" 0 font-lock-reference-face prepend)
+    ;;
+    ;; ELisp and CLisp `&' keywords as types.
+    '("\\<\\&\\(optional\\|rest\\|whole\\)\\>" . font-lock-type-face)
+    ))
+  "Gaudy level highlighting for Lisp modes.")
+
+(defvar lisp-font-lock-keywords lisp-font-lock-keywords-1
+  "Default expressions to highlight in Lisp modes.")
+
+;; The previous version, before replacing it with the FSF version.
+;(defconst lisp-font-lock-keywords-1 (purecopy
+; '(;;
+;   ;; highlight defining forms.  This doesn't work too nicely for
+;   ;; (defun (setf foo) ...) but it does work for (defvar foo) which
+;   ;; is more important.
+;   ("^(def[-a-z]+\\s +\\([^ \t\n\)]+\\)" 1 font-lock-function-name-face)
+;   ;;
+;   ;; highlight CL keywords (three clauses seems faster than one)
+;   ("\\s :\\(\\(\\sw\\|\\s_\\)+\\)\\>" . 1)
+;   ("(:\\(\\(\\sw\\|\\s_\\)+\\)\\>" . 1)
+;   ("':\\(\\(\\sw\\|\\s_\\)+\\)\\>" . 1)
+;   ;;
+;   ;; this is highlights things like (def* (setf foo) (bar baz)), but may
+;   ;; be slower (I haven't really thought about it)
+;;   ("^(def[-a-z]+\\s +\\(\\s(\\S)*\\s)\\|\\S(\\S *\\)"
+;;    1 font-lock-function-name-face)
+;   ))
+; "For consideration as a value of `lisp-font-lock-keywords'.
+;This does fairly subdued highlighting.")
+;
+;(defconst lisp-font-lock-keywords-2 (purecopy
+;  (append lisp-font-lock-keywords-1
+;   '(;;
+;     ;; Highlight control structures
+;     ("(\\(cond\\|if\\|when\\|unless\\|[ec]?\\(type\\)?case\\)[ \t\n]" . 1)
+;     ("(\\(while\\|do\\|let\\*?\\|flet\\|labels\\|prog[nv12*]?\\)[ \t\n]" . 1)
+;     ("(\\(do\\*\\|dotimes\\|dolist\\|loop\\)[ \t\n]" . 1)
+;     ("(\\(catch\\|\\throw\\|block\\|return\\|return-from\\)[ \t\n]" . 1)
+;     ("(\\(save-restriction\\|save-window-restriction\\)[ \t\n]" . 1)
+;     ("(\\(save-excursion\\|unwind-protect\\|condition-case\\)[ \t\n]" . 1)
+;     ;;
+;     ;; highlight function names in emacs-lisp docstrings (in the syntax
+;     ;; that substitute-command-keys understands.)
+;     ("\\\\\\\\\\[\\([^]\\\n]+\\)]" 1 font-lock-keyword-face t)
+;     ;;
+;     ;; highlight words inside `' which tend to be function names
+;     ("`\\([-a-zA-Z0-9_][-a-zA-Z0-9_][-a-zA-Z0-9_.]+\\)'"
+;      1 font-lock-keyword-face t)
+;     )))
+; "For consideration as a value of `lisp-font-lock-keywords'.
+;
+;This does a lot more highlighting.")
+
+(defvar scheme-font-lock-keywords
+  (eval-when-compile
+    (list
+     ;;
+     ;; Declarations.  Hannes Haug <hannes.haug@student.uni-tuebingen.de> says
+     ;; this works for SOS, STklos, SCOOPS, Meroon and Tiny CLOS.
+     (list (concat "(\\(define\\("
+                  ;; Function names.
+                  "\\(\\|-\\(generic\\(\\|-procedure\\)\\|method\\)\\)\\|"
+                  ;; Macro names, as variable names.  A bit dubious, this.
+                  "\\(-syntax\\)\\|"
+                  ;; Class names.
+                  "\\(-class\\)"
+                  "\\)\\)\\>"
+                  ;; Any whitespace and declared object.
+                  "[ \t]*(?"
+                  "\\(\\sw+\\)?")
+          '(1 font-lock-keyword-face)
+          '(8 (cond ((match-beginning 3) 'font-lock-function-name-face)
+                    ((match-beginning 6) 'font-lock-variable-name-face)
+                    (t 'font-lock-type-face))
+              nil t))
+     ;;
+     ;; Control structures.
+;(regexp-opt '("begin" "call-with-current-continuation" "call/cc"
+;             "call-with-input-file" "call-with-output-file" "case" "cond"
+;             "do" "else" "for-each" "if" "lambda"
+;             "let\\*?" "let-syntax" "letrec" "letrec-syntax"
+;             ;; Hannes Haug <hannes.haug@student.uni-tuebingen.de> wants:
+;             "and" "or" "delay"
+;             ;; Stefan Monnier <stefan.monnier@epfl.ch> says don't bother:
+;             ;;"quasiquote" "quote" "unquote" "unquote-splicing"
+;             "map" "syntax" "syntax-rules"))
+     (cons
+      (concat "(\\("
+             "and\\|begin\\|c\\(a\\(ll\\(-with-\\(current-continuation\\|"
+             "input-file\\|output-file\\)\\|/cc\\)\\|se\\)\\|ond\\)\\|"
+             "d\\(elay\\|o\\)\\|else\\|for-each\\|if\\|"
+             "l\\(ambda\\|et\\(-syntax\\|\\*?\\|rec\\(\\|-syntax\\)\\)\\)\\|"
+             "map\\|or\\|syntax\\(\\|-rules\\)"
+             "\\)\\>") 1)
+     ;;
+     ;; David Fox <fox@graphics.cs.nyu.edu> for SOS/STklos class specifiers.
+     '("\\<<\\sw+>\\>" . font-lock-type-face)
+     ;;
+     ;; Scheme `:' keywords as references.
+     '("\\<:\\sw+\\>" . font-lock-reference-face)
+     ))
+"Default expressions to highlight in Scheme modes.")
+
+;; The previous version, before replacing it with the FSF version.
+;(defconst scheme-font-lock-keywords (purecopy
+; '(("(define[ \t]+(?\\([^ \t\n\)]+\\)" 1 font-lock-function-name-face)
+;   ("(\\(cond\\|lambda\\|begin\\|if\\|else\\|case\\|do\\)[ \t\n]" . 1)
+;   ("(\\(\\|letrec\\|let\\*?\\|set!\\|and\\|or\\)[ \t\n]" . 1)
+;   ("(\\(quote\\|unquote\\|quasiquote\\|unquote-splicing\\)[ \t\n]" . 1)
+;   ("(\\(syntax\\|syntax-rules\\|define-syntax\\|let-syntax\\|letrec-syntax\\)[ \t\n]" . 1)))
+;  "Expressions to highlight in Scheme buffers.")
+
+(defconst c-font-lock-keywords-1 nil
+  "Subdued level highlighting for C modes.")
+
+(defconst c-font-lock-keywords-2 nil
+  "Medium level highlighting for C modes.")
+
+(defconst c-font-lock-keywords-3 nil
+  "Gaudy level highlighting for C modes.")
+
+(defconst c++-font-lock-keywords-1 nil
+  "Subdued level highlighting for C++ modes.")
+
+(defconst c++-font-lock-keywords-2 nil
+  "Medium level highlighting for C++ modes.")
+
+(defconst c++-font-lock-keywords-3 nil
+  "Gaudy level highlighting for C++ modes.")
+
+(defun font-lock-match-c++-style-declaration-item-and-skip-to-next (limit)
+  ;; Match, and move over, any declaration/definition item after point.
+  ;; The expect syntax of an item is "word" or "word::word", possibly ending
+  ;; with optional whitespace and a "(".  Everything following the item (but
+  ;; belonging to it) is expected to by skip-able by `forward-sexp', and items
+  ;; are expected to be separated with a "," or ";".
+  (if (looking-at "[ \t*&]*\\(\\(?:\\sw\\|\\s_\\)+\\)\\(::\\(\\(?:\\sw\\|\\s_\\)+\\)\\)?[ \t]*\\((\\)?")
+      (save-match-data
+       (condition-case nil
+           (save-restriction
+             ;; Restrict to the end of line, currently guaranteed to be LIMIT.
+             (narrow-to-region (point-min) limit)
+             (goto-char (match-end 1))
+             ;; Move over any item value, etc., to the next item.
+             (while (not (looking-at "[ \t]*\\([,;]\\|$\\)"))
+               (goto-char (or (scan-sexps (point) 1) (point-max))))
+             (goto-char (match-end 0)))
+         (error t)))))
+
+(let ((c-keywords
+;      ("break" "continue" "do" "else" "for" "if" "return" "switch" "while")
+       "break\\|continue\\|do\\|else\\|for\\|if\\|return\\|switch\\|while")
+      (c-type-types
+;      ("auto" "extern" "register" "static" "typedef" "struct" "union" "enum"
+;      "signed" "unsigned" "short" "long" "int" "char" "float" "double"
+;      "void" "volatile" "const")
+       (concat "auto\\|c\\(har\\|onst\\)\\|double\\|e\\(num\\|xtern\\)\\|"
+              "float\\|int\\|long\\|register\\|"
+              "s\\(hort\\|igned\\|t\\(atic\\|ruct\\)\\)\\|typedef\\|"
+              "un\\(ion\\|signed\\)\\|vo\\(id\\|latile\\)"))   ; 6 ()s deep.
+      (c++-keywords
+;      ("break" "continue" "do" "else" "for" "if" "return" "switch" "while"
+;      "asm" "catch" "delete" "new" "operator" "sizeof" "this" "throw" "try"
+;       "protected" "private" "public")
+       (concat "asm\\|break\\|c\\(atch\\|ontinue\\)\\|d\\(elete\\|o\\)\\|"
+              "else\\|for\\|if\\|new\\|"
+              "p\\(r\\(ivate\\|otected\\)\\|ublic\\)\\|return\\|"
+              "s\\(izeof\\|witch\\)\\|t\\(h\\(is\\|row\\)\\|ry\\)\\|while"))
+      (c++-type-types
+;      ("auto" "extern" "register" "static" "typedef" "struct" "union" "enum"
+;      "signed" "unsigned" "short" "long" "int" "char" "float" "double"
+;      "void" "volatile" "const" "class" "inline" "friend" "bool"
+;      "virtual" "complex" "template")
+       (concat "auto\\|bool\\|c\\(har\\|lass\\|o\\(mplex\\|nst\\)\\)\\|"
+              "double\\|e\\(num\\|xtern\\)\\|f\\(loat\\|riend\\)\\|"
+              "in\\(line\\|t\\)\\|long\\|register\\|"
+              "s\\(hort\\|igned\\|t\\(atic\\|ruct\\)\\)\\|"
+              "t\\(emplate\\|ypedef\\)\\|un\\(ion\\|signed\\)\\|"
+              "v\\(irtual\\|o\\(id\\|latile\\)\\)"))           ; 11 ()s deep.
+      (ctoken "\\(\\sw\\|\\s_\\|[:~*&]\\)+")
+      )
+ (setq c-font-lock-keywords-1
+  (list
+   ;;
+   ;; These are all anchored at the beginning of line for speed.
+   ;;
+   ;; Fontify function name definitions (GNU style; without type on line).
+   
+   ;; In FSF this has the simpler definition of "\\sw+" for ctoken.
+   ;; I'm not sure if ours is more correct.
+   ;; This is a subset of the next rule, and is slower when present. --dmoore
+   ;; (list (concat "^\\(" ctoken "\\)[ \t]*(") 1 'font-lock-function-name-face)
+   ;;
+   ;; fontify the names of functions being defined.
+   ;; FSF doesn't have this but I think it should be fast for us because
+   ;; our regexp routines are more intelligent than FSF's about handling
+   ;; anchored-at-newline. (When I added this hack in regex.c, it halved
+   ;; the time to do the regexp phase of font-lock for a C file!) Not
+   ;; including this discriminates against those who don't follow the
+   ;; GNU coding style. --ben
+   ;; x?x?x?y?z should always be: (x(xx?)?)?y?z --dmoore
+   (list (concat
+         "^\\("
+          "\\(" ctoken "[ \t]+\\)"     ; type specs; there can be no
+         "\\("
+          "\\(" ctoken "[ \t]+\\)"     ; more than 3 tokens, right?
+          "\\(" ctoken "[ \t]+\\)"
+         "?\\)?\\)?"
+          "\\([*&]+[ \t]*\\)?"         ; pointer
+          "\\(" ctoken "\\)[ \t]*(")   ; name
+         10 'font-lock-function-name-face)
+   ;;
+   ;; This is faster but not by much.  I don't see why not.
+   ;(list (concat "^\\(" ctoken "\\)[ \t]*(") 1 'font-lock-function-name-face)
+   ;;
+   ;; Added next two; they're both jolly-good fastmatch candidates so
+   ;; should be fast. --ben
+   ;;
+   ;; Fontify structure names (in structure definition form).
+   (list (concat "^\\(typedef[ \t]+struct\\|struct\\|static[ \t]+struct\\)"
+          "[ \t]+\\(" ctoken "\\)[ \t]*\\(\{\\|$\\)")
+         2 'font-lock-function-name-face)
+   ;;
+   ;; Fontify case clauses.  This is fast because its anchored on the left.
+   '("case[ \t]+\\(\\(\\sw\\|\\s_\\)+\\)[ \t]+:". 1)
+   ;;
+   '("\\<\\(default\\):". 1)
+   ;; Fontify filenames in #include <...> preprocessor directives as strings.
+   '("^#[ \t]*include[ \t]+\\(<[^>\"\n]+>\\)" 1 font-lock-string-face)
+   ;;
+   ;; Fontify function macro names.
+   '("^#[ \t]*define[ \t]+\\(\\(\\sw+\\)(\\)" 2 font-lock-function-name-face)
+   ;;
+   ;; Fontify symbol names in #if ... defined preprocessor directives.
+   '("^#[ \t]*if\\>"
+     ("\\<\\(defined\\)\\>[ \t]*(?\\(\\sw+\\)?" nil nil
+      (1 font-lock-preprocessor-face) (2 font-lock-variable-name-face nil t)))
+   ;;
+   ;; Fontify symbol names in #elif ... defined preprocessor directives.
+   '("^#[ \t]*elif\\>"
+     ("\\<\\(defined\\)\\>[ \t]*(?\\(\\sw+\\)?" nil nil
+      (1 font-lock-preprocessor-face) (2 font-lock-variable-name-face nil t)))
+   ;;
+   ;; Fontify otherwise as symbol names, and the preprocessor directive names.
+   '("^\\(#[ \t]*[a-z]+\\)\\>[ \t]*\\(\\sw+\\)?"
+     (1 font-lock-preprocessor-face) (2 font-lock-variable-name-face nil t))
+   ))
+
+ (setq c-font-lock-keywords-2
+  (append c-font-lock-keywords-1
+   (list
+    ;;
+    ;; Simple regexps for speed.
+    ;;
+    ;; Fontify all type specifiers.
+    (cons (concat "\\<\\(" c-type-types "\\)\\>") 'font-lock-type-face)
+    ;;
+    ;; Fontify all builtin keywords (except case, default and goto; see below).
+    (cons (concat "\\<\\(" c-keywords "\\)\\>") 'font-lock-keyword-face)
+    ;;
+    ;; Fontify case/goto keywords and targets, and case default/goto tags.
+    '("\\<\\(case\\|goto\\)\\>[ \t]*\\([^ \t\n:;]+\\)?"
+      (1 font-lock-keyword-face) (2 font-lock-reference-face nil t))
+    '("^[ \t]*\\(\\sw+\\)[ \t]*:" 1 font-lock-reference-face)
+    )))
+
+ (setq c-font-lock-keywords-3
+  (append c-font-lock-keywords-2
+   ;;
+   ;; More complicated regexps for more complete highlighting for types.
+   ;; We still have to fontify type specifiers individually, as C is so hairy.
+   (list
+    ;;
+    ;; Fontify all storage classes and type specifiers, plus their items.
+    (list (concat "\\<\\(" c-type-types "\\)\\>"
+                 "\\([ \t*&]+\\sw+\\>\\)*")
+         ;; Fontify each declaration item.
+         '(font-lock-match-c++-style-declaration-item-and-skip-to-next
+           ;; Start with point after all type specifiers.
+           (goto-char (or (match-beginning 8) (match-end 1)))
+           ;; Finish with point after first type specifier.
+           (goto-char (match-end 1))
+           ;; Fontify as a variable or function name.
+           (1 (if (match-beginning 4)
+                  font-lock-function-name-face
+                font-lock-variable-name-face))))
+    ;;
+    ;; Fontify structures, or typedef names, plus their items.
+    '("\\(}\\)[ \t*]*\\sw"
+      (font-lock-match-c++-style-declaration-item-and-skip-to-next
+       (goto-char (match-end 1)) nil
+       (1 (if (match-beginning 4)
+             font-lock-function-name-face
+           font-lock-variable-name-face))))
+    ;;
+    ;; Fontify anything at beginning of line as a declaration or definition.
+    '("^\\(\\sw+\\)\\>\\([ \t*]+\\sw+\\>\\)*"
+      (1 font-lock-type-face)
+      (font-lock-match-c++-style-declaration-item-and-skip-to-next
+       (goto-char (or (match-beginning 2) (match-end 1))) nil
+       (1 (if (match-beginning 4)
+             font-lock-function-name-face
+           font-lock-variable-name-face))))
+    )))
+
+ (setq c++-font-lock-keywords-1
+  (append
+   ;;
+   ;; The list `c-font-lock-keywords-1' less that for function names.
+   ;; the simple function form regexp has been removed. --dmoore
+   ;;(cdr c-font-lock-keywords-1)
+   c-font-lock-keywords-1
+   ;;
+   ;; Fontify function name definitions, possibly incorporating class name.
+   (list
+    '("^\\(\\sw+\\)\\(::\\(\\sw+\\)\\)?[ \t]*("
+      (1 (if (match-beginning 2)
+            font-lock-type-face
+          font-lock-function-name-face))
+      (3 (if (match-beginning 2) font-lock-function-name-face) nil t))
+    )))
+
+ (setq c++-font-lock-keywords-2
+  (append c++-font-lock-keywords-1
+   (list
+    ;;
+    ;; The list `c-font-lock-keywords-2' for C++ plus operator overloading.
+    (cons (concat "\\<\\(" c++-type-types "\\)\\>") 'font-lock-type-face)
+    ;;
+    ;; Fontify operator function name overloading.
+    '("\\<\\(operator\\)\\>[ \t]*\\([][)(><!=+-][][)(><!=+-]?\\)?"
+      (1 font-lock-keyword-face) (2 font-lock-function-name-face nil t))
+    ;;
+    ;; Fontify case/goto keywords and targets, and case default/goto tags.
+    '("\\<\\(case\\|goto\\)\\>[ \t]*\\([^ \t\n:;]+\\)?"
+      (1 font-lock-keyword-face) (2 font-lock-reference-face nil t))
+    '("^[ \t]*\\(\\sw+\\)[ \t]*:[^:]" 1 font-lock-reference-face)
+    ;;
+    ;; Fontify other builtin keywords.
+    (cons (concat "\\<\\(" c++-keywords "\\)\\>") 'font-lock-keyword-face)
+    )))
+
+ (setq c++-font-lock-keywords-3
+  (append c++-font-lock-keywords-2
+   ;;
+   ;; More complicated regexps for more complete highlighting for types.
+   (list
+    ;;
+    ;; Fontify all storage classes and type specifiers, plus their items.
+    (list (concat "\\<\\(" c++-type-types "\\)\\>"
+                 "\\([ \t*&]+\\sw+\\>\\)*")
+         ;; Fontify each declaration item.
+         '(font-lock-match-c++-style-declaration-item-and-skip-to-next
+           ;; Start with point after all type specifiers.
+           (goto-char (or (match-beginning 13) (match-end 1)))
+           ;; Finish with point after first type specifier.
+           (goto-char (match-end 1))
+           ;; Fontify as a variable or function name.
+           (1 (cond ((match-beginning 2) 'font-lock-type-face)
+                    ((match-beginning 4) 'font-lock-function-name-face)
+                    (t 'font-lock-variable-name-face)))
+           (3 (if (match-beginning 4)
+                  'font-lock-function-name-face
+                'font-lock-variable-name-face) nil t)))
+    ;;
+    ;; Fontify structures, or typedef names, plus their items.
+    '("\\(}\\)[ \t*]*\\sw"
+      (font-lock-match-c++-style-declaration-item-and-skip-to-next
+       (goto-char (match-end 1)) nil
+       (1 (if (match-beginning 4)
+             font-lock-function-name-face
+           font-lock-variable-name-face))))
+    ;;
+    ;; Fontify anything at beginning of line as a declaration or definition.
+    '("^\\(\\sw+\\)\\>\\([ \t*]+\\sw+\\>\\)*"
+      (1 font-lock-type-face)
+      (font-lock-match-c++-style-declaration-item-and-skip-to-next
+       (goto-char (or (match-beginning 2) (match-end 1))) nil
+       (1 (cond ((match-beginning 2) 'font-lock-type-face)
+               ((match-beginning 4) 'font-lock-function-name-face)
+               (t 'font-lock-variable-name-face)))
+       (3 (if (match-beginning 4)
+             'font-lock-function-name-face
+           'font-lock-variable-name-face) nil t)))
+    )))
+ )
+
+(defvar c-font-lock-keywords c-font-lock-keywords-1
+  "Default expressions to highlight in C mode.")
+
+(defvar c++-font-lock-keywords c++-font-lock-keywords-1
+  "Default expressions to highlight in C++ mode.")
+\f
+;;; Java.
+
+;; Java support has been written by XEmacs people, and it's apparently
+;; totally divergent from the FSF.  I don't know if it's better or
+;; worse, so I'm leaving it in until someone convinces me the FSF
+;; version is better.  --hniksic
+
+(defconst java-font-lock-keywords-1 nil
+ "For consideration as a value of `java-font-lock-keywords'.
+This does fairly subdued highlighting.")
+
+(defconst java-font-lock-keywords-2 nil
+ "For consideration as a value of `java-font-lock-keywords'.
+This adds highlighting of types and identifier names.")
+
+(defconst java-font-lock-keywords-3 nil
+ "For consideration as a value of `java-font-lock-keywords'.
+This adds highlighting of Java documentation tags, such as @see.")
+
+(defvar java-font-lock-type-regexp
+  (concat "\\<\\(boolean\\|byte\\|char\\|double\\|float\\|int"
+         "\\|long\\|short\\|void\\)\\>")
+  "Regexp which should match a primitive type.")
+
+(let ((capital-letter "A-Z\300-\326\330-\337")
+      (letter "a-zA-Z_$\300-\326\330-\366\370-\377")
+      (digit  "0-9"))
+(defvar java-font-lock-identifier-regexp
+  (concat "\\<\\([" letter "][" letter digit "]*\\)\\>")
+  "Regexp which should match all Java identifiers.")
+
+(defvar java-font-lock-class-name-regexp
+  (concat "\\<\\([" capital-letter "][" letter digit "]*\\)\\>")
+  "Regexp which should match a class or an interface name.
+The name is assumed to begin with a capital letter.")
+)
+
+
+(let ((java-modifier-regexp
+       (concat "\\<\\(abstract\\|const\\|final\\|native\\|"
+              "private\\|protected\\|public\\|"
+              "static\\|synchronized\\|transient\\|volatile\\)\\>")))
+
+  ;; Basic font-lock support:
+  (setq java-font-lock-keywords-1
+       (list
+        ;; Keywords:
+        (list        
+         (concat
+          "\\<\\("
+          "break\\|byvalue\\|"
+          "case\\|cast\\|catch\\|class\\|continue\\|"
+          "do\\|else\\|extends\\|"
+          "finally\\|for\\|future\\|"
+          "generic\\|goto\\|"
+          "if\\|implements\\|import\\|"
+          "instanceof\\|interface\\|"
+          "new\\|package\\|return\\|switch\\|"
+          "throws?\\|try\\|while\\)\\>")
+         1 'font-lock-keyword-face)
+
+        ;; Modifiers:
+        (list java-modifier-regexp 1 font-lock-type-face)
+
+        ;; Special constants:
+        '("\\<\\(this\\|super\\)\\>" (1 font-lock-reference-face))
+        '("\\<\\(false\\|null\\|true\\)\\>" (1 font-lock-keyword-face))
+
+        ;; Class names:
+        (list (concat "\\<class\\>\\s *" java-font-lock-identifier-regexp)
+              1 'font-lock-function-name-face)
+        
+        ;; Package declarations:
+        (list (concat "\\<\\(package\\|import\\)\\>\\s *"
+                      java-font-lock-identifier-regexp)
+              '(2 font-lock-reference-face)
+              (list (concat
+                     "\\=\\.\\(" java-font-lock-identifier-regexp "\\)")
+                    nil nil '(1 (if (equal (char-after (match-end 0)) ?.)
+                                    'font-lock-reference-face
+                                  'font-lock-type-face))))
+        
+        ;; Constructors:
+        (list (concat
+               "^\\s *\\(" java-modifier-regexp "\\s +\\)*"
+               java-font-lock-class-name-regexp "\\s *\(")
+              (list 3
+                    '(condition-case nil
+                         (save-excursion
+                           (goto-char (scan-sexps (- (match-end 0) 1) 1))
+                           (parse-partial-sexp (point) (point-max) nil t)
+                           (and (looking-at "\\($\\|\\<throws\\>\\|{\\)")
+                                'font-lock-function-name-face))
+                       (error 'font-lock-function-name-face))))
+
+        ;; Methods:
+        (list (concat "\\(" java-font-lock-type-regexp "\\|"
+                      java-font-lock-class-name-regexp "\\)"
+                      "\\s *\\(\\[\\s *\\]\\s *\\)*"
+                      java-font-lock-identifier-regexp "\\s *\(")
+              5
+              'font-lock-function-name-face)
+
+        ;; Labels:
+        (list ":"
+              (list
+               (concat "^\\s *" java-font-lock-identifier-regexp "\\s *:")
+               '(beginning-of-line) '(end-of-line)
+               '(1 font-lock-reference-face)))
+
+        ;; `break' and continue' destination labels:
+        (list (concat "\\<\\(break\\|continue\\)\\>\\s *"
+                      java-font-lock-identifier-regexp)
+              2 'font-lock-reference-face)
+
+        ;; Case statements:
+        ;; In Java, any constant expression is allowed.
+        '("\\<case\\>\\s *\\(.*\\):" 1 font-lock-reference-face)))
+
+  ;; Types and declared variable names:
+  (setq java-font-lock-keywords-2
+       (append 
+
+        java-font-lock-keywords-1
+        (list
+         ;; Keywords followed by a type:
+         (list (concat "\\<\\(extends\\|instanceof\\|new\\)\\>\\s *"
+                       java-font-lock-identifier-regexp)
+               '(2 (if (equal (char-after (match-end 0)) ?.)
+                       'font-lock-reference-face 'font-lock-type-face))
+               (list (concat "\\=\\." java-font-lock-identifier-regexp)
+                     '(goto-char (match-end 0)) nil
+                     '(1 (if (equal (char-after (match-end 0)) ?.)
+                             'font-lock-reference-face 'font-lock-type-face))))
+
+         ;; Keywords followed by a type list:
+         (list (concat "\\<\\(implements\\|throws\\)\\>\\ s*"
+                       java-font-lock-identifier-regexp)
+               '(2 (if (equal (char-after (match-end 0)) ?.)
+                       font-lock-reference-face font-lock-type-face))
+               (list (concat "\\=\\(\\.\\|\\s *\\(,\\)\\s *\\)"
+                             java-font-lock-identifier-regexp)
+                     '(goto-char (match-end 0)) nil
+                     '(3 (if (equal (char-after (match-end 0)) ?.)
+                             font-lock-reference-face font-lock-type-face))))
+
+         ;; primitive types, can't be confused with anything else.
+         (list java-font-lock-type-regexp
+               '(1 font-lock-type-face)
+               '(font-lock-match-java-declarations
+                 (goto-char (match-end 0))
+                 (goto-char (match-end 0))
+                 (0 font-lock-variable-name-face)))
+
+         ;; Declarations, class types and capitalized variables:
+         ;;
+         ;; Declarations are easy to recognize.  Capitalized words
+         ;; followed by a closing parenthesis are treated as casts if they
+         ;; also are followed by an expression.  Expressions beginning with
+         ;; a unary numerical operator, e.g. +, can't be cast to an object
+         ;; type.
+         ;;
+         ;; The path of a fully qualified type, e.g. java.lang.Foo, is
+         ;; fontified in the reference face.
+         ;;
+         ;; An access to a static field, e.g. System.out.println, is
+         ;; not fontified since it can't be distinguished from the
+         ;; usage of a capitalized variable, e.g. Foo.out.println.
+
+         (list (concat java-font-lock-class-name-regexp
+                       "\\s *\\(\\[\\s *\\]\\s *\\)*"
+                       "\\(\\<\\|$\\|)\\s *\\([\(\"]\\|\\<\\)\\)")
+               '(1 (save-match-data
+                     (save-excursion
+                       (goto-char
+                        (match-beginning 3))
+                       (if (not (looking-at "\\<instanceof\\>"))
+                           'font-lock-type-face))))
+               (list (concat "\\=" java-font-lock-identifier-regexp "\\.")
+                     '(progn
+                        (goto-char (match-beginning 0))
+                        (while (or (= (preceding-char) ?.)
+                                   (= (char-syntax (preceding-char)) ?w))
+                          (backward-char)))
+                     '(goto-char (match-end 0))
+                     '(1 font-lock-reference-face)
+                     '(0 nil))         ; Workaround for bug in XEmacs.
+               '(font-lock-match-java-declarations
+                 (goto-char (match-end 1))
+                 (goto-char (match-end 0))
+                 (1 font-lock-variable-name-face))))))
+
+  ;; Modifier keywords and Java doc tags
+  (setq java-font-lock-keywords-3
+       (append
+
+        '(
+          ;; Feature scoping:
+          ;; These must come first or the Modifiers from keywords-1 will
+          ;; catch them.  We don't want to use override fontification here
+          ;; because then these terms will be fontified within comments.
+          ("\\<private\\>"   0 font-lock-string-face)
+          ("\\<protected\\>" 0 font-lock-preprocessor-face)
+          ("\\<public\\>"    0 font-lock-reference-face))
+        java-font-lock-keywords-2
+
+        (list
+
+         ;; Java doc tags
+         '("@\\(author\\|exception\\|param\\|return\\|see\\|version\\)\\s "
+           0 font-lock-keyword-face t)
+
+         ;; Doc tag - Parameter identifiers
+         (list (concat "@param\\s +" java-font-lock-identifier-regexp)
+               1 'font-lock-variable-name-face t)
+
+         ;; Doc tag - Exception types
+         (list (concat "@exception\\ s*"
+                       java-font-lock-identifier-regexp)
+               '(1 (if (equal (char-after (match-end 0)) ?.)
+                       font-lock-reference-face font-lock-type-face) t)
+               (list (concat "\\=\\." java-font-lock-identifier-regexp)
+                     '(goto-char (match-end 0)) nil
+                     '(1 (if (equal (char-after (match-end 0)) ?.)
+                             'font-lock-reference-face 'font-lock-type-face) t)))
+
+         ;; Doc tag - Cross-references, usually to methods 
+         '("@see\\s +\\(\\S *[^][ \t\n\r\f(){},.;:]\\)"
+           1 font-lock-function-name-face t)
+
+         )))
+  )
+
+(defvar java-font-lock-keywords java-font-lock-keywords-1
+  "Additional expressions to highlight in Java mode.")
+
+;; Match and move over any declaration/definition item after
+;; point.  Does not match items which look like a type declaration
+;; (primitive types and class names, i.e. capitalized words.)
+;; Should the variable name be followed by a comma, we reposition
+;; the cursor to fontify more identifiers.
+(defun font-lock-match-java-declarations (limit)
+  "Match and skip over variable definitions."
+  (if (looking-at "\\s *\\(\\[\\s *\\]\\s *\\)*")
+      (goto-char (match-end 0)))
+  (and
+   (looking-at java-font-lock-identifier-regexp)
+   (save-match-data
+     (not (string-match java-font-lock-type-regexp
+                       (buffer-substring (match-beginning 1)
+                                         (match-end 1)))))
+   (save-match-data
+     (save-excursion
+       (goto-char (match-beginning 1))
+       (not (looking-at
+            (concat java-font-lock-class-name-regexp
+                    "\\s *\\(\\[\\s *\\]\\s *\\)*\\<")))))
+   (save-match-data
+     (condition-case nil
+        (save-restriction
+          (narrow-to-region (point-min) limit)
+          (goto-char (match-end 0))
+          ;; Note: Both `scan-sexps' and the second goto-char can
+          ;; generate an error which is caught by the
+          ;; `condition-case' expression.
+          (while (not (looking-at "\\s *\\(\\(,\\)\\|;\\|$\\)"))
+            (goto-char (or (scan-sexps (point) 1) (point-max))))
+          (goto-char (match-end 2)))   ; non-nil
+       (error t)))))
+
+
+(defvar tex-font-lock-keywords
+;  ;; Regexps updated with help from Ulrik Dickow <dickow@nbi.dk>.
+;  '(("\\\\\\(begin\\|end\\|newcommand\\){\\([a-zA-Z0-9\\*]+\\)}"
+;     2 font-lock-function-name-face)
+;    ("\\\\\\(cite\\|label\\|pageref\\|ref\\){\\([^} \t\n]+\\)}"
+;     2 font-lock-reference-face)
+;    ;; It seems a bit dubious to use `bold' and `italic' faces since we might
+;    ;; not be able to display those fonts.
+;    ("{\\\\bf\\([^}]+\\)}" 1 'bold keep)
+;    ("{\\\\\\(em\\|it\\|sl\\)\\([^}]+\\)}" 2 'italic keep)
+;    ("\\\\\\([a-zA-Z@]+\\|.\\)" . font-lock-keyword-face)
+;    ("^[ \t\n]*\\\\def[\\\\@]\\(\\w+\\)" 1 font-lock-function-name-face keep))
+  ;; Rewritten and extended for LaTeX2e by Ulrik Dickow <dickow@nbi.dk>.
+  '(("\\\\\\(begin\\|end\\|newcommand\\){\\([a-zA-Z0-9\\*]+\\)}"
+     2 font-lock-function-name-face)
+    ("\\\\\\(cite\\|label\\|pageref\\|ref\\){\\([^} \t\n]+\\)}"
+     2 font-lock-reference-face)
+    ("^[ \t]*\\\\def\\\\\\(\\(\\w\\|@\\)+\\)" 1 font-lock-function-name-face)
+    "\\\\\\([a-zA-Z@]+\\|.\\)"
+    ;; It seems a bit dubious to use `bold' and `italic' faces since we might
+    ;; not be able to display those fonts.
+    ;; LaTeX2e: \emph{This is emphasized}.
+    ("\\\\emph{\\([^}]+\\)}" 1 'italic keep)
+    ;; LaTeX2e: \textbf{This is bold}, \textit{...}, \textsl{...}
+    ("\\\\text\\(\\(bf\\)\\|it\\|sl\\){\\([^}]+\\)}"
+     3 (if (match-beginning 2) 'bold 'italic) keep)
+    ;; Old-style bf/em/it/sl. Stop at `\\' and un-escaped `&', for good tables.
+    ("\\\\\\(\\(bf\\)\\|em\\|it\\|sl\\)\\>\\(\\([^}&\\]\\|\\\\[^\\]\\)+\\)"
+     3 (if (match-beginning 2) 'bold 'italic) keep))
+  "Default expressions to highlight in TeX modes.")
+
+(defconst ksh-font-lock-keywords (purecopy
+  (list
+   '("\\(^\\|[^\$\\\]\\)#.*" . font-lock-comment-face)
+   '("\\<\\(if\\|then\\|else\\|elif\\|fi\\|case\\|esac\\|for\\|do\\|done\\|foreach\\|in\\|end\\|select\\|while\\|repeat\\|time\\|function\\|until\\|exec\\|command\\|coproc\\|noglob\\|nohup\\|nocorrect\\|source\\|autoload\\|alias\\|unalias\\|export\\|set\\|echo\\|eval\\|cd\\|log\\|compctl\\)\\>" . font-lock-keyword-face)
+   '("\\<\\[\\[.*\\]\\]\\>" . font-lock-type-face)
+   '("\$\(.*\)" . font-lock-type-face)
+   ))
+  "Additional expressions to highlight in ksh-mode.")
+
+(defconst sh-font-lock-keywords (purecopy
+  (list
+   '("\\(^\\|[^\$\\\]\\)#.*" . font-lock-comment-face)
+   '("\\<\\(if\\|then\\|else\\|elif\\|fi\\|case\\|esac\\|for\\|do\\|done\\|in\\|while\\|exec\\|export\\|set\\|echo\\|eval\\|cd\\)\\>" . font-lock-keyword-face)
+   '("\\[.*\\]" . font-lock-type-face)
+   '("`.*`" . font-lock-type-face)
+   ))
+  "Additional expressions to highlight in sh-mode.")
+
+\f
+;; Install ourselves:
+
+(add-hook 'find-file-hooks 'font-lock-set-defaults t)
+
+;;;###autoload
+(add-minor-mode 'font-lock-mode " Font")
+
+;; Provide ourselves:
+
+(provide 'font-lock)
+
+;;; font-lock.el ends here
diff --git a/lisp/font.el b/lisp/font.el
new file mode 100644 (file)
index 0000000..eed2710
--- /dev/null
@@ -0,0 +1,1402 @@
+;;; font.el --- New font model
+;; Author: wmperry
+;; Created: 1997/09/05 15:44:37
+;; Version: 1.52
+;; Keywords: faces
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Copyright (c) 1995, 1996 by William M. Perry (wmperry@cs.indiana.edu)
+;;; Copyright (c) 1996, 1997 Free Software Foundation, Inc.
+;;;
+;;; This file is part of GNU Emacs.
+;;;
+;;; GNU Emacs 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.
+;;;
+;;; GNU Emacs 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 GNU Emacs; see the file COPYING.  If not, write to the
+;;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;;; Boston, MA 02111-1307, USA.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; The emacsen compatibility package - load it up before anything else
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(require 'cl)
+
+(eval-and-compile
+  (condition-case ()
+      (require 'custom)
+    (error nil))
+  (if (and (featurep 'custom) (fboundp 'custom-declare-variable))
+      nil ;; We've got what we needed
+    ;; We have the old custom-library, hack around it!
+    (defmacro defgroup (&rest args)
+      nil)
+    (defmacro defcustom (var value doc &rest args) 
+      (` (defvar (, var) (, value) (, doc))))))
+
+(if (not (fboundp 'try-font-name))
+    (defun try-font-name (fontname &rest args)
+      (case window-system
+       ((x pm) (car-safe (x-list-fonts fontname)))
+       (mswindows (car-safe (mswindows-list-fonts fontname)))
+       (ns (car-safe (ns-list-fonts fontname)))
+       (otherwise nil))))
+
+(if (not (fboundp 'facep))
+    (defun facep (face)
+      "Return t if X is a face name or an internal face vector."
+      (if (not window-system)
+         nil                           ; FIXME if FSF ever does TTY faces
+       (and (or (internal-facep face)
+                (and (symbolp face) (assq face global-face-data)))
+            t))))
+
+(if (not (fboundp 'set-face-property))
+    (defun set-face-property (face property value &optional locale
+                                  tag-set how-to-add)
+      "Change a property of FACE."
+      (and (symbolp face)
+          (put face property value))))
+
+(if (not (fboundp 'face-property))
+    (defun face-property (face property &optional locale tag-set exact-p)
+      "Return FACE's value of the given PROPERTY."
+      (and (symbolp face) (get face property))))
+
+(require 'disp-table)
+
+(if (not (fboundp '<<))   (fset '<< 'lsh))
+(if (not (fboundp '&))    (fset '& 'logand))
+(if (not (fboundp '|))    (fset '| 'logior))
+(if (not (fboundp '~))    (fset '~ 'lognot))
+(if (not (fboundp '>>))   (defun >> (value count) (<< value (- count))))
+
+\f
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Lots of variables / keywords for use later in the program
+;;; Not much should need to be modified
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defconst font-running-xemacs (string-match "XEmacs" (emacs-version))
+  "Whether we are running in XEmacs or not.")
+
+(defmacro define-font-keywords (&rest keys)
+  (`
+   (eval-and-compile
+     (let ((keywords (quote (, keys))))
+       (while keywords
+        (or (boundp (car keywords))
+            (set (car keywords) (car keywords)))
+        (setq keywords (cdr keywords)))))))  
+
+(defconst font-window-system-mappings
+  '((x         . (x-font-create-name x-font-create-object))
+    (ns        . (ns-font-create-name ns-font-create-object))
+    (mswindows . (mswindows-font-create-name mswindows-font-create-object))
+    (pm        . (x-font-create-name x-font-create-object)) ; Change? FIXME
+    (tty       . (tty-font-create-plist tty-font-create-object)))
+  "An assoc list mapping device types to the function used to create
+a font name from a font structure.")
+
+(defconst ns-font-weight-mappings
+  '((:extra-light . "extralight")
+    (:light       . "light")
+    (:demi-light  . "demilight")
+    (:medium      . "medium")
+    (:normal      . "medium")
+    (:demi-bold   . "demibold")
+    (:bold        . "bold")
+    (:extra-bold  . "extrabold"))
+  "An assoc list mapping keywords to actual NeXTstep specific
+information to use")
+
+(defconst x-font-weight-mappings
+  '((:extra-light . "extralight")
+    (:light       . "light")
+    (:demi-light  . "demilight")
+    (:demi        . "demi")
+    (:book        . "book")
+    (:medium      . "medium")
+    (:normal      . "medium")
+    (:demi-bold   . "demibold")
+    (:bold        . "bold")
+    (:extra-bold  . "extrabold"))
+  "An assoc list mapping keywords to actual Xwindow specific strings
+for use in the 'weight' field of an X font string.")
+
+(defconst font-possible-weights
+  (mapcar 'car x-font-weight-mappings))
+
+(defvar font-rgb-file nil
+  "Where the RGB file was found.")
+
+(defvar font-maximum-slippage "1pt"
+  "How much a font is allowed to vary from the desired size.")
+
+(define-font-keywords :family :style :size :registry :encoding)
+
+(define-font-keywords
+  :weight :extra-light :light :demi-light :medium :normal :demi-bold
+  :bold :extra-bold)
+
+(defvar font-style-keywords nil)
+
+(defsubst set-font-family (fontobj family)
+  (aset fontobj 1 family))
+
+(defsubst set-font-weight (fontobj weight)
+  (aset fontobj 3 weight))
+
+(defsubst set-font-style (fontobj style)
+  (aset fontobj 5 style))
+
+(defsubst set-font-size (fontobj size)
+  (aset fontobj 7 size))
+
+(defsubst set-font-registry (fontobj reg)
+  (aset fontobj 9 reg))
+
+(defsubst set-font-encoding (fontobj enc)
+  (aset fontobj 11 enc))
+
+(defsubst font-family (fontobj)
+  (aref fontobj 1))
+
+(defsubst font-weight (fontobj)
+  (aref fontobj 3))
+
+(defsubst font-style (fontobj)
+  (aref fontobj 5))
+
+(defsubst font-size (fontobj)
+  (aref fontobj 7))
+
+(defsubst font-registry (fontobj)
+  (aref fontobj 9))
+
+(defsubst font-encoding (fontobj)
+  (aref fontobj 11))
+
+(eval-when-compile
+  (defmacro define-new-mask (attr mask)
+    (`
+     (progn
+       (setq font-style-keywords
+            (cons (cons (quote (, attr))
+                        (cons
+                         (quote (, (intern (format "set-font-%s-p" attr))))
+                         (quote (, (intern (format "font-%s-p" attr))))))
+                  font-style-keywords))
+       (defconst (, (intern (format "font-%s-mask" attr))) (<< 1 (, mask))
+        (, (format
+            "Bitmask for whether a font is to be rendered in %s or not."
+            attr)))
+       (defun (, (intern (format "font-%s-p" attr))) (fontobj)
+        (, (format "Whether FONTOBJ will be renderd in `%s' or not." attr))
+        (if (/= 0 (& (font-style fontobj)
+                     (, (intern (format "font-%s-mask" attr)))))
+            t
+          nil))
+       (defun (, (intern (format "set-font-%s-p" attr))) (fontobj val)
+        (, (format "Set whether FONTOBJ will be renderd in `%s' or not."
+                   attr))
+        (cond
+         (val
+          (set-font-style fontobj (| (font-style fontobj)
+                                     (, (intern
+                                         (format "font-%s-mask" attr))))))
+         (((, (intern (format "font-%s-p" attr))) fontobj)
+          (set-font-style fontobj (- (font-style fontobj)
+                                     (, (intern
+                                         (format "font-%s-mask" attr))))))))
+       ))))
+
+(let ((mask 0))
+  (define-new-mask bold        (setq mask (1+ mask)))
+  (define-new-mask italic      (setq mask (1+ mask)))
+  (define-new-mask oblique     (setq mask (1+ mask)))
+  (define-new-mask dim         (setq mask (1+ mask)))
+  (define-new-mask underline   (setq mask (1+ mask)))
+  (define-new-mask overline    (setq mask (1+ mask)))
+  (define-new-mask linethrough (setq mask (1+ mask)))
+  (define-new-mask strikethru  (setq mask (1+ mask)))
+  (define-new-mask reverse     (setq mask (1+ mask)))
+  (define-new-mask blink       (setq mask (1+ mask)))
+  (define-new-mask smallcaps   (setq mask (1+ mask)))
+  (define-new-mask bigcaps     (setq mask (1+ mask)))
+  (define-new-mask dropcaps    (setq mask (1+ mask))))
+
+(defvar font-caps-display-table
+  (let ((table (make-display-table))
+       (i 0))
+    ;; Standard ASCII characters
+    (while (< i 26)
+      (aset table (+ i ?a) (+ i ?A))
+      (setq i (1+ i)))
+    ;; Now ISO translations
+    (setq i 224)
+    (while (< i 247)                   ;; Agrave - Ouml
+      (aset table i (- i 32))
+      (setq i (1+ i)))
+    (setq i 248)
+    (while (< i 255)                   ;; Oslash - Thorn
+      (aset table i (- i 32))
+      (setq i (1+ i)))
+    table))    
+\f
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Utility functions
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defsubst set-font-style-by-keywords (fontobj styles)
+  (make-local-variable 'font-func)
+  (declare (special font-func))
+  (if (listp styles)
+      (while styles
+       (setq font-func (car-safe (cdr-safe (assq (car styles) font-style-keywords)))
+             styles (cdr styles))
+       (and (fboundp font-func) (funcall font-func fontobj t)))
+    (setq font-func (car-safe (cdr-safe (assq styles font-style-keywords))))
+    (and (fboundp font-func) (funcall font-func fontobj t))))
+
+(defsubst font-properties-from-style (fontobj)
+  (let ((style (font-style fontobj))
+       (todo font-style-keywords)
+       type func retval)
+    (while todo
+      (setq func (cdr (cdr (car todo)))
+           type (car (pop todo)))
+      (if (funcall func fontobj)
+         (setq retval (cons type retval))))
+    retval))
+
+(defun font-unique (list)
+  (let ((retval)
+       (cur))
+    (while list
+      (setq cur (car list)
+           list (cdr list))
+      (if (member cur retval)
+         nil
+       (setq retval (cons cur retval))))
+    (nreverse retval)))
+
+(defun font-higher-weight (w1 w2)
+  (let ((index1 (length (memq w1 font-possible-weights)))
+       (index2 (length (memq w2 font-possible-weights))))
+    (cond
+     ((<= index1 index2)
+      (or w1 w2))
+     ((not w2)
+      w1)
+     (t
+      w2))))
+
+(defun font-spatial-to-canonical (spec &optional device)
+  "Convert SPEC (in inches, millimeters, points, or picas) into points"
+  ;; 1 in = 6 pa = 25.4 mm = 72 pt
+  (cond
+   ((numberp spec)
+    spec)
+   ((null spec)
+    nil)
+   (t
+    (let ((num nil)
+         (type nil)
+         ;; If for any reason we get null for any of this, default
+         ;; to 1024x768 resolution on a 17" screen
+         (pix-width (float (or (device-pixel-width device) 1024)))
+         (mm-width (float (or (device-mm-width device) 293)))
+         (retval nil))
+      (cond
+       ((string-match "^ *\\([-+*/]\\) *" spec) ; math!  whee!
+       (let ((math-func (intern (match-string 1 spec)))
+             (other (font-spatial-to-canonical
+                     (substring spec (match-end 0) nil)))
+             (default (font-spatial-to-canonical
+                       (font-default-size-for-device device))))
+         (if (fboundp math-func)
+             (setq type "px"
+                   spec (int-to-string (funcall math-func default other)))
+           (setq type "px"
+                 spec (int-to-string other)))))
+       ((string-match "[^0-9.]+$" spec)
+       (setq type (substring spec (match-beginning 0))
+             spec (substring spec 0 (match-beginning 0))))
+       (t
+       (setq type "px"
+             spec spec)))
+      (setq num (string-to-number spec))
+      (cond
+       ((member type '("pixel" "px" "pix"))
+       (setq retval (* num (/ pix-width mm-width) (/ 25.4 72.0))))
+       ((member type '("point" "pt"))
+       (setq retval num))
+       ((member type '("pica" "pa"))
+       (setq retval (* num 12.0)))
+       ((member type '("inch" "in"))
+       (setq retval (* num 72.0)))
+       ((string= type "mm")
+       (setq retval (* num (/ 72.0 25.4))))
+       ((string= type "cm")
+       (setq retval (* num 10 (/ 72.0 25.4))))
+       (t
+       (setq retval num))
+       )
+      retval))))
+
+\f
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; The main interface routines - constructors and accessor functions
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defun make-font (&rest args)
+  (vector :family
+         (if (stringp (plist-get args :family))
+             (list (plist-get args :family))
+           (plist-get args :family))
+         :weight
+         (plist-get args :weight)
+         :style
+         (if (numberp (plist-get args :style))
+             (plist-get args :style)
+           0)
+         :size
+         (plist-get args :size)
+         :registry
+         (plist-get args :registry)
+         :encoding
+         (plist-get args :encoding)))
+
+(defun font-create-name (fontobj &optional device)
+  (let* ((type (device-type device))
+        (func (car (cdr-safe (assq type font-window-system-mappings)))))
+    (and func (fboundp func) (funcall func fontobj device))))
+
+;;;###autoload
+(defun font-create-object (fontname &optional device)
+  (let* ((type (device-type device))
+        (func (car (cdr (cdr-safe (assq type font-window-system-mappings))))))
+    (and func (fboundp func) (funcall func fontname device))))
+
+(defun font-combine-fonts-internal (fontobj-1 fontobj-2)
+  (let ((retval (make-font))
+       (size-1 (and (font-size fontobj-1)
+                    (font-spatial-to-canonical (font-size fontobj-1))))
+       (size-2 (and (font-size fontobj-2)
+                    (font-spatial-to-canonical (font-size fontobj-2)))))
+    (set-font-weight retval (font-higher-weight (font-weight fontobj-1)
+                                               (font-weight fontobj-2)))
+    (set-font-family retval (font-unique (append (font-family fontobj-1)
+                                                (font-family fontobj-2))))
+    (set-font-style retval (| (font-style fontobj-1) (font-style fontobj-2)))
+    (set-font-registry retval (or (font-registry fontobj-1)
+                                 (font-registry fontobj-2)))
+    (set-font-encoding retval (or (font-encoding fontobj-1)
+                                 (font-encoding fontobj-2)))
+    (set-font-size retval (cond
+                          ((and size-1 size-2 (>= size-2 size-1))
+                           (font-size fontobj-2))
+                          ((and size-1 size-2)
+                           (font-size fontobj-1))
+                          (size-1
+                           (font-size fontobj-1))
+                          (size-2
+                           (font-size fontobj-2))
+                          (t nil)))
+
+    retval))
+
+(defun font-combine-fonts (&rest args)
+  (cond
+   ((null args)
+    (error "Wrong number of arguments to font-combine-fonts"))
+   ((= (length args) 1)
+    (car args))
+   (t
+    (let ((retval (font-combine-fonts-internal (nth 0 args) (nth 1 args))))
+      (setq args (cdr (cdr args)))
+      (while args
+       (setq retval (font-combine-fonts-internal retval (car args))
+             args (cdr args)))
+      retval))))
+
+\f
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; The window-system dependent code (TTY-style)
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defun tty-font-create-object (fontname &optional device)
+  (make-font :size "12pt"))
+
+(defun tty-font-create-plist (fontobj &optional device)
+  (let ((styles (font-style fontobj))
+       (weight (font-weight fontobj)))
+    (list
+     (cons 'underline (font-underline-p fontobj))
+     (cons 'highlight (if (or (font-bold-p fontobj)
+                             (memq weight '(:bold :demi-bold))) t))
+     (cons 'dim       (font-dim-p fontobj))
+     (cons 'blinking  (font-blink-p fontobj))
+     (cons 'reverse   (font-reverse-p fontobj)))))
+
+\f
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; The window-system dependent code (X-style)
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defvar font-x-font-regexp (or (and font-running-xemacs
+                                   (boundp 'x-font-regexp)
+                                   x-font-regexp)
+ (let
+     ((-               "[-?]")
+      (foundry         "[^-]*")
+      (family          "[^-]*")
+      (weight          "\\(bold\\|demibold\\|medium\\|black\\)")
+      (weight\?                "\\([^-]*\\)")
+      (slant           "\\([ior]\\)")
+      (slant\?         "\\([^-]?\\)")
+      (swidth          "\\([^-]*\\)")
+      (adstyle         "\\([^-]*\\)")
+      (pixelsize       "\\(\\*\\|[0-9]+\\)")
+      (pointsize       "\\(\\*\\|0\\|[0-9][0-9]+\\)")
+      (resx            "\\([*0]\\|[0-9][0-9]+\\)")
+      (resy            "\\([*0]\\|[0-9][0-9]+\\)")
+      (spacing         "[cmp?*]")
+      (avgwidth                "\\(\\*\\|[0-9]+\\)")
+      (registry                "[^-]*")
+      (encoding        "[^-]+")
+      )
+   (concat "\\`\\*?[-?*]"
+          foundry - family - weight\? - slant\? - swidth - adstyle -
+          pixelsize - pointsize - resx - resy - spacing - avgwidth -
+          registry - encoding "\\'"
+          ))))
+
+(defvar font-x-registry-and-encoding-regexp
+  (or (and font-running-xemacs
+          (boundp 'x-font-regexp-registry-and-encoding)
+          (symbol-value 'x-font-regexp-registry-and-encoding))
+      (let ((- "[-?]")
+           (registry "[^-]*")
+           (encoding "[^-]+"))
+       (concat - "\\(" registry "\\)" - "\\(" encoding "\\)\\'"))))
+
+(defvar font-x-family-mappings
+  '(
+    ("serif"        . ("new century schoolbook"
+                      "utopia"
+                      "charter"
+                      "times"
+                      "lucidabright"
+                      "garamond"
+                      "palatino"
+                      "times new roman"
+                      "baskerville"
+                      "bookman"
+                      "bodoni"
+                      "computer modern"
+                      "rockwell"
+                      ))
+    ("sans-serif"   . ("lucida"
+                      "helvetica"
+                      "gills-sans"
+                      "avant-garde"
+                      "univers"
+                      "optima"))
+    ("elfin"        . ("tymes"))
+    ("monospace"    . ("courier"
+                      "fixed"
+                      "lucidatypewriter"
+                      "clean"
+                      "terminal"))
+    ("cursive"      . ("sirene"
+                      "zapf chancery"))
+    )
+  "A list of font family mappings on X devices.")
+
+(defun x-font-create-object (fontname &optional device)
+  (let ((case-fold-search t))
+    (if (or (not (stringp fontname))
+           (not (string-match font-x-font-regexp fontname)))
+       (make-font)
+      (let ((family nil)
+           (style nil)
+           (size nil)
+           (weight  (match-string 1 fontname))
+           (slant   (match-string 2 fontname))
+           (swidth  (match-string 3 fontname))
+           (adstyle (match-string 4 fontname))
+           (pxsize  (match-string 5 fontname))
+           (ptsize  (match-string 6 fontname))
+           (retval nil)
+           (case-fold-search t)
+           )
+       (if (not (string-match x-font-regexp-foundry-and-family fontname))
+           nil
+         (setq family (list (downcase (match-string 1 fontname)))))
+       (if (string= "*" weight)  (setq weight  nil))
+       (if (string= "*" slant)   (setq slant   nil))
+       (if (string= "*" swidth)  (setq swidth  nil))
+       (if (string= "*" adstyle) (setq adstyle nil))
+       (if (string= "*" pxsize)  (setq pxsize  nil))
+       (if (string= "*" ptsize)  (setq ptsize  nil))
+       (if ptsize (setq size (/ (string-to-int ptsize) 10)))
+       (if (and (not size) pxsize) (setq size (concat pxsize "px")))
+       (if weight (setq weight (intern-soft (concat ":" (downcase weight)))))
+       (if (and adstyle (not (equal adstyle "")))
+           (setq family (append family (list (downcase adstyle)))))
+       (setq retval (make-font :family family
+                               :weight weight
+                               :size size))
+       (set-font-bold-p retval (eq :bold weight))
+       (cond
+        ((null slant) nil)
+        ((member slant '("i" "I"))
+         (set-font-italic-p retval t))
+        ((member slant '("o" "O"))
+         (set-font-oblique-p retval t)))
+       (if (string-match font-x-registry-and-encoding-regexp fontname)
+           (progn
+             (set-font-registry retval (match-string 1 fontname))
+             (set-font-encoding retval (match-string 2 fontname))))
+       retval))))
+
+(defun x-font-families-for-device (&optional device no-resetp)
+  (condition-case ()
+      (require 'x-font-menu)
+    (error nil))
+  (or device (setq device (selected-device)))
+  (if (boundp 'device-fonts-cache)
+      (let ((menu (or (cdr-safe (assq device device-fonts-cache)))))
+       (if (and (not menu) (not no-resetp))
+           (progn
+             (reset-device-font-menus device)
+             (x-font-families-for-device device t))
+         (let ((scaled (mapcar (function (lambda (x) (if x (aref x 0))))
+                               (aref menu 0)))
+               (normal (mapcar (function (lambda (x) (if x (aref x 0))))
+                               (aref menu 1))))
+           (sort (font-unique (nconc scaled normal)) 'string-lessp))))
+    (cons "monospace" (mapcar 'car font-x-family-mappings))))
+
+(defvar font-default-cache nil)
+
+;;;###autoload
+(defun font-default-font-for-device (&optional device)
+  (or device (setq device (selected-device)))
+  (if font-running-xemacs
+      (font-truename
+       (make-font-specifier
+       (face-font-name 'default device)))
+    (let ((font (cdr-safe (assq 'font (frame-parameters device)))))
+      (if (and (fboundp 'fontsetp) (fontsetp font))
+         (aref (get-font-info (aref (cdr (get-fontset-info font)) 0)) 2)
+       font))))
+         
+;;;###autoload
+(defun font-default-object-for-device (&optional device)
+  (let ((font (font-default-font-for-device device)))
+    (or (cdr-safe 
+        (assoc font font-default-cache))
+       (progn
+         (setq font-default-cache (cons (cons font
+                                              (font-create-object font))
+                                        font-default-cache))
+         (cdr-safe (assoc font font-default-cache))))))
+
+;;;###autoload
+(defun font-default-family-for-device (&optional device)
+  (or device (setq device (selected-device)))
+  (font-family (font-default-object-for-device device)))
+
+;;;###autoload
+(defun font-default-registry-for-device (&optional device)
+  (or device (setq device (selected-device)))
+  (font-registry (font-default-object-for-device device)))
+
+;;;###autoload
+(defun font-default-encoding-for-device (&optional device)
+  (or device (setq device (selected-device)))
+  (font-encoding (font-default-object-for-device device)))
+
+;;;###autoload
+(defun font-default-size-for-device (&optional device)
+  (or device (setq device (selected-device)))
+  ;; face-height isn't the right thing (always 1 pixel too high?)
+  ;; (if font-running-xemacs
+  ;;    (format "%dpx" (face-height 'default device))
+  (font-size (font-default-object-for-device device)))
+
+(defun x-font-create-name (fontobj &optional device)
+  (if (and (not (or (font-family fontobj)
+                   (font-weight fontobj)
+                   (font-size fontobj)
+                   (font-registry fontobj)
+                   (font-encoding fontobj)))
+          (= (font-style fontobj) 0))
+      (face-font 'default)
+    (or device (setq device (selected-device)))
+    (let* ((default (font-default-object-for-device device))
+          (family (or (font-family fontobj)
+                      (font-family default)
+                      (x-font-families-for-device device)))
+          (weight (or (font-weight fontobj) :medium))
+          (style (font-style fontobj))
+          (size (or (if font-running-xemacs
+                        (font-size fontobj))
+                    (font-size default)))
+          (registry (or (font-registry fontobj)
+                        (font-registry default)
+                        "*"))
+          (encoding (or (font-encoding fontobj)
+                        (font-encoding default)
+                        "*")))
+      (if (stringp family)
+         (setq family (list family)))
+      (setq weight (font-higher-weight weight
+                                      (and (font-bold-p fontobj) :bold)))
+      (if (stringp size)
+         (setq size (truncate (font-spatial-to-canonical size device))))
+      (setq weight (or (cdr-safe (assq weight x-font-weight-mappings)) "*"))
+      (let ((done nil)                 ; Did we find a good font yet?
+           (font-name nil)             ; font name we are currently checking
+           (cur-family nil)            ; current family we are checking
+           )
+       (while (and family (not done))
+         (setq cur-family (car family)
+               family (cdr family))
+         (if (assoc cur-family font-x-family-mappings)
+             ;; If the family name is an alias as defined by
+             ;; font-x-family-mappings, then append those families
+             ;; to the front of 'family' and continue in the loop.
+             (setq family (append
+                           (cdr-safe (assoc cur-family
+                                            font-x-family-mappings))
+                           family))
+           ;; Not an alias for a list of fonts, so we just check it.
+           ;; First, convert all '-' to spaces so that we don't screw up
+           ;; the oh-so wonderful X font model.  Wheee.
+           (let ((x (length cur-family)))
+             (while (> x 0)
+               (if (= ?- (aref cur-family (1- x)))
+                   (aset cur-family (1- x) ? ))
+               (setq x (1- x))))
+           ;; We treat oblique and italic as equivalent.  Don't ask.
+           (let ((slants '("o" "i")))
+             (while (and slants (not done))
+               (setq font-name (format "-*-%s-%s-%s-*-*-*-%s-*-*-*-*-%s-%s"
+                                       cur-family weight
+                                       (if (or (font-italic-p fontobj)
+                                               (font-oblique-p fontobj))
+                                           (car slants)
+                                         "r")
+                                       (if size
+                                           (int-to-string (* 10 size)) "*")
+                                       registry
+                                       encoding
+                                       )
+                     slants (cdr slants)
+                     done (try-font-name font-name device))))))
+       (if done font-name)))))
+
+\f
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; The window-system dependent code (NS-style)
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defun ns-font-families-for-device (&optional device no-resetp)
+  ;; For right now, assume we are going to have the same storage for
+  ;; device fonts for NS as we do for X.  Is this a valid assumption?
+  (or device (setq device (selected-device)))
+  (if (boundp 'device-fonts-cache)
+      (let ((menu (or (cdr-safe (assq device device-fonts-cache)))))
+       (if (and (not menu) (not no-resetp))
+           (progn
+             (reset-device-font-menus device)
+             (ns-font-families-for-device device t))
+         (let ((scaled (mapcar (function (lambda (x) (if x (aref x 0))))
+                               (aref menu 0)))
+               (normal (mapcar (function (lambda (x) (if x (aref x 0))))
+                               (aref menu 1))))
+           (sort (font-unique (nconc scaled normal)) 'string-lessp))))))
+
+(defun ns-font-create-name (fontobj &optional device)
+  (let ((family (or (font-family fontobj)
+                   (ns-font-families-for-device device)))
+       (weight (or (font-weight fontobj) :medium))
+       (style (or (font-style fontobj) (list :normal)))
+       (size (font-size fontobj))
+       (registry (or (font-registry fontobj) "*"))
+       (encoding (or (font-encoding fontobj) "*")))
+    ;; Create a font, wow!
+    (if (stringp family)
+       (setq family (list family)))
+    (if (or (symbolp style) (numberp style))
+       (setq style (list style)))
+    (setq weight (font-higher-weight weight (car-safe (memq :bold style))))
+    (if (stringp size)
+       (setq size (font-spatial-to-canonical size device)))
+    (setq weight (or (cdr-safe (assq weight ns-font-weight-mappings))
+                    "medium"))
+    (let ((done nil)                   ; Did we find a good font yet?
+         (font-name nil)               ; font name we are currently checking
+         (cur-family nil)              ; current family we are checking
+         )
+      (while (and family (not done))
+       (setq cur-family (car family)
+             family (cdr family))
+       (if (assoc cur-family font-x-family-mappings)
+           ;; If the family name is an alias as defined by
+           ;; font-x-family-mappings, then append those families
+           ;; to the front of 'family' and continue in the loop.
+           ;; #### jhar: I don't know about ns font names, so using X mappings
+           (setq family (append
+                         (cdr-safe (assoc cur-family
+                                          font-x-family-mappings))
+                         family))
+         ;; CARL: Need help here - I am not familiar with the NS font
+         ;; model
+         (setq font-name "UNKNOWN FORMULA GOES HERE"
+               done (try-font-name font-name device))))
+      (if done font-name))))
+
+\f
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; The window-system dependent code (mswindows-style)
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+;;; mswindows fonts look like:
+;;;    fontname[:[weight][ style][:pointsize[:effects]]][:charset]
+;;; A minimal mswindows font spec looks like:
+;;;    Courier New
+;;; A maximal mswindows font spec looks like:
+;;;    Courier New:Bold Italic:10:underline strikeout:western
+;;; Missing parts of the font spec should be filled in with these values:
+;;;    Courier New:Normal:10::western
+;;  "^[a-zA-Z ]+:[a-zA-Z ]*:[0-9]+:[a-zA-Z ]*:[a-zA-Z 0-9]*$"
+(defvar font-mswindows-font-regexp 
+  (let
+      ((-              ":")
+       (fontname       "\\([a-zA-Z ]+\\)")
+       (weight         "\\([a-zA-Z]*\\)")
+       (style          "\\( [a-zA-Z]*\\)?")
+       (pointsize      "\\([0-9]+\\)")
+       (effects                "\\([a-zA-Z ]*\\)")q
+       (charset                "\\([a-zA-Z 0-9]*\\)")
+       )
+    (concat "^"
+           fontname - weight style - pointsize - effects - charset "$")))
+
+(defconst mswindows-font-weight-mappings
+  '((:extra-light . "Extralight")
+    (:light       . "Light")
+    (:demi-light  . "Demilight")
+    (:demi        . "Demi")
+    (:book        . "Book")
+    (:medium      . "Medium")
+    (:normal      . "Normal")
+    (:demi-bold   . "Demibold")
+    (:bold        . "Bold")
+    (:regular    . "Regular")
+    (:extra-bold  . "Extrabold"))
+  "An assoc list mapping keywords to actual mswindows specific strings
+for use in the 'weight' field of an mswindows font string.")
+
+(defvar font-mswindows-family-mappings
+  '(
+    ("serif"        . ("times new roman"
+                      "century schoolbook"
+                      "book antiqua"
+                      "bookman old style"))
+    ("sans-serif"   . ("arial"
+                      "verdana"
+                      "lucida sans unicode"))
+    ("monospace"    . ("courier new"
+                      "lucida console"
+                      "courier"
+                      "terminal"))
+    ("cursive"      . ("roman"
+                      "script"))
+    )
+  "A list of font family mappings on mswindows devices.")
+
+(defun mswindows-font-create-object (fontname &optional device)
+  (let ((case-fold-search t)
+       (font (mswindows-font-canonicalize-name fontname)))
+    (if (or (not (stringp font))
+           (not (string-match font-mswindows-font-regexp font)))
+       (make-font)
+      (let ((family    (match-string 1 font))
+           (weight     (match-string 2 font))
+           (style      (match-string 3 font))
+           (pointsize  (match-string 4 font))
+           (effects    (match-string 5 font))
+           (charset    (match-string 6 font))
+           (retval nil)
+           (size nil)
+           (case-fold-search t)
+           )
+       (if pointsize (setq size (concat pointsize "pt")))
+       (if weight (setq weight (intern-soft (concat ":" (downcase weight)))))
+       (setq retval (make-font :family family
+                               :weight weight
+                               :size size
+                               :encoding charset))
+       (set-font-bold-p retval (eq :bold weight))
+       (cond
+        ((null style) nil)
+        ((string-match "^ *[iI]talic" style)
+         (set-font-italic-p retval t)))
+       (cond
+        ((null effects) nil)
+        ((string-match "^[uU]nderline [sS]trikeout" effects)
+         (set-font-underline-p retval t)
+         (set-font-strikethru-p retval t))
+        ((string-match "[uU]nderline" effects)
+         (set-font-underline-p retval t))
+        ((string-match "[sS]trikeout" effects)
+         (set-font-strikethru-p retval t)))
+       retval))))
+
+(defun mswindows-font-create-name (fontobj &optional device)
+  (if (and (not (or (font-family fontobj)
+                   (font-weight fontobj)
+                   (font-size fontobj)
+                   (font-registry fontobj)
+                   (font-encoding fontobj)))
+          (= (font-style fontobj) 0))
+      (face-font 'default)
+    (or device (setq device (selected-device)))
+    (let* ((default (font-default-object-for-device device))
+          (family (or (font-family fontobj)
+                      (font-family default)))
+          (weight (or (font-weight fontobj) :regular))
+          (style (font-style fontobj))
+          (size (or (if font-running-xemacs
+                        (font-size fontobj))
+                    (font-size default)))
+          (underline-p (font-underline-p fontobj))
+          (strikeout-p (font-strikethru-p fontobj))
+          (encoding (or (font-encoding fontobj)
+                        (font-encoding default))))
+      (if (stringp family)
+         (setq family (list family)))
+      (setq weight (font-higher-weight weight
+                                      (and (font-bold-p fontobj) :bold)))
+      (if (stringp size)
+         (setq size (truncate (font-spatial-to-canonical size device))))
+      (setq weight (or (cdr-safe 
+                       (assq weight mswindows-font-weight-mappings)) ""))
+      (let ((done nil)                 ; Did we find a good font yet?
+           (font-name nil)             ; font name we are currently checking
+           (cur-family nil)            ; current family we are checking
+           )
+       (while (and family (not done))
+         (setq cur-family (car family)
+               family (cdr family))
+         (if (assoc cur-family font-mswindows-family-mappings)
+             ;; If the family name is an alias as defined by
+             ;; font-mswindows-family-mappings, then append those families
+             ;; to the front of 'family' and continue in the loop.
+             (setq family (append
+                           (cdr-safe (assoc cur-family
+                                            font-mswindows-family-mappings))
+                           family))
+           ;; We treat oblique and italic as equivalent.  Don't ask.
+            ;; Courier New:Bold Italic:10:underline strikeout:western
+           (setq font-name (format "%s:%s%s:%s:%s:%s"
+                                   cur-family weight
+                                   (if (font-italic-p fontobj)
+                                       " Italic" "")
+                                   (if size
+                                       (int-to-string size) "10")
+                                   (if underline-p
+                                       (if strikeout-p
+                                           "underline strikeout"
+                                         "underline")
+                                     (if strikeout-p "strikeout" ""))
+                                   (if encoding
+                                       encoding ""))
+                 done (try-font-name font-name device))))
+       (if done font-name)))))
+
+\f
+;;; Cache building code
+;;;###autoload
+(defun x-font-build-cache (&optional device)
+  (let ((hashtable (make-hash-table :test 'equal :size 15))
+       (fonts (mapcar 'x-font-create-object
+                      (x-list-fonts "-*-*-*-*-*-*-*-*-*-*-*-*-*-*")))
+       (plist nil)
+       (cur nil))
+    (while fonts
+      (setq cur (car fonts)
+           fonts (cdr fonts)
+           plist (cl-gethash (car (font-family cur)) hashtable))
+      (if (not (memq (font-weight cur) (plist-get plist 'weights)))
+         (setq plist (plist-put plist 'weights (cons (font-weight cur)
+                                                     (plist-get plist 'weights)))))
+      (if (not (member (font-size cur) (plist-get plist 'sizes)))
+         (setq plist (plist-put plist 'sizes (cons (font-size cur)
+                                                   (plist-get plist 'sizes)))))
+      (if (and (font-oblique-p cur)
+              (not (memq 'oblique (plist-get plist 'styles))))
+         (setq plist (plist-put plist 'styles (cons 'oblique (plist-get plist 'styles)))))
+      (if (and (font-italic-p cur)
+              (not (memq 'italic (plist-get plist 'styles))))
+         (setq plist (plist-put plist 'styles (cons 'italic (plist-get plist 'styles)))))
+      (cl-puthash (car (font-family cur)) plist hashtable))
+    hashtable))
+
+\f
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Now overwrite the original copy of set-face-font with our own copy that
+;;; can deal with either syntax.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; ###autoload
+(defun font-set-face-font (&optional face font &rest args)
+  (cond
+   ((and (vectorp font) (= (length font) 12))
+    (let ((font-name (font-create-name font)))
+      (set-face-property face 'font-specification font)
+      (cond
+       ((null font-name)               ; No matching font!
+       nil)
+       ((listp font-name)              ; For TTYs
+       (let (cur)
+         (while font-name
+           (setq cur (car font-name)
+                 font-name (cdr font-name))
+           (apply 'set-face-property face (car cur) (cdr cur) args))))
+       (font-running-xemacs
+       (apply 'set-face-font face font-name args)
+       (apply 'set-face-underline-p face (font-underline-p font) args)
+       (if (and (or (font-smallcaps-p font) (font-bigcaps-p font))
+                (fboundp 'set-face-display-table))
+           (apply 'set-face-display-table
+                  face font-caps-display-table args))
+       (apply 'set-face-property face 'strikethru (or
+                                                   (font-linethrough-p font)
+                                                   (font-strikethru-p font))
+              args))
+       (t
+       (condition-case nil
+           (apply 'set-face-font face font-name args)
+         (error
+          (let ((args (car-safe args)))
+            (and (or (font-bold-p font)
+                     (memq (font-weight font) '(:bold :demi-bold)))
+                 (make-face-bold face args t))
+            (and (font-italic-p font) (make-face-italic face args t)))))
+       (apply 'set-face-underline-p face (font-underline-p font) args)))))
+   (t
+    ;; Let the original set-face-font signal any errors
+    (set-face-property face 'font-specification nil)
+    (apply 'set-face-font face font args))))
+
+\f
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Now for emacsen specific stuff
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defun font-update-device-fonts (device)
+  ;; Update all faces that were created with the 'font' package
+  ;; to appear correctly on the new device.  This should be in the
+  ;; create-device-hook.  This is XEmacs 19.12+ specific
+  (let ((faces (face-list 2))
+       (cur nil)
+       (font nil)
+       (font-spec nil))
+    (while faces
+      (setq cur (car faces)
+           faces (cdr faces)
+           font-spec (face-property cur 'font-specification))
+      (if font-spec
+         (set-face-font cur font-spec device)))))
+
+(defun font-update-one-face (face &optional device-list)
+  ;; Update FACE on all devices in DEVICE-LIST
+  ;; DEVICE_LIST defaults to a list of all active devices
+  (setq device-list (or device-list (device-list)))
+  (if (devicep device-list)
+      (setq device-list (list device-list)))
+  (let* ((cur-device nil)
+        (font-spec (face-property face 'font-specification))
+        (font nil))
+    (if (not font-spec)
+       ;; Hey!  Don't mess with fonts we didn't create in the
+       ;; first place.
+       nil
+      (while device-list
+       (setq cur-device (car device-list)
+             device-list (cdr device-list))
+       (if (not (device-live-p cur-device))
+           ;; Whoah!
+           nil
+         (if font-spec
+             (set-face-font face font-spec cur-device)))))))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Various color related things
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(cond
+ ((fboundp 'display-warning)
+  (fset 'font-warn 'display-warning))
+ ((fboundp 'w3-warn)
+  (fset 'font-warn 'w3-warn))
+ ((fboundp 'url-warn)
+  (fset 'font-warn 'url-warn))
+ ((fboundp 'warn)
+  (defun font-warn (class message &optional level)
+    (warn "(%s/%s) %s" class (or level 'warning) message)))
+ (t
+  (defun font-warn (class message &optional level)
+    (save-excursion
+      (set-buffer (get-buffer-create "*W3-WARNINGS*"))
+      (goto-char (point-max))
+      (save-excursion
+       (insert (format "(%s/%s) %s\n" class (or level 'warning) message)))
+      (display-buffer (current-buffer))))))
+
+(defun font-lookup-rgb-components (color)
+  "Lookup COLOR (a color name) in rgb.txt and return a list of RGB values.
+The list (R G B) is returned, or an error is signaled if the lookup fails."
+  (let ((lib-list (if (boundp 'x-library-search-path)
+                     x-library-search-path
+                   ;; This default is from XEmacs 19.13 - hope it covers
+                   ;; everyone.
+                   (list "/usr/X11R6/lib/X11/"
+                         "/usr/X11R5/lib/X11/"
+                         "/usr/lib/X11R6/X11/"
+                         "/usr/lib/X11R5/X11/"
+                         "/usr/local/X11R6/lib/X11/"
+                         "/usr/local/X11R5/lib/X11/"
+                         "/usr/local/lib/X11R6/X11/"
+                         "/usr/local/lib/X11R5/X11/"
+                         "/usr/X11/lib/X11/"
+                         "/usr/lib/X11/"
+                         "/usr/local/lib/X11/"
+                         "/usr/X386/lib/X11/"
+                         "/usr/x386/lib/X11/"
+                         "/usr/XFree86/lib/X11/"
+                         "/usr/unsupported/lib/X11/"
+                         "/usr/athena/lib/X11/"
+                         "/usr/local/x11r5/lib/X11/"
+                         "/usr/lpp/Xamples/lib/X11/"
+                         "/usr/openwin/lib/X11/"
+                         "/usr/openwin/share/lib/X11/")))
+       (file font-rgb-file)
+       r g b)
+    (if (not file)
+       (while lib-list
+         (setq file (expand-file-name "rgb.txt" (car lib-list)))
+         (if (file-readable-p file)
+             (setq lib-list nil
+                   font-rgb-file file)
+           (setq lib-list (cdr lib-list)
+                 file nil))))
+    (if (null file)
+       (list 0 0 0)
+      (save-excursion
+       (set-buffer (find-file-noselect file))
+       (if (not (= (aref (buffer-name) 0) ? ))
+           (rename-buffer (generate-new-buffer-name " *rgb-tmp-buffer*")))
+       (save-excursion
+         (save-restriction
+           (widen)
+           (goto-char (point-min))
+           (if (re-search-forward (format "\t%s$" (regexp-quote color)) nil t)
+               (progn
+                 (beginning-of-line)
+                 (setq r (* (read (current-buffer)) 256)
+                       g (* (read (current-buffer)) 256)
+                       b (* (read (current-buffer)) 256)))
+             (font-warn 'color (format "No such color: %s" color))
+             (setq r 0
+                   g 0
+                   b 0))
+           (list r g b) ))))))
+
+(defun font-hex-string-to-number (string)
+  "Convert STRING to an integer by parsing it as a hexadecimal number."
+  (let ((conv-list '((?0 . 0) (?a . 10) (?A . 10)
+                    (?1 . 1) (?b . 11) (?B . 11)
+                    (?2 . 2) (?c . 12) (?C . 12)
+                    (?3 . 3) (?d . 13) (?D . 13)
+                    (?4 . 4) (?e . 14) (?E . 14)
+                    (?5 . 5) (?f . 15) (?F . 15)
+                    (?6 . 6) 
+                    (?7 . 7)
+                    (?8 . 8)
+                    (?9 . 9)))
+       (n 0)
+       (i 0)
+       (lim (length string)))
+    (while (< i lim)
+      (setq n (+ (* n 16) (or (cdr (assq (aref string i) conv-list)) 0))
+           i (1+ i)))
+    n ))
+
+(defun font-parse-rgb-components (color)
+  "Parse RGB color specification and return a list of integers (R G B).
+#FEFEFE and rgb:fe/fe/fe style specifications are parsed."
+  (let ((case-fold-search t)
+       r g b str)
+  (cond ((string-match "^#[0-9a-f]+$" color)
+        (cond
+         ((= (length color) 4)
+          (setq r (font-hex-string-to-number (substring color 1 2))
+                g (font-hex-string-to-number (substring color 2 3))
+                b (font-hex-string-to-number (substring color 3 4))
+                r (* r 4096)
+                g (* g 4096)
+                b (* b 4096)))
+         ((= (length color) 7)
+          (setq r (font-hex-string-to-number (substring color 1 3))
+                g (font-hex-string-to-number (substring color 3 5))
+                b (font-hex-string-to-number (substring color 5 7))
+                r (* r 256)
+                g (* g 256)
+                b (* b 256)))
+         ((= (length color) 10)
+          (setq r (font-hex-string-to-number (substring color 1 4))
+                g (font-hex-string-to-number (substring color 4 7))
+                b (font-hex-string-to-number (substring color 7 10))
+                r (* r 16)
+                g (* g 16)
+                b (* b 16)))
+         ((= (length color) 13)
+          (setq r (font-hex-string-to-number (substring color 1 5))
+                g (font-hex-string-to-number (substring color 5 9))
+                b (font-hex-string-to-number (substring color 9 13))))
+         (t
+          (font-warn 'color (format "Invalid RGB color specification: %s"
+                                    color))
+          (setq r 0
+                g 0
+                b 0))))
+       ((string-match "rgb:\\([0-9a-f]+\\)/\\([0-9a-f]+\\)/\\([0-9a-f]+\\)"
+                      color)
+        (if (or (> (- (match-end 1) (match-beginning 1)) 4)
+                (> (- (match-end 2) (match-beginning 2)) 4)
+                (> (- (match-end 3) (match-beginning 3)) 4))
+            (error "Invalid RGB color specification: %s" color)
+          (setq str (match-string 1 color)
+                r (* (font-hex-string-to-number str)
+                     (expt 16 (- 4 (length str))))
+                str (match-string 2 color)
+                g (* (font-hex-string-to-number str)
+                     (expt 16 (- 4 (length str))))
+                str (match-string 3 color)
+                b (* (font-hex-string-to-number str)
+                     (expt 16 (- 4 (length str)))))))
+       (t
+        (font-warn 'html (format "Invalid RGB color specification: %s"
+                               color))
+        (setq r 0
+              g 0
+              b 0)))
+  (list r g b) ))
+
+(defsubst font-rgb-color-p (obj)
+  (or (and (vectorp obj)
+          (= (length obj) 4)
+          (eq (aref obj 0) 'rgb))))
+
+(defsubst font-rgb-color-red (obj) (aref obj 1))
+(defsubst font-rgb-color-green (obj) (aref obj 2))
+(defsubst font-rgb-color-blue (obj) (aref obj 3))
+
+(defun font-color-rgb-components (color)
+  "Return the RGB components of COLOR as a list of integers (R G B).
+16-bit values are always returned.
+#FEFEFE and rgb:fe/fe/fe style color specifications are parsed directly
+into their components.
+RGB values for color names are looked up in the rgb.txt file.
+The variable x-library-search-path is use to locate the rgb.txt file."
+  (let ((case-fold-search t))
+    (cond
+     ((and (font-rgb-color-p color) (floatp (aref color 1)))
+      (list (* 65535 (aref color 0))
+           (* 65535 (aref color 1))
+           (* 65535 (aref color 2))))
+     ((font-rgb-color-p color)
+      (list (font-rgb-color-red color)
+           (font-rgb-color-green color)
+           (font-rgb-color-blue color)))
+     ((and (vectorp color) (= 3 (length color)))
+      (list (aref color 0) (aref color 1) (aref color 2)))
+     ((and (listp color) (= 3 (length color)) (floatp (car color)))
+      (mapcar (function (lambda (x) (* x 65535))) color))
+     ((and (listp color) (= 3 (length color)))
+      color)
+     ((or (string-match "^#" color)
+         (string-match "^rgb:" color))
+      (font-parse-rgb-components color))
+     ((string-match "\\([0-9.]+\\)[ \t]\\([0-9.]+\\)[ \t]\\([0-9.]+\\)"
+                   color)
+      (let ((r (string-to-number (match-string 1 color)))
+           (g (string-to-number (match-string 2 color)))
+           (b (string-to-number (match-string 3 color))))
+       (if (floatp r)
+           (setq r (round (* 255 r))
+                 g (round (* 255 g))
+                 b (round (* 255 b))))
+       (font-parse-rgb-components (format "#%02x%02x%02x" r g b))))
+     (t
+      (font-lookup-rgb-components color)))))
+
+(defsubst font-tty-compute-color-delta (col1 col2)
+  (+ 
+   (* (- (aref col1 0) (aref col2 0))
+      (- (aref col1 0) (aref col2 0)))
+   (* (- (aref col1 1) (aref col2 1))
+      (- (aref col1 1) (aref col2 1)))
+   (* (- (aref col1 2) (aref col2 2))
+      (- (aref col1 2) (aref col2 2)))))
+
+(defun font-tty-find-closest-color (r g b)
+  ;; This is basically just a lisp copy of allocate_nearest_color
+  ;; from objects-x.c from Emacs 19
+  ;; We really should just check tty-color-list, but unfortunately
+  ;; that does not include any RGB information at all.
+  ;; So for now we just hardwire in the default list and call it
+  ;; good for now.
+  (setq r (/ r 65535.0)
+       g (/ g 65535.0)
+       b (/ b 65535.0))
+  (let* ((color_def (vector r g b))
+        (colors [([1.0 1.0 1.0] . "white")
+                 ([0.0 1.0 1.0] . "cyan")
+                 ([1.0 0.0 1.0] . "magenta")
+                 ([0.0 0.0 1.0] . "blue")
+                 ([1.0 1.0 0.0] . "yellow")
+                 ([0.0 1.0 0.0] . "green")
+                 ([1.0 0.0 0.0] . "red")
+                 ([0.0 0.0 0.0] . "black")])
+        (no_cells (length colors))
+        (x 1)
+        (nearest 0)
+        (nearest_delta 0)
+        (trial_delta 0))
+    (setq nearest_delta (font-tty-compute-color-delta (car (aref colors 0))
+                                                     color_def))
+    (while (/= no_cells x)
+      (setq trial_delta (font-tty-compute-color-delta (car (aref colors x))
+                                                     color_def))
+      (if (< trial_delta nearest_delta)
+         (setq nearest x
+               nearest_delta trial_delta))
+      (setq x (1+ x)))
+    (cdr-safe (aref colors nearest))))
+
+(defun font-normalize-color (color &optional device)
+  "Return an RGB tuple, given any form of input.  If an error occurs, black
+is returned."
+  (case (device-type device)
+   ((x pm)
+    (apply 'format "#%02x%02x%02x" (font-color-rgb-components color)))
+   (mswindows
+    (let* ((rgb (font-color-rgb-components color))
+          (color (apply 'format "#%02x%02x%02x" rgb)))
+      (mswindows-define-rgb-color (nth 0 rgb) (nth 1 rgb) (nth 2 rgb) color)
+      color))
+   (tty
+    (apply 'font-tty-find-closest-color (font-color-rgb-components color)))
+   (ns
+    (let ((vals (mapcar (function (lambda (x) (>> x 8)))
+                       (font-color-rgb-components color))))
+      (apply 'format "RGB%02x%02x%02xff" vals)))
+   (otherwise
+    color)))
+
+(defun font-set-face-background (&optional face color &rest args)
+  (interactive)
+  (condition-case nil
+      (cond
+       ((or (font-rgb-color-p color)
+           (string-match "^#[0-9a-fA-F]+$" color))
+       (apply 'set-face-background face
+              (font-normalize-color color) args))
+       (t
+       (apply 'set-face-background face color args)))
+    (error nil)))
+
+(defun font-set-face-foreground (&optional face color &rest args)
+  (interactive)
+  (condition-case nil
+      (cond
+       ((or (font-rgb-color-p color)
+           (string-match "^#[0-9a-fA-F]+$" color))
+       (apply 'set-face-foreground face (font-normalize-color color) args))
+       (t
+       (apply 'set-face-foreground face color args)))
+    (error nil)))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;; Support for 'blinking' fonts
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+(defun font-map-windows (func &optional arg frame)
+  (let* ((start (selected-window))
+        (cur start)
+        (result nil))
+    (push (funcall func start arg) result)
+    (while (not (eq start (setq cur (next-window cur))))
+      (push (funcall func cur arg) result))
+    result))
+
+(defun font-face-visible-in-window-p (window face)
+  (let ((st (window-start window))
+       (nd (window-end window))
+       (found nil)
+       (face-at nil))
+    (setq face-at (get-text-property st 'face (window-buffer window)))
+    (if (or (eq face face-at) (and (listp face-at) (memq face face-at)))
+       (setq found t))
+    (while (and (not found)
+               (/= nd
+                   (setq st (next-single-property-change
+                             st 'face
+                             (window-buffer window) nd))))
+      (setq face-at (get-text-property st 'face (window-buffer window)))
+      (if (or (eq face face-at) (and (listp face-at) (memq face face-at)))
+         (setq found t)))
+    found))
+  
+(defun font-blink-callback ()
+  ;; Optimized to never invert the face unless one of the visible windows
+  ;; is showing it.
+  (let ((faces (if font-running-xemacs (face-list t) (face-list)))
+       (obj nil))
+    (while faces
+      (if (and (setq obj (face-property (car faces) 'font-specification))
+              (font-blink-p obj)
+              (memq t
+                    (font-map-windows 'font-face-visible-in-window-p (car faces))))
+         (invert-face (car faces)))
+      (pop faces))))
+
+(defcustom font-blink-interval 0.5
+  "How often to blink faces"
+  :type 'number
+  :group 'faces)
+  
+(defun font-blink-initialize ()
+  (cond
+   ((featurep 'itimer)
+    (if (get-itimer "font-blinker")
+       (delete-itimer (get-itimer "font-blinker")))
+    (start-itimer "font-blinker" 'font-blink-callback
+                 font-blink-interval
+                 font-blink-interval))
+   ((fboundp 'run-at-time)
+    (cancel-function-timers 'font-blink-callback)    
+    (run-at-time font-blink-interval
+                font-blink-interval
+                'font-blink-callback))
+   (t nil)))
+  
+(provide 'font)
diff --git a/lisp/fontl-hooks.el b/lisp/fontl-hooks.el
new file mode 100644 (file)
index 0000000..1ba326e
--- /dev/null
@@ -0,0 +1,87 @@
+;;; fontl-hooks.el --- pre-loaded stuff for font-lock.
+
+;; Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
+;; Copyright (C) 1995 Amdahl Corporation.
+;; Copyright (C) 1996 Ben Wing.
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: FSF 19.30. (font-lock.el)
+
+;;; Commentary:
+
+;; The reason for the existence of this file is so that modes can
+;; call `font-lock-set-defaults' without worrying about whether
+;; font-lock is loaded.  We don't autoload this from font-lock.el
+;; because loading font-lock.el automatically turns font-lock on.
+
+;;; Code:
+
+(defun font-lock-set-defaults (&optional explicit-defaults)
+  "Set fontification defaults appropriately for this mode.
+Sets `font-lock-keywords', `font-lock-keywords-only', `font-lock-syntax-table',
+`font-lock-beginning-of-syntax-function' and
+`font-lock-keywords-case-fold-search'.
+
+If `font-lock-defaults' is currently set, it is used.  Otherwise, the
+symbol naming the major mode is examined for a `font-lock-defaults'
+property.  If that is not present, but a variable `foo-mode-font-lock-keywords'
+is, the value of that variable is used as the default for
+`font-lock-keywords'.  Various other backward-compatible behaviors also
+exist -- if you're curious, look at the source.
+
+The value of `font-lock-maximum-decoration' is used to determine which
+set of keywords applies, if more than one exists.
+
+This will also put the buffer into Font Lock mode if any keywords exist
+and if auto-fontification is called for, as determined by
+`font-lock-auto-fontify', `font-lock-mode-enable-list', and
+`font-lock-mode-disable-list'.
+
+Calling this function multiple times in the same buffer is safe -- this
+function keeps track of whether it has already been called in this
+buffer, and does nothing if so.  This allows for multiple ways of getting
+Font Lock properly initialized in a buffer, to deal with existing major
+modes that do not call this function. (For example, Font Lock adds this
+function to `find-file-hooks'.)
+
+Major modes that have any font-lock defaults specified should call this
+function during their initialization process, after they have set
+the variable `major-mode'.
+
+If EXPLICIT-DEFAULTS is t, this function will not check whether it
+has already been run in this buffer, and will always do the full
+computation.
+
+If EXPLICIT-DEFAULTS is not nil and not t, it should be something
+that is allowable as a value for `font-lock-defaults' and will be
+used to initialize the Font Lock variables."
+
+  (when
+      (and
+       (featurep 'font-lock)
+       (if font-lock-auto-fontify
+          (not (memq major-mode font-lock-mode-disable-list))
+        (memq major-mode font-lock-mode-enable-list))
+       (font-lock-set-defaults-1 explicit-defaults)
+       font-lock-keywords)
+    (turn-on-font-lock)))
+
+(provide 'fontl-hooks)
+
+;;; fontl-hooks.el ends here
diff --git a/lisp/format.el b/lisp/format.el
new file mode 100644 (file)
index 0000000..2b4c609
--- /dev/null
@@ -0,0 +1,987 @@
+;;; format.el --- read and save files in multiple formats
+
+;; Copyright (c) 1994, 1995, 1997 Free Software Foundation
+
+;; Author: Boris Goldowsky <boris@gnu.ai.mit.edu>
+;; Keywords: extensions, dumped
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Emacs 20.2.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; This file defines a unified mechanism for saving & loading files stored
+;; in different formats.  `format-alist' contains information that directs
+;; Emacs to call an encoding or decoding function when reading or writing
+;; files that match certain conditions.
+;;
+;; When a file is visited, its format is determined by matching the
+;; beginning of the file against regular expressions stored in
+;; `format-alist'.  If this fails, you can manually translate the buffer
+;; using `format-decode-buffer'.  In either case, the formats used are
+;; listed in the variable `buffer-file-format', and become the default
+;; format for saving the buffer.  To save a buffer in a different format,
+;; change this variable, or use `format-write-file'.
+;;
+;; Auto-save files are normally created in the same format as the visited
+;; file, but the variable `auto-save-file-format' can be set to a
+;; particularly fast or otherwise preferred format to be used for
+;; auto-saving (or nil to do no encoding on auto-save files, but then you
+;; risk losing any text-properties in the buffer).
+;;
+;; You can manually translate a buffer into or out of a particular format
+;; with the functions `format-encode-buffer' and `format-decode-buffer'.
+;; To translate just the region use the functions `format-encode-region'
+;; and `format-decode-region'.
+;;
+;; You can define a new format by writing the encoding and decoding
+;; functions, and adding an entry to `format-alist'.  See enriched.el for
+;; an example of how to implement a file format.  There are various
+;; functions defined in this file that may be useful for writing the
+;; encoding and decoding functions:
+;;  * `format-annotate-region' and `format-deannotate-region' allow a
+;;     single alist of information to be used for encoding and decoding.
+;;     The alist defines a correspondence between strings in the file
+;;     ("annotations") and text-properties in the buffer.
+;;  * `format-replace-strings' is similarly useful for doing simple
+;;     string->string translations in a reversible manner.
+
+;;; Code:
+
+(put 'buffer-file-format 'permanent-local t)
+
+(defvar format-alist
+  '((image/jpeg "JPEG image" "\377\330\377\340\000\020JFIF"
+               image-decode-jpeg nil t image-mode)
+    (image/gif "GIF image" "GIF8[79]"
+              image-decode-gif nil t image-mode)
+    (image/png "Portable Network Graphics" "\211PNG"
+              image-decode-png nil t image-mode)
+    (image/x-xpm "XPM image" "/\\* XPM \\*/"
+                image-decode-xpm nil t image-mode)
+
+    ;; TIFF files have lousy magic
+    (image/tiff "TIFF image" "II\\*\000"
+               image-decode-tiff nil t image-mode) ;; TIFF 6.0 big-endian
+    (image/tiff "TIFF image" "MM\000\\*"
+               image-decode-tiff nil t image-mode) ;; TIFF 6.0 little-endian
+
+    (text/enriched "Extended MIME text/enriched format."
+                  "Content-[Tt]ype:[ \t]*text/enriched"
+                  enriched-decode enriched-encode t enriched-mode)
+    (text/richtext "Extended MIME obsolete text/richtext format."
+                  "Content-[Tt]ype:[ \t]*text/richtext"
+                  richtext-decode richtext-encode t enriched-mode)
+    (plain "ISO 8859-1 standard format, no text properties."
+          ;; Plain only exists so that there is an obvious neutral choice in
+          ;; the completion list.
+          nil nil nil nil nil)
+    ;; (ibm   "IBM Code Page 850 (DOS)"
+    ;;        "1\\(^\\)"
+    ;;        "recode ibm-pc:latin1" "recode latin1:ibm-pc" t nil)
+    ;; (mac   "Apple Macintosh"
+    ;;        "1\\(^\\)"
+    ;;        "recode mac:latin1" "recode latin1:mac" t nil)
+    ;; (hp    "HP Roman8"
+    ;;        "1\\(^\\)"
+    ;;        "recode roman8:latin1" "recode latin1:roman8" t nil)
+    ;; (TeX   "TeX (encoding)"
+    ;;        "1\\(^\\)"
+    ;;        iso-tex2iso iso-iso2tex t nil)
+    ;; (gtex  "German TeX (encoding)"
+    ;;        "1\\(^\\)"
+    ;;        iso-gtex2iso iso-iso2gtex t nil)
+    ;; (html  "HTML (encoding)"
+    ;;        "1\\(^\\)"
+    ;;        "recode html:latin1" "recode latin1:html" t nil)
+    ;; (rot13 "rot13"
+    ;;        "1\\(^\\)"
+    ;;        "tr a-mn-z n-za-m" "tr a-mn-z n-za-m" t nil)
+    ;; (duden "Duden Ersatzdarstellung"
+    ;;        "1\\(^\\)"
+    ;;        "diac" iso-iso2duden t nil)
+    ;; (de646 "German ASCII (ISO 646)"
+    ;;        "1\\(^\\)"
+    ;;        "recode iso646-ge:latin1" "recode latin1:iso646-ge" t nil)
+    ;; (denet "net German"
+    ;;        "1\\(^\\)"
+    ;;        iso-german iso-cvt-read-only t nil)
+    ;; (esnet "net Spanish"
+    ;;        "1\\(^\\)"
+    ;;        iso-spanish iso-cvt-read-only t nil)
+    )
+  "List of information about understood file formats.
+Elements are of the form \(NAME DOC-STR REGEXP FROM-FN TO-FN MODIFY MODE-FN).
+
+NAME    is a symbol, which is stored in `buffer-file-format'.
+
+DOC-STR should be a single line providing more information about the
+        format.  It is currently unused, but in the future will be shown to
+        the user if they ask for more information.
+
+REGEXP  is a regular expression to match against the beginning of the file;
+        it should match only files in that format.
+
+FROM-FN is called to decode files in that format; it gets two args, BEGIN
+        and END, and can make any modifications it likes, returning the new
+        end.  It must make sure that the beginning of the file no longer
+        matches REGEXP, or else it will get called again.
+       Alternatively, FROM-FN can be a string, which specifies a shell command
+       (including options) to be used as a filter to perform the conversion.
+
+TO-FN   is called to encode a region into that format; it is passed three
+        arguments: BEGIN, END, and BUFFER.  BUFFER is the original buffer that
+        the data being written came from, which the function could use, for
+        example, to find the values of local variables.  TO-FN should either
+        return a list of annotations like `write-region-annotate-functions',
+        or modify the region and return the new end.
+       Alternatively, TO-FN can be a string, which specifies a shell command
+       (including options) to be used as a filter to perform the conversion.
+
+MODIFY, if non-nil, means the TO-FN wants to modify the region.  If nil,
+        TO-FN will not make any changes but will instead return a list of
+        annotations.
+
+MODE-FN, if specified, is called when visiting a file with that format.")
+
+;;; Basic Functions (called from Lisp)
+
+(defun format-encode-run-method (method from to &optional buffer)
+  "Translate using function or shell script METHOD the text from FROM to TO.
+If METHOD is a string, it is a shell command;
+otherwise, it should be a Lisp function.
+BUFFER should be the buffer that the output originally came from."
+  (if (stringp method)
+      (save-current-buffer
+       (set-buffer buffer)
+       (with-output-to-temp-buffer "*Format Errors*"
+         (shell-command-on-region from to method t nil))
+       (point))
+    (funcall method from to buffer)))
+
+(defun format-decode-run-method (method from to &optional buffer)
+  "Decode using function or shell script METHOD the text from FROM to TO.
+If METHOD is a string, it is a shell command;
+otherwise, it should be a Lisp function."
+  (if (stringp method)
+      (progn
+       (with-output-to-temp-buffer "*Format Errors*"
+         (shell-command-on-region from to method t nil))
+       (point))
+    (funcall method from to)))
+
+(defun format-annotate-function (format from to orig-buf)
+  "Return annotations for writing region as FORMAT.
+FORMAT is a symbol naming one of the formats defined in `format-alist',
+it must be a single symbol, not a list like `buffer-file-format'.
+FROM and TO delimit the region to be operated on in the current buffer.
+ORIG-BUF is the original buffer that the data came from.
+This function works like a function on `write-region-annotate-functions':
+it either returns a list of annotations, or returns with a different buffer
+current, which contains the modified text to write.
+
+For most purposes, consider using `format-encode-region' instead."
+  ;; This function is called by write-region (actually build-annotations)
+  ;; for each element of buffer-file-format.
+  (let* ((info (assq format format-alist))
+        (to-fn  (nth 4 info))
+        (modify (nth 5 info)))
+    (if to-fn
+       (if modify
+           ;; To-function wants to modify region.  Copy to safe place.
+           (let ((copy-buf (get-buffer-create " *Format Temp*")))
+             (copy-to-buffer copy-buf from to)
+             (set-buffer copy-buf)
+             (format-insert-annotations write-region-annotations-so-far from)
+             (format-encode-run-method to-fn (point-min) (point-max) orig-buf)
+             nil)
+         ;; Otherwise just call function, it will return annotations.
+         (funcall to-fn from to orig-buf)))))
+
+(defun format-decode (format length &optional visit-flag)
+  "Decode text from any known FORMAT.
+FORMAT is a symbol appearing in `format-alist' or a list of such symbols,
+or nil, in which case this function tries to guess the format of the data by
+matching against the regular expressions in `format-alist'.  After a match is
+found and the region decoded, the alist is searched again from the beginning
+for another match.
+
+Second arg LENGTH is the number of characters following point to operate on.
+If optional third arg VISIT-FLAG is true, set `buffer-file-format'
+to the list of formats used, and call any mode functions defined for those
+formats.
+
+Returns the new length of the decoded region.
+
+For most purposes, consider using `format-decode-region' instead.
+
+This function is called by insert-file-contents whenever a file is read."
+  (let ((mod (buffer-modified-p))
+       (begin (point))
+       (end (+ (point) length)))
+    (if (null format)
+       ;; Figure out which format it is in, remember list in `format'.
+       (let ((try format-alist))
+         (while try
+           (let* ((f (car try))
+                  (regexp (nth 2 f))
+                  (p (point)))
+             (if (and regexp (looking-at regexp)
+                      (< (match-end 0) (+ begin length)))
+                 (progn
+                   (setq format (cons (car f) format))
+                   ;; Decode it
+                   (if (nth 3 f)
+                       (setq end (format-decode-run-method (nth 3 f) begin end)))
+                   ;; Call visit function if required
+                   (if (and visit-flag (nth 6 f)) (funcall (nth 6 f) 1))
+                   ;; Safeguard against either of the functions changing pt.
+                   (goto-char p)
+                   ;; Rewind list to look for another format
+                   (setq try format-alist))
+               (setq try (cdr try))))))
+      ;; Deal with given format(s)
+      (or (listp format) (setq format (list format)))
+      (let ((do format) f)
+       (while do
+         (or (setq f (assq (car do) format-alist))
+             (error "Unknown format" (car do)))
+         ;; Decode:
+         (if (nth 3 f)
+             (setq end (format-decode-run-method (nth 3 f) begin end)))
+         ;; Call visit function if required
+         (if (and visit-flag (nth 6 f)) (funcall (nth 6 f) 1))
+         (setq do (cdr do)))))
+    (if visit-flag
+       (setq buffer-file-format format))
+    (set-buffer-modified-p mod)
+    ;; Return new length of region
+    (- end begin)))
+
+;;;
+;;; Interactive functions & entry points
+;;;
+
+(defun format-decode-buffer (&optional format)
+  "Translate the buffer from some FORMAT.
+If the format is not specified, this function attempts to guess.
+`buffer-file-format' is set to the format used, and any mode-functions
+for the format are called."
+  (interactive
+   (list (format-read "Translate buffer from format (default: guess): ")))
+  (save-excursion
+    (goto-char (point-min))
+    (format-decode format (buffer-size) t)))
+
+(defun format-decode-region (from to &optional format)
+  "Decode the region from some format.
+Arg FORMAT is optional; if omitted the format will be determined by looking
+for identifying regular expressions at the beginning of the region."
+  (interactive
+   (list (region-beginning) (region-end)
+        (format-read "Translate region from format (default: guess): ")))
+  (save-excursion
+    (goto-char from)
+    (format-decode format (- to from) nil)))
+
+(defun format-encode-buffer (&optional format)
+  "Translate the buffer into FORMAT.
+FORMAT defaults to `buffer-file-format'.  It is a symbol naming one of the
+formats defined in `format-alist', or a list of such symbols."
+  (interactive
+   (list (format-read (format "Translate buffer to format (default %s): "
+                             buffer-file-format))))
+  (format-encode-region (point-min) (point-max) format))
+
+(defun format-encode-region (beg end &optional format)
+ "Translate the region into some FORMAT.
+FORMAT defaults to `buffer-file-format', it is a symbol naming
+one of the formats defined in `format-alist', or a list of such symbols."
+ (interactive
+  (list (region-beginning) (region-end)
+       (format-read (format "Translate region to format (default %s): "
+                            buffer-file-format))))
+ (if (null format)    (setq format buffer-file-format))
+ (if (symbolp format) (setq format (list format)))
+ (save-excursion
+   (goto-char end)
+   (let ( ; (cur-buf (current-buffer))
+        (end (point-marker)))
+     (while format
+       (let* ((info (assq (car format) format-alist))
+             (to-fn  (nth 4 info))
+             (modify (nth 5 info))
+             ;; result
+             )
+        (if to-fn
+            (if modify
+                (setq end (format-encode-run-method to-fn beg end
+                                                    (current-buffer)))
+              (format-insert-annotations
+               (funcall to-fn beg end (current-buffer)))))
+        (setq format (cdr format)))))))
+
+(defun format-write-file (filename format)
+  "Write current buffer into a FILE using some FORMAT.
+Makes buffer visit that file and sets the format as the default for future
+saves.  If the buffer is already visiting a file, you can specify a directory
+name as FILE, to write a file of the same old name in that directory."
+  (interactive
+   ;; Same interactive spec as write-file, plus format question.
+   (let* ((file (if buffer-file-name
+                   (read-file-name "Write file: "
+                                   nil nil nil nil)
+                 (read-file-name "Write file: "
+                                 (cdr (assq 'default-directory
+                                            (buffer-local-variables)))
+                                 nil nil (buffer-name))))
+         (fmt (format-read (format "Write file `%s' in format: "
+                                   (file-name-nondirectory file)))))
+     (list file fmt)))
+  (setq buffer-file-format format)
+  (write-file filename))
+
+(defun format-find-file (filename format)
+  "Find the file FILE using data format FORMAT.
+If FORMAT is nil then do not do any format conversion."
+  (interactive
+   ;; Same interactive spec as write-file, plus format question.
+   (let* ((file (read-file-name "Find file: "))
+         (fmt (format-read (format "Read file `%s' in format: "
+                                   (file-name-nondirectory file)))))
+     (list file fmt)))
+  (let ((format-alist nil))
+     (find-file filename))
+  (if format
+      (format-decode-buffer format)))
+
+(defun format-insert-file (filename format &optional beg end)
+  "Insert the contents of file FILE using data format FORMAT.
+If FORMAT is nil then do not do any format conversion.
+The optional third and fourth arguments BEG and END specify
+the part of the file to read.
+
+The return value is like the value of `insert-file-contents':
+a list (ABSOLUTE-FILE-NAME . SIZE)."
+  (interactive
+   ;; Same interactive spec as write-file, plus format question.
+   (let* ((file (read-file-name "Find file: "))
+         (fmt (format-read (format "Read file `%s' in format: "
+                                   (file-name-nondirectory file)))))
+     (list file fmt)))
+  (let (value size)
+    (let ((format-alist nil))
+      (setq value (insert-file-contents filename nil beg end))
+      (setq size (nth 1 value)))
+    (if format
+       (setq size (format-decode format size)
+             value (cons (car value) size)))
+    value))
+
+(defun format-read (&optional prompt)
+  "Read and return the name of a format.
+Return value is a list, like `buffer-file-format'; it may be nil.
+Formats are defined in `format-alist'.  Optional arg is the PROMPT to use."
+  (let* ((table (mapcar (lambda (x) (list (symbol-name (car x))))
+                       format-alist))
+        (ans (completing-read (or prompt "Format: ") table nil t)))
+    (if (not (equal "" ans)) (list (intern ans)))))
+
+
+;;;
+;;; Below are some functions that may be useful in writing encoding and
+;;; decoding functions for use in format-alist.
+;;;
+
+(defun format-replace-strings (alist &optional reverse beg end)
+  "Do multiple replacements on the buffer.
+ALIST is a list of (from . to) pairs, which should be proper arguments to
+`search-forward' and `replace-match' respectively.
+Optional 2nd arg REVERSE, if non-nil, means the pairs are (to . from), so that
+you can use the same list in both directions if it contains only literal
+strings.
+Optional args BEGIN and END specify a region of the buffer to operate on."
+  (save-excursion
+    (save-restriction
+      (or beg (setq beg (point-min)))
+      (if end (narrow-to-region (point-min) end))
+      (while alist
+       (let ((from (if reverse (cdr (car alist)) (car (car alist))))
+             (to   (if reverse (car (cdr alist)) (cdr (car alist)))))
+         (goto-char beg)
+         (while (search-forward from nil t)
+           (goto-char (match-beginning 0))
+           (insert to)
+           (set-text-properties (- (point) (length to)) (point)
+                                (text-properties-at (point)))
+           (delete-region (point) (+ (point) (- (match-end 0)
+                                                (match-beginning 0)))))
+         (setq alist (cdr alist)))))))
+
+;;; Some list-manipulation functions that we need.
+
+(defun format-delq-cons (cons list)
+  "Remove the given CONS from LIST by side effect,
+and return the new LIST.  Since CONS could be the first element
+of LIST, write `\(setq foo \(format-delq-cons element foo))' to be sure of
+changing the value of `foo'."
+  (if (eq cons list)
+      (cdr list)
+    (let ((p list))
+      (while (not (eq (cdr p) cons))
+       (if (null p) (error "format-delq-cons: not an element."))
+       (setq p (cdr p)))
+      ;; Now (cdr p) is the cons to delete
+      (setcdr p (cdr cons))
+      list)))
+
+(defun format-make-relatively-unique (a b)
+  "Delete common elements of lists A and B, return as pair.
+Compares using `equal'."
+  (let* ((acopy (copy-sequence a))
+        (bcopy (copy-sequence b))
+        (tail acopy))
+    (while tail
+      (let ((dup (member (car tail) bcopy))
+           (next (cdr tail)))
+       (if dup (setq acopy (format-delq-cons tail acopy)
+                     bcopy (format-delq-cons dup  bcopy)))
+       (setq tail next)))
+    (cons acopy bcopy)))
+
+(defun format-common-tail (a b)
+  "Given two lists that have a common tail, return it.
+Compares with `equal', and returns the part of A that is equal to the
+equivalent part of B.  If even the last items of the two are not equal,
+returns nil."
+  (let ((la (length a))
+       (lb (length b)))
+    ;; Make sure they are the same length
+    (if (> la lb)
+       (setq a (nthcdr (- la lb) a))
+      (setq b (nthcdr (- lb la) b))))
+  (while (not (equal a b))
+    (setq a (cdr a)
+         b (cdr b)))
+  a)
+
+(defun format-reorder (items order)
+  "Arrange ITEMS to following partial ORDER.
+Elements of ITEMS equal to elements of ORDER will be rearranged to follow the
+ORDER.  Unmatched items will go last."
+  (if order
+      (let ((item (member (car order) items)))
+       (if item
+           (cons (car item)
+                 (format-reorder (format-delq-cons item items)
+                          (cdr order)))
+         (format-reorder items (cdr order))))
+    items))
+
+(put 'face 'format-list-valued t)      ; These text-properties take values
+(put 'unknown 'format-list-valued t)   ; that are lists, the elements of which
+                                       ; should be considered separately.
+                                       ; See format-deannotate-region and
+                                       ; format-annotate-region.
+
+;;;
+;;; Decoding
+;;;
+
+(defun format-deannotate-region (from to translations next-fn)
+  "Translate annotations in the region into text properties.
+This sets text properties between FROM to TO as directed by the
+TRANSLATIONS and NEXT-FN arguments.
+
+NEXT-FN is a function that searches forward from point for an annotation.
+It should return a list of 4 elements: \(BEGIN END NAME POSITIVE).  BEGIN and
+END are buffer positions bounding the annotation, NAME is the name searched
+for in TRANSLATIONS, and POSITIVE should be non-nil if this annotation marks
+the beginning of a region with some property, or nil if it ends the region.
+NEXT-FN should return nil if there are no annotations after point.
+
+The basic format of the TRANSLATIONS argument is described in the
+documentation for the `format-annotate-region' function.  There are some
+additional things to keep in mind for decoding, though:
+
+When an annotation is found, the TRANSLATIONS list is searched for a
+text-property name and value that corresponds to that annotation.  If the
+text-property has several annotations associated with it, it will be used only
+if the other annotations are also in effect at that point.  The first match
+found whose annotations are all present is used.
+
+The text property thus determined is set to the value over the region between
+the opening and closing annotations.  However, if the text-property name has a
+non-nil `format-list-valued' property, then the value will be consed onto the
+surrounding value of the property, rather than replacing that value.
+
+There are some special symbols that can be used in the \"property\" slot of
+the TRANSLATIONS list: PARAMETER and FUNCTION \(spelled in uppercase).
+Annotations listed under the pseudo-property PARAMETER are considered to be
+arguments of the immediately surrounding annotation; the text between the
+opening and closing parameter annotations is deleted from the buffer but saved
+as a string.  The surrounding annotation should be listed under the
+pseudo-property FUNCTION.  Instead of inserting a text-property for this
+annotation, the function listed in the VALUE slot is called to make whatever
+changes are appropriate.  The function's first two arguments are the START and
+END locations, and the rest of the arguments are any PARAMETERs found in that
+region.
+
+Any annotations that are found by NEXT-FN but not defined by TRANSLATIONS
+are saved as values of the `unknown' text-property \(which is list-valued).
+The TRANSLATIONS list should usually contain an entry of the form
+    \(unknown \(nil format-annotate-value))
+to write these unknown annotations back into the file."
+  (save-excursion
+    (save-restriction
+      (narrow-to-region (point-min) to)
+      (goto-char from)
+      (let (next open-ans todo
+                ;; loc
+                unknown-ans)
+       (while (setq next (funcall next-fn))
+         (let* ((loc      (nth 0 next))
+                (end      (nth 1 next))
+                (name     (nth 2 next))
+                (positive (nth 3 next))
+                (found    nil))
+
+           ;; Delete the annotation
+           (delete-region loc end)
+           (cond
+            ;; Positive annotations are stacked, remembering location
+            (positive (setq open-ans (cons `(,name ((,loc . nil))) open-ans)))
+            ;; It is a negative annotation:
+            ;; Close the top annotation & add its text property.
+            ;; If the file's nesting is messed up, the close might not match
+            ;; the top thing on the open-annotations stack.
+            ;; If no matching annotation is open, just ignore the close.
+            ((not (assoc name open-ans))
+             (message "Extra closing annotation (%s) in file" name))
+            ;; If one is open, but not on the top of the stack, close
+            ;; the things in between as well.  Set `found' when the real
+            ;; one is closed.
+            (t
+             (while (not found)
+               (let* ((top (car open-ans))     ; first on stack: should match.
+                      (top-name (car top))     ; text property name
+                      (top-extents (nth 1 top)) ; property regions
+                      (params (cdr (cdr top))) ; parameters
+                      (aalist translations)
+                      (matched nil))
+                 (if (equal name top-name)
+                     (setq found t)
+                   (message "Improper nesting in file."))
+                 ;; Look through property names in TRANSLATIONS
+                 (while aalist
+                   (let ((prop (car (car aalist)))
+                         (alist (cdr (car aalist))))
+                     ;; And look through values for each property
+                     (while alist
+                       (let ((value (car (car alist)))
+                             (ans (cdr (car alist))))
+                         (if (member top-name ans)
+                             ;; This annotation is listed, but still have to
+                             ;; check if multiple annotations are satisfied
+                             (if (member nil (mapcar (lambda (r)
+                                                       (assoc r open-ans))
+                                                     ans))
+                                 nil   ; multiple ans not satisfied
+                               ;; If there are multiple annotations going
+                               ;; into one text property, split up the other
+                               ;; annotations so they apply individually to
+                               ;; the other regions.
+                               (setcdr (car top-extents) loc)
+                               (let ((to-split ans) this-one extents)
+                                 (while to-split
+                                   (setq this-one
+                                         (assoc (car to-split) open-ans)
+                                         extents (nth 1 this-one))
+                                   (if (not (eq this-one top))
+                                       (setcar (cdr this-one)
+                                               (format-subtract-regions
+                                                extents top-extents)))
+                                   (setq to-split (cdr to-split))))
+                               ;; Set loop variables to nil so loop
+                               ;; will exit.
+                               (setq alist nil aalist nil matched t
+                                     ;; pop annotation off stack.
+                                     open-ans (cdr open-ans))
+                               (let ((extents top-extents)
+                                     (start (car (car top-extents)))
+                                     (loc (cdr (car top-extents))))
+                                 (while extents
+                                   (cond
+                                    ;; Check for pseudo-properties
+                                    ((eq prop 'PARAMETER)
+                                     ;; A parameter of the top open ann:
+                                     ;; delete text and use as arg.
+                                     (if open-ans
+                                         ;; (If nothing open, discard).
+                                         (setq open-ans
+                                               (cons
+                                                (append (car open-ans)
+                                                        (list
+                                                         (buffer-substring
+                                                          start loc)))
+                                                (cdr open-ans))))
+                                     (delete-region start loc))
+                                    ((eq prop 'FUNCTION)
+                                     ;; Not a property, but a function.
+                                     (let ((rtn
+                                            (apply value start loc params)))
+                                       (if rtn (setq todo (cons rtn todo)))))
+                                    (t
+                                     ;; Normal property/value pair
+                                     (setq todo
+                                           (cons (list start loc prop value)
+                                                 todo))))
+                                   (setq extents (cdr extents)
+                                         start (car (car extents))
+                                         loc (cdr (car extents))))))))
+                       (setq alist (cdr alist))))
+                   (setq aalist (cdr aalist)))
+                 (unless matched
+                     ;; Didn't find any match for the annotation:
+                     ;; Store as value of text-property `unknown'.
+                     (setcdr (car top-extents) loc)
+                     (let ((extents top-extents)
+                           (start (car (car top-extents)))
+                           (loc (cdr (car top-extents))))
+                       (while extents
+                         (setq open-ans (cdr open-ans)
+                               todo (cons (list start loc 'unknown top-name)
+                                          todo)
+                               unknown-ans (cons name unknown-ans)
+                               extents (cdr extents)
+                               start (car (car extents))
+                               loc (cdr (car extents))))))))))))
+
+       ;; Once entire file has been scanned, add the properties.
+       (while todo
+         (let* ((item (car todo))
+                (from (nth 0 item))
+                (to   (nth 1 item))
+                (prop (nth 2 item))
+                (val  (nth 3 item)))
+
+           (if (numberp val)   ; add to ambient value if numeric
+               (format-property-increment-region from to prop val 0)
+             (put-text-property
+              from to prop
+              (cond ((get prop 'format-list-valued) ; value gets consed onto
+                                                    ; list-valued properties
+                     (let ((prev (get-text-property from prop)))
+                       (cons val (if (listp prev) prev (list prev)))))
+                    (t val))))) ; normally, just set to val.
+         (setq todo (cdr todo)))
+
+       (if unknown-ans
+           (message "Unknown annotations: %s" unknown-ans))))))
+
+(defun format-subtract-regions (minu subtra)
+  "Remove the regions in SUBTRAHEND from the regions in MINUEND.  A region
+is a dotted pair (from . to).  Both parameters are lists of regions.  Each
+list must contain nonoverlapping, noncontiguous regions, in descending
+order.  The result is also nonoverlapping, noncontiguous, and in descending
+order.  The first element of MINUEND can have a cdr of nil, indicating that
+the end of that region is not yet known."
+  (let* ((minuend (copy-alist minu))
+        (subtrahend (copy-alist subtra))
+        (m (car minuend))
+        (s (car subtrahend))
+        results)
+    (while (and minuend subtrahend)
+      (cond
+       ;; The minuend starts after the subtrahend ends; keep it.
+       ((> (car m) (cdr s))
+       (setq results (cons m results)
+             minuend (cdr minuend)
+             m (car minuend)))
+       ;; The minuend extends beyond the end of the subtrahend.  Chop it off.
+       ((or (null (cdr m)) (> (cdr m) (cdr s)))
+       (setq results (cons (cons (1+ (cdr s)) (cdr m)) results))
+       (setcdr m (cdr s)))
+       ;; The subtrahend starts after the minuend ends; throw it away.
+       ((< (cdr m) (car s))
+       (setq subtrahend (cdr subtrahend) s (car subtrahend)))
+       ;; The subtrahend extends beyond the end of the minuend.  Chop it off.
+       (t      ;(<= (cdr m) (cdr s)))
+       (if (>= (car m) (car s))
+           (setq minuend (cdr minuend) m (car minuend))
+         (setcdr m (1- (car s)))
+         (setq subtrahend (cdr subtrahend) s (car subtrahend))))))
+    (nconc (nreverse results) minuend)))
+
+;; This should probably go somewhere other than format.el.  Then again,
+;; indent.el has alter-text-property.  NOTE: We can also use
+;; next-single-property-change instead of text-property-not-all, but then
+;; we have to see if we passed TO.
+(defun format-property-increment-region (from to prop delta default)
+  "Increment property PROP over the region between FROM and TO by the
+amount DELTA (which may be negative).  If property PROP is nil anywhere
+in the region, it is treated as though it were DEFAULT."
+  (let ((cur from) val newval next)
+    (while cur
+      (setq val    (get-text-property cur prop)
+           newval (+ (or val default) delta)
+           next   (text-property-not-all cur to prop val))
+      (put-text-property cur (or next to) prop newval)
+      (setq cur next))))
+
+;;;
+;;; Encoding
+;;;
+
+(defun format-insert-annotations (list &optional offset)
+  "Apply list of annotations to buffer as `write-region' would.
+Inserts each element of the given LIST of buffer annotations at its
+appropriate place.  Use second arg OFFSET if the annotations' locations are
+not relative to the beginning of the buffer: annotations will be inserted
+at their location-OFFSET+1 \(ie, the offset is treated as the character number
+of the first character in the buffer)."
+  (if (not offset)
+      (setq offset 0)
+    (setq offset (1- offset)))
+  (let ((l (reverse list)))
+    (while l
+      (goto-char (- (car (car l)) offset))
+      (insert (cdr (car l)))
+      (setq l (cdr l)))))
+
+(defun format-annotate-value (old new)
+  "Return OLD and NEW as a \(close . open) annotation pair.
+Useful as a default function for TRANSLATIONS alist when the value of the text
+property is the name of the annotation that you want to use, as it is for the
+`unknown' text property."
+  (cons (if old (list old))
+       (if new (list new))))
+
+(defun format-annotate-region (from to trans format-fn ignore)
+  "Generate annotations for text properties in the region.
+Searches for changes between FROM and TO, and describes them with a list of
+annotations as defined by alist TRANSLATIONS and FORMAT-FN.  IGNORE lists text
+properties not to consider; any text properties that are neither ignored nor
+listed in TRANSLATIONS are warned about.
+If you actually want to modify the region, give the return value of this
+function to `format-insert-annotations'.
+
+Format of the TRANSLATIONS argument:
+
+Each element is a list whose car is a PROPERTY, and the following
+elements are VALUES of that property followed by the names of zero or more
+ANNOTATIONS.  Whenever the property takes on that value, the annotations
+\(as formatted by FORMAT-FN) are inserted into the file.
+When the property stops having that value, the matching negated annotation
+will be inserted \(it may actually be closed earlier and reopened, if
+necessary, to keep proper nesting).
+
+If the property's value is a list, then each element of the list is dealt with
+separately.
+
+If a VALUE is numeric, then it is assumed that there is a single annotation
+and each occurrence of it increments the value of the property by that number.
+Thus, given the entry \(left-margin \(4 \"indent\")), if the left margin
+changes from 4 to 12, two <indent> annotations will be generated.
+
+If the VALUE is nil, then instead of annotations, a function should be
+specified.  This function is used as a default: it is called for all
+transitions not explicitly listed in the table.  The function is called with
+two arguments, the OLD and NEW values of the property.  It should return
+lists of annotations like `format-annotate-location' does.
+
+    The same structure can be used in reverse for reading files."
+  (let ((all-ans nil)    ; All annotations - becomes return value
+       (open-ans nil)   ; Annotations not yet closed
+       (loc nil)        ; Current location
+       (not-found nil)) ; Properties that couldn't be saved
+    (while (or (null loc)
+              (and (setq loc (next-property-change loc nil to))
+                   (< loc to)))
+      (or loc (setq loc from))
+      (let* ((ans (format-annotate-location loc (= loc from) ignore trans))
+            (neg-ans (format-reorder (aref ans 0) open-ans))
+            (pos-ans (aref ans 1))
+            (ignored (aref ans 2)))
+       (setq not-found (append ignored not-found)
+             ignore    (append ignored ignore))
+       ;; First do the negative (closing) annotations
+       (while neg-ans
+         ;; Check if it's missing.  This can happen (eg, a numeric property
+         ;; going negative can generate closing annotations before there are
+         ;; any open).  Warn user & ignore.
+         (if (not (member (car neg-ans) open-ans))
+             (message "Can't close %s: not open." (car neg-ans))
+           (while (not (equal (car neg-ans) (car open-ans)))
+             ;; To close anno. N, need to first close ans 1 to N-1,
+             ;; remembering to re-open them later.
+             (setq pos-ans (cons (car open-ans) pos-ans))
+             (setq all-ans
+                   (cons (cons loc (funcall format-fn (car open-ans) nil))
+                         all-ans))
+             (setq open-ans (cdr open-ans)))
+           ;; Now remove the one we're really interested in from open list.
+           (setq open-ans (cdr open-ans))
+           ;; And put the closing annotation here.
+           (setq all-ans
+                 (cons (cons loc (funcall format-fn (car neg-ans) nil))
+                       all-ans)))
+         (setq neg-ans (cdr neg-ans)))
+       ;; Now deal with positive (opening) annotations
+       (let ( ; (p pos-ans)
+             )
+         (while pos-ans
+           (setq open-ans (cons (car pos-ans) open-ans))
+           (setq all-ans
+                 (cons (cons loc (funcall format-fn (car pos-ans) t))
+                       all-ans))
+           (setq pos-ans (cdr pos-ans))))))
+
+    ;; Close any annotations still open
+    (while open-ans
+      (setq all-ans
+           (cons (cons to (funcall format-fn (car open-ans) nil))
+                 all-ans))
+      (setq open-ans (cdr open-ans)))
+    (if not-found
+       (message "These text properties could not be saved:\n    %s"
+                not-found))
+    (nreverse all-ans)))
+
+;;; Internal functions for format-annotate-region.
+
+(defun format-annotate-location (loc all ignore trans)
+  "Return annotation(s) needed at LOCATION.
+This includes any properties that change between LOC-1 and LOC.
+If ALL is true, don't look at previous location, but generate annotations for
+all non-nil properties.
+Third argument IGNORE is a list of text-properties not to consider.
+
+Return value is a vector of 3 elements:
+1. List of names of the annotations to close
+2. List of the names of annotations to open.
+3. List of properties that were ignored or couldn't be annotated."
+  (let* ((prev-loc (1- loc))
+        (before-plist (if all nil (text-properties-at prev-loc)))
+        (after-plist (text-properties-at loc))
+        p negatives positives prop props not-found)
+    ;; make list of all property names involved
+    (setq p before-plist)
+    (while p
+      (if (not (memq (car p) props))
+         (setq props (cons (car p) props)))
+      (setq p (cdr (cdr p))))
+    (setq p after-plist)
+    (while p
+      (if (not (memq (car p) props))
+         (setq props (cons (car p) props)))
+      (setq p (cdr (cdr p))))
+
+    (while props
+      (setq prop (car props)
+           props (cdr props))
+      (if (memq prop ignore)
+         nil  ; If it's been ignored before, ignore it now.
+       (let ((before (if all nil (car (cdr (memq prop before-plist)))))
+             (after (car (cdr (memq prop after-plist)))))
+         (if (equal before after)
+             nil ; no change; ignore
+           (let ((result (format-annotate-single-property-change
+                          prop before after trans)))
+             (if (not result)
+                 (setq not-found (cons prop not-found))
+               (setq negatives (nconc negatives (car result))
+                     positives (nconc positives (cdr result)))))))))
+    (vector negatives positives not-found)))
+
+(defun format-annotate-single-property-change (prop old new trans)
+  "Return annotations for PROPERTY changing from OLD to NEW.
+These are searched for in the TRANSLATIONS alist.
+If NEW does not appear in the list, but there is a default function, then that
+function is called.
+Annotations to open and to close are returned as a dotted pair."
+  (let ((prop-alist (cdr (assoc prop trans)))
+       ;; default
+       )
+    (if (not prop-alist)
+       nil
+      ;; If either old or new is a list, have to treat both that way.
+      (if (or (consp old) (consp new))
+         (let* ((old (if (listp old) old (list old)))
+                (new (if (listp new) new (list new)))
+                ;; (tail (format-common-tail old new))
+                close open)
+           (while old
+             (setq close
+                   (append (car (format-annotate-atomic-property-change
+                                 prop-alist (car old) nil))
+                           close)
+                   old (cdr old)))
+           (while new
+             (setq open
+                   (append (cdr (format-annotate-atomic-property-change
+                                 prop-alist nil (car new)))
+                           open)
+                   new (cdr new)))
+           (format-make-relatively-unique close open))
+       (format-annotate-atomic-property-change prop-alist old new)))))
+
+(defun format-annotate-atomic-property-change (prop-alist old new)
+  "Internal function annotate a single property change.
+PROP-ALIST is the relevant segment of a TRANSLATIONS list.
+OLD and NEW are the values."
+  (let (num-ann)
+    ;; If old and new values are numbers,
+    ;; look for a number in PROP-ALIST.
+    (if (and (or (null old) (numberp old))
+            (or (null new) (numberp new)))
+       (progn
+         (setq num-ann prop-alist)
+         (while (and num-ann (not (numberp (car (car num-ann)))))
+           (setq num-ann (cdr num-ann)))))
+    (if num-ann
+       ;; Numerical annotation - use difference
+       (progn
+         ;; If property is numeric, nil means 0
+         (cond ((and (numberp old) (null new))
+                (setq new 0))
+               ((and (numberp new) (null old))
+                (setq old 0)))
+
+         (let* ((entry (car num-ann))
+                (increment (car entry))
+                (n (ceiling (/ (float (- new old)) (float increment))))
+                (anno (car (cdr entry))))
+           (if (> n 0)
+               (cons nil (make-list n anno))
+             (cons (make-list (- n) anno) nil))))
+
+      ;; Standard annotation
+      (let ((close (and old (cdr (assoc old prop-alist))))
+           (open  (and new (cdr (assoc new prop-alist)))))
+       (if (or close open)
+           (format-make-relatively-unique close open)
+         ;; Call "Default" function, if any
+         (let ((default (assq nil prop-alist)))
+           (if default
+               (funcall (car (cdr default)) old new))))))))
+
+;;; format.el ends here
diff --git a/lisp/frame.el b/lisp/frame.el
new file mode 100644 (file)
index 0000000..1b98fe3
--- /dev/null
@@ -0,0 +1,1290 @@
+;;; frame.el --- multi-frame management independent of window systems.
+
+;; Copyright (C) 1993-4, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1996 Ben Wing.
+
+;; Maintainer: XEmacs Development Team
+;; Keywords: internal, dumped
+
+;; 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; see the file COPYING.  If not, write to the
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: FSF 19.30.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;;; Code:
+
+(defgroup frames nil
+  "Support for Emacs frames and window systems."
+  :group 'environment)
+
+; No need for `frame-creation-function'.
+
+;;; The initial value given here for this must ask for a minibuffer.
+;;; There must always exist a frame with a minibuffer, and after we
+;;; delete the terminal frame, this will be the only frame.
+(defcustom initial-frame-plist '(minibuffer t)
+  "Plist of frame properties for creating the initial X window frame.
+You can set this in your `.emacs' file; for example,
+  (setq initial-frame-plist '(top 1 left 1 width 80 height 55))
+Properties specified here supersede the values given in `default-frame-plist'.
+The format of this can also be an alist for backward compatibility.
+
+If the value calls for a frame without a minibuffer, and you have not created
+a minibuffer frame on your own, one is created according to
+`minibuffer-frame-plist'.
+
+You can specify geometry-related options for just the initial frame
+by setting this variable in your `.emacs' file; however, they won't
+take effect until Emacs reads `.emacs', which happens after first creating
+the frame.  If you want the frame to have the proper geometry as soon
+as it appears, you need to use this three-step process:
+* Specify X resources to give the geometry you want.
+* Set `default-frame-plist' to override these options so that they
+  don't affect subsequent frames.
+* Set `initial-frame-plist' in a way that matches the X resources,
+  to override what you put in `default-frame-plist'."
+  :type 'plist
+  :group 'frames)
+
+(defcustom minibuffer-frame-plist '(width 80 height 2 menubar-visible-p nil
+                                      default-toolbar-visible-p nil)
+  "Plist of frame properties for initially creating a minibuffer frame.
+You can set this in your `.emacs' file; for example,
+  (setq minibuffer-frame-plist '(top 1 left 1 width 80 height 2))
+Properties specified here supersede the values given in
+`default-frame-plist'.
+The format of this can also be an alist for backward compatibility."
+  :type 'plist
+  :group 'frames)
+
+(defcustom pop-up-frame-plist nil
+  "Plist of frame properties used when creating pop-up frames.
+Pop-up frames are used for completions, help, and the like.
+This variable can be set in your init file, like this:
+  (setq pop-up-frame-plist '(width 80 height 20))
+These supersede the values given in `default-frame-plist'.
+The format of this can also be an alist for backward compatibility."
+  :type 'plist
+  :group 'frames)
+
+(setq pop-up-frame-function
+      (function (lambda ()
+                 (make-frame pop-up-frame-plist))))
+
+(defcustom special-display-frame-plist '(height 14 width 80 unsplittable t)
+  "*Plist of frame properties used when creating special frames.
+Special frames are used for buffers whose names are in
+`special-display-buffer-names' and for buffers whose names match
+one of the regular expressions in `special-display-regexps'.
+This variable can be set in your init file, like this:
+  (setq special-display-frame-plist '(width 80 height 20))
+These supersede the values given in `default-frame-plist'.
+The format of this can also be an alist for backward compatibility."
+  :type 'plist
+  :group 'frames)
+
+(defun safe-alist-to-plist (cruftiness)
+  (if (consp (car cruftiness))
+      (alist-to-plist cruftiness)
+    cruftiness))
+
+;; Display BUFFER in its own frame, reusing an existing window if any.
+;; Return the window chosen.
+;; Currently we do not insist on selecting the window within its frame.
+;; If ARGS is a plist, use it as a list of frame property specs.
+;; #### Change, not compatible with FSF: This stuff is all so incredibly
+;; junky anyway that I doubt it makes any difference.
+;; If ARGS is a list whose car is t,
+;; use (cadr ARGS) as a function to do the work.
+;; Pass it BUFFER as first arg, and (cddr ARGS) gives the rest of the args.
+(defun special-display-popup-frame (buffer &optional args)
+  ;; if we can't display simultaneous multiple frames, just return
+  ;; nil and let the normal behavior take over.
+  (and (device-on-window-system-p)
+       (if (and args (eq t (car args)))
+          (apply (cadr args) buffer (cddr args))
+        (let ((window (get-buffer-window buffer t)))
+          (if window
+              ;; If we have a window already, make it visible.
+              (let ((frame (window-frame window)))
+                (make-frame-visible frame)
+                (raise-frame frame)
+                window)
+            ;; If no window yet, make one in a new frame.
+            (let ((frame
+                   (make-frame (append (safe-alist-to-plist args)
+                                       (safe-alist-to-plist
+                                        special-display-frame-plist)))))
+              (set-window-buffer (frame-selected-window frame) buffer)
+              (set-window-dedicated-p (frame-selected-window frame) t)
+              (frame-selected-window frame)))))))
+
+(setq special-display-function 'special-display-popup-frame)
+
+;;; Handle delete-frame events from the X server.
+;(defun handle-delete-frame (event)
+;  (interactive "e")
+;  (let ((frame (posn-window (event-start event)))
+;      (i 0)
+;      (tail (frame-list)))
+;    (while tail
+;      (and (frame-visible-p (car tail))
+;         (not (eq (car tail) frame))
+;        (setq i (1+ i)))
+;      (setq tail (cdr tail)))
+;    (if (> i 0)
+;      (delete-frame frame t)
+;      (kill-emacs))))
+
+\f
+;;;; Arrangement of frames at startup
+
+;;; 1) Load the window system startup file from the lisp library and read the
+;;; high-priority arguments (-q and the like).  The window system startup
+;;; file should create any frames specified in the window system defaults.
+;;;
+;;; 2) If no frames have been opened, we open an initial text frame.
+;;;
+;;; 3) Once the init file is done, we apply any newly set properties
+;;; in initial-frame-plist to the frame.
+
+;; These are now called explicitly at the proper times,
+;; since that is easier to understand.
+;; Actually using hooks within Emacs is bad for future maintenance. --rms.
+;; (add-hook 'before-init-hook 'frame-initialize)
+;; (add-hook 'window-setup-hook 'frame-notice-user-settings)
+
+;;; If we create the initial frame, this is it.
+(defvar frame-initial-frame nil)
+
+;; Record the properties used in frame-initialize to make the initial frame.
+(defvar frame-initial-frame-plist)
+
+(defvar frame-initial-geometry-arguments nil)
+
+(defun canonicalize-frame-plists ()
+  (setq initial-frame-plist (safe-alist-to-plist initial-frame-plist))
+  (setq default-frame-plist (safe-alist-to-plist default-frame-plist)))
+
+;;; startup.el calls this function before loading the user's init
+;;; file - if there is no frame with a minibuffer open now, create
+;;; one to display messages while loading the init file.
+(defun frame-initialize ()
+  ;; In batch mode, we actually use the initial terminal device for output.
+  (canonicalize-frame-plists)
+  (if (not (noninteractive))
+      (progn
+       ;; Don't call select-frame here - focus is a matter of WM policy.
+
+       ;; If there is no frame with a minibuffer besides the terminal
+       ;; frame, then we need to create the opening frame.  Make sure
+       ;; it has a minibuffer, but let initial-frame-plist omit the
+       ;; minibuffer spec.
+       (or (delq terminal-frame (minibuffer-frame-list))
+           (progn
+             (setq frame-initial-frame-plist
+                   (append initial-frame-plist default-frame-plist))
+             ;; FSFmacs has scroll-bar junk here that we don't need.
+             (setq default-minibuffer-frame
+                   (setq frame-initial-frame
+                         (make-frame initial-frame-plist
+                                     (car (delq terminal-device
+                                                (device-list))))))
+             ;; Delete any specifications for window geometry properties
+             ;; so that we won't reapply them in frame-notice-user-settings.
+             ;; It would be wrong to reapply them then,
+             ;; because that would override explicit user resizing.
+             (setq initial-frame-plist
+                   (frame-remove-geometry-props initial-frame-plist))))
+       ;; At this point, we know that we have a frame open, so we
+       ;; can delete the terminal device.
+       ;; (delete-device terminal-device)
+       ;; Do it the same way Fkill_emacs does it. -slb
+       (delete-console terminal-console)
+       (setq terminal-frame nil)
+
+       ;; FSFmacs sets frame-creation-function here, but no need.
+       )))
+
+;;; startup.el calls this function after loading the user's init
+;;; file.  Now default-frame-plist and initial-frame-plist contain
+;;; information to which we must react; do what needs to be done.
+(defun frame-notice-user-settings ()
+
+  ;; FSFmacs has menu-bar junk here that we don't need.
+
+  (canonicalize-frame-plists)
+
+  ;; Creating and deleting frames may shift the selected frame around,
+  ;; and thus the current buffer.  Protect against that.  We don't
+  ;; want to use save-excursion here, because that may also try to set
+  ;; the buffer of the selected window, which fails when the selected
+  ;; window is the minibuffer.
+  (let ((old-buffer (current-buffer)))
+
+    ;; If the initial frame is still around, apply initial-frame-plist
+    ;; and default-frame-plist to it.
+    (if (frame-live-p frame-initial-frame)
+
+       ;; The initial frame we create above always has a minibuffer.
+       ;; If the user wants to remove it, or make it a minibuffer-only
+       ;; frame, then we'll have to delete the selected frame and make a
+       ;; new one; you can't remove or add a root window to/from an
+       ;; existing frame.
+       ;;
+       ;; NOTE: default-frame-plist was nil when we created the
+       ;; existing frame.  We need to explicitly include
+       ;; default-frame-plist in the properties of the screen we
+       ;; create here, so that its new value, gleaned from the user's
+       ;; .emacs file, will be applied to the existing screen.
+       (if (not (eq (car
+                     (or (and (lax-plist-member
+                               initial-frame-plist 'minibuffer)
+                              (list (lax-plist-get initial-frame-plist
+                                                   'minibuffer)))
+                         (and (lax-plist-member default-frame-plist
+                                                'minibuffer)
+                              (list (lax-plist-get default-frame-plist
+                                                   'minibuffer)))
+                        '(t)))
+                    t))
+           ;; Create the new frame.
+           (let (props
+                 )
+             ;; If the frame isn't visible yet, wait till it is.
+             ;; If the user has to position the window,
+             ;; Emacs doesn't know its real position until
+             ;; the frame is seen to be visible.
+
+             (if (frame-property frame-initial-frame 'initially-unmapped)
+                 nil
+               (while (not (frame-visible-p frame-initial-frame))
+                 (sleep-for 1)))
+             (setq props (frame-properties frame-initial-frame))
+             ;; Get rid of `name' unless it was specified explicitly before.
+             (or (lax-plist-member frame-initial-frame-plist 'name)
+                 (setq props (lax-plist-remprop props 'name)))
+             (setq props (append initial-frame-plist default-frame-plist
+                                 props
+                                 nil))
+             ;; Get rid of `reverse', because that was handled
+             ;; when we first made the frame.
+             (laxputf props 'reverse nil)
+             ;; Get rid of `window-id', otherwise make-frame will
+             ;; think we're trying to setup an external widget.
+             (laxremf props 'window-id)
+             (if (lax-plist-member frame-initial-geometry-arguments 'height)
+                 (laxremf props 'height))
+             (if (lax-plist-member frame-initial-geometry-arguments 'width)
+                 (laxremf props 'width))
+             (if (lax-plist-member frame-initial-geometry-arguments 'left)
+                 (laxremf props 'left))
+             (if (lax-plist-member frame-initial-geometry-arguments 'top)
+                 (laxremf props 'top))
+
+             ;; Now create the replacement initial frame.
+             (make-frame
+              ;; Use the geometry args that created the existing
+              ;; frame, rather than the props we get for it.
+              (append '(user-size t user-position t)
+                      frame-initial-geometry-arguments
+                      props))
+             ;; The initial frame, which we are about to delete, may be
+             ;; the only frame with a minibuffer.  If it is, create a
+             ;; new one.
+             (or (delq frame-initial-frame (minibuffer-frame-list))
+                 (make-initial-minibuffer-frame nil))
+
+             ;; If the initial frame is serving as a surrogate
+             ;; minibuffer frame for any frames, we need to wean them
+             ;; onto a new frame.  The default-minibuffer-frame
+             ;; variable must be handled similarly.
+             (let ((users-of-initial
+                    (filtered-frame-list
+                     #'(lambda (frame)
+                                 (and (not (eq frame frame-initial-frame))
+                                      (eq (window-frame
+                                           (minibuffer-window frame))
+                                          frame-initial-frame))))))
+               (if (or users-of-initial
+                       (eq default-minibuffer-frame frame-initial-frame))
+
+                   ;; Choose an appropriate frame.  Prefer frames which
+                   ;; are only minibuffers.
+                   (let* ((new-surrogate
+                           (car
+                            (or (filtered-frame-list
+                                 #'(lambda (frame)
+                                     (eq 'only
+                                         (frame-property frame 'minibuffer))))
+                                (minibuffer-frame-list))))
+                          (new-minibuffer (minibuffer-window new-surrogate)))
+
+                     (if (eq default-minibuffer-frame frame-initial-frame)
+                         (setq default-minibuffer-frame new-surrogate))
+
+                     ;; Wean the frames using frame-initial-frame as
+                     ;; their minibuffer frame.
+                     (mapcar
+                      #'
+                       (lambda (frame)
+                         (set-frame-property frame 'minibuffer
+                                             new-minibuffer))
+                       users-of-initial))))
+
+             ;; Redirect events enqueued at this frame to the new frame.
+             ;; Is this a good idea?
+             ;; Probably not, since this whole redirect-frame-focus
+             ;; stuff is a load of trash, and so is this function we're in.
+             ;; --ben
+             ;(redirect-frame-focus frame-initial-frame new)
+
+             ;; Finally, get rid of the old frame.
+             (delete-frame frame-initial-frame t))
+
+         ;; Otherwise, we don't need all that rigamarole; just apply
+         ;; the new properties.
+         (let (newprops allprops tail)
+           (setq allprops (append initial-frame-plist
+                                  default-frame-plist))
+           (if (lax-plist-member frame-initial-geometry-arguments 'height)
+               (laxremf allprops 'height))
+           (if (lax-plist-member frame-initial-geometry-arguments 'width)
+               (remf allprops 'width))
+           (if (lax-plist-member frame-initial-geometry-arguments 'left)
+               (laxremf allprops 'left))
+           (if (lax-plist-member frame-initial-geometry-arguments 'top)
+               (laxremf allprops 'top))
+           (setq tail allprops)
+           ;; Find just the props that have changed since we first
+           ;; made this frame.  Those are the ones actually set by
+           ;; the init file.  For those props whose values we already knew
+           ;; (such as those spec'd by command line options)
+           ;; it is undesirable to specify the parm again
+           ;; once the user has seen the frame and been able to alter it
+           ;; manually.
+           (while tail
+             (let (newval oldval)
+               (setq oldval (lax-plist-get frame-initial-frame-plist
+                                           (car tail)))
+               (setq newval (lax-plist-get allprops (car tail)))
+               (or (eq oldval newval)
+                   (laxputf newprops (car tail) newval)))
+             (setq tail (cddr tail)))
+           (set-frame-properties frame-initial-frame newprops)
+           ;silly FSFmacs junk
+           ;if (lax-plist-member newprops 'font)
+           ;   (frame-update-faces frame-initial-frame))
+
+           )))
+
+    ;; Restore the original buffer.
+    (set-buffer old-buffer)
+
+    ;; Make sure the initial frame can be GC'd if it is ever deleted.
+    ;; Make sure frame-notice-user-settings does nothing if called twice.
+    (setq frame-initial-frame nil)))
+
+(defun make-initial-minibuffer-frame (device)
+  (let ((props (append '(minibuffer only)
+                      (safe-alist-to-plist minibuffer-frame-plist))))
+    (make-frame props device)))
+
+\f
+;;;; Creation of additional frames, and other frame miscellanea
+
+(defun get-other-frame ()
+ "Return some frame other than the selected frame, creating one if necessary."
+  (let* ((this (selected-frame))
+        ;; search visible frames first
+        (next (next-frame this 'visible-nomini)))
+    ;; then search iconified frames
+    (if (eq this next)
+       (setq next (next-frame 'visible-iconic-nomini)))
+    (if (eq this next)
+       ;; otherwise, make a new frame
+       (make-frame)
+      next)))
+
+(defun next-multiframe-window ()
+  "Select the next window, regardless of which frame it is on."
+  (interactive)
+  (select-window (next-window (selected-window)
+                             (> (minibuffer-depth) 0)
+                             t)))
+
+(defun previous-multiframe-window ()
+  "Select the previous window, regardless of which frame it is on."
+  (interactive)
+  (select-window (previous-window (selected-window)
+                                 (> (minibuffer-depth) 0)
+                                 t)))
+
+(defun make-frame-on-device (type connection &optional props)
+  "Create a frame of type TYPE on CONNECTION.
+TYPE should be a symbol naming the device type, i.e. one of
+
+x          An X display.  CONNECTION should be a standard display string
+           such as \"unix:0\", or nil for the display specified on the
+           command line or in the DISPLAY environment variable.  Only if
+           support for X was compiled into XEmacs.
+tty        A standard TTY connection or terminal.  CONNECTION should be
+           a TTY device name such as \"/dev/ttyp2\" (as determined by
+           the Unix command `tty') or nil for XEmacs' standard input
+           and output (usually the TTY in which XEmacs started).  Only
+           if support for TTY's was compiled into XEmacs.
+ns         A connection to a machine running the NeXTstep windowing
+           system.  Not currently implemented.
+mswindows   A connection to a machine running Microsoft Windows NT or
+           Windows 95/97.
+pc         A direct-write MS-DOS frame.  Not currently implemented.
+
+PROPS should be a plist of properties, as in the call to `make-frame'.
+
+If a connection to CONNECTION already exists, it is reused; otherwise,
+a new connection is opened."
+  (make-frame props (make-device type connection props)))
+
+;; Alias, kept temporarily.
+(defalias 'new-frame 'make-frame)
+
+; FSFmacs has make-frame here.  We have it in C, so no need for
+; frame-creation-function.
+
+(defun filtered-frame-list (predicate &optional device)
+  "Return a list of all live frames which satisfy PREDICATE.
+If optional second arg DEVICE is non-nil, restrict the frames
+ returned to that device."
+  (let ((frames (if device (device-frame-list device)
+                 (frame-list)))
+       good-frames)
+    (while (consp frames)
+      (if (funcall predicate (car frames))
+         (setq good-frames (cons (car frames) good-frames)))
+      (setq frames (cdr frames)))
+    good-frames))
+
+(defun minibuffer-frame-list (&optional device)
+  "Return a list of all frames with their own minibuffers.
+If optional second arg DEVICE is non-nil, restrict the frames
+ returned to that device."
+  (filtered-frame-list
+   #'(lambda (frame)
+              (eq frame (window-frame (minibuffer-window frame))))
+   device))
+
+(defun frame-minibuffer-only-p (frame)
+  "Return non-nil if FRAME is a minibuffer-only frame."
+  (eq (frame-root-window frame) (minibuffer-window frame)))
+
+(defun frame-remove-geometry-props (plist)
+  "Return the property list PLIST, but with geometry specs removed.
+This deletes all bindings in PLIST for `top', `left', `width',
+`height', `user-size' and `user-position' properties.
+Emacs uses this to avoid overriding explicit moves and resizings from
+the user during startup."
+  (setq plist (canonicalize-lax-plist (copy-sequence plist)))
+  (mapcar #'(lambda (propname)
+             (if (lax-plist-member plist propname)
+                 (progn
+                   (setq frame-initial-geometry-arguments
+                         (cons propname
+                               (cons (lax-plist-get plist propname)
+                                     frame-initial-geometry-arguments)))
+                   (setq plist (lax-plist-remprop plist propname)))))
+         '(height width top left user-size user-position))
+  plist)
+
+(defun other-frame (arg)
+  "Select the ARG'th different visible frame, and raise it.
+All frames are arranged in a cyclic order.
+This command selects the frame ARG steps away in that order.
+A negative ARG moves in the opposite order.
+
+This sets the window system focus, regardless of the value
+of `focus-follows-mouse'."
+  (interactive "p")
+  (let ((frame (selected-frame)))
+    (while (> arg 0)
+      (setq frame (next-frame frame 'visible-nomini))
+      (setq arg (1- arg)))
+    (while (< arg 0)
+      (setq frame (previous-frame frame 'visible-nomini))
+      (setq arg (1+ arg)))
+    (raise-frame frame)
+    (focus-frame frame)
+    ;this is a bad idea; you should in general never warp the
+    ;pointer unless the user asks for this.  Furthermore,
+    ;our version of `set-mouse-position' takes a window,
+    ;not a frame.
+    ;(set-mouse-position (selected-frame) (1- (frame-width)) 0)
+    ;some weird FSFmacs randomness
+    ;(if (fboundp 'unfocus-frame)
+    ;  (unfocus-frame))))
+    ))
+\f
+;; XEmacs-added utility functions
+
+(defmacro save-selected-frame (&rest body)
+  "Execute forms in BODY, then restore the selected frame.
+The value returned is the value of the last form in BODY."
+  (let ((old-frame (gensym "ssf")))
+    `(let ((,old-frame (selected-frame)))
+       (unwind-protect
+           (progn ,@body)
+         (select-frame ,old-frame)))))
+
+(defmacro with-selected-frame (frame &rest body)
+  "Execute forms in BODY with FRAME as the selected frame.
+The value returned is the value of the last form in BODY."
+  `(save-selected-frame
+     (select-frame ,frame)
+     ,@body))
+
+; this is in C in FSFmacs
+(defun frame-list ()
+  "Return a list of all frames on all devices/consoles."
+  ;; Lists are copies, so nconc is safe here.
+  (apply 'nconc (mapcar 'device-frame-list (device-list))))
+
+(defun frame-type (&optional frame)
+  "Return the type of the specified frame (e.g. `x' or `tty').
+This is equivalent to the type of the frame's device.
+Value is `tty' for a tty frame (a character-only terminal),
+`x' for a frame that is an X window,
+`ns' for a frame that is a NeXTstep window (not yet implemented),
+`mswindows' for a frame that is a Windows NT or Windows 95/97 window,
+`pc' for a frame that is a direct-write MS-DOS frame (not yet implemented),
+`stream' for a stream frame (which acts like a stdio stream), and
+`dead' for a deleted frame."
+  (or frame (setq frame (selected-frame)))
+  (if (not (frame-live-p frame)) 'dead
+    (device-type (frame-device frame))))
+
+(defun device-or-frame-p (object)
+  "Return non-nil if OBJECT is a device or frame."
+  (or (devicep object)
+      (framep object)))
+
+(defun device-or-frame-type (device-or-frame)
+  "Return the type (e.g. `x' or `tty') of DEVICE-OR-FRAME.
+DEVICE-OR-FRAME should be a device or a frame object.  See `device-type'
+for a description of the possible types."
+  (if (devicep device-or-frame)
+      (device-type device-or-frame)
+    (frame-type device-or-frame)))
+
+(defun fw-frame (obj)
+  "Given a frame or window, return the associated frame.
+Return nil otherwise."
+  (cond ((windowp obj) (window-frame obj))
+       ((framep obj) obj)
+       (t nil)))
+
+\f
+;;;; Frame configurations
+
+(defun current-frame-configuration ()
+  "Return a list describing the positions and states of all frames.
+Its car is `frame-configuration'.
+Each element of the cdr is a list of the form (FRAME PLIST WINDOW-CONFIG),
+where
+  FRAME is a frame object,
+  PLIST is a property list specifying some of FRAME's properties, and
+  WINDOW-CONFIG is a window configuration object for FRAME."
+  (cons 'frame-configuration
+       (mapcar (function
+                (lambda (frame)
+                  (list frame
+                        (frame-properties frame)
+                        (current-window-configuration frame))))
+               (frame-list))))
+
+(defun set-frame-configuration (configuration &optional nodelete)
+  "Restore the frames to the state described by CONFIGURATION.
+Each frame listed in CONFIGURATION has its position, size, window
+configuration, and other properties set as specified in CONFIGURATION.
+Ordinarily, this function deletes all existing frames not
+listed in CONFIGURATION.  But if optional second argument NODELETE
+is given and non-nil, the unwanted frames are iconified instead."
+  (or (frame-configuration-p configuration)
+      (signal 'wrong-type-argument
+             (list 'frame-configuration-p configuration)))
+  (let ((config-plist (cdr configuration))
+       frames-to-delete)
+    (mapc (lambda (frame)
+           (let ((properties (assq frame config-plist)))
+             (if properties
+                 (progn
+                   (set-frame-properties
+                    frame
+                    ;; Since we can't set a frame's minibuffer status,
+                    ;; we might as well omit the parameter altogether.
+                    (lax-plist-remprop (nth 1 properties) 'minibuffer))
+                   (set-window-configuration (nth 2 properties)))
+               (setq frames-to-delete (cons frame frames-to-delete)))))
+         (frame-list))
+    (if nodelete
+       ;; Note: making frames invisible here was tried
+       ;; but led to some strange behavior--each time the frame
+       ;; was made visible again, the window manager asked afresh
+       ;; for where to put it.
+       (mapc 'iconify-frame frames-to-delete)
+      (mapc 'delete-frame frames-to-delete))))
+
+; this function is in subr.el in FSFmacs.
+; that's because they don't always include frame.el, while we do.
+
+(defun frame-configuration-p (object)
+  "Return non-nil if OBJECT seems to be a frame configuration.
+Any list whose car is `frame-configuration' is assumed to be a frame
+configuration."
+  (and (consp object)
+       (eq (car object) 'frame-configuration)))
+
+\f
+;; FSFmacs has functions `frame-width', `frame-height' here.
+;; We have them in C.
+
+;; FSFmacs has weird functions `set-default-font', `set-background-color',
+;; `set-foreground-color' here.  They don't do sensible things like
+;; set faces; instead they set frame properties (??!!) and call
+;; useless functions such as `frame-update-faces' and
+;; `frame-update-face-colors'.
+
+;; FSFmacs has functions `set-cursor-color', `set-mouse-color', and
+;; `set-border-color', which refer to frame properties.
+;; #### We need to use specifiers here.
+
+;(defun auto-raise-mode (arg)
+;  "Toggle whether or not the selected frame should auto-raise.
+;With arg, turn auto-raise mode on if and only if arg is positive.
+;Note that this controls Emacs's own auto-raise feature.
+;Some window managers allow you to enable auto-raise for certain windows.
+;You can use that for Emacs windows if you wish, but if you do,
+;that is beyond the control of Emacs and this command has no effect on it."
+;  (interactive "P")
+;  (if (null arg)
+;      (setq arg
+;          (if (frame-property (selected-frame) 'auto-raise)
+;              -1 1)))
+;  (set-frame-property (selected-frame) 'auto-raise (> arg 0)))
+
+;(defun auto-lower-mode (arg)
+;  "Toggle whether or not the selected frame should auto-lower.
+;With arg, turn auto-lower mode on if and only if arg is positive.
+;Note that this controls Emacs's own auto-lower feature.
+;Some window managers allow you to enable auto-lower for certain windows.
+;You can use that for Emacs windows if you wish, but if you do,
+;that is beyond the control of Emacs and this command has no effect on it."
+;  (interactive "P")
+;  (if (null arg)
+;      (setq arg
+;          (if (frame-property (selected-frame) 'auto-lower)
+;              -1 1)))
+;  (set-frame-property (selected-frame) 'auto-lower (> arg 0)))
+
+;; FSFmacs has silly functions `toggle-scroll-bar',
+;; `toggle-horizontal-scrollbar'
+\f
+;;; Iconifying emacs.
+;;;
+;;; The function iconify-emacs replaces every non-iconified emacs window
+;;; with a *single* icon.  Iconified emacs windows are left alone.  When
+;;; emacs is in this globally-iconified state, de-iconifying any emacs icon
+;;; will uniconify all frames that were visible, and iconify all frames
+;;; that were not.  This is done by temporarily changing the value of
+;;; `map-frame-hook' to `deiconify-emacs' (which should never be called
+;;; except from the map-frame-hook while emacs is iconified).
+;;;
+;;; The title of the icon representing all emacs frames is controlled by
+;;; the variable `icon-name'.  This is done by temporarily changing the
+;;; value of `frame-icon-title-format'.  Unfortunately, this changes the
+;;; titles of all emacs icons, not just the "big" icon.
+;;;
+;;; It would be nice if existing icons were removed and restored by
+;;; iconifying the emacs process, but I couldn't make that work yet.
+
+(defvar icon-name nil) ; set this at run time, not load time.
+
+(defvar iconification-data nil)
+
+(defun iconify-emacs ()
+  "Replace every non-iconified FRAME with a *single* icon.
+Iconified frames are left alone.  When XEmacs is in this
+globally-iconified state, de-iconifying any emacs icon will uniconify
+all frames that were visible, and iconify all frames that were not."
+  (interactive)
+  (if iconification-data (error "already iconified?"))
+  (let* ((frames (frame-list))
+        (rest frames)
+        (me (selected-frame))
+        frame)
+    (while rest
+      (setq frame (car rest))
+      (setcar rest (cons frame (frame-visible-p frame)))
+;      (if (memq (cdr (car rest)) '(icon nil))
+;        (progn
+;          (make-frame-visible frame) ; deiconify, and process the X event
+;          (sleep-for 500 t) ; process X events; I really want to XSync() here
+;          ))
+      (or (eq frame me) (make-frame-invisible frame))
+      (setq rest (cdr rest)))
+    (or (boundp 'map-frame-hook) (setq map-frame-hook nil))
+    (or icon-name
+       (setq icon-name (concat invocation-name " @ " (system-name))))
+    (setq iconification-data
+           (list frame-icon-title-format map-frame-hook frames)
+         frame-icon-title-format icon-name
+         map-frame-hook 'deiconify-emacs)
+    (iconify-frame me)))
+
+
+(defun deiconify-emacs (&optional ignore)
+  (or iconification-data (error "not iconified?"))
+  (setq frame-icon-title-format (car iconification-data)
+       map-frame-hook (car (cdr iconification-data))
+       iconification-data (car (cdr (cdr iconification-data))))
+  (while iconification-data
+    (let ((visibility (cdr (car iconification-data))))
+      (cond (visibility  ;; JV  (Note non-nil means visible in XEmacs)
+            (make-frame-visible (car (car iconification-data))))
+;          (t ;; (eq visibility 'icon) ;; JV Not in XEmacs!!!
+;           (make-frame-visible (car (car iconification-data)))
+;           (sleep-for 500 t) ; process X events; I really want to XSync() here
+;           (iconify-frame (car (car iconification-data))))
+           ;; (t nil)
+           ))
+    (setq iconification-data (cdr iconification-data))))
+
+(defun suspend-or-iconify-emacs ()
+  "Call iconify-emacs if using a window system, otherwise call suspend-emacs."
+  (interactive)
+  (cond ((device-on-window-system-p)
+        (iconify-emacs))
+       ((and (eq (device-type) 'tty)
+             (console-tty-controlling-process (selected-console)))
+        (suspend-console (selected-console)))
+       (t
+        (suspend-emacs))))
+
+;; This is quite a mouthful, but it should be descriptive, as it's
+;; bound to C-z.  FSF takes the easy way out by binding C-z to
+;; different things depending on window-system.  We can't do the same,
+;; because we allow simultaneous X and TTY consoles.
+(defun suspend-emacs-or-iconify-frame ()
+  "Iconify the selected frame if using a window system, otherwise suspend Emacs."
+  (interactive)
+  (cond ((device-on-window-system-p)
+        (iconify-frame))
+       ((and (eq (frame-type) 'tty)
+             (console-tty-controlling-process (selected-console)))
+        (suspend-console (selected-console)))
+       (t
+        (suspend-emacs))))
+
+\f
+;;; auto-raise and auto-lower
+
+(defcustom auto-raise-frame nil
+  "*If true, frames will be raised to the top when selected.
+Under X, most ICCCM-compliant window managers will have an option to do this
+for you, but this variable is provided in case you're using a broken WM."
+  :type 'boolean
+  :group 'frames)
+
+(defcustom auto-lower-frame nil
+  "*If true, frames will be lowered to the bottom when no longer selected.
+Under X, most ICCCM-compliant window managers will have an option to do this
+for you, but this variable is provided in case you're using a broken WM."
+  :type 'boolean
+  :group 'frames)
+
+(defun default-select-frame-hook ()
+  "Implement the `auto-raise-frame' variable.
+For use as the value of `select-frame-hook'."
+  (if auto-raise-frame (raise-frame (selected-frame))))
+
+(defun default-deselect-frame-hook ()
+  "Implement the `auto-lower-frame' variable.
+For use as the value of `deselect-frame-hook'."
+  (if auto-lower-frame (lower-frame (selected-frame)))
+  (highlight-extent nil nil))
+
+(or select-frame-hook
+    (add-hook 'select-frame-hook 'default-select-frame-hook))
+
+(or deselect-frame-hook
+    (add-hook 'deselect-frame-hook 'default-deselect-frame-hook))
+
+\f
+;;; Application-specific frame-management
+
+(defcustom get-frame-for-buffer-default-frame-name nil
+  "*The default frame to select; see doc of `get-frame-for-buffer'."
+  :type 'string
+  :group 'frames)
+
+(defcustom get-frame-for-buffer-default-instance-limit nil
+  "*The default instance limit for creating new frames; 
+see doc of `get-frame-for-buffer'."
+  :type 'integer
+  :group 'frames)
+
+(defun get-frame-name-for-buffer (buffer)
+  (let ((mode (and (get-buffer buffer)
+                  (save-excursion (set-buffer buffer)
+                                  major-mode))))
+    (or (get mode 'frame-name)
+       get-frame-for-buffer-default-frame-name)))
+
+(defun get-frame-for-buffer-make-new-frame (buffer &optional frame-name plist)
+  (let* ((fr (make-frame plist))
+        (w (frame-root-window fr)))
+    ;;
+    ;; Make the one buffer being displayed in this newly created
+    ;; frame be the buffer of interest, instead of something
+    ;; random, so that it won't be shown in two-window mode.
+    ;; Avoid calling switch-to-buffer here, since that's something
+    ;; people might want to call this routine from.
+    ;;
+    ;; (If the root window doesn't have a buffer, then that means
+    ;; there is more than one window on the frame, which can only
+    ;; happen if the user has done something funny on the frame-
+    ;; creation-hook.  If that's the case, leave it alone.)
+    ;;
+    (if (window-buffer w)
+       (set-window-buffer w buffer))
+    fr))
+
+(defcustom get-frame-for-buffer-default-to-current nil
+  "*When non-nil, `get-frame-for-buffer' will default to the selected frame."
+  :type 'boolean
+  :group 'frames)
+
+(defun get-frame-for-buffer-noselect (buffer
+                                     &optional not-this-window-p on-frame)
+  "Return a frame in which to display BUFFER.
+This is a subroutine of `get-frame-for-buffer' (which see)."
+  (let (name limit)
+    (cond
+     ((or on-frame (eq (selected-window) (minibuffer-window)))
+      ;; don't switch frames if a frame was specified, or to list
+      ;; completions from the minibuffer, etc.
+      nil)
+
+     ((setq name (get-frame-name-for-buffer buffer))
+      ;;
+      ;; This buffer's mode expressed a preference for a frame of a particular
+      ;; name.  That always takes priority.
+      ;;
+      (let ((limit (get name 'instance-limit))
+           (defaults (get name 'frame-defaults))
+           (matching-frames '())
+           frames frame already-visible)
+       ;; Sort the list so that iconic frames will be found last.  They
+       ;; will be used too, but mapped frames take precedence.  And
+       ;; fully visible frames come before occluded frames.
+        ;; Hidden frames come after really visible ones
+       (setq frames
+             (sort (frame-list)
+                   #'(lambda (s1 s2)
+                       (cond ((frame-totally-visible-p s2)
+                              nil)
+                             ((not (frame-visible-p s2))
+                              (frame-visible-p s1))
+                             ((eq (frame-visible-p s2) 'hidden)
+                              (eq (frame-visible-p s1) t ))
+                             ((not (frame-totally-visible-p s2))
+                              (and (frame-visible-p s1)
+                                   (frame-totally-visible-p s1)))))))
+       ;; but the selected frame should come first, even if it's occluded,
+       ;; to minimize thrashing.
+       (setq frames (cons (selected-frame)
+                          (delq (selected-frame) frames)))
+
+       (setq name (symbol-name name))
+       (while frames
+         (setq frame (car frames))
+         (if (equal name (frame-name frame))
+             (if (get-buffer-window buffer frame)
+                 (setq already-visible frame
+                       frames nil)
+               (setq matching-frames (cons frame matching-frames))))
+         (setq frames (cdr frames)))
+       (cond (already-visible
+              already-visible)
+             ((or (null matching-frames)
+                  (eq limit 0) ; means create with reckless abandon
+                  (and limit (< (length matching-frames) limit)))
+              (get-frame-for-buffer-make-new-frame
+               buffer
+               name
+               (alist-to-plist (acons 'name name
+                                      (plist-to-alist defaults)))))
+             (t
+              ;; do not switch any of the window/buffer associations in an
+              ;; existing frame; this function only picks a frame; the
+              ;; determination of which windows on it get reused is up to
+              ;; display-buffer itself.
+;;            (or (window-dedicated-p (selected-window))
+;;                (switch-to-buffer buffer))
+              (car matching-frames)))))
+
+     ((setq limit get-frame-for-buffer-default-instance-limit)
+      ;;
+      ;; This buffer's mode did not express a preference for a frame of a
+      ;; particular name, but the user wants a new frame rather than
+      ;; reusing the existing one.
+      (let* ((defname
+              (or (plist-get default-frame-plist 'name)
+                  default-frame-name))
+            (frames
+             (sort (filtered-frame-list #'(lambda (x)
+                                            (or (frame-visible-p x)
+                                                (frame-iconified-p x))))
+                   #'(lambda (s1 s2)
+                       (cond ((and (frame-visible-p s1)
+                                   (not (frame-visible-p s2))))
+                             ((and (eq (frame-visible-p s1) t)
+                                   (eq (frame-visible-p s2) 'hidden)))
+                             ((and (frame-visible-p s2)
+                                   (not (frame-visible-p s1)))
+                              nil)
+                             ((and (equal (frame-name s1) defname)
+                                   (not (equal (frame-name s2) defname))))
+                             ((and (equal (frame-name s2) defname)
+                                   (not (equal (frame-name s1) defname)))
+                              nil)
+                             ((frame-totally-visible-p s2)
+                              nil)
+                             (t))))))
+       ;; put the selected frame last.  The user wants a new frame,
+       ;; so don't reuse the existing one unless forced to.
+       (setq frames (append (delq (selected-frame) frames) (list frames)))
+       (if (or (eq limit 0) ; means create with reckless abandon
+               (< (length frames) limit))
+           (get-frame-for-buffer-make-new-frame buffer)
+         (car frames))))
+
+     (not-this-window-p
+      (let ((w-list (windows-of-buffer buffer))
+           f w
+           (first-choice nil)
+           (second-choice (if get-frame-for-buffer-default-to-current
+                              (selected-frame)
+                            nil))
+           (last-resort nil))
+       (while (and w-list (null first-choice))
+         (setq w (car w-list)
+               f (window-frame w))
+         (cond ((eq w (selected-window)) nil)
+               ((not (frame-visible-p f))
+                (if (null last-resort)
+                    (setq last-resort f)))
+               ((eq f (selected-frame))
+                (setq first-choice f))
+               ((null second-choice)
+                (setq second-choice f)))
+         (setq w-list (cdr w-list)))
+       (or first-choice second-choice last-resort)))
+
+     (get-frame-for-buffer-default-to-current (selected-frame))
+
+     (t
+      ;;
+      ;; This buffer's mode did not express a preference for a frame of a
+      ;; particular name.  So try to find a frame already displaying this
+      ;; buffer.
+      ;;
+      (let ((w (or (get-buffer-window buffer nil)      ; check current first
+                  (get-buffer-window buffer 'visible)  ; then visible
+                  (get-buffer-window buffer 0))))      ; then iconic
+       (cond ((null w)
+              ;; It's not in any window - return nil, meaning no frame has
+              ;; preference.
+              nil)
+             (t
+              ;; Otherwise, return the frame of the buffer's window.
+              (window-frame w))))))))
+
+
+;; The pre-display-buffer-function is called for effect, so this needs to
+;; actually select the frame it wants.  Fdisplay_buffer() takes notice of
+;; changes to the selected frame.
+(defun get-frame-for-buffer (buffer &optional not-this-window-p on-frame)
+  "Select and return a frame in which to display BUFFER.
+Normally, the buffer will simply be displayed in the selected frame.
+But if the symbol naming the major-mode of the buffer has a 'frame-name
+property (which should be a symbol), then the buffer will be displayed in
+a frame of that name.  If there is no frame of that name, then one is
+created.
+
+If the major-mode doesn't have a 'frame-name property, then the frame
+named by `get-frame-for-buffer-default-frame-name' will be used.  If
+that is nil (the default) then the currently selected frame will used.
+
+If the frame-name symbol has an 'instance-limit property (an integer)
+then each time a buffer of the mode in question is displayed, a new frame
+with that name will be created, until there are `instance-limit' of them.
+If instance-limit is 0, then a new frame will be created each time.
+
+If a buffer is already displayed in a frame, then `instance-limit' is
+ignored, and that frame is used.
+
+If the frame-name symbol has a 'frame-defaults property, then that is
+prepended to the `default-frame-plist' when creating a frame for the
+first time.
+
+This function may be used as the value of `pre-display-buffer-function',
+to cause the display-buffer function and its callers to exhibit the above
+behavior."
+  (let ((frame (get-frame-for-buffer-noselect
+               buffer not-this-window-p on-frame)))
+    (if (not (eq frame (selected-frame)))
+       frame
+      (select-frame frame)
+      (or (frame-visible-p frame)
+         ;; If the frame was already visible, just focus on it.
+         ;; If it wasn't visible (it was just created, or it used
+         ;; to be iconified) then uniconify, raise, etc.
+         (make-frame-visible frame))
+      frame)))
+
+(defun frames-of-buffer (&optional buffer visible-only)
+  "Return list of frames that BUFFER is currently being displayed on.
+If the buffer is being displayed on the currently selected frame, that frame
+is first in the list.  VISIBLE-ONLY will only list non-iconified frames."
+  (let ((list (windows-of-buffer buffer))
+       (cur-frame (selected-frame))
+       next-frame frames save-frame)
+
+    (while list
+      (if (memq (setq next-frame (window-frame (car list)))
+               frames)
+         nil
+       (if (eq cur-frame next-frame)
+           (setq save-frame next-frame)
+         (and
+          (or (not visible-only)
+              (frame-visible-p next-frame))
+          (setq frames (append frames (list next-frame))))))
+       (setq list (cdr list)))
+
+    (if save-frame
+       (append (list save-frame) frames)
+      frames)))
+
+(defcustom temp-buffer-shrink-to-fit nil
+  "*When non-nil resize temporary output buffers to minimize blank lines."
+  :type 'boolean
+  :group 'frames)
+
+(defcustom temp-buffer-max-height .5
+  "*Proportion of frame to use for temp windows."
+  :type 'number
+  :group 'frames)
+
+(defun show-temp-buffer-in-current-frame (buffer)
+  "For use as the value of temp-buffer-show-function:
+always displays the buffer in the selected frame, regardless of the behavior
+that would otherwise be introduced by the `pre-display-buffer-function', which
+is normally set to `get-frame-for-buffer' (which see)."
+  (let ((pre-display-buffer-function nil)) ; turn it off, whatever it is
+    (let ((window (display-buffer buffer)))
+      (if (not (eq (last-nonminibuf-frame) (window-frame window)))
+         ;; only the pre-display-buffer-function should ever do this.
+         (error "display-buffer switched frames on its own!!"))
+      (setq minibuffer-scroll-window window)
+      (set-window-start window 1) ; obeys narrowing
+      (set-window-point window 1)
+      (when temp-buffer-shrink-to-fit
+        (let* ((temp-window-size (round (* temp-buffer-max-height
+                                           (frame-height (window-frame window)))))
+               (size (window-displayed-height window)))
+          (when (< size temp-window-size)
+            (enlarge-window (- temp-window-size size) nil window)))
+        (shrink-window-if-larger-than-buffer window))
+      nil)))
+
+(setq pre-display-buffer-function 'get-frame-for-buffer)
+(setq temp-buffer-show-function 'show-temp-buffer-in-current-frame)
+
+\f
+;; from Bob Weiner <bweiner@pts.mot.com>, modified by Ben Wing
+(defun delete-other-frames (&optional frame)
+  "Delete all but FRAME (or the selected frame)."
+  (interactive)
+  (mapc 'delete-frame (delq (or frame (selected-frame)) (frame-list))))
+
+;; By adding primitives to directly access the window hierarchy,
+;; we can move many functions into Lisp.  We do it this way
+;; because the implementations are simpler in Lisp, and because
+;; new functions like this can be added without requiring C
+;; additions.
+
+(defun frame-utmost-window-2 (window position left-right-p major-end-p
+                                    minor-end-p)
+  ;; LEFT-RIGHT-P means we're looking for the leftmost or rightmost
+  ;; window, instead of the highest or lowest.  In this case, we
+  ;; say that the "major axis" goes left-to-right instead of top-to-
+  ;; bottom.  The "minor axis" always goes perpendicularly.
+  ;;
+  ;; If MAJOR-END-P is t, we're looking for a windows that abut the
+  ;; end (i.e. right or bottom) of the major axis, instead of the
+  ;; start.
+  ;;
+  ;; If MINOR-END-P is t, then we want to start counting from the
+  ;; end of the minor axis instead of the beginning.
+  ;;
+  ;; Here's the general idea: Imagine we're trying to count the number
+  ;; of windows that abut the top; call this function foo().  So, we
+  ;; start with the root window.  If this is a vertical combination
+  ;; window, then foo() applied to the root window is the same as
+  ;; foo() applied to the first child.  If the root is a horizontal
+  ;; combination window, then foo() applied to the root is the
+  ;; same as the sum of foo() applied to each of the children.
+  ;; Otherwise, the root window is a leaf window, and foo() is 1.
+  ;; Now it's clear that, each time foo() encounters a leaf window,
+  ;; it's encountering a different window that abuts the top.
+  ;; With a little examining, you can see that foo encounters the
+  ;; top-abutting windows in order from left to right.  We can
+  ;; modify foo() to return the nth top-abutting window by simply
+  ;; keeping a global variable that is decremented each time
+  ;; foo() encounters a leaf window and would return 1.  If the
+  ;; global counter gets to zero, we've encountered the window
+  ;; we were looking for, so we exit right away using a `throw'.
+  ;; Otherwise, we make sure that all normal paths return nil.
+
+  (let (child)
+    (cond ((setq child (if left-right-p
+                          (window-first-hchild window)
+                        (window-first-vchild window)))
+          (if major-end-p
+              (while (window-next-child child)
+                (setq child (window-next-child child))))
+          (frame-utmost-window-2 child position left-right-p major-end-p
+                                 minor-end-p))
+         ((setq child (if left-right-p
+                          (window-first-vchild window)
+                        (window-first-hchild window)))
+          (if minor-end-p
+              (while (window-next-child child)
+                (setq child (window-next-child child))))
+          (while child
+            (frame-utmost-window-2 child position left-right-p major-end-p
+                                   minor-end-p)
+            (setq child (if minor-end-p
+                            (window-previous-child child)
+                          (window-next-child child))))
+          nil)
+         (t
+          (setcar position (1- (car position)))
+          (if (= (car position) 0)
+              (throw 'fhw-exit window)
+            nil)))))
+
+(defun frame-utmost-window-1 (frame position left-right-p major-end-p)
+  (let (minor-end-p)
+    (or frame (setq frame (selected-frame)))
+    (or position (setq position 0))
+    (if (>= position 0)
+       (setq position (1+ position))
+      (setq minor-end-p t)
+      (setq position (- position)))
+    (catch 'fhw-exit
+      ;; we use a cons here as a simple form of call-by-reference.
+      ;; scheme has "boxes" for the same purpose.
+      (frame-utmost-window-2 (frame-root-window frame) (list position)
+                            left-right-p major-end-p minor-end-p))))
+
+
+(defun frame-highest-window (&optional frame position)
+  "Return the highest window on FRAME which is at POSITION.
+If omitted, FRAME defaults to the currently selected frame.
+POSITION is used to distinguish between multiple windows that abut
+ the top of the frame: 0 means the leftmost window abutting the
+ top of the frame, 1 the next-leftmost, etc.  POSITION can also
+ be less than zero: -1 means the rightmost window abutting the
+ top of the frame, -2 the next-rightmost, etc.
+If omitted, POSITION defaults to 0, i.e. the leftmost highest window.
+If there is no window at the given POSITION, return nil."
+  (frame-utmost-window-1 frame position nil nil))
+
+(defun frame-lowest-window (&optional frame position)
+  "Return the lowest window on FRAME which is at POSITION.
+If omitted, FRAME defaults to the currently selected frame.
+POSITION is used to distinguish between multiple windows that abut
+ the bottom of the frame: 0 means the leftmost window abutting the
+ bottom of the frame, 1 the next-leftmost, etc.  POSITION can also
+ be less than zero: -1 means the rightmost window abutting the
+ bottom of the frame, -2 the next-rightmost, etc.
+If omitted, POSITION defaults to 0, i.e. the leftmost lowest window.
+If there is no window at the given POSITION, return nil."
+  (frame-utmost-window-1 frame position nil t))
+
+(defun frame-leftmost-window (&optional frame position)
+  "Return the leftmost window on FRAME which is at POSITION.
+If omitted, FRAME defaults to the currently selected frame.
+POSITION is used to distinguish between multiple windows that abut
+ the left edge of the frame: 0 means the highest window abutting the
+ left edge of the frame, 1 the next-highest, etc.  POSITION can also
+ be less than zero: -1 means the lowest window abutting the
+ left edge of the frame, -2 the next-lowest, etc.
+If omitted, POSITION defaults to 0, i.e. the highest leftmost window.
+If there is no window at the given POSITION, return nil."
+  (frame-utmost-window-1 frame position t nil))
+
+(defun frame-rightmost-window (&optional frame position)
+  "Return the rightmost window on FRAME which is at POSITION.
+If omitted, FRAME defaults to the currently selected frame.
+POSITION is used to distinguish between multiple windows that abut
+ the right edge of the frame: 0 means the highest window abutting the
+ right edge of the frame, 1 the next-highest, etc.  POSITION can also
+ be less than zero: -1 means the lowest window abutting the
+ right edge of the frame, -2 the next-lowest, etc.
+If omitted, POSITION defaults to 0, i.e. the highest rightmost window.
+If there is no window at the given POSITION, return nil."
+  (frame-utmost-window-1 frame position t t))
+
+\f
+
+;; frame properties.
+
+(defun set-frame-property (frame prop val)
+  "Set property PROP of FRAME to VAL.  See `set-frame-properties'."
+  (set-frame-properties frame (list prop val)))
+
+(defun frame-height (&optional frame)
+  "Return number of lines available for display on FRAME."
+  (frame-property frame 'height))
+
+(defun frame-width (&optional frame)
+  "Return number of columns available for display on FRAME."
+  (frame-property frame 'width))
+
+(put 'cursor-color 'frame-property-alias [text-cursor background])
+(put 'modeline 'frame-property-alias 'has-modeline-p)
+
+\f
+(provide 'frame)
+
+;;; frame.el ends here
diff --git a/lisp/glyphs.el b/lisp/glyphs.el
new file mode 100644 (file)
index 0000000..6594006
--- /dev/null
@@ -0,0 +1,695 @@
+;;; glyphs.el --- Lisp interface to C glyphs
+
+;; Copyright (C) 1994, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1995, 1996 Ben Wing.
+
+;; Author: Chuck Thompson <cthomp@cs.uiuc.edu>, Ben Wing <ben@xemacs.org>
+;; Maintainer: XEmacs Development Team
+;; Keywords: extensions, internal, dumped
+
+;; 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; see the file COPYING.  If not, write to the
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not in FSF.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;;; Code:
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; font specifiers
+
+(defun make-image-specifier (spec-list)
+  "Return a new `image' specifier object with the specification list SPEC-LIST.
+SPEC-LIST can be a list of specifications (each of which is a cons of a
+locale and a list of instantiators), a single instantiator, or a list
+of instantiators.  See `make-specifier' for more information about
+specifiers."
+  (make-specifier-and-init 'image spec-list))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; glyphs
+
+(defconst built-in-glyph-specifiers
+  '(image contrib-p baseline)
+  "A list of the built-in face properties that are specifiers.")
+
+(defun glyph-property (glyph property &optional locale)
+  "Return GLYPH's value of PROPERTY in LOCALE.
+
+If LOCALE is omitted, the GLYPH's actual value for PROPERTY will be
+  returned.  For built-in properties, this will be a specifier object
+  of a type appropriate to the property (e.g. a font or color
+  specifier).  For other properties, this could be anything.
+
+If LOCALE is supplied, then instead of returning the actual value,
+  the specification(s) for the given locale or locale type will
+  be returned.  This will only work if the actual value of
+  PROPERTY is a specifier (this will always be the case for built-in
+  properties, but not or not may apply to user-defined properties).
+  If the actual value of PROPERTY is not a specifier, this value
+  will simply be returned regardless of LOCALE.
+
+The return value will be a list of instantiators (e.g. strings
+  specifying a font or color name), or a list of specifications, each
+  of which is a cons of a locale and a list of instantiators.
+  Specifically, if LOCALE is a particular locale (a buffer, window,
+  frame, device, or 'global), a list of instantiators for that locale
+  will be returned.  Otherwise, if LOCALE is a locale type (one of
+  the symbols 'buffer, 'window, 'frame, 'device, 'device-class, or
+  'device-type), the specifications for all locales of that type will
+  be returned.  Finally, if LOCALE is 'all, the specifications for all
+  locales of all types will be returned.
+
+The specifications in a specifier determine what the value of
+  PROPERTY will be in a particular \"domain\" or set of circumstances,
+  which is typically a particular Emacs window along with the buffer
+  it contains and the frame and device it lies within.  The value
+  is derived from the instantiator associated with the most specific
+  locale (in the order buffer, window, frame, device, and 'global)
+  that matches the domain in question.  In other words, given a domain
+  (i.e. an Emacs window, usually), the specifier for PROPERTY will first
+  be searched for a specification whose locale is the buffer contained
+  within that window; then for a specification whose locale is the window
+  itself; then for a specification whose locale is the frame that the
+  window is contained within; etc.  The first instantiator that is
+  valid for the domain (usually this means that the instantiator is
+  recognized by the device [i.e. the X server or TTY device] that the
+  domain is on.  The function `glyph-property-instance' actually does
+  all this, and is used to determine how to display the glyph.
+
+See `set-glyph-property' for the built-in property-names."
+  (check-argument-type 'glyphp glyph)
+  (let ((value (get glyph property)))
+    (if (and locale
+            (or (memq property built-in-glyph-specifiers)
+                (specifierp value)))
+       (setq value (specifier-specs value locale)))
+    value))
+
+(defun convert-glyph-property-into-specifier (glyph property)
+  "Convert PROPERTY on GLYPH into a specifier, if it's not already."
+  (check-argument-type 'glyphp glyph)
+  (let ((specifier (get glyph property)))
+    ;; if a user-property does not have a specifier but a
+    ;; locale was specified, put a specifier there.
+    ;; If there was already a value there, convert it to a
+    ;; specifier with the value as its 'global instantiator.
+    (if (not (specifierp specifier))
+       (let ((new-specifier (make-specifier 'generic)))
+         (if (or (not (null specifier))
+                 ;; make sure the nil returned from `get' wasn't
+                 ;; actually the value of the property
+                 (null (get glyph property t)))
+             (add-spec-to-specifier new-specifier specifier))
+         (setq specifier new-specifier)
+         (put glyph property specifier)))))
+
+(defun glyph-property-instance (glyph property
+                                     &optional domain default no-fallback)
+  "Return the instance of GLYPH's PROPERTY in the specified DOMAIN.
+
+Under most circumstances, DOMAIN will be a particular window,
+  and the returned instance describes how the specified property
+  actually is displayed for that window and the particular buffer
+  in it.  Note that this may not be the same as how the property
+  appears when the buffer is displayed in a different window or
+  frame, or how the property appears in the same window if you
+  switch to another buffer in that window; and in those cases,
+  the returned instance would be different.
+
+DOMAIN defaults to the selected window if omitted.
+
+DOMAIN can be a frame or device, instead of a window.  The value
+  returned for a such a domain is used in special circumstances
+  when a more specific domain does not apply; for example, a frame
+  value might be used for coloring a toolbar, which is conceptually
+  attached to a frame rather than a particular window.  The value
+  is also useful in determining what the value would be for a
+  particular window within the frame or device, if it is not
+  overridden by a more specific specification.
+
+If PROPERTY does not name a built-in property, its value will
+  simply be returned unless it is a specifier object, in which case
+  it will be instanced using `specifier-instance'.
+
+Optional arguments DEFAULT and NO-FALLBACK are the same as in
+  `specifier-instance'."
+  (check-argument-type 'glyphp glyph)
+  (let ((value (get glyph property)))
+    (if (specifierp value)
+       (setq value (specifier-instance value domain default no-fallback)))
+    value))
+
+(defun set-glyph-property (glyph property value &optional locale tag-set
+                                how-to-add)
+  "Change a property of a GLYPH.
+
+NOTE: If you want to remove a property from a glyph, use
+  `remove-glyph-property' rather than attempting to set a value of nil
+   for the property.
+
+For built-in properties, the actual value of the property is a
+  specifier and you cannot change this; but you can change the
+  specifications within the specifier, and that is what this function
+  will do.  For user-defined properties, you can use this function
+  to either change the actual value of the property or, if this value
+  is a specifier, change the specifications within it.
+
+If PROPERTY is a built-in property, the specifications to be added to
+  this property can be supplied in many different ways:
+
+  -- If VALUE is a simple instantiator (e.g. a string naming a font or
+     color) or a list of instantiators, then the instantiator(s) will
+     be added as a specification of the property for the given LOCALE
+     (which defaults to 'global if omitted).
+  -- If VALUE is a list of specifications (each of which is a cons of
+     a locale and a list of instantiators), then LOCALE must be nil
+     (it does not make sense to explicitly specify a locale in this
+     case), and specifications will be added as given.
+  -- If VALUE is a specifier (as would be returned by `glyph-property'
+     if no LOCALE argument is given), then some or all of the
+     specifications in the specifier will be added to the property.
+     In this case, the function is really equivalent to
+     `copy-specifier' and LOCALE has the same semantics (if it is
+     a particular locale, the specification for the locale will be
+     copied; if a locale type, specifications for all locales of
+     that type will be copied; if nil or 'all, then all
+     specifications will be copied).
+
+HOW-TO-ADD should be either nil or one of the symbols 'prepend,
+  'append, 'remove-tag-set-prepend, 'remove-tag-set-append, 'remove-locale,
+  'remove-locale-type, or 'remove-all.  See `copy-specifier' and
+  `add-spec-to-specifier' for a description of what each of
+  these means.  Most of the time, you do not need to worry about
+  this argument; the default behavior usually is fine.
+
+In general, it is OK to pass an instance object (e.g. as returned
+  by `glyph-property-instance') as an instantiator in place of
+  an actual instantiator.  In such a case, the instantiator used
+  to create that instance object will be used (for example, if
+  you set a font-instance object as the value of the 'font
+  property, then the font name used to create that object will
+  be used instead).  If some cases, however, doing this
+  conversion does not make sense, and this will be noted in
+  the documentation for particular types of instance objects.
+
+If PROPERTY is not a built-in property, then this function will
+  simply set its value if LOCALE is nil.  However, if LOCALE is
+  given, then this function will attempt to add VALUE as the
+  instantiator for the given LOCALE, using `add-spec-to-specifier'.
+  If the value of the property is not a specifier, it will
+  automatically be converted into a 'generic specifier.
+
+
+The following symbols have predefined meanings:
+
+ image         The image used to display the glyph.
+
+ baseline      Percent above baseline that glyph is to be
+               displayed.
+
+ contrib-p     Whether the glyph contributes to the
+               height of the line it's on.
+
+ face          Face of this glyph (*not* a specifier)."
+  (check-argument-type 'glyphp glyph)
+  (if (memq property built-in-glyph-specifiers)
+      (set-specifier (get glyph property) value locale tag-set how-to-add)
+
+    ;; This section adds user defined properties.
+    (if (not locale)
+       (put glyph property value)
+      (convert-glyph-property-into-specifier glyph property)
+      (add-spec-to-specifier (get glyph property) value locale tag-set
+                            how-to-add)))
+  value)
+
+(defun remove-glyph-property (glyph property &optional locale tag-set exact-p)
+  "Remove a property from a glyph.
+For built-in properties, this is analogous to `remove-specifier'.
+See `remove-specifier' for the meaning of the LOCALE, TAG-SET, and EXACT-P
+  arguments."
+  (or locale (setq locale 'all))
+  (if (memq property built-in-glyph-specifiers)
+      (remove-specifier (glyph-property glyph property) locale tag-set exact-p)
+    (if (eq locale 'all)
+       (remprop glyph property)
+      (convert-glyph-property-into-specifier glyph property)
+      (remove-specifier (glyph-property glyph property) locale tag-set
+                       exact-p))))
+
+(defun glyph-face (glyph)
+  "Return the face of GLYPH."
+  (glyph-property glyph 'face))
+
+(defun set-glyph-face (glyph face)
+  "Change the face of GLYPH to FACE."
+;  (interactive (glyph-interactive "face"))
+  (set-glyph-property glyph 'face face))
+
+(defun glyph-image (glyph &optional locale)
+  "Return the image of GLYPH in LOCALE, or nil if it is unspecified.
+
+LOCALE may be a locale (the instantiators for that particular locale
+  will be returned), a locale type (the specifications for all locales
+  of that type will be returned), 'all (all specifications will be
+  returned), or nil (the actual specifier object will be returned).
+
+See `glyph-property' for more information."
+  (glyph-property glyph 'image locale))
+
+(defun glyph-image-instance (glyph &optional domain default no-fallback)
+  "Return the instance of GLYPH's image in DOMAIN.
+
+Normally DOMAIN will be a window or nil (meaning the selected window),
+  and an instance object describing how the image appears in that
+  particular window and buffer will be returned.
+
+See `glyph-property-instance' for more information."
+  (glyph-property-instance glyph 'image domain default no-fallback))
+
+(defun set-glyph-image (glyph spec &optional locale tag-set how-to-add)
+  "Change the image of GLYPH in LOCALE.
+
+SPEC should be an instantiator (a string or vector; see
+  `image-specifier-p' for a description of possible values here),
+  a list of (possibly tagged) instantiators, an alist of specifications
+  (each mapping a locale to an instantiator list), or an image specifier
+  object.
+
+If SPEC is an alist, LOCALE must be omitted.  If SPEC is a
+  specifier object, LOCALE can be a locale, a locale type, 'all,
+  or nil; see `copy-specifier' for its semantics.  Otherwise LOCALE
+  specifies the locale under which the specified instantiator(s)
+  will be added, and defaults to 'global.
+
+See `set-glyph-property' for more information."
+  ; (interactive (glyph-interactive "image"))
+  (set-glyph-property glyph 'image spec locale tag-set how-to-add))
+
+(defun glyph-contrib-p (glyph &optional locale)
+  "Return whether GLYPH contributes to its line height.
+
+LOCALE may be a locale (the instantiators for that particular locale
+  will be returned), a locale type (the specifications for all locales
+  of that type will be returned), 'all (all specifications will be
+  returned), or nil (the actual specifier object will be returned).
+
+See `glyph-property' for more information."
+  (glyph-property glyph 'contrib-p locale))
+
+(defun glyph-contrib-p-instance (glyph &optional domain default no-fallback)
+  "Return the instance of GLYPH's 'contrib-p property in DOMAIN.
+
+Normally DOMAIN will be a window or nil (meaning the selected window),
+  and an instance object describing what the 'contrib-p property is in
+  that particular window and buffer will be returned.
+
+See `glyph-property-instance' for more information."
+  (glyph-property-instance glyph 'contrib-p domain default no-fallback))
+
+(defun set-glyph-contrib-p (glyph spec &optional locale tag-set how-to-add)
+  "Change the contrib-p property of GLYPH in LOCALE.
+
+SPEC should be an instantiator (t or nil), a list of (possibly
+  tagged) instantiators, an alist of specifications (each mapping a
+  locale to an instantiator list), or a boolean specifier object.
+
+If SPEC is an alist, LOCALE must be omitted.  If SPEC is a
+  specifier object, LOCALE can be a locale, a locale type, 'all,
+  or nil; see `copy-specifier' for its semantics.  Otherwise LOCALE
+  specifies the locale under which the specified instantiator(s)
+  will be added, and defaults to 'global.
+
+See `set-glyph-property' for more information."
+  ; (interactive (glyph-interactive "contrib-p"))
+  (set-glyph-property glyph 'contrib-p spec locale tag-set how-to-add))
+
+(defun glyph-baseline (glyph &optional locale)
+  "Return the baseline of GLYPH in LOCALE, or nil if it is unspecified.
+
+LOCALE may be a locale (the instantiators for that particular locale
+  will be returned), a locale type (the specifications for all locales
+  of that type will be returned), 'all (all specifications will be
+  returned), or nil (the actual specifier object will be returned).
+
+See `glyph-property' for more information."
+  (glyph-property glyph 'baseline locale))
+
+(defun glyph-baseline-instance (glyph &optional domain default no-fallback)
+  "Return the instance of GLYPH's baseline in DOMAIN.
+
+Normally DOMAIN will be a window or nil (meaning the selected window),
+  and an integer or nil (specifying the baseline in that particular
+  window and buffer) will be returned.
+
+See `glyph-property-instance' for more information."
+  (glyph-property-instance glyph 'baseline domain default no-fallback))
+
+(defun set-glyph-baseline (glyph spec &optional locale tag-set how-to-add)
+  "Change the baseline of GLYPH to SPEC in LOCALE.
+
+SPEC should be an instantiator (an integer [a percentage above the
+  baseline of the line the glyph is on] or nil), a list of (possibly
+  tagged) instantiators, an alist of specifications (each mapping a
+  locale to an instantiator list), or a generic specifier object.
+
+If SPEC is an alist, LOCALE must be omitted.  If SPEC is a
+  specifier object, LOCALE can be a locale, a locale type, 'all,
+  or nil; see `copy-specifier' for its semantics.  Otherwise LOCALE
+  specifies the locale under which the specified instantiator(s)
+  will be added, and defaults to 'global.
+
+See `set-glyph-property' for more information."
+  ; (interactive (glyph-interactive "baseline"))
+  (set-glyph-property glyph 'baseline spec locale tag-set how-to-add))
+
+(defun make-glyph (&optional spec-list type)
+  "Return a new `glyph' object of type TYPE.
+
+TYPE should be one of `buffer' (used for glyphs in an extent, the modeline,
+the toolbar, or elsewhere in a buffer), `pointer' (used for the mouse-pointer),
+or `icon' (used for a frame's icon), and defaults to `buffer'.
+
+SPEC-LIST is used to initialize the glyph's image.  It is typically an
+image instantiator (a string or a vector; see `image-specifier-p' for
+a detailed description of the valid image instantiators), but can also
+be a list of such instantiators (each one in turn is tried until an
+image is successfully produced), a cons of a locale (frame, buffer, etc.)
+and an instantiator, a list of such conses, or any other form accepted
+by `canonicalize-spec-list'.  See `make-specifier' for more information
+about specifiers."
+  (let ((glyph (make-glyph-internal type)))
+    (and spec-list (set-glyph-image glyph spec-list))
+    glyph))
+
+(defun buffer-glyph-p (object)
+  "Return t if OBJECT is a glyph of type `buffer'."
+  (and (glyphp object) (eq 'buffer (glyph-type object))))
+
+(defun pointer-glyph-p (object)
+  "Return t if OBJECT is a glyph of type `pointer'."
+  (and (glyphp object) (eq 'pointer (glyph-type object))))
+
+(defun icon-glyph-p (object)
+  "Return t if OBJECT is a glyph of type `icon'."
+  (and (glyphp object) (eq 'icon (glyph-type object))))
+
+(defun make-pointer-glyph (&optional spec-list)
+  "Return a new `pointer-glyph' object with the specification list SPEC-LIST.
+
+This is equivalent to calling `make-glyph', specifying a type of `pointer'.
+
+SPEC-LIST is used to initialize the glyph's image.  It is typically an
+image instantiator (a string or a vector; see `image-specifier-p' for
+a detailed description of the valid image instantiators), but can also
+be a list of such instantiators (each one in turn is tried until an
+image is successfully produced), a cons of a locale (frame, buffer, etc.)
+and an instantiator, a list of such conses, or any other form accepted
+by `canonicalize-spec-list'.  See `make-specifier' for more information
+about specifiers.
+
+You can also create a glyph with an empty SPEC-LIST and add image
+instantiators afterwards using `set-glyph-image'."
+  (make-glyph spec-list 'pointer))
+
+(defun make-icon-glyph (&optional spec-list)
+  "Return a new `icon-glyph' object with the specification list SPEC-LIST.
+
+This is equivalent to calling `make-glyph', specifying a type of `icon'.
+
+SPEC-LIST is used to initialize the glyph's image.  It is typically an
+image instantiator (a string or a vector; see `image-specifier-p' for
+a detailed description of the valid image instantiators), but can also
+be a list of such instantiators (each one in turn is tried until an
+image is successfully produced), a cons of a locale (frame, buffer, etc.)
+and an instantiator, a list of such conses, or any other form accepted
+by `canonicalize-spec-list'.  See `make-specifier' for more information
+about specifiers.
+
+You can also create a glyph with an empty SPEC-LIST and add image
+instantiators afterwards using `set-glyph-image'."
+  (make-glyph spec-list 'icon))
+
+(defun nothing-image-instance-p (object)
+  "Return t if OBJECT is an image instance of type `nothing'."
+  (and (image-instance-p object) (eq 'nothing (image-instance-type object))))
+
+(defun text-image-instance-p (object)
+  "Return t if OBJECT is an image instance of type `text'."
+  (and (image-instance-p object) (eq 'text (image-instance-type object))))
+
+(defun mono-pixmap-image-instance-p (object)
+  "Return t if OBJECT is an image instance of type `mono-pixmap'."
+  (and (image-instance-p object) (eq 'mono-pixmap
+                                    (image-instance-type object))))
+
+(defun color-pixmap-image-instance-p (object)
+  "Return t if OBJECT is an image instance of type `color-pixmap'."
+  (and (image-instance-p object) (eq 'color-pixmap
+                                    (image-instance-type object))))
+
+(defun pointer-image-instance-p (object)
+  "Return t if OBJECT is an image instance of type `pointer'."
+  (and (image-instance-p object) (eq 'pointer (image-instance-type object))))
+
+(defun subwindow-image-instance-p (object)
+  "Return t if OBJECT is an image instance of type `subwindow'.
+Subwindows are not implemented in this version of XEmacs."
+  (and (image-instance-p object) (eq 'subwindow (image-instance-type object))))
+
+;;;;;;;;;; the built-in glyphs
+
+(defvar text-pointer-glyph (make-pointer-glyph)
+  "*The shape of the mouse-pointer when over text.
+This is a glyph; use `set-glyph-image' to change it.")
+(set-glyph-face text-pointer-glyph 'pointer)
+
+(defvar nontext-pointer-glyph (make-pointer-glyph)
+  "*The shape of the mouse-pointer when over a buffer, but not over text.
+This is a glyph; use `set-glyph-image' to change it.
+If unspecified in a particular domain, `text-pointer-glyph' is used.")
+(set-glyph-face nontext-pointer-glyph 'pointer)
+
+(defvar modeline-pointer-glyph (make-pointer-glyph)
+  "*The shape of the mouse-pointer when over the modeline.
+This is a glyph; use `set-glyph-image' to change it.
+If unspecified in a particular domain, `nontext-pointer-glyph' is used.")
+(set-glyph-face modeline-pointer-glyph 'pointer)
+
+(defvar selection-pointer-glyph (make-pointer-glyph)
+  "*The shape of the mouse-pointer when over a selectable text region.
+This is a glyph; use `set-glyph-image' to change it.
+If unspecified in a particular domain, `text-pointer-glyph' is used.")
+(set-glyph-face selection-pointer-glyph 'pointer)
+
+(defvar busy-pointer-glyph (make-pointer-glyph)
+  "*The shape of the mouse-pointer when XEmacs is busy.
+This is a glyph; use `set-glyph-image' to change it.
+If unspecified in a particular domain, the pointer is not changed
+when XEmacs is busy.")
+(set-glyph-face busy-pointer-glyph 'pointer)
+
+(defvar toolbar-pointer-glyph (make-pointer-glyph)
+  "*The shape of the mouse-pointer when over a toolbar.
+This is a glyph; use `set-glyph-image' to change it.
+If unspecified in a particular domain, `nontext-pointer-glyph' is used.")
+(set-glyph-face toolbar-pointer-glyph 'pointer)
+
+(defvar divider-pointer-glyph (make-pointer-glyph)
+  "*The shape of the mouse-pointer when over a window divider.
+This is a glyph; use `set-glyph-image' to change it.
+If unspecified in a particular domain, `nontext-pointer-glyph' is used.")
+(set-glyph-face divider-pointer-glyph 'pointer)
+
+;; The following three are in C.
+(if (featurep 'menubar)
+    (set-glyph-face menubar-pointer-glyph 'pointer))
+(if (featurep 'scrollbar)
+    (set-glyph-face scrollbar-pointer-glyph 'pointer))
+(set-glyph-face gc-pointer-glyph 'pointer)
+
+;; Now add the magic access/set behavior.
+
+(defun dontusethis-set-value-glyph-handler (sym args fun harg handler)
+  (error "Use `set-glyph-image' to set `%s'" sym))
+(defun dontusethis-make-unbound-glyph-handler (sym args fun harg handler)
+  (error "Can't `makunbound' `%s'" sym))
+(defun dontusethis-make-local-glyph-handler (sym args fun harg handler)
+  (error "Use `set-glyph-image' to make local values for `%s'" sym))
+
+(defun define-constant-glyph (sym)
+  (dontusethis-set-symbol-value-handler
+   sym 'set-value
+   'dontusethis-set-value-glyph-handler)
+  (dontusethis-set-symbol-value-handler
+   sym 'make-unbound
+   'dontusethis-make-unbound-glyph-handler)
+  (dontusethis-set-symbol-value-handler
+   sym 'make-local
+   'dontusethis-make-local-glyph-handler)
+  ;; Make frame properties magically work with glyph variables.
+  (put sym 'const-glyph-variable t))
+
+(define-constant-glyph 'text-pointer-glyph)
+(define-constant-glyph 'nontext-pointer-glyph)
+(define-constant-glyph 'modeline-pointer-glyph)
+(define-constant-glyph 'selection-pointer-glyph)
+(define-constant-glyph 'busy-pointer-glyph)
+(define-constant-glyph 'gc-pointer-glyph)
+(define-constant-glyph 'divider-pointer-glyph)
+(define-constant-glyph 'toolbar-pointer-glyph)
+(define-constant-glyph 'menubar-pointer-glyph)
+(define-constant-glyph 'scrollbar-pointer-glyph)
+
+(define-constant-glyph 'octal-escape-glyph)
+(define-constant-glyph 'control-arrow-glyph)
+(define-constant-glyph 'invisible-text-glyph)
+(define-constant-glyph 'hscroll-glyph)
+(define-constant-glyph 'truncation-glyph)
+(define-constant-glyph 'continuation-glyph)
+
+(define-constant-glyph 'frame-icon-glyph)
+
+;; backwards compatibility garbage
+
+(defun dontusethis-old-pointer-shape-handler (sym args fun harg handler)
+  (let ((value (car args)))
+    (if (null value)
+       (remove-specifier harg 'global)
+      (set-glyph-image (symbol-value harg) value))))
+
+;; It might or might not be garbage, but it's rude.  Make these
+;; 'compatible instead of 'obsolete.  -slb
+(defun define-obsolete-pointer-glyph (old new)
+  (define-compatible-variable-alias old new)
+  (dontusethis-set-symbol-value-handler
+   old 'set-value 'dontusethis-old-pointer-shape-handler new))
+
+;;; (defvar x-pointer-shape nil)
+(define-obsolete-pointer-glyph 'x-pointer-shape 'text-pointer-glyph)
+
+;;; (defvar x-nontext-pointer-shape nil)
+(define-obsolete-pointer-glyph 'x-nontext-pointer-shape 'nontext-pointer-glyph)
+
+;;; (defvar x-mode-pointer-shape nil)
+(define-obsolete-pointer-glyph 'x-mode-pointer-shape 'modeline-pointer-glyph)
+
+;;; (defvar x-selection-pointer-shape nil)
+(define-obsolete-pointer-glyph 'x-selection-pointer-shape
+  'selection-pointer-glyph)
+
+;;; (defvar x-busy-pointer-shape nil)
+(define-obsolete-pointer-glyph 'x-busy-pointer-shape 'busy-pointer-glyph)
+
+;;; (defvar x-gc-pointer-shape nil)
+(define-obsolete-pointer-glyph 'x-gc-pointer-shape 'gc-pointer-glyph)
+
+;;; (defvar x-toolbar-pointer-shape nil)
+(define-obsolete-pointer-glyph 'x-toolbar-pointer-shape 'toolbar-pointer-glyph)
+
+;;;;;;;;;; initialization
+
+(defun init-glyphs ()
+  ;; initialize default image types
+  (if (featurep 'x)
+    (set-console-type-image-conversion-list 'x
+     `(,@(if (featurep 'xpm) '(("\\.xpm\\'" [xpm :file nil] 2)))
+        ("\\.xbm\\'" [xbm :file nil] 2)
+       ,@(if (featurep 'xpm) '(("\\`/\\* XPM \\*/" [xpm :data nil] 2)))
+       ,@(if (featurep 'xface) '(("\\`X-Face:" [xface :data nil] 2)))
+       ,@(if (featurep 'gif) '(("\\.gif\\'" [gif :file nil] 2)
+                              ("\\`GIF8[79]" [gif :data nil] 2)))
+       ,@(if (featurep 'jpeg) '(("\\.jpe?g\\'" [jpeg :file nil] 2)))
+       ;; all of the JFIF-format JPEG's that I've seen begin with
+       ;; the following.  I have no idea if this is standard.
+       ,@(if (featurep 'jpeg) '(("\\`\377\330\377\340\000\020JFIF"
+                                [jpeg :data nil] 2)))
+       ,@(if (featurep 'png) '(("\\.png\\'" [png :file nil] 2)))
+       ,@(if (featurep 'png) '(("\\`\211PNG" [png :data nil] 2)))
+       ("" [autodetect :data nil] 2))))
+  ;; #### this should really be formatted-string, not string but we
+  ;; don't have it implemented yet
+  ;;
+  ;; #define could also mean a bitmap as well as a version 1 XPM.  Who
+  ;; cares.  We don't want the file contents getting converted to a
+  ;; string in either case which is why the entry is there.
+  (if (featurep 'tty)
+      (progn
+       (set-console-type-image-conversion-list
+        'tty
+        '(("^#define" [string :data "[xpm]"])
+          ("\\`X-Face:" [string :data "[xface]"])
+          ("\\`/\\* XPM \\*/" [string :data "[xpm]"])
+          ("\\`GIF87" [string :data "[gif]"])
+          ("\\`\377\330\340\000\020JFIF" [string :data "[jpeg]"])
+          ("" [string :data nil] 2)
+          ;; this last one is here for pointers and icons and such --
+          ;; strings are not allowed so they will be ignored.
+          ("" [nothing])))
+
+       ;; finish initializing truncation glyph -- created internally
+       ;; because it has a built-in bitmap
+       (set-glyph-image truncation-glyph "$" 'global 'tty)
+
+       ;; finish initializing continuation glyph -- created internally
+       ;; because it has a built-in bitmap
+       (set-glyph-image continuation-glyph "\\" 'global 'tty)
+
+       ;; finish initializing hscroll glyph -- created internally
+       ;; because it has a built-in bitmap
+       (set-glyph-image hscroll-glyph "$" 'global 'tty)))
+
+  (set-glyph-image octal-escape-glyph "\\")
+  (set-glyph-image control-arrow-glyph "^")
+  (set-glyph-image invisible-text-glyph " ...")
+  ;; (set-glyph-image hscroll-glyph "$")
+
+  (let ((face (make-face 'border-glyph
+                        "Truncation and continuation glyphs face")))
+    (set-glyph-face continuation-glyph face)
+    (set-glyph-face truncation-glyph face)
+    (set-glyph-face hscroll-glyph face))
+
+  ;; finish initializing xemacs logo -- created internally because it
+  ;; has a built-in bitmap
+  (if (featurep 'xpm)
+      (set-glyph-image xemacs-logo
+                      (concat "../etc/"
+                              (if emacs-beta-version
+                                  "xemacs-beta.xpm"
+                                "xemacs.xpm"))
+                      'global 'x))
+  (cond ((featurep 'xpm)
+        (set-glyph-image frame-icon-glyph
+                         (concat "../etc/" "xemacs-icon.xpm")
+                         'global 'x))
+       ((featurep 'x)
+        (set-glyph-image frame-icon-glyph
+                         (concat "../etc/" "xemacs-icon2.xbm")
+                         'global 'x)))
+
+  (if (featurep 'tty)
+      (set-glyph-image xemacs-logo
+                      "XEmacs <insert spiffy graphic logo here>"
+                      'global 'tty))
+)
+
+(init-glyphs)
+
+;;; glyphs.el ends here.
diff --git a/lisp/gnuserv.el b/lisp/gnuserv.el
new file mode 100644 (file)
index 0000000..7b89699
--- /dev/null
@@ -0,0 +1,784 @@
+;;; gnuserv.el --- Lisp interface code between Emacs and gnuserv
+;; Copyright (C) 1989-1997 Free Software Foundation, Inc.
+
+;; Version: 3.11
+;; Author: Andy Norman (ange@hplb.hpl.hp.com), originally based on server.el
+;;         Hrvoje Niksic <hniksic@srce.hr>
+;; Maintainer: Jan Vroonhof <vroonhof@math.ethz.ch>,
+;;             Hrvoje Niksic <hniksic@srce.hr>
+;; Keywords: environment, processes, terminals
+
+;; 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; see the file COPYING.  If not, write to the
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not in FSF.
+
+;;; Commentary:
+
+;; Gnuserv is run when Emacs needs to operate as a server for other
+;; processes.  Specifically, any number of files can be attached for
+;; editing to a running XEmacs process using the `gnuclient' program.
+
+;; Use `M-x gnuserv-start' to start the server and `gnuclient files'
+;; to load them to XEmacs.  When you are done with a buffer, press
+;; `C-x #' (`M-x gnuserv-edit').  You can put (gnuserv-start) to your
+;; .emacs, and enable `gnuclient' as your Unix "editor".  When all the
+;; buffers for a client have been edited and exited with
+;; `gnuserv-edit', the client "editor" will return to the program that
+;; invoked it.
+
+;; Your editing commands and Emacs' display output go to and from the
+;; terminal or X display in the usual way.  If you are running under
+;; X, a new X frame will be open for each gnuclient.  If you are on a
+;; TTY, this TTY will be attached as a new device to the running
+;; XEmacs, and will be removed once you are done with the buffer.
+
+;; To evaluate a Lisp form in a running Emacs, use the `-eval'
+;; argument of gnuclient.  To simplify this, we provide the `gnudoit'
+;; shell script.  For example `gnudoit "(+ 2 3)"' will print `5',
+;; whereas `gnudoit "(gnus)"' will fire up your favorite newsreader.
+;; Like gnuclient, `gnudoit' requires the server to be started prior
+;; to using it.
+
+;; For more information you can refer to man pages of gnuclient,
+;; gnudoit and gnuserv, distributed with XEmacs.
+
+;; gnuserv.el was originally written by Andy Norman as an improvement
+;; over William Sommerfeld's server.el.  Since then, a number of
+;; people have worked on it, including Bob Weiner, Darell Kindred,
+;; Arup Mukherjee, Ben Wing and Jan Vroonhof.  It was completely
+;; rewritten (labeled as version 3) by Hrvoje Niksic in May 1997.  The
+;; new code will not run on GNU Emacs.
+
+;; Jan Vroonhof <vroonhof@math.ethz.ch> July/1996
+;; ported the server-temp-file-regexp feature from server.el
+;; ported server hooks from server.el
+;; ported kill-*-query functions from server.el (and made it optional)
+;; synced other behaviour with server.el
+;;
+;; Jan Vroonhof
+;;     Customized.
+;;
+;; Hrvoje Niksic <hniksic@srce.hr> May/1997
+;;     Completely rewritten.  Now uses `defstruct' and other CL stuff
+;;     to define clients cleanly.  Many thanks to Dave Gillespie!
+;;
+;; Mike Scheidler <c23mts@eng.delcoelect.com> July, 1997
+;;     Added 'Done' button to the menubar.
+
+\f
+;;; Code:
+
+(defgroup gnuserv nil
+  "The gnuserv suite of programs to talk to Emacs from outside."
+  :group 'environment
+  :group 'processes
+  :group 'terminals)
+
+
+;; Provide the old variables as aliases, to avoid breaking .emacs
+;; files.  However, they are obsolete and should be converted to the
+;; new forms.  This ugly crock must be before the variable
+;; declaration, or the scheme fails.
+
+(define-obsolete-variable-alias 'server-frame 'gnuserv-frame)
+(define-obsolete-variable-alias 'server-done-function
+  'gnuserv-done-function)
+(define-obsolete-variable-alias 'server-done-temp-file-function
+  'gnuserv-done-temp-file-function)
+(define-obsolete-variable-alias 'server-find-file-function
+  'gnuserv-find-file-function)
+(define-obsolete-variable-alias 'server-program
+  'gnuserv-program)
+(define-obsolete-variable-alias 'server-visit-hook
+  'gnuserv-visit-hook)
+(define-obsolete-variable-alias 'server-done-hook
+  'gnuserv-done-hook)
+(define-obsolete-variable-alias 'server-kill-quietly
+  'gnuserv-kill-quietly)
+(define-obsolete-variable-alias 'server-temp-file-regexp
+  'gnuserv-temp-file-regexp)
+(define-obsolete-variable-alias 'server-make-temp-file-backup
+  'gnuserv-make-temp-file-backup)
+
+;;;###autoload
+(defcustom gnuserv-frame nil
+  "*The frame to be used to display all edited files.
+If nil, then a new frame is created for each file edited.
+If t, then the currently selected frame will be used.
+If a function, then this will be called with a symbol `x' or `tty' as the
+only argument, and its return value will be interpreted as above."
+  :tag "Gnuserv Frame"
+  :type '(radio (const :tag "Create new frame each time" nil)
+               (const :tag "Use selected frame" t)
+               (function-item :tag "Use main Emacs frame"
+                              gnuserv-main-frame-function)
+               (function-item :tag "Use visible frame, otherwise create new"
+                              gnuserv-visible-frame-function)
+               (function-item :tag "Create special Gnuserv frame and use it"
+                              gnuserv-special-frame-function)
+               (function :tag "Other"))
+  :group 'gnuserv
+  :group 'frames)
+
+(defcustom gnuserv-frame-plist nil
+  "*Plist of frame properties for creating a gnuserv frame."
+  :type 'plist
+  :group 'gnuserv
+  :group 'frames)
+
+(defcustom gnuserv-done-function 'kill-buffer
+  "*Function used to remove a buffer after editing.
+It is called with one BUFFER argument.  Functions such as `kill-buffer' and
+`bury-buffer' are good values. See also `gnuserv-done-temp-file-function'."
+  :type '(radio (function-item kill-buffer)
+               (function-item bury-buffer)
+               (function :tag "Other"))
+  :group 'gnuserv)
+
+(defcustom gnuserv-done-temp-file-function 'kill-buffer
+  "*Function used to remove a temporary buffer after editing.
+It is called with one BUFFER argument.  Functions such as `kill-buffer' and
+`bury-buffer' are good values. See also `gnuserv-done-temp-file-function'."
+  :type '(radio (function-item kill-buffer)
+               (function-item bury-buffer)
+               (function :tag "Other"))
+  :group 'gnuserv)
+
+(defcustom gnuserv-find-file-function 'find-file
+  "*Function to visit a file with.
+It takes one argument, a file name to visit."
+  :type 'function
+  :group 'gnuserv)
+
+(defcustom gnuserv-view-file-function 'view-file
+  "*Function to view a file with.
+It takes one argument, a file name to view."
+  :type '(radio (function-item view-file)
+               (function-item find-file-read-only)
+               (function :tag "Other"))
+  :group 'gnuserv)
+
+(defcustom gnuserv-program "gnuserv"
+  "*Program to use as the editing server."
+  :type 'string
+  :group 'gnuserv)
+
+(defcustom gnuserv-visit-hook nil
+  "*Hook run after visiting a file."
+  :type 'hook
+  :group 'gnuserv)
+
+(defcustom gnuserv-done-hook nil
+  "*Hook run when done editing a buffer for the Emacs server.
+The hook functions are called after the file has been visited, with the
+current buffer set to the visiting buffer."
+  :type 'hook
+  :group 'gnuserv)
+
+(defcustom gnuserv-init-hook nil
+  "*Hook run after the server is started."
+  :type 'hook
+  :group 'gnuserv)
+
+(defcustom gnuserv-shutdown-hook nil
+  "*Hook run before the server exits."
+  :type 'hook
+  :group 'gnuserv)
+
+(defcustom gnuserv-kill-quietly nil
+  "*Non-nil means to kill buffers with clients attached without requiring confirmation."
+  :type 'boolean
+  :group 'gnuserv)
+
+(defcustom gnuserv-temp-file-regexp
+  (concat "^" (temp-directory) "/Re\\|/draft$")
+  "*Regexp which should match filenames of temporary files deleted
+and reused by the programs that invoke the Emacs server."
+  :type 'regexp
+  :group 'gnuserv)
+
+(defcustom gnuserv-make-temp-file-backup nil
+  "*Non-nil makes the server backup temporary files also."
+  :type 'boolean
+  :group 'gnuserv)
+
+\f
+;;; Internal variables:
+
+(defstruct gnuclient
+  "An object that encompasses several buffers in one.
+Normally, a client connecting to Emacs will be assigned an id, and
+will request editing of several files.
+
+ID       - Client id (integer).
+BUFFERS  - List of buffers that \"belong\" to the client.
+           NOTE: one buffer can belong to several clients.
+DEVICE   - The device this client is on.  If the device was also created.
+           by a client, it will be placed to `gnuserv-devices' list.
+FRAME    - Frame created by the client, or nil if the client didn't
+           create a frame.
+
+All the slots default to nil."
+  (id nil)
+  (buffers nil)
+  (device nil)
+  (frame nil))
+
+(defvar gnuserv-process nil
+  "The current gnuserv process.")
+
+(defvar gnuserv-string ""
+  "The last input string from the server.")
+
+(defvar gnuserv-current-client nil
+  "The client we are currently talking to.")
+
+(defvar gnuserv-clients nil
+  "List of current gnuserv clients.
+Each element is a gnuclient structure that identifies a client.")
+
+(defvar gnuserv-devices nil
+  "List of devices created by clients.")
+
+(defvar gnuserv-special-frame nil
+  "Frame created specially for Server.")
+
+;; We want the client-infested buffers to have some modeline
+;; identification, so we'll make a "minor mode".
+(defvar gnuserv-minor-mode nil)
+(make-variable-buffer-local 'gnuserv-mode)
+(pushnew '(gnuserv-minor-mode " Server") minor-mode-alist
+         :test 'equal)
+
+\f
+;; Sample gnuserv-frame functions
+
+(defun gnuserv-main-frame-function (type)
+  "Return a sensible value for the main Emacs frame."
+  (if (or (eq type 'x)
+         (eq type 'mswindows))
+      (car (frame-list))
+    nil))
+
+(defun gnuserv-visible-frame-function (type)
+  "Return a frame if there is a frame that is truly visible, nil otherwise.
+This is meant in the X sense, so it will not return frames that are on another
+visual screen.  Totally visible frames are preferred.  If none found, return nil."
+  (if (or (eq type 'x)
+         (eq type 'mswindows))
+      (cond ((car (filtered-frame-list 'frame-totally-visible-p
+                                      (selected-device))))
+           ((car (filtered-frame-list (lambda (frame)
+                                        ;; eq t as in not 'hidden
+                                        (eq t (frame-visible-p frame)))
+                                      (selected-device)))))
+    nil))
+
+(defun gnuserv-special-frame-function (type)
+  "Create a special frame for Gnuserv and return it on later invocations."
+  (unless (frame-live-p gnuserv-special-frame)
+    (setq gnuserv-special-frame (make-frame gnuserv-frame-plist)))
+  gnuserv-special-frame)
+
+\f
+;;; Communication functions
+
+;; We used to restart the server here, but it's too risky -- if
+;; something goes awry, it's too easy to wind up in a loop.
+(defun gnuserv-sentinel (proc msg)
+  (let ((msgstring (concat "Gnuserv process %s; restart with `%s'"))
+       (keystring (substitute-command-keys "\\[gnuserv-start]")))
+  (case (process-status proc)
+    (exit
+     (message msgstring "exited" keystring)
+     (gnuserv-prepare-shutdown))
+    (signal
+     (message msgstring "killed" keystring)
+     (gnuserv-prepare-shutdown))
+    (closed
+     (message msgstring "closed" keystring))
+     (gnuserv-prepare-shutdown))))
+
+;; This function reads client requests from our current server.  Every
+;; client is identified by a unique ID within the server
+;; (incidentally, the same ID is the file descriptor the server uses
+;; to communicate to client).
+;;
+;; The request string can arrive in several chunks.  As the request
+;; ends with \C-d, we check for that character at the end of string.
+;; If not found, keep reading, and concatenating to former strings.
+;; So, if at first read we receive "5 (gn", that text will be stored
+;; to gnuserv-string.  If we then receive "us)\C-d", the two will be
+;; concatenated, `current-client' will be set to 5, and `(gnus)' form
+;; will be evaluated.
+;;
+;; Server will send the following:
+;;
+;; "ID <text>\C-d"  (no quotes)
+;;
+;;  ID    - file descriptor of the given client;
+;; <text> - the actual contents of the request.
+(defun gnuserv-process-filter (proc string)
+  "Process gnuserv client requests to execute Emacs commands."
+  (setq gnuserv-string (concat gnuserv-string string))
+  ;; C-d means end of request.
+  (when (string-match "\C-d\\'" gnuserv-string)
+    (cond ((string-match "^[0-9]+" gnuserv-string) ; client request id
+          (let ((header (read-from-string gnuserv-string)))
+            ;; Set the client we are talking to.
+            (setq gnuserv-current-client (car header))
+            ;; Evaluate the expression
+            (condition-case oops
+                (eval (car (read-from-string gnuserv-string (cdr header))))
+              ;; In case of an error, write the description to the
+              ;; client, and then signal it.
+              (error (setq gnuserv-string "")
+                     (gnuserv-write-to-client gnuserv-current-client oops)
+                     (setq gnuserv-current-client nil)
+                     (signal (car oops) (cdr oops)))
+              (quit (setq gnuserv-string "")
+                    (gnuserv-write-to-client gnuserv-current-client oops)
+                    (setq gnuserv-current-client nil)
+                    (signal 'quit nil)))
+            (setq gnuserv-string "")))
+         (t
+          (error "%s: invalid response from gnuserv" gnuserv-string)
+          (setq gnuserv-string "")))))
+
+;; This function is somewhat of a misnomer.  Actually, we write to the
+;; server (using `process-send-string' to gnuserv-process), which
+;; interprets what we say and forwards it to the client.  The
+;; incantation server understands is (from gnuserv.c):
+;;
+;; "FD/LEN:<text>\n"  (no quotes)
+;;    FD     - file descriptor of the given client (which we obtained from
+;;             the server earlier);
+;;    LEN    - length of the stuff we are about to send;
+;;    <text> - the actual contents of the request.
+(defun gnuserv-write-to-client (client-id form)
+  "Write the given form to the given client via the gnuserv process."
+  (when (eq (process-status gnuserv-process) 'run)
+    (let* ((result (format "%s" form))
+          (s      (format "%s/%d:%s\n" client-id
+                          (length result) result)))
+      (process-send-string gnuserv-process s))))
+
+;; The following two functions are helper functions, used by
+;; gnuclient.
+
+(defun gnuserv-eval (form)
+  "Evaluate form and return result to client."
+  (gnuserv-write-to-client gnuserv-current-client (eval form))
+  (setq gnuserv-current-client nil))
+
+(defun gnuserv-eval-quickly (form)
+  "Let client know that we've received the request, and then eval the form.
+This order is important as not to keep the client waiting."
+  (gnuserv-write-to-client gnuserv-current-client nil)
+  (setq gnuserv-current-client nil)
+  (eval form))
+
+\f
+;; "Execute" a client connection, called by gnuclient.  This is the
+;; backbone of gnuserv.el.
+(defun gnuserv-edit-files (type list &rest flags)
+  "For each (line-number . file) pair in LIST, edit the file at line-number.
+The visited buffers are memorized, so that when \\[gnuserv-edit] is invoked
+in such a buffer, or when it is killed, or the client's device deleted, the
+client will be invoked that the edit is finished.
+
+TYPE should either be a (tty TTY TERM PID) list, or (x DISPLAY) list.
+If a flag is `quick', just edit the files in Emacs.
+If a flag is `view', view the files read-only."
+  (let (quick view)
+    (mapc (lambda (flag)
+           (case flag
+             (quick (setq quick t))
+             (view  (setq view t))
+             (t     (error "Invalid flag %s" flag))))
+         flags)
+    (let* ((old-device-num (length (device-list)))
+          (new-frame nil)
+          (dest-frame (if (functionp gnuserv-frame)
+                          (funcall gnuserv-frame (car type))
+                        gnuserv-frame))
+          ;; The gnuserv-frame dependencies are ugly, but it's
+          ;; extremely hard to make that stuff cleaner without
+          ;; breaking everything in sight.
+          (device (cond ((frame-live-p dest-frame)
+                         (frame-device dest-frame))
+                        ((null dest-frame)
+                         (case (car type)
+                           (tty (apply 'make-tty-device (cdr type)))
+                           (x   (make-x-device (cadr type)))
+                           (mswindows   (make-mswindows-device))
+                           (t   (error "Invalid device type"))))
+                        (t
+                         (selected-device))))
+          (frame (cond ((frame-live-p dest-frame)
+                        dest-frame)
+                       ((null dest-frame)
+                        (setq new-frame (make-frame gnuserv-frame-plist
+                                                    device))
+                        new-frame)
+                       (t (selected-frame))))
+          (client (make-gnuclient :id gnuserv-current-client
+                                  :device device
+                                  :frame new-frame)))
+      (setq gnuserv-current-client nil)
+      ;; If the device was created by this client, push it to the list.
+      (and (/= old-device-num (length (device-list)))
+          (push device gnuserv-devices))
+      (and (frame-iconified-p frame)
+          (deiconify-frame frame))
+      ;; Visit all the listed files.
+      (while list
+       (let ((line (caar list)) (path (cdar list)))
+         (select-frame frame)
+         ;; Visit the file.
+         (funcall (if view
+                      gnuserv-view-file-function
+                    gnuserv-find-file-function)
+                  path)
+         (goto-line line)
+         ;; Don't memorize the quick and view buffers.
+         (unless (or quick view)
+           (pushnew (current-buffer) (gnuclient-buffers client))
+           (setq gnuserv-minor-mode t)
+           ;; Add the "Done" button to the menubar, only in this buffer.
+           (if (and (featurep 'menubar) current-menubar)
+             (progn (set-buffer-menubar current-menubar)
+             (add-menu-button nil ["Done" gnuserv-edit]))
+             ))
+         (run-hooks 'gnuserv-visit-hook)
+         (pop list)))
+      (cond
+       ((and (or quick view)
+            (device-on-window-system-p device))
+       ;; Exit if on X device, and quick or view.  NOTE: if the
+       ;; client is to finish now, it must absolutely /not/ be
+       ;; included to the list of clients.  This way the client-ids
+       ;; should be unique.
+       (gnuserv-write-to-client (gnuclient-id client) nil))
+       (t
+       ;; Else, the client gets a vote.
+       (push client gnuserv-clients)
+       ;; Explain buffer exit options.  If dest-frame is nil, the
+       ;; user can exit via `delete-frame'.  OTOH, if FLAGS are nil
+       ;; and there are some buffers, the user can exit via
+       ;; `gnuserv-edit'.
+       (if (and (not (or quick view))
+                (gnuclient-buffers client))
+           (message "%s"
+                    (substitute-command-keys
+                     "Type `\\[gnuserv-edit]' to finish editing"))
+         (or dest-frame
+             (message "%s"
+                      (substitute-command-keys
+                       "Type `\\[delete-frame]' to finish editing")))))))))
+
+\f
+;;; Functions that hook into Emacs in various way to enable operation
+
+;; Defined later.
+(add-hook 'kill-emacs-hook 'gnuserv-kill-all-clients t)
+
+;; A helper function; used by others.  Try avoiding it whenever
+;; possible, because it is slow, and conses a list.  Use
+;; `gnuserv-buffer-p' when appropriate, for instance.
+(defun gnuserv-buffer-clients (buffer)
+  "Return a list of clients to which BUFFER belongs."
+  (let (res)
+    (dolist (client gnuserv-clients)
+      (when (memq buffer (gnuclient-buffers client))
+       (push client res)))
+    res))
+
+;; Like `gnuserv-buffer-clients', but returns a boolean; doesn't
+;; collect a list.
+(defun gnuserv-buffer-p (buffer)
+  (member* buffer gnuserv-clients
+          :test 'memq
+          :key 'gnuclient-buffers))
+
+;; This function makes sure that a killed buffer is deleted off the
+;; list for the particular client.
+;;
+;; This hooks into `kill-buffer-hook'.  It is *not* a replacement for
+;; `kill-buffer' (thanks God).
+(defun gnuserv-kill-buffer-function ()
+  "Remove the buffer from the buffer lists of all the clients it belongs to.
+Any client that remains \"empty\" after the removal is informed that the
+editing has ended."
+  (let* ((buf (current-buffer)))
+    (dolist (client (gnuserv-buffer-clients buf))
+      (callf2 delq buf (gnuclient-buffers client))
+      ;; If no more buffers, kill the client.
+      (when (null (gnuclient-buffers client))
+       (gnuserv-kill-client client)))))
+
+(add-hook 'kill-buffer-hook 'gnuserv-kill-buffer-function)
+
+;; Ask for confirmation before killing a buffer that belongs to a
+;; living client.
+(defun gnuserv-kill-buffer-query-function ()
+  (or gnuserv-kill-quietly
+      (not (gnuserv-buffer-p (current-buffer)))
+      (yes-or-no-p
+       (format "Buffer %s belongs to gnuserv client(s); kill anyway? "
+              (current-buffer)))))
+
+(add-hook 'kill-buffer-query-functions
+         'gnuserv-kill-buffer-query-function)
+
+(defun gnuserv-kill-emacs-query-function ()
+  (or gnuserv-kill-quietly
+      (not (some 'gnuclient-buffers gnuserv-clients))
+      (yes-or-no-p "Gnuserv buffers still have clients; exit anyway? ")))
+
+(add-hook 'kill-emacs-query-functions
+         'gnuserv-kill-emacs-query-function)
+
+;; If the device of a client is to be deleted, the client should die
+;; as well.  This is why we hook into `delete-device-hook'.
+(defun gnuserv-check-device (device)
+  (when (memq device gnuserv-devices)
+    (dolist (client gnuserv-clients)
+      (when (eq device (gnuclient-device client))
+       ;; we must make sure that the server kill doesn't result in
+       ;; killing the device, because it would cause a device-dead
+       ;; error when `delete-device' tries to do the job later.
+       (gnuserv-kill-client client t))))
+  (callf2 delq device gnuserv-devices))
+
+(add-hook 'delete-device-hook 'gnuserv-check-device)
+
+(defun gnuserv-temp-file-p (buffer)
+  "Return non-nil if BUFFER contains a file considered temporary.
+These are files whose names suggest they are repeatedly
+reused to pass information to another program.
+
+The variable `gnuserv-temp-file-regexp' controls which filenames
+are considered temporary."
+  (and (buffer-file-name buffer)
+       (string-match gnuserv-temp-file-regexp (buffer-file-name buffer))))
+
+(defun gnuserv-kill-client (client &optional leave-frame)
+  "Kill the gnuclient CLIENT.
+This will do away with all the associated buffers.  If LEAVE-FRAME,
+the function will not remove the frames associated with the client."
+  ;; Order is important: first delete client from gnuserv-clients, to
+  ;; prevent gnuserv-buffer-done-1 calling us recursively.
+  (callf2 delq client gnuserv-clients)
+  ;; Process the buffers.
+  (mapc 'gnuserv-buffer-done-1 (gnuclient-buffers client))
+  (unless leave-frame
+    (let ((device (gnuclient-device client)))
+      ;; kill frame created by this client (if any), unless
+      ;; specifically requested otherwise.
+      ;;
+      ;; note: last frame on a device will not be deleted here.
+    (when (and (gnuclient-frame client)
+              (frame-live-p (gnuclient-frame client))
+              (second (device-frame-list device)))
+      (delete-frame (gnuclient-frame client)))
+    ;; If the device is live, created by a client, and no longer used
+    ;; by any client, delete it.
+    (when (and (device-live-p device)
+              (memq device gnuserv-devices)
+              (second (device-list))
+              (not (member* device gnuserv-clients
+                            :key 'gnuclient-device)))
+      ;; `gnuserv-check-device' will remove it from `gnuserv-devices'.
+      (delete-device device))))
+  ;; Notify the client.
+  (gnuserv-write-to-client (gnuclient-id client) nil))
+
+;; Do away with the buffer.
+(defun gnuserv-buffer-done-1 (buffer)
+  (dolist (client (gnuserv-buffer-clients buffer))
+    (callf2 delq buffer (gnuclient-buffers client))
+    (when (null (gnuclient-buffers client))
+      (gnuserv-kill-client client)))
+  ;; Get rid of the buffer.
+  (save-excursion
+    (set-buffer buffer)
+    (run-hooks 'gnuserv-done-hook)
+    (setq gnuserv-minor-mode nil)
+    ;; Delete the menu button.
+    (if (and (featurep 'menubar) current-menubar)
+      (delete-menu-item '("Done")))
+    (funcall (if (gnuserv-temp-file-p buffer)
+                gnuserv-done-temp-file-function
+              gnuserv-done-function)
+            buffer)))
+
+\f
+;;; Higher-level functions
+
+;; Choose a `next' server buffer, according to several criteria, and
+;; return it.  If none are found, return nil.
+(defun gnuserv-next-buffer ()
+  (let* ((frame (selected-frame))
+        (device (selected-device))
+        client)
+    (cond
+     ;; If we have a client belonging to this frame, return
+     ;; the first buffer from it.
+     ((setq client
+           (car (member* frame gnuserv-clients :key 'gnuclient-frame)))
+      (car (gnuclient-buffers client)))
+     ;; Else, look for a device.
+     ((and
+       (memq (selected-device) gnuserv-devices)
+       (setq client
+            (car (member* device gnuserv-clients :key 'gnuclient-device))))
+      (car (gnuclient-buffers client)))
+     ;; Else, try to find any client with at least one buffer, and
+     ;; return its first buffer.
+     ((setq client
+           (car (member-if-not #'null gnuserv-clients
+                               :key 'gnuclient-buffers)))
+      (car (gnuclient-buffers client)))
+     ;; Oh, give up.
+     (t nil))))
+
+(defun gnuserv-buffer-done (buffer)
+  "Mark BUFFER as \"done\" for its client(s).
+Does the save/backup queries first, and calls `gnuserv-done-function'."
+  ;; Check whether this is the real thing.
+  (unless (gnuserv-buffer-p buffer)
+    (error "%s does not belong to a gnuserv client" buffer))
+  ;; Backup/ask query.
+  (if (gnuserv-temp-file-p buffer)
+      ;; For a temp file, save, and do NOT make a non-numeric backup
+      ;; Why does server.el explicitly back up temporary files?
+      (let ((version-control nil)
+           (buffer-backed-up (not gnuserv-make-temp-file-backup)))
+       (save-buffer))
+    (if (and (buffer-modified-p)
+            (y-or-n-p (concat "Save file " buffer-file-name "? ")))
+       (save-buffer buffer)))
+  (gnuserv-buffer-done-1 buffer))
+
+;; Called by `gnuserv-start-1' to clean everything.  Hooked into
+;; `kill-emacs-hook', too.
+(defun gnuserv-kill-all-clients ()
+  "Kill all the gnuserv clients.  Ruthlessly."
+  (mapc 'gnuserv-kill-client gnuserv-clients))
+
+;; This serves to run the hook and reset
+;; `allow-deletion-of-last-visible-frame'.
+(defun gnuserv-prepare-shutdown ()
+  (setq allow-deletion-of-last-visible-frame nil)
+  (run-hooks 'gnuserv-shutdown-hook))
+
+;; This is a user-callable function, too.
+(defun gnuserv-shutdown ()
+  "Shutdown the gnuserv server, if one is currently running.
+All the clients will be disposed of via the normal methods."
+  (interactive)
+  (gnuserv-kill-all-clients)
+  (when gnuserv-process
+    (set-process-sentinel gnuserv-process nil)
+    (gnuserv-prepare-shutdown)
+    (condition-case ()
+       (delete-process gnuserv-process)
+      (error nil))
+    (setq gnuserv-process nil)))
+
+;; Actually start the process.  Kills all the clients before-hand.
+(defun gnuserv-start-1 (&optional leave-dead)
+  ;; Shutdown the existing server, if any.
+  (gnuserv-shutdown)
+  ;; If we already had a server, clear out associated status.
+  (unless leave-dead
+    (setq gnuserv-string ""
+         gnuserv-current-client nil)
+    (let ((process-connection-type t))
+      (setq gnuserv-process
+           (start-process "gnuserv" nil gnuserv-program)))
+    (set-process-sentinel gnuserv-process 'gnuserv-sentinel)
+    (set-process-filter gnuserv-process 'gnuserv-process-filter)
+    (process-kill-without-query gnuserv-process)
+    (setq allow-deletion-of-last-visible-frame t)
+    (run-hooks 'gnuserv-init-hook)))
+
+\f
+;;; User-callable functions:
+
+;;;###autoload
+(defun gnuserv-running-p ()
+  "Return non-nil if a gnuserv process is running from this XEmacs session."
+  (not (not gnuserv-process)))
+
+;;;###autoload
+(defun gnuserv-start (&optional leave-dead)
+  "Allow this Emacs process to be a server for client processes.
+This starts a gnuserv communications subprocess through which
+client \"editors\" (gnuclient and gnudoit) can send editing commands to
+this Emacs job.  See the gnuserv(1) manual page for more details.
+
+Prefix arg means just kill any existing server communications subprocess."
+  (interactive "P")
+  (and gnuserv-process
+       (not leave-dead)
+       (message "Restarting gnuserv"))
+  (gnuserv-start-1 leave-dead))
+
+(defun gnuserv-edit (&optional count)
+  "Mark the current gnuserv editing buffer as \"done\", and switch to next one.
+
+Run with a numeric prefix argument, repeat the operation that number
+of times.  If given a universal prefix argument, close all the buffers
+of this buffer's clients.
+
+The `gnuserv-done-function' (bound to `kill-buffer' by default) is
+called to dispose of the buffer after marking it as done.
+
+Files that match `gnuserv-temp-file-regexp' are considered temporary and
+are saved unconditionally and backed up if `gnuserv-make-temp-file-backup'
+is non-nil.  They are disposed of using `gnuserv-done-temp-file-function'
+\(also bound to `kill-buffer' by default).
+
+When all of a client's buffers are marked as \"done\", the client is notified."
+  (interactive "P")
+  (when (null count)
+    (setq count 1))
+  (cond ((numberp count)
+        (while (natnump (decf count))
+          (let ((frame (selected-frame)))
+            (gnuserv-buffer-done (current-buffer))
+            (when (eq frame (selected-frame))
+              ;; Switch to the next gnuserv buffer.  However, do this
+              ;; only if we remain in the same frame.
+              (let ((next (gnuserv-next-buffer)))
+                (when next
+                  (switch-to-buffer next)))))))
+       (count
+          (let* ((buf (current-buffer))
+                 (clients (gnuserv-buffer-clients buf)))
+            (unless clients
+              (error "%s does not belong to a gnuserv client" buf))
+            (mapc 'gnuserv-kill-client (gnuserv-buffer-clients buf))))))
+
+(global-set-key "\C-x#" 'gnuserv-edit)
+
+(provide 'gnuserv)
+
+;;; gnuserv.el ends here
diff --git a/lisp/gui.el b/lisp/gui.el
new file mode 100644 (file)
index 0000000..893efe5
--- /dev/null
@@ -0,0 +1,122 @@
+;;; gui.el --- Basic GUI functions for XEmacs.
+
+;; Copyright (C) 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1996 Ben Wing
+
+;; Maintainer: XEmacs Development Team
+;; Keywords: internal, dumped
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not in FSF
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs (when window system support is compiled in).
+
+;;; Code:
+
+(defcustom dialog-frame-plist '(width 60 height 20)
+  "Plist of frame properties for initially creating a dialog frame.
+Properties specified here supersede the values given in
+`default-frame-plist'."
+  :type 'plist
+  :group 'frames)
+
+(defun make-dialog-frame (&optional props parent)
+  "Create a frame suitable for use as a dialog box.
+The frame is made a child of PARENT (defaults to the selected frame),
+and has additional properties PROPS, as well as `dialog-frame-plist'.
+Normally it also has no modelines, menubars, or toolbars."
+  (or parent (setq parent (selected-frame)))
+  (let* ((ftop (frame-property parent 'top))
+        (fleft (frame-property parent 'left))
+        (fwidth (frame-pixel-width parent))
+        (fheight (frame-pixel-height parent))
+        (fonth (font-height (face-font 'default)))
+        (fontw (font-width (face-font 'default)))
+        (props (append props dialog-frame-plist))
+        (dfheight (plist-get props 'height))
+        (dfwidth (plist-get props 'width))
+        ;; under FVWM at least, if I don't specify the initial position,
+        ;; it ends up always at (0, 0).  xwininfo doesn't tell me
+        ;; that there are any program-specified position hints, so
+        ;; it must be an FVWM bug.  So just be smashing and position
+        ;; in the center of the selected frame.
+        (frame (make-frame
+                (append props
+                        `(popup ,parent initially-unmapped t
+                                menubar-visible-p nil
+                                has-modeline-p nil
+                                default-toolbar-visible-p nil
+                                modeline-shadow-thickness 0
+                                left ,(+ fleft (- (/ fwidth 2)
+                                                  (/ (* dfwidth fontw)
+                                                     2)))
+                                top ,(+ ftop (- (/ fheight 2)
+                                                (/ (* dfheight fonth)
+                                                   2))))))))
+    (set-face-foreground 'modeline [default foreground] frame)
+    (set-face-background 'modeline [default background] frame)
+    (make-frame-visible frame)
+    frame))
+
+(defvar gui-button-shadow-thickness 2)
+
+(defun gui-button-p (object)
+  "True if OBJECT is a GUI button."
+  (and (vectorp object)
+       (> (length object) 0)
+       (eq 'gui-button (aref object 0))))
+
+(make-face 'gui-button-face "Face used for gui buttons")
+(if (not (face-differs-from-default-p 'gui-button-face))
+    (progn
+      (set-face-reverse-p 'gui-button-face t)
+      (set-face-background 'gui-button-face '(((x color) . "grey75")
+                                             ((mswindows color) . "grey75")))
+      (set-face-foreground 'gui-button-face '(((x color) . "black")
+                                             ((mswindows color) . "black")))))
+
+(defun make-gui-button (string &optional action user-data)
+  "Make a GUI button whose label is STRING and whose action is ACTION.
+If the button is inserted in a buffer and then clicked on, and ACTION
+is non-nil, ACTION will be called with one argument, USER-DATA."
+  (vector 'gui-button
+         (if (featurep 'xpm)
+             (xpm-button-create
+              string gui-button-shadow-thickness
+              (color-instance-name (face-foreground-instance 'gui-button-face))
+              (color-instance-name (face-background-instance 'gui-button-face)))
+           (xbm-button-create string gui-button-shadow-thickness))
+         action user-data))
+
+(defun insert-gui-button (button &optional pos buffer)
+  "Insert GUI button BUTTON at POS in BUFFER."
+  (check-argument-type 'gui-button-p button)
+  (let ((annotation
+        (make-annotation (make-glyph (car (aref button 1)))
+                         pos 'text buffer nil
+                         (make-glyph (cadr (aref button 1)))))
+       (action (aref button 2)))
+    (and action
+        (progn
+          (set-annotation-action annotation action)
+          (set-annotation-data annotation (aref button 3))))))
+
+;;; gui.el ends here
diff --git a/lisp/help-macro.el b/lisp/help-macro.el
new file mode 100644 (file)
index 0000000..b68216d
--- /dev/null
@@ -0,0 +1,174 @@
+;;; help-macro.el --- Makes command line help such as help-for-help
+
+;; Copyright (C) 1993, 1994, 1997 Free Software Foundation, Inc.
+
+;; Author: Lynn Slater <lrs@indetech.com>
+;; Maintainer: FSF
+;; Created: : Mon Oct  1 11:42:39 1990
+;; Adapted-By: ESR
+
+;; 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; see the file COPYING.  If not, write to the
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+
+;;; Synched up with: FSF 20.2.
+
+;; This file supplies the macro make-help-screen which constructs
+;; single character dispatching with browsable help such as that provided
+;; by help-for-help. This can be used to make many modes easier to use; for
+;; example, the Gnu Emacs Empire Tool uses this for every "nested" mode map
+;; called from the main mode map.
+
+;;       The name of this package was changed from help-screen.el to
+;; help-macro.el in order to fit in a 14-character limit.
+
+;;-> ***********************  Example of use *********************************
+
+;;->(make-help-screen help-for-empire-redistribute-map
+;;->             "c:civ m:mil p:population f:food ?"
+;;->             "You have discovered the GEET redistribution commands
+;;->   From here, you can use the following options:
+;;->
+;;->c  Redistribute civs from overfull sectors into connected underfull ones
+;;->     The functions typically named by empire-ideal-civ-fcn control
+;;->          based in part on empire-sector-civ-threshold  
+;;->m  Redistribute military using levels given by empire-ideal-mil-fcn
+;;->p  Redistribute excess population to highways for max pop growth
+;;->     Excess is any sector so full babies will not be born.
+;;->f  Even out food on highways to highway min and leave levels
+;;->     This is good to pump max food to all warehouses/dist pts
+;;->
+;;->
+;;->Use \\[help-for-empire-redistribute-map] for help on redistribution.
+;;->Use \\[help-for-empire-extract-map] for help on data extraction.
+;;->Please use \\[describe-key] to find out more about any of the other keys."
+;;->             empire-shell-redistribute-map)
+
+;;->  (define-key c-mp "\C-h" 'help-for-empire-redistribute-map)
+;;->  (define-key c-mp help-character 'help-for-empire-redistribute-map)
+
+;;; Code:
+
+(provide 'help-macro)
+
+;;;###autoload
+(defcustom three-step-help t
+  "*Non-nil means give more info about Help command in three steps.
+The three steps are simple prompt, prompt with all options,
+and window listing and describing the options.
+A value of nil means skip the middle step, so that
+\\[help-command] \\[help-command] gives the window that lists the options."
+  :type 'boolean
+  :group 'help-appearance)
+
+(defmacro make-help-screen (fname help-line help-text helped-map)
+  "Construct help-menu function name FNAME.
+When invoked, FNAME shows HELP-LINE and reads a command using HELPED-MAP.
+If the command is the help character, FNAME displays HELP-TEXT
+and continues trying to read a command using HELPED-MAP.
+When FNAME finally does get a command, it executes that command
+and then returns."
+  `(defun ,fname ()
+     ,help-text
+     (interactive)
+     (flet ((help-read-key (prompt)
+             ;; This is in `flet' to avoid problems with autoloading.
+             ;; #### The function is ill-conceived -- there should be
+             ;; a way to do it without all the hassle!
+             (let (events)
+               (while (not (key-press-event-p
+                            (aref (setq events (read-key-sequence prompt)) 0)))
+                 ;; Mouse clicks are not part of the help feature, so
+                 ;; reexecute them in the standard environment.
+                 (mapc 'dispatch-event events))
+               (let ((key (nconc (event-modifiers (aref events 0))
+                                 (list (event-key (aref events 0))))))
+                 ;; Make the HELP key translate to C-h.
+                 (when (lookup-key function-key-map key)
+                   (setq key (lookup-key function-key-map key)))
+                 (if (eq (length key) 1)
+                     (car key)
+                   key)))))
+       (let ((line-prompt
+             (substitute-command-keys ,help-line)))
+        (when three-step-help
+          (message "%s" line-prompt))
+        (let* ((help-screen (documentation (quote ,fname)))
+               ;; We bind overriding-local-map for very small
+               ;; sections, *excluding* where we switch buffers and
+               ;; where we execute the chosen help command.
+               (local-map (make-sparse-keymap))
+               (minor-mode-map-alist nil)
+               (prev-frame (selected-frame))
+               config new-frame key)
+          (unwind-protect
+              (progn
+                (set-keymap-parents local-map (list ,helped-map))
+                (cond (three-step-help
+                       (let* ((overriding-local-map local-map))
+                         (setq key (help-read-key nil))))
+                      (t
+                       (setq key ??)))
+                (when (or (equal key ??)
+                          (equal key (list help-char)))
+                  (setq config (current-window-configuration))
+                  (switch-to-buffer-other-window "*Help*")
+                  (and (not (eq (window-frame (selected-window))
+                                prev-frame))
+                       (setq new-frame (window-frame (selected-window))
+                             config nil))
+                  (setq buffer-read-only nil)
+                  (erase-buffer)
+                  (insert help-screen)
+                  (help-mode)
+                  (goto-char (point-min))
+                  (while (member key `((,help-char) ?? (control v) space ?\177
+                                       delete backspace (meta v)))
+                    (ignore-errors
+                      (cond ((member key '((control v) space))
+                             (scroll-up))
+                            ((member key '(?\177 delete (meta v) backspace))
+                             (scroll-down))))
+                    (let ((cursor-in-echo-area t)
+                          (overriding-local-map local-map))
+                      (setq key (help-read-key
+                                 (format "Type one of the options listed%s: "
+                                         (if (pos-visible-in-window-p
+                                              (point-max))
+                                             "" " or Space to scroll")))))))
+                ;; We don't need the prompt any more.
+                (message nil)
+                (let ((defn (lookup-key local-map key)))
+                  (cond (defn
+                          (when config
+                            (set-window-configuration config)
+                            (setq config nil))
+                          (when new-frame
+                            (iconify-frame new-frame)
+                            (setq new-frame nil))
+                          (call-interactively defn))
+                        (t
+                         (ding)))))
+            (and (get-buffer "*Help*")
+                 (bury-buffer "*Help*"))
+            (and new-frame (iconify-frame new-frame))
+            (and config
+                 (set-window-configuration config))))))))
+
+;;; help-macro.el
+
diff --git a/lisp/help-nomule.el b/lisp/help-nomule.el
new file mode 100644 (file)
index 0000000..1f4a0bb
--- /dev/null
@@ -0,0 +1,106 @@
+;;; help-nomule.el --- Help functions when not in Mule
+
+;; Copyright (C) 1997 by Free Software Foundation, Inc.
+
+;; Maintainer: XEmacs Development Team
+;; Keywords: help, internal, dumped
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Not in FSF
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;;; Code:
+
+(defconst tutorial-supported-languages
+  '(("French" fr iso-8859-1)
+    ("German" de iso-8859-1)
+    ("Norwegian" no iso-8859-1)
+    ("Croatian" hr iso-8859-2)
+    ("Polish" pl iso-8859-2)
+    ("Romanian" ro iso-8859-2))
+  "Alist of supported languages in TUTORIAL files.
+Add languages here, as more are translated.")
+
+;; TUTORIAL arg is XEmacs addition
+(defun help-with-tutorial (&optional tutorial language)
+  "Select the XEmacs learn-by-doing tutorial.
+Optional arg TUTORIAL specifies the tutorial file; default is \"TUTORIAL\".
+With a prefix argument, choose the language."
+  (interactive "i\nP")
+  (or tutorial
+      (setq tutorial "TUTORIAL"))
+  (when (and language (consp language))
+    (let ((completion-ignore-case t))
+      (setq language (assoc (completing-read "Language: "
+                                            tutorial-supported-languages
+                                            nil t)
+                           tutorial-supported-languages))))
+  (when language
+    (setq tutorial (format "%s.%s" tutorial (cadr language))))
+  (let ((file (expand-file-name tutorial "~")))
+    (delete-other-windows)
+    (let ((buffer (or (get-file-buffer file)
+                     (create-file-buffer file)))
+         (window-configuration (current-window-configuration)))
+      (condition-case error-data
+         (progn
+           (switch-to-buffer buffer)
+           (setq buffer-file-name file)
+           (setq default-directory (expand-file-name "~/"))
+           (setq buffer-auto-save-file-name nil)
+           ;; Because of non-Mule users, TUTORIALs are not coded
+           ;; independently, so we must guess the coding according to
+           ;; the language.
+           (let ((coding-system-for-read (nth 2 language)))
+             (insert-file-contents (locate-data-file tutorial)))
+           (goto-char (point-min))
+           ;; The 'didactic' blank lines: possibly insert blank lines
+           ;; around <<nya nya nya>> and replace << >> with [ ].
+           (if (re-search-forward "^<<.+>>")
+               (let ((n (- (window-height (selected-window))
+                           (count-lines (point-min) (point-at-bol))
+                           6)))
+                 (if (< n 12)
+                     (progn (beginning-of-line) (kill-line))
+                   ;; Some people get confused by the large gap
+                   (delete-backward-char 2)
+                   (insert "]")
+                   (beginning-of-line)
+                   (save-excursion
+                     (delete-char 2)
+                     (insert "["))
+                   (newline (/ n 2))
+                   (next-line 1)
+                   (newline (- n (/ n 2))))))
+           (goto-char (point-min))
+           (set-buffer-modified-p nil))
+       ;; TUTORIAL was not found: kill the buffer and restore the
+       ;; window configuration.
+       (file-error (kill-buffer buffer)
+                   (set-window-configuration window-configuration)
+                   ;; Now, signal the error
+                   (signal (car error-data) (cdr error-data)))))))
+
+
+(provide 'help-nomule)
+
+;;; help-nomule.el ends here
diff --git a/lisp/help.el b/lisp/help.el
new file mode 100644 (file)
index 0000000..5f43c0c
--- /dev/null
@@ -0,0 +1,1419 @@
+;;; help.el --- help commands for XEmacs.
+
+;; Copyright (C) 1985, 1986, 1992-4, 1997 Free Software Foundation, Inc.
+
+;; Maintainer: FSF
+;; Keywords: help, internal, dumped
+
+;; 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; see the file COPYING.  If not, write to the
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: FSF 19.30.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; This code implements XEmacs's on-line help system, the one invoked by
+;;`M-x help-for-help'.
+
+;; 06/11/1997 -- Converted to use char-after instead of broken
+;;  following-char. -slb
+
+;;; Code:
+
+;; Get the macro make-help-screen when this is compiled,
+;; or run interpreted, but not when the compiled code is loaded.
+(eval-when-compile (require 'help-macro))
+
+(defgroup help nil
+  "Support for on-line help systems."
+  :group 'emacs)
+
+(defgroup help-appearance nil
+  "Appearance of help buffers."
+  :group 'help)
+
+(defvar help-map (let ((map (make-sparse-keymap)))
+                   (set-keymap-name map 'help-map)
+                   (set-keymap-prompt
+                     map (purecopy (gettext "(Type ? for further options)")))
+                   map)
+  "Keymap for characters following the Help key.")
+
+;; global-map definitions moved to keydefs.el
+(fset 'help-command help-map)
+
+(define-key help-map (vector help-char) 'help-for-help)
+(define-key help-map "?" 'help-for-help)
+(define-key help-map 'help 'help-for-help)
+(define-key help-map '(f1) 'help-for-help)
+
+(define-key help-map "\C-l" 'describe-copying) ; on \C-c in FSFmacs
+(define-key help-map "\C-d" 'describe-distribution)
+(define-key help-map "\C-w" 'describe-no-warranty)
+(define-key help-map "a" 'hyper-apropos) ; 'command-apropos in FSFmacs
+(define-key help-map "A" 'command-apropos)
+
+(define-key help-map "b" 'describe-bindings)
+(define-key help-map "B" 'describe-beta)
+(define-key help-map "\C-p" 'describe-pointer)
+
+(define-key help-map "C" 'customize)
+(define-key help-map "c" 'describe-key-briefly)
+(define-key help-map "k" 'describe-key)
+
+(define-key help-map "d" 'describe-function)
+(define-key help-map "e" 'describe-last-error)
+(define-key help-map "f" 'describe-function)
+
+(define-key help-map "F" 'xemacs-local-faq)
+
+(define-key help-map "i" 'info)
+(define-key help-map '(control i) 'Info-query)
+;; FSFmacs has Info-goto-emacs-command-node on C-f, no binding
+;; for Info-elisp-ref
+(define-key help-map '(control c) 'Info-goto-emacs-command-node)
+(define-key help-map '(control k) 'Info-goto-emacs-key-command-node)
+(define-key help-map '(control f) 'Info-elisp-ref)
+
+(define-key help-map "l" 'view-lossage)
+
+(define-key help-map "m" 'describe-mode)
+
+(define-key help-map "\C-n" 'view-emacs-news)
+(define-key help-map "n" 'view-emacs-news)
+
+(define-key help-map "p" 'finder-by-keyword)
+
+;; Do this right with an autoload cookie in finder.el.
+;;(autoload 'finder-by-keyword "finder"
+;;  "Find packages matching a given keyword." t)
+
+(define-key help-map "s" 'describe-syntax)
+
+(define-key help-map "t" 'help-with-tutorial)
+
+(define-key help-map "w" 'where-is)
+
+(define-key help-map "v" 'describe-variable)
+
+(if (fboundp 'view-last-error)
+    (define-key help-map "e" 'view-last-error))
+
+
+(define-key help-map "q" 'help-quit)
+
+;#### This stuff was an attempt to have font locking and hyperlinks in the
+;help buffer, but it doesn't really work.  Some of this stuff comes from
+;FSF Emacs; but the FSF Emacs implementation is rather broken, as usual.
+;What needs to happen is this:
+;
+; -- we probably need a "hyperlink mode" from which help-mode is derived.
+; -- this means we probably need multiple inheritance of modes!
+;    Thankfully this is not hard to implement; we already have the
+;    ability for a keymap to have multiple parents.  However, we'd
+;    have to define any multiply-inherited-from modes using a standard
+;    `define-mode' construction instead of manually doing it, because
+;    we don't want each guy calling `kill-all-local-variables' and
+;    messing up the previous one.
+; -- we need to scan the buffer ourselves (not from font-lock, because
+;    the user might not have font-lock enabled) and highlight only
+;    those words that are *documented* functions and variables (and
+;    probably excluding words without dashes in them unless enclosed
+;    in quotes, so that common words like "list" and "point" don't
+;    become hyperlinks.
+; -- we should *not* use font-lock keywords like below.  Instead we
+;    should add the font-lock stuff ourselves during the scanning phase,
+;    if font-lock is enabled in this buffer.
+
+;(defun help-follow-reference (event extent user-data)
+;  (let ((symbol (intern-soft (extent-string extent))))
+;    (cond ((and symbol (fboundp symbol))
+;         (describe-function symbol))
+;        ((and symbol (boundp symbol))
+;         (describe-variable symbol))
+;        (t nil))))
+
+;(defvar help-font-lock-keywords
+;  (let ((name-char "[-+a-zA-Z0-9_*]") (sym-char "[-+a-zA-Z0-9_:*]"))
+;    (list
+;     ;;
+;     ;; The symbol itself.
+;     (list (concat "\\`\\(" name-char "+\\)\\(:\\)?")
+;         '(1 (if (match-beginning 2)
+;                 'font-lock-function-name-face
+;               'font-lock-variable-name-face)
+;             nil t))
+;     ;;
+;     ;; Words inside `' which tend to be symbol names.
+;     (list (concat "`\\(" sym-char sym-char "+\\)'")
+;         1 '(prog1
+;                'font-lock-reference-face
+;              (add-list-mode-item (match-beginning 1)
+;                             (match-end 1)
+;                             nil
+;                             'help-follow-reference))
+;         t)
+;     ;;
+;     ;; CLisp `:' keywords as references.
+;     (list (concat "\\<:" sym-char "+\\>") 0 'font-lock-reference-face t)))
+;  "Default expressions to highlight in Help mode.")
+
+;(put 'help-mode 'font-lock-defaults '(help-font-lock-keywords))
+
+(define-derived-mode help-mode view-major-mode "Help"
+  "Major mode for viewing help text.
+Entry to this mode runs the normal hook `help-mode-hook'.
+Commands:
+\\{help-mode-map}"
+  )
+
+(define-key help-mode-map "q" 'help-mode-quit)
+(define-key help-mode-map "Q" 'help-mode-bury)
+(define-key help-mode-map "f" 'find-function-at-point)
+(define-key help-mode-map "d" 'describe-function-at-point)
+(define-key help-mode-map "v" 'describe-variable-at-point)
+(define-key help-mode-map "i" 'Info-elisp-ref)
+(define-key help-mode-map "c" 'customize-variable)
+(define-key help-mode-map [tab] 'help-next-symbol)
+(define-key help-mode-map [(shift tab)] 'help-prev-symbol)
+(define-key help-mode-map "n" 'help-next-section)
+(define-key help-mode-map "p" 'help-prev-section)
+
+(defun describe-function-at-point ()
+  "Describe directly the function at point in the other window."
+  (interactive)
+  (let ((symb (function-at-point)))
+    (when symb
+      (describe-function symb))))
+
+(defun describe-variable-at-point ()
+  "Describe directly the variable at point in the other window."
+  (interactive)
+  (let ((symb (variable-at-point)))
+    (when symb
+      (describe-variable symb))))
+
+(defun help-next-symbol ()
+  "Move point to the next quoted symbol."
+  (interactive)
+  (search-forward "`" nil t))
+
+(defun help-prev-symbol ()
+  "Move point to the previous quoted symbol."
+  (interactive)
+  (search-backward "'" nil t))
+
+(defun help-next-section ()
+  "Move point to the next quoted symbol."
+  (interactive)
+  (search-forward-regexp "^\\w+:" nil t))
+
+(defun help-prev-section ()
+  "Move point to the previous quoted symbol."
+  (interactive)
+  (search-backward-regexp "^\\w+:" nil t))
+
+(defun help-mode-bury ()
+  "Bury the help buffer, possibly restoring the previous window configuration."
+  (interactive)
+  (help-mode-quit t))
+
+(defun help-mode-quit (&optional bury)
+  "Exit from help mode, possibly restoring the previous window configuration.
+If the optional argument BURY is non-nil, the help buffer is buried,
+otherwise it is killed."
+  (interactive)
+  (let ((buf (current-buffer)))
+    (cond ((frame-property (selected-frame) 'help-window-config)
+          (set-window-configuration
+           (frame-property (selected-frame) 'help-window-config))
+          (set-frame-property  (selected-frame) 'help-window-config nil))
+         ((not (one-window-p))
+          (delete-window)))
+    (if bury
+       (bury-buffer buf)
+      (kill-buffer buf))))
+
+(defun help-quit ()
+  (interactive)
+  nil)
+
+;; This is a grody hack of the same genotype as `advertised-undo'; if the
+;; bindings of Backspace and C-h are the same, we want the menubar to claim
+;; that `info' in invoked with `C-h i', not `BS i'.
+
+(defun deprecated-help-command ()
+  (interactive)
+  (if (eq 'help-command (key-binding "\C-h"))
+      (setq unread-command-event (character-to-event ?\C-h))
+    (help-for-help)))
+
+;;(define-key global-map 'backspace 'deprecated-help-command)
+
+;; This function has been moved to help-nomule.el and mule-help.el.
+;; TUTORIAL arg is XEmacs addition
+;(defun help-with-tutorial (&optional tutorial)
+;  "Select the XEmacs learn-by-doing tutorial.
+;Optional arg TUTORIAL specifies the tutorial file; default is \"TUTORIAL\"."
+;  (interactive)
+;  (if (null tutorial)
+;      (setq tutorial "TUTORIAL"))
+;  (let ((file (expand-file-name (concat "~/" tutorial))))
+;    (delete-other-windows)
+;    (if (get-file-buffer file)
+;      (switch-to-buffer (get-file-buffer file))
+;      (switch-to-buffer (create-file-buffer file))
+;      (setq buffer-file-name file)
+;      (setq default-directory (expand-file-name "~/"))
+;      (setq buffer-auto-save-file-name nil)
+;      (insert-file-contents (expand-file-name tutorial data-directory))
+;      (goto-char (point-min))
+;      (search-forward "\n<<")
+;      (delete-region (point-at-bol) (point-at-eol))
+;      (let ((n (- (window-height (selected-window))
+;                (count-lines (point-min) (point))
+;                6)))
+;      (if (< n 12)
+;          (newline n)
+;        ;; Some people get confused by the large gap.
+;        (newline (/ n 2))
+;        (insert "[Middle of page left blank for didactic purposes.  "
+;                "Text continues below]")
+;        (newline (- n (/ n 2)))))
+;      (goto-char (point-min))
+;      (set-buffer-modified-p nil))))
+
+;; used by describe-key, describe-key-briefly, insert-key-binding, etc.
+
+(defun key-or-menu-binding (key &optional menu-flag)
+  "Return the command invoked by KEY.
+Like `key-binding', but handles menu events and toolbar presses correctly.
+KEY is any value returned by `next-command-event'.
+MENU-FLAG is a symbol that should be set to T if KEY is a menu event,
+ or NIL otherwise"
+  (let (defn)
+    (and menu-flag (set menu-flag nil))
+    ;; If the key typed was really a menu selection, grab the form out
+    ;; of the event object and intuit the function that would be called,
+    ;; and describe that instead.
+    (if (and (vectorp key) (= 1 (length key))
+            (or (misc-user-event-p (aref key 0))
+                (eq (car-safe (aref key 0)) 'menu-selection)))
+       (let ((event (aref key 0)))
+         (setq defn (if (eventp event)
+                        (list (event-function event) (event-object event))
+                      (cdr event)))
+         (and menu-flag (set menu-flag t))
+         (when (eq (car defn) 'eval)
+           (setq defn (car (cdr defn))))
+         (when (eq (car-safe defn) 'call-interactively)
+           (setq defn (car (cdr defn))))
+         (when (and (consp defn) (null (cdr defn)))
+           (setq defn (car defn))))
+      ;; else
+      (setq defn (key-binding key)))
+    ;; kludge: if a toolbar button was pressed on, try to find the
+    ;; binding of the toolbar button.
+    (if (and (eq defn 'press-toolbar-button)
+            (vectorp key)
+            (button-press-event-p (aref key (1- (length key)))))
+       ;; wait for the button release.  We're on shaky ground here ...
+       (let ((event (next-command-event))
+             button)
+         (if (and (button-release-event-p event)
+                  (event-over-toolbar-p event)
+                  (eq 'release-and-activate-toolbar-button
+                      (key-binding (vector event)))
+                  (setq button (event-toolbar-button event)))
+             (toolbar-button-callback button)
+           ;; if anything went wrong, try returning the binding of
+           ;; the button-up event, of the original binding
+           (or (key-or-menu-binding (vector event))
+               defn)))
+      ;; no toolbar kludge
+      defn)
+    ))
+
+(defun describe-key-briefly (key &optional insert)
+  "Print the name of the function KEY invokes.  KEY is a string.
+If INSERT (the prefix arg) is non-nil, insert the message in the buffer."
+  (interactive "kDescribe key briefly: \nP")
+  (let ((standard-output (if insert (current-buffer) t))
+       defn menup)
+    (setq defn (key-or-menu-binding key 'menup))
+    (if (or (null defn) (integerp defn))
+        (princ (format "%s is undefined" (key-description key)))
+      ;; If it's a keyboard macro which trivially invokes another command,
+      ;; document that instead.
+      (if (or (stringp defn) (vectorp defn))
+         (setq defn (or (key-binding defn)
+                        defn)))
+      (let ((last-event (and (vectorp key)
+                            (aref key (1- (length key))))))
+       (princ (format (cond (insert
+                             "%s (%s)")
+                            ((or (button-press-event-p last-event)
+                                 (button-release-event-p last-event))
+                             (gettext "%s at that spot runs the command %s"))
+                            (t
+                             (gettext "%s runs the command %s")))
+                      ;; This used to say 'This menu item' but it
+                      ;; could also be a scrollbar event.  We can't
+                      ;; distinguish at the moment.
+                      (if menup
+                          (if insert "item" "This item")
+                        (key-description key))
+                      (if (symbolp defn) defn (prin1-to-string defn))))))))
+
+;; #### this is a horrible piece of shit function that should
+;; not exist.  In FSF 19.30 this function has gotten three times
+;; as long and has tons and tons of dumb shit checking
+;; special-display-buffer-names and such crap.  I absolutely
+;; refuse to insert that Ebolification here.  I wanted to delete
+;; this function entirely but Mly bitched.
+;;
+;; If your user-land code calls this function, rewrite it to
+;; call with-displaying-help-buffer.
+
+(defun print-help-return-message (&optional function)
+  "Display or return message saying how to restore windows after help command.
+Computes a message and applies the optional argument FUNCTION to it.
+If FUNCTION is nil, applies `message' to it, thus printing it."
+  (and (not (get-buffer-window standard-output))
+       (funcall
+       (or function 'message)
+       (concat
+         (substitute-command-keys
+          (if (one-window-p t)
+              (if pop-up-windows
+                  (gettext "Type \\[delete-other-windows] to remove help window.")
+                (gettext "Type \\[switch-to-buffer] RET to remove help window."))
+   (gettext "Type \\[switch-to-buffer-other-window] RET to restore the other window.")))
+         (substitute-command-keys
+          (gettext "  \\[scroll-other-window] to scroll the help."))))))
+
+(defcustom help-selects-help-window t
+  "*If nil, use the \"old Emacs\" behavior for Help buffers.
+This just displays the buffer in another window, rather than selecting
+the window."
+  :type 'boolean
+  :group 'help-appearance)
+
+(defcustom help-max-help-buffers 10
+  "*Maximum help buffers to allow before they start getting killed.
+If this is a positive integer, before a help buffer is displayed
+by `with-displaying-help-buffer', any excess help buffers which
+are not being displayed are first killed.  Otherwise, if it is
+zero or nil, only one help buffer, \"*Help*\" is ever used."
+  :type '(choice integer (const :tag "None" nil))
+  :group 'help-appearance)
+
+(defvar help-buffer-list nil
+  "List of help buffers used by `help-register-and-maybe-prune-excess'")
+
+(defun help-register-and-maybe-prune-excess (newbuf)
+  "Register use of a help buffer and possibly kill any excess ones."
+  ;; remove new buffer from list
+  (setq help-buffer-list (remove newbuf help-buffer-list))
+  ;; maybe kill excess help buffers
+  (if (and (integerp help-max-help-buffers)
+           (> (length help-buffer-list) help-max-help-buffers))
+      (let ((keep-list nil)
+            (num-kill (- (length help-buffer-list)
+                         help-max-help-buffers)))
+        (while help-buffer-list
+          (let ((buf (car help-buffer-list)))
+            (if (and (or (equal buf newbuf) (get-buffer buf))
+                     (string-match "^*Help" buf)
+                     (save-excursion (set-buffer buf)
+                                     (eq major-mode 'help-mode)))
+                (if (and (>= num-kill (length help-buffer-list))
+                         (not (get-buffer-window buf t t)))
+                    (kill-buffer buf)
+                  (setq keep-list (cons buf keep-list)))))
+          (setq help-buffer-list (cdr help-buffer-list)))
+        (setq help-buffer-list (nreverse keep-list))))
+  ;; push new buffer
+  (setq help-buffer-list (cons newbuf help-buffer-list)))
+
+(defvar help-buffer-prefix-string "Help"
+  "Initial string to use in constructing help buffer names.
+You should never set this directory, only let-bind it.")
+
+(defun help-buffer-name (name)
+  "Return a name for a Help buffer using string NAME for context."
+  (if (and (integerp help-max-help-buffers)
+           (> help-max-help-buffers 0)
+           (stringp name))
+      (format "*%s: %s*" help-buffer-prefix-string name)
+    (format "*%s*" help-buffer-prefix-string)))
+
+;; Use this function for displaying help when C-h something is pressed
+;; or in similar situations.  Do *not* use it when you are displaying
+;; a help message and then prompting for input in the minibuffer --
+;; this macro usually selects the help buffer, which is not what you
+;; want in those situations.
+
+;; #### Should really be a macro to eliminate the requirement of
+;; caller to code a lambda form in THUNK -- mrb
+
+;; #### BEFORE you rush to make this a macro, think about backward
+;; compatibility.  The right way would be to create a macro with
+;; another name (which is a shame, because w-d-h-b is a perfect name
+;; for a macro) that uses with-displaying-help-buffer internally.
+
+(defun with-displaying-help-buffer (thunk &optional name)
+  "Form which makes a help buffer with given NAME and evaluates BODY there.
+The actual name of the buffer is generated by the function `help-buffer-name'."
+  (let* ((winconfig (current-window-configuration))
+        (was-one-window (one-window-p))
+        (buffer-name (help-buffer-name name))
+        (help-not-visible
+         (not (and (windows-of-buffer buffer-name) ;shortcut
+                   (memq (selected-frame)
+                         (mapcar 'window-frame
+                                 (windows-of-buffer buffer-name)))))))
+    (help-register-and-maybe-prune-excess buffer-name)
+    (prog1 (with-output-to-temp-buffer buffer-name
+            (prog1 (funcall thunk)
+              (save-excursion
+                (set-buffer standard-output)
+                (help-mode))))
+      (let ((helpwin (get-buffer-window buffer-name)))
+       (when helpwin
+         (with-current-buffer (window-buffer helpwin)
+           ;; If the *Help* buffer is already displayed on this
+           ;; frame, don't override the previous configuration
+           (when help-not-visible
+             (set-frame-property (selected-frame)
+                                 'help-window-config winconfig)))
+         (when help-selects-help-window
+           (select-window helpwin))
+         (cond ((eq helpwin (selected-window))
+                (display-message 'command
+                  (substitute-command-keys "Type \\[help-mode-quit] to remove help window, \\[scroll-up] to scroll the help.")))
+               (was-one-window
+                (display-message 'command
+                  (substitute-command-keys "Type \\[delete-other-windows] to remove help window, \\[scroll-other-window] to scroll the help.")))
+               (t
+                (display-message 'command
+                  (substitute-command-keys "Type \\[switch-to-buffer-other-window] to restore the other window, \\[scroll-other-window] to scroll the help.")))))))))
+
+(defun describe-key (key)
+  "Display documentation of the function invoked by KEY.
+KEY is a string, or vector of events.
+When called interactively, KEY may also be a menu selection."
+  (interactive "kDescribe key: ")
+  (let ((defn (key-or-menu-binding key))
+       (key-string (key-description key)))
+    (if (or (null defn) (integerp defn))
+        (message "%s is undefined" key-string)
+      (with-displaying-help-buffer
+       (lambda ()
+        (princ key-string)
+        (princ " runs ")
+        (if (symbolp defn)
+            (princ (format "`%s'" defn))
+          (princ defn))
+        (princ "\n\n")
+        (cond ((or (stringp defn) (vectorp defn))
+               (let ((cmd (key-binding defn)))
+                 (if (not cmd)
+                     (princ "a keyboard macro")
+                   (progn
+                     (princ "a keyboard macro which runs the command ")
+                     (princ cmd)
+                     (princ ":\n\n")
+                     (if (documentation cmd) (princ (documentation cmd)))))))
+              ((and (consp defn) (not (eq 'lambda (car-safe defn))))
+               (let ((describe-function-show-arglist nil))
+                 (describe-function-1 (car defn))))
+              ((symbolp defn)
+               (describe-function-1 defn))
+              ((documentation defn)
+               (princ (documentation defn)))
+              (t
+               (princ "not documented"))))
+       (format "key `%s'" key-string)))))
+
+(defun describe-mode ()
+  "Display documentation of current major mode and minor modes.
+For this to work correctly for a minor mode, the mode's indicator variable
+\(listed in `minor-mode-alist') must also be a function whose documentation
+describes the minor mode."
+  (interactive)
+  (with-displaying-help-buffer
+   (lambda ()
+     ;; XEmacs change: print the major-mode documentation before
+     ;; the minor modes.
+     (princ mode-name)
+     (princ " mode:\n")
+     (princ (documentation major-mode))
+     (princ "\n\n----\n\n")
+     (let ((minor-modes minor-mode-alist))
+       (while minor-modes
+        (let* ((minor-mode (car (car minor-modes)))
+               (indicator (car (cdr (car minor-modes)))))
+          ;; Document a minor mode if it is listed in minor-mode-alist,
+          ;; bound locally in this buffer, non-nil, and has a function
+          ;; definition.
+          (if (and (boundp minor-mode)
+                   (symbol-value minor-mode)
+                   (fboundp minor-mode))
+              (let ((pretty-minor-mode minor-mode))
+                (if (string-match "-mode\\'" (symbol-name minor-mode))
+                    (setq pretty-minor-mode
+                          (capitalize
+                           (substring (symbol-name minor-mode)
+                                      0 (match-beginning 0)))))
+                (while (and (consp indicator) (extentp (car indicator)))
+                  (setq indicator (cdr indicator)))
+                (while (and indicator (symbolp indicator))
+                  (setq indicator (symbol-value indicator)))
+                (princ (format "%s minor mode (indicator%s):\n"
+                               pretty-minor-mode indicator))
+                (princ (documentation minor-mode))
+                (princ "\n\n----\n\n"))))
+        (setq minor-modes (cdr minor-modes)))))
+   (format "%s mode" mode-name)))
+
+;; So keyboard macro definitions are documented correctly
+(fset 'defining-kbd-macro (symbol-function 'start-kbd-macro))
+
+(defun describe-distribution ()
+  "Display info on how to obtain the latest version of XEmacs."
+  (interactive)
+  (find-file-read-only
+   (locate-data-file "DISTRIB")))
+
+(defun describe-beta ()
+  "Display info on how to deal with Beta versions of XEmacs."
+  (interactive)
+  (find-file-read-only
+   (locate-data-file "BETA"))
+  (goto-char (point-min)))
+
+(defun describe-copying ()
+  "Display info on how you may redistribute copies of XEmacs."
+  (interactive)
+  (find-file-read-only
+   (locate-data-file "COPYING"))
+  (goto-char (point-min)))
+
+(defun describe-pointer ()
+  "Show a list of all defined mouse buttons, and their definitions."
+  (interactive)
+  (describe-bindings nil t))
+
+(defun describe-project ()
+  "Display info on the GNU project."
+  (interactive)
+  (find-file-read-only
+   (locate-data-file "GNU"))
+  (goto-char (point-min)))
+
+(defun describe-no-warranty ()
+  "Display info on all the kinds of warranty XEmacs does NOT have."
+  (interactive)
+  (describe-copying)
+  (let (case-fold-search)
+    (search-forward "NO WARRANTY")
+    (recenter 0)))
+
+(defun describe-bindings (&optional prefix mouse-only-p)
+  "Show a list of all defined keys, and their definitions.
+The list is put in a buffer, which is displayed.
+If the optional argument PREFIX is supplied, only commands which
+start with that sequence of keys are described.
+If the second argument (prefix arg, interactively) is non-null
+then only the mouse bindings are displayed."
+  (interactive (list nil current-prefix-arg))
+  (with-displaying-help-buffer
+   (lambda ()
+     (describe-bindings-1 prefix mouse-only-p))
+   (format "bindings for %s" major-mode)))
+
+(defun describe-bindings-1 (&optional prefix mouse-only-p)
+  (let ((heading (if mouse-only-p
+            (gettext "button          binding\n------          -------\n")
+            (gettext "key             binding\n---             -------\n")))
+        (buffer (current-buffer))
+        (minor minor-mode-map-alist)
+        (local (current-local-map))
+        (shadow '()))
+    (set-buffer standard-output)
+    (while minor
+      (let ((sym (car (car minor)))
+            (map (cdr (car minor))))
+        (if (symbol-value-in-buffer sym buffer nil)
+            (progn
+              (insert (format "Minor Mode Bindings for `%s':\n"
+                              sym)
+                      heading)
+              (describe-bindings-internal map nil shadow prefix mouse-only-p)
+              (insert "\n")
+              (setq shadow (cons map shadow))))
+        (setq minor (cdr minor))))
+    (if local
+        (progn
+          (insert "Local Bindings:\n" heading)
+          (describe-bindings-internal local nil shadow prefix mouse-only-p)
+          (insert "\n")
+          (setq shadow (cons local shadow))))
+    (insert "Global Bindings:\n" heading)
+    (describe-bindings-internal (current-global-map)
+                                nil shadow prefix mouse-only-p)
+    (when (and prefix function-key-map (not mouse-only-p))
+      (insert "\nFunction key map translations:\n" heading)
+      (describe-bindings-internal function-key-map nil nil
+                                 prefix mouse-only-p))
+    (set-buffer buffer)
+    standard-output))
+
+(defun describe-prefix-bindings ()
+  "Describe the bindings of the prefix used to reach this command.
+The prefix described consists of all but the last event
+of the key sequence that ran this command."
+  (interactive)
+  (let* ((key (this-command-keys))
+        (prefix (make-vector (1- (length key)) nil))
+        i)
+    (setq i 0)
+    (while (< i (length prefix))
+      (aset prefix i (aref key i))
+      (setq i (1+ i)))
+    (with-displaying-help-buffer
+     (lambda ()
+       (princ "Key bindings starting with ")
+       (princ (key-description prefix))
+       (princ ":\n\n")
+       (describe-bindings-1 prefix nil))
+     (format "%s prefix" (key-description prefix)))))
+
+;; Make C-h after a prefix, when not specifically bound,
+;; run describe-prefix-bindings.
+(setq prefix-help-command 'describe-prefix-bindings)
+
+(defun describe-installation ()
+  "Display a buffer showing information about this XEmacs was compiled."
+  (interactive)
+  (if (and (boundp 'Installation-string)
+          (stringp Installation-string))
+      (with-displaying-help-buffer
+       (lambda ()
+        (princ Installation-string))
+       "Installation")
+    (error "No Installation information available.")))
+
+(defun view-emacs-news ()
+  "Display info on recent changes to XEmacs."
+  (interactive)
+  (find-file (locate-data-file "NEWS")))
+
+(defun xemacs-www-page ()
+  "Go to the XEmacs World Wide Web page."
+  (interactive)
+  (if (boundp 'browse-url-browser-function)
+      (funcall browse-url-browser-function "http://www.xemacs.org/")
+    (error "xemacs-www-page requires browse-url")))
+
+(defun xemacs-www-faq ()
+  "View the latest and greatest XEmacs FAQ using the World Wide Web."
+  (interactive)
+  (if (boundp 'browse-url-browser-function)
+      (funcall browse-url-browser-function
+              "http://www.xemacs.org/faq/index.html")
+    (error "xemacs-www-faq requires browse-url")))
+
+(defun xemacs-local-faq ()
+  "View the local copy of the XEmacs FAQ.
+If you have access to the World Wide Web, you should use `xemacs-www-faq'
+instead, to ensure that you get the most up-to-date information."
+  (interactive)
+  (save-window-excursion
+    (info)
+    (Info-find-node "xemacs-faq" "Top"))
+  (switch-to-buffer "*info*"))
+
+(defcustom view-lossage-key-count 100
+  "*Number of keys `view-lossage' shows.
+The maximum number of available keys is governed by `recent-keys-ring-size'."
+  :type 'integer
+  :group 'help)
+
+(defcustom view-lossage-message-count 100
+  "*Number of minibuffer messages `view-lossage' shows."
+  :type 'integer
+  :group 'help)
+
+(defun print-recent-messages (n)
+  "Print N most recent messages to standard-output, most recent first.
+If N is nil, all messages will be printed."
+  (save-excursion
+    (let ((buffer (get-buffer-create " *Message-Log*"))
+         oldpoint extent)
+      (goto-char (point-max buffer) buffer)
+      (set-buffer standard-output)
+      (while (and (not (bobp buffer))
+                 (or (null n) (>= (decf n) 0)))
+       (setq oldpoint (point buffer))
+       (setq extent (extent-at oldpoint buffer
+                               'message-multiline nil 'before))
+       ;; If the message was multiline, move all the way to the
+       ;; beginning.
+       (if extent
+           (goto-char (extent-start-position extent) buffer)
+         (forward-line -1 buffer))
+       (insert-buffer-substring buffer (point buffer) oldpoint)))))
+
+(defun view-lossage ()
+  "Display recent input keystrokes and recent minibuffer messages.
+The number of keys shown is controlled by `view-lossage-key-count'.
+The number of messages shown is controlled by `view-lossage-message-count'."
+  (interactive)
+  (with-displaying-help-buffer
+   (lambda ()
+     (princ (key-description (recent-keys view-lossage-key-count)))
+     (save-excursion
+       (set-buffer standard-output)
+       (goto-char (point-min))
+       (insert "Recent keystrokes:\n\n")
+       (while (progn (move-to-column 50) (not (eobp)))
+        (search-forward " " nil t)
+        (insert "\n")))
+     ;; XEmacs addition: copy the messages from " *Message-Log*",
+     ;; reversing their order and handling multiline messages
+     ;; correctly.
+     (princ "\n\n\nRecent minibuffer messages (most recent first):\n\n")
+     (print-recent-messages view-lossage-message-count))
+   "lossage"))
+
+(define-function 'help 'help-for-help)
+
+(make-help-screen help-for-help
+  "A B C F I K L M N P S T V W C-c C-d C-f C-i C-k C-n C-w;  ? for more help:"
+  "Type a Help option:
+\(Use SPC or DEL to scroll through this text.  Type \\<help-map>\\[help-quit] to exit the Help command.)
+
+\\[hyper-apropos]      Type a substring; it shows a hypertext list of
+        functions and variables that contain that substring.
+       See also the `apropos' command.
+\\[command-apropos]    Type a substring; it shows a list of commands
+        (interactively callable functions) that contain that substring.
+\\[describe-bindings]  Table of all key bindings.
+\\[describe-key-briefly]       Type a command key sequence;
+        it displays the function name that sequence runs.
+\\[customize]  Customize Emacs options.
+\\[Info-goto-emacs-command-node]       Type a function name; it displays the Info node for that command.
+\\[describe-function]  Type a function name; it shows its documentation.
+\\[Info-elisp-ref]     Type a function name; it jumps to the full documentation
+       in the XEmacs Lisp Programmer's Manual.
+\\[xemacs-local-faq]   Local copy of the XEmacs FAQ.
+\\[info]       Info documentation reader.
+\\[Info-query] Type an Info file name; it displays it in Info reader.
+\\[describe-key]       Type a command key sequence;
+        it displays the documentation for the command bound to that key.
+\\[Info-goto-emacs-key-command-node]   Type a command key sequence;
+        it displays the Info node for the command bound to that key.
+\\[view-lossage]       Recent input keystrokes and minibuffer messages.
+\\[describe-mode]      Documentation of current major and minor modes.
+\\[view-emacs-news]    News of recent XEmacs changes.
+\\[finder-by-keyword]  Type a topic keyword; it finds matching packages.
+\\[describe-pointer]   Table of all mouse-button bindings.
+\\[describe-syntax]    Contents of syntax table with explanations.
+\\[help-with-tutorial] XEmacs learn-by-doing tutorial.
+\\[describe-variable]  Type a variable name; it displays its documentation and value.
+\\[where-is]   Type a command name; it displays which keystrokes invoke that command.
+\\[describe-distribution]      XEmacs ordering information.
+\\[describe-no-warranty]       Information on absence of warranty for XEmacs.
+\\[describe-copying]   XEmacs copying permission (General Public License)."
+  help-map)
+
+(defmacro with-syntax-table (syntab &rest body)
+  "Evaluate BODY with the syntax-table SYNTAB"
+  `(let ((stab (syntax-table)))
+     (unwind-protect
+        (progn
+          (set-syntax-table (copy-syntax-table ,syntab))
+          ,@body)
+       (set-syntax-table stab))))
+(put 'with-syntax-table 'lisp-indent-function 1)
+(put 'with-syntax-table 'edebug-form-spec '(form body))
+
+(defun function-called-at-point ()
+  "Return the function which is called by the list containing point.
+If that gives no function, return the function whose name is around point.
+If that doesn't give a function, return nil."
+  (or (ignore-errors
+       (save-excursion
+         (save-restriction
+           (narrow-to-region (max (point-min) (- (point) 1000))
+                             (point-max))
+           (backward-up-list 1)
+           (forward-char 1)
+           (let (obj)
+             (setq obj (read (current-buffer)))
+             (and (symbolp obj) (fboundp obj) obj)))))
+      (ignore-errors
+       (with-syntax-table emacs-lisp-mode-syntax-table
+         (save-excursion
+           (or (not (zerop (skip-syntax-backward "_w")))
+               (eq (char-syntax (char-after (point))) ?w)
+               (eq (char-syntax (char-after (point))) ?_)
+               (forward-sexp -1))
+           (skip-chars-forward "`'")
+           (let ((obj (read (current-buffer))))
+             (and (symbolp obj) (fboundp obj) obj)))))))
+
+(defun function-at-point ()
+  "Return the function whose name is around point.
+If that gives no function, return the function which is called by the
+list containing point.  If that doesn't give a function, return nil."
+  (or (ignore-errors
+       (with-syntax-table emacs-lisp-mode-syntax-table
+         (save-excursion
+           (or (not (zerop (skip-syntax-backward "_w")))
+               (eq (char-syntax (char-after (point))) ?w)
+               (eq (char-syntax (char-after (point))) ?_)
+               (forward-sexp -1))
+           (skip-chars-forward "`'")
+           (let ((obj (read (current-buffer))))
+             (and (symbolp obj) (fboundp obj) obj)))))
+      (ignore-errors
+       (save-excursion
+         (save-restriction
+           (narrow-to-region (max (point-min) (- (point) 1000))
+                             (point-max))
+           (backward-up-list 1)
+           (forward-char 1)
+           (let (obj)
+             (setq obj (read (current-buffer)))
+             (and (symbolp obj) (fboundp obj) obj)))))))
+
+;; Default to nil for the non-hackers?  Not until we find a way to
+;; distinguish hackers from non-hackers automatically!
+(defcustom describe-function-show-arglist t
+  "*If non-nil, describe-function will show its arglist,
+unless the function is autoloaded."
+  :type 'boolean
+  :group 'help-appearance)
+
+(defun describe-symbol-find-file (function)
+  (let ((files load-history)
+       file)
+    (while files
+      (if (memq function (cdr (car files)))
+         (setq file (car (car files))
+               files nil))
+      (setq files (cdr files)))
+    file))
+(define-obsolete-function-alias
+  'describe-function-find-file
+  'describe-symbol-find-file)
+
+(defun describe-function (function)
+  "Display the full documentation of FUNCTION (a symbol).
+When run interactively, it defaults to any function found by
+`function-at-point'."
+  (interactive
+    (let* ((fn (function-at-point))
+           (val (let ((enable-recursive-minibuffers t))
+                  (completing-read
+                    (if fn
+                        (format (gettext "Describe function (default %s): ")
+                               fn)
+                        (gettext "Describe function: "))
+                    obarray 'fboundp t nil 'function-history))))
+      (list (if (equal val "") fn (intern val)))))
+  (with-displaying-help-buffer
+   (lambda ()
+     (describe-function-1 function)
+     ;; Return the text we displayed.
+     (buffer-string nil nil standard-output))
+    (format "function `%s'" function)))
+
+(defun function-obsolete-p (function)
+  "Return non-nil if FUNCTION is obsolete."
+  (not (null (get function 'byte-obsolete-info))))
+
+(defun function-obsoleteness-doc (function)
+  "If FUNCTION is obsolete, return a string describing this."
+  (let ((obsolete (get function 'byte-obsolete-info)))
+    (if obsolete
+       (format "Obsolete; %s"
+               (if (stringp (car obsolete))
+                   (car obsolete)
+                 (format "use `%s' instead." (car obsolete)))))))
+
+(defun function-compatible-p (function)
+  "Return non-nil if FUNCTION is present for Emacs compatibility."
+  (not (null (get function 'byte-compatible-info))))
+
+(defun function-compatibility-doc (function)
+  "If FUNCTION is Emacs compatible, return a string describing this."
+  (let ((compatible (get function 'byte-compatible-info)))
+    (if compatible
+       (format "Emacs Compatible; %s"
+               (if (stringp (car compatible))
+                   (car compatible)
+                 (format "use `%s' instead." (car compatible)))))))
+
+;Here are all the possibilities below spelled out, for the benefit
+;of the I18N3 snarfer.
+;
+;(gettext "a built-in function")
+;(gettext "an interactive built-in function")
+;(gettext "a built-in macro")
+;(gettext "an interactive built-in macro")
+;(gettext "a compiled Lisp function")
+;(gettext "an interactive compiled Lisp function")
+;(gettext "a compiled Lisp macro")
+;(gettext "an interactive compiled Lisp macro")
+;(gettext "a Lisp function")
+;(gettext "an interactive Lisp function")
+;(gettext "a Lisp macro")
+;(gettext "an interactive Lisp macro")
+;(gettext "a mocklisp function")
+;(gettext "an interactive mocklisp function")
+;(gettext "a mocklisp macro")
+;(gettext "an interactive mocklisp macro")
+;(gettext "an autoloaded Lisp function")
+;(gettext "an interactive autoloaded Lisp function")
+;(gettext "an autoloaded Lisp macro")
+;(gettext "an interactive autoloaded Lisp macro")
+
+;; taken out of `describe-function-1'
+(defun function-arglist (function)
+  "Return a string giving the argument list of FUNCTION.
+For example:
+
+       (function-arglist 'function-arglist)
+       => (function-arglist FUNCTION)
+
+This function is used by `describe-function-1' to list function
+arguments in the standard Lisp style."
+  (let* ((fndef (indirect-function function))
+        (arglist
+        (cond ((compiled-function-p fndef)
+               (compiled-function-arglist fndef))
+              ((eq (car-safe fndef) 'lambda)
+               (nth 1 fndef))
+              ((subrp fndef)
+               (let* ((doc (documentation function))
+                      (args (and (string-match
+                                  "[\n\t ]*\narguments: ?(\\(.*\\))\n?\\'"
+                                  doc)
+                                 (match-string 1 doc))))
+                 ;; If there are no arguments documented for the
+                 ;; subr, rather don't print anything.
+                 (cond ((null args) t)
+                       ((equal args "") nil)
+                       (args))))
+              (t t))))
+    (cond ((listp arglist)
+          (prin1-to-string
+           (cons function (mapcar (lambda (arg)
+                                    (if (memq arg '(&optional &rest))
+                                        arg
+                                      (intern (upcase (symbol-name arg)))))
+                                  arglist))
+           t))
+         ((stringp arglist)
+          (format "(%s %s)" function arglist)))))
+
+(defun function-documentation (function &optional strip-arglist)
+  "Return a string giving the documentation for FUNCTION, if any.
+If the optional argument STRIP-ARGLIST is non-nil, remove the arglist
+part of the documentation of internal subroutines."
+  (let ((doc (condition-case nil
+                (or (documentation function)
+                    (gettext "not documented"))
+              (void-function ""))))
+    (if (and strip-arglist
+            (string-match "[\n\t ]*\narguments: ?(\\(.*\\))\n?\\'" doc))
+       (setq doc (substring doc 0 (match-beginning 0))))
+    doc))
+
+(defun describe-function-1 (function &optional nodoc)
+  "This function does the work for `describe-function'."
+  (princ (format "`%s' is " function))
+  (let* ((def function)
+        aliases file-name autoload-file kbd-macro-p fndef macrop)
+    (while (and (symbolp def) (fboundp def))
+      (when (not (eq def function))
+       (setq aliases
+             (if aliases
+                 ;; I18N3 Need gettext due to concat
+                 (concat aliases
+                         (format
+                          "\n     which is an alias for `%s', "
+                          (symbol-name def)))
+               (format "an alias for `%s', " (symbol-name def)))))
+      (setq def (symbol-function def)))
+    (if (and (fboundp 'compiled-function-annotation)
+            (compiled-function-p def))
+       (setq file-name (compiled-function-annotation def)))
+    (if (eq 'macro (car-safe def))
+       (setq fndef (cdr def)
+             file-name (and (compiled-function-p (cdr def))
+                            (fboundp 'compiled-function-annotation)
+                            (compiled-function-annotation (cdr def)))
+             macrop t)
+      (setq fndef def))
+    (if aliases (princ aliases))
+    (let ((int #'(lambda (string an-p macro-p)
+                  (princ (format
+                          (gettext (concat
+                                    (cond ((commandp def)
+                                           "an interactive ")
+                                          (an-p "an ")
+                                          (t "a "))
+                                    "%s"
+                                    (if macro-p " macro" " function")))
+                          string)))))
+      (cond ((or (stringp def) (vectorp def))
+             (princ "a keyboard macro.")
+            (setq kbd-macro-p t))
+            ((subrp fndef)
+             (funcall int "built-in" nil macrop))
+            ((compiled-function-p fndef)
+             (funcall int "compiled Lisp" nil macrop))
+            ((eq (car-safe fndef) 'lambda)
+             (funcall int "Lisp" nil macrop))
+            ((eq (car-safe fndef) 'mocklisp)
+             (funcall int "mocklisp" nil macrop))
+            ((eq (car-safe def) 'autoload)
+            (setq autoload-file (elt def 1))
+            (funcall int "autoloaded Lisp" t (elt def 4)))
+           ((and (symbolp def) (not (fboundp def)))
+            (princ "a symbol with a void (unbound) function definition."))
+            (t
+             nil)))
+    (princ "\n")
+    (if autoload-file
+       (princ (format "  -- autoloads from \"%s\"\n" autoload-file)))
+    (or file-name
+       (setq file-name (describe-symbol-find-file function)))
+    (if file-name
+       (princ (format "  -- loaded from \"%s\"\n" file-name)))
+;;     (terpri)
+    (if describe-function-show-arglist
+       (let ((arglist (function-arglist function)))
+         (when arglist
+           (princ arglist)
+           (terpri))))
+    (terpri)
+    (cond (kbd-macro-p
+          (princ "These characters are executed:\n\n\t")
+          (princ (key-description def))
+          (cond ((setq def (key-binding def))
+                 (princ (format "\n\nwhich executes the command `%s'.\n\n"
+                                def))
+                 (describe-function-1 def))))
+         (nodoc nil)
+         (t
+          ;; tell the user about obsoleteness.
+          ;; If the function is obsolete and is aliased, don't
+          ;; even bother to report the documentation, as a further
+          ;; encouragement to use the new function.
+          (let ((obsolete (function-obsoleteness-doc function))
+                (compatible (function-compatibility-doc function)))
+            (when obsolete
+              (princ obsolete)
+              (terpri)
+              (terpri))
+            (when compatible
+              (princ compatible)
+              (terpri)
+              (terpri))
+            (unless (and obsolete aliases)
+              (let ((doc (function-documentation function t)))
+                (princ "Documentation:\n")
+                (princ doc)
+                (unless (or (equal doc "")
+                            (eq ?\n (aref doc (1- (length doc)))))
+                  (terpri)))))))))
+
+
+;;; [Obnoxious, whining people who complain very LOUDLY on Usenet
+;;; are binding this to keys.]
+(defun describe-function-arglist (function)
+  (interactive (list (or (function-at-point)
+                        (error "no function call at point"))))
+  (message nil)
+  (message (function-arglist function)))
+
+
+(defun variable-at-point ()
+  (ignore-errors
+    (with-syntax-table emacs-lisp-mode-syntax-table
+      (save-excursion
+       (or (not (zerop (skip-syntax-backward "_w")))
+           (eq (char-syntax (char-after (point))) ?w)
+           (eq (char-syntax (char-after (point))) ?_)
+           (forward-sexp -1))
+       (skip-chars-forward "'")
+       (let ((obj (read (current-buffer))))
+         (and (symbolp obj) (boundp obj) obj))))))
+
+(defun variable-obsolete-p (variable)
+  "Return non-nil if VARIABLE is obsolete."
+  (not (null (get variable 'byte-obsolete-variable))))
+
+(defun variable-obsoleteness-doc (variable)
+  "If VARIABLE is obsolete, return a string describing this."
+  (let ((obsolete (get variable 'byte-obsolete-variable)))
+    (if obsolete
+       (format "Obsolete; %s"
+               (if (stringp obsolete)
+                   obsolete
+                 (format "use `%s' instead." obsolete))))))
+
+(defun variable-compatible-p (variable)
+  "Return non-nil if VARIABLE is Emacs compatible."
+  (not (null (get variable 'byte-compatible-variable))))
+
+(defun variable-compatibility-doc (variable)
+  "If VARIABLE is Emacs compatible, return a string describing this."
+  (let ((compatible (get variable 'byte-compatible-variable)))
+    (if compatible
+       (format "Emacs Compatible; %s"
+               (if (stringp compatible)
+                   compatible
+                 (format "use `%s' instead." compatible))))))
+
+(defun built-in-variable-doc (variable)
+  "Return a string describing whether VARIABLE is built-in."
+  (let ((type (built-in-variable-type variable)))
+    (case type
+      (integer "a built-in integer variable")
+      (const-integer "a built-in constant integer variable")
+      (boolean "a built-in boolean variable")
+      (const-boolean "a built-in constant boolean variable")
+      (object "a simple built-in variable")
+      (const-object "a simple built-in constant variable")
+      (const-specifier "a built-in constant specifier variable")
+      (current-buffer "a built-in buffer-local variable")
+      (const-current-buffer "a built-in constant buffer-local variable")
+      (default-buffer "a built-in default buffer-local variable")
+      (selected-console "a built-in console-local variable")
+      (const-selected-console "a built-in constant console-local variable")
+      (default-console "a built-in default console-local variable")
+      (t
+       (if type "an unknown type of built-in variable?"
+        "a variable declared in Lisp")))))
+
+(defun describe-variable (variable)
+  "Display the full documentation of VARIABLE (a symbol)."
+  (interactive
+   (let* ((v (variable-at-point))
+          (val (let ((enable-recursive-minibuffers t))
+                 (completing-read
+                   (if v
+                       (format "Describe variable (default %s): " v)
+                       (gettext "Describe variable: "))
+                   obarray 'boundp t nil 'variable-history))))
+     (list (if (equal val "") v (intern val)))))
+  (with-displaying-help-buffer
+   (lambda ()
+     (let ((origvar variable)
+          aliases)
+       (let ((print-escape-newlines t))
+        (princ (format "`%s' is " (symbol-name variable)))
+        (while (variable-alias variable)
+          (let ((newvar (variable-alias variable)))
+            (if aliases
+                ;; I18N3 Need gettext due to concat
+                (setq aliases
+                      (concat aliases
+                              (format "\n     which is an alias for `%s',"
+                                      (symbol-name newvar))))
+              (setq aliases
+                    (format "an alias for `%s',"
+                            (symbol-name newvar))))
+            (setq variable newvar)))
+        (if aliases
+            (princ (format "%s" aliases)))
+        (princ (built-in-variable-doc variable))
+        (princ ".\n")
+        (let ((file-name (describe-symbol-find-file variable)))
+          (if file-name
+              (princ (format "  -- loaded from \"%s\"\n" file-name))))
+        (princ "\nValue: ")
+        (if (not (boundp variable))
+            (princ "void\n")
+          (prin1 (symbol-value variable))
+          (terpri))
+        (terpri)
+        (cond ((local-variable-p variable (current-buffer))
+               (let* ((void (cons nil nil))
+                      (def (condition-case nil
+                               (default-value variable)
+                             (error void))))
+                 (princ "This value is specific to the current buffer.\n")
+                 (if (local-variable-p variable nil)
+                     (princ "(Its value is local to each buffer.)\n"))
+                 (terpri)
+                 (if (if (eq def void)
+                         (boundp variable)
+                       (not (eq (symbol-value variable) def)))
+                     ;; #### I18N3 doesn't localize properly!
+                     (progn (princ "Default-value: ")
+                            (if (eq def void)
+                                (princ "void\n")
+                              (prin1 def)
+                              (terpri))
+                            (terpri)))))
+              ((local-variable-p variable (current-buffer) t)
+               (princ "Setting it would make its value buffer-local.\n\n"))))
+       (princ "Documentation:")
+       (terpri)
+       (let ((doc (documentation-property variable 'variable-documentation))
+            (obsolete (variable-obsoleteness-doc origvar))
+            (compatible (variable-compatibility-doc origvar)))
+        (when obsolete
+          (princ obsolete)
+          (terpri)
+          (terpri))
+        (when compatible
+          (princ compatible)
+          (terpri)
+          (terpri))
+        ;; don't bother to print anything if variable is obsolete and aliased.
+        (when (or (not obsolete) (not aliases))
+          (if doc
+              ;; note: documentation-property calls substitute-command-keys.
+              (princ doc)
+            (princ "not documented as a variable."))))
+       (terpri)))
+   (format "variable `%s'" variable)))
+
+(defun sorted-key-descriptions (keys &optional separator)
+  "Sort and separate the key descriptions for KEYS.
+The sorting is done by length (shortest bindings first), and the bindings
+are separated with SEPARATOR (\", \" by default)."
+  (mapconcat 'key-description
+            (sort keys #'(lambda (x y)
+                           (< (length x) (length y))))
+            (or separator ", ")))
+
+(defun where-is (definition &optional insert)
+  "Print message listing key sequences that invoke specified command.
+Argument is a command definition, usually a symbol with a function definition.
+When run interactively, it defaults to any function found by
+`function-at-point'.
+If INSERT (the prefix arg) is non-nil, insert the message in the buffer."
+  (interactive
+   (let ((fn (function-at-point))
+        (enable-recursive-minibuffers t)
+        val)
+     (setq val (read-command
+               (if fn (format "Where is command (default %s): " fn)
+                 "Where is command: ")))
+     (list (if (equal (symbol-name val) "")
+              fn val)
+          current-prefix-arg)))
+  (let ((keys (where-is-internal definition)))
+    (if keys
+       (if insert
+           (princ (format "%s (%s)" (sorted-key-descriptions keys)
+                          definition) (current-buffer))
+         (message "%s is on %s" definition (sorted-key-descriptions keys)))
+      (if insert
+         (princ (format (if (commandp definition) "M-x %s RET"
+                          "M-: (%s ...)") definition) (current-buffer))
+       (message "%s is not on any keys" definition))))
+  nil)
+
+;; `locate-library' moved to "packages.el"
+
+\f
+;; Functions ported from C into Lisp in XEmacs
+
+(defun describe-syntax ()
+  "Describe the syntax specifications in the syntax table.
+The descriptions are inserted in a buffer, which is then displayed."
+  (interactive)
+  (with-displaying-help-buffer
+   (lambda ()
+     ;; defined in syntax.el
+     (describe-syntax-table (syntax-table) standard-output))
+   (format "syntax-table for %s" major-mode)))
+
+(defun list-processes ()
+  "Display a list of all processes.
+\(Any processes listed as Exited or Signaled are actually eliminated
+after the listing is made.)"
+  (interactive)
+  (with-output-to-temp-buffer "*Process List*"
+    (set-buffer standard-output)
+    (buffer-disable-undo standard-output)
+    (make-local-variable 'truncate-lines)
+    (setq truncate-lines t)
+    ;;      00000000001111111111222222222233333333334444444444
+    ;;      01234567890123456789012345678901234567890123456789
+    ;; rewritten for I18N3.  This one should stay rewritten
+    ;; so that the dashes will line up properly.
+    (princ "Proc         Status   Buffer         Tty         Command\n----         ------   ------         ---         -------\n")
+    (let ((tail (process-list)))
+      (while tail
+       (let* ((p (car tail))
+              (pid (process-id p))
+              (s (process-status p)))
+         (setq tail (cdr tail))
+         (princ (format "%-13s" (process-name p)))
+         ;;(if (and (eq system-type 'vax-vms)
+         ;;         (eq s 'signal)
+         ;;        (< (process-exit-status p) NSIG))
+         ;;    (princ (aref sys_errlist (process-exit-status p))))
+         (princ s)
+         (if (and (eq s 'exit) (/= (process-exit-status p) 0))
+             (princ (format " %d" (process-exit-status p))))
+         (if (memq s '(signal exit closed))
+             ;; Do delete-exited-processes' work
+             (delete-process p))
+         (indent-to 22 1)              ;####
+         (let ((b (process-buffer p)))
+           (cond ((not b)
+                  (princ "(none)"))
+                 ((not (buffer-name b))
+                  (princ "(killed)"))
+                 (t
+                  (princ (buffer-name b)))))
+         (indent-to 37 1)              ;####
+         (let ((tn (process-tty-name p)))
+           (cond ((not tn)
+                  (princ "(none)"))
+                 (t
+                  (princ (format "%s" tn)))))
+         (indent-to 49 1)              ;####
+         (if (not (integerp pid))
+             (progn
+               (princ "network stream connection ")
+               (princ (car pid))
+               (princ "@")
+               (princ (cdr pid)))
+           (let ((cmd (process-command p)))
+             (while cmd
+               (princ (car cmd))
+               (setq cmd (cdr cmd))
+               (if cmd (princ " ")))))
+         (terpri))))))
+
+;;; help.el ends here
diff --git a/lisp/hyper-apropos.el b/lisp/hyper-apropos.el
new file mode 100644 (file)
index 0000000..2839b73
--- /dev/null
@@ -0,0 +1,1311 @@
+;;; hyper-apropos.el --- Hypertext emacs lisp documentation interface.
+
+;; Copyright (C)  1997 Free Software Foundation, Inc.
+;; Copyright (C) 1994, 1995 Tinker Systems and INS Engineering Corp.
+;; Copyright (C) 1995 Sun Microsystems.
+;; Copyright (C) 1996 Ben Wing.
+
+;; Maintainer: Jonathan Stigelman <Stig@hackvan.com>
+;; Keywords: lisp, tools, help, docs, matching
+
+;; 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 of the License, 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.
+
+;;; Synched up with: Not in FSF.
+
+;;; Commentary:
+
+;;  based upon emacs-apropos.el by Frank C. Guida <fcg@philabs.philips.com>
+;;
+;;  Rather than run apropos and print all the documentation at once,
+;;  I find it easier to view a "table of contents" first, then
+;;  get the details for symbols as you need them.
+;;
+;;  This version of apropos prints two lists of symbols matching the
+;;  given regexp:  functions/macros and variables/constants.
+;;
+;;  The user can then do the following:
+;;
+;;      - add an additional regexp to narrow the search
+;;      - display documentation for the current symbol
+;;      - find the tag for the current symbol
+;;      - show any keybindings if the current symbol is a command
+;;     - invoke functions
+;;     - set variables
+;;
+;;  An additional feature is the ability to search the current tags
+;;  table, allowing you to interrogate functions not yet loaded (this
+;;  isn't available with the standard package).
+;;
+;;  Mouse bindings and menus are provided for XEmacs.
+;;
+;; additions by Ben Wing <ben@xemacs.org> July 1995:
+;; added support for function aliases, made programmer's apropos be the
+;; default, various other hacking.
+;; Massive changes by Christoph Wedler <wedler@fmi.uni-passau.de>
+;; Some changes for XEmacs 20.3 by hniksic
+
+;; ### The maintainer is supposed to be stig, but I haven't seen him
+;; around for ages.  The real maintainer for the moment is Hrvoje
+;; Niksic <hniksic@srce.hr>.
+
+;;; Code:
+
+(defgroup hyper-apropos nil
+  "Hypertext emacs lisp documentation interface."
+  :group 'docs
+  :group 'lisp
+  :group 'tools
+  :group 'help
+  :group 'matching)
+
+(defcustom hyper-apropos-show-brief-docs t
+  "*If non-nil, display some documentation in the \"*Hyper Apropos*\" buffer.
+Setting this to nil will speed up searches."
+  :type 'boolean
+  :group 'hyper-apropos)
+(define-obsolete-variable-alias
+  'hypropos-show-brief-docs 'hyper-apropos-show-brief-docs)
+;; I changed this to true because I think it's more useful this way. --ben
+
+(defcustom hyper-apropos-programming-apropos t
+  "*If non-nil, list all the functions and variables.
+This will cause more output to be generated, and take a longer time.
+
+Otherwise, only the interactive functions and user variables will be listed."
+  :type 'boolean
+  :group 'hyper-apropos)
+(define-obsolete-variable-alias
+  'hypropos-programming-apropos 'hyper-apropos-programming-apropos)
+
+(defcustom hyper-apropos-shrink-window nil
+  "*If non-nil, shrink *Hyper Help* buffer if possible."
+  :type 'boolean
+  :group 'hyper-apropos)
+(define-obsolete-variable-alias
+  'hypropos-shrink-window 'hyper-apropos-shrink-window)
+
+(defcustom hyper-apropos-prettyprint-long-values t
+  "*If non-nil, then try to beautify the printing of very long values."
+  :type 'boolean
+  :group 'hyper-apropos)
+(define-obsolete-variable-alias
+  'hypropos-prettyprint-long-values 'hyper-apropos-prettyprint-long-values)
+
+(defgroup hyper-apropos-faces nil
+  "Faces defined by hyper-apropos."
+  :prefix "hyper-apropos-"
+  :group 'faces)
+
+(defface hyper-apropos-documentation
+  '((((class color) (background light))
+     (:foreground "darkred"))
+    (((class color) (background dark))
+     (:foreground "gray90")))
+  "Hyper-apropos documentation."
+  :group 'hyper-apropos-faces)
+
+(defface hyper-apropos-hyperlink
+  '((((class color) (background light))
+     (:foreground "blue4"))
+    (((class color) (background dark))
+     (:foreground "lightseagreen"))
+    (t
+     (:bold t)))
+  "Hyper-apropos hyperlinks."
+  :group 'hyper-apropos-faces)
+
+(defface hyper-apropos-major-heading '((t (:bold t)))
+  "Hyper-apropos major heading."
+  :group 'hyper-apropos-faces)
+
+(defface hyper-apropos-section-heading '((t (:bold t :italic t)))
+  "Hyper-apropos section heading."
+  :group 'hyper-apropos-faces)
+
+(defface hyper-apropos-heading '((t (:bold t)))
+  "Hyper-apropos heading."
+  :group 'hyper-apropos-faces)
+
+(defface hyper-apropos-warning '((t (:bold t :foreground "red")))
+  "Hyper-apropos warning."
+  :group 'hyper-apropos-faces)
+
+;;; Internal variables below this point
+
+(defvar hyper-apropos-ref-buffer)
+(defvar hyper-apropos-prev-wconfig)
+
+(defvar hyper-apropos-help-map
+  (let ((map (make-sparse-keymap)))
+    (suppress-keymap map)
+    (set-keymap-name map 'hyper-apropos-help-map)
+    ;; movement
+    (define-key map " "     'scroll-up)
+    (define-key map "b"     'scroll-down)
+    (define-key map [delete] 'scroll-down)
+    (define-key map [backspace] 'scroll-down)
+    (define-key map "/"     'isearch-forward)
+    (define-key map "?"     'isearch-backward)
+    ;; follow links
+    (define-key map [return] 'hyper-apropos-get-doc)
+    (define-key map "s"     'hyper-apropos-set-variable)
+    (define-key map "t"     'hyper-apropos-find-tag)
+    (define-key map "l"     'hyper-apropos-last-help)
+    (define-key map "c"     'hyper-apropos-customize-variable)
+    (define-key map "f"     'hyper-apropos-find-function)
+    (define-key map [button2] 'hyper-apropos-mouse-get-doc)
+    (define-key map [button3] 'hyper-apropos-popup-menu)
+    ;; for the totally hardcore...
+    (define-key map "D"     'hyper-apropos-disassemble)
+    ;; administrativa
+    (define-key map "a"     'hyper-apropos)
+    (define-key map "n"     'hyper-apropos)
+    (define-key map "q"     'hyper-apropos-quit)
+    map)
+  "Keybindings for the *Hyper Help* buffer and the *Hyper Apropos* buffer")
+(define-obsolete-variable-alias
+  'hypropos-help-map 'hyper-apropos-help-map)
+
+(defvar hyper-apropos-map
+  (let ((map (make-sparse-keymap)))
+    (set-keymap-name map 'hyper-apropos-map)
+    (set-keymap-parents map (list hyper-apropos-help-map))
+    ;; slightly different scrolling...
+    (define-key map " "     'hyper-apropos-scroll-up)
+    (define-key map "b"     'hyper-apropos-scroll-down)
+    (define-key map [delete] 'hyper-apropos-scroll-down)
+    (define-key map [backspace] 'hyper-apropos-scroll-down)
+    ;; act on the current line...
+    (define-key map "w"     'hyper-apropos-where-is)
+    (define-key map "i"     'hyper-apropos-invoke-fn)
+;; this is already defined in the parent-keymap above, isn't it?
+;;     (define-key map "s"     'hyper-apropos-set-variable)
+    ;; more administrativa...
+    (define-key map "P"     'hyper-apropos-toggle-programming-flag)
+    (define-key map "k"     'hyper-apropos-add-keyword)
+    (define-key map "e"     'hyper-apropos-eliminate-keyword)
+    map)
+  "Keybindings for the *Hyper Apropos* buffer.
+This map inherits from `hyper-apropos-help-map.'")
+(define-obsolete-variable-alias
+  'hypropos-map 'hyper-apropos-map)
+
+;;(defvar hyper-apropos-mousable-keymap
+;;  (let ((map (make-sparse-keymap)))
+;;    (define-key map [button2] 'hyper-apropos-mouse-get-doc)
+;;    map))
+
+(defvar hyper-apropos-mode-hook nil
+  "*User function run after hyper-apropos mode initialization.  Usage:
+\(setq hyper-apropos-mode-hook '(lambda () ... your init forms ...)).")
+
+;; ---------------------------------------------------------------------- ;;
+
+(defconst hyper-apropos-junk-regexp
+  "^Apropos\\|^Functions\\|^Variables\\|^$")
+
+(defvar hyper-apropos-currently-showing nil)   ; symbol documented in
+                                               ; help buffer now
+(defvar hyper-apropos-help-history nil)        ; chain of symbols followed as links in
+                                       ; help buffer
+(defvar hyper-apropos-face-history nil)
+;;;(defvar hyper-apropos-variable-history nil)
+;;;(defvar hyper-apropos-function-history nil)
+(defvar hyper-apropos-regexp-history nil)
+(defvar hyper-apropos-last-regexp nil) ; regex used for last apropos
+(defconst hyper-apropos-apropos-buf "*Hyper Apropos*")
+(defconst hyper-apropos-help-buf "*Hyper Help*")
+
+;;;###autoload
+(defun hyper-apropos (regexp toggle-apropos)
+  "Display lists of functions and variables matching REGEXP
+in buffer \"*Hyper Apropos*\".  If optional prefix arg is given, then the
+value of `hyper-apropos-programming-apropos' is toggled for this search.
+See also `hyper-apropos-mode'."
+  (interactive (list (read-from-minibuffer "List symbols matching regexp: "
+                                          nil nil nil 'hyper-apropos-regexp-history)
+                    current-prefix-arg))
+  (or (memq major-mode '(hyper-apropos-mode hyper-apropos-help-mode))
+      (setq hyper-apropos-prev-wconfig (current-window-configuration)))
+  (if (string= "" regexp)
+      (if (get-buffer hyper-apropos-apropos-buf)
+         (if toggle-apropos
+             (hyper-apropos-toggle-programming-flag)
+           (message "Using last search results"))
+       (error "Be more specific..."))
+    (set-buffer (get-buffer-create hyper-apropos-apropos-buf))
+    (setq buffer-read-only nil)
+    (erase-buffer)
+    (if toggle-apropos
+       (set (make-local-variable 'hyper-apropos-programming-apropos)
+            (not (default-value 'hyper-apropos-programming-apropos))))
+    (let ((flist (apropos-internal regexp
+                                  (if hyper-apropos-programming-apropos
+                                      #'fboundp
+                                    #'commandp)))
+         (vlist (apropos-internal regexp
+                                  (if hyper-apropos-programming-apropos
+                                      #'boundp
+                                    #'user-variable-p))))
+      (insert-face (format "Apropos search for: %S\n\n" regexp)
+                  'hyper-apropos-major-heading)
+      (insert-face "* = command (M-x) or user-variable.\n"
+                  'hyper-apropos-documentation)
+      (insert-face "\
+a = autoloaded, b = byte-compiled, i = internal, l = lambda, m = macro.\n\n"
+                  'hyper-apropos-documentation)
+      (insert-face "Functions and Macros:\n\n" 'hyper-apropos-major-heading)
+      (hyper-apropos-grok-functions flist)
+      (insert-face "\n\nVariables and Constants:\n\n"
+                  'hyper-apropos-major-heading)
+      (hyper-apropos-grok-variables vlist)
+      (goto-char (point-min))))
+  (switch-to-buffer hyper-apropos-apropos-buf)
+  (hyper-apropos-mode regexp))
+
+(defun hyper-apropos-toggle-programming-flag ()
+  (interactive)
+  (with-current-buffer hyper-apropos-apropos-buf
+    (set (make-local-variable 'hyper-apropos-programming-apropos)
+        (not hyper-apropos-programming-apropos)))
+  (message "Re-running apropos...")
+  (hyper-apropos hyper-apropos-last-regexp nil))
+
+(defun hyper-apropos-grok-functions (fns)
+  (let (bind doc type)
+    (dolist (fn fns)
+      (setq bind (symbol-function fn)
+           type (cond ((subrp bind) ?i)
+                      ((compiled-function-p bind) ?b)
+                      ((consp bind) (or (cdr
+                                         (assq (car bind) '((autoload . ?a)
+                                                            (lambda . ?l)
+                                                            (macro . ?m))))
+                                        ??))
+                      (t ?\ )))
+      (insert type (if (commandp fn) "* " "  "))
+      (let ((e (insert-face (format "%S" fn) 'hyper-apropos-hyperlink)))
+       (set-extent-property e 'mouse-face 'highlight))
+      (insert-char ?\  (let ((l (- 30 (length (format "%S" fn)))))
+                        (if (natnump l) l 0)))
+      (and hyper-apropos-show-brief-docs
+          (setq doc
+          ;; A symbol's function slot can point to an unbound symbol.
+          ;; In that case, `documentation' will fail.
+                (ignore-errors
+                  (documentation fn)))
+          (if  (string-match
+                "^([^\n\t )]+[\t ]*\\([^\n)]+\\)?)\\(:[\t ]*\\|\n?\\'\\)"
+                doc)
+              (setq doc (substring doc (match-end 0) (string-match "\n" doc)))
+            t)
+          (insert-face (if doc
+                           (concat " - "
+                                   (substring doc 0 (string-match "\n" doc)))
+                         " Not documented.")
+                       'hyper-apropos-documentation))
+      (insert ?\n))))
+
+(defun hyper-apropos-grok-variables (vars)
+  (let (doc userp)
+    (dolist (var vars)
+      (setq userp (user-variable-p var))
+      (insert (if userp " * " "   "))
+      (let ((e (insert-face (format "%S" var) 'hyper-apropos-hyperlink)))
+       (set-extent-property e 'mouse-face 'highlight))
+      (insert-char ?\  (let ((l (- 30 (length (format "%S" var)))))
+                        (if (natnump l) l 0)))
+      (and hyper-apropos-show-brief-docs
+          (setq doc (documentation-property var 'variable-documentation))
+          (insert-face (if doc
+                           (concat " - " (substring doc (if userp 1 0)
+                                                    (string-match "\n" doc)))
+                         " - Not documented.")
+                       'hyper-apropos-documentation))
+      (insert ?\n))))
+
+;; ---------------------------------------------------------------------- ;;
+
+(defun hyper-apropos-mode (regexp)
+  "Improved apropos mode for displaying Emacs documentation.  Function and
+variable names are displayed in the buffer \"*Hyper Apropos*\".  
+
+Functions are preceded by a single character to indicates their types:
+    a = autoloaded, b = byte-compiled, i = internal, l = lambda, m = macro.
+Interactive functions are also preceded by an asterisk.
+Variables are preceded by an asterisk if they are user variables.
+
+General Commands:
+
+       SPC     - scroll documentation or apropos window forward
+         b     - scroll documentation or apropos window backward
+         k     - eliminate all hits that don't contain keyword
+         n     - new search
+         /     - isearch-forward
+         q     - quit and restore previous window configuration
+  
+  Operations for Symbol on Current Line:
+  
+       RET     - toggle display of symbol's documentation
+                 (also on button2 in xemacs)
+         w     - show the keybinding if symbol is a command
+         i     - invoke function on current line
+         s     - set value of variable on current line
+         t     - display the C or lisp source (find-tag)"
+  (delete-other-windows)
+  (setq mode-name "Hyper-Apropos"
+       major-mode 'hyper-apropos-mode
+       buffer-read-only t
+       truncate-lines t
+       hyper-apropos-last-regexp regexp
+       modeline-buffer-identification
+       (list (cons modeline-buffer-id-left-extent "Hyper Apropos: ")
+             (cons modeline-buffer-id-right-extent (concat "\"" regexp "\""))))
+  (use-local-map hyper-apropos-map)
+  (run-hooks 'hyper-apropos-mode-hook))
+
+;; ---------------------------------------------------------------------- ;;
+
+;; similar to `describe-key-briefly', copied from prim/help.el by CW
+
+;;;###autoload
+(defun hyper-describe-key (key)
+  (interactive "kDescribe key: ")
+  (hyper-describe-key-briefly key t))
+
+;;;###autoload
+(defun hyper-describe-key-briefly (key &optional show)
+  (interactive "kDescribe key briefly: \nP")
+  (let (menup defn interm final msg)
+    (setq defn (key-or-menu-binding key 'menup))    
+    (if (or (null defn) (integerp defn))
+        (or (numberp show) (message "%s is undefined" (key-description key)))
+      (cond ((stringp defn)
+            (setq interm defn
+                  final (key-binding defn)))
+           ((vectorp defn)
+            (setq interm (append defn nil))
+            (while (and interm
+                        (member (key-binding (vector (car interm)))
+                                '(universal-argument digit-argument)))
+              (setq interm (cdr interm)))
+            (while (and interm
+                        (not (setq final (key-binding (vconcat interm)))))
+              (setq interm (butlast interm)))
+            (if final
+                (setq interm (vconcat interm))
+              (setq interm defn 
+                    final (key-binding defn)))))
+      (setq msg (format
+                "%s runs %s%s%s"
+                ;; This used to say 'This menu item' but it could also
+                ;; be a scrollbar event.  We can't distinguish at the
+                ;; moment.
+                (if menup "This item" (key-description key))
+                ;;(if (symbolp defn) defn (key-description defn))
+                (if (symbolp defn) defn (prin1-to-string defn))
+                (if final (concat ", " (key-description interm) " runs ") "")
+                (if final
+                    (if (symbolp final) final (prin1-to-string final))
+                  "")))
+      (if (numberp show)
+         (or (not (symbolp defn))
+             (memq (symbol-function defn)
+                   '(zkey-init-kbd-macro zkey-init-kbd-fn))
+             (progn (princ msg) (princ "\n")))
+       (message "%s" msg)
+       (if final (setq defn final))
+       (if (and (or (symbolp defn) (symbolp (setq defn (car-safe defn))))
+                defn
+                show)
+           (hyper-apropos-get-doc defn t))))))
+
+;;;###autoload
+(defun hyper-describe-face (symbol &optional this-ref-buffer)
+  "Describe face..
+See also `hyper-apropos' and `hyper-describe-function'."
+  ;; #### - perhaps a prefix arg should suppress the prompt...
+  (interactive
+   (let (v val)
+     (setq v (hyper-apropos-this-symbol))      ; symbol under point
+     (or (find-face v)
+        (setq v (variable-at-point)))
+     (setq val (let ((enable-recursive-minibuffers t))
+                 (completing-read
+                 (concat (if (hyper-apropos-follow-ref-buffer current-prefix-arg)
+                             "Follow face"
+                           "Describe face")
+                         (if v
+                             (format " (default %s): " v)
+                           ": "))
+                 (mapcar (function (lambda (x) (list (symbol-name x))))
+                         (face-list))
+                 nil t nil 'hyper-apropos-face-history)))
+     (list (if (string= val "")
+              (progn (push (symbol-name v) hyper-apropos-face-history) v)
+            (intern-soft val))
+          current-prefix-arg)))
+  (if (null symbol)
+      (message "Sorry, nothing to describe.")
+    (or (memq major-mode '(hyper-apropos-mode hyper-apropos-help-mode))
+       (setq hyper-apropos-prev-wconfig (current-window-configuration)))
+    (hyper-apropos-get-doc symbol t nil this-ref-buffer)))
+
+;;;###autoload
+(defun hyper-describe-variable (symbol &optional this-ref-buffer)
+  "Hypertext drop-in replacement for `describe-variable'.
+See also `hyper-apropos' and `hyper-describe-function'."
+  ;; #### - perhaps a prefix arg should suppress the prompt...
+  (interactive (list (hyper-apropos-read-variable-symbol
+                     (if (hyper-apropos-follow-ref-buffer current-prefix-arg)
+                         "Follow variable"
+                       "Describe variable"))
+                    current-prefix-arg))
+  (if (null symbol)
+      (message "Sorry, nothing to describe.")
+    (or (memq major-mode '(hyper-apropos-mode hyper-apropos-help-mode))
+       (setq hyper-apropos-prev-wconfig (current-window-configuration)))
+    (hyper-apropos-get-doc symbol t nil this-ref-buffer)))
+
+(defun hyper-where-is (symbol)
+  "Print message listing key sequences that invoke specified command."
+  (interactive (list (hyper-apropos-read-function-symbol "Where is function")))
+  (if (null symbol)
+      (message "Sorry, nothing to describe.")
+    (where-is symbol)))
+
+;;;###autoload
+(defun hyper-describe-function (symbol &optional this-ref-buffer)
+  "Hypertext replacement for `describe-function'.  Unlike `describe-function'
+in that the symbol under the cursor is the default if it is a function.
+See also `hyper-apropos' and `hyper-describe-variable'."
+  ;; #### - perhaps a prefix arg should suppress the prompt...
+  (interactive (list (hyper-apropos-read-function-symbol
+                     (if (hyper-apropos-follow-ref-buffer current-prefix-arg)
+                         "Follow function"
+                       "Describe function"))
+                    current-prefix-arg))
+  (if (null symbol)
+      (message "Sorry, nothing to describe.")
+    (or (memq major-mode '(hyper-apropos-mode hyper-apropos-help-mode))
+       (setq hyper-apropos-prev-wconfig (current-window-configuration)))
+    (hyper-apropos-get-doc symbol t nil this-ref-buffer)))
+
+;;;###autoload
+(defun hyper-apropos-read-variable-symbol (prompt &optional predicate)
+  "Hypertext drop-in replacement for `describe-variable'.
+See also `hyper-apropos' and `hyper-describe-function'."
+  ;; #### - perhaps a prefix arg should suppress the prompt...
+  (or predicate (setq predicate 'boundp))
+  (let (v val)
+    (setq v (hyper-apropos-this-symbol))       ; symbol under point
+    (or (funcall predicate v)
+       (setq v (variable-at-point)))
+    (or (funcall predicate v)
+       (setq v nil))
+    (setq val (let ((enable-recursive-minibuffers t))
+               (completing-read
+                (concat prompt
+                        (if v
+                            (format " (default %s): " v)
+                          ": "))
+                obarray predicate t nil 'variable-history)))
+    (if (string= val "")
+       (progn (push (symbol-name v) variable-history) v)
+      (intern-soft val))))
+;;;###autoload
+(define-obsolete-function-alias
+  'hypropos-read-variable-symbol 'hyper-apropos-read-variable-symbol)
+
+(defun hyper-apropos-read-function-symbol (prompt)
+  "Read function symbol from minibuffer."
+  (let ((fn (hyper-apropos-this-symbol))
+       val)
+    (or (fboundp fn)
+       (setq fn (function-at-point)))
+    (setq val (let ((enable-recursive-minibuffers t))
+               (completing-read (if fn
+                                    (format "%s (default %s): " prompt fn)
+                                  (format "%s: " prompt))
+                                obarray 'fboundp t nil
+                                'function-history)))
+    (if (equal val "")
+       (progn (push (symbol-name fn) function-history) fn)
+      (intern-soft val))))
+
+(defun hyper-apropos-last-help (arg)
+  "Go back to the last symbol documented in the *Hyper Help* buffer."
+  (interactive "P")
+  (let ((win (get-buffer-window hyper-apropos-help-buf)))
+    (or arg (setq arg (if win 1 0)))
+    (cond ((= arg 0))
+         ((<= (length hyper-apropos-help-history) arg)
+          ;; go back as far as we can...
+          (setcdr (nreverse hyper-apropos-help-history) nil))
+         (t
+          (setq hyper-apropos-help-history
+                (nthcdr arg hyper-apropos-help-history))))
+    (if (or win (> arg 0))
+       (hyper-apropos-get-doc (car hyper-apropos-help-history) t)
+      (display-buffer hyper-apropos-help-buf))))
+
+(defun hyper-apropos-insert-face (string &optional face)
+  "Insert STRING and fontify some parts with face `hyper-apropos-hyperlink'."
+  (let ((beg (point)) end)
+    (insert-face string (or face 'hyper-apropos-documentation))
+    (setq end (point))
+    (goto-char beg)
+    (while (re-search-forward
+           "`\\([-a-zA-Z0-9_][-a-zA-Z0-9_][-a-zA-Z0-9_.]+\\)'"
+           end 'limit)
+      (let ((e (make-extent (match-beginning 1) (match-end 1))))
+       (set-extent-face e 'hyper-apropos-hyperlink)
+       (set-extent-property e 'mouse-face 'highlight)))
+    (goto-char beg)
+    (while (re-search-forward
+           "M-x \\([-a-zA-Z0-9_][-a-zA-Z0-9_][-a-zA-Z0-9_.]+\\)"
+           end 'limit)
+      (let ((e (make-extent (match-beginning 1) (match-end 1))))
+       (set-extent-face e 'hyper-apropos-hyperlink)
+       (set-extent-property e 'mouse-face 'highlight)))))
+
+(defun hyper-apropos-insert-keybinding (keys string)
+  (if keys
+      (insert "  (" string " bound to \""
+             (mapconcat 'key-description
+                        (sort* keys #'< :key #'length)
+                        "\", \"")
+             "\")\n")))
+
+(defun hyper-apropos-insert-section-heading (alias-desc &optional desc)
+  (or desc (setq desc alias-desc
+                alias-desc nil))
+  (if alias-desc
+      (setq desc (concat alias-desc
+                        (if (memq (aref desc 0)
+                                  '(?a ?e ?i ?o ?u))
+                            ", an " ", a ")
+                        desc)))
+  (aset desc 0 (upcase (aref desc 0))) ; capitalize
+  (goto-char (point-max))
+  (newline 3) (delete-blank-lines) (newline 2)
+  (hyper-apropos-insert-face desc 'hyper-apropos-section-heading))
+
+(defun hyper-apropos-insert-value (string symbol val)
+  (insert-face string 'hyper-apropos-heading)
+  (insert (if (symbol-value symbol)
+             (if (or (null val) (eq val t) (integerp val))
+                 (prog1
+                     (symbol-value symbol)
+                   (set symbol nil))
+               "see below")
+           "is void")))
+
+(defun hyper-apropos-follow-ref-buffer (this-ref-buffer) 
+  (and (not this-ref-buffer)
+       (eq major-mode 'hyper-apropos-help-mode)
+       hyper-apropos-ref-buffer
+       (buffer-live-p hyper-apropos-ref-buffer)))
+
+(defun hyper-apropos-get-alias (symbol alias-p next-symbol &optional use)
+  "Return (TERMINAL-SYMBOL . ALIAS-DESC)."
+  (let (aliases)
+    (while (funcall alias-p symbol)
+      (setq aliases (cons (if use (funcall use symbol) symbol) aliases))
+      (setq symbol (funcall next-symbol symbol)))
+    (cons symbol
+         (and aliases
+              (concat "an alias for `"
+                      (mapconcat 'symbol-name
+                                 (nreverse aliases)
+                                 "',\nwhich is an alias for `")
+                      "'")))))
+
+(defun hyper-apropos-get-doc (&optional symbol force type this-ref-buffer)
+  ;; #### - update this docstring
+  "Toggle display of documentation for the symbol on the current line."
+  ;; SYMBOL is the symbol to document.  FORCE, if non-nil, means to
+  ;; regenerate the documentation even if it already seems to be there.  And
+  ;; TYPE, if present, forces the generation of only variable documentation
+  ;; or only function documentation.  Normally, if both are present, then
+  ;; both will be generated.
+  ;;
+  ;; TYPES TO IMPLEMENT: obsolete face
+  ;;
+  (interactive)
+  (or symbol
+      (setq symbol (hyper-apropos-this-symbol)))
+  (or type
+      (setq type '(function variable face)))
+  (if (and (eq hyper-apropos-currently-showing symbol)
+          (get-buffer hyper-apropos-help-buf)
+          (get-buffer-window hyper-apropos-help-buf)
+          (not force))
+      ;; we're already displaying this help, so toggle its display.
+      (delete-windows-on hyper-apropos-help-buf)
+    ;; OK, we've got to refresh and display it...
+    (or (eq symbol (car hyper-apropos-help-history))
+       (setq hyper-apropos-help-history
+             (if (eq major-mode 'hyper-apropos-help-mode)
+                 ;; if we're following a link in the help buffer, then
+                 ;; record that in the help history.
+                 (cons symbol hyper-apropos-help-history)
+               ;; otherwise clear the history because it's a new search.
+               (list symbol))))
+    (save-excursion
+      (if (hyper-apropos-follow-ref-buffer this-ref-buffer)
+         (set-buffer hyper-apropos-ref-buffer)
+       (setq hyper-apropos-ref-buffer (current-buffer)))
+      (let (standard-output
+           ok beg
+           newsym symtype doc obsolete
+           (local mode-name)
+           global local-str global-str
+           font fore back undl
+           aliases alias-desc desc)
+       (save-excursion
+         (set-buffer (get-buffer-create hyper-apropos-help-buf))
+         ;;(setq standard-output (current-buffer))
+         (setq buffer-read-only nil)
+         (erase-buffer)
+         (insert-face (format "`%s'" symbol) 'hyper-apropos-major-heading)
+         (insert (format " (buffer: %s, mode: %s)\n"
+                         (buffer-name hyper-apropos-ref-buffer)
+                         local)))
+       ;; function ----------------------------------------------------------
+       (and (memq 'function type)
+            (fboundp symbol)
+            (progn
+              (setq ok t)
+              (setq aliases (hyper-apropos-get-alias (symbol-function symbol)
+                                                'symbolp
+                                                'symbol-function)
+                    newsym (car aliases)
+                    alias-desc (cdr aliases))
+              (if (eq 'macro (car-safe newsym))
+                  (setq desc "macro"
+                        newsym (cdr newsym))
+                (setq desc "function"))
+              (setq symtype (cond ((subrp newsym)                   'subr)
+                                  ((compiled-function-p newsym)     'bytecode)
+                                  ((eq (car-safe newsym) 'autoload) 'autoload)
+                                  ((eq (car-safe newsym) 'lambda)   'lambda))
+                    desc (concat (if (commandp symbol) "interactive ")
+                                 (cdr (assq symtype
+                                            '((subr     . "built-in ")
+                                              (bytecode . "compiled Lisp ")
+                                              (autoload . "autoloaded Lisp ")
+                                              (lambda   . "Lisp "))))
+                                 desc
+                                 (case symtype
+                                   ((autoload) (format ",\n(autoloaded from \"%s\")"
+                                                       (nth 1 newsym)))
+                                   ((bytecode) (format ",\n(loaded from \"%s\")"
+                                                       (symbol-file symbol)))))
+                    local (current-local-map)
+                    global (current-global-map)
+                    obsolete (get symbol 'byte-obsolete-info)
+                    doc (or (documentation symbol) "function not documented"))
+              (save-excursion
+                (set-buffer hyper-apropos-help-buf)
+                (goto-char (point-max))
+                (setq standard-output (current-buffer))
+                (hyper-apropos-insert-section-heading alias-desc desc)
+                (insert ":\n")
+                (if local
+                    (hyper-apropos-insert-keybinding
+                     (where-is-internal symbol (list local) nil nil nil)
+                     "locally"))
+                (hyper-apropos-insert-keybinding
+                 (where-is-internal symbol (list global) nil nil nil)
+                 "globally")
+                (insert "\n")
+                (if obsolete
+                    (hyper-apropos-insert-face
+                     (format "%s is an obsolete function; %s\n\n" symbol
+                             (if (stringp (car obsolete))
+                                 (car obsolete)
+                               (format "use `%s' instead." (car obsolete))))
+                     'hyper-apropos-warning))
+                (setq beg (point))
+                (insert-face "arguments: " 'hyper-apropos-heading)
+                (cond ((eq symtype 'lambda)
+                       (princ (or (nth 1 newsym) "()")))
+                      ((eq symtype 'bytecode)
+                       (princ (or (compiled-function-arglist newsym)
+                                  "()")))
+                      ((and (eq symtype 'subr)
+                            (string-match
+                             "[\n\t ]*\narguments: ?\\((.*)\\)\n?\\'"
+                             doc))
+                       (insert (substring doc
+                                          (match-beginning 1)
+                                          (match-end 1)))
+                       (setq doc (substring doc 0 (match-beginning 0))))
+                      ((and (eq symtype 'subr)
+                            (string-match
+                             "\
+\[\n\t ]*([^\n\t )]+[\t ]*\\([^\n)]+\\)?)\\(:[\t ]*\\|\n?\\'\\)"
+                             doc))
+                       (insert "("
+                               (if (match-end 1)
+                                   (substring doc
+                                              (match-beginning 1)
+                                              (match-end 1)))
+                               ")")
+                       (setq doc (substring doc (match-end 0))))
+                      (t (princ "[not available]")))
+                (insert "\n\n")
+                (hyper-apropos-insert-face doc)
+                (insert "\n")
+                (indent-rigidly beg (point) 2))))
+       ;; variable ----------------------------------------------------------
+       (and (memq 'variable type)
+            (or (boundp symbol) (default-boundp symbol))
+            (progn 
+              (setq ok t)
+              (setq aliases (hyper-apropos-get-alias symbol
+                                                'variable-alias
+                                                'variable-alias
+                                                'variable-alias)
+                    newsym (car aliases)
+                    alias-desc (cdr aliases))
+              (setq symtype (or (local-variable-p newsym (current-buffer))
+                                (and (local-variable-p newsym
+                                                       (current-buffer) t)
+                                     'auto-local))
+                    desc (concat (and (get newsym 'custom-type)
+                                      "customizable ")
+                                 (if (user-variable-p newsym)
+                                     "user variable"
+                                   "variable")
+                                 (cond ((eq symtype t) ", buffer-local")
+                                       ((eq symtype 'auto-local)
+                                        ", local when set")))
+                    local (and (boundp newsym)
+                               (symbol-value newsym))
+                    local-str (and (boundp newsym)
+                                   (prin1-to-string local))
+                    global (and (eq symtype t)
+                                (default-boundp newsym)
+                                (default-value newsym))
+                    global-str (and (eq symtype t)
+                                    (default-boundp newsym)
+                                    (prin1-to-string global))
+                    obsolete (get symbol 'byte-obsolete-variable)
+                    doc (or (documentation-property symbol
+                                                    'variable-documentation)
+                            "variable not documented"))
+              (save-excursion
+                (set-buffer hyper-apropos-help-buf)
+                (goto-char (point-max))
+                (setq standard-output (current-buffer))
+                (hyper-apropos-insert-section-heading alias-desc desc)
+                (when (and (user-variable-p newsym)
+                           (get newsym 'custom-type))
+                  (let ((e (make-extent (point-at-bol) (point))))
+                    (set-extent-property e 'mouse-face 'highlight)
+                    (set-extent-property e 'help-echo
+                                         (format "Customize %s" newsym))
+                    (set-extent-property
+                     e 'hyper-apropos-custom
+                     `(lambda () (customize-variable (quote ,newsym))))))
+                (insert ":\n\n")
+                (setq beg (point))
+                (if obsolete
+                    (hyper-apropos-insert-face
+                     (format "%s is an obsolete function; %s\n\n" symbol
+                             (if (stringp obsolete)
+                                 obsolete
+                               (format "use `%s' instead." obsolete)))
+                     'hyper-apropos-warning))
+                ;; generally, the value of the variable is short and the
+                ;; documentation of the variable long, so it's desirable
+                ;; to see all of the value and the start of the
+                ;; documentation.  Some variables, though, have huge and
+                ;; nearly meaningless values that force you to page
+                ;; forward just to find the doc string.  That is
+                ;; undesirable.
+                (if (and (or (null local-str) (< (length local-str) 69))
+                         (or (null global-str) (< (length global-str) 69)))
+                                       ; 80 cols.  docstrings assume this.
+                    (progn (insert-face "value: " 'hyper-apropos-heading)
+                           (insert (or local-str "is void"))
+                           (if (eq symtype t)
+                               (progn
+                                 (insert "\n")
+                                 (insert-face "default value: " 'hyper-apropos-heading)
+                                 (insert (or global-str "is void"))))
+                           (insert "\n\n")
+                           (hyper-apropos-insert-face doc))
+                  (hyper-apropos-insert-value "value: " 'local-str local)
+                  (if (eq symtype t)
+                      (progn
+                        (insert ", ")
+                        (hyper-apropos-insert-value "default-value: "
+                                               'global-str global)))
+                  (insert "\n\n")
+                  (hyper-apropos-insert-face doc)
+                  (if local-str
+                      (progn
+                        (newline 3) (delete-blank-lines) (newline 1)
+                        (insert-face "value: " 'hyper-apropos-heading)
+                        (if hyper-apropos-prettyprint-long-values
+                            (condition-case nil
+                                (cl-prettyprint local)
+                              (error (insert local-str)))
+                          (insert local-str))))
+                  (if global-str
+                      (progn
+                        (newline 3) (delete-blank-lines) (newline 1)
+                        (insert-face "default value: " 'hyper-apropos-heading)
+                        (if hyper-apropos-prettyprint-long-values
+                            (condition-case nil
+                                (cl-prettyprint global)
+                              (error (insert global-str)))
+                          (insert global-str)))))
+                (indent-rigidly beg (point) 2))))
+       ;; face --------------------------------------------------------------
+       (and (memq 'face type)
+            (find-face symbol)
+            (progn
+              (setq ok t)
+              (copy-face symbol 'hyper-apropos-temp-face 'global)
+              (mapcar (function
+                       (lambda (property)
+                         (setq symtype (face-property-instance symbol
+                                                               property))
+                         (if symtype
+                             (set-face-property 'hyper-apropos-temp-face
+                                                property
+                                                symtype))))
+                      built-in-face-specifiers)
+              (setq font (cons (face-property-instance symbol 'font nil 0 t)
+                               (face-property-instance symbol 'font))
+                    fore (cons (face-foreground-instance symbol nil 0 t)
+                               (face-foreground-instance symbol))
+                    back (cons (face-background-instance symbol nil 0 t)
+                               (face-background-instance symbol))
+                    undl (cons (face-underline-p symbol nil 0 t)
+                               (face-underline-p symbol))
+                    doc  (face-doc-string symbol))
+              ;; #### - add some code here
+              (save-excursion
+                (set-buffer hyper-apropos-help-buf)
+                (setq standard-output (current-buffer))
+                (hyper-apropos-insert-section-heading
+                 (concat "Face"
+                         (when (get symbol 'face-defface-spec)
+                           (let* ((str " (customizable)")
+                                  (e (make-extent 1 (length str) str)))
+                             (set-extent-property e 'mouse-face 'highlight)
+                             (set-extent-property e 'help-echo
+                                                  (format "Customize %s" symbol))
+                             (set-extent-property e 'unique t)
+                             (set-extent-property e 'duplicable t)
+                             (set-extent-property
+                              e 'hyper-apropos-custom
+                              `(lambda () (customize-face (quote ,symbol))))
+                             str))
+                         ":\n\n  "))
+                (insert-face "\
+ABCDEFHIJKLMNOPQRSTUVWXYZ abcdefhijklmnopqrstuvwxyz 0123456789"
+                             'hyper-apropos-temp-face)
+                (newline 2)
+                (insert-face "  Font: " 'hyper-apropos-heading)
+                (insert (format (if (numberp (car font)) "(%s)\n" "%s\n")
+                                (and (cdr font)
+                                     (font-instance-name (cdr font)))))
+                (insert-face "  Foreground: " 'hyper-apropos-heading)
+                (insert (format (if (numberp (car fore)) "(%s)\n" "%s\n")
+                                (and (cdr fore)
+                                     (color-instance-name (cdr fore)))))
+                (insert-face "  Background: " 'hyper-apropos-heading)
+                (insert (format (if (numberp (car back)) "(%s)\n" "%s\n")
+                                (and (cdr back)
+                                     (color-instance-name (cdr back)))))
+                (insert-face "  Underline: " 'hyper-apropos-heading)
+                (insert (format (if (numberp (car undl)) "(%s)\n" "%s\n")
+                                (cdr undl)))
+                (if doc
+                    (progn
+                      (newline)
+                      (setq beg (point))
+                      (insert doc)
+                      (indent-rigidly beg (point) 2))))))
+       ;; not bound & property list -----------------------------------------
+       (or ok
+           (save-excursion
+             (set-buffer hyper-apropos-help-buf)
+             (hyper-apropos-insert-section-heading
+              "symbol is not currently bound\n")))
+       (if (and (setq symtype (symbol-plist symbol))
+                (or (> (length symtype) 2)
+                    (not (memq 'variable-documentation symtype))))
+           (save-excursion
+             (set-buffer hyper-apropos-help-buf)
+             (goto-char (point-max))
+             (setq standard-output (current-buffer))
+             (hyper-apropos-insert-section-heading "property-list:\n\n")
+             (while symtype
+               (if (memq (car symtype)
+                         '(variable-documentation byte-obsolete-info))
+                   (setq symtype (cdr symtype))
+                 (insert-face (concat "  " (symbol-name (car symtype))
+                                      ": ")
+                              'hyper-apropos-heading)
+                 (setq symtype (cdr symtype))
+                 (indent-to 32)
+                 (insert (prin1-to-string (car symtype)) "\n"))
+               (setq symtype (cdr symtype)))))))
+    (save-excursion
+      (set-buffer hyper-apropos-help-buf)
+      (goto-char (point-min)) 
+      ;; pop up window and shrink it if it's wasting space
+      (if hyper-apropos-shrink-window
+         (shrink-window-if-larger-than-buffer
+          (display-buffer (current-buffer)))
+       (display-buffer (current-buffer)))
+      (hyper-apropos-help-mode))
+    (setq hyper-apropos-currently-showing symbol)))
+;;;###autoload
+(define-obsolete-function-alias
+  'hypropos-get-doc 'hyper-apropos-get-doc)
+
+; -----------------------------------------------------------------------------
+
+(defun hyper-apropos-help-mode ()
+  "Major mode for hypertext XEmacs help.  In this mode, you can quickly
+follow links between back and forth between the documentation strings for
+different variables and functions.  Common commands:
+
+\\{hyper-apropos-help-map}"
+  (setq buffer-read-only t
+       major-mode           'hyper-apropos-help-mode
+       mode-name            "Hyper-Help")
+  (set-syntax-table emacs-lisp-mode-syntax-table)
+  (use-local-map hyper-apropos-help-map))
+
+;; ---------------------------------------------------------------------- ;;
+
+(defun hyper-apropos-scroll-up ()
+  "Scroll up the \"*Hyper Help*\" buffer if it's visible.
+Otherwise, scroll the selected window up."
+  (interactive)
+  (let ((win (get-buffer-window hyper-apropos-help-buf))
+       (owin (selected-window)))
+    (if win
+       (progn
+         (select-window win)
+         (condition-case nil
+              (scroll-up nil)
+             (error (goto-char (point-max))))
+         (select-window owin))
+      (scroll-up nil))))
+
+(defun hyper-apropos-scroll-down ()
+  "Scroll down the \"*Hyper Help*\" buffer if it's visible.
+Otherwise, scroll the selected window down."
+  (interactive)
+  (let ((win (get-buffer-window hyper-apropos-help-buf))
+       (owin (selected-window)))
+    (if win
+       (progn
+         (select-window win)
+         (condition-case nil
+              (scroll-down nil)
+             (error (goto-char (point-max))))
+         (select-window owin))
+      (scroll-down nil))))
+
+;; ---------------------------------------------------------------------- ;;
+
+(defun hyper-apropos-mouse-get-doc (event)
+  "Get the documentation for the symbol the mouse is on."
+  (interactive "e")
+  (mouse-set-point event)
+  (let ((e (extent-at (point) nil 'hyper-apropos-custom)))
+    (if e
+       (funcall (extent-property e 'hyper-apropos-custom))
+      (save-excursion
+       (let ((symbol (hyper-apropos-this-symbol)))
+         (if symbol
+             (hyper-apropos-get-doc symbol)
+           (error "Click on a symbol")))))))
+
+;; ---------------------------------------------------------------------- ;;
+
+(defun hyper-apropos-add-keyword (pattern)
+  "Use additional keyword to narrow regexp match.
+Deletes lines which don't match PATTERN."
+  (interactive "sAdditional Keyword: ")
+  (save-excursion
+    (goto-char (point-min))
+    (let (buffer-read-only)
+      (keep-lines (concat pattern "\\|" hyper-apropos-junk-regexp))
+      )))
+
+(defun hyper-apropos-eliminate-keyword (pattern)
+  "Use additional keyword to eliminate uninteresting matches.
+Deletes lines which match PATTERN."
+  (interactive "sKeyword to eliminate: ")
+  (save-excursion
+    (goto-char (point-min))
+    (let (buffer-read-only)
+      (flush-lines pattern))
+      ))
+
+;; ---------------------------------------------------------------------- ;;
+
+(defun hyper-apropos-this-symbol ()
+  (save-excursion
+    (cond ((eq major-mode 'hyper-apropos-mode)
+          (beginning-of-line)
+          (if (looking-at hyper-apropos-junk-regexp)
+              nil
+            (forward-char 3)
+            (read (point-marker))))
+         (t
+          (let* ((st (progn
+                       (skip-syntax-backward "w_")
+                       ;; !@(*$^%%# stupid backquote implementation!!!
+                       (skip-chars-forward "`")
+                       (point)))
+                 (en (progn
+                       (skip-syntax-forward "w_")
+                       (skip-chars-backward ".':") ; : for Local Variables
+                       (point))))
+            (and (not (eq st en))
+                 (intern-soft (buffer-substring st en))))))))
+
+(defun hyper-apropos-where-is (symbol)
+  "Find keybinding for symbol on current line."
+  (interactive (list (hyper-apropos-this-symbol)))
+  (where-is symbol))
+
+(defun hyper-apropos-invoke-fn (fn)
+  "Interactively invoke the function on the current line."
+  (interactive (list (hyper-apropos-this-symbol)))
+  (cond ((not (fboundp fn))
+        (error "%S is not a function" fn))
+       (t (call-interactively fn))))
+
+;;;###autoload
+(defun hyper-set-variable (var val &optional this-ref-buffer)
+  (interactive
+   (let ((var (hyper-apropos-read-variable-symbol
+              (if (hyper-apropos-follow-ref-buffer current-prefix-arg)
+                  "In ref buffer, set user option"
+                "Set user option")
+              'user-variable-p)))
+     (list var (hyper-apropos-read-variable-value var) current-prefix-arg)))
+  (hyper-apropos-set-variable var val this-ref-buffer))
+
+;;;###autoload
+(defun hyper-apropos-set-variable (var val &optional this-ref-buffer)
+  "Interactively set the variable on the current line."
+  (interactive
+   (let ((var (hyper-apropos-this-symbol)))
+     (or (and var (boundp var))
+        (and (setq var (and (eq major-mode 'hyper-apropos-help-mode)
+                            (save-excursion
+                              (goto-char (point-min))
+                              (hyper-apropos-this-symbol))))
+             (boundp var))
+        (setq var nil))
+     (list var (hyper-apropos-read-variable-value var))))
+  (and var
+       (boundp var)
+       (progn
+        (if (hyper-apropos-follow-ref-buffer this-ref-buffer)
+            (save-excursion
+              (set-buffer hyper-apropos-ref-buffer)
+              (set var val))
+          (set var val))
+        (hyper-apropos-get-doc var t '(variable) this-ref-buffer))))
+;;;###autoload
+(define-obsolete-function-alias
+  'hypropos-set-variable 'hyper-apropos-set-variable)
+
+(defun hyper-apropos-read-variable-value (var &optional this-ref-buffer)
+  (and var
+       (boundp var)
+       (let ((prop (get var 'variable-interactive))
+            (print-readably t)
+            val str)
+        (hyper-apropos-get-doc var t '(variable) current-prefix-arg)
+        (if prop
+            (call-interactively (list 'lambda '(arg)
+                                      (list 'interactive prop)
+                                      'arg))
+          (setq val (if (hyper-apropos-follow-ref-buffer this-ref-buffer)
+                        (save-excursion
+                          (set-buffer hyper-apropos-ref-buffer)
+                          (symbol-value var))
+                      (symbol-value var))
+                str (prin1-to-string val))
+          (eval-minibuffer
+           (format "Set %s `%s' to value (evaluated): "
+                   (if (user-variable-p var) "user option" "Variable")
+                   var)
+           (condition-case nil
+               (progn
+                 (read str)
+                 (format (if (or (consp val)
+                                 (and (symbolp val)
+                                      (not (memq val '(t nil)))))
+                             "'%s" "%s")
+                         str))
+             (error nil)))))))
+
+(defun hyper-apropos-customize-variable ()
+  (interactive)
+  (let ((var (hyper-apropos-this-symbol)))
+    (customize-variable var)))
+
+;; ---------------------------------------------------------------------- ;;
+
+(defun hyper-apropos-find-tag (&optional tag-name)
+  "Find the tag for the symbol on the current line in other window.  In
+order for this to work properly, the variable `tag-table-alist' or
+`tags-file-name' must be set so that a TAGS file with tags for the emacs
+source is found for the \"*Hyper Apropos*\" buffer."
+  (interactive)
+  ;; there ought to be a default tags file for this...
+  (or tag-name (setq tag-name (symbol-name (hyper-apropos-this-symbol))))
+  (find-tag-other-window (list tag-name)))
+
+;; ---------------------------------------------------------------------- ;;
+
+(defun hyper-apropos-find-function (fn)
+  "Find the function for the symbol on the current line in other
+window.  (See also `find-function'.)"
+  (interactive
+   (let ((fn (hyper-apropos-this-symbol)))
+     (or (fboundp fn)
+        (and (setq fn (and (eq major-mode 'hyper-apropos-help-mode)
+                           (save-excursion
+                             (goto-char (point-min))
+                             (hyper-apropos-this-symbol))))
+             (fboundp fn))
+        (setq fn nil))
+     (list fn)))
+  (if fn
+      (find-function-other-window fn)))
+
+;; ---------------------------------------------------------------------- ;;
+
+(defun hyper-apropos-disassemble (sym)
+  "Disassemble FUN if it is byte-coded.  If it's a lambda, prettyprint it."
+  (interactive (list (hyper-apropos-this-symbol)))
+  (let ((fun sym) (trail nil) macrop)
+    (while (and (symbolp fun) (not (memq fun trail)))
+      (setq trail (cons fun trail)
+           fun (symbol-function fun)))
+    (and (symbolp fun)
+        (error "Loop detected in function binding of `%s'" fun))
+    (setq macrop (and  (consp fun)
+                      (eq 'macro (car fun))))
+    (cond ((compiled-function-p (if macrop (cdr fun) fun))
+          (disassemble fun)
+          (set-buffer "*Disassemble*")
+          (goto-char (point-min))
+          (forward-sexp 2)
+          (insert (format " for function `%S'" sym))
+          )
+         ((consp fun)
+          (with-current-buffer "*Disassemble*"
+            (cl-prettyprint (if macrop
+                                (cons 'defmacro (cons sym (cdr (cdr fun))))
+                              (cons 'defun (cons sym (cdr fun))))))
+          (set-buffer "*Disassemble*")
+          (emacs-lisp-mode))
+         ((or (vectorp fun) (stringp fun))
+          ;; #### - do something fancy here
+          (with-output-to-temp-buffer "*Disassemble*"
+            (princ (format "%s is a keyboard macro:\n\n\t" sym))
+            (prin1 fun)))
+         (t
+          (error "Sorry, cannot disassemble `%s'" sym)))))
+
+;; ---------------------------------------------------------------------- ;;
+
+(defun hyper-apropos-quit ()
+  (interactive)
+  "Quit Hyper Apropos and restore original window config."
+  (let ((buf (get-buffer hyper-apropos-apropos-buf)))
+    (and buf (bury-buffer buf)))
+  (set-window-configuration hyper-apropos-prev-wconfig))
+
+;; ---------------------------------------------------------------------- ;;
+
+;;;###autoload
+(defun hyper-apropos-popup-menu (event)
+  (interactive "e")
+  (mouse-set-point event)
+  (let* ((sym (or (hyper-apropos-this-symbol)
+                 (and (eq major-mode 'hyper-apropos-help-mode)
+                      (save-excursion
+                        (goto-char (point-min))
+                        (hyper-apropos-this-symbol)))))
+        (notjunk (not (null sym)))
+        (command-p (if (commandp sym) t))
+        (variable-p (and sym (boundp sym)))
+        (customizable-p (and variable-p
+                             (get sym 'custom-type)
+                             t))
+        (function-p (fboundp sym))
+        (apropos-p (eq 'hyper-apropos-mode
+                       (save-excursion (set-buffer (event-buffer event))
+                                       major-mode)))
+        (name (if sym (symbol-name sym) ""))
+        (hyper-apropos-menu
+         (delete
+          nil
+          (list (concat "Hyper-Help: " name)
+           (vector "Display documentation" 'hyper-apropos-get-doc   notjunk)
+           (vector "Set variable"      'hyper-apropos-set-variable variable-p)
+           (vector "Customize variable" 'hyper-apropos-customize-variable
+                   customizable-p)
+           (vector "Show keys for"     'hyper-apropos-where-is      command-p)
+           (vector "Invoke command"    'hyper-apropos-invoke-fn     command-p)
+           (vector "Find function"    'hyper-apropos-find-function function-p)
+           (vector "Find tag"          'hyper-apropos-find-tag notjunk)
+           (and apropos-p
+                ["Add keyword..." hyper-apropos-add-keyword    t])
+           (and apropos-p
+                ["Eliminate keyword..." hyper-apropos-eliminate-keyword  t])
+           (if apropos-p
+               ["Programmers' Apropos" hyper-apropos-toggle-programming-flag
+                :style toggle :selected hyper-apropos-programming-apropos]
+             ["Programmers' Help" hyper-apropos-toggle-programming-flag
+              :style toggle :selected hyper-apropos-programming-apropos])
+           (and hyper-apropos-programming-apropos
+                (vector "Disassemble function"
+                        'hyper-apropos-disassemble
+                        function-p))
+           ["Help"                     describe-mode           t]
+           ["Quit"                     hyper-apropos-quit              t]
+           ))))
+    (popup-menu hyper-apropos-menu)))
+;;;###autoload
+(define-obsolete-function-alias
+  'hypropos-popup-menu 'hyper-apropos-popup-menu)
+
+(provide 'hyper-apropos)
+
+;; end of hyper-apropos.el
diff --git a/lisp/indent.el b/lisp/indent.el
new file mode 100644 (file)
index 0000000..f93f413
--- /dev/null
@@ -0,0 +1,480 @@
+;;; indent.el --- indentation commands for XEmacs
+
+;; Copyright (C) 1985, 1992, 1993, 1995, 1997 Free Software Foundation, Inc.
+
+;; Maintainer: FSF
+;; Keywords: lisp, languages, tools, dumped
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: FSF 19.30.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; Commands for making and changing indentation in text.  These are
+;; described in the XEmacs Reference Manual.
+
+;; 06/11/1997 - Convert (preceding|following)-char to char-(before|after) -slb
+
+;;; Code:
+
+(defvar standard-indent 4 "\
+Default number of columns for margin-changing functions to indent.")
+
+(defvar indent-line-function 'indent-to-left-margin
+  "Function to indent current line.")
+
+(defun indent-according-to-mode ()
+  "Indent line in proper way for current major mode."
+  (interactive)
+  (funcall indent-line-function))
+
+(defun indent-for-tab-command (&optional prefix-arg)
+  "Indent line in proper way for current major mode."
+  (interactive "P")
+  (if (eq indent-line-function 'indent-to-left-margin)
+      (insert-tab prefix-arg)
+    (if prefix-arg
+       (funcall indent-line-function prefix-arg)
+      (funcall indent-line-function))))
+
+(defun insert-tab (&optional prefix-arg)
+  (let ((count (prefix-numeric-value prefix-arg)))
+    (if abbrev-mode
+       (expand-abbrev))
+    (if indent-tabs-mode
+       (insert-char ?\t count)
+      ;; XEmacs: (Need the `1+')
+      (indent-to (* tab-width (1+ (/ (current-column) tab-width)))))))
+
+(defun indent-rigidly (start end arg)
+  "Indent all lines starting in the region sideways by ARG columns.
+Called from a program, takes three arguments, START, END and ARG."
+  (interactive "r\np")
+  (save-excursion
+    (goto-char end)
+    (setq end (point-marker))
+    (goto-char start)
+    (or (bolp) (forward-line 1))
+    (while (< (point) end)
+      (let ((indent (current-indentation))
+           eol-flag)
+       (save-excursion
+         (skip-chars-forward " \t")
+         (setq eol-flag (eolp)))
+       (or eol-flag
+           (indent-to (max 0 (+ indent arg)) 0))
+       (delete-region (point) (progn (skip-chars-forward " \t") (point))))
+      (forward-line 1))
+    (move-marker end nil)
+    (setq zmacs-region-stays nil))) ; XEmacs
+
+(defun indent-line-to (column)
+  "Indent current line to COLUMN.
+This function removes or adds spaces and tabs at beginning of line
+only if necessary.  It leaves point at end of indentation."
+  (back-to-indentation)
+  (let ((cur-col (current-column)))
+    (cond ((< cur-col column)
+          (if (> (- column (* (/ cur-col tab-width) tab-width)) tab-width)
+              (delete-region (point)
+                             (progn (skip-chars-backward " ") (point))))
+          (indent-to column))
+         ((> cur-col column) ; too far right (after tab?)
+          (delete-region (progn (move-to-column column t) (point))
+                         (progn (back-to-indentation) (point)))))))
+
+(defun current-left-margin ()
+  "Return the left margin to use for this line.
+This is the value of the buffer-local variable `left-margin' plus the value
+of the `left-margin' text-property at the start of the line."
+  (save-excursion
+    (back-to-indentation)
+    (max 0
+        (+ left-margin (or (get-text-property
+                            (if (and (eobp) (not (bobp)))
+                                (1- (point)) (point))
+                            'left-margin) 0)))))
+
+(defun move-to-left-margin (&optional n force)
+  "Move to the left margin of the current line.
+With optional argument, move forward N-1 lines first.
+The column moved to is the one given by the `current-left-margin' function.
+If the line's indentation appears to be wrong, and this command is called
+interactively or with optional argument FORCE, it will be fixed."
+  (interactive (list (prefix-numeric-value current-prefix-arg) t))
+  (beginning-of-line n)
+  (skip-chars-forward " \t")
+  (let ((lm (current-left-margin))
+       (cc (current-column)))
+    (cond ((> cc lm)
+          (if (> (move-to-column lm force) lm)
+              ;; If lm is in a tab and we are not forcing, move before tab
+              (backward-char 1)))
+         ((and force (< cc lm))
+          (indent-to-left-margin)))))
+
+;; This is the default indent-line-function,
+;; used in Fundamental Mode, Text Mode, etc.
+(defun indent-to-left-margin ()
+  "Indent current line to the column given by `current-left-margin'."
+  (indent-line-to (current-left-margin)))
+
+(defun delete-to-left-margin (&optional from to)
+  "Remove left margin indentation from a region.
+This deletes to the column given by `current-left-margin'.
+In no case will it delete non-whitespace.
+Args FROM and TO are optional; default is the whole buffer."
+  (save-excursion
+    (goto-char (or to (point-max)))
+    (setq to (point-marker))
+    (goto-char (or from (point-min)))
+    (or (bolp) (forward-line 1))
+    (while (< (point) to)
+      (delete-region (point) (progn (move-to-left-margin nil t) (point)))
+      (forward-line 1))
+    (move-marker to nil)))
+
+(defun set-left-margin (from to lm)
+  "Set the left margin of the region to WIDTH.
+If `auto-fill-mode' is active, re-fill the region to fit the new margin."
+  (interactive "r\nNSet left margin to column: ")
+  (if (interactive-p) (setq lm (prefix-numeric-value lm)))
+  (save-excursion
+    ;; If inside indentation, start from BOL.
+    (goto-char from)
+    (skip-chars-backward " \t")
+    (if (bolp) (setq from (point)))
+    ;; Place end after whitespace
+    (goto-char to)
+    (skip-chars-forward " \t")
+    (setq to (point-marker)))
+  ;; Delete margin indentation first, but keep paragraph indentation.
+  (delete-to-left-margin from to)
+  (put-text-property from to 'left-margin lm)
+  (indent-rigidly from to lm)
+  (if auto-fill-function (save-excursion (fill-region from to nil t t)))
+  (move-marker to nil))
+
+(defun set-right-margin (from to lm)
+  "Set the right margin of the region to WIDTH.
+If `auto-fill-mode' is active, re-fill the region to fit the new margin."
+  (interactive "r\nNSet right margin to width: ")
+  (if (interactive-p) (setq lm (prefix-numeric-value lm)))
+  (save-excursion
+    (goto-char from)
+    (skip-chars-backward " \t")
+    (if (bolp) (setq from (point))))
+  (put-text-property from to 'right-margin lm)
+  (if auto-fill-function (save-excursion (fill-region from to nil t t))))
+
+(defun alter-text-property (from to prop func &optional object)
+  "Programmatically change value of a text-property.
+For each region between FROM and TO that has a single value for PROPERTY,
+apply FUNCTION to that value and sets the property to the function's result.
+Optional fifth argument OBJECT specifies the string or buffer to operate on."
+  (let ((begin from)
+       end val)
+    (while (setq val (get-text-property begin prop object)
+                end (text-property-not-all begin to prop val object))
+      (put-text-property begin end prop (funcall func val) object)
+      (setq begin end))
+    (if (< begin to)
+       (put-text-property begin to prop (funcall func val) object))))
+
+(defun increase-left-margin (from to inc)
+  "Increase or decrease the left-margin of the region.
+With no prefix argument, this adds `standard-indent' of indentation.
+A prefix arg (optional third arg INC noninteractively) specifies the amount
+to change the margin by, in characters.
+If `auto-fill-mode' is active, re-fill the region to fit the new margin."
+  (interactive "*r\nP")
+  (setq inc (if inc (prefix-numeric-value inc) standard-indent))
+  (save-excursion
+    (goto-char from)
+    (skip-chars-backward " \t")
+    (if (bolp) (setq from (point)))
+    (goto-char to)
+    (setq to (point-marker)))
+  (alter-text-property from (marker-position to) 'left-margin ; XEmacs
+                      (lambda (v) (max (- left-margin) (+ inc (or v 0)))))
+  (indent-rigidly from (marker-position to) inc) ; XEmacs
+  (if auto-fill-function
+      (save-excursion
+       (fill-region from (marker-position to) nil t t))) ; XEmacs
+  (move-marker to nil))
+
+(defun decrease-left-margin (from to inc)
+  "Make the left margin of the region smaller.
+With no prefix argument, decrease the indentation by `standard-indent'.
+A prefix arg (optional third arg INC noninteractively) specifies the amount
+to change the margin by, in characters.
+If `auto-fill-mode' is active, re-fill the region to fit the new margin."
+  (interactive "*r\nP")
+  (setq inc (if inc (prefix-numeric-value inc) standard-indent))
+  (increase-left-margin from to (- inc)))
+
+(defun increase-right-margin (from to inc)
+  "Increase the right-margin of the region.
+With no prefix argument, increase the right margin by `standard-indent'.
+A prefix arg (optional third arg INC noninteractively) specifies the amount
+to change the margin by, in characters.  A negative argument decreases
+the right margin width.
+If `auto-fill-mode' is active, re-fill the region to fit the new margin."
+  (interactive "r\nP")
+  (if (interactive-p)
+      (setq inc (if inc (prefix-numeric-value current-prefix-arg)
+                 standard-indent)))
+  (save-excursion
+    (alter-text-property from to 'right-margin
+       (lambda (v) (+ inc (or v 0))))
+    (if auto-fill-function
+       (fill-region from to nil t t))))
+
+(defun decrease-right-margin (from to inc)
+  "Make the right margin of the region smaller.
+With no prefix argument, decrease the right margin by `standard-indent'.
+A prefix arg (optional third arg INC noninteractively) specifies the amount
+of width to remove, in characters.  A negative argument increases
+the right margin width.
+If `auto-fill-mode' is active, re-fills region to fit in new margin."
+  (interactive "*r\nP")
+  (setq inc (if inc (prefix-numeric-value inc) standard-indent))
+  (increase-right-margin from to (- inc)))
+
+(defun beginning-of-line-text (&optional n)
+  "Move to the beginning of the text on this line.
+With optional argument, move forward N-1 lines first.
+From the beginning of the line, moves past the left-margin indentation, the
+fill-prefix, and any indentation used for centering or right-justifying the
+line, but does not move past any whitespace that was explicitly inserted 
+\(such as a tab used to indent the first line of a paragraph)."
+  (interactive "p")
+  (beginning-of-line n)
+  (skip-chars-forward " \t")
+  ;; Skip over fill-prefix.
+  (if (and fill-prefix 
+          (not (string-equal fill-prefix "")))
+      (if (equal fill-prefix
+                (buffer-substring 
+                 (point) (min (point-max) (+ (length fill-prefix) (point)))))
+         (forward-char (length fill-prefix)))
+    (if (and adaptive-fill-mode adaptive-fill-regexp
+            (looking-at adaptive-fill-regexp))
+       (goto-char (match-end 0))))
+  ;; Skip centering or flushright indentation
+  (if (memq (current-justification) '(center right))
+      (skip-chars-forward " \t")))
+
+(defvar indent-region-function nil
+  "Short cut function to indent region using `indent-according-to-mode'.
+A value of nil means really run `indent-according-to-mode' on each line.")
+
+(defun indent-region (start end column)
+  "Indent each nonblank line in the region.
+With no argument, indent each line using `indent-according-to-mode',
+or use `indent-region-function' to do the whole region if that's non-nil.
+If there is a fill prefix, make each line start with the fill prefix.
+With argument COLUMN, indent each line to that column.
+Called from a program, takes three args: START, END and COLUMN."
+  (interactive "r\nP")
+  (if (null column)
+      (if fill-prefix
+         (save-excursion
+           (goto-char end)
+           (setq end (point-marker))
+           (goto-char start)
+           (let ((regexp (regexp-quote fill-prefix)))
+           (while (< (point) end)
+             (or (looking-at regexp)
+                  (and (bolp) (eolp))
+                 (insert fill-prefix))
+             (forward-line 1))))
+       (if indent-region-function
+           (funcall indent-region-function start end)
+         (save-excursion
+         (goto-char end)
+         (setq end (point-marker))
+         (goto-char start)
+         (or (bolp) (forward-line 1))
+         (while (< (point) end)
+            (or (and (bolp) (eolp))
+                (funcall indent-line-function))
+           (forward-line 1))
+         (move-marker end nil))))
+    (setq column (prefix-numeric-value column))
+    (save-excursion
+      (goto-char end)
+      (setq end (point-marker))
+      (goto-char start)
+      (or (bolp) (forward-line 1))
+      (while (< (point) end)
+       (delete-region (point) (progn (skip-chars-forward " \t") (point)))
+       (or (eolp)
+           (indent-to column 0))
+       (forward-line 1))
+      (move-marker end nil))))
+
+(defun indent-relative-maybe ()
+  "Indent a new line like previous nonblank line."
+  (interactive)
+  (indent-relative t))
+
+(defun indent-relative (&optional unindented-ok)
+  "Space out to under next indent point in previous nonblank line.
+An indent point is a non-whitespace character following whitespace.
+If the previous nonblank line has no indent points beyond the
+column point starts at, `tab-to-tab-stop' is done instead."
+  (interactive "P")
+  (if abbrev-mode (expand-abbrev))
+  (let ((start-column (current-column))
+       indent)
+    (save-excursion
+      (beginning-of-line)
+      (if (re-search-backward "^[^\n]" nil t)
+         (let ((end (save-excursion (forward-line 1) (point))))
+           (move-to-column start-column)
+           ;; Is start-column inside a tab on this line?
+           (if (> (current-column) start-column)
+               (backward-char 1))
+           (or (looking-at "[ \t]")
+               unindented-ok
+               (skip-chars-forward "^ \t" end))
+           (skip-chars-forward " \t" end)
+           (or (= (point) end) (setq indent (current-column))))))
+    (if indent
+       (let ((opoint (point-marker)))
+         (delete-region (point) (progn (skip-chars-backward " \t") (point)))
+         (indent-to indent 0)
+         (if (> opoint (point))
+             (goto-char opoint))
+         (move-marker opoint nil))
+      (tab-to-tab-stop))))
+
+(defvar tab-stop-list
+  '(8 16 24 32 40 48 56 64 72 80 88 96 104 112 120)
+  "*List of tab stop positions used by `tab-to-tab-stops'.
+This should be a list of integers, ordered from smallest to largest.")
+
+(defvar edit-tab-stops-map nil "Keymap used in `edit-tab-stops'.")
+(if edit-tab-stops-map
+    nil
+  (setq edit-tab-stops-map (make-sparse-keymap))
+  (define-key edit-tab-stops-map "\C-x\C-s" 'edit-tab-stops-note-changes)
+  (define-key edit-tab-stops-map "\C-c\C-c" 'edit-tab-stops-note-changes))
+
+(defvar edit-tab-stops-buffer nil
+  "Buffer whose tab stops are being edited--in case
+the variable `tab-stop-list' is local in that buffer.")
+
+(defun edit-tab-stops ()
+  "Edit the tab stops used by `tab-to-tab-stop'.
+Creates a buffer *Tab Stops* containing text describing the tab stops.
+A colon indicates a column where there is a tab stop.
+You can add or remove colons and then do \\<edit-tab-stops-map>\\[edit-tab-stops-note-changes] to make changes take effect."
+  (interactive)
+  (setq edit-tab-stops-buffer (current-buffer))
+  (switch-to-buffer (get-buffer-create "*Tab Stops*"))
+  ;; #### I18N3 should mark buffer as output-translating
+  (use-local-map edit-tab-stops-map)
+  (make-local-variable 'indent-tabs-mode)
+  (setq indent-tabs-mode nil)
+  (overwrite-mode 1)
+  (setq truncate-lines t)
+  (erase-buffer)
+  (let ((tabs tab-stop-list))
+    (while tabs
+      (indent-to (car tabs) 0)
+      (insert ?:)
+      (setq tabs (cdr tabs))))
+  (let ((count 0))
+    (insert ?\n)
+    (while (< count 8)
+      (insert (+ count ?0))
+    (insert "         ")
+      (setq count (1+ count)))
+    (insert ?\n)
+    (while (> count 0)
+      (insert "0123456789")
+      (setq count (1- count))))
+  ;; XEmacs
+  (insert (substitute-command-keys "\nTo install changes, type \\<edit-tab-stops-map>\\[edit-tab-stops-note-changes]"))
+  (goto-char (point-min)))
+
+(defun edit-tab-stops-note-changes ()
+  "Put edited tab stops into effect."
+  (interactive)
+    (let (tabs)
+      (save-excursion
+       (goto-char 1)
+       (end-of-line)
+       (while (search-backward ":" nil t)
+         (setq tabs (cons (current-column) tabs))))
+      (bury-buffer (prog1 (current-buffer)
+                         (switch-to-buffer edit-tab-stops-buffer)))
+      (setq tab-stop-list tabs))
+  (message "Tab stops installed"))
+
+(defun tab-to-tab-stop ()
+  "Insert spaces or tabs to next defined tab-stop column.
+The variable `tab-stop-list' is a list of columns at which there are tab stops.
+Use \\[edit-tab-stops] to edit them interactively."
+  (interactive)
+  (and abbrev-mode (eq (char-syntax (char-before (point))) ?w)
+       (expand-abbrev))
+  (let ((tabs tab-stop-list))
+    (while (and tabs (>= (current-column) (car tabs)))
+      (setq tabs (cdr tabs)))
+    (if tabs
+       (let ((opoint (point)))
+         (skip-chars-backward " \t")
+         (delete-region (point) opoint)
+         (indent-to (car tabs)))
+      (insert ?\ ))))
+
+(defun move-to-tab-stop ()
+  "Move point to next defined tab-stop column.
+The variable `tab-stop-list' is a list of columns at which there are tab stops.
+Use \\[edit-tab-stops] to edit them interactively."
+  (interactive)
+  (let ((tabs tab-stop-list))
+    (while (and tabs (>= (current-column) (car tabs)))
+      (setq tabs (cdr tabs)))
+    (if tabs
+       (let ((before (point)))
+         (move-to-column (car tabs) t)
+         (save-excursion
+           (goto-char before)
+           ;; If we just added a tab, or moved over one,
+           ;; delete any superfluous spaces before the old point.
+           (if (and (eq (char-before (point)) ?\ )
+                    (eq (char-after (point)) ?\t))
+               (let ((tabend (* (/ (current-column) tab-width) tab-width)))
+                 (while (and (> (current-column) tabend)
+                             (eq (char-before (point)) ?\ ))
+                   (forward-char -1))
+                 (delete-region (point) before))))))))
+
+;(define-key global-map "\t" 'indent-for-tab-command)
+;(define-key esc-map "\034" 'indent-region)
+;(define-key ctl-x-map "\t" 'indent-rigidly)
+;(define-key esc-map "i" 'tab-to-tab-stop)
+
+;;; indent.el ends here
diff --git a/lisp/info.el b/lisp/info.el
new file mode 100644 (file)
index 0000000..def6f7b
--- /dev/null
@@ -0,0 +1,3106 @@
+;;; info.el --- info package for Emacs.
+;; Keywords: help
+
+;; Copyright (C) 1985, 1986, 1993, 1997 Free Software Foundation, Inc.
+
+;; Author: Dave Gillespie <daveg@synaptics.com>
+;;        Richard Stallman <rms@gnu.ai.mit.edu>
+;; Maintainer: Dave Gillespie <daveg@synaptics.com>
+;; Version: 1.07 of 7/22/93
+;; Keywords: docs, help
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not synched with FSF.
+
+;; Commentary:
+
+;; This is based on an early Emacs 19 info.el file.
+;;
+;; Note that Info-directory has been replaced by Info-directory-list,
+;; a search path of directories in which to find Info files.
+;; Also, Info tries adding ".info" to a file name if the name itself
+;; is not found.
+;;
+;; See the change log below for further details.
+
+
+;; LCD Archive Entry:
+;; info-dg|Dave Gillespie|daveg@synaptics.com
+;; |Info reader with many enhancements; replaces standard info.el.
+;; |93-07-22|1.07|~/modes/info.el
+
+;; Also available from anonymous FTP on csvax.cs.caltech.edu.
+
+
+;; Change Log:
+
+;; Modified 3/7/1991 by Dave Gillespie:
+;; (Author's address: daveg@synaptics.com or daveg@csvax.cs.caltech.edu)
+;;
+;; Added keys:  i, t, <, >, [, ], {, }, 6, 7, 8, 9, 0.
+;; Look at help for info-mode (type ? in Info) for descriptions.
+;;
+;; If Info-directory-list is undefined and there is no INFOPATH
+;; in the environment, use value of Info-directory for compatibility
+;; with Emacs 18.57.
+;;
+;; All files named "localdir" found in the path are appended to "dir",
+;; the Info directory.  For this to work, "dir" should contain only
+;; one node (Top), and each "localdir" should contain no ^_ or ^L
+;; characters.  Generally they will contain only one or several
+;; additional lines for the top-level menu.  Note that "dir" is
+;; modified in memory each time it is loaded, but not on disk.
+;;
+;; If "dir" contains a line of the form:  "* Locals:"
+;; then the "localdir"s are inserted there instead of at the end.
+
+
+;; Modified 4/3/1991 by Dave Gillespie:
+;;
+;; Added Info-mode-hook (suggested by Sebastian Kremer).
+;; Also added epoch-info-startup/select-hooks from Simon Spero's info.el.
+;;
+;; Added automatic decoding of compressed Info files.
+;; See documentation for the variable Info-suffix-list.  Default is to
+;; run "uncompress" on ".Z" files and "unyabba" on ".Y" files.
+;; (See comp.sources.unix v24i073-076 for yabba/unyabba, a free software
+;; alternative to compress/uncompress.)
+;; Note: "dir" and "localdir" files should not be compressed.
+;;
+;; Changed variables like Info-enable-edit to be settable by M-x set-variable.
+;;
+;; Added Info-auto-advance variable.  If t, SPC and DEL will act like
+;; } and {, i.e., they advance to the next/previous node if at the end
+;; of the buffer.
+;;
+;; Changed `u' to restore point to most recent location in that node.
+;; Added `=' to do this manually at any time.  (Suggested by David Fox).
+;;
+;; Changed `m' and `0-9' to try interpreting menu name as a file name
+;; if not found as a node name.  This allows (dir) menus of the form,
+;;     Emacs::         Cool text editor
+;; as a shorthand for
+;;     Emacs:(emacs).  Cool text editor
+;;
+;; Enhanced `i' to use line-number information in the index.
+;; Added `,' to move among all matches to a previous `i' command.
+;;
+;; Added `a' (Info-annotate) for adding personal notes to any Info node.
+;; Notes are not stored in the actual Info files, but in the user's own
+;; ~/.infonotes file.
+;;
+;; Added Info-footnote-tag, made default be "Ref" instead of "Note".
+;;
+;; Got mouse-click stuff to work under Emacs version 18.  Check it out!
+;; Left and right clicks scroll the Info window.
+;; Middle click goes to clicked-on node, e.g., "Next:", a menu, or a note.
+
+
+;; Modified 6/29/1991 by Dave Gillespie:
+;;
+;; Renamed epoch-info-startup/select-hooks to Info-startup/select-hook.
+;;
+;; Made Info-select-node into a command on the `!' key.
+;;
+;; Added Info-mouse-support user option.
+;;
+;; Cleaned up the implementation of some routines.
+;;
+;; Added special treatment of quoted words in annotations:  The `g'
+;; command for a nonexistent node name scans for an annotation
+;; (in any node of any file) containing that name in quotes:  g foo RET
+;; looks for an annotation containing:  "foo"  or:  <<foo>>
+;; If found, it goes to that file and node.
+;;
+;; Added a call to set up Info-directory-list in Info-find-node to
+;; work around a bug in GNUS where it calls Info-goto-node before info.
+;;
+;; Added completion for `g' command (inspired by Richard Kim's infox.el).
+;; Completion knows all node names for the current file, and all annotation
+;; tags (see above).  It does not complete file names or node names in
+;; other files.
+;;
+;; Added `k' (Info-emacs-key) and `*' (Info-elisp-ref) commands.  You may
+;; wish to bind these to global keys outside of Info mode.
+;;
+;; Allowed localdir files to be full dir-like files; only the menu part
+;; of each localdir is copied.  Also, redundant menu items are omitted.
+;;
+;; Changed Info-history to hold only one entry at a time for each node,
+;; and to be circular so that multiple `l's come back again to the most
+;; recent node.  Note that the format of Info-history entries has changed,
+;; which may interfere with external programs that try to operate on it.
+;; (Also inspired by Kim's infox.el).
+;;
+;; Changed `n', `]', `l', etc. to accept prefix arguments to move several
+;; steps at once.  Most accept negative arguments to move oppositely.
+;;
+;; Changed `?' to bury *Help* buffer afterwards to keep it out of the way.
+;;
+;; Rearranged `?' key's display to be a little better for new users.
+;;
+;; Changed `a' to save whole window configuration and restore on C-c C-c.
+;;
+;; Fixed the bug reported by Bill Reynolds on gnu.emacs.bugs.
+;;
+;; Changed Info-last to restore window-start as well as cursor position.
+;;
+;; Changed middle mouse button in space after end of node to do Info-last
+;; if we got here by following a cross reference, else do Info-global-next.
+;;
+;; Added some new mouse bindings: shift-left = Info-global-next,
+;; shift-right = Info-global-prev, shift-middle = Info-last.
+;;
+;; Fixed Info-follow-reference not to make assumptions about length
+;; of Info-footnote-tag [Linus Tolke].
+;;
+;; Changed default for Info-auto-advance mode to be press-twice-for-next-node.
+;;
+;; Modified x-mouse-ignore to preserve last-command variable, so that
+;; press-twice Info-auto-advance mode works with the mouse.
+
+
+;; Modified 3/4/1992 by Dave Gillespie:
+;;
+;; Added an "autoload" command to help autoload.el.
+;;
+;; Changed `*' command to look for file `elisp' as well as for `lispref'.
+;;
+;; Fixed a bug involving footnote names containing regexp special characters.
+;;
+;; Fixed a bug in completion during `f' (or `r') command.
+;;
+;; Added TAB (Info-next-reference), M-TAB, and RET keys to Info mode.
+;;
+;; Added new bindings, `C-h C-k' for Info-emacs-key and `C-h C-f' for
+;; Info-elisp-ref.  These bindings are made when info.el is loaded, and
+;; only if those key sequences were previously unbound.  These bindings
+;; work at any time, not just when Info is already running.
+
+
+;; Modified 3/8/1992 by Dave Gillespie:
+;;
+;; Fixed some long lines that were causing trouble with mailers.
+
+
+;; Modified 3/9/1992 by Dave Gillespie:
+;;
+;; Added `C-h C-i' (Info-query).
+;;
+;; Added Info-novice mode, warns if the user attempts to switch to
+;; a different Info file.
+;;
+;; Fixed a bug that caused problems using compressed Info files
+;; and Info-directory-list at the same time.
+;;
+;; Disabled Info-mouse-support by default if Epoch or Hyperbole is in use.
+;;
+;; Added an expand-file-name call to Info-find-node to fix a small bug.
+
+
+;; Modified 5/22/1992 by Dave Gillespie:
+;;
+;; Added "standalone" operation:  "emacs -f info" runs Emacs specifically
+;; for use as an Info browser.  In this mode, the `q' key quits Emacs
+;; itself.  Also, "emacs -f info arg" starts in Info file "arg" instead
+;; of "dir".
+;;
+;; Changed to prefer "foo.info" over "foo".  If both exist, "foo" is
+;; probably a directory or executable program!
+;;
+;; Made control-mouse act like regular-mouse does in other buffers.
+;; (In most systems, this will be set-cursor for left-mouse, x-cut
+;; for right-mouse, and x-paste, which will be an error, for
+;; middle-mouse.)
+;;
+;; Improved prompting and searching for `,' key.
+;;
+;; Fixed a bug where some "* Menu:" lines disappeared when "dir"
+;; contained several nodes.
+
+
+;; Modified 9/10/1992 by Dave Gillespie:
+;;
+;; Mixed in support for XEmacs.  Mouse works the same as in
+;; the other Emacs versions by default; added Info-lucid-mouse-style
+;; variable, which enables mouse operation similar to XEmacs's default.
+;;
+;; Fixed a bug where RET couldn't understand "* Foo::" if "Foo" was a
+;; file name instead of a node name.
+;;
+;; Added `x' (Info-bookmark), a simple interface to the annotation
+;; tags feature.  Added `j' (Info-goto-bookmark), like `g' but only
+;; completes bookmarks.
+;;
+;; Added `<<tag>>' as alternate to `"tag"' in annotations.
+;;
+;; Added `v' (Info-visit-file), like Info-goto-node but specialized
+;; for going to a new Info file (with file name completion).
+;;
+;; Added recognition of gzip'd ".z" files.
+
+
+;; Modified 5/9/1993 by Dave Gillespie:
+;;
+;; Merged in various things from FSF's latest Emacs 19 info.el.
+
+;; Modified 6/2/1993 by Dave Gillespie:
+;;
+;; Changed to use new suffix ".gz" for gzip files.
+
+
+;; Modified 7/22/1993 by Dave Gillespie:
+;;
+;; Changed Info-footnote-tag to "See" instead of "Ref".
+;;
+;; Extended Info-fontify-node to work with FSF version of Emacs 19.
+
+;; Modified 7/30/1993 by Jamie Zawinski:
+;;
+;; Commented out the tty and fsf19 mouse support, because why bother.
+;; Commented out the politically incorrect version of XEmacs mouse support.
+;; Commented out mouse scrolling bindings because the party line on that
+;;  is "scrollbars are coming soon."
+;; Commented out munging of help-for-help's doc; put it in help.el.
+;; Did Info-edit-map the modern XEmacs way.
+;; Pruned extra cruft from fontification and mouse handling code.
+;; Fixed ASCII-centric bogosity in unreading of events.
+
+;; Modified 8/11/95 by Chuck Thompson:
+;;
+;; Removed any pretense of ever referencing Info-directory since it
+;; wasn't working anyhow.
+
+;; Modified 4/5/97 by Tomasz J. Cholewo:
+;;
+;; Modified Info-search to use with-caps-disable-folding
+
+;; Modified 6/21/97 by Hrvoje Niksic
+;;
+;; Fixed up Info-next-reference to work sanely when n < 0.
+;; Added S-tab binding.
+
+;; Modified 1997-07-10 by Karl M. Hegbloom
+;;
+;; Added `Info-minibuffer-history'
+;; (also added to defaults in "lisp/utils/savehist.el")
+;;  Other changes in main ChangeLog.
+
+;; Modified 1998-03-29 by Oscar Figueiredo
+;;
+;; Added automatic dir/localdir (re)building capability for directories that
+;; contain none or when it has become older than info files in the same
+;; directory.
+
+;; Code:
+
+(defgroup info nil
+  "The info package for Emacs."
+  :group 'help
+  :group 'docs)
+
+(defgroup info-faces nil
+  "The faces used by info browser."
+  :group 'info
+  :group 'faces)
+
+
+(defcustom Info-inhibit-toolbar nil
+  "*Non-nil means don't use the specialized Info toolbar."
+  :type 'boolean
+  :group 'info)
+
+(defcustom Info-novice nil
+  "*Non-nil means to ask for confirmation before switching Info files."
+  :type 'boolean
+  :group 'info)
+
+(defvar Info-history nil
+  "List of info nodes user has visited.
+Each element of list is a list (\"(FILENAME)NODENAME\" BUFPOS WINSTART).")
+
+(defvar Info-keeping-history t
+  "Non-nil if Info-find-node should modify Info-history.
+This is for use only by certain internal Info routines.")
+
+(defvar Info-minibuffer-history nil
+  "Minibuffer history for Info.")
+
+(defcustom Info-enable-edit nil
+  "*Non-nil means the \\<Info-mode-map>\\[Info-edit] command in Info
+can edit the current node.
+This is convenient if you want to write info files by hand.
+However, we recommend that you not do this.
+It is better to write a Texinfo file and generate the Info file from that,
+because that gives you a printed manual as well."
+  :type 'boolean
+  :group 'info)
+
+(defcustom Info-enable-active-nodes t
+  "*Non-nil allows Info to execute Lisp code associated with nodes.
+The Lisp code is executed when the node is selected."
+  :type 'boolean
+  :group 'info)
+
+(defcustom Info-restoring-point t
+  "*Non-nil means to restore the cursor position when re-entering a node."
+  :type 'boolean
+  :group 'info)
+
+(defcustom Info-auto-advance 'twice
+  "*Control what SPC and DEL do when they can't scroll any further.
+If nil, they beep and remain in the current node.
+If t, they move to the next node (like Info-global-next/prev).
+If anything else, they must be pressed twice to move to the next node."
+  :type '(choice (const :tag "off" nil)
+                (const :tag "advance" t)
+                (const :tag "confirm" twice))
+  :group 'info)
+
+(defcustom Info-fontify t
+  "*Non-nil enables font features in XEmacs.
+This variable is ignored unless running under XEmacs."
+  :type 'boolean
+  :group 'info)
+
+(defcustom Info-additional-search-directory-list nil
+  "*List of additional directories to search for Info documentation
+files.  These directories are not searched for merging the `dir'
+file. An example might be something like:
+\"/usr/local/lib/xemacs/packages/lisp/calc/\""
+  :type '(repeat directory)
+  :group 'info)
+
+(defcustom Info-auto-generate-directory 'if-missing
+  "*When to auto generate an info directory listing.
+Possible values are:
+nil or `never' never auto-generate a directory listing,
+  use any existing `dir' or `localdir' file and ignore info
+  directories containing none
+`always' auto-generate a directory listing ignoring existing
+  `dir' and `localdir' files
+`if-missing', the default, auto-generates a directory listing
+  if no `dir' or `localdir' file is present.  Otherwise the 
+  contents of any of these files is used instead.
+`if-outdated' auto-generates a directory listing if the `dir'
+  and `localdir' are either inexistent or outdated (touched 
+  less recently than an info file in the same directory)."
+  :type '(choice (const :tag "never" never)
+                (const :tag "always" always)
+                (const :tag "if-missing" if-missing)
+                (const :tag "if-outdated" if-outdated))
+  :group 'info)
+
+(defcustom Info-save-auto-generated-dir nil
+  "*Whether an auto-generated info directory listing should be saved.
+Possible values are:
+nil or `never', the default, auto-generated info directory 
+  information will never be saved.
+`always', auto-generated info directory information will be saved to
+  a `dir' file in the same directory overwriting it if it exists
+`conservative', auto-generated info directory information will be saved
+  to a `dir' file in the same directory but the user is asked before 
+  overwriting any existing file."
+  :type '(choice (const :tag "never" never)
+                (const :tag "always" always)
+                (const :tag "conservative" conservative))
+  :group 'info)
+
+(defvar Info-emacs-info-file-name "xemacs.info"
+  "The filename of the XEmacs info for
+`Info-goto-emacs-command-node' (`\\<help-mode-map>\\[Info-goto-emacs-command-node]')")
+
+;;;###autoload
+(defvar Info-directory-list nil
+  "List of directories to search for Info documentation files.
+
+The first directory in this list, the \"dir\" file there will become
+the (dir)Top node of the Info documentation tree.  If you wish to
+modify the info search path, use `M-x customize-variable,
+Info-directory-list' to do so.")
+
+(defcustom Info-localdir-heading-regexp
+    "^Locally installed XEmacs Packages:?"
+  "The menu part of localdir files will be inserted below this topic
+heading."
+  :type 'regexp
+  :group 'info)
+
+(defface info-node '((t (:bold t :italic t)))
+  "Face used for node links in info."
+  :group 'info-faces)
+
+(defface info-xref '((t (:bold t)))
+  "Face used for cross-references in info."
+  :group 'info-faces)
+
+;; Is this right for NT?  .zip, with -c for to stdout, right?
+(defvar Info-suffix-list '( ("" . nil) 
+                           (".info" . nil)
+                           (".info.gz" . "gzip -dc %s")
+                           (".info-z" . "gzip -dc %s")
+                           (".info.Z" . "uncompress -c %s")
+                           (".gz" . "gzip -dc %s")
+                           (".Z" . "uncompress -c %s")
+                           (".zip" . "unzip -c %s") )
+  "List of file name suffixes and associated decoding commands.
+Each entry should be (SUFFIX . STRING); if STRING contains %s, that is
+changed to name of the file to decode, otherwise the file is given to
+the command as standard input.  If STRING is nil, no decoding is done.")
+
+(defvar Info-footnote-tag "Note"
+  "*Symbol that identifies a footnote or cross-reference.
+All \"*Note\" references will be changed to use this word instead.")
+
+(defvar Info-current-file nil
+  "Info file that Info is now looking at, or nil.
+This is the name that was specified in Info, not the actual file name.
+It doesn't contain directory names or file name extensions added by Info.")
+
+(defvar Info-current-subfile nil
+  "Info subfile that is actually in the *info* buffer now,
+or nil if current info file is not split into subfiles.")
+
+(defvar Info-current-node nil
+  "Name of node that Info is now looking at, or nil.")
+
+(defvar Info-tag-table-marker (make-marker)
+  "Marker pointing at beginning of current Info file's tag table.
+Marker points nowhere if file has no tag table.")
+
+(defvar Info-current-file-completions nil
+  "Cached completion list for current Info file.")
+
+(defvar Info-current-annotation-completions nil
+  "Cached completion list for current annotation files.")
+
+(defvar Info-index-alternatives nil
+  "List of possible matches for last Info-index command.")
+(defvar Info-index-first-alternative nil)
+
+(defcustom Info-annotations-path '("~/.xemacs/info.notes"
+                                   "~/.infonotes"
+                                  "/usr/lib/info.notes")
+  "*Names of files that contain annotations for different Info nodes.
+By convention, the first one should reside in your personal directory.
+The last should be a world-writable \"public\" annotations file."
+  :type '(repeat file)
+  :group 'info)
+
+(defcustom Info-button1-follows-hyperlink nil
+  "*Non-nil means mouse button1 click will follow hyperlink."
+  :type 'boolean
+  :group 'info)
+
+(defvar Info-standalone nil
+  "Non-nil if Emacs was started solely as an Info browser.")
+
+(defvar Info-in-cross-reference nil)
+(defvar Info-window-configuration nil)
+
+(defvar Info-dir-prologue "-*- Text -*-
+This is the file .../info/dir, which contains the topmost node of the
+Info hierarchy.  The first time you invoke Info you start off
+looking at that node, which is (dir)Top.
+\1f
+File: dir      Node: Top       This is the top of the INFO tree
+  This (the Directory node) gives a menu of major topics. 
+
+* Menu: The list of major topics begins on the next line.
+
+")
+
+(defvar Info-no-description-string "[No description available]"
+  "Description string for info files that have none")
+
+;;;###autoload
+(defun info (&optional file)
+  "Enter Info, the documentation browser.
+Optional argument FILE specifies the file to examine;
+the default is the top-level directory of Info.
+
+In interactive use, a prefix argument directs this command
+to read a file name from the minibuffer."
+  (interactive (if current-prefix-arg
+                  (list (read-file-name "Info file name: " nil nil t))))
+  (let ((p command-line-args))
+    (while p
+      (and (string-match "^-[fe]" (car p))
+          (equal (nth 1 p) "info")
+          (not Info-standalone)
+          (setq Info-standalone t)
+          (= (length p) 3)
+          (not (string-match "^-" (nth 2 p)))
+          (setq file (nth 2 p))
+          (setq command-line-args-left nil))
+      (setq p (cdr p))))
+;  (Info-setup-x) ??? What was this going to be?  Can anyone tell karlheg?
+  (if file
+      (unwind-protect
+         (Info-goto-node (concat "(" file ")"))
+       (and Info-standalone (info)))
+    (if (get-buffer "*info*")
+       (switch-to-buffer "*info*")
+      (Info-directory))))
+
+;;;###autoload
+(defun Info-query (file)
+  "Enter Info, the documentation browser.  Prompt for name of Info file."
+  (interactive "sInfo topic (default = menu): ")
+  (info)
+  (if (equal file "")
+      (Info-goto-node "(dir)")
+    (Info-goto-node (concat "(" file ")"))))
+
+(defun Info-setup-initial ()
+  (let ((f Info-annotations-path))
+    (while f
+      (if (and (file-exists-p (car f)) (not (get-file-buffer (car f))))
+         (bury-buffer (find-file-noselect (car f))))
+      (setq f (cdr f)))))
+
+(defun Info-find-node (filename &optional nodename no-going-back tryfile line)
+  "Go to an info node specified as separate FILENAME and NODENAME.
+Look for a plausible filename, or if not found then look for URL's and
+dispatch to the appropriate fn.  NO-GOING-BACK is non-nil if
+recovering from an error in this function; it says do not attempt
+further (recursive) error recovery.  TRYFILE is ??"
+
+  (Info-setup-initial)
+
+  (cond
+   ;; empty filename is simple case
+   ((null filename)
+    (Info-find-file-node nil nodename no-going-back tryfile line))
+   ;; Convert filename to lower case if not found as specified.
+   ;; Expand it, look harder...
+   ((let (temp temp-downcase found 
+              (fname (substitute-in-file-name filename)))
+      (let ((dirs (cond
+                  ((string-match "^\\./" fname) ; If specified name starts with `./'
+                   (list default-directory)) ; then just try current directory.
+                  ((file-name-absolute-p fname)
+                   '(nil))             ; No point in searching for an absolute file name
+                  (Info-additional-search-directory-list
+                   (append Info-directory-list
+                           Info-additional-search-directory-list))
+                  (t Info-directory-list))))
+       ;; Search the directory list for file FNAME.
+       (while (and dirs (not found))
+         (setq temp (expand-file-name fname (car dirs)))
+         (setq temp-downcase
+               (expand-file-name (downcase fname) (car dirs)))
+         (if (equal temp-downcase temp) (setq temp-downcase nil))
+         ;; Try several variants of specified name.
+         ;; Try downcasing, appending a suffix, or both.
+         (setq found (Info-suffixed-file temp temp-downcase))
+         (setq dirs (cdr dirs)))
+       (if found 
+           (progn (setq filename (expand-file-name found))
+                  t))))
+    (Info-find-file-node filename nodename no-going-back tryfile line))
+   ;; Look for a URL.  This pattern is stolen from w3.el to prevent
+   ;; loading it if we won't need it.
+   ((string-match  (concat "^\\(wais\\|solo\\|x-exec\\|newspost\\|www\\|"
+                          "mailto\\|news\\|tn3270\\|ftp\\|http\\|file\\|"
+                          "telnet\\|gopher\\):")
+                  filename)
+    (if (fboundp 'browse-url)
+       (browse-url filename)
+      (error "Cannot follow URLs in this XEmacs")))
+   (t
+    (error "Info file %s does not exist" filename))))
+
+(defun Info-find-file-node (filename nodename
+                                    &optional no-going-back tryfile line)
+  ;; This is the guts of what was Info-find-node. Whoever wrote this
+  ;; should be locked up where they can't do any more harm.
+
+  ;; Go into info buffer.
+  (switch-to-buffer "*info*")
+  (buffer-disable-undo (current-buffer))
+  (run-hooks 'Info-startup-hook)
+  (or (eq major-mode 'Info-mode)
+      (Info-mode))
+  (or (null filename)
+      (equal Info-current-file filename)
+      (not Info-novice)
+      (string= "dir" (file-name-nondirectory Info-current-file))
+      (if (y-or-n-p-maybe-dialog-box
+          (format "Leave Info file `%s'? "
+                  (file-name-nondirectory Info-current-file)))
+         (message "")
+       (keyboard-quit)))
+  ;; Record the node we are leaving.
+  (if (and Info-current-file (not no-going-back))
+      (Info-history-add Info-current-file Info-current-node (point)))
+  (widen)
+  (setq Info-current-node nil
+       Info-in-cross-reference nil)
+  (unwind-protect
+      (progn
+       ;; Switch files if necessary
+       (or (null filename)
+           (equal Info-current-file filename)
+           (let ((buffer-read-only nil))
+             (setq Info-current-file nil
+                   Info-current-subfile nil
+                   Info-current-file-completions nil
+                   Info-index-alternatives nil
+                   buffer-file-name nil)
+             (erase-buffer)
+             (if (string= "dir" (file-name-nondirectory filename))
+                 (Info-insert-dir)
+               (Info-insert-file-contents filename t)
+               (setq default-directory (file-name-directory filename)))
+             (set-buffer-modified-p nil)
+             ;; See whether file has a tag table.  Record the location if yes.
+             (set-marker Info-tag-table-marker nil)
+             (goto-char (point-max))
+             (forward-line -8)
+             (or (equal nodename "*")
+                 (not (search-forward "\^_\nEnd tag table\n" nil t))
+                 (let (pos)
+                   ;; We have a tag table.  Find its beginning.
+                   ;; Is this an indirect file?
+                   (search-backward "\nTag table:\n")
+                   (setq pos (point))
+                   (if (save-excursion
+                         (forward-line 2)
+                         (looking-at "(Indirect)\n"))
+                       ;; It is indirect.  Copy it to another buffer
+                       ;; and record that the tag table is in that buffer.
+                       (save-excursion
+                         (let ((buf (current-buffer)))
+                           (set-buffer
+                            (get-buffer-create " *info tag table*"))
+                           (buffer-disable-undo (current-buffer))
+                           (setq case-fold-search t)
+                           (erase-buffer)
+                           (insert-buffer-substring buf)
+                           (set-marker Info-tag-table-marker
+                                       (match-end 0))))
+                    (set-marker Info-tag-table-marker pos))))
+             (setq Info-current-file
+                   (file-name-sans-versions buffer-file-name))))
+       (if (equal nodename "*")
+           (progn (setq Info-current-node nodename)
+                  (Info-set-mode-line)
+                  (goto-char (point-min)))
+         ;; Search file for a suitable node.
+         (let* ((qnode (regexp-quote nodename))
+                (regexp (concat "Node: *" qnode " *[,\t\n\177]"))
+                (guesspos (point-min))
+                (found t))
+           ;; First get advice from tag table if file has one.
+           ;; Also, if this is an indirect info file,
+           ;; read the proper subfile into this buffer.
+           (if (marker-position Info-tag-table-marker)
+               (save-excursion
+                 (set-buffer (marker-buffer Info-tag-table-marker))
+                 (goto-char Info-tag-table-marker)
+                 (if (re-search-forward regexp nil t)
+                     (progn
+                       (setq guesspos (read (current-buffer)))
+                       ;; If this is an indirect file,
+                       ;; determine which file really holds this node
+                       ;; and read it in.
+                       (if (not (eq (current-buffer) (get-buffer "*info*")))
+                           (setq guesspos
+                                 (Info-read-subfile guesspos)))))))
+           (goto-char (max (point-min) (- guesspos 1000)))
+           ;; Now search from our advised position (or from beg of buffer)
+           ;; to find the actual node.
+           (catch 'foo
+             (while (search-forward "\n\^_" nil t)
+               (forward-line 1)
+               (let ((beg (point)))
+                 (forward-line 1)
+                 (if (re-search-backward regexp beg t)
+                     (throw 'foo t))))
+             (setq found nil)
+             (let ((bufs (delq nil (mapcar 'get-file-buffer
+                                           Info-annotations-path)))
+                   (pattern (if (string-match "\\`<<.*>>\\'" qnode) qnode
+                              (format "\"%s\"\\|<<%s>>" qnode qnode)))
+                   (pat2 (concat "------ *File: *\\([^ ].*[^ ]\\) *Node: "
+                                 "*\\([^ ].*[^ ]\\) *Line: *\\([0-9]+\\)"))
+                   (afile nil) anode aline)
+               (while (and bufs (not anode))
+                 (save-excursion
+                   (set-buffer (car bufs))
+                   (goto-char (point-min))
+                   (if (re-search-forward pattern nil t)
+                       (if (re-search-backward pat2 nil t)
+                           (setq afile (buffer-substring (match-beginning 1)
+                                                         (match-end 1))
+                                 anode (buffer-substring (match-beginning 2)
+                                                         (match-end 2))
+                                 aline (string-to-int
+                                        (buffer-substring (match-beginning 3)
+                                                          (match-end 3)))))))
+                 (setq bufs (cdr bufs)))
+               (if anode
+                   (Info-find-node afile anode t nil aline)
+                 (if tryfile
+                     (condition-case nil
+                         (Info-find-node nodename "Top" t)
+                       (error nil)))))
+             (or Info-current-node
+                 (error "No such node: %s" nodename)))
+           (if found
+               (progn
+                 (Info-select-node)
+                 (goto-char (point-min))
+                 (if line (forward-line line)))))))
+    ;; If we did not finish finding the specified node,
+    ;; go back to the previous one.
+    (or Info-current-node no-going-back
+       (let ((hist (car Info-history)))
+         ;; The following is no longer safe with new Info-history system
+         ;; (setq Info-history (cdr Info-history))
+         (Info-goto-node (car hist) t)
+         (goto-char (+ (point-min) (nth 1 hist)))))))
+
+;; Cache the contents of the (virtual) dir file, once we have merged
+;; it for the first time, so we can save time subsequently.
+(defvar Info-dir-contents nil)
+
+;; Cache for the directory we decided to use for the default-directory
+;; of the merged dir text.
+(defvar Info-dir-contents-directory nil)
+
+;; Record the file attributes of all the files from which we
+;; constructed Info-dir-contents.
+(defvar Info-dir-file-attributes nil)
+
+(defun Info-insert-dir ()
+  "Construct the Info directory node by merging the files named
+\"dir\" or \"localdir\" from the directories in `Info-directory-list'
+The \"dir\" files will take precedence in cases where both exist.  It
+sets the *info* buffer's `default-directory' to the first directory we
+actually get any text from."
+  (if (and Info-dir-contents Info-dir-file-attributes
+          ;; Verify that none of the files we used has changed
+          ;; since we used it.
+          (eval (cons 'and
+                      (mapcar '(lambda (elt)
+                                 (let ((curr (file-attributes (car elt))))
+                                   ;; Don't compare the access time.
+                                   (if curr (setcar (nthcdr 4 curr) 0))
+                                   (setcar (nthcdr 4 (cdr elt)) 0)
+                                   (equal (cdr elt) curr)))
+                              Info-dir-file-attributes))))
+      (insert Info-dir-contents)
+    (let ((dirs (reverse Info-directory-list))
+         buffers lbuffers buffer others nodes dirs-done)
+
+      (setq Info-dir-file-attributes nil)
+
+      ;; Search the directory list for the directory file.
+      (while dirs
+       (let ((truename (file-truename (expand-file-name (car dirs)))))
+         (or (member truename dirs-done)
+             (member (directory-file-name truename) dirs-done)
+             ;; Try several variants of specified name.
+             ;; Try upcasing, appending `.info', or both.
+             (let* (buf
+                    file
+                    (attrs
+                     (or
+                      (progn (setq file (expand-file-name "dir" truename))
+                             (file-attributes file))
+                      (progn (setq file (expand-file-name "DIR" truename))
+                             (file-attributes file))
+                      (progn (setq file (expand-file-name "dir.info" truename))
+                             (file-attributes file))
+                      (progn (setq file (expand-file-name "DIR.INFO" truename))
+                             (file-attributes file))
+                      (progn (setq file (expand-file-name "localdir" truename))
+                             (file-attributes file))
+                      (progn (setq file (expand-file-name "dir" truename))
+                             nil)
+                      )))
+               (setq dirs-done
+                     (cons truename
+                           (cons (directory-file-name truename)
+                                 dirs-done)))
+               (Info-maybe-update-dir file)
+               (setq attrs (file-attributes file))
+               (if (or (setq buf (find-buffer-visiting file))
+                       attrs)
+                   (save-excursion
+                     (or buffers
+                         (message "Composing main Info directory..."))
+                     (set-buffer (or buf
+                                     (generate-new-buffer
+                                      (if (string-match "localdir" file)
+                                          "localdir"
+                                        "info dir"))))
+                     (if (not buf) 
+                         (insert-file-contents file))
+                     (if (string-match "localdir" (buffer-name))
+                         (setq lbuffers (cons (current-buffer) lbuffers))
+                       (setq buffers (cons (current-buffer) buffers)))
+                     (if attrs
+                         (setq Info-dir-file-attributes
+                               (cons (cons file attrs)
+                                     Info-dir-file-attributes)))))))
+         (or (cdr dirs) (setq Info-dir-contents-directory (car dirs)))
+         (setq dirs (cdr dirs))))
+      
+      ;; ensure that the localdir files are inserted last, and reverse
+      ;; the list of them so that when they get pushed in, they appear
+      ;; in the same order they got specified in the path, from top to
+      ;; bottom.
+      (nconc buffers (reverse lbuffers))
+      
+      (or buffers
+         (error "Can't find the Info directory node"))
+      ;; Distinguish the dir file that comes with Emacs from all the
+      ;; others.  Yes, that is really what this is supposed to do.
+      ;; If it doesn't work, fix it.
+      (setq buffer (car buffers)
+           ;; reverse it since they are pushed down from the top. the
+           ;; `Info-directory-list can be specified in natural order
+           ;; this way.
+           others (reverse (cdr buffers)))
+
+      ;; Insert the entire original dir file as a start; note that we've
+      ;; already saved its default directory to use as the default
+      ;; directory for the whole concatenation.
+      (insert-buffer buffer)
+
+      ;; Look at each of the other buffers one by one.
+      (while others
+       (let ((other (car others))
+             (info-buffer (current-buffer)))
+         (if (string-match "localdir" (buffer-name other))
+             (save-excursion
+               (set-buffer info-buffer)
+               (goto-char (point-max))
+               (cond
+                ((re-search-backward "^ *\\* *Locals *: *$" nil t)
+                 (delete-region (match-beginning 0) (match-end 0)))
+                ;; look for a line like |Local XEmacs packages:
+                ;; or mismatch on some text ...
+                ((re-search-backward Info-localdir-heading-regexp nil t)
+                 ;; This is for people who underline topic headings with
+                 ;; equal signs or dashes.
+                 (when (save-excursion
+                         (forward-line 1)
+                         (beginning-of-line)
+                         (looking-at "^[ \t]*[-=*]+"))
+                   (forward-line 1))
+                 (forward-line 1)
+                 (beginning-of-line))
+                (t (search-backward "\^L" nil t)))
+               ;; Insert menu part of the file
+               (let* ((pt (point))
+                      (len (length (buffer-string nil nil other))))
+                 (insert (buffer-string nil nil other))
+                 (goto-char (+ pt len))
+                 (save-excursion
+                   (goto-char pt)
+                   (if (search-forward "* Menu:" (+ pt len) t)
+                       (progn
+                         (forward-line 1)
+                         (delete-region pt (point)))))))
+           ;; In each, find all the menus.
+           (save-excursion
+             (set-buffer other)
+             (goto-char (point-min))
+             ;; Find each menu, and add an elt to NODES for it.
+             (while (re-search-forward "^\\* Menu:" nil t)
+               (let (beg nodename end)
+                 (forward-line 1)
+                 (setq beg (point))
+                 (search-backward "\n\^_")
+                 (search-forward "Node: ")
+                 (setq nodename (Info-following-node-name))
+                 (search-forward "\n\^_" nil 'move)
+                 (beginning-of-line)
+                 (setq end (point))
+                 (setq nodes (cons (list nodename other beg end) nodes))))))
+         (setq others (cdr others))))
+      
+      ;; Add to the main menu a menu item for each other node.
+      (re-search-forward "^\\* Menu:" nil t)
+      (forward-line 1)
+      (let ((menu-items '("top"))
+           (nodes nodes)
+           (case-fold-search t)
+           (end (save-excursion (search-forward "\^_" nil t) (point))))
+       (while nodes
+         (let ((nodename (car (car nodes))))
+           (save-excursion
+             (or (member (downcase nodename) menu-items)
+                 (re-search-forward (concat "^\\* "
+                                            (regexp-quote nodename)
+                                            "::")
+                                    end t)
+                 (progn
+                   (insert "* " nodename "::" "\n")
+                   (setq menu-items (cons nodename menu-items))))))
+         (setq nodes (cdr nodes))))
+      ;; Now take each node of each of the other buffers
+      ;; and merge it into the main buffer.
+      (while nodes
+       (let ((nodename (car (car nodes))))
+         (goto-char (point-min))
+         ;; Find the like-named node in the main buffer.
+         (if (re-search-forward (concat "\n\^_.*\n.*Node: "
+                                        (regexp-quote nodename)
+                                        "[,\n\t]")
+                                nil t)
+             (progn
+               (search-forward "\n\^_" nil 'move)
+               (beginning-of-line)
+               (insert "\n"))
+           ;; If none exists, add one.
+           (goto-char (point-max))
+           (insert "\^_\nFile: dir\tNode: " nodename "\n\n* Menu:\n\n"))
+         ;; Merge the text from the other buffer's menu
+         ;; into the menu in the like-named node in the main buffer.
+         (apply 'insert-buffer-substring (cdr (car nodes))))
+       (setq nodes (cdr nodes)))
+      ;; Kill all the buffers we just made.
+      (while buffers
+       (kill-buffer (car buffers))
+       (setq buffers (cdr buffers)))
+      (while lbuffers
+       (kill-buffer (car lbuffers))
+       (setq lbuffers (cdr lbuffers)))
+      (message "Composing main Info directory...done"))
+    (setq Info-dir-contents (buffer-string)))
+  (setq default-directory Info-dir-contents-directory)
+  (setq buffer-file-name (caar Info-dir-file-attributes)))
+
+(defun Info-maybe-update-dir (file)
+  "Rebuild dir or localdir according to `Info-auto-generate-directory'."
+  (unless (or (not (file-exists-p (file-name-directory file)))
+             (null (directory-files (file-name-directory file) nil "\\.info")))
+    (if (not (find-buffer-visiting file))
+       (if (not (file-exists-p file))
+           (if (or (eq Info-auto-generate-directory 'always)
+                   (eq Info-auto-generate-directory 'if-missing))            
+               (Info-build-dir-anew (file-name-directory file)))
+         (if (or (eq Info-auto-generate-directory 'always)
+                 (and (eq Info-auto-generate-directory 'if-outdated)
+                      (Info-dir-outdated-p file)))
+             (Info-rebuild-dir file))))))
+
+;; Record which *.info files are newer than the dir file
+(defvar Info-dir-newer-info-files nil)
+
+(defun Info-dir-outdated-p (file)
+  "Return non-nil if dir or localdir is outdated.
+dir or localdir are outdated when an info file in the same
+directory has been modified more recently."
+  (let ((dir-mod-time (nth 5 (file-attributes file)))
+       f-mod-time
+       newer)
+    (setq Info-dir-newer-info-files nil)
+    (mapcar 
+     '(lambda (f)
+       (prog2
+           (setq f-mod-time (nth 5 (file-attributes f)))
+           (setq newer (or (> (car f-mod-time) (car dir-mod-time))
+                           (and (= (car f-mod-time) (car dir-mod-time))
+                                (> (car (cdr f-mod-time)) (car (cdr dir-mod-time))))))
+         (if (and (file-readable-p f)
+                  newer)
+             (setq Info-dir-newer-info-files 
+                   (cons f Info-dir-newer-info-files)))))
+     (directory-files (file-name-directory file)
+                     'fullname
+                     ".*\\.info\\(.gz\\|.Z\\|-z\\|.zip\\)?$"
+                     'nosort
+                     t))
+    Info-dir-newer-info-files))
+
+(defun Info-extract-dir-entry-from (file)
+  "Extract the dir entry from the info FILE.
+The dir entry is delimited by the markers `START-INFO-DIR-ENTRY'
+and `END-INFO-DIR-ENTRY'"
+  (save-excursion
+    (set-buffer (get-buffer-create " *Info-tmp*"))
+    (when (file-readable-p file)
+      (insert-file-contents file nil nil nil t)
+      (goto-char (point-min))
+      (let (beg)
+       (unless (null (re-search-forward "^START-INFO-DIR-ENTRY" nil t))
+         (forward-line 1)
+         (setq beg (point))
+         (unless (null (re-search-forward "^END-INFO-DIR-ENTRY" nil t))
+           (goto-char (match-beginning 0))
+           (car (Info-parse-dir-entries beg (point)))))))))
+
+;; Parse dir entries contained between BEG and END into a list of the form
+;; (filename topic node (description-line-1 description-line-2 ...))
+(defun Info-parse-dir-entries (beg end)
+  (let (entry entries)
+    (save-excursion
+      (save-restriction
+       (narrow-to-region beg end)
+       (goto-char beg)
+       (while (re-search-forward "^\\* \\([^:]+\\):\\([ \t]*(\\([^)]*\\))\\w*\\.\\|:\\)" nil t)
+         (setq entry (list (match-string 2)
+                           (match-string 1)
+                           (downcase (or (match-string 3)
+                                         (match-string 1)))))
+         (setq entry 
+               (cons (nreverse 
+                      (cdr 
+                       (nreverse 
+                        (split-string 
+                         (buffer-substring 
+                          (re-search-forward "[ \t]*" nil t)
+                          (or (and (re-search-forward "^[^ \t]" nil t)
+                                   (goto-char (match-beginning 0)))
+                              (point-max)))
+                         "[ \t]*\n[ \t]*"))))
+                     entry))
+         (setq entries (cons (nreverse entry) entries)))))
+    (nreverse entries)))
+
+(defun Info-dump-dir-entries (entries)
+  (let ((tab-width 8)
+       (description-col 0)
+       len)
+    (mapcar '(lambda (e)
+              (setq e (cdr e))         ; Drop filename
+              (setq len (length (concat (car e)
+                                        (car (cdr e)))))
+              (if (> len description-col)
+                  (setq description-col len)))
+           entries)
+    (setq description-col (+ 5 description-col)) 
+    (mapcar '(lambda (e)
+              (setq e (cdr e))         ; Drop filename
+              (insert "* " (car e) ":" (car (cdr e)))
+              (setq e (car (cdr (cdr e))))
+              (while e
+                (indent-to-column description-col)
+                (insert (car e) "\n")
+                (setq e (cdr e))))
+           entries)
+    (insert "\n")))
+
+
+(defun Info-build-dir-anew (directory)
+  "Build info directory information for DIRECTORY.
+The generated directory listing may be saved to a `dir' according 
+to the value of `Info-save-auto-generated-dir'"
+  (save-excursion
+    (let* ((dirfile (expand-file-name "dir" directory))
+          (to-temp (or (null Info-save-auto-generated-dir)
+                       (eq Info-save-auto-generated-dir 'never)
+                       (and (not (file-writable-p dirfile))
+                            (message "File not writable %s. Using temporary." dirfile))))
+          (info-files 
+           (directory-files directory
+                            'fullname
+                            ".*\\.info\\(.gz\\|.Z\\|-z\\|.zip\\)?$"
+                            nil
+                            t)))
+      (if to-temp
+         (message "Creating temporary dir in %s..." directory)
+       (message "Creating %s..." dirfile))
+      (set-buffer (find-file-noselect dirfile t))
+      (setq buffer-read-only nil)
+      (erase-buffer)
+      (insert Info-dir-prologue
+             "Info files in " directory ":\n\n")
+      (Info-dump-dir-entries 
+       (mapcar 
+       '(lambda (f)
+          (or (Info-extract-dir-entry-from f)
+              (list 'dummy
+                    (progn 
+                      (string-match "\\(.*\\)\\.info\\(.gz\\|.Z\\|-z\\|.zip\\)?$" 
+                                    (file-name-nondirectory f))
+                      (capitalize (match-string 1 (file-name-nondirectory f))))
+                    ":"
+                    (list Info-no-description-string))))
+       info-files))
+      (if to-temp
+         (set-buffer-modified-p nil)
+       (save-buffer))
+      (if to-temp
+         (message "Creating temporary dir in %s...done" directory)
+       (message "Creating %s...done" dirfile)))))
+
+
+(defun Info-rebuild-dir (file)
+  "Build info directory information in the directory of dir FILE.
+Description of info files are merged from the info files in the 
+directory and the contents of FILE with the description in info files
+taking precedence over descriptions in FILE.  
+The generated directory listing may be saved to a `dir' according to 
+the value of `Info-save-auto-generated-dir' "
+  (save-excursion
+    (save-restriction
+      (let (dir-section-contents dir-full-contents
+           dir-entry
+           file-dir-entry
+           mark next-section
+           not-first-section
+           (to-temp 
+            (or (null Info-save-auto-generated-dir)
+                (eq Info-save-auto-generated-dir 'never)
+                (and (eq Info-save-auto-generated-dir 'always)
+                     (not (file-writable-p file))
+                     (message "File not writable %s. Using temporary." file))
+                (and (eq Info-save-auto-generated-dir 'conservative)
+                     (or (and (not (file-writable-p file))
+                              (message "File not writable %s. Using temporary." file))
+                         (not (y-or-n-p 
+                               (message "%s is outdated. Overwrite ? " 
+                                        file))))))))
+       (set-buffer (find-file-noselect file t))
+       (setq buffer-read-only nil)
+       (if to-temp
+           (message "Rebuilding temporary %s..." file)
+         (message "Rebuilding %s..." file))
+       (catch 'done
+         (setq buffer-read-only nil)
+         (goto-char (point-min))
+         (unless (and (search-forward "\^_")
+                      (re-search-forward "^\\* Menu:.*$" nil t)
+                      (setq mark (and (re-search-forward "^\\* " nil t)
+                                      (match-beginning 0))))
+           (throw 'done nil))
+         (setq dir-full-contents (Info-parse-dir-entries mark (point-max)))
+         (setq next-section (or (and (re-search-forward "^[^* \t].*:[ \t]*$" nil t)
+                                     (match-beginning 0))
+                                (point-max)))
+         (while next-section
+           (narrow-to-region mark next-section)
+           (setq dir-section-contents (nreverse (Info-parse-dir-entries (point-min)
+                                                                        (point-max))))
+           (mapcar '(lambda (file)
+                      (setq dir-entry (assoc (downcase
+                                              (file-name-sans-extension
+                                               (file-name-nondirectory file)))
+                                             dir-section-contents)
+                            file-dir-entry (Info-extract-dir-entry-from file))
+                      (if dir-entry
+                          (if file-dir-entry
+                              ;; A dir entry in the info file takes precedence over an
+                              ;; existing entry in the dir file
+                              (setcdr dir-entry (cdr file-dir-entry)))
+                        (unless (or not-first-section
+                                    (assoc (downcase
+                                        (file-name-sans-extension
+                                         (file-name-nondirectory file)))
+                                       dir-full-contents))
+                          (if file-dir-entry
+                              (setq dir-section-contents (cons file-dir-entry
+                                                               dir-section-contents))
+                            (setq dir-section-contents 
+                                  (cons (list 'dummy
+                                              (capitalize (file-name-sans-extension
+                                                           (file-name-nondirectory file)))
+                                              ":"
+                                              (list Info-no-description-string)) 
+                                        dir-section-contents))))))
+                   Info-dir-newer-info-files)
+           (delete-region (point-min) (point-max))
+           (Info-dump-dir-entries (nreverse dir-section-contents))
+           (widen)
+           (if (= next-section (point-max))
+               (setq next-section nil)
+             (or (setq mark (and (re-search-forward "^\\* " nil t)
+                                 (match-beginning 0)))
+                 (throw 'done nil))
+             (setq next-section (or (and (re-search-forward "^[^* \t].*:[ \t]*$" nil t)
+                                         (match-beginning 0))
+                                    (point-max))))
+           (setq not-first-section t)))
+       (if to-temp
+           (progn
+             (set-buffer-modified-p nil)
+             (message "Rebuilding temporary %s...done" file))
+         (save-buffer)
+         (message "Rebuilding %s...done" file))))))
+
+;;;###autoload      
+(defun Info-batch-rebuild-dir ()
+  "(Re)build info `dir' files in the directories remaining on the command line.
+Use this from the command line, with `-batch';
+it won't work in an interactive Emacs.
+Each file is processed even if an error occurred previously.
+For example, invoke \"xemacs -batch -f Info-batch-rebuild-dir /usr/local/info\""
+  ;; command-line-args-left is what is left of the command line (from
+  ;; startup.el)
+  (defvar command-line-args-left)      ; Avoid 'free variable' warning
+  (if (not noninteractive)
+      (error "`Info-batch-rebuild-dir' is to be used only with -batch"))
+  (let ((Info-save-auto-generated-dir 'always)
+       dir localdir)
+    (while command-line-args-left
+      (if  (not (file-directory-p (car command-line-args-left)))
+         (message "Warning: Skipped %s. Not a directory."
+                  (car command-line-args-left))
+       (setq dir (expand-file-name "dir" (car command-line-args-left)))
+       (setq localdir (expand-file-name "localdir" (car command-line-args-left)))
+       (cond 
+        ((file-exists-p dir)
+         (Info-rebuild-dir dir))
+        ((file-exists-p localdir)
+         (Info-rebuild-dir localdir))
+        (t
+         (Info-build-dir-anew (car command-line-args-left)))))
+      (setq command-line-args-left (cdr command-line-args-left)))
+    (message "Done")
+    (kill-emacs 0)))
+
+(defun Info-history-add (file node point)
+  (if Info-keeping-history
+      (let* ((name (format "(%s)%s" (Info-file-name-only file) node))
+            (found (assoc name Info-history)))
+       (if found
+           (setq Info-history (delq found Info-history)))
+       (setq Info-history (cons (list name (- point (point-min))
+                                      (and (eq (window-buffer)
+                                               (current-buffer))
+                                           (- (window-start) (point-min))))
+                                Info-history)))))
+
+(defun Info-file-name-only (file)
+  (let ((dir (file-name-directory file))
+       (p Info-directory-list))
+    (while (and p (not (equal (car p) dir)))
+      (setq p (cdr p)))
+    (if p (file-name-nondirectory file) file)))
+
+(defun Info-read-subfile (nodepos)
+  (set-buffer (marker-buffer Info-tag-table-marker))
+  (goto-char (point-min))
+  (search-forward "\n\^_")
+  (let (lastfilepos
+       lastfilename)
+    (forward-line 2)
+    (catch 'foo
+      (while (not (looking-at "\^_"))
+       (if (not (eolp))
+           (let ((beg (point))
+                 thisfilepos thisfilename)
+             (search-forward ": ")
+             (setq thisfilename  (buffer-substring beg (- (point) 2)))
+             (setq thisfilepos (read (current-buffer)))
+             ;; read in version 19 stops at the end of number.
+             ;; Advance to the next line.
+             (if (eolp)
+                 (forward-line 1))
+             (if (> thisfilepos nodepos)
+                 (throw 'foo t))
+             (setq lastfilename thisfilename)
+             (setq lastfilepos thisfilepos))
+         (throw 'foo t))))
+    (set-buffer (get-buffer "*info*"))
+    (or (equal Info-current-subfile lastfilename)
+       (let ((buffer-read-only nil))
+         (setq buffer-file-name nil)
+         (widen)
+         (erase-buffer)
+         (Info-insert-file-contents (Info-suffixed-file
+                                     (expand-file-name lastfilename
+                                                       (file-name-directory
+                                                        Info-current-file)))
+                                    t)
+         (set-buffer-modified-p nil)
+         (setq Info-current-subfile lastfilename)))
+    (goto-char (point-min))
+    (search-forward "\n\^_")
+    (+ (- nodepos lastfilepos) (point))))
+
+(defun Info-suffixed-file (name &optional name2)
+  "Look for NAME with each of the `Info-suffix-list' extensions in
+turn. Optional NAME2 is the name of a fallback info file to check
+for; usually a downcased version of NAME."
+  (let ((suff Info-suffix-list)
+       (found nil)
+       file file2)
+    (while (and suff (not found))
+      (setq file (concat name (caar suff))
+           file2 (and name2 (concat name2 (caar suff))))
+      (cond
+       ((file-regular-p file)
+       (setq found file))
+       ((and file2 (file-regular-p file2))
+       (setq found file2))
+       (t
+       (setq suff (cdr suff)))))
+    (or found
+       (and name (when (file-regular-p name)
+                   name))
+       (and name2 (when (file-regular-p name2)
+                    name2)))))
+
+(defun Info-insert-file-contents (file &optional visit)
+  (setq file (expand-file-name file default-directory))
+  (let ((suff Info-suffix-list))
+    (while (and suff (or (<= (length file) (length (car (car suff))))
+                        (not (equal (substring file
+                                               (- (length (car (car suff)))))
+                                    (car (car suff))))))
+      (setq suff (cdr suff)))
+    (if (stringp (cdr (car suff)))
+       (let ((command (if (string-match "%s" (cdr (car suff)))
+                          (format (cdr (car suff)) file)
+                        (concat (cdr (car suff)) " < " file))))
+         (message "%s..." command)
+         (if (eq system-type 'vax-vms)
+             (call-process command nil t nil)
+           (call-process shell-file-name nil t nil "-c" command))
+         (message "")
+         (if visit
+             (progn
+               (setq buffer-file-name file)
+               (set-buffer-modified-p nil)
+               (clear-visited-file-modtime))))
+      (insert-file-contents file visit))))
+
+(defun Info-select-node ()
+  "Select the node that point is in, after using `g *' to select whole file."
+  (interactive)
+  (widen)
+  (save-excursion
+   ;; Find beginning of node.
+   (search-backward "\n\^_")
+   (forward-line 2)
+   ;; Get nodename spelled as it is in the node.
+   (re-search-forward "Node:[ \t]*")
+   (setq Info-current-node
+        (buffer-substring (point)
+                          (progn
+                           (skip-chars-forward "^,\t\n")
+                           (point))))
+   (Info-set-mode-line)
+   ;; Find the end of it, and narrow.
+   (beginning-of-line)
+   (let (active-expression)
+     (narrow-to-region (point)
+                      (if (re-search-forward "\n[\^_\f]" nil t)
+                          (prog1
+                           (1- (point))
+                           (if (looking-at "[\n\^_\f]*execute: ")
+                               (progn
+                                 (goto-char (match-end 0))
+                                 (setq active-expression
+                                       (read (current-buffer))))))
+                        (point-max)))
+     (or (equal Info-footnote-tag "Note")
+        (progn
+          (goto-char (point-min))
+          (let ((buffer-read-only nil)
+                (bufmod (buffer-modified-p))
+                (case-fold-search t))
+            (while (re-search-forward "\\*[Nn]ote\\([ \n]\\)" nil t)
+              (replace-match (concat "*" Info-footnote-tag "\ ")))
+            (set-buffer-modified-p bufmod))))
+     (Info-reannotate-node)
+     ;; XEmacs: remove v19 test
+     (and Info-fontify
+         (Info-fontify-node))
+     (run-hooks 'Info-select-hook)
+     (if Info-enable-active-nodes (eval active-expression)))))
+
+(defun Info-set-mode-line ()
+  (setq modeline-buffer-identification
+       (list (cons modeline-buffer-id-left-extent "Info: ")
+             (cons modeline-buffer-id-right-extent
+                   (concat
+                    "("
+                    (if Info-current-file
+                        (let ((name (file-name-nondirectory Info-current-file)))
+                          (if (string-match "\\.info$" name)
+                              (substring name 0 -5)
+                            name))
+                      "")
+                    ")"
+                    (or Info-current-node ""))))))
+\f
+;; Go to an info node specified with a filename-and-nodename string
+;; of the sort that is found in pointers in nodes.
+
+;;;###autoload
+(defun Info-goto-node (nodename &optional no-going-back tryfile)
+  "Go to info node named NAME.  Give just NODENAME or (FILENAME)NODENAME.
+Actually, the following interpretations of NAME are tried in order:
+    (FILENAME)NODENAME
+    (FILENAME)     (using Top node)
+    NODENAME       (in current file)
+    TAGNAME        (see below)
+    FILENAME       (using Top node)
+where TAGNAME is a string that appears in quotes: \"TAGNAME\", in an
+annotation for any node of any file.  (See `a' and `x' commands.)"
+  (interactive (list (Info-read-node-name "Goto node, file or tag: ")
+                    nil t))
+  (let (filename)
+    (string-match "\\s *\\((\\s *\\([^\t)]*\\)\\s *)\\s *\\|\\)\\(.*\\)"
+                 nodename)
+    (setq filename (if (= (match-beginning 1) (match-end 1))
+                      ""
+                    (substring nodename (match-beginning 2) (match-end 2)))
+         nodename (substring nodename (match-beginning 3) (match-end 3)))
+    (let ((trim (string-match "\\s *\\'" filename)))
+      (if trim (setq filename (substring filename 0 trim))))
+    (let ((trim (string-match "\\s *\\'" nodename)))
+      (if trim (setq nodename (substring nodename 0 trim))))
+    (Info-find-node (if (equal filename "") nil filename)
+                   (if (equal nodename "") "Top" nodename)
+                   no-going-back (and tryfile (equal filename "")))))
+
+(defun Info-goto-bookmark ()
+  (interactive)
+  (let ((completion-ignore-case nil)
+       (tag (completing-read "Goto tag: "
+                             (Info-build-annotation-completions)
+                             nil t nil
+                             'Info-minibuffer-history)))
+    (or (equal tag "") (Info-find-node nil (format "<<%s>>" tag)))))
+
+;;;###autoload
+(defun Info-visit-file ()
+  "Directly visit an info file."
+  (interactive)
+  (let* ((insert-default-directory nil)
+        (file (read-file-name "Goto Info file: " "" "")))
+    (or (equal file "") (Info-find-node (expand-file-name file) "Top"))))
+
+(defun Info-restore-point (&optional always)
+  "Restore point to same location it had last time we were in this node."
+  (interactive "p")
+  (if (or Info-restoring-point always)
+      (let* ((name (format "(%s)%s"
+                          (Info-file-name-only Info-current-file)
+                          Info-current-node))
+            (p (assoc name Info-history)))
+       (if p (Info-restore-history-entry p)))))
+
+(defun Info-restore-history-entry (entry)
+  (goto-char (+ (nth 1 entry) (point-min)))
+  (and (nth 2 entry)
+       (get-buffer-window (current-buffer))
+       (set-window-start (get-buffer-window (current-buffer))
+                        (+ (nth 2 entry) (point-min)))))
+
+(defun Info-read-node-name (prompt &optional default)
+  (Info-setup-initial)
+  (let* ((completion-ignore-case t)
+        (nodename (completing-read prompt
+                                   (Info-build-node-completions)
+                                   nil nil nil
+                                   'Info-minibuffer-history)))
+    (if (equal nodename "")
+       (or default
+           (Info-read-node-name prompt))
+      nodename)))
+
+(defun Info-build-annotation-completions ()
+  (or Info-current-annotation-completions
+      (save-excursion
+       (let ((bufs (delq nil (mapcar 'get-file-buffer
+                                     Info-annotations-path)))
+             (compl nil))
+         (while bufs
+           (set-buffer (car bufs))
+           (goto-char (point-min))
+           (while (re-search-forward "<<\\(.*\\)>>" nil t)
+             (setq compl (cons (list (buffer-substring (match-beginning 1)
+                                                       (match-end 1)))
+                               compl)))
+           (setq bufs (cdr bufs)))
+         (setq Info-current-annotation-completions compl)))))
+
+(defun Info-build-node-completions ()
+  (or Info-current-file-completions
+      (let ((compl (Info-build-annotation-completions)))
+       (save-excursion
+         (save-restriction
+           (if (marker-buffer Info-tag-table-marker)
+               (progn
+                 (set-buffer (marker-buffer Info-tag-table-marker))
+                 (goto-char Info-tag-table-marker)
+                 (while (re-search-forward "\nNode: \\(.*\\)\177" nil t)
+                   (setq compl
+                         (cons (list (buffer-substring (match-beginning 1)
+                                                       (match-end 1)))
+                               compl))))
+             (widen)
+             (goto-char (point-min))
+             (while (search-forward "\n\^_" nil t)
+               (forward-line 1)
+               (let ((beg (point)))
+                 (forward-line 1)
+                 (if (re-search-backward "Node: *\\([^,\n]*\\) *[,\n\t]"
+                                         beg t)
+                     (setq compl 
+                           (cons (list (buffer-substring (match-beginning 1)
+                                                         (match-end 1)))
+                                 compl))))))))
+       (setq Info-current-file-completions compl))))
+\f
+(defvar Info-last-search nil
+  "Default regexp for \\<Info-mode-map>\\[Info-search] command to search for.")
+
+
+;;;###autoload
+(defun Info-search (regexp)
+  "Search for REGEXP, starting from point, and select node it's found in."
+  (interactive "sSearch (regexp): ")
+  (if (equal regexp "")
+      (setq regexp Info-last-search)
+    (setq Info-last-search regexp))
+  (with-caps-disable-folding regexp
+    (let ((found ())
+          (onode Info-current-node)
+          (ofile Info-current-file)
+          (opoint (point))
+          (osubfile Info-current-subfile))
+      (save-excursion
+        (save-restriction
+          (widen)
+          (if (null Info-current-subfile)
+              (progn (re-search-forward regexp) (setq found (point)))
+            (condition-case nil
+                (progn (re-search-forward regexp) (setq found (point)))
+              (search-failed nil)))))
+      (if (not found)                   ;can only happen in subfile case -- else would have erred
+          (unwind-protect
+              (let ((list ()))
+                (set-buffer (marker-buffer Info-tag-table-marker))
+                (goto-char (point-min))
+                (search-forward "\n\^_\nIndirect:")
+                (save-restriction
+                  (narrow-to-region (point)
+                                    (progn (search-forward "\n\^_")
+                                           (1- (point))))
+                  (goto-char (point-min))
+                  (search-forward (concat "\n" osubfile ": "))
+                  (beginning-of-line)
+                  (while (not (eobp))
+                    (re-search-forward "\\(^.*\\): [0-9]+$")
+                    (goto-char (+ (match-end 1) 2))
+                    (setq list (cons (cons (read (current-buffer))
+                                           (buffer-substring (match-beginning 1)
+                                                             (match-end 1)))
+                                     list))
+                    (goto-char (1+ (match-end 0))))
+                  (setq list (nreverse list)
+                        list (cdr list)))
+                (while list
+                  (message "Searching subfile %s..." (cdr (car list)))
+                  (Info-read-subfile (car (car list)))
+                  (setq list (cdr list))
+                  (goto-char (point-min))
+                  (if (re-search-forward regexp nil t)
+                      (setq found (point) list ())))
+                (if found
+                    (message "")
+                  (signal 'search-failed (list regexp))))
+            (if (not found)
+                (progn (Info-read-subfile opoint)
+                       (goto-char opoint)
+                       (Info-select-node)))))
+      (widen)
+      (goto-char found)
+      (Info-select-node)
+      (or (and (equal onode Info-current-node)
+               (equal ofile Info-current-file))
+          (Info-history-add ofile onode opoint)))))
+\f
+;; Extract the value of the node-pointer named NAME.
+;; If there is none, use ERRORNAME in the error message; 
+;; if ERRORNAME is nil, just return nil.
+(defun Info-extract-pointer (name &optional errorname)
+  (save-excursion
+   (goto-char (point-min))
+   (forward-line 4)
+   (let ((case-fold-search t))
+     (if (re-search-backward (concat name ":") nil t)
+        (progn
+          (goto-char (match-end 0))
+          (Info-following-node-name))
+       (if (eq errorname t)
+          nil
+        (error (concat "Node has no " (capitalize (or errorname name)))))))))
+
+;; Return the node name in the buffer following point.
+;; ALLOWEDCHARS, if non-nil, goes within [...] to make a regexp
+;; saying which chas may appear in the node name.
+(defun Info-following-node-name (&optional allowedchars)
+  (skip-chars-forward " \t")
+  (buffer-substring
+   (point)
+   (progn
+     (while (looking-at (concat "[" (or allowedchars "^,\t\n") "]"))
+       (skip-chars-forward (concat (or allowedchars "^,\t\n") "("))
+       (if (looking-at "(")
+          (skip-chars-forward "^)")))
+     (skip-chars-backward " ")
+     (point))))
+
+(defun Info-next (&optional n)
+  "Go to the next node of this node.
+A positive or negative prefix argument moves by multiple nodes."
+  (interactive "p")
+  (or n (setq n 1))
+  (if (< n 0)
+      (Info-prev (- n))
+    (while (>= (setq n (1- n)) 0)
+      (Info-goto-node (Info-extract-pointer "next")))))
+
+(defun Info-prev (&optional n)
+  "Go to the previous node of this node.
+A positive or negative prefix argument moves by multiple nodes."
+  (interactive "p")
+  (or n (setq n 1))
+  (if (< n 0)
+      (Info-next (- n))
+    (while (>= (setq n (1- n)) 0)
+      (Info-goto-node (Info-extract-pointer "prev[ious]*" "previous")))))
+
+(defun Info-up (&optional n)
+  "Go to the superior node of this node.
+A positive prefix argument moves up several times."
+  (interactive "p")
+  (or n (setq n 1))
+  (while (>= (setq n (1- n)) 0)
+    (Info-goto-node (Info-extract-pointer "up")))
+  (if (interactive-p) (Info-restore-point)))
+
+(defun Info-last (&optional n)
+  "Go back to the last node visited.
+With a prefix argument, go to Nth most recently visited node.  History is
+circular; after oldest node, history comes back around to most recent one.
+Argument can be negative to go through the circle in the other direction.
+\(In other words, `l' is like \"undo\" and `C-u - l' is like \"redo\".)"
+  (interactive "p")
+  (or n (setq n 1))
+  (or Info-history
+      (error "This is the first Info node you looked at"))
+  (let ((len (1+ (length Info-history))))
+    (setq n (% (+ n (* len 100)) len)))
+  (if (> n 0)
+      (let ((entry (nth (1- n) Info-history)))
+       (Info-history-add Info-current-file Info-current-node (point))
+       (while (>= (setq n (1- n)) 0)
+         (setq Info-history (nconc (cdr Info-history)
+                                   (list (car Info-history)))))
+       (setq Info-history (cdr Info-history))
+       (let ((Info-keeping-history nil))
+         (Info-goto-node (car entry)))
+       (Info-restore-history-entry entry))))
+
+(defun Info-directory ()
+  "Go to the Info directory node."
+  (interactive)
+  (Info-find-node "dir" "top"))
+\f
+(defun Info-follow-reference (footnotename)
+  "Follow cross reference named NAME to the node it refers to.
+NAME may be an abbreviation of the reference name."
+  (interactive
+   (let ((completion-ignore-case t)
+        completions default (start-point (point)) str i)
+     (save-excursion
+       (goto-char (point-min))
+       (while (re-search-forward (format "\\*%s[ \n\t]*\\([^:]*\\):"
+                                        Info-footnote-tag)
+                                nil t)
+        (setq str (buffer-substring
+                   (match-beginning 1)
+                   (1- (point))))
+        ;; See if this one should be the default.
+        (and (null default)
+             (< (match-beginning 0) start-point)
+             (<= start-point (point))
+             (setq default t))
+        (setq i 0)
+        (while (setq i (string-match "[ \n\t]+" str i))
+          (setq str (concat (substring str 0 i) " "
+                            (substring str (match-end 0))))
+          (setq i (1+ i)))
+        ;; Record as a completion and perhaps as default.
+        (if (eq default t) (setq default str))
+        (setq completions
+              (cons (cons str nil)
+                    completions))))
+     (if completions
+        (let ((item (completing-read (if default
+                                         (concat "Follow reference named: ("
+                                                 default ") ")
+                                       "Follow reference named: ")
+                                     completions nil t nil
+                                     'Info-minibuffer-history)))
+          (if (and (string= item "") default)
+              (list default)
+            (list item)))
+       (error "No cross-references in this node"))))
+  (let (target i (str (concat "\\*" Info-footnote-tag " "
+                             (regexp-quote footnotename))))
+    (while (setq i (string-match " " str i))
+      (setq str (concat (substring str 0 i) "\\([ \t\n]+\\)"
+                       (substring str (1+ i))))
+      (setq i (+ i 10)))
+    (save-excursion
+      (goto-char (point-min))
+      (or (re-search-forward str nil t)
+         (error "No cross-reference named %s" footnotename))
+      (goto-char (match-end 1))
+      (setq target
+           (Info-extract-menu-node-name "Bad format cross reference" t)))
+    (while (setq i (string-match "[ \t\n]+" target i))
+      (setq target (concat (substring target 0 i) " "
+                          (substring target (match-end 0))))
+      (setq i (+ i 1)))
+    (Info-goto-node target)
+    (setq Info-in-cross-reference t)))
+
+(defun Info-next-reference (n)
+  (interactive "p")
+  (let ((pat (format "\\*%s[ \n\t]*\\([^:]*\\):\\|^\\* .*:\\|<<.*>>"
+                    Info-footnote-tag))
+       (old-pt (point))
+       wrapped found-nomenu)
+    (while (< n 0)
+      (unless (re-search-backward pat nil t)
+       ;; Don't wrap more than once in a buffer where only the
+       ;; menu references are found.
+       (when (and wrapped (not found-nomenu))
+         (goto-char old-pt)
+         (error "No cross references in this node"))
+       (setq wrapped t)
+       (goto-char (point-max))
+       (unless (re-search-backward pat nil t)
+         (goto-char old-pt)
+         (error "No cross references in this node")))
+      (unless (save-excursion
+               (goto-char (match-beginning 0))
+               (when (looking-at "\\* Menu:")
+                 (decf n)))
+       (setq found-nomenu t))
+      (incf n))
+    (while (> n 0)
+      (or (eobp) (forward-char 1))
+      (unless (re-search-forward pat nil t)
+       (when (and wrapped (not found-nomenu))
+         (goto-char old-pt)
+         (error "No cross references in this node"))
+       (setq wrapped t)
+       (goto-char (point-min))
+       (unless (re-search-forward pat nil t)
+         (goto-char old-pt)
+         (error "No cross references in this node")))
+      (unless (save-excursion
+               (goto-char (match-beginning 0))
+               (when (looking-at "\\* Menu:")
+                 (incf n)))
+       (setq found-nomenu t))
+      (decf n))
+    (when (looking-at "\\* Menu:")
+      (error "No cross references in this node"))
+    (goto-char (match-beginning 0))))
+
+(defun Info-prev-reference (n)
+  (interactive "p")
+  (Info-next-reference (- n)))
+
+(defun Info-extract-menu-node-name (&optional errmessage multi-line)
+  (skip-chars-forward " \t\n")
+  (let ((beg (point))
+       str i)
+    (skip-chars-forward "^:")
+    (forward-char 1)
+    (setq str
+         (if (looking-at ":")
+             (buffer-substring beg (1- (point)))
+           (skip-chars-forward " \t\n")
+           (Info-following-node-name (if multi-line "^.,\t" "^.,\t\n"))))
+    (while (setq i (string-match "\n" str i))
+      (aset str i ?\ ))
+    str))
+
+(defun Info-menu (menu-item)
+  "Go to node for menu item named (or abbreviated) NAME.
+Completion is allowed, and the menu item point is on is the default."
+  (interactive
+   (let ((completions '())
+        ;; If point is within a menu item, use that item as the default
+        (default nil)
+        (p (point))
+        (last nil))
+     (save-excursion
+       (goto-char (point-min))
+       (let ((case-fold-search t))
+        (if (not (search-forward "\n* menu:" nil t))
+            (error "No menu in this node")))
+       (while (re-search-forward
+               "\n\\* \\([^:\t\n]*\\):" nil t)
+        (if (and (null default)
+                 (prog1 (if last (< last p) nil)
+                   (setq last (match-beginning 0)))
+                 (<= p last))
+            (setq default (car (car completions))))
+        (setq completions (cons (cons (buffer-substring
+                                        (match-beginning 1)
+                                        (match-end 1))
+                                      (match-beginning 1))
+                                completions)))
+       (if (and (null default) last
+               (< last p)
+               (<= p (progn (end-of-line) (point))))
+          (setq default (car (car completions)))))
+     (let ((item nil))
+       (while (null item)
+        (setq item (let ((completion-ignore-case t))
+                     (completing-read (if default
+                                          (format "Menu item (default %s): "
+                                                  default)
+                                          "Menu item: ")
+                                      completions nil t nil
+                                      'Info-minibuffer-history)))
+        ;; we rely on the fact that completing-read accepts an input
+        ;; of "" even when the require-match argument is true and ""
+        ;; is not a valid possibility
+        (if (string= item "")
+            (if default
+                (setq item default)
+                ;; ask again
+                (setq item nil))))
+       (list item))))
+  ;; there is a problem here in that if several menu items have the same
+  ;; name you can only go to the node of the first with this command.
+  (Info-goto-node (Info-extract-menu-item menu-item) nil t))
+  
+(defun Info-extract-menu-item (menu-item &optional noerror)
+  (save-excursion
+    (goto-char (point-min))
+    (if (let ((case-fold-search t))
+         (search-forward "\n* menu:" nil t))
+       (if (or (search-forward (concat "\n* " menu-item ":") nil t)
+               (search-forward (concat "\n* " menu-item) nil t))
+           (progn
+             (beginning-of-line)
+             (forward-char 2)
+             (Info-extract-menu-node-name))
+         (and (not noerror) (error "No such item in menu")))
+      (and (not noerror) (error "No menu in this node")))))
+
+;; If COUNT is nil, use the last item in the menu.
+(defun Info-extract-menu-counting (count &optional noerror noindex)
+  (save-excursion
+    (goto-char (point-min))
+    (if (let ((case-fold-search t))
+         (and (search-forward "\n* menu:" nil t)
+              (or (not noindex)
+                  (not (string-match "\\<Index\\>" Info-current-node)))))
+       (if (search-forward "\n* " nil t count)
+           (progn
+             (or count
+                 (while (search-forward "\n* " nil t)))
+             (Info-extract-menu-node-name))
+         (and (not noerror) (error "Too few items in menu")))
+      (and (not noerror) (error "No menu in this node")))))
+
+(defun Info-nth-menu-item (n)
+  "Go to the node of the Nth menu item."
+  (interactive "P")
+  (or n (setq n (- last-command-char ?0)))
+  (if (< n 1) (error "Index must be at least 1"))
+  (Info-goto-node (Info-extract-menu-counting n) nil t))
+
+(defun Info-last-menu-item ()
+  "Go to the node of the tenth menu item."
+  (interactive)
+  (Info-goto-node (Info-extract-menu-counting nil) nil t))
+\f
+(defun Info-top ()
+  "Go to the Top node of this file."
+  (interactive)
+  (Info-goto-node "Top"))
+
+(defun Info-end ()
+  "Go to the final node in this file."
+  (interactive)
+  (Info-top)
+  (let ((Info-keeping-history nil)
+       node)
+    (Info-last-menu-item)
+    (while (setq node (or (Info-extract-pointer "next" t)
+                         (Info-extract-menu-counting nil t t)))
+      (Info-goto-node node))
+    (or (equal (Info-extract-pointer "up" t) "Top")
+       (let ((executing-kbd-macro ""))   ; suppress messages
+         (condition-case nil
+             (Info-global-next 10000)
+           (error nil))))))
+
+(defun Info-global-next (&optional n)
+  "Go to the next node in this file, traversing node structure as necessary.
+This works only if the Info file is structured as a hierarchy of nodes.
+A positive or negative prefix argument moves by multiple nodes."
+  (interactive "p")
+  (or n (setq n 1))
+  (if (< n 0)
+      (Info-global-prev (- n))
+    (while (>= (setq n (1- n)) 0)
+      (let (node)
+       (cond ((and (string-match "^Top$" Info-current-node)
+                   (setq node (Info-extract-pointer "next" t))
+                   (Info-extract-menu-item node t))
+              (Info-goto-node node))
+             ((setq node (Info-extract-menu-counting 1 t t))
+              (message "Going down...")
+              (Info-goto-node node))
+             (t
+              (let ((Info-keeping-history Info-keeping-history)
+                    (orignode Info-current-node)
+                    (ups ""))
+                (while (not (Info-extract-pointer "next" t))
+                  (if (and (setq node (Info-extract-pointer "up" t))
+                           (not (equal node "Top")))
+                      (progn
+                        (message "Going%s..." (setq ups (concat ups " up")))
+                        (Info-goto-node node)
+                        (setq Info-keeping-history nil))
+                    (if orignode
+                        (let ((Info-keeping-history nil))
+                          (Info-goto-node orignode)))
+                    (error "Last node in file")))
+                (Info-next))))))))
+
+(defun Info-page-next (&optional n)
+  "Scroll forward one screenful, or go to next global node.
+A positive or negative prefix argument moves by multiple screenfuls."
+  (interactive "p")
+  (or n (setq n 1))
+  (if (< n 0)
+      (Info-page-prev (- n))
+    (while (>= (setq n (1- n)) 0)
+      (if (pos-visible-in-window-p (point-max))
+         (progn
+           (Info-global-next)
+           (message "Node: %s" Info-current-node))
+       (scroll-up)))))
+
+(defun Info-scroll-next (arg)
+  (interactive "P")
+  (if Info-auto-advance
+      (if (and (pos-visible-in-window-p (point-max))
+              (not (eq Info-auto-advance t))
+              (not (eq last-command this-command)))
+         (message "Hit %s again to go to next node"
+                  (if (= last-command-char 0)
+                      "mouse button"
+                    (key-description (char-to-string last-command-char))))
+       (Info-page-next)
+       (setq this-command 'Info))
+    (scroll-up arg)))
+
+(defun Info-global-prev (&optional n)
+  "Go to the previous node in this file, traversing structure as necessary.
+This works only if the Info file is structured as a hierarchy of nodes.
+A positive or negative prefix argument moves by multiple nodes."
+  (interactive "p")
+  (or n (setq n 1))
+  (if (< n 0)
+      (Info-global-next (- n))
+    (while (>= (setq n (1- n)) 0)
+      (let ((upnode (Info-extract-pointer "up" t))
+           (prevnode (Info-extract-pointer "prev[ious]*" t)))
+       (if (or (not prevnode)
+               (equal prevnode upnode))
+           (if (string-match "^Top$" Info-current-node)
+               (error "First node in file")
+             (message "Going up...")
+             (Info-up))
+         (Info-goto-node prevnode)
+         (let ((downs "")
+               (Info-keeping-history nil)
+               node)
+           (while (setq node (Info-extract-menu-counting nil t t))
+             (message "Going%s..." (setq downs (concat downs " down")))
+             (Info-goto-node node))))))))
+
+(defun Info-page-prev (&optional n)
+  "Scroll backward one screenful, or go to previous global node.
+A positive or negative prefix argument moves by multiple screenfuls."
+  (interactive "p")
+  (or n (setq n 1))
+  (if (< n 0)
+      (Info-page-next (- n))
+    (while (>= (setq n (1- n)) 0)
+      (if (pos-visible-in-window-p (point-min))
+         (progn
+           (Info-global-prev)
+           (message "Node: %s" Info-current-node)
+           (sit-for 0)
+           ;;(scroll-up 1)   ; work around bug in pos-visible-in-window-p
+           ;;(scroll-down 1)
+           (while (not (pos-visible-in-window-p (point-max)))
+             (scroll-up)))
+       (scroll-down)))))
+
+(defun Info-scroll-prev (arg)
+  (interactive "P")
+  (if Info-auto-advance
+      (if (and (pos-visible-in-window-p (point-min))
+              (not (eq Info-auto-advance t))
+              (not (eq last-command this-command)))
+         (message "Hit %s again to go to previous node"
+                  (if (= last-command-char 0)
+                      "mouse button"
+                    (key-description (char-to-string last-command-char))))
+       (Info-page-prev)
+       (setq this-command 'Info))
+    (scroll-down arg)))
+\f
+(defun Info-index (topic)
+  "Look up a string in the index for this file.
+The index is defined as the first node in the top-level menu whose
+name contains the word \"Index\", plus any immediately following
+nodes whose names also contain the word \"Index\".
+If there are no exact matches to the specified topic, this chooses
+the first match which is a case-insensitive substring of a topic.
+Use the `,' command to see the other matches.
+Give a blank topic name to go to the Index node itself."
+  (interactive "sIndex topic: ")
+  (let ((pattern (format "\n\\* \\([^\n:]*%s[^\n:]*\\):[ \t]*%s"
+                        (regexp-quote topic)
+                        "\\([^.\n]*\\)\\.[ t]*\\([0-9]*\\)"))
+       node)
+    (message "Searching index for `%s'..." topic)
+    (Info-goto-node "Top")
+    (let ((case-fold-search t))
+      (or (search-forward "\n* menu:" nil t)
+         (error "No index"))
+      (or (re-search-forward "\n\\* \\(.*\\<Index\\>\\)" nil t)
+         (error "No index")))
+    (goto-char (match-beginning 1))
+    (let ((Info-keeping-history nil)
+         (Info-fontify (and Info-fontify (equal topic ""))))
+      (Info-goto-node (Info-extract-menu-node-name)))
+    (or (equal topic "")
+       (let ((matches nil)
+             (exact nil)
+             (Info-keeping-history nil)
+             found)
+         (while
+             (progn
+               (goto-char (point-min))
+               (while (re-search-forward pattern nil t)
+                 (setq matches
+                       (cons (list (buffer-substring (match-beginning 1)
+                                                     (match-end 1))
+                                   (buffer-substring (match-beginning 2)
+                                                     (match-end 2))
+                                   Info-current-node
+                                   (string-to-int (concat "0"
+                                                          (buffer-substring
+                                                           (match-beginning 3)
+                                                           (match-end 3)))))
+                             matches)))
+               (and (setq node (Info-extract-pointer "next" t))
+                    (string-match "\\<Index\\>" node)))
+           (let ((Info-fontify nil))
+             (Info-goto-node node)))
+         (or matches
+             (progn
+               (Info-last)
+               (error "No \"%s\" in index" topic)))
+         ;; Here it is a feature that assoc is case-sensitive.
+         (while (setq found (assoc topic matches))
+           (setq exact (cons found exact)
+                 matches (delq found matches)))
+         (setq Info-index-alternatives (nconc exact (nreverse matches))
+               Info-index-first-alternative (car Info-index-alternatives))
+         (Info-index-next 0)))))
+
+(defun Info-index-next (num)
+  "Go to the next matching index item from the last `i' command."
+  (interactive "p")
+  (or Info-index-alternatives
+      (error "No previous `i' command in this file"))
+  (while (< num 0)
+    (setq num (+ num (length Info-index-alternatives))))
+  (while (> num 0)
+    (setq Info-index-alternatives
+         (nconc (cdr Info-index-alternatives)
+                (list (car Info-index-alternatives)))
+         num (1- num)))
+  (Info-goto-node (nth 1 (car Info-index-alternatives)))
+  (if (> (nth 3 (car Info-index-alternatives)) 0)
+      (forward-line (nth 3 (car Info-index-alternatives)))
+    (forward-line 3)  ; don't search in headers
+    (let ((name (car (car Info-index-alternatives))))
+      (if (or (re-search-forward (format
+                                 "\\(Function\\|Command\\): %s\\( \\|$\\)"
+                                 (regexp-quote name)) nil t)
+             (re-search-forward (format "^`%s[ ']" (regexp-quote name)) nil t)
+             (search-forward (format "`%s'" name) nil t)
+             (and (string-match "\\`.*\\( (.*)\\)\\'" name)
+                  (search-forward
+                   (format "`%s'" (substring name 0 (match-beginning 1)))
+                   nil t))
+             (search-forward name nil t))
+         (beginning-of-line)
+       (goto-char (point-min)))))
+  (message "Found \"%s\" in %s.  %s"
+          (car (car Info-index-alternatives))
+          (nth 2 (car Info-index-alternatives))
+          (if (cdr Info-index-alternatives)
+              (if (eq (car (cdr Info-index-alternatives))
+                      Info-index-first-alternative)
+                  "(Press `,' to repeat)"
+                (format "(Press `,' for %d more)"
+                        (- (1- (length Info-index-alternatives))
+                           (length (memq Info-index-first-alternative
+                                         (cdr Info-index-alternatives))))))
+            "(Only match)")))
+
+
+;;;###autoload
+(defun Info-emacs-command (command)
+  "Look up an Emacs command in the Emacs manual in the Info system.
+This command is designed to be used whether you are already in Info or not."
+  (interactive "CLook up command in Emacs manual: ")
+  (save-window-excursion
+    (info)
+    (Info-find-node Info-emacs-info-file-name "Top")
+    (Info-index (symbol-name command)))
+  (pop-to-buffer "*info*"))
+
+
+;;;###autoload
+(defun Info-goto-emacs-command-node (key)
+  "Look up an Emacs command in the Emacs manual in the Info system.
+This command is designed to be used whether you are already in Info or not."
+  (interactive "CLook up command in Emacs manual: ")
+  (Info-emacs-command key))
+
+;;;###autoload
+(defun Info-goto-emacs-key-command-node (key)
+  "Look up an Emacs key sequence in the Emacs manual in the Info system.
+This command is designed to be used whether you are already in Info or not."
+  (interactive "kLook up key in Emacs manual: ")
+  (let ((command (key-binding key)))
+    (cond ((eq command 'keyboard-quit)
+          (keyboard-quit))
+         ((null command)
+          (error "%s is undefined" (key-description key)))
+         ((and (interactive-p) (eq command 'execute-extended-command))
+          (call-interactively 'Info-goto-emacs-command-node))
+         (t
+          (Info-goto-emacs-command-node command)))))
+
+;;;###autoload
+(defun Info-emacs-key (key)
+  "Look up an Emacs key sequence in the Emacs manual in the Info system.
+This command is designed to be used whether you are already in Info or not."
+  (interactive "kLook up key in Emacs manual: ")
+  (cond ((eq (key-binding key) 'keyboard-quit)
+        (keyboard-quit))
+       ((and (interactive-p) (eq (key-binding key) 'execute-extended-command))
+        (call-interactively 'Info-goto-emacs-command-node))
+       (t
+        (save-window-excursion
+          (info)
+          (Info-find-node Info-emacs-info-file-name "Top")
+          (setq key (key-description key))
+          (let (p)
+            (if (setq p (string-match "[@{}]" key))
+                (setq key (concat (substring key 0 p) "@" (substring key p))))
+            (if (string-match "^ESC " key)
+                (setq key (concat "M-" (substring key 4))))
+            (if (string-match "^M-C-" key)
+                (setq key (concat "C-M-" (substring key 4)))))
+          (Info-index key))
+        (pop-to-buffer "*info*"))))
+
+;;;###autoload
+(defun Info-elisp-ref (func)
+  "Look up an Emacs Lisp function in the Elisp manual in the Info system.
+This command is designed to be used whether you are already in Info or not."
+  (interactive (let ((fn (function-at-point))
+                    (enable-recursive-minibuffers t)        
+                    val)
+                (setq val (completing-read
+                           (format "Look up Emacs Lisp function%s: "
+                                   (if fn
+                                       (format " (default %s)" fn)
+                                     ""))
+                           obarray 'fboundp t))
+                (list (if (equal val "")
+                          fn (intern val)))))
+  (save-window-excursion
+    (info)
+    (condition-case nil
+       (Info-find-node "lispref" "Top")
+      (error (Info-find-node "elisp" "Top")))
+    (Info-index (symbol-name func)))
+  (pop-to-buffer "*info*"))
+\f
+(defun Info-reannotate-node ()
+  (let ((bufs (delq nil (mapcar 'get-file-buffer Info-annotations-path))))
+    (if bufs
+       (let ((ibuf (current-buffer))
+             (file (concat "\\(" (regexp-quote
+                            (file-name-nondirectory Info-current-file))
+                           "\\|" (regexp-quote Info-current-file) "\\)"))
+             (node (regexp-quote Info-current-node))
+             (savept (point)))
+         (goto-char (point-min))
+         (if (search-forward "\n------ NOTE:\n" nil t)
+             (let ((buffer-read-only nil)
+                   (bufmod (buffer-modified-p))
+                   top)
+               (setq savept (copy-marker savept))
+               (goto-char (point-min))
+               (while (search-forward "\n------ NOTE:" nil t)
+                 (setq top (1+ (match-beginning 0)))
+                 (if (search-forward "\n------\n" nil t)
+                     (delete-region top (point)))
+                 (backward-char 1))
+               (set-buffer-modified-p bufmod)))
+         (save-excursion
+           (while bufs
+             (set-buffer (car bufs))
+             (goto-char (point-min))
+             (while (re-search-forward
+                     (format
+                      "------ *File: *%s *Node: *%s *Line: *\\([0-9]+\\) *\n"
+                      file node)
+                     nil t)
+               (let ((line (string-to-int
+                            (buffer-substring (match-beginning 2)
+                                              (match-end 2))))
+                     (top (point))
+                     bot)
+                 (search-forward "\n------\n" nil t)
+                 (setq bot (point))
+                 (save-excursion
+                   (set-buffer ibuf)
+                   (if (integerp savept) (setq savept (copy-marker savept)))
+                   (if (= line 0)
+                       (goto-char (point-max))
+                     (goto-char (point-min))
+                     (forward-line line))
+                   (let ((buffer-read-only nil)
+                         (bufmod (buffer-modified-p)))
+                     (insert "------ NOTE:\n")
+                     (insert-buffer-substring (car bufs) top bot)
+                     (set-buffer-modified-p bufmod)))))
+             (setq bufs (cdr bufs))))
+         (goto-char savept)))))
+
+(defvar Info-annotate-map nil
+  "Local keymap used within `a' command of Info.")
+(if Info-annotate-map
+    nil
+  ;; (setq Info-annotate-map (nconc (make-sparse-keymap) text-mode-map))
+  (setq Info-annotate-map (copy-keymap text-mode-map))
+  (define-key Info-annotate-map "\C-c\C-c" 'Info-cease-annotate))
+
+(defun Info-annotate-mode ()
+  "Major mode for adding an annotation to an Info node.
+Like text mode with the addition of Info-cease-annotate
+which returns to Info mode for browsing.
+\\{Info-annotate-map}")
+
+(defun Info-annotate (arg)
+  "Add a personal annotation to the current Info node.
+ Only you will be able to see this annotation.  Annotations are stored
+in the file \"~/.xemacs/info.notes\" by default.  If point is inside
+an existing annotation, edit that annotation.  A prefix argument
+specifies which annotations file (from `Info-annotations-path') is to
+be edited; default is 1."
+  (interactive "p")
+  (setq arg (1- arg))
+  (if (or (< arg 0) (not (nth arg Info-annotations-path)))
+      (if (= arg 0)
+         (setq Info-annotations-path
+               (list (read-file-name
+                      "Annotations file: " "~/" "~/.infonotes")))
+       (error "File number must be in the range from 1 to %d"
+              (length Info-annotations-path))))
+  (let ((which nil)
+       (file (file-name-nondirectory Info-current-file))
+       (d Info-directory-list)
+       where pt)
+    (while (and d (not (equal (expand-file-name file (car d))
+                             Info-current-file)))
+      (setq d (cdr d)))
+    (or d (setq file Info-current-file))
+    (if (and (save-excursion
+              (goto-char (min (point-max) (+ (point) 13)))
+              (and (search-backward "------ NOTE:\n" nil t)
+                   (setq pt (match-end 0))
+                   (search-forward "\n------\n" nil t)))
+            (< (point) (match-end 0)))
+       (setq which (format "File: *%s *Node: *%s *Line:.*\n%s"
+                           (regexp-quote file)
+                           (regexp-quote Info-current-node)
+                           (regexp-quote
+                            (buffer-substring pt (match-beginning 0))))
+             where (max (- (point) pt) 0)))
+    (let ((node Info-current-node)
+         (line (if (looking-at "[ \n]*\\'") 0
+                 (count-lines (point-min) (point)))))
+      (or which
+         (let ((buffer-read-only nil)
+               (bufmod (buffer-modified-p)))
+           (beginning-of-line)
+           (if (bobp) (goto-char (point-max)))
+           (insert "------ NOTE:\n------\n")
+           (backward-char 20)
+           (set-buffer-modified-p bufmod)))
+      ;; (setq Info-window-start (window-start))
+      (setq Info-window-configuration (current-window-configuration))
+      (pop-to-buffer (find-file-noselect (nth arg Info-annotations-path)))
+      (use-local-map Info-annotate-map)
+      (setq major-mode 'Info-annotate-mode)
+      (setq mode-name "Info Annotate")
+      (if which
+         (if (save-excursion
+               (goto-char (point-min))
+               (re-search-forward which nil t))
+             (progn
+               (goto-char (match-beginning 0))
+               (forward-line 1)
+               (forward-char where)))
+       (let ((bufmod (buffer-modified-p)))
+         (goto-char (point-max))
+         (insert (format "\n------ File: %s  Node: %s  Line: %d\n"
+                         file node line))
+         (setq pt (point))
+         (insert "\n------\n"
+                 "\nPress C-c C-c to save and return to Info.\n")
+         (goto-char pt)
+         (set-buffer-modified-p bufmod))))))
+
+(defun Info-cease-annotate ()
+  (interactive)
+  (let ((bufmod (buffer-modified-p)))
+    (while (save-excursion
+            (goto-char (point-min))
+            (re-search-forward "\n\n?Press .* to save and return to Info.\n"
+                               nil t))
+      (delete-region (1+ (match-beginning 0)) (match-end 0)))
+    (while (save-excursion
+            (goto-char (point-min))
+            (re-search-forward "\n------ File:.*Node:.*Line:.*\n+------\n"
+                               nil t))
+      (delete-region (match-beginning 0) (match-end 0)))
+    (set-buffer-modified-p bufmod))
+  (save-buffer)
+  (fundamental-mode)
+  (bury-buffer)
+  (or (one-window-p) (delete-window))
+  (info)
+  (setq Info-current-annotation-completions nil)
+  (set-window-configuration Info-window-configuration)
+  (Info-reannotate-node))
+
+(defun Info-bookmark (arg tag)
+  (interactive "p\nsBookmark name: ")
+  (Info-annotate arg)
+  (if (or (string-match "^\"\\(.*\\)\"$" tag)
+         (string-match "^<<\\(.*\\)>>$" tag))
+      (setq tag (substring tag (match-beginning 1) (match-end 1))))
+  (let ((pt (point)))
+    (search-forward "\n------\n")
+    (let ((end (- (point) 8)))
+      (goto-char pt)
+      (if (re-search-forward "<<[^>\n]*>>" nil t)
+         (delete-region (match-beginning 0) (match-end 0))
+       (goto-char end))
+      (or (equal tag "")
+         (insert "<<" tag ">>"))))
+  (Info-cease-annotate))
+\f
+(defun Info-exit ()
+  "Exit Info by selecting some other buffer."
+  (interactive)
+  (if Info-standalone
+      (save-buffers-kill-emacs)
+    (bury-buffer (current-buffer))
+    (if (and (featurep 'toolbar)
+            (boundp 'toolbar-info-frame)
+            (eq toolbar-info-frame (selected-frame)))
+       (condition-case ()
+           (delete-frame toolbar-info-frame)
+         (error (bury-buffer)))
+      (switch-to-buffer (other-buffer (current-buffer))))))
+
+(defun Info-undefined ()
+  "Make command be undefined in Info."
+  (interactive)
+  (ding))
+
+(defun Info-help ()
+  "Enter the Info tutorial."
+  (interactive)
+  (delete-other-windows)
+  (Info-find-node "info"
+                 (if (< (window-height) 23)
+                     "Help-Small-Screen"
+                   "Help")))
+
+(defun Info-summary ()
+  "Display a brief summary of all Info commands."
+  (interactive)
+  (save-window-excursion
+    (switch-to-buffer "*Help*")
+    (erase-buffer)
+    (insert (documentation 'Info-mode))
+    (goto-char (point-min))
+    (let (flag)
+      (while (progn (setq flag (not (pos-visible-in-window-p (point-max))))
+                   (message (if flag "Type Space to see more"
+                              "Type Space to return to Info"))
+                   (let ((e (next-command-event)))
+                     (if (/= ?\  (event-to-character e))
+                         (progn (setq unread-command-event e) nil)
+                       flag)))
+       (scroll-up)))
+    (message "")
+    (bury-buffer "*Help*")))
+\f
+(defun Info-get-token (pos start all &optional errorstring)
+  "Return the token around POS,
+POS must be somewhere inside the token
+START is a regular expression which will match the
+    beginning of the tokens delimited string
+ALL is a regular expression with a single
+    parenthized subpattern which is the token to be
+    returned. E.g. '{\(.*\)}' would return any string
+    enclosed in braces around POS.
+SIG optional fourth argument, controls action on no match
+    nil: return nil
+    t: beep
+    a string: signal an error, using that string."
+  (save-excursion
+    (goto-char (point-min))
+    (re-search-backward "\\`")  ; Bug fix due to Nicholas J. Foskett.
+    (goto-char pos)
+    (re-search-backward start (max (point-min) (- pos 200)) 'yes)
+    (let (found)
+      (while (and (re-search-forward all (min (point-max) (+ pos 200)) 'yes)
+                 (not (setq found (and (<= (match-beginning 0) pos)
+                                       (> (match-end 0) pos))))))
+      (if (and found (<= (match-beginning 0) pos)
+              (> (match-end 0) pos))
+         (buffer-substring (match-beginning 1) (match-end 1))
+       (cond ((null errorstring)
+              nil)
+             ((eq errorstring t)
+              (beep)
+              nil)
+             (t
+              (error "No %s around position %d" errorstring pos)))))))
+
+(defun Info-follow-clicked-node (event)
+  "Follow a node reference near clicked point.  Like M, F, N, P or U command.
+At end of the node's text, moves to the next node."
+  (interactive "@e")
+  (or (and (event-point event)
+          (Info-follow-nearest-node
+           (max (progn
+                  (select-window (event-window event))
+                  (event-point event))
+                (1+ (point-min)))))
+      (error "click on a cross-reference to follow")))
+
+(defun Info-maybe-follow-clicked-node (event &optional click-count)
+  "Follow a node reference (if any) near clicked point.
+Like M, F, N, P or U command.  At end of the node's text, moves to the
+next node.  No error is given if there is no node to follow."
+  (interactive "@e")
+  (and Info-button1-follows-hyperlink
+       (event-point event)
+       (Info-follow-nearest-node
+       (max (progn
+              (select-window (event-window event))
+              (event-point event))
+            (1+ (point-min))))))
+
+(defun Info-find-nearest-node (point)
+  (let (node)
+    (cond
+     ((= point (point-min)) nil)   ; don't trigger on accidental RET.
+     ((setq node (Info-get-token point
+                                (format "\\*%s[ \n]" Info-footnote-tag)
+                                (format "\\*%s[ \n]\\([^:]*\\):"
+                                        Info-footnote-tag)))
+      (list "Following cross-reference %s..."
+           (list 'Info-follow-reference node)))
+     ((setq node (Info-get-token point "\\* " "\\* \\([^:]*\\)::"))
+      (list "Selecting menu item %s..."
+           (list 'Info-goto-node node nil t)))
+     ((setq node (Info-get-token point "\\* " "\\* \\([^:]*\\):"))
+      (list "Selecting menu item %s..."
+           (list 'Info-menu node)))
+     ((setq node (Info-get-token point "Up: " "Up: \\([^,\n\t]*\\)"))
+      (list "Going up..."
+           (list 'Info-goto-node node)))
+     ((setq node (Info-get-token point "Next: " "Next: \\([^,\n\t]*\\)"))
+      (list "Next node..."
+           (list 'Info-goto-node node)))
+     ((setq node (Info-get-token point "File: " "File: \\([^,\n\t]*\\)"))
+      (list "Top node..."
+           (list 'Info-goto-node "Top")))
+     ((setq node (Info-get-token point "Prev[ious]*: "
+                                "Prev[ious]*: \\([^,\n\t]*\\)"))
+      (list "Previous node..."
+           (list 'Info-goto-node node)))
+     ((setq node (Info-get-token point "Node: " "Node: \\([^,\n\t]*\\)"))
+      (list "Reselecting %s..."
+           (list 'Info-goto-node node)))
+     ((save-excursion (goto-char point) (looking-at "[ \n]*\\'"))
+      (if Info-in-cross-reference
+         (list "Back to last node..."
+               '(Info-last))
+       (list "Next node..."
+             '(Info-global-next)))))
+    ))
+
+(defun Info-follow-nearest-node (point)
+  "Follow a node reference near point.  Like M, F, N, P or U command.
+At end of the node's text, moves to the next node."
+  (interactive "d")
+  (let ((data (Info-find-nearest-node point)))
+    (if (null data)
+       nil
+      (let ((msg (format (car data) (nth 1 (nth 1 data)))))
+       (message "%s" msg)
+       (eval (nth 1 data))
+       (message "%sdone" msg))
+      t)))
+
+(defun Info-indicated-node (event)
+  (condition-case ()
+      (save-excursion
+       (cond ((eventp event)
+              (set-buffer (event-buffer event))
+              (setq event (event-point event))))
+       (let* ((data (Info-find-nearest-node event))
+              (name (nth 1 (nth 1 data))))
+         (and name (nth 1 data))))
+    (error nil)))
+\f
+(defun Info-mouse-track-double-click-hook (event click-count)
+  "Handle double-clicks by turning pages, like the `gv' ghostscript viewer"
+  (if (/= click-count 2)
+      ;; Return nil so any other hooks are performed.
+      nil
+      (let* ((x (event-x-pixel event))
+            (y (event-y-pixel event))
+            (w (window-pixel-width (event-window event)))
+            (h (window-pixel-height (event-window event)))
+            (w/3 (/ w 3))
+            (w/2 (/ w 2))
+            (h/4 (/ h 4)))
+       (cond
+         ;; In the top 1/4 and inside the middle 1/3
+         ((and (<= y h/4)
+               (and (>= x w/3) (<= x (+ w/3 w/3))))
+          (Info-up)
+          t)
+         ;; In the bottom 1/4 and inside the middle 1/3
+         ((and (>= y (+ h/4 h/4 h/4))
+               (and (>= x w/3) (<= x (+ w/3 w/3))))
+          (Info-nth-menu-item 1)
+          t)
+         ;; In the lower 3/4 and the right 1/2
+         ;; OR in the upper 1/4 and the right 1/3
+         ((or (and (>= y h/4) (>= x w/2))
+              (and (< y h/4) (>= x (+ w/3 w/3))))
+          (Info-next)
+          t)
+         ;; In the lower 3/4 and the left 1/2
+         ;; OR in the upper 1/4 and the left 1/3
+         ((or (and (>= y h/4) (< x w/2))
+              (and (< y h/4) (<= x w/3)))
+          (Info-prev)
+          t)
+         ;; This shouldn't happen.
+         (t
+          (error "event out of bounds: %s %s" x y))))))
+\f
+(defvar Info-mode-map nil
+  "Keymap containing Info commands.")
+(if Info-mode-map
+    nil
+  (setq Info-mode-map (make-sparse-keymap))
+  (suppress-keymap Info-mode-map)
+  (define-key Info-mode-map "." 'beginning-of-buffer)
+  (define-key Info-mode-map " " 'Info-scroll-next)
+  (define-key Info-mode-map "1" 'Info-nth-menu-item)
+  (define-key Info-mode-map "2" 'Info-nth-menu-item)
+  (define-key Info-mode-map "3" 'Info-nth-menu-item)
+  (define-key Info-mode-map "4" 'Info-nth-menu-item)
+  (define-key Info-mode-map "5" 'Info-nth-menu-item)
+  (define-key Info-mode-map "6" 'Info-nth-menu-item)
+  (define-key Info-mode-map "7" 'Info-nth-menu-item)
+  (define-key Info-mode-map "8" 'Info-nth-menu-item)
+  (define-key Info-mode-map "9" 'Info-nth-menu-item)
+  (define-key Info-mode-map "0" 'Info-last-menu-item)
+  (define-key Info-mode-map "?" 'Info-summary)
+  (define-key Info-mode-map "a" 'Info-annotate)
+  (define-key Info-mode-map "b" 'beginning-of-buffer)
+  (define-key Info-mode-map "d" 'Info-directory)
+  (define-key Info-mode-map "e" 'Info-edit)
+  (define-key Info-mode-map "f" 'Info-follow-reference)
+  (define-key Info-mode-map "g" 'Info-goto-node)
+  (define-key Info-mode-map "h" 'Info-help)
+  (define-key Info-mode-map "i" 'Info-index)
+  (define-key Info-mode-map "j" 'Info-goto-bookmark)
+  (define-key Info-mode-map "k" 'Info-emacs-key)
+  (define-key Info-mode-map "l" 'Info-last)
+  (define-key Info-mode-map "m" 'Info-menu)
+  (define-key Info-mode-map "n" 'Info-next)
+  (define-key Info-mode-map "p" 'Info-prev)
+  (define-key Info-mode-map "q" 'Info-exit)
+  (define-key Info-mode-map "r" 'Info-follow-reference)
+  (define-key Info-mode-map "s" 'Info-search)
+  (define-key Info-mode-map "t" 'Info-top)
+  (define-key Info-mode-map "u" 'Info-up)
+  (define-key Info-mode-map "v" 'Info-visit-file)
+  (define-key Info-mode-map "x" 'Info-bookmark)
+  (define-key Info-mode-map "<" 'Info-top)
+  (define-key Info-mode-map ">" 'Info-end)
+  (define-key Info-mode-map "[" 'Info-global-prev)
+  (define-key Info-mode-map "]" 'Info-global-next)
+  (define-key Info-mode-map "{" 'Info-page-prev)
+  (define-key Info-mode-map "}" 'Info-page-next)
+  (define-key Info-mode-map "=" 'Info-restore-point)
+  (define-key Info-mode-map "!" 'Info-select-node)
+  (define-key Info-mode-map "@" 'Info-follow-nearest-node)
+  (define-key Info-mode-map "," 'Info-index-next)
+  (define-key Info-mode-map "*" 'Info-elisp-ref)
+  (define-key Info-mode-map [tab] 'Info-next-reference)
+  (define-key Info-mode-map [(meta tab)] 'Info-prev-reference)
+  (define-key Info-mode-map [(shift tab)] 'Info-prev-reference)
+  (define-key Info-mode-map "\r" 'Info-follow-nearest-node)
+  ;; XEmacs addition
+  (define-key Info-mode-map 'backspace 'Info-scroll-prev)
+  (define-key Info-mode-map 'delete 'Info-scroll-prev)
+  (define-key Info-mode-map 'button2 'Info-follow-clicked-node)
+  (define-key Info-mode-map 'button3 'Info-select-node-menu))
+
+\f
+;; Info mode is suitable only for specially formatted data.
+(put 'info-mode 'mode-class 'special)
+
+(defun Info-mode ()
+  "Info mode is for browsing through the Info documentation tree.
+Documentation in Info is divided into \"nodes\", each of which
+discusses one topic and contains references to other nodes
+which discuss related topics.  Info has commands to follow
+the references and show you other nodes.
+
+h      Invoke the Info tutorial.
+q      Quit Info: return to the previously selected file or buffer.
+
+Selecting other nodes:
+n      Move to the \"next\" node of this node.
+p      Move to the \"previous\" node of this node.
+m      Pick menu item specified by name (or abbreviation).
+1-9, 0 Pick first..ninth, last item in node's menu.
+       Menu items select nodes that are \"subsections\" of this node.
+u      Move \"up\" from this node (i.e., from a subsection to a section).
+f or r Follow a cross reference by name (or abbrev).  Type `l' to get back.
+RET     Follow cross reference or menu item indicated by cursor.
+i      Look up a topic in this file's Index and move to that node.
+,      (comma) Move to the next match from a previous `i' command.
+l      (letter L) Move back to the last node you were in.
+
+Moving within a node:
+Space  Scroll forward a full screen.   DEL       Scroll backward.
+b      Go to beginning of node.        Meta->    Go to end of node.
+TAB    Go to next cross-reference.     Meta-TAB  Go to previous ref.
+
+Mouse commands:
+Left Button    Set point.
+Middle Button  Click on a highlighted node reference to go to it.
+Right Button   Pop up a menu of applicable Info commands.
+
+Advanced commands:
+g      Move to node, file, or annotation tag specified by name.
+       Examples:  `g Rectangles' `g (Emacs)Rectangles' `g Emacs'.
+v      Move to file, with filename completion.
+k      Look up a key sequence in Emacs manual (also C-h C-k at any time).
+*      Look up a function name in Emacs Lisp manual (also C-h C-f).
+d      Go to the main directory of Info files.
+< or t Go to Top (first) node of this file.
+>      Go to last node in this file.
+\[     Go to previous node, treating file as one linear document.
+\]     Go to next node, treating file as one linear document.
+{      Scroll backward, or go to previous node if at top.
+}      Scroll forward, or go to next node if at bottom.
+=      Restore cursor position from last time in this node.
+a      Add a private note (annotation) to the current node.
+x, j   Add, jump to a bookmark (annotation tag).
+s      Search this Info file for a node containing the specified regexp.
+e      Edit the contents of the current node."
+  (kill-all-local-variables)
+  (setq major-mode 'Info-mode)
+  (setq mode-name "Info")
+  (use-local-map Info-mode-map)
+  (set-syntax-table text-mode-syntax-table)
+  (setq local-abbrev-table text-mode-abbrev-table)
+  (setq case-fold-search t)
+  (setq buffer-read-only t)
+;  (setq buffer-mouse-map Info-mode-mouse-map)
+  (make-local-variable 'Info-current-file)
+  (make-local-variable 'Info-current-subfile)
+  (make-local-variable 'Info-current-node)
+  (make-local-variable 'Info-tag-table-marker)
+  (make-local-variable 'Info-current-file-completions)
+  (make-local-variable 'Info-current-annotation-completions)
+  (make-local-variable 'Info-index-alternatives)
+  (make-local-variable 'Info-history)
+  ;; Faces are now defined by `defface'...
+  (make-local-variable 'mouse-track-click-hook)
+  (add-hook 'mouse-track-click-hook 'Info-maybe-follow-clicked-node)
+  (add-hook 'mouse-track-click-hook 'Info-mouse-track-double-click-hook)
+  ;; #### The console-on-window-system-p check is to allow this to
+  ;; work on tty's.  The real problem here is that featurep really
+  ;; needs to have some device/console domain knowledge added to it.
+  (if (and (featurep 'toolbar)
+          (console-on-window-system-p)
+          (not Info-inhibit-toolbar))
+      (set-specifier default-toolbar (cons (current-buffer) info::toolbar)))
+  (if (featurep 'menubar)
+      (progn
+       ;; make a local copy of the menubar, so our modes don't
+       ;; change the global menubar
+       (easy-menu-add '("Info" :filter Info-menu-filter))))
+  (run-hooks 'Info-mode-hook)
+  (Info-set-mode-line))
+
+(defvar Info-edit-map nil
+  "Local keymap used within `e' command of Info.")
+(if Info-edit-map
+    nil
+  ;; XEmacs: remove FSF stuff
+  (setq Info-edit-map (make-sparse-keymap))
+  (set-keymap-name Info-edit-map 'Info-edit-map)
+  (set-keymap-parents Info-edit-map (list text-mode-map))
+  (define-key Info-edit-map "\C-c\C-c" 'Info-cease-edit))
+
+;; Info-edit mode is suitable only for specially formatted data.
+(put 'info-edit-mode 'mode-class 'special)
+
+(defun Info-edit-mode ()
+  "Major mode for editing the contents of an Info node.
+Like text mode with the addition of `Info-cease-edit'
+which returns to Info mode for browsing.
+\\{Info-edit-map}"
+  )
+
+(defun Info-edit ()
+  "Edit the contents of this Info node.
+Allowed only if variable `Info-enable-edit' is non-nil."
+  (interactive)
+  (or Info-enable-edit
+      (error "Editing info nodes is not enabled"))
+  (use-local-map Info-edit-map)
+  (setq major-mode 'Info-edit-mode)
+  (setq mode-name "Info Edit")
+  (kill-local-variable 'modeline-buffer-identification)
+  (setq buffer-read-only nil)
+  ;; Make mode line update.
+  (set-buffer-modified-p (buffer-modified-p))
+  (message (substitute-command-keys
+            "Editing: Type \\[Info-cease-edit] to return to info")))
+
+(defun Info-cease-edit ()
+  "Finish editing Info node; switch back to Info proper."
+  (interactive)
+  ;; Do this first, so nothing has changed if user C-g's at query.
+  (and (buffer-modified-p)
+       (y-or-n-p-maybe-dialog-box "Save the file? ")
+       (save-buffer))
+  (use-local-map Info-mode-map)
+  (setq major-mode 'Info-mode)
+  (setq mode-name "Info")
+  (Info-set-mode-line)
+  (setq buffer-read-only t)
+  ;; Make mode line update.
+  (set-buffer-modified-p (buffer-modified-p))
+  (and (marker-position Info-tag-table-marker)
+       (buffer-modified-p)
+       (message "Tags may have changed.  Use Info-tagify if necessary")))
+\f
+(defun Info-find-emacs-command-nodes (command)
+  "Return a list of locations documenting COMMAND in the XEmacs Info manual.
+The locations are of the format used in Info-history, i.e.
+\(FILENAME NODENAME BUFFERPOS\)."
+  (let ((where '())
+       (cmd-desc (concat "^\\* " (regexp-quote (symbol-name command))
+                         ":\\s *\\(.*\\)\\.$")))
+    (save-excursion
+      (Info-find-node "XEmacs" "Command Index")
+      ;; Take the index node off the Info history.
+      ;; ??? says this isn't safe someplace else... hmmm.
+      (setq Info-history (cdr Info-history))
+      (goto-char (point-max))
+      (while (re-search-backward cmd-desc nil t)
+         (setq where (cons (list Info-current-file
+                                 (buffer-substring
+                                  (match-beginning 1)
+                                  (match-end 1))
+                                 0)
+                           where)))
+      where)))
+\f
+;;; fontification and mousability for info
+
+(defun Info-highlight-region (start end face)
+  (let ((extent nil)
+       (splitp (string-match "\n[ \t]+" (buffer-substring start end))))
+    (if splitp
+       (save-excursion
+         (setq extent (make-extent start (progn (goto-char start)
+                                                (end-of-line)
+                                                (point))))
+         (set-extent-face extent face)
+         (set-extent-property extent 'info t)
+         (set-extent-property extent 'highlight t)
+         (skip-chars-forward "\n\t ")
+         (setq extent (make-extent (point) end)))
+      (setq extent (make-extent start end)))
+    (set-extent-face extent face)
+    (set-extent-property extent 'info t)
+    (set-extent-property extent 'highlight t)))
+
+(defun Info-fontify-node ()
+  (save-excursion
+    (let ((case-fold-search t)
+         (xref-regexp (concat "\\*"
+                              (regexp-quote Info-footnote-tag)
+                              "[ \n\t]*\\([^:]*\\):")))
+      ;; Clear the old extents
+      (map-extents #'(lambda (x y) (delete-extent x))
+                  (current-buffer) (point-min) (point-max) nil)
+      ;; Break the top line iff it is > 79 characters.  Some info nodes
+      ;; have top lines that span 3 lines because of long node titles.
+      ;; eg: (Info-find-node "lispref.info" "Window-Level Event Position Info")
+      (toggle-read-only -1)
+      (let ((extent nil)
+           (len 0)
+           (done nil)
+           (p (point-min)))
+       (goto-char (point-min))
+       (re-search-forward "Node: *[^,]+,  " nil t)
+       (setq len (- (point) (point-min))
+             extent (make-extent (point-min) (point)))
+       (set-extent-property extent 'invisible t)
+       (while (not done)
+         (goto-char p)
+         (end-of-line)
+         (if (< (current-column) (+ 78 len))
+             (setq done t)
+           (goto-char p)
+           (forward-char (+ 79 len))
+           (re-search-backward "," nil t)
+           (forward-char 1)
+           (insert "\n")
+           (just-one-space)
+           (backward-delete-char 1)
+           (setq p (point)
+                 len 0))))
+      (toggle-read-only 1)
+      ;; Highlight xrefs in the top few lines of the node
+      (goto-char (point-min))
+      (if (looking-at "^File: [^,: \t]+,?[ \t]+")
+         (progn
+           (goto-char (match-end 0))
+           (while
+               (looking-at "[ \t]*[^:, \t\n]+:[ \t]+\\([^:,\t\n]+\\),?\n?")
+             (goto-char (match-end 0))
+             (Info-highlight-region (match-beginning 1) (match-end 1) 'info-xref))))
+      ;; Now get the xrefs in the body
+      (goto-char (point-min))
+      (while (re-search-forward xref-regexp nil t)
+       (if (= (char-after (1- (match-beginning 0))) ?\") ; hack
+           nil
+         (Info-highlight-region (match-beginning 1) (match-end 1) 'info-xref)))
+      ;; then highlight the nodes in the menu.
+      (goto-char (point-min))
+      (if (and (search-forward "\n* menu:" nil t))
+         (while (re-search-forward
+                 "^\\* \\([^:\t\n]*\\):?:[ \t\n]" nil t)
+           (Info-highlight-region (match-beginning 1) (match-end 1) 'info-node)))
+      (set-buffer-modified-p nil))))
+
+(defun Info-construct-menu (&optional event)
+  "Construct a menu of Info commands.
+Adds an entry for the node at EVENT, or under point if EVENT is omitted.
+Used to construct the menubar submenu and popup menu."
+  (or event (setq event (point)))
+  (let ((case-fold-search t)
+       (xref-regexp (concat "\\*" 
+                            (regexp-quote Info-footnote-tag)
+                            "[ \n\t]*\\([^:]*\\):"))
+       up-p prev-p next-p menu xrefs subnodes in)
+    (save-excursion
+      ;; `one-space' fixes "Notes:" xrefs that are split across lines.
+      (flet
+         ((one-space (text)
+                     (let (i)
+                       (while (setq i (string-match "[ \n\t]+" text i))
+                         (setq text (concat (substring text 0 i) " "
+                                            (substring text (match-end 0))))
+                         (setq i (1+ i)))
+                       text)))
+       (goto-char (point-min))
+       (if (looking-at ".*\\bNext:") (setq next-p t))
+       (if (looking-at ".*\\bPrev:") (setq prev-p t))
+       (if (looking-at ".*Up:") (setq up-p t))
+       (setq menu (nconc
+                   (if (setq in (Info-indicated-node event))
+                       (list (vector (one-space (cadr in)) in t)
+                             "--:shadowEtchedIn"))
+                   (list
+                    ["Goto Info Top-level" Info-directory]
+                    (vector "Next Node" 'Info-next :active next-p)
+                    (vector "Previous Node" 'Info-prev :active prev-p)
+                    (vector "Parent Node (Up)" 'Info-up :active up-p)
+                    ["Goto Node..." Info-goto-node]
+                    ["Goto Last Visited Node " Info-last])))
+       ;; Find the xrefs and make a list
+       (while (re-search-forward xref-regexp nil t)
+         (setq xrefs (cons (one-space (buffer-substring (match-beginning 1)
+                                                        (match-end 1)))
+                           xrefs))))
+      (setq xrefs (nreverse xrefs))
+      (if (> (length xrefs) 21) (setcdr (nthcdr 20 xrefs) '(more)))
+      ;; Find the subnodes and make a list
+      (goto-char (point-min))
+      (if (search-forward "\n* menu:" nil t)
+      (while (re-search-forward "^\\* \\([^:\t\n]*\\):" nil t)
+       (setq subnodes (cons (buffer-substring (match-beginning 1)
+                                              (match-end 1))
+                            subnodes))))
+      (setq subnodes (nreverse subnodes))
+      (if (> (length subnodes) 21) (setcdr (nthcdr 20 subnodes) '(more))))
+    (if xrefs
+       (nconc menu (list "--:shadowDoubleEtchedIn"
+                         "    Cross-References"
+                         "--:singleLine")
+              (mapcar #'(lambda (xref)
+                          (if (eq xref 'more)
+                              "...more..."
+                            (vector xref
+                                    (list 'Info-follow-reference xref))))
+                      xrefs)))
+    (if subnodes
+       (nconc menu (list "--:shadowDoubleEtchedIn"
+                         "      Sub-Nodes"
+                         "--:singleLine")
+              (mapcar #'(lambda (node)
+                          (if (eq node 'more)
+                              "...more..."
+                            (vector node (list 'Info-menu node))))
+                      subnodes)))
+    menu))
+
+(defun Info-menu-filter (menu)
+  "This is the menu filter for the \"Info\" submenu."
+  (Info-construct-menu))
+
+(defun Info-select-node-menu (event)
+  "Pops up a menu of applicable Info commands."
+  (interactive "e")
+  (select-window (event-window event))
+  (let ((menu (Info-construct-menu event)))
+    (setq menu (nconc (list "Info" ; title: not displayed
+                           "     Info Commands"
+                           "--:shadowDoubleEtchedOut")
+                     menu))
+    (let ((popup-menu-titles nil))
+      (popup-menu menu))))
+\f
+;;; Info toolbar support
+
+;; exit icon taken from GNUS
+(defvar info::toolbar-exit-icon
+  (if (featurep 'toolbar)
+      (toolbar-make-button-list
+       (expand-file-name (if (featurep 'xpm) "info-exit.xpm" "info-exit.xbm")
+                        toolbar-icon-directory)))
+  "Exit Info icon")
+
+(defvar info::toolbar-up-icon
+  (if (featurep 'toolbar)
+      (toolbar-make-button-list
+       (expand-file-name (if (featurep 'xpm) "info-up.xpm" "info-up.xbm")
+                        toolbar-icon-directory)))
+  "Up icon")
+
+(defvar info::toolbar-next-icon
+  (if (featurep 'toolbar)
+      (toolbar-make-button-list
+       (expand-file-name (if (featurep 'xpm) "info-next.xpm" "info-next.xbm")
+                        toolbar-icon-directory)))
+  "Next icon")
+
+(defvar info::toolbar-prev-icon
+  (if (featurep 'toolbar)
+      (toolbar-make-button-list
+       (expand-file-name (if (featurep 'xpm) "info-prev.xpm" "info-prev.xbm")
+                        toolbar-icon-directory)))
+  "Prev icon")
+
+(defvar info::toolbar
+  (if (featurep 'toolbar)
+; disabled until we get the next/prev-win icons working again.
+;      (cons (first initial-toolbar-spec)
+;       (cons (second initial-toolbar-spec)
+            '([info::toolbar-exit-icon
+                Info-exit
+                t
+                "Exit info"]
+               [info::toolbar-next-icon
+                Info-next
+                t
+                "Next entry in same section"]
+               [info::toolbar-prev-icon
+                Info-prev
+                t
+                "Prev entry in same section"]
+               [info::toolbar-up-icon
+                Info-up
+                t
+                "Up entry to enclosing section"]
+               )))
+;))
+\f
+(provide 'info)
+
+(run-hooks 'Info-load-hook)
+
+;;; info.el ends here
diff --git a/lisp/isearch-mode.el b/lisp/isearch-mode.el
new file mode 100644 (file)
index 0000000..1abd4e0
--- /dev/null
@@ -0,0 +1,1624 @@
+;;; isearch-mode.el --- Incremental search minor mode.
+
+;; Copyright (C) 1992, 1993, 1997 Free Software Foundation, Inc.
+
+;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu>
+;; Maintainer: XEmacs Development Team
+;; Keywords: extensions, dumped
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not synched with FSF.
+
+;;; Commentary:
+
+;; LCD Archive Entry:
+;; isearch-mode|Daniel LaLiberte|liberte@cs.uiuc.edu
+;; |A minor mode replacement for isearch.el.
+
+;;====================================================================
+;; Instructions
+
+;; Searching with isearch-mode.el should work just like isearch.el,
+;; except it is done in a temporary minor mode that terminates when
+;; you finish searching.
+
+;; Semi-modal searching is supported, using a recursive edit. If
+;; isearching is started non-interactively by calling one of the
+;; isearch commands (e.g. (isearch-forward), but not like gnus does
+;; it: (call-interactively 'isearch-forward)), isearch-mode does not
+;; return until the search is completed.  You should still be able
+;; switch buffers, so be careful not to get things confused.
+
+;; The key bindings active within isearch-mode are defined below in
+;; `isearch-mode-map' which is given bindings close to the default
+;; characters of isearch.el for version 19.  With `isearch-mode',
+;; however, you can bind multi-character keys and it should be easier
+;; to add new commands.  One bug though: keys with meta-prefix cannot
+;; be longer than two chars.  Also see minibuffer-local-isearch-map
+;; for bindings active during `isearch-edit-string'.
+
+;; The search ring and completion commands automatically put you in
+;; the minibuffer to edit the string.  This gives you a chance to
+;; modify the search string before executing the search.  There are
+;; three commands to terminate the editing: C-s and C-r exit the
+;; minibuffer and search forward and reverse respectively, while C-m
+;; exits and does a nonincremental search.
+
+;; Exiting immediately from isearch uses isearch-edit-string instead
+;; of nonincremental-search, if search-nonincremental-instead is non-nil.
+;; The name of this option should probably be changed if we decide to
+;; keep the behavior.  One difference is that isearch-edit-string does
+;; not support word search yet; perhaps isearch-mode should support it
+;; even for incremental searches, but how?
+
+;;====================================================================
+;;; Change History:
+
+;; Header: /import/kaplan/kaplan/liberte/Isearch/RCS/isearch-mode.el,v 1.3 92/06/29 13:10:08 liberte Exp Locker: liberte 
+;; Log:        isearch-mode.el,v 
+;;
+;; 20-aug-92  Hacked by jwz for Lucid Emacs 19.3.
+;;
+;; Revision 1.3  92/06/29  13:10:08  liberte
+;; Moved modal isearch-mode handling into isearch-mode.
+;; Got rid of buffer-local isearch variables.
+;; isearch-edit-string used by ring adjustments, completion, and
+;; nonincremental searching.  C-s and C-r are additional exit commands.
+;; Renamed all regex to regexp.
+;; Got rid of found-start and found-point globals.
+;; Generalized handling of upper-case chars.
+;; Revision 1.2  92/05/27  11:33:57  liberte
+;; Emacs version 19 has a search ring, which is supported here.
+;; Other fixes found in the version 19 isearch are included here.
+;;
+;; Also see variables search-caps-disable-folding,
+;; search-nonincremental-instead, search-whitespace-regexp, and
+;; commands isearch-toggle-regexp, isearch-edit-string.
+;;
+;; semi-modal isearching is supported.
+
+;; Changes for 1.1
+;; 3/18/92 Fixed invalid-regexp.
+;; 3/18/92 Fixed yanking in regexps.
+
+;;; Code:
+
+(defgroup isearch nil
+  "Incremental search"
+  :prefix "search-"
+  :group 'matching)
+
+
+(defun isearch-char-to-string (c)
+  (if (eventp c) 
+      (make-string 1 (event-to-character c nil nil t))
+    (make-string 1 c)))
+
+;(defun isearch-text-char-description (c)
+;  (isearch-char-to-string c))
+
+(define-function 'isearch-text-char-description 'text-char-description)
+
+\f
+;;;=========================================================================
+;;; User-accessible variables
+
+(defvar search-last-string ""
+  "Last string search for by a search command.
+This does not include direct calls to the primitive search functions,
+and does not include searches that are aborted.")
+
+(defvar search-last-regexp ""
+  "Last string searched for by a regexp search command.
+This does not include direct calls to the primitive search functions,
+and does not include searches that are aborted.")
+
+(defconst search-exit-option t
+  "Non-nil means random control characters terminate incremental search.")
+
+(defcustom search-slow-window-lines 1
+  "*Number of lines in slow search display windows.
+These are the short windows used during incremental search on slow terminals.
+Negative means put the slow search window at the top (normally it's at bottom)
+and the value is minus the number of lines."
+  :type 'integer
+  :group 'isearch)
+
+(defcustom search-slow-speed 1200
+  "*Highest terminal speed at which to use \"slow\" style incremental search.
+This is the style where a one-line window is created to show the line
+that the search has reached."
+  :type 'integer
+  :group 'isearch)
+
+(defcustom search-caps-disable-folding t
+  "*If non-nil, upper case chars disable case fold searching.
+This does not apply to \"yanked\" strings."
+  :type 'boolean
+  :group 'isearch)
+
+(defcustom search-nonincremental-instead t
+  "*If non-nil, do a nonincremental search instead if exiting immediately."
+  :type 'boolean
+  :group 'isearch)
+  
+(defcustom search-whitespace-regexp "\\(\\s \\|[\n\r]\\)+"
+  "*If non-nil, regular expression to match a sequence of whitespace chars."
+  :type 'regexp
+  :group 'isearch)
+
+;;;==================================================================
+;;; Search ring.
+
+(defvar search-ring nil
+  "List of search string sequences.")
+(defvar regexp-search-ring nil
+  "List of regular expression search string sequences.")
+
+(defcustom search-ring-max 16
+  "*Maximum length of search ring before oldest elements are thrown away."
+  :type 'integer
+  :group 'isearch)
+(defcustom regexp-search-ring-max 16
+  "*Maximum length of regexp search ring before oldest elements are thrown away."
+  :type 'integer
+  :group 'isearch)
+
+(defvar search-ring-yank-pointer nil
+  "The tail of the search ring whose car is the last thing searched for.")
+(defvar regexp-search-ring-yank-pointer nil
+  "The tail of the regular expression search ring whose car is the last
+thing searched for.")
+
+;;;====================================================
+;;; Define isearch-mode keymap.
+
+(defvar isearch-mode-map 
+  (let ((map (make-keymap)))
+    (set-keymap-name map 'isearch-mode-map)
+
+    ;; Bind all printing characters to `isearch-printing-char'.
+    ;; This isn't normally necessary, but if a printing character were 
+    ;; bound to something other than self-insert-command in global-map, 
+    ;; then it would terminate the search and be executed without this.
+    (let ((i 32)
+         (str (make-string 1 0)))
+      (while (< i 127)
+       (aset str 0 i)
+       (define-key map str 'isearch-printing-char)
+       (setq i (1+ i))))
+    (define-key map "\t" 'isearch-printing-char)
+
+    ;; Several non-printing chars change the searching behavior.
+    ;;
+    (define-key map "\C-s" 'isearch-repeat-forward)
+    (define-key map "\M-\C-s" 'isearch-repeat-forward)
+    (define-key map "\C-r" 'isearch-repeat-backward)
+    (define-key map "\C-g" 'isearch-abort)
+
+    (define-key map "\C-q" 'isearch-quote-char)
+
+    (define-key map "\C-m" 'isearch-exit)
+    (define-key map "\C-j" 'isearch-printing-char)
+    (define-key map "\t" 'isearch-printing-char)
+
+    (define-key map "\C-w" 'isearch-yank-word)
+    (define-key map "\C-y" 'isearch-yank-line)
+    (define-key map "\M-y" 'isearch-yank-kill)
+
+    ;; Define keys for regexp chars * ? |
+    (define-key map "*" 'isearch-*-char)
+    (define-key map "?" 'isearch-*-char)
+    (define-key map "|" 'isearch-|-char)
+
+    ;; Some bindings you may want to put in your isearch-mode-hook.
+    ;; Suggest some alternates...
+    ;; (define-key map "\C-t" 'isearch-toggle-regexp)
+    ;; (define-key map "\C-^" 'isearch-edit-string)
+
+    ;; delete and backspace delete backward, f1 is help, and C-h can be either
+    (define-key map 'delete 'isearch-delete-char)
+    (define-key map 'backspace 'isearch-delete-char)
+    (define-key map '(control h) 'isearch-help-or-delete-char)
+    (define-key map 'f1 'isearch-mode-help)
+    (define-key map 'help 'isearch-mode-help)
+
+    (define-key map "\M-n" 'isearch-ring-advance)
+    (define-key map "\M-p" 'isearch-ring-retreat)
+    (define-key map "\M- " 'isearch-whitespace-chars)
+    (define-key map "\M-\t" 'isearch-complete)
+
+    (define-key map 'button2 'isearch-yank-x-selection)
+
+    map)
+  "Keymap for isearch-mode.")
+
+(defvar minibuffer-local-isearch-map 
+  (let ((map (make-sparse-keymap)))
+    ;; #### - this should also be minor-mode-ified
+    (set-keymap-parents map (list minibuffer-local-map))
+    (set-keymap-name map 'minibuffer-local-isearch-map)
+
+    ;;#### This should just arrange to use the usual Emacs minibuffer histories
+    (define-key map "\r" 'isearch-nonincremental-exit-minibuffer)
+    (define-key map "\M-n" 'isearch-ring-advance-edit)
+    (define-key map "\M-p" 'isearch-ring-retreat-edit)
+    (define-key map "\M-\t" 'isearch-complete-edit)
+    (define-key map "\C-s" 'isearch-forward-exit-minibuffer)
+    (define-key map "\C-r" 'isearch-reverse-exit-minibuffer)
+    map)
+  "Keymap for editing isearch strings in the minibuffer.")
+
+;;;========================================================
+;; Internal variables declared globally for byte-compiler.
+;; These are all bound locally while editing the search string.
+
+(defvar isearch-forward nil)   ; Searching in the forward direction.
+(defvar isearch-regexp nil)    ; Searching for a regexp.
+(defvar isearch-word nil)      ; Searching for words.
+
+(defvar isearch-cmds nil)   ; Stack of search status sets.
+(defvar isearch-string "")  ; The current search string.
+(defvar isearch-message "") ; text-char-description version of isearch-string
+
+(defvar isearch-success t)             ; Searching is currently successful.
+(defvar isearch-invalid-regexp nil)    ; Regexp not well formed.
+(defvar isearch-other-end nil) ; Start (end) of match if forward (backward).
+(defvar isearch-wrapped nil)   ; Searching restarted from the top (bottom).
+(defvar isearch-barrier 0)
+(defvar isearch-just-started nil)
+(defvar isearch-buffer nil)    ; the buffer we've frobbed the keymap of
+
+(defvar isearch-case-fold-search nil)
+
+(defvar isearch-adjusted nil)
+(defvar isearch-slow-terminal-mode nil)
+;;; If t, using a small window.
+(defvar isearch-small-window nil)
+(defvar isearch-opoint 0)
+;;; The window configuration active at the beginning of the search.
+(defvar isearch-window-configuration nil)
+(defvar isearch-selected-frame nil)
+
+;; Flag to indicate a yank occurred, so don't move the cursor.
+(defvar isearch-yank-flag nil)
+
+;;; A function to be called after each input character is processed.
+;;; (It is not called after characters that exit the search.)
+;;; It is only set from an optional argument to `isearch-mode'.
+(defvar isearch-op-fun nil)
+
+;;;  Is isearch-mode in a recursive edit for modal searching.
+(defvar isearch-recursive-edit nil)
+
+;;; Should isearch be terminated after doing one search?
+(defvar isearch-nonincremental nil)
+
+;; New value of isearch-forward after isearch-edit-string.
+(defvar isearch-new-forward nil)
+
+
+(defvar isearch-mode-hook nil
+  "Function(s) to call after starting up an incremental search.")
+
+(defvar isearch-mode-end-hook nil
+  "Function(s) to call after terminating an incremental search.")
+
+;;;==============================================================
+;; Minor-mode-alist changes - kind of redundant with the
+;; echo area, but if isearching in multiple windows, it can be useful.
+
+(add-minor-mode 'isearch-mode 'isearch-mode)
+
+(defvar isearch-mode nil)
+(make-variable-buffer-local 'isearch-mode)
+
+;;;===============================================================
+;;; Entry points to isearch-mode.
+;;; These four functions should replace those in loaddefs.el
+;;; An alternative is to fset isearch-forward etc to isearch-mode,
+;;; and look at the last command to set the options accordingly.
+
+(defun isearch-forward (&optional regexp-p)
+  "Do incremental search forward.
+With a prefix argument, do an incremental regular expression search instead.
+\\<isearch-mode-map>
+As you type characters, they add to the search string and are found.
+The following non-printing keys are bound in `isearch-mode-map'.  
+
+Type \\[isearch-delete-char] to cancel characters from end of search string.
+Type \\[isearch-exit] to exit, leaving point at location found.
+Type LFD (C-j) to match end of line.
+Type \\[isearch-repeat-forward] to search again forward,\
+ \\[isearch-repeat-backward] to search again backward.
+Type \\[isearch-yank-word] to yank word from buffer onto end of search\
+ string and search for it.
+Type \\[isearch-yank-line] to yank rest of line onto end of search string\
+ and search for it.
+Type \\[isearch-quote-char] to quote control character to search for it.
+Type \\[isearch-whitespace-chars] to match all whitespace chars in regexp.
+\\[isearch-abort] while searching or when search has failed cancels input\
+ back to what has
+ been found successfully.
+\\[isearch-abort] when search is successful aborts and moves point to\
+ starting point.
+
+Also supported is a search ring of the previous 16 search strings.
+Type \\[isearch-ring-advance] to search for the next item in the search ring.
+Type \\[isearch-ring-retreat] to search for the previous item in the search\
+ ring.
+Type \\[isearch-complete] to complete the search string using the search ring.
+
+The above keys are bound in the isearch-mode-map.  To change the keys which
+ are special to isearch-mode, simply change the bindings in that map.
+
+Other control and meta characters terminate the search
+ and are then executed normally (depending on `search-exit-option').
+
+If this function is called non-interactively, it does not return to
+the calling function until the search is done.
+
+The bindings, more precisely:
+\\{isearch-mode-map}"
+
+;; Non-standard bindings
+;; Type \\[isearch-toggle-regexp] to toggle regular expression with normal searching.
+;; Type \\[isearch-edit-string] to edit the search string in the minibuffer.
+;;  Terminate editing and return to incremental searching with CR.
+
+  (interactive "_P")
+  (isearch-mode t (not (null regexp-p)) nil (not (interactive-p))))
+
+(defun isearch-forward-regexp ()
+  "\
+Do incremental search forward for regular expression.
+Like ordinary incremental search except that your input
+is treated as a regexp.  See \\[isearch-forward] for more info."
+  (interactive "_")
+  (isearch-mode t t nil (not (interactive-p))))
+
+(defun isearch-backward (&optional regexp-p)
+  "\
+Do incremental search backward.
+With a prefix argument, do an incremental regular expression search instead.
+See \\[isearch-forward] for more information."
+  (interactive "_P")
+  (isearch-mode nil (not (null regexp-p)) nil (not (interactive-p))))
+
+(defun isearch-backward-regexp ()
+  "\
+Do incremental search backward for regular expression.
+Like ordinary incremental search except that your input
+is treated as a regexp.  See \\[isearch-forward] for more info."
+  (interactive "_")
+  (isearch-mode nil t nil (not (interactive-p))))
+
+;; This function is way wrong, because you can't scroll the help
+;; screen; as soon as you press a key, it's gone.  I don't know of a
+;; good way to fix it, though.  -hniksic
+(defun isearch-mode-help ()
+  (interactive "_")
+  (let ((w (selected-window)))
+    (describe-function 'isearch-forward)
+    (select-window w))
+  (isearch-update))
+
+\f
+;;;==================================================================
+;; isearch-mode only sets up incremental search for the minor mode.
+;; All the work is done by the isearch-mode commands.
+
+(defun isearch-mode (forward &optional regexp op-fun recursive-edit word-p)
+  "Start isearch minor mode.  Called by isearch-forward, etc."
+
+  (if executing-kbd-macro (setq recursive-edit nil))
+
+  (let ((inhibit-quit t)) ; don't leave things in an inconsistent state...
+
+    ;; Initialize global vars.
+    (setq isearch-buffer (current-buffer)
+         isearch-forward forward
+         isearch-regexp regexp
+         isearch-word word-p
+         isearch-op-fun op-fun
+         isearch-case-fold-search case-fold-search
+         isearch-string ""
+         isearch-message ""
+         isearch-cmds nil
+         isearch-success t
+         isearch-wrapped nil
+         isearch-barrier (point)
+         isearch-adjusted nil
+         isearch-yank-flag nil
+         isearch-invalid-regexp nil
+         isearch-slow-terminal-mode (and (<= (device-baud-rate)
+                                             search-slow-speed)
+                                         (> (window-height)
+                                            (* 4 search-slow-window-lines)))
+         isearch-other-end nil
+         isearch-small-window nil
+         isearch-just-started t
+
+         isearch-opoint (point)
+         isearch-window-configuration (current-window-configuration)
+
+         ;; #### - don't do this statically: isearch-mode must be FIRST in
+         ;; the minor-mode-map-alist -- Stig
+         minor-mode-map-alist (cons (cons 'isearch-mode isearch-mode-map)
+                                    minor-mode-map-alist)
+         isearch-selected-frame (selected-frame)
+
+         isearch-mode (gettext " Isearch")
+         )
+
+    ;; XEmacs change: without clearing the match data, sometimes old values
+    ;; of isearch-other-end get used.  Don't ask me why...
+    (store-match-data nil)
+
+    (add-hook 'pre-command-hook 'isearch-pre-command-hook)
+    (set-buffer-modified-p (buffer-modified-p)) ; update modeline
+    (isearch-push-state)
+
+    ) ; inhibit-quit is t before here
+
+  (isearch-update)
+  (run-hooks 'isearch-mode-hook)
+
+  ;; isearch-mode can be made modal (in the sense of not returning to 
+  ;; the calling function until searching is completed) by entering 
+  ;; a recursive-edit and exiting it when done isearching.
+  (if recursive-edit
+      (let ((isearch-recursive-edit t))
+       (recursive-edit)))
+  )
+
+
+;;;====================================================
+;; Some high level utilities.  Others below.
+
+(defun isearch-update ()
+  ;; Called after each command to update the display.  
+  (if (null unread-command-event)
+      (progn
+       (if (not (input-pending-p))
+           (isearch-message))
+       (if (and isearch-slow-terminal-mode
+                (not (or isearch-small-window 
+                         (pos-visible-in-window-p))))
+           (let ((found-point (point)))
+             (setq isearch-small-window t)
+             (move-to-window-line 0)
+             (let ((window-min-height 1))
+               (split-window nil (if (< search-slow-window-lines 0)
+                                     (1+ (- search-slow-window-lines))
+                                   (- (window-height)
+                                      (1+ search-slow-window-lines)))))
+             (if (< search-slow-window-lines 0)
+                 (progn (vertical-motion (- 1 search-slow-window-lines))
+                        (set-window-start (next-window) (point))
+                        (set-window-hscroll (next-window)
+                                            (window-hscroll))
+                        (set-window-hscroll (selected-window) 0))
+               (other-window 1))
+             (goto-char found-point)))
+       (if isearch-other-end
+           (if (< isearch-other-end (point))
+               (isearch-highlight isearch-other-end (point))
+             (isearch-highlight (point) isearch-other-end))
+         (if (extentp isearch-extent)
+             (isearch-dehighlight nil)))
+       ))
+  (setq ;; quit-flag nil  not for isearch-mode
+   isearch-adjusted nil
+   isearch-yank-flag nil)
+  )
+
+
+(defun isearch-done ()
+  ;; Called by all commands that terminate isearch-mode.
+  (let ((inhibit-quit t)) ; danger danger!
+    (if (and isearch-buffer (buffer-live-p isearch-buffer))
+       (save-excursion
+         ;; Some loser process filter might have switched the
+         ;; window's buffer, so be sure to set these variables back
+         ;; in the buffer we frobbed them in.  But only if the buffer
+         ;; is still alive.
+         (set-buffer isearch-buffer)
+         (setq minor-mode-map-alist (delq (assoc 'isearch-mode minor-mode-map-alist)
+                                          minor-mode-map-alist))
+         ;; Use remove-hook instead of just setting it to our saved value
+         ;; in case some process filter has created a buffer and modified
+         ;; the pre-command-hook in that buffer...  yeah, this is obscure,
+         ;; and yeah, I was getting screwed by it. -jwz
+         (remove-hook 'pre-command-hook 'isearch-pre-command-hook)
+         (set-keymap-parents isearch-mode-map nil)
+         (setq isearch-mode nil)
+         (set-buffer-modified-p (buffer-modified-p));; update modeline
+         (isearch-dehighlight t)))
+
+    ;; it's not critical that this be inside inhibit-quit, but leaving
+    ;; things in small-window-mode would be bad.
+    (let ((found-start (window-start (selected-window)))
+         (found-point (point)))
+      (cond ((eq (selected-frame) isearch-selected-frame)
+            (set-window-configuration isearch-window-configuration)
+
+            (if isearch-small-window
+                (goto-char found-point)
+              ;; Exiting the save-window-excursion clobbers
+              ;; window-start; restore it.
+              (set-window-start (selected-window) found-start t))))
+      ;; If there was movement, mark the starting position.
+      ;; Maybe should test difference between and set mark iff > threshold.
+      (if (and (buffer-live-p isearch-buffer)
+              (/= (point isearch-buffer) isearch-opoint))
+         (progn
+           (push-mark isearch-opoint t nil isearch-buffer)
+           (or executing-kbd-macro (> (minibuffer-depth) 0)
+               (display-message 'command "Mark saved where search started"))))
+       )
+    (setq isearch-buffer nil)
+    ) ; inhibit-quit is t before here
+
+  (if (> (length isearch-string) 0)
+      ;; Update the ring data.
+      (if isearch-regexp 
+         (if (not (setq regexp-search-ring-yank-pointer
+                        (member isearch-string regexp-search-ring)))
+             (progn
+               (setq regexp-search-ring
+                     (cons isearch-string regexp-search-ring)
+                     regexp-search-ring-yank-pointer regexp-search-ring)
+               (if (> (length regexp-search-ring) regexp-search-ring-max)
+                   (setcdr (nthcdr (1- search-ring-max) regexp-search-ring)
+                           nil))))
+       (if (not (setq search-ring-yank-pointer
+                      ;; really need equal test instead of eq.
+                      (member isearch-string search-ring)))
+           (progn
+             (setq search-ring (cons isearch-string search-ring)
+                   search-ring-yank-pointer search-ring)
+             (if (> (length search-ring) search-ring-max)
+                 (setcdr (nthcdr (1- search-ring-max) search-ring) nil))))))
+
+  (run-hooks 'isearch-mode-end-hook)
+  (if isearch-recursive-edit (exit-recursive-edit)))
+
+\f
+;;;====================================================
+;; Commands active while inside of the isearch minor mode.
+
+(defun isearch-exit ()
+  "Exit search normally.
+However, if this is the first command after starting incremental
+search and `search-nonincremental-instead' is non-nil, do an
+incremental search via `isearch-edit-string'."
+  (interactive)
+  (if (and search-nonincremental-instead 
+          (= 0 (length isearch-string)))
+      (let ((isearch-nonincremental t))
+       (isearch-edit-string))
+    (isearch-done)))
+
+
+(defun isearch-edit-string ()
+  "Edit the search string in the minibuffer.
+The following additional command keys are active while editing.
+\\<minibuffer-local-isearch-map>
+\\[exit-minibuffer] to exit editing and resume incremental searching.
+\\[isearch-forward-exit-minibuffer] to resume isearching forward.
+\\[isearch-backward-exit-minibuffer] to resume isearching backward.
+\\[isearch-ring-advance-edit] to replace the search string with the next\
+ item in the search ring.
+\\[isearch-ring-retreat-edit] to replace the search string with the next\
+ item in the search ring.
+\\[isearch-complete-edit] to complete the search string from the search ring."
+
+  ;; Editing doesn't back up the search point.  Should it?
+  (interactive)
+
+  (condition-case nil
+      (let ((minibuffer-local-map minibuffer-local-isearch-map)
+           isearch-nonincremental      ; should search nonincrementally?
+           isearch-new-string
+           isearch-new-message
+           (isearch-new-forward isearch-forward)
+
+           ;; Locally bind all isearch global variables to protect them
+           ;; from recursive isearching.
+           (isearch-string isearch-string)
+           (isearch-message isearch-message)
+           (isearch-forward isearch-forward) ; set by commands below.
+
+           (isearch-forward isearch-forward)
+           (isearch-regexp isearch-regexp)
+           (isearch-word isearch-word)
+           (isearch-op-fun isearch-op-fun)
+           (isearch-cmds isearch-cmds)
+           (isearch-success isearch-success)
+           (isearch-wrapped isearch-wrapped)
+           (isearch-barrier isearch-barrier)
+           (isearch-adjusted isearch-adjusted)
+           (isearch-yank-flag isearch-yank-flag)
+           (isearch-invalid-regexp isearch-invalid-regexp)
+           (isearch-other-end isearch-other-end)
+           (isearch-opoint isearch-opoint)
+           (isearch-slow-terminal-mode isearch-slow-terminal-mode)
+           (isearch-small-window isearch-small-window)
+           (isearch-recursive-edit isearch-recursive-edit)
+           (isearch-window-configuration (current-window-configuration))
+           (isearch-selected-frame (selected-frame))
+           )
+       ;; Actually terminate isearching until editing is done.
+       ;; This is so that the user can do anything without failure, 
+       ;; like switch buffers and start another isearch, and return.
+;;     (condition-case nil
+           (isearch-done)
+          ;;#### What does this mean?  There is no such condition!
+;;       (exit nil))                   ; was recursive editing
+
+       (unwind-protect
+           (let ((prompt (isearch-message-prefix nil t))
+                  event)
+             ;; If the first character the user types when we prompt them
+             ;; for a string is the yank-word character, then go into
+             ;; word-search mode.  Otherwise unread that character and
+             ;; read a string the normal way.
+             (let ((cursor-in-echo-area t))
+               (display-message 'prompt prompt)
+               (setq event (next-command-event))
+               (if (eq 'isearch-yank-word
+                       (lookup-key isearch-mode-map (vector event)))
+                   (setq isearch-word t)
+                 (setq unread-command-event event)))
+             (setq isearch-new-string
+;;                    (if (fboundp 'gmhist-old-read-from-minibuffer)
+;;                        ;; Eschew gmhist crockery
+;;                     (gmhist-old-read-from-minibuffer prompt isearch-string)
+                     (read-string
+                      prompt isearch-string
+                      't            ;does its own history (but shouldn't)
+;;                     (if isearch-regexp
+;;                         ;; The search-rings aren't exactly minibuffer
+;;                         ;;  histories, but they are close enough
+;;                         (cons 'regexp-search-ring
+;;                               (- (length regexp-search-ring-yank-pointer)
+;;                                  (length regexp-search-ring)))
+;;                         (cons 'search-ring
+;;                               (- (length search-ring-yank-pointer)
+;;                                  (length search-ring))))
+                      )
+;;                   )
+                   isearch-new-message (mapconcat
+                                        'isearch-text-char-description
+                                        isearch-new-string ""))
+             )
+         ;; Always resume isearching by restarting it.
+         (isearch-mode isearch-forward 
+                       isearch-regexp 
+                       isearch-op-fun 
+                       isearch-recursive-edit
+                       isearch-word)
+         )
+
+       ;; Copy new values in outer locals to isearch globals
+       (setq isearch-string isearch-new-string
+             isearch-message isearch-new-message
+             isearch-forward isearch-new-forward)
+
+       ;; Empty isearch-string means use default.
+       (if (= 0 (length isearch-string))
+           (setq isearch-string (if isearch-regexp search-last-regexp
+                                  search-last-string))
+         ;; Set last search string now so it is set even if we fail.
+         (if search-last-regexp
+             (setq search-last-regexp isearch-string)
+           (setq search-last-string isearch-string)))
+
+       ;; Reinvoke the pending search.
+       (isearch-push-state)
+       (isearch-search)
+       (isearch-update)
+       (if isearch-nonincremental (isearch-done)))
+
+    (quit  ; handle abort-recursive-edit
+     (isearch-abort)  ;; outside of let to restore outside global values
+     )))
+
+(defun isearch-nonincremental-exit-minibuffer ()
+  (interactive)
+  (setq isearch-nonincremental t)
+  (exit-minibuffer))
+
+(defun isearch-forward-exit-minibuffer ()
+  (interactive)
+  (setq isearch-new-forward t)
+  (exit-minibuffer))
+
+(defun isearch-reverse-exit-minibuffer ()
+  (interactive)
+  (setq isearch-new-forward nil)
+  (exit-minibuffer))
+
+
+(defun isearch-abort ()
+  "Quit incremental search mode if searching is successful, signalling quit.
+Otherwise, revert to previous successful search and continue searching.
+Use `isearch-exit' to quit without signalling."
+  (interactive)
+;;  (ding)  signal instead below, if quiting
+  (discard-input)
+  (if isearch-success
+      ;; If search is successful, move back to starting point
+      ;; and really do quit.
+      (progn (goto-char isearch-opoint)
+            (isearch-done)   ; exit isearch
+            (signal 'quit '(isearch)))  ; and pass on quit signal
+    ;; If search is failing, rub out until it is once more successful.
+    (while (not isearch-success) (isearch-pop-state))
+    (isearch-update)))
+
+
+(defun isearch-repeat (direction)
+  ;; Utility for isearch-repeat-forward and -backward.
+  (if (eq isearch-forward (eq direction 'forward))
+      ;; C-s in forward or C-r in reverse.
+      (if (equal isearch-string "")
+         ;; If search string is empty, use last one.
+         (setq isearch-string
+               (or (if isearch-regexp
+                       (if regexp-search-ring-yank-pointer
+                           (car regexp-search-ring-yank-pointer)
+                         (car regexp-search-ring))
+                     (if search-ring-yank-pointer
+                         (car search-ring-yank-pointer)
+                       (car search-ring)))
+                   "")
+               isearch-message
+               (mapconcat 'isearch-text-char-description
+                          isearch-string ""))
+       ;; If already have what to search for, repeat it.
+       (or isearch-success
+           (progn 
+
+             (goto-char (if isearch-forward (point-min) (point-max)))
+             (setq isearch-wrapped t))))
+    ;; C-s in reverse or C-r in forward, change direction.
+    (setq isearch-forward (not isearch-forward)))
+
+  (setq isearch-barrier (point)) ; For subsequent \| if regexp.
+  (if (equal isearch-string "")
+      (setq isearch-success t)
+    (if (and (equal (match-end 0) (match-beginning 0))
+            isearch-success
+            (not isearch-just-started))
+       ;; If repeating a search that found
+       ;; an empty string, ensure we advance.
+       (if (if isearch-forward (eobp) (bobp))
+           ;; nowhere to advance to, so fail (and wrap next time)
+           (progn
+             (setq isearch-success nil)
+             (and executing-kbd-macro
+                  (not defining-kbd-macro)
+                  (isearch-done))
+             (ding nil 'isearch-failed))
+         (forward-char (if isearch-forward 1 -1))
+         (isearch-search))
+      (isearch-search)))
+  (isearch-push-state)
+  (isearch-update))
+
+(defun isearch-repeat-forward ()
+  "Repeat incremental search forwards."
+  (interactive)
+  (isearch-repeat 'forward))
+
+(defun isearch-repeat-backward ()
+  "Repeat incremental search backwards."
+  (interactive)
+  (isearch-repeat 'backward))
+
+(defun isearch-toggle-regexp ()
+  "Toggle regexp searching on or off."
+  ;; The status stack is left unchanged.
+  (interactive)
+  (setq isearch-regexp (not isearch-regexp))
+  (if isearch-regexp (setq isearch-word nil))
+  (isearch-update))
+
+(defun isearch-toggle-case-fold ()
+  "Toggle case folding in searching on or off."
+  (interactive)
+  (setq isearch-case-fold-search
+       (if isearch-case-fold-search nil 'yes))
+  (message "%s%s [case %ssensitive]"
+          (isearch-message-prefix)
+          isearch-message
+          (if isearch-case-fold-search "in" ""))
+  (setq isearch-adjusted t)
+  (sit-for 1)
+  (isearch-update))
+
+(defun isearch-delete-char ()
+  "Discard last input item and move point back.  
+If no previous match was done, just beep."
+  (interactive)
+  (if (null (cdr isearch-cmds))
+      (ding nil 'isearch-quit)
+    (isearch-pop-state))
+  (isearch-update))
+
+(defun isearch-help-or-delete-char ()
+  "Show Isearch help or delete backward in the search string.
+Deletes when `delete-key-deletes-forward' is t and C-h is used for deleting
+backwards."
+  (interactive)
+  (if (and delete-key-deletes-forward
+           (case (device-type)
+             ('tty (eq tty-erase-char ?\C-h))
+             ('x (not (x-keysym-on-keyboard-sans-modifiers-p 'backspace)))))
+      (isearch-delete-char)
+    (isearch-mode-help)))
+
+(defun isearch-yank (chunk)
+  ;; Helper for isearch-yank-* functions.  CHUNK can be a string or a
+  ;; function.
+  (let ((word (if (stringp chunk)
+                 chunk
+               (save-excursion
+                 (and (not isearch-forward) isearch-other-end
+                      (goto-char isearch-other-end))
+                 (buffer-substring
+                  (point)
+                  (save-excursion
+                    (funcall chunk)
+                    (point)))))))
+    ;; if configured so that typing upper-case characters turns off case
+    ;; folding, then downcase the string so that yanking an upper-case
+    ;; word doesn't mess with case-foldedness.
+    (if (and search-caps-disable-folding isearch-case-fold-search)
+       (setq word (downcase word)))
+    (if isearch-regexp (setq word (regexp-quote word)))
+    (setq isearch-string (concat isearch-string word)
+         isearch-message
+         (concat isearch-message
+                 (mapconcat 'isearch-text-char-description
+                            word ""))
+         ;; Don't move cursor in reverse search.
+         isearch-yank-flag t))
+  (isearch-search-and-update))
+
+
+(defun isearch-yank-word ()
+  "Pull next word from buffer into search string."
+  (interactive)
+  (isearch-yank (function (lambda () (forward-word 1)))))
+
+(defun isearch-yank-line ()
+  "Pull rest of line from buffer into search string."
+  (interactive)
+  (isearch-yank 'end-of-line))
+
+(defun isearch-yank-kill ()
+  "Pull rest of line from kill ring into search string."
+  (interactive)
+  (isearch-yank (current-kill 0)))
+
+(defun isearch-yank-sexp ()
+  "Pull next expression from buffer into search string."
+  (interactive)
+  (isearch-yank 'forward-sexp))
+
+(defun isearch-yank-x-selection ()
+  "Pull the current X selection into the search string."
+  (interactive)
+  (isearch-yank (x-get-selection)))
+
+(defun isearch-yank-x-clipboard ()
+  "Pull the current X clipboard selection into the search string."
+  (interactive)
+  (isearch-yank (x-get-clipboard)))
+
+(defun isearch-search-and-update ()
+  ;; Do the search and update the display.
+  (if (and (not isearch-success)
+          ;; unsuccessful regexp search may become
+          ;;  successful by addition of characters which
+          ;;  make isearch-string valid
+          (not isearch-regexp))
+      nil
+    ;; In reverse search, adding stuff at
+    ;; the end may cause zero or many more chars to be
+    ;; matched, in the string following point.
+    ;; Allow all those possibilities without moving point as
+    ;; long as the match does not extend past search origin.
+    (if (and (not isearch-forward) (not isearch-adjusted)
+            (condition-case ()
+                (looking-at (if isearch-regexp isearch-string
+                              (regexp-quote isearch-string)))
+              (error nil))
+              (or isearch-yank-flag
+                  (<= (match-end 0) 
+                      (min isearch-opoint isearch-barrier))))
+       (setq isearch-success t 
+             isearch-invalid-regexp nil
+             isearch-other-end (match-end 0))
+      ;; Not regexp, not reverse, or no match at point.
+      (if (and isearch-other-end (not isearch-adjusted))
+         (goto-char (if isearch-forward isearch-other-end
+                      (min isearch-opoint 
+                           isearch-barrier 
+                           (1+ isearch-other-end)))))
+      (isearch-search)
+      ))
+  (isearch-push-state)
+  (if isearch-op-fun (funcall isearch-op-fun))
+  (isearch-update))
+
+
+;; *, ?, and | chars can make a regexp more liberal.
+;; They can make a regexp match sooner
+;; or make it succeed instead of failing.
+;; So go back to place last successful search started
+;; or to the last ^S/^R (barrier), whichever is nearer.
+
+(defun isearch-*-char ()
+  "Handle * and ? specially in regexps."
+  (interactive)
+  (if isearch-regexp 
+
+      (progn
+       (setq isearch-adjusted t)
+       (let ((cs (nth (if isearch-forward
+                          5            ; isearch-other-end
+                        2)             ; saved (point)
+                      (car (cdr isearch-cmds)))))
+         ;; (car isearch-cmds) is after last search;
+         ;; (car (cdr isearch-cmds)) is from before it.
+         (setq cs (or cs isearch-barrier))
+         (goto-char
+          (if isearch-forward
+              (max cs isearch-barrier)
+            (min cs isearch-barrier))))))
+  (isearch-process-search-char last-command-event))
+  
+
+
+(defun isearch-|-char ()
+  "If in regexp search, jump to the barrier."
+  (interactive)
+  (if isearch-regexp
+      (progn
+       (setq isearch-adjusted t)
+       (goto-char isearch-barrier)))
+  (isearch-process-search-char last-command-event))
+
+(defun isearch-quote-char ()
+  "Quote special characters for incremental search."
+  (interactive)
+  (isearch-process-search-char (read-quoted-char (isearch-message t))))
+
+
+(defun isearch-return-char ()
+  "Convert return into newline for incremental search.
+Obsolete."
+  (interactive)
+  (isearch-process-search-char ?\n))
+
+
+(defun isearch-printing-char ()
+  "Any other printing character => add it to the search string and search."
+  (interactive)
+  (isearch-process-search-char last-command-event))
+
+
+(defun isearch-whitespace-chars ()
+  "Match all whitespace chars, if in regexp mode."
+  (interactive)
+  (if (and isearch-regexp search-whitespace-regexp)
+      (isearch-process-search-string search-whitespace-regexp " ")
+    (beep)
+    (isearch-process-search-char ?\ )
+;    (if isearch-word
+;      nil
+;      (setq isearch-word t)
+;      (goto-char isearch-other-end)
+;      (isearch-process-search-char ?\ ))
+    ))
+
+(defun isearch-process-search-char (char)
+  ;; Append the char to the search string, update the message and re-search.
+  (isearch-process-search-string (isearch-char-to-string char) 
+                                (isearch-text-char-description char)))
+
+(defun isearch-process-search-string (string message)
+  (setq isearch-string (concat isearch-string string)
+       isearch-message (concat isearch-message message))
+  (isearch-search-and-update))
+
+\f
+;;===========================================================
+;; Search Ring
+
+(defcustom search-ring-update nil
+  "*Non-nil if advancing or retreating in the search ring should cause search.
+Default nil means edit the string from the search ring first."
+  :type 'boolean
+  :group 'isearch)
+  
+(defun isearch-ring-adjust1 (advance)
+  ;; Helper for isearch-ring-adjust
+  (let* ((ring (if isearch-regexp regexp-search-ring search-ring))
+        (length (length ring))
+        (yank-pointer-name (if isearch-regexp
+                               'regexp-search-ring-yank-pointer
+                             'search-ring-yank-pointer))
+        (yank-pointer (eval yank-pointer-name)))
+    (if (zerop length)
+       ()
+      (set yank-pointer-name
+          (setq yank-pointer
+                (nthcdr (% (+ (- length (length yank-pointer))
+                              (if advance (1- length) 1))
+                           length) ring)))
+      (setq isearch-string (car yank-pointer)
+           isearch-message (mapconcat 'isearch-text-char-description
+                                      isearch-string "")))))
+
+(defun isearch-ring-adjust (advance)
+  ;; Helper for isearch-ring-advance and isearch-ring-retreat
+  (if (cdr isearch-cmds)  ;; is there more than one thing on stack?
+      (isearch-pop-state))
+  (isearch-ring-adjust1 advance)
+  (isearch-push-state)
+  (if search-ring-update
+      (progn
+       (isearch-search)
+       (isearch-update))
+    (isearch-edit-string)
+    ))
+
+(defun isearch-ring-advance ()
+  "Advance to the next search string in the ring."
+  ;; This could be more general to handle a prefix arg, but who would use it.
+  (interactive)
+  (isearch-ring-adjust 'advance))
+
+(defun isearch-ring-retreat ()
+  "Retreat to the previous search string in the ring."
+  (interactive)
+  (isearch-ring-adjust nil))
+
+(defun isearch-ring-adjust-edit (advance)
+  "Use the next or previous search string in the ring while in minibuffer."
+  (isearch-ring-adjust1 advance)
+  (erase-buffer)
+  (insert isearch-string))
+
+(defun isearch-ring-advance-edit ()
+  (interactive)
+  (isearch-ring-adjust-edit 'advance))
+
+(defun isearch-ring-retreat-edit ()
+  "Retreat to the previous search string in the ring while in the minibuffer."
+  (interactive)
+  (isearch-ring-adjust-edit nil))
+
+
+(defun isearch-complete1 ()
+  ;; Helper for isearch-complete and isearch-complete-edit
+  ;; Return t if completion OK, 
+  (let* ((ring (if isearch-regexp regexp-search-ring search-ring))
+         (alist (mapcar (function (lambda (string) (list string))) ring))
+         (completion-ignore-case case-fold-search)
+         (completion (try-completion isearch-string alist))
+        )
+    (cond
+     ((eq completion t)
+      ;; isearch-string stays the same
+      t)
+     ((or completion ; not nil, must be a string
+         (= 0 (length isearch-string))) ; shouldn't have to say this
+      (if (equal completion isearch-string)  ;; no extension?
+         (if completion-auto-help
+             (with-output-to-temp-buffer "*Isearch completions*"
+               (display-completion-list 
+                (all-completions isearch-string alist))))
+       (setq isearch-string completion))
+      t)
+     (t
+      (temp-minibuffer-message "No completion")
+      nil))))
+
+(defun isearch-complete ()
+  "Complete the search string from the strings on the search ring.
+The completed string is then editable in the minibuffer.
+If there is no completion possible, say so and continue searching."
+  (interactive)
+  (if (isearch-complete1)
+      (isearch-edit-string)
+    ;; else
+    (sit-for 1)
+    (isearch-update)))
+
+(defun isearch-complete-edit ()
+  "Same as `isearch-complete' except in the minibuffer."
+  (interactive)
+  (setq isearch-string (buffer-string))
+  (if (isearch-complete1)
+      (progn
+       (erase-buffer)
+       (insert isearch-string))))
+
+\f
+;;;==============================================================
+;; The search status stack (and isearch window-local variables, not used).
+
+(defun isearch-top-state ()
+;;  (fetch-window-local-variables)
+  (let ((cmd (car isearch-cmds)))
+    (setq isearch-string (car cmd)
+         isearch-message (car (cdr cmd))
+         isearch-success (nth 3 cmd)
+         isearch-forward (nth 4 cmd)
+         isearch-other-end (nth 5 cmd)
+         isearch-invalid-regexp (nth 6 cmd)
+         isearch-wrapped (nth 7 cmd)
+         isearch-barrier (nth 8 cmd))
+    (goto-char (car (cdr (cdr cmd))))))
+
+(defun isearch-pop-state ()
+;;  (fetch-window-local-variables)
+  (setq isearch-cmds (cdr isearch-cmds))
+  (isearch-top-state)
+  )
+
+(defun isearch-push-state ()
+  (setq isearch-cmds 
+       (cons (list isearch-string isearch-message (point)
+                   isearch-success isearch-forward isearch-other-end 
+                   isearch-invalid-regexp isearch-wrapped isearch-barrier)
+             isearch-cmds)))
+
+\f
+;;;==================================================================
+;; Message string
+
+(defun isearch-message (&optional c-q-hack ellipsis)
+  ;; Generate and print the message string.
+  (let ((cursor-in-echo-area ellipsis)
+       (m (concat
+           (isearch-message-prefix c-q-hack)
+           isearch-message
+           (isearch-message-suffix c-q-hack)
+           )))
+    (if c-q-hack m (display-message 'progress (format "%s" m)))))
+
+(defun isearch-message-prefix (&optional c-q-hack nonincremental)
+  ;; If about to search, and previous search regexp was invalid,
+  ;; check that it still is.  If it is valid now,
+  ;; let the message we display while searching say that it is valid.
+  (and isearch-invalid-regexp
+       (condition-case ()
+          (progn (re-search-forward isearch-string (point) t)
+                 (setq isearch-invalid-regexp nil))
+        (error nil)))
+  ;; #### - Yo!  Emacs assembles strings all over the place, they can't all
+  ;; be internationalized in the manner proposed below...  Add an explicit
+  ;; call to `gettext' and have the string snarfer pluck the english
+  ;; strings out of the comment below.  XEmacs is on a purespace diet! -Stig
+  (let ((m (concat (if isearch-success nil "failing ")
+                  (if isearch-wrapped "wrapped ")
+                  (if isearch-word "word ")
+                  (if isearch-regexp "regexp ")
+                  (if nonincremental "search" "I-search")
+                  (if isearch-forward nil " backward")
+                  ": "
+                  )))
+    (aset m 0 (upcase (aref m 0)))
+    (gettext m)))
+
+(defun isearch-message-suffix (&optional c-q-hack)
+  (concat (if c-q-hack "^Q" "")
+         (if isearch-invalid-regexp
+             (concat " [" isearch-invalid-regexp "]")
+           "")))
+
+;;;;; #### - yuck...this is soooo lame.  Is this really worth 4k of purespace???
+;;;
+;;;(let ((i (logior (if isearch-success 32 0)
+;;;                (if isearch-wrapped 16 0)
+;;;                (if isearch-word     8 0)
+;;;                (if isearch-regexp   4 0)
+;;;                (if nonincremental   2 0)
+;;;                (if isearch-forward  1 0))))
+;;;  (cond
+;;;   ((= i 63) (gettext "Wrapped word regexp search: "))              ; 111111
+;;;   ((= i 62) (gettext "Wrapped word regexp search backward: "))     ; 111110
+;;;   ((= i 61) (gettext "Wrapped word regexp I-search: "))            ; 111101
+;;;   ((= i 60) (gettext "Wrapped word regexp I-search backward: "))   ; 111100
+;;;   ((= i 59) (gettext "Wrapped word search: "))                     ; 111011
+;;;   ((= i 58) (gettext "Wrapped word search backward: "))            ; 111010
+;;;   ((= i 57) (gettext "Wrapped word I-search: "))                   ; 111001
+;;;   ((= i 56) (gettext "Wrapped word I-search backward: "))          ; 111000
+;;;   ((= i 55) (gettext "Wrapped regexp search: "))                   ; 110111
+;;;   ((= i 54) (gettext "Wrapped regexp search backward: "))          ; 110110
+;;;   ((= i 53) (gettext "Wrapped regexp I-search: "))                 ; 110101
+;;;   ((= i 52) (gettext "Wrapped regexp I-search backward: "))        ; 110100
+;;;   ((= i 51) (gettext "Wrapped search: "))                          ; 110011
+;;;   ((= i 50) (gettext "Wrapped search backward: "))                 ; 110010
+;;;   ((= i 49) (gettext "Wrapped I-search: "))                        ; 110001
+;;;   ((= i 48) (gettext "Wrapped I-search backward: "))              ; 110000
+;;;   ((= i 47) (gettext "Word regexp search: "))                      ; 101111
+;;;   ((= i 46) (gettext "Word regexp search backward: "))             ; 101110
+;;;   ((= i 45) (gettext "Word regexp I-search: "))                    ; 101101
+;;;   ((= i 44) (gettext "Word regexp I-search backward: "))           ; 101100
+;;;   ((= i 43) (gettext "Word search: "))                             ; 101011
+;;;   ((= i 42) (gettext "Word search backward: "))                    ; 101010
+;;;   ((= i 41) (gettext "Word I-search: "))                           ; 101001
+;;;   ((= i 40) (gettext "Word I-search backward: "))                  ; 101000
+;;;   ((= i 39) (gettext "Regexp search: "))                           ; 100111
+;;;   ((= i 38) (gettext "Regexp search backward: "))                  ; 100110
+;;;   ((= i 37) (gettext "Regexp I-search: "))                         ; 100101
+;;;   ((= i 36) (gettext "Regexp I-search backward: "))                ; 100100
+;;;   ((= i 35) (gettext "Search: "))                                  ; 100011
+;;;   ((= i 34) (gettext "Search backward: "))                         ; 100010
+;;;   ((= i 33) (gettext "I-search: "))                                ; 100001
+;;;   ((= i 32) (gettext "I-search backward: "))                      ; 100000
+;;;   ((= i 31) (gettext "Failing wrapped word regexp search: "))      ; 011111
+;;;   ((= i 30) (gettext "Failing wrapped word regexp search backward: ")) ; 011110
+;;;   ((= i 29) (gettext "Failing wrapped word regexp I-search: "))    ; 011101
+;;;   ((= i 28) (gettext "Failing wrapped word regexp I-search backward: ")) ; 011100
+;;;   ((= i 27) (gettext "Failing wrapped word search: "))             ; 011011
+;;;   ((= i 26) (gettext "Failing wrapped word search backward: "))    ; 011010
+;;;   ((= i 25) (gettext "Failing wrapped word I-search: "))           ; 011001
+;;;   ((= i 24) (gettext "Failing wrapped word I-search backward: "))  ; 011000
+;;;   ((= i 23) (gettext "Failing wrapped regexp search: "))           ; 010111
+;;;   ((= i 22) (gettext "Failing wrapped regexp search backward: "))  ; 010110
+;;;   ((= i 21) (gettext "Failing wrapped regexp I-search: "))         ; 010101
+;;;   ((= i 20) (gettext "Failing wrapped regexp I-search backward: ")) ; 010100
+;;;   ((= i 19) (gettext "Failing wrapped search: "))                  ; 010011
+;;;   ((= i 18) (gettext "Failing wrapped search backward: "))         ; 010010
+;;;   ((= i 17) (gettext "Failing wrapped I-search: "))                ; 010001
+;;;   ((= i 16) (gettext "Failing wrapped I-search backward: "))       ; 010000
+;;;   ((= i 15) (gettext "Failing word regexp search: "))              ; 001111
+;;;   ((= i 14) (gettext "Failing word regexp search backward: "))     ; 001110
+;;;   ((= i 13) (gettext "Failing word regexp I-search: "))            ; 001101
+;;;   ((= i 12) (gettext "Failing word regexp I-search backward: "))   ; 001100
+;;;   ((= i 11) (gettext "Failing word search: "))                     ; 001011
+;;;   ((= i 10) (gettext "Failing word search backward: "))            ; 001010
+;;;   ((= i  9) (gettext "Failing word I-search: "))                   ; 001001
+;;;   ((= i  8) (gettext "Failing word I-search backward: "))          ; 001000
+;;;   ((= i  7) (gettext "Failing regexp search: "))                   ; 000111
+;;;   ((= i  6) (gettext "Failing regexp search backward: "))          ; 000110
+;;;   ((= i  5) (gettext "Failing regexp I-search: "))                 ; 000101
+;;;   ((= i  4) (gettext "Failing regexp I-search backward: "))        ; 000100
+;;;   ((= i  3) (gettext "Failing search: "))                          ; 000011
+;;;   ((= i  2) (gettext "Failing search backward: "))                 ; 000010
+;;;   ((= i  1) (gettext "Failing I-search: "))                        ; 000001
+;;;   ((= i  0) (gettext "Failing I-search backward: "))              ; 000000
+;;;   (t (error "Something's rotten")))))
+
+\f
+;;;========================================================
+;;; Exiting
+
+(put 'isearch-printing-char                    'isearch-command t)
+(put 'isearch-return-char                      'isearch-command t)
+(put 'isearch-repeat-forward                   'isearch-command t)
+(put 'isearch-repeat-backward                  'isearch-command t)
+(put 'isearch-delete-char                      'isearch-command t)
+(put 'isearch-help-or-delete-char              'isearch-command t)
+(put 'isearch-abort                            'isearch-command t)
+(put 'isearch-quote-char                       'isearch-command t)
+(put 'isearch-exit                             'isearch-command t)
+(put 'isearch-printing-char                    'isearch-command t)
+(put 'isearch-printing-char                    'isearch-command t)
+(put 'isearch-yank-word                                'isearch-command t)
+(put 'isearch-yank-line                                'isearch-command t)
+(put 'isearch-yank-kill                                'isearch-command t)
+(put 'isearch-yank-sexp                                'isearch-command t)
+(put 'isearch-*-char                           'isearch-command t)
+(put 'isearch-*-char                           'isearch-command t)
+(put 'isearch-|-char                           'isearch-command t)
+(put 'isearch-toggle-regexp                    'isearch-command t)
+(put 'isearch-toggle-case-fold                 'isearch-command t)
+(put 'isearch-edit-string                      'isearch-command t)
+(put 'isearch-mode-help                                'isearch-command t)
+(put 'isearch-ring-advance                     'isearch-command t)
+(put 'isearch-ring-retreat                     'isearch-command t)
+(put 'isearch-ring-advance-edit                        'isearch-command t)
+(put 'isearch-ring-retreat-edit                        'isearch-command t)
+(put 'isearch-whitespace-chars                 'isearch-command t)
+(put 'isearch-complete                         'isearch-command t)
+(put 'isearch-complete-edit                    'isearch-command t)
+(put 'isearch-edit-string                      'isearch-command t)
+(put 'isearch-toggle-regexp                    'isearch-command t)
+(put 'isearch-forward-exit-minibuffer          'isearch-command t)
+(put 'isearch-reverse-exit-minibuffer          'isearch-command t)
+(put 'isearch-nonincremental-exit-minibuffer   'isearch-command t)
+(put 'isearch-yank-x-selection                 'isearch-command t)
+(put 'isearch-yank-x-clipboard                 'isearch-command t)
+
+;; scrolling the scrollbar should not terminate isearch.
+
+;; vertical scrollbar:
+(put 'scrollbar-line-up                                'isearch-command t)
+(put 'scrollbar-line-down                      'isearch-command t)
+(put 'scrollbar-page-up                                'isearch-command t)
+(put 'scrollbar-page-down                      'isearch-command t)
+(put 'scrollbar-to-top                         'isearch-command t)
+(put 'scrollbar-to-bottom                      'isearch-command t)
+(put 'scrollbar-vertical-drag                  'isearch-command t)
+
+;; horizontal scrollbar:
+(put 'scrollbar-char-left                      'isearch-command t)
+(put 'scrollbar-char-right                     'isearch-command t)
+(put 'scrollbar-page-left                      'isearch-command t)
+(put 'scrollbar-page-right                     'isearch-command t)
+(put 'scrollbar-to-left                                'isearch-command t)
+(put 'scrollbar-to-right                       'isearch-command t)
+(put 'scrollbar-horizontal-drag                        'isearch-command t)
+
+(defun isearch-pre-command-hook ()
+  ;;
+  ;; For use as the value of `pre-command-hook' when isearch-mode is active.
+  ;; If the command about to be executed is not one of the isearch commands,
+  ;; then isearch-mode is turned off before that command is executed.
+  ;;
+  ;; If the command about to be executed is self-insert-command, or is a
+  ;; keyboard macro of a single key sequence which is bound to self-insert-
+  ;; command, then we add those chars to the search ring instead of inserting
+  ;; them in the buffer.  In this way, the set of self-searching characters
+  ;; need not be exhaustively enumerated, but is derived from other maps.
+  ;;
+  (cond ((not (eq (current-buffer) isearch-buffer))
+        ;; If the buffer (likely meaning "frame") has changed, bail.
+        ;; This can also happen if a proc filter has popped up another
+        ;; buffer, which is arguably a bad thing for it to have done,
+        ;; but the way in which isearch would have hosed you in that
+        ;; case is unarguably even worse. -jwz
+        (isearch-done))
+       (t
+        (isearch-maybe-frob-keyboard-macros)
+        (if (and this-command
+                 (symbolp this-command)
+                 (get this-command 'isearch-command))
+            nil ; then continue.
+          (isearch-done)))))
+
+(defun isearch-maybe-frob-keyboard-macros ()
+  ;;
+  ;; If the command about to be executed is `self-insert-command' then change
+  ;; the command to `isearch-printing-char' instead, meaning add the last-
+  ;; typed character to the search string.
+  ;;
+  ;; If `this-command' is a string or a vector (that is, a keyboard macro)
+  ;; and it contains only one command, which is bound to self-insert-command,
+  ;; then do the same thing as for self-inserting commands: arrange for that
+  ;; character to be added to the search string.  If we didn't do this, then
+  ;; typing a compose sequence (a la x-compose.el) would terminate the search
+  ;; and insert the character, instead of searching for that character.
+  ;;
+  ;; We should continue doing this, since it's pretty much the behavior one
+  ;; would expect, but it will stop being so necessary once key-translation-
+  ;; map exists and is used by x-compose.el and things like it, since the
+  ;; translation will have been done before we see the keys.
+  ;;
+  (cond ((eq this-command 'self-insert-command)
+        (setq this-command 'isearch-printing-char))
+       ((and (or (stringp this-command) (vectorp this-command))
+             (eq (key-binding this-command) 'self-insert-command))
+        (setq last-command-event (character-to-event (aref this-command 0))
+              last-command-char (and (stringp this-command)
+                                     (aref this-command 0))
+              this-command 'isearch-printing-char))
+       ))
+
+\f
+;;;========================================================
+;;; Highlighting
+
+(defcustom isearch-highlight t
+  "*Whether isearch and query-replace should highlight the text which 
+currently matches the search-string.")
+
+(defvar isearch-extent nil)
+
+;; this face is initialized by x-faces.el since isearch is preloaded.
+;; this face is now created in initialize-faces
+;;(make-face 'isearch)
+
+(defun isearch-make-extent (begin end)
+  (let ((x (make-extent begin end (current-buffer))))
+    ;; make the isearch extent always take prescedence over any mouse-
+    ;; highlighted extents we may be passing through, since isearch, being
+    ;; modal, is more interesting (there's nothing they could do with a
+    ;; mouse-highlighted extent while in the midst of a search anyway).
+    (set-extent-priority x (1+ mouse-highlight-priority))
+    (set-extent-face x 'isearch)
+    (setq isearch-extent x)))
+
+(defun isearch-highlight (begin end)
+  (if (null isearch-highlight)
+      nil
+    ;; make sure isearch-extent is in the current buffer
+    (cond ((not (extentp isearch-extent))
+          (isearch-make-extent begin end))
+         ((not (eq (extent-object isearch-extent) (current-buffer)))
+          (delete-extent isearch-extent)
+          (isearch-make-extent begin end)))
+    (set-extent-endpoints isearch-extent begin end)))
+
+(defun isearch-dehighlight (totally)
+  (if (and isearch-highlight isearch-extent)
+      (if totally
+         (let ((inhibit-quit t))
+           (if (extentp isearch-extent)
+               (delete-extent isearch-extent))
+           (setq isearch-extent nil))
+       (if (extentp isearch-extent)
+           (detach-extent isearch-extent)
+         (setq isearch-extent nil)))))
+
+\f
+;;;========================================================
+;;; Searching
+
+(defun isearch-search ()
+  ;; Do the search with the current search string.
+  (isearch-message nil t)
+  (if (and isearch-case-fold-search search-caps-disable-folding)
+      (setq isearch-case-fold-search (isearch-no-upper-case-p isearch-string)))
+
+  (setq isearch-mode (if case-fold-search
+                         (if isearch-case-fold-search
+                             " Isearch"  ;As God Intended Mode
+                             " ISeARch") ;Warn about evil case via StuDLYcAps.
+                        "Isearch"
+;                       (if isearch-case-fold-search
+;                            " isearch"    ;Presumably case-sensitive losers
+;                                          ;will notice this 1-char difference.
+;                            " Isearch")   ;Weenie mode.
+                        ))
+  (condition-case lossage
+      (let ((inhibit-quit nil)
+           (case-fold-search isearch-case-fold-search))
+       (if isearch-regexp (setq isearch-invalid-regexp nil))
+       (setq isearch-success
+             (funcall
+              (cond (isearch-word
+                     (if isearch-forward
+                         'word-search-forward 'word-search-backward))
+                    (isearch-regexp
+                     (if isearch-forward
+                         're-search-forward 're-search-backward))
+                    (t
+                     (if isearch-forward 'search-forward 'search-backward)))
+              isearch-string nil t))
+       (setq isearch-just-started nil)
+       (if isearch-success
+           (setq isearch-other-end
+                 (if isearch-forward (match-beginning 0) (match-end 0)))))
+
+    (quit (setq unread-command-event (character-to-event (quit-char)))
+         (setq isearch-success nil))
+
+    (invalid-regexp 
+     (setq isearch-invalid-regexp (car (cdr lossage)))
+     (if (string-match
+         "\\`Premature \\|\\`Unmatched \\|\\`Invalid "
+         isearch-invalid-regexp)
+        (setq isearch-invalid-regexp (gettext "incomplete input")))))
+
+  (if isearch-success
+      nil
+
+    ;; If we're being run inside a keyboard macro, then the call to
+    ;; ding will signal an error (to terminate the macro).  We must
+    ;; turn off isearch-mode first, so that we aren't still in isearch
+    ;; mode after the macro exits.  Note that isearch-recursive-edit
+    ;; must not be true if a keyboard macro is executing.
+    (if (and executing-kbd-macro (not defining-kbd-macro))
+       (progn
+         (isearch-done)
+         (ding nil 'isearch-failed)))
+
+    ;; Ding if failed this time after succeeding last time.
+    (and (nth 3 (car isearch-cmds))
+        (ding nil 'isearch-failed))
+    (goto-char (nth 2 (car isearch-cmds)))))
+
+;;;=================================================
+;; This is called from incremental-search
+;; if the first input character is the exit character.
+
+;; We store the search string in `isearch-string'
+;; which has been bound already by `isearch-search'
+;; so that, when we exit, it is copied into `search-last-string'.
+
+;(defun nonincremental-search (forward regexp)
+;  ;; This may be broken.  Anyway, it is replaced by the isearch-edit-string.
+;  ;; Missing features: word search option, command history.
+;  (setq isearch-forward forward
+;      isearch-regexp regexp)
+;  (let (char function
+;      inhibit-quit
+;      (cursor-in-echo-area t))
+;    ;; Prompt assuming not word search,
+;    (setq isearch-message 
+;        (if isearch-regexp 
+;            (if isearch-forward "Regexp search: "
+;              "Regexp search backward: ")
+;          (if isearch-forward "Search: " "Search backward: ")))
+;    (message "%s" isearch-message)
+;    ;; Read 1 char and switch to word search if it is ^W.
+;    (setq char (read-char))
+;    (if (eq char search-yank-word-char)
+;      (setq isearch-message (if isearch-forward "Word search: " 
+;                              "Word search backward: "))
+;      ;; Otherwise let that 1 char be part of the search string.
+;      (setq unread-command-event (character-to-event char))
+;      )
+;    (setq function
+;        (if (eq char search-yank-word-char)
+;            (if isearch-forward 'word-search-forward 'word-search-backward)
+;          (if isearch-regexp
+;              (if isearch-forward 're-search-forward 're-search-backward)
+;            (if isearch-forward 'search-forward 'search-backward))))
+;    ;; Read the search string with corrected prompt.
+;    (setq isearch-string (read-string isearch-message isearch-string))
+;    ;; Empty means use default.
+;    (if (= 0 (length isearch-string))
+;      (setq isearch-string search-last-string)
+;      ;; Set last search string now so it is set even if we fail.
+;      (setq search-last-string isearch-string))
+;    ;; Since we used the minibuffer, we should be available for redo.
+;    (setq command-history 
+;        (cons (list function isearch-string) command-history))
+;    ;; Go ahead and search.
+;    (if search-caps-disable-folding
+;      (setq isearch-case-fold-search 
+;            (isearch-no-upper-case-p isearch-string)))
+;    (let ((case-fold-search isearch-case-fold-search))
+;      (funcall function isearch-string))))
+
+
+(defun isearch-no-upper-case-p (string)
+  "Return t if there are no upper case chars in string.
+But upper case chars preceded by \\ do not count since they
+have special meaning in a regexp."
+  ;; this incorrectly returns t for "\\\\A"
+  (let ((case-fold-search nil))
+    (not (string-match "\\(^\\|[^\\]\\)[A-Z]" string))))
+
+;; Used by etags.el and info.el
+(defmacro with-caps-disable-folding (string &rest body) "\
+Eval BODY with `case-fold-search' let to nil if STRING contains
+uppercase letters and `search-caps-disable-folding' is t."
+  `(let ((case-fold-search
+          (if (and case-fold-search search-caps-disable-folding)
+              (isearch-no-upper-case-p ,string)
+            case-fold-search)))
+     ,@body))
+(put 'with-caps-disable-folding 'lisp-indent-function 1)
+(put 'with-caps-disable-folding 'edebug-form-spec '(form body))
+
+;;; isearch-mode.el ends here
diff --git a/lisp/itimer-autosave.el b/lisp/itimer-autosave.el
new file mode 100644 (file)
index 0000000..eb68f37
--- /dev/null
@@ -0,0 +1,114 @@
+;;; itimer-autosave.el --- Autosave functions with itimers
+
+;; Copyright status unknown
+
+;; Maintainer: XEmacs Development Team
+;; Keywords: internal, dumped
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Not in FSF.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; itimer-driven auto-saves
+
+;;; Code:
+
+;jwz: this is preloaded so don't ;;;###autoload
+(defvar auto-save-timeout 960
+  "*Number of seconds idle time before auto-save.
+Zero or nil means disable auto-saving due to idleness.
+
+The actual amount of idle time between auto-saves is logarithmically related
+to the size of the current buffer.  This variable is the number of seconds
+after which an auto-save will happen when the current buffer is 50k or less;
+the timeout will be 2 1/4 times this in a 200k buffer, 3 3/4 times this in a
+1000k buffer, and 4 1/2 times this in a 2000k buffer.
+
+See also the variable `auto-save-interval', which controls auto-saving based
+on the number of characters typed.")
+
+;jwz: this is preloaded so don't ;;;###autoload
+(defvar auto-gc-threshold (/ gc-cons-threshold 3)
+  "*GC when this many bytes have been consed since the last GC, 
+and the user has been idle for `auto-save-timeout' seconds.")
+
+(defun auto-save-itimer ()
+  "For use as a itimer callback function.
+Auto-saves and garbage-collects based on the size of the current buffer
+and the value of `auto-save-timeout', `auto-gc-threshold', and the current
+keyboard idle-time."
+  (if (or (null auto-save-timeout)
+         (<= auto-save-timeout 0)
+         (eq (minibuffer-window) (selected-window)))
+      nil
+    (let ((buf-size (1+ (ash (buffer-size) -8)))
+         (delay-level 0)
+         (now (current-time))
+         delay)
+      (while (> buf-size 64)
+       (setq delay-level (1+ delay-level)
+             buf-size (- buf-size (ash buf-size -2))))
+      (if (< delay-level 4)
+         (setq delay-level 4))
+      ;; delay_level is 4 for files under around 50k, 7 at 100k, 9 at 200k,
+      ;; 11 at 300k, and 12 at 500k, 15 at 1 meg, and 17 at 2 meg.
+      (setq delay (/ (* delay-level auto-save-timeout) 4))
+      (let ((idle-time (if (or (not (consp last-input-time))
+                              (/= (car now) (car last-input-time)))
+                          (1+ delay)
+                        (- (car (cdr now)) (cdr last-input-time)))))
+       (and (> idle-time delay)
+            (do-auto-save))
+       (and (> idle-time auto-save-timeout)
+            (> (consing-since-gc) auto-gc-threshold)
+            (garbage-collect)))))
+  ;; Look at the itimer that's currently running; if the user has changed
+  ;; the value of auto-save-timeout, modify this itimer to have the correct
+  ;; restart time.  There will be some latency between when the user changes
+  ;; this variable and when it takes effect, but it will happen eventually.
+  (let ((self (get-itimer "auto-save")))
+    (or self (error "auto-save-itimer can't find itself"))
+    (if (and auto-save-timeout (> auto-save-timeout 4))
+       (or (= (itimer-restart self) (/ auto-save-timeout 4))
+           (set-itimer-restart self (/ auto-save-timeout 4)))))
+  nil)
+
+(defun itimer-init-auto-gc ()
+  (or noninteractive ; may be being run from after-init-hook in -batch mode.
+      (get-itimer "auto-save")
+      ;; the time here is just the first interval; if the user changes it
+      ;; later, it will adjust.
+      (let ((time (max 2 (/ (or auto-save-timeout 30) 4))))
+       (start-itimer "auto-save" 'auto-save-itimer time time))))
+
+(cond (purify-flag
+       ;; This file is being preloaded into an emacs about to be dumped.
+       ;; So arrange for the auto-save itimer to be started once emacs
+       ;; is launched.
+       (add-hook 'after-init-hook 'itimer-init-auto-gc))
+      (t
+       ;; Otherwise, this file is being loaded into a normal, interactive
+       ;; emacs.  Start the auto-save timer now.
+       (itimer-init-auto-gc)))
+
+
+;;; itimer-autosave.el ends here
diff --git a/lisp/itimer.el b/lisp/itimer.el
new file mode 100644 (file)
index 0000000..78610a9
--- /dev/null
@@ -0,0 +1,873 @@
+;;; Interval timers for GNU Emacs
+;;; Copyright (C) 1988, 1991, 1993, 1997, 1998 Kyle E. Jones
+;;;
+;;; 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 2, 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.
+;;;
+;;; A copy of the GNU General Public License can be obtained from this
+;;; program's author (send electronic mail to kyle@uunet.uu.net) or from
+;;; the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA
+;;; 02139, USA.
+;;;
+;;; Send bug reports to kyle_jones@wonderworks.com
+
+(provide 'itimer)
+
+;; `itimer' feature means Emacs-Lisp programmers get:
+;;    itimerp
+;;    itimer-live-p
+;;    itimer-value
+;;    itimer-restart
+;;    itimer-function
+;;    itimer-uses-arguments
+;;    itimer-function-arguments
+;;    set-itimer-value
+;;    set-itimer-restart
+;;    set-itimer-function
+;;    set-itimer-uses-arguments
+;;    set-itimer-function-arguments
+;;    get-itimer
+;;    start-itimer
+;;    read-itimer
+;;    delete-itimer
+;;    activate-itimer
+;;
+;; Interactive users get these commands:
+;;    edit-itimers
+;;    list-itimers
+;;    start-itimer
+;;
+;; See the doc strings of these functions for more information.
+\f
+(defvar itimer-version "1.07"
+  "Version number of the itimer package.")
+
+(defvar itimer-list nil
+  "List of all active itimers.")
+
+(defvar itimer-process nil
+  "Process that drives all itimers, if a subprocess is being used.")
+
+(defvar itimer-timer nil
+  "Emacs internal timer that drives the itimer system, if a subprocess
+is not being used to drive the system.")
+
+(defvar itimer-timer-last-wakeup nil
+  "The time the timer driver function last ran.")
+
+(defvar itimer-short-interval (if (featurep 'lisp-float-type) 1e-3 1)
+  "Interval used for scheduling an event a very short time in the future.
+Used internally to make the scheduler wake up early.
+Unit is seconds.")
+
+;; This value is maintained internally; it does not determine
+;; itimer granularity.  Itimer granularity is 1 second if your
+;; Emacs doesn't support floats or your system doesn't have a
+;; clock with microsecond granularity.  Otherwise granularity is
+;; to the microsecond, although you can't possibly get timers to be
+;; executed with this kind of accuracy in practice.  There will
+;; be delays due to system and Emacs internal activity that delay
+;; dealing with synchronous events and process output.
+(defvar itimer-next-wakeup itimer-short-interval
+  "Itimer process will wakeup to service running itimers within this
+many seconds.")
+
+(defvar itimer-edit-map nil
+  "Keymap used when in Itimer Edit mode.")
+
+(if itimer-edit-map
+    ()
+  (setq itimer-edit-map (make-sparse-keymap))
+  (define-key itimer-edit-map "s" 'itimer-edit-set-field)
+  (define-key itimer-edit-map "d" 'itimer-edit-delete-itimer)
+  (define-key itimer-edit-map "q" 'itimer-edit-quit)
+  (define-key itimer-edit-map "\t" 'itimer-edit-next-field)
+  (define-key itimer-edit-map " " 'next-line)
+  (define-key itimer-edit-map "n" 'next-line)
+  (define-key itimer-edit-map "p" 'previous-line)
+  (define-key itimer-edit-map "\C-?" 'itimer-edit-previous-field)
+  (define-key itimer-edit-map "x" 'start-itimer)
+  (define-key itimer-edit-map "?" 'itimer-edit-help))
+
+(defvar itimer-inside-driver nil)
+
+(defvar itimer-edit-start-marker nil)
+\f
+;; macros must come first... or byte-compile'd code will throw back its
+;; head and scream.
+
+(defmacro itimer-decrement (variable)
+  (list 'setq variable (list '1- variable)))
+
+(defmacro itimer-increment (variable)
+  (list 'setq variable (list '1+ variable)))
+
+(defmacro itimer-signum (n)
+  (list 'if (list '> n 0) 1
+    (list 'if (list 'zerop n) 0 -1)))
+
+;; Itimer access functions should behave as if they were subrs.  These
+;; macros are used to check the arguments to the itimer functions and
+;; signal errors appropriately if the arguments are not valid.
+
+(defmacro check-itimer (var)
+  "If VAR is not bound to an itimer, signal wrong-type-argument.
+This is a macro."
+  (list 'setq var
+       (list 'if (list 'itimerp var) var
+             (list 'signal ''wrong-type-argument
+                   (list 'list ''itimerp var)))))
+
+(defmacro check-itimer-coerce-string (var)
+  "If VAR is not bound to a string, look up the itimer that it names and
+bind VAR to it.  Otherwise, if VAR is not bound to an itimer, signal
+wrong-type-argument.  This is a macro."
+  (list 'setq var
+       (list 'cond
+             (list (list 'itimerp var) var)
+             (list (list 'stringp var) (list 'get-itimer var))
+             (list t (list 'signal ''wrong-type-argument
+                           (list 'list ''string-or-itimer-p var))))))
+
+(defmacro check-nonnegative-number (var)
+  "If VAR is not bound to a number, signal wrong-type-argument.
+If VAR is not bound to a positive number, signal args-out-of-range.
+This is a macro."
+  (list 'setq var
+       (list 'if (list 'not (list 'numberp var))
+             (list 'signal ''wrong-type-argument
+                   (list 'list ''natnump var))
+             (list 'if (list '< var 0)
+                   (list 'signal ''args-out-of-range (list 'list var))
+                   var))))
+
+(defmacro check-string (var)
+  "If VAR is not bound to a string, signal wrong-type-argument.
+This is a macro."
+  (list 'setq var
+       (list 'if (list 'stringp var) var
+             (list 'signal ''wrong-type-argument
+                   (list 'list ''stringp var)))))
+\f
+;; Functions to access and modify itimer attributes.
+
+(defun itimerp (obj)
+  "Return t if OBJ is an itimer."
+  (and (consp obj) (eq (length obj) 8)))
+
+(defun itimer-live-p (obj)
+  "Return non-nil if OBJ is an itimer and is active.
+``Active'' means Emacs will run it when it expires.
+`activate-timer' must be called on an itimer to make it active.
+Itimers started with `start-itimer' are automatically active."
+  (and (itimerp obj) (memq obj itimer-list)))
+
+(defun itimer-name (itimer)
+  "Return the name of ITIMER."
+  (check-itimer itimer)
+  (car itimer))
+
+(defun itimer-value (itimer)
+  "Return the number of seconds until ITIMER expires."
+  (check-itimer itimer)
+  (nth 1 itimer))
+
+(defun itimer-restart (itimer)
+  "Return the value to which ITIMER will be set at restart.
+Return nil if this itimer doesn't restart."
+  (check-itimer itimer)
+  (nth 2 itimer))
+
+(defun itimer-function (itimer)
+  "Return the function of ITIMER.
+This function is called each time ITIMER expires."
+  (check-itimer itimer)
+  (nth 3 itimer))
+
+(defun itimer-is-idle (itimer)
+  "Return non-nil if ITIMER is an idle timer.
+Normal timers expire after a set interval.  Idle timers expire
+only after Emacs has been idle for a specific interval.
+``Idle'' means no command events occur within the interval."
+  (check-itimer itimer)
+  (nth 4 itimer))
+
+(defun itimer-uses-arguments (itimer)
+  "Return non-nil if the function of ITIMER will be called with arguments.
+ITIMER's function is called with the arguments each time ITIMER expires.
+The arguments themselves are retrievable with `itimer-function-arguments'."
+  (check-itimer itimer)
+  (nth 5 itimer))
+
+(defun itimer-function-arguments (itimer)
+  "Return the function arguments of ITIMER as a list.
+ITIMER's function is called with these argument each time ITIMER expires."
+  (check-itimer itimer)
+  (nth 6 itimer))
+
+(defun itimer-recorded-run-time (itimer)
+  (check-itimer itimer)
+  (nth 7 itimer))
+
+(defun set-itimer-value (itimer value)
+  "Set the timeout value of ITIMER to be VALUE.
+Itimer will expire in this many seconds.
+If your version of Emacs supports floating point numbers then
+VALUE can be a floating point number.  Otherwise it
+must be an integer.
+Returns VALUE."
+  (check-itimer itimer)
+  (check-nonnegative-number value)
+  (let ((inhibit-quit t))
+    ;; If the itimer is in the active list, and under the new
+    ;; timeout value would expire before we would normally
+    ;; wakeup, wakeup now and recompute a new wakeup time.
+    (or (and (< value itimer-next-wakeup)
+            (and (itimer-name itimer) (get-itimer (itimer-name itimer)))
+            (progn (itimer-driver-wakeup)
+                   (setcar (cdr itimer) value)
+                   (itimer-driver-wakeup)
+                   t ))
+       (setcar (cdr itimer) value))
+    value))
+
+;; Same as set-itimer-value but does not wakeup the driver.
+;; Only should be used by the drivers when processing expired timers.
+(defun set-itimer-value-internal (itimer value)
+  (check-itimer itimer)
+  (check-nonnegative-number value)
+  (setcar (cdr itimer) value))
+
+(defun set-itimer-restart (itimer restart)
+  "Set the restart value of ITIMER to be RESTART.
+If RESTART is nil, ITIMER will not restart when it expires.
+If your version of Emacs supports floating point numbers then
+RESTART can be a floating point number.  Otherwise it
+must be an integer.
+Returns RESTART."
+  (check-itimer itimer)
+  (if restart (check-nonnegative-number restart))
+  (setcar (cdr (cdr itimer)) restart))
+
+(defun set-itimer-function (itimer function)
+  "Set the function of ITIMER to be FUNCTION.
+FUNCTION will be called when itimer expires.
+Returns FUNCTION."
+  (check-itimer itimer)
+  (setcar (nthcdr 3 itimer) function))
+
+(defun set-itimer-is-idle (itimer flag)
+  "Set flag that says whether ITIMER is an idle timer.
+If FLAG is non-nil, then ITIMER will be considered an idle timer.
+Returns FLAG."
+  (check-itimer itimer)
+  (setcar (nthcdr 4 itimer) flag))
+
+(defun set-itimer-uses-arguments (itimer flag)
+  "Set flag that says whether the function of ITIMER is called with arguments.
+If FLAG is non-nil, then the function will be called with one argument,
+otherwise the function will be called with no arguments.
+Returns FLAG."
+  (check-itimer itimer)
+  (setcar (nthcdr 5 itimer) flag))
+
+(defun set-itimer-function-arguments (itimer &optional arguments)
+  "Set the function arguments of ITIMER to be ARGUMENTS.
+The function of ITIMER will be called with ARGUMENTS when itimer expires.
+Returns ARGUMENTS."
+  (check-itimer itimer)
+  (setcar (nthcdr 6 itimer) arguments))
+
+(defun set-itimer-recorded-run-time (itimer time)
+  (check-itimer itimer)
+  (setcar (nthcdr 7 itimer) time))
+
+(defun get-itimer (name)
+  "Return itimer named NAME, or nil if there is none."
+  (check-string name)
+  (assoc name itimer-list))
+
+(defun read-itimer (prompt &optional initial-input)
+  "Read the name of an itimer from the minibuffer and return the itimer
+associated with that name.  The user is prompted with PROMPT.
+Optional second arg INITIAL-INPUT non-nil is inserted into the
+minibuffer as initial user input."
+  (get-itimer (completing-read prompt itimer-list nil 'confirm initial-input)))
+
+(defun delete-itimer (itimer)
+  "Delete ITIMER.  ITIMER may be an itimer or the name of one."
+  (check-itimer-coerce-string itimer)
+  (setq itimer-list (delq itimer itimer-list)))
+
+(defun start-itimer (name function value &optional restart
+                    is-idle with-args &rest function-arguments)
+  "Start an itimer.
+Arguments are
+  NAME, FUNCTION, VALUE &optional RESTART, IS-IDLE, WITH-ARGS, &rest FUNCTION-ARGUMENTS.
+NAME is an identifier for the itimer.  It must be a string.  If an itimer
+  already exists with this name, NAME will be modified slightly to make
+  it unique.
+FUNCTION should be a function (or symbol naming one).  It
+  will be called each time the itimer expires with arguments of
+  FUNCTION-ARGUMENTS.  The function can access the itimer that
+  invoked it through the variable `current-itimer'.  If WITH-ARGS
+  is nil then FUNCTION is called with no arguments.  This is for
+  backward compatibility with older versions of the itimer
+  package which always called FUNCTION with no arguments.
+VALUE is the number of seconds until this itimer expires.
+  If your version of Emacs supports floating point numbers then
+  VALUE can be a floating point number.  Otherwise it
+  must be an integer.
+Optional fourth arg RESTART non-nil means that this itimer should be
+  restarted automatically after its function is called.  Normally an itimer
+  is deleted at expiration after its function has returned.
+  If non-nil, RESTART should be a number indicating the value at which
+  the itimer should be set at restart time.
+Optional fifth arg IS-IDLE specifies if this is an idle timer.
+  Normal timers expire after a set interval.  Idle timers expire
+  only after Emacs has been idle for specific interval.
+  ``Idle'' means no command events occur within the interval.
+Returns the newly created itimer."
+  (interactive
+   (list (completing-read "Start itimer: " itimer-list)
+        (read (completing-read "Itimer function: " obarray 'fboundp))
+        (let (value)
+          (while (or (not (numberp value)) (< value 0))
+            (setq value (read-from-minibuffer "Itimer value: " nil nil t)))
+          value)
+        (let ((restart t))
+          (while (and restart (or (not (numberp restart)) (< restart 0)))
+            (setq restart (read-from-minibuffer "Itimer restart: "
+                                                nil nil t)))
+          restart)
+        ;; hard to imagine the user specifying these interactively
+        nil
+        nil ))
+  (check-string name)
+  (check-nonnegative-number value)
+  (if restart (check-nonnegative-number restart))
+  ;; Make proposed itimer name unique if it's not already.
+  (let ((oname name)
+       (num 2))
+    (while (get-itimer name)
+      (setq name (format "%s<%d>" oname num))
+      (itimer-increment num)))
+  (activate-itimer (list name value restart function is-idle
+                        with-args function-arguments (list 0 0 0)))
+  (car itimer-list))
+
+(defun make-itimer ()
+  "Create an unactivated itimer.
+The itimer will not begin running until activated with `activate-itimer'.
+Set the itimer's expire interval with `set-itimer-value'.
+Set the itimer's function interval with `set-itimer-function'.
+Once this is done, the timer can be activated."
+  (list nil 0 nil 'ignore nil nil nil (list 0 0 0)))
+
+(defun activate-itimer (itimer)
+  "Activate ITIMER, which was previously created with `make-itimer'.
+ITIMER will be added to the global list of running itimers,
+its FUNCTION will be called when it expires, and so on."
+  (check-itimer itimer)
+  (if (memq itimer itimer-list)
+      (error "itimer already activated"))
+  (if (not (numberp (itimer-value itimer)))
+      (error "itimer timeout value not a number: %s" (itimer-value itimer)))
+  (if (<= (itimer-value itimer) 0)
+      (error "itimer timeout value not positive: %s" (itimer-value itimer)))
+  ;; If there's no itimer driver/process, start one now.
+  ;; Otherwise wake up the itimer driver so that seconds slept before
+  ;; the new itimer is created won't be counted against it.
+  (if (or itimer-process itimer-timer)
+      (itimer-driver-wakeup)
+    (itimer-driver-start))
+  ;; Roll a unique name for the timer if it doesn't have a name
+  ;; already.
+  (if (not (stringp (car itimer)))
+      (let ((name "itimer-0")
+           (oname "itimer-")
+           (num 1))
+       (while (get-itimer name)
+         (setq name (format "%s<%d>" oname num))
+         (itimer-increment num))
+       (setcar itimer name))
+    ;; signal an error if the timer's name matches an already
+    ;; activated timer.
+    (if (get-itimer (itimer-name itimer))
+       (error "itimer named \"%s\" already existing and activated"
+              (itimer-name itimer))))
+  (let ((inhibit-quit t))
+    ;; add the itimer to the global list
+    (setq itimer-list (cons itimer itimer-list))
+    ;; If the itimer process is scheduled to wake up too late for
+    ;; the itimer we wake it up to calculate a correct wakeup
+    ;; value giving consideration to the newly added itimer.
+    (if (< (itimer-value itimer) itimer-next-wakeup)
+       (itimer-driver-wakeup))))
+\f
+;; User level functions to list and modify existing itimers.
+;; Itimer Edit major mode, and the editing commands thereof.
+
+(defun list-itimers ()
+  "Pop up a buffer containing a list of all itimers.
+The major mode of the buffer is Itimer Edit mode.  This major mode provides
+commands to manipulate itimers; see the documentation for
+`itimer-edit-mode' for more information."
+  (interactive)
+  (let* ((buf (get-buffer-create "*Itimer List*"))
+        (opoint (point))
+        (standard-output buf)
+        (itimers (reverse itimer-list)))
+    (set-buffer buf)
+    (itimer-edit-mode)
+    (setq buffer-read-only nil)
+    (erase-buffer)
+    (insert
+"Name                  Value   Restart   Function            Idle   Arguments"
+"\n"
+"----                  -----   -------   --------            ----   --------")
+    (if (null itimer-edit-start-marker)
+       (setq itimer-edit-start-marker (point)))
+    (while itimers
+      (newline 1)
+      (prin1 (itimer-name (car itimers)))
+      (tab-to-tab-stop)
+      (insert (itimer-truncate-string
+              (format "%5.5s" (itimer-value (car itimers))) 5))
+      (tab-to-tab-stop)
+      (insert (itimer-truncate-string
+              (format "%5.5s" (itimer-restart (car itimers))) 5))
+      (tab-to-tab-stop)
+      (insert (itimer-truncate-string
+              (format "%.19s" (itimer-function (car itimers))) 19))
+      (tab-to-tab-stop)
+      (if (itimer-is-idle (car itimers))
+         (insert "yes")
+       (insert "no"))
+      (tab-to-tab-stop)
+      (if (itimer-uses-arguments (car itimers))
+         (prin1 (itimer-function-arguments (car itimers)))
+       (prin1 'NONE))
+      (setq itimers (cdr itimers)))
+    ;; restore point
+    (goto-char opoint)
+    (if (< (point) itimer-edit-start-marker)
+       (goto-char itimer-edit-start-marker))
+    (setq buffer-read-only t)
+    (display-buffer buf)))
+
+(defun edit-itimers ()
+  "Display a list of all itimers and select it for editing.
+The major mode of the buffer containing the listing is Itimer Edit mode.
+This major mode provides commands to manipulate itimers; see the documentation
+for `itimer-edit-mode' for more information."
+  (interactive)
+  ;; since user is editing, make sure displayed data is reasonably up-to-date
+  (if (or itimer-process itimer-timer)
+      (itimer-driver-wakeup))
+  (list-itimers)
+  (select-window (get-buffer-window "*Itimer List*"))
+  (goto-char itimer-edit-start-marker)
+  (if itimer-list
+      (progn
+       (forward-sexp 2)
+       (backward-sexp)))
+  (message "type q to quit, ? for help"))
+
+;; no point in making this interactive.
+(defun itimer-edit-mode ()
+  "Major mode for manipulating itimers.
+Attributes of running itimers are changed by moving the cursor to the
+desired field and typing `s' to set that field.  The field will then be
+set to the value read from the minibuffer.
+
+Commands:
+TAB    move forward a field
+DEL    move backward a field
+s      set a field
+d      delete the selected itimer
+x      start a new itimer
+?      help"
+  (kill-all-local-variables)
+  (make-local-variable 'tab-stop-list)
+  (setq major-mode 'itimer-edit-mode
+       mode-name "Itimer Edit"
+       truncate-lines t
+       tab-stop-list '(22 32 40 60 67))
+  (abbrev-mode 0)
+  (auto-fill-mode 0)
+  (buffer-flush-undo (current-buffer))
+  (use-local-map itimer-edit-map)
+  (set-syntax-table emacs-lisp-mode-syntax-table))
+
+(put 'itimer-edit-mode 'mode-class 'special)
+
+(defun itimer-edit-help ()
+  "Help function for Itimer Edit."
+  (interactive)
+  (if (eq last-command 'itimer-edit-help)
+      (describe-mode)
+    (message "TAB, DEL select fields, (s)et field, (d)elete itimer   (type ? for more help)")))
+
+(defun itimer-edit-quit ()
+  "End Itimer Edit."
+  (interactive)
+  (bury-buffer (current-buffer))
+  (if (one-window-p t)
+      (switch-to-buffer (other-buffer (current-buffer)))
+    (delete-window)))
+
+(defun itimer-edit-set-field ()
+  (interactive)
+  ;; First two lines in list buffer are headers.
+  ;; Cry out against the luser who attempts to change a field there.
+  (if (<= (point) itimer-edit-start-marker)
+      (error ""))
+  ;; field-value must be initialized to be something other than a
+  ;; number, symbol, or list.
+  (let (itimer field (field-value ""))
+    (setq itimer (save-excursion
+                 ;; read the name of the itimer from the beginning of
+                 ;; the current line.
+                 (beginning-of-line)
+                 (get-itimer (read (current-buffer))))
+         field (save-excursion
+                 (itimer-edit-beginning-of-field)
+                 (let ((opoint (point))
+                       (n 0))
+                   ;; count the number of sexprs until we reach the cursor
+                   ;; and use this info to determine which field the user
+                   ;; wants to modify.
+                   (beginning-of-line)
+                   (while (and (>= opoint (point)) (< n 6))
+                     (forward-sexp 2)
+                     (backward-sexp)
+                     (itimer-increment n))
+                   (cond ((eq n 1) (error "Cannot change itimer name."))
+                         ((eq n 2) 'value)
+                         ((eq n 3) 'restart)
+                         ((eq n 4) 'function)
+                         ((eq n 5) 'is-idle)
+                         (t 'function-argument)))))
+    (cond ((eq field 'value)
+          (let ((prompt "Set itimer value: "))
+            (while (not (natnump field-value))
+              (setq field-value (read-from-minibuffer prompt nil nil t)))))
+         ((eq field 'restart)
+          (let ((prompt "Set itimer restart: "))
+            (while (and field-value (not (natnump field-value)))
+              (setq field-value (read-from-minibuffer prompt nil nil t)))))
+         ((eq field 'function)
+          (let ((prompt "Set itimer function: "))
+            (while (not (or (and (symbolp field-value) (fboundp field-value))
+                            (and (consp field-value)
+                                 (memq (car field-value) '(lambda macro)))))
+              (setq field-value
+                    (read (completing-read prompt obarray 'fboundp nil))))))
+         ((eq field 'is-idle)
+          (setq field-value (not (itimer-is-idle itimer))))
+         ((eq field 'function-argument)
+          (let ((prompt "Set itimer function argument: "))
+            (setq field-value (read-expression prompt))
+            (cond ((not (listp field-value))
+                   (setq field-value (list field-value))))
+            (if (null field-value)
+                (set-itimer-uses-arguments itimer nil)
+              (set-itimer-uses-arguments itimer t)))))
+    ;; set the itimer field
+    (funcall (intern (concat "set-itimer-" (symbol-name field)))
+            itimer field-value)
+    ;; move to beginning of field to be changed
+    (itimer-edit-beginning-of-field)
+    ;; modify the list buffer to reflect the change.
+    (let (buffer-read-only kill-ring)
+      (kill-sexp 1)
+      (kill-region (point) (progn (skip-chars-forward " \t") (point)))
+      (prin1 field-value (current-buffer))
+      (if (not (eolp))
+         (tab-to-tab-stop))
+      (backward-sexp))))
+
+(defun itimer-edit-delete-itimer ()
+  (interactive)
+  ;; First two lines in list buffer are headers.
+  ;; Cry out against the luser who attempts to change a field there.
+  (if (<= (point) itimer-edit-start-marker)
+      (error ""))
+  (delete-itimer
+   (read-itimer "Delete itimer: "
+              (save-excursion (beginning-of-line) (read (current-buffer)))))
+  ;; update list information
+  (list-itimers))
+
+(defun itimer-edit-next-field (count)
+  (interactive "p")
+  (itimer-edit-beginning-of-field)
+  (cond ((> (itimer-signum count) 0)
+        (while (not (zerop count))
+          (forward-sexp)
+          ;; wrap from eob to itimer-edit-start-marker
+          (if (eobp)
+              (progn
+                (goto-char itimer-edit-start-marker)
+                (forward-sexp)))
+          (forward-sexp)
+          (backward-sexp)
+          ;; treat fields at beginning of line as if they weren't there.
+          (if (bolp)
+              (progn
+                (forward-sexp 2)
+                (backward-sexp)))
+          (itimer-decrement count)))
+       ((< (itimer-signum count) 0)
+        (while (not (zerop count))
+          (backward-sexp)
+          ;; treat fields at beginning of line as if they weren't there.
+          (if (bolp)
+              (backward-sexp))
+          ;; wrap from itimer-edit-start-marker to field at eob.
+          (if (<= (point) itimer-edit-start-marker)
+              (progn
+                (goto-char (point-max))
+                (backward-sexp)))
+          (itimer-increment count)))))
+
+(defun itimer-edit-previous-field (count)
+  (interactive "p")
+  (itimer-edit-next-field (- count)))
+
+(defun itimer-edit-beginning-of-field ()
+  (let ((forw-back (save-excursion (forward-sexp) (backward-sexp) (point)))
+       (back (save-excursion (backward-sexp) (point))))
+    (cond ((eq forw-back back) (backward-sexp))
+         ((eq forw-back (point)) t)
+         (t (backward-sexp)))))
+
+(defun itimer-truncate-string (str len)
+  (if (<= (length str) len)
+      str
+    (substring str 0 len)))
+\f
+;; internals of the itimer implementation.
+
+(defun itimer-run-expired-timers (time-elapsed)
+  (let ((itimers (copy-sequence itimer-list))
+       (itimer)
+       (next-wakeup 600)
+       (idle-time)
+       (last-event-time)
+       (recorded-run-time)
+       ;; process filters can be hit by stray C-g's from the user,
+       ;; so we must protect this stuff appropriately.
+       ;; Quit's are allowed from within itimer functions, but we
+       ;; catch them and print a message.
+       (inhibit-quit t))
+    (setq next-wakeup 600)
+    (cond ((and (boundp 'last-command-event-time)
+               (consp 'last-command-event-time))
+          (setq last-event-time last-command-event-time
+                idle-time (itimer-time-difference (current-time)
+                                                  last-event-time)))
+         ((and (boundp 'last-input-time) (consp last-input-time))
+          (setq last-event-time (list (car last-input-time)
+                                      (cdr last-input-time)
+                                      0)
+                idle-time (itimer-time-difference (current-time)
+                                                  last-event-time)))
+         ;; no way to do this under FSF Emacs yet.
+         (t (setq last-event-time '(0 0 0)
+                  idle-time 0)))
+    (while itimers
+      (setq itimer (car itimers))
+      (if (itimer-is-idle itimer)
+         (setq recorded-run-time (itimer-recorded-run-time itimer))
+       (set-itimer-value-internal itimer (max 0 (- (itimer-value itimer)
+                                                   time-elapsed))))
+      (if (if (itimer-is-idle itimer)
+             (or (> (itimer-time-difference recorded-run-time
+                                            last-event-time)
+                    0)
+                 (< idle-time (itimer-value itimer)))
+           (> (itimer-value itimer) 0))
+         (setq next-wakeup
+               (if (itimer-is-idle itimer)
+                   (if (< idle-time (itimer-value itimer))
+                       (min next-wakeup (- (itimer-value itimer) idle-time))
+                     (min next-wakeup (itimer-value itimer)))
+                 (min next-wakeup (itimer-value itimer))))
+       (and (itimer-is-idle itimer)
+            (set-itimer-recorded-run-time itimer (current-time)))
+       ;; itimer has expired, we must call its function.
+       ;; protect our local vars from the itimer function.
+       ;; allow keyboard quit to occur, but catch and report it.
+       ;; provide the variable `current-itimer' in case the function
+       ;; is interested.
+       (unwind-protect
+           (condition-case condition-data
+               (save-match-data
+                 (let* ((current-itimer itimer)
+                        (quit-flag nil)
+                        (inhibit-quit nil)
+                        ;; for FSF Emacs timer.el emulation under XEmacs.
+                        ;; eldoc expect this to be done, apparently.
+                        (this-command nil)
+                        itimer itimers time-elapsed)
+                   (if (itimer-uses-arguments current-itimer)
+                       (apply (itimer-function current-itimer)
+                              (itimer-function-arguments current-itimer))
+                     (funcall (itimer-function current-itimer)))))
+             (error (message "itimer \"%s\" signaled: %s" (itimer-name itimer)
+                             (prin1-to-string condition-data)))
+             (quit (message "itimer \"%s\" quit" (itimer-name itimer))))
+         ;; restart the itimer if we should, otherwise delete it.
+         (if (null (itimer-restart itimer))
+             (delete-itimer itimer)
+           (set-itimer-value-internal itimer (itimer-restart itimer))
+           (setq next-wakeup (min next-wakeup (itimer-value itimer))))))
+      (setq itimers (cdr itimers)))
+    ;; make another sweep through the list to catch any timers
+    ;; that might have been added by timer functions above.
+    (setq itimers itimer-list)
+    (while itimers
+      (setq next-wakeup (min next-wakeup (itimer-value (car itimers)))
+           itimers (cdr itimers)))
+    ;; if user is viewing the timer list, update displayed info.
+    (let ((b (get-buffer "*Itimer List*")))
+      (if (and b (get-buffer-window b))
+         (save-excursion
+           (list-itimers))))
+    next-wakeup ))
+
+(defun itimer-process-filter (process string)
+  ;; If the itimer process dies and generates output while doing
+  ;; so, we may be called before the process-sentinel.  Sanity
+  ;; check the output just in case...
+  (if (not (string-match "^[0-9]" string))
+      (progn (message "itimer process gave odd output: %s" string)
+            ;; it may be still alive and waiting for input
+            (process-send-string itimer-process "3\n"))
+    ;; if there are no active itimers, return quickly.
+    (if itimer-list
+       (let ((wakeup nil))
+         (unwind-protect
+             (setq wakeup (itimer-run-expired-timers (string-to-int string)))
+           (and (null wakeup) (process-send-string process "1\n")))
+         (setq itimer-next-wakeup wakeup))
+      (setq itimer-next-wakeup 600))
+    ;; tell itimer-process when to wakeup again
+    (process-send-string itimer-process
+                        (concat (int-to-string itimer-next-wakeup)
+                                "\n"))))
+
+(defun itimer-process-sentinel (process message)
+  (let ((inhibit-quit t))
+    (if (eq (process-status process) 'stop)
+       (continue-process process)
+      ;; not stopped, so it must have died.
+      ;; cleanup first...
+      (delete-process process)
+      (setq itimer-process nil)
+      ;; now, if there are any active itimers then we need to immediately
+      ;; start another itimer process, otherwise we can wait until the next
+      ;; start-itimer call, which will start one automatically.
+      (if (null itimer-list)
+         ()
+       ;; there may have been an error message in the echo area;
+       ;; give the user at least a little time to read it.
+       (sit-for 2)
+       (message "itimer process %s... respawning." (substring message 0 -1))
+       (itimer-process-start)))))
+
+(defun itimer-process-start ()
+  (let ((inhibit-quit t)
+       (process-connection-type nil))
+    (setq itimer-process (start-process "itimer" nil "itimer"))
+    (process-kill-without-query itimer-process)
+    (set-process-filter itimer-process 'itimer-process-filter)
+    (set-process-sentinel itimer-process 'itimer-process-sentinel)
+    ;; Tell itimer process to wake up quickly, so that a correct
+    ;; wakeup time can be computed.  Zero loses because of
+    ;; underlying itimer implementations that use 0 to mean
+    ;; `disable the itimer'.
+    (setq itimer-next-wakeup itimer-short-interval)
+    (process-send-string itimer-process
+                        (format "%s\n" itimer-next-wakeup))))
+
+(defun itimer-process-wakeup ()
+  (interrupt-process itimer-process)
+  (accept-process-output))
+
+(defun itimer-timer-start ()
+  (let ((inhibit-quit t))
+    (setq itimer-next-wakeup itimer-short-interval
+         itimer-timer-last-wakeup (current-time)
+         itimer-timer (add-timeout itimer-short-interval
+                                   'itimer-timer-driver nil nil))))
+
+(defun itimer-disable-timeout (timeout)
+  ;; Disgusting hack, but necessary because there is no other way
+  ;; to remove a timer that has a restart value from while that
+  ;; timer's function is being run.  (FSF Emacs only.)
+  (if (vectorp timeout)
+      (aset timeout 4 nil))
+  (disable-timeout timeout))
+
+(defun itimer-timer-wakeup ()
+  (let ((inhibit-quit t))
+    (itimer-disable-timeout itimer-timer)
+    (setq itimer-timer (add-timeout itimer-short-interval
+                                   'itimer-timer-driver nil 5))))
+
+(defun itimer-time-difference (t1 t2)
+  (let (usecs secs 65536-secs carry)
+    (setq usecs (- (nth 2 t1) (nth 2 t2)))
+    (if (< usecs 0)
+       (setq carry 1
+             usecs (+ usecs 1000000))
+      (setq carry 0))
+    (setq secs (- (nth 1 t1) (nth 1 t2) carry))
+    (if (< secs 0)
+        (setq carry 1
+              secs (+ secs 65536))
+      (setq carry 0))
+    (setq 65536-secs (- (nth 0 t1) (nth 0 t2) carry))
+    ;; loses for interval larger than the maximum signed Lisp integer.
+    ;; can't really be helped.
+    (+ (* 65536-secs 65536)
+       secs
+       (/ usecs (if (featurep 'lisp-float-type) 1e6 1000000)))))
+
+(defun itimer-timer-driver (&rest ignored)
+  ;; inhibit quit because if the user quits at an inopportune
+  ;; time, the timer process won't be launched again and the
+  ;; system stops working.  itimer-run-expired-timers allows
+  ;; individual timer function to be aborted, so the user can
+  ;; escape a feral timer function.
+  (if (not itimer-inside-driver)
+      (let* ((inhibit-quit t)
+            (itimer-inside-driver t)
+            (now (current-time))
+            (elapsed (itimer-time-difference now itimer-timer-last-wakeup))
+            (sleep nil))
+       (setq itimer-timer-last-wakeup now
+             sleep (itimer-run-expired-timers elapsed))
+       (itimer-disable-timeout itimer-timer)
+       (setq itimer-next-wakeup sleep
+             itimer-timer (add-timeout sleep 'itimer-timer-driver nil 5)))))
+
+(defun itimer-driver-start ()
+  (if (fboundp 'add-timeout)
+      (itimer-timer-start)
+    (itimer-process-start)))
+
+(defun itimer-driver-wakeup ()
+  (if (fboundp 'add-timeout)
+      (itimer-timer-wakeup)
+    (itimer-process-wakeup)))
diff --git a/lisp/keydefs.el b/lisp/keydefs.el
new file mode 100644 (file)
index 0000000..63b6c2d
--- /dev/null
@@ -0,0 +1,637 @@
+;;; keydefs.el --- Define standard keybindings.
+
+;; Copyright (C) 1992-4, 1997 Free Software Foundation, Inc.
+
+;; Maintainer: XEmacs Development Team
+;; Keywords: internal, dumped
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;; All the global bindings should be here so that one can reload things
+;; like files.el without trashing one's personal bindings.
+
+;;; Synched up with: Not synched with FSF.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs
+
+;;; Code:
+
+(defgroup keyboard nil
+  "Input from the keyboard."
+  :group 'environment)
+
+
+;; created by C code
+(defvar global-map (current-global-map) "\
+Default global keymap mapping XEmacs keyboard input into commands.
+The value is a keymap which is usually (but not necessarily) XEmacs's
+global map.")
+
+;; created by C code
+(defvar esc-map (symbol-function 'ESC-prefix) "\
+Default keymap for ESC (meta) commands.
+The normal global definition of the character ESC indirects to this keymap.")
+
+(set-keymap-name global-map 'global-map)
+(set-keymap-name esc-map 'ESC-prefix)
+
+(define-prefix-command 'Control-X-prefix t)
+(defvar ctl-x-map (symbol-function 'Control-X-prefix) "\
+Default keymap for C-x commands.
+The normal global definition of the character C-x indirects to this keymap.")
+(define-key global-map "\C-x" 'Control-X-prefix)
+
+(define-prefix-command 'ctl-x-4-prefix t)
+(defvar ctl-x-4-map (symbol-function 'ctl-x-4-prefix) "\
+Keymap for subcommands of C-x 4")
+(define-key global-map "\C-x4" 'ctl-x-4-prefix)
+
+(define-prefix-command 'ctl-x-5-prefix t)
+(defvar ctl-x-5-map (symbol-function 'ctl-x-5-prefix) "\
+Keymap for subcommands of C-x 5")
+(define-key global-map "\C-x5" 'ctl-x-5-prefix)
+
+(define-prefix-command 'mode-specific-command-prefix t)
+(defvar mode-specific-map (symbol-function 'mode-specific-command-prefix) "\
+Keymap for characters following C-c.")
+(define-key global-map "\C-c" 'mode-specific-command-prefix)
+
+;; FSFmacs buffer.c
+
+(define-key global-map "\C-xb" 'switch-to-buffer)
+(define-key global-map "\C-xk" 'kill-buffer)
+(define-key global-map "\C-x\C-b" 'list-buffers)
+(put 'erase-buffer 'disabled t)         ;from buffer.c
+
+;; FSFmacs casefiddle.c
+
+(define-key global-map "\C-x\C-u" 'upcase-region)
+;; This is silly with zmacs regions
+;(put 'upcase-region 'disabled t)
+(define-key global-map "\C-x\C-l" 'downcase-region)
+;; This is silly with zmacs regions
+;(put 'downcase-region 'disabled t)
+(define-key global-map "\M-u" 'upcase-region-or-word)
+(define-key global-map "\M-l" 'downcase-region-or-word)
+(define-key global-map "\M-c" 'capitalize-region-or-word)
+
+;; FSFmacs cmds.c
+
+(let ((n 33))
+  (while (<= n 255)
+    (if (not (= n 127))
+        (define-key global-map n 'self-insert-command))
+    (setq n (1+ n))))
+(define-key global-map " " 'self-insert-command)
+
+(define-key global-map "\C-a" 'beginning-of-line)
+(define-key global-map "\C-b" 'backward-char-command)
+(define-key global-map "\C-e" 'end-of-line)
+(define-key global-map "\C-f" 'forward-char-command)
+(define-key global-map "\C-d" 'delete-char)
+(define-key global-map 'delete 'backward-or-forward-delete-char)
+(define-key global-map '(meta delete) 'backward-or-forward-kill-word)
+(define-key global-map [(control x) (delete)] 'backward-or-forward-kill-sentence)
+
+;; FSFmacs files.el
+
+(define-key global-map "\C-x\C-f" 'find-file)
+(define-key global-map "\C-x\C-q" 'toggle-read-only)
+(define-key global-map "\C-x\C-r" 'find-file-read-only)
+(define-key global-map "\C-x\C-v" 'find-alternate-file)
+(define-key global-map "\C-x\C-s" 'save-buffer)
+(define-key global-map "\C-xs" 'save-some-buffers)
+(define-key global-map "\C-x\C-w" 'write-file)
+(define-key global-map "\C-xi" 'insert-file)
+(define-key global-map "\M-~" 'not-modified)
+(define-key global-map "\C-x\C-d" 'list-directory)
+(define-key global-map "\C-x\C-c" 'save-buffers-kill-emacs)
+
+(define-key global-map "\C-x4f" 'find-file-other-window)
+(define-key global-map "\C-x4r" 'find-file-read-only-other-window)
+(define-key global-map "\C-x4\C-f" 'find-file-other-window)
+(define-key global-map "\C-x4b" 'switch-to-buffer-other-window)
+(define-key global-map "\C-x4\C-o" 'display-buffer)
+
+(define-key global-map "\C-x5b" 'switch-to-buffer-other-frame)
+(define-key global-map "\C-x5f" 'find-file-other-frame)
+(define-key global-map "\C-x5\C-f" 'find-file-other-frame)
+(define-key global-map "\C-x5r" 'find-file-read-only-other-frame)
+
+;; FSFmacs frame.c
+;FSFmacs has these.  It's probably a good idea to provide ways of hooking
+;these events, but it's unlikely that it's a good idea to do it this way.
+;Just provide a hook, like the existing `select-frame-hook',
+;`deselect-frame-hook', `map-frame-hook', and `unmap-frame-hook'.
+;#### ergo need hooks for delete-frame and iconify-frame
+;(define-key global-map 'switch-frame 'handle-switch-frame)
+;(define-key global-map 'delete-frame 'handle-delete-frame)
+;(define-key global-map 'iconify-frame 'ignore-event)
+;(define-key global-map 'make-frame-visible 'ignore-event)
+
+;; FSFmacs frame.el
+
+;; New FSF19 bindings: C-x 5 as prefix for window commands
+(define-key global-map "\C-x52" 'make-frame)
+(define-key global-map "\C-x50" 'delete-frame)
+(define-key global-map "\C-x5o" 'other-frame)
+
+;; FSFmacs help.el
+
+(define-key global-map (vector help-char) 'help-command)
+(define-key global-map 'help 'help-command)
+(define-key global-map 'f1 'help-command)
+
+;; FSFmacs indent.el
+
+;;(define-key global-map "\t" 'self-insert-command)
+(define-key global-map "\t" 'indent-for-tab-command)
+(define-key global-map "\M-\C-\\" 'indent-region)
+(define-key global-map "\C-x\t" 'indent-rigidly)
+(define-key global-map "\M-i" 'tab-to-tab-stop)
+;; XEmacs addition:
+(define-key global-map [(shift tab)] 'tab-to-tab-stop)
+
+;; FSFmacs isearch.el
+
+(define-key global-map "\C-s" 'isearch-forward)
+(define-key global-map "\C-r" 'isearch-backward)
+(define-key global-map "\M-\C-s" 'isearch-forward-regexp)
+(define-key global-map "\M-\C-r" 'isearch-backward-regexp)
+
+;; FSFmacs keyboard.c
+
+(define-key global-map "\C-z" 'suspend-emacs-or-iconify-frame)
+(define-key global-map "\C-x\C-z" 'suspend-or-iconify-emacs)
+
+;; FSFmacs loaddefs.el
+
+;; New FSF19 bindings: C-x n as a prefix for narrowing commands.
+(define-key global-map "\C-xn" (let ((map (make-sparse-keymap)))
+                                 (set-keymap-name map 'narrowing-prefix)
+                                 map))
+(put 'narrow-to-region 'disabled t)
+(define-key global-map "\C-xnn" 'narrow-to-region)
+(define-key global-map "\C-xnw" 'widen)
+(define-key global-map "\C-xnd" 'narrow-to-defun)
+;; Old v18 bindings
+;(define-key global-map "\C-xn" 'narrow-to-region)
+;(define-key global-map "\C-xw" 'widen)
+
+(define-key global-map "\C-j" 'newline-and-indent)
+(define-key global-map "\C-m" 'newline)
+(define-key global-map "\C-o" 'open-line)
+(define-key global-map "\M-\C-o" 'split-line)
+(define-key global-map "\C-q" 'quoted-insert)
+(define-key global-map "\M-^" 'delete-indentation)
+(define-key global-map "\M-\\" 'delete-horizontal-space)
+(define-key global-map "\M-m" 'back-to-indentation)
+(define-key global-map "\C-x\C-o" 'delete-blank-lines)
+(define-key global-map "\M- " 'just-one-space)
+(define-key global-map "\M-z" 'zap-to-char)
+(define-key global-map "\M-=" 'count-lines-region)
+(define-key global-map "\C-x=" 'what-cursor-position)
+(define-key global-map "\M-:" 'eval-expression)
+;; Define ESC ESC : like ESC : for people who type ESC ESC out of habit.
+(define-key global-map "\M-\e:" 'eval-expression)
+;(define-key global-map "\M-\e" 'eval-expression)
+;; Do we really need to disable this now that it is harder to type
+;; by accident?
+;; (put 'eval-expression 'disabled t)
+;; Changed from C-x ESC so that function keys work following C-x.
+(define-key global-map "\C-x\e\e" 'repeat-complex-command)
+;(define-key global-map "\C-x\e" 'repeat-complex-command)
+;; From Emacs 20.
+(define-key global-map "\C-x\M-:" 'repeat-complex-command)
+(define-key global-map "\C-xu" 'advertised-undo)
+;; Many people are used to typing C-/ on X terminals and getting C-_.
+(define-key global-map '(control /) 'undo)
+(define-key global-map "\C-_" 'undo)
+(define-key global-map "\M-!" 'shell-command)
+(define-key global-map "\M-|" 'shell-command-on-region)
+
+(define-key global-map "\C-u" 'universal-argument)
+;; Make Control-0 - Control-9 set the prefix argument, like Meta-0.
+(let ((i ?0))
+  (while (<= i ?9)
+    (define-key global-map (list 'meta i) 'digit-argument)
+    (define-key global-map (list 'control i) 'digit-argument)
+    (define-key global-map (list 'control 'meta i) 'digit-argument)
+    (setq i (1+ i))))
+(define-key global-map '(meta -) 'negative-argument)
+(define-key global-map '(control -) 'negative-argument)
+(define-key global-map '(control meta -) 'negative-argument)
+
+(define-key global-map "\C-k" 'kill-line)
+(define-key global-map "\C-w" 'kill-region)
+(define-key global-map "\M-w" 'kill-ring-save)
+(define-key global-map "\M-\C-w" 'append-next-kill)
+(define-key global-map "\C-y" 'yank)
+(define-key global-map "\M-y" 'yank-pop)
+
+;; Old v18 binding
+;(define-key global-map "\C-xa" 'append-to-buffer)
+
+(define-key global-map "\C-@" 'set-mark-command)
+;; Many people are used to typing C-SPC and getting C-@.
+(define-key global-map '(control ? ) 'set-mark-command)
+(define-key global-map "\C-x\C-x" 'exchange-point-and-mark)
+(define-key global-map "\C-x\C-@" 'pop-global-mark)
+(define-key global-map [(control x) (control ? )] 'pop-global-mark)
+
+(define-key global-map "\C-n" 'next-line)
+(define-key global-map "\C-p" 'previous-line)
+;(define-key global-map "\C-x\C-n" 'set-goal-column)
+;; XEmacs:
+;;; Many people have said they rarely use this feature, and often type
+;;; it by accident.  Maybe it shouldn't even be on a key.
+;;; Done.  -hniksic
+;(put 'set-goal-column 'disabled t)
+
+(define-key global-map [menu] 'execute-extended-command)
+(define-key global-map [find] 'search-forward)
+
+(define-key global-map "\C-t" 'transpose-chars)
+(define-key global-map "\M-t" 'transpose-words)
+(define-key global-map "\M-\C-t" 'transpose-sexps)
+(define-key global-map "\C-x\C-t" 'transpose-lines)
+
+(define-key global-map "\M-;" 'indent-for-comment)
+(define-key global-map "\M-j" 'indent-new-comment-line)
+(define-key global-map "\M-\C-j" 'indent-new-comment-line)
+(define-key global-map "\C-x;" 'set-comment-column)
+(define-key global-map "\C-xf" 'set-fill-column)
+(define-key global-map "\C-x$" 'set-selective-display)
+
+(define-key global-map "\M-@" 'mark-word)
+(define-key global-map "\M-f" 'forward-word)
+(define-key global-map "\M-b" 'backward-word)
+(define-key global-map "\M-d" 'kill-word)
+
+(define-key global-map "\M-<" 'beginning-of-buffer)
+(define-key global-map "\M->" 'end-of-buffer)
+(define-key global-map "\C-xh" 'mark-whole-buffer)
+(define-key global-map "\M-\\" 'delete-horizontal-space)
+
+(define-key global-map "\M-\C-f" 'forward-sexp)
+(define-key global-map "\M-\C-b" 'backward-sexp)
+(define-key global-map "\M-\C-u" 'backward-up-list)
+(define-key global-map "\M-\C-@" 'mark-sexp)
+(define-key global-map "\M-\C-d" 'down-list)
+(define-key global-map "\M-\C-k" 'kill-sexp)
+(define-key global-map "\M-\C-n" 'forward-list)
+(define-key global-map "\M-\C-p" 'backward-list)
+(define-key global-map "\M-\C-a" 'beginning-of-defun)
+(define-key global-map "\M-\C-e" 'end-of-defun)
+(define-key global-map "\M-\C-h" 'mark-defun)
+(define-key global-map "\M-\(" 'insert-parentheses)
+(define-key global-map "\M-\)" 'move-past-close-and-reindent)
+(define-key global-map "\M-\t" 'lisp-complete-symbol)
+
+(define-key global-map '(control meta backspace) 'backward-kill-sexp)
+(define-key global-map '(control meta delete) 'backward-or-forward-kill-sexp)
+
+\f
+(define-key global-map "\C-x/" 'point-to-register)
+(define-key global-map "\C-xj" 'jump-to-register)
+(define-key global-map "\C-xx" 'copy-to-register)
+(define-key global-map "\C-xg" 'insert-register)
+;; Old v18 binding
+;(define-key global-map "\C-xr" 'copy-rectangle-to-register)
+
+;; New FSF19 bindings: C-x r as a prefix for register commands
+(define-key global-map "\C-xr" (let ((map (make-sparse-keymap)))
+                                 (set-keymap-name map 'rectangle-prefix)
+                                 map))
+(define-key global-map "\C-xr\C-@" 'point-to-register)
+(define-key global-map "\C-xr " 'point-to-register)
+(define-key global-map "\C-xrj" 'jump-to-register)
+(define-key global-map "\C-xrs" 'copy-to-register)
+(define-key global-map "\C-xrx" 'copy-to-register)
+(define-key global-map "\C-xri" 'insert-register)
+(define-key global-map "\C-xrg" 'insert-register)
+(define-key global-map "\C-xrr" 'copy-rectangle-to-register)
+(define-key global-map "\C-xrn" 'number-to-register)
+(define-key global-map "\C-xr+" 'increment-register)
+(define-key global-map "\C-xrc" 'clear-rectangle)
+(define-key global-map "\C-xrk" 'kill-rectangle)
+(define-key global-map "\C-xry" 'yank-rectangle)
+(define-key global-map "\C-xro" 'open-rectangle)
+(define-key global-map "\C-xrt" 'string-rectangle)
+(define-key global-map "\C-xrw" 'window-configuration-to-register)
+;(define-key global-map "\C-xrf" 'frame-configuration-to-register)
+
+(define-key global-map "\M-q" 'fill-paragraph-or-region)
+;(define-key global-map "\M-q" 'fill-paragraph)
+;(define-key global-map "\M-g" 'fill-region) ;now bound to goto-line
+(define-key global-map "\C-x." 'set-fill-prefix)
+
+; Using {} instead of [] is 1) FSF compatible and 2) allows function
+; keys to work on ttys.  M-[ is the beginning of most the function key
+; sequences.
+(define-key global-map "\M-{" 'backward-paragraph)
+(define-key global-map "\M-}" 'forward-paragraph)
+(define-key global-map "\M-h" 'mark-paragraph)
+(define-key global-map "\M-a" 'backward-sentence)
+(define-key global-map "\M-e" 'forward-sentence)
+(define-key global-map "\M-k" 'kill-sentence)
+;;(define-key global-map "\C-x\177" 'backward-kill-sentence)
+
+(define-key global-map "\C-x[" 'backward-page)
+(define-key global-map "\C-x]" 'forward-page)
+(define-key global-map "\C-x\C-p" 'mark-page)
+(define-key global-map "\C-xl" 'count-lines-page)
+(define-key global-map "\C-xnp" 'narrow-to-page)
+;; Old v18 bindings
+;(define-key global-map "\C-xp" 'narrow-to-page)
+(put 'narrow-to-page 'disabled t)
+
+;; Old v18 bindings
+;(define-key global-map "\C-x\C-a" 'add-mode-abbrev)
+;(define-key global-map "\C-x+" 'add-global-abbrev)
+;(define-key global-map "\C-x\C-h" 'inverse-add-mode-abbrev)
+;(define-key global-map "\C-x-" 'inverse-add-global-abbrev)
+
+(define-key global-map "\M-'" 'abbrev-prefix-mark)
+(define-key global-map "\C-x'" 'expand-abbrev)
+
+;; New FSF19 bindings: C-x a as a prefix for abbrev commands
+(define-key global-map "\C-xal" 'add-mode-abbrev)
+(define-key global-map "\C-xa\C-a" 'add-mode-abbrev)
+(define-key global-map "\C-xag" 'add-global-abbrev)
+(define-key global-map "\C-xa+" 'add-mode-abbrev)
+(define-key global-map "\C-xaig" 'inverse-add-global-abbrev)
+(define-key global-map "\C-xail" 'inverse-add-mode-abbrev)
+(define-key global-map "\C-xa-" 'inverse-add-global-abbrev)
+(define-key global-map "\C-xae" 'expand-abbrev)
+(define-key global-map "\C-xa'" 'expand-abbrev)
+
+(define-key global-map "\M-\C-l" 'switch-to-other-buffer)
+
+;; Default binding of "Backspace" is no longer the same as delete.
+;; Default binding of "Control-h" is help.
+(define-key global-map 'backspace 'delete-backward-char)
+(define-key global-map '(meta backspace) 'backward-kill-word)
+
+(define-key global-map "\M-\C-z" 'activate-region)
+
+;; FSFmacs macros.c
+
+(define-key global-map "\C-xe" 'call-last-kbd-macro)
+(define-key global-map "\C-x\(" 'start-kbd-macro)
+(define-key global-map "\C-x\)" 'end-kbd-macro)
+
+;; FSFmacs macros.el
+
+(define-key global-map "\C-xq" 'kbd-macro-query)
+
+
+;; FSFmacs minibuffer.c
+; see also minibuf.el
+
+(define-key global-map "\M-\C-c" 'exit-recursive-edit)
+(define-key global-map "\C-]" 'abort-recursive-edit)
+(define-key global-map "\M-x" 'execute-extended-command)
+
+;; FSFmacs window.c
+
+(define-key global-map "\C-x0" 'delete-window)
+(define-key global-map "\C-x1" 'delete-other-windows)
+(define-key global-map "\C-x2" 'split-window-vertically)
+(define-key global-map "\C-x3" 'split-window-horizontally)
+;; Old XEmacs binding
+;;(define-key global-map "\C-x5" 'split-window-horizontally)
+(define-key global-map "\C-xo" 'other-window)
+(define-key global-map "\C-x^" 'enlarge-window)
+(define-key global-map "\C-x<" 'scroll-left)
+(define-key global-map "\C-x>" 'scroll-right)
+
+(define-key global-map "\C-v" 'scroll-up-command)
+(define-key global-map "\M-v" 'scroll-down-command)
+(define-key global-map "\M-\C-v" 'scroll-other-window)
+; meta-shift-V, that is.
+(define-key global-map '(meta V) 'scroll-other-window-down)
+
+(define-key global-map "\C-l" 'recenter)
+(define-key global-map "\M-r" 'move-to-window-line)
+
+;; FSFmacs window.el
+
+(define-key global-map "\C-x6" 'window-configuration-to-register)
+;(define-key global-map "\C-x7" 'jump-to-register);ie register-to-window-config
+(define-key global-map "\C-x}" 'enlarge-window-horizontally)
+(define-key global-map "\C-x{" 'shrink-window-horizontally)
+;; New FSF19 bindings
+(define-key global-map "\C-x-" 'shrink-window-if-larger-than-buffer)
+(define-key global-map "\C-x+" 'balance-windows)
+(define-key ctl-x-4-map "0" 'kill-buffer-and-window)
+
+;;(define-key global-map "\C-g" 'keyboard-quit)
+(let ((ch (quit-char)))
+  (if (or (characterp ch) (integerp ch))
+      (setq ch (char-to-string ch)))
+  (define-key global-map ch 'keyboard-quit))
+(define-key global-map "\e\e\e" 'keyboard-escape-quit)
+
+
+
+
+
+
+(define-key global-map "\M-%" 'query-replace)
+
+
+; autoloaded
+;(define-key global-map "\C-x4a" 'add-change-log-entry-other-window)
+
+; autoloaded
+;(define-key global-map "\C-x`" 'next-error)
+
+; autoloaded
+;(define-key global-map "\M-/" 'dabbrev-expand)
+
+; autoloaded
+;(define-key global-map "\C-xd" 'dired)
+
+; autoloaded
+;(define-key global-map "\C-x4d" 'dired-other-window)
+
+(define-key global-map "\M-$" 'ispell-word)
+
+(define-key global-map "\C-xm" 'compose-mail)
+(define-key global-map "\C-x4m" 'compose-mail-other-window)
+(define-key global-map "\C-x5m" 'compose-mail-other-frame)
+
+(define-key global-map "\M-." 'find-tag)
+
+(define-key global-map "\C-x4." 'find-tag-other-window)
+
+(define-key global-map "\M-," 'tags-loop-continue)
+
+
+(define-key global-map '(control <) 'mark-beginning-of-buffer)
+(define-key global-map '(control >) 'mark-end-of-buffer)
+
+(define-key global-map "\C-x\C-e" 'eval-last-sexp) ;bogus!
+
+
+(define-key global-map "\M-g" 'goto-line)
+
+;; Keypad type things
+
+;; I removed all the fkey crap, because where-is is now smart enough
+;; to show all bindings. --ben
+
+;;; These aren't bound to kbd macros like "\C-b" so that they have the
+;; expected behavior even in, for example, vi-mode.
+
+;; We use here symbolic names, assuming that the corresponding keys will
+;; generate these keysyms.  This is not true on Suns, but x-win-sun.el 
+;; fixes that.  If it turns out that the semantics of these keys should
+;; differ from server to server, this should be moved into server-specific
+;; files, but these appear to be the standard Motif and PC bindings.
+
+;; movement by units
+(define-key global-map 'left           'backward-char-command)
+(define-key global-map 'up             'previous-line)
+(define-key global-map 'right          'forward-char-command)
+(define-key global-map 'down           'next-line)
+
+;; movement by pages
+(define-key global-map 'prior          'scroll-down-command)
+(define-key global-map 'next           'scroll-up-command)
+
+;; movement to the limits
+(define-key global-map 'home           'beginning-of-line)
+(define-key global-map 'end            'end-of-line)
+
+;;; Miscellaneous key bindings
+(define-key global-map 'again          'repeat-complex-command)
+(define-key global-map 'insert         'overwrite-mode)
+
+;;; These aren't bound to kbd macros like "\C-b" so that they have the
+;; expected behavior even in, for example, vi-mode.
+
+;; We use here symbolic names, assuming that the corresponding keys will
+;; generate these keysyms.  This is not true on Suns, but x-win-sun.el 
+;; fixes that.  If it turns out that the semantics of these keys should
+;; differ from server to server, this should be moved into server-specific
+;; files, but these appear to be the standard Motif and PC bindings.
+
+;; potential R6isms
+(define-key global-map 'kp-left                'backward-char-command)
+(define-key global-map 'kp-up          'previous-line)
+(define-key global-map 'kp-right       'forward-char-command)
+(define-key global-map 'kp-down                'next-line)
+
+
+;; movement by larger blocks
+(define-key global-map '(control left) 'backward-word)
+(define-key global-map '(control up)   #'(lambda ()
+                                           (interactive "_")
+                                           (forward-line -6)))
+(define-key global-map '(control right)        'forward-word)
+(define-key global-map '(control down) #'(lambda ()
+                                           (interactive "_")
+                                           (forward-line 6)))
+
+;; context-sensitive movement
+(define-key global-map '(meta left)  'backward-sexp)
+(define-key global-map '(meta right) 'forward-sexp)
+(define-key global-map '(meta up)    'backward-paragraph)
+(define-key global-map '(meta down)  'forward-paragraph)
+
+;; movement by pages
+(define-key global-map '(control prior)        'scroll-right)
+(define-key global-map '(control next) 'scroll-left)
+;; potential R6isms
+(define-key global-map 'kp-prior       'scroll-down-command)
+(define-key global-map 'kp-next                'scroll-up-command)
+(define-key global-map '(control kp-prior) 'scroll-right)
+(define-key global-map '(control kp-next) 'scroll-left)
+
+
+;; movement to the limits
+(define-key global-map '(control home) 'beginning-of-buffer)
+(define-key global-map '(control end)  'end-of-buffer)
+(define-key global-map 'begin          'beginning-of-line)
+(define-key global-map '(control begin)        'beginning-of-buffer)
+;; potential R6isms
+(define-key global-map 'kp-home                'beginning-of-line)
+(define-key global-map '(control kp-home) 'beginning-of-buffer)
+(define-key global-map 'kp-end         'end-of-line)
+(define-key global-map '(control kp-end) 'end-of-buffer)
+
+;; movement between windows
+(define-key global-map '(control tab)  'other-window)
+(define-key global-map '(control shift tab) 'backward-other-window)
+
+;; movement in other windows
+(define-key global-map '(meta next)    'scroll-other-window)
+(define-key global-map '(meta prior)   'scroll-other-window-down)
+(define-key global-map '(meta home)    'beginning-of-buffer-other-window)
+(define-key global-map '(meta end)     'end-of-buffer-other-window)
+;; potential R6isms
+(define-key global-map '(meta kp-next) 'scroll-other-window)
+(define-key global-map '(meta kp-prior)        'scroll-other-window-down)
+(define-key global-map '(meta kp-home) 'beginning-of-buffer-other-window)
+(define-key global-map '(meta kp-end)  'end-of-buffer-other-window)
+
+;; potential R6isms
+(define-key global-map 'redo           'repeat-complex-command)
+(define-key global-map 'kp-insert      'overwrite-mode)
+(define-key global-map 'kp-delete      'backward-delete-char-untabify)
+
+(define-key global-map 'kp-enter       [return]) ; do whatever RET does now
+(define-key global-map 'kp-tab         [tab])
+
+(define-key global-map 'undo           'undo)
+(define-key global-map 'help           'help-for-help)
+
+(define-key global-map 'kp-space       'self-insert-command)
+(define-key global-map 'kp-equal       'self-insert-command)
+(define-key global-map 'kp-multiply    'self-insert-command)
+(define-key global-map 'kp-add         'self-insert-command)
+(define-key global-map 'kp-separator   'self-insert-command)
+(define-key global-map 'kp-subtract    'self-insert-command)
+(define-key global-map 'kp-decimal     'self-insert-command)
+(define-key global-map 'kp-divide      'self-insert-command)
+
+(define-key global-map 'kp-0           'self-insert-command)
+(define-key global-map 'kp-1           'self-insert-command)
+(define-key global-map 'kp-2           'self-insert-command)
+(define-key global-map 'kp-3           'self-insert-command)
+(define-key global-map 'kp-4           'self-insert-command)
+(define-key global-map 'kp-5           'self-insert-command)
+(define-key global-map 'kp-6           'self-insert-command)
+(define-key global-map 'kp-7           'self-insert-command)
+(define-key global-map 'kp-8           'self-insert-command)
+(define-key global-map 'kp-9           'self-insert-command)
+
+(define-key global-map 'select         'function-key-error)
+(define-key global-map 'print          'function-key-error)
+(define-key global-map 'execute                'execute-extended-command)
+(define-key global-map 'clearline      'function-key-error)
+(define-key global-map 'insertline     'open-line)
+(define-key global-map 'deleteline     'kill-line)
+(define-key global-map 'insertchar     'function-key-error)
+(define-key global-map 'deletechar     'delete-char)
+
+;;; keydefs.el ends here
diff --git a/lisp/keymap.el b/lisp/keymap.el
new file mode 100644 (file)
index 0000000..9f3f69d
--- /dev/null
@@ -0,0 +1,493 @@
+;; keymap.el --- Keymap functions for XEmacs.
+
+;; Copyright (C) 1993-4, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
+
+;; Maintainer: XEmacs Development Team
+;; Keywords: internals, dumped
+
+;; 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; see the file COPYING.  If not, write to the
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: FSF 19.28.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;;; Note: FSF does not have a file keymap.el.  This stuff is
+;;; in keymap.c.
+
+;Prevent the \{...} documentation construct
+;from mentioning keys that run this command.
+
+;;; Code:
+
+(put 'undefined 'suppress-keymap t)
+
+(defun undefined ()
+  (interactive)
+  (ding))
+
+(defmacro kbd (keys)
+  "Convert KEYS to the internal Emacs key representation.
+KEYS should be a string in the format used for saving keyboard macros
+\(see `insert-kbd-macro')."
+  (if (or (stringp keys)
+         (vectorp keys))
+      (read-kbd-macro keys)
+    `(read-kbd-macro ,keys)))
+
+(defun suppress-keymap (map &optional nodigits)
+  "Make MAP override all normally self-inserting keys to be undefined.
+Normally, as an exception, digits and minus-sign are set to make prefix args,
+but optional second arg NODIGITS non-nil treats them like other chars."
+  (substitute-key-definition 'self-insert-command 'undefined map global-map)
+  (or nodigits
+      (let ((string (make-string 1 ?0)))
+       (define-key map "-" 'negative-argument)
+       ;; Make plain numbers do numeric args.
+       (while (<= (aref string 0) ?9)
+         (define-key map string 'digit-argument)
+         (incf (aref string 0))))))
+
+(defun substitute-key-definition (olddef newdef keymap &optional oldmap prefix)
+  "Replace OLDDEF with NEWDEF for any keys in KEYMAP now defined as OLDDEF.
+In other words, OLDDEF is replaced with NEWDEF wherever it appears.
+Prefix keymaps are checked recursively.  If optional fourth argument OLDMAP
+is specified, we redefine in KEYMAP as NEWDEF those chars which are defined
+as OLDDEF in OLDMAP, unless that keybinding is already present in keymap.
+If optional fifth argument PREFIX is defined, then only those occurrences of
+OLDDEF found in keymaps accessible through the keymap bound to PREFIX in
+KEYMAP are redefined.  See also `accessible-keymaps'."
+  (let ((maps (accessible-keymaps (or oldmap keymap) prefix))
+       (shadowing (not (null oldmap)))
+       prefix map)
+    (while maps
+      (setq prefix (car (car maps))
+           map (cdr (car maps))
+           maps (cdr maps))
+      ;; Substitute in this keymap
+      (map-keymap #'(lambda (key binding)
+                     (if (eq binding olddef)
+                         ;; The new bindings always go in KEYMAP even if we
+                         ;; found them in OLDMAP or one of its children.
+                         ;; If KEYMAP will be shadowing OLDMAP, then do not
+                         ;; redefine the key if there is another binding
+                         ;; in KEYMAP that will shadow OLDDEF.
+                         (or (and shadowing
+                                  (lookup-key keymap key))
+                             ;; define-key will give an error if a prefix
+                             ;; of the key is already defined.  Otherwise
+                             ;; it will define the key in the map.
+                             ;; #### - Perhaps this should be protected?
+                             (define-key
+                               keymap
+                               (vconcat prefix (list key))
+                               newdef))))
+                 map)
+      )))
+
+
+;; From Bill Dubuque <wgd@martigny.ai.mit.edu>
+
+;; This used to wrap forms into an interactive lambda.  It is unclear
+;; to me why this is needed in this function.  Anyway,
+;; `key-or-menu-binding' doesn't do it, so this function no longer
+;; does it, either.
+(defun insert-key-binding (key)         ; modeled after describe-key
+  "Insert the command bound to KEY."
+  (interactive "kInsert command bound to key: ")
+  (let ((defn (key-or-menu-binding key)))
+    (if (or (null defn) (integerp defn))
+       (error "%s is undefined" (key-description key))
+      (if (or (stringp defn) (vectorp defn))
+          (setq defn (key-binding defn))) ;; a keyboard macro
+      (insert (format "%s" defn)))))
+
+;; From Bill Dubuque <wgd@martigny.ai.mit.edu>
+(defun read-command-or-command-sexp (prompt)
+  "Read a command symbol or command sexp.
+A command sexp is wrapped in an interactive lambda if needed.
+Prompts with PROMPT."
+  ;; Todo: it would be better if we could reject symbols that are not
+  ;; commandp (as does 'read-command') but that is not easy to do
+  ;; because we must supply arg4 = require-match = nil for sexp case.
+  (let ((result (car (read-from-string
+                      (completing-read prompt obarray 'commandp)))))
+    (if (and (consp result)
+             (not (eq (car result) 'lambda)))
+        `(lambda ()
+          (interactive)
+          ,result)
+      result)))
+
+(defun local-key-binding (keys)
+  "Return the binding for command KEYS in current local keymap only.
+KEYS is a string, a vector of events, or a vector of key-description lists
+as described in the documentation for the `define-key' function.
+The binding is probably a symbol with a function definition; see
+the documentation for `lookup-key' for more information."
+  (let ((map (current-local-map)))
+    (if map
+        (lookup-key map keys)
+        nil)))
+
+(defun global-key-binding (keys)
+  "Return the binding for command KEYS in current global keymap only.
+KEYS is a string or vector of events, a sequence of keystrokes.
+The binding is probably a symbol with a function definition; see
+the documentation for `lookup-key' for more information."
+  (lookup-key (current-global-map) keys))
+
+;; from Bill Dubuque <wgd@martigny.ai.mit.edu>
+(defun global-set-key (key command)
+  "Give KEY a global binding as COMMAND.
+COMMAND is a symbol naming an interactively-callable function.
+KEY is a string, a vector of events, or a vector of key-description lists
+as described in the documentation for the `define-key' function.
+Note that if KEY has a local binding in the current buffer
+that local binding will continue to shadow any global binding."
+  ;;(interactive "KSet key globally: \nCSet key %s to command: ")
+  (interactive (list (setq key (read-key-sequence "Set key globally: "))
+                     ;; Command sexps are allowed here so that this arg
+                     ;; may be supplied interactively via insert-key-binding.
+                     (read-command-or-command-sexp
+                       (format "Set key %s to command: "
+                               (key-description key)))))
+  (define-key (current-global-map) key command)
+  nil)
+
+;; from Bill Dubuque <wgd@martigny.ai.mit.edu>
+(defun local-set-key (key command)
+  "Give KEY a local binding as COMMAND.
+COMMAND is a symbol naming an interactively-callable function.
+KEY is a string, a vector of events, or a vector of key-description lists
+as described in the documentation for the `define-key' function.
+The binding goes in the current buffer's local map,
+which is shared with other buffers in the same major mode."
+  ;;(interactive "KSet key locally: \nCSet key %s locally to command: ")
+  (interactive (list (setq key (read-key-sequence "Set key locally: "))
+                     ;; Command sexps are allowed here so that this arg
+                     ;; may be supplied interactively via insert-key-binding.
+                     (read-command-or-command-sexp
+                       (format "Set key %s locally to command: "
+                               (key-description key)))))
+  (if (null (current-local-map))
+      (use-local-map (make-sparse-keymap)))
+  (define-key (current-local-map) key command)
+  nil)
+
+(defun global-unset-key (key)
+  "Remove global binding of KEY.
+KEY is a string, a vector of events, or a vector of key-description lists
+as described in the documentation for the `define-key' function."
+  (interactive "kUnset key globally: ")
+  (global-set-key key nil))
+
+(defun local-unset-key (key)
+  "Remove local binding of KEY.
+KEY is a string, a vector of events, or a vector of key-description lists
+as described in the documentation for the `define-key' function."
+  (interactive "kUnset key locally: ")
+  (if (current-local-map)
+      (define-key (current-local-map) key nil)))
+
+\f
+;; FSF-inherited brain-death.
+(defun minor-mode-key-binding (key &optional accept-default)
+  "Find the visible minor mode bindings of KEY.
+Return an alist of pairs (MODENAME . BINDING), where MODENAME is
+the symbol which names the minor mode binding KEY, and BINDING is
+KEY's definition in that mode.  In particular, if KEY has no
+minor-mode bindings, return nil.  If the first binding is a
+non-prefix, all subsequent bindings will be omitted, since they would
+be ignored.  Similarly, the list doesn't include non-prefix bindings
+that come after prefix bindings.
+
+If optional argument ACCEPT-DEFAULT is non-nil, recognize default
+bindings; see the description of `lookup-key' for more details about this."
+  (let ((tail minor-mode-map-alist)
+        a s v)
+    (while tail
+      (setq a (car tail)
+            tail (cdr tail))
+      (and (consp a)
+           (symbolp (setq s (car a)))
+           (boundp s)
+           (symbol-value s)
+           ;; indirect-function deals with autoloadable keymaps
+           (setq v (indirect-function (cdr a)))
+           (setq v (lookup-key v key accept-default))
+           ;; Terminate loop, with v set to non-nil value
+           (setq tail nil)))
+    v))
+
+
+(defun current-minor-mode-maps ()
+  "Return a list of keymaps for the minor modes of the current buffer."
+  (let ((l '())
+        (tail minor-mode-map-alist)
+        a s v)
+    (while tail
+      (setq a (car tail)
+            tail (cdr tail))
+      (and (consp a)
+           (symbolp (setq s (car a)))
+           (boundp s)
+           (symbol-value s)
+           ;; indirect-function deals with autoloadable keymaps
+           (setq v (indirect-function (cdr a)))
+           (setq l (cons v l))))
+    (nreverse l)))
+
+\f
+;;#### What a crock
+(defun define-prefix-command (name &optional mapvar)
+  "Define COMMAND as a prefix command.
+A new sparse keymap is stored as COMMAND's function definition.
+If second optional argument MAPVAR is not specified,
+ COMMAND's value (as well as its function definition) is set to the keymap.
+If a second optional argument MAPVAR is given and is not `t',
+  the map is stored as its value.
+Regardless of MAPVAR, COMMAND's function-value is always set to the keymap."
+  (let ((map (make-sparse-keymap name)))
+    (fset name map)
+    (cond ((not mapvar)
+           (set name map))
+          ((eq mapvar 't)
+           )
+          (t
+           (set mapvar map)))
+    name))
+
+\f
+;;; Converting vectors of events to a read-equivalent form.
+;;; This is used both by call-interactively (for the command history)
+;;; and by macros.el (for saving keyboard macros to a file).
+
+;; #### why does (events-to-keys [backspace]) return "\C-h"?
+;; BTW, this function is a mess, and macros.el does *not* use it, in
+;; spite of the above comment.  `format-kbd-macro' is used to save
+;; keyboard macros to a file.
+(defun events-to-keys (events &optional no-mice)
+ "Given a vector of event objects, returns a vector of key descriptors,
+or a string (if they all fit in the ASCII range).
+Optional arg NO-MICE means that button events are not allowed."
+ (if (and events (symbolp events)) (setq events (vector events)))
+ (cond ((stringp events)
+        events)
+       ((not (vectorp events))
+        (signal 'wrong-type-argument (list 'vectorp events)))
+       ((let* ((length (length events))
+               (string (make-string length 0))
+               c ce
+               (i 0))
+          (while (< i length)
+            (setq ce (aref events i))
+            (or (eventp ce) (setq ce (character-to-event ce)))
+            ;; Normalize `c' to `?c' and `(control k)' to `?\C-k'
+            ;; By passing t for the `allow-meta' arg we could get kbd macros
+            ;; with meta in them to translate to the string form instead of
+            ;; the list/symbol form; but I expect that would cause confusion,
+            ;; so let's use the list/symbol form whenever there's
+            ;; any ambiguity.
+            (setq c (event-to-character ce))
+            (if (and c
+                     character-set-property
+                     (key-press-event-p ce))
+                (cond ((symbolp (event-key ce))
+                       (if (get (event-key ce) character-set-property)
+                           ;; Don't use a string for `backspace' and `tab' to
+                           ;;  avoid that unpleasant little ambiguity.
+                           (setq c nil)))
+                      ((and (= (event-modifier-bits ce) 1) ;control
+                            (integerp (event-key ce)))
+                       (let* ((te (character-to-event c)))
+                         (if (and (symbolp (event-key te))
+                                  (get (event-key te) character-set-property))
+                             ;; Don't "normalize" (control i) to tab
+                             ;;  to avoid the ambiguity in the other direction
+                             (setq c nil))
+                         (deallocate-event te)))))
+            (if c
+                (aset string i c)
+                (setq i length string nil))
+            (setq i (1+ i)))
+          string))
+       (t
+        (let* ((length (length events))
+               (new (copy-sequence events))
+               event mods key
+               (i 0))
+          (while (< i length)
+            (setq event (aref events i))
+            (cond ((key-press-event-p event)
+                   (setq mods (event-modifiers event)
+                         key (event-key event))
+                   (if (numberp key)
+                       (setq key (intern (make-string 1 key))))
+                   (aset new i (if mods
+                                   (nconc mods (cons key nil))
+                                   key)))
+                  ((misc-user-event-p event)
+                   (aset new i (list 'menu-selection
+                                     (event-function event)
+                                     (event-object event))))
+                  ((or (button-press-event-p event)
+                       (button-release-event-p event))
+                   (if no-mice
+                       (error
+                         "Mouse events can't be saved in keyboard macros."))
+                   (setq mods (event-modifiers event)
+                         key (intern (format "button%d%s"
+                                             (event-button event)
+                                             (if (button-release-event-p event)
+                                                 "up" ""))))
+                   (aset new i (if mods
+                                   (nconc mods (cons key nil))
+                                   key)))
+                  ((or (and event (symbolp event))
+                       (and (consp event) (symbolp (car event))))
+                   (aset new i event))
+                  (t
+                   (signal 'wrong-type-argument (list 'eventp event))))
+            (setq i (1+ i)))
+          new))))
+
+\f
+(defun next-key-event ()
+  "Return the next available keyboard event."
+  (let (event)
+    (while (not (key-press-event-p (setq event (next-command-event))))
+      (dispatch-event event))
+    event))
+
+(defun key-sequence-list-description (keys)
+  "Convert a key sequence KEYS to the full [(modifiers... key)...] form.
+Argument KEYS can be in any form accepted by `define-key' function."
+  (let ((vec
+         (cond ((vectorp keys)
+                keys)
+               ((stringp keys)
+                (vconcat keys))
+               (t
+                (vector keys))))
+        (event-to-list
+         #'(lambda (ev)
+           (append (event-modifiers ev) (list (event-key ev))))))
+    (mapvector
+     #'(lambda (key)
+       (cond ((key-press-event-p key)
+             (funcall event-to-list key))
+            ((characterp key)
+             (funcall event-to-list (character-to-event key)))
+            ((listp key)
+             key)
+            (t
+             (list key))))
+     vec)))
+
+\f
+;;; Support keyboard commands to turn on various modifiers.
+
+;;; These functions -- which are not commands -- each add one modifier
+;;; to the following event.
+
+(defun event-apply-alt-modifier (ignore-prompt)
+  (event-apply-modifier 'alt))
+(defun event-apply-super-modifier (ignore-prompt)
+  (event-apply-modifier 'super))
+(defun event-apply-hyper-modifier (ignore-prompt)
+  (event-apply-modifier 'hyper))
+(defun event-apply-shift-modifier (ignore-prompt)
+  (event-apply-modifier 'shift))
+(defun event-apply-control-modifier (ignore-prompt)
+  (event-apply-modifier 'control))
+(defun event-apply-meta-modifier (ignore-prompt)
+  (event-apply-modifier 'meta))
+
+;;; #### `key-translate-map' is ignored for now.
+(defun event-apply-modifier (symbol)
+  "Return the next key event, with a modifier flag applied.
+SYMBOL is the name of this modifier, as a symbol.
+`function-key-map' is scanned for prefix bindings."
+  (let (events binding)
+    ;; read keystrokes scanning `function-key-map'
+    (while (keymapp
+           (setq binding
+                 (lookup-key
+                  function-key-map
+                  (vconcat
+                   (setq events
+                         (append events (list (next-key-event)))))))))
+    (if binding                                ; found a binding
+       (progn
+         ;; allow for several modifiers
+         (if (and (symbolp binding) (fboundp binding))
+             (setq binding (funcall binding nil)))
+         (setq events (append binding nil))
+         ;; put remaining keystrokes back into input queue
+         (setq unread-command-events
+               (mapcar 'character-to-event (cdr events))))
+      (setq unread-command-events (cdr events)))
+    ;; add a modifier SYMBOL to the first keystroke or event
+    (vector
+     (append (list symbol)
+            (delq symbol
+                  (aref (key-sequence-list-description (car events)) 0))))))
+
+(defun synthesize-keysym (ignore-prompt)
+  "Read a sequence of keys, and returned the corresponding key symbol.
+The characters must be from the [-_a-zA-Z0-9].  Reading is terminated
+ by RET (which is discarded)."
+  (let ((continuep t)
+       event char list)
+    (while continuep
+      (setq event (next-key-event))
+      (cond ((and (setq char (event-to-character event))
+                 (or (memq char '(?- ?_))
+                     (eq ?w (char-syntax char (standard-syntax-table)))))
+            ;; Advance a character.
+            (push char list))
+           ((or (memq char '(?\r ?\n))
+                (memq (event-key event) '(return newline)))
+            ;; Legal termination.
+            (setq continuep nil))
+           (char
+            ;; Illegal character.
+            (error "Illegal character in keysym: %c" char))
+           (t
+            ;; Illegal event.
+            (error "Event has no character equivalent: %s" event))))
+    (vector (intern (concat "" (nreverse list))))))
+
+;; This looks dirty.  The following code should maybe go to another
+;; file, and `create-console-hook' should maybe default to nil.
+(add-hook
+ 'create-console-hook
+ #'(lambda (console)
+   (letf (((selected-console) console))
+     (define-key function-key-map [?\C-x ?@ ?h] 'event-apply-hyper-modifier)
+     (define-key function-key-map [?\C-x ?@ ?s] 'event-apply-super-modifier)
+     (define-key function-key-map [?\C-x ?@ ?m] 'event-apply-meta-modifier)
+     (define-key function-key-map [?\C-x ?@ ?S] 'event-apply-shift-modifier)
+     (define-key function-key-map [?\C-x ?@ ?c] 'event-apply-control-modifier)
+     (define-key function-key-map [?\C-x ?@ ?a] 'event-apply-alt-modifier)
+     (define-key function-key-map [?\C-x ?@ ?k] 'synthesize-keysym))))
+
+;;; keymap.el ends here
diff --git a/lisp/ldap.el b/lisp/ldap.el
new file mode 100644 (file)
index 0000000..1f09377
--- /dev/null
@@ -0,0 +1,93 @@
+;;; ldap.el --- LDAP support for Emacs
+
+;; Copyright (C) 1997 Free Software Foundation, Inc.
+
+;; Author: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
+;; Maintainer: Oscar Figueiredo <Oscar.Figueiredo@di.epfl.ch>
+;; Created: Jan 1998
+;; Version: $Revision: 1.7.2.1 $
+;; Keywords: help comm
+
+;; 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; see the file COPYING.  If not, write to 
+;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Commentary:
+;;    This file provides mid-level and user-level functions to access directory
+;;    servers using the LDAP protocol (RFC 1777). 
+
+;;; Installation:
+;;    LDAP support must have been built into XEmacs.
+
+
+;;; Code:
+
+(eval-when '(load eval)
+  (require 'ldap))
+
+(defvar ldap-default-host nil
+  "*Default LDAP server.")
+
+(defvar ldap-host-parameters-alist nil
+  "*An alist of per host options for LDAP transactions
+The list elements look like (HOST PROP1 VAL1 PROP2 VAL2 ...)
+HOST is the name of an LDAP server. PROPn and VALn are property/value pairs
+describing parameters for the server.  Valid properties: 
+  `binddn' is the distinguished name of the user to bind as 
+    (in RFC 1779 syntax).
+  `passwd' is the password to use for simple authentication.
+  `auth' is the authentication method to use. 
+    Possible values are: `simple', `krbv41' and `krbv42'.
+  `base' is the base for the search as described in RFC 1779.
+  `scope' is one of the three symbols `subtree', `base' or `onelevel'.
+  `deref' is one of the symbols `never', `always', `search' or `find'.
+  `timelimit' is the timeout limit for the connection in seconds.
+  `sizelimit' is the maximum number of matches to return." )
+
+
+(defun ldap-search (filter &optional host attributes attrsonly)
+  "Perform an LDAP search.
+FILTER is the search filter in RFC1558 syntax
+HOST is the LDAP host on which to perform the search
+ATTRIBUTES is a list of the specific attributes to retrieve, 
+nil means retrieve all
+ATTRSONLY if non nil retrieves the attributes only without 
+the associated values.
+Additional search parameters can be specified through 
+`ldap-host-parameters-alist' which see."
+  (interactive "sFilter:")
+  (let (host-plist res ldap)
+    (if (null host)
+       (setq host ldap-default-host))
+    (if (null host)
+       (error "No LDAP host specified"))
+    (setq host-plist
+         (cdr (assoc host ldap-host-parameters-alist)))
+    (message "Opening LDAP connection to %s..." host)
+    (setq ldap (ldap-open host host-plist))
+    (message "Searching with LDAP on %s..." host)
+    (setq res (ldap-search-internal ldap filter 
+                                   (plist-get host-plist 'base)
+                                   (plist-get host-plist 'scope)
+                                   attributes attrsonly))
+    (ldap-close ldap)
+    res))
+
+               
+
+(provide 'ldap)
+
+;;; ldap.el ends here
diff --git a/lisp/lib-complete.el b/lisp/lib-complete.el
new file mode 100644 (file)
index 0000000..83123c6
--- /dev/null
@@ -0,0 +1,339 @@
+;;; lib-complete.el --- Completion on the lisp search path
+
+;; Copyright (C) 1997 Free Software Foundation, Inc.
+;; Copyright (C) Mike Williams <mike-w@cs.aukuni.ac.nz> 1991
+
+;; Author: Mike Williams <mike-w@cs.aukuni.ac.nz>
+;; Maintainer: XEmacs Development Team
+;; Keywords: lisp, extensions, dumped
+;; Created: Sat Apr 20 17:47:21 1991
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not in FSF.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; ========================================================================
+;; lib-complete.el --  Completion on a search path
+;; Author          : Mike Williams <mike-w@cs.aukuni.ac.nz>
+;; Created On      : Sat Apr 20 17:47:21 1991
+;; Last Modified By: Heiko M|nkel <muenkel@tnt.uni-hannover.de>
+;; Additional XEmacs integration By: Chuck Thompson <cthomp@cs.uiuc.edu>
+;; Last Modified On: Thu Jul 1 14:23:00 1994
+;; RCS Info        : $Revision: 1.3 $ $Locker:  $
+;; ========================================================================
+;; NOTE: XEmacs must be redumped if this file is changed.
+;;
+;; Copyright (C) Mike Williams <mike-w@cs.aukuni.ac.nz> 1991
+;;
+;; Keywords: utility, lisp
+
+;; Many thanks to Hallvard Furuseth <hallvard@ifi.uio.no> for his
+;; helpful suggestions.
+
+;; The function locate-file is removed, because of its incompatibility
+;; with the buildin function of the lemacs 19.10 (Heiko M|nkel).
+
+;; There is now the new function find-library in this package.
+
+;;; ChangeLog:
+
+;; 4/26/97: sb Mule-ize.
+
+;;; Code:
+
+;;=== Determine completions for filename in search path ===================
+
+(defun library-all-completions (FILE SEARCH-PATH &optional FULL FAST)
+  "Return all completions for FILE in any directory on SEARCH-PATH.
+If optional third argument FULL is non-nil, returned pathnames should be 
+  absolute rather than relative to some directory on the SEARCH-PATH.
+If optional fourth argument FAST is non-nil, don't sort the completions,
+  or remove duplicates."
+  (setq FILE (or FILE ""))
+  (if (file-name-absolute-p FILE)
+      ;; It's an absolute file name, so don't need SEARCH-PATH
+      (progn
+       (setq FILE (expand-file-name FILE))
+       (file-name-all-completions 
+        (file-name-nondirectory FILE) (file-name-directory FILE)))
+    (let ((subdir (file-name-directory FILE))
+         (file (file-name-nondirectory FILE))
+         all-completions)
+      ;; Make list of completions in each directory on SEARCH-PATH
+      (while SEARCH-PATH
+       (let* ((dir (concat (file-name-as-directory 
+                            (expand-file-name (car SEARCH-PATH)))
+                           subdir))
+              (dir-prefix (if FULL dir subdir)))
+         (if (file-directory-p dir)
+             (let ((subdir-completions 
+                    (file-name-all-completions file dir)))
+               (while subdir-completions
+                 (setq all-completions 
+                       (cons (concat dir-prefix (car subdir-completions))
+                             all-completions))
+                 (setq subdir-completions (cdr subdir-completions))))))
+       (setq SEARCH-PATH (cdr SEARCH-PATH)))   
+      (if FAST all-completions
+       (let ((sorted (nreverse (sort all-completions 'string<)))
+             compressed)
+         (while sorted
+           (if (equal (car sorted) (car compressed)) nil
+             (setq compressed (cons (car sorted) compressed)))
+           (setq sorted (cdr sorted)))
+         compressed)))))
+
+;;=== Utilities ===========================================================
+
+(defmacro progn-with-message (MESSAGE &rest FORMS)
+  "(progn-with-message MESSAGE FORMS ...)
+Display MESSAGE and evaluate FORMS, returning value of the last one."
+  ;; based on Hallvard Furuseth's funcall-with-message
+  (` 
+   (if (eq (selected-window) (minibuffer-window))
+       (save-excursion
+        (goto-char (point-max))
+        (let ((orig-pmax (point-max)))
+          (unwind-protect
+              (progn
+                (insert " " (, MESSAGE)) (goto-char orig-pmax)
+                (sit-for 0)            ; Redisplay
+                (,@ FORMS))
+            (delete-region orig-pmax (point-max)))))
+     (prog2
+      (message "%s" (, MESSAGE))
+      (progn (,@ FORMS))
+      (message "")))))
+
+(put 'progn-with-message 'lisp-indent-hook 1)
+
+;;=== Completion caching ==================================================
+
+(defconst lib-complete:cache nil
+  "Used within read-library and read-library-internal to prevent 
+costly repeated calls to library-all-completions.
+Format is a list of lists of the form
+
+    ([<path> <subdir>] <cache-record> <cache-record> ...)
+
+where each <cache-record> has the form
+
+   (<root> <modtimes> <completion-table>)")
+
+(defun lib-complete:better-root (ROOT1 ROOT2)
+  "Return non-nil if ROOT1 is a superset of ROOT2."
+  (and (equal (file-name-directory ROOT1) (file-name-directory ROOT2))
+       (string-match
+       (concat "^" (regexp-quote (file-name-nondirectory ROOT1)))
+       ROOT2)))
+
+(defun lib-complete:get-completion-table (FILE PATH FILTER)
+  (let* ((subdir (file-name-directory FILE))
+        (root (file-name-nondirectory FILE))
+        (PATH 
+         (mapcar 
+          (function (lambda (dir) (file-name-as-directory
+                                   (expand-file-name (or dir "")))))
+          PATH))
+        (key (vector PATH subdir FILTER))
+        (real-dirs 
+         (if subdir
+             (mapcar (function (lambda (dir) (concat dir subdir))) PATH)
+           PATH))
+        (path-modtimes
+         (mapcar 
+          (function (lambda (fn) (if fn (nth 5 (file-attributes fn))))) 
+          real-dirs))
+        (cache-entry (assoc key lib-complete:cache))
+        (cache-records (cdr cache-entry)))
+    ;; Look for cached entry
+    (catch 'table
+      (while cache-records
+       (if (and 
+            (lib-complete:better-root (nth 0 (car cache-records)) root)
+            (equal (nth 1 (car cache-records)) path-modtimes))
+           (throw 'table (nth 2 (car cache-records))))
+       (setq cache-records (cdr cache-records)))
+      ;; Otherwise build completions
+      (let ((completion-list 
+            (progn-with-message "(building completion table...)"
+              (library-all-completions FILE PATH nil 'fast)))
+           (completion-table (make-vector 127 0)))
+       (while completion-list
+         (let ((completion
+                (if (or (not FILTER) 
+                        (file-directory-p (car completion-list))) 
+                    (car completion-list)
+                  (funcall FILTER (car completion-list)))))
+           (if completion
+               (intern completion completion-table)))
+         (setq completion-list (cdr completion-list)))
+       ;; Cache the completions
+       (lib-complete:cache-completions key root 
+                                       path-modtimes completion-table)
+       completion-table))))
+
+(defvar lib-complete:max-cache-size 40 
+  "*Maximum number of search paths which are cached.")
+
+(defun lib-complete:cache-completions (key root modtimes table)
+  (let* ((cache-entry (assoc key lib-complete:cache))
+        (cache-records (cdr cache-entry))
+        (new-cache-records (list (list root modtimes table))))
+    (if (not cache-entry) nil
+      ;; Remove old cache entry
+      (setq lib-complete:cache (delq cache-entry lib-complete:cache))
+      ;; Copy non-redundant entries from old cache entry
+      (while cache-records
+       (if (or (equal root (nth 0 (car cache-records)))
+               (lib-complete:better-root root (nth 0 (car cache-records))))
+           nil
+         (setq new-cache-records 
+               (cons (car cache-records) new-cache-records)))
+       (setq cache-records (cdr cache-records))))
+    ;; Add entry to front of cache
+    (setq lib-complete:cache
+         (cons (cons key (nreverse new-cache-records)) lib-complete:cache))
+    ;; Trim cache
+    (let ((tail (nthcdr lib-complete:max-cache-size lib-complete:cache)))
+      (if tail (setcdr tail nil)))))
+
+;;=== Read a filename, with completion in a search path ===================
+
+(defun read-library-internal (FILE FILTER FLAG)
+  "Don't call this."
+  ;; Relies on read-library-internal-search-path being let-bound
+  (let ((completion-table
+        (lib-complete:get-completion-table
+         FILE read-library-internal-search-path FILTER)))
+    (cond
+     ((not completion-table) nil)
+     ;; Completion table is filtered before use, so the PREDICATE
+     ;; argument is redundant.
+     ((eq FLAG nil) (try-completion FILE completion-table nil))
+     ((eq FLAG t) (all-completions FILE completion-table nil))
+     ((eq FLAG 'lambda) (and (intern-soft FILE completion-table) t))
+     )))
+
+(defun read-library (PROMPT SEARCH-PATH &optional DEFAULT MUST-MATCH 
+                           FULL FILTER)
+  "Read library name, prompting with PROMPT and completing in directories
+from SEARCH-PATH.  A nil in the search path represents the current
+directory.  Completions for a given search-path are cached, with the
+cache being invalidated whenever one of the directories on the path changes.
+Default to DEFAULT if user enters a null string.
+Optional fourth arg MUST-MATCH non-nil means require existing file's name.
+  Non-nil and non-t means also require confirmation after completion.
+Optional fifth argument FULL non-nil causes a full pathname, rather than a 
+  relative pathname, to be returned.  Note that FULL implies MUST-MATCH.
+Optional sixth argument FILTER can be used to provide a function to
+  filter the completions.  This function is passed the filename, and should
+  return a transformed filename (possibly a null transformation) or nil, 
+  indicating that the filename should not be included in the completions."
+  (let* ((read-library-internal-search-path SEARCH-PATH)
+        (library (completing-read PROMPT 'read-library-internal 
+                                  FILTER (or MUST-MATCH FULL) nil)))
+    (cond 
+     ((equal library "") DEFAULT)
+     (FULL (locate-file library read-library-internal-search-path
+                       ;; decompression doesn't work with Mule -slb
+                       (if (featurep 'mule)
+                           ".el:.elc"
+                         ".el:.el.gz:.elc")))
+     (t library))))
+
+;; NOTE: as a special case, read-library may be used to read a filename
+;; relative to the current directory, returning a *relative* pathname
+;; (read-file-name returns a full pathname).
+;;
+;; eg. (read-library "Local header: " '(nil) nil)
+
+(defun get-library-path ()
+  "Front end to read-library"
+  (read-library "Find Library file: " load-path nil t t
+                 (function (lambda (fn) 
+                             (cond
+                              ;; decompression doesn't work with mule -slb
+                              ((string-match (if (featurep 'mule)
+                                                 "\\.el$"
+                                               "\\.el\\(\\.gz\\)?$") fn)
+                               (substring fn 0 (match-beginning 0))))))
+                 ))
+
+;;=== Replacement for load-library with completion ========================
+
+(defun load-library (library)
+  "Load the library named LIBRARY.
+This is an interface to the function `load'."
+  (interactive 
+   (list (read-library "Load Library: " load-path nil nil nil
+                 (function (lambda (fn) 
+                             (cond 
+                              ((string-match "\\.elc?$" fn)
+                               (substring fn 0 (match-beginning 0))))))
+                 ))) 
+  (load library))
+
+;;=== find-library with completion (Author: Heiko Muenkel) ===================
+
+(defun find-library (library &optional codesys)
+  "Find and edit the source for the library named LIBRARY.
+The extension of the LIBRARY must be omitted.
+Under XEmacs/Mule, the optional second argument specifies the
+coding system to use when decoding the file.  Interactively,
+with a prefix argument, you will be prompted for the coding system."
+  (interactive 
+   (list (get-library-path)
+        (if current-prefix-arg
+            (read-coding-system "Coding System: "))))
+  (find-file library codesys))
+
+(defun find-library-other-window (library &optional codesys)
+  "Load the library named LIBRARY in another window.
+Under XEmacs/Mule, the optional second argument specifies the
+coding system to use when decoding the file.  Interactively,
+with a prefix argument, you will be prompted for the coding system."
+  (interactive 
+   (list (get-library-path)
+        (if current-prefix-arg
+          (read-coding-system "Coding System: "))))
+  (find-file-other-window library codesys))
+
+(defun find-library-other-frame (library &optional codesys)
+  "Load the library named LIBRARY in a newly-created frame.
+Under XEmacs/Mule, the optional second argument specifies the
+coding system to use when decoding the file.  Interactively,
+with a prefix argument, you will be prompted for the coding system."
+  (interactive 
+   (list (get-library-path)
+        (if current-prefix-arg
+            (read-coding-system "Coding System: "))))
+  (find-file-other-frame library codesys))
+
+; This conflicts with an existing binding
+;(define-key global-map "\C-xl" 'find-library)
+(define-key global-map "\C-x4l" 'find-library-other-window)
+(define-key global-map "\C-x5l" 'find-library-other-frame)
+
+(provide 'lib-complete)
+
+;;; lib-complete.el ends here
diff --git a/lisp/lisp-mnt.el b/lisp/lisp-mnt.el
new file mode 100644 (file)
index 0000000..0eda679
--- /dev/null
@@ -0,0 +1,575 @@
+;;; lisp-mnt.el --- minor mode for Emacs Lisp maintainers
+
+;; Copyright (C) 1992, 1994 Free Software Foundation, Inc.
+
+;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
+;; Maintainer: Eric S. Raymond <esr@snark.thyrsus.com>
+;; Created: 14 Jul 1992
+;; Keywords: docs, maint
+;; X-Modified-by: Bob Weiner <weiner@altrasoft.com>, 4/14/95, to support
+;;  InfoDock headers.
+;; X-Bogus-Bureaucratic-Cruft: Gruad will get you if you don't watch out!
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: FSF 20.2.
+;;; Commentary:
+
+;; This minor mode adds some services to Emacs-Lisp editing mode.
+;;
+;; First, it knows about the header conventions for library packages.
+;; One entry point supports generating synopses from a library directory.
+;; Another can be used to check for missing headers in library files.
+;; 
+;; Another entry point automatically addresses bug mail to a package's
+;; maintainer or author.
+
+;; This file can be loaded by your lisp-mode-hook.  Have it (require 'lisp-mnt)
+
+;; This file is an example of the header conventions.  Note the following
+;; features:
+;; 
+;;    * Header line --- makes it possible to extract a one-line summary of
+;; the package's uses automatically for use in library synopses, KWIC
+;; indexes and the like.
+;; 
+;;    Format is three semicolons, followed by the filename, followed by
+;; three dashes, followed by the summary.  All fields space-separated.
+;; 
+;;    * Author line --- contains the name and net address of at least
+;; the principal author.
+;; 
+;;    If there are multiple authors, they should be listed on continuation
+;; lines led by ;;<TAB><TAB> (or multiple blanks), like this:
+;; 
+;; ;; Author: Ashwin Ram <Ram-Ashwin@cs.yale.edu>
+;; ;;          Dave Sill <de5@ornl.gov>
+;; ;;          David Lawrence <tale@pawl.rpi.edu>
+;; ;;          Noah Friedman <friedman@ai.mit.edu>
+;; ;;          Joe Wells <jbw@maverick.uswest.com>
+;; ;;          Dave Brennan <brennan@hal.com>
+;; ;;          Eric Raymond <esr@snark.thyrsus.com>
+;; 
+;; This field may have some special values; notably "FSF", meaning
+;; "Free Software Foundation".
+;; 
+;;    * Maintainer line --- should be a single name/address as in the Author
+;; line, or an address only, or the string "FSF".  If there is no maintainer
+;; line, the person(s) in the Author field are presumed to be it.  The example
+;; in this file is mildly bogus because the maintainer line is redundant.
+;;    The idea behind these two fields is to be able to write a Lisp function
+;; that does "send mail to the author" without having to mine the name out by
+;; hand. Please be careful about surrounding the network address with <> if
+;; there's also a name in the field.
+;; 
+;;    * Created line --- optional, gives the original creation date of the
+;; file.  For historical interest, basically.
+;; 
+;;    * Version line --- intended to give the reader a clue if they're looking
+;; at a different version of the file than the one they're accustomed to.  This
+;; may be an RCS or SCCS header.
+;; 
+;;    * Adapted-By line --- this is for FSF's internal use.  The person named
+;; in this field was the one responsible for installing and adapting the
+;; package for the distribution.  (This file doesn't have one because the
+;; author *is* one of the maintainers.)
+;; 
+;;    * Keywords line --- used by the finder code (now under construction)
+;; for finding Emacs Lisp code related to a topic.
+;;
+;;    * X-Bogus-Bureaucratic-Cruft line --- this is a joke and an example
+;; of a comment header.  Headers starting with `X-' should never be used
+;; for any real purpose; this is the way to safely add random headers
+;; without invoking the wrath of any program.
+;;
+;;    * Commentary line --- enables Lisp code to find the developer's and
+;; maintainers' explanations of the package internals.
+;; 
+;;    * Change log line --- optional, exists to terminate the commentary
+;; section and start a change-log part, if one exists.
+;; 
+;;    * Code line --- exists so Lisp can know where commentary and/or
+;; change-log sections end.
+;; 
+;;    * Footer line --- marks end-of-file so it can be distinguished from
+;; an expanded formfeed or the results of truncation.
+
+;;; Change Log:
+
+;; Tue Jul 14 23:44:17 1992    ESR
+;;     * Created.
+
+;;; Code:
+
+(require 'picture)             ; provides move-to-column-force
+;(require 'emacsbug) ; XEmacs, not needed for bytecompilation
+
+;;; Variables:
+
+(defvar lm-header-prefix "^;;*[ \t]+\\(@\(#\)\\)?[ \t]*\\([\$]\\)?"
+  "Prefix that is ignored before the tag.
+For example, you can write the 1st line synopsis string and headers like this
+in your Lisp package:
+
+   ;; @(#) package.el -- package description
+   ;;
+   ;; @(#) $Maintainer:   Person Foo Bar $
+
+The @(#) construct is used by unix what(1) and
+then $identifier: doc string $ is used by GNU ident(1)")
+
+(defvar lm-comment-column 16
+  "Column used for placing formatted output.")
+
+(defvar lm-commentary-header "Commentary\\|Documentation"
+  "Regexp which matches start of documentation section.")
+
+(defvar lm-history-header "Change Log\\|History"
+  "Regexp which matches the start of code log section.")
+
+;;; Functions:
+
+;; These functions all parse the headers of the current buffer
+
+(defsubst lm-get-header-re (header &optional mode)
+  "Returns regexp for matching HEADER.
+If called with optional MODE and with value `section',
+return section regexp instead."
+  (cond ((eq mode 'section)
+        (concat "^;;;;* " header ":[ \t]*$"))
+       (t
+        (concat lm-header-prefix header ":[ \t]*"))))
+
+(defsubst lm-get-package-name ()
+  "Returns package name by looking at the first line."
+  (save-excursion
+    (goto-char (point-min))
+    (if (and (looking-at (concat lm-header-prefix))
+            (progn (goto-char (match-end 0))
+                   (looking-at "\\([^\t ]+\\)")
+                   (match-end 1)))
+       (buffer-substring (match-beginning 1) (match-end 1))
+      )))
+
+(defun lm-section-mark (header &optional after)
+  "Return the buffer location of a given section start marker.
+The HEADER is the section mark string to search for.
+If AFTER is non-nil, return the location of the next line."
+  (save-excursion
+    (let ((case-fold-search t))
+      (goto-char (point-min))
+      (if (re-search-forward (lm-get-header-re header 'section) nil t)
+         (progn
+           (beginning-of-line)
+           (if after (forward-line 1))
+           (point))
+       nil))))
+
+(defsubst lm-code-mark ()
+  "Return the buffer location of the `Code' start marker."
+  (lm-section-mark "Code"))
+
+(defsubst lm-commentary-mark ()
+  "Return the buffer location of the `Commentary' start marker."
+  (lm-section-mark lm-commentary-header))
+
+(defsubst lm-history-mark ()
+  "Return the buffer location of the `History' start marker."
+  (lm-section-mark lm-history-header))
+
+(defun lm-header (header)
+  "Return the contents of the header named HEADER."
+  (goto-char (point-min))
+  (let ((case-fold-search t))
+    (if (and (re-search-forward (lm-get-header-re header) (lm-code-mark) t)
+            ;;   RCS ident likes format "$identifier: data$"
+            (looking-at "\\([^$\n]+\\)")
+            (match-end 1))
+       (buffer-substring (match-beginning 1) (match-end 1))
+      nil)))
+
+(defun lm-header-multiline (header)
+  "Return the contents of the header named HEADER, with continuation lines.
+The returned value is a list of strings, one per line."
+  (save-excursion
+    (goto-char (point-min))
+    (let ((res (lm-header header)))
+      (cond
+       (res
+       (setq res (list res))
+       (forward-line 1)
+
+       (while (and (looking-at (concat lm-header-prefix "[\t ]+"))
+                   (progn
+                     (goto-char (match-end 0))
+                     (looking-at "\\(.*\\)"))
+                   (match-end 1))
+         (setq res (cons (buffer-substring
+                          (match-beginning 1)
+                          (match-end 1))
+                         res))
+         (forward-line 1))
+       ))
+      res
+      )))
+
+;; These give us smart access to the header fields and commentary
+
+(defun lm-summary (&optional file)
+  "Return the one-line summary of file FILE, or current buffer if FILE is nil."
+  (save-excursion
+    (if file
+       (find-file file))
+    (goto-char (point-min))
+    (prog1
+       (if (and
+            (looking-at lm-header-prefix)
+            (progn (goto-char (match-end 0))
+                   (looking-at "[^ ]+[ \t]+--+[ \t]+\\(.*\\)")))
+           (buffer-substring (match-beginning 1) (match-end 1)))
+      (if file
+         (kill-buffer (current-buffer)))
+      )))
+
+(defun lm-crack-address (x)
+  "Split up an email address into full name and real email address.
+The value is a cons of the form (FULLNAME . ADDRESS)."
+  (cond ((string-match "\\(.+\\) [(<]\\(\\S-+@\\S-+\\)[>)]" x)
+        (cons (substring x (match-beginning 1) (match-end 1))
+              (substring x (match-beginning 2) (match-end 2))))
+       ((string-match "\\(\\S-+@\\S-+\\) [(<]\\(.*\\)[>)]" x)
+        (cons (substring x (match-beginning 2) (match-end 2))
+              (substring x (match-beginning 1) (match-end 1))))
+       ((string-match "\\S-+@\\S-+" x)
+        (cons nil x))
+       (t
+        (cons x nil))))
+
+(defun lm-authors (&optional file)
+  "Return the author list of file FILE, or current buffer if FILE is nil.
+Each element of the list is a cons; the car is the full name,
+the cdr is an email address."
+  (save-excursion
+    (if file
+       (find-file file))
+    ;; XEmacs change (Is E-MAIL an infodock header? -sb)
+    (let* ((authorlist (lm-header-multiline "author"))
+          (email-list (lm-header-multiline "E-MAIL"))
+          (authors authorlist))
+      (prog1
+         (if (null email-list)
+             (mapcar 'lm-crack-address authorlist)
+           (while (and email-list authors)
+             (setcar authors (cons (car authors) (car email-list)))
+             (setq email-list (cdr email-list)
+                   authors (cdr authors)))
+           authorlist)
+       (if file
+           (kill-buffer (current-buffer))))
+      )))
+
+(defun lm-maintainer (&optional file)
+  "Return the maintainer of file FILE, or current buffer if FILE is nil.
+The return value has the form (NAME . ADDRESS)."
+  (save-excursion
+    (if file
+       (find-file file))
+    (prog1
+       (let ((maint (lm-header "maintainer")))
+         (if maint
+             (lm-crack-address maint)
+           (car (lm-authors))))
+      (if file
+         (kill-buffer (current-buffer))))))
+
+(defun lm-creation-date (&optional file)
+  "Return the created date given in file FILE, or current buffer if FILE is nil."
+  (save-excursion
+    (if file
+       (find-file file))
+    (prog1
+       ;; XEmacs change (Is ORIG-DATE an Infodock header? -sb)
+       (or (lm-header "created")
+           (let ((date-and-time (lm-header "ORIG-DATE")))
+             (if date-and-time
+                 (substring date-and-time 0
+                            (string-match " " date-and-time)))))
+      (if file
+         (kill-buffer (current-buffer)))
+      )))
+
+(defun lm-last-modified-date (&optional file)
+  "Return the modify-date given in file FILE, or current buffer if FILE is nil."
+  (save-excursion 
+    (if file
+       (find-file file))
+    (prog1
+       (if (progn
+             (goto-char (point-min))
+             (re-search-forward
+              "\\$[I]d: [^ ]+ [^ ]+ \\([^/]+\\)/\\([^/]+\\)/\\([^ ]+\\) "
+              (lm-code-mark) t))
+           (format "%s %s %s"
+                   (buffer-substring (match-beginning 3) (match-end 3))
+                   (nth (string-to-int 
+                         (buffer-substring (match-beginning 2) (match-end 2)))
+                        '("" "Jan" "Feb" "Mar" "Apr" "May" "Jun"
+                          "Jul" "Aug" "Sep" "Oct" "Nov" "Dec"))
+                   (buffer-substring (match-beginning 1) (match-end 1)))
+         ;; XEmacs change (Infodock change? -sb)
+         (let ((date-and-time (lm-header "LAST-MOD")))
+           (if date-and-time
+               (substring date-and-time 0
+                          (string-match " " date-and-time)))))
+      (if file
+         (kill-buffer (current-buffer)))
+      )))
+
+(defun lm-version (&optional file)
+  "Return the version listed in file FILE, or current buffer if FILE is nil.
+This can befound in an RCS or SCCS header to crack it out of."
+  (save-excursion 
+    (if file
+       (find-file file))
+    (prog1
+       (or
+        (lm-header "version")
+        (let ((header-max (lm-code-mark)))
+          (goto-char (point-min))
+          (cond
+           ;; Look for an RCS header
+           ((re-search-forward "\\$[I]d: [^ ]+ \\([^ ]+\\) " header-max t)
+            (buffer-substring (match-beginning 1) (match-end 1)))
+
+           ;; Look for an SCCS header
+           ((re-search-forward 
+             (concat
+              (regexp-quote "@(#)")
+              (regexp-quote (file-name-nondirectory (buffer-file-name)))
+              "\t\\([012345679.]*\\)")
+             header-max t)
+            (buffer-substring (match-beginning 1) (match-end 1)))
+
+           (t nil))))
+      (if file
+         (kill-buffer (current-buffer)))
+      )))
+
+(defun lm-keywords (&optional file)
+  "Return the keywords given in file FILE, or current buffer if FILE is nil."
+  (save-excursion
+    (if file
+       (find-file file))
+    (prog1
+       (let ((keywords (lm-header "keywords")))
+         (and keywords (downcase keywords)))
+      (if file
+         (kill-buffer (current-buffer)))
+      )))
+
+(defun lm-adapted-by (&optional file)
+  "Return the adapted-by names in file FILE, or current buffer if FILE is nil.
+This is the name of the person who cleaned up this package for
+distribution."
+  (save-excursion
+    (if file
+       (find-file file))
+    (prog1
+       (lm-header "adapted-by")
+      (if file
+         (kill-buffer (current-buffer)))
+      )))
+
+(defun lm-commentary (&optional file)
+  "Return the commentary in file FILE, or current buffer if FILE is nil.
+The value is returned as a string.  In the text, the commentary starts
+with tag `Commentary' and ends with tag `Change Log' or `History'."
+  (save-excursion
+    (if file
+       (find-file file))
+    (prog1
+       (let ((commentary       (lm-commentary-mark))
+             (change-log       (lm-history-mark))
+             (code             (lm-code-mark))
+             )
+         (cond
+          ((and commentary change-log)
+           (buffer-substring commentary change-log))
+          ((and commentary code)
+           (buffer-substring commentary code))
+          (t
+           ;; XEmacs change (Infodock headers? -sb)
+           (setq commentary (lm-section-mark "DESCRIPTION" t)
+                 code (lm-section-mark "DESCRIP-END"))
+           (and commentary end (buffer-substring commentary code)))))
+      (if file
+         (kill-buffer (current-buffer)))
+      )))
+
+;;; Verification and synopses
+
+(defun lm-insert-at-column (col &rest strings)
+  "Insert list of STRINGS, at column COL."
+  (if (> (current-column) col) (insert "\n"))
+  (move-to-column-force col)
+  (apply 'insert strings))
+
+(defun lm-verify (&optional file showok &optional verb)
+  "Check that the current buffer (or FILE if given) is in proper format.
+If FILE is a directory, recurse on its files and generate a report in
+a temporary buffer."
+  (interactive)
+  (let* ((verb    (or verb (interactive-p)))
+        ret
+        name
+        )
+    (if verb
+       (setq ret "Ok."))               ;init value
+
+    (if (and file (file-directory-p file))
+       (setq
+        ret
+        (progn
+          (switch-to-buffer (get-buffer-create "*lm-verify*"))
+          (erase-buffer)
+          (mapcar
+           '(lambda (f)
+              (if (string-match ".*\\.el$" f)
+                  (let ((status (lm-verify f)))
+                    (if status
+                        (progn
+                          (insert f ":")
+                          (lm-insert-at-column lm-comment-column status "\n"))
+                      (and showok
+                           (progn
+                             (insert f ":")
+                             (lm-insert-at-column lm-comment-column "OK\n")))))))
+           (directory-files file))
+          ))
+      (save-excursion
+       (if file
+           (find-file file))
+       (setq name (lm-get-package-name))
+
+       (setq
+        ret
+        (prog1
+            (cond
+             ((null name)
+              "Can't find a package NAME")
+
+             ((not (lm-authors))
+              "Author: tag missing.")
+
+             ((not (lm-maintainer))
+              "Maintainer: tag missing.")
+
+             ((not (lm-summary))
+              "Can't find a one-line 'Summary' description")
+
+             ((not (lm-keywords))
+              "Keywords: tag missing.")
+
+             ((not (lm-commentary-mark))
+              "Can't find a 'Commentary' section marker.")
+
+             ((not (lm-history-mark))
+              "Can't find a 'History' section marker.")
+
+             ((not (lm-code-mark))
+              "Can't find a 'Code' section marker")
+
+             ((progn
+                (goto-char (point-max))
+                (not
+                 (re-search-backward
+                  (concat "^;;;[ \t]+" name "[ \t]+ends here[ \t]*$"
+                          "\\|^;;;[ \t]+ End of file[ \t]+" name)
+                  nil t
+                  )))
+              (format "Can't find a footer line for [%s]" name))
+             (t
+              ret))
+          (if file
+              (kill-buffer (current-buffer)))
+          ))))
+    (if verb
+       (message ret))
+    ret
+    ))
+
+(defun lm-synopsis (&optional file showall)
+  "Generate a synopsis listing for the buffer or the given FILE if given.
+If FILE is a directory, recurse on its files and generate a report in
+a temporary buffer.  If SHOWALL is non-nil, also generate a line for files
+which do not include a recognizable synopsis."
+  (interactive
+   (list
+    (read-file-name "Synopsis for (file or dir): ")))
+
+  (if (and file (file-directory-p file))
+      (progn
+       (switch-to-buffer (get-buffer-create "*lm-verify*"))
+       (erase-buffer)
+       (mapcar
+         (lambda (f) ; XEmacs - dequote
+           (if (string-match ".*\\.el$" f)
+               (let ((syn (lm-synopsis f)))
+                 (if syn
+                     (progn
+                       (insert f ":")
+                       (lm-insert-at-column lm-comment-column syn "\n"))
+                   (and showall
+                        (progn
+                          (insert f ":")
+                          (lm-insert-at-column lm-comment-column "NA\n")))))))
+         (directory-files file))
+       )
+    (save-excursion
+      (if file
+         (find-file file))
+      (prog1
+         (lm-summary)
+       (if file
+           (kill-buffer (current-buffer)))
+       ))))
+
+(defun lm-report-bug (topic)
+  "Report a bug in the package currently being visited to its maintainer.
+Prompts for bug subject.  Leaves you in a mail buffer."
+  (interactive "sBug Subject: ")
+  (let ((package       (lm-get-package-name))
+       (addr           (lm-maintainer))
+       (version        (lm-version)))
+    (mail nil
+         (if addr
+             (concat (car addr) " <" (cdr addr) ">")
+           bug-gnu-emacs)
+         topic)
+    (goto-char (point-max))
+    (insert "\nIn "
+           package
+           (if version (concat " version " version) "")
+           "\n\n")
+    (message
+     (substitute-command-keys "Type \\[mail-send] to send bug report."))))
+
+(provide 'lisp-mnt)
+
+;;; lisp-mnt.el ends here
diff --git a/lisp/lisp-mode.el b/lisp/lisp-mode.el
new file mode 100644 (file)
index 0000000..d193288
--- /dev/null
@@ -0,0 +1,1029 @@
+;;; lisp-mode.el --- Lisp mode, and its idiosyncratic commands.
+
+;; Copyright (C) 1985, 1996, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1995 Tinker Systems
+
+;; Maintainer: FSF
+;; Keywords: lisp, languages, dumped
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: FSF 19.34 (but starting to diverge).
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; The base major mode for editing Lisp code (used also for Emacs Lisp).
+;; This mode is documented in the Emacs manual
+
+;; July/05/97 slb Converted to use easymenu.
+
+;;; Code:
+
+(defgroup lisp nil
+  "Lisp support, including Emacs Lisp."
+  :group 'languages
+  :group 'development)
+
+(defvar lisp-mode-syntax-table nil)
+(defvar emacs-lisp-mode-syntax-table nil)
+(defvar lisp-mode-abbrev-table nil)
+
+;; XEmacs change
+(defvar lisp-interaction-mode-popup-menu nil)
+(defvar lisp-interaction-mode-popup-menu-1
+  (purecopy '("Lisp-Interaction"
+             ["Evaluate Last S-expression" eval-last-sexp]
+             ["Evaluate Entire Buffer"     eval-current-buffer]
+             ["Evaluate Region"        eval-region
+              :active (region-exists-p)]
+             "---"
+             ["Evaluate This Defun"      eval-defun]
+             ;; FSF says "Instrument Function for Debugging"
+             ["Debug This Defun"         edebug-defun]
+             "---"
+             ["Trace a Function"   trace-function-background]
+             ["Untrace All Functions"    untrace-all
+              :active (fboundp 'untrace-all)]
+             "---"
+             ["Comment Out Region"     comment-region
+              :active (region-exists-p)]
+             ["Indent Region"          indent-region
+              :active (region-exists-p)]
+             ["Indent Line"            lisp-indent-line]
+             "---"
+             ["Debug On Error" (setq debug-on-error (not debug-on-error))
+              :style toggle :selected debug-on-error]
+             ["Debug On Quit" (setq debug-on-quit (not debug-on-quit))
+              :style toggle :selected debug-on-quit]
+             ["Debug on Signal" (setq debug-on-signal (not debug-on-signal))
+              :style toggle :selected debug-on-signal]
+             )))
+
+(defvar emacs-lisp-mode-popup-menu nil)
+(defvar emacs-lisp-mode-popup-menu-1
+  (purecopy
+   (nconc
+    '("Emacs-Lisp"
+      ["Byte-compile This File" emacs-lisp-byte-compile]
+      ["Byte-compile/load This" emacs-lisp-byte-compile-and-load]
+      ["Byte-recompile Directory..." byte-recompile-directory]
+      "---")
+    (cdr lisp-interaction-mode-popup-menu-1))))
+
+;Don't have a menubar entry in Lisp Interaction mode.  Otherwise, the
+;*scratch* buffer has a Lisp menubar item!  Very confusing.
+;(defvar lisp-interaction-mode-menubar-menu
+;  (purecopy (cons "Lisp" (cdr lisp-interaction-mode-popup-menu))))
+
+(defvar emacs-lisp-mode-menubar-menu nil)
+(defvar emacs-lisp-mode-menubar-menu-1
+  (purecopy (cons "Lisp" (cdr emacs-lisp-mode-popup-menu-1))))
+
+(if (not emacs-lisp-mode-syntax-table)
+    (let ((i 0))
+      (setq emacs-lisp-mode-syntax-table (make-syntax-table))
+      (while (< i ?0)
+       (modify-syntax-entry i "_   " emacs-lisp-mode-syntax-table)
+       (setq i (1+ i)))
+      (setq i (1+ ?9))
+      (while (< i ?A)
+       (modify-syntax-entry i "_   " emacs-lisp-mode-syntax-table)
+       (setq i (1+ i)))
+      (setq i (1+ ?Z))
+      (while (< i ?a)
+       (modify-syntax-entry i "_   " emacs-lisp-mode-syntax-table)
+       (setq i (1+ i)))
+      (setq i (1+ ?z))
+      (while (< i 128)
+       (modify-syntax-entry i "_   " emacs-lisp-mode-syntax-table)
+       (setq i (1+ i)))
+      (modify-syntax-entry ?  "    " emacs-lisp-mode-syntax-table)
+      (modify-syntax-entry ?\t "    " emacs-lisp-mode-syntax-table)
+      (modify-syntax-entry ?\f "    " emacs-lisp-mode-syntax-table)
+      (modify-syntax-entry ?\n ">   " emacs-lisp-mode-syntax-table)
+      ;; Give CR the same syntax as newline, for selective-display.
+      (modify-syntax-entry ?\^m ">   " emacs-lisp-mode-syntax-table)
+      (modify-syntax-entry ?\; "<   " emacs-lisp-mode-syntax-table)
+      (modify-syntax-entry ?` "'   " emacs-lisp-mode-syntax-table)
+      (modify-syntax-entry ?' "'   " emacs-lisp-mode-syntax-table)
+      (modify-syntax-entry ?, "'   " emacs-lisp-mode-syntax-table)
+      ;; Used to be singlequote; changed for flonums.
+      (modify-syntax-entry ?. "_   " emacs-lisp-mode-syntax-table)
+      (modify-syntax-entry ?# "'   " emacs-lisp-mode-syntax-table)
+      (modify-syntax-entry ?\" "\"    " emacs-lisp-mode-syntax-table)
+      (modify-syntax-entry ?\\ "\\   " emacs-lisp-mode-syntax-table)
+      (modify-syntax-entry ?\( "()  " emacs-lisp-mode-syntax-table)
+      (modify-syntax-entry ?\) ")(  " emacs-lisp-mode-syntax-table)
+      (modify-syntax-entry ?\[ "(]  " emacs-lisp-mode-syntax-table)
+      (modify-syntax-entry ?\] ")[  " emacs-lisp-mode-syntax-table)))
+
+(if (not lisp-mode-syntax-table)
+    (progn (setq lisp-mode-syntax-table
+                (copy-syntax-table emacs-lisp-mode-syntax-table))
+          (modify-syntax-entry ?\| "\"   " lisp-mode-syntax-table)
+          (modify-syntax-entry ?\[ "_   " lisp-mode-syntax-table)
+          ;; XEmacs changes
+          (modify-syntax-entry ?\] "_   " lisp-mode-syntax-table)
+           ;;
+           ;; If emacs was compiled with NEW_SYNTAX, then do
+           ;;  CL's #| |# block comments.
+           (if (= 8 (length (parse-partial-sexp (point) (point))))
+               (progn
+                 (modify-syntax-entry ?#  "' 58" lisp-mode-syntax-table)
+                 (modify-syntax-entry ?|  ". 67" lisp-mode-syntax-table))
+            ;; else, old style
+            (modify-syntax-entry ?\| "\"   " lisp-mode-syntax-table))))
+
+(define-abbrev-table 'lisp-mode-abbrev-table ())
+
+(defvar lisp-imenu-generic-expression
+      '(
+       (nil 
+        "^\\s-*(def\\(un\\|subst\\|macro\\|advice\\)\\s-+\\([-A-Za-z0-9+*|:]+\\)" 2)
+       ("Variables" 
+        "^\\s-*(def\\(var\\|const\\|custom\\)\\s-+\\([-A-Za-z0-9+*|:]+\\)" 2)
+       ("Types" 
+        "^\\s-*(def\\(group\\|type\\|struct\\|class\\|ine-condition\\)\\s-+\\([-A-Za-z0-9+*|:]+\\)" 
+        2))
+
+  "Imenu generic expression for Lisp mode.  See `imenu-generic-expression'.")
+
+(defun lisp-mode-variables (lisp-syntax)
+  (cond (lisp-syntax
+        (set-syntax-table lisp-mode-syntax-table)))
+  (setq local-abbrev-table lisp-mode-abbrev-table)
+  (make-local-variable 'paragraph-start)
+  (setq paragraph-start (concat page-delimiter "\\|$" ))
+  (make-local-variable 'paragraph-separate)
+  (setq paragraph-separate paragraph-start)
+  (make-local-variable 'paragraph-ignore-fill-prefix)
+  (setq paragraph-ignore-fill-prefix t)
+  (make-local-variable 'fill-paragraph-function)
+  (setq fill-paragraph-function 'lisp-fill-paragraph)
+  ;; Adaptive fill mode gets in the way of auto-fill,
+  ;; and should make no difference for explicit fill
+  ;; because lisp-fill-paragraph should do the job.
+  (make-local-variable 'adaptive-fill-mode)
+  (setq adaptive-fill-mode nil)
+  (make-local-variable 'indent-line-function)
+  (setq indent-line-function 'lisp-indent-line)
+  (make-local-variable 'indent-region-function)
+  (setq indent-region-function 'lisp-indent-region)
+  (make-local-variable 'parse-sexp-ignore-comments)
+  (setq parse-sexp-ignore-comments t)
+  (make-local-variable 'outline-regexp)
+  (setq outline-regexp ";;; \\|(....")
+  (make-local-variable 'comment-start)
+  (setq comment-start ";")
+  ;; XEmacs change
+  (set (make-local-variable 'block-comment-start) ";;")
+  (make-local-variable 'comment-start-skip)
+  ;; Look within the line for a ; following an even number of backslashes
+  ;; after either a non-backslash or the line beginning.
+  (setq comment-start-skip "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\);+ *")
+  (make-local-variable 'comment-column)
+  (setq comment-column 40)
+  (make-local-variable 'comment-indent-function)
+  (setq comment-indent-function 'lisp-comment-indent)
+  ;; XEmacs change
+  (set (make-local-variable 'dabbrev-case-fold-search) nil)
+  (set (make-local-variable 'dabbrev-case-replace) nil)
+  (make-local-variable 'imenu-generic-expression)
+  (setq imenu-generic-expression lisp-imenu-generic-expression))
+\f
+(defvar shared-lisp-mode-map ()
+  "Keymap for commands shared by all sorts of Lisp modes.")
+
+(if shared-lisp-mode-map
+    ()
+   (setq shared-lisp-mode-map (make-sparse-keymap))
+   ;; XEmacs changes
+   (set-keymap-name shared-lisp-mode-map 'shared-lisp-mode-map)
+   (define-key shared-lisp-mode-map "\M-;" 'lisp-indent-for-comment)
+   (define-key shared-lisp-mode-map "\e\C-q" 'indent-sexp))
+
+(defvar emacs-lisp-mode-map ()
+  "Keymap for Emacs Lisp mode.
+All commands in `shared-lisp-mode-map' are inherited by this map.")
+
+(if emacs-lisp-mode-map
+    ()
+  ;; XEmacs:  Ignore FSF nconc stuff
+  (setq emacs-lisp-mode-map (make-sparse-keymap))
+  (set-keymap-name emacs-lisp-mode-map 'emacs-lisp-mode-map)
+  (set-keymap-parents emacs-lisp-mode-map (list shared-lisp-mode-map))
+  (define-key emacs-lisp-mode-map "\e\t" 'lisp-complete-symbol)
+  (define-key emacs-lisp-mode-map "\e\C-x" 'eval-defun)
+  ;; XEmacs: Not sure what the FSF menu bindings are.  I hope XEmacs
+  ;; doesn't need them.
+)
+
+(defun emacs-lisp-byte-compile ()
+  "Byte compile the file containing the current buffer."
+  (interactive)
+  (if buffer-file-name
+      ;; XEmacs change.  Force buffer save first
+      (progn
+       (save-buffer)
+       (byte-compile-file buffer-file-name))
+    (error "The buffer must be saved in a file first.")))
+
+(defun emacs-lisp-byte-compile-and-load ()
+  "Byte-compile the current file (if it has changed), then load compiled code."
+  (interactive)
+  (or buffer-file-name
+      (error "The buffer must be saved in a file first"))
+  (require 'bytecomp)
+  ;; Recompile if file or buffer has changed since last compilation.
+  (if (and (buffer-modified-p)
+          (y-or-n-p (format "save buffer %s first? " (buffer-name))))
+      (save-buffer))
+  (let ((compiled-file-name (byte-compile-dest-file buffer-file-name)))
+    (if (file-newer-than-file-p compiled-file-name buffer-file-name)
+       (load-file compiled-file-name)
+      (byte-compile-file buffer-file-name t))))
+
+(defun emacs-lisp-mode ()
+  "Major mode for editing Lisp code to run in Emacs.
+Commands:
+Delete converts tabs to spaces as it moves back.
+Blank lines separate paragraphs.  Semicolons start comments.
+\\{emacs-lisp-mode-map}
+Entry to this mode calls the value of `emacs-lisp-mode-hook'
+if that value is non-nil."
+  (interactive)
+  (kill-all-local-variables)
+  (use-local-map emacs-lisp-mode-map)
+  (set-syntax-table emacs-lisp-mode-syntax-table)
+  ;; XEmacs changes
+  (setq major-mode 'emacs-lisp-mode
+       ;; mode-popup-menu emacs-lisp-mode-popup-menu
+       mode-name "Emacs-Lisp")
+  ;; (if (and (featurep 'menubar)
+           ;; current-menubar)
+      ;; (progn
+       ;; make a local copy of the menubar, so our modes don't
+       ;; change the global menubar
+       ;; (set-buffer-menubar current-menubar)
+       ;; (add-submenu nil emacs-lisp-mode-menubar-menu)))
+  (unless emacs-lisp-mode-popup-menu
+    (easy-menu-define emacs-lisp-mode-popup-menu emacs-lisp-mode-map ""
+                     emacs-lisp-mode-popup-menu-1))
+  (easy-menu-add emacs-lisp-mode-popup-menu)
+  (lisp-mode-variables nil)
+  (run-hooks 'emacs-lisp-mode-hook))
+
+(defvar lisp-mode-map ()
+  "Keymap for ordinary Lisp mode.
+All commands in `shared-lisp-mode-map' are inherited by this map.")
+
+(if lisp-mode-map
+    ()
+  ;; XEmacs changes
+  (setq lisp-mode-map (make-sparse-keymap))
+  (set-keymap-name lisp-mode-map 'lisp-mode-map)
+  (set-keymap-parents lisp-mode-map (list shared-lisp-mode-map))
+  (define-key lisp-mode-map "\e\C-x" 'lisp-send-defun)
+  ;; gag, no.  use ilisp.  -jwz
+;;  (define-key lisp-mode-map "\C-c\C-z" 'run-lisp)
+  )
+
+(defun lisp-mode ()
+  "Major mode for editing Lisp code for Lisps other than GNU Emacs Lisp.
+Commands:
+Delete converts tabs to spaces as it moves back.
+Blank lines separate paragraphs.  Semicolons start comments.
+\\{lisp-mode-map}
+Note that `run-lisp' may be used either to start an inferior Lisp job
+or to switch back to an existing one.
+
+Entry to this mode calls the value of `lisp-mode-hook'
+if that value is non-nil."
+  (interactive)
+  (kill-all-local-variables)
+  (use-local-map lisp-mode-map)
+  (setq major-mode 'lisp-mode)
+  (setq mode-name "Lisp")
+  (lisp-mode-variables t)
+  (set-syntax-table lisp-mode-syntax-table)
+  (run-hooks 'lisp-mode-hook))
+
+;; This will do unless shell.el is loaded.
+;; XEmacs change
+(defun lisp-send-defun ()
+  "Send the current defun to the Lisp process made by \\[run-lisp]."
+  (interactive)
+  (error "Process lisp does not exist"))
+
+;; XEmacs change: emacs-lisp-mode-map is a more appropriate parent.
+(defvar lisp-interaction-mode-map ()
+  "Keymap for Lisp Interaction mode.
+All commands in `shared-lisp-mode-map' are inherited by this map.")
+
+(if lisp-interaction-mode-map
+    ()
+  ;; XEmacs set keymap our way
+  (setq lisp-interaction-mode-map (make-sparse-keymap))
+  (set-keymap-name lisp-interaction-mode-map 'lisp-interaction-mode-map)
+  (set-keymap-parents lisp-interaction-mode-map (list emacs-lisp-mode-map))
+  (define-key lisp-interaction-mode-map "\e\C-x" 'eval-defun)
+  (define-key lisp-interaction-mode-map "\e\t" 'lisp-complete-symbol)
+  (define-key lisp-interaction-mode-map "\n" 'eval-print-last-sexp))
+
+(defun lisp-interaction-mode ()
+  "Major mode for typing and evaluating Lisp forms.
+Like Lisp mode except that \\[eval-print-last-sexp] evals the Lisp expression
+before point, and prints its value into the buffer, advancing point.
+
+Commands:
+Delete converts tabs to spaces as it moves back.
+Paragraphs are separated only by blank lines.
+Semicolons start comments.
+\\{lisp-interaction-mode-map}
+Entry to this mode calls the value of `lisp-interaction-mode-hook'
+if that value is non-nil."
+  (interactive)
+  (kill-all-local-variables)
+  (use-local-map lisp-interaction-mode-map)
+  (setq major-mode 'lisp-interaction-mode)
+  (setq mode-name "Lisp Interaction")
+  ;; XEmacs change
+  ;; (setq mode-popup-menu lisp-interaction-mode-popup-menu)
+  (unless lisp-interaction-mode-popup-menu
+    (easy-menu-define lisp-interaction-mode-popup-menu
+                     lisp-interaction-mode-map
+                     ""
+                     lisp-interaction-mode-popup-menu-1))
+  (easy-menu-add lisp-interaction-mode-popup-menu)
+
+  (set-syntax-table emacs-lisp-mode-syntax-table)
+  (lisp-mode-variables nil)
+  (run-hooks 'lisp-interaction-mode-hook))
+
+(defun eval-print-last-sexp ()
+  "Evaluate sexp before point; print value into current buffer."
+  (interactive)
+  (let ((standard-output (current-buffer)))
+    (terpri)
+    (eval-last-sexp t)
+    (terpri)))
+\f
+;; XEmacs change
+(defcustom eval-interactive-verbose t
+  "*Non-nil means that interactive evaluation can print messages.
+The messages are printed when the expression is treated differently
+using `\\[eval-last-sexp]' and `\\[eval-defun]' than it than it would have been
+treated noninteractively.
+
+The printed messages are \"defvar treated as defconst\" and \"defcustom
+ evaluation forced\".  See `eval-interactive' for more details."
+  :type 'boolean
+  :group 'lisp)
+
+(defun eval-interactive (expr)
+  "Like `eval' except that it transforms defvars to defconsts.
+The evaluation of defcustom forms is forced."
+  (cond ((and (eq (car-safe expr) 'defvar)
+             (> (length expr) 2))
+        (eval (cons 'defconst (cdr expr)))
+        (when eval-interactive-verbose
+          (message "defvar treated as defconst")
+          (sit-for 1)
+          (message ""))
+        (nth 1 expr))
+       ((and (eq (car-safe expr) 'defcustom)
+             (> (length expr) 2)
+             (default-boundp (nth 1 expr)))
+        ;; Force variable to be bound
+        ;; #### defcustom might specify a different :set method.
+        (set-default (nth 1 expr) (eval (nth 2 expr)))
+        ;; And evaluate the defcustom
+        (eval expr)
+        (when eval-interactive-verbose
+          (message "defcustom evaluation forced")
+          (sit-for 1)
+          (message ""))
+        (nth 1 expr))
+       (t
+        (eval expr))))
+
+;; XEmacs change, based on Bob Weiner suggestion
+(defun eval-last-sexp (eval-last-sexp-arg-internal) ;dynamic scoping wonderment
+  "Evaluate sexp before point; print value in minibuffer.
+With argument, print output into current buffer."
+  (interactive "P")
+  (let ((standard-output (if eval-last-sexp-arg-internal (current-buffer) t))
+       (opoint (point))
+       ignore-quotes)
+    (prin1 (eval-interactive
+           (letf (((syntax-table) emacs-lisp-mode-syntax-table))
+             (save-excursion
+               ;; If this sexp appears to be enclosed in `...' then
+               ;; ignore the surrounding quotes.
+               (setq ignore-quotes (or (eq (char-after) ?\')
+                                       (eq (char-before) ?\')))
+               (forward-sexp -1)
+               ;; vladimir@cs.ualberta.ca 30-Jul-1997: skip ` in
+               ;; `variable' so that the value is returned, not the
+               ;; name.
+               (if (and ignore-quotes
+                        (eq (char-after) ?\`))
+                   (forward-char))
+               (save-restriction
+                 (narrow-to-region (point-min) opoint)
+                 (let ((expr (read (current-buffer))))
+                   (if (eq (car-safe expr) 'interactive)
+                       ;; If it's an (interactive ...) form, it's
+                       ;; more useful to show how an interactive call
+                       ;; would use it.
+                       `(call-interactively
+                         (lambda (&rest args)
+                           ,expr args))
+                     expr)))))))))
+
+(defun eval-defun (eval-defun-arg-internal)
+  "Evaluate defun that point is in or before.
+Print value in minibuffer.
+With argument, insert value in current buffer after the defun."
+  (interactive "P")
+  (let ((standard-output (if eval-defun-arg-internal (current-buffer) t)))
+    (prin1 (eval-interactive (save-excursion
+                              (end-of-defun)
+                              (beginning-of-defun)
+                              (read (current-buffer)))))))
+
+\f
+(defun lisp-comment-indent ()
+  (if (looking-at "\\s<\\s<\\s<")
+      (current-column)
+    (if (looking-at "\\s<\\s<")
+       ;; #### FSF has:
+       ;; (let ((tem (or (calculate-lisp-indent) (current-column)))) ...
+       (let ((tem (calculate-lisp-indent)))
+         (if (listp tem) (car tem) tem))
+      (skip-chars-backward " \t")
+      (max (if (bolp) 0 (1+ (current-column)))
+          comment-column))))
+
+;; XEmacs change
+(defun lisp-indent-for-comment ()
+  "Indent this line's comment appropriately, or insert an empty comment.
+If adding a new comment on a blank line, use `block-comment-start' instead
+of `comment-start' to open the comment."
+  ;; by Stig@hackvan.com
+  ;; #### - This functionality, the recognition of block-comment-{start,end},
+  ;; will perhaps be standardized across modes and move to indent-for-comment.
+  (interactive)
+  (if (and block-comment-start
+          (save-excursion (beginning-of-line) (looking-at "^[ \t]*$")))
+      (insert block-comment-start))
+  (indent-for-comment))
+
+(defvar lisp-indent-offset nil)
+(defvar lisp-indent-function 'lisp-indent-function)
+
+(defun lisp-indent-line (&optional whole-exp)
+  "Indent current line as Lisp code.
+With argument, indent any additional lines of the same expression
+rigidly along with this one."
+  (interactive "P")
+  (let ((indent (calculate-lisp-indent)) shift-amt beg end
+       (pos (- (point-max) (point))))
+    (beginning-of-line)
+    (setq beg (point))
+    (skip-chars-forward " \t")
+    (if (looking-at "\\s<\\s<\\s<")
+       ;; Don't alter indentation of a ;;; comment line.
+       (goto-char (- (point-max) pos))
+      (if (and (looking-at "\\s<") (not (looking-at "\\s<\\s<")))
+         ;; Single-semicolon comment lines should be indented
+         ;; as comment lines, not as code.
+         (progn (indent-for-comment) (forward-char -1))
+       (if (listp indent) (setq indent (car indent)))
+       (setq shift-amt (- indent (current-column)))
+       (if (zerop shift-amt)
+           nil
+         (delete-region beg (point))
+         (indent-to indent)))
+      ;; If initial point was within line's indentation,
+      ;; position after the indentation.  Else stay at same point in text.
+      (if (> (- (point-max) pos) (point))
+         (goto-char (- (point-max) pos)))
+      ;; If desired, shift remaining lines of expression the same amount.
+      (and whole-exp (not (zerop shift-amt))
+          (save-excursion
+            (goto-char beg)
+            (forward-sexp 1)
+            (setq end (point))
+            (goto-char beg)
+            (forward-line 1)
+            (setq beg (point))
+            (> end beg))
+          (indent-code-rigidly beg end shift-amt)))))
+
+(defvar calculate-lisp-indent-last-sexp)
+
+(defun calculate-lisp-indent (&optional parse-start)
+  "Return appropriate indentation for current line as Lisp code.
+In usual case returns an integer: the column to indent to.
+Can instead return a list, whose car is the column to indent to.
+This means that following lines at the same level of indentation
+should not necessarily be indented the same way.
+The second element of the list is the buffer position
+of the start of the containing expression."
+  (save-excursion
+    (beginning-of-line)
+    (let ((indent-point (point))
+         ;; XEmacs change (remove paren-depth)
+          state ;;paren-depth
+          ;; setting this to a number inhibits calling hook
+          (desired-indent nil)
+          (retry t)
+          calculate-lisp-indent-last-sexp containing-sexp)
+      (if parse-start
+          (goto-char parse-start)
+          (beginning-of-defun))
+      ;; Find outermost containing sexp
+      (while (< (point) indent-point)
+        (setq state (parse-partial-sexp (point) indent-point 0)))
+      ;; Find innermost containing sexp
+      (while (and retry
+                 state
+                 ;; XEmacs change (remove paren-depth)
+                  (> ;;(setq paren-depth (elt state 0))
+                    (elt state 0)
+                    0))
+        (setq retry nil)
+        (setq calculate-lisp-indent-last-sexp (elt state 2))
+        (setq containing-sexp (elt state 1))
+        ;; Position following last unclosed open.
+        (goto-char (1+ containing-sexp))
+        ;; Is there a complete sexp since then?
+        (if (and calculate-lisp-indent-last-sexp
+                (> calculate-lisp-indent-last-sexp (point)))
+            ;; Yes, but is there a containing sexp after that?
+            (let ((peek (parse-partial-sexp calculate-lisp-indent-last-sexp
+                                           indent-point 0)))
+              (if (setq retry (car (cdr peek))) (setq state peek)))))
+      (if retry
+          nil
+        ;; Innermost containing sexp found
+        (goto-char (1+ containing-sexp))
+        (if (not calculate-lisp-indent-last-sexp)
+           ;; indent-point immediately follows open paren.
+           ;; Don't call hook.
+            (setq desired-indent (current-column))
+         ;; Find the start of first element of containing sexp.
+         (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)
+         (cond ((looking-at "\\s(")
+                ;; First element of containing sexp is a list.
+                ;; Indent under that list.
+                )
+               ((> (save-excursion (forward-line 1) (point))
+                   calculate-lisp-indent-last-sexp)
+                ;; This is the first line to start within the containing sexp.
+                ;; It's almost certainly a function call.
+                (if (= (point) calculate-lisp-indent-last-sexp)
+                    ;; Containing sexp has nothing before this line
+                    ;; except the first element.  Indent under that element.
+                    nil
+                  ;; Skip the first element, find start of second (the first
+                  ;; argument of the function call) and indent under.
+                  (progn (forward-sexp 1)
+                         (parse-partial-sexp (point)
+                                             calculate-lisp-indent-last-sexp
+                                             0 t)))
+                (backward-prefix-chars))
+               (t
+                ;; Indent beneath first sexp on same line as
+                ;; calculate-lisp-indent-last-sexp.  Again, it's
+                ;; almost certainly a function call.
+                (goto-char calculate-lisp-indent-last-sexp)
+                (beginning-of-line)
+                (parse-partial-sexp (point) calculate-lisp-indent-last-sexp
+                                    0 t)
+                (backward-prefix-chars)))))
+      ;; Point is at the point to indent under unless we are inside a string.
+      ;; Call indentation hook except when overridden by lisp-indent-offset
+      ;; or if the desired indentation has already been computed.
+      (let ((normal-indent (current-column)))
+        (cond ((elt state 3)
+               ;; Inside a string, don't change indentation.
+               (goto-char indent-point)
+               (skip-chars-forward " \t")
+               (current-column))
+              (desired-indent)
+              ((and (boundp 'lisp-indent-function)
+                    lisp-indent-function
+                    (not retry))
+               (or (funcall lisp-indent-function indent-point state)
+                   normal-indent))
+             ;; XEmacs change:
+              ;; lisp-indent-offset shouldn't override lisp-indent-function !
+              ((and (integerp lisp-indent-offset) containing-sexp)
+               ;; Indent by constant offset
+               (goto-char containing-sexp)
+               (+ normal-indent lisp-indent-offset))
+              (t
+               normal-indent))))))
+
+(defun lisp-indent-function (indent-point state)
+  ;; free reference to `calculate-lisp-indent-last-sexp'
+  ;; in #'calculate-lisp-indent
+  (let ((normal-indent (current-column)))
+    (goto-char (1+ (elt state 1)))
+    (parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)
+    (if (and (elt state 2)
+             (not (looking-at "\\sw\\|\\s_")))
+        ;; car of form doesn't seem to be a a symbol
+        (progn
+          (if (not (> (save-excursion (forward-line 1) (point))
+                      calculate-lisp-indent-last-sexp))
+              (progn (goto-char calculate-lisp-indent-last-sexp)
+                     (beginning-of-line)
+                     (parse-partial-sexp (point)
+                                        calculate-lisp-indent-last-sexp 0 t)))
+          ;; Indent under the list or under the first sexp on the same
+          ;; line as calculate-lisp-indent-last-sexp.  Note that first
+          ;; thing on that line has to be complete sexp since we are
+          ;; inside the innermost containing sexp.
+          (backward-prefix-chars)
+          (current-column))
+      (let ((function (buffer-substring (point)
+                                       (progn (forward-sexp 1) (point))))
+           method)
+       (setq method (or (get (intern-soft function) 'lisp-indent-function)
+                        (get (intern-soft function) 'lisp-indent-hook)))
+       (cond ((or (eq method 'defun)
+                  (and (null method)
+                       (> (length function) 3)
+                       (string-match "\\`def" function)))
+              (lisp-indent-defform state indent-point))
+             ((integerp method)
+              (lisp-indent-specform method state
+                                    indent-point normal-indent))
+             (method
+               (funcall method state indent-point)))))))
+
+(defvar lisp-body-indent 2
+  "Number of columns to indent the second line of a `(def...)' form.")
+
+(defun lisp-indent-specform (count state indent-point normal-indent)
+  (let ((containing-form-start (elt state 1))
+        (i count)
+        body-indent containing-form-column)
+    ;; Move to the start of containing form, calculate indentation
+    ;; to use for non-distinguished forms (> count), and move past the
+    ;; function symbol.  lisp-indent-function guarantees that there is at
+    ;; least one word or symbol character following open paren of containing
+    ;; form.
+    (goto-char containing-form-start)
+    (setq containing-form-column (current-column))
+    (setq body-indent (+ lisp-body-indent containing-form-column))
+    (forward-char 1)
+    (forward-sexp 1)
+    ;; Now find the start of the last form.
+    (parse-partial-sexp (point) indent-point 1 t)
+    (while (and (< (point) indent-point)
+                (condition-case ()
+                    (progn
+                      (setq count (1- count))
+                      (forward-sexp 1)
+                      (parse-partial-sexp (point) indent-point 1 t))
+                  (error nil))))
+    ;; Point is sitting on first character of last (or count) sexp.
+    (if (> count 0)
+        ;; A distinguished form.  If it is the first or second form use double
+        ;; lisp-body-indent, else normal indent.  With lisp-body-indent bound
+        ;; to 2 (the default), this just happens to work the same with if as
+        ;; the older code, but it makes unwind-protect, condition-case,
+        ;; with-output-to-temp-buffer, et. al. much more tasteful.  The older,
+        ;; less hacked, behavior can be obtained by replacing below with
+        ;; (list normal-indent containing-form-start).
+        (if (<= (- i count) 1)
+            (list (+ containing-form-column (* 2 lisp-body-indent))
+                  containing-form-start)
+            (list normal-indent containing-form-start))
+      ;; A non-distinguished form.  Use body-indent if there are no
+      ;; distinguished forms and this is the first undistinguished form,
+      ;; or if this is the first undistinguished form and the preceding
+      ;; distinguished form has indentation at least as great as body-indent.
+      (if (or (and (= i 0) (= count 0))
+              (and (= count 0) (<= body-indent normal-indent)))
+          body-indent
+          normal-indent))))
+
+(defun lisp-indent-defform (state indent-point)
+  (goto-char (car (cdr state)))
+  (forward-line 1)
+  (if (> (point) (car (cdr (cdr state))))
+      (progn
+       (goto-char (car (cdr state)))
+       (+ lisp-body-indent (current-column)))))
+
+\f
+;; (put 'progn 'lisp-indent-function 0), say, causes progn to be indented
+;; like defun if the first form is placed on the next line, otherwise
+;; it is indented like any other form (i.e. forms line up under first).
+
+(put 'lambda 'lisp-indent-function 'defun)
+(put 'autoload 'lisp-indent-function 'defun)
+(put 'progn 'lisp-indent-function 0)
+(put 'prog1 'lisp-indent-function 1)
+(put 'prog2 'lisp-indent-function 2)
+(put 'save-excursion 'lisp-indent-function 0)
+(put 'save-window-excursion 'lisp-indent-function 0)
+(put 'save-selected-window 'lisp-indent-function 0)
+(put 'save-selected-frame 'lisp-indent-function 0)
+(put 'with-selected-frame 'lisp-indent-function 1)
+(put 'save-restriction 'lisp-indent-function 0)
+(put 'save-match-data 'lisp-indent-function 0)
+(put 'let 'lisp-indent-function 1)
+(put 'let* 'lisp-indent-function 1)
+(put 'let-specifier 'lisp-indent-function 1)
+(put 'while 'lisp-indent-function 1)
+(put 'if 'lisp-indent-function 2)
+(put 'catch 'lisp-indent-function 1)
+(put 'condition-case 'lisp-indent-function 2)
+(put 'call-with-condition-handler 'lisp-indent-function 2)
+(put 'unwind-protect 'lisp-indent-function 1)
+(put 'save-current-buffer 'lisp-indent-function 0)
+(put 'with-current-buffer 'lisp-indent-function 1)
+(put 'with-temp-file 'lisp-indent-function 1)
+(put 'with-temp-buffer 'lisp-indent-function 0)
+(put 'with-output-to-string 'lisp-indent-function 0)
+(put 'with-output-to-temp-buffer 'lisp-indent-function 1)
+(put 'eval-after-load 'lisp-indent-function 1)
+(put 'display-message 'lisp-indent-function 1)
+(put 'display-warning 'lisp-indent-function 1)
+(put 'lmessage 'lisp-indent-function 2)
+(put 'lwarn 'lisp-indent-function 2)
+(put 'global-set-key 'lisp-indent-function 1)
+
+(defun indent-sexp (&optional endpos)
+  "Indent each line of the list starting just after point.
+If optional arg ENDPOS is given, indent each line, stopping when
+ENDPOS is encountered."
+  (interactive)
+  (let ((indent-stack (list nil))
+       (next-depth 0)
+       ;; If ENDPOS is non-nil, use nil as STARTING-POINT
+       ;; so that calculate-lisp-indent will find the beginning of
+       ;; the defun we are in.
+       ;; If ENDPOS is nil, it is safe not to scan before point
+       ;; since every line we indent is more deeply nested than point is.
+       (starting-point (if endpos nil (point)))
+       (last-point (point))
+       last-depth bol outer-loop-done inner-loop-done state this-indent)
+    (or endpos
+       ;; Get error now if we don't have a complete sexp after point.
+       (save-excursion (forward-sexp 1)))
+    (save-excursion
+      (setq outer-loop-done nil)
+      (while (if endpos (< (point) endpos)
+              (not outer-loop-done))
+       (setq last-depth next-depth
+             inner-loop-done nil)
+       ;; Parse this line so we can learn the state
+       ;; to indent the next line.
+       ;; This inner loop goes through only once
+       ;; unless a line ends inside a string.
+       (while (and (not inner-loop-done)
+                   (not (setq outer-loop-done (eobp))))
+         (setq state (parse-partial-sexp (point) (progn (end-of-line) (point))
+                                         nil nil state))
+         (setq next-depth (car state))
+         ;; If the line contains a comment other than the sort
+         ;; that is indented like code,
+         ;; indent it now with indent-for-comment.
+         ;; Comments indented like code are right already.
+         ;; In any case clear the in-comment flag in the state
+         ;; because parse-partial-sexp never sees the newlines.
+         (if (car (nthcdr 4 state))
+             (progn (indent-for-comment)
+                    (end-of-line)
+                    (setcar (nthcdr 4 state) nil)))
+         ;; If this line ends inside a string,
+         ;; go straight to next line, remaining within the inner loop,
+         ;; and turn off the \-flag.
+         (if (car (nthcdr 3 state))
+             (progn
+               (forward-line 1)
+               (setcar (nthcdr 5 state) nil))
+           (setq inner-loop-done t)))
+       (and endpos
+            (<= next-depth 0)
+            (progn
+              (setq indent-stack (append indent-stack
+                                         (make-list (- next-depth) nil))
+                    last-depth (- last-depth next-depth)
+                    next-depth 0)))
+       (or outer-loop-done endpos
+           (setq outer-loop-done (<= next-depth 0)))
+       (if outer-loop-done
+           (forward-line 1)
+         (while (> last-depth next-depth)
+           (setq indent-stack (cdr indent-stack)
+                 last-depth (1- last-depth)))
+         (while (< last-depth next-depth)
+           (setq indent-stack (cons nil indent-stack)
+                 last-depth (1+ last-depth)))
+         ;; Now go to the next line and indent it according
+         ;; to what we learned from parsing the previous one.
+         (forward-line 1)
+         (setq bol (point))
+         (skip-chars-forward " \t")
+         ;; But not if the line is blank, or just a comment
+         ;; (except for double-semi comments; indent them as usual).
+         (if (or (eobp) (looking-at "\\s<\\|\n"))
+             nil
+           (if (and (car indent-stack)
+                    (>= (car indent-stack) 0))
+               (setq this-indent (car indent-stack))
+             (let ((val (calculate-lisp-indent
+                         (if (car indent-stack) (- (car indent-stack))
+                           starting-point))))
+               (if (integerp val)
+                   (setcar indent-stack
+                           (setq this-indent val))
+                 (setcar indent-stack (- (car (cdr val))))
+                 (setq this-indent (car val)))))
+           (if (/= (current-column) this-indent)
+               (progn (delete-region bol (point))
+                      (indent-to this-indent)))))
+       (or outer-loop-done
+           (setq outer-loop-done (= (point) last-point))
+           (setq last-point (point)))))))
+
+;; Indent every line whose first char is between START and END inclusive.
+(defun lisp-indent-region (start end)
+  (save-excursion
+    (let ((endmark (copy-marker end)))
+      (goto-char start)
+      (and (bolp) (not (eolp))
+          (lisp-indent-line))
+      (indent-sexp endmark)
+      (set-marker endmark nil))))
+\f
+;;;; Lisp paragraph filling commands.
+
+(defun lisp-fill-paragraph (&optional justify)
+  "Like \\[fill-paragraph], but handle Emacs Lisp comments.
+If any of the current line is a comment, fill the comment or the
+paragraph of it that point is in, preserving the comment's indentation
+and initial semicolons."
+  (interactive "P")
+  (let (
+       ;; Non-nil if the current line contains a comment.
+       has-comment
+
+       ;; Non-nil if the current line contains code and a comment.
+       has-code-and-comment
+
+       ;; If has-comment, the appropriate fill-prefix for the comment.
+       comment-fill-prefix
+       )
+
+    ;; Figure out what kind of comment we are looking at.
+    (save-excursion
+      (beginning-of-line)
+      (cond
+
+       ;; A line with nothing but a comment on it?
+       ((looking-at "[ \t]*;[; \t]*")
+       (setq has-comment t
+             comment-fill-prefix (buffer-substring (match-beginning 0)
+                                                   (match-end 0))))
+
+       ;; A line with some code, followed by a comment?  Remember that the
+       ;; semi which starts the comment shouldn't be part of a string or
+       ;; character.
+       ;; XEmacs Try this the FSF and see if it works.
+;       ((progn
+;        (while (not (looking-at ";\\|$"))
+;          (skip-chars-forward "^;\n\"\\\\?")
+;          (cond
+;           ((eq (char-after (point)) ?\\) (forward-char 2))
+;           ((memq (char-after (point)) '(?\" ??)) (forward-sexp 1))))
+;        (looking-at ";+[\t ]*"))
+;      (setq has-comment t)
+       ((condition-case nil
+           (save-restriction
+             (narrow-to-region (point-min)
+                               (save-excursion (end-of-line) (point)))
+             (while (not (looking-at ";\\|$"))
+               (skip-chars-forward "^;\n\"\\\\?")
+               (cond
+                ((eq (char-after (point)) ?\\) (forward-char 2))
+                ((memq (char-after (point)) '(?\" ??)) (forward-sexp 1))))
+             (looking-at ";+[\t ]*"))
+         (error nil))
+       (setq has-comment t has-code-and-comment t)
+       (setq comment-fill-prefix
+             (concat (make-string (/ (current-column) 8) ?\t)
+                     (make-string (% (current-column) 8) ?\ )
+                     (buffer-substring (match-beginning 0) (match-end 0)))))))
+
+    (if (not has-comment)
+       (fill-paragraph justify)
+
+      ;; Narrow to include only the comment, and then fill the region.
+      (save-excursion
+       (save-restriction
+         (beginning-of-line)
+         (narrow-to-region
+          ;; Find the first line we should include in the region to fill.
+          (save-excursion
+            (while (and (zerop (forward-line -1))
+                        (looking-at "^[ \t]*;")))
+            ;; We may have gone too far.  Go forward again.
+            (or (looking-at ".*;")
+                (forward-line 1))
+            (point))
+          ;; Find the beginning of the first line past the region to fill.
+          (save-excursion
+            (while (progn (forward-line 1)
+                          (looking-at "^[ \t]*;")))
+            (point)))
+
+         ;; Lines with only semicolons on them can be paragraph boundaries.
+         (let* ((paragraph-start (concat paragraph-start "\\|[ \t;]*$"))
+                (paragraph-separate (concat paragraph-start "\\|[ \t;]*$"))
+                (paragraph-ignore-fill-prefix nil)
+                (fill-prefix comment-fill-prefix)
+                (after-line (if has-code-and-comment
+                                (save-excursion
+                                  (forward-line 1) (point))))
+                (end (progn
+                       (forward-paragraph)
+                       (or (bolp) (newline 1))
+                       (point)))
+                ;; If this comment starts on a line with code,
+                ;; include that like in the filling.
+                (beg (progn (backward-paragraph)
+                            (if (eq (point) after-line)
+                                (forward-line -1))
+                            (point))))
+           (fill-region-as-paragraph beg end
+                                     justify nil
+                                     (save-excursion
+                                       (goto-char beg)
+                                       (if (looking-at fill-prefix)
+                                           nil
+                                         (re-search-forward comment-start-skip)
+                                         (point))))))))
+    t))
+\f
+(defun indent-code-rigidly (start end arg &optional nochange-regexp)
+  "Indent all lines of code, starting in the region, sideways by ARG columns.
+Does not affect lines starting inside comments or strings, assuming that
+the start of the region is not inside them.
+
+Called from a program, takes args START, END, COLUMNS and NOCHANGE-REGEXP.
+The last is a regexp which, if matched at the beginning of a line,
+means don't indent that line."
+  (interactive "r\np")
+  (let (state)
+    (save-excursion
+      (goto-char end)
+      (setq end (point-marker))
+      (goto-char start)
+      (or (bolp)
+         (setq state (parse-partial-sexp (point)
+                                         (progn
+                                           (forward-line 1) (point))
+                                         nil nil state)))
+      (while (< (point) end)
+       (or (car (nthcdr 3 state))
+           (and nochange-regexp
+                (looking-at nochange-regexp))
+           ;; If line does not start in string, indent it
+           (let ((indent (current-indentation)))
+             (delete-region (point) (progn (skip-chars-forward " \t") (point)))
+             (or (eolp)
+                 (indent-to (max 0 (+ indent arg)) 0))))
+       (setq state (parse-partial-sexp (point)
+                                       (progn
+                                         (forward-line 1) (point))
+                                       nil nil state))))))
+
+(provide 'lisp-mode)
+
+;;; lisp-mode.el ends here
diff --git a/lisp/lisp.el b/lisp/lisp.el
new file mode 100644 (file)
index 0000000..5878e23
--- /dev/null
@@ -0,0 +1,357 @@
+;;; lisp.el --- Lisp editing commands for XEmacs
+
+;; Copyright (C) 1985, 1986, 1994, 1997 Free Software Foundation, Inc.
+
+;; Maintainer: FSF
+;; Keywords: lisp, languages, dumped
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Emacs/Mule zeta.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; Lisp editing commands to go with Lisp major mode.
+
+;; 06/11/1997 - Use char-(after|before) instead of
+;;  (following|preceding)-char. -slb
+
+;;; Code:
+
+;; Note that this variable is used by non-lisp modes too.
+(defcustom defun-prompt-regexp nil
+  "*Non-nil => regexp to ignore, before the character that starts a defun.
+This is only necessary if the opening paren or brace is not in column 0.
+See `beginning-of-defun'."
+  :type '(choice (const :tag "none" nil)
+                regexp)
+  :group 'lisp)
+
+(make-variable-buffer-local 'defun-prompt-regexp)
+
+(defcustom parens-require-spaces t
+  "Non-nil => `insert-parentheses' should insert whitespace as needed."
+  :type 'boolean
+  :group 'editing-basics
+  :group 'lisp)
+
+(defun forward-sexp (&optional arg)
+  "Move forward across one balanced expression (sexp).
+With argument, do it that many times.  Negative arg -N means
+move backward across N balanced expressions."
+  ;; XEmacs change (for zmacs regions)
+  (interactive "_p")
+  (or arg (setq arg 1))
+  ;; XEmacs: evil hack! The other half of the evil hack below.
+  (if (and (> arg 0) (looking-at "#s("))
+      (goto-char (+ (point) 2)))
+  (goto-char (or (scan-sexps (point) arg) (buffer-end arg)))
+  (if (< arg 0) (backward-prefix-chars))
+  ;; XEmacs: evil hack! Skip back over #s so that structures are read
+  ;; properly.  the current cheesified syntax tables just aren't up to
+  ;; this.
+  (if (and (< arg 0)
+          (eq (char-after (point)) ?\()
+          (>= (- (point) (point-min)) 2)
+          (eq (char-after (- (point) 1)) ?s)
+          (eq (char-after (- (point) 2)) ?#))
+      (goto-char (- (point) 2))))
+
+(defun backward-sexp (&optional arg)
+  "Move backward across one balanced expression (sexp).
+With argument, do it that many times.  Negative arg -N means
+move forward across N balanced expressions."
+  ;; XEmacs change (for zmacs regions)
+  (interactive "_p")
+  (or arg (setq arg 1))
+  (forward-sexp (- arg)))
+
+(defun mark-sexp (arg)
+  "Set mark ARG sexps from point.
+The place mark goes is the same place \\[forward-sexp] would
+move to with the same argument.
+Repeat this command to mark more sexps in the same direction."
+  (interactive "p")
+  ;; XEmacs change
+  (mark-something 'mark-sexp 'forward-sexp arg))
+
+(defun forward-list (&optional arg)
+  "Move forward across one balanced group of parentheses.
+With argument, do it that many times.
+Negative arg -N means move backward across N groups of parentheses."
+  ;; XEmacs change
+  (interactive "_p")
+  (or arg (setq arg 1))
+  (goto-char (or (scan-lists (point) arg 0) (buffer-end arg))))
+
+(defun backward-list (&optional arg)
+  "Move backward across one balanced group of parentheses.
+With argument, do it that many times.
+Negative arg -N means move forward across N groups of parentheses."
+  ;; XEmacs change (for zmacs regions)
+  (interactive "_p")
+  (or arg (setq arg 1))
+  (forward-list (- arg)))
+
+(defun down-list (arg)
+  "Move forward down one level of parentheses.
+With argument, do this that many times.
+A negative argument means move backward but still go down a level.
+In Lisp programs, an argument is required."
+  ;; XEmacs change (for zmacs regions)
+  (interactive "_p")
+  (let ((inc (if (> arg 0) 1 -1)))
+    (while (/= arg 0)
+      (goto-char (or (scan-lists (point) inc -1) (buffer-end arg)))
+      (setq arg (- arg inc)))))
+
+(defun backward-up-list (arg)
+  "Move backward out of one level of parentheses.
+With argument, do this that many times.
+A negative argument means move forward but still to a less deep spot.
+In Lisp programs, an argument is required."
+  (interactive "_p")
+  (up-list (- arg)))
+
+(defun up-list (arg) 
+  "Move forward out of one level of parentheses.
+With argument, do this that many times.
+A negative argument means move backward but still to a less deep spot.
+In Lisp programs, an argument is required."
+  ;; XEmacs change (for zmacs regions)
+  (interactive "_p")
+  (let ((inc (if (> arg 0) 1 -1)))
+    (while (/= arg 0)
+      (goto-char (or (scan-lists (point) inc 1) (buffer-end arg)))
+      (setq arg (- arg inc)))))
+
+(defun kill-sexp (arg)
+  "Kill the sexp (balanced expression) following the cursor.
+With argument, kill that many sexps after the cursor.
+Negative arg -N means kill N sexps before the cursor."
+  (interactive "p")
+  (let ((opoint (point)))
+    (forward-sexp arg)
+    (kill-region opoint (point))))
+
+(defun backward-kill-sexp (arg)
+  "Kill the sexp (balanced expression) preceding the cursor.
+With argument, kill that many sexps before the cursor.
+Negative arg -N means kill N sexps after the cursor."
+  (interactive "p")
+  (kill-sexp (- arg)))
+\f
+(defun beginning-of-defun (&optional arg)
+  "Move backward to the beginning of a defun.
+With argument, do it that many times.  Negative arg -N
+means move forward to Nth following beginning of defun.
+Returns t unless search stops due to beginning or end of buffer.
+
+Normally a defun starts when there is an char with open-parenthesis
+syntax at the beginning of a line.  If `defun-prompt-regexp' is
+non-nil, then a string which matches that regexp may precede the
+open-parenthesis, and point ends up at the beginning of the line."
+  ;; XEmacs change (for zmacs regions)
+  (interactive "_p")
+  (and (beginning-of-defun-raw arg)
+       (progn (beginning-of-line) t)))
+
+(defun beginning-of-defun-raw (&optional arg)
+  "Move point to the character that starts a defun.
+This is identical to beginning-of-defun, except that point does not move
+to the beginning of the line when `defun-prompt-regexp' is non-nil."
+  (interactive "p")
+  (and arg (< arg 0) (not (eobp)) (forward-char 1))
+  (and (re-search-backward (if defun-prompt-regexp
+                              (concat "^\\s(\\|"
+                                      "\\(" defun-prompt-regexp "\\)\\s(")
+                            "^\\s(")
+                          nil 'move (or arg 1))
+       (progn (goto-char (1- (match-end 0)))) t))
+
+;; XEmacs change (optional buffer parameter)
+(defun buffer-end (arg &optional buffer)
+  "Return `point-max' of BUFFER if ARG is > 0; return `point-min' otherwise.
+BUFFER defaults to the current buffer if omitted."
+  (if (> arg 0) (point-max buffer) (point-min buffer)))
+
+(defun end-of-defun (&optional arg)
+  "Move forward to next end of defun.  With argument, do it that many times.
+Negative argument -N means move back to Nth preceding end of defun.
+
+An end of a defun occurs right after the close-parenthesis that matches
+the open-parenthesis that starts a defun; see `beginning-of-defun'."
+  ;; XEmacs change (for zmacs regions)
+  (interactive "_p")
+  (if (or (null arg) (= arg 0)) (setq arg 1))
+  (let ((first t))
+    (while (and (> arg 0) (< (point) (point-max)))
+      (let ((pos (point))) ; XEmacs -- remove unused npos.
+       (while (progn
+               (if (and first
+                        (progn
+                         (end-of-line 1)
+                         (beginning-of-defun-raw 1)))
+                   nil
+                 (or (bobp) (forward-char -1))
+                 (beginning-of-defun-raw -1))
+               (setq first nil)
+               (forward-list 1)
+               (skip-chars-forward " \t")
+               (if (looking-at "\\s<\\|\n")
+                   (forward-line 1))
+               (<= (point) pos))))
+      (setq arg (1- arg)))
+    (while (< arg 0)
+      (let ((pos (point)))
+       (beginning-of-defun-raw 1)
+       (forward-sexp 1)
+       (forward-line 1)
+       (if (>= (point) pos)
+           (if (beginning-of-defun-raw 2)
+               (progn
+                 (forward-list 1)
+                 (skip-chars-forward " \t")
+                 (if (looking-at "\\s<\\|\n")
+                     (forward-line 1)))
+             (goto-char (point-min)))))
+      (setq arg (1+ arg)))))
+
+(defun mark-defun ()
+  "Put mark at end of this defun, point at beginning.
+The defun marked is the one that contains point or follows point."
+  (interactive)
+  (push-mark (point))
+  (end-of-defun)
+  (push-mark (point) nil t)
+  (beginning-of-defun)
+  (re-search-backward "^\n" (- (point) 1) t))
+
+(defun narrow-to-defun (&optional arg)
+  "Make text outside current defun invisible.
+The defun visible is the one that contains point or follows point."
+  (interactive)
+  (save-excursion
+    (widen)
+    (end-of-defun)
+    (let ((end (point)))
+      (beginning-of-defun)
+      (narrow-to-region (point) end))))
+
+(defun insert-parentheses (arg)
+  "Enclose following ARG sexps in parentheses.  Leave point after open-paren.
+A negative ARG encloses the preceding ARG sexps instead.
+No argument is equivalent to zero: just insert `()' and leave point between.
+If `parens-require-spaces' is non-nil, this command also inserts a space
+before and after, depending on the surrounding characters."
+  (interactive "P")
+  (if arg (setq arg (prefix-numeric-value arg))
+    (setq arg 0))
+  (cond ((> arg 0) (skip-chars-forward " \t"))
+       ((< arg 0) (forward-sexp arg) (setq arg (- arg))))
+  (and parens-require-spaces
+       (not (bobp))
+       (memq (char-syntax (char-before (point))) '(?w ?_ ?\) ))
+       (insert " "))
+  (insert ?\()
+  (save-excursion
+    (or (eq arg 0) (forward-sexp arg))
+    (insert ?\))
+    (and parens-require-spaces
+        (not (eobp))
+        (memq (char-syntax (char-after (point))) '(?w ?_ ?\( ))
+        (insert " "))))
+
+(defun move-past-close-and-reindent ()
+  "Move past next `)', delete indentation before it, then indent after it."
+  (interactive)
+  (up-list 1)
+  (forward-char -1)
+  (while (save-excursion               ; this is my contribution
+          (let ((before-paren (point)))
+            (back-to-indentation)
+            (= (point) before-paren)))
+    (delete-indentation))
+  (forward-char 1)
+  (newline-and-indent))
+\f
+(defun lisp-complete-symbol ()
+  "Perform completion on Lisp symbol preceding point.
+Compare that symbol against the known Lisp symbols.
+
+The context determines which symbols are considered.
+If the symbol starts just after an open-parenthesis, only symbols
+with function definitions are considered.  Otherwise, all symbols with
+function definitions, values or properties are considered."
+  (interactive)
+  (let* ((end (point))
+        (buffer-syntax (syntax-table))
+        (beg (unwind-protect
+                 (save-excursion
+                   ;; XEmacs change
+                   (if emacs-lisp-mode-syntax-table
+                       (set-syntax-table emacs-lisp-mode-syntax-table))
+                   (backward-sexp 1)
+                   (while (eq (char-syntax (char-after (point))) ?\')
+                     (forward-char 1))
+                   (point))
+               (set-syntax-table buffer-syntax)))
+        (pattern (buffer-substring beg end))
+        (predicate
+         (if (eq (char-after (1- beg)) ?\()
+             'fboundp
+           ;; XEmacs change
+           #'(lambda (sym)
+               (or (boundp sym) (fboundp sym)
+                   (symbol-plist sym)))))
+        (completion (try-completion pattern obarray predicate)))
+    (cond ((eq completion t))
+         ((null completion)
+          (message "Can't find completion for \"%s\"" pattern)
+          (ding))
+         ((not (string= pattern completion))
+          (delete-region beg end)
+          (insert completion))
+         (t
+          (message "Making completion list...")
+          (let ((list (all-completions pattern obarray predicate))
+                ;FSFmacs crock unnecessary in XEmacs
+                ;see minibuf.el
+                ;(completion-fixup-function
+                ; (function (lambda () (if (save-excursion
+                ;              (goto-char (max (point-min)
+                ;                              (- (point) 4)))
+                ;              (looking-at " <f>"))
+                ;            (forward-char -4))))
+                )
+            (or (eq predicate 'fboundp)
+                (let (new)
+                  (while list
+                    (setq new (cons (if (fboundp (intern (car list)))
+                                        (list (car list) " <f>")
+                                      (car list))
+                                    new))
+                    (setq list (cdr list)))
+                  (setq list (nreverse new))))
+            (with-output-to-temp-buffer "*Completions*"
+              (display-completion-list list)))
+          (message "Making completion list...%s" "done")))))
+
+;;; lisp.el ends here
diff --git a/lisp/list-mode.el b/lisp/list-mode.el
new file mode 100644 (file)
index 0000000..8789a14
--- /dev/null
@@ -0,0 +1,593 @@
+;;; list-mode.el --- Major mode for buffers containing lists of items
+
+;; Copyright (C) 1992-4, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1996 Ben Wing.
+;; Maintainer: XEmacs Development Team
+;; Keywords: extensions, dumped
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not synched
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; Cleanup, merging with FSF by Ben Wing, January 1996
+
+;;; Code:
+
+(defvar list-mode-extent nil)
+(make-variable-buffer-local 'list-mode-extent)
+
+(defvar list-mode-map nil
+  "Local map for buffers containing lists of items.")
+(or list-mode-map
+    (let ((map (setq list-mode-map (make-sparse-keymap 'list-mode-map))))
+      (suppress-keymap map)
+      (define-key map 'button2up 'list-mode-item-mouse-selected)
+      (define-key map 'button2 'undefined)
+      (define-key map "\C-m" 'list-mode-item-keyboard-selected)
+;;
+;; The following calls to `substitute-key-definition' losed because
+;; they were based on an incorrect assumption that `forward-char' and
+;; `backward-char' are bound to keys in the global map. This might not
+;; be the case if a user binds motion keys to different functions,
+;; and was not actually the case since 20.5 beta 28 or around.
+;;
+;;    (substitute-key-definition 'forward-char 'next-list-mode-item map
+;;                              global-map)
+;;    (substitute-key-definition 'backward-char 'previous-list-mode-item map
+;;                              global-map)
+;;
+;; We bind standard keys to motion commands instead.
+;;
+      (dolist (key '(kp-right right (control ?f)))
+       (define-key map key 'next-list-mode-item))
+      (dolist (key '(kp-left left (control ?b)))
+       (define-key map key 'previous-list-mode-item))))
+
+(defun list-mode ()
+  "Major mode for buffer containing lists of items."
+  (interactive)
+  (kill-all-local-variables)
+  (use-local-map list-mode-map)
+  (setq mode-name "List")
+  (setq major-mode 'list-mode)
+  (make-local-hook 'post-command-hook)
+  (add-hook 'post-command-hook 'set-list-mode-extent nil t)
+  (make-local-hook 'pre-command-hook)
+  (add-hook 'pre-command-hook 'list-mode-extent-pre-hook nil t)
+  (make-local-variable 'next-line-add-newlines)
+  (setq next-line-add-newlines nil)
+  (setq list-mode-extent nil)
+  (set-specifier text-cursor-visible-p nil (current-buffer))
+  (setq buffer-read-only t)
+  (goto-char (point-min))
+  (run-hooks 'list-mode-hook))
+
+;; List mode is suitable only for specially formatted data.
+(put 'list-mode 'mode-class 'special)
+
+(defvar list-mode-extent-old-point nil
+  "The value of point when pre-command-hook is called.
+Used to determine the direction of motion.")
+(make-variable-buffer-local 'list-mode-extent-old-point)
+
+(defun list-mode-extent-pre-hook ()
+  (setq list-mode-extent-old-point (point))
+  ;(setq atomic-extent-goto-char-p nil)
+)
+
+(defun set-list-mode-extent ()
+  "Move to the closest list item and set up the extent for it.
+This is called from `post-command-hook'."
+  (cond ((get-char-property (point) 'list-mode-item))
+       ((and (> (point) (point-min))
+             (get-char-property (1- (point)) 'list-mode-item))
+        (goto-char (1- (point))))
+       (t
+        (let ((pos (point))
+              dirflag)
+          ;this fucks things up more than it helps.
+          ;atomic-extent-goto-char-p as currently defined is all broken,
+          ;since it will be triggered if the command *ever* runs goto-char!
+          ;(if atomic-extent-goto-char-p
+          ;    (setq dirflag 1)
+          (if (and list-mode-extent-old-point
+                   (> pos list-mode-extent-old-point))
+              (setq dirflag 1)
+            (setq dirflag -1))
+          (next-list-mode-item dirflag)
+          (or (get-char-property (point) 'list-mode-item)
+              (next-list-mode-item (- dirflag))))))
+  (or (and list-mode-extent
+          (eq (current-buffer) (extent-object list-mode-extent)))
+      (progn
+       (setq list-mode-extent (make-extent nil nil (current-buffer)))
+       (set-extent-face list-mode-extent 'list-mode-item-selected)))
+  (let ((ex (extent-at (point) nil 'list-mode-item nil 'at)))
+    (if ex
+       (progn
+         (set-extent-endpoints list-mode-extent
+                               (extent-start-position ex)
+                               (extent-end-position ex))
+         (auto-show-make-region-visible (extent-start-position ex)
+                                        (extent-end-position ex)))
+      (detach-extent list-mode-extent))))
+
+(defun previous-list-mode-item (n)
+  "Move to the previous item in list-mode."
+  (interactive "p")
+  (next-list-mode-item (- n)))
+
+(defun next-list-mode-item (n)
+  "Move to the next item in list-mode.
+With prefix argument N, move N items (negative N means move backward)."
+  (interactive "p")
+  (while (and (> n 0) (not (eobp)))
+    (let ((extent (extent-at (point) (current-buffer) 'list-mode-item))
+         (end (point-max)))
+      ;; If in a completion, move to the end of it.
+      (if extent (goto-char (extent-end-position extent)))
+      ;; Move to start of next one.
+      (or (extent-at (point) (current-buffer) 'list-mode-item)
+         (goto-char (next-single-property-change (point) 'list-mode-item
+                                                 nil end))))
+    (setq n (1- n)))
+  (while (and (< n 0) (not (bobp)))
+    (let ((extent (extent-at (point) (current-buffer) 'list-mode-item))
+         (end (point-min)))
+      ;; If in a completion, move to the start of it.
+      (if extent (goto-char (extent-start-position extent)))
+      ;; Move to the start of that one.
+      (if (setq extent (extent-at (point) (current-buffer) 'list-mode-item
+                                 nil 'before))
+         (goto-char (extent-start-position extent))
+       (goto-char (previous-single-property-change
+                   (point) 'list-mode-item nil end))
+       (if (setq extent (extent-at (point) (current-buffer) 'list-mode-item
+                                   nil 'before))
+           (goto-char (extent-start-position extent)))))
+    (setq n (1+ n))))
+
+(defun list-mode-item-selected-1 (extent event)
+  (let ((func (extent-property extent 'list-mode-item-activate-callback))
+       (user-data (extent-property extent 'list-mode-item-user-data)))
+    (if func
+       (funcall func event extent user-data))))
+
+;; we could make these two be just one function, but we want to be
+;; able to refer to them in DOC strings.
+
+(defun list-mode-item-keyboard-selected ()
+  (interactive)
+  (list-mode-item-selected-1 (extent-at (point) (current-buffer)
+                                       'list-mode-item nil 'at)
+                            nil))
+
+(defun list-mode-item-mouse-selected (event)
+  (interactive "e")
+  ;; Sometimes event-closest-point returns nil.
+  ;; So beep instead of bombing.
+  (let ((point (event-closest-point event)))
+    (if point
+       (list-mode-item-selected-1 (extent-at point
+                                             (event-buffer event)
+                                             'list-mode-item nil 'at)
+                                  event)
+      (ding))))
+
+(defun add-list-mode-item (start end &optional buffer activate-callback
+                                user-data)
+  "Add a new list item in list-mode, from START to END in BUFFER.
+BUFFER defaults to the current buffer.
+This works by creating an extent for the span of text in question.
+If ACTIVATE-CALLBACK is non-nil, it should be a function of three
+  arguments (EVENT EXTENT USER-DATA) that will be called when button2
+  is pressed on the extent.  USER-DATA comes from the optional
+  USER-DATA argument."
+  (let ((extent (make-extent start end buffer)))
+    (set-extent-property extent 'list-mode-item t)
+    (set-extent-property extent 'start-open t)
+    (if activate-callback
+       (progn
+         (set-extent-property extent 'mouse-face 'highlight)
+         (set-extent-property extent 'list-mode-item-activate-callback
+                              activate-callback)
+         (set-extent-property extent 'list-mode-item-user-data user-data)))
+    extent))
+
+\f
+;; Define the major mode for lists of completions.
+
+
+(defvar completion-highlight-first-word-only nil
+  "*Completion will only highlight the first blank delimited word if t.
+If the variable in not t or nil, the string is taken as a regexp to match for end
+of highlight")
+
+(defvar completion-setup-hook nil
+  "Normal hook run at the end of setting up the text of a completion buffer.")
+
+; Unnecessary FSFmacs crock.  We frob the extents directly in
+; display-completion-list, so no "heuristics" like this are necessary.
+;(defvar completion-fixup-function nil
+;  "A function to customize how completions are identified in completion lists.
+;`completion-setup-function' calls this function with no arguments
+;each time it has found what it thinks is one completion.
+;Point is at the end of the completion in the completion list buffer.
+;If this function moves point, it can alter the end of that completion.")
+
+(defvar completion-default-help-string
+  '(concat
+    (if (device-on-window-system-p)
+       (substitute-command-keys
+        "Click \\<list-mode-map>\\[list-mode-item-mouse-selected] on a completion to select it.\n") "")
+    (substitute-command-keys
+     "Type \\<minibuffer-local-completion-map>\\[advertised-switch-to-completions] or \\[switch-to-completions] to move to this buffer, for keyboard selection.\n\n"))
+  "Form the evaluate to get a help string for completion lists.
+This string is inserted at the beginning of the buffer.
+See `display-completion-list'.")
+
+(defun display-completion-list (completions &rest cl-keys)
+  "Display the list of completions, COMPLETIONS, using `standard-output'.
+Each element may be just a symbol or string or may be a list of two
+ strings to be printed as if concatenated.
+Frob a mousable extent onto each completion.  This extent has properties
+ 'mouse-face (so it highlights when the mouse passes over it) and
+ 'list-mode-item (so it can be located).
+
+Keywords:
+  :activate-callback (default is `default-choose-completion')
+    See `add-list-mode-item'.
+  :user-data
+    Value passed to activation callback.
+  :window-width
+    If non-nil, width to use in displaying the list, instead of the
+    actual window's width.
+  :help-string (default is the value of `completion-default-help-string')
+    Form to evaluate to get a string to insert at the beginning of
+    the completion list buffer.  This is evaluated when that buffer
+    is the current buffer and after it has been put into
+    completion-list-mode.
+  :reference-buffer (default is the current buffer)
+    This specifies the value of `completion-reference-buffer' in
+    the completion buffer.  This specifies the buffer (normally a
+    minibuffer) that `default-choose-completion' will insert the
+    completion into.
+
+At the end, run the normal hook `completion-setup-hook'.
+It can find the completion buffer in `standard-output'.
+If `completion-highlight-first-word-only' is non-nil, then only the start
+ of the string is highlighted."
+   ;; #### I18N3 should set standard-output to be (temporarily)
+   ;; output-translating.
+  (cl-parsing-keywords
+      ((:activate-callback 'default-choose-completion)
+       :user-data
+       :reference-buffer
+       (:help-string completion-default-help-string)
+       :window-width)
+      ()
+    (let ((old-buffer (current-buffer))
+         (bufferp (bufferp standard-output)))
+      (if bufferp
+         (set-buffer standard-output))
+      (if (null completions)
+         (princ (gettext
+                 "There are no possible completions of what you have typed."))
+       (let ((win-width
+              (or cl-window-width
+                  (if bufferp
+                      ;; This needs fixing for the case of windows 
+                      ;; that aren't the same width's the frame.
+                      ;; Sadly, the window it will appear in is not known
+                      ;; until after the text has been made.
+
+                      ;; We have to use last-nonminibuf-frame here
+                      ;; and not selected-frame because if a
+                      ;; minibuffer-only frame is being used it will
+                      ;; be the selected-frame at the point this is
+                      ;; run.  We keep the selected-frame call around
+                      ;; just in case.
+                      (frame-width (or (last-nonminibuf-frame)
+                                       (selected-frame)))
+                    80))))
+         (let ((count 0)
+               (max-width 0))
+           ;; Find longest completion
+           (let ((tail completions))
+             (while tail
+               (let* ((elt (car tail))
+                      (len (cond ((stringp elt)
+                                  (length elt))
+                                 ((and (consp elt)
+                                       (stringp (car elt))
+                                       (stringp (car (cdr elt))))
+                                  (+ (length (car elt))
+                                     (length (car (cdr elt)))))
+                                 (t
+                                  (signal 'wrong-type-argument
+                                          (list 'stringp elt))))))
+                 (if (> len max-width)
+                     (setq max-width len))
+                 (setq count (1+ count)
+                       tail (cdr tail)))))
+        
+           (setq max-width (+ 2 max-width)) ; at least two chars between cols
+           (let ((rows (let ((cols (min (/ win-width max-width) count)))
+                         (if (<= cols 1)
+                             count
+                           (progn
+                             ;; re-space the columns
+                             (setq max-width (/ win-width cols))
+                             (if (/= (% count cols) 0) ; want ceiling...
+                                 (1+ (/ count cols))
+                                (/ count cols)))))))
+             (princ (gettext "Possible completions are:"))
+             (let ((tail completions)
+                   (r 0)
+                   (regexp-string
+                    (if (eq t
+                            completion-highlight-first-word-only)
+                        "[ \t]"
+                      completion-highlight-first-word-only)))
+               (while (< r rows)
+                 (terpri)
+                 (let ((indent 0)
+                       (column 0)
+                       (tail2 tail))
+                   (while tail2
+                     (let ((elt (car tail2)))
+                       (if (/= indent 0)
+                           (if bufferp
+                               (indent-to indent 2)
+                              (while (progn (write-char ?\ )
+                                            (setq column (1+ column))
+                                            (< column indent)))))
+                       (setq indent (+ indent max-width))
+                       (let ((start (point))
+                             end)
+                         ;; Frob some mousable extents in there too!
+                         (if (consp elt)
+                             (progn
+                               (princ (car elt))
+                               (princ (car (cdr elt)))
+                               (or bufferp
+                                   (setq column
+                                         (+ column
+                                            (length (car elt))
+                                            (length (car (cdr elt)))))))
+                           (progn
+                             (princ elt)
+                             (or bufferp
+                                 (setq column (+ column (length
+                                                         elt))))))
+                         (add-list-mode-item
+                          start
+                          (progn
+                            (setq end (point))
+                            (or
+                             (and completion-highlight-first-word-only
+                                  (goto-char start)
+                                  (re-search-forward regexp-string end t)
+                                  (match-beginning 0))
+                             end))
+                          nil cl-activate-callback cl-user-data)
+                         (goto-char end)))
+                     (setq tail2 (nthcdr rows tail2)))
+                   (setq tail (cdr tail)
+                         r (1+ r)))))))))
+      (if bufferp
+         (set-buffer old-buffer)))
+    (save-excursion
+      (let ((mainbuf (or cl-reference-buffer (current-buffer))))
+       (set-buffer standard-output)
+       (completion-list-mode)
+       (make-local-variable 'completion-reference-buffer)
+       (setq completion-reference-buffer mainbuf)
+;;; The value 0 is right in most cases, but not for file name completion.
+;;; so this has to be turned off.
+;;;      (setq completion-base-size 0)
+       (goto-char (point-min))
+       (let ((buffer-read-only nil))
+         (insert (eval cl-help-string)))
+         ;; unnecessary FSFmacs crock
+         ;;(forward-line 1)
+         ;;(while (re-search-forward "[^ \t\n]+\\( [^ \t\n]+\\)*" nil t)
+         ;;      (let ((beg (match-beginning 0))
+         ;;            (end (point)))
+         ;;        (if completion-fixup-function
+         ;;            (funcall completion-fixup-function))
+         ;;        (put-text-property beg (point) 'mouse-face 'highlight)
+         ;;        (put-text-property beg (point) 'list-mode-item t)
+         ;;        (goto-char end)))))
+       ))
+    (run-hooks 'completion-setup-hook)))
+
+(defvar completion-display-completion-list-function 'display-completion-list
+  "Function to set up the list of completions in the completion buffer.
+The function is called with one argument, the sorted list of completions.
+Particular minibuffer interface functions (e.g. `read-file-name') may
+want to change this.  To do that, set a local value for this variable
+in the minibuffer; that ensures that other minibuffer invocations will
+not be affected.")
+
+(defun minibuffer-completion-help ()
+  "Display a list of possible completions of the current minibuffer contents.
+The list of completions is determined by calling `all-completions',
+passing it the current minibuffer contents, the value of
+`minibuffer-completion-table', and the value of
+`minibuffer-completion-predicate'.  The list is displayed by calling
+the value of `completion-display-completion-list-function' on the sorted
+list of completions, with the standard output set to the completion
+buffer."
+  (interactive)
+  (message "Making completion list...")
+  (let ((completions (all-completions (buffer-string)
+                                      minibuffer-completion-table
+                                      minibuffer-completion-predicate)))
+    (message nil)
+    (if (null completions)
+        (progn
+          (ding nil 'no-completion)
+          (temp-minibuffer-message " [No completions]"))
+        (with-output-to-temp-buffer "*Completions*"
+         (funcall completion-display-completion-list-function
+                  (sort completions #'string-lessp))))))
+
+(define-derived-mode completion-list-mode list-mode 
+  "Completion List"
+  "Major mode for buffers showing lists of possible completions.
+Type \\<completion-list-mode-map>\\[choose-completion] in the completion list\
+ to select the completion near point.
+Use \\<completion-list-mode-map>\\[mouse-choose-completion] to select one\
+ with the mouse."
+  (make-local-variable 'completion-base-size)
+  (setq completion-base-size nil))
+
+(let ((map completion-list-mode-map))
+  (define-key map "\e\e\e" 'delete-completion-window)
+  (define-key map "\C-g" 'minibuffer-keyboard-quit)
+  (define-key map "q" 'abort-recursive-edit)
+  (define-key map " " (lambda () (interactive)
+                       (select-window (minibuffer-window))))
+  (define-key map "\t" (lambda () (interactive)
+                        (select-window (minibuffer-window)))))
+
+(defvar completion-reference-buffer nil
+  "Record the buffer that was current when the completion list was requested.
+This is a local variable in the completion list buffer.
+Initial value is nil to avoid some compiler warnings.")
+
+(defvar completion-base-size nil
+  "Number of chars at beginning of minibuffer not involved in completion.
+This is a local variable in the completion list buffer
+but it talks about the buffer in `completion-reference-buffer'.
+If this is nil, it means to compare text to determine which part
+of the tail end of the buffer's text is involved in completion.")
+
+(defun delete-completion-window ()
+  "Delete the completion list window.
+Go to the window from which completion was requested."
+  (interactive)
+  (let ((buf completion-reference-buffer))
+    (delete-window (selected-window))
+    (if (get-buffer-window buf)
+        (select-window (get-buffer-window buf)))))
+
+(defun completion-do-in-minibuffer ()
+  (interactive "_")
+  (save-excursion
+    (set-buffer (window-buffer (minibuffer-window)))
+    (call-interactively (key-binding (this-command-keys)))))
+
+(defun default-choose-completion (event extent buffer)
+  "Click on an alternative in the `*Completions*' buffer to choose it."
+  (and (button-event-p event)
+       ;; Give temporary modes such as isearch a chance to turn off.
+       (run-hooks 'mouse-leave-buffer-hook))
+  (or buffer (setq buffer (symbol-value-in-buffer
+                          'completion-reference-buffer
+                          (or (and (button-event-p event)
+                                   (event-buffer event))
+                              (current-buffer)))))
+  (save-selected-window
+   (and (button-event-p event)
+       (select-window (event-window event)))
+   (if (and (one-window-p t 'selected-frame)
+           (window-dedicated-p (selected-window)))
+       ;; This is a special buffer's frame
+       (iconify-frame (selected-frame))
+     (or (window-dedicated-p (selected-window))
+        (bury-buffer))))
+  (choose-completion-string (extent-string extent)
+                           buffer
+                           completion-base-size))
+
+;; Delete the longest partial match for STRING
+;; that can be found before POINT.
+(defun choose-completion-delete-max-match (string)
+  (let ((len (min (length string)
+                 (- (point) (point-min)))))
+    (goto-char (- (point) (length string)))
+    (if completion-ignore-case
+        (setq string (downcase string)))
+    (while (and (> len 0)
+                (let ((tail (buffer-substring (point)
+                                              (+ (point) len))))
+                  (if completion-ignore-case
+                      (setq tail (downcase tail)))
+                  (not (string= tail (substring string 0 len)))))
+      (setq len (1- len))
+      (forward-char 1))
+    (delete-char len)))
+
+;; Switch to BUFFER and insert the completion choice CHOICE.
+;; BASE-SIZE, if non-nil, says how many characters of BUFFER's text
+;; to keep.  If it is nil, use choose-completion-delete-max-match instead.
+(defun choose-completion-string (choice &optional buffer base-size)
+  (let ((buffer (or buffer completion-reference-buffer)))
+    ;; If BUFFER is a minibuffer, barf unless it's the currently
+    ;; active minibuffer.
+    (if (and (string-match "\\` \\*Minibuf-[0-9]+\\*\\'" (buffer-name buffer))
+             (or (not (active-minibuffer-window))
+                 (not (equal buffer
+                             (window-buffer (active-minibuffer-window))))))
+        (error "Minibuffer is not active for completion")
+      ;; Insert the completion into the buffer where completion was requested.
+      (set-buffer buffer)
+      (if base-size
+          (delete-region (+ base-size (point-min)) (point))
+        (choose-completion-delete-max-match choice))
+      (insert choice)
+      (remove-text-properties (- (point) (length choice)) (point)
+                              '(highlight nil))
+      ;; Update point in the window that BUFFER is showing in.
+      (let ((window (get-buffer-window buffer t)))
+        (set-window-point window (point)))
+      ;; If completing for the minibuffer, exit it with this choice.
+      (and (equal buffer (window-buffer (minibuffer-window)))
+           minibuffer-completion-table
+           (exit-minibuffer)))))
+
+(define-key minibuffer-local-completion-map [prior]
+  'switch-to-completions)
+(define-key minibuffer-local-must-match-map [prior]
+  'switch-to-completions)
+(define-key minibuffer-local-completion-map "\M-v"
+  'advertised-switch-to-completions)
+(define-key minibuffer-local-must-match-map "\M-v"
+  'advertised-switch-to-completions)
+
+(defalias 'advertised-switch-to-completions 'switch-to-completions)
+(defun switch-to-completions ()
+  "Select the completion list window."
+  (interactive)
+  ;; Make sure we have a completions window.
+  (or (get-buffer-window "*Completions*")
+      (minibuffer-completion-help))
+  (if (not (get-buffer-window "*Completions*"))
+      nil
+    (select-window (get-buffer-window "*Completions*"))
+    (goto-char (next-single-property-change (point-min) 'list-mode-item nil
+                                           (point-max)))))
+
+;;; list-mode.el ends here
diff --git a/lisp/loaddefs.el b/lisp/loaddefs.el
new file mode 100644 (file)
index 0000000..77ba4b1
--- /dev/null
@@ -0,0 +1,182 @@
+;;; loaddefs.el --- define standard autoloads of other files
+
+;; Copyright (C) 1985-7, 1992-5, 1997 Free Software Foundation, Inc.
+
+;; Maintainer: XEmacs Development Team
+;; Keywords: internal
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not synched with FSF.
+
+;;; Commentary:
+
+;; The following commentary is completely out of date.  I would like to
+;; delete it, but it serves as a useful reminder as to how things used to
+;; work.
+
+;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+;; Special formatting conventions are used in this file!
+
+;; a backslash-newline is used at the beginning of a documentation string
+;; when that string should be stored in the file lib-src/DOCnnn, not in core.
+
+;; Such strings read into Lisp as numbers (during the pure-loading phase).
+
+;; But you must obey certain rules to make sure the string is understood
+;; and goes into lib-src/DOCnnn properly.  Otherwise, the string will not go
+;; anywhere!
+
+;; The doc string must appear in the standard place in a call to
+;; defun, autoload, defvar or defconst.  No Lisp macros are recognized.
+;; The open-paren starting the definition must appear in column 0.
+
+;; In defvar and defconst, there is an additional rule:
+;; The double-quote that starts the string must be on the same
+;; line as the defvar or defconst.
+;; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+;; **********************************************************************
+;; You should never need to write autoloads by hand and put them here.
+
+;; It is no longer necessary.  Instead use autoload.el to maintain them
+;; for you.  Just insert ";;;###autoload" before defuns or defmacros you
+;; want to be autoloaded, or other forms you want copied into loaddefs.el
+;; (defvars, key definitions, etc.).  For example, 
+;;     ;;;###autoload
+;;     (defun foobar () ....)
+;;     ;;;###autoload (define-key global-map "f" 'foobar)
+;;     ;;;###autoload
+;;     (defvar foobar-var nil "\
+;;     This is foobar-var's doc-string.")
+
+;; Then do M-x update-file-autoloads on the file to update loaddefs.el.
+
+;; You can also use M-x update-directory-autoloads to update the autoloads
+;; in loaddefs.el for all .el files in the lisp/ directory, or M-x
+;; update-autoloads-here to update the autoloads for each file that
+;; already has an autoload section in this file.
+;; **********************************************************************
+
+\f
+;;; Code:
+
+;; These variables are used by autoloadable packages.
+;; They are defined here so that they do not get overridden
+;; by the loading of those packages.
+
+\f
+;; Names in directory that end in one of these
+;; are ignored in completion,
+;; making it more likely you will get a unique match.
+(setq completion-ignored-extensions
+      (mapcar 'purecopy
+             (if (eq system-type 'vax-vms)
+                 '(".obj" ".elc" ".exe" ".bin" ".lbin" ".sbin"
+                   ".dvi" ".toc" ".log" ".aux"
+                   ".lof" ".brn" ".rnt" ".mem" ".lni" ".lis"
+                   ".olb" ".tlb" ".mlb" ".hlb" ".glo" ".idx" ".lot" ".fmt")
+               '(".o" ".elc" "~" ".bin" ".lbin" ".fasl"
+                 ".dvi" ".toc" ".log" ".aux" ".a" ".ln"
+                 ".lof" ".blg" ".bbl" ".glo" ".idx" ".lot" ".fmt"
+                 ".diff" ".oi" ".class"))))
+
+\f
+;; This needs to be redone better. -slb
+;(setq debug-ignored-errors
+;      '(beginning-of-line
+;      beginning-of-buffer
+;      end-of-line
+;        end-of-buffer
+;      end-of-file buffer-read-only
+;      "\\`Previous command was not a yank\\'"
+;      "\\`Minibuffer is not active for completion\\'"
+;      "\\`No \\(following\\|preceding\\) item in .*-history\\'"
+;      "\\`No recursive edit is in progress\\'"
+;      "\\`Changes to be undone are outside visible portion of buffer\\'"
+;      "\\`No further undo information\\'"
+;      "\\`No undo information in this buffer\\'"
+;      "\\`Buffer modified since last undo/redo, cannot redo"
+;      "\\`Save not confirmed\\'"
+;      "\\`Canceled\\'"
+;      "\\`\\(Revert\\|Steal\\|Recover-file\\) cancelled\\.\\'"
+
+;      ;; comint
+;      "\\`Not at command line\\'"
+;      "\\`Empty input ring\\'"
+;      "\\`No history\\'"
+;      "\\`Not found\\'" ;; To common?
+;      "\\`Current buffer has no process\\'"
+
+;      ;; dabbrev
+;      "\\`No \\(further \\)?dynamic expansion for .* found\\.?\\'"
+
+;      ;; Completion
+;      "\\`To complete, the point must be after a symbol at least [0-9]* character long\\.\\'"
+;      "\\`The string \".*\" is too short to be saved as a completion\\.\\'"
+
+;      ;; Compile
+;      "\\`No more errors\\( yet\\|\\)\\'"
+
+;      ;; Gnus
+;      ;"\\`NNTP: Connection closed\\.\\'"
+
+;      ;; info
+;      "\\`Node has no Previous\\'"
+;      "\\`No \".*\" in index\\'"
+
+;      ;; imenu
+;      ;"\\`No items suitable for an index found in this buffer\\.\\'"
+;      ;"\\`The mode \".*\" does not take full advantage of imenu\\.el yet\\.\\'"
+
+;      ;; ispell
+;      "\\`No word found to check!\\'"
+
+;      ;; man
+;      "\\`.* not found\\'"
+;      "\\`No more history\\.\\'"
+
+;      ;; etags
+;      "\\`File .* is not a valid tag table\\'"
+;      "\\`File .* is not a valid tags file\\'"
+;      "\\`All files processed\\.\\'"
+;      "No TAGS file name supplied\\'"
+;      "\\`Nothing to complete\\'"
+
+;      ;; BBDB
+;      "\\`no previous record\\'"
+;      "\\`no next record\\'"))
+
+(make-variable-buffer-local 'indent-tabs-mode)
+
+\f
+;;; Load in generated autoloads (made by autoload.el).
+
+;; (let ((dir load-path)
+;;       purify-flag)
+;;   (while dir
+;;     (condition-case nil
+;;     (load (concat (car dir) "auto-autoloads"))
+;;      (t nil))
+;;    (pop dir)))
+\f
+;;; Local Variables:
+;;; no-byte-compile: t
+;;; no-update-autoloads: t
+;;; End:
+;;; loaddefs.el ends here
diff --git a/lisp/loadhist.el b/lisp/loadhist.el
new file mode 100644 (file)
index 0000000..f55a51f
--- /dev/null
@@ -0,0 +1,159 @@
+;;; loadhist.el --- lisp functions for working with feature groups
+
+;; Copyright (C) 1995 Free Software Foundation, Inc.
+
+;; Author: Eric S. Raymond <esr@snark.thyrsus.com>
+;; Version: 1.0
+;; Keywords: internal, dumped
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: FSF 20.2.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; These functions exploit the load-history system variable.
+;; Entry points include `unload-feature', `symbol-file', and `feature-file'.
+
+;;; Code:
+
+(defun symbol-file (sym)
+  "Return the input source from which SYM was loaded.
+This is a file name, or nil if the source was a buffer with no associated file."
+  (interactive "SFind source file for symbol: ") ; XEmacs
+  (catch 'foundit
+    (mapcar
+     (function (lambda (x) (if (memq sym (cdr x)) (throw 'foundit (car x)))))
+     load-history)
+    nil))
+
+(defun feature-symbols (feature)
+  "Return the file and list of symbols associated with a given FEATURE."
+   (catch 'foundit
+     (mapcar
+      (function (lambda (x) 
+                 (if (member (cons 'provide feature) (cdr x))
+                     (throw 'foundit x))))
+      load-history)
+     nil))
+
+(defun feature-file (feature)
+  "Return the file name from which a given FEATURE was loaded.
+Actually, return the load argument, if any; this is sometimes the name of a
+Lisp file without an extension.  If the feature came from an eval-buffer on
+a buffer with no associated file, or an eval-region, return nil."
+  (if (not (featurep feature))
+      (error "%s is not a currently loaded feature" (symbol-name feature))
+    (car (feature-symbols feature))))
+
+(defun file-provides (file)
+  "Return the list of features provided by FILE."
+  (let ((symbols (or (cdr (assoc file load-history))
+                    (cdr (assoc (file-name-sans-extension file) load-history))
+                    (cdr (assoc (concat file ".el") load-history))
+                    (cdr (assoc (concat file ".elc") load-history))))
+       (provides nil))
+    (mapcar
+     (function (lambda (x)
+                (if (and (consp x) (eq (car x) 'provide))
+                    (setq provides (cons (cdr x) provides)))))
+     symbols)
+    provides
+    ))
+
+(defun file-requires (file)
+  "Return the list of features required by FILE."
+  (let ((symbols (cdr (assoc file load-history))) (requires nil))
+    (mapcar
+     (function (lambda (x)
+                (if (and (consp x) (eq (car x) 'require))
+                    (setq requires (cons (cdr x) requires)))))
+     symbols)
+    requires
+    ))
+
+(defun file-set-intersect (p q)
+  ;; Return the set intersection of two lists
+  (let ((ret nil))
+    (mapcar
+     (function (lambda (x) (if (memq x q) (setq ret (cons x ret)))))
+     p)
+    ret
+    ))
+
+(defun file-dependents (file)
+  "Return the list of loaded libraries that depend on FILE.
+This can include FILE itself."
+  (let ((provides (file-provides file)) (dependents nil))
+    (mapcar
+     (function (lambda (x) 
+                (if (file-set-intersect provides (file-requires (car x)))
+                    (setq dependents (cons (car x) dependents)))))
+     load-history)
+    dependents
+    ))
+
+;; FSFmacs
+;(defun read-feature (prompt)
+;  "Read a feature name \(string\) from the minibuffer,
+;prompting with PROMPT and completing from `features', and
+;return the feature \(symbol\)."
+;  (intern (completing-read prompt
+;                         (mapcar (function (lambda (feature)
+;                                             (list (symbol-name feature))))
+;                                 features)
+;                         nil t)))
+
+;; ;;;###autoload
+(defun unload-feature (feature &optional force)
+  "Unload the library that provided FEATURE, restoring all its autoloads.
+If the feature is required by any other loaded code, and optional FORCE
+is nil, raise an error."
+  (interactive "SFeature: ")
+  (if (not (featurep feature))
+      (error "%s is not a currently loaded feature" (symbol-name feature)))
+  (if (not force)
+      (let* ((file (feature-file feature))
+            (dependents (delete file (copy-sequence (file-dependents file)))))
+       (if dependents
+           (error "Loaded libraries %s depend on %s"
+                  (prin1-to-string dependents) file)
+           )))
+  (let* ((flist (feature-symbols feature)) (file (car flist)))
+    (mapcar
+     (function (lambda (x) 
+                (cond ((stringp x) nil)
+                      ((consp x)
+                       ;; Remove any feature names that this file provided.
+                       (if (eq (car x) 'provide)
+                           (setq features (delq (cdr x) features))))
+                      ((boundp x) (makunbound x))
+                      ((fboundp x)
+                       (fmakunbound x)
+                       (let ((aload (get x 'autoload)))
+                         (if aload (fset x (cons 'autoload aload))))))))
+     (cdr flist))
+    ;; Delete the load-history element for this file.
+    (let ((elt (assoc file load-history)))
+      (setq load-history (delq elt load-history)))))
+
+(provide 'loadhist)
+
+;;; loadhist.el ends here
diff --git a/lisp/loadup-el.el b/lisp/loadup-el.el
new file mode 100644 (file)
index 0000000..0bebb96
--- /dev/null
@@ -0,0 +1,25 @@
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not in FSF.
+
+; always take .el files.
+; don't put stuff into pure segment to avoid pure-space-exceeded error.
+
+(let ((load-ignore-elc-files t)
+      (purify-flag nil))
+  (load "loadup.el"))
diff --git a/lisp/loadup.el b/lisp/loadup.el
new file mode 100644 (file)
index 0000000..68063a8
--- /dev/null
@@ -0,0 +1,217 @@
+;; loadup.el --- load up standardly loaded Lisp files for XEmacs.
+
+;; Copyright (C) 1985, 1986, 1992, 1994, 1997 Free Software Foundation, Inc.
+;; Copyright (C) 1996 Richard Mlynarik.
+;; Copyright (C) 1995, 1996 Ben Wing.
+
+;; Maintainer: XEmacs Development Team
+;; Keywords: internal, dumped
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Last synched with FSF 19.30, with wild divergence since.
+
+;;; Commentary:
+
+;; Please do not edit this file.  Use site-init.el or site-load.el instead.
+
+;; This is loaded into a bare XEmacs to make a dumpable one.
+
+;;; Code:
+
+(if (fboundp 'error)
+    (error "loadup.el already loaded!"))
+
+(defvar running-xemacs t
+  "Non-nil when the current emacs is XEmacs.")
+(defvar preloaded-file-list nil
+  "List of files preloaded into the XEmacs binary image.")
+
+;; This is awfully damn early to be getting an error, right?
+(call-with-condition-handler 'really-early-error-handler
+    #'(lambda ()
+       ;; message not defined yet ...
+       (setq load-path (split-path (getenv "EMACSBOOTSTRAPLOADPATH")))
+
+       (external-debugging-output (format "\nUsing load-path %s" load-path))
+
+       ;; We don't want to have any undo records in the dumped XEmacs.
+       (buffer-disable-undo (get-buffer "*scratch*"))
+
+       ;; Load our first bootstrap support
+       (load "very-early-lisp" nil t)
+
+       ;; lread.c (or src/Makefile.in.in) has prepended
+       ;; "${srcdir}/../lisp/" to load-path, which is how this file
+       ;; has been found.  At this point, enough of XEmacs has been
+       ;; initialized that we can start dumping "standard" lisp.
+       ;; Dumped lisp from external packages is added when we search
+       ;; the package path.
+       ;; #### This code is duplicated in two other places.
+       (let ((temp-path (expand-file-name "." (car load-path))))
+         (setq source-directory temp-path)
+         (setq load-path (nconc (mapcar
+                                 #'(lambda (i) (concat i "/"))
+                                 (directory-files temp-path t "^[^-.]"
+                                                  nil 'dirs-only))
+                                (cons (file-name-as-directory temp-path)
+                                      load-path))))
+
+       (setq load-warn-when-source-newer t ; Used to be set to nil at the end
+             load-warn-when-source-only  t) ; Set to nil at the end
+
+       ;; garbage collect after loading every file in an attempt to
+       ;; minimize the size of the dumped image (if we don't do this,
+       ;; there will be lots of extra space in the data segment filled
+       ;; with garbage-collected junk)
+       (defun pureload (file)
+         (let ((full-path (locate-file file
+                                       load-path
+                                       (if load-ignore-elc-files
+                                           ".el:"
+                                         ".elc:.el:"))))
+           (if full-path
+               (prog1
+                 (load full-path)
+                 (garbage-collect))
+             (external-debugging-output (format "\nLoad file %s: not found\n"
+                                                file))
+             ;; Uncomment in case of trouble
+             ;;(print (format "late-packages: %S" late-packages))
+             ;;(print (format "guessed-roots: %S" (paths-find-emacs-roots invocation-directory invocation-name)))
+             nil)))
+
+       (load (concat default-directory "../lisp/dumped-lisp.el"))
+
+       (let ((files preloaded-file-list)
+             file)
+         (while (setq file (car files))
+           (or (pureload file)
+             (progn
+               (external-debugging-output "Fatal error during load, aborting")
+               (kill-emacs 1)))
+           (setq files (cdr files)))
+         (if (not (featurep 'toolbar))
+             (progn
+               ;; else still define a few functions.
+               (defun toolbar-button-p    (obj) "No toolbar support." nil)
+               (defun toolbar-specifier-p (obj) "No toolbar support." nil)))
+         (fmakunbound 'pureload))
+
+       (packages-load-package-dumped-lisps late-package-load-path)
+
+       )) ;; end of call-with-condition-handler
+\f
+;; Fix up the preloaded file list
+(setq preloaded-file-list (mapcar #'file-name-sans-extension
+                                 preloaded-file-list))
+
+(setq load-warn-when-source-newer t ; set to t at top of file
+      load-warn-when-source-only nil)
+
+(setq debugger 'debug)
+
+(when (member "no-site-file" command-line-args)
+  (setq site-start-file nil))
+
+;; If you want additional libraries to be preloaded and their
+;; doc strings kept in the DOC file rather than in core,
+;; you may load them with a "site-load.el" file.
+;; But you must also cause them to be scanned when the DOC file
+;; is generated.  For VMS, you must edit ../../vms/makedoc.com.
+;; For other systems, you must edit ../../src/Makefile.in.in.
+(if (load "site-load" t)
+    (garbage-collect))
+
+;;FSFmacs randomness
+;;(if (fboundp 'x-popup-menu)
+;;    (precompute-menubar-bindings))
+;;; Turn on recording of which commands get rebound,
+;;; for the sake of the next call to precompute-menubar-bindings.
+;(setq define-key-rebound-commands nil)
+
+
+;; Note: all compiled Lisp files loaded above this point
+;; must be among the ones parsed by make-docfile
+;; to construct DOC.  Any that are not processed
+;; for DOC will not have doc strings in the dumped XEmacs.
+
+;; Don't bother with these if we're running temacs, i.e. if we're
+;; just debugging don't waste time finding doc strings.
+
+;; purify-flag is nil if called from loadup-el.el.
+(when purify-flag
+  (message "Finding pointers to doc strings...")
+  (Snarf-documentation "DOC")
+  (message "Finding pointers to doc strings...done")
+  (Verify-documentation)
+  )
+
+;; Note: You can cause additional libraries to be preloaded
+;; by writing a site-init.el that loads them.
+;; See also "site-load" above.
+(if (stringp site-start-file)
+    (load "site-init" t))
+(setq current-load-list nil)
+(garbage-collect)
+
+;;; At this point, we're ready to resume undo recording for scratch.
+(buffer-enable-undo "*scratch*")
+
+;; Dump into the name `xemacs' (only)
+(when (member "dump" command-line-args)
+    (message "Dumping under the name xemacs")
+    ;; This is handled earlier in the build process.
+    ;; (condition-case () (delete-file "xemacs") (file-error nil))
+    (when (fboundp 'really-free)
+      (really-free))
+    (dump-emacs (if (featurep 'infodock) "infodock" "xemacs") "temacs")
+    (kill-emacs))
+
+(when (member "run-temacs" command-line-args)
+  (message "\nBootstrapping from temacs...")
+  (setq purify-flag nil)
+  (setq inhibit-early-packages t)
+  (setq inhibit-autoloads t)
+  ;; Remove all args up to and including "run-temacs"
+  (apply #'run-emacs-from-temacs (cdr (member "run-temacs" command-line-args)))
+  ;; run-emacs-from-temacs doesn't actually return anyway.
+  (kill-emacs))
+
+;; Avoid error if user loads some more libraries now.
+(setq purify-flag nil)
+
+;; XEmacs change
+;; If you are using 'recompile', then you should have used -l loadup-el.el
+;; so that the .el files always get loaded (the .elc files may be out-of-
+;; date or bad).
+(when (member "recompile" command-line-args)
+  (let ((command-line-args-left (cdr (member "recompile" command-line-args))))
+    (batch-byte-recompile-directory)
+    (kill-emacs)))
+
+;; For machines with CANNOT_DUMP defined in config.h,
+;; this file must be loaded each time Emacs is run.
+;; So run the startup code now.
+
+(when (not (fboundp 'dump-emacs))
+  ;; Avoid loading loadup.el a second time!
+  (setq command-line-args (cdr (cdr command-line-args)))
+  (eval top-level))
+
+;;; loadup.el ends here
diff --git a/lisp/make-docfile.el b/lisp/make-docfile.el
new file mode 100644 (file)
index 0000000..1f56feb
--- /dev/null
@@ -0,0 +1,197 @@
+;;; make-docfile.el --- Cache docstrings in external file
+
+;; Copyright (C) 1985, 1986, 1992-1995, 1997 Free Software Foundation, Inc.
+
+;; Author: Unknown
+;; Maintainer: Steven L Baur <steve@altair.xemacs.org>
+;; Keywords: internal
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Not in FSF
+
+;;; Commentary:
+
+;; This is a front-end to the make-docfile program that gathers up all the
+;; lisp files that will be dumped with XEmacs.  It would probably be best
+;; to just move make-docfile.c completely to lisp and be done with it.
+
+;;; Code:
+
+(defvar options nil)
+(defvar processed nil)
+(defvar docfile nil)
+(defvar docfile-buffer nil)
+(defvar site-file-list nil)
+(defvar docfile-out-of-date nil)
+
+;; Gobble up the stuff we don't wish to pass on.
+(setq command-line-args (cdr (cdr (cdr (cdr command-line-args)))))
+
+;; First gather up the command line options.
+(let (done)
+  (while (and (null done) command-line-args)
+    (let ((arg (car command-line-args)))
+      (cond ((or (string-equal arg "-o") ; Specify DOC file name
+                (string-equal arg "-a") ; Append to DOC file
+                (string-equal arg "-d")) ; Set working directory
+            (if (string-equal arg "-o")
+                (setq docfile (car (cdr command-line-args))))
+            (setq options (cons arg options))
+            (setq options (cons (car (cdr command-line-args)) options)))
+           ((string-equal arg "-i") ; Set site files to scan
+            (setq site-file-list (car (cdr command-line-args))))
+           (t (setq done t)))
+      (if (null done)
+         (setq command-line-args (cdr (cdr command-line-args)))))))
+(setq options (nreverse options))
+
+;; (print (concat "Options: " (prin1-to-string options)))
+
+;; Next process the list of C files.
+(while command-line-args
+  (let ((arg (car command-line-args)))
+    (if (null (member arg processed))
+       (progn
+         (if (and (null docfile-out-of-date)
+                  (file-newer-than-file-p arg docfile))
+             (setq docfile-out-of-date t))
+         (setq processed (cons arg processed)))))
+  (setq command-line-args (cdr command-line-args)))
+
+;; Then process the list of Lisp files.
+(setq load-path (split-path (getenv "EMACSBOOTSTRAPLOADPATH")))
+
+(load "very-early-lisp" nil t)
+
+;; Then process the autoloads
+(setq autoload-file-name "auto-autoloads.elc")
+(setq source-directory (concat default-directory "../lisp"))
+;; (print (concat "Source directory: " source-directory))
+(load "find-paths.el")
+(load "packages.el")
+(load "setup-paths.el")
+(load "dump-paths.el")
+
+(setq
+ load-path
+ (nconc load-path (split-path (getenv "EMACSBOOTSTRAPLOADPATH"))))
+
+(let (preloaded-file-list)
+  (load (concat default-directory "../lisp/dumped-lisp.el"))
+
+  (let ((package-preloaded-file-list
+        (packages-collect-package-dumped-lisps late-package-load-path)))
+
+    (setq preloaded-file-list
+         (append package-preloaded-file-list
+                 preloaded-file-list
+                 packages-hardcoded-lisp)))
+
+  (while preloaded-file-list
+    (let ((arg0 (packages-add-suffix (car preloaded-file-list)))
+         arg)
+      (setq arg (locate-library arg0))
+      (if (null arg)
+         (progn
+         (princ (format "Error:  dumped file %s does not exist\n" arg0))
+         ;; Uncomment in case of difficulties
+         ;;(print (format "late-packages: %S" late-packages))
+         ;;(print (format "guessed-roots: %S" (paths-find-emacs-roots invocation-directory invocation-name)))
+         )
+       (if (null (member arg processed))
+           (progn
+             (if (and (null docfile-out-of-date)
+                      (file-newer-than-file-p arg docfile))
+                 (setq docfile-out-of-date t))
+             (setq processed (cons arg processed)))))
+      (setq preloaded-file-list (cdr preloaded-file-list)))))
+
+;; Finally process the list of site-loaded files.
+(if site-file-list
+    (let (site-load-packages)
+      (load site-file-list t t)
+      (while site-load-packages
+       (let ((arg (car site-load-packages)))
+         (if (null (member arg processed))
+             (progn
+               (if (and (null docfile-out-of-date)
+                        (file-newer-than-file-p arg docfile))
+                   (setq docfile-out-of-date t))
+               (setq processed (cons arg processed)))))
+       (setq site-load-packages (cdr site-load-packages)))))
+
+;(let ((autoloads (packages-list-autoloads-path)))
+;  ;; (print (concat "Autoloads: " (prin1-to-string autoloads)))
+;  (while autoloads
+;    (let ((arg (car autoloads)))
+;      (if (null (member arg processed))
+;        (progn
+;          ;; (print arg)
+;          (if (and (null docfile-out-of-date)
+;                   (file-newer-than-file-p arg docfile))
+;              (setq docfile-out-of-date t))
+;          (setq processed (cons arg processed))))
+;      (setq autoloads (cdr autoloads)))))
+
+;; Now fire up make-docfile and we're done
+
+(setq processed (nreverse processed))
+
+;; (print (prin1-to-string (append options processed)))
+
+(if docfile-out-of-date
+    (progn
+      (princ "Spawning make-docfile ...")
+      ;; (print (prin1-to-string (append options processed)))
+
+      (setq exec-path (list (concat default-directory "../lib-src")))
+
+      ;; (locate-file-clear-hashing nil)
+      (if (memq system-type '(berkeley-unix next-mach))
+         ;; Suboptimal, but we have a unresolved bug somewhere in the
+         ;; low-level process code
+         (call-process-internal
+          "/bin/csh"
+          nil
+          t
+          nil
+          "-fc"
+          (mapconcat
+           'identity
+           (append
+            (list (concat default-directory "../lib-src/make-docfile"))
+            options processed)
+           " "))
+       ;; (print (prin1-to-string (append options processed)))
+       (apply 'call-process-internal
+              ;; (concat default-directory "../lib-src/make-docfile")
+              "make-docfile"
+              nil
+              t
+              nil
+              (append options processed)))
+
+      (princ "Spawning make-docfile ...done\n")
+      ;; (write-region-internal (point-min) (point-max) "/tmp/DOC")
+      )
+  (princ "DOC file is up to date\n"))
+
+(kill-emacs)
+
+;;; make-docfile.el ends here
diff --git a/lisp/map-ynp.el b/lisp/map-ynp.el
new file mode 100644 (file)
index 0000000..64d3e58
--- /dev/null
@@ -0,0 +1,292 @@
+;;; map-ynp.el --- General-purpose boolean question-asker.
+
+;; Copyright (C) 1991-1995, 1997 Free Software Foundation, Inc.
+
+;; Author: Roland McGrath <roland@gnu.ai.mit.edu>
+;; Keywords: lisp, extensions, dumped
+
+;; 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; see the file COPYING.  If not, write to the Free
+;; Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+;; 02111-1307, USA.
+
+;;; Synched up with: Emacs/Mule zeta.
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs.
+
+;; map-y-or-n-p is a general-purpose question-asking function.
+;; It asks a series of y/n questions (a la y-or-n-p), and decides to
+;; applies an action to each element of a list based on the answer.
+;; The nice thing is that you also get some other possible answers
+;; to use, reminiscent of query-replace: ! to answer y to all remaining
+;; questions; ESC or q to answer n to all remaining questions; . to answer
+;; y once and then n for the remainder; and you can get help with C-h.
+
+;;; Code:
+
+(defun map-y-or-n-p (prompter actor list &optional help action-alist
+                             no-cursor-in-echo-area)
+  "Ask a series of boolean questions.
+Takes args PROMPTER ACTOR LIST, and optional args HELP and ACTION-ALIST.
+
+LIST is a list of objects, or a function of no arguments to return the next
+object or nil.
+
+If PROMPTER is a string, the prompt is \(format PROMPTER OBJECT\).  If not
+a string, PROMPTER is a function of one arg (an object from LIST), which
+returns a string to be used as the prompt for that object.  If the return
+value is not a string, it may be nil to ignore the object or non-nil to act
+on the object without asking the user.
+
+ACTOR is a function of one arg (an object from LIST),
+which gets called with each object that the user answers `yes' for.
+
+If HELP is given, it is a list (OBJECT OBJECTS ACTION),
+where OBJECT is a string giving the singular noun for an elt of LIST;
+OBJECTS is the plural noun for elts of LIST, and ACTION is a transitive
+verb describing ACTOR.  The default is \(\"object\" \"objects\" \"act on\"\).
+
+At the prompts, the user may enter y, Y, or SPC to act on that object;
+n, N, or DEL to skip that object; ! to act on all following objects;
+ESC or q to exit (skip all following objects); . (period) to act on the
+current object and then exit; or \\[help-command] to get help.
+
+If ACTION-ALIST is given, it is an alist (KEY FUNCTION HELP) of extra keys
+that will be accepted.  KEY is a character; FUNCTION is a function of one
+arg (an object from LIST); HELP is a string.  When the user hits KEY,
+FUNCTION is called.  If it returns non-nil, the object is considered
+\"acted upon\", and the next object from LIST is processed.  If it returns
+nil, the prompt is repeated for the same object.
+
+Final optional argument NO-CURSOR-IN-ECHO-AREA non-nil says not to set
+`cursor-in-echo-area' while prompting.
+
+This function uses `query-replace-map' to define the standard responses,
+but not all of the responses which `query-replace' understands
+are meaningful here.
+
+Returns the number of actions taken."
+  (let* ((actions 0)
+        user-keys mouse-event map prompt char elt def
+        ;; Non-nil means we should use mouse menus to ask.
+        ;; use-menus
+        ;;delayed-switch-frame
+        (next (if (or (and list (symbolp list))
+                      (subrp list)
+                      (compiled-function-p list)
+                      (and (consp list)
+                           (eq (car list) 'lambda)))
+                  (function (lambda ()
+                              (setq elt (funcall list))))
+                (function (lambda ()
+                            (if list
+                                (progn
+                                  (setq elt (car list)
+                                        list (cdr list))
+                                  t)
+                              nil))))))
+    (if (should-use-dialog-box-p)
+       ;; Make a list describing a dialog box.
+       (let (;; (object (capitalize (or (nth 0 help) "object")))
+             ;; (objects (capitalize (or (nth 1 help) "objects")))
+             ;; (action (capitalize (or (nth 2 help) "act on")))
+             )
+         (setq map `(("Yes" . act) ("No" . skip)
+; bogus crap.  --ben
+;                      ((, (if help
+;                              (capitalize
+;                               (or (nth 3 help)
+;                                   (concat action " All " objects)))
+;                            "Do All")) . automatic)
+;                      ((, (if help
+;                              (capitalize
+;                               (or (nth 4 help)
+;                                   (concat action " " object " And Quit")))
+;                            "Do it and Quit")) . act-and-exit)
+;                      ((, (capitalize
+;                           (or (and help (nth 5 help)) "Quit")))
+;                       . exit)
+                       ("Yes All" . automatic)
+                       ("No All" . exit)
+                       ("Cancel" . quit)
+                       ,@(mapcar (lambda (elt)
+                                   (cons (capitalize (nth 2 elt))
+                                         (vector (nth 1 elt))))
+                                 action-alist))
+               mouse-event last-command-event))
+      (setq user-keys (if action-alist
+                         (concat (mapconcat (function
+                                             (lambda (elt)
+                                               (key-description
+                                                (if (characterp (car elt))
+                                                    ;; XEmacs
+                                                    (char-to-string (car elt))
+                                                  (car elt)))))
+                                            action-alist ", ")
+                                 " ")
+                       "")
+           ;; Make a map that defines each user key as a vector containing
+           ;; its definition.
+           ;; XEmacs
+           map (let ((foomap (make-sparse-keymap)))
+                 (mapcar #'(lambda (elt)
+                             (define-key
+                               foomap
+                               (if (characterp (car elt))
+                                   (char-to-string (car elt))
+                                 (car elt))
+                               (vector (nth 1 elt))))
+                         action-alist)
+                 (set-keymap-parents foomap (list query-replace-map))
+                 foomap)))
+    (unwind-protect
+       (progn
+         (if (stringp prompter)
+             (setq prompter (` (lambda (object)
+                                 (format (, prompter) object)))))
+         (while (funcall next)
+           (setq prompt (funcall prompter elt))
+           (cond ((stringp prompt)
+                  ;; Prompt the user about this object.
+                  (setq quit-flag nil)
+                  (if mouse-event ; XEmacs
+                      (setq def (or (get-dialog-box-response
+                                     mouse-event
+                                     (cons prompt map))
+                                    'quit))
+                    ;; Prompt in the echo area.
+                    (let ((cursor-in-echo-area (not no-cursor-in-echo-area)))
+                      (display-message
+                       'prompt
+                       (format "%s(y, n, !, ., q, %sor %s) "
+                               prompt user-keys
+                               (key-description (vector help-char))))
+                      (setq char (next-command-event))
+                      ;; Show the answer to the question.
+                      (display-message
+                       'prompt
+                       (format
+                        "%s(y, n, !, ., q, %sor %s) %s"
+                        prompt user-keys
+                        (key-description (vector help-char))
+                        (single-key-description char))))
+                    (setq def (lookup-key map (vector char))))
+                  (cond ((eq def 'exit)
+                         (setq next (function (lambda () nil))))
+                        ((eq def 'act)
+                         ;; Act on the object.
+                         (funcall actor elt)
+                         (setq actions (1+ actions)))
+                        ((eq def 'skip)
+                         ;; Skip the object.
+                         )
+                        ((eq def 'act-and-exit)
+                         ;; Act on the object and then exit.
+                         (funcall actor elt)
+                         (setq actions (1+ actions)
+                               next (function (lambda () nil))))
+                        ((or (eq def 'quit) (eq def 'exit-prefix))
+                         (setq quit-flag t)
+                         (setq next (` (lambda ()
+                                         (setq next '(, next))
+                                         '(, elt)))))
+                        ((eq def 'automatic)
+                         ;; Act on this and all following objects.
+                         ;; (if (funcall prompter elt) ; Emacs
+                         (if (eval (funcall prompter elt))
+                             (progn
+                               (funcall actor elt)
+                               (setq actions (1+ actions))))
+                         (while (funcall next)
+                           ;; (funcall prompter elt) ; Emacs
+                           (if (eval (funcall prompter elt))
+                               (progn
+                                 (funcall actor elt)
+                                 (setq actions (1+ actions))))))
+                        ((eq def 'help)
+                         (with-output-to-temp-buffer "*Help*"
+                           (princ
+                            (let ((object (if help (nth 0 help) "object"))
+                                  (objects (if help (nth 1 help) "objects"))
+                                  (action (if help (nth 2 help) "act on")))
+                              (concat
+                               (format "Type SPC or `y' to %s the current %s;
+DEL or `n' to skip the current %s;
+! to %s all remaining %s;
+ESC or `q' to exit;\n"
+                                       action object object action objects)
+                               (mapconcat (function
+                                           (lambda (elt)
+                                             (format "%c to %s"
+                                                     (nth 0 elt)
+                                                     (nth 2 elt))))
+                                          action-alist
+                                          ";\n")
+                               (if action-alist ";\n")
+                               (format "or . (period) to %s \
+the current %s and exit."
+                                       action object))))
+                           (save-excursion
+                             (set-buffer standard-output)
+                             (help-mode)))
+
+                         (setq next (` (lambda ()
+                                         (setq next '(, next))
+                                         '(, elt)))))
+                        ((vectorp def)
+                         ;; A user-defined key.
+                         (if (funcall (aref def 0) elt) ;Call its function.
+                             ;; The function has eaten this object.
+                             (setq actions (1+ actions))
+                           ;; Regurgitated; try again.
+                           (setq next (` (lambda ()
+                                           (setq next '(, next))
+                                           '(, elt))))))
+                        ;((and (consp char) ; Emacs
+                        ;      (eq (car char) 'switch-frame))
+                        ; ;; switch-frame event.  Put it off until we're done.
+                        ; (setq delayed-switch-frame char)
+                        ; (setq next (` (lambda ()
+                        ;                 (setq next '(, next))
+                        ;                 '(, elt)))))
+                        (t
+                         ;; Random char.
+                         (message "Type %s for help."
+                                  (key-description (vector help-char)))
+                         (beep)
+                         (sit-for 1)
+                         (setq next (` (lambda ()
+                                         (setq next '(, next))
+                                         '(, elt)))))))
+                 ((eval prompt)
+                  (progn
+                    (funcall actor elt)
+                    (setq actions (1+ actions)))))))
+      ;;(if delayed-switch-frame
+      ;;          (setq unread-command-events
+      ;;                (cons delayed-switch-frame unread-command-events))))
+      ;;                  ((eval prompt)
+      ;;                   (progn
+      ;;                     (funcall actor elt)
+      ;;                     (setq actions (1+ actions)))))
+      )
+    ;; Clear the last prompt from the minibuffer.
+    (clear-message 'prompt)
+    ;; Return the number of actions that were taken.
+    actions))
+
+;;; map-ynp.el ends here
diff --git a/lisp/menubar.el b/lisp/menubar.el
new file mode 100644 (file)
index 0000000..fa55059
--- /dev/null
@@ -0,0 +1,537 @@
+;;; menubar.el --- Menubar support for XEmacs
+
+;; Copyright (C) 1991-4, 1997-1998 Free Software Foundation, Inc.
+;; Copyright (C) 1995 Tinker Systems and INS Engineering Corp.
+;; Copyright (C) 1995, 1996 Ben Wing.
+
+;; Maintainer: XEmacs Development Team
+;; Keywords: internal, extensions, dumped
+
+;; 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; see the file COPYING.  If not, write to the 
+;; Free Software Foundation, 59 Temple Place - Suite 330,
+;; Boston, MA 02111-1307, USA.
+
+;;; Synched up with: Not in FSF. (Completely divergent from FSF menu-bar.el)
+
+;;; Commentary:
+
+;; This file is dumped with XEmacs (when menubar support is compiled in).
+
+;; Some stuff in FSF menu-bar.el is in x-menubar.el
+
+;;; Code:
+
+(defgroup menu nil
+  "Input from the menus."
+  :group 'environment)
+
+(defvar default-menubar nil)
+
+;; this function is considered "part of the lexicon" by many,
+;; so we'll leave it here.
+(defun kill-this-buffer ()     ; for the menubar
+  "Kill the current buffer."
+  (interactive)
+  (kill-buffer (current-buffer)))
+
+(defun set-menubar-dirty-flag ()
+  "Tell XEmacs that the menubar has to be updated.
+NOTE: XEmacs now recognizes when you set a different value for
+`current-menubar'.  You *only* need to call this function if you
+destructively modify a part of the menubar and don't set `current-menubar'.
+Note that all the functions that modify a menu call this automatically."
+  (setq-default current-menubar (default-value 'current-menubar)))
+
+;; #### shouldn't this perhaps be `copy-tree'?
+(defun set-menubar (menubar)
+  "Set the default menubar to be MENUBAR.
+See `current-menubar' for a description of the syntax of a menubar."
+  (check-menu-syntax menubar t)
+  (setq-default current-menubar (copy-sequence menubar)))
+
+(defun set-buffer-menubar (menubar)
+  "Set the buffer-local menubar to be MENUBAR.
+See `current-menubar' for a description of the syntax of a menubar."
+  (check-menu-syntax menubar t)
+  (make-local-variable 'current-menubar)
+  (setq current-menubar (copy-sequence menubar)))
+
+(defun check-menu-syntax (menu &optional menubar-p)
+  ;; The C code does syntax checking on the value of `current-menubar',
+  ;; but it's better to do it early, before things have gotten messed up.
+  (if menubar-p
+      nil
+    (or (stringp (car menu))
+       (signal 'error
+               (list "menu name (first element) must be a string" menu)))
+    ;;(or (cdr menu) (signal 'error (list "menu is empty" menu)))
+    (setq menu (cdr menu)))
+  (let (menuitem item)
+    (while (keywordp (setq item (car menu)))
+      (or (memq item '(:config :included :filter :accelerator))
+         (signal 'error
+                 (list "menu keyword must be :config, :included, :accelerator or :filter"
+                       item)))
+      (if (or (not (cdr menu))
+             (vectorp (nth 1 menu))
+             (keywordp (nth 1 menu)))
+         (signal 'error (list "strange keyword value" item (nth 1 menu))))
+      (setq menu (nthcdr 2 menu)))
+    (while menu
+      (setq menuitem (car menu))
+      (cond
+       ((stringp menuitem)
+       (and (string-match "^\\(-+\\|=+\\):\\(.*\\)" menuitem)
+            (setq item (match-string 2 menuitem))
+            (or (member item '(;; Motif-compatible 
+                               "singleLine"
+                               "doubleLine"
+                               "singleDashedLine"
+                               "doubleDashedLine"
+                               "noLine"
+                               "shadowEtchedIn"
+                               "shadowEtchedOut"
+                               "shadowEtchedInDash"
+                               "shadowEtchedOutDash"
+                               ;; non-Motif (Lucid menubar widget only)
+                               "shadowDoubleEtchedIn"
+                               "shadowDoubleEtchedOut"
+                               "shadowDoubleEtchedInDash"
+                               "shadowDoubleEtchedOutDash"
+                               ))
+                (signal 'error (list "bogus separator style in menu item" item)))
+            ))
+       ((null menuitem)
+       (or menubar-p
+           (signal 'error (list "nil is only permitted in the top level of menubars"))))
+       ((consp menuitem)
+       (check-menu-syntax menuitem))
+       ((vectorp menuitem)
+       (let ((L (length menuitem))
+             plistp)
+         (and (< L 2)
+              (signal 'error
+                      (list "button descriptors must be at least 2 long"
+                            menuitem)))
+         (setq plistp (or (>= L 5)
+                          (and (> L 2) (keywordp (aref menuitem 2)))))
+         (or (stringp (aref menuitem 0))
+             (signal 'error
+                     (list
+                      "first element of a button must be a string (the label)"
+                      menuitem)))
+         (or plistp
+             (< L 4)
+             (null (aref menuitem 3))
+             (stringp (aref menuitem 3))
+             (signal 'error
+                     (list
+                      "fourth element of a button must be a string (the label suffix)"
+                      menuitem)))
+         (if plistp
+             (let ((i 2)
+                   selp
+                   style
+                   item)
+               (while (< i L)
+                 (setq item (aref menuitem i))
+                 (cond ((not (memq item '(:active :suffix :keys :style
+                                                  :full :included :selected
+                                                  :accelerator)))
+                        (signal 'error
+                                (list (if (keywordp item)
+                                          "unknown menu item keyword"
+                                        "not a keyword")
+                                      item menuitem)))
+                       ((eq item :style)
+                        (setq style (aref menuitem (1+ i)))
+                        (or (memq style '(nil toggle radio button text))
+                            (signal 'error (list "unknown style" style
+                                                 menuitem))))
+                       ((eq item :selected) (setq selp t))
+                       )
+                 (setq i (+ i (if (eq item :full) 1 2))))
+               (if (and selp (not (memq style '(toggle button radio))))
+                   (signal 'error
+                           (list
+                            ":selected only makes sense with :style toggle, radio, or button"
+                            menuitem)))
+               )))
+       )
+       ;; (t (signal 'error (list "unrecognised menu descriptor" menuitem))))
+       (t (message "unrecognised menu descriptor %s" (prin1-to-string menuitem))))
+      (setq menu (cdr menu)))))
+
+\f
+;;; menu manipulation functions
+
+(defun find-menu-item (menubar item-path-list &optional parent)
+  "Search MENUBAR for item given by ITEM-PATH-LIST starting from PARENT.
+Returns (ITEM . PARENT), where PARENT is the immediate parent of
+ the item found.
+If the item does not exist, the car of the returned value is nil.
+If some menu in the ITEM-PATH-LIST does not exist, an error is signalled."
+  (check-argument-type 'listp item-path-list)
+  (unless parent
+    (setq item-path-list (mapcar 'normalize-menu-item-name item-path-list)))
+  (if (not (consp menubar))
+      nil
+    (let ((rest menubar)
+         result)
+      (when (stringp (car rest))
+       (setq rest (cdr rest)))
+      (while (keywordp (car rest))
+       (setq rest (cddr rest)))
+      (while rest
+       (if (and (car rest)
+                (equal (car item-path-list)
+                       (normalize-menu-item-name
+                        (cond ((vectorp (car rest))
+                               (aref (car rest) 0))
+                              ((stringp (car rest))
+                               (car rest))
+                              (t
+                               (caar rest))))))
+           (setq result (car rest)
+                 rest nil)
+         (setq rest (cdr rest))))
+      (if (cdr item-path-list)
+         (cond ((consp result)
+                (find-menu-item (cdr result) (cdr item-path-list) result))
+               (result
+                (signal 'error (list (gettext "not a submenu") result)))
+               (t
+                (signal 'error (list (gettext "no such submenu")
+                                     (car item-path-list)))))
+       (cons result parent)))))
+
+(defun add-menu-item-1 (leaf-p menu-path new-item before)
+  ;; This code looks like it could be cleaned up some more
+  ;; Do we really need 6 calls to find-menu-item?
+  (when before (setq before (normalize-menu-item-name before)))
+  (let* ((item-name
+         (cond ((vectorp new-item) (aref new-item 0))
+               ((consp   new-item) (car  new-item))
+               (t nil)))
+        (menubar current-menubar)
+        (menu (condition-case ()
+                  (car (find-menu-item menubar menu-path))
+                (error nil)))
+        (item-found (cond
+                     ((null item-name)
+                      nil)
+                     ((not (listp menu))
+                      (signal 'error (list (gettext "not a submenu")
+                                           menu-path)))
+                     (menu
+                      (find-menu-item (cdr menu) (list item-name)))
+                     (t
+                      (find-menu-item menubar (list item-name)))
+                     )))
+    (unless menubar
+      (error "`current-menubar' is nil: can't add menus to it."))
+    (unless menu
+      (let ((rest menu-path)
+           (so-far menubar))
+       (while rest
+;;;      (setq menu (car (find-menu-item (cdr so-far) (list (car rest)))))
+         (setq menu
+               (if (eq so-far menubar)
+                   (car (find-menu-item so-far (list (car rest))))
+                 (car (find-menu-item (cdr so-far) (list (car rest))))))
+         (unless menu
+           (let ((rest2 so-far))
+             (while (and (cdr rest2) (car (cdr rest2)))
+               (setq rest2 (cdr rest2)))
+             (setcdr rest2
+                     (nconc (list (setq menu (list (car rest))))
+                            (cdr rest2)))))
+         (setq so-far menu)
+         (setq rest (cdr rest)))))
+    (if (and item-found (car item-found))
+       ;; hack the item in place.
+       (if menu
+           ;; Isn't it very bad form to use nsubstitute for side effects?
+           (nsubstitute new-item (car item-found) menu)
+         (setq current-menubar (nsubstitute new-item
+                                            (car item-found)
+                                            current-menubar)))
+      ;; OK, we have to add the whole thing...
+      ;; if BEFORE is specified, try to add it there.
+      (unless menu (setq menu current-menubar))
+      (when before
+       (setq before (car (find-menu-item menu (list before)))))
+      (let ((rest menu)
+           (added-before nil))
+       (while rest
+         (if (eq before (car (cdr rest)))
+             (progn
+               (setcdr rest (cons new-item (cdr rest)))
+               (setq rest nil added-before t))
+           (setq rest (cdr rest))))
+       (when (not added-before)
+         ;; adding before the first item on the menubar itself is harder
+         (if (and (eq menu menubar) (eq before (car menu)))
+             (setq menu (cons new-item menu)
+                   current-menubar menu)
+           ;; otherwise, add the item to the end.
+           (nconc menu (list new-item))))))
+    (set-menubar-dirty-flag)
+    new-item))
+
+(defun add-menu-button (menu-path menu-leaf &optional before)
+  "Add a menu item to some menu, creating the menu first if necessary.
+If the named item exists already, it is changed.
+MENU-PATH identifies the menu under which the new menu item should be inserted.
+ It is a list of strings; for example, (\"File\") names the top-level \"File\"
+ menu.  (\"File\" \"Foo\") names a hypothetical submenu of \"File\".
+MENU-LEAF is a menubar leaf node.  See the documentation of `current-menubar'.
+BEFORE, if provided, is the name of a menu item before which this item should
+ be added, if this item is not on the menu already.  If the item is already
+ present, it will not be moved."
+  (add-menu-item-1 t menu-path menu-leaf before))
+
+;; I actually liked the old name better, but the interface has changed too
+;; drastically to keep it. --Stig 
+(defun add-submenu (menu-path submenu &optional before)
+  "Add a menu to the menubar or one of its submenus.
+If the named menu exists already, it is changed.
+MENU-PATH identifies the menu under which the new menu should be inserted.
+ It is a list of strings; for example, (\"File\") names the top-level \"File\"
+ menu.  (\"File\" \"Foo\") names a hypothetical submenu of \"File\".
+ If MENU-PATH is nil, then the menu will be added to the menubar itself.
+SUBMENU is the new menu to add.
+ See the documentation of `current-menubar' for the syntax.
+BEFORE, if provided, is the name of a menu before which this menu should
+ be added, if this menu is not on its parent already.  If the menu is already
+ present, it will not be moved."
+  (check-menu-syntax submenu nil)
+  (add-menu-item-1 nil menu-path submenu before))
+
+(defun purecopy-menubar (x)
+  ;; this calls purecopy on the strings, and the contents of the vectors,
+  ;; but not on the vectors themselves, or the conses - those must be
+  ;; writable.
+  (cond ((vectorp x)
+        (let ((i (length x)))
+          (while (> i 0)
+            (aset x (1- i) (purecopy (aref x (1- i))))
+            (setq i (1- i))))
+        x)
+       ((consp x)
+        (let ((rest x))
+          (while rest
+            (setcar rest (purecopy-menubar (car rest)))
+            (setq rest (cdr rest))))
+        x)
+       (t
+        (purecopy x))))
+
+(defun delete-menu-item (path)
+  "Remove the named menu item from the menu hierarchy.
+PATH is a list of strings which identify the position of the menu item in 
+the menu hierarchy.  The documentation of `add-submenu' describes menu-paths."
+  (let* ((pair (condition-case nil (find-menu-item current-menubar path)
+                (error nil)))
+        (item (car pair))
+        (parent (or (cdr pair) current-menubar)))
+    (if (not item)
+       nil
+      ;; the menubar is the only special case, because other menus begin
+      ;; with their name.
+      (if (eq parent current-menubar)
+         (setq current-menubar (delq item parent))
+       (delq item parent))
+      (set-menubar-dirty-flag)
+      item)))
+
+(defun relabel-menu-item (path new-name)
+  "Change the string of the specified menu item.
+PATH is a list of strings which identify the position of the menu item in 
+the menu hierarchy.  (\"File\" \"Save\") means the menu item called \"Save\"
+under the toplevel \"File\" menu.  (\"Menu\" \"Foo\" \"Item\") means the 
+menu item called \"Item\" under the \"Foo\" submenu of \"Menu\".
+NEW-NAME is the string that the menu item will be printed as from now on."
+  (or (stringp new-name)
+      (setq new-name (signal 'wrong-type-argument (list 'stringp new-name))))
+  (let* ((menubar current-menubar)
+         (pair (find-menu-item menubar path))
+         (item (car pair))
+         (menu (cdr pair)))
+    (or item
+        (signal 'error (list (if menu (gettext "No such menu item")
+                               (gettext "No such menu"))
+                             path)))
+    (if (and (consp item)
+             (stringp (car item)))
+        (setcar item new-name)
+      (aset item 0 new-name))
+    (set-menubar-dirty-flag)
+    item))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;
+;; these are all bad style.  Why in the world would we put evaluable forms
+;; into the menubar if we didn't want people to use 'em?
+;; x-font-menu.el is the only known offender right now and that ought to be
+;; rehashed a bit.
+;; 
+
+(defun enable-menu-item-1 (path toggle-p on-p)
+  (let (menu item)
+    (if (and (vectorp path) (> (length path) 2)) ; limited syntax checking...
+        (setq item path)
+      (let* ((menubar current-menubar)
+             (pair (find-menu-item menubar path)))
+        (setq item (car pair)
+              menu (cdr pair))
+        (or item
+            (signal 'error (list (if menu
+                                     "No such menu item"
+                                   "No such menu")
+                                 path)))
+        (if (consp item)
+            (error "%S is a menu, not a menu item" path))))
+    (if (or (> (length item) 4)
+            (and (symbolp (aref item 2))
+                 (= ?: (aref (symbol-name (aref item 2)) 0))))
+        ;; plist-like syntax
+        (let ((i 2)
+              (keyword (if toggle-p :selected :active))
+              (ok nil))
+          (while (< i (length item))
+            (cond ((eq (aref item i) keyword)
+                   (aset item (1+ i) on-p)
+                   (setq ok t)))
+            (setq i (+ i 2)))
+          (cond (ok nil)
+                (toggle-p
+                 (signal 'error (list "not a toggle menu item" item)))
+                (t
+                 ;; Need to copy the item to extend it, sigh...
+                 (let ((cons (memq item menu))
+                       (new-item (vconcat item (list keyword on-p))))
+                   (if cons
+                       (setcar cons (setq item new-item))
+                     (if menu
+                         (error "couldn't find %S on its parent?" item)
+                       (error "no %S slot to set: %S" keyword item)))))))
+      ;; positional syntax
+      (if toggle-p
+          (signal 'error (list "not a toggle menu item" item))
+        (aset item 2 on-p)))
+    (set-menubar-dirty-flag)
+    item))
+
+(defun enable-menu-item (path)
+  "Make the named menu item be selectable.
+PATH is a list of strings which identify the position of the menu item in 
+the menu hierarchy.  (\"File\" \"Save\") means the menu item called \"Save\"
+under the toplevel \"File\" menu.  (\"Menu\" \"Foo\" \"Item\") means the 
+menu item called \"Item\" under the \"Foo\" submenu of \"Menu\"."
+  (enable-menu-item-1 path nil t))
+
+(defun disable-menu-item (path)
+  "Make the named menu item be unselectable.
+PATH is a list of strings which identify the position of the menu item in 
+the menu hierarchy.  (\"File\" \"Save\") means the menu item called \"Save\"
+under the toplevel \"File\" menu.  (\"Menu\" \"Foo\" \"Item\") means the 
+menu item called \"Item\" under the \"Foo\" submenu of \"Menu\"."
+  (enable-menu-item-1 path nil nil))
+
+(defun select-toggle-menu-item (path)
+  "Make the named toggle- or radio-style menu item be in the `selected' state.
+PATH is a list of strings which identify the position of the menu item in 
+the menu hierarchy.  (\"File\" \"Save\") means the menu item called \"Save\"
+under the toplevel \"File\" menu.  (\"Menu\" \"Foo\" \"Item\") means the 
+menu item called \"Item\" under the \"Foo\" submenu of \"Menu\"."
+  (enable-menu-item-1 path t t))
+
+(defun deselect-toggle-menu-item (path)
+ "Make the named toggle- or radio-style menu item be in the `unselected' state.
+PATH is a list of strings which identify the position of the menu item in 
+the menu hierarchy.  (\"File\" \"Save\") means the menu item called \"Save\"
+under the toplevel \"File\" menu.  (\"Menu\" \"Foo\" \"Item\") means the 
+menu item called \"Item\" under the \"Foo\" submenu of \"Menu\"."
+  (enable-menu-item-1 path t nil))
+
+\f
+(defun get-popup-menu-response (menu-desc &optional event)
+  "Pop up the given menu and wait for a response.
+This blocks until the response is received, and returns the misc-user
+event that encapsulates the response.  To execute it, you can do
+  (funcall (event-function response) (event-object response))
+If no response was received, nil is returned.
+
+MENU-DESC and EVENT are as in the call to `popup-menu'."
+  ;; partially stolen from w3
+  (let ((echo-keystrokes 0)
+       new-event)
+    (popup-menu menu-desc event)
+    (catch 'popup-done
+      (while t
+       (setq new-event (next-command-event new-event))
+       (cond ((misc-user-event-p new-event)
+              (throw 'popup-done new-event))
+             ((not (popup-up-p))
+              (setq unread-command-events (cons new-event
+                                                unread-command-events))
+              (throw 'popup-done nil))
+             ((button-release-event-p new-event);; don't beep twice
+              nil)
+             ((event-matches-key-specifier-p (quit-char))
+              (signal 'quit nil))
+             (t
+              (beep)
+              (message "please make a choice from the menu.")))))))
+
+(defun popup-menu-and-execute-in-window (menu-desc event)
+  "Pop up the given menu and execute its response in EVENT's window.
+This blocks until the response is received, temporarily selects
+EVENT's window, and executes the command specified in the response.
+EVENT can also be a window.  See `popup-menu' for the semantics of
+MENU-DESC."
+  (let ((response
+        (get-popup-menu-response menu-desc
+                                 (and (eventp event) event))))
+    (and (misc-user-event-p response)
+        (save-selected-window
+          (select-window (if (windowp event) event
+                           (event-window event)))
+          (funcall (event-function response)
+                   (event-object response))))))
+
+;; provide default bindings for menu accelerator map
+(and (boundp 'menu-accelerator-map)
+     (keymapp menu-accelerator-map)
+     (progn
+       (define-key menu-accelerator-map "\e" 'menu-escape)
+       (define-key menu-accelerator-map [left] 'menu-left)
+       (define-key menu-accelerator-map [right] 'menu-right)
+       (define-key menu-accelerator-map [up] 'menu-up)
+       (define-key menu-accelerator-map [down] 'menu-down)
+       (define-key menu-accelerator-map [return] 'menu-select)
+       (define-key menu-accelerator-map [kp_down] 'menu-down)
+       (define-key menu-accelerator-map [kp_up] 'menu-down)
+       (define-key menu-accelerator-map [kp_left] 'menu-left)
+       (define-key menu-accelerator-map [kp_right] 'menu-right)
+       (define-key menu-accelerator-map [kp_enter] 'menu-select)
+       (define-key menu-accelerator-map "\C-g" 'menu-quit)))
+
+\f
+(provide 'menubar)
+
+;;; menubar.el ends here
diff --git a/move-if-change b/move-if-change
new file mode 100755 (executable)
index 0000000..ee9e355
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+if
+test -r $2
+then
+if
+cmp $1 $2 > /dev/null
+then
+echo $2 is unchanged
+rm -f $1
+else
+mv -f $1 $2
+fi
+else
+mv -f $1 $2
+fi
diff --git a/version.sh b/version.sh
new file mode 100644 (file)
index 0000000..5778428
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+emacs_major_version=21
+emacs_minor_version=2
+emacs_beta_version=1
+xemacs_codename="Aeolus"
+infodock_major_version=4
+infodock_minor_version=0
+infodock_build_version=1