From: Michael Albinus Date: Thu, 15 Aug 2013 17:02:09 +0000 (+0200) Subject: Declare external variables. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1686^2~227 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b74f0d960f8c297dcaa125f3af051bd1a34869a5;p=emacs.git Declare external variables. --- diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 389edf1c919..42fa3165847 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -36,7 +36,10 @@ (require 'tramp) (require 'time-date) -(defvar dired-move-to-filename-regexp) +;; Pacify byte-compiler. +(eval-when-compile + (defvar directory-sep-char) + (defvar dired-move-to-filename-regexp)) (defcustom tramp-adb-program "adb" "Name of the Android Debug Bridge program." diff --git a/lisp/net/tramp-cmds.el b/lisp/net/tramp-cmds.el index 462f0d88367..7c04cbf3b60 100644 --- a/lisp/net/tramp-cmds.el +++ b/lisp/net/tramp-cmds.el @@ -30,6 +30,12 @@ (require 'tramp) +;; Pacify byte-compiler. +(eval-when-compile + (defvar buffer-name) + (defvar reporter-eval-buffer) + (defvar reporter-prompt-for-summary-p)) + (defun tramp-list-tramp-buffers () "Return a list of all Tramp connection buffers." (append diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index c42a29981b7..71703fe6ab1 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -29,9 +29,8 @@ ;;; Code: +;; Pacify byte-compiler. (eval-when-compile - - ;; Pacify byte-compiler. (require 'cl)) (eval-and-compile diff --git a/lisp/net/tramp-ftp.el b/lisp/net/tramp-ftp.el index 7d266d4d172..fbc02911d93 100644 --- a/lisp/net/tramp-ftp.el +++ b/lisp/net/tramp-ftp.el @@ -30,11 +30,13 @@ (require 'tramp) +;; Pacify byte-compiler. (eval-when-compile - - ;; Pacify byte-compiler. (require 'cl) - (require 'custom)) + (require 'custom) + (defvar ange-ftp-ftp-name-arg) + (defvar ange-ftp-ftp-name-res) + (defvar ange-ftp-name-format)) ;; Disable Ange-FTP from file-name-handler-alist. ;; To handle EFS, the following functions need to be dealt with: diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index d0270aabacc..7c41499a2e9 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -97,11 +97,6 @@ ;; option "--without-dbus". Declare used subroutines and variables. (declare-function dbus-get-unique-name "dbusbind.c") -;; Pacify byte-compiler -(eval-when-compile - (require 'cl) - (require 'custom)) - (require 'tramp) (require 'dbus) @@ -109,6 +104,12 @@ (require 'url-util) (require 'zeroconf) +;; Pacify byte-compiler. +(eval-when-compile + (require 'cl) + (require 'custom) + (defvar ls-lisp-use-insert-directory-program)) + ;;;###tramp-autoload (defcustom tramp-gvfs-methods '("dav" "davs" "obex" "synce") "List of methods for remote files, accessed with GVFS." diff --git a/lisp/net/tramp-gw.el b/lisp/net/tramp-gw.el index f7c6eba4006..7d221618f42 100644 --- a/lisp/net/tramp-gw.el +++ b/lisp/net/tramp-gw.el @@ -33,16 +33,11 @@ (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))))) + (require 'custom) + (defvar socks-noproxy)) ;; We don't add the following methods to `tramp-methods', in order to ;; exclude them from file name completion. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 5460bd00d6c..6e96616d2d3 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -26,21 +26,15 @@ ;;; Code: -(eval-when-compile (require 'cl)) ; ignore-errors (require 'tramp) -;; Pacify byte-compiler. The function is needed on XEmacs only. I'm -;; not sure at all that this is the right way to do it, but let's hope -;; it works for now, and wait for a guru to point out the Right Way to -;; achieve this. -;;(eval-when-compile -;; (unless (fboundp 'dired-insert-set-properties) -;; (fset 'dired-insert-set-properties 'ignore))) -;; Gerd suggests this: -(eval-when-compile (require 'dired)) -;; Note that dired is required at run-time, too, when it is needed. -;; It is only needed on XEmacs for the function -;; `dired-insert-set-properties'. +;; Pacify byte-compiler. +(eval-when-compile + (require 'cl) + (require 'dired) + (defvar directory-sep-char) + (defvar tramp-gw-tunnel-method) + (defvar tramp-gw-socks-method)) (defcustom tramp-inline-compress-start-size 4096 "The minimum size of compressing where inline transfer. @@ -4203,9 +4197,6 @@ Goes through the list `tramp-inline-compress-commands'." (tramp-message vec 2 "Couldn't find an inline transfer compress command"))))) -(defvar tramp-gw-tunnel-method) -(defvar tramp-gw-socks-method) - (defun tramp-compute-multi-hops (vec) "Expands VEC according to `tramp-default-proxies-alist'. Gateway hops are already opened." diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 0dd9286da2d..39e87f994c2 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -27,9 +27,12 @@ ;;; Code: -(eval-when-compile (require 'cl)) ; block, return (require 'tramp) +;; Pacify byte-compiler. +(eval-when-compile + (require 'cl)) + ;; Define SMB method ... ;;;###tramp-autoload (defconst tramp-smb-method "smb" diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index ff090f8257f..29df2bb6577 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -57,9 +57,17 @@ ;;; Code: -(eval-when-compile (require 'cl)) ; ignore-errors (require 'tramp-compat) +;; Pacify byte-compiler. +(eval-when-compile + (require 'cl) + (defvar bkup-backup-directory-info) + (defvar directory-sep-char) + (defvar eshell-path-env) + (defvar file-notify-descriptors) + (defvar outline-regexp)) + ;;; User Customizable Internal Variables: (defgroup tramp nil @@ -3350,7 +3358,6 @@ of." (tramp-error v 'file-notify-error "File notification not supported for `%s'" filename))) -(defvar file-notify-descriptors) (defun tramp-handle-file-notify-rm-watch (proc) "Like `file-notify-rm-watch' for Tramp files." ;; The descriptor must be a process object. @@ -4182,9 +4189,6 @@ Only works for Bourne-like shells." ;;; Integration of eshell.el: -(eval-when-compile - (defvar eshell-path-env)) - ;; eshell.el keeps the path in `eshell-path-env'. We must change it ;; when `default-directory' points to another host. (defun tramp-eshell-directory-change ()