/[emacs]/emacs/lispref/text.texi
ViewVC logotype

Diff of /emacs/lispref/text.texi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.97 by rms, Thu Mar 17 23:51:04 2005 UTC revision 1.98 by rms, Tue Mar 29 21:08:19 2005 UTC
# Line 207  This is like @code{buffer-substring}, ex Line 207  This is like @code{buffer-substring}, ex
207  properties, just the characters themselves.  @xref{Text Properties}.  properties, just the characters themselves.  @xref{Text Properties}.
208  @end defun  @end defun
209    
210    @defun filter-buffer-substring start end &optional delete
211    This function passes the buffer text between @var{start} and @var{end}
212    through the filter functions specified by the variable
213    @code{buffer-substring-filters}, and returns the value from the last
214    filter function.  If @code{buffer-substring-filters} is @code{nil},
215    the value is the unaltered text from the buffer, what
216    @code{buffer-substring} would return.
217    
218    If @var{delete} is non-@code{nil}, this function deletes the text
219    between @var{start} and @var{end} after copying it, like
220    @code{delete-and-extract-region}.
221    
222    Lisp code should use this function instead of @code{buffer-substring}
223    or @code{delete-and-extract-region} when copying into user-accessible
224    data structures such as the kill-ring, X clipboard, and registers.
225    Major and minor modes can add functions to
226    @code{buffer-substring-filters} to alter such text as it is copied out
227    of the buffer.
228    @end defun
229    
230    @defvar buffer-substring-filters
231    This variable should be a list of functions that accept a single
232    argument, a string, and return a string.
233    @code{filter-buffer-substring} passes the buffer substring to the
234    first function in this list, and the return value of each function is
235    passed to the next function.  The return value of the last function is
236    used as the return value of @code{filter-buffer-substring}.
237    
238    As a special convention, point is set to the start of the buffer text
239    being operated on (i.e., the @var{start} argument for
240    @code{filter-buffer-substring}) before these functions are called.
241    
242    If this variable is @code{nil}, no filtering is performed.
243    @end defvar
244    
245  @defun buffer-string  @defun buffer-string
246  This function returns the contents of the entire accessible portion of  This function returns the contents of the entire accessible portion of
247  the current buffer as a string.  It is equivalent to  the current buffer as a string.  It is equivalent to

Legend:
Removed from v.1.97  
changed lines
  Added in v.1.98

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26