From e003e90c41c0abb357c34eb30553f75148072949 Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Mon, 9 Mar 2020 00:33:53 +0100 Subject: [PATCH] Remove more XEmacs compat code from eshell * lisp/eshell/em-glob.el (eshell-extended-glob): * lisp/eshell/em-ls.el (eshell-do-ls): * lisp/eshell/em-unix.el (eshell/du, eshell-mvcpln-template): * lisp/eshell/esh-util.el (eshell-file-attributes): Remove more XEmacs compat code; no longer let-bind the unused variable ange-cache. --- lisp/eshell/em-glob.el | 4 +--- lisp/eshell/em-ls.el | 3 +-- lisp/eshell/em-unix.el | 7 ++----- lisp/eshell/esh-util.el | 6 ------ 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/lisp/eshell/em-glob.el b/lisp/eshell/em-glob.el index 43483dcd50e..a32a6abe29c 100644 --- a/lisp/eshell/em-glob.el +++ b/lisp/eshell/em-glob.el @@ -232,8 +232,6 @@ resulting regular expression." (regexp-quote (substring pattern matched-in-pattern)) "\\'"))) -(defvar ange-cache) ; XEmacs? See esh-util - (defun eshell-extended-glob (glob) "Return a list of files generated from GLOB, perhaps looking for DIRS-ONLY. This function almost fully supports zsh style filename generation @@ -252,7 +250,7 @@ the form: (INCLUDE-REGEXP EXCLUDE-REGEXP (PRED-FUNC-LIST) (MOD-FUNC-LIST))" (let ((paths (eshell-split-path glob)) - eshell-glob-matches message-shown ange-cache) + eshell-glob-matches message-shown) (unwind-protect (if (and (cdr paths) (file-name-absolute-p (car paths))) diff --git a/lisp/eshell/em-ls.el b/lisp/eshell/em-ls.el index 70b3ad611a1..c1a022ee521 100644 --- a/lisp/eshell/em-ls.el +++ b/lisp/eshell/em-ls.el @@ -239,7 +239,6 @@ scope during the evaluation of TEST-SEXP." (defvar show-recursive) (defvar show-size) (defvar sort-method) -(defvar ange-cache) (defvar dired-flag) ;;; Functions: @@ -406,7 +405,7 @@ Sort entries alphabetically across.") (setq listing-style 'by-columns)) (unless args (setq args (list "."))) - (let ((eshell-ls-exclude-regexp eshell-ls-exclude-regexp) ange-cache) + (let ((eshell-ls-exclude-regexp eshell-ls-exclude-regexp)) (when ignore-pattern (unless (eshell-using-module 'eshell-glob) (error (concat "-I option requires that `eshell-glob'" diff --git a/lisp/eshell/em-unix.el b/lisp/eshell/em-unix.el index 51699a7aa46..fbd3cfbb6fc 100644 --- a/lisp/eshell/em-unix.el +++ b/lisp/eshell/em-unix.el @@ -469,8 +469,6 @@ Remove the DIRECTORY(ies), if they are empty.") (eshell-parse-command (format "tar %s %s" tar-args archive) args)))) -(defvar ange-cache) ; XEmacs? See esh-util - ;; this is to avoid duplicating code... (defmacro eshell-mvcpln-template (command action func query-var force-var &optional preserve) @@ -488,8 +486,7 @@ Remove the DIRECTORY(ies), if they are empty.") (or (not no-dereference) (not (file-symlink-p (car args))))))) (eshell-shorthand-tar-command ,command args) - (let ((target (car (last args))) - ange-cache) + (let ((target (car (last args)))) (setcdr (last args 2) nil) (eshell-shuffle-files ,command ,action args target ,func nil @@ -924,7 +921,7 @@ Summarize disk usage of each FILE, recursively for directories.") ;; filesystem support means nothing under Windows (if (eshell-under-windows-p) (setq only-one-filesystem nil)) - (let ((size 0.0) ange-cache) + (let ((size 0.0)) (while args (if only-one-filesystem (setq only-one-filesystem diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index 0328c1f12fa..ab030ede05b 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el @@ -647,14 +647,8 @@ gid format. Valid values are `string' and `integer', defaulting to (let ((base (file-name-nondirectory file)) (dir (file-name-directory file))) (if (string-equal "" base) (setq base ".")) - (if (boundp 'ange-cache) - (setq entry (cdr (assoc base (cdr (assoc dir ange-cache)))))) (unless entry (setq entry (eshell-parse-ange-ls dir)) - (if (boundp 'ange-cache) - (setq ange-cache - (cons (cons dir entry) - ange-cache))) (if entry (let ((fentry (assoc base (cdr entry)))) (if fentry -- 2.39.2