diff options
author | Kim F. Storm <storm@cua.dk> | 2005-07-08 10:07:39 +0000 |
---|---|---|
committer | Kim F. Storm <storm@cua.dk> | 2005-07-08 10:07:39 +0000 |
commit | 3c88bdc5607cbf2173a83afcc2102e7001c3e326 (patch) | |
tree | a5d20d1ab79ec12b83c6dc7936de4e7f1954dc4e /lisp/ido.el | |
parent | 3aaa5e264572a05bfe1002cbe48294a756441826 (diff) | |
download | emacs-3c88bdc5607cbf2173a83afcc2102e7001c3e326.tar.gz |
* ido.el (ido-use-filename-at-point): New choice `guess'.
(ido-file-internal): Try ffap-guesser if selected.
Diffstat (limited to 'lisp/ido.el')
-rw-r--r-- | lisp/ido.el | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/ido.el b/lisp/ido.el index 7912c2185b9..97adb97bdd5 100644 --- a/lisp/ido.el +++ b/lisp/ido.el @@ -578,8 +578,12 @@ the `ido-work-directory-list' list." (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 @@ If INITIAL is non-nil, it specifies the initial input string." 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)) |