X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/7c420169baa7c50428589cca7f8eda71b462eb15..1ddd96f5cf0b06846edd03d6b225c31206cee0b7:/lisp/ls-lisp.el diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index 58ed6685dc..14a8cabf1a 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el @@ -1,7 +1,6 @@ ;;; ls-lisp.el --- emulate insert-directory completely in Emacs Lisp -;; Copyright (C) 1992, 1994, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; Copyright (C) 1992, 1994, 2000-2011 Free Software Foundation, Inc. ;; Author: Sebastian Kremer ;; Modified by: Francis J. Wright @@ -63,8 +62,6 @@ ;;; Code: -(eval-when-compile (require 'cl)) - (defgroup ls-lisp nil "Emulate the ls program completely in Emacs Lisp." :version "21.1" @@ -332,7 +329,7 @@ not contain `d', so that a full listing is expected." (max-gid-len 0) (max-file-size 0) ;; do all bindings here for speed - total-line files elt short file-size fil attr + total-line files elt short file-size attr fuid fgid uid-len gid-len) (cond ((memq ?A switches) (setq file-alist @@ -727,13 +724,7 @@ All ls time options, namely c, t and u, are handled." ls-lisp-filesize-f-fmt ls-lisp-filesize-d-fmt) file-size) - (if (< file-size 1024) - (format " %4d" file-size) - (do ((file-size (/ file-size 1024.0) (/ file-size 1024.0)) - ;; kilo, mega, giga, tera, peta, exa - (post-fixes (list "k" "M" "G" "T" "P" "E") (cdr post-fixes))) - ((< file-size 1024) - (format " %3.0f%s" file-size (car post-fixes))))))) + (format " %7s" (file-size-human-readable file-size)))) (provide 'ls-lisp)