From: emacs--- via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 55688@debbugs.gnu.org
Cc: self@kaction.cc
Subject: bug#55688: Incorrect documentation of "string-pad"
Date: Fri, 27 May 2022 18:13:53 -0400 [thread overview]
Message-ID: <YpFNIeplHdCqiVA8@despise> (raw)
Documentation of "string-pad" function says following (highlighting is
mine).
@defun string-pad string length &optional padding start
Pad @var{string} to the be of @var{length} using @var{padding} as the
padding character (defaulting to the space character).
If @var{string} is shorter than @var{length}, no padding is done.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
If @var{start} is @code{nil} (or not present), the padding is done to the
end of the string, and if it's non-@code{nil}, to the start of the
string.
=> https://git.savannah.gnu.org/cgit/emacs.git/tree/doc/lispref/strings.texi#n445
I don't think highlighted line is correct. I matches neither behaviour of
emacs:
=> (string-pad "foo" 12)
"foo "
nor what is usually meant by word "padding". I believe issue can be
solved by s/shorter/longer or removing highlighted line at all.
next reply other threads:[~2022-05-27 22:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-27 22:13 emacs--- via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-05-28 7:55 ` bug#55688: Incorrect documentation of "string-pad" Eli Zaretskii
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=YpFNIeplHdCqiVA8@despise \
--to=bug-gnu-emacs@gnu.org \
--cc=55688@debbugs.gnu.org \
--cc=emacs@kaction.cc \
--cc=self@kaction.cc \
/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.