This commit was generated by cvs2svn to compensate for changes in r6453,
[chise/xemacs-chise.git.1] / info / lispref.info-19
1 This is Info file ../../info/lispref.info, produced by Makeinfo version
2 1.68 from the input file 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: Key Lookup,  Next: Functions for Key Lookup,  Prev: Active Keymaps,  Up: Keymaps
54
55 Key Lookup
56 ==========
57
58    "Key lookup" is the process of finding the binding of a key sequence
59 from a given keymap.  Actual execution of the binding is not part of
60 key lookup.
61
62    Key lookup uses just the event type of each event in the key
63 sequence; the rest of the event is ignored.  In fact, a key sequence
64 used for key lookup may designate mouse events with just their types
65 (symbols) instead of with entire mouse events (lists).  *Note Events::.
66 Such a pseudo-key-sequence is insufficient for `command-execute', but
67 it is sufficient for looking up or rebinding a key.
68
69    When the key sequence consists of multiple events, key lookup
70 processes the events sequentially: the binding of the first event is
71 found, and must be a keymap; then the second event's binding is found in
72 that keymap, and so on until all the events in the key sequence are used
73 up.  (The binding thus found for the last event may or may not be a
74 keymap.)  Thus, the process of key lookup is defined in terms of a
75 simpler process for looking up a single event in a keymap.  How that is
76 done depends on the type of object associated with the event in that
77 keymap.
78
79    Let's use the term "keymap entry" to describe the value found by
80 looking up an event type in a keymap.  (This doesn't include the item
81 string and other extra elements in menu key bindings because
82 `lookup-key' and other key lookup functions don't include them in the
83 returned value.)  While any Lisp object may be stored in a keymap as a
84 keymap entry, not all make sense for key lookup.  Here is a list of the
85 meaningful kinds of keymap entries:
86
87 `nil'
88      `nil' means that the events used so far in the lookup form an
89      undefined key.  When a keymap fails to mention an event type at
90      all, and has no default binding, that is equivalent to a binding
91      of `nil' for that event type.
92
93 KEYMAP
94      The events used so far in the lookup form a prefix key.  The next
95      event of the key sequence is looked up in KEYMAP.
96
97 COMMAND
98      The events used so far in the lookup form a complete key, and
99      COMMAND is its binding.  *Note What Is a Function::.
100
101 ARRAY
102      The array (either a string or a vector) is a keyboard macro.  The
103      events used so far in the lookup form a complete key, and the
104      array is its binding.  See *Note Keyboard Macros::, for more
105      information. (Note that you cannot use a shortened form of a key
106      sequence here, such as `(control y)'; you must use the full form
107      `[(control y)]'.  *Note Key Sequences::.)
108
109 LIST
110      The meaning of a list depends on the types of the elements of the
111      list.
112
113         * If the CAR of LIST is `lambda', then the list is a lambda
114           expression.  This is presumed to be a command, and is treated
115           as such (see above).
116
117         * If the CAR of LIST is a keymap and the CDR is an event type,
118           then this is an "indirect entry":
119
120                (OTHERMAP . OTHERTYPE)
121
122           When key lookup encounters an indirect entry, it looks up
123           instead the binding of OTHERTYPE in OTHERMAP and uses that.
124
125           This feature permits you to define one key as an alias for
126           another key.  For example, an entry whose CAR is the keymap
127           called `esc-map' and whose CDR is 32 (the code for <SPC>)
128           means, "Use the global binding of `Meta-<SPC>', whatever that
129           may be."
130
131 SYMBOL
132      The function definition of SYMBOL is used in place of SYMBOL.  If
133      that too is a symbol, then this process is repeated, any number of
134      times.  Ultimately this should lead to an object that is a keymap,
135      a command or a keyboard macro.  A list is allowed if it is a
136      keymap or a command, but indirect entries are not understood when
137      found via symbols.
138
139      Note that keymaps and keyboard macros (strings and vectors) are not
140      valid functions, so a symbol with a keymap, string, or vector as
141      its function definition is invalid as a function.  It is, however,
142      valid as a key binding.  If the definition is a keyboard macro,
143      then the symbol is also valid as an argument to `command-execute'
144      (*note Interactive Call::.).
145
146      The symbol `undefined' is worth special mention: it means to treat
147      the key as undefined.  Strictly speaking, the key is defined, and
148      its binding is the command `undefined'; but that command does the
149      same thing that is done automatically for an undefined key: it
150      rings the bell (by calling `ding') but does not signal an error.
151
152      `undefined' is used in local keymaps to override a global key
153      binding and make the key "undefined" locally.  A local binding of
154      `nil' would fail to do this because it would not override the
155      global binding.
156
157 ANYTHING ELSE
158      If any other type of object is found, the events used so far in the
159      lookup form a complete key, and the object is its binding, but the
160      binding is not executable as a command.
161
162    In short, a keymap entry may be a keymap, a command, a keyboard
163 macro, a symbol that leads to one of them, or an indirection or `nil'.
164
165 \1f
166 File: lispref.info,  Node: Functions for Key Lookup,  Next: Changing Key Bindings,  Prev: Key Lookup,  Up: Keymaps
167
168 Functions for Key Lookup
169 ========================
170
171    Here are the functions and variables pertaining to key lookup.
172
173  - Function: lookup-key KEYMAP KEY &optional ACCEPT-DEFAULTS
174      This function returns the definition of KEY in KEYMAP.  If the
175      string or vector KEY is not a valid key sequence according to the
176      prefix keys specified in KEYMAP (which means it is "too long" and
177      has extra events at the end), then the value is a number, the
178      number of events at the front of KEY that compose a complete key.
179
180      If ACCEPT-DEFAULTS is non-`nil', then `lookup-key' considers
181      default bindings as well as bindings for the specific events in
182      KEY.  Otherwise, `lookup-key' reports only bindings for the
183      specific sequence KEY, ignoring default bindings except when you
184      explicitly ask about them.
185
186      All the other functions described in this chapter that look up
187      keys use `lookup-key'.
188
189           (lookup-key (current-global-map) "\C-x\C-f")
190               => find-file
191           (lookup-key (current-global-map) "\C-x\C-f12345")
192               => 2
193
194      If KEY begins with the character whose value is contained in
195      `meta-prefix-char', that character is implicitly removed and the
196      <META> modifier added to the key.  Thus, the first example below is
197      handled by conversion into the second example.
198
199           (lookup-key (current-global-map) "\ef")
200               => forward-word
201           (lookup-key (current-global-map) "\M-f")
202               => forward-word
203
204      Unlike `read-key-sequence', this function does not modify the
205      specified events in ways that discard information (*note Key
206      Sequence Input::.).  In particular, it does not convert letters to
207      lower case.
208
209  - Command: undefined
210      Used in keymaps to undefine keys.  If a key sequence is defined to
211      this, invoking this key sequence causes a "key undefined" error,
212      just as if the key sequence had no binding.
213
214  - Function: key-binding KEY &optional ACCEPT-DEFAULTS
215      This function returns the binding for KEY in the current keymaps,
216      trying all the active keymaps.  The result is `nil' if KEY is
217      undefined in the keymaps.
218
219      The argument ACCEPT-DEFAULTS controls checking for default
220      bindings, as in `lookup-key' (above).
221
222           (key-binding "\C-x\C-f")
223               => find-file
224           (key-binding '(control home))
225               => beginning-of-buffer
226           (key-binding [escape escape escape])
227               => keyboard-escape-quit
228
229  - Function: local-key-binding KEY &optional ACCEPT-DEFAULTS
230      This function returns the binding for KEY in the current local
231      keymap, or `nil' if it is undefined there.
232
233      The argument ACCEPT-DEFAULTS controls checking for default
234      bindings, as in `lookup-key' (above).
235
236  - Function: global-key-binding KEY &optional ACCEPT-DEFAULTS
237      This function returns the binding for command KEY in the current
238      global keymap, or `nil' if it is undefined there.
239
240      The argument ACCEPT-DEFAULTS controls checking for default
241      bindings, as in `lookup-key' (above).
242
243  - Function: minor-mode-key-binding KEY &optional ACCEPT-DEFAULTS
244      This function returns a list of all the active minor mode bindings
245      of KEY.  More precisely, it returns an alist of pairs `(MODENAME .
246      BINDING)', where MODENAME is the variable that enables the minor
247      mode, and BINDING is KEY's binding in that mode.  If KEY has no
248      minor-mode bindings, the value is `nil'.
249
250      If the first binding is not a prefix command, all subsequent
251      bindings from other minor modes are omitted, since they would be
252      completely shadowed.  Similarly, the list omits non-prefix
253      bindings that follow prefix bindings.
254
255      The argument ACCEPT-DEFAULTS controls checking for default
256      bindings, as in `lookup-key' (above).
257
258  - Variable: meta-prefix-char
259      This variable is the meta-prefix character code.  It is used when
260      translating a two-character sequence to a meta character so it can
261      be looked up in a keymap.  For useful results, the value should be
262      a prefix event (*note Prefix Keys::.).  The default value is
263      `?\^[' (integer 27), which is the ASCII character usually produced
264      by the <ESC> key.
265
266      As long as the value of `meta-prefix-char' remains `?\^[', key
267      lookup translates `<ESC> b' into `M-b', which is normally defined
268      as the `backward-word' command.  However, if you set
269      `meta-prefix-char' to `?\^X' (i.e. the keystroke `C-x') or its
270      equivalent ASCII code `24', then XEmacs will translate `C-x b'
271      (whose standard binding is the `switch-to-buffer' command) into
272      `M-b'.
273
274           meta-prefix-char                    ; The default value.
275                => ?\^[   ; Under XEmacs 20.
276                => 27     ; Under XEmacs 19.
277
278           (key-binding "\eb")
279                => backward-word
280
281           ?\C-x                               ; The print representation
282                                                      ;   of a character.
283                => ?\^X   ; Under XEmacs 20.
284                => 24     ; Under XEmacs 19.
285
286           (setq meta-prefix-char 24)
287                => 24
288
289           (key-binding "\C-xb")
290                => backward-word            ; Now, typing `C-x b' is
291                                               ;   like typing `M-b'.
292           
293           (setq meta-prefix-char ?\e)          ; Avoid confusion!
294                                                ; Restore the default value!
295                => ?\^[   ; Under XEmacs 20.
296                => 27     ; Under XEmacs 19.
297
298 \1f
299 File: lispref.info,  Node: Changing Key Bindings,  Next: Key Binding Commands,  Prev: Functions for Key Lookup,  Up: Keymaps
300
301 Changing Key Bindings
302 =====================
303
304    The way to rebind a key is to change its entry in a keymap.  If you
305 change a binding in the global keymap, the change is effective in all
306 buffers (though it has no direct effect in buffers that shadow the
307 global binding with a local one).  If you change the current buffer's
308 local map, that usually affects all buffers using the same major mode.
309 The `global-set-key' and `local-set-key' functions are convenient
310 interfaces for these operations (*note Key Binding Commands::.).  You
311 can also use `define-key', a more general function; then you must
312 specify explicitly the map to change.
313
314    The way to specify the key sequence that you want to rebind is
315 described above (*note Key Sequences::.).
316
317    For the functions below, an error is signaled if KEYMAP is not a
318 keymap or if KEY is not a string or vector representing a key sequence.
319 You can use event types (symbols) as shorthand for events that are
320 lists.
321
322  - Function: define-key KEYMAP KEY BINDING
323      This function sets the binding for KEY in KEYMAP.  (If KEY is more
324      than one event long, the change is actually made in another keymap
325      reached from KEYMAP.)  The argument BINDING can be any Lisp
326      object, but only certain types are meaningful.  (For a list of
327      meaningful types, see *Note Key Lookup::.)  The value returned by
328      `define-key' is BINDING.
329
330      Every prefix of KEY must be a prefix key (i.e., bound to a keymap)
331      or undefined; otherwise an error is signaled.
332
333      If some prefix of KEY is undefined, then `define-key' defines it
334      as a prefix key so that the rest of KEY may be defined as
335      specified.
336
337    Here is an example that creates a sparse keymap and makes a number of
338 bindings in it:
339
340      (setq map (make-sparse-keymap))
341          => #<keymap 0 entries 0xbee>
342
343      (define-key map "\C-f" 'forward-char)
344          => forward-char
345
346      map
347          => #<keymap 1 entry 0xbee>
348      (describe-bindings-internal map)
349      =>   ; (Inserted in buffer)
350      C-f             forward-char
351
352      ;; Build sparse submap for `C-x' and bind `f' in that.
353      (define-key map "\C-xf" 'forward-word)
354          => forward-word
355
356      map
357          => #<keymap 2 entries 0xbee>
358      (describe-bindings-internal map)
359      =>   ; (Inserted in buffer)
360      C-f             forward-char
361      C-x             << Prefix Command >>
362      
363      C-x f           forward-word
364
365      ;; Bind `C-p' to the `ctl-x-map'.
366      (define-key map "\C-p" ctl-x-map)
367      ;; `ctl-x-map'
368      => #<keymap Control-X-prefix 77 entries 0x3bf>
369
370      ;; Bind `C-f' to `foo' in the `ctl-x-map'.
371      (define-key map "\C-p\C-f" 'foo)
372      => foo
373
374      map
375          => #<keymap 3 entries 0xbee>
376      (describe-bindings-internal map)
377      =>   ; (Inserted in buffer)
378      C-f             forward-char
379      C-p             << Prefix command Control-X-prefix >>
380      C-x             << Prefix Command >>
381      
382      C-p tab         indent-rigidly
383      C-p $           set-selective-display
384      C-p '           expand-abbrev
385      C-p (           start-kbd-macro
386      C-p )           end-kbd-macro
387         ...
388      C-p C-x         exchange-point-and-mark
389      C-p C-z         suspend-or-iconify-emacs
390      C-p M-escape    repeat-complex-command
391      C-p M-C-[       repeat-complex-command
392      
393      C-x f           forward-word
394      
395      C-p 4 .         find-tag-other-window
396         ...
397      C-p 4 C-o       display-buffer
398      
399      C-p 5 0         delete-frame
400         ...
401      C-p 5 C-f       find-file-other-frame
402      
403         ...
404      
405      C-p a i g       inverse-add-global-abbrev
406      C-p a i l       inverse-add-mode-abbrev
407
408 Note that storing a new binding for `C-p C-f' actually works by
409 changing an entry in `ctl-x-map', and this has the effect of changing
410 the bindings of both `C-p C-f' and `C-x C-f' in the default global map.
411
412  - Function: substitute-key-definition OLDDEF NEWDEF KEYMAP &optional
413           OLDMAP
414      This function replaces OLDDEF with NEWDEF for any keys in KEYMAP
415      that were bound to OLDDEF.  In other words, OLDDEF is replaced
416      with NEWDEF wherever it appears.  The function returns `nil'.
417
418      For example, this redefines `C-x C-f', if you do it in an XEmacs
419      with standard bindings:
420
421           (substitute-key-definition
422            'find-file 'find-file-read-only (current-global-map))
423
424      If OLDMAP is non-`nil', then its bindings determine which keys to
425      rebind.  The rebindings still happen in NEWMAP, not in OLDMAP.
426      Thus, you can change one map under the control of the bindings in
427      another.  For example,
428
429           (substitute-key-definition
430             'delete-backward-char 'my-funny-delete
431             my-map global-map)
432
433      puts the special deletion command in `my-map' for whichever keys
434      are globally bound to the standard deletion command.
435
436
437  - Function: suppress-keymap KEYMAP &optional NODIGITS
438      This function changes the contents of the full keymap KEYMAP by
439      making all the printing characters undefined.  More precisely, it
440      binds them to the command `undefined'.  This makes ordinary
441      insertion of text impossible.  `suppress-keymap' returns `nil'.
442
443      If NODIGITS is `nil', then `suppress-keymap' defines digits to run
444      `digit-argument', and `-' to run `negative-argument'.  Otherwise
445      it makes them undefined like the rest of the printing characters.
446
447      The `suppress-keymap' function does not make it impossible to
448      modify a buffer, as it does not suppress commands such as `yank'
449      and `quoted-insert'.  To prevent any modification of a buffer, make
450      it read-only (*note Read Only Buffers::.).
451
452      Since this function modifies KEYMAP, you would normally use it on
453      a newly created keymap.  Operating on an existing keymap that is
454      used for some other purpose is likely to cause trouble; for
455      example, suppressing `global-map' would make it impossible to use
456      most of XEmacs.
457
458      Most often, `suppress-keymap' is used to initialize local keymaps
459      of modes such as Rmail and Dired where insertion of text is not
460      desirable and the buffer is read-only.  Here is an example taken
461      from the file `emacs/lisp/dired.el', showing how the local keymap
462      for Dired mode is set up:
463
464           ...
465             (setq dired-mode-map (make-keymap))
466             (suppress-keymap dired-mode-map)
467             (define-key dired-mode-map "r" 'dired-rename-file)
468             (define-key dired-mode-map "\C-d" 'dired-flag-file-deleted)
469             (define-key dired-mode-map "d" 'dired-flag-file-deleted)
470             (define-key dired-mode-map "v" 'dired-view-file)
471             (define-key dired-mode-map "e" 'dired-find-file)
472             (define-key dired-mode-map "f" 'dired-find-file)
473             ...
474
475 \1f
476 File: lispref.info,  Node: Key Binding Commands,  Next: Scanning Keymaps,  Prev: Changing Key Bindings,  Up: Keymaps
477
478 Commands for Binding Keys
479 =========================
480
481    This section describes some convenient interactive interfaces for
482 changing key bindings.  They work by calling `define-key'.
483
484    People often use `global-set-key' in their `.emacs' file for simple
485 customization.  For example,
486
487      (global-set-key "\C-x\C-\\" 'next-line)
488
489 or
490
491      (global-set-key [(control ?x) (control ?\\)] 'next-line)
492
493 or
494
495      (global-set-key [?\C-x ?\C-\\] 'next-line)
496
497 redefines `C-x C-\' to move down a line.
498
499      (global-set-key [(meta button1)] 'mouse-set-point)
500
501 redefines the first (leftmost) mouse button, typed with the Meta key, to
502 set point where you click.
503
504  - Command: global-set-key KEY DEFINITION
505      This function sets the binding of KEY in the current global map to
506      DEFINITION.
507
508           (global-set-key KEY DEFINITION)
509           ==
510           (define-key (current-global-map) KEY DEFINITION)
511
512  - Command: global-unset-key KEY
513      This function removes the binding of KEY from the current global
514      map.
515
516      One use of this function is in preparation for defining a longer
517      key that uses KEY as a prefix--which would not be allowed if KEY
518      has a non-prefix binding.  For example:
519
520           (global-unset-key "\C-l")
521               => nil
522
523           (global-set-key "\C-l\C-l" 'redraw-display)
524               => nil
525
526      This function is implemented simply using `define-key':
527
528           (global-unset-key KEY)
529           ==
530           (define-key (current-global-map) KEY nil)
531
532  - Command: local-set-key KEY DEFINITION
533      This function sets the binding of KEY in the current local keymap
534      to DEFINITION.
535
536           (local-set-key KEY DEFINITION)
537           ==
538           (define-key (current-local-map) KEY DEFINITION)
539
540  - Command: local-unset-key KEY
541      This function removes the binding of KEY from the current local
542      map.
543
544           (local-unset-key KEY)
545           ==
546           (define-key (current-local-map) KEY nil)
547
548 \1f
549 File: lispref.info,  Node: Scanning Keymaps,  Next: Other Keymap Functions,  Prev: Key Binding Commands,  Up: Keymaps
550
551 Scanning Keymaps
552 ================
553
554    This section describes functions used to scan all the current
555 keymaps, or all keys within a keymap, for the sake of printing help
556 information.
557
558  - Function: accessible-keymaps KEYMAP &optional PREFIX
559      This function returns a list of all the keymaps that can be
560      accessed (via prefix keys) from KEYMAP.  The value is an
561      association list with elements of the form `(KEY . MAP)', where
562      KEY is a prefix key whose definition in KEYMAP is MAP.
563
564      The elements of the alist are ordered so that the KEY increases in
565      length.  The first element is always `([] . KEYMAP)', because the
566      specified keymap is accessible from itself with a prefix of no
567      events.
568
569      If PREFIX is given, it should be a prefix key sequence; then
570      `accessible-keymaps' includes only the submaps whose prefixes start
571      with PREFIX.  These elements look just as they do in the value of
572      `(accessible-keymaps)'; the only difference is that some elements
573      are omitted.
574
575      In the example below, the returned alist indicates that the key
576      `C-x', which is displayed as `[(control x)]', is a prefix key
577      whose definition is the keymap `#<keymap ((control x) #<keymap
578      emacs-lisp-mode-map 8 entries 0x546>) 1 entry 0x8a2>'. (The strange
579      notation for the keymap's name indicates that this is an internal
580      submap of `emacs-lisp-mode-map'.  This is because
581      `lisp-interaction-mode-map' has set up `emacs-lisp-mode-map' as
582      its parent, and `lisp-interaction-mode-map' defines no key
583      sequences beginning with `C-x'.)
584
585           (current-local-map)
586           => #<keymap lisp-interaction-mode-map 5 entries 0x558>
587           (accessible-keymaps (current-local-map))
588           =>(([] . #<keymap lisp-interaction-mode-map 5 entries 0x558>)
589               ([(control x)] .
590                #<keymap ((control x) #<keymap emacs-lisp-mode-map 8 entries 0x546>)
591                         1 entry 0x8a2>))
592
593      The following example shows the results of calling
594      `accessible-keymaps' on a large, complex keymap.  Notice how some
595      keymaps were given explicit names using `set-keymap-name'; those
596      submaps without explicit names are given descriptive names
597      indicating their relationship to their enclosing keymap.
598
599           (accessible-keymaps (current-global-map))
600           => (([] . #<keymap global-map 639 entries 0x221>)
601              ([(control c)] . #<keymap mode-specific-command-prefix 1 entry 0x3cb>)
602              ([(control h)] . #<keymap help-map 33 entries 0x4ec>)
603              ([(control x)] . #<keymap Control-X-prefix 77 entries 0x3bf>)
604              ([(meta escape)] .
605                 #<keymap ((meta escape) #<keymap global-map 639 entries 0x221>)
606                          3 entries 0x3e0>)
607              ([(meta control \[)] .
608                 #<keymap ((meta escape) #<keymap global-map 639 entries 0x221>)
609                          3 entries 0x3e0>)
610              ([f1] . #<keymap help-map 33 entries 0x4ec>)
611              ([(control x) \4] . #<keymap ctl-x-4-prefix 9 entries 0x3c5>)
612              ([(control x) \5] . #<keymap ctl-x-5-prefix 8 entries 0x3c8>)
613              ([(control x) \6] . #<keymap 13 entries 0x4d2>)
614              ([(control x) a] .
615                 #<keymap (a #<keymap Control-X-prefix 77 entries 0x3bf>)
616                          8 entries 0x3ef>)
617              ([(control x) n] . #<keymap narrowing-prefix 3 entries 0x3dd>)
618              ([(control x) r] . #<keymap rectangle-prefix 18 entries 0x3e9>)
619              ([(control x) v] . #<keymap vc-prefix-map 13 entries 0x60e>)
620              ([(control x) a i] .
621                #<keymap (i #<keymap (a #<keymap Control-X-prefix 77 entries 0x3bf>)
622                                     8 entries 0x3ef>)
623                         2 entries 0x3f5>))
624
625  - Function: map-keymap FUNCTION KEYMAP &optional SORT-FIRST
626      This function applies FUNCTION to each element of `KEYMAP'.
627      FUNCTION will be called with two arguments: a key-description
628      list, and the binding.  The order in which the elements of the
629      keymap are passed to the function is unspecified.  If the function
630      inserts new elements into the keymap, it may or may not be called
631      with them later.  No element of the keymap will ever be passed to
632      the function more than once.
633
634      The function will not be called on elements of this keymap's
635      parents (*note Inheritance and Keymaps::.) or upon keymaps which
636      are contained within this keymap (multi-character definitions).
637      It will be called on <META> characters since they are not really
638      two-character sequences.
639
640      If the optional third argument SORT-FIRST is non-`nil', then the
641      elements of the keymap will be passed to the mapper function in a
642      canonical order.  Otherwise, they will be passed in hash (that is,
643      random) order, which is faster.
644
645  - Function: keymap-fullness KEYMAP
646      This function returns the number of bindings in the keymap.
647
648  - Function: where-is-internal DEFINITION &optional KEYMAPS FIRSTONLY
649           NOINDIRECT EVENT-OR-KEYS
650      This function returns a list of key sequences (of any length) that
651      are bound to DEFINITION in a set of keymaps.
652
653      The argument DEFINITION can be any object; it is compared with all
654      keymap entries using `eq'.
655
656      KEYMAPS can be either a keymap (meaning search in that keymap and
657      the current global keymap) or a list of keymaps (meaning search in
658      exactly those keymaps and no others).  If KEYMAPS is nil, search
659      in the currently applicable maps for EVENT-OR-KEYS.
660
661      If KEYMAP is a keymap, then the maps searched are KEYMAP and the
662      global keymap.  If KEYMAP is a list of keymaps, then the maps
663      searched are exactly those keymaps, and no others.  If KEYMAP is
664      `nil', then the maps used are the current active keymaps for
665      EVENT-OR-KEYS (this is equivalent to specifying `(current-keymaps
666      EVENT-OR-KEYS)' as the argument to KEYMAPS).
667
668      If FIRSTONLY is non-`nil', then the value is a single vector
669      representing the first key sequence found, rather than a list of
670      all possible key sequences.
671
672      If NOINDIRECT is non-`nil', `where-is-internal' doesn't follow
673      indirect keymap bindings.  This makes it possible to search for an
674      indirect definition itself.
675
676      This function is used by `where-is' (*note Help: (emacs)Help.).
677
678           (where-is-internal 'describe-function)
679               => ([(control h) d] [(control h) f] [f1 d] [f1 f])
680
681  - Function: describe-bindings-internal MAP &optional ALL SHADOW PREFIX
682           MOUSE-ONLY-P
683      This function inserts (into the current buffer) a list of all
684      defined keys and their definitions in MAP.  Optional second
685      argument ALL says whether to include even "uninteresting"
686      definitions, i.e.  symbols with a non-`nil' `suppress-keymap'
687      property.  Third argument SHADOW is a list of keymaps whose
688      bindings shadow those of map; if a binding is present in any
689      shadowing map, it is not printed.  Fourth argument PREFIX, if
690      non-`nil', should be a key sequence; only bindings which start
691      with that key sequence will be printed.  Fifth argument
692      MOUSE-ONLY-P says to only print bindings for mouse clicks.
693
694    `describe-bindings-internal' is used to implement the help command
695 `describe-bindings'.
696
697  - Command: describe-bindings PREFIX MOUSE-ONLY-P
698      This function creates a listing of all defined keys and their
699      definitions.  It writes the listing in a buffer named `*Help*' and
700      displays it in a window.
701
702      If PREFIX is non-`nil', it should be a prefix key; then the
703      listing includes only keys that start with PREFIX.
704
705      When several characters with consecutive ASCII codes have the same
706      definition, they are shown together, as `FIRSTCHAR..LASTCHAR'.  In
707      this instance, you need to know the ASCII codes to understand
708      which characters this means.  For example, in the default global
709      map, the characters `<SPC> .. ~' are described by a single line.
710      <SPC> is ASCII 32, `~' is ASCII 126, and the characters between
711      them include all the normal printing characters, (e.g., letters,
712      digits, punctuation, etc.); all these characters are bound to
713      `self-insert-command'.
714
715      If the second argument (prefix arg, interactively) is non-`nil'
716      then only the mouse bindings are displayed.
717
718 \1f
719 File: lispref.info,  Node: Other Keymap Functions,  Prev: Scanning Keymaps,  Up: Keymaps
720
721 Other Keymap Functions
722 ======================
723
724  - Function: set-keymap-prompt KEYMAP NEW-PROMPT
725      This function sets the "prompt" of KEYMAP to string NEW-PROMPT, or
726      `nil' if no prompt is desired.  The prompt is shown in the
727      echo-area when reading a key-sequence to be looked-up in this
728      keymap.
729
730  - Function: keymap-prompt KEYMAP &optional USE-INHERITED
731      This function returns the "prompt" of the given keymap.  If
732      USE-INHERITED is non-`nil', any parent keymaps will also be
733      searched for a prompt.
734
735 \1f
736 File: lispref.info,  Node: Menus,  Next: Dialog Boxes,  Prev: Keymaps,  Up: Top
737
738 Menus
739 *****
740
741 * Menu:
742
743 * Menu Format::         Format of a menu description.
744 * Menubar Format::      How to specify a menubar.
745 * Menubar::             Functions for controlling the menubar.
746 * Modifying Menus::     Modifying a menu description.
747 * Pop-Up Menus::        Functions for specifying pop-up menus.
748 * Menu Filters::        Filter functions for the default menubar.
749 * Menu Accelerators::   Using and controlling menu accelerator keys
750 * Buffers Menu::        The menu that displays the list of buffers.
751
752 \1f
753 File: lispref.info,  Node: Menu Format,  Next: Menubar Format,  Up: Menus
754
755 Format of Menus
756 ===============
757
758    A menu is described using a "menu description", which is a list of
759 menu items, keyword-value pairs, strings, and submenus.  The menu
760 description specifies which items are present in the menu, what function
761 each item invokes, and whether the item is selectable or not.  Pop-up
762 menus are directly described with a menu description, while menubars are
763 described slightly differently (see below).
764
765    The first element of a menu must be a string, which is the name of
766 the menu.  This is the string that will be displayed in the parent menu
767 or menubar, if any.  This string is not displayed in the menu itself,
768 except in the case of the top level pop-up menu, where there is no
769 parent.  In this case, the string will be displayed at the top of the
770 menu if `popup-menu-titles' is non-`nil'.
771
772    Immediately following the first element there may optionally be up
773 to four keyword-value pairs, as follows:
774
775 `:included FORM'
776      This can be used to control the visibility of a menu.  The form is
777      evaluated and the menu will be omitted if the result is `nil'.
778
779 `:config SYMBOL'
780      This is an efficient shorthand for `:included (memq SYMBOL
781      menubar-configuration)'.  See the variable `menubar-configuration'.
782
783 `:filter FUNCTION'
784      A menu filter is used to sensitize or incrementally create a
785      submenu only when it is selected by the user and not every time
786      the menubar is activated.  The filter function is passed the list
787      of menu items in the submenu and must return a list of menu items
788      to be used for the menu.  It is called only when the menu is about
789      to be displayed, so other menus may already be displayed.  Vile
790      and terrible things will happen if a menu filter function changes
791      the current buffer, window, or frame.  It also should not raise,
792      lower, or iconify any frames.  Basically, the filter function
793      should have no side-effects.
794
795 `:accelerator KEY'
796      A menu accelerator is a keystroke which can be pressed while the
797      menu is visible which will immediately activate the item.  KEY
798      must be a char or the symbol name of a key.  *Note Menu
799      Accelerators::.
800
801    The rest of the menu consists of elements as follows:
802
803    * A "menu item", which is a vector in the following form:
804
805           `[ NAME CALLBACK :KEYWORD VALUE :KEYWORD VALUE ... ]'
806
807      NAME is a string, the name of the menu item; it is the string to
808      display on the menu.  It is filtered through the resource
809      database, so it is possible for resources to override what string
810      is actually displayed.
811
812      CALLBACK is a form that will be invoked when the menu item is
813      selected.  If the callback of a menu item is a symbol, then it
814      must name a command.  It will be invoked with
815      `call-interactively'.  If it is a list, then it is evaluated with
816      `eval'.
817
818      The valid keywords and their meanings are described below.
819
820      Note that for compatibility purposes, the form
821
822           `[ NAME CALLBACK ACTIVE-P ]'
823
824      is also accepted and is equivalent to
825
826           `[ NAME CALLBACK :active ACTIVE-P ]'
827
828      and the form
829
830           `[ NAME CALLBACK ACTIVE-P SUFFIX]'
831
832      is accepted and is equivalent to
833
834           `[ NAME CALLBACK :active ACTIVE-P :suffix SUFFIX]'
835
836      However, these older forms are deprecated and should generally not
837      be used.
838
839    * If an element of a menu is a string, then that string will be
840      presented in the menu as unselectable text.
841
842    * If an element of a menu is a string consisting solely of hyphens,
843      then that item will be presented as a solid horizontal line.
844
845    * If an element of a menu is a string beginning with `--:', then a
846      particular sort of horizontal line will be displayed, as follows:
847
848     `"--:singleLine"'
849           A solid horizontal line.  This is equivalent to a string
850           consisting solely of hyphens.
851
852     `"--:doubleLine"'
853           A solid double horizontal line.
854
855     `"--:singleDashedLine"'
856           A dashed horizontal line.
857
858     `"--:doubleDashedLine"'
859           A dashed double horizontal line.
860
861     `"--:noLine"'
862           No line (but a small space is left).
863
864     `"--:shadowEtchedIn"'
865           A solid horizontal line with a 3-d recessed appearance.
866
867     `"--:shadowEtchedOut"'
868           A solid horizontal line with a 3-d pushed-out appearance.
869
870     `"--:shadowDoubleEtchedIn"'
871           A solid double horizontal line with a 3-d recessed appearance.
872
873     `"--:shadowDoubleEtchedOut"'
874           A solid double horizontal line with a 3-d pushed-out
875           appearance.
876
877     `"--:shadowEtchedInDash"'
878           A dashed horizontal line with a 3-d recessed appearance.
879
880     `"--:shadowEtchedOutDash"'
881           A dashed horizontal line with a 3-d pushed-out appearance.
882
883     `"--:shadowDoubleEtchedInDash"'
884           A dashed double horizontal line with a 3-d recessed
885           appearance.
886
887     `"--:shadowDoubleEtchedOutDash"'
888           A dashed double horizontal line with a 3-d pushed-out
889           appearance.
890
891    * If an element of a menu is a list, it is treated as a submenu.
892      The name of that submenu (the first element in the list) will be
893      used as the name of the item representing this menu on the parent.
894
895    The possible keywords are as follows:
896
897 :active FORM
898      FORM will be evaluated when the menu that this item is a part of
899      is about to be displayed, and the item will be selectable only if
900      the result is non-`nil'.  If the item is unselectable, it will
901      usually be displayed grayed-out to indicate this.
902
903 :suffix FORM
904      FORM will be evaluated when the menu that this item is a part of
905      is about to be displayed, and the resulting string is appended to
906      the displayed name.  This provides a convenient way of adding the
907      name of a command's "argument" to the menu, like `Kill Buffer
908      NAME'.
909
910 :keys STRING
911      Normally, the keyboard equivalents of commands in menus are
912      displayed when the "callback" is a symbol.  This can be used to
913      specify keys for more complex menu items.  It is passed through
914      `substitute-command-keys' first.
915
916 :style STYLE
917      Specifies what kind of object this menu item is.  STYLE be one of
918      the symbols
919
920     `nil'
921           A normal menu item.
922
923     `toggle'
924           A toggle button.
925
926     `radio'
927           A radio button.
928
929     `button'
930           A menubar button.
931
932      The only difference between toggle and radio buttons is how they
933      are displayed.  But for consistency, a toggle button should be
934      used when there is one option whose value can be turned on or off,
935      and radio buttons should be used when there is a set of mutually
936      exclusive options.  When using a group of radio buttons, you
937      should arrange for no more than one to be marked as selected at a
938      time.
939
940 :selected FORM
941      Meaningful only when STYLE is `toggle', `radio' or `button'.  This
942      specifies whether the button will be in the selected or unselected
943      state.  FORM is evaluated, as for `:active'.
944
945 :included FORM
946      This can be used to control the visibility of a menu item.  The
947      form is evaluated and the menu item is only displayed if the
948      result is non-`nil'.  Note that this is different from `:active':
949      If `:active' evaluates to `nil', the item will be displayed grayed
950      out, while if `:included' evaluates to `nil', the item will be
951      omitted entirely.
952
953 :config SYMBOL
954      This is an efficient shorthand for `:included (memq SYMBOL
955      menubar-configuration)'.  See the variable `menubar-configuration'.
956
957 :accelerator KEY
958      A menu accelerator is a keystroke which can be pressed while the
959      menu is visible which will immediately activate the item.  KEY
960      must be a char or the symbol name of a key.  *Note Menu
961      Accelerators::.
962
963  - Variable: menubar-configuration
964      This variable holds a list of symbols, against which the value of
965      the `:config' tag for each menubar item will be compared.  If a
966      menubar item has a `:config' tag, then it is omitted from the
967      menubar if that tag is not a member of the `menubar-configuration'
968      list.
969
970    For example:
971
972       ("File"
973        :filter file-menu-filter ; file-menu-filter is a function that takes
974                                 ; one argument (a list of menu items) and
975                                 ; returns a list of menu items
976        [ "Save As..."    write-file]
977        [ "Revert Buffer" revert-buffer :active (buffer-modified-p) ]
978        [ "Read Only"     toggle-read-only :style toggle :selected buffer-read-only ]
979        )
980
981 \1f
982 File: lispref.info,  Node: Menubar Format,  Next: Menubar,  Prev: Menu Format,  Up: Menus
983
984 Format of the Menubar
985 =====================
986
987    A menubar is a list of menus, menu items, and strings.  The format is
988 similar to that of a menu, except:
989
990    * The first item need not be a string, and is not treated specially.
991
992    * A string consisting solely of hyphens is not treated specially.
993
994    * If an element of a menubar is `nil', then it is used to represent
995      the division between the set of menubar items which are flush-left
996      and those which are flush-right.  (Note: this isn't completely
997      implemented yet.)
998
999 \1f
1000 File: lispref.info,  Node: Menubar,  Next: Modifying Menus,  Prev: Menubar Format,  Up: Menus
1001
1002 Menubar
1003 =======
1004
1005  - Variable: current-menubar
1006      This variable holds the description of the current menubar.  This
1007      may be buffer-local.  When the menubar is changed, the function
1008      `set-menubar-dirty-flag' has to be called in order for the menubar
1009      to be updated on the screen.
1010
1011  - Constant: default-menubar
1012      This variable holds the menubar description of the menubar that is
1013      visible at startup.  This is the value that `current-menubar' has
1014      at startup.
1015
1016  - Function: set-menubar-dirty-flag
1017      This function tells XEmacs that the menubar widget has to be
1018      updated.  Changes to the menubar will generally not be visible
1019      until this function is called.
1020
1021    The following convenience functions are provided for setting the
1022 menubar.  They are equivalent to doing the appropriate action to change
1023 `current-menubar', and then calling `set-menubar-dirty-flag'.  Note
1024 that these functions copy their argument using `copy-sequence'.
1025
1026  - Function: set-menubar MENUBAR
1027      This function sets the default menubar to be MENUBAR (*note Menu
1028      Format::.).  This is the menubar that will be visible in buffers
1029      that have not defined their own, buffer-local menubar.
1030
1031  - Function: set-buffer-menubar MENUBAR
1032      This function sets the buffer-local menubar to be MENUBAR.  This
1033      does not change the menubar in any buffers other than the current
1034      one.
1035
1036    Miscellaneous:
1037
1038  - Variable: menubar-show-keybindings
1039      If true, the menubar will display keyboard equivalents.  If false,
1040      only the command names will be displayed.
1041
1042  - Variable: activate-menubar-hook
1043      Function or functions called before a menubar menu is pulled down.
1044      These functions are called with no arguments, and should
1045      interrogate and modify the value of `current-menubar' as desired.
1046
1047      The functions on this hook are invoked after the mouse goes down,
1048      but before the menu is mapped, and may be used to activate,
1049      deactivate, add, or delete items from the menus.  However, using a
1050      filter (with the `:filter' keyword in a menu description) is
1051      generally a more efficient way of accomplishing the same thing,
1052      because the filter is invoked only when the actual menu goes down.
1053      With a complex menu, there can be a quite noticeable and
1054      sometimes aggravating delay if all menu modification is
1055      implemented using the `activate-menubar-hook'.  See above.
1056
1057      These functions may return the symbol `t' to assert that they have
1058      made no changes to the menubar.  If any other value is returned,
1059      the menubar is recomputed.  If `t' is returned but the menubar has
1060      been changed, then the changes may not show up right away.
1061      Returning `nil' when the menubar has not changed is not so bad;
1062      more computation will be done, but redisplay of the menubar will
1063      still be performed optimally.
1064
1065  - Variable: menu-no-selection-hook
1066      Function or functions to call when a menu or dialog box is
1067      dismissed without a selection having been made.
1068
1069 \1f
1070 File: lispref.info,  Node: Modifying Menus,  Next: Pop-Up Menus,  Prev: Menubar,  Up: Menus
1071
1072 Modifying Menus
1073 ===============
1074
1075    The following functions are provided to modify the menubar of one of
1076 its submenus.  Note that these functions modify the menu in-place,
1077 rather than copying it and making a new menu.
1078
1079    Some of these functions take a "menu path", which is a list of
1080 strings identifying the menu to be modified.  For example, `("File")'
1081 names the top-level "File" menu.  `("File" "Foo")' names a hypothetical
1082 submenu of "File".
1083
1084    Others take a "menu item path", which is similar to a menu path but
1085 also specifies a particular item to be modified.  For example, `("File"
1086 "Save")' means the menu item called "Save" under the top-level "File"
1087 menu.  `("Menu" "Foo" "Item")' means the menu item called "Item" under
1088 the "Foo" submenu of "Menu".
1089
1090  - Function: add-submenu MENU-PATH SUBMENU &optional BEFORE
1091      This function adds a menu to the menubar or one of its submenus.
1092      If the named menu exists already, it is changed.
1093
1094      MENU-PATH identifies the menu under which the new menu should be
1095      inserted.  If MENU-PATH is `nil', then the menu will be added to
1096      the menubar itself.
1097
1098      SUBMENU is the new menu to add (*note Menu Format::.).
1099
1100      BEFORE, if provided, is the name of a menu before which this menu
1101      should be added, if this menu is not on its parent already.  If
1102      the menu is already present, it will not be moved.
1103
1104  - Function: add-menu-button MENU-PATH MENU-LEAF &optional BEFORE
1105      This function adds a menu item to some menu, creating the menu
1106      first if necessary.  If the named item exists already, it is
1107      changed.
1108
1109      MENU-PATH identifies the menu under which the new menu item should
1110      be inserted.
1111
1112      MENU-LEAF is a menubar leaf node (*note Menu Format::.).
1113
1114      BEFORE, if provided, is the name of a menu before which this item
1115      should be added, if this item is not on the menu already.  If the
1116      item is already present, it will not be moved.
1117
1118  - Function: delete-menu-item MENU-ITEM-PATH
1119      This function removes the menu item specified by MENU-ITEM-PATH
1120      from the menu hierarchy.
1121
1122  - Function: enable-menu-item MENU-ITEM-PATH
1123      This function makes the menu item specified by MENU-ITEM-PATH be
1124      selectable.
1125
1126  - Function: disable-menu-item MENU-ITEM-PATH
1127      This function makes the menu item specified by MENU-ITEM-PATH be
1128      unselectable.
1129
1130  - Function: relabel-menu-item MENU-ITEM-PATH NEW-NAME
1131      This function changes the string of the menu item specified by
1132      MENU-ITEM-PATH.  NEW-NAME is the string that the menu item will be
1133      printed as from now on.
1134
1135    The following function can be used to search for a particular item in
1136 a menubar specification, given a path to the item.
1137
1138  - Function: find-menu-item MENUBAR MENU-ITEM-PATH &optional PARENT
1139      This function searches MENUBAR for the item given by
1140      MENU-ITEM-PATH starting from PARENT (`nil' means start at the top
1141      of MENUBAR).  This function returns `(ITEM . PARENT)', where
1142      PARENT is the immediate parent of the item found (a menu
1143      description), and ITEM is either a vector, list, or string,
1144      depending on the nature of the menu item.
1145
1146      This function signals an error if the item is not found.
1147
1148    The following deprecated functions are also documented, so that
1149 existing code can be understood.  You should not use these functions in
1150 new code.
1151
1152  - Function: add-menu MENU-PATH MENU-NAME MENU-ITEMS &optional BEFORE
1153      This function adds a menu to the menubar or one of its submenus.
1154      If the named menu exists already, it is changed.  This is
1155      obsolete; use `add-submenu' instead.
1156
1157      MENU-PATH identifies the menu under which the new menu should be
1158      inserted.  If MENU-PATH is `nil', then the menu will be added to
1159      the menubar itself.
1160
1161      MENU-NAME is the string naming the menu to be added; MENU-ITEMS is
1162      a list of menu items, strings, and submenus.  These two arguments
1163      are the same as the first and following elements of a menu
1164      description (*note Menu Format::.).
1165
1166      BEFORE, if provided, is the name of a menu before which this menu
1167      should be added, if this menu is not on its parent already.  If the
1168      menu is already present, it will not be moved.
1169
1170  - Function: add-menu-item MENU-PATH ITEM-NAME FUNCTION ENABLED-P
1171           &optional BEFORE
1172      This function adds a menu item to some menu, creating the menu
1173      first if necessary.  If the named item exists already, it is
1174      changed.  This is obsolete; use `add-menu-button' instead.
1175
1176      MENU-PATH identifies the menu under which the new menu item should
1177      be inserted. ITEM-NAME, FUNCTION, and ENABLED-P are the first,
1178      second, and third elements of a menu item vector (*note Menu
1179      Format::.).
1180
1181      BEFORE, if provided, is the name of a menu item before which this
1182      item should be added, if this item is not on the menu already.  If
1183      the item is already present, it will not be moved.
1184
1185 \1f
1186 File: lispref.info,  Node: Menu Filters,  Next: Menu Accelerators,  Prev: Pop-Up Menus,  Up: Menus
1187
1188 Menu Filters
1189 ============
1190
1191    The following filter functions are provided for use in
1192 `default-menubar'.  You may want to use them in your own menubar
1193 description.
1194
1195  - Function: file-menu-filter MENU-ITEMS
1196      This function changes the arguments and sensitivity of these File
1197      menu items:
1198
1199     `Delete Buffer'
1200           Has the name of the current buffer appended to it.
1201
1202     `Print Buffer'
1203           Has the name of the current buffer appended to it.
1204
1205     `Pretty-Print Buffer'
1206           Has the name of the current buffer appended to it.
1207
1208     `Save Buffer'
1209           Has the name of the current buffer appended to it, and is
1210           sensitive only when the current buffer is modified.
1211
1212     `Revert Buffer'
1213           Has the name of the current buffer appended to it, and is
1214           sensitive only when the current buffer has a file.
1215
1216     `Delete Frame'
1217           Sensitive only when there is more than one visible frame.
1218
1219  - Function: edit-menu-filter MENU-ITEMS
1220      This function changes the arguments and sensitivity of these Edit
1221      menu items:
1222
1223     `Cut'
1224           Sensitive only when XEmacs owns the primary X Selection (if
1225           `zmacs-regions' is `t', this is equivalent to saying that
1226           there is a region selected).
1227
1228     `Copy'
1229           Sensitive only when XEmacs owns the primary X Selection.
1230
1231     `Clear'
1232           Sensitive only when XEmacs owns the primary X Selection.
1233
1234     `Paste'
1235           Sensitive only when there is an owner for the X Clipboard
1236           Selection.
1237
1238     `Undo'
1239           Sensitive only when there is undo information.  While in the
1240           midst of an undo, this is changed to `Undo More'.
1241
1242  - Function: buffers-menu-filter MENU-ITEMS
1243      This function sets up the Buffers menu.  *Note Buffers Menu::, for
1244      more information.
1245