]> git.eshelyaron.com Git - emacs.git/commitdiff
* eshell/esh-util.el (eshell-read-hosts-file): Use `filename' arg.
authorGlenn Morris <rgm@gnu.org>
Thu, 19 Sep 2013 02:48:01 +0000 (19:48 -0700)
committerGlenn Morris <rgm@gnu.org>
Thu, 19 Sep 2013 02:48:01 +0000 (19:48 -0700)
(directory-files-and-attributes): Mark unused arg.

lisp/ChangeLog
lisp/eshell/esh-util.el

index ed6bf661e2650f6734bb9626b5c0d5bc95e81c7a..5384713cb40a28e7a6ff0bb4d6817547ac011552 100644 (file)
@@ -1,5 +1,8 @@
 2013-09-19  Glenn Morris  <rgm@gnu.org>
 
+       * 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.
 
index 6195f3976c11fe4f18256882408e23269336c877..4d53b3fb86dfc32bbf4af7c4ae08036ae9206274 100644 (file)
@@ -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