summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1995-03-21 19:57:36 +0000
committerRichard M. Stallman <rms@gnu.org>1995-03-21 19:57:36 +0000
commitf213dcefd9d7531afeebc3cc812376fb23d3f1f4 (patch)
treec0491d1724a9411d9be93dd9e1b1ddcb0013f629
parentf078aa45d24e8cf317da467d2106ac4fbad575a4 (diff)
downloademacs-f213dcefd9d7531afeebc3cc812376fb23d3f1f4.tar.gz
(occur): Copy default-directory to *Occur* buffer.
-rw-r--r--lisp/replace.el2
1 files changed, 2 insertions, 0 deletions
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))