aboutsummaryrefslogtreecommitdiffstats
path: root/lispref
diff options
context:
space:
mode:
Diffstat (limited to 'lispref')
-rw-r--r--lispref/ChangeLog45
-rw-r--r--lispref/commands.texi183
-rw-r--r--lispref/hooks.texi2
-rw-r--r--lispref/minibuf.texi1
-rw-r--r--lispref/objects.texi4
-rw-r--r--lispref/os.texi14
6 files changed, 180 insertions, 69 deletions
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index 146f2173864..5f4f8901637 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,48 @@
12004-08-08 Luc Teirlinck <teirllm@auburn.edu>
2
3 * objects.texi (Character Type): Reposition `@anchor' to prevent
4 double space inside sentence in Info.
5
6 * hooks.texi (Standard Hooks): `disabled-command-hook' has been
7 renamed to `disabled-command-function'.
8 * commands.texi (Key Sequence Input): Remove unnecessary anchor,
9 (Command Loop Info): Replace reference to it.
10 (Disabling Commands): `disabled-command-hook' has been renamed to
11 `disabled-command-function'.
12
132004-08-07 Luc Teirlinck <teirllm@auburn.edu>
14
15 * os.texi (Translating Input): Only non-prefix bindings in
16 `key-translation-map' override actual key bindings. Warn about
17 possible indirect effect of actual key bindings on non-prefix
18 bindings in `key-translation-map'.
19
202004-08-06 Luc Teirlinck <teirllm@auburn.edu>
21
22 * minibuf.texi (High-Level Completion): Add anchor for definition
23 of `read-variable'.
24
25 * commands.texi: Various changes in addition to:
26 (Using Interactive): Clarify description of `interactive-form'.
27 (Interactive Call): Mention default for KEYS argument to
28 `call-interactively'.
29 (Command Loop Info): Clarify description of `this-command-keys'.
30 Mention KEEP-RECORD argument to `clear-this-command-keys'.
31 Value of `last-event-frame' can be `macro'.
32 (Repeat Events): `double-click-fuzz' is also used to distinguish
33 clicks and drags.
34 (Classifying Events): Clarify descriptions of `event-modifiers'
35 `event-basic-type' and `event-convert-list'.
36 (Accessing Events): `posn-timestamp' takes POSITION argument.
37 (Quoted Character Input): Clarify description of
38 `read-quoted-char' and fix example.
39 (Quitting): Add `with-local-quit'.
40 (Disabling Commands): Correct and clarify descriptions of
41 `enable-command' and `disable-command'.
42 Mention what happens if `disabled-command-hook' is nil.
43 (Keyboard Macros): Mention LOOPFUNC arg to `execute-kbd-macro'.
44 Describe `executing-kbd-macro' instead of obsolete `executing-macro'.
45
12004-07-24 Luc Teirlinck <teirllm@auburn.edu> 462004-07-24 Luc Teirlinck <teirllm@auburn.edu>
2 47
3 * frames.texi: Various changes in addition to: 48 * frames.texi: Various changes in addition to:
diff --git a/lispref/commands.texi b/lispref/commands.texi
index 7a014080e89..796fc45f5f3 100644
--- a/lispref/commands.texi
+++ b/lispref/commands.texi
@@ -1,6 +1,6 @@
1@c -*-texinfo-*- 1@c -*-texinfo-*-
2@c This is part of the GNU Emacs Lisp Reference Manual. 2@c This is part of the GNU Emacs Lisp Reference Manual.
3@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999 3@c Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2004
4@c Free Software Foundation, Inc. 4@c Free Software Foundation, Inc.
5@c See the file elisp.texi for copying conditions. 5@c See the file elisp.texi for copying conditions.
6@setfilename ../info/commands 6@setfilename ../info/commands
@@ -119,7 +119,7 @@ controls the reading of arguments for an interactive call.
119 119
120 This section describes how to write the @code{interactive} form that 120 This section describes how to write the @code{interactive} form that
121makes a Lisp function an interactively-callable command, and how to 121makes a Lisp function an interactively-callable command, and how to
122examine a commands's @code{interactive} form. 122examine a command's @code{interactive} form.
123 123
124@defspec interactive arg-descriptor 124@defspec interactive arg-descriptor
125@cindex argument descriptors 125@cindex argument descriptors
@@ -235,12 +235,13 @@ string (starting with the first character that is not @samp{*} or
235 235
236@cindex examining the @code{interactive} form 236@cindex examining the @code{interactive} form
237@defun interactive-form function 237@defun interactive-form function
238This function returns the @code{interactive} form of @var{function}. If 238This function returns the @code{interactive} form of @var{function}.
239@var{function} is a command (@pxref{Interactive Call}), the value is a 239If @var{function} is an interactively callable function
240list of the form @code{(interactive @var{spec})}, where @var{spec} is 240(@pxref{Interactive Call}), the value is the command's
241the descriptor specification used by the command's @code{interactive} 241@code{interactive} form @code{(interactive @var{spec})}, which
242form to compute the function's arguments. If @var{function} is not a 242specifies how to compute its arguments. Otherwise, the value is
243command, @code{interactive-form} returns @code{nil}. 243@code{nil}. If @var{function} is a symbol, its function definition is
244used.
244@end defun 245@end defun
245 246
246@node Interactive Codes 247@node Interactive Codes
@@ -416,8 +417,9 @@ the string.) Other characters that normally terminate a symbol (e.g.,
416parentheses and brackets) do not do so here. Prompt. 417parentheses and brackets) do not do so here. Prompt.
417 418
418@item v 419@item v
419A variable declared to be a user option (i.e., satisfying the predicate 420A variable declared to be a user option (i.e., satisfying the
420@code{user-variable-p}). @xref{High-Level Completion}. Existing, 421predicate @code{user-variable-p}). This reads the variable using
422@code{read-variable}. @xref{Definition of read-variable}. Existing,
421Completion, Prompt. 423Completion, Prompt.
422 424
423@item x 425@item x
@@ -528,10 +530,12 @@ realistic example of using @code{commandp}.
528@defun call-interactively command &optional record-flag keys 530@defun call-interactively command &optional record-flag keys
529This function calls the interactively callable function @var{command}, 531This function calls the interactively callable function @var{command},
530reading arguments according to its interactive calling specifications. 532reading arguments according to its interactive calling specifications.
531An error is signaled if @var{command} is not a function or if it cannot 533It returns whatever @var{command} returns. An error is signaled if
532be called interactively (i.e., is not a command). Note that keyboard 534@var{command} is not a function or if it cannot be called
533macros (strings and vectors) are not accepted, even though they are 535interactively (i.e., is not a command). Note that keyboard macros
534considered commands, because they are not functions. 536(strings and vectors) are not accepted, even though they are
537considered commands, because they are not functions. If @var{command}
538is a symbol, then @code{call-interactively} uses its function definition.
535 539
536@cindex record command history 540@cindex record command history
537If @var{record-flag} is non-@code{nil}, then this command and its 541If @var{record-flag} is non-@code{nil}, then this command and its
@@ -541,6 +545,8 @@ an argument. @xref{Command History}.
541 545
542The argument @var{keys}, if given, specifies the sequence of events to 546The argument @var{keys}, if given, specifies the sequence of events to
543supply if the command inquires which events were used to invoke it. 547supply if the command inquires which events were used to invoke it.
548If @var{keys} is omitted or @code{nil}, the return value of
549@code{this-command-keys} is used. @xref{Definition of this-command-keys}.
544@end defun 550@end defun
545 551
546@defun command-execute command &optional record-flag keys special 552@defun command-execute command &optional record-flag keys special
@@ -551,7 +557,8 @@ callable function or a keyboard macro.
551 557
552A string or vector as @var{command} is executed with 558A string or vector as @var{command} is executed with
553@code{execute-kbd-macro}. A function is passed to 559@code{execute-kbd-macro}. A function is passed to
554@code{call-interactively}, along with the optional @var{record-flag}. 560@code{call-interactively}, along with the optional @var{record-flag}
561and @var{keys}.
555 562
556A symbol is handled by using its function definition in its place. A 563A symbol is handled by using its function definition in its place. A
557symbol with an @code{autoload} definition counts as a command if it was 564symbol with an @code{autoload} definition counts as a command if it was
@@ -559,9 +566,6 @@ declared to stand for an interactively callable function. Such a
559definition is handled by loading the specified library and then 566definition is handled by loading the specified library and then
560rechecking the definition of the symbol. 567rechecking the definition of the symbol.
561 568
562The argument @var{keys}, if given, specifies the sequence of events to
563supply if the command inquires which events were used to invoke it.
564
565The argument @var{special}, if given, means to ignore the prefix 569The argument @var{special}, if given, means to ignore the prefix
566argument and not clear it. This is used for executing special events 570argument and not clear it. This is used for executing special events
567(@pxref{Special Events}). 571(@pxref{Special Events}).
@@ -741,10 +745,14 @@ was specified to run but remapped into another command.
741@end defvar 745@end defvar
742 746
743@defun this-command-keys 747@defun this-command-keys
748@anchor{Definition of this-command-keys}
744This function returns a string or vector containing the key sequence 749This function returns a string or vector containing the key sequence
745that invoked the present command, plus any previous commands that 750that invoked the present command, plus any previous commands that
746generated the prefix argument for this command. The value is a string 751generated the prefix argument for this command. However, if the
747if all those events were characters. @xref{Input Events}. 752command has called @code{read-key-sequence}, it returns the last read
753key sequence. @xref{Key Sequence Input}. The value is a string if
754all events in the sequence were characters that fit in a string.
755@xref{Input Events}.
748 756
749@example 757@example
750@group 758@group
@@ -762,13 +770,13 @@ input events in a string (@pxref{Strings of Events}).
762@end defun 770@end defun
763 771
764@tindex clear-this-command-keys 772@tindex clear-this-command-keys
765@defun clear-this-command-keys 773@defun clear-this-command-keys &optional keep-record
766This function empties out the table of events for 774This function empties out the table of events for
767@code{this-command-keys} to return, and also empties the records that 775@code{this-command-keys} to return. Unless @var{keep-record} is
768the function @code{recent-keys} (@pxref{Recording Input}) will 776non-@code{nil}, it also empties the records that the function
769subsequently return. This is useful after reading a password, to 777@code{recent-keys} (@pxref{Recording Input}) will subsequently return.
770prevent the password from echoing inadvertently as part of the next 778This is useful after reading a password, to prevent the password from
771command in certain cases. 779echoing inadvertently as part of the next command in certain cases.
772@end defun 780@end defun
773 781
774@defvar last-nonmenu-event 782@defvar last-nonmenu-event
@@ -809,6 +817,8 @@ Usually this is the frame that was selected when the event was
809generated, but if that frame has redirected input focus to another 817generated, but if that frame has redirected input focus to another
810frame, the value is the frame to which the event was redirected. 818frame, the value is the frame to which the event was redirected.
811@xref{Input Focus}. 819@xref{Input Focus}.
820
821If the last event came from a keyboard macro, the value is @code{macro}.
812@end defvar 822@end defvar
813 823
814@node Adjusting Point 824@node Adjusting Point
@@ -1155,7 +1165,7 @@ the marginal areas, @var{position} has this form:
1155 1165
1156@example 1166@example
1157(@var{window} @var{pos-or-area} (@var{x} . @var{y}) @var{timestamp} 1167(@var{window} @var{pos-or-area} (@var{x} . @var{y}) @var{timestamp}
1158 @var{object} @var{text-pos} (@var{col} . @var{row}) 1168 @var{object} @var{text-pos} (@var{col} . @var{row})
1159 @var{image} (@var{dx} . @var{dy}) (@var{width} . @var{height})) 1169 @var{image} (@var{dx} . @var{dy}) (@var{width} . @var{height}))
1160@end example 1170@end example
1161 1171
@@ -1387,22 +1397,25 @@ the value is 3 or greater. If @var{event} is an ordinary mouse event
1387(not a repeat event), the value is 1. 1397(not a repeat event), the value is 1.
1388@end defun 1398@end defun
1389 1399
1390@defvar double-click-fuzz 1400@defopt double-click-fuzz
1391To generate repeat events, successive mouse button presses must be at 1401To generate repeat events, successive mouse button presses must be at
1392approximately the same screen position. The value of 1402approximately the same screen position. The value of
1393@code{double-click-fuzz} specifies the maximum number of pixels the 1403@code{double-click-fuzz} specifies the maximum number of pixels the
1394mouse may be moved between two successive clicks to make a 1404mouse may be moved (horizontally or vertically) between two successive
1395double-click. 1405clicks to make a double-click.
1396@end defvar
1397 1406
1398@defvar double-click-time 1407This variable is also the threshold for motion of the mouse to count
1408as a drag.
1409@end defopt
1410
1411@defopt double-click-time
1399To generate repeat events, the number of milliseconds between 1412To generate repeat events, the number of milliseconds between
1400successive button presses must be less than the value of 1413successive button presses must be less than the value of
1401@code{double-click-time}. Setting @code{double-click-time} to 1414@code{double-click-time}. Setting @code{double-click-time} to
1402@code{nil} disables multi-click detection entirely. Setting it to 1415@code{nil} disables multi-click detection entirely. Setting it to
1403@code{t} removes the time limit; Emacs then detects multi-clicks by 1416@code{t} removes the time limit; Emacs then detects multi-clicks by
1404position only. 1417position only.
1405@end defvar 1418@end defopt
1406 1419
1407@node Motion Events 1420@node Motion Events
1408@subsection Motion Events 1421@subsection Motion Events
@@ -1593,16 +1606,22 @@ This function returns a list of the modifiers that @var{event} has. The
1593modifiers are symbols; they include @code{shift}, @code{control}, 1606modifiers are symbols; they include @code{shift}, @code{control},
1594@code{meta}, @code{alt}, @code{hyper} and @code{super}. In addition, 1607@code{meta}, @code{alt}, @code{hyper} and @code{super}. In addition,
1595the modifiers list of a mouse event symbol always contains one of 1608the modifiers list of a mouse event symbol always contains one of
1596@code{click}, @code{drag}, and @code{down}. 1609@code{click}, @code{drag}, and @code{down}. For double or triple
1610events, it also contains @code{double} or @code{triple}.
1597 1611
1598The argument @var{event} may be an entire event object, or just an event 1612The argument @var{event} may be an entire event object, or just an
1599type. 1613event type. If @var{event} is a symbol that has never been used in an
1614event that has been read as input in the current Emacs session, then
1615@code{event-modifiers} can return @code{nil}, even when @var{event}
1616actually has modifiers.
1600 1617
1601Here are some examples: 1618Here are some examples:
1602 1619
1603@example 1620@example
1604(event-modifiers ?a) 1621(event-modifiers ?a)
1605 @result{} nil 1622 @result{} nil
1623(event-modifiers ?A)
1624 @result{} (shift)
1606(event-modifiers ?\C-a) 1625(event-modifiers ?\C-a)
1607 @result{} (control) 1626 @result{} (control)
1608(event-modifiers ?\C-%) 1627(event-modifiers ?\C-%)
@@ -1627,7 +1646,8 @@ but the event symbol name itself does not contain @samp{click}.
1627 1646
1628@defun event-basic-type event 1647@defun event-basic-type event
1629This function returns the key or mouse button that @var{event} 1648This function returns the key or mouse button that @var{event}
1630describes, with all modifiers removed. For example: 1649describes, with all modifiers removed. The @var{event} argument is as
1650in @code{event-modifiers}. For example:
1631 1651
1632@example 1652@example
1633(event-basic-type ?a) 1653(event-basic-type ?a)
@@ -1656,7 +1676,8 @@ event.
1656 1676
1657@defun event-convert-list list 1677@defun event-convert-list list
1658This function converts a list of modifier names and a basic event type 1678This function converts a list of modifier names and a basic event type
1659to an event type which specifies all of them. For example, 1679to an event type which specifies all of them. The basic event type
1680must be the last element of the list. For example,
1660 1681
1661@example 1682@example
1662(event-convert-list '(control ?a)) 1683(event-convert-list '(control ?a))
@@ -1788,7 +1809,7 @@ is a buffer position, return the size of the character at that position.
1788 1809
1789@cindex mouse event, timestamp 1810@cindex mouse event, timestamp
1790@cindex timestamp of a mouse event 1811@cindex timestamp of a mouse event
1791@defun posn-timestamp 1812@defun posn-timestamp position
1792Return the timestamp in @var{position}. This is the time at which the 1813Return the timestamp in @var{position}. This is the time at which the
1793event occurred, in milliseconds. 1814event occurred, in milliseconds.
1794@end defun 1815@end defun
@@ -2001,7 +2022,9 @@ for example, @code{describe-key} uses it to read the key to describe.
2001This function reads a key sequence and returns it as a string or 2022This function reads a key sequence and returns it as a string or
2002vector. It keeps reading events until it has accumulated a complete key 2023vector. It keeps reading events until it has accumulated a complete key
2003sequence; that is, enough to specify a non-prefix command using the 2024sequence; that is, enough to specify a non-prefix command using the
2004currently active keymaps. 2025currently active keymaps. (Remember that a key sequence that starts
2026with a mouse event is read using the keymaps of the buffer in the
2027window that the mouse was in, not the current buffer.)
2005 2028
2006If the events are all characters and all can fit in a string, then 2029If the events are all characters and all can fit in a string, then
2007@code{read-key-sequence} returns a string (@pxref{Strings of Events}). 2030@code{read-key-sequence} returns a string (@pxref{Strings of Events}).
@@ -2101,6 +2124,8 @@ from the terminal---not counting those generated by keyboard macros.
2101 The lowest level functions for command input are those that read a 2124 The lowest level functions for command input are those that read a
2102single event. 2125single event.
2103 2126
2127None of the three functions below suppresses quitting.
2128
2104@defun read-event &optional prompt inherit-input-method 2129@defun read-event &optional prompt inherit-input-method
2105This function reads and returns the next event of command input, waiting 2130This function reads and returns the next event of command input, waiting
2106if necessary until an event is available. Events can come directly from 2131if necessary until an event is available. Events can come directly from
@@ -2122,8 +2147,8 @@ If @code{cursor-in-echo-area} is non-@code{nil}, then @code{read-event}
2122moves the cursor temporarily to the echo area, to the end of any message 2147moves the cursor temporarily to the echo area, to the end of any message
2123displayed there. Otherwise @code{read-event} does not move the cursor. 2148displayed there. Otherwise @code{read-event} does not move the cursor.
2124 2149
2125If @code{read-event} gets an event that is defined as a help character, in 2150If @code{read-event} gets an event that is defined as a help character,
2126some cases @code{read-event} processes the event directly without 2151then in some cases @code{read-event} processes the event directly without
2127returning. @xref{Help Functions}. Certain other events, called 2152returning. @xref{Help Functions}. Certain other events, called
2128@dfn{special events}, are also processed directly within 2153@dfn{special events}, are also processed directly within
2129@code{read-event} (@pxref{Special Events}). 2154@code{read-event} (@pxref{Special Events}).
@@ -2235,7 +2260,10 @@ The command @code{quoted-insert} uses this function.
2235This function is like @code{read-char}, except that if the first 2260This function is like @code{read-char}, except that if the first
2236character read is an octal digit (0-7), it reads any number of octal 2261character read is an octal digit (0-7), it reads any number of octal
2237digits (but stopping if a non-octal digit is found), and returns the 2262digits (but stopping if a non-octal digit is found), and returns the
2238character represented by that numeric character code. 2263character represented by that numeric character code. If the
2264character that terminates the sequence of octal digits is @key{RET},
2265it is discarded. Any other terminating character is used as input
2266after this function returns.
2239 2267
2240Quitting is suppressed when the first character is read, so that the 2268Quitting is suppressed when the first character is read, so that the
2241user can enter a @kbd{C-g}. @xref{Quitting}. 2269user can enter a @kbd{C-g}. @xref{Quitting}.
@@ -2252,7 +2280,7 @@ is 127 in decimal).
2252 2280
2253@group 2281@group
2254---------- Echo Area ---------- 2282---------- Echo Area ----------
2255What character-@kbd{177} 2283What character @kbd{1 7 7}-
2256---------- Echo Area ---------- 2284---------- Echo Area ----------
2257 2285
2258 @result{} 127 2286 @result{} 127
@@ -2370,7 +2398,8 @@ during the sleep.
2370@cindex special events 2398@cindex special events
2371Special events are handled at a very low level---as soon as they are 2399Special events are handled at a very low level---as soon as they are
2372read. The @code{read-event} function processes these events itself, and 2400read. The @code{read-event} function processes these events itself, and
2373never returns them. 2401never returns them. Instead, it keeps waiting for the first event
2402that is not special and returns that one.
2374 2403
2375Events that are handled in this way do not echo, they are never grouped 2404Events that are handled in this way do not echo, they are never grouped
2376into key sequences, and they never appear in the value of 2405into key sequences, and they never appear in the value of
@@ -2544,6 +2573,28 @@ is set to a value other than @code{nil}. If @code{inhibit-quit} is
2544non-@code{nil}, then @code{quit-flag} has no special effect. 2573non-@code{nil}, then @code{quit-flag} has no special effect.
2545@end defvar 2574@end defvar
2546 2575
2576@defmac with-local-quit forms@dots{}
2577This macro executes @var{forms} in sequence, but allows quitting, at
2578least locally, within @var{body} even if @code{inhibit-quit} was
2579non-@code{nil} outside this construct. It returns the value of the
2580last form in @var{forms}.
2581
2582If @code{inhibit-quit} is @code{nil} on entry to @code{with-local-quit},
2583it only executes the @var{forms}, and setting @code{quit-flag} causes
2584a normal quit. However, if @code{inhibit-quit} is non-@code{nil} so
2585that ordinary quitting is delayed, a non-@code{nil} @code{quit-flag}
2586triggers a special kind of local quit. This ends the execution of
2587@var{forms} and exits the @code{with-local-quit} form with
2588@code{quit-flag} still non-@code{nil}, so that another (ordinary) quit
2589will happen as soon as that is allowed. If @code{quit-flag} is
2590already non-@code{nil} at the beginning of @var{forms}, the local quit
2591happens immediately and they don't execute at all.
2592
2593This macro is mainly useful in functions that can be called from
2594timers, @code{pre-command-hook}, @code{post-command-hook} and other
2595places where @code{inhibit-quit} is normally bound to @code{t}.
2596@end defmac
2597
2547@deffn Command keyboard-quit 2598@deffn Command keyboard-quit
2548This function signals the @code{quit} condition with @code{(signal 'quit 2599This function signals the @code{quit} condition with @code{(signal 'quit
2549nil)}. This is the same thing that quitting does. (See @code{signal} 2600nil)}. This is the same thing that quitting does. (See @code{signal}
@@ -2844,25 +2895,28 @@ Disabling a command has no effect on calling it as a function from Lisp
2844programs. 2895programs.
2845 2896
2846@deffn Command enable-command command 2897@deffn Command enable-command command
2847Allow @var{command} to be executed without special confirmation from now 2898Allow @var{command} (a symbol) to be executed without special
2848on, and (if the user confirms) alter the user's init file (@pxref{Init 2899confirmation from now on, and alter the user's init file (@pxref{Init
2849File}) so that this will apply to future sessions. 2900File}) so that this will apply to future sessions.
2850@end deffn 2901@end deffn
2851 2902
2852@deffn Command disable-command command 2903@deffn Command disable-command command
2853Require special confirmation to execute @var{command} from now on, and 2904Require special confirmation to execute @var{command} from now on, and
2854(if the user confirms) alter the user's init file so that this 2905alter the user's init file so that this will apply to future sessions.
2855will apply to future sessions.
2856@end deffn 2906@end deffn
2857 2907
2858@defvar disabled-command-hook 2908@defvar disabled-command-function
2859When the user invokes a disabled command interactively, this normal hook 2909The value of this variable should be a function. When the user
2860is run instead of the disabled command. The hook functions can use 2910invokes a disabled command interactively, this function is called
2861@code{this-command-keys} to determine what the user typed to run the 2911instead of the disabled command. It can use @code{this-command-keys}
2862command, and thus find the command itself. @xref{Hooks}. 2912to determine what the user typed to run the command, and thus find the
2913command itself.
2914
2915The value may also be @code{nil}. Then all commands work normally,
2916even disabled ones.
2863 2917
2864By default, @code{disabled-command-hook} contains a function that asks 2918By default, the value is a function that asks the user whether to
2865the user whether to proceed. 2919proceed.
2866@end defvar 2920@end defvar
2867 2921
2868@node Command History 2922@node Command History
@@ -2918,7 +2972,7 @@ representation of a keyboard macro is a string or vector containing the
2918events. Don't confuse keyboard macros with Lisp macros 2972events. Don't confuse keyboard macros with Lisp macros
2919(@pxref{Macros}). 2973(@pxref{Macros}).
2920 2974
2921@defun execute-kbd-macro kbdmacro &optional count 2975@defun execute-kbd-macro kbdmacro &optional count loopfunc
2922This function executes @var{kbdmacro} as a sequence of events. If 2976This function executes @var{kbdmacro} as a sequence of events. If
2923@var{kbdmacro} is a string or vector, then the events in it are executed 2977@var{kbdmacro} is a string or vector, then the events in it are executed
2924exactly as if they had been input by the user. The sequence is 2978exactly as if they had been input by the user. The sequence is
@@ -2935,10 +2989,14 @@ many times. If @var{count} is omitted or @code{nil}, @var{kbdmacro} is
2935executed once. If it is 0, @var{kbdmacro} is executed over and over until it 2989executed once. If it is 0, @var{kbdmacro} is executed over and over until it
2936encounters an error or a failing search. 2990encounters an error or a failing search.
2937 2991
2992If @var{loopfunc} is non-@code{nil}, it is a function that is called,
2993without arguments, prior to each iteration of the macro. If
2994@var{loopfunc} returns @code{nil}, then this stops execution of the macro.
2995
2938@xref{Reading One Event}, for an example of using @code{execute-kbd-macro}. 2996@xref{Reading One Event}, for an example of using @code{execute-kbd-macro}.
2939@end defun 2997@end defun
2940 2998
2941@defvar executing-macro 2999@defvar executing-kbd-macro
2942This variable contains the string or vector that defines the keyboard 3000This variable contains the string or vector that defines the keyboard
2943macro that is currently executing. It is @code{nil} if no macro is 3001macro that is currently executing. It is @code{nil} if no macro is
2944currently executing. A command can test this variable so as to behave 3002currently executing. A command can test this variable so as to behave
@@ -2947,10 +3005,11 @@ yourself.
2947@end defvar 3005@end defvar
2948 3006
2949@defvar defining-kbd-macro 3007@defvar defining-kbd-macro
2950This variable indicates whether a keyboard macro is being defined. A 3008This variable is non-@code{nil} if and only if a keyboard macro is
2951command can test this variable so as to behave differently while a macro 3009being defined. A command can test this variable so as to behave
2952is being defined. The commands @code{start-kbd-macro} and 3010differently while a macro is being defined. The commands
2953@code{end-kbd-macro} set this variable---do not set it yourself. 3011@code{start-kbd-macro} and @code{end-kbd-macro} set this variable---do
3012not set it yourself.
2954 3013
2955The variable is always local to the current terminal and cannot be 3014The variable is always local to the current terminal and cannot be
2956buffer-local. @xref{Multiple Displays}. 3015buffer-local. @xref{Multiple Displays}.
diff --git a/lispref/hooks.texi b/lispref/hooks.texi
index 5c424bd8de2..ad5d709e720 100644
--- a/lispref/hooks.texi
+++ b/lispref/hooks.texi
@@ -64,7 +64,7 @@ however, we have renamed all of those.)
64@item diary-display-hook 64@item diary-display-hook
65@item diary-hook 65@item diary-hook
66@item dired-mode-hook 66@item dired-mode-hook
67@item disabled-command-hook 67@item disabled-command-function
68@item echo-area-clear-hook 68@item echo-area-clear-hook
69@item edit-picture-hook 69@item edit-picture-hook
70@item electric-buffer-menu-mode-hook 70@item electric-buffer-menu-mode-hook
diff --git a/lispref/minibuf.texi b/lispref/minibuf.texi
index c0ee5c85881..7b762a654e6 100644
--- a/lispref/minibuf.texi
+++ b/lispref/minibuf.texi
@@ -1118,6 +1118,7 @@ complete in the set of extant Lisp symbols, and it uses the
1118@end defun 1118@end defun
1119 1119
1120@defun read-variable prompt &optional default 1120@defun read-variable prompt &optional default
1121@anchor{Definition of read-variable}
1121This function reads the name of a user variable and returns it as a 1122This function reads the name of a user variable and returns it as a
1122symbol. 1123symbol.
1123 1124
diff --git a/lispref/objects.texi b/lispref/objects.texi
index 7c8eff06295..e945f075e65 100644
--- a/lispref/objects.texi
+++ b/lispref/objects.texi
@@ -411,8 +411,8 @@ represents the shifted-control-o character.
411@cindex hyper characters 411@cindex hyper characters
412@cindex super characters 412@cindex super characters
413@cindex alt characters 413@cindex alt characters
414 The X Window System defines three other @anchor{modifier bits} 414 The X Window System defines three other
415modifier bits that can be set 415@anchor{modifier bits}modifier bits that can be set
416in a character: @dfn{hyper}, @dfn{super} and @dfn{alt}. The syntaxes 416in a character: @dfn{hyper}, @dfn{super} and @dfn{alt}. The syntaxes
417for these bits are @samp{\H-}, @samp{\s-} and @samp{\A-}. (Case is 417for these bits are @samp{\H-}, @samp{\s-} and @samp{\A-}. (Case is
418significant in these prefixes.) Thus, @samp{?\H-\M-\A-x} represents 418significant in these prefixes.) Thus, @samp{?\H-\M-\A-x} represents
diff --git a/lispref/os.texi b/lispref/os.texi
index 3e1b93339ad..42a0613bfec 100644
--- a/lispref/os.texi
+++ b/lispref/os.texi
@@ -1686,12 +1686,18 @@ finished; it receives the results of translation by
1686@code{function-key-map}. 1686@code{function-key-map}.
1687 1687
1688@item 1688@item
1689@code{key-translation-map} overrides actual key bindings. For example, 1689Non-prefix bindings in @code{key-translation-map} override actual key
1690if @kbd{C-x f} has a binding in @code{key-translation-map}, that 1690bindings. For example, if @kbd{C-x f} has a non-prefix binding in
1691translation takes effect even though @kbd{C-x f} also has a key binding 1691@code{key-translation-map}, that translation takes effect even though
1692in the global map. 1692@kbd{C-x f} also has a key binding in the global map.
1693@end itemize 1693@end itemize
1694 1694
1695Note however that actual key bindings can have an effect on
1696@code{key-translation-map}, even though they are overridden by it.
1697Indeed, actual key bindings override @code{function-key-map} and thus
1698may alter the key sequence that @code{key-translation-map} receives.
1699Clearly, it is better to avoid to avoid this type of situation.
1700
1695The intent of @code{key-translation-map} is for users to map one 1701The intent of @code{key-translation-map} is for users to map one
1696character set to another, including ordinary characters normally bound 1702character set to another, including ordinary characters normally bound
1697to @code{self-insert-command}. 1703to @code{self-insert-command}.