Initial revision
[chise/xemacs-chise.git.1] / info / lispref.info-45
1 This is ../info/lispref.info, produced by makeinfo version 4.0 from
2 lispref/lispref.texi.
3
4 INFO-DIR-SECTION XEmacs Editor
5 START-INFO-DIR-ENTRY
6 * Lispref: (lispref).           XEmacs Lisp Reference Manual.
7 END-INFO-DIR-ENTRY
8
9    Edition History:
10
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
20
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.
24
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.
28
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.
33
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.
38
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.
45
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.
51
52 \1f
53 File: lispref.info,  Node: Pure Storage,  Next: Garbage Collection,  Prev: Building XEmacs,  Up: Building XEmacs and Object Allocation
54
55 Pure Storage
56 ============
57
58    XEmacs Lisp uses two kinds of storage for user-created Lisp objects:
59 "normal storage" and "pure storage".  Normal storage is where all the
60 new data created during an XEmacs session is kept; see the following
61 section for information on normal storage.  Pure storage is used for
62 certain data in the preloaded standard Lisp files--data that should
63 never change during actual use of XEmacs.
64
65    Pure storage is allocated only while `temacs' is loading the
66 standard preloaded Lisp libraries.  In the file `xemacs', it is marked
67 as read-only (on operating systems that permit this), so that the
68 memory space can be shared by all the XEmacs jobs running on the machine
69 at once.  Pure storage is not expandable; a fixed amount is allocated
70 when XEmacs is compiled, and if that is not sufficient for the preloaded
71 libraries, `temacs' aborts with an error message.  If that happens, you
72 must increase the compilation parameter `PURESIZE' using the
73 `--puresize' option to `configure'.  This normally won't happen unless
74 you try to preload additional libraries or add features to the standard
75 ones.
76
77  - Function: purecopy object
78      This function makes a copy of OBJECT in pure storage and returns
79      it.  It copies strings by simply making a new string with the same
80      characters in pure storage.  It recursively copies the contents of
81      vectors and cons cells.  It does not make copies of other objects
82      such as symbols, but just returns them unchanged.  It signals an
83      error if asked to copy markers.
84
85      This function is a no-op except while XEmacs is being built and
86      dumped; it is usually called only in the file
87      `xemacs/lisp/prim/loaddefs.el', but a few packages call it just in
88      case you decide to preload them.
89
90  - Variable: pure-bytes-used
91      The value of this variable is the number of bytes of pure storage
92      allocated so far.  Typically, in a dumped XEmacs, this number is
93      very close to the total amount of pure storage available--if it
94      were not, we would preallocate less.
95
96  - Variable: purify-flag
97      This variable determines whether `defun' should make a copy of the
98      function definition in pure storage.  If it is non-`nil', then the
99      function definition is copied into pure storage.
100
101      This flag is `t' while loading all of the basic functions for
102      building XEmacs initially (allowing those functions to be sharable
103      and non-collectible).  Dumping XEmacs as an executable always
104      writes `nil' in this variable, regardless of the value it actually
105      has before and after dumping.
106
107      You should not change this flag in a running XEmacs.
108
109 \1f
110 File: lispref.info,  Node: Garbage Collection,  Prev: Pure Storage,  Up: Building XEmacs and Object Allocation
111
112 Garbage Collection
113 ==================
114
115    When a program creates a list or the user defines a new function
116 (such as by loading a library), that data is placed in normal storage.
117 If normal storage runs low, then XEmacs asks the operating system to
118 allocate more memory in blocks of 2k bytes.  Each block is used for one
119 type of Lisp object, so symbols, cons cells, markers, etc., are
120 segregated in distinct blocks in memory.  (Vectors, long strings,
121 buffers and certain other editing types, which are fairly large, are
122 allocated in individual blocks, one per object, while small strings are
123 packed into blocks of 8k bytes. [More correctly, a string is allocated
124 in two sections: a fixed size chunk containing the length, list of
125 extents, etc.; and a chunk containing the actual characters in the
126 string.  It is this latter chunk that is either allocated individually
127 or packed into 8k blocks.  The fixed size chunk is packed into 2k
128 blocks, as for conses, markers, etc.])
129
130    It is quite common to use some storage for a while, then release it
131 by (for example) killing a buffer or deleting the last pointer to an
132 object.  XEmacs provides a "garbage collector" to reclaim this
133 abandoned storage.  (This name is traditional, but "garbage recycler"
134 might be a more intuitive metaphor for this facility.)
135
136    The garbage collector operates by finding and marking all Lisp
137 objects that are still accessible to Lisp programs.  To begin with, it
138 assumes all the symbols, their values and associated function
139 definitions, and any data presently on the stack, are accessible.  Any
140 objects that can be reached indirectly through other accessible objects
141 are also accessible.
142
143    When marking is finished, all objects still unmarked are garbage.  No
144 matter what the Lisp program or the user does, it is impossible to refer
145 to them, since there is no longer a way to reach them.  Their space
146 might as well be reused, since no one will miss them.  The second
147 ("sweep") phase of the garbage collector arranges to reuse them.
148
149    The sweep phase puts unused cons cells onto a "free list" for future
150 allocation; likewise for symbols, markers, extents, events, floats,
151 compiled-function objects, and the fixed-size portion of strings.  It
152 compacts the accessible small string-chars chunks so they occupy fewer
153 8k blocks; then it frees the other 8k blocks.  Vectors, buffers,
154 windows, and other large objects are individually allocated and freed
155 using `malloc' and `free'.
156
157      Common Lisp note: unlike other Lisps, XEmacs Lisp does not call
158      the garbage collector when the free list is empty.  Instead, it
159      simply requests the operating system to allocate more storage, and
160      processing continues until `gc-cons-threshold' bytes have been
161      used.
162
163      This means that you can make sure that the garbage collector will
164      not run during a certain portion of a Lisp program by calling the
165      garbage collector explicitly just before it (provided that portion
166      of the program does not use so much space as to force a second
167      garbage collection).
168
169  - Command: garbage-collect
170      This command runs a garbage collection, and returns information on
171      the amount of space in use.  (Garbage collection can also occur
172      spontaneously if you use more than `gc-cons-threshold' bytes of
173      Lisp data since the previous garbage collection.)
174
175      `garbage-collect' returns a list containing the following
176      information:
177
178           ((USED-CONSES . FREE-CONSES)
179            (USED-SYMS . FREE-SYMS)
180            (USED-MARKERS . FREE-MARKERS)
181            USED-STRING-CHARS
182            USED-VECTOR-SLOTS
183            (PLIST))
184           
185           => ((73362 . 8325) (13718 . 164)
186           (5089 . 5098) 949121 118677
187           (conses-used 73362 conses-free 8329 cons-storage 658168
188           symbols-used 13718 symbols-free 164 symbol-storage 335216
189           bit-vectors-used 0 bit-vectors-total-length 0
190           bit-vector-storage 0 vectors-used 7882
191           vectors-total-length 118677 vector-storage 537764
192           compiled-functions-used 1336 compiled-functions-free 37
193           compiled-function-storage 44440 short-strings-used 28829
194           long-strings-used 2 strings-free 7722
195           short-strings-total-length 916657 short-string-storage 1179648
196           long-strings-total-length 32464 string-header-storage 441504
197           floats-used 3 floats-free 43 float-storage 2044 markers-used 5089
198           markers-free 5098 marker-storage 245280 events-used 103
199           events-free 835 event-storage 110656 extents-used 10519
200           extents-free 2718 extent-storage 372736
201           extent-auxiliarys-used 111 extent-auxiliarys-freed 3
202           extent-auxiliary-storage 4440 window-configurations-used 39
203           window-configurations-on-free-list 5
204           window-configurations-freed 10 window-configuration-storage 9492
205           popup-datas-used 3 popup-data-storage 72 toolbar-buttons-used 62
206           toolbar-button-storage 4960 toolbar-datas-used 12
207           toolbar-data-storage 240 symbol-value-buffer-locals-used 182
208           symbol-value-buffer-local-storage 5824
209           symbol-value-lisp-magics-used 22
210           symbol-value-lisp-magic-storage 1496
211           symbol-value-varaliases-used 43
212           symbol-value-varalias-storage 1032 opaque-lists-used 2
213           opaque-list-storage 48 color-instances-used 12
214           color-instance-storage 288 font-instances-used 5
215           font-instance-storage 180 opaques-used 11 opaque-storage 312
216           range-tables-used 1 range-table-storage 16 faces-used 34
217           face-storage 2584 glyphs-used 124 glyph-storage 4464
218           specifiers-used 775 specifier-storage 43869 weak-lists-used 786
219           weak-list-storage 18864 char-tables-used 40
220           char-table-storage 41920 buffers-used 25 buffer-storage 7000
221           extent-infos-used 457 extent-infos-freed 73
222           extent-info-storage 9140 keymaps-used 275 keymap-storage 12100
223           consoles-used 4 console-storage 384 command-builders-used 2
224           command-builder-storage 120 devices-used 2 device-storage 344
225           frames-used 3 frame-storage 624 image-instances-used 47
226           image-instance-storage 3008 windows-used 27 windows-freed 2
227           window-storage 9180 lcrecord-lists-used 15
228           lcrecord-list-storage 360 hash-tables-used 631
229           hash-table-storage 25240 streams-used 1 streams-on-free-list 3
230           streams-freed 12 stream-storage 91))
231
232      Here is a table explaining each element:
233
234     USED-CONSES
235           The number of cons cells in use.
236
237     FREE-CONSES
238           The number of cons cells for which space has been obtained
239           from the operating system, but that are not currently being
240           used.
241
242     USED-SYMS
243           The number of symbols in use.
244
245     FREE-SYMS
246           The number of symbols for which space has been obtained from
247           the operating system, but that are not currently being used.
248
249     USED-MARKERS
250           The number of markers in use.
251
252     FREE-MARKERS
253           The number of markers for which space has been obtained from
254           the operating system, but that are not currently being used.
255
256     USED-STRING-CHARS
257           The total size of all strings, in characters.
258
259     USED-VECTOR-SLOTS
260           The total number of elements of existing vectors.
261
262     PLIST
263           A list of alternating keyword/value pairs providing more
264           detailed information. (As you can see above, quite a lot of
265           information is provided.)
266
267  - User Option: gc-cons-threshold
268      The value of this variable is the number of bytes of storage that
269      must be allocated for Lisp objects after one garbage collection in
270      order to trigger another garbage collection.  A cons cell counts
271      as eight bytes, a string as one byte per character plus a few
272      bytes of overhead, and so on; space allocated to the contents of
273      buffers does not count.  Note that the subsequent garbage
274      collection does not happen immediately when the threshold is
275      exhausted, but only the next time the Lisp evaluator is called.
276
277      The initial threshold value is 500,000.  If you specify a larger
278      value, garbage collection will happen less often.  This reduces the
279      amount of time spent garbage collecting, but increases total
280      memory use.  You may want to do this when running a program that
281      creates lots of Lisp data.
282
283      You can make collections more frequent by specifying a smaller
284      value, down to 10,000.  A value less than 10,000 will remain in
285      effect only until the subsequent garbage collection, at which time
286      `garbage-collect' will set the threshold back to 10,000. (This does
287      not apply if XEmacs was configured with `--debug'.  Therefore, be
288      careful when setting `gc-cons-threshold' in that case!)
289
290  - Function: memory-limit
291      This function returns the address of the last byte XEmacs has
292      allocated, divided by 1024.  We divide the value by 1024 to make
293      sure it fits in a Lisp integer.
294
295      You can use this to get a general idea of how your actions affect
296      the memory usage.
297
298  - Variable: pre-gc-hook
299      This is a normal hook to be run just before each garbage
300      collection.  Interrupts, garbage collection, and errors are
301      inhibited while this hook runs, so be extremely careful in what
302      you add here.  In particular, avoid consing, and do not interact
303      with the user.
304
305  - Variable: post-gc-hook
306      This is a normal hook to be run just after each garbage collection.
307      Interrupts, garbage collection, and errors are inhibited while
308      this hook runs, so be extremely careful in what you add here.  In
309      particular, avoid consing, and do not interact with the user.
310
311  - Variable: gc-message
312      This is a string to print to indicate that a garbage collection is
313      in progress.  This is printed in the echo area.  If the selected
314      frame is on a window system and `gc-pointer-glyph' specifies a
315      value (i.e. a pointer image instance) in the domain of the
316      selected frame, the mouse cursor will change instead of this
317      message being printed.
318
319  - Glyph: gc-pointer-glyph
320      This holds the pointer glyph used to indicate that a garbage
321      collection is in progress.  If the selected window is on a window
322      system and this glyph specifies a value (i.e. a pointer image
323      instance) in the domain of the selected window, the cursor will be
324      changed as specified during garbage collection.  Otherwise, a
325      message will be printed in the echo area, as controlled by
326      `gc-message'.  *Note Glyphs::.
327
328    If XEmacs was configured with `--debug', you can set the following
329 two variables to get direct information about all the allocation that
330 is happening in a segment of Lisp code.
331
332  - Variable: debug-allocation
333      If non-zero, print out information to stderr about all objects
334      allocated.
335
336  - Variable: debug-allocation-backtrace
337      Length (in stack frames) of short backtrace printed out by
338      `debug-allocation'.
339
340 \1f
341 File: lispref.info,  Node: Standard Errors,  Next: Standard Buffer-Local Variables,  Prev: Building XEmacs and Object Allocation,  Up: Top
342
343 Standard Errors
344 ***************
345
346    Here is the complete list of the error symbols in standard Emacs,
347 grouped by concept.  The list includes each symbol's message (on the
348 `error-message' property of the symbol) and a cross reference to a
349 description of how the error can occur.
350
351    Each error symbol has an `error-conditions' property that is a list
352 of symbols.  Normally this list includes the error symbol itself and
353 the symbol `error'.  Occasionally it includes additional symbols, which
354 are intermediate classifications, narrower than `error' but broader
355 than a single error symbol.  For example, all the errors in accessing
356 files have the condition `file-error'.
357
358    As a special exception, the error symbol `quit' does not have the
359 condition `error', because quitting is not considered an error.
360
361    *Note Errors::, for an explanation of how errors are generated and
362 handled.
363
364 `SYMBOL'
365      STRING; REFERENCE.
366
367 `error'
368      `"error"'
369      *Note Errors::.
370
371 `quit'
372      `"Quit"'
373      *Note Quitting::.
374
375 `args-out-of-range'
376      `"Args out of range"'
377      *Note Sequences Arrays Vectors::.
378
379 `arith-error'
380      `"Arithmetic error"'
381      See `/' and `%' in *Note Numbers::.
382
383 `beginning-of-buffer'
384      `"Beginning of buffer"'
385      *Note Motion::.
386
387 `buffer-read-only'
388      `"Buffer is read-only"'
389      *Note Read Only Buffers::.
390
391 `cyclic-function-indirection'
392      `"Symbol's chain of function indirections contains a loop"'
393      *Note Function Indirection::.
394
395 `domain-error'
396      `"Arithmetic domain error"'
397 `end-of-buffer'
398      `"End of buffer"'
399      *Note Motion::.
400
401 `end-of-file'
402      `"End of file during parsing"'
403      This is not a `file-error'.
404      *Note Input Functions::.
405
406 `file-error'
407      This error and its subcategories do not have error-strings,
408      because the error message is constructed from the data items alone
409      when the error condition `file-error' is present.
410      *Note Files::.
411
412 `file-locked'
413      This is a `file-error'.
414      *Note File Locks::.
415
416 `file-already-exists'
417      This is a `file-error'.
418      *Note Writing to Files::.
419
420 `file-supersession'
421      This is a `file-error'.
422      *Note Modification Time::.
423
424 `invalid-byte-code'
425      `"Invalid byte code"'
426      *Note Byte Compilation::.
427
428 `invalid-function'
429      `"Invalid function"'
430      *Note Classifying Lists::.
431
432 `invalid-read-syntax'
433      `"Invalid read syntax"'
434      *Note Input Functions::.
435
436 `invalid-regexp'
437      `"Invalid regexp"'
438      *Note Regular Expressions::.
439
440 `mark-inactive'
441      `"The mark is not active now"'
442 `no-catch'
443      `"No catch for tag"'
444      *Note Catch and Throw::.
445
446 `overflow-error'
447      `"Arithmetic overflow error"'
448 `protected-field'
449      `"Attempt to modify a protected field"'
450 `range-error'
451      `"Arithmetic range error"'
452 `search-failed'
453      `"Search failed"'
454      *Note Searching and Matching::.
455
456 `setting-constant'
457      `"Attempt to set a constant symbol"'
458      *Note Variables that Never Change: Constant Variables.
459
460 `singularity-error'
461      `"Arithmetic singularity error"'
462 `tooltalk-error'
463      `"ToolTalk error"'
464      *Note ToolTalk Support::.
465
466 `undefined-keystroke-sequence'
467      `"Undefined keystroke sequence"'
468 `void-function'
469      `"Symbol's function definition is void"'
470      *Note Function Cells::.
471
472 `void-variable'
473      `"Symbol's value as variable is void"'
474      *Note Accessing Variables::.
475
476 `wrong-number-of-arguments'
477      `"Wrong number of arguments"'
478      *Note Classifying Lists::.
479
480 `wrong-type-argument'
481      `"Wrong type argument"'
482      *Note Type Predicates::.
483
484    These error types, which are all classified as special cases of
485 `arith-error', can occur on certain systems for invalid use of
486 mathematical functions.
487
488 `domain-error'
489      `"Arithmetic domain error"'
490      *Note Math Functions::.
491
492 `overflow-error'
493      `"Arithmetic overflow error"'
494      *Note Math Functions::.
495
496 `range-error'
497      `"Arithmetic range error"'
498      *Note Math Functions::.
499
500 `singularity-error'
501      `"Arithmetic singularity error"'
502      *Note Math Functions::.
503
504 `underflow-error'
505      `"Arithmetic underflow error"'
506      *Note Math Functions::.
507
508 \1f
509 File: lispref.info,  Node: Standard Buffer-Local Variables,  Next: Standard Keymaps,  Prev: Standard Errors,  Up: Top
510
511 Buffer-Local Variables
512 **********************
513
514    The table below lists the general-purpose Emacs variables that are
515 automatically local (when set) in each buffer.  Many Lisp packages
516 define such variables for their internal use; we don't list them here.
517
518 `abbrev-mode'
519      *note Abbrevs::
520
521 `auto-fill-function'
522      *note Auto Filling::
523
524 `buffer-auto-save-file-name'
525      *note Auto-Saving::
526
527 `buffer-backed-up'
528      *note Backup Files::
529
530 `buffer-display-table'
531      *note Display Tables::
532
533 `buffer-file-format'
534      *note Format Conversion::
535
536 `buffer-file-name'
537      *note Buffer File Name::
538
539 `buffer-file-number'
540      *note Buffer File Name::
541
542 `buffer-file-truename'
543      *note Buffer File Name::
544
545 `buffer-file-type'
546      *note Files and MS-DOS::
547
548 `buffer-invisibility-spec'
549      *note Invisible Text::
550
551 `buffer-offer-save'
552      *note Saving Buffers::
553
554 `buffer-read-only'
555      *note Read Only Buffers::
556
557 `buffer-saved-size'
558      *note Point::
559
560 `buffer-undo-list'
561      *note Undo::
562
563 `cache-long-line-scans'
564      *note Text Lines::
565
566 `case-fold-search'
567      *note Searching and Case::
568
569 `ctl-arrow'
570      *note Usual Display::
571
572 `comment-column'
573      *note Comments: (emacs)Comments.
574
575 `default-directory'
576      *note System Environment::
577
578 `defun-prompt-regexp'
579      *note List Motion::
580
581 `fill-column'
582      *note Auto Filling::
583
584 `goal-column'
585      *note Moving Point: (emacs)Moving Point.
586
587 `left-margin'
588      *note Indentation::
589
590 `local-abbrev-table'
591      *note Abbrevs::
592
593 `local-write-file-hooks'
594      *note Saving Buffers::
595
596 `major-mode'
597      *note Mode Help::
598
599 `mark-active'
600      *note The Mark::
601
602 `mark-ring'
603      *note The Mark::
604
605 `minor-modes'
606      *note Minor Modes::
607
608 `modeline-format'
609      *note Modeline Data::
610
611 `modeline-buffer-identification'
612      *note Modeline Variables::
613
614 `modeline-format'
615      *note Modeline Data::
616
617 `modeline-modified'
618      *note Modeline Variables::
619
620 `modeline-process'
621      *note Modeline Variables::
622
623 `mode-name'
624      *note Modeline Variables::
625
626 `overwrite-mode'
627      *note Insertion::
628
629 `paragraph-separate'
630      *note Standard Regexps::
631
632 `paragraph-start'
633      *note Standard Regexps::
634
635 `point-before-scroll'
636      Used for communication between mouse commands and scroll-bar
637      commands.
638
639 `require-final-newline'
640      *note Insertion::
641
642 `selective-display'
643      *note Selective Display::
644
645 `selective-display-ellipses'
646      *note Selective Display::
647
648 `tab-width'
649      *note Usual Display::
650
651 `truncate-lines'
652      *note Truncation::
653
654 `vc-mode'
655      *note Modeline Variables::
656
657 \1f
658 File: lispref.info,  Node: Standard Keymaps,  Next: Standard Hooks,  Prev: Standard Buffer-Local Variables,  Up: Top
659
660 Standard Keymaps
661 ****************
662
663    The following symbols are used as the names for various keymaps.
664 Some of these exist when XEmacs is first started, others are loaded
665 only when their respective mode is used.  This is not an exhaustive
666 list.
667
668    Almost all of these maps are used as local maps.  Indeed, of the
669 modes that presently exist, only Vip mode and Terminal mode ever change
670 the global keymap.
671
672 `bookmark-map'
673      A keymap containing bindings to bookmark functions.
674
675 `Buffer-menu-mode-map'
676      A keymap used by Buffer Menu mode.
677
678 `c++-mode-map'
679      A keymap used by C++ mode.
680
681 `c-mode-map'
682      A keymap used by C mode.  A sparse keymap used by C mode.
683
684 `command-history-map'
685      A keymap used by Command History mode.
686
687 `ctl-x-4-map'
688      A keymap for subcommands of the prefix `C-x 4'.
689
690 `ctl-x-5-map'
691      A keymap for subcommands of the prefix `C-x 5'.
692
693 `ctl-x-map'
694      A keymap for `C-x' commands.
695
696 `debugger-mode-map'
697      A keymap used by Debugger mode.
698
699 `dired-mode-map'
700      A keymap for `dired-mode' buffers.
701
702 `edit-abbrevs-map'
703      A keymap used in `edit-abbrevs'.
704
705 `edit-tab-stops-map'
706      A keymap used in `edit-tab-stops'.
707
708 `electric-buffer-menu-mode-map'
709      A keymap used by Electric Buffer Menu mode.
710
711 `electric-history-map'
712      A keymap used by Electric Command History mode.
713
714 `emacs-lisp-mode-map'
715      A keymap used by Emacs Lisp mode.
716
717 `help-map'
718      A keymap for characters following the Help key.
719
720 `Helper-help-map'
721      A keymap used by the help utility package.
722      It has the same keymap in its value cell and in its function cell.
723
724 `Info-edit-map'
725      A keymap used by the `e' command of Info.
726
727 `Info-mode-map'
728      A keymap containing Info commands.
729
730 `isearch-mode-map'
731      A keymap that defines the characters you can type within
732      incremental search.
733
734 `itimer-edit-map'
735      A keymap used when in Itimer Edit mode.
736
737 `lisp-interaction-mode-map'
738      A keymap used by Lisp mode.
739
740 `lisp-mode-map'
741      A keymap used by Lisp mode.
742
743      A keymap for minibuffer input with completion.
744
745 `minibuffer-local-isearch-map'
746      A keymap for editing isearch strings in the minibuffer.
747
748 `minibuffer-local-map'
749      Default keymap to use when reading from the minibuffer.
750
751 `minibuffer-local-must-match-map'
752      A keymap for minibuffer input with completion, for exact match.
753
754 `mode-specific-map'
755      The keymap for characters following `C-c'.  Note, this is in the
756      global map.  This map is not actually mode specific: its name was
757      chosen to be informative for the user in `C-h b'
758      (`display-bindings'), where it describes the main use of the `C-c'
759      prefix key.
760
761 `modeline-map'
762      The keymap consulted for mouse-clicks on the modeline of a window.
763
764 `objc-mode-map'
765      A keymap used in Objective C mode as a local map.
766
767 `occur-mode-map'
768      A local keymap used by Occur mode.
769
770 `overriding-local-map'
771      A keymap that overrides all other local keymaps.
772
773 `query-replace-map'
774      A local keymap used for responses in `query-replace' and related
775      commands; also for `y-or-n-p' and `map-y-or-n-p'.  The functions
776      that use this map do not support prefix keys; they look up one
777      event at a time.
778
779 `read-expression-map'
780      The minibuffer keymap used for reading Lisp expressions.
781
782 `read-shell-command-map'
783      The minibuffer keymap used by shell-command and related commands.
784
785 `shared-lisp-mode-map'
786      A keymap for commands shared by all sorts of Lisp modes.
787
788 `text-mode-map'
789      A keymap used by Text mode.
790
791 `toolbar-map'
792      The keymap consulted for mouse-clicks over a toolbar.
793
794 `view-mode-map'
795      A keymap used by View mode.
796
797 \1f
798 File: lispref.info,  Node: Standard Hooks,  Next: Index,  Prev: Standard Keymaps,  Up: Top
799
800 Standard Hooks
801 **************
802
803    The following is a list of hook variables that let you provide
804 functions to be called from within Emacs on suitable occasions.
805
806    Most of these variables have names ending with `-hook'.  They are
807 "normal hooks", run by means of `run-hooks'.  The value of such a hook
808 is a list of functions.  The recommended way to put a new function on
809 such a hook is to call `add-hook'.  *Note Hooks::, for more information
810 about using hooks.
811
812    The variables whose names end in `-function' have single functions
813 as their values.  Usually there is a specific reason why the variable is
814 not a normal hook, such as the need to pass arguments to the function.
815 (In older Emacs versions, some of these variables had names ending in
816 `-hook' even though they were not normal hooks.)
817
818    The variables whose names end in `-hooks' or `-functions' have lists
819 of functions as their values, but these functions are called in a
820 special way (they are passed arguments, or else their values are used).
821
822 `activate-menubar-hook'
823
824 `activate-popup-menu-hook'
825
826 `ad-definition-hooks'
827
828 `adaptive-fill-function'
829
830 `add-log-current-defun-function'
831
832 `after-change-functions'
833
834 `after-delete-annotation-hook'
835
836 `after-init-hook'
837
838 `after-insert-file-functions'
839
840 `after-revert-hook'
841
842 `after-save-hook'
843
844 `after-set-visited-file-name-hooks'
845
846 `after-write-file-hooks'
847
848 `auto-fill-function'
849
850 `auto-save-hook'
851
852 `before-change-functions'
853
854 `before-delete-annotation-hook'
855
856 `before-init-hook'
857
858 `before-revert-hook'
859
860 `blink-paren-function'
861
862 `buffers-menu-switch-to-buffer-function'
863
864 `c++-mode-hook'
865
866 `c-delete-function'
867
868 `c-mode-common-hook'
869
870 `c-mode-hook'
871
872 `c-special-indent-hook'
873
874 `calendar-load-hook'
875
876 `change-major-mode-hook'
877
878 `command-history-hook'
879
880 `comment-indent-function'
881
882 `compilation-buffer-name-function'
883
884 `compilation-exit-message-function'
885
886 `compilation-finish-function'
887
888 `compilation-parse-errors-function'
889
890 `compilation-mode-hook'
891
892 `create-console-hook'
893
894 `create-device-hook'
895
896 `create-frame-hook'
897
898 `dabbrev-friend-buffer-function'
899
900 `dabbrev-select-buffers-function'
901
902 `delete-console-hook'
903
904 `delete-device-hook'
905
906 `delete-frame-hook'
907
908 `deselect-frame-hook'
909
910 `diary-display-hook'
911
912 `diary-hook'
913
914 `dired-after-readin-hook'
915
916 `dired-before-readin-hook'
917
918 `dired-load-hook'
919
920 `dired-mode-hook'
921
922 `disabled-command-hook'
923
924 `display-buffer-function'
925
926 `ediff-after-setup-control-frame-hook'
927
928 `ediff-after-setup-windows-hook'
929
930 `ediff-before-setup-control-frame-hook'
931
932 `ediff-before-setup-windows-hook'
933
934 `ediff-brief-help-message-function'
935
936 `ediff-cleanup-hook'
937
938 `ediff-control-frame-position-function'
939
940 `ediff-display-help-hook'
941
942 `ediff-focus-on-regexp-matches-function'
943
944 `ediff-forward-word-function'
945
946 `ediff-hide-regexp-matches-function'
947
948 `ediff-keymap-setup-hook'
949
950 `ediff-load-hook'
951
952 `ediff-long-help-message-function'
953
954 `ediff-make-wide-display-function'
955
956 `ediff-merge-split-window-function'
957
958 `ediff-meta-action-function'
959
960 `ediff-meta-redraw-function'
961
962 `ediff-mode-hook'
963
964 `ediff-prepare-buffer-hook'
965
966 `ediff-quit-hook'
967
968 `ediff-registry-setup-hook'
969
970 `ediff-select-hook'
971
972 `ediff-session-action-function'
973
974 `ediff-session-group-setup-hook'
975
976 `ediff-setup-diff-regions-function'
977
978 `ediff-show-registry-hook'
979
980 `ediff-show-session-group-hook'
981
982 `ediff-skip-diff-region-function'
983
984 `ediff-split-window-function'
985
986 `ediff-startup-hook'
987
988 `ediff-suspend-hook'
989
990 `ediff-toggle-read-only-function'
991
992 `ediff-unselect-hook'
993
994 `ediff-window-setup-function'
995
996 `edit-picture-hook'
997
998 `electric-buffer-menu-mode-hook'
999
1000 `electric-command-history-hook'
1001
1002 `electric-help-mode-hook'
1003
1004 `emacs-lisp-mode-hook'
1005
1006 `fill-paragraph-function'
1007
1008 `find-file-hooks'
1009
1010 `find-file-not-found-hooks'
1011
1012 `first-change-hook'
1013
1014 `font-lock-after-fontify-buffer-hook'
1015
1016 `font-lock-beginning-of-syntax-function'
1017
1018 `font-lock-mode-hook'
1019
1020 `fume-found-function-hook'
1021
1022 `fume-list-mode-hook'
1023
1024 `fume-rescan-buffer-hook'
1025
1026 `fume-sort-function'
1027
1028 `gnus-startup-hook'
1029
1030 `hack-local-variables-hook'
1031
1032 `highlight-headers-follow-url-function'
1033
1034 `hyper-apropos-mode-hook'
1035
1036 `indent-line-function'
1037
1038 `indent-mim-hook'
1039
1040 `indent-region-function'
1041
1042 `initial-calendar-window-hook'
1043
1044 `isearch-mode-end-hook'
1045
1046 `isearch-mode-hook'
1047
1048 `java-mode-hook'
1049
1050 `kill-buffer-hook'
1051
1052 `kill-buffer-query-functions'
1053
1054 `kill-emacs-hook'
1055
1056 `kill-emacs-query-functions'
1057
1058 `kill-hooks'
1059
1060 `LaTeX-mode-hook'
1061
1062 `latex-mode-hook'
1063
1064 `ledit-mode-hook'
1065
1066 `lisp-indent-function'
1067
1068 `lisp-interaction-mode-hook'
1069
1070 `lisp-mode-hook'
1071
1072 `list-diary-entries-hook'
1073
1074 `load-read-function'
1075
1076 `log-message-filter-function'
1077
1078 `m2-mode-hook'
1079
1080 `mail-citation-hook'
1081
1082 `mail-mode-hook'
1083
1084 `mail-setup-hook'
1085
1086 `make-annotation-hook'
1087
1088 `makefile-mode-hook'
1089
1090 `map-frame-hook'
1091
1092 `mark-diary-entries-hook'
1093
1094 `medit-mode-hook'
1095
1096 `menu-no-selection-hook'
1097
1098 `mh-compose-letter-hook'
1099
1100 `mh-folder-mode-hook'
1101
1102 `mh-letter-mode-hook'
1103
1104 `mim-mode-hook'
1105
1106 `minibuffer-exit-hook'
1107
1108 `minibuffer-setup-hook'
1109
1110 `mode-motion-hook'
1111
1112 `mouse-enter-frame-hook'
1113
1114 `mouse-leave-frame-hook'
1115
1116 `mouse-track-cleanup-hook'
1117
1118 `mouse-track-click-hook'
1119
1120 `mouse-track-down-hook'
1121
1122 `mouse-track-drag-hook'
1123
1124 `mouse-track-drag-up-hook'
1125
1126 `mouse-track-up-hook'
1127
1128 `mouse-yank-function'
1129
1130 `news-mode-hook'
1131
1132 `news-reply-mode-hook'
1133
1134 `news-setup-hook'
1135
1136 `nongregorian-diary-listing-hook'
1137
1138 `nongregorian-diary-marking-hook'
1139
1140 `nroff-mode-hook'
1141
1142 `objc-mode-hook'
1143
1144 `outline-mode-hook'
1145
1146 `perl-mode-hook'
1147
1148 `plain-TeX-mode-hook'
1149
1150 `post-command-hook'
1151
1152 `post-gc-hook'
1153
1154 `pre-abbrev-expand-hook'
1155
1156 `pre-command-hook'
1157
1158 `pre-display-buffer-function'
1159
1160 `pre-gc-hook'
1161
1162 `pre-idle-hook'
1163
1164 `print-diary-entries-hook'
1165
1166 `prolog-mode-hook'
1167
1168 `protect-innocence-hook'
1169
1170 `remove-message-hook'
1171
1172 `revert-buffer-function'
1173
1174 `revert-buffer-insert-contents-function'
1175
1176 `rmail-edit-mode-hook'
1177
1178 `rmail-mode-hook'
1179
1180 `rmail-retry-setup-hook'
1181
1182 `rmail-summary-mode-hook'
1183
1184 `scheme-indent-hook'
1185
1186 `scheme-mode-hook'
1187
1188 `scribe-mode-hook'
1189
1190 `select-frame-hook'
1191
1192 `send-mail-function'
1193
1194 `shell-mode-hook'
1195
1196 `shell-set-directory-error-hook'
1197
1198 `special-display-function'
1199
1200 `suspend-hook'
1201
1202 `suspend-resume-hook'
1203
1204 `temp-buffer-show-function'
1205
1206 `term-setup-hook'
1207
1208 `terminal-mode-hook'
1209
1210 `terminal-mode-break-hook'
1211
1212 `TeX-mode-hook'
1213
1214 `tex-mode-hook'
1215
1216 `text-mode-hook'
1217
1218 `today-visible-calendar-hook'
1219
1220 `today-invisible-calendar-hook'
1221
1222 `tooltalk-message-handler-hook'
1223
1224 `tooltalk-pattern-handler-hook'
1225
1226 `tooltalk-unprocessed-message-hook'
1227
1228 `unmap-frame-hook'
1229
1230 `vc-checkin-hook'
1231
1232 `vc-checkout-writable-buffer-hook'
1233
1234 `vc-log-after-operation-hook'
1235
1236 `vc-make-buffer-writable-hook'
1237
1238 `view-hook'
1239
1240 `vm-arrived-message-hook'
1241
1242 `vm-arrived-messages-hook'
1243
1244 `vm-chop-full-name-function'
1245
1246 `vm-display-buffer-hook'
1247
1248 `vm-edit-message-hook'
1249
1250 `vm-forward-message-hook'
1251
1252 `vm-iconify-frame-hook'
1253
1254 `vm-inhibit-write-file-hook'
1255
1256 `vm-key-functions'
1257
1258 `vm-mail-hook'
1259
1260 `vm-mail-mode-hook'
1261
1262 `vm-menu-setup-hook'
1263
1264 `vm-mode-hook'
1265
1266 `vm-quit-hook'
1267
1268 `vm-rename-current-buffer-function'
1269
1270 `vm-reply-hook'
1271
1272 `vm-resend-bounced-message-hook'
1273
1274 `vm-resend-message-hook'
1275
1276 `vm-retrieved-spooled-mail-hook'
1277
1278 `vm-select-message-hook'
1279
1280 `vm-select-new-message-hook'
1281
1282 `vm-select-unread-message-hook'
1283
1284 `vm-send-digest-hook'
1285
1286 `vm-summary-mode-hook'
1287
1288 `vm-summary-pointer-update-hook'
1289
1290 `vm-summary-redo-hook'
1291
1292 `vm-summary-update-hook'
1293
1294 `vm-undisplay-buffer-hook'
1295
1296 `vm-visit-folder-hook'
1297
1298 `window-setup-hook'
1299
1300 `write-contents-hooks'
1301
1302 `write-file-data-hooks'
1303
1304 `write-file-hooks'
1305
1306 `write-region-annotate-functions'
1307
1308 `x-lost-selection-hooks'
1309
1310 `x-sent-selection-hooks'
1311
1312 `zmacs-activate-region-hook'
1313
1314 `zmacs-deactivate-region-hook'
1315
1316 `zmacs-update-region-hook'