summaryrefslogtreecommitdiff
path: root/lisp/dired.el
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2016-01-18 22:11:46 +0300
committerDmitry Gutov <dgutov@yandex.ru>2016-01-18 22:14:17 +0300
commit36b0729ce765c132e04586be0e2deca405b4c313 (patch)
tree73bb61012ea69e263966e9b743b8544c8a4c71c5 /lisp/dired.el
parent5b62b980f9d89758211959486681dcb8d416ef84 (diff)
downloademacs-36b0729ce765c132e04586be0e2deca405b4c313.tar.gz
Add xref-based replacements for Dired search commands
* lisp/dired-aux.el (dired-do-find-regexp) (dired-do-find-regexp-and-replace): New commands. http://lists.gnu.org/archive/html/emacs-devel/2016-01/msg00864.html * lisp/dired.el (dired-mode-map): Change bindings for `A' and `Q' to the new commands. * lisp/progmodes/xref.el (xref-query-replace) (xref-collect-matches): Add progress reporters. (xref--find-ignores-arguments): Return nil for zero ignores. (xref--show-xrefs): Add an optional argument. (xref-collect-matches): Drop the assert. 'find' accepts a regular file in place of directory argument, too.
Diffstat (limited to 'lisp/dired.el')
-rw-r--r--lisp/dired.el16
1 files changed, 13 insertions, 3 deletions
diff --git a/lisp/dired.el b/lisp/dired.el
index d7bc318d17b..0ca14b30e2c 100644
--- a/lisp/dired.el
+++ b/lisp/dired.el
@@ -1450,7 +1450,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
(define-key map "." 'dired-clean-directory)
(define-key map "~" 'dired-flag-backup-files)
;; Upper case keys (except !) for operating on the marked files
- (define-key map "A" 'dired-do-search)
+ (define-key map "A" 'dired-do-find-regexp)
(define-key map "C" 'dired-do-copy)
(define-key map "B" 'dired-do-byte-compile)
(define-key map "D" 'dired-do-delete)
@@ -1460,7 +1460,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST."
(define-key map "M" 'dired-do-chmod)
(define-key map "O" 'dired-do-chown)
(define-key map "P" 'dired-do-print)
- (define-key map "Q" 'dired-do-query-replace-regexp)
+ (define-key map "Q" 'dired-do-find-regexp-and-replace)
(define-key map "R" 'dired-do-rename)
(define-key map "S" 'dired-do-symlink)
(define-key map "T" 'dired-do-touch)
@@ -3905,7 +3905,7 @@ Ask means pop up a menu for the user to select one of copy, move or link."
;;; Start of automatically extracted autoloads.
-;;;### (autoloads nil "dired-aux" "dired-aux.el" "7b7e39be8bcaf5f35b2735c3f5635f40")
+;;;### (autoloads nil "dired-aux" "dired-aux.el" "ab7321f16a90251f12f0031ddd6a710c")
;;; Generated autoloads from dired-aux.el
(autoload 'dired-diff "dired-aux" "\
@@ -4408,6 +4408,16 @@ with the command \\[tags-loop-continue].
\(fn FROM TO &optional DELIMITED)" t nil)
+(autoload 'dired-do-find-regexp "dired-aux" "\
+Find all matches for REGEXP in all marked files, recursively.
+
+\(fn REGEXP)" t nil)
+
+(autoload 'dired-do-find-regexp-and-replace "dired-aux" "\
+Replace matches of FROM with TO, in all marked files, recursively.
+
+\(fn FROM TO)" t nil)
+
(autoload 'dired-show-file-type "dired-aux" "\
Print the type of FILE, according to the `file' command.
If you give a prefix to this command, and FILE is a symbolic