Browse Source

Use aunpack to unpack zip if available

master
10sr 5 years ago
parent
commit
3cc114a60b
Signed by: 10sr GPG Key ID: 7BEC428194130EB2
1 changed files with 17 additions and 6 deletions
  1. +17
    -6
      emacs.el

+ 17
- 6
emacs.el View File

@@ -2059,12 +2059,7 @@ ARG is num to show, or defaults to 7."
'(file-readable-p file)
(delete-file file)))))

(when (autoload-eval-lazily 'pack '(dired-do-pack-or-unpack pack-pack)
(defvar pack-program-alist)
(add-to-list 'pack-program-alist
'("\\.txz\\'" :pack "tar -cJf" :unpack "tar -xf")))
(set-variable 'pack-silence
t)
(when (fboundp 'pack-dired-dwim)
(with-eval-after-load 'dired
(define-key dired-mode-map "P" 'pack-dired-dwim)))

@@ -2101,6 +2096,22 @@ ARG is num to show, or defaults to 7."
(defvar dired-mode-map (make-sparse-keymap))
(define-key dired-mode-map "G" 'my-dired-git-ls-files))

(with-eval-after-load 'pack
(set-variable 'pack-silence
t)
(defvar pack-program-alist)
(add-to-list 'pack-program-alist
'("\\.txz\\'" :pack "tar -cJf" :unpack "tar -xf"))

(when (executable-find "aunpack")
(add-to-list 'pack-program-alist
' ("\\.zip\\'"
:pack ("zip" "-r" archive sources)
:pack-append ("zip" "-r" archive sources)
:unpack ("aunpack" archive))))
)


;; (define-minor-mode my-dired-glob-filter)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


Loading…
Cancel
Save