diff options
| author | Chong Yidong | 2010-06-24 15:05:47 -0400 |
|---|---|---|
| committer | Chong Yidong | 2010-06-24 15:05:47 -0400 |
| commit | 51422d6dde17e1a655ec0161b537655b09cd630c (patch) | |
| tree | 6f0c897193530cf45b80f46c1bde0c80d5a4b018 | |
| parent | 62e034c2284d06657a555c8edfe0eca12b69168a (diff) | |
| download | emacs-51422d6dde17e1a655ec0161b537655b09cd630c.tar.gz emacs-51422d6dde17e1a655ec0161b537655b09cd630c.zip | |
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.
| -rw-r--r-- | doc/lispref/ChangeLog | 6 | ||||
| -rw-r--r-- | doc/lispref/commands.texi | 23 | ||||
| -rw-r--r-- | doc/lispref/text.texi | 17 |
3 files changed, 29 insertions, 17 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 188e81178ed..b92f4aea234 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2010-06-24 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * text.texi (Undo): Clarify command loop behavior (Bug#2433). | ||
| 4 | |||
| 5 | * commands.texi (Command Overview): Mention undo-boundary call. | ||
| 6 | |||
| 1 | 2010-06-23 Glenn Morris <rgm@gnu.org> | 7 | 2010-06-23 Glenn Morris <rgm@gnu.org> |
| 2 | 8 | ||
| 3 | * abbrevs.texi, commands.texi, compile.texi, debugging.texi: | 9 | * abbrevs.texi, commands.texi, compile.texi, debugging.texi: |
diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 2111bb39de3..d22cfd955cb 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi | |||
| @@ -53,16 +53,19 @@ 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 |
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index d55b9047021..f52d1db5c9c 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -1299,13 +1299,16 @@ This function places a boundary element in the undo list. The undo | |||
| 1299 | command stops at such a boundary, and successive undo commands undo | 1299 | command stops at such a boundary, and successive undo commands undo |
| 1300 | to earlier and earlier boundaries. This function returns @code{nil}. | 1300 | to earlier and earlier boundaries. This function returns @code{nil}. |
| 1301 | 1301 | ||
| 1302 | The editor command loop automatically creates an undo boundary before | 1302 | The editor command loop automatically calls @code{undo-boundary} just |
| 1303 | each key sequence is executed. Thus, each undo normally undoes the | 1303 | before executing each key sequence, so that each undo normally undoes |
| 1304 | effects of one command. Self-inserting input characters are an | 1304 | the effects of one command. As an exception, the command |
| 1305 | exception. The command loop makes a boundary for the first such | 1305 | @code{self-insert-command}, which produces self-inserting input |
| 1306 | character; the next 19 consecutive self-inserting input characters do | 1306 | characters (@pxref{Commands for Insertion}), may remove the boundary |
| 1307 | not make boundaries, and then the 20th does, and so on as long as | 1307 | inserted by the command loop: a boundary is accepted for the first |
| 1308 | self-inserting characters continue. | 1308 | such character, the next 19 consecutive self-inserting input |
| 1309 | characters do not have boundaries, and then the 20th does; and so on | ||
| 1310 | as long as the self-inserting characters continue. Hence, sequences | ||
| 1311 | of consecutive character insertions can be undone as a group. | ||
| 1309 | 1312 | ||
| 1310 | All buffer modifications add a boundary whenever the previous undoable | 1313 | All buffer modifications add a boundary whenever the previous undoable |
| 1311 | change was made in some other buffer. This is to ensure that | 1314 | change was made in some other buffer. This is to ensure that |