diff options
| author | Philipp Stephani | 2016-08-19 21:23:24 +0200 |
|---|---|---|
| committer | Philipp Stephani | 2016-08-20 18:25:05 +0200 |
| commit | 9b99772cf4b24443e1c096bb1e847da4cf502543 (patch) | |
| tree | 32702965737695ae1a523f4dac9999472ca96524 /src | |
| parent | 37d4723f73998ecbf30e9f655026422b0e2017a7 (diff) | |
| download | emacs-9b99772cf4b24443e1c096bb1e847da4cf502543.tar.gz emacs-9b99772cf4b24443e1c096bb1e847da4cf502543.zip | |
Some assorted documentation clarifications
* src/fileio.c (Fwrite_region): Clarify that END is ignored if
START is nil.
* src/editfns.c (Fbuffer_size): Add short discussion about
narrowing.
* src/callproc.c (Fcall_process_region): Discuss behavior when
START and END are not buffer positions.
Diffstat (limited to 'src')
| -rw-r--r-- | src/callproc.c | 7 | ||||
| -rw-r--r-- | src/editfns.c | 9 | ||||
| -rw-r--r-- | src/fileio.c | 3 |
3 files changed, 17 insertions, 2 deletions
diff --git a/src/callproc.c b/src/callproc.c index 2fb5b1d5194..76b5caa4465 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -1005,6 +1005,13 @@ create_temp_file (ptrdiff_t nargs, Lisp_Object *args, | |||
| 1005 | DEFUN ("call-process-region", Fcall_process_region, Scall_process_region, | 1005 | DEFUN ("call-process-region", Fcall_process_region, Scall_process_region, |
| 1006 | 3, MANY, 0, | 1006 | 3, MANY, 0, |
| 1007 | doc: /* Send text from START to END to a synchronous process running PROGRAM. | 1007 | doc: /* Send text from START to END to a synchronous process running PROGRAM. |
| 1008 | |||
| 1009 | START and END are normally buffer positions specifying the part of the | ||
| 1010 | buffer to send to the process. | ||
| 1011 | If START is nil, that means to use the entire buffer contents; END is | ||
| 1012 | ignored. | ||
| 1013 | If START is a string, then send that string to the process | ||
| 1014 | instead of any buffer contents; END is ignored. | ||
| 1008 | The remaining arguments are optional. | 1015 | The remaining arguments are optional. |
| 1009 | Delete the text if fourth arg DELETE is non-nil. | 1016 | Delete the text if fourth arg DELETE is non-nil. |
| 1010 | 1017 | ||
diff --git a/src/editfns.c b/src/editfns.c index 32c8bec6db2..e1c85166545 100644 --- a/src/editfns.c +++ b/src/editfns.c | |||
| @@ -1029,7 +1029,14 @@ usage: (save-current-buffer &rest BODY) */) | |||
| 1029 | 1029 | ||
| 1030 | DEFUN ("buffer-size", Fbuffer_size, Sbuffer_size, 0, 1, 0, | 1030 | DEFUN ("buffer-size", Fbuffer_size, Sbuffer_size, 0, 1, 0, |
| 1031 | doc: /* Return the number of characters in the current buffer. | 1031 | doc: /* Return the number of characters in the current buffer. |
| 1032 | If BUFFER, return the number of characters in that buffer instead. */) | 1032 | If BUFFER is not nil, return the number of characters in that buffer |
| 1033 | instead. | ||
| 1034 | |||
| 1035 | This does not take narrowing into account; to count the number of | ||
| 1036 | characters in the accessible portion of the current buffer, use | ||
| 1037 | `(- (point-max) (point-min))', and to count the number of characters | ||
| 1038 | in some other BUFFER, use | ||
| 1039 | `(with-current-buffer BUFFER (- (point-max) (point-min)))'. */) | ||
| 1033 | (Lisp_Object buffer) | 1040 | (Lisp_Object buffer) |
| 1034 | { | 1041 | { |
| 1035 | if (NILP (buffer)) | 1042 | if (NILP (buffer)) |
diff --git a/src/fileio.c b/src/fileio.c index 3005ca320e7..c3b2be7c5f7 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -4644,7 +4644,8 @@ DEFUN ("write-region", Fwrite_region, Swrite_region, 3, 7, | |||
| 4644 | When called from a program, requires three arguments: | 4644 | When called from a program, requires three arguments: |
| 4645 | START, END and FILENAME. START and END are normally buffer positions | 4645 | START, END and FILENAME. START and END are normally buffer positions |
| 4646 | specifying the part of the buffer to write. | 4646 | specifying the part of the buffer to write. |
| 4647 | If START is nil, that means to use the entire buffer contents. | 4647 | If START is nil, that means to use the entire buffer contents; END is |
| 4648 | ignored. | ||
| 4648 | If START is a string, then output that string to the file | 4649 | If START is a string, then output that string to the file |
| 4649 | instead of any buffer contents; END is ignored. | 4650 | instead of any buffer contents; END is ignored. |
| 4650 | 4651 | ||