From: Liam Stitt Date: Sat, 13 Oct 2012 10:51:26 +0000 (+0800) Subject: Add .xz to some url code (tiny change). X-Git-Tag: emacs-24.2.90~235^2~7^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=076a4db2fe51a9a1d3a379955499a12059c50d45;p=emacs.git Add .xz to some url code (tiny change). * url-vars.el (url-uncompressor-alist): * url-file.el (url-file-find-possibly-compressed-file, url-file): Recognize .xz compression. Fixes: debbugs:11839 --- diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index f7fe5029afe..59222bcc957 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog @@ -1,3 +1,9 @@ +2012-10-13 Liam Stitt (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 * url-http.el (url-http): diff --git a/lisp/url/url-file.el b/lisp/url/url-file.el index 4bbbdcf200c..3515d7493cc 100644 --- a/lisp/url/url-file.el +++ b/lisp/url/url-file.el @@ -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) diff --git a/lisp/url/url-vars.el b/lisp/url/url-vars.el index 29f1e2cde0c..fdfd0e9868d 100644 --- a/lisp/url/url-vars.el +++ b/lisp/url/url-vars.el @@ -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")