# HG changeset patch # User Richard M. Stallman # Date 918923314 0 # Node ID 24ffa91626d3cf4ce000bfcbb9a5e86c90a1acfd # Parent c65bd0a4acfd26ad5bc7ac91d7680a6af6b5b760 (ffap-file-at-point): Test local file names immediately. Strip off line numbers. diff -r c65bd0a4acfd -r 24ffa91626d3 lisp/ffap.el --- a/lisp/ffap.el Sat Feb 13 13:38:17 1999 +0000 +++ b/lisp/ffap.el Sat Feb 13 16:28:34 1999 +0000 @@ -1100,7 +1100,13 @@ (unwind-protect (cond ;; Immediate rejects (/ and // are too common in C++): - ((member name '("" "/" "//")) nil) + ((member name '("" "/" "//" ".")) nil) + ;; Immediately test local filenames. If default-directory is + ;; remote, you probably already have a connection. + ((and (not abs) (ffap-file-exists-string name))) + ;; Try stripping off line numbers; good for compilation/grep output. + ((and (not abs) (string-match ":[0-9]" name) + (ffap-file-exists-string (substring name 0 (match-beginning 0))))) ;; Immediately test local filenames. If default-directory is ;; remote, you probably already have a connection. ((and (not abs) (ffap-file-exists-string name)))