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
(expand-file-name dir)
ignores))
(def default-directory)
(buf (get-buffer-create " *xref-grep*"))
(`(,grep-re ,file-group ,line-group . ,_) (car grep-regexp-alist))
(status nil)
(hits nil))
(with-current-buffer buf
(erase-buffer)
(setq default-directory def)
(setq status
(call-process-shell-command command nil t))
(goto-char (point-min))