# HG changeset patch # User Kim F. Storm # Date 1144623907 0 # Node ID 5b6c4153d145be24fa7c6ba2304061d2879e4b19 # Parent eea8aee5048b73f88f746be13913925bc8b500b9 (Buffer Contents): Add NOPROPS arg to filter-buffer-substring. diff -r eea8aee5048b -r 5b6c4153d145 lispref/text.texi --- a/lispref/text.texi Sun Apr 09 23:04:33 2006 +0000 +++ b/lispref/text.texi Sun Apr 09 23:05:07 2006 +0000 @@ -205,7 +205,7 @@ properties, just the characters themselves. @xref{Text Properties}. @end defun -@defun filter-buffer-substring start end &optional delete +@defun filter-buffer-substring start end &optional delete noprops This function passes the buffer text between @var{start} and @var{end} through the filter functions specified by the variable @code{buffer-substring-filters}, and returns the value from the last @@ -217,7 +217,12 @@ between @var{start} and @var{end} after copying it, like @code{delete-and-extract-region}. -Lisp code should use this function instead of @code{buffer-substring} +If @var{noprops} is non-@code{nil}, the final string returned does not +include text properties, while the string passed through the filters +still includes text properties from the buffer text. + +Lisp code should use this function instead of @code{buffer-substring}, +@code{buffer-substring-no-properties}, or @code{delete-and-extract-region} when copying into user-accessible data structures such as the kill-ring, X clipboard, and registers. Major and minor modes can add functions to