summaryrefslogtreecommitdiff
path: root/lisp/dired-x.el
diff options
context:
space:
mode:
authorGerd Moellmann <gerd@gnu.org>2000-03-01 10:27:54 +0000
committerGerd Moellmann <gerd@gnu.org>2000-03-01 10:27:54 +0000
commit6b62286235528eac4fc7ffe9eb7478c1cce24ddc (patch)
treeda02c2b2354aaeeb15d305a18c107891deb7e07d /lisp/dired-x.el
parent0a86e779336666b69a827056274737962bd45cbd (diff)
downloademacs-6b62286235528eac4fc7ffe9eb7478c1cce24ddc.tar.gz
(dired-filename-at-point): Add `@' to valid
file name characters. (dired-filename-at-point): Handle ange-ftp file names.
Diffstat (limited to 'lisp/dired-x.el')
-rw-r--r--lisp/dired-x.el11
1 files changed, 8 insertions, 3 deletions
diff --git a/lisp/dired-x.el b/lisp/dired-x.el
index 50cdb493dc1..63d51c7716f 100644
--- a/lisp/dired-x.el
+++ b/lisp/dired-x.el
@@ -1611,10 +1611,10 @@ to test if that file exists. Use minibuffer after snatching filename."
;; preference for looking backward when not directly on a symbol. Not
;; perfect - point must be in middle of or end of filename.
- (let ((filename-chars ".a-zA-Z0-9---_/:$+")
+ (let ((filename-chars ".a-zA-Z0-9---_/:$+@")
(bol (save-excursion (beginning-of-line) (point)))
(eol (save-excursion (end-of-line) (point)))
- start end filename)
+ start end filename prefix)
(save-excursion
;; First see if just past a filename.
@@ -1630,6 +1630,11 @@ to test if that file exists. Use minibuffer after snatching filename."
(progn
(skip-chars-backward filename-chars)
(setq start (point))
+ (setq prefix
+ (and (string-match "^\\w+@"
+ (buffer-substring start eol))
+ "/"))
+ (goto-char start)
(if (string-match "[/~]" (char-to-string (preceding-char)))
(setq start (1- start)))
(skip-chars-forward filename-chars))
@@ -1637,7 +1642,7 @@ to test if that file exists. Use minibuffer after snatching filename."
(error "No file found around point!"))
;; Return string.
- (expand-file-name (buffer-substring start (point))))))
+ (expand-file-name (concat prefix (buffer-substring start (point)))))))
(defun read-filename-at-point (prompt)
;;; Returns filename prompting with PROMPT with completion. If