From: Glenn Morris Date: Thu, 19 Sep 2013 02:48:01 +0000 (-0700) Subject: * eshell/esh-util.el (eshell-read-hosts-file): Use `filename' arg. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~1524 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=57a3a53d53bbe41dfb4341dc26c9335a61cc5f48;p=emacs.git * eshell/esh-util.el (eshell-read-hosts-file): Use `filename' arg. (directory-files-and-attributes): Mark unused arg. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index ed6bf661e26..5384713cb40 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2013-09-19 Glenn Morris + * eshell/esh-util.el (eshell-read-hosts-file): Use `filename' arg. + (directory-files-and-attributes): Mark unused arg. + * eshell/em-unix.el (eshell-remove-entries): Remove unused arg `path'. Update callers. 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