aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2018-03-05 14:29:40 -0500
committerGlenn Morris2018-03-05 14:29:40 -0500
commitbcc80b8fd264352812a5bf5d11232659848cda3d (patch)
treed95cf5171c6d6c15a57f7dd7647ccee7e31222a3
parentbc85cdc16946ad2592450dd6b6ebc42be6421b05 (diff)
downloademacs-bcc80b8fd264352812a5bf5d11232659848cda3d.tar.gz
emacs-bcc80b8fd264352812a5bf5d11232659848cda3d.zip
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."
109 :show-usage 109 :show-usage
110 :usage "[(-u | --user) USER] COMMAND 110 :usage "[(-u | --user) USER] COMMAND
111Execute a COMMAND as the superuser or another USER.") 111Execute a COMMAND as the superuser or another USER.")
112 args ; suppress "unused lexical variable" warning
112 (throw 'eshell-external 113 (throw 'eshell-external
113 (let ((user (or user "root")) 114 (let ((user (or user "root"))
114 (host (or (file-remote-p default-directory 'host) 115 (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.")
956 :show-usage 956 :show-usage
957 :usage "COMMAND... 957 :usage "COMMAND...
958Show wall-clock time elapsed during execution of COMMAND.") 958Show wall-clock time elapsed during execution of COMMAND.")
959 args ; suppress "unused lexical variable" warning
959 (setq eshell-time-start (float-time)) 960 (setq eshell-time-start (float-time))
960 (add-hook 'eshell-post-command-hook 'eshell-show-elapsed-time nil t) 961 (add-hook 'eshell-post-command-hook 'eshell-show-elapsed-time nil t)
961 ;; after setting 962 ;; 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)."
111 ;; `options' is of the form (quote OPTS). 111 ;; `options' is of the form (quote OPTS).
112 (cadr options)))) 112 (cadr options))))
113 (args processed-args)) 113 (args processed-args))
114 ;; Unused lexical variable warning if body does not use `args'.
114 ,@body-forms)) 115 ,@body-forms))
115 116
116;;; Internal Functions: 117;;; 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'."
343 obarray 'boundp)) 343 obarray 'boundp))
344 (pcomplete-here)))) 344 (pcomplete-here))))
345 345
346;; FIXME the real "env" command does more than this, it runs a program
347;; in a modified environment.
346(defun eshell/env (&rest args) 348(defun eshell/env (&rest args)
347 "Implementation of `env' in Lisp." 349 "Implementation of `env' in Lisp."
348 (eshell-init-print-buffer) 350 (eshell-init-print-buffer)
@@ -351,6 +353,7 @@ This function is explicit for adding to `eshell-parse-argument-hook'."
351 '((?h "help" nil nil "show this usage screen") 353 '((?h "help" nil nil "show this usage screen")
352 :external "env" 354 :external "env"
353 :usage "<no arguments>") 355 :usage "<no arguments>")
356 args ; suppress "unused lexical variable" warning
354 (dolist (setting (sort (eshell-environment-variables) 'string-lessp)) 357 (dolist (setting (sort (eshell-environment-variables) 'string-lessp))
355 (eshell-buffered-print setting "\n")) 358 (eshell-buffered-print setting "\n"))
356 (eshell-flush))) 359 (eshell-flush)))