1 This is ../info/xemacs.info, produced by makeinfo version 4.0b from
4 INFO-DIR-SECTION XEmacs Editor
6 * XEmacs: (xemacs). XEmacs Editor.
9 This file documents the XEmacs editor.
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.
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.
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.
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.
33 File: xemacs.info, Node: Loading, Next: Compiling Libraries, Prev: Lisp Libraries, Up: Lisp Libraries
39 Load the file FILE of Lisp code.
41 `M-x load-library LIBRARY'
42 Load the library named LIBRARY.
44 `M-x locate-library LIBRARY &optional NOSUFFIX'
45 Show the full path name of Emacs library LIBRARY.
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.
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.
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.
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
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.
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.
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').
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.
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.
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
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'.
123 File: xemacs.info, Node: Compiling Libraries, Next: Mocklisp, Prev: Loading, Up: Lisp Libraries
128 Emacs Lisp code can be compiled into byte-code which loads faster,
129 takes up less space when loaded, and executes faster.
131 `M-x batch-byte-compile'
132 Run byte-compile-file on the files remaining on the command line.
134 `M-x byte-compile-buffer &optional BUFFER'
135 Byte-compile and evaluate contents of BUFFER (default is current
138 `M-x byte-compile-file'
139 Compile a file of Lisp code named FILENAME into a file of byte
142 `M-x byte-compile-and-load-file FILENAME'
143 Compile a file of Lisp code named FILENAME into a file of byte
146 `M-x byte-recompile-directory DIRECTORY'
147 Recompile every `.el' file in DIRECTORY that needs recompilation.
150 Print disassembled code for OBJECT on (optional) STREAM.
152 `M-x make-obsolete FUNCTION NEW'
153 Make the byte-compiler warn that FUNCTION is obsolete and NEW
154 should be used instead.
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'.
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'
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:
179 emacs -batch -f batch-byte-compile FILES...
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.
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.
192 File: xemacs.info, Node: Mocklisp, Prev: Compiling Libraries, Up: Lisp Libraries
194 Converting Mocklisp to Lisp
195 ---------------------------
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
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".
209 File: xemacs.info, Node: Lisp Eval, Next: Lisp Debug, Prev: Lisp Libraries, Up: Running
211 Evaluating Emacs-Lisp Expressions
212 =================================
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'.
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).
229 Read a Lisp expression in the minibuffer, evaluate it, and print
230 the value in the minibuffer (`eval-expression').
233 Evaluate the Lisp expression before point, and print the value in
234 the minibuffer (`eval-last-sexp').
237 Evaluate the defun containing point or after point, and print the
238 value in the minibuffer (`eval-defun').
241 Evaluate all the Lisp expressions in the region.
243 `M-x eval-current-buffer'
244 Evaluate all the Lisp expressions in the buffer.
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
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::.
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.
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'.
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.
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.
286 File: xemacs.info, Node: Lisp Debug, Next: Lisp Interaction, Prev: Lisp Eval, Up: Running
288 The Emacs-Lisp Debugger
289 =======================
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
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::.
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.
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 explicitly exit the debugger when you don't want to use it any
328 more. Exiting the debugger kills the backtrace buffer.
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:
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.
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.
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
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.
364 Don't enter the debugger when the current frame is exited. This
365 cancels a `b' command on a frame.
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>'.
373 Terminate the program being debugged; return to top-level Emacs
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.
380 Return a value from the debugger. The value is computed by
381 reading an expression with the minibuffer and evaluating it.
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.
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
397 File: xemacs.info, Node: Lisp Interaction, Next: External Lisp, Prev: Lisp Debug, Up: Running
399 Lisp Interaction Buffers
400 ========================
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.
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.
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.
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
426 File: xemacs.info, Node: External Lisp, Prev: Lisp Interaction, Up: Running
428 Running an External Lisp
429 ========================
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.
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::).
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
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.)
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::.
467 File: xemacs.info, Node: Packages, Next: Basic, Prev: Startup Paths, Up: Top
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.
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 * Creating Packages:: The basics.
486 * Available Packages:: A brief, out-of-date, directory of packaged LISP.
489 File: xemacs.info, Node: Package Terminology, Next: Using Packages, Up: Packages
494 There are two main flavors of packages.
496 * Regular Packages A regular package is one in which multiple files
497 are involved and one may not in general safely remove any of them.
499 * Single-File Packages A single-file package is an aggregate
500 collection of thematically related but otherwise independent lisp
501 files. These files are bundled together for download convenience
502 and individual files may be deleted at will without any loss of
505 Package Distributions
506 ---------------------
508 XEmacs Lisp packages are distributed in two ways, depending on the
509 intended use. Binary Packages are for installers and end-users and may
510 be installed directly into an XEmacs package directory. Source Packages
511 are for developers and include all files necessary for rebuilding
512 bytecompiled lisp and creating tarballs for distribution.
517 Binary packages may be installed directly into an XEmacs package
523 Source packages contain all of the Package author's (where
524 appropriate in regular packages) source code plus all of the files
525 necessary to build distribution tarballs (Unix Tar format files,
526 gzipped for space savings).
529 File: xemacs.info, Node: Using Packages, Next: Building Packages, Prev: Package Terminology, Up: Packages
534 When you first download XEmacs 21, you will usually first grab the
535 "core distribution", a file called `xemacs-21.0.tar.gz'. (Replace the
536 21.0 by the current version number.) The core distribution contains
537 the sources of XEmacs and a minimal set of Emacs Lisp files, which are
538 in the subdirectory named `lisp'. This subdirectory used to contain
539 all Emacs Lisp files distributed with XEmacs. Now, to conserve disk
540 space, most non-essential packages were made optional.
542 Choosing the Packages You Need
543 ------------------------------
545 The available packages can currently be found in the same ftp
546 directory where you grabbed the core distribution from, and are located
547 in the subdirectory `packages/binary-packages'. Package file names
548 follow the naming convention `<package-name>-<version>-pkg.tar.gz'.
550 If you have EFS *Note (EFS)::, packages can be installed over the
551 network. Alternatively, if you have copies of the packages locally,
552 you can install packages from a local disk or CDROM.
554 The file `etc/PACKAGES' in the core distribution contains a list of
555 the packages available at the time of the XEmacs release. Packages are
556 also listed on the `Options' menu under:
558 Options->Customize->Emacs->Packages
560 However, don't select any of these menu picks unless you actually
561 want to install the given package (and have properly configured your
564 You can also get a list of available packages, and whether or not
565 they are installed, using the visual package browser and installer.
566 You can access it via the menus:
568 Options->Manage Packages->List & Install
570 Or, you can get to it via the keyboard:
572 M-x pui-list-packages
574 Hint to system administrators of multi-user systems: it might be a
575 good idea to install all packages and not interfere with the wishes of
578 If you can't find which package provides the feature you require, try
579 using the `package-get-package-provider' function. Eg., if you know
580 that you need `thingatpt', type:
582 M-x package-get-package-provider RET thingatpt
584 which will return something like (fsf-compat "1.06"). You can the use
585 one of the methods above for installing the package you want.
587 XEmacs and Installing Packages
588 ------------------------------
590 Normally, packages are installed over the network, using EFS *Note
591 (EFS)::. However, you may not have network access, or you may already
592 have some or all of the packages on a local disk, such as a CDROM. If
593 you want to install from a local disk, you must first tell XEmacs where
594 to find the package binaries. This is done by adding a line like the
595 following to your init file:
597 (setq package-get-remote (cons (list nil "/my/path/to/package/binaries")
602 Here, you'd change `/my/path/to/package/binaries' to be the path to
603 your local package binaries. Next, restart XEmacs, and you're ready to
604 go (advanced users can just re-evaluate the sexp).
606 If you are installing from a temporary, one-time directory, you can
607 also add these directory names to `package-get-remote' using:
609 M-x pui-add-install-directory
611 Note, however, that any directories added using this function are not
612 saved; this information will be lost when you quit XEmacs.
614 If you're going to install over the network, you only have to insure
615 that EFS *Note (EFS):: works, and that it can get outside a firewall, if
616 you happen to be behind one. You shouldn't have to do anything else;
617 XEmacs already knows where to go. However you can add your own mirrors
618 to this list. See `package-get-remote'.
620 The easiest way to install a package is to use the visual package
621 browser and installer, using the menu pick:
623 Options->Manage Packages->List & Install
625 Options->Manage Packages->Using Custom->Select-> ...
627 You can also access it using the keyboard:
629 M-x pui-list-packages
631 The visual package browser will then display a list of all packages.
632 Help information will be displayed at the very bottom of the buffer; you
633 may have to scroll down to see it. You can also press `?' to get the
634 same help. From this buffer, you can tell the package status by the
635 character in the first column:
638 The package has not been installed.
641 The package has been installed, but a newer version is available.
642 The current version is out-of-date.
645 The package has been marked for installation/update.
647 If there is no character in the first column, the package has been
648 installed and is up-to-date.
650 From here, you can select or unselect packages for installation using
651 the <RET> key, the `Mouse-2' button or selecting "Select" from the
652 (Popup) Menu. Once you've finished selecting the packages, you can
653 press the `x' key (or use the menu) to actually install the packages.
654 Note that you will have to restart XEmacs for XEmacs to recognize any
664 Toggle between selecting and unselecting a package for
668 Install selected packages.
671 View, in the minibuffer, additional information about the package,
672 such as the package date (not the build date) and the package
673 author. Moving the mouse over a package name will also do the
677 Toggle between verbose and non-verbose package display.
680 Refresh the package display.
683 Kill the package buffer.
685 Moving the mouse over a package will also cause additional
686 information about the package to be displayed in the minibuffer.
688 Other package installation interfaces
689 -------------------------------------
691 For an alternative package interface, you can select packages from
692 the customize menus, under:
694 Options->Customize->Emacs->Packages-> ...
696 Options->Manage Packages->Using Custom->Select-> ...
698 Set their state to on, and then do:
700 Options->Manage Packages->Using Custom->Update Packages
702 This will automatically retrieve the packages you have selected from
703 the XEmacs ftp site or your local disk, and install them into XEmacs.
704 Additionally it will update any packages you already have installed to
705 the newest version. Note that if a package is newly installed you will
706 have to restart XEmacs for the change to take effect.
708 You can also install packages using a semi-manual interface:
710 M-x package-get-all <return>
712 Enter the name of the package (e.g., `prog-modes'), and XEmacs will
713 search for the latest version (as listed in the lisp file
714 `lisp/package-get-base.el'), and install it and any packages that it
717 Manual Binary Package Installation
718 ----------------------------------
720 Pre-compiled, binary packages can be installed in either a system
721 package directory (this is determined when XEmacs is compiled), or in
722 one of the following subdirectories of your `$HOME' directory:
724 ~/.xemacs/mule-packages
725 ~/.xemacs/xemacs-packages
727 Packages in the former directory will only be found by a Mule-enabled
730 XEmacs does not have to be running to install binary packages,
731 although XEmacs will not know about any newly-installed packages until
732 you restart XEmacs. Note, however, that installing a newer version of a
733 package while XEmacs is running could cause strange errors in XEmacs;
734 it's best to exit XEmacs before upgrading an existing package.
736 To install binary packages manually:
738 1. Download the package(s) that you want to install. Each binary
739 package will typically be a gzip'd tarball.
741 2. Decide where to install the packages: in the system package
742 directory, or in `~/.xemacs/mule-packages' or
743 `~/.xemacs/xemacs-packages', respectively. If you want to install
744 the packages in the system package directory, make sure you can
745 write into that directory. If you want to install in your `$HOME'
746 directory, create the directory, `~/.xemacs/mule-packages' or
747 `~/.xemacs/xemacs-packages', respectively.
749 3. Next, `cd' to the directory under which you want to install the
752 4. From this directory, uncompress and extract each of the gzip'd
753 tarballs that you downloaded in step 1. Unix and Cygnus cygwin
754 users will typically do this using the commands:
756 gunzip < package.tar.gz | tar xvf -
758 Above, replace `package.tar.gz' with the filename of the package
759 that you downloaded in step 1.
761 Of course, if you use GNU `tar', you could also use:
763 tar xvzf package.tar.gz
765 5. That's it. Quit and restart XEmacs to get it to recognize any new
770 File: xemacs.info, Node: Building Packages, Next: Creating Packages, Prev: Using Packages, Up: Packages
772 Source packages are available from the `packages/source-packages'
773 subdirectory of your favorite XEmacs distribution site. Alternatively,
774 they are available via CVS from `cvs.xemacs.org'. Look at
775 `http://cvs.xemacs.org' for instructions.
777 Prerequisites for Building Source Packages
778 ------------------------------------------
780 You must have GNU `cp', GNU `install' (or a BSD compatible `install'
781 program) GNU `make' (3.75 or later preferred), `makeinfo' (1.68 from
782 `texinfo-3.11' or later required), GNU `tar' and XEmacs 21.0. The
783 source packages will untar into a correct directory structure. At the
784 top level you must have `XEmacs.rules' and `package-compile.el'. These
785 files are available from the XEmacs FTP site from the same place you
786 obtained your source package distributions.
788 What You Can Do With Source Packages
789 ------------------------------------
791 NB: A global build operation doesn't exist yet as of 13 January
794 Source packages are most useful for creating XEmacs package tarballs
795 for installation into your own XEmacs installations or for distributing
798 Supported operations from `make' are:
801 Remove all built files except `auto-autoloads.el' and
805 Remove XEmacs backups as well as the files deleted by `make clean'.
808 Bytecompile all files, build and bytecompile byproduct files like
809 `auto-autoloads.el' and `custom-load.el'. Create info version of
810 TeXinfo documentation if present.
813 Usually aliased to `srckit-std'. This does a `make distclean' and
814 creates a package source tarball in the staging directory. This
815 is generally only of use for package maintainers.
818 May be aliased to `binkit-sourceonly', `binkit-sourceinfo',
819 `binkit-sourcedata', or `binkit-sourcedatainfo'. `sourceonly'
820 indicates there is nothing to install in a data directory or info
821 directory. `sourceinfo' indicates that source and info files are
822 to be installed. `sourcedata' indicates that source and etc
823 (data) files are to be installed. `sourcedatainfo' indicates
824 source, etc (data), and info files are to be installed. A few
825 packages have needs beyond the basic templates so this is not yet
829 Runs the rules `srckit' followed by `binkit'. This is primarily
830 of use by XEmacs maintainers producing files for distribution.
833 File: xemacs.info, Node: Creating Packages, Next: Available Packages, Prev: Building Packages, Up: Packages
835 Creating a package from an existing Lisp library is not very
838 In addition to the Lisp libraries themselves, you need a
839 `package-info.in' file and a simple `Makefile'. The rest is done by
840 `XEmacs.rules', part of the packaging system infrastructure.
842 `package-info.in' contains a single Lisp form like this:
844 (name ; your package's name
845 (standards-version 1.1
847 author-version AUTHOR_VERSION
849 build-date BUILD_DATE
850 maintainer MAINTAINER
851 distribution xemacs ; change to "mule" if MULE is needed
855 description "description" ; a one-line description string
859 provides (feature1 feature2) ; one for every `provides' form
864 You must fill in the four commented lines. The value of `name' is
865 the name of your package as an unquoted symbol. Normally it is the name
866 of the main Lisp file or principal feature provided. The allowed values
867 for distribution are `xemacs' and `mule'. Write them as unquoted
868 symbols. The `description' is a quoted Lisp string; use the usual
869 conventions. The value for `provides' is a list of feature symbols
870 (written unquoted). All of the features provided by libraries in your
871 package should be elements of this list. Implementing an automatic
872 method for generating the `provides' line is desirable, but as yet
875 The variables in upper-case are references to variables set in the
876 `Makefile' or automatically generated. Do not change them; they are
877 automatically filled in by the build process.
879 The remaining lines refer to implementation constants
880 (`standards-version'), or features that are unimplemented or have been
881 removed (`priority' and `dump'). The `type' line is not normally
882 relevant to external maintainers; the alternate value is `single-file',
883 which refers to packages consed up out of a number of single-file
884 libraries that are more or less thematically related. An example is
885 `prog-modes'. Single-file packages are basically for administrative
886 convenience, and new packages should generally be created as regular
889 The `Makefile' is quite stylized. The idea is similar to an
890 `Imakefile' or an `automake' file: the complexity is hidden in generic
891 rules files, in this case the `XEmacs.rules' include file in the top
892 directory of the packages hierarchy. Although a number of facilities
893 are available for complex libraries, most simple packages' `Makefile's
894 contain a copyright notice, a few variable definitions, an include for
895 `XEmacs.rules', and a couple of standard targets.
897 The first few `make' variables defined are `VERSION',
898 `AUTHOR_VERSION', `MAINTAINER', `PACKAGE', `PKG_TYPE', `REQUIRES', and
899 `CATEGORY'. All but one were described in the description of
900 `package-info.in'. The last is an admistrative grouping. Current
901 categories include `comm', `games', `libs', `mule', `oa', `os', `prog',
902 and `wp'. *Note Available Packages::, for a list of categories.
904 Next, define the variable `ELCS'. This contains the list of the
905 byte-compiled Lisp files used by the package. These files and their
906 `.el' versions will be included in the binary package. If there are
907 other files (such as extra Lisp sources or an upstream `Makefile') that
908 are normally placed in the installed Lisp directory, but not
909 byte-compiled, they can be listed as the value of `EXTRA_SOURCES'.
911 The include is simply
912 include ../../XEmacs.rules
914 The standard targets follow. These are
916 all:: $(ELCS) auto-autoloads.elc
922 Other targets (such as Texinfo sources) may need to be added as
923 dependencies for the `all' target. Dependencies for `srckit' and
924 `binkit' (that is, values for SRCKIT-ALIAS and BINKIT-ALIAS) are
925 defined in `XEmacs.rules'. The most useful of these values are given
926 in the following table.
929 Usually set to `srckit-std'.
932 May be set to `binkit-sourceonly', `binkit-sourceinfo',
933 `binkit-sourcedata', or `binkit-sourcedatainfo'. `sourceonly'
934 indicates there is nothing to install in a data directory or info
935 directory. `sourceinfo' indicates that source and info files are
936 to be installed. `sourcedata' indicates that source and etc
937 (data) files are to be installed. `sourcedatainfo' indicates
938 source, etc (data), and info files are to be installed.
940 Data files include things like pixmaps for a package-specific
941 toolbar, and are normally installed in `etc/PACKAGE_NAME'. A few
942 packages have needs beyond the basic templates. See `XEmacs.rules' or
943 a future revision of this manual for details.
946 File: xemacs.info, Node: Available Packages, Prev: Creating Packages, Up: Packages
948 This section is surely out-of-date. If you're sure that XEmacs is
949 able to do something, but your installed XEmacs won't do it for you,
950 it's probably in a package. If you can't find it in this section,
951 that's a bug--please report it. It is very hard to keep this section
952 up-to-date; your reports, comments, and questions will help a lot.
954 This data is up-to-date as of 10 February 1999. (Ouch! I told you!)
956 Library Packages (libs)
957 -----------------------
959 These packages are required to build and support most of the rest of
960 XEmacs. By design, xemacs-base is a `regular' package. Use restraint
961 when adding new files there as it is required by almost everything.
964 Support for Sparcworks.
967 A Portable Emacs Library. Used by XEmacs MIME support.
973 The DIRectory EDitor is for manipulating, and running commands on
974 files in a directory.
977 Treat files on remote systems the same as local files.
980 Fundamental lisp files for providing email support.
983 Support for building with Tooltalk.
986 Fundamental XEmacs support. Install this unless you wish a totally
990 XEmacs Lisp developer support. This package contains utilities for
991 supporting Lisp development. It is a single-file package so it
994 Communications Packages (comm)
995 ------------------------------
997 These packages provide support for various communications, primarily
1001 Footnoting in mail message editing modes.
1007 The Gnus Newsreader and Mailreader.
1010 Support for messaging encryption with PGP.
1013 Front end support for MH.
1016 Miscellaneous Networking Utilities. This is a single-file package
1017 and files may be deleted at will.
1020 Emacs implementation of the ph client to CCSO/qi directory servers.
1023 An obsolete Emacs mailer. If you do not already use it don't
1027 An Emacs citation tool. Useful with all Emacs Mailers and
1039 Games and Amusements (games)
1040 ----------------------------
1043 Spook and Yow (Zippy quotes).
1046 Tetris, Sokoban, and Snake.
1052 Other amusements and diversions.
1058 Wnn (4.2 and 6) support. SJ3 support. Must be installed prior to
1062 Quail. Used for everything other than English and Japanese.
1065 Used for localized menubars (French and Japanese) and localized
1066 splash screens (Japanese).
1069 Basic Mule support. Must be installed prior to building with Mule.
1072 Another Japanese Language Input Method. Can be used without a
1073 separate process running as a dictionary server.
1075 Productivity Packages (oa)
1076 --------------------------
1079 Calendar and diary support.
1082 Single file lisp packages for various XEmacs goodies. Load this
1083 and weed out the junk you don't want.
1086 Forms editing support (obsolete, use the builtin Widget instead).
1089 Provide a WM icon based on major mode.
1095 Spell-checking with ispell.
1098 PC style interface emulation.
1101 Validated HTML/SGML editing.
1104 SGML/Linuxdoc-SGML editing.
1107 User interface tool.
1113 Mouse enhancement utility.
1116 Various single file lisp packages for editing text files.
1119 Display time & date on the modeline.
1121 Operating System Utilities (os)
1122 -------------------------------
1128 Enhanced front-end for Grep.
1131 Front-end for Inferior Lisp.
1134 Miscellaneous single-file O/S utilities, for printing, archiving,
1135 compression, remote shells, etc.
1138 A Unix process browsing tool.
1140 Program Editing Support (prog)
1141 ------------------------------
1144 Ada language support.
1147 Basic single-file add-ons for editing C code.
1150 C, C++ and Java language support.
1153 GUD, gdb, dbx debugging support.
1156 Interface over patch.
1159 Another interface over patch.
1165 Miscellaneous Lisp libraries for various programming languages.
1168 Front-end support for Inferior Scheme.
1171 Support for editing shell scripts.
1174 Version control for free systems.
1177 Version control for ClearCase.
1182 Word Processing (wp)
1183 --------------------
1186 Basic TeX/LaTeX support.
1189 Crisp/Brief emulation.
1192 DEC EDIT/EDT emulation.
1195 XEmacs TeXinfo support.
1198 Single-file TeX support.
1201 DEC EDIT/TPU support.
1204 VI emulation support.
1207 File: xemacs.info, Node: Abbrevs, Next: Picture, Prev: Running, Up: Top
1212 An "abbrev" is a word which "expands" into some different text.
1213 Abbrevs are defined by the user to expand in specific ways. For
1214 example, you might define `foo' as an abbrev expanding to `find outer
1215 otter'. With this abbrev defined, you would be able to get `find outer
1216 otter ' into the buffer by typing `f o o <SPC>'.
1218 Abbrevs expand only when Abbrev mode (a minor mode) is enabled.
1219 Disabling Abbrev mode does not cause abbrev definitions to be discarded,
1220 but they do not expand until Abbrev mode is enabled again. The command
1221 `M-x abbrev-mode' toggles Abbrev mode; with a numeric argument, it
1222 turns Abbrev mode on if the argument is positive, off otherwise. *Note
1223 Minor Modes::. `abbrev-mode' is also a variable; Abbrev mode is on
1224 when the variable is non-`nil'. The variable `abbrev-mode'
1225 automatically becomes local to the current buffer when it is set.
1227 Abbrev definitions can be "mode-specific"--active only in one major
1228 mode. Abbrevs can also have "global" definitions that are active in
1229 all major modes. The same abbrev can have a global definition and
1230 various mode-specific definitions for different major modes. A
1231 mode-specific definition for the current major mode overrides a global
1234 You can define Abbrevs interactively during an editing session. You
1235 can also save lists of abbrev definitions in files and reload them in
1236 later sessions. Some users keep extensive lists of abbrevs that they
1237 load in every session.
1239 A second kind of abbreviation facility is called the "dynamic
1240 expansion". Dynamic abbrev expansion happens only when you give an
1241 explicit command and the result of the expansion depends only on the
1242 current contents of the buffer. *Note Dynamic Abbrevs::.
1246 * Defining Abbrevs:: Defining an abbrev, so it will expand when typed.
1247 * Expanding Abbrevs:: Controlling expansion: prefixes, canceling expansion.
1248 * Editing Abbrevs:: Viewing or editing the entire list of defined abbrevs.
1249 * Saving Abbrevs:: Saving the entire list of abbrevs for another session.
1250 * Dynamic Abbrevs:: Abbreviations for words already in the buffer.
1253 File: xemacs.info, Node: Defining Abbrevs, Next: Expanding Abbrevs, Prev: Abbrevs, Up: Abbrevs
1259 Define an abbrev to expand into some text before point
1260 (`add-global-abbrev').
1263 Similar, but define an abbrev available only in the current major
1264 mode (`add-mode-abbrev').
1267 Define a word in the buffer as an abbrev
1268 (`inverse-add-global-abbrev').
1271 Define a word in the buffer as a mode-specific abbrev
1272 (`inverse-add-mode-abbrev').
1274 `M-x kill-all-abbrevs'
1275 After this command, no abbrev definitions remain in effect.
1277 The usual way to define an abbrev is to enter the text you want the
1278 abbrev to expand to, position point after it, and type `C-x a g'
1279 (`add-global-abbrev'). This reads the abbrev itself using the
1280 minibuffer, and then defines it as an abbrev for one or more words
1281 before point. Use a numeric argument to say how many words before point
1282 should be taken as the expansion. For example, to define the abbrev
1283 `foo' as in the example above, insert the text `find outer otter', then
1285 `C-u 3 C-x a g f o o <RET>'.
1287 An argument of zero to `C-x a g' means to use the contents of the
1288 region as the expansion of the abbrev being defined.
1290 The command `C-x a l' (`add-mode-abbrev') is similar, but defines a
1291 mode-specific abbrev. Mode-specific abbrevs are active only in a
1292 particular major mode. `C-x a l' defines an abbrev for the major mode
1293 in effect at the time `C-x a l' is typed. The arguments work the same
1294 way they do for `C-x a g'.
1296 If the text of an abbrev you want is already in the buffer instead of
1297 the expansion, use command `C-x a i g' (`inverse-add-global-abbrev')
1298 instead of `C-x a g', or use `C-x a i l' (`inverse-add-mode-abbrev')
1299 instead of `C-x a l'. These commands are called "inverse" because they
1300 invert the meaning of the argument found in the buffer and the argument
1301 read using the minibuffer.
1303 To change the definition of an abbrev, just add the new definition.
1304 You will be asked to confirm if the abbrev has a prior definition. To
1305 remove an abbrev definition, give a negative argument to `C-x a g' or
1306 `C-x a l'. You must choose the command to specify whether to kill a
1307 global definition or a mode-specific definition for the current mode,
1308 since those two definitions are independent for one abbrev.
1310 `M-x kill-all-abbrevs' removes all existing abbrev definitions.