]> code.delx.au - gnu-emacs/blobdiff - lisp/find-lisp.el
Rename `MS-DOG' into `MS-DOS'.
[gnu-emacs] / lisp / find-lisp.el
index b019fd6ba98198cca1d0b20cb24921ef37280488..5cedaa60e35f3f51fcaf6a7b8a58b7c8b5eea3a6 100644 (file)
@@ -3,10 +3,10 @@
 ;; Author: Peter Breton
 ;; Created: Fri Mar 26 1999
 ;; Keywords: unix
-;; Time-stamp: <2001-07-16 12:42:35 pavel>
+;; Time-stamp: <2006-02-06 13:40:10 ttn>
 
 ;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
-;;   2005 Free Software Foundation, Inc.
+;;   2005, 2006 Free Software Foundation, Inc.
 
 ;; This file is part of GNU Emacs.
 
 
 ;;; Code:
 
+(require 'dired)
+
+(defvar dired-buffers)
+(defvar dired-subdir-alist)
+
 ;; Internal variables
 
 (defvar find-lisp-regexp nil
@@ -195,8 +200,7 @@ It is a function which takes two arguments, the directory and its parent."
        (regexp find-lisp-regexp))
     ;; Expand DIR ("" means default-directory), and make sure it has a
     ;; trailing slash.
-    (setq dir (abbreviate-file-name
-              (file-name-as-directory (expand-file-name dir))))
+    (setq dir (file-name-as-directory (expand-file-name dir)))
     ;; Check that it's really a directory.
     (or (file-directory-p dir)
        (error "find-dired needs a directory: %s" dir))
@@ -289,7 +293,7 @@ It is a function which takes two arguments, the directory and its parent."
 (defun find-lisp-find-dired-insert-file (file buffer)
   (set-buffer buffer)
   (insert find-lisp-line-indent
-         (find-lisp-format file (file-attributes file) (list "")
+         (find-lisp-format file (file-attributes file 'string) (list "")
                          (current-time))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -305,18 +309,16 @@ It is a function which takes two arguments, the directory and its parent."
            (if (memq ?s switches)      ; size in K
                (format "%4d " (1+ (/ (nth 7 file-attr) 1024))))
            (nth 8 file-attr)           ; permission bits
-           ;; numeric uid/gid are more confusing than helpful
-           ;; Emacs should be able to make strings of them.
-           ;; user-login-name and user-full-name could take an
-           ;; optional arg.
            (format " %3d %-8s %-8s %8d "
                    (nth 1 file-attr)   ; no. of links
-                   (if (= (user-uid) (nth 2 file-attr))
-                       (user-login-name)
-                     (int-to-string (nth 2 file-attr)))        ; uid
+                   (if (numberp (nth 2 file-attr))
+                       (int-to-string (nth 2 file-attr))
+                     (nth 2 file-attr)) ; uid
                    (if (eq system-type 'ms-dos)
                        "root"          ; everything is root on MSDOS.
-                     (int-to-string (nth 3 file-attr)))        ; gid
+                     (if (numberp (nth 3 file-attr))
+                         (int-to-string (nth 3 file-attr))
+                       (nth 3 file-attr))) ; gid
                    (nth 7 file-attr)   ; size in bytes
                    )
            (find-lisp-format-time file-attr switches now)
@@ -357,9 +359,5 @@ It is a function which takes two arguments, the directory and its parent."
 
 (provide 'find-lisp)
 
-;; Local Variables:
-;; autocompile: t
-;; End:
-
 ;;; arch-tag: a711374c-f12a-46f6-aa18-ba7d77b9602a
 ;;; find-lisp.el ends here