Browse Source

Tiny refactoring

* lisp/org.el (org-iread-file-name): Refactor.

`read-file-name' already applies `read-file-name-function' when
available.
Nicolas Goaziou 10 years ago
parent
commit
ce4e647c21
1 changed files with 4 additions and 4 deletions
  1. 4 4
      lisp/org.el

+ 4 - 4
lisp/org.el

@@ -10467,11 +10467,11 @@ See `read-file-name' for a description of parameters."
   (org-without-partial-completion
    (if (and org-completion-use-ido
             (fboundp 'ido-read-file-name)
-            (boundp 'ido-mode) ido-mode
-            (listp (second args)))
+            (org-bound-and-true-p ido-mode)
+            (listp (nth 1 args)))
        (let ((ido-enter-matching-directory nil))
-         (apply 'ido-read-file-name args))
-     (apply (or read-file-name-function 'read-file-name) args))))
+         (apply #'ido-read-file-name args))
+     (apply #'read-file-name args))))
 
 (defun org-completing-read (&rest args)
   "Completing-read with SPACE being a normal character."