[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master cab400a: socks.el: remove pre-21 compatibility code
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] master cab400a: socks.el: remove pre-21 compatibility code |
Date: |
Tue, 24 Apr 2018 21:13:09 -0400 (EDT) |
branch: master
commit cab400aacde04e4455caea4a6525b26ca7909850
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>
socks.el: remove pre-21 compatibility code
* lisp/net/socks.el (socks-split-string): Remove.
(socks-nslookup-host): Just use split-string.
---
lisp/net/socks.el | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/lisp/net/socks.el b/lisp/net/socks.el
index 32362e2..1c2459a 100644
--- a/lisp/net/socks.el
+++ b/lisp/net/socks.el
@@ -36,22 +36,6 @@
(require 'wid-edit))
(require 'custom)
-(eval-and-compile
- (if (featurep 'emacs)
- (defalias 'socks-split-string 'split-string) ; since at least 21.1
- (if (fboundp 'split-string)
- (defalias 'socks-split-string 'split-string)
- (defun socks-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))
- (while (string-match pattern string start)
- (setq parts (cons (substring string start
- (match-beginning 0)) parts)
- start (match-end 0)))
- (nreverse (cons (substring string start) parts)))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; Custom widgets
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -652,7 +636,7 @@ version.")
(setq res (buffer-substring (match-beginning 2)
(match-end 2))
res (mapcar 'string-to-number
- (socks-split-string res "\\.")))))
+ (split-string res "\\.")))))
(kill-buffer (current-buffer)))
res)
host))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master cab400a: socks.el: remove pre-21 compatibility code,
Glenn Morris <=