+ A good method is to make a shell alias for xemacs:
+
+ alias xemacs=/src/xemacs-21.5/src/xemacs
+
+ (You will obviously use whatever directory you downloaded the source
+tree to instead of `/src/xemacs-21.5').
+
+ This will let you run XEmacs without massive copying.
+
+\1f
+File: xemacs-faq.info, Node: Q2.0.5, Next: Q2.1.1, Prev: Q2.0.4, Up: Installation
+
+Q2.0.5: XEmacs is too big
+-------------------------
+
+The space required by the installation directories can be reduced
+dramatically if desired. Gzip all the .el files. Remove all the
+packages you'll never want to use. Remove the TexInfo manuals. Remove
+the Info (and use just hardcopy versions of the manual). Remove most
+of the stuff in etc. Remove or gzip all the source code. Gzip or
+remove the C source code. Configure it so that copies are not made of
+the support lisp.
+
+ These are all Emacs Lisp source code and bytecompiled object code.
+You may safely gzip everything named *.el here. You may remove any
+package you don't use. _Nothing bad will happen if you delete a package
+that you do not use_. You must be sure you do not use it though, so be
+conservative at first.
+
+ Any package with the possible exceptions of xemacs-base, and EFS are
+candidates for removal. Ask yourself, _Do I ever want to use this
+package?_ If the answer is no, then it is a candidate for removal.
+
+ First, gzip all the .el files. Then go about package by package and
+start gzipping the .elc files. Then run XEmacs and do whatever it is
+you normally do. If nothing bad happens, then remove the package. You
+can remove a package via the PUI interface (`M-x pui-list-packages',
+then press `d' to mark the packages you wish to delete, and then `x' to
+delete them.
+
+ Another method is to do `M-x package-get-delete-package'.
+
+2.1: Package Installation
+=========================
+
+\1f
+File: xemacs-faq.info, Node: Q2.1.1, Next: Q2.1.2, Prev: Q2.0.5, Up: Installation
+
+Q2.1.1: How do I install the packages?
+--------------------------------------
+
+There are three ways to install the packages.
+
+ 1. Manually, all at once, using the 'Sumo Tarball'.
+
+ 2. Manually, using individual package tarballs.
+
+ 3. Automatically, using the package tools from XEmacs.
+
+ If you don't want to mess with the packages, it is easiest to just
+grab them manually, all at once. (For the other two ways, *Note
+Q2.1.2::, and *Note Q2.1.3::.) Download the file
+
+ `xemacs-sumo.tar.gz'
+
+ For an XEmacs compiled with Mule you also need
+
+ `xemacs-mule-sumo.tar.gz'
+
+ These are in the `packages' directory on your XEmacs mirror archive:
+`ftp://ftp.xemacs.org/pub/xemacs/packages' or its mirrors. N.B. They
+are called 'Sumo Tarballs' for good reason. They are currently about
+19MB and 4.5MB (gzipped) respectively.
+
+ Install them on Unix and Mac OS X using the shell/Terminal command
+
+ `cd $prefix/lib/xemacs ; gunzip -c <tarballname> | tar xf -'
+
+ Where `$prefix' is what you gave to the `--prefix' flag to
+`configure', and defaults to `/usr/local'.
+
+ If you have GNU tar you can use:
+
+ `cd $prefix/lib/xemacs ; tar zxvf <tarballname>'
+
+ If you have the packages somewhere nonstandard and don't want to
+bother with `$prefix' (for example, you're a developer and are compiling
+the packages yourself, and want your own private copy of everything),
+you can also directly specify this using `configure'. To do this with
+21.5 and above use the `--with-package-prefix' parameter to specify the
+directory under which you untarred the above tarballs. Under 21.4 and
+previous you need to use `--package-path'. Using these options looks
+something like this:
+
+ configure --package-path="~/.xemacs::/src/xemacs/site-packages:/src/xemacs/xemacs-packages:/src/xemacs/mule-packages" ...
+
+ Under Windows, you need to place the above `tar.gz' files in the
+directory specified using the `PACKAGE_PREFIX' value in `nt/config.inc'
+and by default is `\Program Files\XEmacs'. (To untar a `tar.gz' file
+you will need to use a utility such as WinZip, unless you have Cygwin
+or a similar environment installed, in which case the above Unix shell
+command should work fine.) If you want the packages somewhere else,
+just change `PACKAGE_PREFIX'.
+
+ Note that XEmacs finds the packages automatically anywhere underneath
+the directory tree where it expects to find the packages. All you need
+to do is put stuff there; you don't need to run any program to tell
+XEmacs to find the packges, or do anything of that sort.
+
+ However, XEmacs will only notice newly installed packages when it
+starts up, so you will have to restart if you are already running
+XEmacs.
+
+ For more details, *Note Startup Paths: (xemacs)Startup Paths, and
+*Note Packages: (xemacs)Packages.
+
+ 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.
+
+ _NOTE_: For detailed information about how the package hierarchies
+work, *Note Package Overview: (lispref)Package Overview.
+
+\1f
+File: xemacs-faq.info, Node: Q2.1.2, Next: Q2.1.3, Prev: Q2.1.1, Up: Installation
+
+Q2.1.2: Can I install the packages individually?
+------------------------------------------------
+
+Yes, you can download individual packages from the FTP site (*note
+Q2.1.1::). Since packages are automatically noticed at startup, you
+just have to put them in the right place.
+
+ Note: If you are upgrading packages already installed, it's best to
+remove the old package first (*note Q2.1.4::).
+
+ For example if we are installing the `xemacs-base' package (version
+1.48):
+
+ mkdir $prefix/lib/xemacs/xemacs-packages RET # if it does not exist yet
+ cd $prefix/lib/xemacs/xemacs-packages RET
+ gunzip -c /path/to/xemacs-base-1.48-pkg.tar.gz | tar xvf - RET
+
+ Or if you have GNU tar, the last step can be:
+
+ tar zxvf /path/to/xemacs-base-1.48-pkg.tar.gz RET
+
+ For MULE related packages, it is best to untar into the
+`mule-packages' hierarchy, i.e. for the `mule-base' package, version
+1.37:
+
+ mkdir $prefix/lib/xemacs/mule-packages RET # if it does not exist yet
+ cd $prefix/lib/xemacs/mule-packages RET
+ gunzip -c /path/to/mule-base-1.37-pkg.tar.gz | tar xvf - RET
+
+ Or if you have GNU tar, the last step can be:
+
+ tar zxvf /path/to/mule-base-1.37-pkg.tar.gz RET
+
+\1f
+File: xemacs-faq.info, Node: Q2.1.3, Next: Q2.1.4, Prev: Q2.1.2, Up: Installation
+
+Q2.1.3: Can I install the packages 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 already in 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 - For PGP verification of the package-index file.
+
+ After installing these by hand, fire up XEmacs and follow these
+steps.
+
+ 1. Choose a download site.
+ * via menu: Tools -> Packages -> Set Download Site
+
+ * via keyb: M-x customize-variable RET package-get-remote RET
+ (put in the details of remote host and directory)
+
+ If the package tarballs _AND_ the package-index file are in a
+ local directory, you can: M-x pui-set-local-package-get-directory
+ RET
+
+ 2. Obtain a list of packages and display the list in a buffer named
+ "*Packages*".
+ * menu: Tools -> Packages -> List & Install
+
+ * keyb: M-x pui-list-packages RET
+
+ XEmacs will now connect to the remote site and download the latest
+ package-index file.
+
+ The resulting buffer, "*Packages*" has brief instructions at the
+ end of the buffer.
+
+ 3. Choose the packages you wish to install.
+ * mouse: Click button 2 on the package name.
+
+ * keyb: RET on the package name
+
+ 4. Make sure you have everything you need.
+ * menu: Packages -> Add Required
+
+ * keyb: r
+
+ XEmacs will now search for packages that are required by the ones
+ that you have chosen to install and offer to select those packages
+ also.
+
+ For novices and gurus alike, this step can save your bacon. It's
+ easy to forget to install a critical package.
+
+ 5. Download and install the packages.
+ * menu: Packages -> Install/Remove Selected
+
+ * keyb: x
+
+\1f
+File: xemacs-faq.info, Node: Q2.1.4, Next: Q2.1.5, Prev: Q2.1.3, Up: Installation
+
+Q2.1.4: Can I upgrade or remove packages?
+-----------------------------------------
+
+As the exact files and their locations contained in a package may
+change it is recommended 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.
+
+\1f
+File: xemacs-faq.info, Node: Q2.1.5, Next: Q2.1.6, Prev: Q2.1.4, Up: Installation
+
+Q2.1.5: Which packages to install?
+----------------------------------
+
+Unless you are an advanced user, just install everything.
+
+ If you really want to install only what's absolutely needed, 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, mailcrypt
+
+ If you are using the XEmacs package tools, don't forget to do:
+
+ Packages -> Add Required
+
+ To make sure you have everything that the packages you have chosen to
+install need.
+
+ *Note Q1.7.2::, for a description of the various packages.
+
+\1f
+File: xemacs-faq.info, Node: Q2.1.6, Next: Q2.1.7, Prev: Q2.1.5, Up: Installation
+
+Q2.1.6: Can you describe the package location process in more detail?
+---------------------------------------------------------------------
+
+On startup XEmacs looks for packages in so-called package hierarchies.
+Normally, there are three system wide hierarchies, like this:
+
+ $prefix/lib/xemacs/xemacs-packages/
+ Normal packages go here.
+
+ $prefix/lib/xemacs/mule-packages/
+ Mule packages go here and are only searched by MULE-enabled XEmacsen.
+
+ $prefix/lib/xemacs/site-packages/
+ Local and 3rd party packages go here.
+
+ This is what you get when you untar the SUMO tarballs under
+`$prefix/lib/xemacs'.
+
+ `$prefix' is specified using the `--prefix' parameter to
+`configure', and defaults to `usr/local'.
+
+ If the package path is not explicitly specified, XEmacs looks for the
+package directory `xemacs-packages' (and `mule-packages' and
+`site-packages') first under `~/.xemacs', then for a sister directory
+`lib/xemacs-VERSION' of the directory in which the XEmacs executable is
+located, then for a sister directory `lib/xemacs'. The XEmacs
+executable (under Unix at least) is installed by default in
+`/usr/local/bin'; this explains why XEmacs in its default installation
+will find packages that you put under `/usr/local/lib/xemacs'.
+
+ You can specify where exactly XEmacs looks for packages by using the
+`--with-package-prefix' or `--with-package-path' parameters to
+`configure' (or the equivalent settings in `config.inc', under
+Windows), or setting the `EMACSPACKAGEPATH' environment variable (which
+has the same format as `--with-package-path'). *Note Q2.1.1::.
+
+ See `configure.usage' for more info about the format of these
+`configure' parameters.
+
+ In addition to the system wide packages, each user can have his own
+packages installed under `~/.xemacs/'. If you want to install packages
+there using the interactive tools, you need to set
+`package-get-install-to-user-init-directory' to `t'.
+
+ 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/'.
+
+\1f
+File: xemacs-faq.info, Node: Q2.1.7, Next: Q2.2.1, Prev: Q2.1.6, Up: Installation
+
+Q2.1.7: EFS fails with "500 AUTH not understood" (NEW)
+------------------------------------------------------
+
+A typical error: FTP Error: USER request failed; 500 AUTH not
+understood.
+
+ Thanks to giacomo boffi <giacomo.boffi@polimi.it> who recommends on
+comp.emacs.xemacs:
+
+ tell your ftp client to not attempt AUTH authentication (or do not
+use FTP servers that don't understand AUTH)
+
+ and notes that you need to add an element (often "-u") to
+`efs-ftp-program-args'. Use M-x customize-variable, and verify the
+needed flag with `man ftp' or other local documentation.
+
+2.2: Unix/Mac OS X Installation (Also Relevant to Cygwin, MinGW)
+================================================================
+
+\1f
+File: xemacs-faq.info, Node: Q2.2.1, Next: Q2.2.2, Prev: Q2.1.7, Up: Installation
+
+Q2.2.1: Libraries in non-standard locations
+-------------------------------------------
+
+If your libraries are in a non-standard location, you can specify the
+location using the following flags to `configure'. Under 21.4 or
+earlier:
+
+ --site-libraries=WHATEVER
+ --site-includes=WHATEVER
+
+ Under 21.5 or later:
+
+ --with-site-libraries=WHATEVER
+ --with-site-includes=WHATEVER
+
+ If you have multiple paths to specify, use the following syntax:
+
+ --site-libraries='/path/one /path/two /path/etc'
+
+ If the libraries and headers reside in the directories `lib' and
+`include' of a common root (say `/sw') then both can be specified with
+a single option:
+
+ --site-prefixes=WHATEVER
+
+ or for 21.5:
+
+ --with-site-prefixes=WHATEVER
+
+\1f
+File: xemacs-faq.info, Node: Q2.2.2, Next: Q2.3.1, Prev: Q2.2.1, Up: Installation
+
+Q2.2.2: Why can't I strip XEmacs?
+---------------------------------
+
+Richard Cognot <cognot@fronsac.ensg.u-nancy.fr> writes:
+
+ Because of the way XEmacs (and every other Emacsen, AFAIK) is
+ built. The link gives you a bare-boned emacs (called temacs).
+ temacs is then run, preloading some of the lisp files. The result
+ is then dumped into a new executable, named xemacs, which will
+ contain all of the preloaded lisp functions and data.
+
+ Now, during the dump itself, the executable (code+data+symbols) is
+ written on disk using a special unexec() function. This function is
+ obviously heavily system dependent. And on some systems, it leads
+ to an executable which, although valid, cannot be stripped without
+ damage. If memory serves, this is especially the case for AIX
+ binaries. On other architectures it might work OK.
+
+ The Right Way to strip the emacs binary is to strip temacs prior to
+ dumping xemacs. This will always work, although you can do that
+ only if you install from sources (as temacs is `not' part of the
+ binary kits).
+
+ Nat Makarevitch <nat@nataa.fr.eu.org> writes:
+
+ Here is the trick:
+
+ 1. [ ./configure; make ]
+
+ 2. rm src/xemacs
+
+ 3. strip src/temacs
+
+ 4. make
+
+ 5. cp src/xemacs /usr/local/bin/xemacs
+
+ 6. cp lib-src/DOC-19.16-XEmacs
+ /usr/local/lib/xemacs-19.16/i586-unknown-linuxaout
+
+2.3: Windows Installation (Windows, Cygwin, MinGW)
+==================================================
+
+\1f
+File: xemacs-faq.info, Node: Q2.3.1, Next: Q2.3.2, Prev: Q2.2.2, Up: Installation
+
+Q2.3.1: What exactly are all the different ways to build XEmacs under Windows?
+------------------------------------------------------------------------------
+
+XEmacs can be built in several ways in the MS Windows environment.
+
+ The standard way is what we call the "native" port. It uses the
+Win32 API and has no connection with X whatsoever - it does not require
+X libraries to build, nor does it require an X server to run. The
+native port is the most reliable version and provides the best graphical
+support. Almost all development is geared towards this version, and
+there is little reason not to use it.
+
+ The second way to build is the Cygwin port. It takes advantage of
+Cygnus emulation library under Win32. *Note What are Cygwin and MinGW:
+Q1.2.5, for more information.
+
+ A third way is the MinGW port. It uses the Cygwin environment to
+build but does not require it at runtime. *Note What are Cygwin and
+MinGW: Q1.2.5, for more information.
+
+ Finally, you might also be able to build the non-Cygwin, non-MinGW
+"X" port. This was actually the first version of XEmacs that ran under
+MS Windows, and although the code is still in XEmacs, it's essentially
+orphaned and it's unlikely it will compile without a lot of work. If
+you want an MS Windows versin of XEmacs that supports X, use the Cygwin
+version. (The X support there is actively maintained, so that Windows
+developers can test the X support in XEmacs.)
+
+\1f
+File: xemacs-faq.info, Node: Q2.3.2, Next: Q2.3.3, Prev: Q2.3.1, Up: Installation
+
+Q2.3.2: What compiler/libraries do I need to compile XEmacs?
+------------------------------------------------------------
+
+You need Visual C++ 4.2, 5.0, or 6.0 for the native version. (We have
+some beta testers currently trying to compile with VC.NET, aka version
+7.0, but we can't yet report complete success.) For the Cygwin and
+MinGW versions, you need the Cygwin environment, which comes with GCC,
+the compiler used for those versions. *Note What are Cygwin and MinGW:
+Q1.2.5, for more information on Cygwin and MinGW.
+
+\1f
+File: xemacs-faq.info, Node: Q2.3.3, Next: Q2.3.4, Prev: Q2.3.2, Up: Installation
+
+Q2.3.3: How do I compile the native port?
+-----------------------------------------
+
+Please read the file `nt/README' in the XEmacs distribution, which
+contains the full description.
+
+\1f
+File: xemacs-faq.info, Node: Q2.3.4, Next: Q2.3.5, Prev: Q2.3.3, Up: Installation
+
+Q2.3.4: What do I need for Cygwin?
+----------------------------------
+
+You can find the Cygwin tools and compiler at:
+
+ `http://www.cygwin.com/'
+
+ Click on the `Install or update now!' link, which will download a
+file `setup.exe', which you can use to download everything else. (You
+will need to pick a mirror site; `mirrors.rcn.net' is probably the
+best.) You should go ahead and install everything - you'll get various
+ancillary libraries that XEmacs needs or likes, e.g. XPM, PNG, JPEG,
+TIFF, etc. You can also get X Windows here, if you want to compile
+under X.
+
+ If you want to compile without X, you will need the `xpm-nox'
+library, which must be specifically selected in the Cygwin netinstaller;
+it is not selected by default. The package has had various names.
+Currently it is called `cygXpm-noX4.dll'.
+
+\1f
+File: xemacs-faq.info, Node: Q2.3.5, Next: Q2.3.6, Prev: Q2.3.4, Up: Installation
+
+Q2.3.5: How do I compile under Cygwin?
+--------------------------------------
+
+Similar as on Unix; use the usual `configure' and `make' process. Some
+problems to watch out for:
+
+ * make sure HOME is set. This controls where you `init.el' file
+ comes from;
+
+ * `CYGWIN' needs to be set to `tty' for process support to work;
+
+ * picking up some other grep or other UNIX-like tools can kill
+ configure;
+
+ * static heap too small, adjust `src/sheap-adjust.h' to a more
+ positive number;
+
+ * (Unconfirmed) The Cygwin version doesn't understand
+ `//machine/path' type paths so you will need to manually mount a
+ directory of this form under a unix style directory for a build to
+ work on the directory;
+
+ * If you're building *WITHOUT* X11, don't forget to change symlinks
+ `/usr/lib/libXpm.a' and `/usr/lib/libXpm.dll.a' to point to the
+ non-X versions of these libraries. By default they point to the X
+ versions. So:
+
+ /usr/lib/libXpm.a -> /usr/lib/libXpm-noX.a
+ /usr/lib/libXpm.dll.a -> /usr/lib/libXpm-noX.dll.a
+
+ (This advice may now be obsolete because of the availability of the
+ cygXpm-noX4.dll package from Cygwin. Send confirmation to
+ <faq@xemacs.org>.)
+
+ * Other problems are listed in the `PROBLEMS' file, in the top-level
+ directory of the XEmacs sources.
+
+
+\1f
+File: xemacs-faq.info, Node: Q2.3.6, Next: Q2.3.7, Prev: Q2.3.5, Up: Installation
+
+Q2.3.6: How do I compile using MinGW (aka `the -mno-cygwin flag to gcc')?
+-------------------------------------------------------------------------
+
+Similar to the method for Unix. Things to remember:
+
+ * Specify the target host on the command line for `./configure', e.g.
+ `./configure i586-pc-mingw32'.
+
+ * Be sure that your build directory is mounted such that it has the
+ same path either as a cygwin path (`/build/xemacs') or as a Windows
+ path (`c:\build\xemacs').
+
+ * Build `gcc -mno-cygwin' versions of the extra libs, i.e. `libpng',
+ `compface', etc.
+
+ * Specify the target location of the extra libs on the command line
+ to `configure', e.g.for 21.4 or earlier `./configure
+ --site-prefixes=/build/libs i586-pc-mingw32' and for 21.5 or later
+ `./configure --with-site-prefixes=/build/libs i586-pc-mingw32'.
+
+\1f
+File: xemacs-faq.info, Node: Q2.3.7, Next: Q2.3.8, Prev: Q2.3.6, Up: Installation
+
+Q2.3.7: How do I compile with X support?
+----------------------------------------
+
+To compile under Cygwin, all you need to do is install XFree86, which
+is available as part of the standard Cygwin installation.
+`http://www.cygwin.com/'. Once installed, `configure' should
+automatically find the X libraries and compile with X support.
+
+ As noted above, the non-Cygwin X support is basically orphaned, and
+probably won't work. But if it want to try, it's described in
+`nt/README' in some detail. Basically, you need to get X11 libraries
+from `http://ftp.x.org', and compile them. If the precompiled versions
+are available somewhere, we don't know of it.
+
+\1f
+File: xemacs-faq.info, Node: Q2.3.8, Next: Q2.4.1, Prev: Q2.3.7, Up: Installation
+
+Q2.3.8: Cygwin XEmacs won't start - cygXpm-noX4.dll was not found (NEW)
+-----------------------------------------------------------------------
+
+The Cygwin binary distributed with the netinstaller uses an external DLL
+to handle XPM images (such as toolbar buttons). You may get an error
+like
+
+ This application has failed to start because cygXpm-noX4.dll was not found.
+ Re-installing the application may fix this problem.
+
+ Andy Piper <andy@xemacs.org> sez:
+
+ cygXpm-noX4 is part of the cygwin distribution under libraries or
+ graphics, but is not installed by default. You need to run the
+ cygwin setup again and select this package.
+
+ Ie, reinstalling XEmacs won't help because it is not part of the
+XEmacs distribution.
+
+2.4: General Troubleshooting
+============================
+
+\1f
+File: xemacs-faq.info, Node: Q2.4.1, Next: Q2.4.2, Prev: Q2.3.8, Up: Installation
+
+Q2.4.1: How do I deal with bugs or with problems building, installing, or running?
+----------------------------------------------------------------------------------
+
+The file `PROBLEMS' contains information on many common problems that
+occur in building, installing and running XEmacs.
+
+ Reports of bugs in XEmacs should be sent to
+<xemacs-beta@xemacs.org>. You can also post to the newsgroup
+comp.emacs.xemacs (or equivalentlt, send to the mailing list
+<xemacs@xemacs.org>), but it is less likely that the developers will
+see it in a timely fashion. *Note Bugs: (xemacs)Bugs, for more
+information on how to report bugs. *Note Q1.4.2::, for more
+information on mailing lists relating to XEmacs.
+
+ There are three ways to read the Bugs section.
+
+ 1. In a printed copy of the XEmacs manual.
+
+ 2. With Info. First, start XEmacs. From the menu, select
+ `Help->Info (Online Docs)->Info Contents' to enter Info, then
+ click on `XEmacs', then on `Bugs'. Or, use the keyboard: 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,"
+
+\1f
+File: xemacs-faq.info, Node: Q2.4.2, Next: Q2.4.3, Prev: Q2.4.1, Up: Installation
+
+Q2.4.2: Help! XEmacs just crashed on me!
+-----------------------------------------
+
+First of all, don't panic. Whenever XEmacs crashes, it tries extremely
+hard to auto-save all of your files before dying. (The main time that
+this will not happen is if the machine physically lost power or if you
+killed the XEmacs process using `kill -9'). The next time you try to
+edit those files, you will be informed that a more recent auto-save
+file exists. You can use `M-x recover-file' to retrieve the auto-saved
+version of the file.
+
+ You can use the command `M-x recover-session' after a crash to pick
+up where you left off.
+
+ Now, XEmacs is not perfect, and there may occasionally be times, or
+particular sequences of actions, that cause it to crash. If you can
+come up with a reproducible way of doing this (or even if you have a
+pretty good memory of exactly what you were doing at the time), the
+maintainers would be very interested in knowing about it. The best way
+to report a bug is using `M-x report-emacs-bug' (or by selecting `Send
+Bug Report...' from the Help menu). If that won't work (e.g. you can't
+get XEmacs working at all), send ordinary mail to
+<xemacs-beta@xemacs.org>. _MAKE SURE_ to include the output from the
+crash, especially including the Lisp backtrace, as well as the XEmacs
+configuration from `M-x describe-installation' (or equivalently, the
+file `Installation' in the top of the build tree). Note that the
+developers do _not_ usually follow `comp.emacs.xemacs' on a regular
+basis; thus, this is better for general questions about XEmacs than bug
+reports.
+
+ If at all possible, include a C stack backtrace of the core dump that
+was produced. This shows where exactly things went wrong, and makes it
+much easier to diagnose problems. To do this under Unix and Mac OS X,
+you need to locate the core file (it's called `core', and is usually
+sitting in the directory that you started XEmacs from, or your home
+directory if that other directory was not writable). Then, go to that
+directory and execute a command like:
+
+ gdb `which xemacs` core
+
+ and then issue the command `where' to get the stack backtrace. You
+might have to use `dbx' or some similar debugger in place of `gdb'. If
+you don't have any such debugger available, complain to your system
+administrator.
+
+ It's possible that a core file didn't get produced or the stack trace
+from gdb is garbage, in which case you're out of luck unless you can
+reproduce the bug. A nonexistent core file can happen in some
+circumstances on some operating systems, depending on what exactly
+triggered the crash. It's also possible, however, that your limits are
+set to turn them off. You may be able to reenable them using a command
+like `unlimit coredumpsize' or `ulimit -c'. (To find out how your
+limits are set, use the command `limit'.) However, if you didn't
+explicitly set your limits this way, go complain to your system
+administrator and tell him not to disable core files by default.
+
+ A garbaged stack trace can happen for various reasons. Some versions
+of gdb are broken on certain operating systems and aren't able to read
+the core file. It's also possible that the stack got overwritten
+during the crash. A very simple reason, however, is that your version
+of XEmacs was compiled without debugging information or had the
+debugging information stripped. A compilation with optimization can
+also result in partly or completely garbaged stack trace. In such
+cases, you will need to recompile XEmacs with debugging information and
+without optimization; *Note How to debug an XEmacs problem with a
+debugger: Q2.4.4. Note also that core files currently don't work at
+all under Cygwin, and the only way to get a backtrace is to run XEmacs
+from gdb.
+
+ If you cannot get a backtrace from the core dump, but can reproduce
+the problem, try running XEmacs under gdb. The goal is to get clean C
+and Lisp backtraces and submit a bug report including full
+configuration information as described above, as this will greatly
+assist in the process of tracking down the bug. However, even partial
+information is better than none. The process of getting backtraces
+from gdb is described in detail in *Note How to debug an XEmacs problem
+with a debugger: Q2.4.4.
+
+ If you're under Microsoft Windows, you're out of luck unless you
+happen to have a debugging aid installed on your system, for example
+Visual C++. In this case, the crash will result in a message giving
+you the option to enter a debugger (for example, by pressing `Cancel').
+Do this and locate the stack-trace window. (If your XEmacs was built
+without debugging information, the stack trace may not be very useful.)
+
+ When making a problem report make sure that:
+
+ 1. Report *all* of the information output by XEmacs during the crash.
+
+ 2. You mention what O/S and Hardware you are running XEmacs on.
+
+ 3. What version of XEmacs you are running.
+
+ 4. What build options you are using.
+
+ 5. If the problem is related to graphics and you are running Unix or
+ Mac OS X, we will also need to know what version of the X Window
+ System you are running, and what window manager you are using.
+
+ 6. If the problem happened on a TTY, please include the terminal type.
+
+ 7. Try very hard to get both C and Lisp backtraces, as described
+ above.
+
+ Much of the information above is automatically generated by `M-x
+report-emacs-bug'. Even more, and often useful, information can be
+generated by redirecting the output of `make' and `make check' to a
+file (`beta.err' is the default used by `build-report'), and executing
+`M-x build-report'.
+
+\1f
+File: xemacs-faq.info, Node: Q2.4.3, Next: Q2.4.4, Prev: Q2.4.2, Up: Installation
+
+Q2.4.3: XEmacs crashes and I compiled it myself.
+------------------------------------------------
+
+There have been a variety of reports of crashes due to compilers with
+buggy optimizers. If you are compiling with optimization, consider
+turning it off (*note How to debug an XEmacs problem with a debugger:
+Q2.4.4.) and recompiling.
+
+ Please see the `PROBLEMS' file that comes with XEmacs (it's in the
+top-level source directory) to read what it says about your platform.
+
+ If you compiled XEmacs 21.4 or ealier using `--use-union-type', or
+21.5 or later using `--enable-union-type' (or in either case used the
+option `USE_UNION_TYPE' in `config.inc' under Windows), try recompiling
+again without it. The union type has been known to trigger compiler
+errors in a number of cases.
+
+\1f
+File: xemacs-faq.info, Node: Q2.4.4, Next: Q2.4.5, Prev: Q2.4.3, Up: Installation
+
+Q2.4.4: How to debug an XEmacs problem with a debugger
+------------------------------------------------------
+
+If XEmacs does crash on you, one of the most productive things you can
+do to help get the bug fixed is to poke around a bit with the debugger.
+Here are some hints:
+
+ * First of all, if the crash is at all reproducible, consider very
+ strongly recompiling your XEmacs with debugging symbols and with no
+ optimization (e.g. with GCC use the compiler flags `-g -O0' -
+ that's an "oh" followed by a zero), and with the configure options
+ `--debug=yes' and `--error-checking=all' (`--enable-debug=yes' and
+ `--enable-error-checking=all' on XEmacs 21.5 or later). This will
+ make your XEmacs run somewhat slower, but you are a lot more
+ likely to catch the problem earlier (closer to its source). It
+ makes it a lot easier to determine what's going on with a
+ debugger. The way to control the compiler flags is with the
+ configuration option `--cflags' (`--with-cflags' in 21.5). If you
+ have a recent version of 21.5, you should use
+ `--without-optimization' in preference to directly setting
+ `--cflags'.
+
+ * If it's not a true crash (_i.e._, XEmacs is hung, or a zombie
+ process), or it's inconvenient to run XEmacs again because XEmacs
+ is already running or is running in batch mode as part of a bunch
+ of scripts, you may be able to attach to the existing process with
+ your debugger. Under Unix and Mac OS X, the typical way to do
+ this is to first use some variant of the `ps' command to figure
+ out the process ID of XEmacs, for example `ps -auxww | grep
+ xemacs' under a BSD variant, `ps -elf | grep xemacs' under Linux
+ or System V, or `ps -aW | grep xemacs' under Cygwin. Then run
+
+ gdb /path/to/xemacs/xemacs ####
+
+ Where `####' is the process id of your XEmacs. (If you're not
+ sure, try using `which xemacs'.) When gdb attaches, the xemacs
+ will stop and you can type `where' in gdb to get a stack trace as
+ usual. To get things moving again, you can just type `quit' in
+ gdb. It'll tell you the program is running and ask if you want to
+ quit anyways. Say `y' and it'll quit and have your emacs continue
+ from where it was at.
+
+ If you're running another debugger, a similar method may work, or
+ you may have to run the debugger first and then use the `attach'
+ command or something similar.
+
+ Under Microsoft Windows, use the menu item `Build->Start
+ Debug->Attach to Process...' and select the XEmacs process from
+ the list given.
+
+ * If you're able to run XEmacs under a debugger and reproduce the
+ crash, here are some things you can do:
+
+ * If XEmacs is hitting an assertion failure, put a breakpoint on
+ `assert_failed()'.
+
+ * If XEmacs is hitting some weird Lisp error that's causing it to
+ crash (e.g. during startup), put a breakpoint on
+ `signal_1()'--this is declared static in `eval.c'.
+
+ * If XEmacs is outputting lots of X errors, put a breakpoint on
+ `x_error_handler()'; that will tell you which call is causing
+ them. Note that the result may not be very useful by default
+ because X Windows normally operates asynchronously: A bunch of
+ commands are buffered up and then sent to the server all at once.
+ This greatly improves performance over a network but means that an
+ error may not be reported until the server receives the commands,
+ which can be long after XEmacs made the erroneous calls. For best
+ results, you need to make the X server synchronous before getting
+ the backtrace. This can be done by starting XEmacs with the
+ `-sync' option or executing the Lisp code `(x-debug-mode t)'.
+
+ * Internally, you will probably see lots of variables that hold
+ objects of type `Lisp_Object'. These are references to Lisp
+ objects. Printing them out with the debugger probably won't be too
+ useful--you'll likely just see a number. To decode them, do this:
+
+ call debug_print (OBJECT)
+
+ where OBJECT is whatever you want to decode (it can be a variable,
+ a function call, etc.). This uses the Lisp printing routines to
+ out a readable representation on the TTY from which the xemacs
+ process was invoked.
+
+ Under 21.5 and later, `dp' is defined as an easier-to-type
+ equivalent of `debug_print'. You can also try `dpa' if you can't
+ see the output from `debug_print' (this will return a string
+ containing the output), or use `debug_p3' if `debug_print' itself
+ triggers a crash (this is a less comprehensive but super-safe way
+ to print out a Lisp object).
+
+ * If you want to get a Lisp backtrace showing the Lisp call stack,
+ do this:
+
+ call debug_backtrace ()
+
+ Under 21.5 and later, `db' is defined as an easier-to-type
+ equivalent of `debug_backtrace'.
+
+ * Using `debug_print' and `debug_backtrace' has two disadvantages -
+ they can only be used with a running (including hung or zombie)
+ xemacs process, and they do not display the internal C structure
+ of a Lisp Object. Even if all you've got is a core dump, all is
+ not lost.
+
+ If you're using GDB, there are some macros in the file
+ `src/.gdbinit' in the XEmacs source distribution that should make
+ it easier for you to decode Lisp objects. This file is
+ automatically read by gdb if gdb is run in the directory where
+ xemacs was built, and contains these useful macros to inspect the
+ state of xemacs:
+
+ `pobj'
+ Usage: pobj lisp_object
+ Print the internal C representation of a lisp object.
+
+ `xtype'
+ Usage: xtype lisp_object
+ Print the Lisp type of a lisp object.
+
+ `lbt'
+ Usage: lbt
+ Print the current Lisp stack trace. Requires a running
+ xemacs process. (It works by calling the db routine
+ described above.)
+
+ `ldp'
+ Usage: ldp lisp_object
+ Print a Lisp Object value using the Lisp printer. Requires a
+ running xemacs process. (It works by calling the dp routine
+ described above.)
+
+ `run-temacs'
+ Usage: run-temacs
+ Run temacs interactively, like xemacs. Use this with
+ debugging tools (like purify) that cannot deal with dumping,
+ or when temacs builds successfully, but xemacs does not.
+
+ `dump-temacs'
+ Usage: dump-temacs
+ Run the dumping part of the build procedure. Use when
+ debugging temacs, not xemacs! Use this when temacs builds
+ successfully, but xemacs does not.
+
+ `check-xemacs'
+ Usage: check-xemacs
+ Run the test suite. Equivalent to 'make check'.
+
+ `check-temacs'
+ Usage: check-temacs
+ Run the test suite on temacs. Equivalent to 'make
+ check-temacs'. Use this with debugging tools (like purify)
+ that cannot deal with dumping, or when temacs builds
+ successfully, but xemacs does not.
+
+ If you are using Sun's `dbx' debugger, there is an equivalent file
+ `src/.dbxrc', which defines the same commands for dbx.
+
+ * If you're using a debugger to get a C stack backtrace and you're
+ seeing stack traces with some of the innermost frames mangled, it
+ may be due to dynamic linking. (This happens especially under
+ Linux.) Consider reconfiguring with `--dynamic=no'
+ (`--with-dynamic=no' in 21.5 or later). Also, sometimes (again
+ under Linux), stack backtraces of core dumps will have the frame
+ where the fatal signal occurred mangled; if you can obtain a stack
+ trace while running the XEmacs process under a debugger, the stack
+ trace should be clean.
+
+ Curtiss <1CMC3466@ibm.mtsac.edu> suggests upgrading to ld.so
+ version 1.8 if dynamic linking and debugging is a problem on Linux.
+
+ * If you're using a debugger to get a C stack backtrace and you're
+ getting a completely mangled and bogus stack trace, it's probably
+ due to one of the following:
+
+ a. Your executable has been stripped. Bad news. Tell your
+ sysadmin not to do this--it doesn't accomplish anything
+ except to save a bit of disk space, and makes debugging much
+ much harder.
+
+ b. Your stack is getting trashed. Debugging this is hard; you
+ have to do a binary-search type of narrowing down where the
+ crash occurs, until you figure out exactly which line is
+ causing the problem. Of course, this only works if the bug
+ is highly reproducible. Also, in many cases if you run
+ XEmacs from the debugger, the debugger can protect the stack
+ somewhat. However, if the stack is being smashed, it is
+ typically the case that there is a wild pointer somewhere in
+ the program, often quite far from where the crash occurs.
+
+ c. If your stack trace has exactly one frame in it, with address
+ 0x0, this could simply mean that XEmacs attempted to execute
+ code at that address, e.g. through jumping to a null function
+ pointer. Unfortunately, under those circumstances, GDB under
+ Linux doesn't know how to get a stack trace. (Yes, this is
+ the fourth Linux-related problem I've mentioned. I have no
+ idea why GDB under Linux is so bogus. Complain to the GDB
+ authors, or to comp.os.linux.development.system.) Again,
+ you'll have to use the narrowing-down process described above.
+
+ d. You will get a Lisp backtrace output when XEmacs crashes, so
+ you'll have something useful.
+
+
+ * If you compile with the newer gcc variants gcc-2.8 or egcs, you
+ will also need gdb 4.17 or above. Earlier releases of gdb can't
+ handle the debug information generated by the newer compilers.
+
+ * In versions of XEmacs before 21.2.27, `src/.gdbinit' was named
+ `src/gdbinit'. This had the disadvantage of not being sourced
+ automatically by gdb, so you had to set that up yourself.
+
+ * If you are running Microsoft Windows, the the file `nt/README' for
+ further information about debugging XEmacs.
+
+
+\1f
+File: xemacs-faq.info, Node: Q2.4.5, Next: Q2.4.6, Prev: Q2.4.4, Up: Installation
+
+Q2.4.5: I get a cryptic error message when trying to do something.
+------------------------------------------------------------------
+
+When I try to use some particular option of some particular package, I
+get a cryptic error message in the minibuffer.
+
+ If the message went by too quickly, use `Help->Recent Messages' from
+the menubar (or type `C-h l') to see recent messages.
+
+ If you can't figure out what's going on, select
+`Options->Troubleshooting->Debug on Error' from the menubar (or type
+`M-:' then `(setq debug-on-error t)') then try and make the error
+happen again. This will put in the debugger (you can get out of this
+and continue what you were doing before by typing `c') and give you a
+backtrace that may be enlightening. If not, try reading through this
+FAQ; if that fails, you could try posting to `comp.emacs.xemacs'
+(making sure to include the backtrace) and someone may be able to help.
+If you can identify which XEmacs Lisp source file the error is coming
+from you can get a more detailed stack backtrace by doing the following:
+
+ 1. Visit the .el file in an XEmacs buffer.
+
+ 2. Issue the command `M-x eval-current-buffer'.
+
+ 3. Reproduce the error.
+
+ For more information on debugging Lisp code, *Note Debugging:
+(lispref)Debugging.
+
+\1f
+File: xemacs-faq.info, Node: Q2.4.6, Next: Q2.4.7, Prev: Q2.4.5, Up: Installation
+
+Q2.4.6: XEmacs hangs when I try to do something.
+------------------------------------------------
+
+XEmacs might just be slow; some operations take a long time. XEmacs
+may also be waiting on a response from the network, for example when
+you are trying to send mail.
+
+ You can usually interrupt XEmacs by typing `C-g'. If not (for
+example, Lisp code explicitly disabled this by setting `inhibit-quit'),
+you can use the "critical quit" mechanism by typing `Control-Shift-G'.
+This should also pop you into the debugger and give you a backtrace,
+which can tell you where the problem is (*note How to debug an XEmacs
+problem with a debugger: Q2.4.4.). (Note that setting `debug-on-quit'
+or selecting `Options->Troubleshooting->Debug on Quit' will also cause
+regular `C-g' to enter the debugger and give you a backtrace.)
+
+ If you can't interrupt XEmacs this way, or for some reason XEmacs is
+not talking to the keyboard, you can try sending the `SIGINT' signal
+using the `kill' command.
+
+ If the Lisp backtrace isn't enlightening, or if XEmacs is so hung
+that you can't interrupt it at all, you could try attaching to the
+process and getting a C stack backtrace. *Note How to debug an XEmacs
+problem with a debugger: Q2.4.4.
+
+\1f
+File: xemacs-faq.info, Node: Q2.4.7, Next: Q2.4.8, Prev: Q2.4.6, Up: Installation
+
+Q2.4.7: I get an error message when XEmacs is running in batch mode.
+--------------------------------------------------------------------
+
+Typically this happens when you are trying to compile some Elisp code.
+If you are doing this as part of XEmacs or the XEmacs packages, you
+should automatically get a backtrace, which can help you determine the
+source of the problem. In other cases, you can get equivalent results
+by setting the environment variable `XEMACSDEBUG' to `(setq
+stack-trace-on-error t load-always-display-messages t
+load-ignore-out-of-date-elc-files t load-show-full-path-in-messages t)'
+(this needs to be all on one line; to set an environment variable, use
+`export XEMACSDEBUG='FOO'' under `bash', `zsh', etc. or `setenv
+XEMACSDEBUG 'FOO'' under `csh' and `tcsh'). `XEMACSDEBUG' specifies
+Lisp code that will be executed at startup time.
+
+ If the backtrace is not sufficiently useful in helping you diagnose
+the problem, you should consider using a debugger such as GDB. *Note
+How to debug an XEmacs problem with a debugger: Q2.4.4. You probably
+want to set a breakpoint on `signal_1'. Since such errors often occur
+during compiling, which is often triggered by a complex command run
+from a make suite, it may be easier to attach to the process once it's
+running.
+
+ Under Microsoft Windows (and perhaps other operating systems), there
+is another useful trick you can do if you have configured with debugging
+support (configure option `--debug' (`--with-debug' in 21.5) or setting
+`DEBUG_XEMACS' in `nt/config.inc'). Set the environment variable
+`XEMACSDEBUG' (as described above) to `(setq debug-on-error t)'. Then,
+when an error occurs noninteractively, instead of trying to invoke the
+Lisp debugger (which obviously won't work), XEmacs will break out to a
+C debugger using `(force-debugging-signal t)'. _NOTE_: This runs
+`abort()'!!! (As well as and after executing INT 3 under MS Windows,
+which should invoke a debugger if it's active.) This is guaranteed to
+kill XEmacs! (But in this situation, XEmacs is about to die anyway, and
+if no debugger is present, this will usefully dump core.)
+
+\1f
+File: xemacs-faq.info, Node: Q2.4.8, Next: Q2.4.9, Prev: Q2.4.7, Up: Installation
+
+Q2.4.8: The keyboard or mouse is not working properly, or I have some other event-related problem.
+--------------------------------------------------------------------------------------------------
+
+XEmacs has various facilities for debugging event handling.
+
+ First, try setting the variable `debug-emacs-events' to non-zero.
+This will output various information showing which events are being
+received and how they are being translated. This may show you, for
+example, that a key command is getting intercepted using
+`key-translation-map'; this problem can otherwise be very tricky to
+debug.
+
+ Under X, you can see exactly which events are being received from the
+window system by setting `x-debug-events' to non-zero. (The value `1'
+gives you regular output, and `2' gives you verbose output, including
+all parameters.)
+
+ A similar facility exists under MS Windows: Set
+`debug-mswindows-events' to non-zero. (The value `1' gives you regular
+output. The value `2' gives you verbose output, including all
+parameters. The value `3' gives you super-gorily-detailed output.)
+
+\1f
+File: xemacs-faq.info, Node: Q2.4.9, Next: Q2.4.10, Prev: Q2.4.8, Up: Installation
+
+Q2.4.9: `C-g' doesn't work for me. Is it broken?
+-------------------------------------------------
+
+`C-g' does work for most people in most circumstances. If it doesn't,
+there are two possible explanations:
+
+ 1. XEmacs is hung in a way that prevents `C-g' from working. This
+ can happen when code is wrapped with a binding of `inhibit-quit'
+ to `t'; you should still be able interrupt XEmacs using "critical
+ quit". On the other hand, XEmacs may be seriously wedged. (If
+ you're lucky, sending `SIGINT' to the XEmacs process will
+ interrupt it.) *Note XEmacs hangs when I try to do something.:
+ Q2.4.6.
+
+ 2. `C-g' is indeed broken on your system. To test, try executing
+ `(while t)' from the `*scratch*' buffer. If `C-g' doesn't
+ interrupt, then it's broken. This used to happen with systems
+ where `SIGIO' was broken, but `BROKEN_SIGIO' wasn't defined.
+ However, there may not be very many such systems nowadays.
+
+\1f
+File: xemacs-faq.info, Node: Q2.4.10, Next: Q2.4.11, Prev: Q2.4.9, Up: Installation
+
+Q2.4.10: How do I debug process-related problems?
+-------------------------------------------------
+
+Under MS Windows, you can set the variable
+`debug-mswindows-process-command-lines' to non-`nil' to get information
+on exactly what is getting passed to a process. This can be useful in
+determining problems with quoting. (Under Unix, a process receives each
+argument separately, but under MS Windows a single command line is
+received, and arguments with spaces or other special characters in them
+must be quoted. Unfortunately this means that each process,
+potentially at least, has its own quoting conventions, and the code to
+process quoting conventions in `cmd.exe', the Visual C++ startup code
+and the like is baroque and poorly documented. XEmacs uses the variable
+`mswindows-construct-process-command-line-alist' to construct a command
+line from a list of arguments based on the command to be run, but it is
+(and cannot be) a perfect solution.)
+
+\1f
+File: xemacs-faq.info, Node: Q2.4.11, Next: Q2.4.12, Prev: Q2.4.10, Up: Installation
+
+Q2.4.11: XEmacs is outputting lots of X errors.
+-----------------------------------------------
+
+If this is happening, we would very much like to know what's causing
+them. To find this out, see *Note How to debug an XEmacs problem with
+a debugger: Q2.4.4. Try to get both a C and Lisp backtrace, and send
+them along with the full error output to <xemacs-beta@xemacs.org>.
+
+\1f
+File: xemacs-faq.info, Node: Q2.4.12, Next: Q2.5.1, Prev: Q2.4.11, Up: Installation
+
+Q2.4.12: After upgrading, XEmacs won't do `foo' any more!
+---------------------------------------------------------
+
+You have been used to doing `foo', but now when you invoke it (or click
+the toolbar button or select the menu item), nothing (or an error)
+happens. The simplest explanation is that you are missing a package
+that is essential to you. You can either track it down and install it
+(there is a list of packages and brief descriptions of their contents
+in `etc/PACKAGES'), or install the `Sumo Tarball' (*note How do I
+figure out which packages to install?: Q2.1.2.).
+
+2.5: Startup-Related Problems
+=============================
+
+\1f
+File: xemacs-faq.info, Node: Q2.5.1, Next: Q2.5.2, Prev: Q2.4.12, Up: Installation
+
+Q2.5.1: XEmacs cannot connect to my X Terminal!
+-----------------------------------------------
+
+Help! I can not get XEmacs to display on my Envizex X-terminal!
+
+ Try setting the `DISPLAY' variable using the numeric IP address of
+the host you are running XEmacs from.
+
+\1f
+File: xemacs-faq.info, Node: Q2.5.2, Next: Q2.5.3, Prev: Q2.5.1, Up: Installation
+
+Q2.5.2 Startup problems related to paths or package locations.
+--------------------------------------------------------------
+
+First of all, if XEmacs can't find the packages, check to make sure
+that you put the packages in the right place, or that you told XEmacs
+where to look for the packages when you compiled it. *Note Q2.1.1::.
+
+ If something is still going wrong, or you get a startup warning about
+not being able to deduce some paths, you can get detailed information
+on the path-searching process at startup by setting the environment
+variable `EMACSDEBUGPATHS' to a non-null value. One thing to look for
+if you're having package problems is the value of
+`configure-package-path'. This corresponds to what was compiled into
+XEmacs using the `--package-prefix' or `--package-path' parameter
+(*note Q2.1.1::). If this has the value of `nil', this means that no
+value was compiled into XEmacs using these parameters.
+
+\1f
+File: xemacs-faq.info, Node: Q2.5.3, Next: Q2.5.4, Prev: Q2.5.2, Up: Installation
+
+Q2.5.3: XEmacs won't start without network.
+-------------------------------------------
+
+If XEmacs starts when you're on the network, but fails when you're not
+on the network, you may be missing a "localhost" entry in your
+`/etc/hosts' file. The file should contain an entry like:
+
+ 127.0.0.1 localhost
+
+ Add that line, and XEmacs will be happy.
+
+\1f
+File: xemacs-faq.info, Node: Q2.5.4, Next: Q2.5.5, Prev: Q2.5.3, Up: Installation
+
+Q2.5.4: Startup warnings about deducing proper fonts?
+-----------------------------------------------------
+
+How can I avoid the startup warnings about deducing proper fonts?
+
+ This is highly dependent on your installation, but try with the
+following font as your base font for XEmacs and see what it does:
+
+-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
+
+ More precisely, do the following in your resource file:
+
+Emacs.default.attributeFont: \
+-adobe-courier-medium-r-*-*-*-120-*-*-*-*-iso8859-1
+
+ If you just don't want to see the `*Warnings*' buffer at startup
+time, you can set this:
+
+ (setq display-warning-minimum-level 'error)
+
+ The buffer still exists; it just isn't in your face.
+
+\1f
+File: xemacs-faq.info, Node: Q2.5.5, Next: Q2.5.6, Prev: Q2.5.4, Up: Installation
+
+Q2.5.5: Warnings from incorrect key modifiers.
+----------------------------------------------
+
+The following information comes from the `PROBLEMS' file that comes
+with XEmacs.
+
+ If you're having troubles with HP/UX it is because HP/UX 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.
+
+ #! /bin/sh
+ 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
+
+\1f
+File: xemacs-faq.info, Node: Q2.5.6, Prev: Q2.5.5, Up: Installation
+
+Q2.5.6: XEmacs 21.1 on Windows used to spawn an ugly console window on every startup. Has that been fixed?
+-----------------------------------------------------------------------------------------------------------
+
+Yes.
+
+ The console was there because `temacs' (and in turn, `xemacs') was a
+console application, and Windows typically creates a new console for a
+console process unless the creating process requests that one isn't
+created. This used to be fixed with `runemacs', a small Windows
+application that existed merely to start `xemacs', stating that it
+didn't want a console.
+
+ XEmacs 21.4 fixes this cleanly by the virtue of being a true "GUI"
+application. The explanation of what that means is included for
+educational value.
+
+ When building an application to be run in a Win32 environment, you
+must state which sub-system it is to run in. Valid subsystems include
+"console" and "gui". The subsystem you use affects the run time
+libraries linked into your application, the start up function that is
+run before control is handed over to your application, the entry point
+to your program, and how Windows normally invokes your program. (Console
+programs automatically get a console created for them at startup if
+their stdin/stdout don't point anywhere useful, which is the case when
+run from the GUI. This is a stupid design, of course - instead, the
+console should get created only when the first I/O actually occurs!
+GUI programs have an equally stupid design: When called from
+`CMD.EXE'/`COMMAND.COM', their stdin/stdout will be set to point
+nowhere useful, even though the command shell has its own stdin/stdout.
+It's as if someone who had learned a bit about stdio but had no actual
+knowledge of interprocess communication designed the scheme;
+unfortunately, the whole process-communication aspect of the Win32 API
+is equally badly designed.) For example, the entry point for a console
+app is "main" (which is what you'd expect for a C/C++ program), but the
+entry point for a "gui" app is "WinMain". This confuses and annoys a
+lot of programmers who've grown up on Unix systems, where the kernel
+doesn't really care whether your application is a gui program or not.
+
+ For reasons not altogether clear, and are lost in the mists of time
+and tradition, XEmacs on Win32 started out as a console application, and
+therefore a console was automatically created for it. (It may have been
+made a console application partly because a console is needed in some
+circumstances, especially under Win95, to interrupt, terminate, or send
+signals to a child process, and because of the bogosity mentioned above
+with GUI programs and the standard command shell. Currently, XEmacs
+just creates and immediately hides a console when necessary, and works
+around the "no useful stdio" problem by creating its own console window
+as necessary to display messages in.)
+
+\1f
+File: xemacs-faq.info, Node: Editing, Next: Display, Prev: Installation, Up: Top
+
+3 Editing Functions
+*******************
+
+This is part 3 of the XEmacs Frequently Asked Questions list. This
+section is devoted to the editing-related capabilities of XEmacs (the
+keyboard, mouse, buffers, text selections, etc.) and how to customize
+them.
+
+* Menu:
+
+3.0: The Keyboard
+* Q3.0.1:: How can I customize the keyboard?
+* Q3.0.2:: How can I bind complex functions (or macros) to keys?
+* Q3.0.3:: How do I bind C-. and C-; to scroll one line up and down?
+* Q3.0.4:: Globally binding Delete?
+* Q3.0.5:: How to map Help key alone on Sun type4 keyboard?
+* Q3.0.6:: How can you type in special characters in XEmacs?
+* Q3.0.7:: Can I turn on "sticky" modifier keys?
+* Q3.0.8:: How do I map the arrow keys?
+* Q3.0.9:: HP Alt key as Meta.
+* Q3.0.10:: Why does edt emulation not work?
+* Q3.0.11:: How can I emulate VI and use it as my default mode?
+
+3.1: The Mouse
+* Q3.1.1:: How can I turn off Mouse pasting?
+* Q3.1.2:: How do I set control/meta/etc modifiers on mouse buttons?
+* Q3.1.3:: Clicking the left button does not do anything in buffer list.
+* Q3.1.4:: How can I get a list of buffers when I hit mouse button 3?
+* Q3.1.5:: How can I set XEmacs up so that it pastes where the text cursor is?
+
+3.2: Buffers, Text Editing
+* Q3.2.1:: Can I have the end of the buffer delimited in some way?
+* Q3.2.2:: How do I insert today's date into a buffer?
+* Q3.2.3:: How do I get a single minibuffer frame?
+* Q3.2.4:: How can I enable auto-indent and/or Filladapt?
+* Q3.2.5:: How can I get XEmacs to come up in text/auto-fill mode by default?
+
+3.3: Text Selections
+* Q3.3.1:: How do I select a rectangular region?
+* Q3.3.2:: How can I turn off or change highlighted selections?
+* Q3.3.3:: How do I cause typing on an active region to remove it?
+* Q3.3.4:: Can I turn off the highlight during isearch?
+* Q3.3.5:: Why is killing so slow?
+* Q3.3.6:: Why does M-w take so long?
+
+3.4: Editing Source Code
+* Q3.4.1:: I do not like cc-mode. How do I use the old c-mode?
+* Q3.4.2:: How do you make XEmacs indent CL if-clauses correctly?
+
+3.0: The Keyboard
+=================
+
+\1f
+File: xemacs-faq.info, Node: Q3.0.1, Next: Q3.0.2, Prev: Editing, Up: Editing
+
+Q3.0.1: How can I customize the keyboard?
+-----------------------------------------
+
+#### Write me.
+
+\1f
+File: xemacs-faq.info, Node: Q3.0.2, Next: Q3.0.3, Prev: Q3.0.1, Up: Editing
+
+Q3.0.2: How can I bind complex functions (or macros) to keys?
+-------------------------------------------------------------
+
+As an example, say you want the `paste' key on a Sun keyboard to insert
+the current Primary X selection at point. You can accomplish this with:
+
+ (define-key global-map [f18] 'x-insert-selection)
+
+ However, this only works if there is a current X selection (the
+selection will be highlighted). The functionality I like is for the
+`paste' key to insert the current X selection if there is one,
+otherwise insert the contents of the clipboard. To do this you need to
+pass arguments to `x-insert-selection'. This is done by wrapping the
+call in a 'lambda form:
+
+ (global-set-key [f18]
+ (lambda () (interactive) (x-insert-selection t nil)))
+
+ This binds the f18 key to a "generic" functional object. The
+interactive spec is required because only interactive functions can be
+bound to keys.
+
+ For the FAQ example you could use:
+
+ (global-set-key [(control ?.)]
+ (lambda () (interactive) (scroll-up 1)))
+ (global-set-key [(control ?;)]
+ (lambda () (interactive) (scroll-up -1)))
+
+ This is fine if you only need a few functions within the lambda body.
+If you're doing more it's cleaner to define a separate function. *Note
+How do I bind C-. and C-; to scroll one line up and down?: Q3.0.3.
+
+\1f
+File: xemacs-faq.info, Node: Q3.0.3, Next: Q3.0.4, Prev: Q3.0.2, Up: Editing
+
+Q3.0.3: How do I bind C-. and C-; to scroll one line up and down?
+-----------------------------------------------------------------
+
+Add the following (Thanks to Richard Mlynarik <mly@adoc.xerox.com> and
+Wayne Newberry <wayne@zen.cac.stratus.com>) to `.emacs':
+
+ (defun scroll-up-one-line ()
+ (interactive)
+ (scroll-up 1))
+
+ (defun scroll-down-one-line ()
+ (interactive)
+ (scroll-down 1))
+
+ (global-set-key [(control ?.)] 'scroll-up-one-line) ; C-.
+ (global-set-key [(control ?;)] 'scroll-down-one-line) ; C-;
+
+ The key point is that you can only bind simple functions to keys; you
+can not bind a key to a function that you're also passing arguments to.
+(*note How can I bind complex functions (or macros) to keys?: Q3.0.2.
+for a better answer).
+
+\1f
+File: xemacs-faq.info, Node: Q3.0.4, Next: Q3.0.5, Prev: Q3.0.3, Up: Editing
+
+Q3.0.4: Globally binding `Delete'?
+----------------------------------
+
+I cannot manage to globally bind my `Delete' key to something other
+than the default. How does one do this?
+
+ Answer: The problem is that many modes explicitly bind `Delete'. To
+get around this, try the following:
+
+ (defun foo ()
+ (interactive)
+ (message "You hit DELETE"))
+
+ (define-key key-translation-map 'delete 'redirected-delete)
+ (global-set-key 'redirected-delete 'foo)
+
+\1f
+File: xemacs-faq.info, Node: Q3.0.5, Next: Q3.0.6, Prev: Q3.0.4, Up: Editing
+
+Q3.0.5: How to map `Help' key alone on Sun type4 keyboard?
+----------------------------------------------------------
+
+The following works in GNU Emacs 19:
+
+ (global-set-key [help] 'help-command);; Help
+
+ The following works in XEmacs with the addition of shift:
+
+ (global-set-key [(shift help)] 'help-command);; Help
+
+ But it doesn't work alone. This is in the file `PROBLEMS' which
+should have come with your XEmacs installation: _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:'.
+
+\1f
+File: xemacs-faq.info, Node: Q3.0.6, Next: Q3.0.7, Prev: Q3.0.5, Up: Editing
+
+Q3.0.6: How can you type in special characters in XEmacs?
+---------------------------------------------------------
+
+One way is to use the package `x-compose'. Then you can use sequences
+like `Compose " a' to get ä, etc.
+
+ Another way is to use the `iso-insert' package. Then you can use
+sequences like `C-x 8 " a' to get ä, etc.
+
+ Glynn Clements <glynn@sensei.co.uk> writes:
+
+ It depends upon your X server.
+
+ Generally, the simplest way is to define a key as Multi_key with
+ xmodmap, e.g.
+ xmodmap -e 'keycode 0xff20 = Multi_key'
+
+ You will need to pick an appropriate keycode. Use xev to find out
+ the keycodes for each key.
+
+ [NB: On a `Windows' keyboard, recent versions of XFree86
+ automatically define the right `Windows' key as Multi_key'.]
+
+ Once you have Multi_key defined, you can use e.g.
+ Multi a ' => á
+ Multi e " => ë
+ Multi c , => ç
+
+ etc.
+
+ Also, recent versions of XFree86 define various AltGr-<key>
+ combinations as dead keys, i.e.
+ AltGr [ => dead_diaeresis
+ AltGr ] => dead_tilde
+ AltGr ; => dead_acute
+ etc.
+
+ Running `xmodmap -pk' will list all of the defined keysyms.
+
+ For the related problem of _displaying_ non-ASCII characters in a
+non-Mule XEmacs, *Note How do I display non-ASCII characters?: Q4.0.8.
+
+\1f
+File: xemacs-faq.info, Node: Q3.0.7, Next: Q3.0.8, Prev: Q3.0.6, Up: Editing
+
+Q3.0.7: Can I turn on "sticky" modifier keys?
+---------------------------------------------
+
+Yes, with `(setq modifier-keys-are-sticky t)'. This will give the
+effect of being able to press and release Shift and have the next
+character typed come out in upper case. This will affect all the other
+modifier keys like Control and Meta as well.
+
+ Ben Wing <ben@xemacs.org> writes:
+
+ One thing about the sticky modifiers is that if you move the mouse
+ out of the frame and back in, it cancels all currently "stuck"
+ modifiers.
+
+\1f
+File: xemacs-faq.info, Node: Q3.0.8, Next: Q3.0.9, Prev: Q3.0.7, Up: Editing
+
+Q3.0.8: How do I map the arrow keys?
+------------------------------------
+
+Say you want to map `C-<right>' to forward-word:
+
+ Sam Steingold <sds@usa.net> writes:
+
+ ; both XEmacs and Emacs
+ (define-key global-map [(control right)] 'forward-word)
+ or
+ ; Emacs only
+ (define-key global-map [C-right] 'forward-word)
+ or
+ ; ver > 20, both
+ (define-key global-map (kbd "C-<right>") 'forward-word)
+
+\1f
+File: xemacs-faq.info, Node: Q3.0.9, Next: Q3.0.10, Prev: Q3.0.8, Up: Editing
+
+Q3.0.9: HP Alt key as Meta.
+---------------------------
+
+How can I make XEmacs recognize the Alt key of my HP workstation as a
+Meta key?
+
+ Put the following line into a file and load it with xmodmap(1) before
+starting XEmacs:
+
+ remove Mod1 = Mode_switch
+
+\1f
+File: xemacs-faq.info, Node: Q3.0.10, Next: Q3.0.11, Prev: Q3.0.9, Up: Editing
+
+Q3.0.10: Why does edt emulation not work?
+-----------------------------------------
+
+We don't know, but you can use tpu-edt emulation instead, which works
+fine and is a little fancier than the standard edt emulation. To do
+this, add the following line to your `init.el':
+
+ (tpu-edt)
+
+ If you don't want it to replace `C-h' with an edt-style help menu
+add this as well:
+
+ (global-set-key [(control h)] 'help-for-help)
+
+\1f
+File: xemacs-faq.info, Node: Q3.0.11, Next: Q3.1.1, Prev: Q3.0.10, Up: Editing
+
+Q3.0.11: How can I emulate VI and use it as my default mode?
+------------------------------------------------------------
+
+Our recommended VI emulator is viper. To make viper-mode the default,
+add this to your `init.el':
+
+ (viper-mode)
+
+ Michael Kifer <kifer@CS.SunySB.EDU> writes:
+
+ This should be added as close to the top of `init.el' as you can
+ get it, otherwise some minor modes may not get viper-ized.
+
+3.1: The Mouse
+==============
+
+\1f
+File: xemacs-faq.info, Node: Q3.1.1, Next: Q3.1.2, Prev: Q3.0.11, Up: Editing
+
+Q3.1.1: How can I turn off Mouse pasting?
+-----------------------------------------
+
+I keep hitting the middle mouse button by accident and getting stuff
+pasted into my buffer so how can I turn this off?
+
+ Here is an alternative binding, whereby the middle mouse button
+selects (but does not cut) the expression under the mouse. Clicking
+middle on a left or right paren will select to the matching one. Note
+that you can use `define-key' or `global-set-key'.
+
+ (defun mouse-set-point-and-select (event)
+ "Sets the point at the mouse location, then marks following form"
+ (interactive "@e")
+ (mouse-set-point event)
+ (mark-sexp 1))
+ (define-key global-map [button2] 'mouse-set-point-and-select)
+
+\1f
+File: xemacs-faq.info, Node: Q3.1.2, Next: Q3.1.3, Prev: Q3.1.1, Up: Editing
+
+Q3.1.2: How do I set control/meta/etc modifiers on mouse buttons?
+-----------------------------------------------------------------
+
+Use, for instance, `[(meta button1)]'. For example, here is a common
+setting for Common Lisp programmers who use the bundled `ilisp'
+package, whereby meta-button1 on a function name will find the file
+where the function name was defined, and put you at that location in
+the source file.
+
+ [Inside a function that gets called by the lisp-mode-hook and
+ilisp-mode-hook]
+
+ (local-set-key [(meta button1)] 'edit-definitions-lisp)
+
+\1f
+File: xemacs-faq.info, Node: Q3.1.3, Next: Q3.1.4, Prev: Q3.1.2, Up: Editing
+
+Q3.1.3: Clicking the left button does not do anything in buffer list.
+---------------------------------------------------------------------
+
+I do `C-x C-b' to get a list of buffers and the entries get highlighted
+when I move the mouse over them but clicking the left mouse does not do
+anything.
+
+ Use the middle mouse button.
+
+\1f
+File: xemacs-faq.info, Node: Q3.1.4, Next: Q3.1.5, Prev: Q3.1.3, Up: Editing
+
+Q3.1.4: How can I get a list of buffers when I hit mouse button 3?
+------------------------------------------------------------------
+
+The following code will replace the default popup on button3:
+
+ (global-set-key [button3] 'popup-buffer-menu)
+
+\1f
+File: xemacs-faq.info, Node: Q3.1.5, Next: Q3.2.1, Prev: Q3.1.4, Up: Editing
+
+Q3.1.5: How can I set XEmacs up so that it pastes where the text cursor is?
+---------------------------------------------------------------------------
+
+By default XEmacs pastes X selections where the mouse pointer is. How
+do I disable this?
+
+ Examine the function `mouse-yank', by typing `C-h f mouse-yank
+<RET>'.
+
+ To get XEmacs to paste at the text cursor, add this your `init.el':
+
+ (setq mouse-yank-at-point t)
+
+ You can also change this with Customize. Select from the `Options'
+menu `Advanced (Customize)->Emacs->Editing->Mouse->Yank At Point...' or
+type `M-x customize <RET> mouse <RET>'.
+
+3.2: Buffers, Text Editing
+==========================
+
+\1f
+File: xemacs-faq.info, Node: Q3.2.1, Next: Q3.2.2, Prev: Q3.1.5, Up: Editing
+
+Q3.2.1: Can I have the end of the buffer delimited in some way?
+---------------------------------------------------------------
+
+Say, with: `[END]'?
+
+ Try this:
+
+ (let ((ext (make-extent (point-min) (point-max))))
+ (set-extent-property ext 'start-closed t)
+ (set-extent-property ext 'end-closed t)
+ (set-extent-property ext 'detachable nil)
+ (set-extent-end-glyph ext (make-glyph [string :data "[END]"])))
+
+ Since this is XEmacs, you can specify an icon to be shown on
+window-system devices. To do so, change the `make-glyph' call to
+something like this:
+
+ (make-glyph '([xpm :file "~/something.xpm"]
+ [string :data "[END]"]))
+
+ You can inline the XPM definition yourself by specifying `:data'
+instead of `:file'. Here is such a full-featured version that works on
+both X and TTY devices:
+
+ (let ((ext (make-extent (point-min) (point-max))))
+ (set-extent-property ext 'start-closed t)
+ (set-extent-property ext 'end-closed t)
+ (set-extent-property ext 'detachable nil)
+ (set-extent-end-glyph ext (make-glyph '([xpm :data "\
+ /* XPM */
+ static char* eye = {
+ \"20 11 7 2\",
+ \"__ c None\"
+ \"_` c #7f7f7f\",
+ \"_a c #fefefe\",
+ \"_b c #7f0000\",
+ \"_c c #fefe00\",
+ \"_d c #fe0000\",
+ \"_e c #bfbfbf\",
+ \"___________`_`_`___b_b_b_b_________`____\",
+ \"_________`_`_`___b_c_c_c_b_b____________\",
+ \"_____`_`_`_e___b_b_c_c_c___b___b_______`\",
+ \"___`_`_e_a___b_b_d___b___b___b___b______\",
+ \"_`_`_e_a_e___b_b_d_b___b___b___b___b____\",
+ \"_`_`_a_e_a___b_b_d___b___b___b___b___b__\",
+ \"_`_`_e_a_e___b_b_d_b___b___b___b___b_b__\",
+ \"___`_`_e_a___b_b_b_d_c___b___b___d_b____\",
+ \"_____`_`_e_e___b_b_b_d_c___b_b_d_b______\",
+ \"_`_____`_`_`_`___b_b_b_d_d_d_d_b________\",
+ \"___`_____`_`_`_`___b_b_b_b_b_b__________\",
+ } ;"]
+ [string :data "[END]"]))))
+
+ Note that you might want to make this a function, and put it to a
+hook. We leave that as an exercise for the reader.
+
+\1f
+File: xemacs-faq.info, Node: Q3.2.2, Next: Q3.2.3, Prev: Q3.2.1, Up: Editing
+
+Q3.2.2: How do I insert today's date into a buffer?
+---------------------------------------------------
+
+Like this:
+
+ (insert (current-time-string))
+
+\1f
+File: xemacs-faq.info, Node: Q3.2.3, Next: Q3.2.4, Prev: Q3.2.2, Up: Editing
+
+Q3.2.3: How do I get a single minibuffer frame?
+-----------------------------------------------
+
+Vin Shelton <acs@acm.org> writes:
+
+ (setq initial-frame-plist '(minibuffer nil))
+ (setq default-frame-plist '(minibuffer nil))
+ (setq default-minibuffer-frame
+ (make-frame
+ '(minibuffer only
+ width 86
+ height 1
+ menubar-visible-p nil
+ default-toolbar-visible-p nil
+ name "minibuffer"
+ top -2
+ left -2
+ has-modeline-p nil)))
+ (frame-notice-user-settings)
+
+ *Please note:* The single minibuffer frame may not be to everyone's
+taste, and there any number of other XEmacs options settings that may
+make it difficult or inconvenient to use.
+
+\1f
+File: xemacs-faq.info, Node: Q3.2.4, Next: Q3.2.5, Prev: Q3.2.3, Up: Editing
+
+Q3.2.4: How can I enable auto-indent and/or Filladapt?
+------------------------------------------------------
+
+Put the following line in your `init.el':
+
+ (setq indent-line-function 'indent-relative-maybe)
+
+ If you want to get fancy, try the `filladapt' package available
+standard with XEmacs. Put this into your `init.el':
+
+ (require 'filladapt)
+ (setq-default filladapt-mode t)
+ (add-hook 'c-mode-hook 'turn-off-filladapt-mode)
+
+ This will enable Filladapt for all modes except C mode, where it
+doesn't work well. To turn Filladapt on only in particular major
+modes, remove the `(setq-default ...)' line and use
+`turn-on-filladapt-mode', like this:
+
+ (add-hook 'text-mode-hook 'turn-on-filladapt-mode)
+
+ You can customize filling and adaptive filling with Customize.
+Select from the `Options' menu `Advanced
+(Customize)->Emacs->Editing->Fill->Fill...' or type `M-x customize
+<RET> fill <RET>'.
+
+ Note that well-behaving text-lookalike modes will run
+`text-mode-hook' by default (e.g. that's what Message does). For the
+nasty ones, you'll have to provide the `add-hook's yourself.
+
+ Please note that the `fa-extras' package is no longer useful.
+
+\1f
+File: xemacs-faq.info, Node: Q3.2.5, Next: Q3.3.1, Prev: Q3.2.4, Up: Editing
+
+Q3.2.5: How can I get XEmacs to come up in text/auto-fill mode by default?
+--------------------------------------------------------------------------
+
+Try the following lisp in your `init.el':
+
+ (setq default-major-mode 'text-mode)
+ (add-hook 'text-mode-hook 'turn-on-auto-fill)
+
+ *WARNING*: note that changing the value of `default-major-mode' from
+`fundamental-mode' can break a large amount of built-in code that
+expects newly created buffers to be in `fundamental-mode'. (Changing
+from `fundamental-mode' to `text-mode' might not wreak too much havoc,
+but changing to something more exotic like a lisp-mode would break many
+Emacs packages).
+
+ Note that Emacs by default starts up in buffer `*scratch*' in
+`initial-major-mode', which defaults to `lisp-interaction-mode'. Thus
+adding the following form to your Emacs init file will cause the
+initial `*scratch*' buffer to be put into auto-fill'ed `text-mode':
+
+ (setq initial-major-mode
+ (lambda ()
+ (text-mode)
+ (turn-on-auto-fill)))
+
+ Note that after your init file is loaded, if
+`inhibit-startup-message' is `nil' (the default) and the startup buffer
+is `*scratch*' then the startup message will be inserted into
+`*scratch*'; it will be removed after a timeout by erasing the entire
+`*scratch*' buffer. Keep in mind this default usage of `*scratch*' if
+you desire any prior manipulation of `*scratch*' from within your Emacs
+init file. In particular, anything you insert into `*scratch*' from
+your init file will be later erased. Also, if you change the mode of
+the `*scratch*' buffer, be sure that this will not interfere with
+possible later insertion of the startup message (e.g. if you put
+`*scratch*' into a nonstandard mode that has automatic font lock rules,
+then the startup message might get fontified in a strange foreign
+manner, e.g. as code in some programming language).
+
+3.3: Text Selections
+====================
+
+\1f
+File: xemacs-faq.info, Node: Q3.3.1, Next: Q3.3.2, Prev: Q3.2.5, Up: Editing
+
+Q3.3.1: How do I select a rectangular region?
+---------------------------------------------
+
+Just select the region normally, then use the rectangle commands (e.g.
+`kill-rectangle' on it. The region does not highlight as a rectangle,
+but the commands work just fine.
+
+ To actually sweep out rectangular regions with the mouse you can use
+`mouse-track-do-rectangle' which is assigned to `M-button1'. Then use
+rectangle commands.
+
+ You can also do the following to change default behavior to sweep out
+rectangular regions:
+
+ (setq mouse-track-rectangle-p t)
+
+ You can also change this with Customize. Select from the `Options'
+menu `Advanced (Customize)->Emacs->Editing->Mouse->Track Rectangle...'
+or type `M-x customize <RET> mouse <RET>'.
+
+ mouse-track-do-rectangle: (event)
+ -- an interactive compiled Lisp function.
+ Like `mouse-track' but selects rectangles instead of regions.
+
+\1f
+File: xemacs-faq.info, Node: Q3.3.2, Next: Q3.3.3, Prev: Q3.3.1, Up: Editing
+
+Q3.3.2: How can I turn off or change highlighted selections?
+------------------------------------------------------------
+
+The `zmacs' mode allows for what some might call gratuitous
+highlighting for selected regions (either by setting mark or by using
+the mouse). This is the default behavior. To turn off, add the
+following line to your `init.el' file:
+
+ (setq zmacs-regions nil)
+
+ You can also change this with Customize. Select from the `Options'
+menu `Advanced (Customize)->Emacs->Editing->Basics->Zmacs Regions' or
+type `M-x customize <RET> editing-basics <RET>'.
+
+ To change the face for selection, look at `Options->Advanced
+(Customize)' on the menubar.
+
+\1f
+File: xemacs-faq.info, Node: Q3.3.3, Next: Q3.3.4, Prev: Q3.3.2, Up: Editing
+
+Q3.3.3: How do I cause typing on an active region to remove it?
+---------------------------------------------------------------
+
+I want to change things so that if I select some text and start typing,
+the typed text replaces the selected text, similar to Motif.
+
+ You want to use something called "pending delete". Pending delete
+is what happens when you select a region (with the mouse or keyboard)
+and you press a key to replace the selected region by the key you typed.
+Usually backspace kills the selected region.
+
+ To get this behavior, ensure that you have the `pc' package
+installed, and add the following lines to your `init.el':
+
+ (cond
+ ((fboundp 'turn-on-pending-delete)
+ (turn-on-pending-delete))
+ ((fboundp 'pending-delete-on)
+ (pending-delete-on t)))
+
+ Note that this will work with both Backspace and Delete. This code
+is a tad more complicated than it has to be for XEmacs in order to make
+it more portable.
+
+\1f
+File: xemacs-faq.info, Node: Q3.3.4, Next: Q3.3.5, Prev: Q3.3.3, Up: Editing
+
+Q3.3.4: Can I turn off the highlight during isearch?
+----------------------------------------------------
+
+I do not like my text highlighted while I am doing isearch as I am not
+able to see what's underneath. How do I turn it off?
+
+ Put the following in your `init.el':
+
+ (setq isearch-highlight nil)
+
+ You can also change this with Customize. Type `M-x
+customize-variable <RET> isearch-highlight <RET>'.
+
+ Note also that isearch-highlight affects query-replace and ispell.
+Instead of disabling isearch-highlight you may find that a better
+solution consists of customizing the `isearch' face.
+
+\1f
+File: xemacs-faq.info, Node: Q3.3.5, Next: Q3.3.6, Prev: Q3.3.4, Up: Editing
+
+Q3.3.5: Why is killing so slow?
+-------------------------------
+
+This actually is an X Windows question, although you'll notice it with
+keyboard operations as well as while using the GUI. Basically, there
+are four ways to communicate interprogram via the X server:
+
+*Primary selection*
+ a transient selection that gets replaced every time a new
+ selection is made
+
+*Secondary selection*
+ for "exchanging" with the primary selection
+
+*Cut buffers*
+ a clipboard internal to the X server (deprecated)
+
+*Clipboard selection*
+ a selection with a notification protocol that allows a separate
+ app to manage the clipboard
+
+ The cut buffers are deprecated because managing them is even more
+inefficient than the clipboard notification protocol. The primary
+selection works fine for many users and applications, but is not very
+robust under intensive or sophisticated use.
+
+ In Motif and MS Windows, a clipboard has become the primary means for
+managing cut and paste. These means that "modern" applications tend to
+be oriented toward a true clipboard, rather than the primary selection.
+(On Windows, there is nothing equivalent to the primary selection.)
+It's not that XEmacs doesn't support the simple primary selection
+method, it's that more and more other applications don't.
+
+ So the slowdown occurs because XEmacs now engages in the clipboard
+notification protocol on _every_ kill. This is especially slow on
+Motif.
+
+ With most people running most clients and server on the same host,
+and many of the rest working over very fast communication, you may
+expect that the situation is not going to improve.
+
+ There are a number of workarounds. The most effective is to use a
+special command to do selection ownership only when you intend to paste
+to another application. Useful commands are `kill-primary-selection'
+and `copy-primary-selection'. These work only on text selected with
+the mouse (probably; experiment), and are bound by default to the `Cut'
+and `Copy', respectively, buttons on the toolbar.
+`copy-primary-selection' is also bound to `C-Insert'. You can yank the
+clipboard contents with `yank-primary-selection', bound to the `Paste'
+toolbar button and `Sh-Insert'.
+
+ If you are communicating by cut and paste with applications that use
+the primary selection, then you can customize
+`interprogram-cut-function' to `nil', restoring the XEmacs version 20
+behavior. How can you tell if a program will support this?
+Motifly-correct programs require the clipboard; you lose. For others,
+only by trying it. You also need to customize the complementary
+`interprogram-paste-function' to `nil'. (Otherwise XEmacs-to-XEmacs
+pastes will not work correctly.)
+
+ You may get some relief on Motif by setting
+`x-selection-strict-motif-ownership' to nil, but this means you will
+only intermittently be able to paste XEmacs kills to Motif applications.
+
+ Thanks to Jeff Mincy and Glynn Clements for corrections.
+
+\1f
+File: xemacs-faq.info, Node: Q3.3.6, Next: Q3.4.1, Prev: Q3.3.5, Up: Editing
+
+Q3.3.6: Why does `M-w' take so long?
+------------------------------------
+
+It actually doesn't. It leaves the region visible for a second so that
+you can see what area is being yanked. If you start working, though, it
+will immediately complete its operation. In other words, it will only
+delay for a second if you let it.
+
+3.4: Editing Source Code
+========================
+
+\1f
+File: xemacs-faq.info, Node: Q3.4.1, Next: Q3.4.2, Prev: Q3.3.6, Up: Editing
+
+Q3.4.1: I do not like cc-mode. How do I use the old c-mode?
+------------------------------------------------------------
+
+Well, first off, consider if you really want to do this. cc-mode is
+much more powerful than the old c-mode. If you're having trouble
+getting your old offsets to work, try using `c-set-offset' instead.
+You might also consider using the package `cc-compat'.
+
+ But, if you still insist, add the following lines to your `init.el':
+
+ (fmakunbound 'c-mode)
+ (makunbound 'c-mode-map)
+ (fmakunbound 'c++-mode)
+ (makunbound 'c++-mode-map)
+ (makunbound 'c-style-alist)
+ (load-library "old-c-mode")
+ (load-library "old-c++-mode")
+
+ This must be done before any other reference is made to either
+c-mode or c++-mode.
+
+\1f
+File: xemacs-faq.info, Node: Q3.4.2, Prev: Q3.4.1, Up: Editing
+
+Q3.4.2: How do you make XEmacs indent CL if-clauses correctly?
+--------------------------------------------------------------
+
+I'd like XEmacs to indent all the clauses of a Common Lisp `if' the
+same amount instead of indenting the 3rd clause differently from the
+first two.
+
+ The package `cl-indent' that comes with XEmacs sets up this kind of
+indentation by default. `cl-indent' also knows about many other
+CL-specific forms. To use `cl-indent', one can do this:
+
+ (setq lisp-indent-function 'common-lisp-indent-function)
+
+ One can also customize `cl-indent.el' so it mimics the default `if'
+indentation `then' indented more than the `else'. Here's how:
+
+ (put 'if 'common-lisp-indent-function '(nil nil &body))
+
+\1f
+File: xemacs-faq.info, Node: Display, Next: External Subsystems, Prev: Editing, Up: Top
+
+4 Display Functions
+*******************
+
+This is part 4 of the XEmacs Frequently Asked Questions list. This
+section is devoted to the display-related capabilities of XEmacs
+(fonts, colors, modeline, menubar, toolbar, scrollbar, etc.) and how to
+customize them.
+
+* Menu:
+
+4.0: Textual Fonts and Colors
+* Q4.0.1:: How do I specify a font?
+* Q4.0.2:: How do I set the text, menu and modeline fonts?
+* Q4.0.3:: How can I set color options from `init.el'?
+* Q4.0.4:: How can I set the colors when highlighting a region?
+* Q4.0.5:: How can I limit color map usage?
+* Q4.0.6:: My tty supports color, but XEmacs doesn't use them.
+* Q4.0.7:: Can I have pixmap backgrounds in XEmacs?
+* Q4.0.8:: How do I display non-ASCII characters?
+* Q4.0.9:: Font selections in don't get saved after `Save Options'.
+
+4.1: Syntax Highlighting (Font Lock)
+* Q4.1.1:: How can I do source code highlighting using font-lock?
+* Q4.1.2:: How do I get `More' Syntax Highlighting on by default?
+
+4.2: The Modeline
+* Q4.2.1:: How can I make the modeline go away?
+* Q4.2.2:: How do you have XEmacs display the line number in the modeline?
+* Q4.2.3:: How do I get XEmacs to put the time of day on the modeline?
+* Q4.2.4:: How can I change the modeline color based on the mode used?
+
+4.3: The Cursor
+* Q4.3.1:: Is there a way to make the bar cursor thicker?
+* Q4.3.2:: Is there a way to get back the block cursor?
+* Q4.3.3:: Can I make the cursor blink?
+
+4.4: The Menubar
+* Q4.4.1:: How do I get rid of the menubar?
+* Q4.4.2:: How can I customize the menubar?
+* Q4.4.3:: How do I enable use of the keyboard (Alt) to access menu items?
+* Q4.4.4:: How do I control how many buffers are listed in the menu `Buffers List'?
+* Q4.4.5:: Resources like `Emacs*menubar*font' are not working?
+
+4.5: The Toolbar
+* Q4.5.1:: How do I get rid of the toolbar?
+* Q4.5.2:: How can I customize the toolbar?
+* Q4.5.3:: How can I bind a key to a function to toggle the toolbar?
+* Q4.5.4:: `Can't instantiate image error...' in toolbar
+
+4.6: Scrollbars and Scrolling
+* Q4.6.1:: How can I disable the scrollbar?
+* Q4.6.2:: How can I change the scrollbar width?
+* Q4.6.3:: How can I use resources to change scrollbar colors?
+* Q4.6.4:: Moving the scrollbar can move the point; can I disable this?
+* Q4.6.5:: Scrolling one line at a time.
+* Q4.6.6:: How can I turn off automatic horizontal scrolling in specific modes?
+* Q4.6.7:: I find auto-show-mode disconcerting. How do I turn it off?
+
+4.7: The Gutter Tabs, The Progress Bar, Widgets
+* Q4.7.1:: How can I disable the gutter tabs?
+* Q4.7.2:: How can I disable the progress bar?
+* Q4.7.3:: There are bugs in the gutter or widgets.
+* Q4.7.4:: How can I customize the gutter or gutter tabs?
+
+4.0: Textual Fonts and Colors
+=============================
+
+\1f
+File: xemacs-faq.info, Node: Q4.0.1, Next: Q4.0.2, Prev: Display, Up: Display
+
+Q4.0.1: How do I specify a font?
+--------------------------------
+
+#### Update me.
+
+ In 21.4 and above, you can use the `Options' menu to change the font.
+You can also do it in your init file, e.g. like this (for MS Windows):
+
+ (set-face-font 'default "Lucida Console:Regular:10")
+ (set-face-font 'modeline "MS Sans Serif:Regular:10")
+
+\1f
+File: xemacs-faq.info, Node: Q4.0.2, Next: Q4.0.3, Prev: Q4.0.1, Up: Display
+
+Q4.0.2: How do I set the text, menu and modeline fonts?
+-------------------------------------------------------
+
+#### Update me.
+
+ Note that you should use `Emacs.' and not `Emacs*' when setting face
+values.
+
+ In `.Xresources':
+
+ Emacs.default.attributeFont: -*-*-medium-r-*-*-*-120-*-*-m-*-*-*
+ Emacs*menubar*font: fixed
+ Emacs.modeline.attributeFont: fixed
+
+ This is confusing because `default' and `modeline' are face names,
+and can be found listed with all faces in the current mode by using
+`M-x set-face-font (enter) ?'. They use the face-specific resource
+`attributeFont'.
+
+ On the other hand, `menubar' is a normal X thing that uses the
+resource `font'. With Motif it _may be_ necessary to use `fontList'
+_instead of_ `font'. In _non-Motif_ configurations with Mule it _is_
+necessary to use `fontSet' instead of `font'. (Sorry, there just is no
+simple recipe here.)
+
+\1f
+File: xemacs-faq.info, Node: Q4.0.3, Next: Q4.0.4, Prev: Q4.0.2, Up: Display
+
+Q4.0.3: How can I set color options from `init.el'?
+---------------------------------------------------
+
+How can I set the most commonly used color options from my `init.el'
+instead of from my `.Xresources'?
+
+ Like this:
+
+ (set-face-background 'default "bisque") ; frame background
+ (set-face-foreground 'default "black") ; normal text
+ (set-face-background 'zmacs-region "red") ; When selecting w/
+ ; mouse
+ (set-face-foreground 'zmacs-region "yellow")
+ (set-face-font 'default "*courier-bold-r*120-100-100*")
+ (set-face-background 'highlight "blue") ; Ie when selecting
+ ; buffers
+ (set-face-foreground 'highlight "yellow")
+ (set-face-background 'modeline "blue") ; Line at bottom
+ ; of buffer
+ (set-face-foreground 'modeline "white")
+ (set-face-font 'modeline "*bold-r-normal*140-100-100*")
+ (set-face-background 'isearch "yellow") ; When highlighting
+ ; while searching
+ (set-face-foreground 'isearch "red")
+ (setq x-pointer-foreground-color "black") ; Adds to bg color,
+ ; so keep black
+ (setq x-pointer-background-color "blue") ; This is color
+ ; you really
+ ; want ptr/crsr
+
+\1f
+File: xemacs-faq.info, Node: Q4.0.4, Next: Q4.0.5, Prev: Q4.0.3, Up: Display
+
+Q4.0.4: How can I set the colors when highlighting a region?
+------------------------------------------------------------
+
+How can I set the background/foreground colors when highlighting a
+region?
+
+ You can change the face `zmacs-region' either in your `.Xresources':
+
+ Emacs.zmacs-region.attributeForeground: firebrick
+ Emacs.zmacs-region.attributeBackground: lightseagreen
+
+ or in your `init.el':
+
+ (set-face-background 'zmacs-region "red")
+ (set-face-foreground 'zmacs-region "yellow")
+
+\1f
+File: xemacs-faq.info, Node: Q4.0.5, Next: Q4.0.6, Prev: Q4.0.4, Up: Display
+
+Q4.0.5: How can I limit color map usage?
+----------------------------------------
+
+I'm using Netscape (or another color grabber like XEmacs); is there any
+way to limit the number of available colors in the color map?
+
+ Answer: No, but you can start Netscape before XEmacs, and it will use
+the closest available color if the colormap is full. You can also limit
+the number of colors Netscape uses, using the flags -mono, -ncols <#> or
+-install (for mono, limiting to <#> colors, or for using a private color
+map).
+
+ If you have the money, another solution would be to use a truecolor
+or direct color video.
+
+\1f
+File: xemacs-faq.info, Node: Q4.0.6, Next: Q4.0.7, Prev: Q4.0.5, Up: Display
+
+Q4.0.6: My tty supports color, but XEmacs doesn't use them.
+-----------------------------------------------------------
+
+XEmacs tries to automatically determine whether your tty supports color,
+but sometimes guesses wrong. In that case, you can make XEmacs Do The
+Right Thing using this Lisp code:
+
+ (if (eq 'tty (device-type))
+ (set-device-class nil 'color))
+
+\1f
+File: xemacs-faq.info, Node: Q4.0.7, Next: Q4.0.8, Prev: Q4.0.6, Up: Display
+
+Q4.0.7: Can I have pixmap backgrounds in XEmacs?
+------------------------------------------------
+
+Juan Villacis <jvillaci@wahnsinnig.extreme.indiana.edu> writes:
+
+ There are several ways to do it. For example, you could specify a
+ default pixmap image to use in your `~/.Xresources', e.g.,
+
+ Emacs*EmacsFrame.default.attributeBackgroundPixmap: /path/to/image.xpm
+
+ and then reload ~/.Xresources and restart XEmacs. Alternatively,
+ since each face can have its own pixmap background, a better way
+ would be to set a face's pixmap within your XEmacs init file, e.g.,
+
+ (set-face-background-pixmap 'default "/path/to/image.xpm")
+ (set-face-background-pixmap 'bold "/path/to/another_image.xpm")
+
+ and so on. You can also do this interactively via `M-x
+ edit-faces'.
+
+
+\1f
+File: xemacs-faq.info, Node: Q4.0.8, Next: Q4.0.9, Prev: Q4.0.7, Up: Display
+
+Q4.0.8: How do I display non-ASCII characters?
+----------------------------------------------
+
+If you're using a Mule-enabled XEmacs, then display is automatic. If
+you're not seeing the characters you expect, either (1) you don't have
+appropriate fonts available or (2) XEmacs did not correctly detect the
+coding system (*note Recognize Coding: (xemacs)Recognize Coding.). In
+case (1), install fonts as is customary for your platform. In case
+(2), you need to tell XEmacs explicitly what coding systems you're
+using. *Note Specify Coding: (xemacs)Specify Coding.
+
+ If your XEmacs is not Mule-enabled, and for some reason getting a
+Mule-enabled XEmacs seems like the wrong thing to do, all is not lost.
+You can arrange it by brute force. In `event-Xt.c' (suppress the urge
+to look in this file--play Doom instead, because you'll survive
+longer), it is written:
+
+ In a non-Mule world, a user can still have a multi-lingual editor,
+ by doing `(set-face-font "-*-iso8859-2" (current-buffer))' for all
+ their Latin-2 buffers, etc.
+
+ For the related problem of _inputting_ non-ASCII characters in a
+non-Mule XEmacs, *Note How can you type in special characters in
+XEmacs?: Q3.0.6.
+
+\1f
+File: xemacs-faq.info, Node: Q4.0.9, Next: Q4.1.1, Prev: Q4.0.8, Up: Display
+
+Q4.0.9: Font selections in don't get saved after `Save Options'.
+----------------------------------------------------------------
+
+John Mann <mannj@ll.mit.edu> writes:
+
+ You have to go to `Options->Menubars' and unselect `Frame-Local
+ Font Menu'. If this option is selected, font changes are only
+ applied to the _current_ frame and do _not_ get saved when you
+ save options.
+
+ Also, set the following in your `init.el':
+
+ (setq options-save-faces t)
+
+4.1: Syntax Highlighting (Font Lock)
+====================================
+
+\1f
+File: xemacs-faq.info, Node: Q4.1.1, Next: Q4.1.2, Prev: Q4.0.9, Up: Display
+
+Q4.1.1: How can I do source code highlighting using font-lock?
+--------------------------------------------------------------
+
+For most modes, font-lock is already set up and just needs to be turned
+on. This can be done by adding the line:
+
+ (require 'font-lock)
+
+ to your `init.el'. (You can turn it on for the current buffer and
+session only by `M-x font-lock-mode'.) See the file
+`etc/sample.init.el' (`etc/sample.emacs' in XEmacs versions prior to
+21.4) for more information.
+
+ See also `Syntax Highlighting' from the `Options' menu. Remember to
+save options.
+
+\1f
+File: xemacs-faq.info, Node: Q4.1.2, Next: Q4.2.1, Prev: Q4.1.1, Up: Display
+
+Q4.1.2: How do I get `More' Syntax Highlighting on by default?
+--------------------------------------------------------------
+
+Use the following code in your `init.el':
+
+ (setq-default font-lock-maximum-decoration t)
+
+ See also `Syntax Highlighting' from the `Options' menu. Remember to
+save options.
+
+4.2: The Modeline
+=================
+
+\1f
+File: xemacs-faq.info, Node: Q4.2.1, Next: Q4.2.2, Prev: Q4.1.2, Up: Display
+
+Q4.2.1: How can I make the modeline go away?
+--------------------------------------------
+
+ (set-specifier has-modeline-p nil)
+
+\1f
+File: xemacs-faq.info, Node: Q4.2.2, Next: Q4.2.3, Prev: Q4.2.1, Up: Display
+
+Q4.2.2: How do you have XEmacs display the line number in the modeline?
+-----------------------------------------------------------------------
+
+Add the following line to your `init.el' file to display the line
+number:
+
+ (line-number-mode 1)
+
+ Use the following to display the column number:
+
+ (column-number-mode 1)
+
+ Or select from the `Options' menu `Advanced
+(Customize)->Emacs->Editing->Basics->Line Number Mode' and/or `Advanced
+(Customize)->Emacs->Editing->Basics->Column Number Mode'
+
+ Or type `M-x customize <RET> editing-basics <RET>'.
+
+\1f
+File: xemacs-faq.info, Node: Q4.2.3, Next: Q4.2.4, Prev: Q4.2.2, Up: Display
+
+Q4.2.3: How do I get XEmacs to put the time of day on the modeline?
+-------------------------------------------------------------------
+
+Add the following line to your `init.el' file to display the time:
+
+ (display-time)
+
+ See `Customize' from the `Options' menu for customization.
+
+\1f
+File: xemacs-faq.info, Node: Q4.2.4, Next: Q4.3.1, Prev: Q4.2.3, Up: Display
+
+Q4.2.4: How can I change the modeline color based on the mode used?
+-------------------------------------------------------------------
+
+You can use something like the following:
+
+ (add-hook 'lisp-mode-hook
+ (lambda ()
+ (set-face-background 'modeline "red" (current-buffer))))
+
+ Then, when editing a Lisp file (i.e. when in Lisp mode), the modeline
+colors change from the default set in your `init.el'. The change will
+only be made in the buffer you just entered (which contains the Lisp
+file you are editing) and will not affect the modeline colors anywhere
+else.
+
+ Notes:
+
+ * The hook is the mode name plus `-hook'. eg. c-mode-hook,
+ c++-mode-hook, emacs-lisp-mode-hook (used for your `init.el' or a
+ `xx.el' file), lisp-interaction-mode-hook (the `*scratch*' buffer),
+ text-mode-hook, etc.
+
+ * Be sure to use `add-hook', not `(setq c-mode-hook xxxx)',
+ otherwise you will erase anything that anybody has already put on
+ the hook.
+
+ * You can also do `(set-face-font 'modeline FONT)', eg.
+ `(set-face-font 'modeline "*bold-r-normal*140-100-100*"
+ (current-buffer))' if you wish the modeline font to vary based on
+ the current mode.
+
+ There are additional modeline faces, `modeline-buffer-id',
+`modeline-mousable', and `modeline-mousable-minor-mode', which you may
+want to customize.
+
+4.3: The Cursor
+===============
+
+\1f
+File: xemacs-faq.info, Node: Q4.3.1, Next: Q4.3.2, Prev: Q4.2.4, Up: Display
+
+Q4.3.1: Is there a way to make the bar cursor thicker?
+------------------------------------------------------
+
+I'd like to have the bar cursor a little thicker, as I tend to "lose" it
+often.
+
+ For a 1 pixel bar cursor, use:
+
+ (setq bar-cursor t)
+
+ For a 2 pixel bar cursor, use:
+
+ (setq bar-cursor 'anything-else)
+
+ You can also change these with Customize. Select from the `Options'
+menu `Advanced (Customize)->Emacs->Environment->Display->Bar Cursor...'
+or type `M-x customize <RET> display <RET>'.
+
+ You can use a color to make it stand out better:
+
+ Emacs*cursorColor: Red
+
+\1f
+File: xemacs-faq.info, Node: Q4.3.2, Next: Q4.3.3, Prev: Q4.3.1, Up: Display
+
+Q4.3.2: Is there a way to get back the block cursor?
+----------------------------------------------------
+
+ (setq bar-cursor nil)
+
+ You can also change this with Customize. Select from the `Options'
+menu `Advanced (Customize)->Emacs->Environment->Display->Bar Cursor...'
+or type `M-x customize <RET> display <RET>'.
+
+\1f
+File: xemacs-faq.info, Node: Q4.3.3, Next: Q4.4.1, Prev: Q4.3.2, Up: Display
+
+Q4.3.3: Can I make the cursor blink?
+------------------------------------
+
+Yes, like this:
+
+ (blink-cursor-mode)
+
+ This function toggles between a steady cursor and a blinking cursor.
+You may also set this mode from the menu bar by selecting
+`Options->Display->Blinking Cursor'. Remember to save options.
+
+4.4: The Menubar
+================
+
+\1f
+File: xemacs-faq.info, Node: Q4.4.1, Next: Q4.4.2, Prev: Q4.3.3, Up: Display
+
+Q4.4.1: How do I get rid of the menubar?
+----------------------------------------
+
+ (set-specifier menubar-visible-p nil)
+
+\1f
+File: xemacs-faq.info, Node: Q4.4.2, Next: Q4.4.3, Prev: Q4.4.1, Up: Display
+
+Q4.4.2: How can I customize the menubar?
+----------------------------------------
+
+For an extensive menubar, add this line to your `init.el':
+
+ (load "big-menubar")
+
+ If you'd like to write your own, this file provides as good a set of
+examples as any to start from. The file is located in edit-utils
+package.
+
+\1f
+File: xemacs-faq.info, Node: Q4.4.3, Next: Q4.4.4, Prev: Q4.4.2, Up: Display
+
+Q4.4.3: How do I enable use of the keyboard (`Alt') to access menu items?
+-------------------------------------------------------------------------
+
+#### Write me.
+
+\1f
+File: xemacs-faq.info, Node: Q4.4.4, Next: Q4.4.5, Prev: Q4.4.3, Up: Display
+
+Q4.4.4: How do I control how many buffers are listed in the menu `Buffers List'?
+--------------------------------------------------------------------------------
+
+Add the following to your `init.el' (suit to fit):
+
+ (setq buffers-menu-max-size 20)
+
+ For no limit, use an argument of `nil'.
+
+ You can also change this with Customize. Select from the `Options'
+menu `Advanced (Customize)->Emacs->Environment->Menu->Buffers Menu->Max
+Size...' or type `M-x customize <RET> buffers-menu <RET>'.
+
+\1f
+File: xemacs-faq.info, Node: Q4.4.5, Next: Q4.5.1, Prev: Q4.4.4, Up: Display
+
+Q4.4.5: Resources like `Emacs*menubar*font' are not working?
+------------------------------------------------------------
+
+I am trying to use a resource like `Emacs*menubar*font' to set the font
+of the menubar but it's not working.
+
+ In Motif, the use of `font' resources is obsoleted in order to
+support internationalization. If you are using the real Motif menubar,
+this resource is not recognized at all; you have to say:
+
+ Emacs*menubar*fontList: FONT
+
+ If you are using the Lucid menubar, for backward compatibility with
+existing user configurations, the `font' resource is recognized. Since
+this is not supported by Motif itself, the code is a kludge and the
+`font' resource will be recognized only if the `fontList' resource
+resource is unset. This means that the resource
+
+ *fontList: FONT
+
+ will override
+
+ Emacs*menubar*font: FONT
+
+ even though the latter is more specific.
+
+ In non-Motif configurations using `--with-mule' and `--with-xfs' it
+_is_ necessary to use the `fontSet' resource _instead of_ the `font'
+resource. The backward compatibility kludge was never implemented for
+non-Motif builds. Example:
+
+ *fontSet: FONT
+
+4.5: The Toolbar
+================
+
+\1f
+File: xemacs-faq.info, Node: Q4.5.1, Next: Q4.5.2, Prev: Q4.4.5, Up: Display
+
+Q4.5.1: How do I get rid of the toolbar?
+----------------------------------------
+
+#### Write me.
+
+\1f
+File: xemacs-faq.info, Node: Q4.5.2, Next: Q4.5.3, Prev: Q4.5.1, Up: Display
+
+Q4.5.2: How can I customize the toolbar?
+----------------------------------------
+
+#### Write me.
+
+\1f
+File: xemacs-faq.info, Node: Q4.5.3, Next: Q4.5.4, Prev: Q4.5.2, Up: Display
+
+Q4.5.3: How can I bind a key to a function to toggle the toolbar?
+-----------------------------------------------------------------
+
+Try something like:
+
+ (defun my-toggle-toolbar ()
+ (interactive)
+ (set-specifier default-toolbar-visible-p
+ (not (specifier-instance default-toolbar-visible-p))))
+ (global-set-key "\C-xT" 'my-toggle-toolbar)
+
+ Thanks to Martin Buchholz <martin@xemacs.org> for the correct code.
+
+\1f
+File: xemacs-faq.info, Node: Q4.5.4, Next: Q4.6.1, Prev: Q4.5.3, Up: Display
+
+Q4.5.4: `Can't instantiate image error...' in toolbar
+-----------------------------------------------------
+
+Dr. Ram Samudrala <expt@alanine.ram.org> writes:
+
+ I just installed the XEmacs (20.4-2) RPMS that I downloaded from
+`http://www.xemacs.org/'. Everything works fine, except that when I
+place my mouse over the toolbar, it beeps and gives me this message:
+
+ Can't instantiate image (probably cached):
+ [xbm :mask-file "/usr/include/X11/bitmaps/leftptrmsk :mask-data
+ (16 16 <strange control characters> ...
+
+ Kyle Jones <kyle_jones@wonderworks.com> writes:
+
+ This is problem specific to some Chips and Technologies video
+ chips, when running XFree86. Putting
+
+ `Option "sw_cursor"'
+
+ in `XF86Config' gets rid of the problem.
+
+4.6: Scrollbars and Scrolling
+=============================
+
+\1f
+File: xemacs-faq.info, Node: Q4.6.1, Next: Q4.6.2, Prev: Q4.5.4, Up: Display
+
+Q4.6.1: How can I disable the scrollbar?
+----------------------------------------
+
+To disable them for all frames, add the following line to your
+`.Xresources':
+
+ Emacs.scrollBarWidth: 0
+
+ Or select `Options->Display->Scrollbars'. Remember to save options.
+
+ To turn the scrollbar off on a per-frame basis, use the following
+function:
+
+ (set-specifier scrollbar-width 0 (selected-frame))
+
+ You can actually turn the scrollbars on at any level you want by
+substituting for (selected-frame) in the above command. For example, to
+turn the scrollbars off only in a single buffer:
+
+ (set-specifier scrollbar-width 0 (current-buffer))
+
+\1f
+File: xemacs-faq.info, Node: Q4.6.2, Next: Q4.6.3, Prev: Q4.6.1, Up: Display
+
+Q4.6.2: How can I change the scrollbar width?
+---------------------------------------------
+
+#### Write me.
+
+\1f
+File: xemacs-faq.info, Node: Q4.6.3, Next: Q4.6.4, Prev: Q4.6.2, Up: Display
+
+Q4.6.3: How can I use resources to change scrollbar colors?
+-----------------------------------------------------------
+
+Here's a recap of how to use resources to change your scrollbar colors:
+
+ ! Motif scrollbars
+
+ Emacs*XmScrollBar.Background: skyblue
+ Emacs*XmScrollBar.troughColor: lightgray
+
+ ! Athena scrollbars
+
+ Emacs*Scrollbar.Foreground: skyblue
+ Emacs*Scrollbar.Background: lightgray
+
+ Note the capitalization of `Scrollbar' for the Athena widget.
+
+\1f
+File: xemacs-faq.info, Node: Q4.6.4, Next: Q4.6.5, Prev: Q4.6.3, Up: Display
+
+Q4.6.4: Moving the scrollbar can move the point; can I disable this?
+--------------------------------------------------------------------
+
+When I move the scrollbar in an XEmacs window, it moves the point as
+well, which should not be the default behavior. Is this a bug or a
+feature? Can I disable it?
+
+ The current behavior is a feature, not a bug. Point remains at the
+same buffer position as long as that position does not scroll off the
+screen. In that event, point will end up in either the upper-left or
+lower-left hand corner.
+
+ This cannot be changed.
+
+\1f
+File: xemacs-faq.info, Node: Q4.6.5, Next: Q4.6.6, Prev: Q4.6.4, Up: Display
+
+Q4.6.5: Scrolling one line at a time.
+-------------------------------------
+
+Can the cursor keys scroll the screen a line at a time, rather than the
+default half page jump? I tend it to find it disorienting.
+
+ Use the following:
+
+ (setq scroll-step 1)
+
+ You can also change this with Customize. Select from the `Options'
+menu `Advanced (Customize)->Emacs->Environment->Windows->Scroll Step...'
+or type `M-x customize <RET> windows <RET>'.
+
+\1f
+File: xemacs-faq.info, Node: Q4.6.6, Next: Q4.6.7, Prev: Q4.6.5, Up: Display
+
+Q4.6.6: How can I turn off automatic horizontal scrolling in specific modes?
+----------------------------------------------------------------------------
+
+Do `(setq truncate-lines t)' in the mode-hooks for any modes in which
+you want lines truncated.
+
+ More precisely: If `truncate-lines' is nil, horizontal scrollbars
+will never appear. Otherwise, they will appear only if the value of
+`scrollbar-height' for that buffer/window/etc. is non-zero. If you do
+
+ (set-specifier scrollbar-height 0)
+
+ then horizontal scrollbars will not appear in truncated buffers
+unless the package specifically asked for them.
+
+\1f
+File: xemacs-faq.info, Node: Q4.6.7, Next: Q4.7.1, Prev: Q4.6.6, Up: Display
+
+Q4.6.7: I find auto-show-mode disconcerting. How do I turn it off?
+-------------------------------------------------------------------
+
+`auto-show-mode' controls whether or not a horizontal scrollbar
+magically appears when a line is too long to be displayed. This is
+enabled by default. To turn it off, put the following in your
+`init.el':
+
+ (setq auto-show-mode nil)
+ (setq-default auto-show-mode nil)
+
+4.7: The Gutter Tabs, The Progress Bar, Widgets
+===============================================
+
+\1f
+File: xemacs-faq.info, Node: Q4.7.1, Next: Q4.7.2, Prev: Q4.6.7, Up: Display
+
+Q4.7.1: How can I disable the gutter tabs?
+------------------------------------------
+
+#### Write me.
+
+\1f
+File: xemacs-faq.info, Node: Q4.7.2, Next: Q4.7.3, Prev: Q4.7.1, Up: Display
+
+Q4.7.2: How can I disable the progress bar?
+-------------------------------------------
+
+#### Write me.
+
+\1f
+File: xemacs-faq.info, Node: Q4.7.3, Next: Q4.7.4, Prev: Q4.7.2, Up: Display
+
+Q4.7.3: There are bugs in the gutter or widgets.
+------------------------------------------------
+
+#### Write me.
+
+\1f
+File: xemacs-faq.info, Node: Q4.7.4, Prev: Q4.7.3, Up: Display
+
+Q4.7.4: How can I customize the gutter or gutter tabs?
+------------------------------------------------------
+
+#### Write me.
+
+\1f
+File: xemacs-faq.info, Node: External Subsystems, Next: Internet, Prev: Display, Up: Top
+
+5 Interfacing with the Operating System and External Devices
+************************************************************
+
+This is part 5 of the XEmacs Frequently Asked Questions list. This
+section is devoted to the various ways that XEmacs interfaces with the
+operating system, with other processes and with external devices such
+as speakers and the printer.
+
+* Menu:
+
+5.0: X Window System and Resources
+* Q5.0.1:: Where is a list of X resources?
+* Q5.0.2:: How can I detect a color display?
+* Q5.0.3:: How can I get the icon to just say `XEmacs'?
+* Q5.0.4:: How can I have the window title area display the full path?
+* Q5.0.5:: `xemacs -name junk' doesn't work?
+* Q5.0.6:: `-iconic' doesn't work.
+
+5.1: Microsoft Windows
+* Q5.1.1:: Does XEmacs rename all the `win32-*' symbols to `w32-*'?
+* Q5.1.2:: How do I get Windows Explorer to associate a file type with XEmacs?
+
+5.2: Printing
+* Q5.2.1:: What do I need to change to make printing work?
+* Q5.2.2:: How can I print WYSIWYG a font-locked buffer?
+* Q5.2.3:: Getting M-x lpr to work with postscript printer.
+* Q5.2.4:: Can you print under MS Windows?
+
+5.3: Sound
+* Q5.3.1:: How do I turn off the sound?
+* Q5.3.2:: How do I get funky sounds instead of a boring beep?
+* Q5.3.3:: What are NAS and ESD (EsounD)?
+* Q5.3.4:: Sunsite sounds don't play.
+
+5.4: Running an Interior Shell, Invoking Subprocesses
+* Q5.4.1:: What is an interior shell?
+* Q5.4.2:: How do I start up a second shell buffer?
+* Q5.4.3:: Telnet from shell filters too much
+* Q5.4.4:: Strange things are happening in Shell Mode.
+* Q5.4.5:: XEmacs complains "No such file or directory, diff"
+* Q5.4.6:: Cygwin error "fork_copy: linked dll/bss pass 0 failed"
+
+5.5: Multiple Device Support
+* Q5.5.1:: How do I open a frame on another screen of my multi-headed display?
+* Q5.5.2:: Can I really connect to a running XEmacs after calling up over a modem? How?
+* Q5.5.3:: How do I disable gnuserv from opening a new frame?
+* Q5.5.4:: How do I start gnuserv so that each subsequent XEmacs is a client?
+* Q5.5.5:: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient?
+
+5.0: X Window System and Resources
+==================================
+
+\1f
+File: xemacs-faq.info, Node: Q5.0.1, Next: Q5.0.2, Prev: External Subsystems, Up: External Subsystems
+
+Q5.0.1: Where is a list of X resources?
+---------------------------------------
+
+Search through the `NEWS' file for `X Resources'. A fairly
+comprehensive list is given after it.
+
+ In addition, an `app-defaults' file `etc/Emacs.ad' is supplied,
+listing the defaults. The file `etc/sample.Xresources' gives a
+different set of defaults that you might consider for installation in
+your `~/.Xresources' file. It is nearly the same as `etc/Emacs.ad',
+but a few entries are altered. Be careful about installing the
+contents of this file into your `.Xresources' (or legacy `.Xdefaults')
+file if you use GNU Emacs under X11 as well.
+
+\1f
+File: xemacs-faq.info, Node: Q5.0.2, Next: Q5.0.3, Prev: Q5.0.1, Up: External Subsystems
+
+Q5.0.2: How can I detect a color display?
+-----------------------------------------
+
+You can test the return value of the function `(device-class)', as in:
+
+ (when (eq (device-class) 'color)
+ (set-face-foreground 'font-lock-comment-face "Grey")
+ (set-face-foreground 'font-lock-string-face "Red")
+ ....
+ )
+
+\1f
+File: xemacs-faq.info, Node: Q5.0.3, Next: Q5.0.4, Prev: Q5.0.2, Up: External Subsystems
+
+Q5.0.3: How can I get the icon to just say `XEmacs'?
+----------------------------------------------------
+
+I'd like the icon to just say `XEmacs', and not include the name of the
+current file in it.
+
+ Add the following line to your `init.el':
+
+ (setq frame-icon-title-format "XEmacs")
+
+\1f
+File: xemacs-faq.info, Node: Q5.0.4, Next: Q5.0.5, Prev: Q5.0.3, Up: External Subsystems
+
+Q5.0.4: How can I have the window title area display the full path?
+-------------------------------------------------------------------
+
+I'd like to have the window title area display the full directory/name
+of the current buffer file and not just the name.
+
+ Add the following line to your `init.el':
+
+ (setq frame-title-format "%S: %f")
+
+ A more sophisticated title might be:
+
+ (setq frame-title-format
+ '("%S: " (buffer-file-name "%f"
+ (dired-directory dired-directory "%b"))))
+
+ That is, use the file name, or the dired-directory, or the buffer
+name.
+
+\1f
+File: xemacs-faq.info, Node: Q5.0.5, Next: Q5.0.6, Prev: Q5.0.4, Up: External Subsystems
+
+Q5.0.5: `xemacs -name junk' doesn't work?
+-----------------------------------------
+
+When I run `xterm -name junk', I get an xterm whose class name
+according to xprop, is `junk'. This is the way it's supposed to work,
+I think. When I run `xemacs -name junk' the class name is not set to
+`junk'. It's still `emacs'. What does `xemacs -name' really do? The
+reason I ask is that my window manager (fvwm) will make a window sticky
+and I use XEmacs to read my mail. I want that XEmacs window to be
+sticky, without having to use the window manager's function to set the
+window sticky. What gives?
+
+ `xemacs -name' sets the application name for the program (that is,
+the thing which normally comes from `argv[0]'). Using `-name' is the
+same as making a copy of the executable with that new name. The
+`WM_CLASS' property on each frame is set to the frame-name, and the
+application-class. So, if you did `xemacs -name FOO' and then created
+a frame named BAR, you'd get an X window with WM_CLASS = `( "BAR",
+"Emacs")'. However, the resource hierarchy for this widget would be:
+
+ Name: FOO .shell .container .BAR
+ Class: Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
+
+ instead of the default
+
+ Name: xemacs.shell .container .emacs
+ Class: Emacs .TopLevelEmacsShell.EmacsManager.EmacsFrame
+
+ It is arguable that the first element of WM_CLASS should be set to
+the application-name instead of the frame-name, but I think that's less
+flexible, since it does not give you the ability to have multiple frames
+with different WM_CLASS properties. Another possibility would be for
+the default frame name to come from the application name instead of
+simply being `emacs'. However, at this point, making that change would
+be troublesome: it would mean that many users would have to make yet
+another change to their resource files (since the default frame name
+would suddenly change from `emacs' to `xemacs', or whatever the
+executable happened to be named), so we'd rather avoid it.
+
+ To make a frame with a particular name use:
+
+ (make-frame '((name . "the-name")))
+
+\1f
+File: xemacs-faq.info, Node: Q5.0.6, Next: Q5.1.1, Prev: Q5.0.5, Up: External Subsystems
+
+Q5.0.6: `-iconic' doesn't work.
+-------------------------------
+
+When I start up XEmacs using `-iconic' it doesn't work right. Using
+`-unmapped' on the command line, and setting the `initiallyUnmapped' X
+Resource don't seem to help much either...
+
+ Ben Wing <ben@xemacs.org> writes:
+
+ Ugh, this stuff is such an incredible mess that I've about given up
+ getting it to work. The principal problem is numerous
+ window-manager bugs...
+
+5.1: Microsoft Windows
+======================
+
+\1f
+File: xemacs-faq.info, Node: Q5.1.1, Next: Q5.1.2, Prev: Q5.0.6, Up: External Subsystems
+
+Q5.1.1: Does XEmacs rename all the `win32-*' symbols to `w32-*'?
+----------------------------------------------------------------
+
+In his flavor of Emacs 20, Richard Stallman has renamed all the
+`win32-*' symbols to `w32-*'. Does XEmacs do the same?
+
+ We consider such a move counter-productive, thus we do not use the
+`w32' prefix. (His rather questionable justification was that he did
+not consider Windows to be a "winning" platform.) However, the name
+`Win32' is not particularly descriptive outside the Windows world, and
+using just `windows-' would be too generic. So we chose a compromise,
+the prefix `mswindows-' for Windows-related variables and functions.
+
+ Thus all the XEmacs variables and functions directly related to
+either the Windows GUI or OS are prefixed `mswindows-' (except for a
+couple of debugging variables, prefixed `debug-mswindows-'). From an
+architectural perspective, however, we believe that this is mostly a
+non-issue because there should be a very small number of
+window-systems-specific variables anyway. Whenever possible, we try to
+provide generic interfaces that apply to all window systems.
+
+\1f
+File: xemacs-faq.info, Node: Q5.1.2, Next: Q5.2.1, Prev: Q5.1.1, Up: External Subsystems
+
+Q5.1.2: How do I get Windows Explorer to associate a file type with XEmacs?
+---------------------------------------------------------------------------
+
+Associating a new file type with XEmacs.
+........................................
+
+In Explorer select `View->Options->File Types', press `[New Type...]'
+and fill in the dialog box, e.g.:
+
+ Description of type: Emacs Lisp source
+ Associated extension: el
+ Content Type (MIME): text/plain
+
+ then press `[New...]' and fill in the `Action' dialog box as follows:
+
+ Action:
+ Open
+
+ Application used to perform action:
+ D:\Full\path\for\xemacs.exe "%1"
+
+ [x] Use DDE
+
+ DDE Message:
+ open("%1")
+
+ Application:
+ <leave blank>
+
+ DDE Application Not Running:
+ <leave blank>
+
+ Topic:
+ <leave blank>
+
+Associating an existing file type with XEmacs.
+..............................................
+
+In Explorer select `View->Options->File Types'. Click on the file type
+in the list and press `[Edit...]'. If the file type already has an
+`Open' action, double click on it and fill in the `Action' dialog box
+as described above; otherwise create a new action.
+
+ If the file type has more than one action listed, you probably want
+to make the `Open' action that you just edited the default by clicking
+on it and pressing `Set Default'.
+
+ Note for Windows 2000 users: Under Windows 2000, get to `File Types'
+using `Control Panel->Folder Options->File Types'.
+
+5.2: Printing
+=============
+
+\1f
+File: xemacs-faq.info, Node: Q5.2.1, Next: Q5.2.2, Prev: Q5.1.2, Up: External Subsystems
+
+Q5.2.1: What do I need to change to make printing work?
+-------------------------------------------------------
+
+For regular printing there are two variables that can be customized.
+
+`lpr-command'
+ This should be set to a command that takes standard input and sends
+ it to a printer. Something like:
+
+ (setq lpr-command "lp")
+
+`lpr-switches'
+ This should be set to a list that contains whatever the print
+ command requires to do its job. Something like:
+
+ (setq lpr-switches '("-depson"))
+
+ For postscript printing there are three analogous variables to
+customize.
+
+`ps-lpr-command'
+ This should be set to a command that takes postscript on standard
+ input and directs it to a postscript printer.
+
+`ps-lpr-switches'
+ This should be set to a list of switches required for
+ `ps-lpr-command' to do its job.
+
+`ps-print-color-p'
+ This boolean variable should be set `t' if printing will be done in
+ color, otherwise it should be set to `nil'.
+
+ NOTE: It is an undocumented limitation in XEmacs that postscript
+printing (the `Pretty Print Buffer' menu item) *requires* a window
+system environment. It cannot be used outside of X11.
+
+\1f
+File: xemacs-faq.info, Node: Q5.2.2, Next: Q5.2.3, Prev: Q5.2.1, Up: External Subsystems
+
+Q5.2.2: How can I print WYSIWYG a font-locked buffer?
+-----------------------------------------------------
+
+Font-lock looks nice. How can I print (WYSIWYG) the highlighted
+document?
+
+ The package `ps-print', which is now included with XEmacs, provides
+the ability to do this. The source code contains complete instructions
+on its use, in
+`$prefix/lib/xemacs/xemacs-packages/lisp/ps-print/ps-print.el', being
+the default location of an installed ps-print package.
+
+\1f
+File: xemacs-faq.info, Node: Q5.2.3, Next: Q5.2.4, Prev: Q5.2.2, Up: External Subsystems
+
+Q5.2.3: Getting `M-x lpr' to work with postscript printer.
+----------------------------------------------------------
+
+My printer is a Postscript printer and `lpr' only works for Postscript
+files, so how do I get `M-x lpr-region' and `M-x lpr-buffer' to work?
+
+ Put something like this in your `init.el':
+
+ (setq lpr-command "a2ps")
+ (setq lpr-switches '("-p" "-1"))
+
+ If you don't use a2ps to convert ASCII to postscript (why not, it's
+free?), replace with the command you do use. Note also that some
+versions of a2ps require a `-Pprinter' to ensure spooling.
+
+\1f
+File: xemacs-faq.info, Node: Q5.2.4, Next: Q5.3.1, Prev: Q5.2.3, Up: External Subsystems
+
+Q5.2.4: Can you print under MS Windows?
+---------------------------------------
+
+As of 21.4, printing works on Windows, using simply `File->Print
+BUFFER...', and can be configured with `File->Page Setup...'.
+
+ Prior to 21.4, there is no built-in support, but there are some
+clever hacks out there. If you know how, please let us know and we'll
+put it here.
+
+5.3: Sound
+==========
+
+\1f
+File: xemacs-faq.info, Node: Q5.3.1, Next: Q5.3.2, Prev: Q5.2.4, Up: External Subsystems
+
+Q5.3.1: How do I turn off the sound?
+------------------------------------
+
+Add the following line to your `init.el':
+
+ (setq bell-volume 0)
+ (setq sound-alist nil)
+
+ That will make your XEmacs totally silent--even the default ding
+sound (TTY beep on TTY-s) will be gone.
+
+ You can also change these with Customize. Select from the `Options'
+menu `Advanced (Customize)->Emacs->Environment->Sound->Sound...' or
+type `M-x customize <RET> sound <RET>'.
+
+\1f
+File: xemacs-faq.info, Node: Q5.3.2, Next: Q5.3.3, Prev: Q5.3.1, Up: External Subsystems
+
+Q5.3.2: How do I get funky sounds instead of a boring beep?
+-----------------------------------------------------------
+
+Make sure your XEmacs was compiled with sound support, and then put this
+in your `init.el':
+
+ (load-default-sounds)
+
+\1f
+File: xemacs-faq.info, Node: Q5.3.3, Next: Q5.3.4, Prev: Q5.3.2, Up: External Subsystems
+
+Q5.3.3: What are NAS and ESD (EsounD)?
+--------------------------------------
+
+"Network Audio System" (NAS) is a client-server sound library for X.
+
+ `http://radscan.com/nas.html'.
+
+ To build XEmacs with it, use the `configure' flag `--with-sound=nas'
+(`--enable-sound=nas' in 21.5 or later).
+
+ "Enlightened Sound Daemon" (ESD or EsounD) is yet another sound
+system.
+
+ `http://www.tux.org/~ricdude/EsounD.html'.
+
+ To build XEmacs with it, use the `configure' flag `--with-sound=esd'
+(`--enable-sound=esd' in 21.5 or later).
+
+ You can specify support for both with a flag like
+`--with-sound=nas,esd' (`--enable-sound=nas,esd' in 21.5 or later).
+
+\1f
+File: xemacs-faq.info, Node: Q5.3.4, Next: Q5.4.1, Prev: Q5.3.3, Up: External Subsystems
+
+Q5.3.4: Sunsite sounds don't play.
+----------------------------------
+
+I'm having some trouble with sounds I've downloaded from sunsite. They
+play when I run them through `showaudio' or cat them directly to
+`/dev/audio', but XEmacs refuses to play them.
+
+ Markus Gutschke <gutschk@uni-muenster.de> writes:
+
+ [Many of] These files have an (erroneous) 24byte header that tells
+ about the format that they have been recorded in. If you cat them
+ to `/dev/audio', the header will be ignored and the default
+ behavior for /dev/audio will be used. This happens to be 8kHz
+ uLaw. It is probably possible to fix the header by piping through
+ `sox' and passing explicit parameters for specifying the sampling
+ format; you then need to perform a 'null' conversion from SunAudio
+ to SunAudio.
+
+5.4: Running an Interior Shell, Invoking Subprocesses
+=====================================================
+
+\1f
+File: xemacs-faq.info, Node: Q5.4.1, Next: Q5.4.2, Prev: Q5.3.4, Up: External Subsystems
+
+Q5.4.1: What is an interior shell?
+----------------------------------
+
+#### Write me.
+
+\1f
+File: xemacs-faq.info, Node: Q5.4.2, Next: Q5.4.3, Prev: Q5.4.1, Up: External Subsystems
+
+Q5.4.2: How do I start up a second shell buffer?
+------------------------------------------------
+
+In the `*shell*' buffer:
+
+ M-x rename-buffer <RET> *shell-1* <RET>
+ M-x shell RET
+
+ This will then start a second shell. The key is that no buffer named
+`*shell*' can exist. It might be preferable to use `M-x
+rename-uniquely' to rename the `*shell*' buffer instead of `M-x
+rename-buffer'.
+
+ Alternately, you can set the variable `shell-multiple-shells'. If
+the value of this variable is non-nil, each time shell mode is invoked,
+a new shell is made
+
+\1f
+File: xemacs-faq.info, Node: Q5.4.3, Next: Q5.4.4, Prev: Q5.4.2, Up: External Subsystems
+
+Q5.4.3: Telnet from shell filters too much
+------------------------------------------
+
+I'm using the Emacs `M-x shell' function, and I would like to invoke
+and use a telnet session within it. Everything works fine except that
+now all `^M''s are filtered out by Emacs. Fixes?
+
+ Use `M-x rsh' or `M-x telnet' to open remote sessions rather than
+doing rsh or telnet within the local shell buffer. You can also use
+`M-x ssh' to open secure remote session if you have `ssh' installed.
+
+\1f
+File: xemacs-faq.info, Node: Q5.4.4, Next: Q5.4.5, Prev: Q5.4.3, Up: External Subsystems
+
+Q5.4.4: Strange things are happening in Shell Mode.
+---------------------------------------------------
+
+Sometimes (i.e. it's not repeatable, and I can't work out why it
+happens) when I'm typing into shell mode, I hit return and only a
+portion of the command is given to the shell, and a blank prompt is
+returned. If I hit return again, the rest of the previous command is
+given to the shell.
+
+ Martin Buchholz <martin@xemacs.org> writes:
+
+ There is a known problem with interaction between `csh' and the
+ `filec' option and XEmacs. You should add the following to your
+ `.cshrc':
+
+ if ( "$TERM" == emacs || "$TERM" == unknown ) unset filec
+
+\1f
+File: xemacs-faq.info, Node: Q5.4.5, Next: Q5.4.6, Prev: Q5.4.4, Up: External Subsystems
+
+Q5.4.5: XEmacs complains "No such file or directory, diff"
+----------------------------------------------------------
+
+or "ispell" or other commands that seem related to whatever you just
+tried to do (M-x ediff or M-$, for example).
+
+ There are a large number of common (in the sense that "everyone has
+these, they really do") Unix utilities that are not provided with
+XEmacs. The GNU Project's implementations are available for Windows in
+the the Cygwin distribution (`http://www.cygwin.com/'), which also
+provides a complete Unix emulation environment (and thus makes ports of
+Unix utilities nearly trivial). Another implementation is that from
+MinGW (`http://www.mingw.org/msys.shtml'). If you know of others,
+please let us know!
+
+\1f
+File: xemacs-faq.info, Node: Q5.4.6, Next: Q5.5.1, Prev: Q5.4.5, Up: External Subsystems
+
+Q5.4.6: Cygwin error "fork_copy: linked dll/bss pass 0 failed"
+--------------------------------------------------------------
+
+If you are getting an error like
+
+ 17797832 [main] bash 3468 fork_copy: linked dll/bss pass 0 failed,
+ 0x675000..0x6756A0, done 0, windows pid 2708, Win 32 error 487
+ bash: fork: resource temporarily unavailable
+
+ when trying to run bash using `M-x shell', then you need to rebase
+your Cygwin DLL's. This is a known problem with Cygwin. To fix:
+
+ 1. Download the `rebase' utility from Cygwin setup (it's under
+ `System').
+
+ 2. Kill *all* of your Cygwin processes, including all of your shells
+ and all background processes. Use `ps -a' to list all the
+ processes you need to kill.
+
+ 3. From a DOS prompt, run `ash' (*not* `bash', `tcsh' or `zsh'). Do
+ not try to be clever and `exec /bin/ash' from your last shell; it
+ won't work.
+
+ 4. Type `/bin/rebaseall -v'.
+
+ The problem should now be fixed - at least, until you install another
+Cygwin package with DLL's, in which case you may have to repeat the
+procedure.
+
+5.5: Multiple Device Support
+============================
+
+\1f
+File: xemacs-faq.info, Node: Q5.5.1, Next: Q5.5.2, Prev: Q5.4.6, Up: External Subsystems
+
+Q5.5.1: How do I open a frame on another screen of my multi-headed display?
+---------------------------------------------------------------------------
+
+Use the command `M-x make-frame-on-display'. This command is also on
+the File menu in the menubar.
+
+ The command `make-frame-on-tty' also exists, which will establish a
+connection to any tty-like device. Opening the TTY devices should be
+left to `gnuclient', though.
+
+\1f
+File: xemacs-faq.info, Node: Q5.5.2, Next: Q5.5.3, Prev: Q5.5.1, Up: External Subsystems
+
+Q5.5.2: Can I really connect to a running XEmacs after calling up over a modem? How?
+-------------------------------------------------------------------------------------
+
+Yes. Use `gnuclient -nw'.
+
+ Also see *Note How do I disable gnuserv from opening a new frame?:
+Q5.5.3.
+
+\1f
+File: xemacs-faq.info, Node: Q5.5.3, Next: Q5.5.4, Prev: Q5.5.2, Up: External Subsystems
+
+Q5.5.3: How do I disable gnuserv from opening a new frame?
+----------------------------------------------------------
+
+If you set the `gnuserv-frame' variable to the frame that should be
+used to display buffers that are pulled up, a new frame will not be
+created. For example, you could put
+
+ (setq gnuserv-frame (selected-frame))
+
+ early on in your `init.el', to ensure that the first frame created
+is the one used for your gnuserv buffers.
+
+ There is an option to set the gnuserv target to the current frame.
+See `Options->Display->"Other Window" Location->Make Current Frame
+Gnuserv Target'
+
+ You can also change this with Customize. Select from the `Options'
+menu `Advanced (Customize)->Emacs->Environment->Gnuserv->Gnuserv
+Frame...' or type `M-x customize <RET> gnuserv <RET>'.
+
+\1f
+File: xemacs-faq.info, Node: Q5.5.4, Next: Q5.5.5, Prev: Q5.5.3, Up: External Subsystems
+
+Q5.5.4: How do I start gnuserv so that each subsequent XEmacs is a client?
+--------------------------------------------------------------------------
+
+Put the following in your `init.el' file to start the server:
+
+ (gnuserv-start)
+
+ Start your first XEmacs as usual. After that, you can do:
+
+ gnuclient randomfilename
+
+ from the command line to get your existing XEmacs process to open a
+new frame and visit randomfilename in that window. When you're done
+editing randomfilename, hit `C-x #' to kill the buffer and get rid of
+the frame.
+
+ See also man page of gnuclient.
+
+\1f
+File: xemacs-faq.info, Node: Q5.5.5, Prev: Q5.5.4, Up: External Subsystems
+
+Q5.5.5: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient?
+--------------------------------------------------------------------------------------------------------
+
+Jan Vroonhof <vroonhof@math.ethz.ch> writes:
+
+ Here is one of the solutions, we have this in a script called
+ `etc/editclient.sh'.
+ #!/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
+
+ Note that there is a known problem when running XEmacs and
+ 'gnuclient -nw' on the same TTY.
+
+\1f
+File: xemacs-faq.info, Node: Internet, Next: Advanced, Prev: External Subsystems, Up: Top
+
+6 Connecting to the Internet
+****************************
+
+This is part 6 of the XEmacs Frequently Asked Questions list. This
+section is devoted connecting to the Internet.
+
+* Menu:
+
+6.0: General Mail and News
+* Q6.0.1:: What are the various packages for reading mail?
+* Q6.0.2:: How can I send mail?
+* Q6.0.3:: How do I get my outgoing mail archived?
+* Q6.0.4:: How can I read and/or compose MIME messages?
+* Q6.0.5:: How do I customize the From line?
+* Q6.0.6:: How do I get my MUA to filter mail for me?
+* Q6.0.7:: Remote mail reading with an MUA.
+* Q6.0.8:: An MUA gets an error incorporating new mail.
+* Q6.0.9:: Why isn't `movemail' working?
+* Q6.0.10:: How do I make my MUA display graphical smilies?
+* Q6.0.11:: How can I get those oh-so-neat X-Face lines?
+
+6.1: Reading Mail with VM
+* Q6.1.1:: How do I set up VM to retrieve mail from a remote site using POP?
+* Q6.1.2:: How can I get VM to automatically check for new mail?
+* Q6.1.3:: I have various addresses at which I receive mail. How can I tell VM to ignore them when doing a "reply-all"?
+* Q6.1.4:: Is there a mailing list or FAQ for VM?
+* Q6.1.5:: How do I make VM stay in a single frame?
+* Q6.1.6:: Customization of VM not covered in the manual, or here.
+
+6.2: Reading Netnews and Mail with Gnus
+* Q6.2.1:: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh!
+* Q6.2.2:: How do I make Gnus stay within a single frame?
+
+6.3: FTP Access
+* Q6.3.1:: Can I edit files on other hosts?
+* Q6.3.2:: What is EFS?
+
+6.4: Web Browsing with W3
+* Q6.4.1:: What is W3?
+* Q6.4.2:: How do I run W3 from behind a firewall?
+* Q6.4.3:: Is it true that W3 supports style sheets and tables?
+
+6.0: General Mail and News
+==========================
+
+\1f
+File: xemacs-faq.info, Node: Q6.0.1, Next: Q6.0.2, Prev: Internet, Up: Internet
+
+Q6.0.1: What are the various packages for reading mail?
+-------------------------------------------------------
+
+#### Write me.
+
+\1f
+File: xemacs-faq.info, Node: Q6.0.2, Next: Q6.0.3, Prev: Q6.0.1, Up: Internet
+
+Q6.0.2: How can I send mail?
+----------------------------
+
+Under Unix and Mac OS X, the `sendmail' package is normally used for
+this. #### Write me.
+
+ Under Windows, you need to use `smtpmail', which communicates
+directly with the mail server, as there is no `sendmail' program
+running. To get it working, use code like the following in your
+`init.el' file:
+
+ ;; Get mail working under Windows.
+ (setq message-send-mail-function 'smtpmail-send-it) ; for message/Gnus
+ (setq send-mail-function 'smtpmail-send-it) ; for C-x m, etc.
+ ;; the following ensures that mail problems can be debugged: it logs a trace
+ ;; of the SMTP conversation to *trace of SMTP session to <somewhere>*.
+ (setq smtpmail-debug-info t)
+ ;; Substitute your info here.
+ ;(setq user-mail-address "ben@xemacs.org")
+ ;(setq user-full-name "Ben Wing")
+ ;(setq smtpmail-default-smtp-server "smtp.myserver.myisp.com")
+ ;; The following two aren't completely necessary but may help.
+ ;(setq smtpmail-local-domain "666.com")
+ ;(setq smtpmail-sendto-domain "666.com")
+ ;; If your SMTP server requires a username/password to authenticate, as
+ ;; many do nowadays, set them like this:
+ ;(setq smtpmail-auth-credentials ; or use ~/.authinfo
+ ; '(("smtp.myserver.myisp.com" 25 "USER@SOMEWHERE" "PASSWORD")))
+
+ ;; Other possibilities for getting smtpmail to work:
+ ;;
+ ;; If for some reason you need to authenticate using the STARTTLS protocol
+ ;; (don't look into this unless you know what it is), use
+ ;; (setq smtpmail-starttls-credentials
+ ;; '(("YOUR SMTP HOST" 25 "~/.my_smtp_tls.key" "~/.my_smtp_tls.cert")))
+ ;; Requires external program
+ ;; ftp://ftp.opaopa.org/pub/elisp/starttls-*.tar.gz.
+ ;; See http://www.ietf.org/rfc/rfc2246.txt,
+ ;; http://www.ietf.org/rfc/rfc2487.txt
+
+ The lines you need to care about are those that set
+`user-mail-address', `user-full-name', `smtpmail-default-smtp-server',
+and `smtpmail-auth-credentials'. You need to set these with,
+respectively, your email address, your full name, the SMTP server you
+use for outgoing mail, and the username and password you need to log in
+to your SMTP server. (If for some reason your SMTP server doesn't
+require logging in to send mail, don't uncomment this last line.)
+
+ The other settings may be useful in specific cases, but you should
+know what you're doing before enabling them.
+
+\1f
+File: xemacs-faq.info, Node: Q6.0.3, Next: Q6.0.4, Prev: Q6.0.2, Up: Internet
+
+Q6.0.3: How do I get my outgoing mail archived?
+-----------------------------------------------
+
+ (setq mail-archive-file-name "~/outbox")
+
+\1f
+File: xemacs-faq.info, Node: Q6.0.4, Next: Q6.0.5, Prev: Q6.0.3, Up: Internet
+
+Q6.0.4: How can I read and/or compose MIME messages?
+----------------------------------------------------
+
+VM, MH-E and GNUS support MIME natively. Other MUAs may or may not
+have MIME support; refer to their documentation and other resources,
+such as web pages and mailing lists. Packages like SEMI/WEMI may be
+useful in connection with MUAs like mew and Wanderlust.
+
+\1f
+File: xemacs-faq.info, Node: Q6.0.5, Next: Q6.0.6, Prev: Q6.0.4, Up: Internet
+
+Q6.0.5: How do I customize the From line?
+-----------------------------------------
+
+How do I change the `From:' line? I have set gnus-user-from-line to
+ Gail Gurman <gail.gurman@sybase.com>
+ , but XEmacs Gnus doesn't use it. [This should apply to all MUA's.
+-ed] Instead it uses
+ Gail Mara Gurman <gailg@deall>
+ and then complains that it's incorrect. Also, as you perhaps can
+see, my Message-ID is screwy. How can I change that?
+
+ Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes:
+
+ Set `user-mail-address' to `gail.gurman@sybase.com' or
+ `mail-host-address' to `sybase.com'.
+
+\1f
+File: xemacs-faq.info, Node: Q6.0.6, Next: Q6.0.7, Prev: Q6.0.5, Up: Internet
+
+Q6.0.6: How do I get my MUA to filter mail for me?
+--------------------------------------------------
+
+One possibility is to use procmail to split your mail before it gets to
+the MUA. I prefer this personally, since there are many strange and
+wonderful things one can do with procmail. Procmail may be found at
+`http://www.procmail.org/'.
+
+ Also see the Mail Filtering FAQ at:
+`http://www.faqs.org/faqs/mail/filtering-faq/'.
+
+\1f
+File: xemacs-faq.info, Node: Q6.0.7, Next: Q6.0.8, Prev: Q6.0.6, Up: Internet
+
+Q6.0.7: Remote mail reading with an MUA.
+----------------------------------------
+
+My mailbox lives at the office on a big honkin server. My regular INBOX
+lives on my honkin desktop machine. I now can PPP to the office from
+home which is far from honking... I'd like to be able to read mail at
+home without storing it here and I'd like to use xemacs and the MUA at
+home... Is there a recommended setup?
+
+ Joseph J. Nuspl Jr. <nuspl@nvwls.cc.purdue.edu> writes:
+
+ There are several ways to do this.
+
+ 1. Set your display to your home machine and run dxpc or one of
+ the other X compressors.
+
+ 2. NFS mount your desktop machine on your home machine and
+ modify your pop command on your home machine to rsh to your
+ desktop machine and actually do the pop get's.
+
+ 3. Run a POP server on your desktop machine as well and do a
+ sort of two tiered POP get.
+
+ William Perry <wmperry@monolith.spry.com> adds:
+
+ Or you could run a pop script periodically on your desktop
+ machine, and just use ange-ftp or NFS to get to your mailbox. I
+ used to do this all the time back at IU.
+
+\1f
+File: xemacs-faq.info, Node: Q6.0.8, Next: Q6.0.9, Prev: Q6.0.7, Up: Internet
+
+Q6.0.8: An MUA gets an error incorporating new mail.
+----------------------------------------------------
+
+rmail and VM, and probably other MUA's as well, get new mail from your
+mailbox (called `/var/mail/$USER' or `/var/spool/mail/$USER' or
+something similar) using a program called `movemail'. This program
+interlocks with `/bin/mail' using the protocol defined by `/bin/mail'.
+
+ There are various different protocols in general use, which you need
+to specify using the `--mail-locking' option (`--with-mail-locking' in
+21.5 or later) to `configure':
+
+`lockf'
+ POSIX file locking with `lockf()'
+
+`flock'
+ BSD file locking with `flock()'
+
+`dot'
+ To manipulate mail file `foo', first create file `foo.lock'
+
+`locking'
+ Use `locking()', Microsoft's renamed `flock()'
+
+`mmdf'
+ Use `lk_open()' and `lk_close()' as defined by the Multi-channel
+ Memo Distribution Facility
+
+`pop'
+ Retrieve mail using POP (the Post Office Protocol). This is the
+ default for Cygwin/MinGW.
+
+ *IF YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR
+SYSTEM, YOU CAN LOSE MAIL!*
+
+ Usually the value is correctly determined automatically: `configure'
+tries to detect the method in use, and defaults exist on systems for
+which this doesn't work.
+
+ However, if you run into problems incorporating new mail, it may be
+because an incorrect method is being used.
+
+ If your system uses the lock file protocol, and permissions are set
+so that ordinary users cannot write lock files in the mail spool
+directory, you may need to make `movemail' setgid to a suitable group
+such as `mail'. You can use these commands (as root):
+
+ chgrp mail movemail
+ chmod 2755 movemail
+
+ If you are using the `pop' locking method, `movemail' must be setuid
+root.
+
+ 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/xemacs-VERSION/TARGET' (for example,
+`/usr/local/lib/xemacs-21.4.15/i686-pc-cygwin'). You must change the
+group and mode of the installed copy; changing the group and mode of
+the build directory copy is ineffective.
+
+\1f
+File: xemacs-faq.info, Node: Q6.0.9, Next: Q6.0.10, Prev: Q6.0.8, Up: Internet
+
+Q6.0.9: Why isn't `movemail' working?
+-------------------------------------
+
+*Note Q6.0.8::.
+
+ Note also that older versions of Mozilla came with a `movemail'
+program that is *not* compatible with XEmacs. Do not use it. Always
+use the `movemail' installed with your XEmacs. Failure to do so can
+result in lost mail.
+
+\1f
+File: xemacs-faq.info, Node: Q6.0.10, Next: Q6.0.11, Prev: Q6.0.9, Up: Internet
+
+Q6.0.10: How do I make my MUA display graphical smilies?
+--------------------------------------------------------
+
+For mh-e use the following:
+
+ (add-hook 'mh-show-mode-hook '(lambda ()
+ (smiley-region (point-min)
+ (point-max))))
+
+ WJCarpenter <bill@carpenter.ORG> writes: For VM use the following:
+ (autoload 'smiley-region "smiley" nil t)
+ (add-hook 'vm-select-message-hook
+ '(lambda ()
+ (smiley-region (point-min)
+ (point-max))))
+
+ For tm use the following:
+ (autoload 'smiley-buffer "smiley" nil t)
+ (add-hook 'mime-viewer/plain-text-preview-hook 'smiley-buffer)
+
+\1f
+File: xemacs-faq.info, Node: Q6.0.11, Next: Q6.1.1, Prev: Q6.0.10, Up: Internet
+
+Q6.0.11: How can I get those oh-so-neat X-Face lines?
+-----------------------------------------------------
+
+Firstly there is an ftp site which describes X-faces and has the
+associated tools mentioned below, at
+`http://ftp.cs.indiana.edu/pub/faces/'.
+
+ Then the steps are
+
+ 1. Create 48x48x1 bitmap with your favorite tool
+
+ 2. Convert to "icon" format using one of xbm2ikon, pbmtoicon, etc.,
+ and then compile the face.
+
+ 3. cat file.xbm | xbm2ikon |compface > file.face
+
+ 4. Then be sure to quote things that are necessary for emacs strings:
+
+ cat ./file.face | sed 's/\\/\\\\/g'
+ | sed 's/\"/\\\"/g' > ./file.face.quoted
+
+ 5. Then set up emacs to include the file as a mail header - there
+ were a couple of suggestions here--either something like: