From: Glenn Morris Date: Wed, 25 Apr 2018 18:40:28 +0000 (-0400) Subject: * lisp/net/eudc.el (split-string): Remove pre-21 fallback definition. X-Git-Tag: emacs-27.0.90~5096 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6e65b1e8a9e8d8a7c68ead3016ff0b9265311700;p=emacs.git * lisp/net/eudc.el (split-string): Remove pre-21 fallback definition. --- diff --git a/lisp/net/eudc.el b/lisp/net/eudc.el index 98f70bd1f7a..00d8c60311b 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."