;;; tramp-gw.el --- Tramp utility functions for HTTP tunnels and SOCKS gateways
-;; Copyright (C) 2007-2011 Free Software Foundation, Inc.
+;; Copyright (C) 2007-2013 Free Software Foundation, Inc.
;; Author: Michael Albinus <michael.albinus@gmx.de>
;; Keywords: comm, processes
(require 'tramp)
-;; Pacify byte-compiler
+;; Pacify byte-compiler.
(eval-when-compile
(require 'cl)
(require 'custom))
-
-;; Avoid byte-compiler warnings if the byte-compiler supports this.
-;; Currently, XEmacs supports this.
-(eval-when-compile
- (when (featurep 'xemacs)
- (byte-compiler-options (warnings (- unused-vars)))))
+(defvar socks-noproxy)
;; We don't add the following methods to `tramp-methods', in order to
;; exclude them from file name completion.
;; Define HTTP tunnel method ...
;;;###tramp-autoload
(defconst tramp-gw-tunnel-method "tunnel"
- "*Method to connect HTTP gateways.")
+ "Method to connect HTTP gateways.")
;; ... and port.
(defconst tramp-gw-default-tunnel-port 8080
- "*Default port for HTTP gateways.")
+ "Default port for HTTP gateways.")
;; Define SOCKS method ...
;;;###tramp-autoload
(defconst tramp-gw-socks-method "socks"
- "*Method to connect SOCKS servers.")
+ "Method to connect SOCKS servers.")
;; ... and port.
(defconst tramp-gw-default-socks-port 1080
- "*Default port for SOCKS servers.")
+ "Default port for SOCKS servers.")
;; Autoload the socks library. It is used only when we access a SOCKS server.
(autoload 'socks-open-network-stream "socks")
(defvar tramp-gw-aux-proc nil
"Process listening on local port, as mediation between SSH and the gateway.")
-(defun tramp-gw-gw-proc-sentinel (proc event)
+(defun tramp-gw-gw-proc-sentinel (proc _event)
"Delete auxiliary process when we are deleted."
(unless (memq (process-status proc) '(run open))
(tramp-message
(p (tramp-get-connection-property proc "process" nil)))
(when (processp p) (delete-process p)))))
-(defun tramp-gw-aux-proc-sentinel (proc event)
+(defun tramp-gw-aux-proc-sentinel (proc _event)
"Activate the different filters for involved gateway and auxiliary processes."
(when (memq (process-status proc) '(run open))
;; A new process has been spawned from `tramp-gw-aux-proc'.
(memq (process-status tramp-gw-aux-proc) '(listen)))
(let ((aux-vec
(vector "aux" (tramp-file-name-user gw-vec)
- (tramp-file-name-host gw-vec) nil)))
+ (tramp-file-name-host gw-vec) nil nil)))
(setq tramp-gw-aux-proc
(make-network-process
:name (tramp-buffer-name aux-vec) :buffer nil :host 'local