diff options
author | Glenn Morris <rgm@gnu.org> | 2007-11-28 04:04:21 +0000 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2007-11-28 04:04:21 +0000 |
commit | 84b6a41942a644d7b73f3f2c23fb59a8f7a88b16 (patch) | |
tree | 0a5001a187f7778657a0563bd1694105dc2b1501 /lisp/net/socks.el | |
parent | 80903c3ad592ead2fbabf0d2a29ca2edd2479b8b (diff) | |
download | emacs-84b6a41942a644d7b73f3f2c23fb59a8f7a88b16.tar.gz |
(socks-original-open-network-stream): Declare as function. Move
definition before use.
Diffstat (limited to 'lisp/net/socks.el')
-rw-r--r-- | lisp/net/socks.el | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/lisp/net/socks.el b/lisp/net/socks.el index fd8e7ec59f2..b06c9db0396 100644 --- a/lisp/net/socks.el +++ b/lisp/net/socks.el @@ -335,6 +335,19 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"." ) ) +(declare-function socks-original-open-network-stream "socks") ; fset + +(defvar socks-override-functions nil + "*Whether to overwrite the open-network-stream function with the SOCKSified +version.") + +(if (fboundp 'socks-original-open-network-stream) + nil ; Do nothing, we've been here already + (defalias 'socks-original-open-network-stream + (symbol-function 'open-network-stream)) + (if socks-override-functions + (defalias 'open-network-stream 'socks-open-network-stream))) + (defun socks-open-connection (server-info) (interactive) (save-excursion @@ -473,17 +486,6 @@ If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"." (setq noproxy (cdr noproxy))) route)) -(defvar socks-override-functions nil - "*Whether to overwrite the open-network-stream function with the SOCKSified -version.") - -(if (fboundp 'socks-original-open-network-stream) - nil ; Do nothing, we've been here already - (defalias 'socks-original-open-network-stream - (symbol-function 'open-network-stream)) - (if socks-override-functions - (defalias 'open-network-stream 'socks-open-network-stream))) - (defvar socks-services-file "/etc/services") (defvar socks-tcp-services (make-hash-table :size 13 :test 'equal)) (defvar socks-udp-services (make-hash-table :size 13 :test 'equal)) |