Reset default-directory inside *xref-grep* buffer

* lisp/progmodes/xref.el (xref-collect-matches):
Reset default-directory, too. (Bug#28575)
This commit is contained in:
Dmitry Gutov 2017-09-26 01:44:54 +03:00
parent 49cd561dc6
commit 5a41dd0a1f

View file

@ -928,12 +928,14 @@ IGNORES is a list of glob patterns."
files files
(expand-file-name dir) (expand-file-name dir)
ignores)) ignores))
(def default-directory)
(buf (get-buffer-create " *xref-grep*")) (buf (get-buffer-create " *xref-grep*"))
(`(,grep-re ,file-group ,line-group . ,_) (car grep-regexp-alist)) (`(,grep-re ,file-group ,line-group . ,_) (car grep-regexp-alist))
(status nil) (status nil)
(hits nil)) (hits nil))
(with-current-buffer buf (with-current-buffer buf
(erase-buffer) (erase-buffer)
(setq default-directory def)
(setq status (setq status
(call-process-shell-command command nil t)) (call-process-shell-command command nil t))
(goto-char (point-min)) (goto-char (point-min))