]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/arc-mode.el (archive-zip-expunge, archive-zip-update)
authorJuri Linkov <juri@jurta.org>
Fri, 8 Jul 2011 00:08:53 +0000 (03:08 +0300)
committerJuri Linkov <juri@jurta.org>
Fri, 8 Jul 2011 00:08:53 +0000 (03:08 +0300)
(archive-zip-update-case): Use 7z if found by `executable-find'.
The order of searching the available programs is the same as in
`archive-zip-extract'.

Fixes: debbugs:8968
lisp/ChangeLog
lisp/arc-mode.el

index f9c55aad1b3f381450272f94de8168c017ae6f53..74b36f4ab054663a297f3b1bc2bf55d260d314a9 100644 (file)
@@ -1,3 +1,10 @@
+2011-07-08  Juri Linkov  <juri@jurta.org>
+
+       * arc-mode.el (archive-zip-expunge, archive-zip-update)
+       (archive-zip-update-case): Use 7z if found by `executable-find'.
+       The order of searching the available programs is the same as in
+       `archive-zip-extract' (bug#8968).
+
 2011-07-07  Chong Yidong  <cyd@stupidchicken.com>
 
        * menu-bar.el (menu-bar-line-wrapping-menu): Revert last change.
index 70f43aebaff6302eea151508eb0a15e032837981..ea875b9989daf478a6c19ffa29979a76660197a5 100644 (file)
@@ -216,10 +216,10 @@ Archive and member name will be added."
 ;; Zip archive configuration
 
 (defcustom archive-zip-extract
-  (cond ((executable-find "unzip") '("unzip" "-qq" "-c"))
-       ((executable-find "7z") '("7z" "x" "-so"))
+  (cond ((executable-find "unzip")   '("unzip" "-qq" "-c"))
+       ((executable-find "7z")      '("7z" "x" "-so"))
        ((executable-find "pkunzip") '("pkunzip" "-e" "-o-"))
-       (t '("unzip" "-qq" "-c")))
+       (t                           '("unzip" "-qq" "-c")))
   "Program and its options to run in order to extract a zip file member.
 Extraction should happen to standard output.  Archive and member name will
 be added."
@@ -235,44 +235,44 @@ be added."
 ;; names.
 
 (defcustom archive-zip-expunge
-  (if (and (not (executable-find "zip"))
-           (executable-find "pkzip"))
-      '("pkzip" "-d")
-    '("zip" "-d" "-q"))
+  (cond ((executable-find "zip")     '("zip" "-d" "-q"))
+       ((executable-find "7z")      '("7z" "d"))
+       ((executable-find "pkzip")   '("pkzip" "-d"))
+       (t                           '("zip" "-d" "-q")))
   "Program and its options to run in order to delete zip file members.
 Archive and member names will be added."
   :type '(list (string :tag "Program")
-               (repeat :tag "Options"
-                       :inline t
-                       (string :format "%v")))
+              (repeat :tag "Options"
+                      :inline t
+                      (string :format "%v")))
   :group 'archive-zip)
 
 (defcustom archive-zip-update
-  (if (and (not (executable-find "zip"))
-           (executable-find "pkzip"))
-      '("pkzip" "-u" "-P")
-    '("zip" "-q"))
+  (cond ((executable-find "zip")     '("zip" "-q"))
+       ((executable-find "7z")      '("7z" "u"))
+       ((executable-find "pkzip")   '("pkzip" "-u" "-P"))
+       (t                           '("zip" "-q")))
   "Program and its options to run in order to update a zip file member.
 Options should ensure that specified directory will be put into the zip
 file.  Archive and member name will be added."
   :type '(list (string :tag "Program")
-               (repeat :tag "Options"
-                       :inline t
-                       (string :format "%v")))
+              (repeat :tag "Options"
+                      :inline t
+                      (string :format "%v")))
   :group 'archive-zip)
 
 (defcustom archive-zip-update-case
-  (if (and (not (executable-find "zip"))
-           (executable-find "pkzip"))
-      '("pkzip" "-u" "-P")
-    '("zip" "-q" "-k"))
+  (cond ((executable-find "zip")     '("zip" "-q" "-k"))
+       ((executable-find "7z")      '("7z" "u"))
+       ((executable-find "pkzip")   '("pkzip" "-u" "-P"))
+       (t                           '("zip" "-q" "-k")))
   "Program and its options to run in order to update a case fiddled zip member.
 Options should ensure that specified directory will be put into the zip file.
 Archive and member name will be added."
   :type '(list (string :tag "Program")
-               (repeat :tag "Options"
-                       :inline t
-                       (string :format "%v")))
+              (repeat :tag "Options"
+                      :inline t
+                      (string :format "%v")))
   :group 'archive-zip)
 
 (defcustom archive-zip-case-fiddle t