diff options
| author | Nick Roberts | 2009-01-31 02:18:21 +0000 |
|---|---|---|
| committer | Nick Roberts | 2009-01-31 02:18:21 +0000 |
| commit | f2f8e1b8b0bb137793afe86e7931358c941631e2 (patch) | |
| tree | baca34143ee829a3c84cdadb360bd42b83c497e2 | |
| parent | f11e5363a66ad5513bb342e2359498cdeb3a8f8a (diff) | |
| download | emacs-f2f8e1b8b0bb137793afe86e7931358c941631e2.tar.gz emacs-f2f8e1b8b0bb137793afe86e7931358c941631e2.zip | |
(vc-dir-mouse-map): New keymap.
(vc-default-dir-printer): Use it locally.
(vc-dir-find-file-other-window): Allow mouse events.
| -rw-r--r-- | lisp/vc-dir.el | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lisp/vc-dir.el b/lisp/vc-dir.el index 249ceec75f9..6818b3a99d8 100644 --- a/lisp/vc-dir.el +++ b/lisp/vc-dir.el | |||
| @@ -689,9 +689,10 @@ that share the same state." | |||
| 689 | (interactive) | 689 | (interactive) |
| 690 | (find-file (vc-dir-current-file))) | 690 | (find-file (vc-dir-current-file))) |
| 691 | 691 | ||
| 692 | (defun vc-dir-find-file-other-window () | 692 | (defun vc-dir-find-file-other-window (&optional event) |
| 693 | "Find the file on the current line, in another window." | 693 | "Find the file on the current line, in another window." |
| 694 | (interactive) | 694 | (interactive (list last-input-event)) |
| 695 | (if event (posn-set-point (event-end event))) | ||
| 695 | (find-file-other-window (vc-dir-current-file))) | 696 | (find-file-other-window (vc-dir-current-file))) |
| 696 | 697 | ||
| 697 | (defun vc-dir-isearch () | 698 | (defun vc-dir-isearch () |
| @@ -1143,6 +1144,13 @@ Interactively, a prefix argument means to ask for the backend." | |||
| 1143 | (propertize "Please add backend specific headers here. It's easy!" | 1144 | (propertize "Please add backend specific headers here. It's easy!" |
| 1144 | 'face 'font-lock-warning-face))) | 1145 | 'face 'font-lock-warning-face))) |
| 1145 | 1146 | ||
| 1147 | ;; Keep existing map. | ||
| 1148 | (defvar vc-dir-mouse-map | ||
| 1149 | (let ((map vc-dir-mode-map)) | ||
| 1150 | (define-key map [mouse-2] 'vc-dir-find-file-other-window) | ||
| 1151 | map) | ||
| 1152 | "Local keymap for visiting a file.") | ||
| 1153 | |||
| 1146 | (defun vc-default-dir-printer (backend fileentry) | 1154 | (defun vc-default-dir-printer (backend fileentry) |
| 1147 | "Pretty print FILEENTRY." | 1155 | "Pretty print FILEENTRY." |
| 1148 | ;; If you change the layout here, change vc-dir-move-to-goal-column. | 1156 | ;; If you change the layout here, change vc-dir-move-to-goal-column. |
| @@ -1169,7 +1177,8 @@ Interactively, a prefix argument means to ask for the backend." | |||
| 1169 | (if isdir | 1177 | (if isdir |
| 1170 | "Directory\nVC operations can be applied to it\nmouse-3: Pop-up menu" | 1178 | "Directory\nVC operations can be applied to it\nmouse-3: Pop-up menu" |
| 1171 | "File\nmouse-3: Pop-up menu") | 1179 | "File\nmouse-3: Pop-up menu") |
| 1172 | 'mouse-face 'highlight)))) | 1180 | 'mouse-face 'highlight |
| 1181 | 'local-map vc-dir-mouse-map)))) | ||
| 1173 | 1182 | ||
| 1174 | (defun vc-default-extra-status-menu (backend) | 1183 | (defun vc-default-extra-status-menu (backend) |
| 1175 | nil) | 1184 | nil) |