Mercurial > emacs
comparison lisp/vc-dir.el @ 101717:3f1db2aeea5a
(vc-dir-mouse-map):
(vc-default-dir-printer):
(vc-dir-find-file-other-window): Undo previous change, it breaks
the behavior of mouse-2.
author | Dan Nicolaescu <dann@ics.uci.edu> |
---|---|
date | Sat, 31 Jan 2009 17:26:53 +0000 |
parents | e9aa71a1b711 |
children | e5e2e4109ea1 |
comparison
equal
deleted
inserted
replaced
101716:79f16674b60b | 101717:3f1db2aeea5a |
---|---|
687 (defun vc-dir-find-file () | 687 (defun vc-dir-find-file () |
688 "Find the file on the current line." | 688 "Find the file on the current line." |
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 (&optional event) | 692 (defun vc-dir-find-file-other-window () |
693 "Find the file on the current line, in another window." | 693 "Find the file on the current line, in another window." |
694 (interactive (list last-input-event)) | 694 (interactive) |
695 (if event (posn-set-point (event-end event))) | |
696 (find-file-other-window (vc-dir-current-file))) | 695 (find-file-other-window (vc-dir-current-file))) |
697 | 696 |
698 (defun vc-dir-isearch () | 697 (defun vc-dir-isearch () |
699 "Search for a string through all marked buffers using Isearch." | 698 "Search for a string through all marked buffers using Isearch." |
700 (interactive) | 699 (interactive) |
1142 (concat | 1141 (concat |
1143 (propertize "Extra : " 'face 'font-lock-type-face) | 1142 (propertize "Extra : " 'face 'font-lock-type-face) |
1144 (propertize "Please add backend specific headers here. It's easy!" | 1143 (propertize "Please add backend specific headers here. It's easy!" |
1145 'face 'font-lock-warning-face))) | 1144 'face 'font-lock-warning-face))) |
1146 | 1145 |
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 | |
1154 (defun vc-default-dir-printer (backend fileentry) | 1146 (defun vc-default-dir-printer (backend fileentry) |
1155 "Pretty print FILEENTRY." | 1147 "Pretty print FILEENTRY." |
1156 ;; If you change the layout here, change vc-dir-move-to-goal-column. | 1148 ;; If you change the layout here, change vc-dir-move-to-goal-column. |
1157 (let* ((isdir (vc-dir-fileinfo->directory fileentry)) | 1149 (let* ((isdir (vc-dir-fileinfo->directory fileentry)) |
1158 (state (if isdir "" (vc-dir-fileinfo->state fileentry))) | 1150 (state (if isdir "" (vc-dir-fileinfo->state fileentry))) |
1175 (if isdir 'font-lock-comment-delimiter-face 'font-lock-function-name-face) | 1167 (if isdir 'font-lock-comment-delimiter-face 'font-lock-function-name-face) |
1176 'help-echo | 1168 'help-echo |
1177 (if isdir | 1169 (if isdir |
1178 "Directory\nVC operations can be applied to it\nmouse-3: Pop-up menu" | 1170 "Directory\nVC operations can be applied to it\nmouse-3: Pop-up menu" |
1179 "File\nmouse-3: Pop-up menu") | 1171 "File\nmouse-3: Pop-up menu") |
1180 'mouse-face 'highlight | 1172 'mouse-face 'highlight)))) |
1181 'local-map vc-dir-mouse-map)))) | |
1182 | 1173 |
1183 (defun vc-default-extra-status-menu (backend) | 1174 (defun vc-default-extra-status-menu (backend) |
1184 nil) | 1175 nil) |
1185 | 1176 |
1186 (defun vc-default-status-fileinfo-extra (backend file) | 1177 (defun vc-default-status-fileinfo-extra (backend file) |