Commit 6462af0d authored by Jason Rumney's avatar Jason Rumney
Browse files

(read-file-name): Only split dir name when

default filename is missing.  (Bug#2585)
parent 18a10a21
2009-03-09 Jason Rumney <jasonr@gnu.org>
* minibuffer.el (read-file-name): Only split dir name when
default filename is missing. (Bug#2585)
2009-03-08 Chong Yidong <cyd@stupidchicken.com>
 
* finder.el (finder-commentary): Don't delete other
......
......@@ -1159,9 +1159,11 @@ and `read-file-name-function'."
(completing-read prompt 'read-file-name-internal
nil mustmatch insdef 'file-name-history
default-filename)))
;; If DIR contains a file name, split it.
;; If DEFAULT-FILENAME not supplied and DIR contains
;; a file name, split it.
(let ((file (file-name-nondirectory dir)))
(when (and default-filename (not (zerop (length file))))
(when (and (not default-filename)
(not (zerop (length file))))
(setq default-filename file)
(setq dir (file-name-directory dir)))
(if default-filename
......
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