diff options
| author | Liam Stitt | 2012-10-13 18:51:26 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-10-13 18:51:26 +0800 |
| commit | 076a4db2fe51a9a1d3a379955499a12059c50d45 (patch) | |
| tree | f6c1532dc8e34279114d94a5a8c66be343d97884 | |
| parent | 0d11ff1cf2c3af79a9c4e9ef437488b6469fca52 (diff) | |
| download | emacs-076a4db2fe51a9a1d3a379955499a12059c50d45.tar.gz emacs-076a4db2fe51a9a1d3a379955499a12059c50d45.zip | |
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
| -rw-r--r-- | lisp/url/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/url/url-file.el | 3 | ||||
| -rw-r--r-- | lisp/url/url-vars.el | 3 |
3 files changed, 10 insertions, 2 deletions
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 @@ | |||
| 1 | 2012-10-13 Liam Stitt <stittl@cuug.ab.ca> (tiny change) | ||
| 2 | |||
| 3 | * url-vars.el (url-uncompressor-alist): | ||
| 4 | * url-file.el (url-file-find-possibly-compressed-file, url-file): | ||
| 5 | Recognize .xz compression (Bug#11839). | ||
| 6 | |||
| 1 | 2012-10-13 Chong Yidong <cyd@gnu.org> | 7 | 2012-10-13 Chong Yidong <cyd@gnu.org> |
| 2 | 8 | ||
| 3 | * url-http.el (url-http): | 9 | * 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 | |||
| 40 | 'foo.gz' exists, even though the FTP server would happily serve it up | 40 | 'foo.gz' exists, even though the FTP server would happily serve it up |
| 41 | to them." | 41 | to them." |
| 42 | (let ((scratch nil) | 42 | (let ((scratch nil) |
| 43 | (compressed-extensions '("" ".gz" ".z" ".Z" ".bz2")) | 43 | (compressed-extensions '("" ".gz" ".z" ".Z" ".bz2" ".xz")) |
| 44 | (found nil)) | 44 | (found nil)) |
| 45 | (while (and compressed-extensions (not found)) | 45 | (while (and compressed-extensions (not found)) |
| 46 | (if (file-exists-p (setq scratch (concat fname (pop compressed-extensions)))) | 46 | (if (file-exists-p (setq scratch (concat fname (pop compressed-extensions)))) |
| @@ -177,6 +177,7 @@ to them." | |||
| 177 | (".uue" "x-uuencoded") | 177 | (".uue" "x-uuencoded") |
| 178 | (".hqx" "x-hqx") | 178 | (".hqx" "x-hqx") |
| 179 | (".bz2" "x-bzip2") | 179 | (".bz2" "x-bzip2") |
| 180 | (".xz" "x-xz") | ||
| 180 | (_ nil))) | 181 | (_ nil))) |
| 181 | 182 | ||
| 182 | (if (file-directory-p filename) | 183 | (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." | |||
| 152 | (".uue" . "x-uuencoded") | 152 | (".uue" . "x-uuencoded") |
| 153 | (".hqx" . "x-hqx") | 153 | (".hqx" . "x-hqx") |
| 154 | (".Z" . "x-compress") | 154 | (".Z" . "x-compress") |
| 155 | (".bz2" . "x-bzip2")) | 155 | (".bz2" . "x-bzip2") |
| 156 | (".xz" . "x-xz")) | ||
| 156 | "An alist of file extensions and appropriate content-transfer-encodings." | 157 | "An alist of file extensions and appropriate content-transfer-encodings." |
| 157 | :type '(repeat (cons :format "%v" | 158 | :type '(repeat (cons :format "%v" |
| 158 | (string :tag "Extension") | 159 | (string :tag "Extension") |