diff options
| author | Paul Eggert | 2011-10-13 23:14:17 -0700 |
|---|---|---|
| committer | Paul Eggert | 2011-10-13 23:14:17 -0700 |
| commit | 91107bd98003435fbeead3325ce694248863da39 (patch) | |
| tree | c7495c1957f51dac6567af73f390a3be287f9a5f | |
| parent | c8d5c85772067347a53bca0149c7018651dedb93 (diff) | |
| parent | 8b7a997c1a891d390b0d3e9483bf9e605fabd11a (diff) | |
| download | emacs-91107bd98003435fbeead3325ce694248863da39.tar.gz emacs-91107bd98003435fbeead3325ce694248863da39.zip | |
Merge from trunk.
| -rw-r--r-- | doc/emacs/ChangeLog | 15 | ||||
| -rw-r--r-- | doc/emacs/dired.texi | 2 | ||||
| -rw-r--r-- | doc/emacs/emacs.texi | 4 | ||||
| -rw-r--r-- | doc/emacs/frames.texi | 6 | ||||
| -rw-r--r-- | doc/emacs/killing.texi | 397 | ||||
| -rw-r--r-- | doc/emacs/mark.texi | 60 | ||||
| -rw-r--r-- | doc/emacs/mule.texi | 4 | ||||
| -rw-r--r-- | doc/lispref/ChangeLog | 7 | ||||
| -rw-r--r-- | doc/lispref/package.texi | 3 | ||||
| -rw-r--r-- | doc/lispref/text.texi | 18 | ||||
| -rw-r--r-- | etc/NEWS | 8 | ||||
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/textmodes/flyspell.el | 8 |
13 files changed, 307 insertions, 230 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog index 3089d2b3d5d..3fa8eece141 100644 --- a/doc/emacs/ChangeLog +++ b/doc/emacs/ChangeLog | |||
| @@ -1,3 +1,18 @@ | |||
| 1 | 2011-10-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * killing.texi (Deletion): Add xref to Using Region. Document | ||
| 4 | delete-forward-char. | ||
| 5 | (Yanking): Move yank-excluded-properties to Lisp manual. Move C-y | ||
| 6 | description here. Recommend C-u C-SPC for jumping to mark. | ||
| 7 | (Kill Ring): Move kill ring variable documentation here. | ||
| 8 | (Primary Selection): Copyedits. | ||
| 9 | (Rectangles): Document new command rectangle-number-lines. | ||
| 10 | (CUA Bindings): Note that this disables the mark-even-if-inactive | ||
| 11 | behavior for C-x and C-c. | ||
| 12 | |||
| 13 | * mark.texi (Mark): Mention "active region" terminology. | ||
| 14 | (Using Region): Document delete-active-region. | ||
| 15 | |||
| 1 | 2011-10-12 Chong Yidong <cyd@stupidchicken.com> | 16 | 2011-10-12 Chong Yidong <cyd@stupidchicken.com> |
| 2 | 17 | ||
| 3 | * mark.texi (Mark): Clarify description of disabled Transient Mark | 18 | * mark.texi (Mark): Clarify description of disabled Transient Mark |
diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index eb2bcc109e8..b6ed47fdb3f 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi | |||
| @@ -1403,7 +1403,7 @@ directory than in this one. It also marks files with no counterpart, | |||
| 1403 | in both directories, as always. | 1403 | in both directories, as always. |
| 1404 | 1404 | ||
| 1405 | @cindex drag and drop, Dired | 1405 | @cindex drag and drop, Dired |
| 1406 | On the X window system, Emacs supports the ``drag and drop'' | 1406 | On the X Window System, Emacs supports the ``drag and drop'' |
| 1407 | protocol. You can drag a file object from another program, and drop | 1407 | protocol. You can drag a file object from another program, and drop |
| 1408 | it onto a Dired buffer; this either moves, copies, or creates a link | 1408 | it onto a Dired buffer; this either moves, copies, or creates a link |
| 1409 | to the file in that directory. Precisely which action is taken is | 1409 | to the file in that directory. Precisely which action is taken is |
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index d34ecb01ad6..8a15c783fc0 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi | |||
| @@ -319,9 +319,9 @@ Killing and Moving Text | |||
| 319 | 319 | ||
| 320 | Yanking | 320 | Yanking |
| 321 | 321 | ||
| 322 | * Kill Ring:: Where killed text is stored. Basic yanking. | 322 | * Kill Ring:: Where killed text is stored. |
| 323 | * Appending Kills:: Several kills in a row all yank together. | ||
| 324 | * Earlier Kills:: Yanking something killed some time ago. | 323 | * Earlier Kills:: Yanking something killed some time ago. |
| 324 | * Appending Kills:: Several kills in a row all yank together. | ||
| 325 | 325 | ||
| 326 | Killing and Yanking on Graphical Displays | 326 | Killing and Yanking on Graphical Displays |
| 327 | 327 | ||
diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index fc78f90db15..14fdb3121a4 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi | |||
| @@ -93,7 +93,7 @@ clicked. | |||
| 93 | Normally, Emacs does not distinguish between ordinary mouse clicks | 93 | Normally, Emacs does not distinguish between ordinary mouse clicks |
| 94 | and clicks that select a frame. When you click on a frame to select | 94 | and clicks that select a frame. When you click on a frame to select |
| 95 | it, that also changes the selected window and cursor position | 95 | it, that also changes the selected window and cursor position |
| 96 | according to the mouse click position. On the X window system, you | 96 | according to the mouse click position. On the X Window System, you |
| 97 | can change this behavior by setting the variable | 97 | can change this behavior by setting the variable |
| 98 | @code{x-mouse-click-focus-ignore-position} to @code{t}. Then the | 98 | @code{x-mouse-click-focus-ignore-position} to @code{t}. Then the |
| 99 | first click selects the frame, but does not affect the selected window | 99 | first click selects the frame, but does not affect the selected window |
| @@ -961,7 +961,7 @@ the left of each Emacs window, running the height of the | |||
| 961 | window.@footnote{Placing it at the left is usually more useful with | 961 | window.@footnote{Placing it at the left is usually more useful with |
| 962 | overlapping frames with text starting at the left margin.} | 962 | overlapping frames with text starting at the left margin.} |
| 963 | 963 | ||
| 964 | When Emacs is compiled with GTK+ support on the X window system, or | 964 | When Emacs is compiled with GTK+ support on the X Window System, or |
| 965 | in operating systems such as Microsoft Windows or Mac OS, you can use | 965 | in operating systems such as Microsoft Windows or Mac OS, you can use |
| 966 | the scroll bar as you do in other graphical applications. If you | 966 | the scroll bar as you do in other graphical applications. If you |
| 967 | click @kbd{Mouse-1} on the scroll bar's up and down buttons, that | 967 | click @kbd{Mouse-1} on the scroll bar's up and down buttons, that |
| @@ -971,7 +971,7 @@ the entire height of the window, like @kbd{M-v} and @kbd{C-v} | |||
| 971 | respectively (@pxref{Moving Point}). Dragging the inner box with | 971 | respectively (@pxref{Moving Point}). Dragging the inner box with |
| 972 | @kbd{Mouse-1} scrolls the window continuously. | 972 | @kbd{Mouse-1} scrolls the window continuously. |
| 973 | 973 | ||
| 974 | If Emacs is compiled without GTK+ support on the X window system, | 974 | If Emacs is compiled without GTK+ support on the X Window System, |
| 975 | the scroll bar behaves differently. The scroll bar's inner box is | 975 | the scroll bar behaves differently. The scroll bar's inner box is |
| 976 | drawn to represent the portion of the buffer currently displayed, with | 976 | drawn to represent the portion of the buffer currently displayed, with |
| 977 | the entire height of the scroll bar representing the entire length of | 977 | the entire height of the scroll bar representing the entire length of |
diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi index 06839ce5187..493316daa52 100644 --- a/doc/emacs/killing.texi +++ b/doc/emacs/killing.texi | |||
| @@ -77,12 +77,18 @@ the most part, the Emacs commands that delete text are those that | |||
| 77 | erase just one character or only whitespace. | 77 | erase just one character or only whitespace. |
| 78 | 78 | ||
| 79 | @table @kbd | 79 | @table @kbd |
| 80 | @item C-d | ||
| 81 | @itemx @key{Delete} | ||
| 82 | Delete next character (@code{delete-char}). | ||
| 83 | @item @key{DEL} | 80 | @item @key{DEL} |
| 84 | @itemx @key{Backspace} | 81 | @itemx @key{Backspace} |
| 85 | Delete previous character (@code{delete-backward-char}). | 82 | Delete the previous character, or the text in the region if it is |
| 83 | active (@code{delete-backward-char}). | ||
| 84 | |||
| 85 | @item @key{Delete} | ||
| 86 | Delete the next character, or the text in the region if it is active | ||
| 87 | (@code{delete-forward-char}). | ||
| 88 | |||
| 89 | @item C-d | ||
| 90 | Delete the next character (@code{delete-char}). | ||
| 91 | |||
| 86 | @item M-\ | 92 | @item M-\ |
| 87 | Delete spaces and tabs around point (@code{delete-horizontal-space}). | 93 | Delete spaces and tabs around point (@code{delete-horizontal-space}). |
| 88 | @item M-@key{SPC} | 94 | @item M-@key{SPC} |
| @@ -95,9 +101,13 @@ Join two lines by deleting the intervening newline, along with any | |||
| 95 | indentation following it (@code{delete-indentation}). | 101 | indentation following it (@code{delete-indentation}). |
| 96 | @end table | 102 | @end table |
| 97 | 103 | ||
| 98 | We have already described the basic deletion commands @kbd{C-d} | 104 | We have already described the basic deletion commands @key{DEL} |
| 99 | (@code{delete-char}) and @key{DEL} (@code{delete-backward-char}). | 105 | (@code{delete-backward-char}), @key{delete} |
| 100 | @xref{Erasing}. | 106 | (@code{delete-forward-char}), and @kbd{C-d} (@code{delete-char}). |
| 107 | @xref{Erasing}. With a numeric argument, they delete the specified | ||
| 108 | number of characters. If the numeric argument is omitted or one, they | ||
| 109 | delete all the text in the region if it is active (@pxref{Using | ||
| 110 | Region}). | ||
| 101 | 111 | ||
| 102 | @kindex M-\ | 112 | @kindex M-\ |
| 103 | @findex delete-horizontal-space | 113 | @findex delete-horizontal-space |
| @@ -177,35 +187,35 @@ key sequence @kbd{C-S-backspace}. | |||
| 177 | 187 | ||
| 178 | @table @kbd | 188 | @table @kbd |
| 179 | @item C-w | 189 | @item C-w |
| 180 | Kill region (@code{kill-region}). @xref{Mark}. | 190 | Kill the region (@code{kill-region}). |
| 181 | @item M-w | 191 | @item M-w |
| 182 | Save region as last killed text without actually killing it | 192 | Copy the region into the kill ring (@code{kill-ring-save}). |
| 183 | (@code{kill-ring-save}). Some programs call this ``copying.'' | ||
| 184 | @item M-d | 193 | @item M-d |
| 185 | Kill word (@code{kill-word}). @xref{Words}. | 194 | Kill the next word (@code{kill-word}). @xref{Words}. |
| 186 | @item M-@key{DEL} | 195 | @item M-@key{DEL} |
| 187 | Kill word backwards (@code{backward-kill-word}). | 196 | Kill one word backwards (@code{backward-kill-word}). |
| 188 | @item C-x @key{DEL} | 197 | @item C-x @key{DEL} |
| 189 | Kill back to beginning of sentence (@code{backward-kill-sentence}). | 198 | Kill back to beginning of sentence (@code{backward-kill-sentence}). |
| 190 | @xref{Sentences}. | 199 | @xref{Sentences}. |
| 191 | @item M-k | 200 | @item M-k |
| 192 | Kill to end of sentence (@code{kill-sentence}). | 201 | Kill to the end of the sentence (@code{kill-sentence}). |
| 193 | @item C-M-k | 202 | @item C-M-k |
| 194 | Kill the following balanced expression (@code{kill-sexp}). @xref{Expressions}. | 203 | Kill the following balanced expression (@code{kill-sexp}). @xref{Expressions}. |
| 195 | @item M-z @var{char} | 204 | @item M-z @var{char} |
| 196 | Kill through the next occurrence of @var{char} (@code{zap-to-char}). | 205 | Kill through the next occurrence of @var{char} (@code{zap-to-char}). |
| 197 | @end table | 206 | @end table |
| 198 | 207 | ||
| 199 | Apart from @kbd{C-k}, the most commonly-used kill command is | 208 | @kindex C-w |
| 200 | @kbd{C-w} (@code{kill-region}), which kills the text in the region | 209 | @findex kill-region |
| 201 | (i.e., between point and mark). @xref{Mark}. If the mark is inactive | ||
| 202 | when you type @kbd{C-w}, it first reactivates the mark where it was | ||
| 203 | last set. The mark is deactivated at the end of the command. | ||
| 204 | |||
| 205 | @kindex M-w | 210 | @kindex M-w |
| 206 | @findex kill-ring-save | 211 | @findex kill-ring-save |
| 207 | @kbd{M-w} (@code{kill-ring-save}) copies the region into the kill | 212 | One of the commonly-used kill commands is @kbd{C-w} |
| 208 | ring without removing it from the buffer. | 213 | (@code{kill-region}), which kills the text in the region |
| 214 | (@pxref{Mark}). Similarly, @kbd{M-w} (@code{kill-ring-save}) copies | ||
| 215 | the text in the region into the kill ring without removing it from the | ||
| 216 | buffer. If the mark is inactive when you type @kbd{C-w} or @kbd{M-w}, | ||
| 217 | the command acts on the text between point and where you last set the | ||
| 218 | mark (@pxref{Using Region}). | ||
| 209 | 219 | ||
| 210 | Emacs also provides commands to kill specific syntactic units: | 220 | Emacs also provides commands to kill specific syntactic units: |
| 211 | words, with @kbd{M-@key{DEL}} and @kbd{M-d} (@pxref{Words}); balanced | 221 | words, with @kbd{M-@key{DEL}} and @kbd{M-d} (@pxref{Words}); balanced |
| @@ -248,34 +258,45 @@ kill-ring entry, without duplication. | |||
| 248 | @cindex pasting | 258 | @cindex pasting |
| 249 | 259 | ||
| 250 | @dfn{Yanking} means reinserting text previously killed. The usual | 260 | @dfn{Yanking} means reinserting text previously killed. The usual |
| 251 | way to move or copy text is to kill it and then yank it elsewhere one | 261 | way to move or copy text is to kill it and then yank it elsewhere. |
| 252 | or more times. | ||
| 253 | 262 | ||
| 254 | @table @kbd | 263 | @table @kbd |
| 255 | @item C-y | 264 | @item C-y |
| 256 | Yank last killed text (@code{yank}). | 265 | Yank the last kill into the buffer, at point (@code{yank}). |
| 257 | @item M-y | 266 | @item M-y |
| 258 | Replace text just yanked with an earlier batch of killed text | 267 | Replace the text just yanked with an earlier batch of killed text |
| 259 | (@code{yank-pop}). | 268 | (@code{yank-pop}). @xref{Earlier Kills}. |
| 260 | @item C-M-w | 269 | @item C-M-w |
| 261 | Append next kill to last batch of killed text (@code{append-next-kill}). | 270 | Cause the following command, if it is a kill command, to append to the |
| 271 | previous kill (@code{append-next-kill}). @xref{Appending Kills}. | ||
| 262 | @end table | 272 | @end table |
| 263 | 273 | ||
| 264 | @cindex yanking and text properties | 274 | @kindex C-y |
| 265 | @vindex yank-excluded-properties | 275 | @findex yank |
| 266 | The yank commands discard certain properties from the yanked text. | 276 | The basic yanking command is @kbd{C-y} (@code{yank}). It inserts |
| 267 | These are properties that might lead to annoying results, such as | 277 | the most recent kill, leaving the cursor at the end of the inserted |
| 268 | causing the text to respond to the mouse or specifying key bindings. | 278 | text. It also sets the mark at the beginning of the inserted text, |
| 269 | The list of properties to discard is stored in the variable | 279 | without activating the mark; this lets you jump easily to that |
| 270 | @code{yank-excluded-properties}. These properties are also discarded | 280 | position, if you wish, with @kbd{C-u C-@key{SPC}} (@pxref{Mark Ring}). |
| 271 | when yanking register contents and rectangles. @xref{Text | 281 | |
| 272 | Properties,,, elisp, the Emacs Lisp Reference Manual}, for more | 282 | With a plain prefix argument (@kbd{C-u C-y}), the command instead |
| 273 | information about text properties. | 283 | leaves the cursor in front of the inserted text, and sets the mark at |
| 284 | the end. Using any other prefix argument specifies an earlier kill; | ||
| 285 | e.g. @kbd{C-u 4 C-y} reinserts the fourth most recent kill. | ||
| 286 | @xref{Earlier Kills}. | ||
| 287 | |||
| 288 | On graphical displays, @kbd{C-y} first checks if another application | ||
| 289 | has placed any text in the system clipboard more recently than the | ||
| 290 | last Emacs kill. If so, it inserts the text in the clipboard instead. | ||
| 291 | Thus, Emacs effectively treats ``cut'' or ``copy'' clipboard | ||
| 292 | operations performed in other applications like Emacs kills, except | ||
| 293 | that they are not recorded in the kill ring. @xref{Cut and Paste}, | ||
| 294 | for details. | ||
| 274 | 295 | ||
| 275 | @menu | 296 | @menu |
| 276 | * Kill Ring:: Where killed text is stored. Basic yanking. | 297 | * Kill Ring:: Where killed text is stored. |
| 277 | * Appending Kills:: Several kills in a row all yank together. | ||
| 278 | * Earlier Kills:: Yanking something killed some time ago. | 298 | * Earlier Kills:: Yanking something killed some time ago. |
| 299 | * Appending Kills:: Several kills in a row all yank together. | ||
| 279 | @end menu | 300 | @end menu |
| 280 | 301 | ||
| 281 | @node Kill Ring | 302 | @node Kill Ring |
| @@ -284,31 +305,69 @@ information about text properties. | |||
| 284 | The @dfn{kill ring} is a list of blocks of text that were previously | 305 | The @dfn{kill ring} is a list of blocks of text that were previously |
| 285 | killed. There is only one kill ring, shared by all buffers, so you | 306 | killed. There is only one kill ring, shared by all buffers, so you |
| 286 | can kill text in one buffer and yank it in another buffer. This is | 307 | can kill text in one buffer and yank it in another buffer. This is |
| 287 | the usual way to move text from one file to another. (There are | 308 | the usual way to move text from one buffer to another. (There are |
| 288 | several other methods: for instance, you could store the text in a | 309 | several other methods: for instance, you could store the text in a |
| 289 | register; see @ref{Registers}. @xref{Accumulating Text}, for some | 310 | register; see @ref{Registers}. @xref{Accumulating Text}, for some |
| 290 | other ways to move text around.) | 311 | other ways to move text around.) |
| 291 | 312 | ||
| 292 | @kindex C-y | 313 | @vindex kill-ring-max |
| 293 | @findex yank | 314 | The maximum number of entries in the kill ring is controlled by the |
| 294 | @kbd{C-y} (@code{yank}) reinserts the text of the most recent kill, | 315 | variable @code{kill-ring-max}. The default is 60. If you make a new |
| 295 | leaving the cursor at the end of the text. It also adds the position | 316 | kill when this limit has been reached, Emacs makes room by deleting |
| 296 | of the beginning of the text to the mark ring, without activating the | 317 | the oldest entry in the kill ring. |
| 297 | mark; this allows you to jump easily to that position with @kbd{C-x | ||
| 298 | C-x} (@pxref{Setting Mark}). | ||
| 299 | 318 | ||
| 300 | On graphical displays, @kbd{C-y} first checks if another application | 319 | @vindex kill-ring |
| 301 | has placed any text in the system clipboard more recently than the | 320 | The actual contents of the kill ring are stored in a variable named |
| 302 | last Emacs kill. If so, it inserts from the clipboard instead of the | 321 | @code{kill-ring}; you can view the entire contents of the kill ring |
| 303 | kill ring. Conceptually, you can think of the clipboard as an | 322 | with @kbd{C-h v kill-ring}. |
| 304 | ``extra'' entry in the kill ring, which is present if you recently cut | 323 | |
| 305 | or copied some text in another application. @xref{Cut and Paste}. | 324 | @node Earlier Kills |
| 325 | @subsection Yanking Earlier Kills | ||
| 326 | @cindex yanking previous kills | ||
| 327 | |||
| 328 | As explained in @ref{Yanking}, you can use a numeric argument to | ||
| 329 | @kbd{C-y} to yank text that is no longer the most recent kill. This | ||
| 330 | is useful if you remember which kill ring entry you want. If you | ||
| 331 | don't, you can use the @kbd{M-y} (@code{yank-pop}) command to cycle | ||
| 332 | through the possibilities. | ||
| 333 | |||
| 334 | @kindex M-y | ||
| 335 | @findex yank-pop | ||
| 336 | If the previous command was a yank command, @kbd{M-y} takes the text | ||
| 337 | that was yanked and replaces it with the text from an earlier kill. | ||
| 338 | So, to recover the text of the next-to-the-last kill, first use | ||
| 339 | @kbd{C-y} to yank the last kill, and then use @kbd{M-y} to replace it | ||
| 340 | with the previous kill. @kbd{M-y} is allowed only after a @kbd{C-y} | ||
| 341 | or another @kbd{M-y}. | ||
| 342 | |||
| 343 | You can understand @kbd{M-y} in terms of a ``last yank'' pointer which | ||
| 344 | points at an entry in the kill ring. Each time you kill, the ``last | ||
| 345 | yank'' pointer moves to the newly made entry at the front of the ring. | ||
| 346 | @kbd{C-y} yanks the entry which the ``last yank'' pointer points to. | ||
| 347 | @kbd{M-y} moves the ``last yank'' pointer to a different entry, and the | ||
| 348 | text in the buffer changes to match. Enough @kbd{M-y} commands can move | ||
| 349 | the pointer to any entry in the ring, so you can get any entry into the | ||
| 350 | buffer. Eventually the pointer reaches the end of the ring; the next | ||
| 351 | @kbd{M-y} loops back around to the first entry again. | ||
| 352 | |||
| 353 | @kbd{M-y} moves the ``last yank'' pointer around the ring, but it does | ||
| 354 | not change the order of the entries in the ring, which always runs from | ||
| 355 | the most recent kill at the front to the oldest one still remembered. | ||
| 356 | |||
| 357 | @kbd{M-y} can take a numeric argument, which tells it how many entries | ||
| 358 | to advance the ``last yank'' pointer by. A negative argument moves the | ||
| 359 | pointer toward the front of the ring; from the front of the ring, it | ||
| 360 | moves ``around'' to the last entry and continues forward from there. | ||
| 361 | |||
| 362 | Once the text you are looking for is brought into the buffer, you can | ||
| 363 | stop doing @kbd{M-y} commands and it will stay there. It's just a copy | ||
| 364 | of the kill ring entry, so editing it in the buffer does not change | ||
| 365 | what's in the ring. As long as no new killing is done, the ``last | ||
| 366 | yank'' pointer remains at the same place in the kill ring, so repeating | ||
| 367 | @kbd{C-y} will yank another copy of the same previous kill. | ||
| 306 | 368 | ||
| 307 | With a plain prefix argument (@kbd{C-u C-y}), the @code{yank} | 369 | When you call @kbd{C-y} with a numeric argument, that also sets the |
| 308 | command instead leaves the cursor in front of the text, and adds the | 370 | ``last yank'' pointer to the entry that it yanks. |
| 309 | position of the end of the text to the mark ring. Using any other | ||
| 310 | prefix argument specifies an earlier kill; for example, @kbd{C-u 4 | ||
| 311 | C-y} reinserts the fourth most recent kill. @xref{Earlier Kills}. | ||
| 312 | 371 | ||
| 313 | @node Appending Kills | 372 | @node Appending Kills |
| 314 | @subsection Appending Kills | 373 | @subsection Appending Kills |
| @@ -365,65 +424,6 @@ accumulate them to be yanked back in one place.@refill | |||
| 365 | A kill command following @kbd{M-w} (@code{kill-ring-save}) does not | 424 | A kill command following @kbd{M-w} (@code{kill-ring-save}) does not |
| 366 | append to the text that @kbd{M-w} copied into the kill ring. | 425 | append to the text that @kbd{M-w} copied into the kill ring. |
| 367 | 426 | ||
| 368 | @node Earlier Kills | ||
| 369 | @subsection Yanking Earlier Kills | ||
| 370 | |||
| 371 | @cindex yanking previous kills | ||
| 372 | @kindex M-y | ||
| 373 | @findex yank-pop | ||
| 374 | To recover killed text that is no longer the most recent kill, use the | ||
| 375 | @kbd{M-y} command (@code{yank-pop}). It takes the text previously | ||
| 376 | yanked and replaces it with the text from an earlier kill. So, to | ||
| 377 | recover the text of the next-to-the-last kill, first use @kbd{C-y} to | ||
| 378 | yank the last kill, and then use @kbd{M-y} to replace it with the | ||
| 379 | previous kill. @kbd{M-y} is allowed only after a @kbd{C-y} or another | ||
| 380 | @kbd{M-y}. | ||
| 381 | |||
| 382 | You can understand @kbd{M-y} in terms of a ``last yank'' pointer which | ||
| 383 | points at an entry in the kill ring. Each time you kill, the ``last | ||
| 384 | yank'' pointer moves to the newly made entry at the front of the ring. | ||
| 385 | @kbd{C-y} yanks the entry which the ``last yank'' pointer points to. | ||
| 386 | @kbd{M-y} moves the ``last yank'' pointer to a different entry, and the | ||
| 387 | text in the buffer changes to match. Enough @kbd{M-y} commands can move | ||
| 388 | the pointer to any entry in the ring, so you can get any entry into the | ||
| 389 | buffer. Eventually the pointer reaches the end of the ring; the next | ||
| 390 | @kbd{M-y} loops back around to the first entry again. | ||
| 391 | |||
| 392 | @kbd{M-y} moves the ``last yank'' pointer around the ring, but it does | ||
| 393 | not change the order of the entries in the ring, which always runs from | ||
| 394 | the most recent kill at the front to the oldest one still remembered. | ||
| 395 | |||
| 396 | @kbd{M-y} can take a numeric argument, which tells it how many entries | ||
| 397 | to advance the ``last yank'' pointer by. A negative argument moves the | ||
| 398 | pointer toward the front of the ring; from the front of the ring, it | ||
| 399 | moves ``around'' to the last entry and continues forward from there. | ||
| 400 | |||
| 401 | Once the text you are looking for is brought into the buffer, you can | ||
| 402 | stop doing @kbd{M-y} commands and it will stay there. It's just a copy | ||
| 403 | of the kill ring entry, so editing it in the buffer does not change | ||
| 404 | what's in the ring. As long as no new killing is done, the ``last | ||
| 405 | yank'' pointer remains at the same place in the kill ring, so repeating | ||
| 406 | @kbd{C-y} will yank another copy of the same previous kill. | ||
| 407 | |||
| 408 | If you know how many @kbd{M-y} commands it would take to find the | ||
| 409 | text you want, you can yank that text in one step using @kbd{C-y} with | ||
| 410 | a numeric argument. @kbd{C-y} with an argument restores the text from | ||
| 411 | the specified kill ring entry, counting back from the most recent as | ||
| 412 | 1. Thus, @kbd{C-u 2 C-y} gets the next-to-the-last block of killed | ||
| 413 | text---it is equivalent to @kbd{C-y M-y}. @kbd{C-y} with a numeric | ||
| 414 | argument starts counting from the ``last yank'' pointer, and sets the | ||
| 415 | ``last yank'' pointer to the entry that it yanks. | ||
| 416 | |||
| 417 | @vindex kill-ring-max | ||
| 418 | The length of the kill ring is controlled by the variable | ||
| 419 | @code{kill-ring-max}; no more than that many blocks of killed text are | ||
| 420 | saved. | ||
| 421 | |||
| 422 | @vindex kill-ring | ||
| 423 | The actual contents of the kill ring are stored in a variable named | ||
| 424 | @code{kill-ring}; you can view the entire contents of the kill ring with | ||
| 425 | the command @kbd{C-h v kill-ring}. | ||
| 426 | |||
| 427 | @node Cut and Paste | 427 | @node Cut and Paste |
| 428 | @section ``Cut and Paste'' Operations on Graphical Displays | 428 | @section ``Cut and Paste'' Operations on Graphical Displays |
| 429 | @cindex cut | 429 | @cindex cut |
| @@ -462,7 +462,7 @@ and yank commands in Emacs make use of it. | |||
| 462 | When you kill some text with a command such as @kbd{C-w} | 462 | When you kill some text with a command such as @kbd{C-w} |
| 463 | (@code{kill-region}), or copy it to the kill ring with a command such | 463 | (@code{kill-region}), or copy it to the kill ring with a command such |
| 464 | as @kbd{M-w} (@code{kill-ring-save}), that text is also put in the | 464 | as @kbd{M-w} (@code{kill-ring-save}), that text is also put in the |
| 465 | clipboard. @xref{Killing}. | 465 | clipboard. |
| 466 | 466 | ||
| 467 | @vindex save-interprogram-paste-before-kill | 467 | @vindex save-interprogram-paste-before-kill |
| 468 | When an Emacs kill command puts text in the clipboard, the existing | 468 | When an Emacs kill command puts text in the clipboard, the existing |
| @@ -472,12 +472,11 @@ will first save the clipboard to its kill ring, preventing you from | |||
| 472 | losing the old clipboard data---at the risk of high memory consumption | 472 | losing the old clipboard data---at the risk of high memory consumption |
| 473 | if that data turns out to be large. | 473 | if that data turns out to be large. |
| 474 | 474 | ||
| 475 | The usual yank commands, such as @kbd{C-y} (@code{yank}), also use | 475 | Yank commands, such as @kbd{C-y} (@code{yank}), also use the |
| 476 | the clipboard. If another application ``owns'' the clipboard---i.e., | 476 | clipboard. If another application ``owns'' the clipboard---i.e., if |
| 477 | if you cut or copied text there more recently than your last kill | 477 | you cut or copied text there more recently than your last kill command |
| 478 | command in Emacs---then Emacs yanks from the clipboard instead of the | 478 | in Emacs---then Emacs yanks from the clipboard instead of the kill |
| 479 | kill ring. Otherwise, it yanks from the kill ring, as described in | 479 | ring. |
| 480 | @ref{Yanking}. | ||
| 481 | 480 | ||
| 482 | @vindex yank-pop-change-selection | 481 | @vindex yank-pop-change-selection |
| 483 | Normally, rotating the kill ring with @kbd{M-y} (@code{yank-pop}) | 482 | Normally, rotating the kill ring with @kbd{M-y} (@code{yank-pop}) |
| @@ -511,20 +510,20 @@ yanks the contents of the clipboard at point. | |||
| 511 | @cindex primary selection | 510 | @cindex primary selection |
| 512 | @cindex selection, primary | 511 | @cindex selection, primary |
| 513 | 512 | ||
| 514 | Under the X window system, there exists a @dfn{primary selection} | 513 | Under the X Window System, there exists a @dfn{primary selection} |
| 515 | containing the last stretch of text selected in an X application | 514 | containing the last stretch of text selected in an X application |
| 516 | (usually by dragging the mouse). Typically, this text can be inserted | 515 | (usually by dragging the mouse). Typically, this text can be inserted |
| 517 | into other X applications by @kbd{mouse-2} clicks. The primary | 516 | into other X applications by @kbd{mouse-2} clicks. The primary |
| 518 | selection is separate from the clipboard (@pxref{Clipboard}). Its | 517 | selection is separate from the clipboard. Its contents are more |
| 519 | contents are more ``fragile''; they are overwritten by any mouse | 518 | ``fragile''; they are overwritten each time you select text with the |
| 520 | selection, whereas the clipboard is only overwritten by explicit | 519 | mouse, whereas the clipboard is only overwritten by explicit ``cut'' |
| 521 | ``cut'' or ``copy'' commands. | 520 | or ``copy'' commands. |
| 522 | 521 | ||
| 523 | Under X, whenever you set an active region (@pxref{Mark}), Emacs | 522 | Under X, whenever the region is active (@pxref{Mark}), the text in |
| 524 | saves the text in the active region to the primary selection. This | 523 | the region is saved in the primary selection. This applies regardless |
| 525 | applies to active regions made by dragging or clicking the mouse | 524 | of whether the region was made by dragging or clicking the mouse |
| 526 | (@pxref{Mouse Commands}), and those made by keyboard commands (e.g. by | 525 | (@pxref{Mouse Commands}), or by keyboard commands (e.g. by typing |
| 527 | typing @kbd{C-@key{SPC}} and moving point; see @ref{Setting Mark}). | 526 | @kbd{C-@key{SPC}} and moving point; @pxref{Setting Mark}). |
| 528 | 527 | ||
| 529 | @vindex select-active-regions | 528 | @vindex select-active-regions |
| 530 | If you change the variable @code{select-active-regions} to | 529 | If you change the variable @code{select-active-regions} to |
| @@ -636,9 +635,9 @@ starting from wherever point happens to be at that moment. | |||
| 636 | successive uses of @code{append-to-buffer} accumulate the text in the | 635 | successive uses of @code{append-to-buffer} accumulate the text in the |
| 637 | specified buffer in the same order as they were copied. Strictly | 636 | specified buffer in the same order as they were copied. Strictly |
| 638 | speaking, @code{append-to-buffer} does not always append to the text | 637 | speaking, @code{append-to-buffer} does not always append to the text |
| 639 | already in the buffer---it appends only if point in that buffer is at the end. | 638 | already in the buffer---it appends only if point in that buffer is at |
| 640 | However, if @code{append-to-buffer} is the only command you use to alter | 639 | the end. However, if @code{append-to-buffer} is the only command you |
| 641 | a buffer, then point is always at the end. | 640 | use to alter a buffer, then point is always at the end. |
| 642 | 641 | ||
| 643 | @kbd{M-x prepend-to-buffer} is just like @code{append-to-buffer} | 642 | @kbd{M-x prepend-to-buffer} is just like @code{append-to-buffer} |
| 644 | except that point in the other buffer is left before the copied text, so | 643 | except that point in the other buffer is left before the copied text, so |
| @@ -682,19 +681,16 @@ them. Rectangle commands are useful with text in multicolumn formats, | |||
| 682 | and for changing text into or out of such formats. | 681 | and for changing text into or out of such formats. |
| 683 | 682 | ||
| 684 | @cindex mark rectangle | 683 | @cindex mark rectangle |
| 685 | When you must specify a rectangle for a command to work on, you do it | 684 | To specify a rectangle for a command to work on, set the mark at one |
| 686 | by putting the mark at one corner and point at the opposite corner. The | 685 | corner and point at the opposite corner. The rectangle thus specified |
| 687 | rectangle thus specified is called the @dfn{region-rectangle} because | 686 | is called the @dfn{region-rectangle}. If point and the mark are in |
| 688 | you control it in much the same way as the region is controlled. But | 687 | the same column, the region-rectangle is empty. If they are in the |
| 689 | remember that a given combination of point and mark values can be | 688 | same line, the region-rectangle is one line high. |
| 690 | interpreted either as a region or as a rectangle, depending on the | 689 | |
| 691 | command that uses them. | 690 | The region-rectangle is controlled in much the same way as the |
| 692 | 691 | region is controlled. But remember that a given combination of point | |
| 693 | If point and the mark are in the same column, the rectangle they | 692 | and mark values can be interpreted either as a region or as a |
| 694 | delimit is empty. If they are in the same line, the rectangle is one | 693 | rectangle, depending on the command that uses them. |
| 695 | line high. This asymmetry between lines and columns comes about | ||
| 696 | because point (and likewise the mark) is between two columns, but within | ||
| 697 | a line. | ||
| 698 | 694 | ||
| 699 | @table @kbd | 695 | @table @kbd |
| 700 | @item C-x r k | 696 | @item C-x r k |
| @@ -708,7 +704,11 @@ Yank the last killed rectangle with its upper left corner at point | |||
| 708 | @item C-x r o | 704 | @item C-x r o |
| 709 | Insert blank space to fill the space of the region-rectangle | 705 | Insert blank space to fill the space of the region-rectangle |
| 710 | (@code{open-rectangle}). This pushes the previous contents of the | 706 | (@code{open-rectangle}). This pushes the previous contents of the |
| 711 | region-rectangle rightward. | 707 | region-rectangle to the right. |
| 708 | @item C-x r N | ||
| 709 | Insert line numbers along the left edge of the region-rectangle | ||
| 710 | (@code{rectangle-number-lines}). This pushes the previous contents of | ||
| 711 | the region-rectangle to the right. | ||
| 712 | @item C-x r c | 712 | @item C-x r c |
| 713 | Clear the region-rectangle by replacing all of its contents with spaces | 713 | Clear the region-rectangle by replacing all of its contents with spaces |
| 714 | (@code{clear-rectangle}). | 714 | (@code{clear-rectangle}). |
| @@ -722,42 +722,39 @@ Replace rectangle contents with @var{string} on each line | |||
| 722 | Insert @var{string} on each line of the rectangle. | 722 | Insert @var{string} on each line of the rectangle. |
| 723 | @end table | 723 | @end table |
| 724 | 724 | ||
| 725 | The rectangle operations fall into two classes: commands for | 725 | The rectangle operations fall into two classes: commands to erase or |
| 726 | deleting and inserting rectangles, and commands for blank rectangles. | 726 | insert rectangles, and commands to make blank rectangles. |
| 727 | 727 | ||
| 728 | @kindex C-x r k | 728 | @kindex C-x r k |
| 729 | @kindex C-x r d | 729 | @kindex C-x r d |
| 730 | @findex kill-rectangle | 730 | @findex kill-rectangle |
| 731 | @findex delete-rectangle | 731 | @findex delete-rectangle |
| 732 | There are two ways to get rid of the text in a rectangle: you can | 732 | There are two ways to erase the text in a rectangle: @kbd{C-x r d} |
| 733 | discard the text (delete it) or save it as the ``last killed'' | 733 | (@code{delete-rectangle}) to delete the text outright, or @kbd{C-x r |
| 734 | rectangle. The commands for these two ways are @kbd{C-x r d} | 734 | k} (@code{kill-rectangle}) to remove the text and and save it as the |
| 735 | (@code{delete-rectangle}) and @kbd{C-x r k} (@code{kill-rectangle}). In | 735 | @dfn{last killed rectangle}. In both cases, erasing the |
| 736 | either case, the portion of each line that falls inside the rectangle's | 736 | region-rectangle is like erasing the specified text on each line of |
| 737 | boundaries is deleted, causing any following text on the line to | 737 | the rectange; if there is any following text on the line, it moves |
| 738 | move left into the gap. | 738 | backwards to fill the gap. |
| 739 | 739 | ||
| 740 | Note that ``killing'' a rectangle is not killing in the usual sense; the | 740 | ``Killing'' a rectangle is not killing in the usual sense; the |
| 741 | rectangle is not stored in the kill ring, but in a special place that | 741 | rectangle is not stored in the kill ring, but in a special place that |
| 742 | can only record the most recent rectangle killed. This is because yanking | 742 | only records the most recent rectangle killed. This is because |
| 743 | a rectangle is so different from yanking linear text that different yank | 743 | yanking a rectangle is so different from yanking linear text that |
| 744 | commands have to be used. It is hard to define yank-popping for rectangles, | 744 | different yank commands have to be used. Yank-popping is not defined |
| 745 | so we do not try. | 745 | for rectangles. |
| 746 | 746 | ||
| 747 | @kindex C-x r y | 747 | @kindex C-x r y |
| 748 | @findex yank-rectangle | 748 | @findex yank-rectangle |
| 749 | To yank the last killed rectangle, type @kbd{C-x r y} | 749 | To yank the last killed rectangle, type @kbd{C-x r y} |
| 750 | (@code{yank-rectangle}). Yanking a rectangle is the opposite of killing | 750 | (@code{yank-rectangle}). The rectangle's first line is inserted at |
| 751 | one. Point specifies where to put the rectangle's upper left corner. | 751 | point, the rectangle's second line is inserted at the same horizontal |
| 752 | The rectangle's first line is inserted there, the rectangle's second | 752 | position one line vertically below, and so on. The number of lines |
| 753 | line is inserted at the same horizontal position, but one line | 753 | affected is determined by the height of the saved rectangle. |
| 754 | vertically down, and so on. The number of lines affected is determined | 754 | |
| 755 | by the height of the saved rectangle. | 755 | For example, you can convert two single-column lists into a |
| 756 | 756 | double-column list by killing one of the single-column lists as a | |
| 757 | You can convert single-column lists into double-column lists using | 757 | rectangle, and then yanking it beside the other list. |
| 758 | rectangle killing and yanking; kill the second half of the list as a | ||
| 759 | rectangle and then yank it beside the first line of the list. | ||
| 760 | @xref{Two-Column}, for another way to edit multi-column text. | ||
| 761 | 758 | ||
| 762 | You can also copy rectangles into and out of registers with @kbd{C-x r | 759 | You can also copy rectangles into and out of registers with @kbd{C-x r |
| 763 | r @var{r}} and @kbd{C-x r i @var{r}}. @xref{Rectangle Registers}. | 760 | r @var{r}} and @kbd{C-x r i @var{r}}. @xref{Rectangle Registers}. |
| @@ -767,17 +764,26 @@ r @var{r}} and @kbd{C-x r i @var{r}}. @xref{Rectangle Registers}. | |||
| 767 | @kindex C-x r c | 764 | @kindex C-x r c |
| 768 | @findex clear-rectangle | 765 | @findex clear-rectangle |
| 769 | There are two commands you can use for making blank rectangles: | 766 | There are two commands you can use for making blank rectangles: |
| 770 | @kbd{C-x r c} (@code{clear-rectangle}) which blanks out existing text, | 767 | @kbd{C-x r c} (@code{clear-rectangle}) blanks out existing text in the |
| 771 | and @kbd{C-x r o} (@code{open-rectangle}) which inserts a blank | 768 | region-rectangle, and @kbd{C-x r o} (@code{open-rectangle}) inserts a |
| 772 | rectangle. Clearing a rectangle is equivalent to deleting it and then | 769 | blank rectangle. |
| 773 | inserting a blank rectangle of the same size. | ||
| 774 | 770 | ||
| 775 | @findex delete-whitespace-rectangle | 771 | @findex delete-whitespace-rectangle |
| 776 | The command @kbd{M-x delete-whitespace-rectangle} deletes horizontal | 772 | @kbd{M-x delete-whitespace-rectangle} deletes horizontal whitespace |
| 777 | whitespace starting from a particular column. This applies to each of | 773 | starting from a particular column. This applies to each of the lines |
| 778 | the lines in the rectangle, and the column is specified by the left | 774 | in the rectangle, and the column is specified by the left edge of the |
| 779 | edge of the rectangle. The right edge of the rectangle does not make | 775 | rectangle. The right edge of the rectangle does not make any |
| 780 | any difference to this command. | 776 | difference to this command. |
| 777 | |||
| 778 | @kindex C-x r N | ||
| 779 | @findex rectangle | ||
| 780 | The command @kbd{C-x r N} (@code{rectangle-number-lines}) inserts | ||
| 781 | line numbers along the left edge of the region-rectangle. Normally, | ||
| 782 | the numbering begins from 1 (for the first line of the rectangle). | ||
| 783 | With a prefix argument, the command prompts for a number to begin | ||
| 784 | from, and for a format string with which to print the numbers | ||
| 785 | (@pxref{Formatting Strings,,, elisp, The Emacs Lisp Reference | ||
| 786 | Manual}). | ||
| 781 | 787 | ||
| 782 | @kindex C-x r t | 788 | @kindex C-x r t |
| 783 | @findex string-rectangle | 789 | @findex string-rectangle |
| @@ -801,18 +807,25 @@ shifting the original text to the right. | |||
| 801 | @vindex cua-enable-cua-keys | 807 | @vindex cua-enable-cua-keys |
| 802 | The command @kbd{M-x cua-mode} sets up key bindings that are | 808 | The command @kbd{M-x cua-mode} sets up key bindings that are |
| 803 | compatible with the Common User Access (CUA) system used in many other | 809 | compatible with the Common User Access (CUA) system used in many other |
| 804 | applications. @kbd{C-x} means cut (kill), @kbd{C-c} copy, @kbd{C-v} | 810 | applications. |
| 805 | paste (yank), and @kbd{C-z} undo. Standard Emacs commands like | 811 | |
| 806 | @kbd{C-x C-c} still work, because @kbd{C-x} and @kbd{C-c} only take | 812 | When CUA mode is enabled, the keys @kbd{C-x}, @kbd{C-c}, @kbd{C-v}, |
| 807 | effect when the mark is active (and the region is highlighted). | 813 | and @kbd{C-z} invoke commands that cut (kill), copy, paste (yank), and |
| 808 | However, if you don't want to override these bindings in Emacs at all, | 814 | undo respectively. The @kbd{C-x} and @kbd{C-c} keys perform cut and |
| 809 | set @code{cua-enable-cua-keys} to @code{nil}. | 815 | copy only if the region is active. Otherwise, they still act as |
| 816 | prefix keys, so that standard Emacs commands like @kbd{C-x C-c} still | ||
| 817 | work. Note that this means the variable @code{mark-even-if-inactive} | ||
| 818 | has no effect for @kbd{C-x} and @kbd{C-c} (@pxref{Using Region}). | ||
| 810 | 819 | ||
| 811 | To enter an Emacs command like @kbd{C-x C-f} while the mark is | 820 | To enter an Emacs command like @kbd{C-x C-f} while the mark is |
| 812 | active, use one of the following methods: either hold @kbd{Shift} | 821 | active, use one of the following methods: either hold @kbd{Shift} |
| 813 | together with the prefix key, e.g. @kbd{S-C-x C-f}, or quickly type | 822 | together with the prefix key, e.g. @kbd{S-C-x C-f}, or quickly type |
| 814 | the prefix key twice, e.g. @kbd{C-x C-x C-f}. | 823 | the prefix key twice, e.g. @kbd{C-x C-x C-f}. |
| 815 | 824 | ||
| 825 | To disable the overriding of standard Emacs binding by CUA mode, | ||
| 826 | while retaining the other features of CUA mode described below, set | ||
| 827 | the variable @code{cua-enable-cua-keys} to @code{nil}. | ||
| 828 | |||
| 816 | In CUA mode, typed text replaces the active region as in | 829 | In CUA mode, typed text replaces the active region as in |
| 817 | Delete-Selection mode (@pxref{Mouse Commands}). | 830 | Delete-Selection mode (@pxref{Mouse Commands}). |
| 818 | 831 | ||
diff --git a/doc/emacs/mark.texi b/doc/emacs/mark.texi index 21d90a3fc79..0eccef41711 100644 --- a/doc/emacs/mark.texi +++ b/doc/emacs/mark.texi | |||
| @@ -16,18 +16,22 @@ The region always extends between point and the mark, no matter which | |||
| 16 | one comes earlier in the text; each time you move point, the region | 16 | one comes earlier in the text; each time you move point, the region |
| 17 | changes. | 17 | changes. |
| 18 | 18 | ||
| 19 | @cindex active region | ||
| 19 | Setting the mark at a position in the text also @dfn{activates} it. | 20 | Setting the mark at a position in the text also @dfn{activates} it. |
| 20 | When the mark is active, Emacs indicates the extent of the region by | 21 | When the mark is active, we say also that the region is active; Emacs |
| 21 | highlighting the text within it, using the @code{region} face | 22 | indicates its extent by highlighting the text within it, using the |
| 22 | (@pxref{Face Customization}). After certain non-motion commands, | 23 | @code{region} face (@pxref{Face Customization}). |
| 23 | including any command that changes the text in the buffer, Emacs | 24 | |
| 24 | automatically @dfn{deactivates} the mark; this turns off the | 25 | After certain non-motion commands, including any command that |
| 25 | highlighting. You can also explicitly deactivate the mark at any | 26 | changes the text in the buffer, Emacs automatically @dfn{deactivates} |
| 26 | time, by typing @kbd{C-g} (@pxref{Quitting}). | 27 | the mark; this turns off the highlighting. You can also explicitly |
| 27 | 28 | deactivate the mark at any time, by typing @kbd{C-g} | |
| 28 | This default behavior is known as Transient Mark mode. Disabling | 29 | (@pxref{Quitting}). |
| 29 | Transient Mark mode switches Emacs to an alternative behavior, in | 30 | |
| 30 | which the region is usually not highlighted. @xref{Disabled Transient Mark}. | 31 | The above default behavior is known as Transient Mark mode. |
| 32 | Disabling Transient Mark mode switches Emacs to an alternative | ||
| 33 | behavior, in which the region is usually not highlighted. | ||
| 34 | @xref{Disabled Transient Mark}. | ||
| 31 | 35 | ||
| 32 | @vindex highlight-nonselected-windows | 36 | @vindex highlight-nonselected-windows |
| 33 | Setting the mark in one buffer has no effect on the marks in other | 37 | Setting the mark in one buffer has no effect on the marks in other |
| @@ -141,10 +145,10 @@ can tell that a command does this when it shows @samp{Mark set} in the | |||
| 141 | echo area. | 145 | echo area. |
| 142 | 146 | ||
| 143 | @cindex primary selection | 147 | @cindex primary selection |
| 144 | Under X, every time the region changes while the mark is active, | 148 | Under X, every time the active region changes, Emacs saves the text |
| 145 | Emacs saves the text in the region to the @dfn{primary selection}. | 149 | in the region to the @dfn{primary selection}. This lets you insert |
| 146 | This lets you insert that text into other X applications with | 150 | that text into other X applications with @kbd{mouse-2} clicks. |
| 147 | @kbd{mouse-2} clicks. @xref{Primary Selection}. | 151 | @xref{Primary Selection}. |
| 148 | 152 | ||
| 149 | @node Marking Objects | 153 | @node Marking Objects |
| 150 | @section Commands to Mark Textual Objects | 154 | @section Commands to Mark Textual Objects |
| @@ -243,18 +247,30 @@ Save it in a buffer or a file (@pxref{Accumulating Text}). | |||
| 243 | @end itemize | 247 | @end itemize |
| 244 | 248 | ||
| 245 | Some commands have a default behavior when the mark is inactive, but | 249 | Some commands have a default behavior when the mark is inactive, but |
| 246 | operate on the text in the region if the mark is active. For example, | 250 | operate on the region if the mark is active. For example, @kbd{M-$} |
| 247 | @kbd{M-$} (@code{ispell-word}) normally checks the spelling of the | 251 | (@code{ispell-word}) normally checks the spelling of the word at |
| 248 | word at point, but it checks the text in the region if the region is | 252 | point, but it checks the text in the region if the mark is active |
| 249 | active (@pxref{Spelling}). Normally, such commands use their default | 253 | (@pxref{Spelling}). Normally, such commands use their default |
| 250 | behavior if the region is empty (i.e., if mark and point are at the | 254 | behavior if the region is empty (i.e., if mark and point are at the |
| 251 | same position). If you want them to operate on the empty region, | 255 | same position). If you want them to operate on the empty region, |
| 252 | change the variable @code{use-empty-active-region} to @code{t}. | 256 | change the variable @code{use-empty-active-region} to @code{t}. |
| 253 | 257 | ||
| 258 | @vindex delete-active-region | ||
| 259 | As described in @ref{Erasing}, the @key{DEL} | ||
| 260 | (@code{backward-delete-char}) and @key{delete} | ||
| 261 | (@code{delete-forward-char}) commands also act this way. If the mark | ||
| 262 | is active, they delete the text in the region. (As an exception, if | ||
| 263 | you supply a numeric argument @var{n}, where @var{n} is not one, these | ||
| 264 | commands delete @var{n} characters regardless of whether the mark is | ||
| 265 | active). If you change the variable @code{delete-active-region} to | ||
| 266 | @code{nil}, then these commands don't act differently when the mark is | ||
| 267 | active. If you change the value to @code{kill}, these commands | ||
| 268 | @dfn{kill} the region instead of deleting it (@pxref{Killing}). | ||
| 269 | |||
| 254 | @vindex mark-even-if-inactive | 270 | @vindex mark-even-if-inactive |
| 255 | Other commands always operate on the text in the region, and have no | 271 | Other commands always operate on the region, and have no default |
| 256 | default behavior. Such commands usually have the word @code{region} | 272 | behavior. Such commands usually have the word @code{region} in their |
| 257 | in their names, like @kbd{C-w} (@code{kill-region}) and @code{C-x C-u} | 273 | names, like @kbd{C-w} (@code{kill-region}) and @code{C-x C-u} |
| 258 | (@code{upcase-region}). If the mark is inactive, they operate on the | 274 | (@code{upcase-region}). If the mark is inactive, they operate on the |
| 259 | ``inactive region''---that is, on the text between point and the | 275 | ``inactive region''---that is, on the text between point and the |
| 260 | position at which the mark was last set (@pxref{Mark Ring}). To | 276 | position at which the mark was last set (@pxref{Mark Ring}). To |
diff --git a/doc/emacs/mule.texi b/doc/emacs/mule.texi index 29b6c69e38f..f676f0b96ce 100644 --- a/doc/emacs/mule.texi +++ b/doc/emacs/mule.texi | |||
| @@ -81,8 +81,8 @@ appropriate keyboard coding system (@pxref{Terminal Coding}), and Emacs | |||
| 81 | will accept those characters. Latin-1 characters can also be input by | 81 | will accept those characters. Latin-1 characters can also be input by |
| 82 | using the @kbd{C-x 8} prefix, see @ref{Unibyte Mode}. | 82 | using the @kbd{C-x 8} prefix, see @ref{Unibyte Mode}. |
| 83 | 83 | ||
| 84 | On X Window systems, your locale should be set to an appropriate value | 84 | On the X Window System, your locale should be set to an appropriate |
| 85 | to make sure Emacs interprets keyboard input correctly; see | 85 | value to make sure Emacs interprets keyboard input correctly; see |
| 86 | @ref{Language Environments, locales}. | 86 | @ref{Language Environments, locales}. |
| 87 | @end itemize | 87 | @end itemize |
| 88 | 88 | ||
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index fa5aac6e9ec..345e69e6989 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,10 @@ | |||
| 1 | 2011-10-13 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * text.texi (Yanking): Document yank-excluded-properties. | ||
| 4 | |||
| 5 | * package.texi (Packaging Basics): The commentary should say how | ||
| 6 | to begin using the package. | ||
| 7 | |||
| 1 | 2011-10-11 Martin Rudalics <rudalics@gmx.at> | 8 | 2011-10-11 Martin Rudalics <rudalics@gmx.at> |
| 2 | 9 | ||
| 3 | * windows.texi (Deleting Windows): Mention which window gets | 10 | * windows.texi (Deleting Windows): Mention which window gets |
diff --git a/doc/lispref/package.texi b/doc/lispref/package.texi index 62fbc2a9a07..5533f8ab5fa 100644 --- a/doc/lispref/package.texi +++ b/doc/lispref/package.texi | |||
| @@ -63,7 +63,8 @@ should occupy a single line, ideally in 36 characters or less. | |||
| 63 | This is shown in the buffer created by @kbd{C-h P} | 63 | This is shown in the buffer created by @kbd{C-h P} |
| 64 | (@code{describe-package}), following the package's brief description | 64 | (@code{describe-package}), following the package's brief description |
| 65 | and installation status. It normally spans multiple lines, and should | 65 | and installation status. It normally spans multiple lines, and should |
| 66 | fully describe the package and its capabilities. | 66 | fully describe the package's capabilities and how to begin using it |
| 67 | once it is installed. | ||
| 67 | 68 | ||
| 68 | @item Dependencies | 69 | @item Dependencies |
| 69 | A list of other packages (possibly including minimal acceptable | 70 | A list of other packages (possibly including minimal acceptable |
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 2348e3706dc..3a081dddc61 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -907,10 +907,11 @@ text that they copy into the buffer. | |||
| 907 | 907 | ||
| 908 | @defun insert-for-yank string | 908 | @defun insert-for-yank string |
| 909 | This function normally works like @code{insert} except that it doesn't | 909 | This function normally works like @code{insert} except that it doesn't |
| 910 | insert the text properties in the @code{yank-excluded-properties} | 910 | insert the text properties (@pxref{Text Properties}) in the list |
| 911 | list. However, if any part of @var{string} has a non-@code{nil} | 911 | variable @code{yank-excluded-properties}. However, if any part of |
| 912 | @code{yank-handler} text property, that property can do various | 912 | @var{string} has a non-@code{nil} @code{yank-handler} text property, |
| 913 | special processing on that part of the text being inserted. | 913 | that property can do various special processing on that part of the |
| 914 | text being inserted. | ||
| 914 | @end defun | 915 | @end defun |
| 915 | 916 | ||
| 916 | @defun insert-buffer-substring-as-yank buf &optional start end | 917 | @defun insert-buffer-substring-as-yank buf &optional start end |
| @@ -958,6 +959,15 @@ region. @var{function} can set @code{yank-undo-function} to override | |||
| 958 | the @var{undo} value. | 959 | the @var{undo} value. |
| 959 | @end table | 960 | @end table |
| 960 | 961 | ||
| 962 | @cindex yanking and text properties | ||
| 963 | @defopt yank-excluded-properties | ||
| 964 | Yanking discards certain text properties from the yanked text, as | ||
| 965 | described above. The value of this variable is the list of properties | ||
| 966 | to discard. Its default value contains properties that might lead to | ||
| 967 | annoying results, such as causing the text to respond to the mouse or | ||
| 968 | specifying key bindings. | ||
| 969 | @end defopt | ||
| 970 | |||
| 961 | @node Yank Commands | 971 | @node Yank Commands |
| 962 | @comment node-name, next, previous, up | 972 | @comment node-name, next, previous, up |
| 963 | @subsection Functions for Yanking | 973 | @subsection Functions for Yanking |
| @@ -459,16 +459,16 @@ bound to M-=, which shows the number of lines, words, and characters. | |||
| 459 | also deletes newlines around point. | 459 | also deletes newlines around point. |
| 460 | 460 | ||
| 461 | ** Deletion changes | 461 | ** Deletion changes |
| 462 | 462 | +++ | |
| 463 | *** New option `delete-active-region'. | 463 | *** New option `delete-active-region'. |
| 464 | If non-nil, [delete] and DEL delete the region if it is active and no | 464 | If non-nil, [delete] and DEL delete the region if it is active and no |
| 465 | prefix argument is given. If set to `kill', these commands kill | 465 | prefix argument is given. If set to `kill', these commands kill |
| 466 | instead. | 466 | instead. |
| 467 | 467 | +++ | |
| 468 | *** New command `delete-forward-char', bound to [delete]. | 468 | *** New command `delete-forward-char', bound to [delete]. |
| 469 | This is meant for interactive use, and obeys `delete-active-region'. | 469 | This is meant for interactive use, and obeys `delete-active-region'. |
| 470 | The command `delete-char' does not obey `delete-active-region'. | 470 | The command `delete-char' does not obey `delete-active-region'. |
| 471 | 471 | --- | |
| 472 | *** `delete-backward-char' is now a Lisp function. | 472 | *** `delete-backward-char' is now a Lisp function. |
| 473 | Apart from obeying `delete-active-region', its behavior is unchanged. | 473 | Apart from obeying `delete-active-region', its behavior is unchanged. |
| 474 | However, the byte compiler now warns if it is called from Lisp; you | 474 | However, the byte compiler now warns if it is called from Lisp; you |
| @@ -537,6 +537,7 @@ between applications. | |||
| 537 | *** X clipboard managers are now supported. | 537 | *** X clipboard managers are now supported. |
| 538 | To inhibit this, change `x-select-enable-clipboard-manager' to nil. | 538 | To inhibit this, change `x-select-enable-clipboard-manager' to nil. |
| 539 | 539 | ||
| 540 | +++ | ||
| 540 | ** New command `rectangle-number-lines', bound to `C-x r N', numbers | 541 | ** New command `rectangle-number-lines', bound to `C-x r N', numbers |
| 541 | the lines in the current rectangle. With a prefix argument, this | 542 | the lines in the current rectangle. With a prefix argument, this |
| 542 | prompts for a number to count from and for a format string. | 543 | prompts for a number to count from and for a format string. |
| @@ -947,6 +948,7 @@ variable `menu-bar-mode'/`tool-bar-mode' to determine whether to create | |||
| 947 | a menu-bar or tool-bar, respectively. If the alist entries are added, | 948 | a menu-bar or tool-bar, respectively. If the alist entries are added, |
| 948 | they override the value of `menu-bar-mode'/`tool-bar-mode'. | 949 | they override the value of `menu-bar-mode'/`tool-bar-mode'. |
| 949 | 950 | ||
| 951 | +++ | ||
| 950 | ** Regions created by mouse dragging are now normal active regions, | 952 | ** Regions created by mouse dragging are now normal active regions, |
| 951 | similar to the ones created by shift-selection. In previous Emacs | 953 | similar to the ones created by shift-selection. In previous Emacs |
| 952 | versions, these regions were delineated by `mouse-drag-overlay', which | 954 | versions, these regions were delineated by `mouse-drag-overlay', which |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 10570c2a878..68a85a43387 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2011-10-13 Agustín Martín Domingo <agustin.martin@hispalinux.es> | ||
| 2 | |||
| 3 | * textmodes/flyspell.el (flyspell-large-region): Make sure | ||
| 4 | extended character mode is used if defined (Bug#1339). | ||
| 5 | |||
| 1 | 2011-10-13 Eli Zaretskii <eliz@gnu.org> | 6 | 2011-10-13 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | * simple.el (what-cursor-position): Fix the display of the | 8 | * simple.el (what-cursor-position): Fix the display of the |
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el index c2af3f7be84..d496298768d 100644 --- a/lisp/textmodes/flyspell.el +++ b/lisp/textmodes/flyspell.el | |||
| @@ -1559,6 +1559,14 @@ The buffer to mark them in is `flyspell-large-region-buffer'." | |||
| 1559 | (list "-p" | 1559 | (list "-p" |
| 1560 | (expand-file-name | 1560 | (expand-file-name |
| 1561 | ispell-current-personal-dictionary))))) | 1561 | ispell-current-personal-dictionary))))) |
| 1562 | |||
| 1563 | ;; Check for extended character mode | ||
| 1564 | (let ((extended-char-mode (ispell-get-extended-character-mode))) | ||
| 1565 | (and extended-char-mode ; ~ extended character mode | ||
| 1566 | (string-match "[^~]+$" extended-char-mode) | ||
| 1567 | (add-to-list 'args (concat "-T" (match-string 0 extended-char-mode))))) | ||
| 1568 | |||
| 1569 | ;; Add ispell-extra-args | ||
| 1562 | (setq args (append args ispell-extra-args)) | 1570 | (setq args (append args ispell-extra-args)) |
| 1563 | 1571 | ||
| 1564 | ;; If we are using recent aspell or hunspell, make sure we use the right encoding | 1572 | ;; If we are using recent aspell or hunspell, make sure we use the right encoding |