summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2007-01-22 22:37:25 +0000
committerKim F. Storm <storm@cua.dk>2007-01-22 22:37:25 +0000
commitcba9a3a5eecbaccff2d620a94d810059927b1515 (patch)
tree06da22c50e882150c9ffd6a8e45311197cd47210
parent67155dc3f4e665d14fd0b567a805b1ca8eb3eb2c (diff)
downloademacs-cba9a3a5eecbaccff2d620a94d810059927b1515.tar.gz
(ido-active): Add xemacs test from ido-minibuffer-setup.
(ido-initiate-auto-merge, ido-exhibit, ido-minibuffer-setup) (ido-tidy): Use ido-active.
-rw-r--r--lisp/ido.el15
1 files changed, 7 insertions, 8 deletions
diff --git a/lisp/ido.el b/lisp/ido.el
index c1f0066b655..6c51fb075cd 100644
--- a/lisp/ido.el
+++ b/lisp/ido.el
@@ -1119,7 +1119,9 @@ so that it doesn't interfere with other minibuffer usage.")
(defun ido-active (&optional merge)
(if merge
ido-use-merged-list
- (and (boundp 'ido-completing-read) (= ido-use-mycompletion-depth (minibuffer-depth)))))
+ (and (boundp 'ido-completing-read)
+ (or (featurep 'xemacs)
+ (= ido-use-mycompletion-depth (minibuffer-depth))))))
(defvar ido-trace-enable nil)
@@ -4121,7 +4123,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
(ido-trace "\n*merge timeout*" buffer)
(setq ido-auto-merge-timer nil)
(when (and (buffer-live-p buffer)
- (= ido-use-mycompletion-depth (minibuffer-depth))
+ (ido-active)
(boundp 'ido-eoinput) ido-eoinput)
(let ((contents (buffer-substring-no-properties (minibuffer-prompt-end) ido-eoinput)))
(ido-trace "request merge")
@@ -4141,7 +4143,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
;; 1. It prints a default file name when there is no text yet entered.
;; 2. It calls my completion routine rather than the standard completion.
- (when (= ido-use-mycompletion-depth (minibuffer-depth))
+ (when (ido-active)
(let ((contents (buffer-substring-no-properties (minibuffer-prompt-end) (point-max)))
(buffer-undo-list t)
try-single-dir-match
@@ -4444,9 +4446,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
(defun ido-minibuffer-setup ()
"Minibuffer setup hook for `ido'."
;; Copied from `icomplete-minibuffer-setup-hook'.
- (when (and (boundp 'ido-completing-read)
- (or (featurep 'xemacs)
- (= ido-use-mycompletion-depth (minibuffer-depth))))
+ (when (ido-active)
(add-hook 'pre-command-hook 'ido-tidy nil t)
(add-hook 'post-command-hook 'ido-exhibit nil t)
(setq cua-inhibit-cua-keys t)
@@ -4465,8 +4465,7 @@ For details of keybindings, do `\\[describe-function] ido-find-file'."
(cancel-timer ido-auto-merge-timer)
(setq ido-auto-merge-timer nil))
- (if (and (boundp 'ido-use-mycompletion-depth)
- (= ido-use-mycompletion-depth (minibuffer-depth)))
+ (if (ido-active)
(if (and (boundp 'ido-eoinput)
ido-eoinput)