aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2005-07-08 10:07:39 +0000
committerKim F. Storm2005-07-08 10:07:39 +0000
commit3c88bdc5607cbf2173a83afcc2102e7001c3e326 (patch)
treea5d20d1ab79ec12b83c6dc7936de4e7f1954dc4e
parent3aaa5e264572a05bfe1002cbe48294a756441826 (diff)
downloademacs-3c88bdc5607cbf2173a83afcc2102e7001c3e326.tar.gz
emacs-3c88bdc5607cbf2173a83afcc2102e7001c3e326.zip
* ido.el (ido-use-filename-at-point): New choice `guess'.
(ido-file-internal): Try ffap-guesser if selected.
-rw-r--r--lisp/ido.el10
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."
578 578
579(defcustom ido-use-filename-at-point nil 579(defcustom ido-use-filename-at-point nil
580 "*Non-nil means that ido shall look for a filename at point. 580 "*Non-nil means that ido shall look for a filename at point.
581May use `ffap-guesser' to guess whether text at point is a filename.
581If found, use that as the starting point for filename selection." 582If found, use that as the starting point for filename selection."
582 :type 'boolean 583 :type '(choice
584 (const :tag "Disabled" nil)
585 (const :tag "Guess filename" guess)
586 (other :tag "Use literal filename" t))
583 :group 'ido) 587 :group 'ido)
584 588
585 589
@@ -2051,7 +2055,9 @@ If INITIAL is non-nil, it specifies the initial input string."
2051 filename t)) 2055 filename t))
2052 2056
2053 ((and ido-use-filename-at-point 2057 ((and ido-use-filename-at-point
2054 (setq fn (ffap-string-at-point)) 2058 (setq fn (if (eq ido-use-filename-at-point 'guess)
2059 (ffap-guesser)
2060 (ffap-string-at-point)))
2055 (not (string-match "^http:/" fn)) 2061 (not (string-match "^http:/" fn))
2056 (setq d (file-name-directory fn)) 2062 (setq d (file-name-directory fn))
2057 (file-directory-p d)) 2063 (file-directory-p d))