]> git.eshelyaron.com Git - emacs.git/commitdiff
(find-lisp-find-dired-insert-file): Pass 'string arg to `file-attributes'.
authorLuc Teirlinck <teirllm@auburn.edu>
Sat, 12 Nov 2005 02:44:51 +0000 (02:44 +0000)
committerLuc Teirlinck <teirllm@auburn.edu>
Sat, 12 Nov 2005 02:44:51 +0000 (02:44 +0000)
(find-lisp-format): The UID and GID can now be strings.

lisp/find-lisp.el

index a7c4e3941d93677ca858fa60b1be470252f9ebd4..19ebe3fae6fc129e99206c7c0ee702cda95e4a8d 100644 (file)
@@ -3,7 +3,7 @@
 ;; Author: Peter Breton
 ;; Created: Fri Mar 26 1999
 ;; Keywords: unix
-;; Time-stamp: <2005-11-09 17:05:07 teirllm>
+;; Time-stamp: <2005-11-11 20:37:50 teirllm>
 
 ;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
 ;;   2005 Free Software Foundation, Inc.
@@ -293,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))))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -309,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)