Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
834d998e
Commit
834d998e
authored
Jul 24, 2008
by
Dan Nicolaescu
Browse files
(vc-dir-search): New function.
(vc-dir-mode-map, vc-dir-menu-map): Bind it.
parent
d96e6e5c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
lisp/ChangeLog
lisp/ChangeLog
+5
-0
lisp/vc-dir.el
lisp/vc-dir.el
+13
-0
No files found.
lisp/ChangeLog
View file @
834d998e
2008-07-24 Dan Nicolaescu <dann@ics.uci.edu>
* vc-dir.el (vc-dir-search): New function.
(vc-dir-mode-map, vc-dir-menu-map): Bind it.
2008-07-23 Juri Linkov <juri@jurta.org>
* isearch-multi.el: Remove file to avoid dos file name clashes
...
...
lisp/vc-dir.el
View file @
834d998e
...
...
@@ -159,6 +159,9 @@ See `run-hooks'."
(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 @@ See `run-hooks'."
(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 @@ that share the same state."
(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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment