changeset 102455:03ed2dba14f6

(read-file-name): Only split dir name when default filename is missing. (Bug#2585)
author Jason Rumney <jasonr@gnu.org>
date Mon, 09 Mar 2009 13:29:42 +0000
parents 1c91e99dcfe7
children 6dc2b1ed8890
files lisp/minibuffer.el
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/minibuffer.el	Mon Mar 09 08:36:54 2009 +0000
+++ b/lisp/minibuffer.el	Mon Mar 09 13:29:42 2009 +0000
@@ -1159,9 +1159,11 @@
                         (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