summaryrefslogtreecommitdiff
path: root/lisp/dired-x.el
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2021-10-24 08:34:52 +0200
committerStefan Kangas <stefan@marxist.se>2021-10-24 08:38:15 +0200
commitaea4af5119fdf130f1df7190478a23c6777f92a2 (patch)
tree87802c93b87c6e809affb772197d085f7042a3e0 /lisp/dired-x.el
parent5f61b38b406f849f4e6f681da11549aa1096727f (diff)
downloademacs-aea4af5119fdf130f1df7190478a23c6777f92a2.tar.gz
Make dired-x-guess-file-name-at-point obsolete
* lisp/dired-x.el (dired-x-guess-file-name-at-point): Make obsolete in favour of 'thing-at-point'. (dired-x-read-filename-at-point): Use 'thing-at-point' instead of above obsolete function.
Diffstat (limited to 'lisp/dired-x.el')
-rw-r--r--lisp/dired-x.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 7f889a2bfd6..fc626aa76b5 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -1478,12 +1478,12 @@ a prefix argument, when it offers the filename near point as a default."
;;; Internal functions
-;; Fixme: This should probably use `thing-at-point'. -- fx
(define-obsolete-function-alias 'dired-filename-at-point
#'dired-x-guess-file-name-at-point "28.1")
(defun dired-x-guess-file-name-at-point ()
"Return the filename closest to point, expanded.
Point should be in or after a filename."
+ (declare (obsolete "use (thing-at-point 'filename) instead." "29.1"))
(save-excursion
;; First see if just past a filename.
(or (eobp) ; why?
@@ -1515,7 +1515,7 @@ Point should be in or after a filename."
"Return filename prompting with PROMPT with completion.
If `current-prefix-arg' is non-nil, uses name at point as guess."
(if current-prefix-arg
- (let ((guess (dired-x-guess-file-name-at-point)))
+ (let ((guess (thing-at-point 'filename)))
(read-file-name prompt
(file-name-directory guess)
guess