]> git.eshelyaron.com Git - emacs.git/commitdiff
Use gzip to uncompess .xz files on MacOS
authorLars Ingebrigtsen <larsi@gnus.org>
Sat, 25 Sep 2021 01:05:27 +0000 (03:05 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Sat, 25 Sep 2021 01:05:27 +0000 (03:05 +0200)
* lisp/jka-cmpr-hook.el (jka-compr-compression-info-list): Use
gzip to uncompess .xz files on MacOS (bug#29235).

lisp/jka-cmpr-hook.el

index 6933a7c1d064bb6acb03e34265058cd17bd85222..ed00caedb51db0f7ddb836f399d5438429ea3e3b 100644 (file)
@@ -203,7 +203,7 @@ options through Custom does this automatically."
   ;; can-append strip-extension-flag file-magic-bytes
   ;; uncompress-function]
   (mapcar 'purecopy
-  '(["\\.Z\\'"
+  `(["\\.Z\\'"
      "compressing"    "compress"     ("-c")
      ;; gzip is more common than uncompress. It can only read, not write.
      "uncompressing"  "gzip"   ("-c" "-q" "-d")
@@ -239,7 +239,8 @@ options through Custom does this automatically."
      "LZMA uncompressing" "lzma"         ("-c" "-q" "-d")
      t t ""]
     ["\\.xz\\'"
-     "XZ compressing"     "xz"           ("-c" "-q")
+     ;; On MacOS, gzip can uncompress xz files.
+     "XZ compressing" ,(if (featurep 'ns) "gzip" "xz") ("-c" "-q")
      "XZ uncompressing"   "xz"           ("-c" "-q" "-d")
      t t "\3757zXZ\0"]
     ["\\.txz\\'"