diff options
author | Glenn Morris <rgm@gnu.org> | 2013-09-18 19:48:01 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2013-09-18 19:48:01 -0700 |
commit | 57a3a53d53bbe41dfb4341dc26c9335a61cc5f48 (patch) | |
tree | 24571fdb7fd9377169e954fbe30dd2791e0dd194 /lisp/eshell | |
parent | 3261d4af3d61802556793bfbffd7cc5b73bdf023 (diff) | |
download | emacs-57a3a53d53bbe41dfb4341dc26c9335a61cc5f48.tar.gz |
* eshell/esh-util.el (eshell-read-hosts-file): Use `filename' arg.
(directory-files-and-attributes): Mark unused arg.
Diffstat (limited to 'lisp/eshell')
-rw-r--r-- | lisp/eshell/esh-util.el | 8 |
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 |