[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CODE SNIPPET: find-file-at-point
From: |
Sandip Chitale |
Subject: |
CODE SNIPPET: find-file-at-point |
Date: |
Wed, 28 Jul 2004 15:42:56 -0700 |
(defun find-file-at-point ()
"If point is on a filename that exists find it else call regular find
file."
(interactive)
(let ((filename (thing-at-point 'filename)))
(if (and filename
(file-exists-p filename))
(find-file filename)
(call-interactively 'find-file))))
;;; possible keybinding
(global-set-key [(control x) (f)] 'find-file-at-point)
- CODE SNIPPET: find-file-at-point,
Sandip Chitale <=