This commit was generated by cvs2svn to compensate for changes in r6453,
[chise/xemacs-chise.git.1] / info / xemacs.info-12
1 This is Info file ../../info/xemacs.info, produced by Makeinfo version
2 1.68 from the input file xemacs.texi.
3
4 INFO-DIR-SECTION XEmacs Editor
5 START-INFO-DIR-ENTRY
6 * XEmacs: (xemacs).             XEmacs Editor.
7 END-INFO-DIR-ENTRY
8
9    This file documents the XEmacs editor.
10
11    Copyright (C) 1985, 1986, 1988 Richard M. Stallman.  Copyright (C)
12 1991, 1992, 1993, 1994 Lucid, Inc.  Copyright (C) 1993, 1994 Sun
13 Microsystems, Inc.  Copyright (C) 1995 Amdahl Corporation.
14
15    Permission is granted to make and distribute verbatim copies of this
16 manual provided the copyright notice and this permission notice are
17 preserved on all copies.
18
19    Permission is granted to copy and distribute modified versions of
20 this manual under the conditions for verbatim copying, provided also
21 that the sections entitled "The GNU Manifesto", "Distribution" and "GNU
22 General Public License" are included exactly as in the original, and
23 provided that the entire resulting derived work is distributed under the
24 terms of a permission notice identical to this one.
25
26    Permission is granted to copy and distribute translations of this
27 manual into another language, under the above conditions for modified
28 versions, except that the sections entitled "The GNU Manifesto",
29 "Distribution" and "GNU General Public License" may be included in a
30 translation approved by the author instead of in the original English.
31
32 \1f
33 File: xemacs.info,  Node: Loading,  Next: Compiling Libraries,  Prev: Lisp Libraries,  Up: Lisp Libraries
34
35 Loading Libraries
36 -----------------
37
38 `M-x load-file FILE'
39      Load the file FILE of Lisp code.
40
41 `M-x load-library LIBRARY'
42      Load the library named LIBRARY.
43
44 `M-x locate-library LIBRARY &optional NOSUFFIX'
45      Show the full path name of Emacs library LIBRARY.
46
47    To execute a file of Emacs Lisp, use `M-x load-file'.  This command
48 reads the file name you provide in the minibuffer, then executes the
49 contents of that file as Lisp code.  It is not necessary to visit the
50 file first; in fact, this command reads the file as found on disk, not
51 the text in an Emacs buffer.
52
53    Once a file of Lisp code is installed in the Emacs Lisp library
54 directories, users can load it using `M-x load-library'.  Programs can
55 load it by calling `load-library', or with `load', a more primitive
56 function that is similar but accepts some additional arguments.
57
58    `M-x load-library' differs from `M-x load-file' in that it searches
59 a sequence of directories and tries three file names in each directory.
60 The three names are: first, the specified name with `.elc' appended;
61 second, the name with `.el' appended; third, the specified name alone.
62 A `.elc' file would be the result of compiling the Lisp file into byte
63 code;  if possible, it is loaded in preference to the Lisp file itself
64 because the compiled file loads and runs faster.
65
66    Because the argument to `load-library' is usually not in itself a
67 valid file name, file name completion is not available.  In fact, when
68 using this command, you usually do not know exactly what file name will
69 be used.
70
71    The sequence of directories searched by `M-x load-library' is
72 specified by the variable `load-path', a list of strings that are
73 directory names.  The elements of this list may not begin with "`~'",
74 so you must call `expand-file-name' on them before adding them to the
75 list.  The default value of the list contains the directory where the
76 Lisp code for Emacs itself is stored.  If you have libraries of your
77 own, put them in a single directory and add that directory to
78 `load-path'.  `nil' in this list stands for the current default
79 directory, but it is probably not a good idea to put `nil' in the list.
80 If you start wishing that `nil' were in the list, you should probably
81 use `M-x load-file' for this case.
82
83    The variable is initialized by the EMACSLOADPATH environment
84 variable. If no value is specified, the variable takes the default value
85 specified in the file `paths.h' when Emacs was built. If a path isn't
86 specified in `paths.h', a default value is obtained from the file
87 system, near the directory in which the Emacs executable resides.
88
89    Like `M-x load-library', `M-x locate-library' searches the
90 directories in `load-path' to find the file that `M-x load-library'
91 would load.  If the optional second argument NOSUFFIX is non-`nil', the
92 suffixes `.elc' or `.el' are not added to the specified name LIBRARY
93 (like calling `load' instead of `load-library').
94
95    You often do not have to give any command to load a library, because
96 the commands defined in the library are set up to "autoload" that
97 library.  Running any of those commands causes `load' to be called to
98 load the library; this replaces the autoload definitions with the real
99 ones from the library.
100
101    If autoloading a file does not finish, either because of an error or
102 because of a `C-g' quit, all function definitions made by the file are
103 undone automatically.  So are any calls to `provide'.  As a
104 consequence, the entire file is loaded a second time if you use one of
105 the autoloadable commands again.  This prevents problems when the
106 command is no longer autoloading but is working incorrectly because the
107 file was only partially loaded.  Function definitions are undone only
108 for autoloading; explicit calls to `load' do not undo anything if
109 loading is not completed.
110
111    The variable `after-load-alist' takes an alist of expressions to be
112 evaluated when particular files are loaded.  Each element has the form
113 `(FILENAME forms...)'.  When `load' is run and the filename argument is
114 FILENAME, the forms in the corresponding element are executed at the
115 end of loading.
116
117    FILENAME must match exactly.  Normally FILENAME is the name of a
118 library, with no directory specified, since that is how load is
119 normally called.  An error in `forms' does not undo the load, but it
120 does prevent execution of the rest of the `forms'.
121
122 \1f
123 File: xemacs.info,  Node: Compiling Libraries,  Next: Mocklisp,  Prev: Loading,  Up: Lisp Libraries
124
125 Compiling Libraries
126 -------------------
127
128    Emacs Lisp code can be compiled into byte-code which loads faster,
129 takes up less space when loaded, and executes faster.
130
131 `M-x batch-byte-compile'
132      Run byte-compile-file on the files remaining on the command line.
133
134 `M-x byte-compile-buffer &optional BUFFER'
135      Byte-compile and evaluate contents of BUFFER (default is current
136      buffer).
137
138 `M-x byte-compile-file'
139      Compile a file of Lisp code named FILENAME into a file of byte
140      code.
141
142 `M-x byte-compile-and-load-file FILENAME'
143      Compile a file of Lisp code named FILENAME into a file of byte
144      code and load it.
145
146 `M-x byte-recompile-directory DIRECTORY'
147      Recompile every `.el' file in DIRECTORY that needs recompilation.
148
149 `M-x disassemble'
150      Print disassembled code for OBJECT on (optional) STREAM.
151
152 `M-x make-obsolete FUNCTION NEW'
153      Make the byte-compiler warn that FUNCTION is obsolete and NEW
154      should be used instead.
155
156    `byte-compile-file' creates a byte-code compiled file from an
157 Emacs-Lisp source file.  The default argument for this function is the
158 file visited in the current buffer.  The function reads the specified
159 file, compiles it into byte code, and writes an output file whose name
160 is made by appending `c' to the input file name.  Thus, the file
161 `rmail.el' would be compiled into `rmail.elc'. To compile a file of
162 Lisp code named FILENAME into a file of byte code and then load it, use
163 `byte-compile-and-load-file'. To compile and evaluate Lisp code in a
164 given buffer, use `byte-compile-buffer'.
165
166    To recompile all changed Lisp files in a directory, use `M-x
167 byte-recompile-directory'.  Specify just the directory name as an
168 argument.  Each `.el' file that has been byte-compiled before is
169 byte-compiled again if it has changed since the previous compilation.
170 A numeric argument to this command tells it to offer to compile each
171 `.el' file that has not been compiled yet.  You must answer `y' or `n'
172 to each offer.
173
174    You can use the function `batch-byte-compile' to invoke Emacs
175 non-interactively from the shell to do byte compilation.  When you use
176 this function, the files to be compiled are specified with command-line
177 arguments.  Use a shell command of the form:
178
179      emacs -batch -f batch-byte-compile FILES...
180
181    Directory names may also be given as arguments; in that case,
182 `byte-recompile-directory' is invoked on each such directory.
183 `batch-byte-compile' uses all remaining command-line arguments as file
184 or directory names, then kills the Emacs process.
185
186    `M-x disassemble' explains the result of byte compilation.  Its
187 argument is a function name.  It displays the byte-compiled code in a
188 help window in symbolic form, one instruction per line.  If the
189 instruction refers to a variable or constant, that is shown, too.
190
191 \1f
192 File: xemacs.info,  Node: Mocklisp,  Prev: Compiling Libraries,  Up: Lisp Libraries
193
194 Converting Mocklisp to Lisp
195 ---------------------------
196
197    XEmacs can run Mocklisp files by converting them to Emacs Lisp first.
198 To convert a Mocklisp file, visit it and then type `M-x
199 convert-mocklisp-buffer'.  Then save the resulting buffer of Lisp file
200 in a file whose name ends in `.el' and use the new file as a Lisp
201 library.
202
203    You cannot currently byte-compile converted Mocklisp code.  The
204 reason is that converted Mocklisp code uses some special Lisp features
205 to deal with Mocklisp's incompatible ideas of how arguments are
206 evaluated and which values signify "true" or "false".
207
208 \1f
209 File: xemacs.info,  Node: Lisp Eval,  Next: Lisp Debug,  Prev: Lisp Libraries,  Up: Running
210
211 Evaluating Emacs-Lisp Expressions
212 =================================
213
214    Lisp programs intended to be run in Emacs should be edited in
215 Emacs-Lisp mode; this will happen automatically for file names ending in
216 `.el'.  By contrast, Lisp mode itself should be used for editing Lisp
217 programs intended for other Lisp systems.  Emacs-Lisp mode can be
218 selected with the command `M-x emacs-lisp-mode'.
219
220    For testing of Lisp programs to run in Emacs, it is useful to be able
221 to evaluate part of the program as it is found in the Emacs buffer.  For
222 example, if you change the text of a Lisp function definition and then
223 evaluate the definition, Emacs installs the change for future calls to
224 the function.  Evaluation of Lisp expressions is also useful in any
225 kind of editing task for invoking non-interactive functions (functions
226 that are not commands).
227
228 `M-<ESC>'
229      Read a Lisp expression in the minibuffer, evaluate it, and print
230      the value in the minibuffer (`eval-expression').
231
232 `C-x C-e'
233      Evaluate the Lisp expression before point, and print the value in
234      the minibuffer (`eval-last-sexp').
235
236 `C-M-x'
237      Evaluate the defun containing point or after point, and print the
238      value in the minibuffer (`eval-defun').
239
240 `M-x eval-region'
241      Evaluate all the Lisp expressions in the region.
242
243 `M-x eval-current-buffer'
244      Evaluate all the Lisp expressions in the buffer.
245
246    `M-<ESC>' (`eval-expression') is the most basic command for
247 evaluating a Lisp expression interactively.  It reads the expression
248 using the minibuffer, so you can execute any expression on a buffer
249 regardless of what the buffer contains.  When evaluation is complete,
250 the current buffer is once again the buffer that was current when
251 `M-<ESC>' was typed.
252
253    `M-<ESC>' can easily confuse users, especially on keyboards with
254 autorepeat, where it can result from holding down the <ESC> key for too
255 long.  Therefore, `eval-expression' is normally a disabled command.
256 Attempting to use this command asks for confirmation and gives you the
257 option of enabling it; once you enable the command, you are no longer
258 required to confirm.  *Note Disabling::.
259
260    In Emacs-Lisp mode, the key `C-M-x' is bound to the function
261 `eval-defun', which parses the defun containing point or following point
262 as a Lisp expression and evaluates it.  The value is printed in the echo
263 area.  This command is convenient for installing in the Lisp environment
264 changes that you have just made in the text of a function definition.
265
266    The command `C-x C-e' (`eval-last-sexp') performs a similar job but
267 is available in all major modes, not just Emacs-Lisp mode.  It finds
268 the sexp before point, reads it as a Lisp expression, evaluates it, and
269 prints the value in the echo area.  It is sometimes useful to type in an
270 expression and then, with point still after it, type `C-x C-e'.
271
272    If `C-M-x' or `C-x C-e' are given a numeric argument, they print the
273 value by inserting it into the current buffer at point, rather than in
274 the echo area.  The argument value does not matter.
275
276    The most general command for evaluating Lisp expressions from a
277 buffer is `eval-region'.  `M-x eval-region' parses the text of the
278 region as one or more Lisp expressions, evaluating them one by one.
279 `M-x eval-current-buffer' is similar, but it evaluates the entire
280 buffer.  This is a reasonable way to install the contents of a file of
281 Lisp code that you are just ready to test.  After finding and fixing a
282 bug, use `C-M-x' on each function that you change, to keep the Lisp
283 world in step with the source file.
284
285 \1f
286 File: xemacs.info,  Node: Lisp Debug,  Next: Lisp Interaction,  Prev: Lisp Eval,  Up: Running
287
288 The Emacs-Lisp Debugger
289 =======================
290
291    XEmacs contains a debugger for Lisp programs executing inside it.
292 This debugger is normally not used; many commands frequently get Lisp
293 errors when invoked in inappropriate contexts (such as `C-f' at the end
294 of the buffer) and it would be unpleasant to enter a special debugging
295 mode in this case.  When you want to make Lisp errors invoke the
296 debugger, you must set the variable `debug-on-error' to non-`nil'.
297 Quitting with `C-g' is not considered an error, and `debug-on-error'
298 has no effect on the handling of `C-g'.  However, if you set
299 `debug-on-quit' to be non-`nil', `C-g' will invoke the debugger.  This
300 can be useful for debugging an infinite loop; type `C-g' once the loop
301 has had time to reach its steady state.  `debug-on-quit' has no effect
302 on errors.
303
304    You can make Emacs enter the debugger when a specified function is
305 called or at a particular place in Lisp code.  Use `M-x debug-on-entry'
306 with argument FUN-NAME to have Emacs enter the debugger as soon as
307 FUN-NAME is called. Use `M-x cancel-debug-on-entry' to make the
308 function stop entering the debugger when called.  (Redefining the
309 function also does this.)  To enter the debugger from some other place
310 in Lisp code, you must insert the expression `(debug)' there and
311 install the changed code with `C-M-x'.  *Note Lisp Eval::.
312
313    When the debugger is entered, it displays the previously selected
314 buffer in one window and a buffer named `*Backtrace*' in another
315 window.  The backtrace buffer contains one line for each level of Lisp
316 function execution currently going on.  At the beginning of the buffer
317 is a message describing the reason that the debugger was invoked, for
318 example, an error message if it was invoked due to an error.
319
320    The backtrace buffer is read-only and is in Backtrace mode, a special
321 major mode in which letters are defined as debugger commands.  The
322 usual Emacs editing commands are available; you can switch windows to
323 examine the buffer that was being edited at the time of the error, and
324 you can switch buffers, visit files, and perform any other editing
325 operations.  However, the debugger is a recursive editing level (*note
326 Recursive Edit::.); it is a good idea to return to the backtrace buffer
327 and explictly exit the debugger when you don't want to use it any more.
328 Exiting the debugger kills the backtrace buffer.
329
330    The contents of the backtrace buffer show you the functions that are
331 executing and the arguments that were given to them.  It also allows you
332 to specify a stack frame by moving point to the line describing that
333 frame.  The frame whose line point is on is considered the "current
334 frame".  Some of the debugger commands operate on the current frame.
335 Debugger commands are mainly used for stepping through code one
336 expression at a time.  Here is a list of them:
337
338 `c'
339      Exit the debugger and continue execution.  In most cases,
340      execution of the program continues as if the debugger had never
341      been entered (aside from the effect of any variables or data
342      structures you may have changed while inside the debugger).  This
343      includes entry to the debugger due to function entry or exit,
344      explicit invocation, and quitting or certain errors.  Most errors
345      cannot be continued; trying to continue an error usually causes
346      the same error to occur again.
347
348 `d'
349      Continue execution, but enter the debugger the next time a Lisp
350      function is called.  This allows you to step through the
351      subexpressions of an expression, and see what the subexpressions
352      do and what values they compute.
353
354      When you enter the debugger this way, Emacs flags the stack frame
355      for the function call from which you entered.  The same function
356      is then called when you exit the frame.  To cancel this flag, use
357      `u'.
358
359 `b'
360      Set up to enter the debugger when the current frame is exited.
361      Frames that invoke the debugger on exit are flagged with stars.
362
363 `u'
364      Don't enter the debugger when the current frame is exited.  This
365      cancels a `b' command on a frame.
366
367 `e'
368      Read a Lisp expression in the minibuffer, evaluate it, and print
369      the value in the echo area.  This is equivalent to the command
370      `M-<ESC>', except that `e' is not normally disabled like `M-<ESC>'.
371
372 `q'
373      Terminate the program being debugged; return to top-level Emacs
374      command execution.
375
376      If the debugger was entered due to a `C-g' but you really want to
377      quit, not to debug, use the `q' command.
378
379 `r'
380      Return a value from the debugger.  The value is computed by
381      reading an expression with the minibuffer and evaluating it.
382
383      The value returned by the debugger makes a difference when the
384      debugger was invoked due to exit from a Lisp call frame (as
385      requested with `b'); then the value specified in the `r' command
386      is used as the value of that frame.
387
388      The debugger's return value also matters with many errors.  For
389      example, `wrong-type-argument' errors will use the debugger's
390      return value instead of the invalid argument; `no-catch' errors
391      will use the debugger value as a throw tag instead of the tag that
392      was not found.  If an error was signaled by calling the Lisp
393      function `signal', the debugger's return value is returned as the
394      value of `signal'.
395
396 \1f
397 File: xemacs.info,  Node: Lisp Interaction,  Next: External Lisp,  Prev: Lisp Debug,  Up: Running
398
399 Lisp Interaction Buffers
400 ========================
401
402    The buffer `*scratch*', which is selected when Emacs starts up, is
403 provided for evaluating Lisp expressions interactively inside Emacs.
404 Both the expressions you evaluate and their output goes in the buffer.
405
406    The `*scratch*' buffer's major mode is Lisp Interaction mode, which
407 is the same as Emacs-Lisp mode except for one command, <LFD>.  In
408 Emacs-Lisp mode, <LFD> is an indentation command.  In Lisp Interaction
409 mode, <LFD> is bound to `eval-print-last-sexp'.  This function reads
410 the Lisp expression before point, evaluates it, and inserts the value
411 in printed representation before point.
412
413    The way to use the `*scratch*' buffer is to insert Lisp expressions
414 at the end, ending each one with <LFD> so that it will be evaluated.
415 The result is a complete typescript of the expressions you have
416 evaluated and their values.
417
418    The rationale for this feature is that Emacs must have a buffer when
419 it starts up, but that buffer is not useful for editing files since a
420 new buffer is made for every file that you visit.  The Lisp interpreter
421 typescript is the most useful thing I can think of for the initial
422 buffer to do.  `M-x lisp-interaction-mode' will put any buffer in Lisp
423 Interaction mode.
424
425 \1f
426 File: xemacs.info,  Node: External Lisp,  Prev: Lisp Interaction,  Up: Running
427
428 Running an External Lisp
429 ========================
430
431    Emacs has facilities for running programs in other Lisp systems.
432 You can run a Lisp process as an inferior of Emacs, and pass
433 expressions to it to be evaluated.  You can also pass changed function
434 definitions directly from the Emacs buffers in which you edit the Lisp
435 programs to the inferior Lisp process.
436
437    To run an inferior Lisp process, type `M-x run-lisp'.  This runs the
438 program named `lisp', the same program you would run by typing `lisp'
439 as a shell command, with both input and output going through an Emacs
440 buffer named `*lisp*'.  In other words, any "terminal output" from Lisp
441 will go into the buffer, advancing point, and any "terminal input" for
442 Lisp comes from text in the buffer.  To give input to Lisp, go to the
443 end of the buffer and type the input, terminated by <RET>.  The
444 `*lisp*' buffer is in Inferior Lisp mode, which has all the special
445 characteristics of Lisp mode and Shell mode (*note Shell Mode::.).
446
447    Use Lisp mode to run the source files of programs in external Lisps.
448 You can select this mode with `M-x lisp-mode'.  It is used automatically
449 for files whose names end in `.l' or `.lisp', as most Lisp systems
450 usually expect.
451
452    When you edit a function in a Lisp program you are running, the
453 easiest way to send the changed definition to the inferior Lisp process
454 is the key `C-M-x'.  In Lisp mode, this key runs the function
455 `lisp-send-defun', which finds the defun around or following point and
456 sends it as input to the Lisp process.  (Emacs can send input to any
457 inferior process regardless of what buffer is current.)
458
459    Contrast the meanings of `C-M-x' in Lisp mode (for editing programs
460 to be run in another Lisp system) and Emacs-Lisp mode (for editing Lisp
461 programs to be run in Emacs): in both modes it has the effect of
462 installing the function definition that point is in, but the way of
463 doing so is different according to where the relevant Lisp environment
464 is found.  *Note Lisp Modes::.
465
466 \1f
467 File: xemacs.info,  Node: Packages,  Next: Abbrevs,  Prev: Running,  Up: Top
468
469 Packages
470 ========
471
472    The XEmacs 21 distribution comes only with a very basic set of
473 built-in modes and packages.  Most of the packages that were part of
474 the distribution of earlier versions of XEmacs are now available
475 separately.  The installer as well as the user can choose which
476 packages to install; the actual installation process is easy.  This
477 gives an installer the ability to tailor an XEmacs installation for
478 local needs with safe removal of unnecessary code.
479
480 * Menu:
481
482 * Package Terminology:: Understanding different kinds of packages.
483 * Using Packages::      How to install and use packages.
484 * Building Packages::   Building packages from sources.
485
486 \1f
487 File: xemacs.info,  Node: Package Terminology,  Next: Using Packages,  Up: Packages
488
489 Package Flavors
490 ---------------
491
492    There are two main flavors of packages.
493
494    * Regular Packages A regular package is one in which multiple files
495      are involved and one may not in general safely remove any of them.
496
497    * Single-File Packages A single-file package is an aggregate
498      collection of thematically related but otherwise independent lisp
499      files.  These files are bundled together for download convenience
500      and individual files may be deleted at will without any loss of
501      functionality.
502
503 Package Distributions
504 ---------------------
505
506    XEmacs Lisp packages are distributed in two ways, depending on the
507 intended use.  Binary Packages are for installers and end-users and may
508 be installed directly into an XEmacs package directory.  Source Packages
509 are for developers and include all files necessary for rebuilding
510 bytecompiled lisp and creating tarballs for distribution.
511
512 Binary Packages
513 ---------------
514
515    Binary packages may be installed directly into an XEmacs package
516 hierarchy.
517
518 Source Packages
519 ---------------
520
521    Source packages contain all of the Package author's (where
522 appropriate in regular packages) source code plus all of the files
523 necessary to build distribution tarballs (Unix Tar format files,
524 gzipped for space savings).
525
526 \1f
527 File: xemacs.info,  Node: Using Packages,  Next: Building Packages,  Prev: Package Terminology,  Up: Packages
528
529 Getting Started
530 ---------------
531
532    When you first download XEmacs 21, you will usually first grab the
533 "core distribution", a file called `xemacs-21.0.tar.gz'. (Replace the
534 21.0 by the current version number.)  The core distribution contains
535 the sources of XEmacs and a minimal set of Emacs Lisp files, which are
536 in the subdirectory named `lisp'.  This subdirectory used to contain
537 all Emacs Lisp files distributed with XEmacs.  Now, to conserve disk
538 space, most non-essential packages were made optional.
539
540 Choosing the Packages You Need
541 ------------------------------
542
543    The available packages can currently be found in the same ftp
544 directory where you grabbed the core distribution from, and are located
545 in the subdirectory `packages/binary-packages'.  Package file names
546 follow the naming convention `<package-name>-<version>-pkg.tar.gz'.
547
548    If you have EFS *Note (EFS)::, packages can be installed over the
549 network.  Alternatively, if you have copies of the packages locally,
550 you can install packages from a local disk or CDROM.
551
552    The file `etc/PACKAGES' in the core distribution contains a list of
553 the packages available at the time of the XEmacs release.  Packages are
554 also listed on the `Options' menu under:
555
556         Options->Customize->Emacs->Packages
557
558    However, don't select any of these menu picks unless you actually
559 want to install the given package (and have properly configured your
560 system to do so).
561
562    You can also get a list of available packages, and whether or not
563 they are installed, using the visual package browser and installer.
564 You can access it via the menus:
565
566         Options->Manage Packages->List & Install
567
568    Or, you can get to it via the keyboard:
569
570      M-x pui-list-packages
571
572    Hint to system administrators of multi-user systems: it might be a
573 good idea to install all packages and not interfere with the wishes of
574 your users.
575
576    If you can't find which package provides the feature you require, try
577 using the `package-get-package-provider' function. Eg., if you know
578 that you need `thingatpt', type:
579
580      M-x package-get-package-provider RET thingatpt
581
582    which will return something like (fsf-compat "1.06"). You can the use
583 one of the methods above for installing the package you want.
584
585 XEmacs and Installing Packages
586 ------------------------------
587
588    Normally, packages are installed over the network, using EFS *Note
589 (EFS)::.  However, you may not have network access, or you may already
590 have some or all of the packages on a local disk, such as a CDROM.  If
591 you want to install from a local disk, you must first tell XEmacs where
592 to find the package binaries.  This is done by adding a line like the
593 following to your `.emacs' file:
594
595      (setq package-get-remote (cons (list nil "/my/path/to/package/binaries")
596                                     package-get-remote))
597
598    Here, you'd change `/my/path/to/package/binaries' to be the path to
599 your local package binaries.  Next, restart XEmacs, and you're ready to
600 go (advanced users can just re-evaluate the sexp).
601
602    If you are installing from a temporary, one-time directory, you can
603 also add these directory names to `package-get-remote' using:
604
605         M-x pui-add-install-directory
606
607    Note, however, that any directories added using this function are not
608 saved; this information will be lost when you quit XEmacs.
609
610    If you're going to install over the network, you only have to insure
611 that EFS *Note (EFS):: works, and that it can get outside a firewall, if
612 you happen to be behind one.  You shouldn't have to do anything else;
613 XEmacs already knows where to go. However you can add your own mirrors
614 to this list. See `package-get-remote'.
615
616    The easiest way to install a package is to use the visual package
617 browser and installer, using the menu pick:
618
619         Options->Manage Packages->List & Install
620    or
621         Options->Manage Packages->Using Custom->Select-> ...
622
623    You can also access it using the keyboard:
624
625      M-x pui-list-packages
626
627    The visual package browser will then display a list of all packages.
628 Help information will be displayed at the very bottom of the buffer; you
629 may have to scroll down to see it.  You can also press `?' to get the
630 same help.  From this buffer, you can tell the package status by the
631 character in the first column:
632
633 `-'
634      The package has not been installed.
635
636 `*'
637      The package has been installed, but a newer version is available.
638      The current version is out-of-date.
639
640 `+'
641      The package has been marked for installation/update.
642
643    If there is no character in the first column, the package has been
644 installed and is up-to-date.
645
646    From here, you can select or unselect packages for installation using
647 the <RET> key, the `Mouse-2' button or selecting "Select" from the
648 (Popup) Menu.  Once you've finished selecting the packages, you can
649 press the `x' key (or use the menu) to actually install the packages.
650 Note that you will have to restart XEmacs for XEmacs to recognize any
651 new packages.
652
653    Key summary:
654
655 `?'
656      Display simple help.
657
658 `<RET>'
659 `<Mouse-2>'
660      Toggle between selecting and unselecting a package for
661      installation.
662
663 `x'
664      Install selected packages.
665
666 `<SPC>'
667      View, in the minibuffer, additional information about the package,
668      such as the package date (not the build date) and the package
669      author.  Moving the mouse over a package name will also do the
670      same thing.
671
672 `v'
673      Toggle between verbose and non-verbose package display.
674
675 `g'
676      Refresh the package display.
677
678 `q'
679      Kill the package buffer.
680
681    Moving the mouse over a package will also cause additional
682 information about the package to be displayed in the minibuffer.
683
684 Other package installation interfaces
685 -------------------------------------
686
687    For an alternative package interface, you can select packages from
688 the customize menus, under:
689
690         Options->Customize->Emacs->Packages-> ...
691    or
692         Options->Manage Packages->Using Custom->Select-> ...
693
694    Set their state to on, and then do:
695
696         Options->Manage Packages->Using Custom->Update Packages
697
698    This will automatically retrieve the packages you have selected from
699 the XEmacs ftp site or your local disk, and install them into XEmacs.
700 Additionally it will update any packages you already have installed to
701 the newest version.  Note that if a package is newly installed you will
702 have to restart XEmacs for the change to take effect.
703
704    You can also install packages using a semi-manual interface:
705
706      M-x package-get-all <return>
707
708    Enter the name of the package (e.g., `prog-modes'), and XEmacs will
709 search for the latest version (as listed in the lisp file
710 `lisp/package-get-base.el'), and install it and any packages that it
711 depends upon.
712
713 Manual Binary Package Installation
714 ----------------------------------
715
716    Pre-compiled, binary packages can be installed in either a system
717 package directory (this is determined when XEmacs is compiled), or in
718 one of the following subdirectories of your `$HOME' directory:
719
720      ~/.xemacs/mule-packages
721      ~/.xemacs/xemacs-packages
722
723    Packages in the former directory will only be found by a Mule-enabled
724 XEmacs.
725
726    XEmacs does not have to be running to install binary packages,
727 although XEmacs will not know about any newly-installed packages until
728 you restart XEmacs.  Note, however, that installing a newer version of a
729 package while XEmacs is running could cause strange errors in XEmacs;
730 it's best to exit XEmacs before upgrading an existing package.
731
732    To install binary packages manually:
733
734   1. Download the package(s) that you want to install.  Each binary
735      package will typically be a gzip'd tarball.
736
737   2. Decide where to install the packages: in the system package
738      directory, or in `~/.xemacs/mule-packages' or
739      `~/.xemacs/xemacs-packages', respectively.  If you want to install
740      the packages in the system package directory, make sure you can
741      write into that directory.  If you want to install in your `$HOME'
742      directory, create the directory, `~/.xemacs/mule-packages' or
743      `~/.xemacs/xemacs-packages', respectively.
744
745   3. Next, `cd' to the directory under which you want to install the
746      package(s).
747
748   4. From this directory, uncompress and extract each of the gzip'd
749      tarballs that you downloaded in step 1.  Unix and Cygnus cygwin
750      users will typically do this using the commands:
751
752                 gunzip < package.tar.gz | tar xvf -
753
754      Above, replace `package.tar.gz' with the filename of the package
755      that you downloaded in step 1.
756
757      Of course, if you use GNU `tar', you could also use:
758
759                 tar xvzf package.tar.gz
760
761   5. That's it.  Quit and restart XEmacs to get it to recognize any new
762      or changed packages.
763
764
765 \1f
766 File: xemacs.info,  Node: Building Packages,  Prev: Using Packages,  Up: Packages
767
768    Source packages are available from the `packages/source-packages'
769 subdirectory of your favorite XEmacs distribution site.  Alternatively,
770 they are available via CVS from `cvs.xemacs.org'.  Look at
771 `http://cvs.xemacs.org' for instructions.
772
773 Prerequisites for Building Source Packages
774 ------------------------------------------
775
776    You must have GNU `cp', GNU `install' (or a BSD compatible `install'
777 program) GNU `make' (3.75 or later preferred), `makeinfo' (1.68 from
778 `texinfo-3.11' or later required), GNU `tar' and XEmacs 21.0.  The
779 source packages will untar into a correct directory structure.  At the
780 top level you must have `XEmacs.rules' and `package-compile.el'.  These
781 files are available from the XEmacs FTP site from the same place you
782 obtained your source package distributions.
783
784 What You Can Do With Source Packages
785 ------------------------------------
786
787    NB:  A global build operation doesn't exist yet as of 13 January
788 1998.
789
790    Source packages are most useful for creating XEmacs package tarballs
791 for installation into your own XEmacs installations or for distributing
792 to others.
793
794    Supported operations from `make' are:
795
796 `clean'
797      Remove all built files except `auto-autoloads.el' and
798      `custom-load.el'.
799
800 `distclean'
801      Remove XEmacs backups as well as the files deleted by `make clean'.
802
803 `all'
804      Bytecompile all files, build and bytecompile byproduct files like
805      `auto-autoloads.el' and `custom-load.el'.  Create info version of
806      TeXinfo documentation if present.
807
808 `srckit'
809      Usually aliased to `make srckit-std'.  This does a `make
810      distclean' and creates a package source tarball in the staging
811      directory.  This is generally only of use for package maintainers.
812
813 `binkit'
814      May be aliased to `binkit-sourceonly', `binkit-sourceinfo',
815      `binkit-sourcedata', or `binkit-sourcedatainfo'. `sourceonly'
816      indicates there is nothing to install in a data directory or info
817      directory.  `sourceinfo' indicates that source and info files are
818      to be installed.  `sourcedata' indicates that source and etc
819      (data) files are to be installed.  `sourcedatainfo' indicates
820      source, etc (data), and info files are to be installed.  A few
821      packages have needs beyond the basic templates so this is not yet
822      complete.
823
824 `dist'
825      Runs the rules `srckit' followed by `binkit'.  This is primarily
826      of use by XEmacs maintainers producing files for distribution.
827
828 \1f
829 File: xemacs.info,  Node: Abbrevs,  Next: Picture,  Prev: Packages,  Up: Top
830
831 Abbrevs
832 *******
833
834    An "abbrev" is a word which "expands" into some different text.
835 Abbrevs are defined by the user to expand in specific ways.  For
836 example, you might define `foo' as an abbrev expanding to `find outer
837 otter'.  With this abbrev defined, you would be able to get `find outer
838 otter ' into the buffer by typing `f o o <SPC>'.
839
840    Abbrevs expand only when Abbrev mode (a minor mode) is enabled.
841 Disabling Abbrev mode does not cause abbrev definitions to be discarded,
842 but they do not expand until Abbrev mode is enabled again.  The command
843 `M-x abbrev-mode' toggles Abbrev mode; with a numeric argument, it
844 turns Abbrev mode on if the argument is positive, off otherwise.  *Note
845 Minor Modes::.  `abbrev-mode' is also a variable; Abbrev mode is on
846 when the variable is non-`nil'.  The variable `abbrev-mode'
847 automatically becomes local to the current buffer when it is set.
848
849    Abbrev definitions can be "mode-specific"--active only in one major
850 mode.  Abbrevs can also have "global" definitions that are active in
851 all major modes.  The same abbrev can have a global definition and
852 various mode-specific definitions for different major modes.  A
853 mode-specific definition for the current major mode overrides a global
854 definition.
855
856    You can define Abbrevs interactively during an editing session.  You
857 can also save lists of abbrev definitions in files and reload them in
858 later sessions.  Some users keep extensive lists of abbrevs that they
859 load in every session.
860
861    A second kind of abbreviation facility is called the "dynamic
862 expansion".  Dynamic abbrev expansion happens only when you give an
863 explicit command and the result of the expansion depends only on the
864 current contents of the buffer.  *Note Dynamic Abbrevs::.
865
866 * Menu:
867
868 * Defining Abbrevs::  Defining an abbrev, so it will expand when typed.
869 * Expanding Abbrevs:: Controlling expansion: prefixes, canceling expansion.
870 * Editing Abbrevs::   Viewing or editing the entire list of defined abbrevs.
871 * Saving Abbrevs::    Saving the entire list of abbrevs for another session.
872 * Dynamic Abbrevs::   Abbreviations for words already in the buffer.
873
874 \1f
875 File: xemacs.info,  Node: Defining Abbrevs,  Next: Expanding Abbrevs,  Prev: Abbrevs,  Up: Abbrevs
876
877 Defining Abbrevs
878 ================
879
880 `C-x a g'
881      Define an abbrev to expand into some text before point
882      (`add-global-abbrev').
883
884 `C-x a l'
885      Similar, but define an abbrev available only in the current major
886      mode (`add-mode-abbrev').
887
888 `C-x a i g'
889      Define a word in the buffer as an abbrev
890      (`inverse-add-global-abbrev').
891
892 `C-x a i l'
893      Define a word in the buffer as a mode-specific abbrev
894      (`inverse-add-mode-abbrev').
895
896 `M-x kill-all-abbrevs'
897      After this command, no abbrev definitions remain in effect.
898
899    The usual way to define an abbrev is to enter the text you want the
900 abbrev to expand to, position point after it, and type `C-x a g'
901 (`add-global-abbrev').  This reads the abbrev itself using the
902 minibuffer, and then defines it as an abbrev for one or more words
903 before point.  Use a numeric argument to say how many words before point
904 should be taken as the expansion.  For example, to define the abbrev
905 `foo' as in the example above, insert the text `find outer otter', then
906 type
907 `C-u 3 C-x a g f o o <RET>'.
908
909    An argument of zero to `C-x a g' means to use the contents of the
910 region as the expansion of the abbrev being defined.
911
912    The command `C-x a l' (`add-mode-abbrev') is similar, but defines a
913 mode-specific abbrev.  Mode-specific abbrevs are active only in a
914 particular major mode.  `C-x a l' defines an abbrev for the major mode
915 in effect at the time `C-x a l' is typed.  The arguments work the same
916 way they do for `C-x a g'.
917
918    If the text of an abbrev you want is already in the buffer instead of
919 the expansion, use command `C-x a i g' (`inverse-add-global-abbrev')
920 instead of `C-x a g', or use `C-x a i l' (`inverse-add-mode-abbrev')
921 instead of `C-x a l'.  These commands are called "inverse" because they
922 invert the meaning of the argument found in the buffer and the argument
923 read using the minibuffer.
924
925    To change the definition of an abbrev, just add the new definition.
926 You will be asked to confirm if the abbrev has a prior definition.  To
927 remove an abbrev definition, give a negative argument to `C-x a g' or
928 `C-x a l'.  You must choose the command to specify whether to kill a
929 global definition or a mode-specific definition for the current mode,
930 since those two definitions are independent for one abbrev.
931
932    `M-x kill-all-abbrevs' removes all existing abbrev definitions.
933
934 \1f
935 File: xemacs.info,  Node: Expanding Abbrevs,  Next: Editing Abbrevs,  Prev: Defining Abbrevs,  Up: Abbrevs
936
937 Controlling Abbrev Expansion
938 ============================
939
940    An abbrev expands whenever it is in a buffer just before point and
941 you type a self-inserting punctuation character (<SPC>, comma, etc.).
942 Most often an abbrev is used by inserting the abbrev followed by
943 punctuation.
944
945    Abbrev expansion preserves case; thus, `foo' expands into `find
946 outer otter', `Foo' into `Find outer otter', and `FOO' into `FIND OUTER
947 OTTER' or `Find Outer Otter' according to the variable
948 `abbrev-all-caps' (a non-`nil' value chooses the first of the two
949 expansions).
950
951    Two commands are available to control abbrev expansion:
952
953 `M-''
954      Separate a prefix from a following abbrev to be expanded
955      (`abbrev-prefix-mark').
956
957 `C-x a e'
958      Expand the abbrev before point (`expand-abbrev').  This is
959      effective even when Abbrev mode is not enabled.
960
961 `M-x unexpand-abbrev'
962      Undo last abbrev expansion.
963
964 `M-x expand-region-abbrevs'
965      Expand some or all abbrevs found in the region.
966
967    You may wish to expand an abbrev with a prefix attached.  For
968 example, if `cnst' expands into `construction', you may want to use it
969 to enter `reconstruction'.  It does not work to type `recnst', because
970 that is not necessarily a defined abbrev.  Instead, you can use the
971 command `M-'' (`abbrev-prefix-mark') between the prefix `re' and the
972 abbrev `cnst'.  First, insert `re'.  Then type `M-''; this inserts a
973 minus sign in the buffer to indicate that it has done its work.  Then
974 insert the abbrev `cnst'.  The buffer now contains `re-cnst'.  Now
975 insert a punctuation character to expand the abbrev `cnst' into
976 `construction'.  The minus sign is deleted at this point by `M-''.  The
977 resulting text is the desired `reconstruction'.
978
979    If you actually want the text of the abbrev in the buffer, rather
980 than its expansion, insert the following punctuation with `C-q'.  Thus,
981 `foo C-q -' leaves `foo-' in the buffer.
982
983    If you expand an abbrev by mistake, you can undo the expansion
984 (replace the expansion by the original abbrev text) with `M-x
985 unexpand-abbrev'.  You can also use `C-_' (`undo') to undo the
986 expansion; but that will first undo the insertion of the punctuation
987 character.
988
989    `M-x expand-region-abbrevs' searches through the region for defined
990 abbrevs, and  offers to replace each one it finds with its expansion.
991 This command is useful if you have typed text using abbrevs but forgot
992 to turn on Abbrev mode first.  It may also be useful together with a
993 special set of abbrev definitions for making several global
994 replacements at once.  The command is effective even if Abbrev mode is
995 not enabled.
996
997 \1f
998 File: xemacs.info,  Node: Editing Abbrevs,  Next: Saving Abbrevs,  Prev: Expanding Abbrevs,  Up: Abbrevs
999
1000 Examining and Editing Abbrevs
1001 =============================
1002
1003 `M-x list-abbrevs'
1004      Print a list of all abbrev definitions.
1005
1006 `M-x edit-abbrevs'
1007      Edit a list of abbrevs; you can add, alter, or remove definitions.
1008
1009    The output from `M-x list-abbrevs' looks like this:
1010
1011      (lisp-mode-abbrev-table)
1012      "dk"              0    "define-key"
1013      (global-abbrev-table)
1014      "dfn"             0    "definition"
1015
1016 (Some blank lines of no semantic significance, and some other abbrev
1017 tables, have been omitted.)
1018
1019    A line containing a name in parentheses is the header for abbrevs in
1020 a particular abbrev table; `global-abbrev-table' contains all the global
1021 abbrevs, and the other abbrev tables that are named after major modes
1022 contain the mode-specific abbrevs.
1023
1024    Within each abbrev table, each non-blank line defines one abbrev.
1025 The word at the beginning is the abbrev.  The number that appears is
1026 the number of times the abbrev has been expanded.  Emacs keeps track of
1027 this to help you see which abbrevs you actually use, in case you want
1028 to eliminate those that you don't use often.  The string at the end of
1029 the line is the expansion.
1030
1031    `M-x edit-abbrevs' allows you to add, change or kill abbrev
1032 definitions by editing a list of them in an Emacs buffer.  The list has
1033 the format described above.  The buffer of abbrevs is called
1034 `*Abbrevs*', and is in Edit-Abbrevs mode.  This mode redefines the key
1035 `C-c C-c' to install the abbrev definitions as specified in the buffer.
1036 The  `edit-abbrevs-redefine' command does this.  Any abbrevs not
1037 described in the buffer are eliminated when this is done.
1038
1039    `edit-abbrevs' is actually the same as `list-abbrevs', except that
1040 it selects the buffer `*Abbrevs*' whereas `list-abbrevs' merely
1041 displays it in another window.
1042
1043 \1f
1044 File: xemacs.info,  Node: Saving Abbrevs,  Next: Dynamic Abbrevs,  Prev: Editing Abbrevs,  Up: Abbrevs
1045
1046 Saving Abbrevs
1047 ==============
1048
1049    These commands allow you to keep abbrev definitions between editing
1050 sessions.
1051
1052 `M-x write-abbrev-file'
1053      Write a file describing all defined abbrevs.
1054
1055 `M-x read-abbrev-file'
1056      Read such an abbrev file and define abbrevs as specified there.
1057
1058 `M-x quietly-read-abbrev-file'
1059      Similar, but do not display a message about what is going on.
1060
1061 `M-x define-abbrevs'
1062      Define abbrevs from buffer.
1063
1064 `M-x insert-abbrevs'
1065      Insert all abbrevs and their expansions into the buffer.
1066
1067    Use `M-x write-abbrev-file' to save abbrev definitions for use in a
1068 later session.  The command reads a file name using the minibuffer and
1069 writes a description of all current abbrev definitions into the
1070 specified file.  The text stored in the file looks like the output of
1071 `M-x list-abbrevs'.
1072
1073    `M-x read-abbrev-file' prompts for a file name using the minibuffer
1074 and reads the specified file, defining abbrevs according to its
1075 contents.  `M-x quietly-read-abbrev-file' is the same but does not
1076 display a message in the echo area; it is actually useful primarily in
1077 the `.emacs' file.  If you give an empty argument to either of these
1078 functions, the file name Emacs uses is the value of the variable
1079 `abbrev-file-name', which is by default `"~/.abbrev_defs"'.
1080
1081    Emacs offers to save abbrevs automatically if you have changed any of
1082 them, whenever it offers to save all files (for `C-x s' or `C-x C-c').
1083 Set the variable `save-abbrevs' to `nil' to inhibit this feature.
1084
1085    The commands `M-x insert-abbrevs' and `M-x define-abbrevs' are
1086 similar to the previous commands but work on text in an Emacs buffer.
1087 `M-x insert-abbrevs' inserts text into the current buffer before point,
1088 describing all current abbrev definitions; `M-x define-abbrevs' parses
1089 the entire current buffer and defines abbrevs accordingly.
1090
1091 \1f
1092 File: xemacs.info,  Node: Dynamic Abbrevs,  Prev: Saving Abbrevs,  Up: Abbrevs
1093
1094 Dynamic Abbrev Expansion
1095 ========================
1096
1097    The abbrev facility described above operates automatically as you
1098 insert text, but all abbrevs must be defined explicitly.  By contrast,
1099 "dynamic abbrevs" allow the meanings of abbrevs to be determined
1100 automatically from the contents of the buffer, but dynamic abbrev
1101 expansion happens only when you request it explicitly.
1102
1103 `M-/'
1104      Expand the word in the buffer before point as a "dynamic abbrev",
1105      by searching in the buffer for words starting with that
1106      abbreviation (`dabbrev-expand').
1107
1108    For example, if the buffer contains `does this follow ' and you type
1109 `f o M-/', the effect is to insert `follow' because that is the last
1110 word in the buffer that starts with `fo'.  A numeric argument to `M-/'
1111 says to take the second, third, etc. distinct expansion found looking
1112 backward from point.  Repeating `M-/' searches for an alternative
1113 expansion by looking farther back.  After the entire buffer before
1114 point has been considered, the buffer after point is searched.
1115
1116    Dynamic abbrev expansion is completely independent of Abbrev mode;
1117 the expansion of a word with `M-/' is completely independent of whether
1118 it has a definition as an ordinary abbrev.
1119
1120 \1f
1121 File: xemacs.info,  Node: Picture,  Next: Sending Mail,  Prev: Abbrevs,  Up: Top
1122
1123 Editing Pictures
1124 ****************
1125
1126    If you want to create a picture made out of text characters (for
1127 example, a picture of the division of a register into fields, as a
1128 comment in a program), use the command `edit-picture' to enter Picture
1129 mode.
1130
1131    In Picture mode, editing is based on the "quarter-plane" model of
1132 text.  In this model, the text characters lie studded on an area that
1133 stretches infinitely far to the right and downward.  The concept of the
1134 end of a line does not exist in this model; the most you can say is
1135 where the last non-blank character on the line is found.
1136
1137    Of course, Emacs really always considers text as a sequence of
1138 characters, and lines really do have ends.  But in Picture mode most
1139 frequently-used keys are rebound to commands that simulate the
1140 quarter-plane model of text.  They do this by inserting spaces or by
1141 converting tabs to spaces.
1142
1143    Most of the basic editing commands of Emacs are redefined by Picture
1144 mode to do essentially the same thing but in a quarter-plane way.  In
1145 addition, Picture mode defines various keys starting with the `C-c'
1146 prefix to run special picture editing commands.
1147
1148    One of these keys, `C-c C-c', is pretty important.  Often a picture
1149 is part of a larger file that is usually edited in some other major
1150 mode.  `M-x edit-picture' records the name of the previous major mode.
1151 You can then use the `C-c C-c' command (`picture-mode-exit') to restore
1152 that mode.  `C-c C-c' also deletes spaces from the ends of lines,
1153 unless you give it a numeric argument.
1154
1155    The commands used in Picture mode all work in other modes (provided
1156 the `picture' library is loaded), but are only  bound to keys in
1157 Picture mode.  Note that the descriptions below talk of moving "one
1158 column" and so on, but all the picture mode commands handle numeric
1159 arguments as their normal equivalents do.
1160
1161    Turning on Picture mode calls the value of the variable
1162 `picture-mode-hook' as a function, with no arguments, if that value
1163 exists and is non-`nil'.
1164
1165 * Menu:
1166
1167 * Basic Picture::         Basic concepts and simple commands of Picture Mode.
1168 * Insert in Picture::     Controlling direction of cursor motion
1169                            after "self-inserting" characters.
1170 * Tabs in Picture::       Various features for tab stops and indentation.
1171 * Rectangles in Picture:: Clearing and superimposing rectangles.
1172