1 This is Info file ../../info/lispref.info, produced by Makeinfo version
2 1.68 from the input file lispref.texi.
4 INFO-DIR-SECTION XEmacs Editor
6 * Lispref: (lispref). XEmacs Lisp Reference Manual.
11 GNU Emacs Lisp Reference Manual Second Edition (v2.01), May 1993 GNU
12 Emacs Lisp Reference Manual Further Revised (v2.02), August 1993 Lucid
13 Emacs Lisp Reference Manual (for 19.10) First Edition, March 1994
14 XEmacs Lisp Programmer's Manual (for 19.12) Second Edition, April 1995
15 GNU Emacs Lisp Reference Manual v2.4, June 1995 XEmacs Lisp
16 Programmer's Manual (for 19.13) Third Edition, July 1995 XEmacs Lisp
17 Reference Manual (for 19.14 and 20.0) v3.1, March 1996 XEmacs Lisp
18 Reference Manual (for 19.15 and 20.1, 20.2, 20.3) v3.2, April, May,
19 November 1997 XEmacs Lisp Reference Manual (for 21.0) v3.3, April 1998
21 Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995 Free Software
22 Foundation, Inc. Copyright (C) 1994, 1995 Sun Microsystems, Inc.
23 Copyright (C) 1995, 1996 Ben Wing.
25 Permission is granted to make and distribute verbatim copies of this
26 manual provided the copyright notice and this permission notice are
27 preserved on all copies.
29 Permission is granted to copy and distribute modified versions of
30 this manual under the conditions for verbatim copying, provided that the
31 entire resulting derived work is distributed under the terms of a
32 permission notice identical to this one.
34 Permission is granted to copy and distribute translations of this
35 manual into another language, under the above conditions for modified
36 versions, except that this permission notice may be stated in a
37 translation approved by the Foundation.
39 Permission is granted to copy and distribute modified versions of
40 this manual under the conditions for verbatim copying, provided also
41 that the section entitled "GNU General Public License" is included
42 exactly as in the original, and provided that the entire resulting
43 derived work is distributed under the terms of a permission notice
44 identical to this one.
46 Permission is granted to copy and distribute translations of this
47 manual into another language, under the above conditions for modified
48 versions, except that the section entitled "GNU General Public License"
49 may be included in a translation approved by the Free Software
50 Foundation instead of in the original English.
53 File: lispref.info, Node: Building XEmacs, Next: Pure Storage, Up: Building XEmacs and Object Allocation
58 This section explains the steps involved in building the XEmacs
59 executable. You don't have to know this material to build and install
60 XEmacs, since the makefiles do all these things automatically. This
61 information is pertinent to XEmacs maintenance.
63 The `XEmacs Internals Manual' contains more information about this.
65 Compilation of the C source files in the `src' directory produces an
66 executable file called `temacs', also called a "bare impure XEmacs".
67 It contains the XEmacs Lisp interpreter and I/O routines, but not the
70 Before XEmacs is actually usable, a number of Lisp files need to be
71 loaded. These define all the editing commands, plus most of the startup
72 code and many very basic Lisp primitives. This is accomplished by
73 loading the file `loadup.el', which in turn loads all of the other
74 standardly-loaded Lisp files.
76 It takes a substantial time to load the standard Lisp files.
77 Luckily, you don't have to do this each time you run XEmacs; `temacs'
78 can dump out an executable program called `xemacs' that has these files
79 preloaded. `xemacs' starts more quickly because it does not need to
80 load the files. This is the XEmacs executable that is normally
83 To create `xemacs', use the command `temacs -batch -l loadup dump'.
84 The purpose of `-batch' here is to tell `temacs' to run in
85 non-interactive, command-line mode. (`temacs' can *only* run in this
86 fashion. Part of the code required to initialize frames and faces is
87 in Lisp, and must be loaded before XEmacs is able to create any frames.)
88 The argument `dump' tells `loadup.el' to dump a new executable named
91 The dumping process is highly system-specific, and some operating
92 systems don't support dumping. On those systems, you must start XEmacs
93 with the `temacs -batch -l loadup run-temacs' command each time you use
94 it. This takes a substantial time, but since you need to start Emacs
95 once a day at most--or once a week if you never log out--the extra time
96 is not too severe a problem. (In older versions of Emacs, you started
97 Emacs from `temacs' using `temacs -l loadup'.)
99 You are free to start XEmacs directly from `temacs' if you want,
100 even if there is already a dumped `xemacs'. Normally you wouldn't want
101 to do that; but the Makefiles do this when you rebuild XEmacs using
102 `make all-elc', which builds XEmacs and simultaneously compiles any
103 out-of-date Lisp files. (You need `xemacs' in order to compile Lisp
104 files. However, you also need the compiled Lisp files in order to dump
105 out `xemacs'. If both of these are missing or corrupted, you are out
106 of luck unless you're able to bootstrap `xemacs' from `temacs'. Note
107 that `make all-elc' actually loads the alternative loadup file
108 `loadup-el.el', which works like `loadup.el' but disables the
109 pure-copying process and forces XEmacs to ignore any compiled Lisp
110 files even if they exist.)
112 You can specify additional files to preload by writing a library
113 named `site-load.el' that loads them. You may need to increase the
114 value of `PURESIZE', in `src/puresize.h', to make room for the
115 additional files. You should *not* modify this file directly, however;
116 instead, use the `--puresize' configuration option. (If you run out of
117 pure space while dumping `xemacs', you will be told how much pure space
118 you actually will need.) However, the advantage of preloading
119 additional files decreases as machines get faster. On modern machines,
120 it is often not advisable, especially if the Lisp code is on a file
121 system local to the machine running XEmacs.
123 You can specify other Lisp expressions to execute just before dumping
124 by putting them in a library named `site-init.el'. However, if they
125 might alter the behavior that users expect from an ordinary unmodified
126 XEmacs, it is better to put them in `default.el', so that users can
127 override them if they wish. *Note Start-up Summary::.
129 Before `loadup.el' dumps the new executable, it finds the
130 documentation strings for primitive and preloaded functions (and
131 variables) in the file where they are stored, by calling
132 `Snarf-documentation' (*note Accessing Documentation::.). These
133 strings were moved out of the `xemacs' executable to make it smaller.
134 *Note Documentation Basics::.
136 - Function: dump-emacs TO-FILE FROM-FILE
137 This function dumps the current state of XEmacs into an executable
138 file TO-FILE. It takes symbols from FROM-FILE (this is normally
139 the executable file `temacs').
141 If you use this function in an XEmacs that was already dumped, you
142 must set `command-line-processed' to `nil' first for good results.
143 *Note Command Line Arguments::.
145 - Function: run-emacs-from-temacs &rest ARGS
146 This is the function that implements the `run-temacs' command-line
147 argument. It is called from `loadup.el' as appropriate. You
148 should most emphatically *not* call this yourself; it will
149 reinitialize your XEmacs process and you'll be sorry.
151 - Command: emacs-version
152 This function returns a string describing the version of XEmacs
153 that is running. It is useful to include this string in bug
157 => "XEmacs 20.1 [Lucid] (i586-unknown-linux2.0.29)
158 of Mon Apr 7 1997 on altair.xemacs.org"
160 Called interactively, the function prints the same information in
163 - Variable: emacs-build-time
164 The value of this variable is the time at which XEmacs was built
167 emacs-build-time "Mon Apr 7 20:28:52 1997"
170 - Variable: emacs-version
171 The value of this variable is the version of Emacs being run. It
172 is a string, e.g. `"20.1 XEmacs Lucid"'.
174 The following two variables did not exist before FSF GNU Emacs
175 version 19.23 and XEmacs version 19.10, which reduces their usefulness
176 at present, but we hope they will be convenient in the future.
178 - Variable: emacs-major-version
179 The major version number of Emacs, as an integer. For XEmacs
180 version 20.1, the value is 20.
182 - Variable: emacs-minor-version
183 The minor version number of Emacs, as an integer. For XEmacs
184 version 20.1, the value is 1.
187 File: lispref.info, Node: Pure Storage, Next: Garbage Collection, Prev: Building XEmacs, Up: Building XEmacs and Object Allocation
192 XEmacs Lisp uses two kinds of storage for user-created Lisp objects:
193 "normal storage" and "pure storage". Normal storage is where all the
194 new data created during an XEmacs session is kept; see the following
195 section for information on normal storage. Pure storage is used for
196 certain data in the preloaded standard Lisp files--data that should
197 never change during actual use of XEmacs.
199 Pure storage is allocated only while `temacs' is loading the
200 standard preloaded Lisp libraries. In the file `xemacs', it is marked
201 as read-only (on operating systems that permit this), so that the
202 memory space can be shared by all the XEmacs jobs running on the machine
203 at once. Pure storage is not expandable; a fixed amount is allocated
204 when XEmacs is compiled, and if that is not sufficient for the preloaded
205 libraries, `temacs' aborts with an error message. If that happens, you
206 must increase the compilation parameter `PURESIZE' using the
207 `--puresize' option to `configure'. This normally won't happen unless
208 you try to preload additional libraries or add features to the standard
211 - Function: purecopy OBJECT
212 This function makes a copy of OBJECT in pure storage and returns
213 it. It copies strings by simply making a new string with the same
214 characters in pure storage. It recursively copies the contents of
215 vectors and cons cells. It does not make copies of other objects
216 such as symbols, but just returns them unchanged. It signals an
217 error if asked to copy markers.
219 This function is a no-op except while XEmacs is being built and
220 dumped; it is usually called only in the file
221 `xemacs/lisp/prim/loaddefs.el', but a few packages call it just in
222 case you decide to preload them.
224 - Variable: pure-bytes-used
225 The value of this variable is the number of bytes of pure storage
226 allocated so far. Typically, in a dumped XEmacs, this number is
227 very close to the total amount of pure storage available--if it
228 were not, we would preallocate less.
230 - Variable: purify-flag
231 This variable determines whether `defun' should make a copy of the
232 function definition in pure storage. If it is non-`nil', then the
233 function definition is copied into pure storage.
235 This flag is `t' while loading all of the basic functions for
236 building XEmacs initially (allowing those functions to be sharable
237 and non-collectible). Dumping XEmacs as an executable always
238 writes `nil' in this variable, regardless of the value it actually
239 has before and after dumping.
241 You should not change this flag in a running XEmacs.
244 File: lispref.info, Node: Garbage Collection, Prev: Pure Storage, Up: Building XEmacs and Object Allocation
249 When a program creates a list or the user defines a new function
250 (such as by loading a library), that data is placed in normal storage.
251 If normal storage runs low, then XEmacs asks the operating system to
252 allocate more memory in blocks of 2k bytes. Each block is used for one
253 type of Lisp object, so symbols, cons cells, markers, etc., are
254 segregated in distinct blocks in memory. (Vectors, long strings,
255 buffers and certain other editing types, which are fairly large, are
256 allocated in individual blocks, one per object, while small strings are
257 packed into blocks of 8k bytes. [More correctly, a string is allocated
258 in two sections: a fixed size chunk containing the length, list of
259 extents, etc.; and a chunk containing the actual characters in the
260 string. It is this latter chunk that is either allocated individually
261 or packed into 8k blocks. The fixed size chunk is packed into 2k
262 blocks, as for conses, markers, etc.])
264 It is quite common to use some storage for a while, then release it
265 by (for example) killing a buffer or deleting the last pointer to an
266 object. XEmacs provides a "garbage collector" to reclaim this
267 abandoned storage. (This name is traditional, but "garbage recycler"
268 might be a more intuitive metaphor for this facility.)
270 The garbage collector operates by finding and marking all Lisp
271 objects that are still accessible to Lisp programs. To begin with, it
272 assumes all the symbols, their values and associated function
273 definitions, and any data presently on the stack, are accessible. Any
274 objects that can be reached indirectly through other accessible objects
277 When marking is finished, all objects still unmarked are garbage. No
278 matter what the Lisp program or the user does, it is impossible to refer
279 to them, since there is no longer a way to reach them. Their space
280 might as well be reused, since no one will miss them. The second
281 ("sweep") phase of the garbage collector arranges to reuse them.
283 The sweep phase puts unused cons cells onto a "free list" for future
284 allocation; likewise for symbols, markers, extents, events, floats,
285 compiled-function objects, and the fixed-size portion of strings. It
286 compacts the accessible small string-chars chunks so they occupy fewer
287 8k blocks; then it frees the other 8k blocks. Vectors, buffers,
288 windows, and other large objects are individually allocated and freed
289 using `malloc' and `free'.
291 Common Lisp note: unlike other Lisps, XEmacs Lisp does not call
292 the garbage collector when the free list is empty. Instead, it
293 simply requests the operating system to allocate more storage, and
294 processing continues until `gc-cons-threshold' bytes have been
297 This means that you can make sure that the garbage collector will
298 not run during a certain portion of a Lisp program by calling the
299 garbage collector explicitly just before it (provided that portion
300 of the program does not use so much space as to force a second
303 - Command: garbage-collect
304 This command runs a garbage collection, and returns information on
305 the amount of space in use. (Garbage collection can also occur
306 spontaneously if you use more than `gc-cons-threshold' bytes of
307 Lisp data since the previous garbage collection.)
309 `garbage-collect' returns a list containing the following
312 ((USED-CONSES . FREE-CONSES)
313 (USED-SYMS . FREE-SYMS)
314 (USED-MARKERS . FREE-MARKERS)
319 => ((73362 . 8325) (13718 . 164)
320 (5089 . 5098) 949121 118677
321 (conses-used 73362 conses-free 8329 cons-storage 658168
322 symbols-used 13718 symbols-free 164 symbol-storage 335216
323 bit-vectors-used 0 bit-vectors-total-length 0
324 bit-vector-storage 0 vectors-used 7882
325 vectors-total-length 118677 vector-storage 537764
326 compiled-functions-used 1336 compiled-functions-free 37
327 compiled-function-storage 44440 short-strings-used 28829
328 long-strings-used 2 strings-free 7722
329 short-strings-total-length 916657 short-string-storage 1179648
330 long-strings-total-length 32464 string-header-storage 441504
331 floats-used 3 floats-free 43 float-storage 2044 markers-used 5089
332 markers-free 5098 marker-storage 245280 events-used 103
333 events-free 835 event-storage 110656 extents-used 10519
334 extents-free 2718 extent-storage 372736
335 extent-auxiliarys-used 111 extent-auxiliarys-freed 3
336 extent-auxiliary-storage 4440 window-configurations-used 39
337 window-configurations-on-free-list 5
338 window-configurations-freed 10 window-configuration-storage 9492
339 popup-datas-used 3 popup-data-storage 72 toolbar-buttons-used 62
340 toolbar-button-storage 4960 toolbar-datas-used 12
341 toolbar-data-storage 240 symbol-value-buffer-locals-used 182
342 symbol-value-buffer-local-storage 5824
343 symbol-value-lisp-magics-used 22
344 symbol-value-lisp-magic-storage 1496
345 symbol-value-varaliases-used 43
346 symbol-value-varalias-storage 1032 opaque-lists-used 2
347 opaque-list-storage 48 color-instances-used 12
348 color-instance-storage 288 font-instances-used 5
349 font-instance-storage 180 opaques-used 11 opaque-storage 312
350 range-tables-used 1 range-table-storage 16 faces-used 34
351 face-storage 2584 glyphs-used 124 glyph-storage 4464
352 specifiers-used 775 specifier-storage 43869 weak-lists-used 786
353 weak-list-storage 18864 char-tables-used 40
354 char-table-storage 41920 buffers-used 25 buffer-storage 7000
355 extent-infos-used 457 extent-infos-freed 73
356 extent-info-storage 9140 keymaps-used 275 keymap-storage 12100
357 consoles-used 4 console-storage 384 command-builders-used 2
358 command-builder-storage 120 devices-used 2 device-storage 344
359 frames-used 3 frame-storage 624 image-instances-used 47
360 image-instance-storage 3008 windows-used 27 windows-freed 2
361 window-storage 9180 lcrecord-lists-used 15
362 lcrecord-list-storage 360 hash-tables-used 631
363 hash-table-storage 25240 streams-used 1 streams-on-free-list 3
364 streams-freed 12 stream-storage 91))
366 Here is a table explaining each element:
369 The number of cons cells in use.
372 The number of cons cells for which space has been obtained
373 from the operating system, but that are not currently being
377 The number of symbols in use.
380 The number of symbols for which space has been obtained from
381 the operating system, but that are not currently being used.
384 The number of markers in use.
387 The number of markers for which space has been obtained from
388 the operating system, but that are not currently being used.
391 The total size of all strings, in characters.
394 The total number of elements of existing vectors.
397 A list of alternating keyword/value pairs providing more
398 detailed information. (As you can see above, quite a lot of
399 information is provided.)
401 - User Option: gc-cons-threshold
402 The value of this variable is the number of bytes of storage that
403 must be allocated for Lisp objects after one garbage collection in
404 order to trigger another garbage collection. A cons cell counts
405 as eight bytes, a string as one byte per character plus a few
406 bytes of overhead, and so on; space allocated to the contents of
407 buffers does not count. Note that the subsequent garbage
408 collection does not happen immediately when the threshold is
409 exhausted, but only the next time the Lisp evaluator is called.
411 The initial threshold value is 500,000. If you specify a larger
412 value, garbage collection will happen less often. This reduces the
413 amount of time spent garbage collecting, but increases total
414 memory use. You may want to do this when running a program that
415 creates lots of Lisp data.
417 You can make collections more frequent by specifying a smaller
418 value, down to 10,000. A value less than 10,000 will remain in
419 effect only until the subsequent garbage collection, at which time
420 `garbage-collect' will set the threshold back to 10,000. (This does
421 not apply if XEmacs was configured with `--debug'. Therefore, be
422 careful when setting `gc-cons-threshold' in that case!)
424 - Function: memory-limit
425 This function returns the address of the last byte XEmacs has
426 allocated, divided by 1024. We divide the value by 1024 to make
427 sure it fits in a Lisp integer.
429 You can use this to get a general idea of how your actions affect
432 - Variable: pre-gc-hook
433 This is a normal hook to be run just before each garbage
434 collection. Interrupts, garbage collection, and errors are
435 inhibited while this hook runs, so be extremely careful in what
436 you add here. In particular, avoid consing, and do not interact
439 - Variable: post-gc-hook
440 This is a normal hook to be run just after each garbage collection.
441 Interrupts, garbage collection, and errors are inhibited while
442 this hook runs, so be extremely careful in what you add here. In
443 particular, avoid consing, and do not interact with the user.
445 - Variable: gc-message
446 This is a string to print to indicate that a garbage collection is
447 in progress. This is printed in the echo area. If the selected
448 frame is on a window system and `gc-pointer-glyph' specifies a
449 value (i.e. a pointer image instance) in the domain of the
450 selected frame, the mouse cursor will change instead of this
451 message being printed.
453 - Glyph: gc-pointer-glyph
454 This holds the pointer glyph used to indicate that a garbage
455 collection is in progress. If the selected window is on a window
456 system and this glyph specifies a value (i.e. a pointer image
457 instance) in the domain of the selected window, the cursor will be
458 changed as specified during garbage collection. Otherwise, a
459 message will be printed in the echo area, as controlled by
460 `gc-message'. *Note Glyphs::.
462 If XEmacs was configured with `--debug', you can set the following
463 two variables to get direct information about all the allocation that
464 is happening in a segment of Lisp code.
466 - Variable: debug-allocation
467 If non-zero, print out information to stderr about all objects
470 - Variable: debug-allocation-backtrace
471 Length (in stack frames) of short backtrace printed out by
475 File: lispref.info, Node: Standard Errors, Next: Standard Buffer-Local Variables, Prev: Building XEmacs and Object Allocation, Up: Top
480 Here is the complete list of the error symbols in standard Emacs,
481 grouped by concept. The list includes each symbol's message (on the
482 `error-message' property of the symbol) and a cross reference to a
483 description of how the error can occur.
485 Each error symbol has an `error-conditions' property that is a list
486 of symbols. Normally this list includes the error symbol itself and
487 the symbol `error'. Occasionally it includes additional symbols, which
488 are intermediate classifications, narrower than `error' but broader
489 than a single error symbol. For example, all the errors in accessing
490 files have the condition `file-error'.
492 As a special exception, the error symbol `quit' does not have the
493 condition `error', because quitting is not considered an error.
495 *Note Errors::, for an explanation of how errors are generated and
510 `"Args out of range"'
511 *Note Sequences Arrays Vectors::.
515 See `/' and `%' in *Note Numbers::.
517 `beginning-of-buffer'
518 `"Beginning of buffer"'
522 `"Buffer is read-only"'
523 *Note Read Only Buffers::.
525 `cyclic-function-indirection'
526 `"Symbol's chain of function indirections contains a loop"'
527 *Note Function Indirection::.
530 `"Arithmetic domain error"'
536 `"End of file during parsing"'
537 This is not a `file-error'.
538 *Note Input Functions::.
541 This error and its subcategories do not have error-strings,
542 because the error message is constructed from the data items alone
543 when the error condition `file-error' is present.
547 This is a `file-error'.
550 `file-already-exists'
551 This is a `file-error'.
552 *Note Writing to Files::.
555 This is a `file-error'.
556 *Note Modification Time::.
559 `"Invalid byte code"'
560 *Note Byte Compilation::.
564 *Note Classifying Lists::.
566 `invalid-read-syntax'
567 `"Invalid read syntax"'
568 *Note Input Functions::.
572 *Note Regular Expressions::.
575 `"The mark is not active now"'
578 *Note Catch and Throw::.
581 `"Arithmetic overflow error"'
583 `"Attempt to modify a protected field"'
585 `"Arithmetic range error"'
588 *Note Searching and Matching::.
591 `"Attempt to set a constant symbol"'
592 *Note Variables that Never Change: Constant Variables.
595 `"Arithmetic singularity error"'
598 *Note ToolTalk Support::.
600 `undefined-keystroke-sequence'
601 `"Undefined keystroke sequence"'
603 `"Symbol's function definition is void"'
604 *Note Function Cells::.
607 `"Symbol's value as variable is void"'
608 *Note Accessing Variables::.
610 `wrong-number-of-arguments'
611 `"Wrong number of arguments"'
612 *Note Classifying Lists::.
614 `wrong-type-argument'
615 `"Wrong type argument"'
616 *Note Type Predicates::.
618 These error types, which are all classified as special cases of
619 `arith-error', can occur on certain systems for invalid use of
620 mathematical functions.
623 `"Arithmetic domain error"'
624 *Note Math Functions::.
627 `"Arithmetic overflow error"'
628 *Note Math Functions::.
631 `"Arithmetic range error"'
632 *Note Math Functions::.
635 `"Arithmetic singularity error"'
636 *Note Math Functions::.
639 `"Arithmetic underflow error"'
640 *Note Math Functions::.
643 File: lispref.info, Node: Standard Buffer-Local Variables, Next: Standard Keymaps, Prev: Standard Errors, Up: Top
645 Buffer-Local Variables
646 **********************
648 The table below lists the general-purpose Emacs variables that are
649 automatically local (when set) in each buffer. Many Lisp packages
650 define such variables for their internal use; we don't list them here.
656 *note Auto Filling::.
658 `buffer-auto-save-file-name'
662 *note Backup Files::.
664 `buffer-display-table'
665 *note Display Tables::.
668 *note Format Conversion::.
671 *note Buffer File Name::.
674 *note Buffer File Name::.
676 `buffer-file-truename'
677 *note Buffer File Name::.
680 *note Files and MS-DOS::.
682 `buffer-invisibility-spec'
683 *note Invisible Text::.
686 *note Saving Buffers::.
689 *note Read Only Buffers::.
697 `cache-long-line-scans'
701 *note Searching and Case::.
704 *note Usual Display::.
707 *note Comments: (emacs)Comments.
710 *note System Environment::.
712 `defun-prompt-regexp'
716 *note Auto Filling::.
719 *note Moving Point: (emacs)Moving Point.
727 `local-write-file-hooks'
728 *note Saving Buffers::.
743 *note Modeline Data::.
745 `modeline-buffer-identification'
746 *note Modeline Variables::.
749 *note Modeline Data::.
752 *note Modeline Variables::.
755 *note Modeline Variables::.
758 *note Modeline Variables::.
764 *note Standard Regexps::.
767 *note Standard Regexps::.
769 `point-before-scroll'
770 Used for communication between mouse commands and scroll-bar
773 `require-final-newline'
777 *note Selective Display::.
779 `selective-display-ellipses'
780 *note Selective Display::.
783 *note Usual Display::.
789 *note Modeline Variables::.
792 File: lispref.info, Node: Standard Keymaps, Next: Standard Hooks, Prev: Standard Buffer-Local Variables, Up: Top
797 The following symbols are used as the names for various keymaps.
798 Some of these exist when XEmacs is first started, others are loaded
799 only when their respective mode is used. This is not an exhaustive
802 Almost all of these maps are used as local maps. Indeed, of the
803 modes that presently exist, only Vip mode and Terminal mode ever change
807 A keymap containing bindings to bookmark functions.
809 `Buffer-menu-mode-map'
810 A keymap used by Buffer Menu mode.
813 A keymap used by C++ mode.
816 A keymap used by C mode. A sparse keymap used by C mode.
818 `command-history-map'
819 A keymap used by Command History mode.
822 A keymap for subcommands of the prefix `C-x 4'.
825 A keymap for subcommands of the prefix `C-x 5'.
828 A keymap for `C-x' commands.
831 A keymap used by Debugger mode.
834 A keymap for `dired-mode' buffers.
837 A keymap used in `edit-abbrevs'.
840 A keymap used in `edit-tab-stops'.
842 `electric-buffer-menu-mode-map'
843 A keymap used by Electric Buffer Menu mode.
845 `electric-history-map'
846 A keymap used by Electric Command History mode.
848 `emacs-lisp-mode-map'
849 A keymap used by Emacs Lisp mode.
852 A keymap for characters following the Help key.
855 A keymap used by the help utility package.
856 It has the same keymap in its value cell and in its function cell.
859 A keymap used by the `e' command of Info.
862 A keymap containing Info commands.
865 A keymap that defines the characters you can type within
869 A keymap used when in Itimer Edit mode.
871 `lisp-interaction-mode-map'
872 A keymap used by Lisp mode.
875 A keymap used by Lisp mode.
877 A keymap for minibuffer input with completion.
879 `minibuffer-local-isearch-map'
880 A keymap for editing isearch strings in the minibuffer.
882 `minibuffer-local-map'
883 Default keymap to use when reading from the minibuffer.
885 `minibuffer-local-must-match-map'
886 A keymap for minibuffer input with completion, for exact match.
889 The keymap for characters following `C-c'. Note, this is in the
890 global map. This map is not actually mode specific: its name was
891 chosen to be informative for the user in `C-h b'
892 (`display-bindings'), where it describes the main use of the `C-c'
896 The keymap consulted for mouse-clicks on the modeline of a window.
899 A keymap used in Objective C mode as a local map.
902 A local keymap used by Occur mode.
904 `overriding-local-map'
905 A keymap that overrides all other local keymaps.
908 A local keymap used for responses in `query-replace' and related
909 commands; also for `y-or-n-p' and `map-y-or-n-p'. The functions
910 that use this map do not support prefix keys; they look up one
913 `read-expression-map'
914 The minibuffer keymap used for reading Lisp expressions.
916 `read-shell-command-map'
917 The minibuffer keymap used by shell-command and related commands.
919 `shared-lisp-mode-map'
920 A keymap for commands shared by all sorts of Lisp modes.
923 A keymap used by Text mode.
926 The keymap consulted for mouse-clicks over a toolbar.
929 A keymap used by View mode.
932 File: lispref.info, Node: Standard Hooks, Next: Index, Prev: Standard Keymaps, Up: Top
937 The following is a list of hook variables that let you provide
938 functions to be called from within Emacs on suitable occasions.
940 Most of these variables have names ending with `-hook'. They are
941 "normal hooks", run by means of `run-hooks'. The value of such a hook
942 is a list of functions. The recommended way to put a new function on
943 such a hook is to call `add-hook'. *Note Hooks::, for more information
946 The variables whose names end in `-function' have single functions
947 as their values. Usually there is a specific reason why the variable is
948 not a normal hook, such as the need to pass arguments to the function.
949 (In older Emacs versions, some of these variables had names ending in
950 `-hook' even though they were not normal hooks.)
952 The variables whose names end in `-hooks' or `-functions' have lists
953 of functions as their values, but these functions are called in a
954 special way (they are passed arguments, or else their values are used).
956 `activate-menubar-hook'
958 `activate-popup-menu-hook'
960 `ad-definition-hooks'
962 `adaptive-fill-function'
964 `add-log-current-defun-function'
966 `after-change-functions'
968 `after-delete-annotation-hook'
972 `after-insert-file-functions'
978 `after-set-visited-file-name-hooks'
980 `after-write-file-hooks'
986 `before-change-functions'
988 `before-delete-annotation-hook'
994 `blink-paren-function'
996 `buffers-menu-switch-to-buffer-function'
1002 `c-mode-common-hook'
1006 `c-special-indent-hook'
1008 `calendar-load-hook'
1010 `change-major-mode-hook'
1012 `command-history-hook'
1014 `comment-indent-function'
1016 `compilation-buffer-name-function'
1018 `compilation-exit-message-function'
1020 `compilation-finish-function'
1022 `compilation-parse-errors-function'
1024 `compilation-mode-hook'
1026 `create-console-hook'
1028 `create-device-hook'
1032 `dabbrev-friend-buffer-function'
1034 `dabbrev-select-buffers-function'
1036 `delete-console-hook'
1038 `delete-device-hook'
1042 `deselect-frame-hook'
1044 `diary-display-hook'
1048 `dired-after-readin-hook'
1050 `dired-before-readin-hook'
1056 `disabled-command-hook'
1058 `display-buffer-function'
1060 `ediff-after-setup-control-frame-hook'
1062 `ediff-after-setup-windows-hook'
1064 `ediff-before-setup-control-frame-hook'
1066 `ediff-before-setup-windows-hook'
1068 `ediff-brief-help-message-function'
1070 `ediff-cleanup-hook'
1072 `ediff-control-frame-position-function'
1074 `ediff-display-help-hook'
1076 `ediff-focus-on-regexp-matches-function'
1078 `ediff-forward-word-function'
1080 `ediff-hide-regexp-matches-function'
1082 `ediff-keymap-setup-hook'
1086 `ediff-long-help-message-function'
1088 `ediff-make-wide-display-function'
1090 `ediff-merge-split-window-function'
1092 `ediff-meta-action-function'
1094 `ediff-meta-redraw-function'
1098 `ediff-prepare-buffer-hook'
1102 `ediff-registry-setup-hook'
1106 `ediff-session-action-function'
1108 `ediff-session-group-setup-hook'
1110 `ediff-setup-diff-regions-function'
1112 `ediff-show-registry-hook'
1114 `ediff-show-session-group-hook'
1116 `ediff-skip-diff-region-function'
1118 `ediff-split-window-function'
1120 `ediff-startup-hook'
1122 `ediff-suspend-hook'
1124 `ediff-toggle-read-only-function'
1126 `ediff-unselect-hook'
1128 `ediff-window-setup-function'
1132 `electric-buffer-menu-mode-hook'
1134 `electric-command-history-hook'
1136 `electric-help-mode-hook'
1138 `emacs-lisp-mode-hook'
1140 `fill-paragraph-function'
1144 `find-file-not-found-hooks'
1148 `font-lock-after-fontify-buffer-hook'
1150 `font-lock-beginning-of-syntax-function'
1152 `font-lock-mode-hook'
1154 `fume-found-function-hook'
1156 `fume-list-mode-hook'
1158 `fume-rescan-buffer-hook'
1160 `fume-sort-function'
1164 `hack-local-variables-hook'
1166 `highlight-headers-follow-url-function'
1168 `hyper-apropos-mode-hook'
1170 `indent-line-function'
1174 `indent-region-function'
1176 `initial-calendar-window-hook'
1178 `isearch-mode-end-hook'
1186 `kill-buffer-query-functions'
1190 `kill-emacs-query-functions'
1200 `lisp-indent-function'
1202 `lisp-interaction-mode-hook'
1206 `list-diary-entries-hook'
1208 `load-read-function'
1210 `log-message-filter-function'
1214 `mail-citation-hook'
1220 `make-annotation-hook'
1222 `makefile-mode-hook'
1226 `mark-diary-entries-hook'
1230 `menu-no-selection-hook'
1232 `mh-compose-letter-hook'
1234 `mh-folder-mode-hook'
1236 `mh-letter-mode-hook'
1240 `minibuffer-exit-hook'
1242 `minibuffer-setup-hook'
1246 `mouse-enter-frame-hook'
1248 `mouse-leave-frame-hook'
1250 `mouse-track-cleanup-hook'
1252 `mouse-track-click-hook'
1254 `mouse-track-down-hook'
1256 `mouse-track-drag-hook'
1258 `mouse-track-drag-up-hook'
1260 `mouse-track-up-hook'
1262 `mouse-yank-function'
1266 `news-reply-mode-hook'
1270 `nongregorian-diary-listing-hook'
1272 `nongregorian-diary-marking-hook'
1282 `plain-TeX-mode-hook'
1288 `pre-abbrev-expand-hook'
1292 `pre-display-buffer-function'
1298 `print-diary-entries-hook'
1302 `protect-innocence-hook'
1304 `remove-message-hook'
1306 `revert-buffer-function'
1308 `revert-buffer-insert-contents-function'
1310 `rmail-edit-mode-hook'
1314 `rmail-retry-setup-hook'
1316 `rmail-summary-mode-hook'
1318 `scheme-indent-hook'
1326 `send-mail-function'
1330 `shell-set-directory-error-hook'
1332 `special-display-function'
1336 `suspend-resume-hook'
1338 `temp-buffer-show-function'
1342 `terminal-mode-hook'
1344 `terminal-mode-break-hook'
1352 `today-visible-calendar-hook'
1354 `today-invisible-calendar-hook'
1356 `tooltalk-message-handler-hook'
1358 `tooltalk-pattern-handler-hook'
1360 `tooltalk-unprocessed-message-hook'
1366 `vc-checkout-writable-buffer-hook'
1368 `vc-log-after-operation-hook'
1370 `vc-make-buffer-writable-hook'
1374 `vm-arrived-message-hook'
1376 `vm-arrived-messages-hook'
1378 `vm-chop-full-name-function'
1380 `vm-display-buffer-hook'
1382 `vm-edit-message-hook'
1384 `vm-forward-message-hook'
1386 `vm-iconify-frame-hook'
1388 `vm-inhibit-write-file-hook'
1396 `vm-menu-setup-hook'
1402 `vm-rename-current-buffer-function'
1406 `vm-resend-bounced-message-hook'
1408 `vm-resend-message-hook'
1410 `vm-retrieved-spooled-mail-hook'
1412 `vm-select-message-hook'
1414 `vm-select-new-message-hook'
1416 `vm-select-unread-message-hook'
1418 `vm-send-digest-hook'
1420 `vm-summary-mode-hook'
1422 `vm-summary-pointer-update-hook'
1424 `vm-summary-redo-hook'
1426 `vm-summary-update-hook'
1428 `vm-undisplay-buffer-hook'
1430 `vm-visit-folder-hook'
1434 `write-contents-hooks'
1436 `write-file-data-hooks'
1440 `write-region-annotate-functions'
1442 `x-lost-selection-hooks'
1444 `x-sent-selection-hooks'
1446 `zmacs-activate-region-hook'
1448 `zmacs-deactivate-region-hook'
1450 `zmacs-update-region-hook'