[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/vc-dir.el,v
From: |
Dan Nicolaescu |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/vc-dir.el,v |
Date: |
Thu, 24 Jul 2008 01:57:26 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Dan Nicolaescu <dann> 08/07/24 01:57:25
Index: vc-dir.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc-dir.el,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -b -r1.14 -r1.15
--- vc-dir.el 22 Jul 2008 08:42:19 -0000 1.14
+++ vc-dir.el 24 Jul 2008 01:57:24 -0000 1.15
@@ -159,6 +159,9 @@
(define-key map [qr]
'(menu-item "Query Replace in Files" vc-dir-query-replace-regexp
:help "Replace a string in the marked files"))
+ (define-key map [se]
+ '(menu-item "Search Files" vc-dir-search
+ :help "Search a regexp in the marked files"))
(define-key map [open-other]
'(menu-item "Open in other window" vc-dir-find-file-other-window
:help "Find the file on the current line, in another window"))
@@ -250,6 +253,7 @@
(define-key map [down-mouse-3] 'vc-dir-menu)
(define-key map [mouse-2] 'vc-dir-toggle-mark)
(define-key map "x" 'vc-dir-hide-up-to-date)
+ (define-key map "S" 'vc-dir-search) ;; FIXME: Maybe use A like dired?
(define-key map "Q" 'vc-dir-query-replace-regexp)
;; Hook up the menu.
@@ -679,8 +683,17 @@
(interactive)
(find-file-other-window (vc-dir-current-file)))
+(defun vc-dir-search (regexp)
+ "Search through all marked files for a match for REGEXP.
+For marked directories, use the files displayed from those directories.
+Stops when a match is found.
+To continue searching for next match, use command \\[tags-loop-continue]."
+ (interactive "sSearch marked files (regexp): ")
+ (tags-search regexp '(mapcar 'car (vc-dir-marked-only-files-and-states))))
+
(defun vc-dir-query-replace-regexp (from to &optional delimited)
"Do `query-replace-regexp' of FROM with TO, on all marked files.
+For marked directories, use the files displayed from those directories.
If a directory is marked, then use the files displayed for that directory.
Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
If you exit (\\[keyboard-quit], RET or q), you can resume the query replace
- [Emacs-diffs] Changes to emacs/lisp/vc-dir.el,v, Dan Nicolaescu, 2008/07/01
- [Emacs-diffs] Changes to emacs/lisp/vc-dir.el,v, Dan Nicolaescu, 2008/07/03
- [Emacs-diffs] Changes to emacs/lisp/vc-dir.el,v, Dan Nicolaescu, 2008/07/05
- [Emacs-diffs] Changes to emacs/lisp/vc-dir.el,v, Dan Nicolaescu, 2008/07/07
- [Emacs-diffs] Changes to emacs/lisp/vc-dir.el,v, Dan Nicolaescu, 2008/07/21
- [Emacs-diffs] Changes to emacs/lisp/vc-dir.el,v, Bastien Guerry, 2008/07/22
- [Emacs-diffs] Changes to emacs/lisp/vc-dir.el,v,
Dan Nicolaescu <=
- [Emacs-diffs] Changes to emacs/lisp/vc-dir.el,v, Dan Nicolaescu, 2008/07/23
- [Emacs-diffs] Changes to emacs/lisp/vc-dir.el,v, Dan Nicolaescu, 2008/07/30
- [Emacs-diffs] Changes to emacs/lisp/vc-dir.el,v, Sam Steingold, 2008/07/30