From xemacs-m  Tue Jun 10 15:18:53 1997
Received: from jagor.srce.hr (hniksic@jagor.srce.hr [161.53.2.130])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id PAA02004
	for <xemacs-beta@xemacs.org>; Tue, 10 Jun 1997 15:18:51 -0500 (CDT)
Received: (from hniksic@localhost)
          by jagor.srce.hr (8.8.5/8.8.4)
	  id WAA08459; Tue, 10 Jun 1997 22:18:50 +0200 (MET DST)
To: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: [PATCH] optional pattern in `split-string'
X-Attribution: Hrv
X-Face: Mie8:rOV<\c/~z{s.X4A{!?vY7{drJ([U]0O=W/<W*SMo/Mv:58:*_y~ki>xDi&N7XG
        KV^$k0m3Oe/)'e%3=$PCR&3ITUXH,cK>]bci&<qQ>Ff%x_>1`T(+M2Gg/fgndU%k*ft
        [(7._6e0n-V%|%'[c|q:;}td$#INd+;?!-V=c8Pqf}3J
From: Hrvoje Niksic <hniksic@srce.hr>
Date: 10 Jun 1997 22:18:50 +0200
Message-ID: <kigwwo2mct1.fsf@jagor.srce.hr>
Lines: 66

Emacs 20.1 has a split-string; however, their version has the optional 
pattern.  They also have a different (more complex) function
definition.  Since I saw nothing wrong with ours, I just synched the
optional-pattern part.

Oh, yes -- I've added a few NEWS entries, too.

1997-06-10  Hrvoje Niksic  <hniksic@srce.hr>

	* prim/subr.el (split-string): Make PATTERN optional.


--- lisp/prim/subr.el.orig	Tue Jun 10 22:03:47 1997
+++ lisp/prim/subr.el	Tue Jun 10 22:04:16 1997
@@ -307,8 +307,10 @@
 			 newtext ""))))))
     (concat rtn-str (substring str start))))
 
-(defun split-string (string pattern)
+(defun split-string (string &optional pattern)
   "Return a list of substrings of STRING which are separated by PATTERN."
+  (or pattern
+      (setq pattern "[ \f\t\n\r\v]+"))
   (let (parts (start 0))
     (while (string-match pattern string start)
       (setq parts (cons (substring string start (match-beginning 0)) parts)
--- etc/NEWS.orig	Tue Jun 10 21:57:39 1997
+++ etc/NEWS	Tue Jun 10 22:03:16 1997
@@ -124,11 +124,11 @@
 creating a new frame with `C-x 5 2' also raises and selects that
 frame.  The behavior of window system frames is unchanged.
 
-** C-x n d now runs the new command narrow-to-defun,
+** `C-x n d' now runs the new command `narrow-to-defun',
 which narrows the accessible parts of the buffer to just
 the current defun.
 
-** The new command C-x 4 0 (kill-buffer-and-window) kills the
+** The new command `C-x 4 0' (kill-buffer-and-window) kills the
 current buffer and deletes the selected window.  It asks for
 confirmation first.
 
@@ -192,8 +192,15 @@
 ** Autoconf 2 is supported, making XEmacs more conforming to
 conventions used by other free software.
 
-** tty-erase-char is a new variable that reports which character
-was set up as the terminal's erase character at the tim Emacs was started.
+** `tty-erase-char' is a new variable that reports which character
+was set up as the terminal's erase character at the tim Emacs was
+started.
+
+** The TIME argument to `format-time-string' is now optional and
+defaults to the current time.
+
+** The PATTERN argument to `split-string' is now optional and defaults
+to whitespace ("[ \f\t\n\r\v]+").
 
 
 


-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
Idle RAM is the Devil's playground.

