From 5514ba5c2a30f91458afa711499be96e970db7bd Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 2 Sep 2000 05:36:27 +0000 Subject: [PATCH] (eval-when-compile): Don't lose if esh-module.el's file name is truncated to DOS 8+3 limits. --- lisp/ChangeLog | 5 +++++ lisp/eshell/esh-module.el | 14 ++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0a16adc5b5b..bfe171fe673 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2000-09-02 Eli Zaretskii + + * eshell/esh-module.el (eval-when-compile): Don't lose if + esh-module.el's file name is truncated to DOS 8+3 limits. + 2000-09-01 John Wiegley * pcomplete.el (pcomplete-dirs-or-entries): Added a missing diff --git a/lisp/eshell/esh-module.el b/lisp/eshell/esh-module.el index fec608fc471..edc4cab050d 100644 --- a/lisp/eshell/esh-module.el +++ b/lisp/eshell/esh-module.el @@ -73,8 +73,18 @@ customizing the variable `eshell-modules-list'." (eval-when-compile (when (and (boundp 'byte-compile-current-file) byte-compile-current-file - (equal (file-name-nondirectory byte-compile-current-file) - "esh-module.el")) + (or + (equal (file-name-nondirectory byte-compile-current-file) + "esh-module.el") + ;; When eshell file names are expanded from a wildcard + ;; or by reading the Eshell directory, e.g. when they + ;; say "make recompile" in the lisp directory, Emacs on + ;; MS-DOS sees a truncated name "esh-modu.el" instead of + ;; "esh-module.el". + (and (fboundp 'msdos-long-file-names) + (null (msdos-long-file-names)) + (equal (file-name-nondirectory byte-compile-current-file) + "esh-modu.el")))) (let* ((directory (file-name-directory byte-compile-current-file)) (elc-file (expand-file-name "esh-groups.elc" directory))) (eshell-load-defgroups directory) -- 2.39.5