diff options
| author | Dan Nicolaescu | 2008-07-24 01:57:24 +0000 |
|---|---|---|
| committer | Dan Nicolaescu | 2008-07-24 01:57:24 +0000 |
| commit | 834d998e3998448bf08b7609c6814fa8daf8d280 (patch) | |
| tree | b7b91fc59ffeae9c43149a12d3d4c27b3126a704 /lisp | |
| parent | d96e6e5cd3a0c634428370c642dabb2c5bcb56b0 (diff) | |
| download | emacs-834d998e3998448bf08b7609c6814fa8daf8d280.tar.gz emacs-834d998e3998448bf08b7609c6814fa8daf8d280.zip | |
(vc-dir-search): New function.
(vc-dir-mode-map, vc-dir-menu-map): Bind it.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/vc-dir.el | 13 |
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 @@ | |||
| 1 | 2008-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 | |||
| 1 | 2008-07-23 Juri Linkov <juri@jurta.org> | 6 | 2008-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. | ||
| 688 | For marked directories, use the files displayed from those directories. | ||
| 689 | Stops when a match is found. | ||
| 690 | To 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. |
| 696 | For marked directories, use the files displayed from those directories. | ||
| 684 | If a directory is marked, then use the files displayed for that directory. | 697 | If a directory is marked, then use the files displayed for that directory. |
| 685 | Third arg DELIMITED (prefix arg) means replace only word-delimited matches. | 698 | Third arg DELIMITED (prefix arg) means replace only word-delimited matches. |
| 686 | If you exit (\\[keyboard-quit], RET or q), you can resume the query replace | 699 | If you exit (\\[keyboard-quit], RET or q), you can resume the query replace |