[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/lisp vc-dir.el
From: |
Nick Roberts |
Subject: |
[Emacs-diffs] emacs/lisp vc-dir.el |
Date: |
Tue, 10 Feb 2009 05:51:48 +0000 |
CVSROOT: /sources/emacs
Module name: emacs
Changes by: Nick Roberts <nickrob> 09/02/10 05:51:48
Modified files:
lisp : vc-dir.el
Log message:
(vc-dir-find-file-other-window): Allow mouse events.
(vc-dir-mouse-map): New keymap.
(vc-default-dir-printer): Use it locally.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/vc-dir.el?cvsroot=emacs&r1=1.34&r2=1.35
Patches:
Index: vc-dir.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc-dir.el,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- vc-dir.el 31 Jan 2009 18:38:59 -0000 1.34
+++ vc-dir.el 10 Feb 2009 05:51:47 -0000 1.35
@@ -689,9 +689,10 @@
(interactive)
(find-file (vc-dir-current-file)))
-(defun vc-dir-find-file-other-window ()
+(defun vc-dir-find-file-other-window (&optional event)
"Find the file on the current line, in another window."
- (interactive)
+ (interactive (list last-nonmenu-event))
+ (if event (posn-set-point (event-end event)))
(find-file-other-window (vc-dir-current-file)))
(defun vc-dir-isearch ()
@@ -1145,6 +1146,12 @@
(propertize "Please add backend specific headers here. It's easy!"
'face 'font-lock-warning-face)))
+(defvar vc-dir-mouse-map
+ (let ((map (make-sparse-keymap)))
+ (define-key map [mouse-2] 'vc-dir-find-file-other-window)
+ map)
+ "Local keymap for visiting a file.")
+
(defun vc-default-dir-printer (backend fileentry)
"Pretty print FILEENTRY."
;; If you change the layout here, change vc-dir-move-to-goal-column.
@@ -1171,7 +1178,8 @@
(if isdir
"Directory\nVC operations can be applied to it\nmouse-3: Pop-up menu"
"File\nmouse-3: Pop-up menu")
- 'mouse-face 'highlight))))
+ 'mouse-face 'highlight
+ 'keymap vc-dir-mouse-map))))
(defun vc-default-extra-status-menu (backend)
nil)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs/lisp vc-dir.el,
Nick Roberts <=