X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=info%2Fxemacs-faq.info-5;h=d57a66e59e21596f7274d824ec69219acb3ebe5a;hb=e47437dbf7b5331e93c4a2c5de17a3544060d806;hp=f5c6bcf3dfbddab1b4c22dda55c90b5460be0b66;hpb=c8aa261a7bf3eb1389d2e018be1d715f73cacd66;p=chise%2Fxemacs-chise.git- diff --git a/info/xemacs-faq.info-5 b/info/xemacs-faq.info-5 index f5c6bcf..d57a66e 100644 --- a/info/xemacs-faq.info-5 +++ b/info/xemacs-faq.info-5 @@ -1,4 +1,4 @@ -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 @@ -7,247 +7,6 @@ START-INFO-DIR-ENTRY END-INFO-DIR-ENTRY  -File: xemacs-faq.info, Node: Q5.1.3, Next: Q5.1.4, Prev: Q5.1.2, Up: Miscellaneous - -Q5.1.3: Could you explain `read-kbd-macro' in more detail? ----------------------------------------------------------- - - The `read-kbd-macro' function returns the internal Emacs -representation of a human-readable string (which is its argument). -Thus: - - (read-kbd-macro "C-c C-a") - => [(control ?c) (control ?a)] - - (read-kbd-macro "C-c C-. ") - => [(control ?c) (control ?.) up] - - In GNU Emacs the same forms will be evaluated to what GNU Emacs -understands internally--the sequences `"\C-x\C-c"' and `[3 67108910 -up]', respectively. - - The exact "human-readable" syntax is defined in the docstring of -`edmacro-mode'. I'll repeat it here, for completeness. - - Format of keyboard macros during editing: - - Text is divided into "words" separated by whitespace. Except for - the words described below, the characters of each word go directly - as characters of the macro. The whitespace that separates words is - ignored. Whitespace in the macro must be written explicitly, as in - `foo bar '. - - * The special words `RET', `SPC', `TAB', `DEL', `LFD', `ESC', - and `NUL' represent special control characters. The words - must be written in uppercase. - - * A word in angle brackets, e.g., `', `', or - `', represents a function key. (Note that in the standard - configuration, the function key `' and the control key - are synonymous.) You can use angle brackets on the - words , , etc., but they are not required there. - - * Keys can be written by their ASCII code, using a backslash - followed by up to six octal digits. This is the only way to - represent keys with codes above \377. - - * One or more prefixes `M-' (meta), `C-' (control), `S-' - (shift), `A-' (alt), `H-' (hyper), and `s-' (super) may - precede a character or key notation. For function keys, the - prefixes may go inside or outside of the brackets: `C-' - == `'. The prefixes may be written in any order: - `M-C-x' == `C-M-x'. - - Prefixes are not allowed on multi-key words, e.g., `C-abc', - except that the Meta prefix is allowed on a sequence of - digits and optional minus sign: `M--123' == `M-- M-1 M-2 M-3'. - - * The `^' notation for control characters also works: `^M' == - `C-m'. - - * Double angle brackets enclose command names: `<>' - is shorthand for `M-x next-line '. - - * Finally, `REM' or `;;' causes the rest of the line to be - ignored as a comment. - - Any word may be prefixed by a multiplier in the form of a decimal - number and `*': `3*' == ` ', and - `10*foo' == `foofoofoofoofoofoofoofoofoofoo'. - - Multiple text keys can normally be strung together to form a word, - but you may need to add whitespace if the word would look like one - of the above notations: `; ; ;' is a keyboard macro with three - semicolons, but `;;;' is a comment. Likewise, `\ 1 2 3' is four - keys but `\123' is a single key written in octal, and `< right >' - is seven keys but `' is a single function key. When in - doubt, use whitespace. - - -File: xemacs-faq.info, Node: Q5.1.4, Next: Q5.1.5, Prev: Q5.1.3, Up: Miscellaneous - -Q5.1.4: What is the performance hit of `let'? ---------------------------------------------- - - In most cases, not noticeable. Besides, there's no avoiding -`let'--you have to bind your local variables, after all. Some pose a -question whether to nest `let's, or use one `let' per function. I -think because of clarity and maintenance (and possible future -implementation), `let'-s should be used (nested) in a way to provide -the clearest code. - - -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 .....)) - - -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 - - -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. - - -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. - - 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? @@ -755,6 +514,9 @@ Miscellaneous * 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) +  File: xemacs-faq.info, Node: Q6.0.1, Next: Q6.0.2, Prev: MS Windows, Up: MS Windows @@ -874,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.  File: xemacs-faq.info, Node: Q6.1.3, Next: Q6.1.4, Prev: Q6.1.2, Up: MS Windows @@ -908,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; @@ -932,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. - `ftp://ftp.parallax.co.uk/pub/andyp/'. + *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.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.  File: xemacs-faq.info, Node: Q6.2.1, Next: Q6.2.2, Prev: Q6.1.6, Up: MS Windows @@ -1085,7 +887,7 @@ Could you briefly explain the differences between them?  -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? ----------------------------------------------------- @@ -1093,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.  +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/'. + + File: xemacs-faq.info, Node: Current Events, Prev: MS Windows, Up: Top 7 What the Future Holds