branch: externals/do-at-point
commit 44a0918caacd5d3a3800ca9c565f914d6290e5c9
Author: Philip Kaludercic <[email protected]>
Commit: Philip Kaludercic <[email protected]>
Adjust "filename" actions to avoid false positive matches
We move it further down in the hierarchy so that we don't interpret a
symbol as a filename in the current working directory or a URL as a
filename in the "http:" directory, among other examples.
---
do-at-point.el | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/do-at-point.el b/do-at-point.el
index 769b3f5189..43aa07ac19 100644
--- a/do-at-point.el
+++ b/do-at-point.el
@@ -151,10 +151,6 @@ of this variable.")
,(lambda (path)
(require 'gnus-dired)
(gnus-dired-attach (list path)))))
- (filename
- (?d "Dired" ,(lambda (file)
- (let ((default-directory (file-name-directory file)))
- (dired-jump nil file)))))
(url
(?b "Browse" ,#'browse-url)
(?d "Download" ,#'(lambda (url)
@@ -186,6 +182,10 @@ of this variable.")
(string)
(sexp
(?t "Transpose" ,(lambda () (transpose-sexps (or current-prefix-arg 1)))))
+ (filename
+ (?f . existing-filename)
+ (?4 . existing-filename)
+ (?d . existing-filename))
(line
(?t "Transpose" ,(lambda () (transpose-lines (or current-prefix-arg 1)))))
(paragraph