[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r114476: * url/url-util.el (url-pretty-length): Make
From: |
Leo Liu |
Subject: |
[Emacs-diffs] trunk r114476: * url/url-util.el (url-pretty-length): Make obsolete and all uses |
Date: |
Sun, 29 Sep 2013 01:37:39 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 114476
revision-id: address@hidden
parent: address@hidden
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Sun 2013-09-29 09:37:03 +0800
message:
* url/url-util.el (url-pretty-length): Make obsolete and all uses
changed to file-size-human-readable.
modified:
lisp/url/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-3116
lisp/url/url-http.el urlhttp.el-20091113204419-o5vbwnq5f7feedwu-2989
lisp/url/url-util.el urlutil.el-20091113204419-o5vbwnq5f7feedwu-3003
=== modified file 'lisp/url/ChangeLog'
--- a/lisp/url/ChangeLog 2013-09-18 01:44:44 +0000
+++ b/lisp/url/ChangeLog 2013-09-29 01:37:03 +0000
@@ -1,3 +1,8 @@
+2013-09-29 Leo Liu <address@hidden>
+
+ * url-util.el (url-pretty-length): Make obsolete and all uses
+ changed to file-size-human-readable.
+
2013-09-18 Glenn Morris <address@hidden>
* url-http.el (zlib-decompress-region): Declare.
=== modified file 'lisp/url/url-http.el'
--- a/lisp/url/url-http.el 2013-09-18 05:10:21 +0000
+++ b/lisp/url/url-http.el 2013-09-29 01:37:03 +0000
@@ -51,7 +51,6 @@
(defvar url-show-status)
(require 'url-gw)
-(require 'url-util)
(require 'url-parse)
(require 'url-cookie)
(require 'mail-parse)
@@ -919,7 +918,7 @@
(defun url-http-simple-after-change-function (st nd length)
;; Function used when we do NOT know how long the document is going to be
;; Just _very_ simple 'downloaded %d' type of info.
- (url-lazy-message "Reading %s..." (url-pretty-length nd)))
+ (url-lazy-message "Reading %s..." (file-size-human-readable nd)))
(defun url-http-content-length-after-change-function (st nd length)
"Function used when we DO know how long the document is going to be.
@@ -932,16 +931,16 @@
(url-percentage (- nd url-http-end-of-headers)
url-http-content-length)
url-http-content-type
- (url-pretty-length (- nd url-http-end-of-headers))
- (url-pretty-length url-http-content-length)
+ (file-size-human-readable (- nd url-http-end-of-headers))
+ (file-size-human-readable url-http-content-length)
(url-percentage (- nd url-http-end-of-headers)
url-http-content-length))
(url-display-percentage
"Reading... %s of %s (%d%%)"
(url-percentage (- nd url-http-end-of-headers)
url-http-content-length)
- (url-pretty-length (- nd url-http-end-of-headers))
- (url-pretty-length url-http-content-length)
+ (file-size-human-readable (- nd url-http-end-of-headers))
+ (file-size-human-readable url-http-content-length)
(url-percentage (- nd url-http-end-of-headers)
url-http-content-length)))
=== modified file 'lisp/url/url-util.el'
--- a/lisp/url/url-util.el 2013-01-01 09:11:05 +0000
+++ b/lisp/url/url-util.el 2013-09-29 01:37:03 +0000
@@ -211,15 +211,9 @@
(setq z (1+ z)))
(substring x z nil)))
-;;;###autoload
-(defun url-pretty-length (n)
- (cond
- ((< n 1024)
- (format "%d bytes" n))
- ((< n (* 1024 1024))
- (format "%dk" (/ n 1024.0)))
- (t
- (format "%2.2fM" (/ n (* 1024 1024.0))))))
+
+(define-obsolete-function-alias 'url-pretty-length
+ 'file-size-human-readable "24.4")
;;;###autoload
(defun url-display-percentage (fmt perc &rest args)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r114476: * url/url-util.el (url-pretty-length): Make obsolete and all uses,
Leo Liu <=