summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Morris <rgm@gnu.org>2018-03-05 14:29:40 -0500
committerGlenn Morris <rgm@gnu.org>2018-03-05 14:29:40 -0500
commitbcc80b8fd264352812a5bf5d11232659848cda3d (patch)
treed95cf5171c6d6c15a57f7dd7647ccee7e31222a3
parentbc85cdc16946ad2592450dd6b6ebc42be6421b05 (diff)
downloademacs-bcc80b8fd264352812a5bf5d11232659848cda3d.tar.gz
Suppress some unused lexical variable warnings in eshell
* lisp/eshell/em-tramp.el (eshell/sudo): * lisp/eshell/em-unix.el (eshell/time): * lisp/eshell/esh-var.el (eshell/env): Pretend to use "args" to quieten compiler.
-rw-r--r--lisp/eshell/em-tramp.el1
-rw-r--r--lisp/eshell/em-unix.el1
-rw-r--r--lisp/eshell/esh-opt.el1
-rw-r--r--lisp/eshell/esh-var.el3
4 files changed, 6 insertions, 0 deletions
diff --git a/lisp/eshell/em-tramp.el b/lisp/eshell/em-tramp.el
index 004c4954908..9a72f781fc7 100644
--- a/lisp/eshell/em-tramp.el
+++ b/lisp/eshell/em-tramp.el
@@ -109,6 +109,7 @@ Uses the system sudo through TRAMP's sudo method."
:show-usage
:usage "[(-u | --user) USER] COMMAND
Execute a COMMAND as the superuser or another USER.")
+ args ; suppress "unused lexical variable" warning
(throw 'eshell-external
(let ((user (or user "root"))
(host (or (file-remote-p default-directory 'host)
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el
index a18fb85507d..04c517f82a0 100644
--- a/lisp/eshell/em-unix.el
+++ b/lisp/eshell/em-unix.el
@@ -956,6 +956,7 @@ Summarize disk usage of each FILE, recursively for directories.")
:show-usage
:usage "COMMAND...
Show wall-clock time elapsed during execution of COMMAND.")
+ args ; suppress "unused lexical variable" warning
(setq eshell-time-start (float-time))
(add-hook 'eshell-post-command-hook 'eshell-show-elapsed-time nil t)
;; after setting
diff --git a/lisp/eshell/esh-opt.el b/lisp/eshell/esh-opt.el
index 3af8fd7cacb..18852ce5341 100644
--- a/lisp/eshell/esh-opt.el
+++ b/lisp/eshell/esh-opt.el
@@ -111,6 +111,7 @@ interned variable `args' (created using a `let' form)."
;; `options' is of the form (quote OPTS).
(cadr options))))
(args processed-args))
+ ;; Unused lexical variable warning if body does not use `args'.
,@body-forms))
;;; Internal Functions:
diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el
index 1af03d367c3..d400e0a9be7 100644
--- a/lisp/eshell/esh-var.el
+++ b/lisp/eshell/esh-var.el
@@ -343,6 +343,8 @@ This function is explicit for adding to `eshell-parse-argument-hook'."
obarray 'boundp))
(pcomplete-here))))
+;; FIXME the real "env" command does more than this, it runs a program
+;; in a modified environment.
(defun eshell/env (&rest args)
"Implementation of `env' in Lisp."
(eshell-init-print-buffer)
@@ -351,6 +353,7 @@ This function is explicit for adding to `eshell-parse-argument-hook'."
'((?h "help" nil nil "show this usage screen")
:external "env"
:usage "<no arguments>")
+ args ; suppress "unused lexical variable" warning
(dolist (setting (sort (eshell-environment-variables) 'string-lessp))
(eshell-buffered-print setting "\n"))
(eshell-flush)))