aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/vc-dir.el13
2 files changed, 18 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2b2952b59f8..1fe698ddcb1 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12008-07-24 Dan Nicolaescu <dann@ics.uci.edu>
2
3 * vc-dir.el (vc-dir-search): New function.
4 (vc-dir-mode-map, vc-dir-menu-map): Bind it.
5
12008-07-23 Juri Linkov <juri@jurta.org> 62008-07-23 Juri Linkov <juri@jurta.org>
2 7
3 * isearch-multi.el: Remove file to avoid dos file name clashes 8 * isearch-multi.el: Remove file to avoid dos file name clashes
diff --git a/lisp/vc-dir.el b/lisp/vc-dir.el
index 755101dd5ee..7041d5765b5 100644
--- a/lisp/vc-dir.el
+++ b/lisp/vc-dir.el
@@ -159,6 +159,9 @@ See `run-hooks'."
159 (define-key map [qr] 159 (define-key map [qr]
160 '(menu-item "Query Replace in Files" vc-dir-query-replace-regexp 160 '(menu-item "Query Replace in Files" vc-dir-query-replace-regexp
161 :help "Replace a string in the marked files")) 161 :help "Replace a string in the marked files"))
162 (define-key map [se]
163 '(menu-item "Search Files" vc-dir-search
164 :help "Search a regexp in the marked files"))
162 (define-key map [open-other] 165 (define-key map [open-other]
163 '(menu-item "Open in other window" vc-dir-find-file-other-window 166 '(menu-item "Open in other window" vc-dir-find-file-other-window
164 :help "Find the file on the current line, in another window")) 167 :help "Find the file on the current line, in another window"))
@@ -250,6 +253,7 @@ See `run-hooks'."
250 (define-key map [down-mouse-3] 'vc-dir-menu) 253 (define-key map [down-mouse-3] 'vc-dir-menu)
251 (define-key map [mouse-2] 'vc-dir-toggle-mark) 254 (define-key map [mouse-2] 'vc-dir-toggle-mark)
252 (define-key map "x" 'vc-dir-hide-up-to-date) 255 (define-key map "x" 'vc-dir-hide-up-to-date)
256 (define-key map "S" 'vc-dir-search) ;; FIXME: Maybe use A like dired?
253 (define-key map "Q" 'vc-dir-query-replace-regexp) 257 (define-key map "Q" 'vc-dir-query-replace-regexp)
254 258
255 ;; Hook up the menu. 259 ;; Hook up the menu.
@@ -679,8 +683,17 @@ that share the same state."
679 (interactive) 683 (interactive)
680 (find-file-other-window (vc-dir-current-file))) 684 (find-file-other-window (vc-dir-current-file)))
681 685
686(defun vc-dir-search (regexp)
687 "Search through all marked files for a match for REGEXP.
688For marked directories, use the files displayed from those directories.
689Stops when a match is found.
690To continue searching for next match, use command \\[tags-loop-continue]."
691 (interactive "sSearch marked files (regexp): ")
692 (tags-search regexp '(mapcar 'car (vc-dir-marked-only-files-and-states))))
693
682(defun vc-dir-query-replace-regexp (from to &optional delimited) 694(defun vc-dir-query-replace-regexp (from to &optional delimited)
683 "Do `query-replace-regexp' of FROM with TO, on all marked files. 695 "Do `query-replace-regexp' of FROM with TO, on all marked files.
696For marked directories, use the files displayed from those directories.
684If a directory is marked, then use the files displayed for that directory. 697If a directory is marked, then use the files displayed for that directory.
685Third arg DELIMITED (prefix arg) means replace only word-delimited matches. 698Third arg DELIMITED (prefix arg) means replace only word-delimited matches.
686If you exit (\\[keyboard-quit], RET or q), you can resume the query replace 699If you exit (\\[keyboard-quit], RET or q), you can resume the query replace