*** lisp/ido.el.~1.110.~ 2006-10-16 14:42:24.000000000 +0200 --- lisp/ido.el 2006-11-27 16:58:30.000000000 +0100 *************** *** 1111,1116 **** --- 1111,1122 ---- ;; Set to 'ignore to inhibit switching between find-file/switch-buffer. (defvar ido-context-switch-command) + ;; Regexp that matches a hostname. + (defconst ido-hostname-regexp + (if (memq system-type '(ms-dos windows-nt)) + ".." + ".")) + ;;; FUNCTIONS (defun ido-active (&optional merge) *************** *** 2068,2074 **** (ido-set-current-directory (file-name-directory (substring ido-current-directory 0 -1)))) (setq ido-set-default-item t)) ! ((and (string-match (if ido-enable-tramp-completion "..[:@]\\'" "..:\\'") ido-selected) (ido-is-root-directory)) ;; Ange-ftp or Tramp (ido-set-current-directory ido-current-directory ido-selected) (ido-trace "tramp prefix" ido-selected) --- 2074,2082 ---- (ido-set-current-directory (file-name-directory (substring ido-current-directory 0 -1)))) (setq ido-set-default-item t)) ! ((and (string-match (concat ido-hostname-regexp ! (if ido-enable-tramp-completion "[:@]\\'" ":\\'")) ! ido-selected) (ido-is-root-directory)) ;; Ange-ftp or Tramp (ido-set-current-directory ido-current-directory ido-selected) (ido-trace "tramp prefix" ido-selected) *************** *** 2426,2432 **** ((and (= 1 (length ido-matches)) (not (and ido-enable-tramp-completion (string-equal ido-current-directory "/") ! (string-match "..[@:]\\'" (ido-name (car ido-matches)))))) ;; only one choice, so select it. (if (not ido-confirm-unique-completion) (exit-minibuffer) --- 2434,2441 ---- ((and (= 1 (length ido-matches)) (not (and ido-enable-tramp-completion (string-equal ido-current-directory "/") ! (string-match (concat ido-hostname-regexp "[@:]\\'") ! (ido-name (car ido-matches)))))) ;; only one choice, so select it. (if (not ido-confirm-unique-completion) (exit-minibuffer) *************** *** 3433,3439 **** (let ((default-directory ido-current-directory)) (ido-to-end ;; move ftp hosts and visited files to end (delq nil (mapcar ! (lambda (x) (if (or (string-match "..:\\'" x) (and (not (ido-final-slash x)) (get-file-buffer x))) x)) ido-temp-list))))) --- 3442,3448 ---- (let ((default-directory ido-current-directory)) (ido-to-end ;; move ftp hosts and visited files to end (delq nil (mapcar ! (lambda (x) (if (or (string-match (concat ido-hostname-regexp ":\\'") x) (and (not (ido-final-slash x)) (get-file-buffer x))) x)) ido-temp-list))))) *************** *** 4149,4155 **** (setq refresh t)) )) ! ((and (string-match (if ido-enable-tramp-completion "..[:@]\\'" "..:\\'") contents) (ido-is-root-directory)) ;; Ange-ftp or tramp (ido-set-current-directory ido-current-directory contents) (when (ido-is-slow-ftp-host) --- 4158,4166 ---- (setq refresh t)) )) ! ((and (string-match (concat ido-hostname-regexp ! (if ido-enable-tramp-completion "[:@]\\'" ":\\'")) ! contents) (ido-is-root-directory)) ;; Ange-ftp or tramp (ido-set-current-directory ido-current-directory contents) (when (ido-is-slow-ftp-host) *** lisp/ChangeLog.~1.10261.~ 2006-11-06 15:42:02.000000000 +0100 --- lisp/ChangeLog 2006-11-27 17:00:03.000000000 +0100 *************** *** 0 **** --- 1,7 ---- + 2006-11-27 Michaƫl Cadilhac + + * ido.el (ido-hostname-regexp): New. Regexp that matches a hostname. + (ido-read-internal): Use it, allowing single letter named hosts on non + MS Windows systems. + (ido-complete, ido-make-file-list, ido-exhibit): Ditto. +