Sync up with r21-2-27.
[chise/xemacs-chise.git] / info / xemacs-faq.info-4
1 This is Info file ../info/xemacs-faq.info, produced by Makeinfo version
2 1.68 from the input file xemacs-faq.texi.
3
4 INFO-DIR-SECTION XEmacs Editor
5 START-INFO-DIR-ENTRY
6 * FAQ: (xemacs-faq).            XEmacs FAQ.
7 END-INFO-DIR-ENTRY
8
9 \1f
10 File: xemacs-faq.info,  Node: Q4.0.6,  Next: Q4.0.7,  Prev: Q4.0.5,  Up: Subsystems
11
12 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"?
13 ---------------------------------------------------------------------------------------------------------------------
14
15    Set `vm-reply-ignored-addresses' to a list, like
16
17      (setq vm-reply-ignored-addresses
18            '("wing@nuspl@nvwls.cc.purdue.edu,netcom[0-9]*.netcom.com"
19         "wing@netcom.com" "wing@xemacs.org"))
20
21    Note that each string is a regular expression.
22
23 \1f
24 File: xemacs-faq.info,  Node: Q4.0.7,  Next: Q4.0.8,  Prev: Q4.0.6,  Up: Subsystems
25
26 Q4.0.7: Is there a mailing list or FAQ for VM?
27 ----------------------------------------------
28
29    A FAQ for VM exists at `http://www.cyberpass.net/~gorkab/vmfaq.htm'.
30
31    VM has its own newsgroups gnu.emacs.vm.info and gnu.emacs.vm.bug.
32
33 \1f
34 File: xemacs-faq.info,  Node: Q4.0.8,  Next: Q4.0.9,  Prev: Q4.0.7,  Up: Subsystems
35
36 Q4.0.8: Remote mail reading with VM.
37 ------------------------------------
38
39    My mailbox lives at the office on a big honkin server.  My regular
40 INBOX lives on my honkin desktop machine.  I now can PPP to the office
41 from home which is far from honking...  I'd like to be able to read
42 mail at home without storing it here and I'd like to use xemacs and VM
43 at home...  Is there a recommended setup?
44
45    Joseph J. Nuspl Jr. <nuspl@nvwls.cc.purdue.edu> writes:
46
47      There are several ways to do this.
48
49        1. Set your display to your home machine and run dxpc or one of
50           the other X compressors.
51
52        2. NFS mount your desktop machine on your home machine and
53           modify your pop command on your home machine to rsh to your
54           desktop machine and actually do the pop get's.
55
56        3. Run a POP server on your desktop machine as well and do a
57           sort of two tiered POP get.
58
59    William Perry <wmperry@monolith.spry.com> adds:
60
61      Or you could run a pop script periodically on your desktop
62      machine, and just use ange-ftp or NFS to get to your mailbox.  I
63      used to do this all the time back at IU.
64
65 \1f
66 File: xemacs-faq.info,  Node: Q4.0.9,  Next: Q4.0.10,  Prev: Q4.0.8,  Up: Subsystems
67
68 Q4.0.9: rmail or VM gets an error incorporating new mail.
69 ---------------------------------------------------------
70
71    Quoting the XEmacs PROBLEMS file:
72
73      rmail and VM get new mail from `/usr/spool/mail/$USER' using a
74      program called `movemail'.  This program interlocks with
75      `/bin/mail' using the protocol defined by `/bin/mail'.
76
77      There are two different protocols in general use.  One of them
78      uses the `flock' system call.  The other involves creating a lock
79      file; `movemail' must be able to write in `/usr/spool/mail' in
80      order to do this.  You control which one is used by defining, or
81      not defining, the macro `MAIL_USE_FLOCK' in `config.h' or the m-
82      or s- file it includes.
83
84      *IF YOU DON'T USE THE FORM OF INTERLOCKING THAT IS NORMAL ON YOUR
85      SYSTEM, YOU CAN LOSE MAIL!*
86
87      If your system uses the lock file protocol, and fascist
88      restrictions prevent ordinary users from writing the lock files in
89      `/usr/spool/mail', you may need to make `movemail' setgid to a
90      suitable group such as `mail'.  You can use these commands (as
91      root):
92
93           chgrp mail movemail
94           chmod 2755 movemail
95
96      If your system uses the lock file protocol, and fascist
97      restrictions prevent ordinary users from writing the lock files in
98      `/usr/spool/mail', you may need to make `movemail' setgid to a
99      suitable group such as `mail'.  To do this, use the following
100      commands (as root) after doing the make install.
101
102           chgrp mail movemail
103           chmod 2755 movemail
104
105      Installation normally copies movemail from the build directory to
106      an installation directory which is usually under `/usr/local/lib'.
107      The installed copy of `movemail' is usually in the directory
108      `/usr/local/lib/emacs/VERSION/TARGET'.  You must change the group
109      and mode of the installed copy; changing the group and mode of the
110      build directory copy is ineffective.
111
112 \1f
113 File: xemacs-faq.info,  Node: Q4.0.10,  Next: Q4.0.11,  Prev: Q4.0.9,  Up: Subsystems
114
115 Q4.0.10: How do I make VM stay in a single frame?
116 -------------------------------------------------
117
118    John.John S Cooper <Cooper@Eng.Sun.COM> writes:
119
120                                                 ; Don't use multiple frames
121           (setq vm-frame-per-composition nil)
122           (setq vm-frame-per-folder nil)
123           (setq vm-frame-per-edit nil)
124           (setq vm-frame-per-summary nil)
125
126 \1f
127 File: xemacs-faq.info,  Node: Q4.0.11,  Next: Q4.0.12,  Prev: Q4.0.10,  Up: Subsystems
128
129 Q4.0.11: How do I make VM or mh-e display graphical smilies?
130 ------------------------------------------------------------
131
132    For mh-e use the following:
133
134      (add-hook 'mh-show-mode-hook '(lambda ()
135                                 (smiley-region (point-min)
136                                                     (point-max))))
137
138    WJCarpenter <bill@carpenter.ORG> writes: For VM use the following:
139             (autoload 'smiley-region "smiley" nil t)
140             (add-hook 'vm-select-message-hook
141                       '(lambda ()
142                          (smiley-region (point-min)
143                                         (point-max))))
144
145    For tm use the following:
146      (autoload 'smiley-buffer "smiley" nil t)
147      (add-hook 'mime-viewer/plain-text-preview-hook 'smiley-buffer)
148
149 \1f
150 File: xemacs-faq.info,  Node: Q4.0.12,  Next: Q4.1.1,  Prev: Q4.0.11,  Up: Subsystems
151
152 Q4.0.12: Customization of VM not covered in the manual, or here.
153 ----------------------------------------------------------------
154
155    giacomo boffi <boffi@hp735.stru.polimi.it> writes:
156
157      The meta-answer is to look into the file `vm-vars.el', in the vm
158      directory of the lisp library.
159
160      `vm-vars.el' contains, initializes and carefully describes, with
161      examples of usage, the plethora of user options that *fully*
162      control VM's behavior.
163
164      Enter vm-vars, `forward-search' for toolbar, find the variables
165      that control the toolbar placement, appearance, existence, copy to
166      your `.emacs' or `.vm' and modify according to the detailed
167      instructions.
168
169      The above also applies to all the various features of VM: search
170      for some keywords, maybe the first you conjure isn't appropriate,
171      find the appropriate variables, copy and experiment.
172
173 \1f
174 File: xemacs-faq.info,  Node: Q4.1.1,  Next: Q4.1.2,  Prev: Q4.0.12,  Up: Subsystems
175
176 4.1: Web browsing with W3
177 =========================
178
179 Q4.1.1: What is W3?
180 -------------------
181
182    W3 is an advanced graphical browser written in Emacs lisp that runs
183 on XEmacs.  It has full support for cascaded style sheets, and more...
184
185    It has a home web page at
186 `http://www.cs.indiana.edu/elisp/w3/docs.html'.
187
188 \1f
189 File: xemacs-faq.info,  Node: Q4.1.2,  Next: Q4.1.3,  Prev: Q4.1.1,  Up: Subsystems
190
191 Q4.1.2: How do I run W3 from behind a firewall?
192 -----------------------------------------------
193
194    There is a long, well-written, detailed section in the W3 manual that
195 describes how to do this.  Look in the section entitled "Firewalls".
196
197 \1f
198 File: xemacs-faq.info,  Node: Q4.1.3,  Next: Q4.2.1,  Prev: Q4.1.2,  Up: Subsystems
199
200 Q4.1.3: Is it true that W3 supports style sheets and tables?
201 ------------------------------------------------------------
202
203    Yes, and much more.  W3, as distributed with the latest XEmacs is a
204 full-featured web browser.
205
206 \1f
207 File: xemacs-faq.info,  Node: Q4.2.1,  Next: Q4.2.2,  Prev: Q4.1.3,  Up: Subsystems
208
209 4.2: Reading Netnews and Mail with Gnus
210 =======================================
211
212 Q4.2.1: GNUS, (ding) Gnus, Gnus 5, September Gnus, Red Gnus, Quassia Gnus, argh!
213 --------------------------------------------------------------------------------
214
215    The Gnus numbering issues are not meant for mere mortals to know
216 them.  If you feel you *must* enter the muddy waters of Gnus, visit the
217 excellent FAQ, maintained by Justin Sheehy, at:
218
219      `http://www.ccs.neu.edu/software/contrib/gnus/'
220
221    See also Gnus home page
222      `http://www.gnus.org/'
223
224 \1f
225 File: xemacs-faq.info,  Node: Q4.2.2,  Next: Q4.2.3,  Prev: Q4.2.1,  Up: Subsystems
226
227 Q4.2.2: This question intentionally left blank.
228 -----------------------------------------------
229
230    Obsolete question, left blank to avoid renumbering.
231
232 \1f
233 File: xemacs-faq.info,  Node: Q4.2.3,  Next: Q4.2.4,  Prev: Q4.2.2,  Up: Subsystems
234
235 Q4.2.3: How do I make Gnus stay within a single frame?
236 ------------------------------------------------------
237
238    The toolbar code to start Gnus opens the new frame--and it's a
239 feature rather than a bug.  If you don't like it, but would still like
240 to click on the seemly icon, use the following code:
241
242      (defun toolbar-news ()
243        (gnus))
244
245    It will redefine the callback function of the icon to just call
246 `gnus', without all the fancy frame stuff.
247
248 \1f
249 File: xemacs-faq.info,  Node: Q4.2.4,  Next: Q4.3.1,  Prev: Q4.2.3,  Up: Subsystems
250
251 Q4.2.4: How do I customize the From: line?
252 ------------------------------------------
253
254    How do I change the `From:' line?  I have set gnus-user-from-line to
255      Gail Gurman <gail.gurman@sybase.com>
256     , but XEmacs Gnus doesn't use it. Instead it uses
257      Gail Mara Gurman <gailg@deall>
258  and then complains that it's incorrect. Also, as you perhaps can see,
259 my Message-ID is screwy. How can I change that?
260
261 Lars Magne Ingebrigtsen <larsi@ifi.uio.no> writes:
262
263      Set `user-mail-address' to `gail.gurman@sybase.com' or
264      `mail-host-address' to `sybase.com'.
265
266 \1f
267 File: xemacs-faq.info,  Node: Q4.3.1,  Next: Q4.3.2,  Prev: Q4.2.4,  Up: Subsystems
268
269 4.3: Other Mail & News
270 ======================
271
272 Q4.3.1: How can I read and/or compose MIME messages?
273 ----------------------------------------------------
274
275    VM supports MIME natively.
276
277    You probably want to use the Tools for MIME (tm).  *Note Q4.3.2::,
278 for details.
279
280    Trey Jackson <trey@cs.berkeley.edu> has an Emacs & MIME web page at
281 `http://bmrc.berkeley.edu/~trey/emacs/mime.html'.
282
283    Another possibility is RMIME.  You may find RMIME at
284 `http://www.cinti.net/~rmoody/rmime/index.html'.
285
286 \1f
287 File: xemacs-faq.info,  Node: Q4.3.2,  Next: Q4.3.3,  Prev: Q4.3.1,  Up: Subsystems
288
289 Q4.3.2: What is TM and where do I get it?
290 -----------------------------------------
291
292    TM stands for "Tools for MIME" and not Tiny MIME.  TM integrates
293 with all major XEmacs packages like Gnus (all flavors), VM, MH-E, and
294 mailcrypt.  It provides totally transparent and trouble-free MIME
295 support.  When appropriate a message will be decoded in place in an
296 XEmacs buffer.
297
298    TM now comes as a package with XEmacs 19.16 and XEmacs 20.2.
299
300    TM was written by MORIOKA Tomohiko <morioka@jaist.ac.jp> and
301 KOBAYASHI Shuhei <shuhei-k@jaist.ac.jp>.
302
303    It is based on the work of UMEDA Masanobu
304 <umerin@mse.kyutech.ac.jp>, the original writer of GNUS.
305
306    The following information is from the `README':
307
308    "tm" is a MIME package for GNU Emacs.  tm has following functions:
309
310    * MIME style multilingual header.
311
312    * MIME message viewer (mime/viewer-mode).
313
314    * MIME message composer (mime/editor-mode).
315
316    * MIME extenders for mh-e, GNUS, RMAIL and VM.
317
318    tm is available from following anonymous ftp sites:
319    * `ftp://ftp.unicamp.br/pub/mail/mime/tm/' (Brasil).
320
321    * `ftp://ftp.th-darmstadt.de/pub/editors/GNU-Emacs/lisp/mime/'
322      (Germany).
323
324    * `ftp://ftp.tnt.uni-hannover.de/pub/editors/xemacs/contrib/'
325      (Germany).
326
327    Don't let the installation procedure & instructions stop you from
328 trying this package out--it's much simpler than it looks, and once
329 installed, trivial to use.
330
331 \1f
332 File: xemacs-faq.info,  Node: Q4.3.3,  Next: Q4.3.4,  Prev: Q4.3.2,  Up: Subsystems
333
334 Q4.3.3: Why isn't this `movemail' program working?
335 --------------------------------------------------
336
337    Ben Wing <ben@xemacs.org> writes:
338
339      It wasn't chown'ed/chmod'd correctly.
340
341 \1f
342 File: xemacs-faq.info,  Node: Q4.3.4,  Next: Q4.3.5,  Prev: Q4.3.3,  Up: Subsystems
343
344 Q4.3.4: Movemail is also distributed by Netscape?  Can that cause problems?
345 ---------------------------------------------------------------------------
346
347    Steve Baur <steve@xemacs.org> writes:
348
349      Yes.  Always use the movemail installed with your XEmacs.  Failure
350      to do so can result in lost mail.
351
352    Please refer to Jamie Zawinski's <jwz@jwz.org> notes at
353 `http://home.netscape.com/eng/mozilla/2.0/relnotes/demo/movemail.html'.
354 In particular, this document will show you how to make Netscape use the
355 version of movemail configured for your system by the person who built
356 XEmacs.
357
358 \1f
359 File: xemacs-faq.info,  Node: Q4.3.5,  Next: Q4.4.1,  Prev: Q4.3.4,  Up: Subsystems
360
361 Q4.3.5: Where do I find pstogif (required by tm)?
362 -------------------------------------------------
363
364    pstogif is part of the latex2html package.
365
366    Jan Vroonhof <vroonhof@math.ethz.ch> writes:
367
368    latex2html is best found at the CTAN hosts and their mirrors in
369 `tex-archive/support/latex2html'.
370
371    CTAN hosts are:
372
373    * `ftp://ftp.tex.ac.uk/tex-archive/support/latex2html/'.
374
375    * `ftp://ftp.dante.de/tex-archive/support/latex2html/'.
376
377    There is a good mirror at ftp.cdrom.com;
378 `ftp://ftp.cdrom.com/pub/tex/ctan/support/latex2html/'.
379
380 \1f
381 File: xemacs-faq.info,  Node: Q4.4.1,  Next: Q4.4.2,  Prev: Q4.3.5,  Up: Subsystems
382
383 4.4: Sparcworks, EOS, and WorkShop
384 ==================================
385
386 Q4.4.1: What is SPARCworks, EOS, and WorkShop?
387 ----------------------------------------------
388
389    John Turner <turner@lanl.gov> writes:
390
391      SPARCworks is SunSoft's development environment, comprising
392      compilers (C, C++, FORTRAN 77, Fortran 90, Ada, and Pascal), a
393      debugger, and other tools such as TeamWare (for configuration
394      management), MakeTool, etc.
395
396    See `http://www.sun.com/software/Developer-products/' for more info.
397
398    EOS stands for "Era on SPARCworks", but I don't know what Era stands
399 for.
400
401    EOS is the integration of XEmacs with the SPARCworks debugger.  It
402 allows one to use an XEmacs frame to view code (complete with
403 fontification, etc.), set breakpoints, print variables, etc., while
404 using the SPARCworks debugger.  It works very well and I use it all the
405 time.
406
407    Chuck Thompson <cthomp@xemacs.org> writes:
408
409      Era stood for "Emacs Rewritten Again".  It was what we were
410      calling the modified version of Lucid Emacs for Sun when I was
411      dragged, er, allowed to work on this wonderful editor.
412
413    Martin Buchholz <martin@xemacs.org> writes:
414
415      EOS is being replaced with a new graphical development environment
416      called Sun WorkShop, which is currently (07/96) in Alpha Test.
417      For more details, check out
418      `http://www.sun.com/software/Products/Developer-products'.
419
420 \1f
421 File: xemacs-faq.info,  Node: Q4.4.2,  Next: Q4.5.1,  Prev: Q4.4.1,  Up: Subsystems
422
423 Q4.4.2: How do I start the Sun Workshop support in XEmacs 21?
424 -------------------------------------------------------------
425
426    Add the switch --with-workshop to the configure command when building
427 XEmacs and put the following in one of your startup files (e.g.
428 site-start.el or .emacs):
429
430      (when (featurep 'tooltalk)
431        (load "tooltalk-macros")
432        (load "tooltalk-util")
433        (load "tooltalk-init"))
434      (when (featurep 'sparcworks)
435        (load "sunpro-init")
436        (load "ring")
437        (load "comint")
438        (load "annotations")
439        (sunpro-startup))
440
441    If you are not using the latest Workshop (5.0) you have to apply the
442 following patch:
443
444 --- /opt/SUNWspro/lib/eserve.el.ORIG    Fri May 14 15:23:26 1999
445 +++ /opt/SUNWspro/lib/eserve.el Fri May 14 15:24:54 1999
446 @@ -42,7 +42,7 @@
447  (defvar running-xemacs nil "t if we're running XEmacs")
448  (defvar running-emacs  nil "t if we're running GNU Emacs 19")
449
450 -(if (string-match "^\\(19\\|20\\)\..*\\(XEmacs\\|Lucid\\)" emacs-version)
451 +(if (string-match "\\(XEmacs\\|Lucid\\)" emacs-version)
452      (setq running-xemacs t)
453      (setq running-emacs  t))
454
455 \1f
456 File: xemacs-faq.info,  Node: Q4.5.1,  Next: Q4.6.1,  Prev: Q4.4.2,  Up: Subsystems
457
458 4.5: Energize
459 =============
460
461 Q4.5.1: What is/was Energize?
462 -----------------------------
463
464    David N Gray <gray@meteor.harlequin.com> writes:
465      The files in `lisp/energize' are to enable Emacs to interface with
466      the "Energize Programming System", a C and C++ development
467      environment, which was a product of Lucid, Inc.  Tragically, Lucid
468      went out of business in 1994, so although Energize is still a
469      great system, if you don't already have it, there isn't any way to
470      get it now.  (Unless you happen to be in Japan; INS Engineering
471      may still be selling it there.  Tartan bought the rights to sell
472      it in the rest of the world, but never did so.)
473
474 \1f
475 File: xemacs-faq.info,  Node: Q4.6.1,  Next: Q4.7.1,  Prev: Q4.5.1,  Up: Subsystems
476
477 4.6: Infodock
478 =============
479
480 Q4.6.1: What is Infodock?
481 -------------------------
482
483    InfoDock is an integrated productivity toolset, mainly aimed at
484 technical people.  It is developed and supported by InfoDock
485 Associates, a firm that offers custom support and development for
486 InfoDock, XEmacs and GNU Emacs.  ( `http://www.infodock.com',
487 <info@infodock.com>, +1 408 243 3300).
488
489    InfoDock is built atop the XEmacs variant of GNU Emacs and so has
490 all of the power of Emacs, but with an easier to use and more
491 comprehensive menu-based user interface.  The bottom portion of this
492 text describes how it differs from XEmacs and GNU Emacs from the Free
493 Software Foundation.
494
495    InfoDock is aimed at people who want a free, turn-key productivity
496 environment.  Although InfoDock is customizable, it is not intended for
497 people who like basic versions of Emacs which need to be customized
498 extensively for local use; standard Emacs distributions are better for
499 such uses.  InfoDock is for those people who want a complete,
500 pre-customized environment in one package, which they need not touch
501 more than once or twice a year to update to new revisions.
502
503    InfoDock is pre-built for SPARC SunOS/Solaris systems, PA-RISC HP-UX,
504 and Intel Linux systems.  It is intended for use on a color display,
505 although most features will work on monochrome monitors.  Simply unpack
506 InfoDock according to the instructions in the ID-INSTALL file and you
507 are ready to run.
508
509    The InfoDock Manual is concise, yet sufficient as a user guide for
510 users who have never used an Emacs-type editor before.  For users who
511 are already familiar with Emacs, it supplements the information in the
512 GNU Emacs Manual.
513
514    InfoDock menus are much more extensive and more mature than standard
515 Emacs menus.  Each menu offers a `Manual' item which displays
516 documentation associated with the menu's functions.
517
518 Four types of menubars are provided:
519   1. An extensive menubar providing access to global InfoDock commands.
520
521   2. Mode-specific menubars tailored to the current major mode.
522
523   3. A simple menubar for basic editing to help novices get started
524      with InfoDock.
525
526   4. The standard XEmacs menubar.
527
528    Most modes also include mode-specific popup menus.  Additionally,
529 region and rectangle popup menus are included.
530
531    `Hyperbole', the everyday information manager, is a core part of
532 InfoDock.  This provides context-sensitive mouse keys, a rolodex-type
533 contact manager, programmable hypertext buttons, and an autonumbered
534 outliner with embedded hyperlink anchors.
535
536    The `OO-Browser', a multi-language object-oriented code browser, is a
537 standard part of InfoDock.
538
539    InfoDock saves a more extensive set of user options than other Emacs
540 versions.
541
542    InfoDock inserts a useful file header in many file types, showing the
543 author, summary, and last modification time of each file.  A summary
544 program can then be used to summarize all of the files in a directory,
545 for easy MANIFEST file creation.
546
547    Your working set of buffers is automatically saved and restored (if
548 you answer yes to a prompt) between InfoDock sessions.
549
550    Refined color choices for code highlighting are provided for both
551 dark and light background display frames.
552
553    The `C-z' key prefix performs frame-based commands which parallel the
554 `C-x' key prefix for window-based commands.
555
556    The Smart Menu system is included for producing command menus on dumb
557 terminals.
558
559    Lisp libraries are better categorized according to function.
560
561    Extensions and improvements to many areas of Emacs are included,
562 such as: paragraph filling, mail reading with Rmail, shell handling,
563 outlining, code highlighting and browsing, and man page browsing.
564
565    InfoDock questions, answers and discussion should go to the mail list
566 <infodock@infodock.com>.  Use <infodock-request@infodock.com> to be
567 added or removed from the list.  Always include your InfoDock version
568 number when sending help requests.
569
570    InfoDock is available across the Internet via anonymous FTP.  To get
571 it, first move to a directory into which you want the InfoDock archive
572 files placed.  We will call this <DIST-DIR>.
573
574         cd <DIST-DIR>
575
576    Ftp to ftp.xemacs.org  (Internet Host ID = 128.174.252.16):
577
578         prompt> ftp ftp.xemacs.org
579
580    Login as `anonymous' with your own <user-id>@<site-name> as a
581 password.
582
583         Name (ftp.xemacs.org): anonymous
584         331 Guest login ok, send your complete e-mail address as password.
585         Password: -<your-user-id>@<your-domain>
586         230 Guest login ok, access restrictions apply.
587
588    Move to the location of the InfoDock archives:
589
590         ftp> cd pub/infodock
591
592    Set your transfer mode to binary:
593
594         ftp> bin
595         200 Type set to I.
596
597    Turn off prompting:
598
599         ftp> prompt
600         Interactive mode off.
601
602    Retrieve the InfoDock archives that you want, either by using a `get
603 <file>' for each file you want or by using the following to get a
604 complete distribution, including all binaries:
605
606         ftp> mget ID-INSTALL
607         ftp> mget id-*
608
609    Close the FTP connection:
610
611         ftp> quit
612         221 Goodbye.
613
614    Read the `ID-INSTALL' file which you just retrieved for step-by-step
615 installation instructions.
616
617 \1f
618 File: xemacs-faq.info,  Node: Q4.7.1,  Next: Q4.7.2,  Prev: Q4.6.1,  Up: Subsystems
619
620 4.7: Other Unbundled Packages
621 =============================
622
623 Q4.7.1: What is AUC TeX?  Where do you get it?
624 ----------------------------------------------
625
626    AUC TeX is a package written by Per Abrahamsen <abraham@dina.kvl.dk>.
627 Starting with XEmacs 19.16, AUC TeX is bundled with XEmacs.  The
628 following information is from the `README' and website.
629
630    AUC TeX is an extensible package that supports writing and formatting
631 TeX files for most variants of GNU Emacs. Many different macro packages
632 are supported, including AMS TeX, LaTeX, and TeXinfo.
633
634    The most recent version is always available by ftp at
635 `ftp://sunsite.auc.dk/packages/auctex/auctex.tar.gz'.
636
637    In case you don't have access to anonymous ftp, you can get it by an
638 email request to <ftpmail@decwrl.dec.com>.
639
640    WWW users may want to check out the AUC TeX page at
641 `http://sunsite.auc.dk/auctex/'.
642
643 \1f
644 File: xemacs-faq.info,  Node: Q4.7.2,  Next: Q4.7.3,  Prev: Q4.7.1,  Up: Subsystems
645
646 Q4.7.2: Are there any Emacs Lisp Spreadsheets?
647 ----------------------------------------------
648
649    Yes.  Check out "dismal" (which stands for Dis' Mode Ain't Lotus) at
650 `ftp://cs.nyu.edu/pub/local/fox/dismal/'.
651
652 \1f
653 File: xemacs-faq.info,  Node: Q4.7.3,  Next: Q4.7.4,  Prev: Q4.7.2,  Up: Subsystems
654
655 Q4.7.3: [This question intentionally left blank]
656 ------------------------------------------------
657
658 \1f
659 File: xemacs-faq.info,  Node: Q4.7.4,  Next: Q4.7.5,  Prev: Q4.7.3,  Up: Subsystems
660
661 Q4.7.4: Problems installing AUC TeX.
662 ------------------------------------
663
664    Jan Vroonhof <vroonhof@math.ethz.ch> writes:
665
666      AUC TeX works fine on both stock Emacs and XEmacs has been doing
667      so for a very very long time. This is mostly due to the work of
668      Per Abrahamsen <abraham@dina.kvl.dk> (clap clap) in particular his
669      `easymenu' package.  Which leads to what is probably the problem...
670
671    Most problems with AUC TeX are one of two things:
672
673    * The TeX-lisp-directory in `tex-site.el' and the makefile don't
674      match.
675
676      Fix: make sure you configure AUC TeX properly *before* installing.
677
678    * You have an old version of easymenu.el in your path.
679
680      Fix: use `locate-library' and remove old versions to make sure it
681      *only* finds the one that came with XEmacs.
682
683 \1f
684 File: xemacs-faq.info,  Node: Q4.7.5,  Next: Q4.7.6,  Prev: Q4.7.4,  Up: Subsystems
685
686 Q4.7.5: Is there a reason for an Emacs package not to be included in XEmacs?
687 ----------------------------------------------------------------------------
688
689    The reason for an Emacs package not to be included in XEmacs is
690 usually one or more of the following:
691
692   1. The package has not been ported to XEmacs.  This will typically
693      happen when it uses GNU-Emacs-specific features, which make it
694      fail under XEmacs.
695
696      Porting a package to XEmacs can range from a trivial amount of
697      change to a partial or full rewrite.  Fortunately, the authors of
698      modern packages usually choose to support both Emacsen themselves.
699
700   2. The package has been decided not to be appropriate for XEmacs.  It
701      may have an equivalent or better replacement within XEmacs, in
702      which case the developers may choose not to burden themselves with
703      supporting an additional package.
704
705      Each package bundled with XEmacs means more work for the
706      maintainers, whether they want it or not.  If you are ready to
707      take over the maintenance responsibilities for the package you
708      port, be sure to say so - we will more likely include it.
709
710   3. The package simply hasn't been noted by the XEmacs development.  If
711      that's the case, the messages like yours are very useful for
712      attracting our attention.
713
714   4. The package was noted by the developers, but they simply haven't
715      yet gotten around to including/porting it.  Wait for the next
716      release or, even better, offer your help.  It will be gladly
717      accepted and appreciated.
718
719 \1f
720 File: xemacs-faq.info,  Node: Q4.7.6,  Prev: Q4.7.5,  Up: Subsystems
721
722 Q4.7.5: Is there a MatLab mode?
723 -------------------------------
724
725    Yes, a matlab mode and other items are available at the
726 MathWorks' emacs_add_ons ftp directory (ftp://ftp.mathworks.com/pub/contrib/emacs_add_ons).
727
728 \1f
729 File: xemacs-faq.info,  Node: Miscellaneous,  Next: MS Windows,  Prev: Subsystems,  Up: Top
730
731 5 The Miscellaneous Stuff
732 *************************
733
734    This is part 5 of the XEmacs Frequently Asked Questions list.  This
735 section is devoted to anything that doesn't fit neatly into the other
736 sections.
737
738 * Menu:
739
740 Major & Minor Modes:
741 * Q5.0.1::      How can I do source code highlighting using font-lock?
742 * Q5.0.2::      I do not like cc-mode.  How do I use the old c-mode?
743 * Q5.0.3::      How do I get `More' Syntax Highlighting on by default?
744 * Q5.0.4::      How can I enable auto-indent?
745 * Q5.0.5::      How can I get XEmacs to come up in text/auto-fill mode by default?
746 * Q5.0.6::      How do I start up a second shell buffer?
747 * Q5.0.7::      Telnet from shell filters too much.
748 * Q5.0.8::      Why does edt emulation not work?
749 * Q5.0.9::      How can I emulate VI and use it as my default mode?
750 * Q5.0.10::     [This question intentionally left blank]
751 * Q5.0.11::     How do I turn on filladapt for all buffers?
752 * Q5.0.12::     How do I disable gnuserv from opening a new frame?
753 * Q5.0.13::     How do I start gnuserv so that each subsequent XEmacs is a client?
754 * Q5.0.14::     Strange things are happening in Shell Mode.
755 * Q5.0.15::     Where do I get the latest CC Mode?
756 * Q5.0.16::     I find auto-show-mode disconcerting.  How do I turn it off?
757 * Q5.0.17::     How can I get two instances of info?
758 * Q5.0.18::     [This question intentionally left blank]
759 * Q5.0.19::     Is there something better than LaTeX mode?
760 * Q5.0.20::     Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient?
761
762 Emacs Lisp Programming Techniques:
763 * Q5.1.1::      The difference in key sequences between XEmacs and GNU Emacs?
764 * Q5.1.2::      Can I generate "fake" keyboard events?
765 * Q5.1.3::      Could you explain `read-kbd-macro' in more detail?
766 * Q5.1.4::      What is the performance hit of `let'?
767 * Q5.1.5::      What is the recommended use of `setq'?
768 * Q5.1.6::      What is the typical misuse of `setq'?
769 * Q5.1.7::      I like the the `do' form of cl, does it slow things down?
770 * Q5.1.8::      I like recursion, does it slow things down?
771 * Q5.1.9::      How do I put a glyph as annotation in a buffer?
772 * Q5.1.10::     `map-extents' won't traverse all of my extents!
773 * Q5.1.11::     My elisp program is horribly slow.  Is there an easy way to find out where it spends time?
774
775 Sound:
776 * Q5.2.1::      How do I turn off the sound?
777 * Q5.2.2::      How do I get funky sounds instead of a boring beep?
778 * Q5.2.3::      What's NAS, how do I get it?
779 * Q5.2.4::      Sunsite sounds don't play.
780
781 Miscellaneous:
782 * Q5.3.1::      How do you make XEmacs indent CL if-clauses correctly?
783 * Q5.3.2::      Fontifying hangs when editing a postscript file.
784 * Q5.3.3::      How can I print WYSIWYG a font-locked buffer?
785 * Q5.3.4::      Getting `M-x lpr' to work with postscript printer.
786 * Q5.3.5::      How do I specify the paths that XEmacs uses for finding files?
787 * Q5.3.6::      [This question intentionally left blank]
788 * Q5.3.7::      Can I have the end of the buffer delimited in some way?
789 * Q5.3.8::      How do I insert today's date into a buffer?
790 * Q5.3.9::      Are only certain syntactic character classes available for abbrevs?
791 * Q5.3.10::     How can I get those oh-so-neat X-Face lines?
792 * Q5.3.11::     How do I add new Info directories?
793 * Q5.3.12::     What do I need to change to make printing work?
794
795 \1f
796 File: xemacs-faq.info,  Node: Q5.0.1,  Next: Q5.0.2,  Prev: Miscellaneous,  Up: Miscellaneous
797
798 5.0: Major & Minor Modes
799 ========================
800
801 Q5.0.1: How can I do source code highlighting using font-lock?
802 --------------------------------------------------------------
803
804    For most modes, font-lock is already set up and just needs to be
805 turned on.  This can be done by `M-x font-lock-mode', or by having
806 XEmacs automatically start it by adding lines like:
807
808      (add-hook 'emacs-lisp-mode-hook    'turn-on-font-lock)
809      (add-hook 'dired-mode-hook 'turn-on-font-lock)
810
811    to your `.emacs'.  See the file `etc/sample.emacs' for more examples.
812
813    See also `Syntax Highlighting' from the `Options' menu.  Remember to
814 save options.
815
816 \1f
817 File: xemacs-faq.info,  Node: Q5.0.2,  Next: Q5.0.3,  Prev: Q5.0.1,  Up: Miscellaneous
818
819 Q5.0.2: I do not like cc-mode.  How do I use the old c-mode?
820 ------------------------------------------------------------
821
822    Well, first off, consider if you really want to do this.  cc-mode is
823 much more powerful than the old c-mode.  If you're having trouble
824 getting your old offsets to work, try using `c-set-offset' instead.
825 You might also consider using the package `cc-compat'.
826
827    But, if you still insist, add the following lines to your `.emacs':
828
829      (fmakunbound 'c-mode)
830      (makunbound 'c-mode-map)
831      (fmakunbound 'c++-mode)
832      (makunbound 'c++-mode-map)
833      (makunbound 'c-style-alist)
834      (load-library "old-c-mode")
835      (load-library "old-c++-mode")
836
837    This must be done before any other reference is made to either
838 c-mode or c++-mode.
839
840 \1f
841 File: xemacs-faq.info,  Node: Q5.0.3,  Next: Q5.0.4,  Prev: Q5.0.2,  Up: Miscellaneous
842
843 Q5.0.3: How do I get `More' Syntax Highlighting on by default?
844 --------------------------------------------------------------
845
846    Use the following code in your `.emacs':
847
848      (setq-default font-lock-maximum-decoration t)
849
850    In versions of XEmacs prior to 19.14, you had to use a kludgy
851 solution like this:
852
853      (setq c-font-lock-keywords c-font-lock-keywords-2
854            c++-font-lock-keywords c++-font-lock-keywords-2
855            lisp-font-lock-keywords lisp-font-lock-keywords-2)
856
857    It will work for C, C++ and Lisp.
858
859    See also `Syntax Highlighting' from the `Options' menu.  Remember to
860 save options.
861
862 \1f
863 File: xemacs-faq.info,  Node: Q5.0.4,  Next: Q5.0.5,  Prev: Q5.0.3,  Up: Miscellaneous
864
865 Q5.0.4: How can I enable auto-indent?
866 -------------------------------------
867
868    Put the following line in your `.emacs':
869
870      (setq indent-line-function 'indent-relative-maybe)
871
872    If you want to get fancy, try the `filladapt' package available
873 standard with XEmacs.  Put this into your `.emacs':
874
875      (require 'filladapt)
876      (add-hook 'text-mode-hook    'turn-on-filladapt-mode)
877      ;;; and others ...
878
879    You can customize filling and adaptive filling with Customize.
880 Select from the `Options' menu
881 `Customize->Emacs->->Editing->Fill->Fill...'  or type `M-x customize
882 <RET> fill <RET>'.
883
884    Note that well-behaving text-lookalike modes will run
885 `text-mode-hook' by default (e.g. that's what Message does).  For the
886 nasty ones, you'll have to provide the `add-hook's yourself.
887
888    Please note that the `fa-extras' package is no longer useful.
889
890 \1f
891 File: xemacs-faq.info,  Node: Q5.0.5,  Next: Q5.0.6,  Prev: Q5.0.4,  Up: Miscellaneous
892
893 Q5.0.5: How can I get XEmacs to come up in text/auto-fill mode by default?
894 --------------------------------------------------------------------------
895
896    Try the following lisp in your `.emacs':
897
898      (setq default-major-mode 'text-mode)
899      (setq text-mode-hook 'turn-on-auto-fill)
900
901    *WARNING*: note that changing the value of `default-major-mode' from
902 `fundamental-mode' can break a large amount of built-in code that
903 expects newly created buffers to be in `fundamental-mode'.  (Changing
904 from `fundamental-mode' to `text-mode' might not wreak too much havoc,
905 but changing to something more exotic like a lisp-mode would break many
906 Emacs packages).
907
908    Note that Emacs by default starts up in buffer `*scratch*' in
909 `initial-major-mode', which defaults to `lisp-interaction-mode'. Thus
910 adding the following form to your Emacs init file will cause the
911 initial `*scratch*' buffer to be put into auto-fill'ed `text-mode':
912
913      (setq initial-major-mode
914            (lambda ()
915              (text-mode)
916              (turn-on-auto-fill)))
917
918    Note that after your init file is loaded, if
919 `inhibit-startup-message' is `nil' (the default) and the startup buffer
920 is `*scratch*' then the startup message will be inserted into
921 `*scratch*'; it will be removed after a timeout by erasing the entire
922 `*scratch*' buffer.  Keep in mind this default usage of `*scratch*' if
923 you desire any prior manipulation of `*scratch*' from within your Emacs
924 init file. In particular, anything you insert into `*scratch*' from
925 your init file will be later erased. Also, if you change the mode of
926 the `*scratch*' buffer, be sure that this will not interfere with
927 possible later insertion of the startup message (e.g. if you put
928 `*scratch*' into a nonstandard mode that has automatic font lock rules,
929 then the startup message might get fontified in a strange foreign
930 manner, e.g. as code in some programming language).
931
932 \1f
933 File: xemacs-faq.info,  Node: Q5.0.6,  Next: Q5.0.7,  Prev: Q5.0.5,  Up: Miscellaneous
934
935 Q5.0.6: How do I start up a second shell buffer?
936 ------------------------------------------------
937
938    In the `*shell*' buffer:
939
940      M-x rename-buffer <RET> *shell-1* <RET>
941      M-x shell RET
942
943    This will then start a second shell.  The key is that no buffer named
944 `*shell*' can exist.  It might be preferable to use `M-x
945 rename-uniquely' to rename the `*shell*' buffer instead of `M-x
946 rename-buffer'.
947
948    Alternately, you can set the variable `shell-multiple-shells'.  If
949 the value of this variable is non-nil, each time shell mode is invoked,
950 a new shell is made
951
952 \1f
953 File: xemacs-faq.info,  Node: Q5.0.7,  Next: Q5.0.8,  Prev: Q5.0.6,  Up: Miscellaneous
954
955 Q5.0.7: Telnet from shell filters too much
956 ------------------------------------------
957
958    I'm using the Emacs `M-x shell' function, and I would like to invoke
959 and use a telnet session within it.  Everything works fine except that
960 now all `^M''s are filtered out by Emacs.  Fixes?
961
962    Use `M-x rsh' or `M-x telnet' to open remote sessions rather than
963 doing rsh or telnet within the local shell buffer.  Starting with
964 XEmacs-20.3 you can also use `M-x ssh' to open secure remote session if
965 you have `ssh' installed.
966
967 \1f
968 File: xemacs-faq.info,  Node: Q5.0.8,  Next: Q5.0.9,  Prev: Q5.0.7,  Up: Miscellaneous
969
970 Q5.0.8: Why does edt emulation not work?
971 ----------------------------------------
972
973    We don't know, but you can use tpu-edt emulation instead, which works
974 fine and is a little fancier than the standard edt emulation.  To do
975 this, add the following line to your `.emacs':
976
977      (tpu-edt)
978
979    If you don't want it to replace `C-h' with an edt-style help menu
980 add this as well:
981
982      (global-set-key [(control h)] 'help-for-help)
983
984 \1f
985 File: xemacs-faq.info,  Node: Q5.0.9,  Next: Q5.0.10,  Prev: Q5.0.8,  Up: Miscellaneous
986
987 Q5.0.9: How can I emulate VI and use it as my default mode?
988 -----------------------------------------------------------
989
990    Our recommended VI emulator is viper. To make viper-mode the default,
991 add this to your `.emacs':
992
993      (viper-mode)
994
995    Michael Kifer <kifer@CS.SunySB.EDU> writes:
996
997      This should be added as close to the top of `.emacs' as you can get
998      it, otherwise some minor modes may not get viper-ized.
999
1000 \1f
1001 File: xemacs-faq.info,  Node: Q5.0.10,  Next: Q5.0.11,  Prev: Q5.0.9,  Up: Miscellaneous
1002
1003 Q5.0.10: [This question intentionally left blank]
1004 -------------------------------------------------
1005
1006    Obsolete question, left blank to avoid renumbering
1007
1008 \1f
1009 File: xemacs-faq.info,  Node: Q5.0.11,  Next: Q5.0.12,  Prev: Q5.0.10,  Up: Miscellaneous
1010
1011 Q5.0.11: How do I turn on filladapt for all buffers?
1012 ----------------------------------------------------
1013
1014    Filladapt is a minor mode and minor modes are traditionally off by
1015 default.  The following added to your `.emacs' will turn it on for all
1016 buffers:
1017
1018      (setq-default filladapt-mode t)
1019
1020    Use `turn-on-filladapt-mode' to turn Filladapt on in particular
1021 major modes, like this:
1022
1023      (add-hook 'text-mode-hook 'turn-on-filladapt-mode)
1024
1025 \1f
1026 File: xemacs-faq.info,  Node: Q5.0.12,  Next: Q5.0.13,  Prev: Q5.0.11,  Up: Miscellaneous
1027
1028 Q5.0.12: How do I disable gnuserv from opening a new frame?
1029 -----------------------------------------------------------
1030
1031    If you set the `gnuserv-frame' variable to the frame that should be
1032 used to display buffers that are pulled up, a new frame will not be
1033 created. For example, you could put
1034
1035      (setq gnuserv-frame (selected-frame))
1036
1037    early on in your `.emacs', to ensure that the first frame created is
1038 the one used for your gnuserv buffers.
1039
1040    Starting in 19.15, there is an option to set the gnuserv target to
1041 the current frame.  See `Options->"Other Window" Location->Make current
1042 frame gnuserv target'
1043
1044    Starting with XEmacs-20.3 you can also change this with Customize.
1045 Select from the `Options' menu
1046 `Customize->Emacs->Environment->Gnuserv->Gnuserv Frame...' or type `M-x
1047 customize <RET> gnuserv <RET>'.
1048
1049 \1f
1050 File: xemacs-faq.info,  Node: Q5.0.13,  Next: Q5.0.14,  Prev: Q5.0.12,  Up: Miscellaneous
1051
1052 Q5.0.13: How do I start gnuserv so that each subsequent XEmacs is a client?
1053 ---------------------------------------------------------------------------
1054
1055    Put the following in your `.emacs' file to start the server:
1056
1057      (gnuserv-start)
1058
1059    Start your first XEmacs as usual.  After that, you can do:
1060
1061      gnuclient randomfilename
1062
1063    from the command line to get your existing XEmacs process to open a
1064 new frame and visit randomfilename in that window. When you're done
1065 editing randomfilename, hit `C-x #' to kill the buffer and get rid of
1066 the frame.
1067
1068    See also man page of gnuclient.
1069
1070 \1f
1071 File: xemacs-faq.info,  Node: Q5.0.14,  Next: Q5.0.15,  Prev: Q5.0.13,  Up: Miscellaneous
1072
1073 Q5.0.14: Strange things are happening in Shell Mode.
1074 ----------------------------------------------------
1075
1076    Sometimes (i.e. it's not repeatable, and I can't work out why it
1077 happens) when I'm typing into shell mode, I hit return and only a
1078 portion of the command is given to the shell, and a blank prompt is
1079 returned.  If I hit return again, the rest of the previous command is
1080 given to the shell.
1081
1082    Martin Buchholz <martin@xemacs.org> writes:
1083
1084      There is a known problem with interaction between `csh' and the
1085      `filec' option and XEmacs.  You should add the following to your
1086      `.cshrc':
1087
1088           if ( "$TERM" == emacs || "$TERM" == unknown ) unset filec
1089
1090 \1f
1091 File: xemacs-faq.info,  Node: Q5.0.15,  Next: Q5.0.16,  Prev: Q5.0.14,  Up: Miscellaneous
1092
1093 Q5.0.15: Where do I get the latest CC Mode?
1094 -------------------------------------------
1095
1096    Barry A. Warsaw <bwarsaw@cnri.reston.va.us> writes:
1097
1098      This can be had from `http://www.python.org/emacs/'.
1099
1100 \1f
1101 File: xemacs-faq.info,  Node: Q5.0.16,  Next: Q5.0.17,  Prev: Q5.0.15,  Up: Miscellaneous
1102
1103 Q5.0.16: I find auto-show-mode disconcerting.  How do I turn it off?
1104 --------------------------------------------------------------------
1105
1106    `auto-show-mode' controls whether or not a horizontal scrollbar
1107 magically appears when a line is too long to be displayed.  This is
1108 enabled by default.  To turn it off, put the following in your `.emacs':
1109
1110      (setq auto-show-mode nil)
1111      (setq-default auto-show-mode nil)
1112
1113 \1f
1114 File: xemacs-faq.info,  Node: Q5.0.17,  Next: Q5.0.18,  Prev: Q5.0.16,  Up: Miscellaneous
1115
1116 Q5.0.17: How can I get two instances of info?
1117 ---------------------------------------------
1118
1119    You can't.  The `info' package does not provide for multiple info
1120 buffers.
1121
1122 \1f
1123 File: xemacs-faq.info,  Node: Q5.0.18,  Next: Q5.0.19,  Prev: Q5.0.17,  Up: Miscellaneous
1124
1125 Q5.0.18: [This question intentionally left blank]
1126 -------------------------------------------------
1127
1128 \1f
1129 File: xemacs-faq.info,  Node: Q5.0.19,  Next: Q5.0.20,  Prev: Q5.0.18,  Up: Miscellaneous
1130
1131 Q5.0.19: Is there something better than LaTeX mode?
1132 ---------------------------------------------------
1133
1134    David Kastrup <dak@fsnif.neuroinformatik.ruhr-uni-bochum.de> writes:
1135
1136      The standard TeX modes leave much to be desired, and are somewhat
1137      leniently maintained.  Serious TeX users use AUC TeX (*note
1138      Q4.7.1::.).
1139
1140 \1f
1141 File: xemacs-faq.info,  Node: Q5.0.20,  Next: Q5.1.1,  Prev: Q5.0.19,  Up: Miscellaneous
1142
1143 Q5.0.20: Is there a way to start a new XEmacs if there's no gnuserv running, and otherwise use gnuclient?
1144 ---------------------------------------------------------------------------------------------------------
1145
1146    Jan Vroonhof <vroonhof@math.ethz.ch> writes:
1147      Here is one of the solutions, we have this in a script called
1148      `etc/editclient.sh'.
1149            #!/bin/sh
1150            if gnuclient -batch -eval t >/dev/null 2>&1
1151            then
1152              exec gnuclient ${1+"$@"}
1153            else
1154              xemacs -unmapped -f gnuserv-start &
1155              until gnuclient -batch -eval t >/dev/null 2>&1
1156              do
1157                 sleep 1
1158              done
1159              exec gnuclient ${1+"$@"}
1160            fi
1161
1162      Note that there is a known problem when running XEmacs and
1163      'gnuclient -nw' on the same TTY.
1164
1165 \1f
1166 File: xemacs-faq.info,  Node: Q5.1.1,  Next: Q5.1.2,  Prev: Q5.0.20,  Up: Miscellaneous
1167
1168 5.1: Emacs Lisp Programming Techniques
1169 ======================================
1170
1171 Q5.1.1: What is the difference in key sequences between XEmacs and GNU Emacs?
1172 -----------------------------------------------------------------------------
1173
1174    Erik Naggum <clerik@naggum.no> writes;
1175
1176      Emacs has a legacy of keyboards that produced characters with
1177      modifier bits, and therefore map a variety of input systems into
1178      this scheme even today.  XEmacs is instead optimized for X events.
1179      This causes an incompatibility in the way key sequences are
1180      specified, but both Emacs and XEmacs will accept a key sequence as
1181      a vector of lists of modifiers that ends with a key, e.g., to bind
1182      `M-C-a', you would say `[(meta control a)]' in both Emacsen.
1183      XEmacs has an abbreviated form for a single key, just (meta
1184      control a).  Emacs has an abbreviated form for the Control and the
1185      Meta modifiers to string-characters (the ASCII characters), as in
1186      `\M-\C-a'.  XEmacs users need to be aware that the abbreviated
1187      form works only for one-character key sequences, while Emacs users
1188      need to be aware that the string-character is rather limited.
1189      Specifically, the string-character can accommodate only 256
1190      different values, 128 of which have the Meta modifier and 128 of
1191      which have not.  In each of these blocks, only 32 characters have
1192      the Control modifier.  Whereas `[(meta control A)]' differs from
1193      `[(meta control a)]' because the case differs, `\M-\C-a' and
1194      `\M-\C-A' do not.  Programmers are advised to use the full common
1195      form, both because it is more readable and less error-prone, and
1196      because it is supported by both Emacsen.
1197
1198    Another (even safer) way to be sure of the key-sequences is to use
1199 the `read-kbd-macro' function, which takes a string like `C-c <up>',
1200 and converts it to the internal key representation of the Emacs you
1201 use.  The function is available both on XEmacs and GNU Emacs.
1202
1203 \1f
1204 File: xemacs-faq.info,  Node: Q5.1.2,  Next: Q5.1.3,  Prev: Q5.1.1,  Up: Miscellaneous
1205
1206 Q5.1.2: Can I generate "fake" keyboard events?
1207 ----------------------------------------------
1208
1209    I wonder if there is an interactive function that can generate
1210 "fake" keyboard events.  This way, I could simply map them inside
1211 XEmacs.
1212
1213    This seems to work:
1214
1215      (defun cg--generate-char-event (ch)
1216        "Generate an event, as if ch has been typed"
1217        (dispatch-event (character-to-event ch)))
1218      
1219      ;;  Backspace and Delete stuff
1220      (global-set-key [backspace]
1221        (lambda () (interactive) (cg--generate-char-event 127)))
1222      (global-set-key [unknown_keysym_0x4]
1223        (lambda () (interactive) (cg--generate-char-event 4)))
1224
1225 \1f
1226 File: xemacs-faq.info,  Node: Q5.1.3,  Next: Q5.1.4,  Prev: Q5.1.2,  Up: Miscellaneous
1227
1228 Q5.1.3: Could you explain `read-kbd-macro' in more detail?
1229 ----------------------------------------------------------
1230
1231    The `read-kbd-macro' function returns the internal Emacs
1232 representation of a human-readable string (which is its argument).
1233 Thus:
1234
1235      (read-kbd-macro "C-c C-a")
1236      => [(control ?c) (control ?a)]
1237      
1238      (read-kbd-macro "C-c C-. <up>")
1239      => [(control ?c) (control ?.) up]
1240
1241    In GNU Emacs the same forms will be evaluated to what GNU Emacs
1242 understands internally--the sequences `"\C-x\C-c"' and `[3 67108910
1243 up]', respectively.
1244
1245    The exact "human-readable" syntax is defined in the docstring of
1246 `edmacro-mode'.  I'll repeat it here, for completeness.
1247
1248      Format of keyboard macros during editing:
1249
1250      Text is divided into "words" separated by whitespace.  Except for
1251      the words described below, the characters of each word go directly
1252      as characters of the macro.  The whitespace that separates words is
1253      ignored.  Whitespace in the macro must be written explicitly, as in
1254      `foo <SPC> bar <RET>'.
1255
1256         * The special words `RET', `SPC', `TAB', `DEL', `LFD', `ESC',
1257           and `NUL' represent special control characters.  The words
1258           must be written in uppercase.
1259
1260         * A word in angle brackets, e.g., `<return>', `<down>', or
1261           `<f1>', represents a function key.  (Note that in the standard
1262           configuration, the function key `<return>' and the control key
1263           <RET> are synonymous.)  You can use angle brackets on the
1264           words <RET>, <SPC>, etc., but they are not required there.
1265
1266         * Keys can be written by their ASCII code, using a backslash
1267           followed by up to six octal digits.  This is the only way to
1268           represent keys with codes above \377.
1269
1270         * One or more prefixes `M-' (meta), `C-' (control), `S-'
1271           (shift), `A-' (alt), `H-' (hyper), and `s-' (super) may
1272           precede a character or key notation.  For function keys, the
1273           prefixes may go inside or outside of the brackets: `C-<down>'
1274           == `<C-down>'.  The prefixes may be written in any order:
1275           `M-C-x' == `C-M-x'.
1276
1277           Prefixes are not allowed on multi-key words, e.g., `C-abc',
1278           except that the Meta prefix is allowed on a sequence of
1279           digits and optional minus sign: `M--123' == `M-- M-1 M-2 M-3'.
1280
1281         * The `^' notation for control characters also works: `^M' ==
1282           `C-m'.
1283
1284         * Double angle brackets enclose command names: `<<next-line>>'
1285           is shorthand for `M-x next-line <RET>'.
1286
1287         * Finally, `REM' or `;;' causes the rest of the line to be
1288           ignored as a comment.
1289
1290      Any word may be prefixed by a multiplier in the form of a decimal
1291      number and `*': `3*<right>' == `<right> <right> <right>', and
1292      `10*foo' == `foofoofoofoofoofoofoofoofoofoo'.
1293
1294      Multiple text keys can normally be strung together to form a word,
1295      but you may need to add whitespace if the word would look like one
1296      of the above notations: `; ; ;' is a keyboard macro with three
1297      semicolons, but `;;;' is a comment.  Likewise, `\ 1 2 3' is four
1298      keys but `\123' is a single key written in octal, and `< right >'
1299      is seven keys but `<right>' is a single function key.  When in
1300      doubt, use whitespace.
1301
1302 \1f
1303 File: xemacs-faq.info,  Node: Q5.1.4,  Next: Q5.1.5,  Prev: Q5.1.3,  Up: Miscellaneous
1304
1305 Q5.1.4: What is the performance hit of `let'?
1306 ---------------------------------------------
1307
1308    In most cases, not noticeable.  Besides, there's no avoiding
1309 `let'--you have to bind your local variables, after all.  Some pose a
1310 question whether to nest `let's, or use one `let' per function.  I
1311 think because of clarity and maintenance (and possible future
1312 implementation), `let'-s should be used (nested) in a way to provide
1313 the clearest code.
1314