unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Jean-Christophe Helary <jean.christophe.helary@gmail.com>
To: 26925@debbugs.gnu.org
Subject: bug#26925: Improve /doc/lispref/strings.texi (split-string) documentation
Date: Mon, 15 May 2017 00:45:34 +0900	[thread overview]
Message-ID: <93AB3C85-27C1-48FF-8C3D-B90B4CF33670@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 325 bytes --]

I slightly changed the paragraph order in the documentation to (split-string) to make it more readable.

Jean-Christophe 

===========================
Improve documentation of (split-string)

* /doc/lispref/strings.texi (split-string): change paragraph
  order to improve readability.
===========================


[-- Attachment #2: strings.texi.diff --]
[-- Type: application/octet-stream, Size: 2406 bytes --]

diff --git a/doc/lispref/strings.texi b/doc/lispref/strings.texi
index 1d766869b1..be87fbd2c3 100644
--- a/doc/lispref/strings.texi
+++ b/doc/lispref/strings.texi
@@ -279,17 +279,26 @@ expression @var{separators} (@pxref{Regular Expressions}).  Each match
 for @var{separators} defines a splitting point; the substrings between
 splitting points are made into a list, which is returned.
 
+If @var{separators} is @code{nil} (or omitted), the default is the
+value of @code{split-string-default-separators} and @var{omit-nulls}
+is forced to @code{t}
+
 If @var{omit-nulls} is @code{nil} (or omitted), the result contains
 null strings whenever there are two consecutive matches for
 @var{separators}, or a match is adjacent to the beginning or end of
 @var{string}.  If @var{omit-nulls} is @code{t}, these null strings are
 omitted from the result.
 
-If @var{separators} is @code{nil} (or omitted), the default is the
-value of @code{split-string-default-separators}.
+If the optional argument @var{trim} is non-@code{nil}, it should be a
+regular expression to match text to trim from the beginning and end of
+each substring.  If trimming makes the substring empty, it is treated
+as null.
+
+If you need to split a string into a list of individual command-line
+arguments suitable for @code{call-process} or @code{start-process},
+see @ref{Shell Arguments, split-string-and-unquote}.
 
-As a special case, when @var{separators} is @code{nil} (or omitted),
-null strings are always omitted from the result.  Thus:
+Examples:
 
 @example
 (split-string "  two words ")
@@ -306,8 +315,6 @@ useful.  If you need such a result, use an explicit value for
      @result{} ("" "two" "words" "")
 @end example
 
-More examples:
-
 @example
 (split-string "Soup is good food" "o")
      @result{} ("S" "up is g" "" "d f" "" "d")
@@ -354,15 +361,6 @@ practice:
 (split-string "ooo" "\\|o+" t)
      @result{} ("o" "o" "o")
 @end example
-
-If the optional argument @var{trim} is non-@code{nil}, it should be a
-regular expression to match text to trim from the beginning and end of
-each substring.  If trimming makes the substring empty, it is treated
-as null.
-
-If you need to split a string into a list of individual command-line
-arguments suitable for @code{call-process} or @code{start-process},
-see @ref{Shell Arguments, split-string-and-unquote}.
 @end defun
 
 @defvar split-string-default-separators

             reply	other threads:[~2017-05-14 15:45 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-14 15:45 Jean-Christophe Helary [this message]
2017-05-19 11:47 ` bug#26925: Improve /doc/lispref/strings.texi (split-string) documentation Eli Zaretskii
2017-05-19 12:23   ` Jean-Christophe Helary
2017-05-19 12:56     ` Eli Zaretskii
2017-05-19 13:02       ` Jean-Christophe Helary
2017-05-19 13:30       ` Stephen Berman
2017-06-03  8:50         ` Jean-Christophe Helary
2017-06-03  9:59           ` Eli Zaretskii
2017-06-03 13:50             ` Jean-Christophe Helary
2017-06-03 14:46               ` Eli Zaretskii
2017-06-03 23:45                 ` Jean-Christophe Helary
2017-06-04  2:38                   ` Eli Zaretskii
2017-06-04  7:49                     ` Michael Albinus
2017-06-04  9:19                       ` Jean-Christophe Helary
2017-06-04 13:57                       ` Eli Zaretskii
2017-06-04 15:14                         ` Jean-Christophe Helary
2017-06-04 15:46                           ` Eli Zaretskii
2017-06-05  0:33                             ` Jean-Christophe Helary
2017-06-05  2:46                               ` Eli Zaretskii
2017-06-05  3:31                                 ` Jean-Christophe Helary
2017-06-05  5:15                                   ` Jean-Christophe Helary
2017-06-05 15:09                                     ` Eli Zaretskii
2017-06-05 21:24                                       ` Jean-Christophe Helary

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=93AB3C85-27C1-48FF-8C3D-B90B4CF33670@gmail.com \
    --to=jean.christophe.helary@gmail.com \
    --cc=26925@debbugs.gnu.org \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).