emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r113334: * ido.el (ido-read-directory-name): Handle


From: Leo Liu
Subject: [Emacs-diffs] trunk r113334: * ido.el (ido-read-directory-name): Handle fallback.
Date: Tue, 09 Jul 2013 02:49:10 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113334
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/1516
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Tue 2013-07-09 10:47:44 +0800
message:
  * ido.el (ido-read-directory-name): Handle fallback.
  (ido-read-file-name): Update DIR to ido-current-directory.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/ido.el                    ido.el-20091113204419-o5vbwnq5f7feedwu-2430
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-07-09 01:17:48 +0000
+++ b/lisp/ChangeLog    2013-07-09 02:47:44 +0000
@@ -1,3 +1,9 @@
+2013-07-09  Leo Liu  <address@hidden>
+
+       * ido.el (ido-read-directory-name): Handle fallback.
+       (ido-read-file-name): Update DIR to ido-current-directory.
+       (Bug#1516)
+
 2013-07-09  Dmitry Gutov  <address@hidden>
 
        * progmodes/ruby-mode.el (ruby-font-lock-keywords): Remove extra

=== modified file 'lisp/ido.el'
--- a/lisp/ido.el       2013-07-06 12:37:12 +0000
+++ b/lisp/ido.el       2013-07-09 02:47:44 +0000
@@ -4754,9 +4754,7 @@
          (eq (get this-command 'ido) 'dir)
          (memq this-command ido-read-file-name-as-directory-commands))
       (setq filename
-           (ido-read-directory-name prompt dir default-filename mustmatch 
initial))
-      (if (eq ido-exit 'fallback)
-         (setq filename 'fallback)))
+           (ido-read-directory-name prompt dir default-filename mustmatch 
initial)))
      ((and (not (eq (get this-command 'ido) 'ignore))
           (not (memq this-command ido-read-file-name-non-ido))
           (or (null predicate) (eq predicate 'file-exists-p)))
@@ -4777,6 +4775,7 @@
        (setq ido-exit nil)
        (setq filename
              (ido-read-internal 'file prompt 'ido-file-history 
default-filename mustmatch initial))
+       (setq dir ido-current-directory) ; See bug#1516.
        (cond
         ((eq ido-exit 'fallback)
          (setq filename 'fallback))
@@ -4810,10 +4809,14 @@
         (ido-work-file-index -1))
     (setq filename
          (ido-read-internal 'dir prompt 'ido-file-history default-dirname 
mustmatch initial))
-    (if filename
-       (if (and (stringp filename) (string-equal filename "."))
-           ido-current-directory
-         (concat ido-current-directory filename)))))
+    (cond
+     ((eq ido-exit 'fallback)
+      (let ((read-file-name-function nil))
+       (run-hook-with-args 'ido-before-fallback-functions 'read-directory-name)
+       (read-directory-name prompt ido-current-directory
+                            default-dirname mustmatch initial)))
+     ((equal filename ".") ido-current-directory)
+     (t (concat ido-current-directory filename)))))
 
 ;;;###autoload
 (defun ido-completing-read (prompt choices &optional _predicate require-match


reply via email to

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