diff options
| author | Eli Zaretskii | 2017-08-05 11:03:24 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2017-08-05 11:03:24 +0300 |
| commit | 19a41ce2dea79b4e5fb8baf1060b615bc03af63b (patch) | |
| tree | 0db835e7954ecf406963bc23f239ece320a8e47b | |
| parent | b8748dd0932cbcf44bcbde8591f5cebad7eebfb1 (diff) | |
| download | emacs-19a41ce2dea79b4e5fb8baf1060b615bc03af63b.tar.gz emacs-19a41ce2dea79b4e5fb8baf1060b615bc03af63b.zip | |
Improve documentation of 'region-extract-function'
* lisp/simple.el (region-extract-function): Rename the argument to
METHOD. Doc fix. (Bug#27927)
| -rw-r--r-- | lisp/simple.el | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 3d23fc35596..e3d86abe87a 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -996,23 +996,24 @@ instead of deleted." | |||
| 996 | :version "24.1") | 996 | :version "24.1") |
| 997 | 997 | ||
| 998 | (defvar region-extract-function | 998 | (defvar region-extract-function |
| 999 | (lambda (delete) | 999 | (lambda (method) |
| 1000 | (when (region-beginning) | 1000 | (when (region-beginning) |
| 1001 | (cond | 1001 | (cond |
| 1002 | ((eq delete 'bounds) | 1002 | ((eq method 'bounds) |
| 1003 | (list (cons (region-beginning) (region-end)))) | 1003 | (list (cons (region-beginning) (region-end)))) |
| 1004 | ((eq delete 'delete-only) | 1004 | ((eq method 'delete-only) |
| 1005 | (delete-region (region-beginning) (region-end))) | 1005 | (delete-region (region-beginning) (region-end))) |
| 1006 | (t | 1006 | (t |
| 1007 | (filter-buffer-substring (region-beginning) (region-end) delete))))) | 1007 | (filter-buffer-substring (region-beginning) (region-end) method))))) |
| 1008 | "Function to get the region's content. | 1008 | "Function to get the region's content. |
| 1009 | Called with one argument DELETE. | 1009 | Called with one argument METHOD. |
| 1010 | If DELETE is `delete-only', then only delete the region and the return value | 1010 | If METHOD is `delete-only', then delete the region; the return value |
| 1011 | is undefined. If DELETE is nil, just return the content as a string. | 1011 | is undefined. If METHOD is nil, then return the content as a string. |
| 1012 | If DELETE is `bounds', then don't delete, but just return the | 1012 | If METHOD is `bounds', then return the boundaries of the region |
| 1013 | boundaries of the region as a list of (START . END) positions. | 1013 | as a list of the form (START . END). |
| 1014 | If anything else, delete the region and return its content as a string, | 1014 | If METHOD is anything else, delete the region and return its content |
| 1015 | after filtering it with `filter-buffer-substring'.") | 1015 | as a string, after filtering it with `filter-buffer-substring', which |
| 1016 | is called with METHOD as its 3rd argument.") | ||
| 1016 | 1017 | ||
| 1017 | (defvar region-insert-function | 1018 | (defvar region-insert-function |
| 1018 | (lambda (lines) | 1019 | (lambda (lines) |