Sync up with r21-4-11-chise-0_21-=cns11643-6.
[chise/xemacs-chise.git-] / info / xemacs-faq.info-5
index b4a96f9..d57a66e 100644 (file)
-This is ../info/xemacs-faq.info, produced by makeinfo version 4.0 from
+This is ../info/xemacs-faq.info, produced by makeinfo version 4.0b from
 xemacs-faq.texi.
 
 INFO-DIR-SECTION XEmacs Editor
 START-INFO-DIR-ENTRY
-* FAQ: (xemacs-faq).           XEmacs FAQ.
+* FAQ: (xemacs-faq).            XEmacs FAQ.
 END-INFO-DIR-ENTRY
 
 \1f
-File: xemacs-faq.info,  Node: Q5.1.5,  Next: Q5.1.6,  Prev: Q5.1.4,  Up: Miscellaneous
-
-Q5.1.5: What is the recommended use of `setq'?
-----------------------------------------------
-
-   * Global variables
-
-     You will typically `defvar' your global variable to a default
-     value, and use `setq' to set it later.
-
-     It is never a good practice to `setq' user variables (like
-     `case-fold-search', etc.), as it ignores the user's choice
-     unconditionally.  Note that `defvar' doesn't change the value of a
-     variable if it was bound previously.  If you wish to change a
-     user-variable temporarily, use `let':
-
-          (let ((case-fold-search nil))
-            ...                                        ; code with searches that must be case-sensitive
-            ...)
-
-     You will notice the user-variables by their docstrings beginning
-     with an asterisk (a convention).
-
-   * Local variables
-
-     Bind them with `let', which will unbind them (or restore their
-     previous value, if they were bound) after exiting from the `let'
-     form.  Change the value of local variables with `setq' or whatever
-     you like (e.g. `incf', `setf' and such).  The `let' form can even
-     return one of its local variables.
-
-     Typical usage:
-
-          ;; iterate through the elements of the list returned by
-          ;; `hairy-function-that-returns-list'
-          (let ((l (hairy-function-that-returns-list)))
-            (while l
-              ... do something with (car l) ...
-              (setq l (cdr l))))
-
-     Another typical usage includes building a value simply to work
-     with it.
-
-          ;; Build the mode keymap out of the key-translation-alist
-          (let ((inbox (file-truename (expand-file-name box)))
-                (i 0))
-            ... code dealing with inbox ...
-            inbox)
-
-     This piece of code uses the local variable `inbox', which becomes
-     unbound (or regains old value) after exiting the form.  The form
-     also returns the value of `inbox', which can be reused, for
-     instance:
-
-          (setq foo-processed-inbox
-                (let .....))
-
-\1f
-File: xemacs-faq.info,  Node: Q5.1.6,  Next: Q5.1.7,  Prev: Q5.1.5,  Up: Miscellaneous
-
-Q5.1.6: What is the typical misuse of `setq' ?
-----------------------------------------------
-
-   A typical misuse is probably `setq'ing a variable that was meant to
-be local.  Such a variable will remain bound forever, never to be
-garbage-collected.  For example, the code doing:
-
-     (defun my-function (whatever)
-       (setq a nil)
-       ... build a large list ...
-       ... and exit ...)
-
-   does a bad thing, as `a' will keep consuming memory, never to be
-unbound.  The correct thing is to do it like this:
-
-     (defun my-function (whatever)
-       (let (a)                                ; default initialization is to nil
-         ... build a large list ...
-         ... and exit, unbinding `a' in the process  ...)
-
-   Not only is this prettier syntactically, but it makes it possible for
-Emacs to garbage-collect the objects which `a' used to reference.
-
-   Note that even global variables should not be `setq'ed without
-`defvar'ing them first, because the byte-compiler issues warnings.  The
-reason for the warning is the following:
-
-     (defun flurgoze nil)                      ; ok, global internal variable
-     ...
-     
-     (setq flurghoze t)                        ; ops!  a typo, but semantically correct.
-                                       ; however, the byte-compiler warns.
-     
-     While compiling toplevel forms:
-     ** assignment to free variable flurghoze
-
-\1f
-File: xemacs-faq.info,  Node: Q5.1.7,  Next: Q5.1.8,  Prev: Q5.1.6,  Up: Miscellaneous
-
-Q5.1.7: I like the the `do' form of cl, does it slow things down?
------------------------------------------------------------------
-
-   It shouldn't.  Here is what Dave Gillespie has to say about cl.el
-performance:
-
-     Many of the advanced features of this package, such as `defun*',
-     `loop', and `setf', are implemented as Lisp macros.  In
-     byte-compiled code, these complex notations will be expanded into
-     equivalent Lisp code which is simple and efficient.  For example,
-     the forms
-
-          (incf i n)
-          (push x (car p))
-
-     are expanded at compile-time to the Lisp forms
-
-          (setq i (+ i n))
-          (setcar p (cons x (car p)))
-
-     which are the most efficient ways of doing these respective
-     operations in Lisp.  Thus, there is no performance penalty for
-     using the more readable `incf' and `push' forms in your compiled
-     code.
-
-     _Interpreted_ code, on the other hand, must expand these macros
-     every time they are executed.  For this reason it is strongly
-     recommended that code making heavy use of macros be compiled.  (The
-     features labelled "Special Form" instead of "Function" in this
-     manual are macros.)  A loop using `incf' a hundred times will
-     execute considerably faster if compiled, and will also
-     garbage-collect less because the macro expansion will not have to
-     be generated, used, and thrown away a hundred times.
-
-     You can find out how a macro expands by using the `cl-prettyexpand'
-     function.
-
-\1f
-File: xemacs-faq.info,  Node: Q5.1.8,  Next: Q5.1.9,  Prev: Q5.1.7,  Up: Miscellaneous
-
-Q5.1.8: I like recursion, does it slow things down?
----------------------------------------------------
-
-   Yes.  Emacs byte-compiler cannot do much to optimize recursion.  But
-think well whether this is a real concern in Emacs.  Much of the Emacs
-slowness comes from internal mechanisms such as redisplay, or from the
-fact that it is an interpreter.
-
-   Please try not to make your code much uglier to gain a very small
-speed gain.  It's not usually worth it.
-
-\1f
 File: xemacs-faq.info,  Node: Q5.1.9,  Next: Q5.1.10,  Prev: Q5.1.8,  Up: Miscellaneous
 
 Q5.1.9: How do I put a glyph as annotation in a buffer?
@@ -233,7 +82,7 @@ Q5.2.1: How do I turn off the sound?
      (setq bell-volume 0)
      (setq sound-alist nil)
 
-   That will make your XEmacs totally silent - even the default ding
+   That will make your XEmacs totally silent--even the default ding
 sound (TTY beep on TTY-s) will be gone.
 
    Starting with XEmacs-20.2 you can also change these with Customize.
@@ -334,7 +183,7 @@ alive again.
 expressions.  It was fixed in 19.13.  For earlier versions of XEmacs,
 have a look at your `.emacs' file.  You will probably have a line like:
 
-     (add-hook 'postscript-mode-hook   'turn-on-font-lock)
+     (add-hook 'postscript-mode-hook 'turn-on-font-lock)
 
    Take it out, restart XEmacs, and it won't try to fontify your
 postscript files anymore.
@@ -558,8 +407,8 @@ Q5.3.11: How do I add new Info directories?
    You use something like:
 
      (setq Info-directory-list (cons
-                          (expand-file-name "~/info")
-                          Info-default-directory-list))
+                                (expand-file-name "~/info")
+                                Info-default-directory-list))
 
    David Masterson <davidm@prism.kla.com> writes:
 
@@ -642,28 +491,31 @@ Windows port of XEmacs.
 
 
 General Info
-* Q6.0.1::     What is the status of the XEmacs port to Windows?
-* Q6.0.2::     What flavors of MS Windows are supported?
+* Q6.0.1::      What is the status of the XEmacs port to Windows?
+* Q6.0.2::      What flavors of MS Windows are supported?
 * Q6.0.3::      Where are the XEmacs on MS Windows binaries?
-* Q6.0.4::     Does XEmacs on MS Windows require an X server to run?
+* Q6.0.4::      Does XEmacs on MS Windows require an X server to run?
 
 Building XEmacs on MS Windows
-* Q6.1.1::     I decided to run with X.  Where do I get an X server?
-* Q6.1.2::     What compiler do I need to compile XEmacs?
-* Q6.1.3::     How do I compile for the native port?
-* Q6.1.4::     How do I compile for the X port?
-* Q6.1.5::     How do I compile for Cygnus' Cygwin?
-* Q6.1.6::     What do I need for Cygwin?
+* Q6.1.1::      I decided to run with X.  Where do I get an X server?
+* Q6.1.2::      What compiler do I need to compile XEmacs?
+* Q6.1.3::      How do I compile for the native port?
+* Q6.1.4::      How do I compile for the X port?
+* Q6.1.5::      How do I compile for Cygnus' Cygwin?
+* Q6.1.6::      What do I need for Cygwin?
 
 Customization and User Interface
-* Q6.2.1::     How will the port cope with differences in the Windows user interface?
-* Q6.2.2::     How do I change fonts in XEmacs on MS Windows?
-* Q6.2.3::     Where do I put my `.emacs' file?
+* Q6.2.1::      How will the port cope with differences in the Windows user interface?
+* Q6.2.2::      How do I change fonts in XEmacs on MS Windows?
+* Q6.2.3::      Where do I put my `.emacs' file?
 
 Miscellaneous
-* Q6.3.1::     Will XEmacs rename all the win32-* symbols to w32-*?
-* Q6.3.2::     What are the differences between the various MS Windows emacsen?
-* Q6.3.3::     What is the porting team doing at the moment?
+* Q6.3.1::      Will XEmacs rename all the win32-* symbols to w32-*?
+* Q6.3.2::      What are the differences between the various MS Windows emacsen?
+* Q6.3.3::      What is the porting team doing at the moment?
+
+Troubleshooting:
+* Q6.4.1::      XEmacs won't start on Windows. (NEW)
 
 \1f
 File: xemacs-faq.info,  Node: Q6.0.1,  Next: Q6.0.2,  Prev: MS Windows,  Up: MS Windows
@@ -717,7 +569,7 @@ Q6.0.4: Does XEmacs on MS Windows require an X server to run?
    Long answer: XEmacs can be built in several ways in the MS Windows
 environment, some of them requiring an X server and some not.
 
-   One is what we call the "X" port - it requires X libraries to build
+   One is what we call the "X" port--it requires X libraries to build
 and an X server to run.  Internally it uses the Xt event loop and makes
 use of X toolkits.  Its look is quite un-Windowsy, but it works
 reliably and supports all of the graphical features of Unix XEmacs.
@@ -735,7 +587,7 @@ advantage of Cygnus emulation library under Win32, which enables it to
 reuse much of the Unix XEmacs code base, such as processes and network
 support, or internal select() mechanisms.
 
-   Cygwin port supports all display types - TTY, X & MS gui, and can be
+   Cygwin port supports all display types--TTY, X & MS gui, and can be
 built with support for all three.  If you build with ms gui support
 then the Cygwin version uses the majority of the msw code, which is
 mostly related to display.  If you want to build with X support you
@@ -784,8 +636,10 @@ File: xemacs-faq.info,  Node: Q6.1.2,  Next: Q6.1.3,  Prev: Q6.1.1,  Up: MS Wind
 Q6.1.2: What compiler do I need to compile XEmacs?
 --------------------------------------------------
 
-   You need Visual C++ 4.2 or 5.0, with the exception of the Cygwin
-port, which uses Gcc.
+   You need Visual C++ 4.2, 5.0, or 6.0, with the exception of the
+Cygwin port, which uses Gcc.  There is also a MINGW32 port of XEmacs
+(using Gcc, but using native libraries rather than the Cygwin
+libraries).  #### More information about this should be provided.
 
 \1f
 File: xemacs-faq.info,  Node: Q6.1.3,  Next: Q6.1.4,  Prev: Q6.1.2,  Up: MS Windows
@@ -818,8 +672,8 @@ Some problems to watch out for:
    * make sure HOME is set. This controls where you `.emacs' file comes
      from;
 
-   * CYGWIN32 needs to be set to tty for process support work. e.g.
-     CYGWIN32=tty;
+   * CYGWIN needs to be set to tty for process support work. e.g.
+     CYGWIN=tty; (use CYGWIN32=tty under b19 and older.)
 
    * picking up some other grep or other unix like tools can kill
      configure;
@@ -842,14 +696,52 @@ Q6.1.6: What do I need for Cygwin?
 
    `http://sourceware.cygnus.com/cygwin/'
 
-   You will need version b19 or later.
+   You will need version b19 or later.  The latest current version is
+1.1.1.  Other common versions you will see are b20.1.
 
-   You will also need the X libraries.  There are libraries at
-`http://dao.gsfc.nasa.gov/software/grads/win32/X11R6.3/', but these are
-not b19 compatible.  You can get b19 X11R6.3 binaries, as well as
-pre-built ncurses and graphic libraries, from:
+   Another location, one of the mirror sites of the site just mentioned,
+is usually a last faster:
+
+   `ftp://ftp.freesoftware.com/pub/sourceware/cygwin/'
+
+   You can obtain the latest version (currently 1.1.1) from the
+`latest/' subdirectory of either of the above two just-mentioned URL's.
+
+   *WARNING: The version of GCC supplied under `latest/', as of June
+6th, 2000, does not appear to work.  It generates loads of spurious
+preprocessor warnings and errors, which makes it impossible to compile
+XEmacs with it.*
+
+   You will also need the X libraries.  You can get them on the XEmacs
+FTP site at
 
-   `ftp://ftp.parallax.co.uk/pub/andyp/'.
+   `ftp://ftp.xemacs.org/pub/xemacs/aux/cygwin/'
+
+   You will find b19 and b20 versions of the X libraries, plus b19 and
+b20 versions of stuff that should go into `/usr/local/', donated by
+Andy Piper.  This includes pre-built versions of various graphics
+libraries, such as PNG, JPEG, TIFF, and XPM. (Remember, GIF support is
+built-in to XEmacs.)
+
+   (X libraries for v1 and beyond of Cygwin can be found on the Cygwin
+site itself - look in the `xfree/' subdirectory.)
+
+   _NOTE:_ There are two versions of the XPM library provided in Andy's
+packets.  Once is for building with X support, and the other for
+building without.  The X version should work if you're building with
+both X and Windows support.  The two files are called `libXpm-X.a' and
+`libXpm-noX.a' respectively, and you must symlink the appropriate one
+to `libXpm.a'. *CAREFUL:* By default, the non-X version is symlinked
+in.  If you then configure XEmacs with X, you won't run into problems
+until you start compiling `events.c', at which point you'll get strange
+and decidedly non-obvious errors.
+
+   Please see `http://www.xemacs.freeserve.co.uk/' (Andy Piper's home
+page) for more information.
+
+   BTW There are also libraries at
+`http://dao.gsfc.nasa.gov/software/grads/win32/X11R6.3/', but these are
+not b19 compatible, and may in fact be native-compiled.
 
 \1f
 File: xemacs-faq.info,  Node: Q6.2.1,  Next: Q6.2.2,  Prev: Q6.1.6,  Up: MS Windows
@@ -879,8 +771,8 @@ File: xemacs-faq.info,  Node: Q6.2.2,  Next: Q6.2.3,  Prev: Q6.2.1,  Up: MS Wind
 Q6.2.2: How do I change fonts in XEmacs on MS Windows?
 ------------------------------------------------------
 
-   You can change font manually, but not from the menubar, yet. For
-example:
+   In 21.2.*, use the font menu.  In 21.1.*, you can change font
+manually. For example:
 
          (set-face-font 'default "Lucida Console:Regular:10")
          (set-face-font 'modeline "MS Sans Serif:Regular:10")
@@ -995,7 +887,7 @@ Could you briefly explain the differences between them?
 
 
 \1f
-File: xemacs-faq.info,  Node: Q6.3.3,  Prev: Q6.3.2,  Up: MS Windows
+File: xemacs-faq.info,  Node: Q6.3.3,  Next: Q6.4.1,  Prev: Q6.3.2,  Up: MS Windows
 
 Q6.3.3: What is the porting team doing at the moment?
 -----------------------------------------------------
@@ -1003,6 +895,38 @@ Q6.3.3: What is the porting team doing at the moment?
    The porting team is continuing work on the MS Windows-specific code.
 
 \1f
+File: xemacs-faq.info,  Node: Q6.4.1,  Prev: Q6.3.3,  Up: MS Windows
+
+6.3: Troubleshooting
+====================
+
+Q6.4.1 XEmacs won't start on Windows. (NEW)
+-------------------------------------------
+
+   XEmacs relies on a process called "dumping" to generate a working
+executable. Under MS-Windows this process effectively fixes the memory
+addresses of information in the executable. When XEmacs starts up it
+tries to reserve these memory addresses so that the dumping process can
+be reversed - putting the information back at the correct addresses.
+Unfortunately some .dlls (For instance the soundblaster driver) occupy
+memory addresses that can conflict with those needed by the dumped
+XEmacs executable. In this instance XEmacs will fail to start without
+any explanation. Note that this is extremely machine specific.
+
+   21.1.10 includes a fix for this that makes more intelligent guesses
+about which memory addresses will be free, and this should cure the
+problem for most people.  Unfortunately, no binary is yet available for
+this version.  Check back periodically at
+
+   `ftp://ftp.xemacs.org/pub/xemacs/binaries/'.
+
+   21.2 implements "portable dumping" which will eliminate the problem
+altogether.  You might have better luck with the 21.2 beta binary,
+available at
+
+   `ftp://ftp.xemacs.org/pub/xemacs/beta/binaries/'.
+
+\1f
 File: xemacs-faq.info,  Node: Current Events,  Prev: MS Windows,  Up: Top
 
 7 What the Future Holds
@@ -1055,7 +979,7 @@ increased MIME support, and many, many synches with GNU Emacs 20.
    The XEmacs/Mule support has been only seriously tested in a Japanese
 locale, and no doubt many problems still remain.  The support for
 ISO-Latin-1 and Japanese is fairly strong.  MULE support comes at a
-price - about a 30% slowdown from 19.16.  We're making progress on
+price--about a 30% slowdown from 19.16.  We're making progress on
 improving performance and XEmacs 20.3 compiled without Mule (which is
 the default) is definitely faster than XEmacs 19.16.