mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-05 23:21:22 -08:00
Fix fallback use of write-file in ido-mode
* lisp/ido.el (ido-file-internal): Make `write-file' respect the directory we've navigated to (bug#28513).
This commit is contained in:
parent
7fad959114
commit
526abadd07
1 changed files with 10 additions and 1 deletions
11
lisp/ido.el
11
lisp/ido.el
|
|
@ -2367,7 +2367,16 @@ If cursor is not at the end of the user input, move to end of input."
|
|||
(read-file-name-function nil))
|
||||
(setq this-command (or ido-fallback fallback 'find-file))
|
||||
(run-hook-with-args 'ido-before-fallback-functions this-command)
|
||||
(call-interactively this-command)))
|
||||
(if (eq this-command 'write-file)
|
||||
(write-file (read-file-name
|
||||
"Write file: "
|
||||
default-directory
|
||||
(and buffer-file-name
|
||||
(expand-file-name
|
||||
(file-name-nondirectory buffer-file-name)
|
||||
default-directory)))
|
||||
t)
|
||||
(call-interactively this-command))))
|
||||
|
||||
((eq ido-exit 'switch-to-buffer)
|
||||
(ido-buffer-internal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue