Commit 50b063c3 authored by Chong Yidong's avatar Chong Yidong
Browse files

Update Killing chapter in Emacs manual. Other misc manual tweaks.

* doc/emacs/killing.texi (Deletion): Add xref to Using Region.
(Yanking): Move yank-excluded-properties to Lisp manual.  Move C-y
description here.  Recommend C-u C-SPC for jumping to mark.
(Kill Ring): Move kill ring variable documentation here.
(Primary Selection): Copyedits.
(Rectangles): Document new command rectangle-number-lines.
(CUA Bindings): Note that this disables the mark-even-if-inactive
behavior for C-x and C-c.

* doc/emacs/mark.texi (Mark): Mention "active region" terminology.
(Using Region): Document delete-active-region.

* doc/lispref/text.texi (Yanking): Document yank-excluded-properties.

* doc/lispref/package.texi (Packaging Basics): The commentary should say how
to begin using the package.
parent 81d40c92
2011-10-13 Chong Yidong <cyd@stupidchicken.com>
* killing.texi (Deletion): Add xref to Using Region. Document
delete-forward-char.
(Yanking): Move yank-excluded-properties to Lisp manual. Move C-y
description here. Recommend C-u C-SPC for jumping to mark.
(Kill Ring): Move kill ring variable documentation here.
(Primary Selection): Copyedits.
(Rectangles): Document new command rectangle-number-lines.
(CUA Bindings): Note that this disables the mark-even-if-inactive
behavior for C-x and C-c.
* mark.texi (Mark): Mention "active region" terminology.
(Using Region): Document delete-active-region.
2011-10-12 Chong Yidong <cyd@stupidchicken.com> 2011-10-12 Chong Yidong <cyd@stupidchicken.com>
* mark.texi (Mark): Clarify description of disabled Transient Mark * mark.texi (Mark): Clarify description of disabled Transient Mark
......
...@@ -1403,7 +1403,7 @@ directory than in this one. It also marks files with no counterpart, ...@@ -1403,7 +1403,7 @@ directory than in this one. It also marks files with no counterpart,
in both directories, as always. in both directories, as always.
@cindex drag and drop, Dired @cindex drag and drop, Dired
On the X window system, Emacs supports the ``drag and drop'' On the X Window System, Emacs supports the ``drag and drop''
protocol. You can drag a file object from another program, and drop protocol. You can drag a file object from another program, and drop
it onto a Dired buffer; this either moves, copies, or creates a link it onto a Dired buffer; this either moves, copies, or creates a link
to the file in that directory. Precisely which action is taken is to the file in that directory. Precisely which action is taken is
......
...@@ -319,9 +319,9 @@ Killing and Moving Text ...@@ -319,9 +319,9 @@ Killing and Moving Text
Yanking Yanking
* Kill Ring:: Where killed text is stored. Basic yanking. * Kill Ring:: Where killed text is stored.
* Appending Kills:: Several kills in a row all yank together.
* Earlier Kills:: Yanking something killed some time ago. * Earlier Kills:: Yanking something killed some time ago.
* Appending Kills:: Several kills in a row all yank together.
Killing and Yanking on Graphical Displays Killing and Yanking on Graphical Displays
......
...@@ -93,7 +93,7 @@ clicked. ...@@ -93,7 +93,7 @@ clicked.
Normally, Emacs does not distinguish between ordinary mouse clicks Normally, Emacs does not distinguish between ordinary mouse clicks
and clicks that select a frame. When you click on a frame to select and clicks that select a frame. When you click on a frame to select
it, that also changes the selected window and cursor position it, that also changes the selected window and cursor position
according to the mouse click position. On the X window system, you according to the mouse click position. On the X Window System, you
can change this behavior by setting the variable can change this behavior by setting the variable
@code{x-mouse-click-focus-ignore-position} to @code{t}. Then the @code{x-mouse-click-focus-ignore-position} to @code{t}. Then the
first click selects the frame, but does not affect the selected window 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,7 +961,7 @@ the left of each Emacs window, running the height of the
window.@footnote{Placing it at the left is usually more useful with window.@footnote{Placing it at the left is usually more useful with
overlapping frames with text starting at the left margin.} overlapping frames with text starting at the left margin.}
When Emacs is compiled with GTK+ support on the X window system, or When Emacs is compiled with GTK+ support on the X Window System, or
in operating systems such as Microsoft Windows or Mac OS, you can use in operating systems such as Microsoft Windows or Mac OS, you can use
the scroll bar as you do in other graphical applications. If you the scroll bar as you do in other graphical applications. If you
click @kbd{Mouse-1} on the scroll bar's up and down buttons, that 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,7 +971,7 @@ the entire height of the window, like @kbd{M-v} and @kbd{C-v}
respectively (@pxref{Moving Point}). Dragging the inner box with respectively (@pxref{Moving Point}). Dragging the inner box with
@kbd{Mouse-1} scrolls the window continuously. @kbd{Mouse-1} scrolls the window continuously.
If Emacs is compiled without GTK+ support on the X window system, If Emacs is compiled without GTK+ support on the X Window System,
the scroll bar behaves differently. The scroll bar's inner box is the scroll bar behaves differently. The scroll bar's inner box is
drawn to represent the portion of the buffer currently displayed, with drawn to represent the portion of the buffer currently displayed, with
the entire height of the scroll bar representing the entire length of the entire height of the scroll bar representing the entire length of
......
This diff is collapsed.
...@@ -16,18 +16,22 @@ The region always extends between point and the mark, no matter which ...@@ -16,18 +16,22 @@ The region always extends between point and the mark, no matter which
one comes earlier in the text; each time you move point, the region one comes earlier in the text; each time you move point, the region
changes. changes.
@cindex active region
Setting the mark at a position in the text also @dfn{activates} it. Setting the mark at a position in the text also @dfn{activates} it.
When the mark is active, Emacs indicates the extent of the region by When the mark is active, we say also that the region is active; Emacs
highlighting the text within it, using the @code{region} face indicates its extent by highlighting the text within it, using the
(@pxref{Face Customization}). After certain non-motion commands, @code{region} face (@pxref{Face Customization}).
including any command that changes the text in the buffer, Emacs
automatically @dfn{deactivates} the mark; this turns off the After certain non-motion commands, including any command that
highlighting. You can also explicitly deactivate the mark at any changes the text in the buffer, Emacs automatically @dfn{deactivates}
time, by typing @kbd{C-g} (@pxref{Quitting}). the mark; this turns off the highlighting. You can also explicitly
deactivate the mark at any time, by typing @kbd{C-g}
This default behavior is known as Transient Mark mode. Disabling (@pxref{Quitting}).
Transient Mark mode switches Emacs to an alternative behavior, in
which the region is usually not highlighted. @xref{Disabled Transient Mark}. The above default behavior is known as Transient Mark mode.
Disabling Transient Mark mode switches Emacs to an alternative
behavior, in which the region is usually not highlighted.
@xref{Disabled Transient Mark}.
@vindex highlight-nonselected-windows @vindex highlight-nonselected-windows
Setting the mark in one buffer has no effect on the marks in other 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,10 +145,10 @@ can tell that a command does this when it shows @samp{Mark set} in the
echo area. echo area.
@cindex primary selection @cindex primary selection
Under X, every time the region changes while the mark is active, Under X, every time the active region changes, Emacs saves the text
Emacs saves the text in the region to the @dfn{primary selection}. in the region to the @dfn{primary selection}. This lets you insert
This lets you insert that text into other X applications with that text into other X applications with @kbd{mouse-2} clicks.
@kbd{mouse-2} clicks. @xref{Primary Selection}. @xref{Primary Selection}.
@node Marking Objects @node Marking Objects
@section Commands to Mark Textual Objects @section Commands to Mark Textual Objects
...@@ -243,18 +247,30 @@ Save it in a buffer or a file (@pxref{Accumulating Text}). ...@@ -243,18 +247,30 @@ Save it in a buffer or a file (@pxref{Accumulating Text}).
@end itemize @end itemize
Some commands have a default behavior when the mark is inactive, but Some commands have a default behavior when the mark is inactive, but
operate on the text in the region if the mark is active. For example, operate on the region if the mark is active. For example, @kbd{M-$}
@kbd{M-$} (@code{ispell-word}) normally checks the spelling of the (@code{ispell-word}) normally checks the spelling of the word at
word at point, but it checks the text in the region if the region is point, but it checks the text in the region if the mark is active
active (@pxref{Spelling}). Normally, such commands use their default (@pxref{Spelling}). Normally, such commands use their default
behavior if the region is empty (i.e., if mark and point are at the behavior if the region is empty (i.e., if mark and point are at the
same position). If you want them to operate on the empty region, same position). If you want them to operate on the empty region,
change the variable @code{use-empty-active-region} to @code{t}. change the variable @code{use-empty-active-region} to @code{t}.
@vindex delete-active-region
As described in @ref{Erasing}, the @key{DEL}
(@code{backward-delete-char}) and @key{delete}
(@code{delete-forward-char}) commands also act this way. If the mark
is active, they delete the text in the region. (As an exception, if
you supply a numeric argument @var{n}, where @var{n} is not one, these
commands delete @var{n} characters regardless of whether the mark is
active). If you change the variable @code{delete-active-region} to
@code{nil}, then these commands don't act differently when the mark is
active. If you change the value to @code{kill}, these commands
@dfn{kill} the region instead of deleting it (@pxref{Killing}).
@vindex mark-even-if-inactive @vindex mark-even-if-inactive
Other commands always operate on the text in the region, and have no Other commands always operate on the region, and have no default
default behavior. Such commands usually have the word @code{region} behavior. Such commands usually have the word @code{region} in their
in their names, like @kbd{C-w} (@code{kill-region}) and @code{C-x C-u} names, like @kbd{C-w} (@code{kill-region}) and @code{C-x C-u}
(@code{upcase-region}). If the mark is inactive, they operate on the (@code{upcase-region}). If the mark is inactive, they operate on the
``inactive region''---that is, on the text between point and the ``inactive region''---that is, on the text between point and the
position at which the mark was last set (@pxref{Mark Ring}). To position at which the mark was last set (@pxref{Mark Ring}). To
......
...@@ -81,8 +81,8 @@ appropriate keyboard coding system (@pxref{Terminal Coding}), and Emacs ...@@ -81,8 +81,8 @@ appropriate keyboard coding system (@pxref{Terminal Coding}), and Emacs
will accept those characters. Latin-1 characters can also be input by will accept those characters. Latin-1 characters can also be input by
using the @kbd{C-x 8} prefix, see @ref{Unibyte Mode}. using the @kbd{C-x 8} prefix, see @ref{Unibyte Mode}.
On X Window systems, your locale should be set to an appropriate value On the X Window System, your locale should be set to an appropriate
to make sure Emacs interprets keyboard input correctly; see value to make sure Emacs interprets keyboard input correctly; see
@ref{Language Environments, locales}. @ref{Language Environments, locales}.
@end itemize @end itemize
......
2011-10-13 Chong Yidong <cyd@stupidchicken.com>
* text.texi (Yanking): Document yank-excluded-properties.
* package.texi (Packaging Basics): The commentary should say how
to begin using the package.
2011-10-11 Martin Rudalics <rudalics@gmx.at> 2011-10-11 Martin Rudalics <rudalics@gmx.at>
* windows.texi (Deleting Windows): Mention which window gets * windows.texi (Deleting Windows): Mention which window gets
......
...@@ -63,7 +63,8 @@ should occupy a single line, ideally in 36 characters or less. ...@@ -63,7 +63,8 @@ should occupy a single line, ideally in 36 characters or less.
This is shown in the buffer created by @kbd{C-h P} This is shown in the buffer created by @kbd{C-h P}
(@code{describe-package}), following the package's brief description (@code{describe-package}), following the package's brief description
and installation status. It normally spans multiple lines, and should and installation status. It normally spans multiple lines, and should
fully describe the package and its capabilities. fully describe the package's capabilities and how to begin using it
once it is installed.
@item Dependencies @item Dependencies
A list of other packages (possibly including minimal acceptable A list of other packages (possibly including minimal acceptable
......
...@@ -907,10 +907,11 @@ text that they copy into the buffer. ...@@ -907,10 +907,11 @@ text that they copy into the buffer.
@defun insert-for-yank string @defun insert-for-yank string
This function normally works like @code{insert} except that it doesn't This function normally works like @code{insert} except that it doesn't
insert the text properties in the @code{yank-excluded-properties} insert the text properties (@pxref{Text Properties}) in the list
list. However, if any part of @var{string} has a non-@code{nil} variable @code{yank-excluded-properties}. However, if any part of
@code{yank-handler} text property, that property can do various @var{string} has a non-@code{nil} @code{yank-handler} text property,
special processing on that part of the text being inserted. that property can do various special processing on that part of the
text being inserted.
@end defun @end defun
@defun insert-buffer-substring-as-yank buf &optional start end @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,6 +959,15 @@ region. @var{function} can set @code{yank-undo-function} to override
the @var{undo} value. the @var{undo} value.
@end table @end table
@cindex yanking and text properties
@defopt yank-excluded-properties
Yanking discards certain text properties from the yanked text, as
described above. The value of this variable is the list of properties
to discard. Its default value contains properties that might lead to
annoying results, such as causing the text to respond to the mouse or
specifying key bindings.
@end defopt
@node Yank Commands @node Yank Commands
@comment node-name, next, previous, up @comment node-name, next, previous, up
@subsection Functions for Yanking @subsection Functions for Yanking
......
...@@ -459,16 +459,16 @@ bound to M-=, which shows the number of lines, words, and characters. ...@@ -459,16 +459,16 @@ bound to M-=, which shows the number of lines, words, and characters.
also deletes newlines around point. also deletes newlines around point.
** Deletion changes ** Deletion changes
+++
*** New option `delete-active-region'. *** New option `delete-active-region'.
If non-nil, [delete] and DEL delete the region if it is active and no If non-nil, [delete] and DEL delete the region if it is active and no
prefix argument is given. If set to `kill', these commands kill prefix argument is given. If set to `kill', these commands kill
instead. instead.
+++
*** New command `delete-forward-char', bound to [delete]. *** New command `delete-forward-char', bound to [delete].
This is meant for interactive use, and obeys `delete-active-region'. This is meant for interactive use, and obeys `delete-active-region'.
The command `delete-char' does not obey `delete-active-region'. The command `delete-char' does not obey `delete-active-region'.
---
*** `delete-backward-char' is now a Lisp function. *** `delete-backward-char' is now a Lisp function.
Apart from obeying `delete-active-region', its behavior is unchanged. Apart from obeying `delete-active-region', its behavior is unchanged.
However, the byte compiler now warns if it is called from Lisp; you However, the byte compiler now warns if it is called from Lisp; you
...@@ -537,6 +537,7 @@ between applications. ...@@ -537,6 +537,7 @@ between applications.
*** X clipboard managers are now supported. *** X clipboard managers are now supported.
To inhibit this, change `x-select-enable-clipboard-manager' to nil. To inhibit this, change `x-select-enable-clipboard-manager' to nil.
+++
** New command `rectangle-number-lines', bound to `C-x r N', numbers ** New command `rectangle-number-lines', bound to `C-x r N', numbers
the lines in the current rectangle. With a prefix argument, this the lines in the current rectangle. With a prefix argument, this
prompts for a number to count from and for a format string. 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,6 +948,7 @@ variable `menu-bar-mode'/`tool-bar-mode' to determine whether to create
a menu-bar or tool-bar, respectively. If the alist entries are added, a menu-bar or tool-bar, respectively. If the alist entries are added,
they override the value of `menu-bar-mode'/`tool-bar-mode'. they override the value of `menu-bar-mode'/`tool-bar-mode'.
+++
** Regions created by mouse dragging are now normal active regions, ** Regions created by mouse dragging are now normal active regions,
similar to the ones created by shift-selection. In previous Emacs similar to the ones created by shift-selection. In previous Emacs
versions, these regions were delineated by `mouse-drag-overlay', which versions, these regions were delineated by `mouse-drag-overlay', which
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment