lisp/files.el (file-size-human-readable): Produce one digit after
decimal, like "ls -lh" does.
lisp/ls-lisp.el (ls-lisp-format-file-size): Allow for 7 characters in
the file size representation.
2011-04-08 Eli Zaretskii <eliz@gnu.org>
+ * files.el (file-size-human-readable): Produce one digit after
+ decimal, like "ls -lh" does.
+
+ * ls-lisp.el (ls-lisp-format-file-size): Allow for 7 characters in
+ the file size representation.
+
* simple.el (list-processes): If async subprocesses are not
available, error out with a clear error message.
(while (and (>= file-size power) (cdr post-fixes))
(setq file-size (/ file-size power)
post-fixes (cdr post-fixes)))
- (format "%.0f%s%s" file-size
+ (format (if (> (mod file-size 1.0) 0.05)
+ "%.1f%s%s"
+ "%.0f%s%s")
+ file-size
(if (and (eq flavor 'iec) (string= (car post-fixes) "k"))
"K"
(car post-fixes))
ls-lisp-filesize-f-fmt
ls-lisp-filesize-d-fmt)
file-size)
- (format " %4s" (file-size-human-readable file-size))))
+ (format " %7s" (file-size-human-readable file-size))))
(provide 'ls-lisp)