Commit 4b8b1ec5 authored by Stefan Monnier's avatar Stefan Monnier

(find-alternate-file-other-window, find-alternate-file):

Obey confirm-nonexistent-file-or-buffer.
parent d6ceb380
This diff is collapsed.
......@@ -1432,7 +1432,8 @@ expand wildcards (if any) and replace the file with multiple files."
(setq file-name (file-name-nondirectory file)
file-dir (file-name-directory file)))
(list (read-file-name
"Find alternate file: " file-dir nil nil file-name)
"Find alternate file: " file-dir nil
(confirm-nonexistent-file-or-buffer) file-name)
t))))
(if (one-window-p)
(find-file-other-window filename wildcards)
......@@ -1461,7 +1462,8 @@ killed."
(setq file-name (file-name-nondirectory file)
file-dir (file-name-directory file)))
(list (read-file-name
"Find alternate file: " file-dir nil nil file-name)
"Find alternate file: " file-dir nil
(confirm-nonexistent-file-or-buffer) file-name)
t)))
(unless (run-hook-with-args-until-failure 'kill-buffer-query-functions)
(error "Aborted"))
......
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