summaryrefslogtreecommitdiff
path: root/lisp/files.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/files.el')
-rw-r--r--lisp/files.el3
1 files changed, 1 insertions, 2 deletions
diff --git a/lisp/files.el b/lisp/files.el
index 3fc6460078..1bde2be0ef 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -5411,8 +5411,7 @@ and `list-directory-verbose-switches'."
(princ "Directory ")
(princ dirname)
(terpri)
- (save-excursion
- (set-buffer "*Directory*")
+ (with-current-buffer "*Directory*"
(let ((wildcard (not (file-directory-p dirname))))
(insert-directory dirname switches wildcard (not wildcard)))))
;; Finishing with-output-to-temp-buffer seems to clobber default-directory.