summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorDmitry Gutov <dgutov@yandex.ru>2019-12-29 15:44:08 +0300
committerDmitry Gutov <dgutov@yandex.ru>2019-12-29 15:46:44 +0300
commit65af18d86eed140100c98c1bf3076f805f2bcc06 (patch)
tree7cc2026b60ed7b848e0584c043fed0d101ccd1ba /lisp
parent98788bf9768fec915c745aae8c9196636ffeaecc (diff)
downloademacs-65af18d86eed140100c98c1bf3076f805f2bcc06.tar.gz
emacs-65af18d86eed140100c98c1bf3076f805f2bcc06.tar.bz2
emacs-65af18d86eed140100c98c1bf3076f805f2bcc06.zip
Rename xref-collect-references and xref-collect-matches
* lisp/progmodes/xref.el (xref-references-in-directory): Rename from xref-collect-references. Update the sole caller. (xref-matches-in-directory): Rename from xref-collect-matches. Update all callers (all of them are in the /tests/ dir). * test/lisp/progmodes/xref-tests.el (xref-tests-data-dir): Don't use the EMACS_TEST_DIRECTORY env var. It doesn't work when running interactively.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/xref.el16
1 files changed, 13 insertions, 3 deletions
diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el
index a9d41258471..9f010eb83bf 100644
--- a/lisp/progmodes/xref.el
+++ b/lisp/progmodes/xref.el
@@ -261,7 +261,7 @@ find a search tool; by default, this uses \"find | grep\" in the
`project-current' roots."
(cl-mapcan
(lambda (dir)
- (xref-collect-references identifier dir))
+ (xref-references-in-directory identifier dir))
(let ((pr (project-current t)))
(append
(project-roots pr)
@@ -1129,7 +1129,7 @@ and just use etags."
(declare-function grep-expand-template "grep")
(defvar ede-minor-mode) ;; ede.el
-(defun xref-collect-references (symbol dir)
+(defun xref-references-in-directory (symbol dir)
"Find all references to SYMBOL in directory DIR.
Return a list of xref values.
@@ -1160,8 +1160,13 @@ and when."
(xref--convert-hits (semantic-symref-perform-search inst)
(format "\\_<%s\\_>" (regexp-quote symbol)))))
+(define-obsolete-function-alias
+ 'xref-collect-references
+ #'xref-references-in-directory
+ "27.1")
+
;;;###autoload
-(defun xref-collect-matches (regexp files dir ignores)
+(defun xref-matches-in-directory (regexp files dir ignores)
"Find all matches for REGEXP in directory DIR.
Return a list of xref values.
Only files matching some of FILES and none of IGNORES are searched.
@@ -1207,6 +1212,11 @@ IGNORES is a list of glob patterns for files to ignore."
hits)))
(xref--convert-hits (nreverse hits) regexp)))
+(define-obsolete-function-alias
+ 'xref-collect-matches
+ #'xref-matches-in-directory
+ "27.1")
+
(defun xref--rgrep-command (regexp files dir ignores)
(require 'find-dired) ; for `find-name-arg'
(defvar grep-find-template)