Commit bdd610b2 authored by Richard M. Stallman's avatar Richard M. Stallman

(occur): Copy default-directory to *Occur* buffer.

parent f1913a26
......@@ -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))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment