filter-buffer-substring
filter-buffer-substring is a compiled Lisp function in `simple.el
'.
(filter-buffer-substring BEG END &optional DELETE)
Return the buffer substring between BEG and END, after filtering.
If DELETE is non-nil, delete the text between BEG and END from the buffer.
This calls the function that `filter-buffer-substring-function' specifies
(passing the same three arguments that it received) to do the work,
and returns whatever it does. The default function does no filtering,
unless a hook has been set.
Use `filter-buffer-substring' instead of `buffer-substring',
`buffer-substring-no-properties', or `delete-and-extract-region' when
you want to allow filtering to take place. For example, major or minor
modes can use `filter-buffer-substring-function' to extract characters
that are special to a buffer, and should not be copied into other buffers.