diff options
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/vc-dir.el | 24 |
2 files changed, 25 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1fe698ddcb1..5c9022f9883 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,7 +1,8 @@ | |||
| 1 | 2008-07-24 Dan Nicolaescu <dann@ics.uci.edu> | 1 | 2008-07-24 Dan Nicolaescu <dann@ics.uci.edu> |
| 2 | 2 | ||
| 3 | * vc-dir.el (vc-dir-search): New function. | 3 | * vc-dir.el (vc-dir-search, vc-dir-isearch) |
| 4 | (vc-dir-mode-map, vc-dir-menu-map): Bind it. | 4 | (vc-dir-isearch-regexp): New functions. |
| 5 | (vc-dir-mode-map, vc-dir-menu-map): Bind them. | ||
| 5 | 6 | ||
| 6 | 2008-07-23 Juri Linkov <juri@jurta.org> | 7 | 2008-07-23 Juri Linkov <juri@jurta.org> |
| 7 | 8 | ||
diff --git a/lisp/vc-dir.el b/lisp/vc-dir.el index 7041d5765b5..17b2489654f 100644 --- a/lisp/vc-dir.el +++ b/lisp/vc-dir.el | |||
| @@ -157,11 +157,17 @@ See `run-hooks'." | |||
| 157 | 157 | ||
| 158 | (define-key map [sepopn] '("--")) | 158 | (define-key map [sepopn] '("--")) |
| 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] | 162 | (define-key map [se] |
| 163 | '(menu-item "Search Files" vc-dir-search | 163 | '(menu-item "Search Files..." vc-dir-search |
| 164 | :help "Search a regexp in the marked files")) | 164 | :help "Search a regexp in the marked files")) |
| 165 | (define-key map [ires] | ||
| 166 | '(menu-item "Isearch Regexp Files..." vc-dir-isearch-regexp | ||
| 167 | :help "Incremental search a regexp in the marked files")) | ||
| 168 | (define-key map [ise] | ||
| 169 | '(menu-item "Isearch Files..." vc-dir-isearch | ||
| 170 | :help "Incremental search a string in the marked files")) | ||
| 165 | (define-key map [open-other] | 171 | (define-key map [open-other] |
| 166 | '(menu-item "Open in other window" vc-dir-find-file-other-window | 172 | '(menu-item "Open in other window" vc-dir-find-file-other-window |
| 167 | :help "Find the file on the current line, in another window")) | 173 | :help "Find the file on the current line, in another window")) |
| @@ -255,6 +261,8 @@ See `run-hooks'." | |||
| 255 | (define-key map "x" 'vc-dir-hide-up-to-date) | 261 | (define-key map "x" 'vc-dir-hide-up-to-date) |
| 256 | (define-key map "S" 'vc-dir-search) ;; FIXME: Maybe use A like dired? | 262 | (define-key map "S" 'vc-dir-search) ;; FIXME: Maybe use A like dired? |
| 257 | (define-key map "Q" 'vc-dir-query-replace-regexp) | 263 | (define-key map "Q" 'vc-dir-query-replace-regexp) |
| 264 | (define-key map (kbd "M-s a C-s") 'vc-dir-isearch) | ||
| 265 | (define-key map (kbd "M-s a M-C-s") 'vc-dir-isearch-regexp) | ||
| 258 | 266 | ||
| 259 | ;; Hook up the menu. | 267 | ;; Hook up the menu. |
| 260 | (define-key map [menu-bar vc-dir-mode] | 268 | (define-key map [menu-bar vc-dir-mode] |
| @@ -683,6 +691,18 @@ that share the same state." | |||
| 683 | (interactive) | 691 | (interactive) |
| 684 | (find-file-other-window (vc-dir-current-file))) | 692 | (find-file-other-window (vc-dir-current-file))) |
| 685 | 693 | ||
| 694 | (defun vc-dir-isearch () | ||
| 695 | "Search for a string through all marked buffers using Isearch." | ||
| 696 | (interactive) | ||
| 697 | (multi-isearch-files | ||
| 698 | (mapcar 'car (vc-dir-marked-only-files-and-states)))) | ||
| 699 | |||
| 700 | (defun vc-dir-isearch-regexp () | ||
| 701 | "Search for a regexp through all marked buffers using Isearch." | ||
| 702 | (interactive) | ||
| 703 | (multi-isearch-files-regexp | ||
| 704 | (mapcar 'car (vc-dir-marked-only-files-and-states)))) | ||
| 705 | |||
| 686 | (defun vc-dir-search (regexp) | 706 | (defun vc-dir-search (regexp) |
| 687 | "Search through all marked files for a match for REGEXP. | 707 | "Search through all marked files for a match for REGEXP. |
| 688 | For marked directories, use the files displayed from those directories. | 708 | For marked directories, use the files displayed from those directories. |