]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/dired-x.el (dired-jump): Support archive-subfile-mode
authorJuri Linkov <juri@linkov.net>
Wed, 12 Sep 2018 21:50:22 +0000 (00:50 +0300)
committerJuri Linkov <juri@linkov.net>
Wed, 12 Sep 2018 21:50:22 +0000 (00:50 +0300)
exactly like tar-subfile-mode is already supported.

lisp/dired-x.el

index f07a5deb4f172c9677bb35b7ede049cb53a1c057..6c19863f7b63fef5181db54d798e9de0f4f0ebf6 100644 (file)
@@ -445,6 +445,7 @@ See variables `dired-texinfo-unclean-extensions',
                                 dired-tex-unclean-extensions
                                 (list ".dvi"))))
 \f
+(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)