emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r113366: * ido.el (ido-read-file-name): Conform to t


From: Leo Liu
Subject: [Emacs-diffs] trunk r113366: * ido.el (ido-read-file-name): Conform to the requirements of
Date: Thu, 11 Jul 2013 03:04:37 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113366
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/11861
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Thu 2013-07-11 10:59:54 +0800
message:
  * ido.el (ido-read-file-name): Conform to the requirements of
  read-file-name. 
  (ido-read-directory-name): Conform to the requirements of
  read-directory-name.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/ido.el                    ido.el-20091113204419-o5vbwnq5f7feedwu-2430
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-07-11 01:49:17 +0000
+++ b/lisp/ChangeLog    2013-07-11 02:59:54 +0000
@@ -1,3 +1,10 @@
+2013-07-11  Leo Liu  <address@hidden>
+
+       * ido.el (ido-read-file-name): Conform to the requirements of
+       read-file-name.  (Bug#11861)
+       (ido-read-directory-name): Conform to the requirements of
+       read-directory-name.
+
 2013-07-11  Juanma Barranquero  <address@hidden>
 
        * subr.el (delay-warning): New function.

=== modified file 'lisp/ido.el'
--- a/lisp/ido.el       2013-07-09 05:09:45 +0000
+++ b/lisp/ido.el       2013-07-11 02:59:54 +0000
@@ -4780,7 +4780,14 @@
             (ido-find-literal nil))
        (setq ido-exit nil)
        (setq filename
-             (ido-read-internal 'file prompt 'ido-file-history 
default-filename mustmatch initial))
+             (ido-read-internal 'file prompt 'ido-file-history
+                                (cond  ; Bug#11861.
+                                 ((stringp default-filename) default-filename)
+                                 ((consp default-filename) (car 
default-filename))
+                                 ((and (not default-filename) initial)
+                                  (expand-file-name initial dir))
+                                 (buffer-file-name buffer-file-name))
+                                mustmatch initial))
        (setq dir ido-current-directory) ; See bug#1516.
        (cond
         ((eq ido-exit 'fallback)
@@ -4813,8 +4820,13 @@
                                     (ido-directory-too-big-p 
ido-current-directory)))
         (ido-work-directory-index -1)
         (ido-work-file-index -1))
-    (setq filename
-         (ido-read-internal 'dir prompt 'ido-file-history default-dirname 
mustmatch initial))
+    (setq filename (ido-read-internal
+                   'dir prompt 'ido-file-history
+                   (or default-dirname ; Bug#11861.
+                       (if initial
+                           (expand-file-name initial ido-current-directory)
+                         ido-current-directory))
+                   mustmatch initial))
     (cond
      ((eq ido-exit 'fallback)
       (let ((read-file-name-function nil))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]