summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2019-10-05 16:59:13 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2019-10-05 16:59:13 +0200
commit9f6a59849f69efd1d8026b040b9e9a397df03499 (patch)
tree04a5c9f8d78f5cac7add77b243604cfacdfebe4c
parent33dc41043820c3c28e65ffe0010c047d3b9b0e78 (diff)
downloademacs-9f6a59849f69efd1d8026b040b9e9a397df03499.tar.gz
Remove some XEmacs compat code from esh*.el
* lisp/eshell/esh-util.el: Remove some XEmacs compat functions.
-rw-r--r--lisp/eshell/esh-cmd.el3
-rw-r--r--lisp/eshell/esh-mode.el20
-rw-r--r--lisp/eshell/esh-util.el34
3 files changed, 8 insertions, 49 deletions
diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index 83cc5999dc3..9bd5de89837 100644
--- a/lisp/eshell/esh-cmd.el
+++ b/lisp/eshell/esh-cmd.el
@@ -101,8 +101,7 @@
;;; Code:
(require 'esh-util)
-(unless (featurep 'xemacs)
- (require 'eldoc))
+(require 'eldoc)
(require 'esh-arg)
(require 'esh-proc)
(require 'esh-module)
diff --git a/lisp/eshell/esh-mode.el b/lisp/eshell/esh-mode.el
index 91204877f5d..5cdbf754cd9 100644
--- a/lisp/eshell/esh-mode.el
+++ b/lisp/eshell/esh-mode.el
@@ -267,19 +267,13 @@ This is used by `eshell-watch-for-password-prompt'."
(modify-syntax-entry ?\] ")[ " st)
;; All non-word multibyte characters should be `symbol'.
(map-char-table
- (if (featurep 'xemacs)
- (lambda (key _val)
- (and (characterp key)
- (>= (char-int key) 256)
- (/= (char-syntax key) ?w)
- (modify-syntax-entry key "_ " st)))
- (lambda (key _val)
- (and (if (consp key)
- (and (>= (car key) 128)
- (/= (char-syntax (car key)) ?w))
- (and (>= key 256)
- (/= (char-syntax key) ?w)))
- (modify-syntax-entry key "_ " st))))
+ (lambda (key _val)
+ (and (if (consp key)
+ (and (>= (car key) 128)
+ (/= (char-syntax (car key)) ?w))
+ (and (>= key 256)
+ (/= (char-syntax key) ?w)))
+ (modify-syntax-entry key "_ " st)))
(standard-syntax-table))
st))
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el
index 353b9400f2e..bab42423c68 100644
--- a/lisp/eshell/esh-util.el
+++ b/lisp/eshell/esh-util.el
@@ -511,19 +511,6 @@ list."
(eshell-read-hosts eshell-hosts-file 'eshell-host-names
'eshell-host-timestamp)))
-(and (featurep 'xemacs)
- (not (fboundp 'subst-char-in-string))
- (defun subst-char-in-string (fromchar tochar string &optional inplace)
- "Replace FROMCHAR with TOCHAR in STRING each time it occurs.
-Unless optional argument INPLACE is non-nil, return a new string."
- (let ((i (length string))
- (newstr (if inplace string (copy-sequence string))))
- (while (> i 0)
- (setq i (1- i))
- (if (eq (aref newstr i) fromchar)
- (aset newstr i tochar)))
- newstr)))
-
(defsubst eshell-copy-environment ()
"Return an unrelated copy of `process-environment'."
(mapcar 'concat process-environment))
@@ -559,27 +546,6 @@ Unless optional argument INPLACE is non-nil, return a new string."
(substring string 0 sublen)
string)))
-(defvar ange-cache)
-
-;; Partial reimplementation of Emacs's builtin directory-files-and-attributes.
-;; id-format not implemented.
-(and (featurep 'xemacs)
- (not (fboundp 'directory-files-and-attributes))
- (defun directory-files-and-attributes (directory &optional full match nosort _id-format)
- "Return a list of names of files and their attributes in DIRECTORY.
-There are three optional arguments:
-If FULL is non-nil, return absolute file names. Otherwise return names
- that are relative to the specified directory.
-If MATCH is non-nil, mention only file names that match the regexp MATCH.
-If NOSORT is non-nil, the list is not sorted--its order is unpredictable.
- NOSORT is useful if you plan to sort the result yourself."
- (let ((directory (expand-file-name directory)) ange-cache)
- (mapcar
- (function
- (lambda (file)
- (cons file (eshell-file-attributes (expand-file-name file directory)))))
- (directory-files directory full match nosort)))))
-
(defun eshell-directory-files-and-attributes (dir &optional full match nosort id-format)
"Make sure to use the handler for `directory-file-and-attributes'."
(let* ((dir (expand-file-name dir)))