aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Teirlinck2005-11-12 02:44:51 +0000
committerLuc Teirlinck2005-11-12 02:44:51 +0000
commitdcd6fc38096b340ea72c2a0159ea160bcd56d232 (patch)
treeebdfab66b4f62fbb4a2ecbcab92e303c77838b22
parent81d7d0d631bd1acf5e02459dc75d12a00219b477 (diff)
downloademacs-dcd6fc38096b340ea72c2a0159ea160bcd56d232.tar.gz
emacs-dcd6fc38096b340ea72c2a0159ea160bcd56d232.zip
(find-lisp-find-dired-insert-file): Pass 'string arg to `file-attributes'.
(find-lisp-format): The UID and GID can now be strings.
-rw-r--r--lisp/find-lisp.el18
1 files changed, 8 insertions, 10 deletions
diff --git a/lisp/find-lisp.el b/lisp/find-lisp.el
index a7c4e3941d9..19ebe3fae6f 100644
--- a/lisp/find-lisp.el
+++ b/lisp/find-lisp.el
@@ -3,7 +3,7 @@
3;; Author: Peter Breton 3;; Author: Peter Breton
4;; Created: Fri Mar 26 1999 4;; Created: Fri Mar 26 1999
5;; Keywords: unix 5;; Keywords: unix
6;; Time-stamp: <2005-11-09 17:05:07 teirllm> 6;; Time-stamp: <2005-11-11 20:37:50 teirllm>
7 7
8;; Copyright (C) 1999, 2000, 2002, 2003, 2004, 8;; Copyright (C) 1999, 2000, 2002, 2003, 2004,
9;; 2005 Free Software Foundation, Inc. 9;; 2005 Free Software Foundation, Inc.
@@ -293,7 +293,7 @@ It is a function which takes two arguments, the directory and its parent."
293(defun find-lisp-find-dired-insert-file (file buffer) 293(defun find-lisp-find-dired-insert-file (file buffer)
294 (set-buffer buffer) 294 (set-buffer buffer)
295 (insert find-lisp-line-indent 295 (insert find-lisp-line-indent
296 (find-lisp-format file (file-attributes file) (list "") 296 (find-lisp-format file (file-attributes file 'string) (list "")
297 (current-time)))) 297 (current-time))))
298 298
299;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 299;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -309,18 +309,16 @@ It is a function which takes two arguments, the directory and its parent."
309 (if (memq ?s switches) ; size in K 309 (if (memq ?s switches) ; size in K
310 (format "%4d " (1+ (/ (nth 7 file-attr) 1024)))) 310 (format "%4d " (1+ (/ (nth 7 file-attr) 1024))))
311 (nth 8 file-attr) ; permission bits 311 (nth 8 file-attr) ; permission bits
312 ;; numeric uid/gid are more confusing than helpful
313 ;; Emacs should be able to make strings of them.
314 ;; user-login-name and user-full-name could take an
315 ;; optional arg.
316 (format " %3d %-8s %-8s %8d " 312 (format " %3d %-8s %-8s %8d "
317 (nth 1 file-attr) ; no. of links 313 (nth 1 file-attr) ; no. of links
318 (if (= (user-uid) (nth 2 file-attr)) 314 (if (numberp (nth 2 file-attr))
319 (user-login-name) 315 (int-to-string (nth 2 file-attr))
320 (int-to-string (nth 2 file-attr))) ; uid 316 (nth 2 file-attr)) ; uid
321 (if (eq system-type 'ms-dos) 317 (if (eq system-type 'ms-dos)
322 "root" ; everything is root on MSDOS. 318 "root" ; everything is root on MSDOS.
323 (int-to-string (nth 3 file-attr))) ; gid 319 (if (numberp (nth 3 file-attr))
320 (int-to-string (nth 3 file-attr))
321 (nth 3 file-attr))) ; gid
324 (nth 7 file-attr) ; size in bytes 322 (nth 7 file-attr) ; size in bytes
325 ) 323 )
326 (find-lisp-format-time file-attr switches now) 324 (find-lisp-format-time file-attr switches now)