1
0
mirror of https://github.com/m00natic/vlfi.git synced 2025-01-18 20:10:47 +00:00

Correctly print MB (for older emacsen).

This commit is contained in:
Colin Marquardt 2013-04-23 19:15:43 +03:00
parent fbe081417c
commit 28255a2aa2

View File

@ -167,11 +167,11 @@ OP-TYPE specifies the file operation being performed over FILENAME."
(goto-char (point-max))) (goto-char (point-max)))
ad-do-it)) ad-do-it))
;; non recent Emacs ;; non-recent Emacs
(unless (fboundp 'file-size-human-readable) (unless (fboundp 'file-size-human-readable)
(defun file-size-human-readable (file-size) (defun file-size-human-readable (file-size)
"Print FILE-SIZE in MB." "Print FILE-SIZE in MB."
(format "%.1fMB" (/ file-size 1024.0)))) (format "%.1fMB" (/ file-size 1048576.0))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;; utilities ;;; utilities