From 5a41dd0a1f317b36f86fb4e52db945385250c56e Mon Sep 17 00:00:00 2001 From: Dmitry Gutov Date: Tue, 26 Sep 2017 01:44:54 +0300 Subject: [PATCH] Reset default-directory inside *xref-grep* buffer * lisp/progmodes/xref.el (xref-collect-matches): Reset default-directory, too. (Bug#28575) --- lisp/progmodes/xref.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index 623c9c4e07f..80cdcb3f18b 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -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)) -- 2.39.5