mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-19 10:22:27 +00:00
Minor updates to Markers and Text chapters of Lisp manual.
* doc/lispref/markers.texi (The Mark): Fix typo. (The Region): Copyedits. * doc/lispref/text.texi (Buffer Contents): Don't duplicate explanation of region arguments from Text node. Put doc of obsolete var buffer-substring-filters back, since it is referred to. (Low-Level Kill Ring): Yank now uses clipboard instead of primary selection by default.
This commit is contained in:
parent
2ad809416d
commit
67cd45a2b4
@ -1,3 +1,14 @@
|
|||||||
|
2012-03-07 Chong Yidong <cyd@gnu.org>
|
||||||
|
|
||||||
|
* text.texi (Buffer Contents): Don't duplicate explanation of
|
||||||
|
region arguments from Text node. Put doc of obsolete var
|
||||||
|
buffer-substring-filters back, since it is referred to.
|
||||||
|
(Low-Level Kill Ring): Yank now uses clipboard instead of primary
|
||||||
|
selection by default.
|
||||||
|
|
||||||
|
* markers.texi (The Mark): Fix typo.
|
||||||
|
(The Region): Copyedits.
|
||||||
|
|
||||||
2012-03-07 Glenn Morris <rgm@gnu.org>
|
2012-03-07 Glenn Morris <rgm@gnu.org>
|
||||||
|
|
||||||
* markers.texi (Overview of Markers): Copyedits.
|
* markers.texi (Overview of Markers): Copyedits.
|
||||||
|
@ -422,11 +422,11 @@ can request deactivation of the mark upon return to the editor command
|
|||||||
loop by setting the variable @code{deactivate-mark} to a
|
loop by setting the variable @code{deactivate-mark} to a
|
||||||
non-@code{nil} value.
|
non-@code{nil} value.
|
||||||
|
|
||||||
If Transient Mode is enabled, certain editing commands that normally
|
If Transient Mark mode is enabled, certain editing commands that
|
||||||
apply to text near point, apply instead to the region when the mark is
|
normally apply to text near point, apply instead to the region when
|
||||||
active. This is the main motivation for using Transient Mark mode.
|
the mark is active. This is the main motivation for using Transient
|
||||||
(Another is that this enables highlighting of the region when the mark
|
Mark mode. (Another is that this enables highlighting of the region
|
||||||
is active. @xref{Display}.)
|
when the mark is active. @xref{Display}.)
|
||||||
|
|
||||||
In addition to the mark, each buffer has a @dfn{mark ring} which is a
|
In addition to the mark, each buffer has a @dfn{mark ring} which is a
|
||||||
list of markers containing previous values of the mark. When editing
|
list of markers containing previous values of the mark. When editing
|
||||||
@ -662,16 +662,15 @@ integer). This is the position of either point or the mark, whichever is
|
|||||||
larger.
|
larger.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
Few programs need to use the @code{region-beginning} and
|
Instead of using @code{region-beginning} and @code{region-end}, a
|
||||||
@code{region-end} functions. A command designed to operate on a region
|
command designed to operate on a region should normally use
|
||||||
should normally use @code{interactive} with the @samp{r} specification
|
@code{interactive} with the @samp{r} specification to find the
|
||||||
to find the beginning and end of the region. This lets other Lisp
|
beginning and end of the region. This lets other Lisp programs
|
||||||
programs specify the bounds explicitly as arguments. (@xref{Interactive
|
specify the bounds explicitly as arguments. @xref{Interactive Codes}.
|
||||||
Codes}.)
|
|
||||||
|
|
||||||
@defun use-region-p
|
@defun use-region-p
|
||||||
This function returns @code{t} if Transient Mark mode is enabled, the
|
This function returns @code{t} if Transient Mark mode is enabled, the
|
||||||
mark is active, and there's a valid region in the buffer. Commands
|
mark is active, and there is a valid region in the buffer. This
|
||||||
that operate on the region (instead of on text near point) when
|
function is intended to be used by commands that operate on the
|
||||||
there's an active mark should use this to test whether to do that.
|
region, instead of on text near point, when the mark is active.
|
||||||
@end defun
|
@end defun
|
||||||
|
@ -169,13 +169,9 @@ convert any portion of the text in the buffer into a string.
|
|||||||
@defun buffer-substring start end
|
@defun buffer-substring start end
|
||||||
This function returns a string containing a copy of the text of the
|
This function returns a string containing a copy of the text of the
|
||||||
region defined by positions @var{start} and @var{end} in the current
|
region defined by positions @var{start} and @var{end} in the current
|
||||||
buffer. If the arguments are not positions in the accessible portion of
|
buffer. If the arguments are not positions in the accessible portion
|
||||||
the buffer, @code{buffer-substring} signals an @code{args-out-of-range}
|
of the buffer, @code{buffer-substring} signals an
|
||||||
error.
|
@code{args-out-of-range} error.
|
||||||
|
|
||||||
It is not necessary for @var{start} to be less than @var{end}; the
|
|
||||||
arguments can be given in either order. But most often the smaller
|
|
||||||
argument is written first.
|
|
||||||
|
|
||||||
Here's an example which assumes Font-Lock mode is not enabled:
|
Here's an example which assumes Font-Lock mode is not enabled:
|
||||||
|
|
||||||
@ -218,14 +214,20 @@ This is like @code{buffer-substring}, except that it does not copy text
|
|||||||
properties, just the characters themselves. @xref{Text Properties}.
|
properties, just the characters themselves. @xref{Text Properties}.
|
||||||
@end defun
|
@end defun
|
||||||
|
|
||||||
|
@defun buffer-string
|
||||||
|
This function returns the contents of the entire accessible portion of
|
||||||
|
the current buffer as a string. It is equivalent to
|
||||||
|
@w{@code{(buffer-substring (point-min) (point-max))}}.
|
||||||
|
@end defun
|
||||||
|
|
||||||
@defun filter-buffer-substring start end &optional delete
|
@defun filter-buffer-substring start end &optional delete
|
||||||
This function passes the buffer text between @var{start} and @var{end}
|
This function passes the buffer text between @var{start} and @var{end}
|
||||||
through the filter functions specified by the wrapper hook
|
through the filter functions specified by the wrapper hook
|
||||||
@code{filter-buffer-substring-functions}, and returns the final
|
@code{filter-buffer-substring-functions}, and returns the result. The
|
||||||
result of applying all filters. The obsolete variable
|
obsolete variable @code{buffer-substring-filters} is also consulted.
|
||||||
@code{buffer-substring-filters} is also consulted. If both of these
|
If both of these variables are @code{nil}, the value is the unaltered
|
||||||
variables are @code{nil}, the value is the unaltered text from the
|
text from the buffer, i.e.@: what @code{buffer-substring} would
|
||||||
buffer, as @code{buffer-substring} would return.
|
return.
|
||||||
|
|
||||||
If @var{delete} is non-@code{nil}, this function deletes the text
|
If @var{delete} is non-@code{nil}, this function deletes the text
|
||||||
between @var{start} and @var{end} after copying it, like
|
between @var{start} and @var{end} after copying it, like
|
||||||
@ -260,30 +262,20 @@ this, and so on. The actual return value is the result of all the
|
|||||||
hook functions acting in sequence.
|
hook functions acting in sequence.
|
||||||
@end defvar
|
@end defvar
|
||||||
|
|
||||||
@defun buffer-string
|
@defvar buffer-substring-filters
|
||||||
This function returns the contents of the entire accessible portion of
|
This variable is obsoleted by
|
||||||
the current buffer as a string. It is equivalent to
|
@code{filter-buffer-substring-functions}, but is still supported for
|
||||||
|
backward compatibility. Its value should should be a list of
|
||||||
@example
|
functions which accept a single string argument and return another
|
||||||
(buffer-substring (point-min) (point-max))
|
string. @code{filter-buffer-substring} passes the buffer substring to
|
||||||
@end example
|
the first function in this list, and the return value of each function
|
||||||
|
is passed to the next function. The return value of the last function
|
||||||
@example
|
is passed to @code{filter-buffer-substring-functions}.
|
||||||
@group
|
@end defvar
|
||||||
---------- Buffer: foo ----------
|
|
||||||
This is the contents of buffer foo
|
|
||||||
|
|
||||||
---------- Buffer: foo ----------
|
|
||||||
|
|
||||||
(buffer-string)
|
|
||||||
@result{} "This is the contents of buffer foo\n"
|
|
||||||
@end group
|
|
||||||
@end example
|
|
||||||
@end defun
|
|
||||||
|
|
||||||
@defun current-word &optional strict really-word
|
@defun current-word &optional strict really-word
|
||||||
This function returns the symbol (or word) at or near point, as a string.
|
This function returns the symbol (or word) at or near point, as a
|
||||||
The return value includes no text properties.
|
string. The return value includes no text properties.
|
||||||
|
|
||||||
If the optional argument @var{really-word} is non-@code{nil}, it finds a
|
If the optional argument @var{really-word} is non-@code{nil}, it finds a
|
||||||
word; otherwise, it finds a symbol (which includes both word
|
word; otherwise, it finds a symbol (which includes both word
|
||||||
@ -1112,13 +1104,11 @@ case, the first string is used as the ``most recent kill'', and all
|
|||||||
the other strings are pushed onto the kill ring, for easy access by
|
the other strings are pushed onto the kill ring, for easy access by
|
||||||
@code{yank-pop}.
|
@code{yank-pop}.
|
||||||
|
|
||||||
The normal use of this function is to get the window system's primary
|
The normal use of this function is to get the window system's
|
||||||
selection as the most recent kill, even if the selection belongs to
|
clipboard as the most recent kill, even if the selection belongs to
|
||||||
another application. @xref{Window System Selections}. However, if
|
another application. @xref{Window System Selections}. However, if
|
||||||
the selection was provided by the current Emacs session, this function
|
the clipboard contents come from the current Emacs session, this
|
||||||
should return @code{nil}. (If it is hard to tell whether Emacs or
|
function should return @code{nil}.
|
||||||
some other program provided the selection, it should be good enough to
|
|
||||||
use @code{string=} to compare it with the last text Emacs provided.)
|
|
||||||
@end defvar
|
@end defvar
|
||||||
|
|
||||||
@defvar interprogram-cut-function
|
@defvar interprogram-cut-function
|
||||||
@ -1129,9 +1119,8 @@ programs, when you are using a window system. Its value should be
|
|||||||
If the value is a function, @code{kill-new} and @code{kill-append} call
|
If the value is a function, @code{kill-new} and @code{kill-append} call
|
||||||
it with the new first element of the kill ring as the argument.
|
it with the new first element of the kill ring as the argument.
|
||||||
|
|
||||||
The normal use of this function is to set the window system's primary
|
The normal use of this function is to put newly killed text in the
|
||||||
selection from the newly killed text.
|
window system's clipboard. @xref{Window System Selections}.
|
||||||
@xref{Window System Selections}.
|
|
||||||
@end defvar
|
@end defvar
|
||||||
|
|
||||||
@node Internals of Kill Ring
|
@node Internals of Kill Ring
|
||||||
|
Loading…
Reference in New Issue
Block a user