summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Kaludercic <philipk@posteo.net>2026-03-02 23:51:58 +0100
committerPhilip Kaludercic <philipk@posteo.net>2026-03-02 23:55:36 +0100
commit44a0918caacd5d3a3800ca9c565f914d6290e5c9 (patch)
tree6bdeebec6b1cd43ba35588f9a50dca3829f423f0
parentc8d61e8ed51b666e86732ec5bed1039096debd04 (diff)
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.
-rw-r--r--do-at-point.el8
1 files changed, 4 insertions, 4 deletions
diff --git a/do-at-point.el b/do-at-point.el
index 769b3f5..43aa07a 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