diff options
| author | Po Lu | 2023-10-08 10:42:47 +0800 |
|---|---|---|
| committer | Po Lu | 2023-10-08 10:42:47 +0800 |
| commit | 940df63d2daf50b899a66cd1542bec0c0f3eaebf (patch) | |
| tree | e2ac64977e8dac1f14ed736ecf0429ac6df0cc68 | |
| parent | a01203ce3374d6ce2ac8ea2992bff693ad73c0c2 (diff) | |
| download | emacs-940df63d2daf50b899a66cd1542bec0c0f3eaebf.tar.gz emacs-940df63d2daf50b899a66cd1542bec0c0f3eaebf.zip | |
Port arc to Android
* lisp/arc-mode.el (archive-zip-extract): Default to -q and -p
when the Android system unzip is being employed.
| -rw-r--r-- | lisp/arc-mode.el | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 81d3dfc3432..c861c835966 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el | |||
| @@ -231,13 +231,27 @@ Archive and member name will be added." | |||
| 231 | :group 'archive) | 231 | :group 'archive) |
| 232 | 232 | ||
| 233 | (defcustom archive-zip-extract | 233 | (defcustom archive-zip-extract |
| 234 | (cond ((executable-find "unzip") '("unzip" "-qq" "-c")) | 234 | (cond ((executable-find "unzip") |
| 235 | (if (and (eq system-type 'android) | ||
| 236 | ;; Mind that the unzip provided by Android | ||
| 237 | ;; does not understand -qq or -c, their | ||
| 238 | ;; functions being assumed by -q and -p | ||
| 239 | ;; respectively. Furthermore, the user | ||
| 240 | ;; might install an unzip executable | ||
| 241 | ;; distinct from the system-provided unzip, | ||
| 242 | ;; and such situations must be detected as | ||
| 243 | ;; well. | ||
| 244 | (member (executable-find "unzip") | ||
| 245 | '("/bin/unzip" | ||
| 246 | "/system/bin/unzip"))) | ||
| 247 | '("unzip" "-q" "-p") | ||
| 248 | '("unzip" "-qq" "-c"))) | ||
| 235 | (archive-7z-program `(,archive-7z-program "x" "-so")) | 249 | (archive-7z-program `(,archive-7z-program "x" "-so")) |
| 236 | ((executable-find "pkunzip") '("pkunzip" "-e" "-o-")) | 250 | ((executable-find "pkunzip") '("pkunzip" "-e" "-o-")) |
| 237 | (t '("unzip" "-qq" "-c"))) | 251 | (t '("unzip" "-qq" "-c"))) |
| 238 | "Program and its options to run in order to extract a zip file member. | 252 | "Program and its options to run in order to extract a zip file member. |
| 239 | Extraction should happen to standard output. Archive and member name will | 253 | Extraction should happen to standard output. Archive and member |
| 240 | be added." | 254 | name will be added." |
| 241 | :type '(list (string :tag "Program") | 255 | :type '(list (string :tag "Program") |
| 242 | (repeat :tag "Options" | 256 | (repeat :tag "Options" |
| 243 | :inline t | 257 | :inline t |