aboutsummaryrefslogtreecommitdiff
path: root/magit.el
diff options
context:
space:
mode:
Diffstat (limited to 'magit.el')
-rw-r--r--magit.el31
1 files changed, 14 insertions, 17 deletions
diff --git a/magit.el b/magit.el
index 919181f..7d0f6e7 100644
--- a/magit.el
+++ b/magit.el
@@ -656,11 +656,9 @@ operation after commit).")
(define-key map (kbd "C") 'magit-add-log)
(define-key map (kbd "X") 'magit-reset-working-tree)
(define-key map (kbd "z") 'magit-key-mode-popup-stashing)
+ (define-key map [remap dired-jump] 'magit-dired-jump)
map))
-(eval-after-load 'dired-x
- '(define-key magit-status-mode-map [remap dired-jump] 'magit-dired-jump))
-
(defvar magit-log-mode-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd ".") 'magit-mark-item)
@@ -5452,21 +5450,20 @@ The name of the change log file is set by variable change-log-default-name."
(interactive)
(magit-visiting-file-item (call-interactively 'add-change-log-entry-other-window)))
-(eval-after-load 'dired-x
- '(defun magit-dired-jump (&optional other-window)
- "Visit current item.
+(defun magit-dired-jump (&optional other-window)
+ "Visit current item.
With a prefix argument, visit in other window."
- (interactive "P")
- (require 'dired-x)
- (magit-section-action (item info "dired-jump")
- ((untracked file)
- (dired-jump other-window (file-truename info)))
- ((diff)
- (dired-jump other-window (file-truename (magit-diff-item-file item))))
- ((hunk)
- (dired-jump other-window
- (file-truename (magit-diff-item-file
- (magit-hunk-item-diff item))))))))
+ (interactive "P")
+ (require 'dired-x)
+ (magit-section-action (item info "dired-jump")
+ ((untracked file)
+ (dired-jump other-window (file-truename info)))
+ ((diff)
+ (dired-jump other-window (file-truename (magit-diff-item-file item))))
+ ((hunk)
+ (dired-jump other-window
+ (file-truename (magit-diff-item-file
+ (magit-hunk-item-diff item)))))))
(defun magit-visit-file-item (&optional other-window)
"Visit current file associated with item.