unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#26925: Improve /doc/lispref/strings.texi (split-string) documentation
@ 2017-05-14 15:45 Jean-Christophe Helary
  2017-05-19 11:47 ` Eli Zaretskii
  0 siblings, 1 reply; 23+ messages in thread
From: Jean-Christophe Helary @ 2017-05-14 15:45 UTC (permalink / raw)
  To: 26925

[-- 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

^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2017-06-05 21:24 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-14 15:45 bug#26925: Improve /doc/lispref/strings.texi (split-string) documentation Jean-Christophe Helary
2017-05-19 11:47 ` 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

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).