3.10: Text Selections
=====================

Q3.10.1: 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 `.emacs' file:

     (setq zmacs-regions nil)

   Starting with XEmacs-20.2 you can also change this with Customize.
Select from the `Options' menu `Customize->Emacs->Editing->Basics->Zmacs
Regions' or type `M-x customize <RET> editing-basics <RET>'.

   To change the face for selection, look at `Options->Customize' on
the menubar.

Q3.10.2: How do I get that typing on an active region removes 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, add the following line to your `.emacs':

     (turn-on-pending-delete)

   Note that this will work with both Backspace and Delete.

Q3.10.3: 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 `.emacs':

     (setq isearch-highlight nil)

   Starting with XEmacs-20.2 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.

Q3.10.4: How do I turn off highlighting after `C-x C-p' (mark-page)?
--------------------------------------------------------------------

   Put this in your `.emacs':

     (setq zmacs-regions nil)

   *Warning: This command turns off all region highlighting.*

   Also Q3.10.1.

Q3.10.5: The region disappears when I hit the end of buffer while scrolling.
----------------------------------------------------------------------------

   This has been fixed by default starting with XEmacs-20.3.

   With older versions you can turn this feature (if it indeed is a
feature) off like this:

     (defadvice scroll-up (around scroll-up freeze)
       (interactive "_P")
       (let ((zmacs-region-stays t))
         (if (interactive-p)
     	(condition-case nil
     	    ad-do-it
     	  (end-of-buffer (goto-char (point-max))))
           ad-do-it)))

     (defadvice scroll-down (around scroll-down freeze)
       (interactive "_P")
       (let ((zmacs-region-stays t))
         (if (interactive-p)
     	(condition-case nil
     	    ad-do-it
     	  (beginning-of-buffer (goto-char (point-min))))
           ad-do-it)))

   Thanks to T. V. Raman <raman@adobe.com> for assistance in deriving
this answer.

4 Major Subsystems
******************

   This is part 4 of the XEmacs Frequently Asked Questions list.  This
section is devoted to major XEmacs subsystems.

Reading Mail with VM:

Web browsing with W3:

Reading Netnews and Mail with Gnus:

Other Mail & News:

Sparcworks, EOS, and WorkShop:

Energize:

Infodock:

Other Unbundled Packages:

4.0: Reading Mail with VM
=========================

Q4.0.1: How do I set up VM to retrieve mail from a remote site using POP?
-------------------------------------------------------------------------

   Use `vm-spool-files', like this for example:

     (setq vm-spool-files '("/var/spool/mail/wing"
                            "netcom23.netcom.com:110:pass:wing:MYPASS"))

   Of course substitute your actual password for MYPASS.

Q4.0.2: How do I get VM to filter mail for me?
----------------------------------------------

   One possibility is to use procmail to split your mail before it gets
to VM.  I prefer this personally, since there are many strange and
wonderful things one can do with procmail.  Procmail may be found at
`ftp://ftp.informatik.rwth-aachen.de/pub/packages/procmail/'.

   Also see the Mail Filtering FAQ at:
`ftp://rtfm.mit.edu/pub/usenet/news.answers/mail/filtering-faq'.

Q4.0.3: How can I get VM to automatically check for new mail?
-------------------------------------------------------------

   John Turner <turner@lanl.gov> writes:

     Use the following:

          (setq vm-auto-get-new-mail 60)

Q4.0.4: [This question intentionally left blank]
------------------------------------------------

   Obsolete question, left blank to avoid renumbering.

Q4.0.5: How do I get my outgoing mail archived?
-----------------------------------------------

     (setq mail-archive-file-name "~/outbox")

Q4.0.6: I have various addresses at which I receive mail.  How can I tell VM to ignore them when doing a "reply-all"?
---------------------------------------------------------------------------------------------------------------------

   Set `vm-reply-ignored-addresses' to a list, like

     (setq vm-reply-ignored-addresses
           '("wing@nuspl@nvwls.cc.purdue.edu,netcom[0-9]*.netcom.com"
     	"wing@netcom.com" "wing@xemacs.org"))

   Note that each string is a regular expression.

Q4.0.7: Is there a mailing list or FAQ for VM?
----------------------------------------------

   A FAQ for VM exists at `http://www.cyberpass.net/~gorkab/vmfaq.htm'.

   VM has its own newsgroups gnu.emacs.vm.info and gnu.emacs.vm.bug.

Q4.0.8: Remote mail reading with VM.
------------------------------------

   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 VM
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.

Q4.0.9: rmail or VM gets an error incorporating new mail.
---------------------------------------------------------

   Quoting the XEmacs PROBLEMS file:

     rmail and VM get new mail from `/usr/spool/mail/$USER' using a
     program called `movemail'.  This program interlocks with
     `/bin/mail' using the protocol defined by `/bin/mail'.

     There are two different protocols in general use.  One of them
     uses the `flock' system call.  The other involves creating a lock
     file; `movemail' must be able to write in `/usr/spool/mail' in
     order to do this.  You control which one is used by defining, or
     not defining, the macro `MAIL_USE_FLOCK' in `config.h' or the m-
     or s- file it includes.

     *IF YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR
     SYSTEM, YOU CAN LOSE MAIL!*

     If your system uses the lock file protocol, and fascist
     restrictions prevent ordinary users from writing the lock files in
     `/usr/spool/mail', you may need to make `movemail' setgid to a
     suitable group such as `mail'.  You can use these commands (as
     root):

          chgrp mail movemail
          chmod 2755 movemail

     If your system uses the lock file protocol, and fascist
     restrictions prevent ordinary users from writing the lock files in
     `/usr/spool/mail', you may need to make `movemail' setgid to a
     suitable group such as `mail'.  To do this, use the following
     commands (as root) after doing the make install.

          chgrp mail movemail
          chmod 2755 movemail

     Installation normally copies movemail from the build directory to
     an installation directory which is usually under `/usr/local/lib'.
     The installed copy of `movemail' is usually in the directory
     `/usr/local/lib/emacs/VERSION/TARGET'.  You must change the group
     and mode of the installed copy; changing the group and mode of the
     build directory copy is ineffective.

Q4.0.10: How do I make VM stay in a single frame?
-------------------------------------------------

   John.John S Cooper <Cooper@Eng.Sun.COM> writes:

          					; Don't use multiple frames
          (setq vm-frame-per-composition nil)
          (setq vm-frame-per-folder nil)
          (setq vm-frame-per-edit nil)
          (setq vm-frame-per-summary nil)

Q4.0.11: How do I make VM or mh-e 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)

Q4.0.12: Customization of VM not covered in the manual, or here.
----------------------------------------------------------------

   giacomo boffi <boffi@hp735.stru.polimi.it> writes:

     The meta-answer is to look into the file `vm-vars.el', in the vm
     directory of the lisp library.

     `vm-vars.el' contains, initializes and carefully describes, with
     examples of usage, the plethora of user options that _fully_
     control VM's behavior.

     Enter vm-vars, `forward-search' for toolbar, find the variables
     that control the toolbar placement, appearance, existence, copy to
     your `.emacs' or `.vm' and modify according to the detailed
     instructions.

     The above also applies to all the various features of VM: search
     for some keywords, maybe the first you conjure isn't appropriate,
     find the appropriate variables, copy and experiment.

4.1: Web browsing with W3
=========================

Q4.1.1: What is W3?
-------------------

   W3 is an advanced graphical browser written in Emacs lisp that runs
on XEmacs.  It has full support for cascaded style sheets, and more...

   It has a home web page at
`http://www.cs.indiana.edu/elisp/w3/docs.html'.

Q4.1.2: How do I run W3 from behind a firewall?
-----------------------------------------------

   There is a long, well-written, detailed section in the W3 manual that
describes how to do this.  Look in the section entitled "Firewalls".

Q4.1.3: Is it true that W3 supports style sheets and tables?
------------------------------------------------------------

   Yes, and much more.  W3, as distributed with the latest XEmacs is a
full-featured web browser.

4.2: Reading Netnews and Mail with Gnus
=======================================

Q4.2.1: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh!
--------------------------------------------------------------------------------

   The Gnus numbering issues are not meant for mere mortals to know
them.  If you feel you _must_ enter the muddy waters of Gnus, visit the
excellent FAQ, maintained by Justin Sheehy, at:

     `http://www.ccs.neu.edu/software/contrib/gnus/'

   See also Gnus home page
     `http://www.gnus.org/'

Q4.2.2: This question intentionally left blank.
-----------------------------------------------

   Obsolete question, left blank to avoid renumbering.

Q4.2.3: How do I make Gnus stay within a single frame?
------------------------------------------------------

   The toolbar code to start Gnus opens the new frame--and it's a
feature rather than a bug.  If you don't like it, but would still like
to click on the seemly icon, use the following code:

     (defun toolbar-news ()
       (gnus))

   It will redefine the callback function of the icon to just call
`gnus', without all the fancy frame stuff.

Q4.2.4: 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. 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'.

4.3: Other Mail & News
======================

Q4.3.1: How can I read and/or compose MIME messages?
----------------------------------------------------

   VM supports MIME natively.

   You probably want to use the Tools for MIME (tm).  See Q4.3.2,
for details.

   Trey Jackson <trey@cs.berkeley.edu> has an Emacs & MIME web page at
`http://bmrc.berkeley.edu/~trey/emacs/mime.html'.

   Another possibility is RMIME.  You may find RMIME at
`http://www.cinti.net/~rmoody/rmime/index.html'.

Q4.3.2: What is TM and where do I get it?
-----------------------------------------

   TM stands for "Tools for MIME" and not Tiny MIME.  TM integrates
with all major XEmacs packages like Gnus (all flavors), VM, MH-E, and
mailcrypt.  It provides totally transparent and trouble-free MIME
support.  When appropriate a message will be decoded in place in an
XEmacs buffer.

   TM now comes as a package with XEmacs 19.16 and XEmacs 20.2.

   TM was written by MORIOKA Tomohiko <morioka@jaist.ac.jp> and
KOBAYASHI Shuhei <shuhei-k@jaist.ac.jp>.

   It is based on the work of UMEDA Masanobu
<umerin@mse.kyutech.ac.jp>, the original writer of GNUS.

   The following information is from the `README':

   "tm" is a MIME package for GNU Emacs.  tm has following functions:

   * MIME style multilingual header.

   * MIME message viewer (mime/viewer-mode).

   * MIME message composer (mime/editor-mode).

   * MIME extenders for mh-e, GNUS, RMAIL and VM.

   tm is available from following anonymous ftp sites:
   * `ftp://ftp.unicamp.br/pub/mail/mime/tm/' (Brasil).

   * `ftp://ftp.th-darmstadt.de/pub/editors/GNU-Emacs/lisp/mime/'
     (Germany).

   * `ftp://ftp.tnt.uni-hannover.de/pub/editors/xemacs/contrib/'
     (Germany).

   Don't let the installation procedure & instructions stop you from
trying this package out--it's much simpler than it looks, and once
installed, trivial to use.

Q4.3.3: Why isn't this `movemail' program working?
--------------------------------------------------

   Ben Wing <ben@xemacs.org> writes:

     It wasn't chown'ed/chmod'd correctly.

Q4.3.4: Movemail is also distributed by Netscape?  Can that cause problems?
---------------------------------------------------------------------------

   Steve Baur <steve@xemacs.org> writes:

     Yes.  Always use the movemail installed with your XEmacs.  Failure
     to do so can result in lost mail.

   Please refer to Jamie Zawinski's <jwz@jwz.org> notes at
`http://home.netscape.com/eng/mozilla/2.0/relnotes/demo/movemail.html'.
In particular, this document will show you how to make Netscape use the
version of movemail configured for your system by the person who built
XEmacs.

Q4.3.5: Where do I find pstogif (required by tm)?
-------------------------------------------------

   pstogif is part of the latex2html package.

   Jan Vroonhof <vroonhof@math.ethz.ch> writes:

   latex2html is best found at the CTAN hosts and their mirrors in
`tex-archive/support/latex2html'.

   CTAN hosts are:

   * `ftp://ftp.tex.ac.uk/tex-archive/support/latex2html/'.

   * `ftp://ftp.dante.de/tex-archive/support/latex2html/'.

   There is a good mirror at ftp.cdrom.com;
`ftp://ftp.cdrom.com/pub/tex/ctan/support/latex2html/'.

4.4: Sparcworks, EOS, and WorkShop
==================================

Q4.4.1: What is SPARCworks, EOS, and WorkShop?
----------------------------------------------

   John Turner <turner@lanl.gov> writes:

     SPARCworks is SunSoft's development environment, comprising
     compilers (C, C++, FORTRAN 77, Fortran 90, Ada, and Pascal), a
     debugger, and other tools such as TeamWare (for configuration
     management), MakeTool, etc.

   See `http://www.sun.com/software/Developer-products/' for more info.

   EOS stands for "Era on SPARCworks", but I don't know what Era stands
for.

   EOS is the integration of XEmacs with the SPARCworks debugger.  It
allows one to use an XEmacs frame to view code (complete with
fontification, etc.), set breakpoints, print variables, etc., while
using the SPARCworks debugger.  It works very well and I use it all the
time.

   Chuck Thompson <cthomp@xemacs.org> writes:

     Era stood for "Emacs Rewritten Again".  It was what we were
     calling the modified version of Lucid Emacs for Sun when I was
     dragged, er, allowed to work on this wonderful editor.

   Martin Buchholz <martin@xemacs.org> writes:

     EOS is being replaced with a new graphical development environment
     called Sun WorkShop, which is currently (07/96) in Alpha Test.
     For more details, check out
     `http://www.sun.com/software/Products/Developer-products'.

Q4.4.2: How do I start the Sun Workshop support in XEmacs 21?
-------------------------------------------------------------

   Add the switch --with-workshop to the configure command when building
XEmacs and put the following in one of your startup files (e.g.
site-start.el or .emacs):

     (when (featurep 'tooltalk)
       (load "tooltalk-macros")
       (load "tooltalk-util")
       (load "tooltalk-init"))
     (when (featurep 'sparcworks)
       (load "sunpro-init")
       (load "ring")
       (load "comint")
       (load "annotations")
       (sunpro-startup))

   If you are not using the latest Workshop (5.0) you have to apply the
following patch:

--- /opt/SUNWspro/lib/eserve.el.ORIG    Fri May 14 15:23:26 1999
+++ /opt/SUNWspro/lib/eserve.el Fri May 14 15:24:54 1999
@@ -42,7 +42,7 @@
 (defvar running-xemacs nil "t if we're running XEmacs")
 (defvar running-emacs  nil "t if we're running GNU Emacs 19")

-(if (string-match "^\\(19\\|20\\)\..*\\(XEmacs\\|Lucid\\)" emacs-version)
+(if (string-match "\\(XEmacs\\|Lucid\\)" emacs-version)
     (setq running-xemacs t)
     (setq running-emacs  t))

4.5: Energize
=============

Q4.5.1: What is/was Energize?
-----------------------------

   David N Gray <gray@meteor.harlequin.com> writes:
     The files in `lisp/energize' are to enable Emacs to interface with
     the "Energize Programming System", a C and C++ development
     environment, which was a product of Lucid, Inc.  Tragically, Lucid
     went out of business in 1994, so although Energize is still a
     great system, if you don't already have it, there isn't any way to
     get it now.  (Unless you happen to be in Japan; INS Engineering
     may still be selling it there.  Tartan bought the rights to sell
     it in the rest of the world, but never did so.)

4.6: Infodock
=============

Q4.6.1: What is Infodock?
-------------------------

   InfoDock is an integrated productivity toolset, mainly aimed at
technical people.  It is developed and supported by InfoDock
Associates, a firm that offers custom support and development for
InfoDock, XEmacs and GNU Emacs.  ( `http://www.infodock.com',
<info@infodock.com>, +1 408 243 3300).

   InfoDock is built atop the XEmacs variant of GNU Emacs and so has
all of the power of Emacs, but with an easier to use and more
comprehensive menu-based user interface.  The bottom portion of this
text describes how it differs from XEmacs and GNU Emacs from the Free
Software Foundation.

   InfoDock is aimed at people who want a free, turn-key productivity
environment.  Although InfoDock is customizable, it is not intended for
people who like basic versions of Emacs which need to be customized
extensively for local use; standard Emacs distributions are better for
such uses.  InfoDock is for those people who want a complete,
pre-customized environment in one package, which they need not touch
more than once or twice a year to update to new revisions.

   InfoDock is pre-built for SPARC SunOS/Solaris systems, PA-RISC HP-UX,
and Intel Linux systems.  It is intended for use on a color display,
although most features will work on monochrome monitors.  Simply unpack
InfoDock according to the instructions in the ID-INSTALL file and you
are ready to run.

   The InfoDock Manual is concise, yet sufficient as a user guide for
users who have never used an Emacs-type editor before.  For users who
are already familiar with Emacs, it supplements the information in the
GNU Emacs Manual.

   InfoDock menus are much more extensive and more mature than standard
Emacs menus.  Each menu offers a `Manual' item which displays
documentation associated with the menu's functions.

Four types of menubars are provided:
  1. An extensive menubar providing access to global InfoDock commands.

  2. Mode-specific menubars tailored to the current major mode.

  3. A simple menubar for basic editing to help novices get started
     with InfoDock.

  4. The standard XEmacs menubar.

   Most modes also include mode-specific popup menus.  Additionally,
region and rectangle popup menus are included.

   `Hyperbole', the everyday information manager, is a core part of
InfoDock.  This provides context-sensitive mouse keys, a rolodex-type
contact manager, programmable hypertext buttons, and an autonumbered
outliner with embedded hyperlink anchors.

   The `OO-Browser', a multi-language object-oriented code browser, is a
standard part of InfoDock.

   InfoDock saves a more extensive set of user options than other Emacs
versions.

   InfoDock inserts a useful file header in many file types, showing the
author, summary, and last modification time of each file.  A summary
program can then be used to summarize all of the files in a directory,
for easy MANIFEST file creation.

   Your working set of buffers is automatically saved and restored (if
you answer yes to a prompt) between InfoDock sessions.

   Refined color choices for code highlighting are provided for both
dark and light background display frames.

   The `C-z' key prefix performs frame-based commands which parallel the
`C-x' key prefix for window-based commands.

   The Smart Menu system is included for producing command menus on dumb
terminals.

   Lisp libraries are better categorized according to function.

   Extensions and improvements to many areas of Emacs are included,
such as: paragraph filling, mail reading with Rmail, shell handling,
outlining, code highlighting and browsing, and man page browsing.

   InfoDock questions, answers and discussion should go to the mail list
<infodock@infodock.com>.  Use <infodock-request@infodock.com> to be
added or removed from the list.  Always include your InfoDock version
number when sending help requests.

   InfoDock is available across the Internet via anonymous FTP.  To get
it, first move to a directory into which you want the InfoDock archive
files placed.  We will call this <DIST-DIR>.

        cd <DIST-DIR>

   Ftp to ftp.xemacs.org  (Internet Host ID = 128.174.252.16):

        prompt> ftp ftp.xemacs.org

   Login as `anonymous' with your own <user-id>@<site-name> as a
password.

        Name (ftp.xemacs.org): anonymous
        331 Guest login ok, send your complete e-mail address as password.
        Password: -<your-user-id>@<your-domain>
        230 Guest login ok, access restrictions apply.

   Move to the location of the InfoDock archives:

        ftp> cd pub/infodock

   Set your transfer mode to binary:

        ftp> bin
        200 Type set to I.

   Turn off prompting:

        ftp> prompt
        Interactive mode off.

   Retrieve the InfoDock archives that you want, either by using a `get
<file>' for each file you want or by using the following to get a
complete distribution, including all binaries:

        ftp> mget ID-INSTALL
        ftp> mget id-*

   Close the FTP connection:

        ftp> quit
        221 Goodbye.

   Read the `ID-INSTALL' file which you just retrieved for step-by-step
installation instructions.

4.7: Other Unbundled Packages
=============================

Q4.7.1: What is AUC TeX?  Where do you get it?
----------------------------------------------

   AUC TeX is a package written by Per Abrahamsen <abraham@dina.kvl.dk>.
Starting with XEmacs 19.16, AUC TeX is bundled with XEmacs.  The
following information is from the `README' and website.

   AUC TeX is an extensible package that supports writing and formatting
TeX files for most variants of GNU Emacs. Many different macro packages
are supported, including AMS TeX, LaTeX, and TeXinfo.

   The most recent version is always available by ftp at
`ftp://sunsite.auc.dk/packages/auctex/auctex.tar.gz'.

   In case you don't have access to anonymous ftp, you can get it by an
email request to <ftpmail@decwrl.dec.com>.

   WWW users may want to check out the AUC TeX page at
`http://sunsite.auc.dk/auctex/'.

Q4.7.2: Are there any Emacs Lisp Spreadsheets?
----------------------------------------------

   Yes.  Check out "dismal" (which stands for Dis' Mode Ain't Lotus) at
`ftp://cs.nyu.edu/pub/local/fox/dismal/'.

Q4.7.3: Byte compiling AUC TeX on XEmacs 19.14.
-----------------------------------------------

   Georges Brun-Cottan <bruncott@dormeur.inria.fr> writes:

     When byte compiling auctex-9.4g, you must use the command:

          xemacs -batch -l lpath.el

Q4.7.4: Problems installing AUC TeX.
------------------------------------

   Jan Vroonhof <vroonhof@math.ethz.ch> writes:

     AUC TeX works fine on both stock Emacs and XEmacs has been doing
     so for a very very long time. This is mostly due to the work of
     Per Abrahamsen <abraham@dina.kvl.dk> (clap clap) in particular his
     `easymenu' package.  Which leads to what is probably the problem...

   Most problems with AUC TeX are one of two things:

   * The TeX-lisp-directory in `tex-site.el' and the makefile don't
     match.

     Fix: make sure you configure AUC TeX properly *before* installing.

   * You have an old version of easymenu.el in your path.

     Fix: use `locate-library' and remove old versions to make sure it
     *only* finds the one that came with XEmacs.

Q4.7.5: Is there a reason for an Emacs package not to be included in XEmacs?
----------------------------------------------------------------------------

   The reason for an Emacs package not to be included in XEmacs is
usually one or more of the following:

  1. The package has not been ported to XEmacs.  This will typically
     happen when it uses GNU-Emacs-specific features, which make it
     fail under XEmacs.

     Porting a package to XEmacs can range from a trivial amount of
     change to a partial or full rewrite.  Fortunately, the authors of
     modern packages usually choose to support both Emacsen themselves.

  2. The package has been decided not to be appropriate for XEmacs.  It
     may have an equivalent or better replacement within XEmacs, in
     which case the developers may choose not to burden themselves with
     supporting an additional package.

     Each package bundled with XEmacs means more work for the
     maintainers, whether they want it or not.  If you are ready to
     take over the maintenance responsibilities for the package you
     port, be sure to say so - we will more likely include it.

  3. The package simply hasn't been noted by the XEmacs development.  If
     that's the case, the messages like yours are very useful for
     attracting our attention.

  4. The package was noted by the developers, but they simply haven't
     yet gotten around to including/porting it.  Wait for the next
     release or, even better, offer your help.  It will be gladly
     accepted and appreciated.

Q4.7.5: Is there a MatLab mode?
-------------------------------

   Is there any way I can get syntax highlighting for MatLab .m files?
Can I "teach" emacs what words are MatLab commands, comments, etc. ?

   Ulrich Elsner <elsner@mathematik.tu-chemnitz.de> writes:
     One way to do this (and much more) is by using the matlab mode.
     (If someone knows where this can be found, please contact the
     XEmacs FAQ maintainer <faq@xemacs.org>.

     Instructions on how to install this mode are included in this file.

5 The Miscellaneous Stuff
*************************

   This is part 5 of the XEmacs Frequently Asked Questions list.  This
section is devoted to anything that doesn't fit neatly into the other
sections.

Major & Minor Modes:

Emacs Lisp Programming Techniques:

Sound:

Miscellaneous:

5.0: Major & Minor Modes
========================

Q5.0.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 `M-x font-lock-mode', or by having
XEmacs automatically start it by adding lines like:

     (add-hook 'emacs-lisp-mode-hook	'turn-on-font-lock)
     (add-hook 'dired-mode-hook	'turn-on-font-lock)

   to your `.emacs'.  See the file `etc/sample.emacs' for more examples.

   See also `Syntax Highlighting' from the `Options' menu.  Remember to
save options.

Q5.0.2: 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 `.emacs':

     (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.

Q5.0.3: How do I get `More' Syntax Highlighting on by default?
--------------------------------------------------------------

   Use the following code in your `.emacs':

     (setq-default font-lock-maximum-decoration t)

   In versions of XEmacs prior to 19.14, you had to use a kludgy
solution like this:

     (setq c-font-lock-keywords c-font-lock-keywords-2
           c++-font-lock-keywords c++-font-lock-keywords-2
           lisp-font-lock-keywords lisp-font-lock-keywords-2)

   It will work for C, C++ and Lisp.

   See also `Syntax Highlighting' from the `Options' menu.  Remember to
save options.

Q5.0.4: How can I enable auto-indent?
-------------------------------------

   Put the following line in your `.emacs':

     (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 `.emacs':

     (require 'filladapt)
     (add-hook 'text-mode-hook    'turn-on-filladapt-mode)
     ;;; and others ...

   You can customize filling and adaptive filling with Customize.
Select from the `Options' menu
`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.

Q5.0.5: How can I get XEmacs to come up in text/auto-fill mode by default?
--------------------------------------------------------------------------

   Try the following lisp in your `.emacs':

     (setq default-major-mode 'text-mode)
     (setq 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).

Q5.0.6: 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

Q5.0.7: 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.  Starting with
XEmacs-20.3 you can also use `M-x ssh' to open secure remote session if
you have `ssh' installed.

Q5.0.8: 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 `.emacs':

     (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)

Q5.0.9: 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 `.emacs':

     (viper-mode)

   Michael Kifer <kifer@CS.SunySB.EDU> writes:

     This should be added as close to the top of `.emacs' as you can get
     it, otherwise some minor modes may not get viper-ized.

Q5.0.10: [This question intentionally left blank]
-------------------------------------------------

   Obsolete question, left blank to avoid renumbering

Q5.0.11: Filladapt doesn't work in 19.15
----------------------------------------

   Filladapt 2.x is included in 19.15.  In it filladapt is now a minor
mode and minor modes are traditionally off by default.  The following
added to your `.emacs' will turn it on for all buffers:

     (setq-default filladapt-mode t)

   Use `turn-on-filladapt-mode' to turn Filladapt on in particular
major modes, like this:

     (add-hook 'text-mode-hook 'turn-on-filladapt-mode)

Q5.0.12: 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 `.emacs', to ensure that the first frame created is
the one used for your gnuserv buffers.

   Starting in 19.15, there is an option to set the gnuserv target to
the current frame.  See `Options->"Other Window" Location->Make current
frame gnuserv target'

   Starting with XEmacs-20.3 you can also change this with Customize.
Select from the `Options' menu
`Customize->Emacs->Environment->Gnuserv->Gnuserv Frame...' or type `M-x
customize <RET> gnuserv <RET>'.

Q5.0.13: How do I start gnuserv so that each subsequent XEmacs is a client?
---------------------------------------------------------------------------

   Put the following in your `.emacs' 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.

Q5.0.14: 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

Q5.0.15: Where do I get the latest CC Mode?
-------------------------------------------

   Barry A. Warsaw <bwarsaw@cnri.reston.va.us> writes:

     This can be had from `http://www.python.org/emacs/'.

Q5.0.16: 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 `.emacs':

     (setq auto-show-mode nil)
     (setq-default auto-show-mode nil)

Q5.0.17: How can I get two instances of info?
---------------------------------------------

   You can't.  The `info' package does not provide for multiple info
buffers.