aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2002-05-19 16:00:48 +0000
committerRichard M. Stallman2002-05-19 16:00:48 +0000
commitf44a616b703657a36aee3dfcd190935e968d6f86 (patch)
tree1dd82c9761a8a61a61a95727217e1de9f3a1d919
parente6f0ff923303e71a0db0306f403fc507a5608ef7 (diff)
downloademacs-f44a616b703657a36aee3dfcd190935e968d6f86.tar.gz
emacs-f44a616b703657a36aee3dfcd190935e968d6f86.zip
(archive-zip-use-pkzip): Variable deleted.
(archive-zip-extract, archive-zip-expunge, archive-zip-update) (archive-zip-update-case): Use locate-file to decide whether to use pkzip.
-rw-r--r--lisp/arc-mode.el32
1 files changed, 21 insertions, 11 deletions
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el
index d1128abc455..1792c545029 100644
--- a/lisp/arc-mode.el
+++ b/lisp/arc-mode.el
@@ -211,14 +211,12 @@ Archive and member name will be added."
211;; ------------------------------ 211;; ------------------------------
212;; Zip archive configuration 212;; Zip archive configuration
213 213
214(defcustom archive-zip-use-pkzip (memq system-type '(ms-dos windows-nt))
215 "*If non-nil then pkzip option are used instead of zip options.
216Only set to true for msdog systems!"
217 :type 'boolean
218 :group 'archive-zip)
219
220(defcustom archive-zip-extract 214(defcustom archive-zip-extract
221 (if archive-zip-use-pkzip '("pkunzip" "-e" "-o-") '("unzip" "-qq" "-c")) 215 (if (locate-file "unzip" nil 'file-executable-p)
216 '("unzip" "-qq" "-c")
217 (if (locate-file "pkunzip" nil 'file-executable-p)
218 '("pkunzip" "-e" "-o-")
219 '("unzip" "-qq" "-c")))
222 "*Program and its options to run in order to extract a zip file member. 220 "*Program and its options to run in order to extract a zip file member.
223Extraction should happen to standard output. Archive and member name will 221Extraction should happen to standard output. Archive and member name will
224be added. If `archive-zip-use-pkzip' is non-nil then this program is 222be added. If `archive-zip-use-pkzip' is non-nil then this program is
@@ -235,7 +233,11 @@ expected to extract to a file junking the directory part of the name."
235;; names. 233;; names.
236 234
237(defcustom archive-zip-expunge 235(defcustom archive-zip-expunge
238 (if archive-zip-use-pkzip '("pkzip" "-d") '("zip" "-d" "-q")) 236 (if (locate-file "zip" nil 'file-executable-p)
237 '("zip" "-d" "-q")
238 (if (locate-file "zip" nil 'file-executable-p)
239 '("pkzip" "-d")
240 '("zip" "-d" "-q")))
239 "*Program and its options to run in order to delete zip file members. 241 "*Program and its options to run in order to delete zip file members.
240Archive and member names will be added." 242Archive and member names will be added."
241 :type '(list (string :tag "Program") 243 :type '(list (string :tag "Program")
@@ -245,7 +247,11 @@ Archive and member names will be added."
245 :group 'archive-zip) 247 :group 'archive-zip)
246 248
247(defcustom archive-zip-update 249(defcustom archive-zip-update
248 (if archive-zip-use-pkzip '("pkzip" "-u" "-P") '("zip" "-q")) 250 (if (locate-file "zip" nil 'file-executable-p)
251 '("zip" "-q")
252 (if (locate-file "zip" nil 'file-executable-p)
253 '("pkzip" "-u" "-P")
254 '("zip" "-q")))
249 "*Program and its options to run in order to update a zip file member. 255 "*Program and its options to run in order to update a zip file member.
250Options should ensure that specified directory will be put into the zip 256Options should ensure that specified directory will be put into the zip
251file. Archive and member name will be added." 257file. Archive and member name will be added."
@@ -256,7 +262,11 @@ file. Archive and member name will be added."
256 :group 'archive-zip) 262 :group 'archive-zip)
257 263
258(defcustom archive-zip-update-case 264(defcustom archive-zip-update-case
259 (if archive-zip-use-pkzip archive-zip-update '("zip" "-q" "-k")) 265 (if (locate-file "zip" nil 'file-executable-p)
266 '("zip" "-q" "-k")
267 (if (locate-file "zip" nil 'file-executable-p)
268 '("pkzip" "-u" "-P")
269 '("zip" "-q" "-k")))
260 "*Program and its options to run in order to update a case fiddled zip member. 270 "*Program and its options to run in order to update a case fiddled zip member.
261Options should ensure that specified directory will be put into the zip file. 271Options should ensure that specified directory will be put into the zip file.
262Archive and member name will be added." 272Archive and member name will be added."
@@ -1637,7 +1647,7 @@ This doesn't recover lost files, it just undoes changes in the buffer itself."
1637 (apply 'vector (nreverse files)))) 1647 (apply 'vector (nreverse files))))
1638 1648
1639(defun archive-zip-extract (archive name) 1649(defun archive-zip-extract (archive name)
1640 (if archive-zip-use-pkzip 1650 (if (equal (car archive-zip-extract) "pkzip")
1641 (archive-*-extract archive name archive-zip-extract) 1651 (archive-*-extract archive name archive-zip-extract)
1642 (archive-extract-by-stdout archive name archive-zip-extract))) 1652 (archive-extract-by-stdout archive name archive-zip-extract)))
1643 1653