comparison doc/lispref/commands.texi @ 109275:a85c2c80290c

Clarify command loop's role in undo boundary (Bug#2433). * text.texi (Undo): Clarify command loop behavior (Bug#2433). * commands.texi (Command Overview): Mention undo-boundary call.
author Chong Yidong <cyd@stupidchicken.com>
date Thu, 24 Jun 2010 15:05:47 -0400
parents 71353caf35e3
children 2c97f9b178b4 376148b31b5e
comparison
equal deleted inserted replaced
109274:a91e94388547 109275:a85c2c80290c
51 The result should be a keyboard macro or an interactively callable 51 The result should be a keyboard macro or an interactively callable
52 function. If the key is @kbd{M-x}, then it reads the name of another 52 function. If the key is @kbd{M-x}, then it reads the name of another
53 command, which it then calls. This is done by the command 53 command, which it then calls. This is done by the command
54 @code{execute-extended-command} (@pxref{Interactive Call}). 54 @code{execute-extended-command} (@pxref{Interactive Call}).
55 55
56 To execute a command requires first reading the arguments for it. 56 Prior to executing the command, Emacs runs @code{undo-boundary} to
57 This is done by calling @code{command-execute} (@pxref{Interactive 57 create an undo boundary. @xref{Maintaining Undo}.
58 Call}). For commands written in Lisp, the @code{interactive} 58
59 specification says how to read the arguments. This may use the prefix 59 To execute a command, Emacs first reads its arguments by calling
60 argument (@pxref{Prefix Command Arguments}) or may read with prompting 60 @code{command-execute} (@pxref{Interactive Call}). For commands
61 in the minibuffer (@pxref{Minibuffers}). For example, the command 61 written in Lisp, the @code{interactive} specification says how to read
62 @code{find-file} has an @code{interactive} specification which says to 62 the arguments. This may use the prefix argument (@pxref{Prefix
63 read a file name using the minibuffer. The command's function body does 63 Command Arguments}) or may read with prompting in the minibuffer
64 not use the minibuffer; if you call this command from Lisp code as a 64 (@pxref{Minibuffers}). For example, the command @code{find-file} has
65 function, you must supply the file name string as an ordinary Lisp 65 an @code{interactive} specification which says to read a file name
66 using the minibuffer. The function body of @code{find-file} does not
67 use the minibuffer, so if you call @code{find-file} as a function from
68 Lisp code, you must supply the file name string as an ordinary Lisp
66 function argument. 69 function argument.
67 70
68 If the command is a string or vector (i.e., a keyboard macro) then 71 If the command is a string or vector (i.e., a keyboard macro) then
69 @code{execute-kbd-macro} is used to execute it. You can call this 72 @code{execute-kbd-macro} is used to execute it. You can call this
70 function yourself (@pxref{Keyboard Macros}). 73 function yourself (@pxref{Keyboard Macros}).