From: Eli Zaretskii <eliz@gnu.org>
To: Philipp Stephani <p.stephani2@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Small docstring improvements
Date: Sat, 20 Aug 2016 10:08:08 +0300 [thread overview]
Message-ID: <83shtzdijr.fsf@gnu.org> (raw)
In-Reply-To: <CAArVCkRin2xXnuA+D5m6uxjEeLx8o9XSnzzEb3SA0PaxYV+d2g@mail.gmail.com> (message from Philipp Stephani on Fri, 19 Aug 2016 19:26:14 +0000)
> From: Philipp Stephani <p.stephani2@gmail.com>
> Date: Fri, 19 Aug 2016 19:26:14 +0000
>
> here's a patch that clarifies some docstrings a bit. Please take a look. I'll push to master if this is OK.
Some comments below. Please push to emacs-25, not to master, as this
is just a documentation change, and there's no reason to delay it
until after 25.1.
> +If START is nil, that means to use the entire buffer contents; END is
> +ignored.
"the entire accessible portion of the buffer" is more accurate than
"the entire buffer contents", when narrowing is in effect.
> --- a/src/editfns.c
> +++ b/src/editfns.c
> @@ -1065,7 +1065,12 @@ usage: (save-current-buffer &rest BODY) */)
> \f
> DEFUN ("buffer-size", Fbuffer_size, Sbuffer_size, 0, 1, 0,
> doc: /* Return the number of characters in the current buffer.
> -If BUFFER, return the number of characters in that buffer instead. */)
> +If BUFFER is not nil, return the number of characters in that buffer
> +instead.
> +
> +This does not take narrowing into account; to count the number of
> +characters in the accessible portion of the buffer, use
> +‘(- (point-max) (point-min))’. */)
The advice in the last sentence doesn't work when BUFFER is non-nil.
(I actually doubt that the advice is needed here; it's enough to have
something like that in the ELisp manual -- which already hints on
that, but maybe we should make that more explicit.
> @@ -4654,7 +4654,8 @@ DEFUN ("write-region", Fwrite_region, Swrite_region, 3, 7,
> When called from a program, requires three arguments:
> START, END and FILENAME. START and END are normally buffer positions
> specifying the part of the buffer to write.
> -If START is nil, that means to use the entire buffer contents.
> +If START is nil, that means to use the entire buffer contents; END is
> +ignored.
Once again, please mention the accessible portion of the buffer.
Thanks.
next prev parent reply other threads:[~2016-08-20 7:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-19 19:26 Small docstring improvements Philipp Stephani
2016-08-19 19:34 ` John Wiegley
2016-08-19 20:34 ` Philipp Stephani
2016-08-19 21:12 ` John Wiegley
2016-08-19 22:04 ` Drew Adams
2016-08-20 0:24 ` John Wiegley
2016-08-20 7:10 ` Eli Zaretskii
2016-08-20 23:17 ` John Wiegley
2016-08-19 21:59 ` Dmitry Gutov
2016-08-20 7:08 ` Eli Zaretskii [this message]
2016-08-20 13:52 ` Philipp Stephani
2016-08-20 15:34 ` Eli Zaretskii
2016-08-20 15:59 ` Philipp Stephani
2016-08-20 16:11 ` Eli Zaretskii
2016-08-20 18:00 ` Philipp Stephani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83shtzdijr.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=p.stephani2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.