From 170266d096bc4d0952bee907532d14503e882bf6 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Thu, 12 Sep 2013 01:20:07 -0400 Subject: Cleanup Eshell to rely less on dynamic scoping. * lisp/eshell/esh-opt.el (eshell-eval-using-options): Don't bind usage-msg, last-value, and ext-command here. Bind `args' closer to `body'. (temp-args, last-value, usage-msg, ext-command, args): Don't defvar. (eshell--args): Declare new dynamic var. (eshell-do-opt): Add argument `args'. Bind our own usage-msg, last-value, and ext-command. Pass `args' to `body'. (eshell-process-args): Bind eshell--args. (eshell-set-option): Use eshell--args. * lisp/eshell/eshell.el (eshell): Use derived-mode-p. * lisp/eshell/esh-var.el (eshell-parse-variable): Use backquote. (eshell-parse-variable-ref): Remove unused vars `end' and `err'. (eshell-glob-function): Declare. * lisp/eshell/esh-util.el: Require cl-lib. (eshell-read-hosts-file): Avoid add-to-list. * lisp/eshell/esh-cmd.el (eshell-parse-lisp-argument): Remove unused var `err'. * lisp/eshell/em-unix.el (compilation-scroll-output, locate-history-list): Declare. (eshell/diff): Remove unused var `err'. * lisp/eshell/em-rebind.el (eshell-delete-backward-char): Remove unused arg `killflag'. * lisp/eshell/em-pred.el (eshell-parse-modifiers): Remove unused var `err'. * lisp/eshell/em-ls.el (eshell-ls-highlight-alist): Move defvars before first use. * lisp/eshell/em-glob.el (eshell-glob-matches, message-shown): Move declaration before first use. * lisp/eshell/em-alias.el (eshell-maybe-replace-by-alias): Use backquotes. * autorevert.el (auto-revert-notify-handler): Use `cl-dolist' since we rely on cl-return. --- lisp/eshell/esh-arg.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/eshell/esh-arg.el') diff --git a/lisp/eshell/esh-arg.el b/lisp/eshell/esh-arg.el index d7dfd27d8d3..e3a12d5ece5 100644 --- a/lisp/eshell/esh-arg.el +++ b/lisp/eshell/esh-arg.el @@ -278,7 +278,7 @@ Point is left at the end of the arguments." (eshell-resolve-current-argument) eshell-current-argument)) -(defsubst eshell-operator (&rest args) +(defsubst eshell-operator (&rest _args) "A stub function that generates an error if a floating operator is found." (error "Unhandled operator in input text")) -- cgit v1.2.3