emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master a1b8418: * lisp/dired-x.el (dired-jump): Support ar


From: Juri Linkov
Subject: [Emacs-diffs] master a1b8418: * lisp/dired-x.el (dired-jump): Support archive-subfile-mode
Date: Wed, 12 Sep 2018 17:50:28 -0400 (EDT)

branch: master
commit a1b8418f5e1a4de54528f2887cf653105c3c92fb
Author: Juri Linkov <address@hidden>
Commit: Juri Linkov <address@hidden>

    * lisp/dired-x.el (dired-jump): Support archive-subfile-mode
    
    exactly like tar-subfile-mode is already supported.
---
 lisp/dired-x.el | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index f07a5de..6c19863 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -445,6 +445,7 @@ See variables `dired-texinfo-unclean-extensions',
                                 dired-tex-unclean-extensions
                                 (list ".dvi"))))
 
+(defvar archive-superior-buffer)
 (defvar tar-superior-buffer)
 ;;; JUMP.
 
@@ -461,8 +462,12 @@ Interactively with prefix argument, read FILE-NAME."
   (interactive
    (list nil (and current-prefix-arg
                   (read-file-name "Jump to Dired file: "))))
-  (if (bound-and-true-p tar-subfile-mode)
-      (switch-to-buffer tar-superior-buffer)
+  (cond
+   ((bound-and-true-p archive-subfile-mode)
+    (switch-to-buffer archive-superior-buffer))
+   ((bound-and-true-p tar-subfile-mode)
+    (switch-to-buffer tar-superior-buffer))
+   (t
     ;; Expand file-name before `dired-goto-file' call:
     ;; `dired-goto-file' requires its argument to be an absolute
     ;; file name; the result of `read-file-name' could be
@@ -490,7 +495,7 @@ Interactively with prefix argument, read FILE-NAME."
                 ;; Toggle omitting, if it is on, and try again.
                 (when dired-omit-mode
                   (dired-omit-mode)
-                  (dired-goto-file file))))))))
+                  (dired-goto-file file)))))))))
 
 ;;;###autoload
 (defun dired-jump-other-window (&optional file-name)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]