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>
* 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,
in both directories, as always.
@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
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
......
......@@ -319,9 +319,9 @@ Killing and Moving Text
Yanking
* Kill Ring:: Where killed text is stored. Basic yanking.
* Appending Kills:: Several kills in a row all yank together.
* Kill Ring:: Where killed text is stored.
* Earlier Kills:: Yanking something killed some time ago.
* Appending Kills:: Several kills in a row all yank together.
Killing and Yanking on Graphical Displays
......
......@@ -93,7 +93,7 @@ clicked.
Normally, Emacs does not distinguish between ordinary mouse clicks
and clicks that select a frame. When you click on a frame to select
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
@code{x-mouse-click-focus-ignore-position} to @code{t}. Then the
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
window.@footnote{Placing it at the left is usually more useful with
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
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
......@@ -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
@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
drawn to represent the portion of the buffer currently displayed, with
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
one comes earlier in the text; each time you move point, the region
changes.
@cindex active region
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
highlighting the text within it, using the @code{region} face
(@pxref{Face Customization}). After certain non-motion commands,
including any command that changes the text in the buffer, Emacs
automatically @dfn{deactivates} the mark; this turns off the
highlighting. You can also explicitly deactivate the mark at any
time, by typing @kbd{C-g} (@pxref{Quitting}).
This 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}.
When the mark is active, we say also that the region is active; Emacs
indicates its extent by highlighting the text within it, using the
@code{region} face (@pxref{Face Customization}).
After certain non-motion commands, including any command that
changes the text in the buffer, Emacs automatically @dfn{deactivates}
the mark; this turns off the highlighting. You can also explicitly
deactivate the mark at any time, by typing @kbd{C-g}
(@pxref{Quitting}).
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
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
echo area.
@cindex primary selection
Under X, every time the region changes while the mark is active,
Emacs saves the text in the region to the @dfn{primary selection}.
This lets you insert that text into other X applications with
@kbd{mouse-2} clicks. @xref{Primary Selection}.
Under X, every time the active region changes, Emacs saves the text
in the region to the @dfn{primary selection}. This lets you insert
that text into other X applications with @kbd{mouse-2} clicks.
@xref{Primary Selection}.
@node Marking Objects
@section Commands to Mark Textual Objects
......@@ -243,18 +247,30 @@ Save it in a buffer or a file (@pxref{Accumulating Text}).
@end itemize
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,
@kbd{M-$} (@code{ispell-word}) normally checks the spelling of the
word at point, but it checks the text in the region if the region is
active (@pxref{Spelling}). Normally, such commands use their default
operate on the region if the mark is active. For example, @kbd{M-$}
(@code{ispell-word}) normally checks the spelling of the word at
point, but it checks the text in the region if the mark is active
(@pxref{Spelling}). Normally, such commands use their default
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,
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
Other commands always operate on the text in the region, and have no
default behavior. Such commands usually have the word @code{region}
in their names, like @kbd{C-w} (@code{kill-region}) and @code{C-x C-u}
Other commands always operate on the region, and have no default
behavior. Such commands usually have the word @code{region} in their
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
``inactive region''---that is, on the text between point and the
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
will accept those characters. Latin-1 characters can also be input by
using the @kbd{C-x 8} prefix, see @ref{Unibyte Mode}.
On X Window systems, your locale should be set to an appropriate value
to make sure Emacs interprets keyboard input correctly; see
On the X Window System, your locale should be set to an appropriate
value to make sure Emacs interprets keyboard input correctly; see
@ref{Language Environments, locales}.
@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>
* windows.texi (Deleting Windows): Mention which window gets
......
......@@ -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}
(@code{describe-package}), following the package's brief description
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
A list of other packages (possibly including minimal acceptable
......
......@@ -907,10 +907,11 @@ text that they copy into the buffer.
@defun insert-for-yank string
This function normally works like @code{insert} except that it doesn't
insert the text properties in the @code{yank-excluded-properties}
list. However, if any part of @var{string} has a non-@code{nil}
@code{yank-handler} text property, that property can do various
special processing on that part of the text being inserted.
insert the text properties (@pxref{Text Properties}) in the list
variable @code{yank-excluded-properties}. However, if any part of
@var{string} has a non-@code{nil} @code{yank-handler} text property,
that property can do various special processing on that part of the
text being inserted.
@end defun
@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
the @var{undo} value.
@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
@comment node-name, next, previous, up
@subsection Functions for Yanking
......
......@@ -459,16 +459,16 @@ bound to M-=, which shows the number of lines, words, and characters.
also deletes newlines around point.
** Deletion changes
+++
*** New option `delete-active-region'.
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
instead.
+++
*** New command `delete-forward-char', bound to [delete].
This is meant for interactive use, and obeys `delete-active-region'.
The command `delete-char' does not obey `delete-active-region'.
---
*** `delete-backward-char' is now a Lisp function.
Apart from obeying `delete-active-region', its behavior is unchanged.
However, the byte compiler now warns if it is called from Lisp; you
......@@ -537,6 +537,7 @@ between applications.
*** X clipboard managers are now supported.
To inhibit this, change `x-select-enable-clipboard-manager' to nil.
+++
** New command `rectangle-number-lines', bound to `C-x r N', numbers
the lines in the current rectangle. With a prefix argument, this
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
a menu-bar or tool-bar, respectively. If the alist entries are added,
they override the value of `menu-bar-mode'/`tool-bar-mode'.
+++
** Regions created by mouse dragging are now normal active regions,
similar to the ones created by shift-selection. In previous Emacs
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