]> git.eshelyaron.com Git - emacs.git/commitdiff
Add the zlib prefix to `decompress-gzipped-region'
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 12 Aug 2013 13:54:45 +0000 (15:54 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Mon, 12 Aug 2013 13:54:45 +0000 (15:54 +0200)
etc/NEWS
lisp/url/ChangeLog
lisp/url/url-http.el
lisp/url/url-vars.el
src/ChangeLog
src/decompress.c

index f5f6e48639e945b2bc1228fd3fc7ec2e65ba1044..e37b107176cd77e6c309da52b68a5d6f9cf76bd6 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -43,7 +43,7 @@ no longer created during installation.
 
 ** Emacs can be compiled with zlib support.  If this library is present
 (which it normally is on most systems), the function
-`decompress-gzipped-region' becomes available.
+`zlib-decompress-gzipped-region' becomes available.
 
 ---
 ** Emacs for NS (OSX, GNUStep) can be built with ImageMagick support.
index 9bdaff6f51a21c1d154987f78982d3e9c3cadd94..7ac445e03c17192b3f5812c00b17a6830af3dffe 100644 (file)
@@ -1,3 +1,9 @@
+2013-08-12  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * url-http.el (url-handle-content-transfer-encoding): Renamed
+       `zlib-decompress-gzipped-region' and check whether it's available,
+       too.
+
 2013-08-11  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * url-vars.el (url-mime-encoding-string): If we have built-in gzip
index beffbe1f79b20da17ab3c7e346cf3e4127e51e44..9eab1a6f683f808d62286e76c2ce03c7b70e5607 100644 (file)
@@ -860,13 +860,14 @@ should be shown to the user."
 (defun url-handle-content-transfer-encoding ()
   (let ((encoding (mail-fetch-field "content-encoding")))
     (when (and encoding
-              (fboundp 'decompress-gzipped-region)
+              (fboundp 'zlib-decompress-gzipped-region)
+              (zlib-available-p)
               (equal (downcase encoding) "gzip"))
       (save-restriction
        (widen)
        (goto-char (point-min))
        (when (search-forward "\n\n")
-         (decompress-gzipped-region (point) (point-max)))))))
+         (zlib-decompress-gzipped-region (point) (point-max)))))))
 
 ;; Miscellaneous
 (defun url-http-activate-callback ()
index a59667b57b04554e4ff1929292284212d78f7cf0..786b5533bf88a07b966e5000b5a7f8974ab132ef 100644 (file)
@@ -210,7 +210,7 @@ Should be an assoc list of headers/contents.")
 
 (defvar url-request-method nil "The method to use for the next request.")
 
-(defvar url-mime-encoding-string (and (fboundp 'decompress-gzipped-region)
+(defvar url-mime-encoding-string (and (fboundp 'zlib-decompress-gzipped-region)
                                      "gzip")
   "String to send in the Accept-encoding: field in HTTP requests.")
 
index 44af7c6b38599985bd63723d5d3bbc3e717272d3..3a8fcfe7e9cd1d2cd0da7c80a9bbbb48c5f0f347 100644 (file)
@@ -1,3 +1,8 @@
+2013-08-12  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * decompress.c (Fzlib_decompress_gzipped_region): Rename to
+       include the zlib prefix.
+
 2013-08-12  Eli Zaretskii  <eliz@gnu.org>
 
        * decompress.c [WINDOWSNT]: Include windows.h and w32.h.
index af8435b2fd08261294ea72daebbc31ba1ccb50c2..3605d446e5a464df34c4610c51e8e13f3a15f255 100644 (file)
@@ -119,8 +119,8 @@ DEFUN ("zlib-available-p", Fzlib_available_p, Szlib_available_p, 0, 0, 0,
 #endif
 }
 
-DEFUN ("decompress-gzipped-region", Fdecompress_gzipped_region,
-       Sdecompress_gzipped_region,
+DEFUN ("zlib-decompress-gzipped-region", Fzlib_decompress_gzipped_region,
+       Szlib_decompress_gzipped_region,
        2, 2, 0,
        doc: /* Decompress a gzip-compressed region.
 Replace the text in the region by the decompressed data.
@@ -210,7 +210,7 @@ void
 syms_of_decompress (void)
 {
   DEFSYM (Qzlib_dll, "zlib");
-  defsubr (&Sdecompress_gzipped_region);
+  defsubr (&Szlib_decompress_gzipped_region);
   defsubr (&Szlib_available_p);
 }