Commit df0f2a5f authored by Juri Linkov's avatar Juri Linkov

* lisp/vc/vc-dir.el (vc-dir-display-file): New command.

(vc-dir-mode-map): Bind it to "\C-o".
(vc-dir-menu-map): Add it to menu.

Fixes: debbugs:19450
parent c1eec814
2014-12-29 Juri Linkov <juri@linkov.net>
* vc/vc-dir.el (vc-dir-display-file): New command (bug#19450).
(vc-dir-mode-map): Bind it to "\C-o".
(vc-dir-menu-map): Add it to menu.
2014-12-29 Dmitry Gutov <dgutov@yandex.ru> 2014-12-29 Dmitry Gutov <dgutov@yandex.ru>
* progmodes/etags.el (find-tag-other-window) * progmodes/etags.el (find-tag-other-window)
......
...@@ -169,6 +169,9 @@ See `run-hooks'." ...@@ -169,6 +169,9 @@ See `run-hooks'."
(define-key map [ise] (define-key map [ise]
'(menu-item "Isearch Files..." vc-dir-isearch '(menu-item "Isearch Files..." vc-dir-isearch
:help "Incremental search a string in the marked files")) :help "Incremental search a string in the marked files"))
(define-key map [display]
'(menu-item "Display in Other Window" vc-dir-display-file
:help "Display the file on the current line, in another window"))
(define-key map [open-other] (define-key map [open-other]
'(menu-item "Open in Other Window" vc-dir-find-file-other-window '(menu-item "Open in Other Window" vc-dir-find-file-other-window
:help "Find the file on the current line, in another window")) :help "Find the file on the current line, in another window"))
...@@ -273,6 +276,7 @@ See `run-hooks'." ...@@ -273,6 +276,7 @@ See `run-hooks'."
(define-key map "e" 'vc-dir-find-file) ; dired-mode compatibility (define-key map "e" 'vc-dir-find-file) ; dired-mode compatibility
(define-key map "\C-m" 'vc-dir-find-file) (define-key map "\C-m" 'vc-dir-find-file)
(define-key map "o" 'vc-dir-find-file-other-window) (define-key map "o" 'vc-dir-find-file-other-window)
(define-key map "\C-o" 'vc-dir-display-file)
(define-key map "\C-c\C-c" 'vc-dir-kill-dir-status-process) (define-key map "\C-c\C-c" 'vc-dir-kill-dir-status-process)
(define-key map [down-mouse-3] 'vc-dir-menu) (define-key map [down-mouse-3] 'vc-dir-menu)
(define-key map [mouse-2] 'vc-dir-toggle-mark) (define-key map [mouse-2] 'vc-dir-toggle-mark)
...@@ -755,6 +759,13 @@ that share the same state." ...@@ -755,6 +759,13 @@ that share the same state."
(if event (posn-set-point (event-end event))) (if event (posn-set-point (event-end event)))
(find-file-other-window (vc-dir-current-file))) (find-file-other-window (vc-dir-current-file)))
(defun vc-dir-display-file (&optional event)
"Display the file on the current line, in another window."
(interactive (list last-nonmenu-event))
(if event (posn-set-point (event-end event)))
(display-buffer (find-file-noselect (vc-dir-current-file))
t))
(defun vc-dir-isearch () (defun vc-dir-isearch ()
"Search for a string through all marked buffers using Isearch." "Search for a string through all marked buffers using Isearch."
(interactive) (interactive)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment