aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2018-04-24 21:13:00 -0400
committerGlenn Morris2018-04-24 21:13:00 -0400
commitcab400aacde04e4455caea4a6525b26ca7909850 (patch)
tree1b96cb474d3cb8b8a2fc146bb015e397e8b51e36
parent1a6f59573603a57f64f4bc8866d482a20ef1ea52 (diff)
downloademacs-cab400aacde04e4455caea4a6525b26ca7909850.tar.gz
emacs-cab400aacde04e4455caea4a6525b26ca7909850.zip
socks.el: remove pre-21 compatibility code
* lisp/net/socks.el (socks-split-string): Remove. (socks-nslookup-host): Just use split-string.
-rw-r--r--lisp/net/socks.el18
1 files changed, 1 insertions, 17 deletions
diff --git a/lisp/net/socks.el b/lisp/net/socks.el
index 32362e25434..1c2459a8e65 100644
--- a/lisp/net/socks.el
+++ b/lisp/net/socks.el
@@ -36,22 +36,6 @@
36 (require 'wid-edit)) 36 (require 'wid-edit))
37(require 'custom) 37(require 'custom)
38 38
39(eval-and-compile
40 (if (featurep 'emacs)
41 (defalias 'socks-split-string 'split-string) ; since at least 21.1
42 (if (fboundp 'split-string)
43 (defalias 'socks-split-string 'split-string)
44 (defun socks-split-string (string &optional pattern)
45 "Return a list of substrings of STRING which are separated by PATTERN.
46If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"."
47 (or pattern
48 (setq pattern "[ \f\t\n\r\v]+"))
49 (let (parts (start 0))
50 (while (string-match pattern string start)
51 (setq parts (cons (substring string start
52 (match-beginning 0)) parts)
53 start (match-end 0)))
54 (nreverse (cons (substring string start) parts)))))))
55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
56;;; Custom widgets 40;;; Custom widgets
57;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 41;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -652,7 +636,7 @@ version.")
652 (setq res (buffer-substring (match-beginning 2) 636 (setq res (buffer-substring (match-beginning 2)
653 (match-end 2)) 637 (match-end 2))
654 res (mapcar 'string-to-number 638 res (mapcar 'string-to-number
655 (socks-split-string res "\\."))))) 639 (split-string res "\\.")))))
656 (kill-buffer (current-buffer))) 640 (kill-buffer (current-buffer)))
657 res) 641 res)
658 host)) 642 host))