emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r114385: * eshell/esh-util.el (eshell-read-hosts-fil


From: Glenn Morris
Subject: [Emacs-diffs] trunk r114385: * eshell/esh-util.el (eshell-read-hosts-file): Use `filename' arg.
Date: Thu, 19 Sep 2013 02:48:07 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 114385
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Wed 2013-09-18 19:48:01 -0700
message:
  * eshell/esh-util.el (eshell-read-hosts-file): Use `filename' arg.
  (directory-files-and-attributes): Mark unused arg.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/eshell/esh-util.el        eshutil.el-20091113204419-o5vbwnq5f7feedwu-1849
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-09-19 02:42:36 +0000
+++ b/lisp/ChangeLog    2013-09-19 02:48:01 +0000
@@ -1,5 +1,8 @@
 2013-09-19  Glenn Morris  <address@hidden>
 
+       * 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.
 

=== modified file 'lisp/eshell/esh-util.el'
--- a/lisp/eshell/esh-util.el   2013-09-18 02:45:31 +0000
+++ b/lisp/eshell/esh-util.el   2013-09-19 02:48:01 +0000
@@ -477,10 +477,10 @@
 (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 @@
 
 (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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]