mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-06 03:40:56 -08:00
Improve documentation of 'region-extract-function'
* lisp/simple.el (region-extract-function): Rename the argument to METHOD. Doc fix. (Bug#27927)
This commit is contained in:
parent
b8748dd093
commit
19a41ce2de
1 changed files with 12 additions and 11 deletions
|
|
@ -996,23 +996,24 @@ instead of deleted."
|
|||
:version "24.1")
|
||||
|
||||
(defvar region-extract-function
|
||||
(lambda (delete)
|
||||
(lambda (method)
|
||||
(when (region-beginning)
|
||||
(cond
|
||||
((eq delete 'bounds)
|
||||
((eq method 'bounds)
|
||||
(list (cons (region-beginning) (region-end))))
|
||||
((eq delete 'delete-only)
|
||||
((eq method 'delete-only)
|
||||
(delete-region (region-beginning) (region-end)))
|
||||
(t
|
||||
(filter-buffer-substring (region-beginning) (region-end) delete)))))
|
||||
(filter-buffer-substring (region-beginning) (region-end) method)))))
|
||||
"Function to get the region's content.
|
||||
Called with one argument DELETE.
|
||||
If DELETE is `delete-only', then only delete the region and the return value
|
||||
is undefined. If DELETE is nil, just return the content as a string.
|
||||
If DELETE is `bounds', then don't delete, but just return the
|
||||
boundaries of the region as a list of (START . END) positions.
|
||||
If anything else, delete the region and return its content as a string,
|
||||
after filtering it with `filter-buffer-substring'.")
|
||||
Called with one argument METHOD.
|
||||
If METHOD is `delete-only', then delete the region; the return value
|
||||
is undefined. If METHOD is nil, then return the content as a string.
|
||||
If METHOD is `bounds', then return the boundaries of the region
|
||||
as a list of the form (START . END).
|
||||
If METHOD is anything else, delete the region and return its content
|
||||
as a string, after filtering it with `filter-buffer-substring', which
|
||||
is called with METHOD as its 3rd argument.")
|
||||
|
||||
(defvar region-insert-function
|
||||
(lambda (lines)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue