1 \input texinfo @c -*-texinfo-*-
3 @setfilename lispref.info
5 @settitle SXEmacs Lisp Reference Manual
12 @dircategory SXEmacs Editor
14 * Lispref: (lispref). SXEmacs Lisp Reference Manual.
19 GNU Emacs Lisp Reference Manual Second Edition (v2.01), May 1993
20 GNU Emacs Lisp Reference Manual Further Revised (v2.02), August 1993
21 Lucid Emacs Lisp Reference Manual (for 19.10) First Edition, March 1994
22 XEmacs Lisp Programmer's Manual (for 19.12) Second Edition, April 1995
23 GNU Emacs Lisp Reference Manual v2.4, June 1995
24 XEmacs Lisp Programmer's Manual (for 19.13) Third Edition, July 1995
25 XEmacs Lisp Reference Manual (for 19.14 and 20.0) v3.1, March 1996
26 XEmacs Lisp Reference Manual (for 19.15 and 20.1, 20.2, 20.3) v3.2, April, May, November 1997
27 XEmacs Lisp Reference Manual (for 21.0) v3.3, April 1998
28 SXEmacs Lisp Reference Manual (for 22.1) v3.4, May 2005
29 @c Please REMEMBER to update edition number in *four* places in this file
30 @c and also in *one* place in intro.texi
32 Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
33 Copyright (C) 1994, 1995 Sun Microsystems, Inc.
34 Copyright (C) 1995, 1996 Ben Wing.
36 Copyright (C) 2005, 2006 SXEmacs developers
39 Permission is granted to make and distribute verbatim copies of this
40 manual provided the copyright notice and this permission notice are
41 preserved on all copies.
44 Permission is granted to process this file through TeX and print the
45 results, provided the printed document carries copying permission notice
46 identical to this one except for the removal of this paragraph (this
47 paragraph not being relevant to the printed manual).
50 Permission is granted to copy and distribute modified versions of this
51 manual under the conditions for verbatim copying, provided that the
52 entire resulting derived work is distributed under the terms of a
53 permission notice identical to this one.
55 Permission is granted to copy and distribute translations of this manual
56 into another language, under the above conditions for modified versions,
57 except that this permission notice may be stated in a translation
58 approved by the Foundation.
60 Permission is granted to copy and distribute modified versions of this
61 manual under the conditions for verbatim copying, provided also that the
62 section entitled ``GNU General Public License'' is included exactly as
63 in the original, and provided that the entire resulting derived work is
64 distributed under the terms of a permission notice identical to this
67 Permission is granted to copy and distribute translations of this manual
68 into another language, under the above conditions for modified versions,
69 except that the section entitled ``GNU General Public License'' may be
70 included in a translation approved by the Free Software Foundation
71 instead of in the original English.
81 @setchapternewpage odd
85 @title SXEmacs Lisp Reference Manual
86 @c The edition number appears in several places in this file
87 @c and also in the file intro.texi.
88 @c This manual documents SXEmacs 22.1 and was based on the
89 @c documentation for XEmacs 21.0 (v3.3).
90 @subtitle Version @version{} (for SXEmacs 22.1), May 2005
92 @author by Steve Youngs, Sebastian Freundt
93 @author SXEmacs developers
95 @author Based on the XEmacs Lisp Reference Manual
98 @vskip 0pt plus 1filll
99 Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995 Free Software Foundation, Inc.
100 Copyright @copyright{} 1994, 1995 Sun Microsystems, Inc.
101 Copyright @copyright{} 1995, 1996 Ben Wing.
103 Copyright @copyright{} 2005, 2006 SXEmacs developers
105 Version @version{} @*
106 Revised for SXEmacs Versions 22.1,@*
109 Permission is granted to make and distribute verbatim copies of this
110 manual provided the copyright notice and this permission notice are
111 preserved on all copies.
113 Permission is granted to copy and distribute modified versions of this
114 manual under the conditions for verbatim copying, provided also that the
115 section entitled ``GNU General Public License'' is included
116 exactly as in the original, and provided that the entire resulting
117 derived work is distributed under the terms of a permission notice
118 identical to this one.
120 Permission is granted to copy and distribute translations of this manual
121 into another language, under the above conditions for modified versions,
122 except that the section entitled ``GNU General Public License'' may be
123 included in a translation approved by the Free Software Foundation
124 instead of in the original English.
126 Cover art by Etienne Suvasa.
130 @node Top, Copying, (dir), (dir)
133 This Info file contains the third edition of the SXEmacs Lisp
134 Reference Manual, corresponding to SXEmacs version 22.1.
138 * Copying:: Conditions for copying and changing SXEmacs.
139 * Introduction:: Introduction and conventions used.
141 * Packaging:: Lisp library administrative infrastructure.
143 * Lisp Data Types:: Data types of objects in SXEmacs Lisp.
144 * Numbers:: Numbers and arithmetic functions.
145 * Strings and Characters:: Strings, and functions that work on them.
146 * Lists:: Lists, cons cells, and related functions.
147 * Sequences Arrays Vectors:: Lists, strings and vectors are called sequences.
148 Certain functions act on any kind of sequence.
149 The description of vectors is here as well.
150 * Symbols:: Symbols represent names, uniquely.
152 * Evaluation:: How Lisp expressions are evaluated.
153 * Control Structures:: Conditionals, loops, nonlocal exits.
154 * Variables:: Using symbols in programs to stand for values.
156 * Functions and Commands:: A function is a Lisp program that can be
157 invoked from other functions.
159 * Macros:: Macros are a way to extend the Lisp language.
160 * Customization:: Writing customization declarations.
162 * Loading:: Reading files of Lisp code into Lisp.
163 * Byte Compilation:: Compilation makes programs run faster.
164 * Debugging:: Tools and tips for debugging Lisp programs.
166 * Read and Print:: Converting Lisp objects to text and back.
167 * Minibuffers:: Using the minibuffer to read input.
168 * Command Loop:: How the editor command loop works,
169 and how you can call its subroutines.
170 * Keymaps:: Defining the bindings from keys to commands.
171 * Menus:: Defining pull-down and pop-up menus.
172 * Dialog Boxes:: Creating dialog boxes.
173 * Toolbar:: Controlling the toolbar.
174 * Gutter:: Controlling the gutter.
175 * Scrollbars:: Controlling the scrollbars.
176 * Drag and Drop:: Generic API to inter-application communication
177 via specific protocols.
178 * Modes:: Defining major and minor modes.
179 * Documentation:: Writing and using documentation strings.
181 * Files:: Accessing files.
182 * Backups and Auto-Saving:: Controlling how backups and auto-save
184 * Buffers:: Creating and using buffer objects.
185 * Windows:: Manipulating windows and displaying buffers.
186 * Frames:: Making multiple X windows.
187 * Consoles and Devices:: Opening frames on multiple TTY's or X displays.
188 * Positions:: Buffer positions and motion functions.
189 * Markers:: Markers represent positions and update
190 automatically when the text is changed.
192 * Text:: Examining and changing text in buffers.
193 * Searching and Matching:: Searching buffers for strings or regexps.
194 * Syntax Tables:: The syntax table controls word and list parsing.
195 * Abbrevs:: How Abbrev mode works, and its data structures.
197 * Extents:: Extents are regions of text with particular
198 display characteristics.
199 * Specifiers:: How faces and glyphs are specified.
200 * Faces and Window-System Objects::
201 A face is a set of display characteristics
202 specifying how text is to be displayed.
203 * Glyphs:: General interface to pixmaps displayed in a
205 * Annotations:: Higher-level interface to glyphs in a buffer.
206 * Display:: Parameters controlling screen usage.
207 The bell. Waiting for input.
208 * Media:: Handling media streams (audio and video).
210 * Hash Tables:: Fast data structures for mappings.
211 * Range Tables:: Keeping track of ranges of numbers.
212 * Databases:: An interface to standard DBM and DB databases.
214 * Processes:: Running and communicating with subprocesses.
215 * System Interface:: Getting the user id, system type, environment
216 variables, and other such things.
217 * X-Windows:: Functions specific to the X Window System.
218 * ToolTalk Support:: Interfacing with the ToolTalk message service.
219 * LDAP Support:: Interfacing with the Lightweight Directory
221 * PostgreSQL Support:: Interfacing to the PostgreSQL libpq library.
222 * OpenSSL Support:: Interfacing to the OpenSSL libcrypto/libssl libs
223 * Enhanced Number Types:: Using advanced numerical and mathematical
225 * Internationalization:: How Emacs supports different languages and
226 cultural conventions.
227 * Foreign Functions:: Accessing functions in external
228 libraries from with SXEmacs lisp.
229 * MULE:: Specifics of the Asian-language support.
233 * Tips:: Advice for writing Lisp programs.
234 * Building SXEmacs and Object Allocation::
235 Behind-the-scenes information about SXEmacs.
236 * Standard Errors:: List of all error symbols.
237 * Standard Buffer-Local Variables:: List of variables local in all buffers.
238 * Standard Keymaps:: List of standard keymaps.
239 * Standard Hooks:: List of standard hook variables.
241 * Index:: Index including concepts, functions, variables,
244 --- The Detailed Node Listing ---
246 Here are other nodes that are inferiors of those already listed,
247 mentioned here so you can get to them in one step:
251 * Caveats:: Flaws and a request for help.
252 * Lisp History:: SXEmacs Lisp is descended from Maclisp.
253 * Conventions:: How the manual is formatted.
254 * Acknowledgements:: The authors, editors, and sponsors of this manual.
258 * Some Terms:: Explanation of terms we use in this manual.
259 * nil and t:: How the symbols @code{nil} and @code{t} are used.
260 * Evaluation Notation:: The format we use for examples of evaluation.
261 * Printing Notation:: The format we use for examples that print output.
262 * Error Messages:: The format we use for examples of errors.
263 * Buffer Text Notation:: The format we use for buffer contents in examples.
264 * Format of Descriptions:: Notation for describing functions, variables, etc.
266 Format of Descriptions
268 * A Sample Function Description::
269 * A Sample Variable Description::
273 * Package Overview:: Lisp Libraries and Packages.
274 * Package Terminology:: Basic stuff.
275 * Building Packages:: Turn packaged source into a tarball.
276 * Local.rules File:: Tell the SXEmacs Packaging System about your host.
277 * Creating Packages:: Tell the SXEmacs Packaging System about your package.
283 * The Library Maintainer View::
284 * The Package Release Engineer View::
286 The Library Maintainer's View
288 * Infrastructure:: Global Makefiles and common rules.
289 * Control Files:: Package-specific Makefiles and administrative files.
290 * Obtaining:: Obtaining the SXEmacs Packaging System and utilities.
294 * package-info.in:: package-info.in
295 * Makefile:: @file{Makefile}
300 * Printed Representation:: How Lisp objects are represented as text.
301 * Comments:: Comments and their formatting conventions.
302 * Programming Types:: Types found in all Lisp systems.
303 * Editing Types:: Types specific to SXEmacs.
304 * Type Predicates:: Tests related to types.
305 * Equality Predicates:: Tests of equality between any two objects.
309 * Integer Type:: Numbers without fractional parts.
310 * Floating Point Type:: Numbers with fractional parts and with a large range.
311 * Character Type:: The representation of letters, numbers and
313 * Sequence Type:: Both lists and arrays are classified as sequences.
314 * Cons Cell Type:: Cons cells, and lists (which are made from cons cells).
315 * Array Type:: Arrays include strings and vectors.
316 * String Type:: An (efficient) array of characters.
317 * Vector Type:: One-dimensional arrays.
318 * Symbol Type:: A multi-use object that refers to a function,
319 variable, property list, or itself.
320 * Function Type:: A piece of executable code you can call from elsewhere.
321 * Macro Type:: A method of expanding an expression into another
322 expression, more fundamental but less pretty.
323 * Primitive Function Type:: A function written in C, callable from Lisp.
324 * Compiled-Function Type:: A function written in Lisp, then compiled.
325 * Autoload Type:: A type used for automatically loading seldom-used
330 * Dotted Pair Notation:: An alternative syntax for lists.
331 * Association List Type:: A specially constructed list.
335 * Buffer Type:: The basic object of editing.
336 * Window Type:: What makes buffers visible.
337 * Window Configuration Type:: Save what the screen looks like.
338 * Marker Type:: A position in a buffer.
339 * Process Type:: A process running on the underlying OS.
340 * Stream Type:: Receive or send characters.
341 * Keymap Type:: What function a keystroke invokes.
342 * Syntax Table Type:: What a character means.
346 * Integer Basics:: Representation and range of integers.
347 * Float Basics:: Representation and range of floating point.
348 * Predicates on Numbers:: Testing for numbers.
349 * Comparison of Numbers:: Equality and inequality predicates.
350 * Arithmetic Operations:: How to add, subtract, multiply and divide.
351 * Bitwise Operations:: Logical and, or, not, shifting.
352 * Numeric Conversions:: Converting float to integer and vice versa.
353 * Math Functions:: Trig, exponential and logarithmic functions.
354 * Random Numbers:: Obtaining random integers, predictable or not.
356 Strings and Characters
358 * String Basics:: Basic properties of strings and characters.
359 * Predicates for Strings:: Testing whether an object is a string or char.
360 * Creating Strings:: Functions to allocate new strings.
361 * Predicates for Characters:: Testing whether an object is a character.
362 * Character Codes:: Each character has an equivalent integer.
363 * Text Comparison:: Comparing characters or strings.
364 * String Conversion:: Converting characters or strings and vice versa.
365 * Modifying Strings:: Changing characters in a string.
366 * String Properties:: Additional information attached to strings.
367 * Formatting Strings:: @code{format}: SXEmacs's analog of @code{printf}.
368 * Character Case:: Case conversion functions.
369 * Char Tables:: Mapping from characters to Lisp objects.
370 * Case Tables:: Customizing case conversion.
374 * Cons Cells:: How lists are made out of cons cells.
375 * Lists as Boxes:: Graphical notation to explain lists.
376 * List-related Predicates:: Is this object a list? Comparing two lists.
377 * List Elements:: Extracting the pieces of a list.
378 * Building Lists:: Creating list structure.
379 * Modifying Lists:: Storing new pieces into an existing list.
380 * Sets And Lists:: A list can represent a finite mathematical set.
381 * Association Lists:: A list can represent a finite relation or mapping.
382 * Property Lists:: A different way to represent a finite mapping.
383 * Weak Lists:: A list with special garbage-collection behavior.
384 * DL-Lists:: A doubly-linked list implementation.
385 * Bloom Filters:: A special set type with anonymous membership.
387 Modifying Existing List Structure
389 * Setcar:: Replacing an element in a list.
390 * Setcdr:: Replacing part of the list backbone.
391 This can be used to remove or add elements.
392 * Rearrangement:: Reordering the elements in a list; combining lists.
394 Sequences, Arrays, and Vectors
396 * Sequence Functions:: Functions that accept any kind of sequence.
397 * Arrays:: Characteristics of arrays in SXEmacs Lisp.
398 * Array Functions:: Functions specifically for arrays.
399 * Vectors:: Functions specifically for vectors.
403 * Symbol Components:: Symbols have names, values, function definitions
405 * Definitions:: A definition says how a symbol will be used.
406 * Creating Symbols:: How symbols are kept unique.
407 * Symbol Properties:: Each symbol has a property list
408 for recording miscellaneous information.
412 * Intro Eval:: Evaluation in the scheme of things.
413 * Eval:: How to invoke the Lisp interpreter explicitly.
414 * Forms:: How various sorts of objects are evaluated.
415 * Quoting:: Avoiding evaluation (to put constants in
420 * Self-Evaluating Forms:: Forms that evaluate to themselves.
421 * Symbol Forms:: Symbols evaluate as variables.
422 * Classifying Lists:: How to distinguish various sorts of list forms.
423 * Function Forms:: Forms that call functions.
424 * Macro Forms:: Forms that call macros.
425 * Special Forms:: ``Special forms'' are idiosyncratic primitives,
426 most of them extremely important.
427 * Autoloading:: Functions set up to load files
428 containing their real definitions.
432 * Sequencing:: Evaluation in textual order.
433 * Conditionals:: @code{if}, @code{cond}.
434 * Combining Conditions:: @code{and}, @code{or}, @code{not}.
435 * Iteration:: @code{while} loops.
436 * Nonlocal Exits:: Jumping out of a sequence.
440 * Catch and Throw:: Nonlocal exits for the program's own purposes.
441 * Examples of Catch:: Showing how such nonlocal exits can be written.
442 * Errors:: How errors are signaled and handled.
443 * Cleanups:: Arranging to run a cleanup form if an
448 * Signaling Errors:: How to report an error.
449 * Processing of Errors:: What SXEmacs does when you report an error.
450 * Handling Errors:: How you can trap errors and continue execution.
451 * Error Symbols:: How errors are classified for trapping them.
455 * Global Variables:: Variable values that exist permanently, everywhere.
456 * Constant Variables:: Certain "variables" have values that never change.
457 * Local Variables:: Variable values that exist only temporarily.
458 * Void Variables:: Symbols that lack values.
459 * Defining Variables:: A definition says a symbol is used as a variable.
460 * Accessing Variables:: Examining values of variables whose names
461 are known only at run time.
462 * Setting Variables:: Storing new values in variables.
463 * Variable Scoping:: How Lisp chooses among local and global values.
464 * Buffer-Local Variables:: Variable values in effect only in one buffer.
466 Scoping Rules for Variable Bindings
468 * Scope:: Scope means where in the program a value
469 is visible. Comparison with other languages.
470 * Extent:: Extent means how long in time a value exists.
471 * Impl of Scope:: Two ways to implement dynamic scoping.
472 * Using Scoping:: How to use dynamic scoping carefully and
475 Buffer-Local Variables
477 * Intro to Buffer-Local:: Introduction and concepts.
478 * Creating Buffer-Local:: Creating and destroying buffer-local bindings.
479 * Default Value:: The default value is seen in buffers
480 that don't have their own local values.
484 * What Is a Function:: Lisp functions vs primitives; terminology.
485 * Lambda Expressions:: How functions are expressed as Lisp objects.
486 * Function Names:: A symbol can serve as the name of a function.
487 * Defining Functions:: Lisp expressions for defining functions.
488 * Calling Functions:: How to use an existing function.
489 * Mapping Functions:: Applying a function to each element of a list, etc.
490 * Anonymous Functions:: Lambda-expressions are functions with no names.
491 * Function Cells:: Accessing or setting the function definition
493 * Related Topics:: Cross-references to specific Lisp primitives
494 that have a special bearing on how
499 * Lambda Components:: The parts of a lambda expression.
500 * Simple Lambda:: A simple example.
501 * Argument List:: Details and special features of argument lists.
502 * Function Documentation:: How to put documentation in a function.
506 * Simple Macro:: A basic example.
507 * Expansion:: How, when and why macros are expanded.
508 * Compiling Macros:: How macros are expanded by the compiler.
509 * Defining Macros:: How to write a macro definition.
510 * Backquote:: Easier construction of list structure.
511 * Problems with Macros:: Don't evaluate the macro arguments too many times.
512 Don't hide the user's variables.
516 * How Programs Do Loading:: The @code{load} function and others.
517 * Autoload:: Setting up a function to autoload.
518 * Named Features:: Loading a library if it isn't already loaded.
519 * Repeated Loading:: Precautions about loading a file twice.
523 * Speed of Byte-Code:: An example of speedup from byte compilation.
524 * Compilation Functions:: Byte compilation functions.
525 * Docs and Compilation:: Dynamic loading of documentation strings.
526 * Dynamic Loading:: Dynamic loading of individual functions.
527 * Eval During Compile:: Code to be evaluated when you compile.
528 * Compiled-Function Objects:: The data type used for byte-compiled functions.
529 * Disassembly:: Disassembling byte-code; how to read byte-code.
530 * Different Behaviour:: When compiled code gives different results.
532 Debugging Lisp Programs
534 * Debugger:: How the SXEmacs Lisp debugger is implemented.
535 * Syntax Errors:: How to find syntax errors.
536 * Compilation Errors:: How to find errors that show up in
538 * Edebug:: A source-level SXEmacs Lisp debugger.
542 * Error Debugging:: Entering the debugger when an error happens.
543 * Function Debugging:: Entering it when a certain function is called.
544 * Explicit Debug:: Entering it at a certain point in the program.
545 * Using Debugger:: What the debugger does; what you see while in it.
546 * Debugger Commands:: Commands used while in the debugger.
547 * Invoking the Debugger:: How to call the function @code{debug}.
548 * Internals of Debugger:: Subroutines of the debugger, and global variables.
550 Debugging Invalid Lisp Syntax
552 * Excess Open:: How to find a spurious open paren or missing close.
553 * Excess Close:: How to find a spurious close paren or missing open.
555 Reading and Printing Lisp Objects
557 * Streams Intro:: Overview of streams, reading and printing.
558 * Input Streams:: Various data types that can be used as
560 * Input Functions:: Functions to read Lisp objects from text.
561 * Output Streams:: Various data types that can be used as
563 * Output Functions:: Functions to print Lisp objects as text.
567 * Intro to Minibuffers:: Basic information about minibuffers.
568 * Text from Minibuffer:: How to read a straight text string.
569 * Object from Minibuffer:: How to read a Lisp object or expression.
570 * Completion:: How to invoke and customize completion.
571 * Yes-or-No Queries:: Asking a question with a simple answer.
572 * Minibuffer Misc:: Various customization hooks and variables.
576 * Basic Completion:: Low-level functions for completing strings.
577 (These are too low level to use the minibuffer.)
578 * Minibuffer Completion:: Invoking the minibuffer with completion.
579 * Completion Commands:: Minibuffer commands that do completion.
580 * High-Level Completion:: Convenient special cases of completion
581 (reading buffer name, file name, etc.)
582 * Reading File Names:: Using completion to read file names.
583 * Programmed Completion:: Finding the completions for a given file name.
587 * Command Overview:: How the command loop reads commands.
588 * Defining Commands:: Specifying how a function should read arguments.
589 * Interactive Call:: Calling a command, so that it will read arguments.
590 * Command Loop Info:: Variables set by the command loop for you to examine.
591 * Events:: What input looks like when you read it.
592 * Reading Input:: How to read input events from the keyboard or mouse.
593 * Waiting:: Waiting for user input or elapsed time.
594 * Quitting:: How @kbd{C-g} works. How to catch or defer quitting.
595 * Prefix Command Arguments:: How the commands to set prefix args work.
596 * Recursive Editing:: Entering a recursive edit,
597 and why you usually shouldn't.
598 * Disabling Commands:: How the command loop handles disabled commands.
599 * Command History:: How the command history is set up, and how accessed.
600 * Keyboard Macros:: How keyboard macros are implemented.
604 * Using Interactive:: General rules for @code{interactive}.
605 * Interactive Codes:: The standard letter-codes for reading arguments
607 * Interactive Examples:: Examples of how to read interactive arguments.
611 * Event Types:: Events come in different types.
612 * Event Contents:: What the contents of each event type are.
613 * Event Predicates:: Querying whether an event is of a
615 * Accessing Mouse Event Positions::
616 Determining where a mouse event occurred,
618 * Accessing Other Event Info:: Accessing non-positional event info.
619 * Working With Events:: Creating, copying, and destroying events.
620 * Converting Events:: Converting between events, keys, and
623 Accessing Mouse Event Positions
625 * Frame-Level Event Position Info::
626 * Window-Level Event Position Info::
627 * Event Text Position Info::
628 * Event Glyph Position Info::
629 * Event Toolbar Position Info::
630 * Other Event Position Info::
634 * Key Sequence Input:: How to read one key sequence.
635 * Reading One Event:: How to read just one event.
636 * Dispatching an Event:: What to do with an event once it has been read.
637 * Quoted Character Input:: Asking the user to specify a character.
638 * Peeking and Discarding:: How to reread or throw away input events.
642 * Keymap Terminology:: Definitions of terms pertaining to keymaps.
643 * Format of Keymaps:: What a keymap looks like as a Lisp object.
644 * Creating Keymaps:: Functions to create and copy keymaps.
645 * Inheritance and Keymaps:: How one keymap can inherit the bindings
647 * Key Sequences:: How to specify key sequences.
648 * Prefix Keys:: Defining a key with a keymap as its definition.
649 * Active Keymaps:: Each buffer has a local keymap
650 to override the standard (global) bindings.
651 Each minor mode can also override them.
652 * Key Lookup:: How extracting elements from keymaps works.
653 * Functions for Key Lookup:: How to request key lookup.
654 * Changing Key Bindings:: Redefining a key in a keymap.
655 * Key Binding Commands:: Interactive interfaces for redefining keys.
656 * Scanning Keymaps:: Looking through all keymaps, for printing help.
657 * Other Keymap Functions:: Miscellaneous keymap functions.
661 * Menu Format:: Format of a menu description.
662 * Menubar Format:: How to specify a menubar.
663 * Menubar:: Functions for controlling the menubar.
664 * Modifying Menus:: Modifying a menu description.
665 * Pop-Up Menus:: Functions for specifying pop-up menus.
666 * Menu Filters:: Filter functions for the default menubar.
667 * Buffers Menu:: The menu that displays the list of buffers.
671 * Dialog Box Format::
672 * Dialog Box Functions::
676 * Toolbar Intro:: An introduction.
677 * Toolbar Descriptor Format:: How to create a toolbar.
678 * Specifying the Toolbar:: Setting a toolbar.
679 * Other Toolbar Variables:: Controlling the size of toolbars.
685 Major and Minor Modes
687 * Major Modes:: Defining major modes.
688 * Minor Modes:: Defining minor modes.
689 * Modeline Format:: Customizing the text that appears in the modeline.
690 * Hooks:: How to use hooks; how to write code that
695 * Major Mode Conventions:: Coding conventions for keymaps, etc.
696 * Example Major Modes:: Text mode and Lisp modes.
697 * Auto Major Mode:: How SXEmacs chooses the major mode automatically.
698 * Mode Help:: Finding out how to use a mode.
702 * Minor Mode Conventions:: Tips for writing a minor mode.
703 * Keymaps and Minor Modes:: How a minor mode can have its own keymap.
707 * Modeline Data:: The data structure that controls the modeline.
708 * Modeline Variables:: Variables used in that data structure.
709 * %-Constructs:: Putting information into a modeline.
713 * Documentation Basics:: Good style for doc strings.
714 Where to put them. How SXEmacs stores them.
715 * Accessing Documentation:: How Lisp programs can access doc strings.
716 * Keys in Documentation:: Substituting current key bindings.
717 * Describing Characters:: Making printable descriptions of
718 non-printing characters and key sequences.
719 * Help Functions:: Subroutines used by SXEmacs help facilities.
723 * Visiting Files:: Reading files into Emacs buffers for editing.
724 * Saving Buffers:: Writing changed buffers back into files.
725 * Reading from Files:: Reading files into other buffers.
726 * Writing to Files:: Writing new files from parts of buffers.
727 * File Locks:: Locking and unlocking files, to prevent
728 simultaneous editing by two people.
729 * Information about Files:: Testing existence, accessibility, size of files.
730 * Contents of Directories:: Getting a list of the files in a directory.
731 * Changing File Attributes:: Renaming files, changing protection, etc.
732 * File Names:: Decomposing and expanding file names.
736 * Visiting Functions:: The usual interface functions for visiting.
737 * Subroutines of Visiting:: Lower-level subroutines that they use.
739 Information about Files
741 * Testing Accessibility:: Is a given file readable? Writable?
742 * Kinds of Files:: Is it a directory? A link?
743 * File Attributes:: How large is it? Any other names? Etc.
747 * File Name Components:: The directory part of a file name, and the rest.
748 * Directory Names:: A directory's name as a directory
749 is different from its name as a file.
750 * Relative File Names:: Some file names are relative to a
752 * File Name Expansion:: Converting relative file names to absolute ones.
753 * Unique File Names:: Generating names for temporary files.
754 * File Name Completion:: Finding the completions for a given file name.
756 Backups and Auto-Saving
758 * Backup Files:: How backup files are made; how their names
760 * Auto-Saving:: How auto-save files are made; how their
762 * Reverting:: @code{revert-buffer}, and how to customize
767 * Making Backups:: How SXEmacs makes backup files, and when.
768 * Rename or Copy:: Two alternatives: renaming the old file
770 * Numbered Backups:: Keeping multiple backups for each source file.
771 * Backup Names:: How backup file names are computed; customization.
775 * Buffer Basics:: What is a buffer?
776 * Buffer Names:: Accessing and changing buffer names.
777 * Buffer File Name:: The buffer file name indicates which file
779 * Buffer Modification:: A buffer is @dfn{modified} if it needs to be saved.
780 * Modification Time:: Determining whether the visited file was changed
781 ``behind SXEmacs's back''.
782 * Read Only Buffers:: Modifying text is not allowed in a
784 * The Buffer List:: How to look at all the existing buffers.
785 * Creating Buffers:: Functions that create buffers.
786 * Killing Buffers:: Buffers exist until explicitly killed.
787 * Current Buffer:: Designating a buffer as current
788 so primitives will access its contents.
792 * Basic Windows:: Basic information on using windows.
793 * Splitting Windows:: Splitting one window into two windows.
794 * Deleting Windows:: Deleting a window gives its space to other windows.
795 * Selecting Windows:: The selected window is the one that you edit in.
796 * Cyclic Window Ordering:: Moving around the existing windows.
797 * Buffers and Windows:: Each window displays the contents of a buffer.
798 * Displaying Buffers:: Higher-lever functions for displaying a buffer
799 and choosing a window for it.
800 * Window Point:: Each window has its own location of point.
801 * Window Start:: The display-start position controls which text
802 is on-screen in the window.
803 * Vertical Scrolling:: Moving text up and down in the window.
804 * Horizontal Scrolling:: Moving text sideways on the window.
805 * Size of Window:: Accessing the size of a window.
806 * Resizing Windows:: Changing the size of a window.
807 * Window Configurations:: Saving and restoring the state of the screen.
811 * Creating Frames:: Creating additional frames.
812 * Frame Properties:: Controlling frame size, position, font, etc.
813 * Frame Titles:: Automatic updating of frame titles.
814 * Deleting Frames:: Frames last until explicitly deleted.
815 * Finding All Frames:: How to examine all existing frames.
816 * Frames and Windows:: A frame contains windows;
817 display of text always works through windows.
818 * Minibuffers and Frames:: How a frame finds the minibuffer to use.
819 * Input Focus:: Specifying the selected frame.
820 * Visibility of Frames:: Frames may be visible or invisible, or icons.
821 * Raising and Lowering:: Raising a frame makes it hide other X windows;
822 lowering it makes the others hide them.
823 * Frame Hooks:: Hooks for customizing frame behavior.
827 * Point:: The special position where editing takes place.
828 * Motion:: Changing point.
829 * Excursions:: Temporary motion and buffer changes.
830 * Narrowing:: Restricting editing to a portion of the buffer.
834 * Character Motion:: Moving in terms of characters.
835 * Word Motion:: Moving in terms of words.
836 * Buffer End Motion:: Moving to the beginning or end of the buffer.
837 * Text Lines:: Moving in terms of lines of text.
838 * Screen Lines:: Moving in terms of lines as displayed.
839 * List Motion:: Moving by parsing lists and sexps.
840 * Skipping Characters:: Skipping characters belonging to a certain set.
844 * Overview of Markers:: The components of a marker, and how it relocates.
845 * Predicates on Markers:: Testing whether an object is a marker.
846 * Creating Markers:: Making empty markers or markers at certain places.
847 * Information from Markers:: Finding the marker's buffer or character
849 * Changing Markers:: Moving the marker to a new buffer or position.
850 * The Mark:: How ``the mark'' is implemented with a marker.
851 * The Region:: How to access ``the region''.
855 * Near Point:: Examining text in the vicinity of point.
856 * Buffer Contents:: Examining text in a general fashion.
857 * Comparing Text:: Comparing substrings of buffers.
858 * Insertion:: Adding new text to a buffer.
859 * Commands for Insertion:: User-level commands to insert text.
860 * Deletion:: Removing text from a buffer.
861 * User-Level Deletion:: User-level commands to delete text.
862 * The Kill Ring:: Where removed text sometimes is saved for later use.
863 * Undo:: Undoing changes to the text of a buffer.
864 * Maintaining Undo:: How to enable and disable undo information.
865 How to control how much information is kept.
866 * Filling:: Functions for explicit filling.
867 * Margins:: How to specify margins for filling commands.
868 * Auto Filling:: How auto-fill mode is implemented to break lines.
869 * Sorting:: Functions for sorting parts of the buffer.
870 * Columns:: Computing horizontal positions, and using them.
871 * Indentation:: Functions to insert or adjust indentation.
872 * Case Changes:: Case conversion of parts of the buffer.
873 * Text Properties:: Assigning Lisp property lists to text characters.
874 * Substitution:: Replacing a given character wherever it appears.
875 * Registers:: How registers are implemented. Accessing the text or
876 position stored in a register.
877 * Transposition:: Swapping two portions of a buffer.
878 * Change Hooks:: Supplying functions to be run when text is changed.
882 * Kill Ring Concepts:: What text looks like in the kill ring.
883 * Kill Functions:: Functions that kill text.
884 * Yank Commands:: Commands that access the kill ring.
885 * Low-Level Kill Ring:: Functions and variables for kill ring access.
886 * Internals of Kill Ring:: Variables that hold kill-ring data.
890 * Primitive Indent:: Functions used to count and insert indentation.
891 * Mode-Specific Indent:: Customize indentation for different modes.
892 * Region Indent:: Indent all the lines in a region.
893 * Relative Indent:: Indent the current line based on previous lines.
894 * Indent Tabs:: Adjustable, typewriter-like tab stops.
895 * Motion by Indent:: Move to first non-blank character.
897 Searching and Matching
899 * String Search:: Search for an exact match.
900 * Regular Expressions:: Describing classes of strings.
901 * Regexp Search:: Searching for a match for a regexp.
902 * Match Data:: Finding out which part of the text matched
903 various parts of a regexp, after regexp search.
904 * Saving Match Data:: Saving and restoring this information.
905 * Standard Regexps:: Useful regexps for finding sentences, pages,...
906 * Searching and Case:: Case-independent or case-significant searching.
910 * Syntax of Regexps:: Rules for writing regular expressions.
911 * Regexp Example:: Illustrates regular expression syntax.
915 * Syntax Descriptors:: How characters are classified.
916 * Syntax Table Functions:: How to create, examine and alter syntax tables.
917 * Parsing Expressions:: Parsing balanced expressions
918 using the syntax table.
919 * Standard Syntax Tables:: Syntax tables used by various major modes.
920 * Syntax Table Internals:: How syntax table information is stored.
924 * Syntax Class Table:: Table of syntax classes.
925 * Syntax Flags:: Additional flags each character can have.
927 Abbrevs And Abbrev Expansion
929 * Abbrev Mode:: Setting up SXEmacs for abbreviation.
930 * Tables: Abbrev Tables. Creating and working with abbrev tables.
931 * Defining Abbrevs:: Specifying abbreviations and their expansions.
932 * Files: Abbrev Files. Saving abbrevs in files.
933 * Expansion: Abbrev Expansion. Controlling expansion; expansion subroutines.
934 * Standard Abbrev Tables:: Abbrev tables used by various major modes.
938 * Intro to Extents:: Extents are regions over a buffer or string.
939 * Creating and Modifying Extents::
940 Basic extent functions.
941 * Extent Endpoints:: Accessing and setting the bounds of an extent.
942 * Finding Extents:: Determining which extents are in an object.
943 * Mapping Over Extents:: More sophisticated functions for extent scanning.
944 * Extent Properties:: Extents have built-in and user-definable properties.
945 * Detached Extents:: Extents that are not in a buffer.
946 * Extent Parents:: Inheriting properties from another extent.
947 * Duplicable Extents:: Extents can be marked to be copied into strings.
948 * Extents and Events:: Extents can interact with the keyboard and mouse.
949 * Atomic Extents:: Treating a block of text as a single entity.
953 * Introduction to Specifiers:: Specifiers provide a clean way for
954 display and other properties to vary
955 (under user control) in a wide variety
957 * Specifiers In-Depth:: Gory details about specifier innards.
958 * Specifier Instancing:: Instancing means obtaining the ``value'' of
959 a specifier in a particular context.
960 * Specifier Types:: Specifiers come in different flavors.
961 * Adding Specifications:: Specifications control a specifier's ``value''
962 by giving conditions under which a
963 particular value is valid.
964 * Retrieving Specifications:: Querying a specifier's specifications.
965 * Specifier Instancing Functions::
966 Functions to instance a specifier.
967 * Specifier Examples:: Making all this stuff clearer.
968 * Creating Specifiers:: Creating specifiers for your own use.
969 * Specifier Validation Functions::
970 Validating the components of a specifier.
971 * Other Specification Functions::
972 Other ways of working with specifications.
974 Faces and Window-System Objects
976 * Faces:: Controlling the way text looks.
977 * Fonts:: Controlling the typeface of text.
978 * Colors:: Controlling the color of text and pixmaps.
982 * Merging Faces:: How SXEmacs decides which face to use
984 * Basic Face Functions:: How to define and examine faces.
985 * Face Properties:: How to access and modify a face's properties.
986 * Face Convenience Functions:: Convenience functions for accessing
987 particular properties of a face.
988 * Other Face Display Functions:: Other functions pertaining to how a
993 * Font Specifiers:: Specifying how a font will appear.
994 * Font Instances:: What a font specifier gets instanced as.
995 * Font Instance Names:: The name of a font instance.
996 * Font Instance Size:: The size of a font instance.
997 * Font Instance Characteristics:: Display characteristics of font instances.
998 * Font Convenience Functions:: Convenience functions that automatically
999 instance and retrieve the properties
1000 of a font specifier.
1004 * Color Specifiers:: Specifying how a colour will appear.
1005 * Color Instances:: What a colour specifier gets instanced as.
1006 * Color Instance Properties:: Properties of color instances.
1007 * Color Convenience Functions:: Convenience functions that automatically
1008 instance and retrieve the properties
1009 of a colour specifier.
1013 * Glyph Intro:: Glyphs are abstract image specifications.
1014 * Images:: Specifying the appearance of glyphs.
1015 * Using Glyphs:: Creating and displaying glyphs.
1016 * Manipulating Glyphs:: Getting and setting glyph properties.
1017 * Glyph Examples:: Examples of how to work with glyphs.
1021 * Image Specifiers:: Specifying an image's appearance.
1022 * Image Instantiator Conversion:: Lazy realization of graphics.
1023 * Image Instantiator Formats:: A catalog of image descriptors.
1024 * Image Instances:: Classes of graphical objects.
1028 * Image Instance Types:: Each image instances has a particular type.
1029 * Image Instance Functions:: Functions for working with image instances.
1036 * Image Instance Types:: Each image instances has a particular type.
1037 * Image Instance Functions:: Functions for working with image instances.
1041 * Creating Glyphs:: Creating new glyphs.
1042 * Buffer Glyphs:: Annotations are glyphs that appear in a buffer.
1043 * Redisplay Glyphs:: Glyphs controlling various redisplay functions.
1044 * Frame Glyphs:: Displaying glyphs in GUI components of the frame.
1045 * External Glyphs:: Icons and mouse pointers for the window system.
1046 * Native GUI Widgets:: Complex active elements treated as a single glyph.
1047 * Subwindows:: Externally-controlled subwindows in buffers.
1051 * Introduction to Widgets:: Native widgets provide tight integration of
1052 GUI features with the platform GUI.
1053 * Lisp API to Native Widgets:: Native widgets are glyphs.
1054 * Layouts:: Specifying composite widgets from Lisp.
1055 * Primitive Widgets:: Catalogue of available native widgets.
1059 * Glyph Properties:: Accessing and modifying a glyph's properties.
1060 * Glyph Convenience Functions:: Accessing particular properties of a glyph.
1061 * Glyph Dimensions:: Determining the height, width, etc. of a glyph.
1062 * Glyph Types:: Each glyph has a particular type.
1066 * Annotation Basics:: Introduction to annotations.
1067 * Annotation Primitives:: Creating and deleting annotations.
1068 * Annotation Properties:: Retrieving and changing the characteristics
1070 * Margin Primitives:: Controlling the size of the margins.
1071 * Locating Annotations:: Looking for annotations in a buffer.
1072 * Annotation Hooks:: Hooks called at certain times during an
1073 annotation's lifetime.
1077 * Refresh Screen:: Clearing the screen and redrawing everything on it.
1078 * Truncation:: Folding or wrapping long text lines.
1079 * The Echo Area:: Where messages are displayed.
1080 * Selective Display:: Hiding part of the buffer text.
1081 * Overlay Arrow:: Display of an arrow to indicate position.
1082 * Temporary Displays:: Displays that go away automatically.
1083 * Blinking:: How SXEmacs shows the matching open parenthesis.
1084 * Usual Display:: The usual conventions for displaying nonprinting chars.
1085 * Display Tables:: How to specify other conventions.
1086 * Beeping:: Audible signal to the user.
1095 * Introduction to Hash Tables:: Hash tables are fast data structures for
1096 implementing simple tables (i.e. finite
1097 mappings from keys to values).
1098 * Working With Hash Tables:: Hash table functions.
1099 * Weak Hash Tables:: Hash tables with special garbage-collection
1104 * Introduction to Range Tables:: Range tables efficiently map ranges of
1106 * Working With Range Tables:: Range table functions.
1111 * Subprocess Creation:: Functions that start subprocesses.
1112 * Synchronous Processes:: Details of using synchronous subprocesses.
1113 * Asynchronous Processes:: Starting up an asynchronous subprocess.
1114 * Deleting Processes:: Eliminating an asynchronous subprocess.
1115 * Process Information:: Accessing run-status and other attributes.
1116 * Input to Processes:: Sending input to an asynchronous subprocess.
1117 * Signals to Processes:: Stopping, continuing or interrupting
1118 an asynchronous subprocess.
1119 * Output from Processes:: Collecting output from an asynchronous subprocess.
1120 * Sentinels:: Sentinels run when process run-status changes.
1121 * Network:: Opening network connections.
1123 Receiving Output from Processes
1125 * Process Buffers:: If no filter, output is put in a buffer.
1126 * Filter Functions:: Filter functions accept output from the process.
1127 * Accepting Output:: How to wait until process output arrives.
1129 Operating System Interface
1131 * Starting Up:: Customizing SXEmacs start-up processing.
1132 * Getting Out:: How exiting works (permanent or temporary).
1133 * System Environment:: Distinguish the name and kind of system.
1134 * Terminal Input:: Recording terminal input for debugging.
1135 * Terminal Output:: Recording terminal output for debugging.
1136 * Flow Control:: How to turn output flow control on or off.
1137 * Batch Mode:: Running SXEmacs without terminal interaction.
1141 * Start-up Summary:: Sequence of actions SXEmacs performs at start-up.
1142 * Init File:: Details on reading the init file (@file{.emacs}).
1143 * Terminal-Specific:: How the terminal-specific Lisp file is read.
1144 * Command Line Arguments:: How command line arguments are processed,
1145 and how you can customize them.
1147 Getting out of SXEmacs
1149 * Killing SXEmacs:: Exiting SXEmacs irreversibly.
1150 * Suspending SXEmacs:: Exiting SXEmacs reversibly.
1154 * X Selections:: Transferring text to and from other X clients.
1155 * X Server:: Information about the X server connected to
1156 a particular device.
1157 * Resources:: Getting resource values from the server.
1158 * Server Data:: Getting info about the X server.
1159 * Grabs:: Restricting access to the server by other apps.
1160 * X Miscellaneous:: Other X-specific functions and variables.
1164 * SXEmacs ToolTalk API Summary::
1165 * Sending Messages::
1166 * Receiving Messages::
1170 * Building SXEmacs with LDAP support:: How to add LDAP support to SXEmacs
1171 * SXEmacs LDAP API:: Lisp access to LDAP functions
1172 * Syntax of Search Filters:: A brief summary of RFC 1558
1176 * LDAP Variables:: Lisp variables related to LDAP
1177 * The High-Level LDAP API:: High-level LDAP lisp functions
1178 * The Low-Level LDAP API:: Low-level LDAP lisp primitives
1179 * LDAP Internationalization:: I18n variables and functions
1181 The Low-Level LDAP API
1183 * The LDAP Lisp Object::
1184 * Opening and Closing a LDAP Connection::
1185 * Low-level Operations on a LDAP Server::
1187 LDAP Internationalization
1189 * LDAP Internationalization Variables::
1190 * Encoder/Decoder Functions::
1194 * Building SXEmacs with PostgreSQL support::
1195 * SXEmacs PostgreSQL libpq API::
1196 * SXEmacs PostgreSQL libpq Examples::
1198 SXEmacs PostgreSQL libpq API
1200 * libpq Lisp Variables::
1201 * libpq Lisp Symbols and DataTypes::
1202 * Synchronous Interface Functions::
1203 * Asynchronous Interface Functions::
1204 * Large Object Support::
1205 * Other libpq Functions::
1206 * Unimplemented libpq Functions::
1210 * Building SXEmacs with OpenSSL support::
1211 * SXEmacs OpenSSL API::
1215 * openssl General:: General Information
1216 * openssl RAND:: (Pseudo) Random Numbers
1217 * openssl MD:: Message Digests (aka hashes)
1218 * openssl HMAC:: Message Authentication Codes (aka keyed hashes)
1219 * openssl CIPHER:: Symmetric Cryptography
1220 * openssl PKEY:: Public Key Crypto Systems (aka asymmetric ciphers)
1221 * openssl SSL/TLS:: Secure Network Layers
1223 Enhanced Number Types
1225 * ENT Basics:: Introduction to enhanced numbers.
1227 Internationalization
1229 * I18N Levels 1 and 2:: Support for different time, date, and currency formats.
1230 * I18N Level 3:: Support for localized messages.
1231 * I18N Level 4:: Support for Asian languages.
1235 * Internationalization Terminology::
1236 Definition of various internationalization terms.
1237 * Charsets:: Sets of related characters.
1238 * MULE Characters:: Working with characters in SXEmacs/MULE.
1239 * Composite Characters:: Making new characters by overstriking other ones.
1240 * ISO 2022:: An international standard for charsets and encodings.
1241 * Coding Systems:: Ways of representing a string of chars using integers.
1242 * CCL:: A special language for writing fast converters.
1243 * Category Tables:: Subdividing charsets into groups.
1247 * Style Tips:: Writing clean and robust programs.
1248 * Performance Tips:: How to write efficient lisp code.
1249 * Documentation Tips:: Writing readable documentation strings.
1250 * Comment Tips:: Conventions for writing comments.
1251 * Library Headers:: Standard headers for library packages.
1253 Building SXEmacs and Object Allocation
1255 * Building SXEmacs:: How to preload Lisp libraries into SXEmacs.
1256 * Garbage Collection:: Reclaiming space for Lisp objects no longer used.
1261 @include packaging.texi
1262 @include objects.texi
1263 @include numbers.texi
1264 @include strings.texi
1267 @include sequences.texi
1268 @include symbols.texi
1271 @include control.texi
1272 @include variables.texi
1273 @include functions.texi
1274 @include macros.texi
1275 @include customize.texi
1277 @include loading.texi
1278 @include compile.texi
1279 @include debugging.texi
1280 @include streams.texi
1282 @include minibuf.texi
1283 @include commands.texi
1284 @include keymaps.texi
1286 @include dialog.texi
1287 @include toolbar.texi
1288 @include gutter.texi
1289 @include scrollbars.texi
1290 @include dragndrop.texi
1295 @include backups.texi
1296 @include buffers.texi
1298 @include windows.texi
1299 @include frames.texi
1300 @include consoles-devices.texi
1301 @include positions.texi
1302 @include markers.texi
1305 @include searching.texi
1306 @include syntax.texi
1307 @include abbrevs.texi
1309 @include extents.texi
1310 @include specifiers.texi
1312 @include glyphs.texi
1313 @include annotations.texi
1314 @include display.texi
1317 @include hash-tables.texi
1318 @include range-tables.texi
1319 @include databases.texi
1321 @include processes.texi
1323 @include x-windows.texi
1324 @include tooltalk.texi
1326 @include postgresql.texi
1327 @include openssl.texi
1329 @include internationalization.texi
1333 @c MOVE to User's Manual: include calendar.texi
1335 @c MOVE to User's Manual: include misc-modes.texi
1339 @c REMOVE this: include non-hacker.texi
1342 @include building.texi
1343 @include errors.texi
1344 @include locals.texi
1350 @c Print the tables of contents
1358 These words prevent "local variables" above from confusing SXEmacs.