]> code.delx.au - gnu-emacs/commitdiff
* lisp/net/socks.el: Require network-stream.
authorGlenn Morris <rgm@gnu.org>
Fri, 17 Feb 2012 08:19:12 +0000 (00:19 -0800)
committerGlenn Morris <rgm@gnu.org>
Fri, 17 Feb 2012 08:19:12 +0000 (00:19 -0800)
Fixes: debbugs:10599
lisp/ChangeLog
lisp/net/socks.el

index e2e45bf15354826bfa0ba2ed7e5fa6cabdd6707b..4479ee227908acd164506c8bdad4a83e57a74f2a 100644 (file)
@@ -1,3 +1,7 @@
+2012-02-17  Glenn Morris  <rgm@gnu.org>
+
+       * net/socks.el: Require network-stream.  (Bug#10599)
+
 2012-02-17  Kenichi Handa  <handa@m17n.org>
 
        * international/charprop.el:
index b9431bdeed7eefc3791d3519ed3c1708183059d1..3c94e7d1b2245ee0f2b01b8a2a119250674f9466 100644 (file)
@@ -35,6 +35,8 @@
   (require 'wid-edit))
 (require 'custom)
 
+;; FIXME this is bad practice, and who is it for anyway, since Emacs
+;; has split-string since at least 21.1.
 (if (not (fboundp 'split-string))
     (defun split-string (string &optional pattern)
       "Return a list of substrings of STRING which are separated by PATTERN.
@@ -335,10 +337,17 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"."
 
 (declare-function socks-original-open-network-stream "socks") ; fset
 
+;; FIXME this is a terrible idea.
+;; It is not even compatible with the argument spec of open-network-stream
+;; in 24.1.  If this is really necessary, open-network-stream
+;; could get a wrapper hook, or defer to open-network-stream-function.
+
 (defvar socks-override-functions nil
   "*Whether to overwrite the open-network-stream function with the SOCKSified
 version.")
 
+(require 'network-stream)
+
 (if (fboundp 'socks-original-open-network-stream)
     nil                                ; Do nothing, we've been here already
   (defalias 'socks-original-open-network-stream