dired-tex-unclean-extensions
(list ".dvi"))))
\f
+(defvar tar-superior-buffer)
;;; JUMP.
;;;###autoload
move to its line in dired."
(interactive
(list nil (and current-prefix-arg
- (read-file-name "Jump to Dired file: "))))
- (let* ((file (or file-name buffer-file-name))
- (dir (if file (file-name-directory file) default-directory)))
- (if (and (eq major-mode 'dired-mode) (null file-name))
- (progn
- (setq dir (dired-current-directory))
- (dired-up-directory other-window)
- (unless (dired-goto-file dir)
- ;; refresh and try again
- (dired-insert-subdir (file-name-directory dir))
- (dired-goto-file dir)))
- (if other-window
- (dired-other-window dir)
- (dired dir))
- (if file
- (or (dired-goto-file file)
+ (read-file-name "Jump to Dired file: "))))
+ (if (bound-and-true-p tar-subfile-mode)
+ (switch-to-buffer tar-superior-buffer)
+ (let* ((file (or file-name buffer-file-name))
+ (dir (if file (file-name-directory file) default-directory)))
+ (if (and (eq major-mode 'dired-mode) (null file-name))
+ (progn
+ (setq dir (dired-current-directory))
+ (dired-up-directory other-window)
+ (unless (dired-goto-file dir)
;; refresh and try again
- (progn
- (dired-insert-subdir (file-name-directory file))
- (dired-goto-file file))
- ;; Toggle omitting, if it is on, and try again.
- (when dired-omit-mode
- (dired-omit-mode)
- (dired-goto-file file)))))))
+ (dired-insert-subdir (file-name-directory dir))
+ (dired-goto-file dir)))
+ (if other-window
+ (dired-other-window dir)
+ (dired dir))
+ (if file
+ (or (dired-goto-file file)
+ ;; refresh and try again
+ (progn
+ (dired-insert-subdir (file-name-directory file))
+ (dired-goto-file file))
+ ;; Toggle omitting, if it is on, and try again.
+ (when dired-omit-mode
+ (dired-omit-mode)
+ (dired-goto-file file))))))))
;;;###autoload
(defun dired-jump-other-window (&optional file-name)