emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 6e65b1e 1/4: * lisp/net/eudc.el (split-string): Rem


From: Glenn Morris
Subject: [Emacs-diffs] master 6e65b1e 1/4: * lisp/net/eudc.el (split-string): Remove pre-21 fallback definition.
Date: Wed, 25 Apr 2018 14:48:55 -0400 (EDT)

branch: master
commit 6e65b1e8a9e8d8a7c68ead3016ff0b9265311700
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    * lisp/net/eudc.el (split-string): Remove pre-21 fallback definition.
---
 lisp/net/eudc.el | 19 -------------------
 1 file changed, 19 deletions(-)

diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el
index 98f70bd..00d8c60 100644
--- a/lisp/net/eudc.el
+++ b/lisp/net/eudc.el
@@ -158,25 +158,6 @@ properties on the list."
       (setq plist (cdr (cdr plist))))
     default))
 
-(if (not (fboundp 'split-string))
-    (defun split-string (string &optional pattern)
-      "Return a list of substrings of STRING which are separated by PATTERN.
-If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"."
-  (or pattern
-      (setq pattern "[ \f\t\n\r\v]+"))
-  (let (parts (start 0))
-    (when (string-match pattern string 0)
-      (if (> (match-beginning 0) 0)
-         (setq parts (cons (substring string 0 (match-beginning 0)) nil)))
-      (setq start (match-end 0))
-      (while (and (string-match pattern string start)
-                 (> (match-end 0) start))
-       (setq parts (cons (substring string start (match-beginning 0)) parts)
-             start (match-end 0))))
-    (nreverse (if (< start (length string))
-                 (cons (substring string start) parts)
-               parts)))))
-
 (defun eudc-replace-in-string (str regexp newtext)
   "Replace all matches in STR for REGEXP with NEWTEXT.
 Value is the new string."



reply via email to

[Prev in Thread] Current Thread [Next in Thread]