mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 18:41:25 -08:00
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.
This commit is contained in:
parent
d3b049e601
commit
170266d096
13 changed files with 161 additions and 140 deletions
|
|
@ -714,6 +714,8 @@ available..."
|
|||
(goto-char (point-min))
|
||||
(resize-temp-buffer-window))))))
|
||||
|
||||
(defvar compilation-scroll-output)
|
||||
|
||||
(defun eshell-grep (command args &optional maybe-use-occur)
|
||||
"Generic service function for the various grep aliases.
|
||||
It calls Emacs's grep utility if the command is not redirecting output,
|
||||
|
|
@ -989,7 +991,7 @@ Show wall-clock time elapsed during execution of COMMAND.")
|
|||
(setq args nil)
|
||||
(setcdr (last args 3) nil))
|
||||
(with-current-buffer
|
||||
(condition-case err
|
||||
(condition-case nil
|
||||
(diff-no-select
|
||||
old new
|
||||
(nil-blank-string (eshell-flatten-and-stringify args)))
|
||||
|
|
@ -1014,6 +1016,8 @@ Show wall-clock time elapsed during execution of COMMAND.")
|
|||
|
||||
(put 'eshell/diff 'eshell-no-numeric-conversions t)
|
||||
|
||||
(defvar locate-history-list)
|
||||
|
||||
(defun eshell/locate (&rest args)
|
||||
"Alias \"locate\" to call Emacs `locate' function."
|
||||
(if (or eshell-plain-locate-behavior
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue