diff options
Diffstat (limited to 'lisp/ido.el')
-rw-r--r-- | lisp/ido.el | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/lisp/ido.el b/lisp/ido.el index 3ed0d952f36..b81a9db5eb9 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -1521,6 +1521,10 @@ Removes badly formatted data and ignored directories." :global t (remove-function read-file-name-function #'ido-read-file-name) (remove-function read-buffer-function #'ido-read-buffer) + (when (boundp 'ffap-file-finder) + (remove-function ffap-file-finder #'ido-find-file) + (when ido-mode + (add-function :override ffap-file-finder #'ido-find-file))) (when ido-everywhere (if (not ido-mode) (ido-mode 'both) @@ -1746,7 +1750,7 @@ is enabled then some keybindings are changed in the keymap." ido-max-file-prompt-width)) (literal (and (boundp 'ido-find-literal) ido-find-literal "(literal) ")) (vc-off (and ido-saved-vc-hb (not vc-handled-backends) "[-VC] ")) - (prefix nil) + ;; (prefix nil) (rule ido-rewrite-file-prompt-rules)) (let ((case-fold-search nil)) (while rule @@ -1762,11 +1766,11 @@ is enabled then some keybindings are changed in the keymap." ; (if ido-process-ignore-lists "" "&") (or literal "") (or vc-off "") - (or prefix "") + ;; (or prefix "") (let ((l (length dirname))) (if (and max-width (> max-width 0) (> l max-width)) (let* ((s (substring dirname (- max-width))) - (i (string-match "/" s))) + (i (string-search "/" s))) (concat "..." (if i (substring s i) s))) dirname))))) (t prompt))) @@ -2512,7 +2516,7 @@ If cursor is not at the end of the user input, move to end of input." ;; Do nothing ) ((and (memq ido-cur-item '(file dir)) - (string-match "[$]" ido-text)) + (string-search "$" ido-text)) (let ((evar (substitute-in-file-name (concat ido-current-directory ido-text)))) (if (not (file-exists-p (file-name-directory evar))) (message "Expansion generates non-existing directory name") @@ -3085,7 +3089,7 @@ If repeated, insert text from buffer instead." (setq ido-text-init word ido-try-merged-list nil ido-exit 'chdir)) - ((string-match "/" word) + ((string-search "/" word) (setq ido-text-init (concat ido-current-directory word) ido-try-merged-list nil ido-exit 'chdir)) @@ -4555,7 +4559,7 @@ For details of keybindings, see `ido-find-file'." (setq try-single-dir-match t)))) ((and (string-equal (substring contents -2 -1) "/") - (not (string-match "[$]" contents))) + (not (string-search "$" contents))) (ido-set-current-directory (cond ((= (length contents) 2) @@ -4652,7 +4656,7 @@ For details of keybindings, see `ido-find-file'." (memq ido-cur-item '(file dir)) (not (ido-is-root-directory)) (> (length contents) 1) - (not (string-match "[$]" contents)) + (not (string-search "$" contents)) (not ido-directory-nonreadable) (not ido-directory-too-big)) (ido-trace "merge?") |