From 2d795c92abaf9da80e7e94f2da047e5383a50d99 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Mon, 27 Nov 2000 12:11:00 +0000 Subject: [PATCH] (dired-get-filename): Return filename verbatim if LOCALP is `verbatim'. --- lisp/dired.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lisp/dired.el b/lisp/dired.el index 926bbee73a4..306ecb2c56c 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -1399,7 +1399,8 @@ otherwise, display it in another buffer." "In dired, return name of file mentioned on this line. Value returned normally includes the directory name. Optional arg LOCALP with value `no-dir' means don't include directory - name in result. A value of t means construct name relative to + name in result. A value of `verbatim' means to return the name exactly as + it occurs in the buffer, and a value of t means construct name relative to `default-directory', which still may contain slashes if in a subdirectory. Optional arg NO-ERROR-IF-NOT-FILEP means return nil if no filename on this line, otherwise an error occurs." @@ -1431,6 +1432,8 @@ Optional arg NO-ERROR-IF-NOT-FILEP means return nil if no filename on (not default-file-name-coding-system) (setq file (encode-coding-string file buffer-file-coding-system))) (cond + ((eq localp 'verbatim) + file) ((and (eq localp 'no-dir) already-absolute) (file-name-nondirectory file)) ((or already-absolute (eq localp 'no-dir)) -- 2.39.2