summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lisp/km-files.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/km-files.el b/lisp/km-files.el
index 9e9edc3..762afe5 100644
--- a/lisp/km-files.el
+++ b/lisp/km-files.el
@@ -125,7 +125,7 @@ Prompt with characters from `km/find-scratch-buffers' to
determine the extension of the scratch file.
With prefix argument PWD, find the scratch file in
-`default-directory' instead of /tmp."
+`default-directory' instead of `temporary-file-directory'."
(interactive "P")
(switch-to-buffer (km/scratch--find-file-no-select pwd)))
@@ -142,7 +142,8 @@ With prefix argument PWD, find the scratch file in
(let* ((choices (mapcar #'car km/find-scratch-buffers))
(ch (read-char-choice (concat "[" choices "]") choices))
(ext (cadr (assq ch km/find-scratch-buffers))))
- (concat (if pwd default-directory "/tmp/") "scratch" ext)))
+ (expand-file-name (concat "scratch" ext)
+ (if pwd default-directory temporary-file-directory))))
(provide 'km-files)
;;; km-files.el ends here