diff options
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/ffap.el | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index e19c4e723a3..e55f23fa0db 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2009-09-09 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * ffap.el (ffap-file-at-point): Handle absolute (non-remote) files with | ||
| 4 | line numbers too. (Bug#4374) | ||
| 5 | |||
| 1 | 2009-09-08 Stefan Monnier <monnier@iro.umontreal.ca> | 6 | 2009-09-08 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 7 | ||
| 3 | * smerge-mode.el (smerge-remove-props, smerge-refine): | 8 | * smerge-mode.el (smerge-remove-props, smerge-refine): |
diff --git a/lisp/ffap.el b/lisp/ffap.el index 6aa6913dbed..3eb21a53666 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el | |||
| @@ -1,7 +1,7 @@ | |||
| 1 | ;;; ffap.el --- find file (or url) at point | 1 | ;;; ffap.el --- find file (or url) at point |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004, | 3 | ;; Copyright (C) 1995, 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, |
| 4 | ;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | 4 | ;; 2006, 2007, 2008, 2009 Free Software Foundation, Inc. |
| 5 | 5 | ||
| 6 | ;; Author: Michelangelo Grigni <mic@mathcs.emory.edu> | 6 | ;; Author: Michelangelo Grigni <mic@mathcs.emory.edu> |
| 7 | ;; Maintainer: FSF | 7 | ;; Maintainer: FSF |
| @@ -1177,6 +1177,9 @@ which may actually result in an url rather than a filename." | |||
| 1177 | ((and abs (ffap-file-remote-p name))) | 1177 | ((and abs (ffap-file-remote-p name))) |
| 1178 | ;; Ok, not remote, try the existence test even if it is absolute: | 1178 | ;; Ok, not remote, try the existence test even if it is absolute: |
| 1179 | ((and abs (ffap-file-exists-string name))) | 1179 | ((and abs (ffap-file-exists-string name))) |
| 1180 | ;; Try stripping off line numbers. | ||
| 1181 | ((and abs (string-match ":[0-9]" name) | ||
| 1182 | (ffap-file-exists-string (substring name 0 (match-beginning 0))))) | ||
| 1180 | ;; If it contains a colon, get rid of it (and return if exists) | 1183 | ;; If it contains a colon, get rid of it (and return if exists) |
| 1181 | ((and (string-match path-separator name) | 1184 | ((and (string-match path-separator name) |
| 1182 | (setq name (ffap-string-at-point 'nocolon)) | 1185 | (setq name (ffap-string-at-point 'nocolon)) |