Add .xz to some url code (tiny change).
authorLiam Stitt <stittl@cuug.ab.ca>
Sat, 13 Oct 2012 10:51:26 +0000 (18:51 +0800)
committerChong Yidong <cyd@gnu.org>
Sat, 13 Oct 2012 10:51:26 +0000 (18:51 +0800)
* url-vars.el (url-uncompressor-alist):
* url-file.el (url-file-find-possibly-compressed-file, url-file):
Recognize .xz compression.

Fixes: debbugs:11839

lisp/url/ChangeLog
lisp/url/url-file.el
lisp/url/url-vars.el

index f7fe502..59222bc 100644 (file)
@@ -1,3 +1,9 @@
+2012-10-13  Liam Stitt  <stittl@cuug.ab.ca>  (tiny change)
+
+       * url-vars.el (url-uncompressor-alist):
+       * url-file.el (url-file-find-possibly-compressed-file, url-file):
+       Recognize .xz compression (Bug#11839).
+
 2012-10-13  Chong Yidong  <cyd@gnu.org>
 
        * url-http.el (url-http):
index 4bbbdcf..3515d74 100644 (file)
@@ -40,7 +40,7 @@ can do automatic decompression for them, and won't find 'foo' if
 'foo.gz' exists, even though the FTP server would happily serve it up
 to them."
   (let ((scratch nil)
-       (compressed-extensions '("" ".gz" ".z" ".Z" ".bz2"))
+       (compressed-extensions '("" ".gz" ".z" ".Z" ".bz2" ".xz"))
        (found nil))
     (while (and compressed-extensions (not found))
       (if (file-exists-p (setq scratch (concat fname (pop compressed-extensions))))
@@ -177,6 +177,7 @@ to them."
                             (".uue" "x-uuencoded")
                             (".hqx" "x-hqx")
                             (".bz2" "x-bzip2")
+                            (".xz" "x-xz")
                             (_ nil)))
 
     (if (file-directory-p filename)
index 29f1e2c..fdfd0e9 100644 (file)
@@ -152,7 +152,8 @@ variable."
                                    (".uue" . "x-uuencoded")
                                    (".hqx" . "x-hqx")
                                    (".Z"  . "x-compress")
-                                   (".bz2"  . "x-bzip2"))
+                                   (".bz2" . "x-bzip2")
+                                   (".xz" . "x-xz"))
   "An alist of file extensions and appropriate content-transfer-encodings."
   :type '(repeat (cons :format "%v"
                       (string :tag "Extension")