From 5d89d9d256eed9bf4ebb982be28e50f7c4fc9e7c Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Thu, 15 Aug 2013 16:29:08 +0200 Subject: [PATCH] Remove byte compiler warnings, visible when compiling with `byte-compile-force-lexical-warnings' set to t. * net/tramp.el (tramp-debug-message, tramp-message, tramp-error) (tramp-error-with-buffer): Rename ARGS to ARGUMENTS and BUFFER to BUF. (tramp-handle-unhandled-file-name-directory) (tramp-handle-file-notify-add-watch, tramp-action-login) (tramp-action-succeed, tramp-action-permission-denied) (tramp-action-terminal, tramp-action-process-alive): Prefix unused arguments with "_". * net/tramp-adb.el (tramp-adb-parse-device-names) (tramp-adb-handle-insert-directory, tramp-adb-handle-delete-file) (tramp-adb-handle-copy-file): Prefix unused arguments with "_". (tramp-adb-handle-file-truename): Remove unused arguments. * net/tramp-cache.el (tramp-flush-directory-property) (tramp-flush-connection-property, tramp-list-connections) (tramp-parse-connection-properties): Prefix unused arguments with "_". * net/tramp-compat.el (tramp-compat-make-temp-file): Rename FILENAME to F. * net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch) (tramp-gvfs-handle-write-region, tramp-bluez-parse-device-names) (tramp-zeroconf-parse-workstation-device-names) (tramp-zeroconf-parse-webdav-device-names) (tramp-synce-parse-device-names): Prefix unused arguments with "_". * net/tramp-gw.el (tramp-gw-gw-proc-sentinel) (tramp-gw-aux-proc-sentinel): Prefix unused arguments with "_". * net/tramp-sh.el (tramp-sh-handle-file-truename): Remove unused arguments. (tramp-sh-handle-copy-file, tramp-sh-handle-dired-compress-file) (tramp-sh-handle-insert-file-contents-literally) (tramp-sh-handle-file-notify-add-watch): Prefix unused arguments with "_". (tramp-do-copy-or-rename-file, tramp-barf-if-no-shell-prompt): Remove unused variables. * net/tramp-smb.el (tramp-smb-handle-copy-directory) (tramp-smb-handle-copy-file, tramp-smb-handle-delete-file) (tramp-smb-read-file-entry): Prefix unused arguments with "_". * net/tramp-uu.el (tramp-uu-b64-alphabet, tramp-uu-b64-char-to-byte): Make them a defconst. (tramp-uuencode-region): Remove unused variable. --- lisp/ChangeLog | 51 ++++++++++++++++++++++++++++++++++++++++ lisp/net/tramp-adb.el | 10 ++++---- lisp/net/tramp-cache.el | 8 +++---- lisp/net/tramp-compat.el | 6 ++--- lisp/net/tramp-gvfs.el | 12 +++++----- lisp/net/tramp-gw.el | 4 ++-- lisp/net/tramp-sh.el | 15 ++++++------ lisp/net/tramp-smb.el | 8 +++---- lisp/net/tramp-uu.el | 5 ++-- lisp/net/tramp.el | 48 ++++++++++++++++++------------------- 10 files changed, 108 insertions(+), 59 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 4b9ea280f98..bcab8de10a4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,54 @@ +2013-08-15 Michael Albinus + + Remove byte compiler warnings, visible when compiling with + `byte-compile-force-lexical-warnings' set to t. + + * net/tramp.el (tramp-debug-message, tramp-message, tramp-error) + (tramp-error-with-buffer): Rename ARGS to ARGUMENTS and BUFFER to BUF. + (tramp-handle-unhandled-file-name-directory) + (tramp-handle-file-notify-add-watch, tramp-action-login) + (tramp-action-succeed, tramp-action-permission-denied) + (tramp-action-terminal, tramp-action-process-alive): Prefix unused + arguments with "_". + + * net/tramp-adb.el (tramp-adb-parse-device-names) + (tramp-adb-handle-insert-directory, tramp-adb-handle-delete-file) + (tramp-adb-handle-copy-file): Prefix unused arguments with "_". + (tramp-adb-handle-file-truename): Remove unused arguments. + + * net/tramp-cache.el (tramp-flush-directory-property) + (tramp-flush-connection-property, tramp-list-connections) + (tramp-parse-connection-properties): Prefix unused arguments with "_". + + * net/tramp-compat.el (tramp-compat-make-temp-file): Rename + FILENAME to F. + + * net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch) + (tramp-gvfs-handle-write-region, tramp-bluez-parse-device-names) + (tramp-zeroconf-parse-workstation-device-names) + (tramp-zeroconf-parse-webdav-device-names) + (tramp-synce-parse-device-names): Prefix unused arguments with "_". + + * net/tramp-gw.el (tramp-gw-gw-proc-sentinel) + (tramp-gw-aux-proc-sentinel): Prefix unused arguments with "_". + + * net/tramp-sh.el (tramp-sh-handle-file-truename): Remove unused + arguments. + (tramp-sh-handle-copy-file, tramp-sh-handle-dired-compress-file) + (tramp-sh-handle-insert-file-contents-literally) + (tramp-sh-handle-file-notify-add-watch): Prefix unused arguments + with "_". + (tramp-do-copy-or-rename-file, tramp-barf-if-no-shell-prompt): + Remove unused variables. + + * net/tramp-smb.el (tramp-smb-handle-copy-directory) + (tramp-smb-handle-copy-file, tramp-smb-handle-delete-file) + (tramp-smb-read-file-entry): Prefix unused arguments with "_". + + * net/tramp-uu.el (tramp-uu-b64-alphabet, tramp-uu-b64-char-to-byte): + Make them a defconst. + (tramp-uuencode-region): Remove unused variable. + 2013-08-14 Juanma Barranquero * frameset.el (frameset--prop-setter): New function. diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 33e9e5aa44b..389edf1c919 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -174,7 +174,7 @@ pass to the OPERATION." (tramp-run-real-handler operation args)))) ;;;###tramp-autoload -(defun tramp-adb-parse-device-names (ignore) +(defun tramp-adb-parse-device-names (_ignore) "Return a list of (nil host) tuples allowed to access." (with-timeout (10) (with-temp-buffer @@ -224,7 +224,7 @@ pass to the OPERATION." ;; This is derived from `tramp-sh-handle-file-truename'. Maybe the ;; code could be shared? -(defun tramp-adb-handle-file-truename (filename &optional counter prev-dirs) +(defun tramp-adb-handle-file-truename (filename) "Like `file-truename' for Tramp files." (with-parsed-tramp-file-name (expand-file-name filename) nil (with-tramp-file-property v localname "file-truename" @@ -416,7 +416,7 @@ Convert (\"-al\") to (\"-a\" \"-l\"). Remove arguments like \"--dired\"." switches)))))) (defun tramp-adb-handle-insert-directory - (filename switches &optional wildcard full-directory-p) + (filename switches &optional _wildcard _full-directory-p) "Like `insert-directory' for Tramp files." (when (stringp switches) (setq switches (tramp-adb--gnu-switches-to-ash (split-string switches)))) @@ -518,7 +518,7 @@ Emacs dired can't find files." (tramp-shell-quote-argument localname)) "Couldn't delete %s" directory))) -(defun tramp-adb-handle-delete-file (filename &optional trash) +(defun tramp-adb-handle-delete-file (filename &optional _trash) "Like `delete-file' for Tramp files." (setq filename (expand-file-name filename)) (with-parsed-tramp-file-name filename nil @@ -651,7 +651,7 @@ But handle the case, if the \"test\" command is not available." (defun tramp-adb-handle-copy-file (filename newname &optional ok-if-already-exists keep-date - preserve-uid-gid preserve-extended-attributes) + _preserve-uid-gid _preserve-extended-attributes) "Like `copy-file' for Tramp files. PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." (setq filename (expand-file-name filename) diff --git a/lisp/net/tramp-cache.el b/lisp/net/tramp-cache.el index f7f570590c8..118be597433 100644 --- a/lisp/net/tramp-cache.el +++ b/lisp/net/tramp-cache.el @@ -187,7 +187,7 @@ Remove also properties of all files in subdirectories." 'directory-file-name (list directory)))) (tramp-message key 8 "%s" directory) (maphash - (lambda (key value) + (lambda (key _value) (when (and (stringp (tramp-file-name-localname key)) (string-match directory (tramp-file-name-localname key))) (remhash key tramp-cache-data))) @@ -273,7 +273,7 @@ KEY identifies the connection, it is either a process or a vector." (let ((hash (gethash key tramp-cache-data)) properties) (when (hash-table-p hash) - (maphash (lambda (x y) (add-to-list 'properties x 'append)) hash)) + (maphash (lambda (x _y) (add-to-list 'properties x 'append)) hash)) properties)) (setq tramp-cache-data-changed t) (remhash key tramp-cache-data)) @@ -304,7 +304,7 @@ KEY identifies the connection, it is either a process or a vector." "Return a list of all known connection vectors according to `tramp-cache'." (let (result) (maphash - (lambda (key value) + (lambda (key _value) (when (and (vectorp key) (null (aref key 3))) (add-to-list 'result key))) tramp-cache-data) @@ -368,7 +368,7 @@ This function is added always in `tramp-get-completion-function' for all methods. Resulting data are derived from connection history." (let (res) (maphash - (lambda (key value) + (lambda (key _value) (if (and (vectorp key) (string-equal method (tramp-file-name-method key)) (not (tramp-file-name-localname key))) diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index 2b0ea74c492..c42a29981b7 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -238,14 +238,14 @@ this is the function `temp-directory'." ;; `make-temp-file' exists in Emacs only. On XEmacs, we use our own ;; implementation with `make-temp-name', creating the temporary file ;; immediately in order to avoid a security hole. -(defsubst tramp-compat-make-temp-file (filename &optional dir-flag) +(defsubst tramp-compat-make-temp-file (f &optional dir-flag) "Create a temporary file (compat function). -Add the extension of FILENAME, if existing." +Add the extension of F, if existing." (let* (file-name-handler-alist (prefix (expand-file-name (symbol-value 'tramp-temp-name-prefix) (tramp-compat-temporary-file-directory))) - (extension (file-name-extension filename t)) + (extension (file-name-extension f t)) result) (condition-case nil (setq result diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 5bb30b04643..d0270aabacc 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -923,7 +923,7 @@ is no information where to trace the message.") v (concat localname filename) "file-name-all-completions" result)))))))) -(defun tramp-gvfs-handle-file-notify-add-watch (file-name flags callback) +(defun tramp-gvfs-handle-file-notify-add-watch (file-name _flags _callback) "Like `file-notify-add-watch' for Tramp files." (setq file-name (expand-file-name file-name)) (with-parsed-tramp-file-name file-name nil @@ -1093,7 +1093,7 @@ is no information where to trace the message.") (tramp-flush-file-property v localname)))))) (defun tramp-gvfs-handle-write-region - (start end filename &optional append visit lockname confirm) + (start end filename &optional _append visit _lockname confirm) "Like `write-region' for Tramp files." (with-parsed-tramp-file-name filename nil ;; XEmacs takes a coding system as the seventh argument, not `confirm'. @@ -1653,7 +1653,7 @@ be used." :system nil nil tramp-bluez-interface-adapter "DeviceFound" 'tramp-bluez-device-found) -(defun tramp-bluez-parse-device-names (ignore) +(defun tramp-bluez-parse-device-names (_ignore) "Return a list of (nil host) tuples allowed to access." (mapcar (lambda (x) (list nil (car x))) @@ -1667,14 +1667,14 @@ be used." ;; D-Bus zeroconf functions. -(defun tramp-zeroconf-parse-workstation-device-names (ignore) +(defun tramp-zeroconf-parse-workstation-device-names (_ignore) "Return a list of (user host) tuples allowed to access." (mapcar (lambda (x) (list nil (zeroconf-service-host x))) (zeroconf-list-services "_workstation._tcp"))) -(defun tramp-zeroconf-parse-webdav-device-names (ignore) +(defun tramp-zeroconf-parse-webdav-device-names (_ignore) "Return a list of (user host) tuples allowed to access." (mapcar (lambda (x) @@ -1724,7 +1724,7 @@ They are retrieved from the hal daemon." (tramp-message tramp-gvfs-dbus-event-vector 10 "%s" tramp-synce-devices) tramp-synce-devices)) -(defun tramp-synce-parse-device-names (ignore) +(defun tramp-synce-parse-device-names (_ignore) "Return a list of (nil host) tuples allowed to access." (mapcar (lambda (x) (list nil x)) diff --git a/lisp/net/tramp-gw.el b/lisp/net/tramp-gw.el index 13f2964f938..f7c6eba4006 100644 --- a/lisp/net/tramp-gw.el +++ b/lisp/net/tramp-gw.el @@ -96,7 +96,7 @@ (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 @@ -105,7 +105,7 @@ (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'. diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index f9e68d0dad0..5460bd00d6c 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -938,7 +938,7 @@ target of the symlink differ." (tramp-shell-quote-argument l-localname)) t)))) -(defun tramp-sh-handle-file-truename (filename &optional counter prev-dirs) +(defun tramp-sh-handle-file-truename (filename) "Like `file-truename' for Tramp files." (with-parsed-tramp-file-name (expand-file-name filename) nil (tramp-make-tramp-file-name method user host @@ -1837,7 +1837,7 @@ tramp-sh-handle-file-name-all-completions: internal error accessing `%s': `%s'" 'copy-file (list filename newname ok-if-already-exists keep-date))))) (defun tramp-sh-handle-copy-directory - (dirname newname &optional keep-date parents copy-contents) + (dirname newname &optional keep-date parents _copy-contents) "Like `copy-directory' for Tramp files." (let ((t1 (tramp-tramp-file-p dirname)) (t2 (tramp-tramp-file-p newname))) @@ -1911,8 +1911,7 @@ file names." (t2 (tramp-tramp-file-p newname)) (length (nth 7 (file-attributes (file-truename filename)))) (attributes (and preserve-extended-attributes - (apply 'file-extended-attributes (list filename)))) - pr tm) + (apply 'file-extended-attributes (list filename))))) (with-parsed-tramp-file-name (if t1 filename newname) nil (when (and (not ok-if-already-exists) (file-exists-p newname)) @@ -2433,7 +2432,7 @@ This is like `dired-recursive-delete-directory' for Tramp files." (tramp-error v 'file-error "Failed to recursively delete %s" filename)))) -(defun tramp-sh-handle-dired-compress-file (file &rest ok-flag) +(defun tramp-sh-handle-dired-compress-file (file &rest _ok-flag) "Like `dired-compress-file' for Tramp files." ;; OK-FLAG is valid for XEmacs only, but not implemented. ;; Code stolen mainly from dired-aux.el. @@ -2978,7 +2977,7 @@ the result will be a local, non-Tramp, filename." (inhibit-file-name-operation 'insert-file-contents)) (unwind-protect (progn - (fset 'find-buffer-file-type (lambda (filename) t)) + (fset 'find-buffer-file-type (lambda (_filename) t)) (insert-file-contents filename visit beg end replace)) ;; Save exit. (if find-buffer-file-type-function @@ -3383,7 +3382,7 @@ Fall back to normal file name handler if no Tramp handler exists." ;; Default file name handlers, we don't care. (t (tramp-run-real-handler operation args))))))) -(defun tramp-sh-handle-file-notify-add-watch (file-name flags callback) +(defun tramp-sh-handle-file-notify-add-watch (file-name flags _callback) "Like `file-notify-add-watch' for Tramp files." (setq file-name (expand-file-name file-name)) (with-parsed-tramp-file-name file-name nil @@ -3749,7 +3748,7 @@ file exists and nonzero exit status otherwise." Looks at process PROC to see if a shell prompt appears in TIMEOUT seconds. If not, it produces an error message with the given ERROR-ARGS." (let ((vec (tramp-get-connection-property proc "vector" nil))) - (condition-case err + (condition-case nil (tramp-wait-for-regexp proc timeout (format diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 29847556dfe..0dd9286da2d 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -355,7 +355,7 @@ pass to the OPERATION." (throw 'tramp-action 'ok))))) (defun tramp-smb-handle-copy-directory - (dirname newname &optional keep-date parents copy-contents) + (dirname newname &optional keep-date parents _copy-contents) "Like `copy-directory' for Tramp files." (setq dirname (expand-file-name dirname) newname (expand-file-name newname)) @@ -492,7 +492,7 @@ pass to the OPERATION." (defun tramp-smb-handle-copy-file (filename newname &optional ok-if-already-exists keep-date - preserve-uid-gid preserve-extended-attributes) + _preserve-uid-gid _preserve-extended-attributes) "Like `copy-file' for Tramp files. KEEP-DATE has no effect in case NEWNAME resides on an SMB server. PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." @@ -571,7 +571,7 @@ PRESERVE-UID-GID and PRESERVE-EXTENDED-ATTRIBUTES are completely ignored." (tramp-error v 'file-error "%s `%s'" (match-string 0) directory)))))) -(defun tramp-smb-handle-delete-file (filename &optional trash) +(defun tramp-smb-handle-delete-file (filename &optional _trash) "Like `delete-file' for Tramp files." (setq filename (expand-file-name filename)) (when (file-exists-p filename) @@ -1497,7 +1497,7 @@ Result is the list (LOCALNAME MODE SIZE MTIME)." "%s%s" (if (string-match "D" mode) "d" "-") (mapconcat - (lambda (x) "") " " + (lambda (_x) "") " " (concat "r" (if (string-match "R" mode) "-" "w") "x")))) line (substring line 0 -6)) (return)) diff --git a/lisp/net/tramp-uu.el b/lisp/net/tramp-uu.el index c64d8dfa046..6cf5baeccd8 100644 --- a/lisp/net/tramp-uu.el +++ b/lisp/net/tramp-uu.el @@ -28,11 +28,11 @@ ;;; Code: -(defvar tramp-uu-b64-alphabet +(defconst tramp-uu-b64-alphabet "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" "Mapping from base64-encoded character to the byte it represents.") -(defvar tramp-uu-b64-char-to-byte +(defconst tramp-uu-b64-char-to-byte (let ((i 0)) (mapcar (lambda (c) (prog1 @@ -55,7 +55,6 @@ ;; First we base64 encode the region, then we transmogrify that into ;; uu encoding. (let ((len (base64-encode-region beg end t)) - (padding 0) i c) (save-excursion (goto-char beg) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 8ce5f2eae9b..ff090f8257f 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1417,10 +1417,10 @@ The outline level is equal to the verbosity of the Tramp message." (set (make-local-variable 'outline-level) 'tramp-debug-outline-level)) (current-buffer))) -(defsubst tramp-debug-message (vec fmt-string &rest args) +(defsubst tramp-debug-message (vec fmt-string &rest arguments) "Append message to debug buffer. Message is formatted with FMT-STRING as control string and the remaining -ARGS to actually emit the message (if applicable)." +ARGUMENTS to actually emit the message (if applicable)." (when (get-buffer (tramp-buffer-name vec)) (with-current-buffer (tramp-get-debug-buffer vec) (goto-char (point-max)) @@ -1480,14 +1480,14 @@ ARGS to actually emit the message (if applicable)." ; (1+ (count-lines (point-min) (cdr ffn))))))) (insert (format "%s " fn))) ;; The message. - (insert (apply 'format fmt-string args))))) + (insert (apply 'format fmt-string arguments))))) (defvar tramp-message-show-message t "Show Tramp message in the minibuffer. This variable is used to disable messages from `tramp-error'. The messages are visible anyway, because an error is raised.") -(defsubst tramp-message (vec-or-proc level fmt-string &rest args) +(defsubst tramp-message (vec-or-proc level fmt-string &rest arguments) "Emit a message depending on verbosity level. VEC-OR-PROC identifies the Tramp buffer to use. It can be either a vector or a process. LEVEL says to be quiet if `tramp-verbose' is @@ -1498,7 +1498,7 @@ The message is also logged into the debug buffer when `tramp-verbose' is greater than or equal 4. Calls functions `message' and `tramp-debug-message' with FMT-STRING as -control string and the remaining ARGS to actually emit the message (if +control string and the remaining ARGUMENTS to actually emit the message (if applicable)." (ignore-errors (when (<= level tramp-verbose) @@ -1514,7 +1514,7 @@ applicable)." ((= level 2) "Warning: ") (t "Tramp: ")) fmt-string) - args)) + arguments)) ;; Log only when there is a minimum level. (when (>= tramp-verbose 4) (when (and vec-or-proc @@ -1527,17 +1527,17 @@ applicable)." (apply 'tramp-debug-message vec-or-proc (concat (format "(%d) # " level) fmt-string) - args))))))) + arguments))))))) (defsubst tramp-backtrace (vec-or-proc) "Dump a backtrace into the debug buffer. This function is meant for debugging purposes." (tramp-message vec-or-proc 10 "\n%s" (with-output-to-string (backtrace)))) -(defsubst tramp-error (vec-or-proc signal fmt-string &rest args) +(defsubst tramp-error (vec-or-proc signal fmt-string &rest arguments) "Emit an error. VEC-OR-PROC identifies the connection to use, SIGNAL is the -signal identifier to be raised, remaining args passed to +signal identifier to be raised, remaining arguments passed to `tramp-message'. Finally, signal SIGNAL is raised." (let (tramp-message-show-message) (tramp-backtrace vec-or-proc) @@ -1546,16 +1546,16 @@ signal identifier to be raised, remaining args passed to (error-message-string (list signal (get signal 'error-message) - (apply 'format fmt-string args)))) - (signal signal (list (apply 'format fmt-string args))))) + (apply 'format fmt-string arguments)))) + (signal signal (list (apply 'format fmt-string arguments))))) (defsubst tramp-error-with-buffer - (buffer vec-or-proc signal fmt-string &rest args) - "Emit an error, and show BUFFER. -If BUFFER is nil, show the connection buffer. Wait for 30\", or until + (buf vec-or-proc signal fmt-string &rest arguments) + "Emit an error, and show BUF. +If BUF is nil, show the connection buf. Wait for 30\", or until an input event arrives. The other arguments are passed to `tramp-error'." (save-window-excursion - (let* ((buf (or (and (bufferp buffer) buffer) + (let* ((buf (or (and (bufferp buf) buf) (and (processp vec-or-proc) (process-buffer vec-or-proc)) (and (vectorp vec-or-proc) (tramp-get-connection-buffer vec-or-proc)))) @@ -1563,7 +1563,7 @@ an input event arrives. The other arguments are passed to `tramp-error'." (and buf (with-current-buffer buf (tramp-dissect-file-name default-directory)))))) (unwind-protect - (apply 'tramp-error vec-or-proc signal fmt-string args) + (apply 'tramp-error vec-or-proc signal fmt-string arguments) ;; Save exit. (when (and buf tramp-message-show-message @@ -1572,7 +1572,7 @@ an input event arrives. The other arguments are passed to `tramp-error'." (let ((enable-recursive-minibuffers t)) ;; `tramp-error' does not show messages. So we must do it ;; ourselves. - (message fmt-string args) + (message fmt-string arguments) ;; Show buffer. (pop-to-buffer buf) (discard-input) @@ -3281,7 +3281,7 @@ beginning of local filename are not substituted." (setq filename (concat filename "/")))) (tramp-run-real-handler 'substitute-in-file-name (list filename))))) -(defun tramp-handle-unhandled-file-name-directory (filename) +(defun tramp-handle-unhandled-file-name-directory (_filename) "Like `unhandled-file-name-directory' for Tramp files." ;; With Emacs 23, we could simply return `nil'. But we must keep it ;; for backward compatibility. @@ -3341,7 +3341,7 @@ of." ;; only if that agrees with the buffer's record. (t (equal mt '(-1 65535)))))))))) -(defun tramp-handle-file-notify-add-watch (filename flags callback) +(defun tramp-handle-file-notify-add-watch (filename _flags _callback) "Like `file-notify-add-watch' for Tramp files." ;; This is the default handler. tramp-gvfs.el and tramp-sh.el have ;; its own one. @@ -3365,7 +3365,7 @@ of." ;; prompts from the remote host. See the variable ;; `tramp-actions-before-shell' for usage of these functions. -(defun tramp-action-login (proc vec) +(defun tramp-action-login (_proc vec) "Send the login name." (when (not (stringp tramp-current-user)) (setq tramp-current-user @@ -3392,11 +3392,11 @@ of." ;; Hide password prompt. (narrow-to-region (point-max) (point-max))))) -(defun tramp-action-succeed (proc vec) +(defun tramp-action-succeed (_proc _vec) "Signal success in finding shell prompt." (throw 'tramp-action 'ok)) -(defun tramp-action-permission-denied (proc vec) +(defun tramp-action-permission-denied (proc _vec) "Signal permission denied." (kill-process proc) (throw 'tramp-action 'permission-denied)) @@ -3429,7 +3429,7 @@ See also `tramp-action-yesno'." (tramp-message vec 6 "\n%s" (buffer-string))) (tramp-send-string vec (concat "y" tramp-local-end-of-line))))) -(defun tramp-action-terminal (proc vec) +(defun tramp-action-terminal (_proc vec) "Tell the remote host which terminal type to use. The terminal type can be configured with `tramp-terminal-type'." (tramp-message vec 5 "Setting `%s' as terminal type." tramp-terminal-type) @@ -3437,7 +3437,7 @@ The terminal type can be configured with `tramp-terminal-type'." (tramp-message vec 6 "\n%s" (buffer-string))) (tramp-send-string vec (concat tramp-terminal-type tramp-local-end-of-line))) -(defun tramp-action-process-alive (proc vec) +(defun tramp-action-process-alive (proc _vec) "Check, whether a process has finished." (unless (memq (process-status proc) '(run open)) (throw 'tramp-action 'process-died))) -- 2.39.2