aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2013-09-18 19:48:01 -0700
committerGlenn Morris2013-09-18 19:48:01 -0700
commit57a3a53d53bbe41dfb4341dc26c9335a61cc5f48 (patch)
tree24571fdb7fd9377169e954fbe30dd2791e0dd194
parent3261d4af3d61802556793bfbffd7cc5b73bdf023 (diff)
downloademacs-57a3a53d53bbe41dfb4341dc26c9335a61cc5f48.tar.gz
emacs-57a3a53d53bbe41dfb4341dc26c9335a61cc5f48.zip
* eshell/esh-util.el (eshell-read-hosts-file): Use `filename' arg.
(directory-files-and-attributes): Mark unused arg.
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/eshell/esh-util.el8
2 files changed, 8 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index ed6bf661e26..5384713cb40 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,5 +1,8 @@
12013-09-19 Glenn Morris <rgm@gnu.org> 12013-09-19 Glenn Morris <rgm@gnu.org>
2 2
3 * eshell/esh-util.el (eshell-read-hosts-file): Use `filename' arg.
4 (directory-files-and-attributes): Mark unused arg.
5
3 * eshell/em-unix.el (eshell-remove-entries): 6 * eshell/em-unix.el (eshell-remove-entries):
4 Remove unused arg `path'. Update callers. 7 Remove unused arg `path'. Update callers.
5 8
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."
477(defalias 'eshell-user-name 'user-login-name) 477(defalias 'eshell-user-name 'user-login-name)
478 478
479(defun eshell-read-hosts-file (filename) 479(defun eshell-read-hosts-file (filename)
480 "Read in the hosts from the /etc/hosts file." 480 "Read in the hosts from FILENAME, default `eshell-hosts-file'."
481 (let (hosts) 481 (let (hosts)
482 (with-temp-buffer 482 (with-temp-buffer
483 (insert-file-contents eshell-hosts-file) 483 (insert-file-contents (or filename eshell-hosts-file))
484 (goto-char (point-min)) 484 (goto-char (point-min))
485 (while (re-search-forward 485 (while (re-search-forward
486 "^\\([^#[:space:]]+\\)\\s-+\\(\\S-+\\)\\(\\s-*\\(\\S-+\\)\\)?" nil t) 486 "^\\([^#[:space:]]+\\)\\s-+\\(\\S-+\\)\\(\\s-*\\(\\S-+\\)\\)?" nil t)
@@ -563,9 +563,11 @@ Unless optional argument INPLACE is non-nil, return a new string."
563 563
564(defvar ange-cache) 564(defvar ange-cache)
565 565
566;; Partial reimplementation of Emacs's builtin directory-files-and-attributes.
567;; id-format not implemented.
566(and (featurep 'xemacs) 568(and (featurep 'xemacs)
567 (not (fboundp 'directory-files-and-attributes)) 569 (not (fboundp 'directory-files-and-attributes))
568 (defun directory-files-and-attributes (directory &optional full match nosort id-format) 570 (defun directory-files-and-attributes (directory &optional full match nosort _id-format)
569 "Return a list of names of files and their attributes in DIRECTORY. 571 "Return a list of names of files and their attributes in DIRECTORY.
570There are three optional arguments: 572There are three optional arguments:
571If FULL is non-nil, return absolute file names. Otherwise return names 573If FULL is non-nil, return absolute file names. Otherwise return names