aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Magne Ingebrigtsen2013-08-12 15:54:45 +0200
committerLars Magne Ingebrigtsen2013-08-12 15:54:45 +0200
commit8a44a184685092e2f39c9355467defde0b8b030c (patch)
treeb5ecedafe78e402b50b0d9a1494477935789e07b
parent594a430782d12499543637915fd974483523f500 (diff)
downloademacs-8a44a184685092e2f39c9355467defde0b8b030c.tar.gz
emacs-8a44a184685092e2f39c9355467defde0b8b030c.zip
Add the zlib prefix to `decompress-gzipped-region'
-rw-r--r--etc/NEWS2
-rw-r--r--lisp/url/ChangeLog6
-rw-r--r--lisp/url/url-http.el5
-rw-r--r--lisp/url/url-vars.el2
-rw-r--r--src/ChangeLog5
-rw-r--r--src/decompress.c6
6 files changed, 19 insertions, 7 deletions
diff --git a/etc/NEWS b/etc/NEWS
index f5f6e48639e..e37b107176c 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -43,7 +43,7 @@ no longer created during installation.
43 43
44** Emacs can be compiled with zlib support. If this library is present 44** Emacs can be compiled with zlib support. If this library is present
45(which it normally is on most systems), the function 45(which it normally is on most systems), the function
46`decompress-gzipped-region' becomes available. 46`zlib-decompress-gzipped-region' becomes available.
47 47
48--- 48---
49** Emacs for NS (OSX, GNUStep) can be built with ImageMagick support. 49** Emacs for NS (OSX, GNUStep) can be built with ImageMagick support.
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog
index 9bdaff6f51a..7ac445e03c1 100644
--- a/lisp/url/ChangeLog
+++ b/lisp/url/ChangeLog
@@ -1,3 +1,9 @@
12013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * url-http.el (url-handle-content-transfer-encoding): Renamed
4 `zlib-decompress-gzipped-region' and check whether it's available,
5 too.
6
12013-08-11 Lars Magne Ingebrigtsen <larsi@gnus.org> 72013-08-11 Lars Magne Ingebrigtsen <larsi@gnus.org>
2 8
3 * url-vars.el (url-mime-encoding-string): If we have built-in gzip 9 * url-vars.el (url-mime-encoding-string): If we have built-in gzip
diff --git a/lisp/url/url-http.el b/lisp/url/url-http.el
index beffbe1f79b..9eab1a6f683 100644
--- a/lisp/url/url-http.el
+++ b/lisp/url/url-http.el
@@ -860,13 +860,14 @@ should be shown to the user."
860(defun url-handle-content-transfer-encoding () 860(defun url-handle-content-transfer-encoding ()
861 (let ((encoding (mail-fetch-field "content-encoding"))) 861 (let ((encoding (mail-fetch-field "content-encoding")))
862 (when (and encoding 862 (when (and encoding
863 (fboundp 'decompress-gzipped-region) 863 (fboundp 'zlib-decompress-gzipped-region)
864 (zlib-available-p)
864 (equal (downcase encoding) "gzip")) 865 (equal (downcase encoding) "gzip"))
865 (save-restriction 866 (save-restriction
866 (widen) 867 (widen)
867 (goto-char (point-min)) 868 (goto-char (point-min))
868 (when (search-forward "\n\n") 869 (when (search-forward "\n\n")
869 (decompress-gzipped-region (point) (point-max))))))) 870 (zlib-decompress-gzipped-region (point) (point-max)))))))
870 871
871;; Miscellaneous 872;; Miscellaneous
872(defun url-http-activate-callback () 873(defun url-http-activate-callback ()
diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el
index a59667b57b0..786b5533bf8 100644
--- a/lisp/url/url-vars.el
+++ b/lisp/url/url-vars.el
@@ -210,7 +210,7 @@ Should be an assoc list of headers/contents.")
210 210
211(defvar url-request-method nil "The method to use for the next request.") 211(defvar url-request-method nil "The method to use for the next request.")
212 212
213(defvar url-mime-encoding-string (and (fboundp 'decompress-gzipped-region) 213(defvar url-mime-encoding-string (and (fboundp 'zlib-decompress-gzipped-region)
214 "gzip") 214 "gzip")
215 "String to send in the Accept-encoding: field in HTTP requests.") 215 "String to send in the Accept-encoding: field in HTTP requests.")
216 216
diff --git a/src/ChangeLog b/src/ChangeLog
index 44af7c6b385..3a8fcfe7e9c 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12013-08-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
2
3 * decompress.c (Fzlib_decompress_gzipped_region): Rename to
4 include the zlib prefix.
5
12013-08-12 Eli Zaretskii <eliz@gnu.org> 62013-08-12 Eli Zaretskii <eliz@gnu.org>
2 7
3 * decompress.c [WINDOWSNT]: Include windows.h and w32.h. 8 * decompress.c [WINDOWSNT]: Include windows.h and w32.h.
diff --git a/src/decompress.c b/src/decompress.c
index af8435b2fd0..3605d446e5a 100644
--- a/src/decompress.c
+++ b/src/decompress.c
@@ -119,8 +119,8 @@ DEFUN ("zlib-available-p", Fzlib_available_p, Szlib_available_p, 0, 0, 0,
119#endif 119#endif
120} 120}
121 121
122DEFUN ("decompress-gzipped-region", Fdecompress_gzipped_region, 122DEFUN ("zlib-decompress-gzipped-region", Fzlib_decompress_gzipped_region,
123 Sdecompress_gzipped_region, 123 Szlib_decompress_gzipped_region,
124 2, 2, 0, 124 2, 2, 0,
125 doc: /* Decompress a gzip-compressed region. 125 doc: /* Decompress a gzip-compressed region.
126Replace the text in the region by the decompressed data. 126Replace the text in the region by the decompressed data.
@@ -210,7 +210,7 @@ void
210syms_of_decompress (void) 210syms_of_decompress (void)
211{ 211{
212 DEFSYM (Qzlib_dll, "zlib"); 212 DEFSYM (Qzlib_dll, "zlib");
213 defsubr (&Sdecompress_gzipped_region); 213 defsubr (&Szlib_decompress_gzipped_region);
214 defsubr (&Szlib_available_p); 214 defsubr (&Szlib_available_p);
215} 215}
216 216