From f213dcefd9d7531afeebc3cc812376fb23d3f1f4 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 21 Mar 1995 19:57:36 +0000 Subject: (occur): Copy default-directory to *Occur* buffer. --- lisp/replace.el | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lisp/replace.el') diff --git a/lisp/replace.el b/lisp/replace.el index bd9ba1dbe96..df58492f871 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -344,6 +344,7 @@ It serves as a menu to find any of the occurrences in this buffer. list-matching-lines-default-context-lines)) (let ((first t) (buffer (current-buffer)) + (dir default-directory) (linenum 1) (prevpos (point-min)) (final-context-start (make-marker))) @@ -354,6 +355,7 @@ It serves as a menu to find any of the occurrences in this buffer. (with-output-to-temp-buffer "*Occur*" (save-excursion (set-buffer standard-output) + (setq default-directory dir) ;; We will insert the number of lines, and "lines", later. (insert " matching ") (let ((print-escape-newlines t)) -- cgit v1.2.1