1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-28 07:45:00 +00:00
emacs/lisp/url
Mattias Engdegård 866f527ddf Optional space and unit in `file-size-human-readable' (bug#35756)
To improve readability of strings produced by
`file-size-human-readable', add two optional arguments:

- SPACE, to provide a string (typically a space or non-breaking space)
to put between the number and unit.  For compatibility, the default is
an empty string.

- UNIT, a string to use as unit.  For compatibility, the default is
"B" in `iec' mode and the empty string otherwise.

Also fix a glitch with small numbers in `iec' mode which caused a
stray "i" in the result.

* lisp/files.el (file-size-human-readable):
Add optional SPACE and UNIT arguments and handle small numbers correctly.
(files--ask-user-about-large-file, warn-maybe-out-of-memory):
Call with `iec' and space.
* test/lisp/files-tests.el (files-test-file-size-human-readable): New test.
* lisp/url/url-http.el (url-http-simple-after-change-function)
(url-http-content-length-after-change-function): Call with `iec' and space.
* etc/NEWS (Lisp Changes): Mention the change.
2019-06-23 20:30:50 +02:00
..
ChangeLog.1 Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-about.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-auth.el Don't have url-basic-auth bug out when called with an URL string 2019-05-15 07:34:35 +02:00
url-cache.el Avoid some double-rounding of Lisp timestamps 2019-02-22 18:33:57 -08:00
url-cid.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-cookie.el Avoid some double-rounding of Lisp timestamps 2019-02-22 18:33:57 -08:00
url-dav.el Go back to "Maintainer: emacs-devel@gnu.org" 2019-05-25 14:25:18 -07:00
url-dired.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
url-domsuf.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-expand.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-file.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
url-ftp.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-future.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-gw.el Go back to "Maintainer: emacs-devel@gnu.org" 2019-05-25 14:25:18 -07:00
url-handlers.el Fix url-copy-file argument handling 2019-05-23 01:41:00 +01:00
url-history.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-http.el Optional space and unit in `file-size-human-readable' (bug#35756) 2019-06-23 20:30:50 +02:00
url-imap.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-irc.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-ldap.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-mailto.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-methods.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
url-misc.el Omit/rewrite useless regexp repetitions 2019-04-12 19:43:41 -07:00
url-news.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-nfs.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-ns.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-parse.el Fix regular-expression glitches and typos 2019-03-04 18:00:58 -08:00
url-privacy.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
url-proxy.el Update copyright year to 2019 2019-01-01 01:01:13 +00:00
url-queue.el Avoid some double-rounding of Lisp timestamps 2019-02-22 18:33:57 -08:00
url-tramp.el Make url-tramp more robust 2019-06-15 12:19:01 +02:00
url-util.el Go back to "Maintainer: emacs-devel@gnu.org" 2019-05-25 14:25:18 -07:00
url-vars.el Merge from origin/emacs-26 2018-12-31 17:57:29 -08:00
url.el Go back to "Maintainer: emacs-devel@gnu.org" 2019-05-25 14:25:18 -07:00