emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master bcc80b8 2/2: Suppress some unused lexical variable


From: Glenn Morris
Subject: [Emacs-diffs] master bcc80b8 2/2: Suppress some unused lexical variable warnings in eshell
Date: Mon, 5 Mar 2018 14:29:53 -0500 (EST)

branch: master
commit bcc80b8fd264352812a5bf5d11232659848cda3d
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    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.
---
 lisp/eshell/em-tramp.el | 1 +
 lisp/eshell/em-unix.el  | 1 +
 lisp/eshell/esh-opt.el  | 1 +
 lisp/eshell/esh-var.el  | 3 +++
 4 files changed, 6 insertions(+)

diff --git a/lisp/eshell/em-tramp.el b/lisp/eshell/em-tramp.el
index 004c495..9a72f78 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 a18fb85..04c517f 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 3af8fd7..18852ce 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 1af03d3..d400e0a 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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]