1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-03 08:30:09 +00:00

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.
This commit is contained in:
Glenn Morris 2018-03-05 14:29:40 -05:00
parent bc85cdc169
commit bcc80b8fd2
4 changed files with 6 additions and 0 deletions

View File

@ -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)

View File

@ -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

View File

@ -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:

View File

@ -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)))