diff options
| author | Stefan Monnier | 2018-03-10 21:49:22 -0500 |
|---|---|---|
| committer | Stefan Monnier | 2018-03-10 21:49:22 -0500 |
| commit | 6a2d179a477d6d92fe9df78c4eee392cf83d6d4e (patch) | |
| tree | c60724d608097be5de8bb0b5ee7cac978d88de68 | |
| parent | a3f26048a9b115e8dabffaa768128eaccd07dfd3 (diff) | |
| download | emacs-6a2d179a477d6d92fe9df78c4eee392cf83d6d4e.tar.gz emacs-6a2d179a477d6d92fe9df78c4eee392cf83d6d4e.zip | |
eshell-eval-using-options: Avoid compiler warning differently
* lisp/eshell/em-unix.el (eshell/time):
* lisp/eshell/em-tramp.el (eshell/sudo):
* lisp/eshell/esh-var.el (eshell/env): Remove artificial use of `args'.
* lisp/eshell/esh-opt.el (eshell-eval-using-options): Silence warning
when `args' is not used by `body-forms'.
| -rw-r--r-- | lisp/eshell/em-tramp.el | 1 | ||||
| -rw-r--r-- | lisp/eshell/em-unix.el | 1 | ||||
| -rw-r--r-- | lisp/eshell/esh-opt.el | 7 | ||||
| -rw-r--r-- | lisp/eshell/esh-var.el | 1 |
4 files changed, 4 insertions, 6 deletions
diff --git a/lisp/eshell/em-tramp.el b/lisp/eshell/em-tramp.el index 9a72f781fc7..004c4954908 100644 --- a/lisp/eshell/em-tramp.el +++ b/lisp/eshell/em-tramp.el | |||
| @@ -109,7 +109,6 @@ 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 |
| 111 | Execute a COMMAND as the superuser or another USER.") | 111 | Execute a COMMAND as the superuser or another USER.") |
| 112 | args ; suppress "unused lexical variable" warning | ||
| 113 | (throw 'eshell-external | 112 | (throw 'eshell-external |
| 114 | (let ((user (or user "root")) | 113 | (let ((user (or user "root")) |
| 115 | (host (or (file-remote-p default-directory 'host) | 114 | (host (or (file-remote-p default-directory 'host) |
diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index 04c517f82a0..a18fb85507d 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el | |||
| @@ -956,7 +956,6 @@ Summarize disk usage of each FILE, recursively for directories.") | |||
| 956 | :show-usage | 956 | :show-usage |
| 957 | :usage "COMMAND... | 957 | :usage "COMMAND... |
| 958 | Show wall-clock time elapsed during execution of COMMAND.") | 958 | Show wall-clock time elapsed during execution of COMMAND.") |
| 959 | args ; suppress "unused lexical variable" warning | ||
| 960 | (setq eshell-time-start (float-time)) | 959 | (setq eshell-time-start (float-time)) |
| 961 | (add-hook 'eshell-post-command-hook 'eshell-show-elapsed-time nil t) | 960 | (add-hook 'eshell-post-command-hook 'eshell-show-elapsed-time nil t) |
| 962 | ;; after setting | 961 | ;; after setting |
diff --git a/lisp/eshell/esh-opt.el b/lisp/eshell/esh-opt.el index 18852ce5341..b802696306a 100644 --- a/lisp/eshell/esh-opt.el +++ b/lisp/eshell/esh-opt.el | |||
| @@ -95,8 +95,8 @@ BODY-FORMS. If instead an external command is run (because of | |||
| 95 | an unknown option), the tag `eshell-external' will be thrown with | 95 | an unknown option), the tag `eshell-external' will be thrown with |
| 96 | the new process for its value. | 96 | the new process for its value. |
| 97 | 97 | ||
| 98 | Lastly, any remaining arguments will be available in a locally | 98 | Lastly, any remaining arguments will be available in the locally |
| 99 | interned variable `args' (created using a `let' form)." | 99 | let-bound variable `args'." |
| 100 | (declare (debug (form form sexp body))) | 100 | (declare (debug (form form sexp body))) |
| 101 | `(let* ((temp-args | 101 | `(let* ((temp-args |
| 102 | ,(if (memq ':preserve-args (cadr options)) | 102 | ,(if (memq ':preserve-args (cadr options)) |
| @@ -111,7 +111,8 @@ 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 | ;; Silence unused lexical variable warning if body does not use `args'. |
| 115 | (ignore args) | ||
| 115 | ,@body-forms)) | 116 | ,@body-forms)) |
| 116 | 117 | ||
| 117 | ;;; Internal Functions: | 118 | ;;; Internal Functions: |
diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el index d400e0a9be7..b5dce80de8c 100644 --- a/lisp/eshell/esh-var.el +++ b/lisp/eshell/esh-var.el | |||
| @@ -353,7 +353,6 @@ This function is explicit for adding to `eshell-parse-argument-hook'." | |||
| 353 | '((?h "help" nil nil "show this usage screen") | 353 | '((?h "help" nil nil "show this usage screen") |
| 354 | :external "env" | 354 | :external "env" |
| 355 | :usage "<no arguments>") | 355 | :usage "<no arguments>") |
| 356 | args ; suppress "unused lexical variable" warning | ||
| 357 | (dolist (setting (sort (eshell-environment-variables) 'string-lessp)) | 356 | (dolist (setting (sort (eshell-environment-variables) 'string-lessp)) |
| 358 | (eshell-buffered-print setting "\n")) | 357 | (eshell-buffered-print setting "\n")) |
| 359 | (eshell-flush))) | 358 | (eshell-flush))) |