summaryrefslogtreecommitdiff
path: root/lisp/eshell
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/eshell')
-rw-r--r--lisp/eshell/esh-util.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el
index 6195f3976c1..4d53b3fb86d 100644
--- a/lisp/eshell/esh-util.el
+++ b/lisp/eshell/esh-util.el
@@ -477,10 +477,10 @@ list."
(defalias 'eshell-user-name 'user-login-name)
(defun eshell-read-hosts-file (filename)
- "Read in the hosts from the /etc/hosts file."
+ "Read in the hosts from FILENAME, default `eshell-hosts-file'."
(let (hosts)
(with-temp-buffer
- (insert-file-contents eshell-hosts-file)
+ (insert-file-contents (or filename eshell-hosts-file))
(goto-char (point-min))
(while (re-search-forward
"^\\([^#[:space:]]+\\)\\s-+\\(\\S-+\\)\\(\\s-*\\(\\S-+\\)\\)?" nil t)
@@ -563,9 +563,11 @@ Unless optional argument INPLACE is non-nil, return a new 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)
+ (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