emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 9f6a598 2/3: Remove some XEmacs compat code from es


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 9f6a598 2/3: Remove some XEmacs compat code from esh*.el
Date: Sat, 5 Oct 2019 11:07:31 -0400 (EDT)

branch: master
commit 9f6a59849f69efd1d8026b040b9e9a397df03499
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Remove some XEmacs compat code from esh*.el
    
    * lisp/eshell/esh-util.el: Remove some XEmacs compat functions.
---
 lisp/eshell/esh-cmd.el  |  3 +--
 lisp/eshell/esh-mode.el | 20 +++++++-------------
 lisp/eshell/esh-util.el | 34 ----------------------------------
 3 files changed, 8 insertions(+), 49 deletions(-)

diff --git a/lisp/eshell/esh-cmd.el b/lisp/eshell/esh-cmd.el
index 83cc599..9bd5de8 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 9120487..5cdbf75 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 353b940..bab4242 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)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]