* lisp/emacs-lisp/helpers.el (string-empty-p): New function.
[bpt/emacs.git] / lisp / ido.el
index 39ad313..42b3607 100644 (file)
@@ -797,7 +797,7 @@ remaining completion.  If absent, elements 5 and 6 are used instead."
 The value can be one of the following:
 
   nil:  No virtual buffers are used.
-  auto: Use virtual bufferw when the current input matches no
+  auto: Use virtual buffers when the current input matches no
         existing buffers.
   t:    Always use virtual buffers.
 
@@ -4707,19 +4707,18 @@ Modified from `icomplete-completions'."
     (cancel-timer ido-auto-merge-timer)
     (setq ido-auto-merge-timer nil))
 
-  (if (ido-active)
-      (if (and (boundp 'ido-eoinput)
-              ido-eoinput)
-
-         (if (> ido-eoinput (point-max))
-             ;; Oops, got rug pulled out from under us - reinit:
-             (setq ido-eoinput (point-max))
-           (let ((buffer-undo-list t))
-             (delete-region ido-eoinput (point-max))))
-
-       ;; Reestablish the local variable 'cause minibuffer-setup is weird:
-       (make-local-variable 'ido-eoinput)
-       (setq ido-eoinput 1))))
+  (when (ido-active)
+    (if (bound-and-true-p ido-eoinput)
+       (if (> ido-eoinput (point-max))
+           ;; Oops, got rug pulled out from under us - reinit:
+           (setq ido-eoinput (point-max))
+         (let ((inhibit-read-only t)
+               (buffer-undo-list t))
+           (delete-region ido-eoinput (point-max))))
+
+      ;; Reestablish the local variable 'cause minibuffer-setup is weird:
+      (make-local-variable 'ido-eoinput)
+      (setq ido-eoinput 1))))
 
 (defun ido-summary-buffers-to-end ()
   ;; Move the summaries to the end of the buffer list.
@@ -4740,6 +4739,7 @@ Modified from `icomplete-completions'."
 (put 'ibuffer-find-file 'ido 'find-file)
 (put 'dired 'ido 'dir)
 (put 'dired-other-window 'ido 'dir)
+(put 'dired-other-frame 'ido 'dir)
 ;; See http://debbugs.gnu.org/11954 for reasons.
 (put 'dired-do-copy 'ido 'ignore)
 (put 'dired-do-rename 'ido 'ignore)