# HG changeset patch # User Kim F. Storm # Date 1120817259 0 # Node ID f7e7dd269327f99f98987a0924e21072f3831e38 # Parent 35e5dc0d4ab4226d29354426f8c5cb872a057320 * ido.el (ido-use-filename-at-point): New choice `guess'. (ido-file-internal): Try ffap-guesser if selected. diff -r 35e5dc0d4ab4 -r f7e7dd269327 lisp/ido.el --- a/lisp/ido.el Fri Jul 08 10:07:19 2005 +0000 +++ b/lisp/ido.el Fri Jul 08 10:07:39 2005 +0000 @@ -578,8 +578,12 @@ (defcustom ido-use-filename-at-point nil "*Non-nil means that ido shall look for a filename at point. +May use `ffap-guesser' to guess whether text at point is a filename. If found, use that as the starting point for filename selection." - :type 'boolean + :type '(choice + (const :tag "Disabled" nil) + (const :tag "Guess filename" guess) + (other :tag "Use literal filename" t)) :group 'ido) @@ -2051,7 +2055,9 @@ filename t)) ((and ido-use-filename-at-point - (setq fn (ffap-string-at-point)) + (setq fn (if (eq ido-use-filename-at-point 'guess) + (ffap-guesser) + (ffap-string-at-point))) (not (string-match "^http:/" fn)) (setq d (file-name-directory fn)) (file-directory-p d))