* lisp/progmodes/project.el (project--find-regexp-in-files):
Signal user-error when passed an empty list of files.
* lisp/progmodes/xref.el (xref-matches-in-files):
Make sure FILES is not empty.
nil)))
(defun project--find-regexp-in-files (regexp files)
+ (unless files
+ (user-error "Empty file list"))
(let ((xrefs (xref-matches-in-files regexp files)))
(unless xrefs
(user-error "No matches for: %s" regexp))
"Find all matches for REGEXP in FILES.
Return a list of xref values.
FILES must be a list of absolute file names."
+ (cl-assert (consp files))
(pcase-let*
((output (get-buffer-create " *project grep output*"))
(`(,grep-re ,file-group ,line-group . ,_) (car grep-regexp-alist))